This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
- From: "jyasskin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Nov 2011 05:30:12 +0000
- Subject: [Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type
- Auto-submitted: auto-generated
- References: <bug-51150-4@http.gcc.gnu.org/bugzilla/>
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,