[Bug c++/11796] New: bogus c++ syntax error on nested casts
cynbe at muq dot org
gcc-bugzilla@gcc.gnu.org
Mon Aug 4 21:00:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11796
Summary: bogus c++ syntax error on nested casts
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cynbe at muq dot org
CC: gcc-bugs at gcc dot gnu dot org
Save the following as x.cxx:
typedef int Int;
int f( void ) { return ( int ( int ( Int ( 1 ) * 1 ) ) ); }
Compile via
g++ -c x.cxx -o x.o
You will get something like
x.cxx: In function `int f()':
x.cxx:2: parse error before `*'
The above appears to be the minimal stimulus for exhibiting this
bug: Try almost any simplification and it will compile fine.
I have replicated this failure on:
g++-3.3 (GCC) 3.3.1 20030626 (Debian prerelease) x86 linux
gcc-3.2 (GCC) 3.2.3 (Debian) x86 linux
version 2.95.4 x86 linux
version 2.95.3 solaris sparc -> ppc cross-compiler
The given stimulus compiles ok on
2.9-cisco-98r solaris
I don't know the revision history of this internal Cisco build.
The above stimulus was boiled down from a much
larger program. :)
kudos for all the good work!
-- Cynbe
More information about the Gcc-bugs
mailing list