This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
RE: c++/6568: g++3 (3.0.2) misinterpreting single byte hex constants
- From: "Brian Ceccarelli" <brian at talusmusic dot com>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 6 May 2002 13:26:04 -0000
- Subject: RE: c++/6568: g++3 (3.0.2) misinterpreting single byte hex constants
- Reply-to: "Brian Ceccarelli" <brian at talusmusic dot com>
The following reply was made to PR c++/6568; it has been noted by GNATS.
From: "Brian Ceccarelli" <brian@talusmusic.com>
To: <neil@gcc.gnu.org>,
<brian@talusmusic.com>,
<gcc-bugs@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<nobody@gcc.gnu.org>,
<gcc-gnats@gcc.gnu.org>
Cc:
Subject: RE: c++/6568: g++3 (3.0.2) misinterpreting single byte hex constants
Date: Mon, 6 May 2002 09:20:59 -0400
Subject: Re: c++/6568: g++3 (3.0.2) misinterpreting single byte hex
************************************
localhost:[17] /home/ceccareb/work % uname -a
Linux localhost.localdomain 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686
unknown
localhost:[18] /home/ceccareb/work % g++3 -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/specs
Configured with:
../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --disable-checking --host=i386-redha
t-linux
Thread model: posix
gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)
localhost:[42] /usr/src %
localhost:[19] /home/ceccareb/work % cat test.cc
# include <stdio.h>
int main(int argc, char *argv[])
{
int i;
char n;
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);
return 0;
}
localhost:[20] /home/ceccareb/work % g++3 test.cc
test.cc: In function `int main(int, char**)':
test.cc:17: warning: comparison is always false due to limited range of data
type
localhost:[21] /home/ceccareb/work % a.out
sizeof(i) = 4
sizeof(n) = 1
No. n = 0xffffffff
localhost:[22] /home/ceccareb/work %
**************************************
-----Original Message-----
From: neil@gcc.gnu.org [mailto:neil@gcc.gnu.org]
Sent: Monday, May 06, 2002 4:26 AM
To: brian@talusmusic.com; gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org;
nobody@gcc.gnu.org
Subject: Re: c++/6568: g++3 (3.0.2) misinterpreting single byte hex
constants
Synopsis: g++3 (3.0.2) misinterpreting single byte hex constants
State-Changed-From-To: open->feedback
State-Changed-By: neil
State-Changed-When: Mon May 6 01:26:16 2002
State-Changed-Why:
Missing testcase. Please reply to this e-mail with the
5-line test case in the body of your e-mail; without changing the
subject line or the cc: list. That will ensure it goes into our bug system.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&p
r=6568