This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6568: g++3 (3.0.2) misinterpreting single byte hex constants
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Brian Ceccarelli <brian at talusmusic dot com>
- Cc: neil at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org,nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 6 May 2002 16:22:36 +0100
- Subject: Re: c++/6568: g++3 (3.0.2) misinterpreting single byte hex constants
- References: <20020506082617.11276.qmail@sources.redhat.com> <MBBBKEHEMCPPMONKMJMMKEKNCAAA.brian@talusmusic.com>
Brian Ceccarelli wrote:-
> i = 0;
> n = (-1);
>
> printf("sizeof(i) = %d\n", sizeof i);
> printf("sizeof(n) = %d\n", sizeof n);
>
> if (n == 0xFF)
> printf("Yes. n = 0x%x\n", n);
> else
> printf("No. n = 0x%x\n", n);
Please explain why your test should give "Yes". I think
"No" is correct.
Neil.