This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51150] [C++11][4.6/4.7 Regression] ICE when result of -> initializes const variable of different type


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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]