1<html lang="en"> 2<head> 3<title>Integers implementation - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="C-Implementation.html#C-Implementation" title="C Implementation"> 9<link rel="prev" href="Characters-implementation.html#Characters-implementation" title="Characters implementation"> 10<link rel="next" href="Floating-point-implementation.html#Floating-point-implementation" title="Floating point implementation"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="Integers-implementation"></a> 51<p> 52Next: <a rel="next" accesskey="n" href="Floating-point-implementation.html#Floating-point-implementation">Floating point implementation</a>, 53Previous: <a rel="previous" accesskey="p" href="Characters-implementation.html#Characters-implementation">Characters implementation</a>, 54Up: <a rel="up" accesskey="u" href="C-Implementation.html#C-Implementation">C Implementation</a> 55<hr> 56</div> 57 58<h3 class="section">4.5 Integers</h3> 59 60 <ul> 61<li><cite>Any extended integer types that exist in the implementation (C99 6.2.5).</cite> 62 63 <p>GCC does not support any extended integer types. 64<!-- The __mode__ attribute might create types of precisions not --> 65<!-- otherwise supported, but the syntax isn't right for use everywhere --> 66<!-- the standard type names might be used. Predefined typedefs should --> 67<!-- be used if any extended integer types are to be defined. The --> 68<!-- __int128_t and __uint128_t typedefs are not extended integer types --> 69<!-- as they are generally longer than the ABI-specified intmax_t. --> 70 71 <li><cite>Whether signed integer types are represented using sign and magnitude, 72two's complement, or one's complement, and whether the extraordinary value 73is a trap representation or an ordinary value (C99 6.2.6.2).</cite> 74 75 <p>GCC supports only two's complement integer types, and all bit patterns 76are ordinary values. 77 78 <li><cite>The rank of any extended integer type relative to another extended 79integer type with the same precision (C99 6.3.1.1).</cite> 80 81 <p>GCC does not support any extended integer types. 82<!-- If it did, there would only be one of each precision and signedness. --> 83 84 <li><cite>The result of, or the signal raised by, converting an integer to a 85signed integer type when the value cannot be represented in an object of 86that type (C90 6.2.1.2, C99 6.3.1.3).</cite> 87 88 <p>For conversion to a type of width N, the value is reduced 89modulo 2^N to be within range of the type; no signal is raised. 90 91 <li><cite>The results of some bitwise operations on signed integers (C90 926.3, C99 6.5).</cite> 93 94 <p>Bitwise operators act on the representation of the value including 95both the sign and value bits, where the sign bit is considered 96immediately above the highest-value value bit. Signed ‘<samp><span class="samp">>></span></samp>’ acts 97on negative numbers by sign extension. 98 99 <p>GCC does not use the latitude given in C99 only to treat certain 100aspects of signed ‘<samp><span class="samp"><<</span></samp>’ as undefined, but this is subject to 101change. 102 103 <li><cite>The sign of the remainder on integer division (C90 6.3.5).</cite> 104 105 <p>GCC always follows the C99 requirement that the result of division is 106truncated towards zero. 107 108</ul> 109 110 </body></html> 111 112