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] | |
"J.C. Pizarro" <jcpiza@gmail.com> writes:
> The range of long should be -(2^63) .. +((2^63)-1).
Your long has only 32 bits.
> For shifts, the range of a long type should be 0 .. 64 (65 values), not 0 .. 31.
Your long has only 32 bits.
>> %ld is not the correct format for a value of type long long, causing >> undefined behaviour. > > %ld means long format for %d, is it wrong?
%ld is for long, not long long.
Andreas.
Very thanks, LL and %lld are the solution. The GCC compiler has not bugs that i said.
Attachment:
testing_long_GCC_march2007_3.tar.gz
Description: GNU Zip compressed data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |