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++/49921] [C++0x] Segfault during compilation, decltype and operator->*


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?


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