This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24983] Needs a warning?
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Nov 2005 03:45:24 -0000
- Subject: [Bug c++/24983] Needs a warning?
- References: <bug-24983-6594@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from igodard at pacbell dot net 2005-11-22 03:45 -------
The 3.0 is the best error, but I like the warning that comeau also gives:
Comeau C/C++ 4.3.3 (Aug 6 2003 15:13:37) for ONLINE_EVALUATION_BETA1
Copyright 1988-2003 Comeau Computing. All rights reserved.
MODE:strict errors C++
"ComeauTest.c", line 1: warning: type qualifier on return type is meaningless
struct foo { const void f(); };
^
"ComeauTest.c", line 2: error: declaration is incompatible with
"const void foo::f()" (declared at line 1)
void foo::f(){}
^
1 error detected in the compilation of "ComeauTest.c".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24983