[Bug c++/66517] New: [5 Regression] [C++11] sorry, unimplemented: unexpected AST of kind type_decl
megahallon at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jun 11 18:13:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66517
Bug ID: 66517
Summary: [5 Regression] [C++11] sorry, unimplemented:
unexpected AST of kind type_decl
Product: gcc
Version: 5.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: megahallon at gmail dot com
Target Milestone: ---
The following snippet:
-------------------------------------
template <typename S>
void p()
{
int val = ({union {int x;}; 3;}
);
}
-------------------------------------
built with g++ 5.1.0:
g++ -std=c++11 bug.cpp -c
gives the following error:
bug.cpp: In function ‘void p()’:
bug.cpp:5:3: sorry, unimplemented: unexpected AST of kind type_decl
);
^
Same error with -std=c++14 but works with -std=c++98.
Also works with g++ 4.8.2.
Output from g++ -v:
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/usr/local --enable-languages=c,c++
--disable-multilib
Thread model: posix
gcc version 5.1.0 (GCC)
More information about the Gcc-bugs
mailing list