Bug 38670 - [4.4 regression] g++ rejects valid c++ code
Summary: [4.4 regression] g++ rejects valid c++ code
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-30 10:41 UTC by tim blechmann
Modified: 2008-12-30 11:12 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.2.2 4.3.2
Known to fail: 4.4.0
Last reconfirmed:


Attachments
preprocessed source (633.74 KB, application/x-bzip)
2008-12-30 10:42 UTC, tim blechmann
Details
possible reduced test case (102 bytes, text/x-c++src)
2008-12-30 10:56 UTC, tim blechmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tim blechmann 2008-12-30 10:41:48 UTC
(sorry for not reducing the test case)

gcc-4.4 fails to compile some of my code, which compiled fine with (at least) 4.2 and 4.3. the preprocessed source is attached.

gcc version:
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../gcc-4.4-20081226/configure -v --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,c++ --prefix=/usr/local/lib/gcc-snapshot --enable-shared --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-gtk-cairo --disable-plugin --enable-objc-gc --enable-mpfr --disable-werror --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.0 20081226 (experimental) (GCC)
Comment 1 tim blechmann 2008-12-30 10:42:29 UTC
Created attachment 17011 [details]
preprocessed source
Comment 2 tim blechmann 2008-12-30 10:56:14 UTC
Created attachment 17012 [details]
possible reduced test case
Comment 3 tim blechmann 2008-12-30 10:58:18 UTC
(In reply to comment #2)
> Created an attachment (id=17012) [edit]
> possible reduced test case

hm, i am not sure, whether this is a compiler bug, or a stricter implementation of the standard when reusing type names as variable names ...
Comment 4 Jakub Jelinek 2008-12-30 11:12:11 UTC
See PR37302.  Your testcase is invalid.