This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13452] New: No error on invalid (I think) C++ code
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Dec 2003 18:57:54 -0000
- Subject: [Bug c++/13452] New: No error on invalid (I think) C++ code
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This code is compiled without error in the current mainline:
class C { public: template<typename i> int (*f())() const; };
However, it now seems to me that there should be an error on the trailing const.
Otherwise, I have no idea what the trailing const means. It appears that
generating a const method (i.e., a method for which `this' is a pointer to
const) requires
class C { public: template<typename i> int (*f() const)(); };
This may be a misunderstanding on my part, but at least some people share my
misunderstanding; see PR c++/13447.
--
Summary: No error on invalid (I think) C++ code
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ian at airs dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13452