This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

integer


Hello,
while playing around with type "int" I came across the following
statement:

 int i=-2147483648;

When compiling I got the following message:

"warning: decimal integer constant is so large that it is unsigned"

I think this is a bug since the range of the values of type "int" 
on a 32bit platform is [ -2^31, 2^31) which is -2147483648 to
2147483647.

I used the following platform:

Linux 2.2.7 on PC (Pentium II 333MHZ)
and
gcc version 2.95.1 19990816 (release)


Regards,
	Nestor Alvarez

-- 
--------------------------------------------------
Nestor Alvarez              COMPUTEC GmbH Software
Dipl. Inform. (FH)
mailto:nestor@computec.com 
http://www.computec.com 
voice:  +49 721 98160-127   fax: +49 721 98160-129
--------------------------------------------------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]