[Bug c++/48665] type of const member function

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 19 22:05:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48665

--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to David Blaikie from comment #15)
> "The compiler still reuses the same representation for const/volatile and
> for some attributes, sometimes misinterpreting one for the other." - sounds
> like rejecting this valid code is a workaround for that choice of
> representation?

That comment you quoted is explaining why the diagnostic printed "void ()
__attribute__((const))" insetad of "void () const", not why the code should be
rejected. It's not rejected because of a limitation in GCC.


More information about the Gcc-bugs mailing list