This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Bugs in operations of "long" type from GCC-3.4.6 32 bit.


"J.C. Pizarro" <jcpiza@gmail.com> writes:

> > > 1. Error and Warning in assignment of a long constant (with L letter)
> > > (it's not true that a = 1410065408, high(a) = 0x00000000).
> >
> > The constant overflows the range of long, causing undefined behaviour.
> 
> The range of long should be -(2^63) ..  +((2^63)-1).
> There is not reason for an undefined behaviour.

You are confusing long and long long.  This is C, not Java.  The
suffix for a long long constant is LL, not L.

This whole discussion does not belong on the mailing list
gcc@gcc.gnu.org, which is for gcc developers.  It would be appropriate
on gcc-help@gcc.gnu.org.  Please take any followups there.  Thanks.

Ian


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