This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36659] New: Confusion error message order 'error: ‘functionname’ declared as an ‘inline’ variable'
- From: "carlo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2008 14:20:16 -0000
- Subject: [Bug c++/36659] New: Confusion error message order 'error: ‘functionname’ declared as an ‘inline’ variable'
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The order of the error messages
error: â??functionnameâ?? declared as an â??inlineâ?? variable
and
error: â??UnDefinedClassâ?? was not declared in this scope
should be swapped.
See following testcase:
struct A {};
int functionname(A foo);
inline int functionname(UnDefinedClass foo)
{
return 0;
}
which results in the errors:
hikaru:~>g++ -c troep.cc
troep.cc:4: error: â??functionnameâ?? declared as an â??inlineâ?? variable
troep.cc:4: error: â??int functionnameâ?? redeclared as different kind of
symbol
troep.cc:2: error: previous declaration of â??int functionname(A)â??
troep.cc:4: error: â??UnDefinedClassâ?? was not declared in this scope
A much better or would be:
troep.cc:4: error: â??UnDefinedClassâ?? was not declared in this scope
troep.cc:4: error: â??functionnameâ?? declared as an â??inlineâ?? variable
troep.cc:4: error: â??int functionnameâ?? redeclared as different kind of
symbol
troep.cc:2: error: previous declaration of â??int functionname(A)â??
--
Summary: Confusion error message order 'error: â??functionnameâ??
declared as an â??inlineâ?? variable'
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlo at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36659