This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16988] New: confusing diagnostic for ill-formed object definition
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Aug 2004 19:28:27 -0000
- Subject: [Bug c++/16988] New: confusing diagnostic for ill-formed object definition
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The error message for the program below is misleading. The error
is not /before/ the const qualifier but /after/ it. The diagnostic
for the same program that does not qualify foo with :: is a lot
better: `foo' does not name a type
$ cat t.cpp && gcc -dumpversion && gcc -c t.cpp
int main ()
{
const ::foo bar = 0;
}
3.4.0
t.cpp: In function `int main()':
t.cpp:3: error: expected primary-expression before "const"
t.cpp:3: error: expected `;' before "const"
--
Summary: confusing diagnostic for ill-formed object definition
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16988