This is the mail archive of the gcc-help@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: gcc 3.3: long long bug?


Hi Andreas,

> |> Append "LL" to the constant.
> 
> That should not be needed.

The "LL" should be needed, unless a "long long" is the same size as a
"long".

The "long long" data type is an extension to the C (ISO 9989) and C++ (ISO
14882) specs.  As such, automatically sizing a numeric literal to "long
long" (like how a numeric literal that's too big for an "int" becomes an
"unsigned int", and then a "long" and then an "unsigned long") could cause
problems.

Unfortunately, requiring the "LL" suffix causes other headaches.

I wonder when we'll have "long long long" (128-bit) and "long long long
long" (256-bit) numbers.  With accompanying "LLL" and "LLLL" suffixes.
*sigh*

--Eljay


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