This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49921] [C++0x] Segfault during compilation, decltype and operator->*
- From: "fabian.bergmark at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 31 Jul 2011 10:57:20 +0000
- Subject: [Bug c++/49921] [C++0x] Segfault during compilation, decltype and operator->*
- Auto-submitted: auto-generated
- References: <bug-49921-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49921
--- Comment #2 from fabian.bergmark at gmail dot com 2011-07-31 10:57:17 UTC ---
(In reply to comment #1)
> Confirmed. Mainline says:
>
> 49921.C: In function âint main()â:
> 49921.C:15:25: internal compiler error: tree check: expected record_type or
> union_type or qual_union_type, have translation_unit_decl in
> maybe_dummy_object, at cp/tree.c:2474
To quote Modern C++ Design by Andrei Alexandrescu:
"In C++, where every object has a type, the result of operator->* or operator.*
is a unique exception."
and
"Both are binary functions all right, and they return something to which you
can apply the function-call operator immediately, but that "something" does no
have a type."
Is this possibly the reason to the error?