[Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
jyasskin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 16 06:14:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51150
--- Comment #2 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2011-11-16 05:30:12 UTC ---
And here's a similar test case using static_cast instead of ->:
$ cat test.ii
template <class T> void Foo(int val) {
const int now = static_cast<float>(val);
}
$ g++ -std=c++0x test.ii -fsyntax-only
test.ii: In function ‘void Foo(int)’:
test.ii:2:41: internal compiler error: unexpected expression
‘static_cast<float>(val)’ of kind static_cast_expr
Please submit a full bug report,
More information about the Gcc-bugs
mailing list