public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36659]  New: Confusion error message order 'error: ‘functionname’ declared as an ‘inline’ variable'
@ 2008-06-28 14:20 carlo at gcc dot gnu dot org
  2008-06-28 21:26 ` [Bug c++/36659] Confusing " rguenth at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: carlo at gcc dot gnu dot org @ 2008-06-28 14:20 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1526 bytes --]

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/36659] Confusing error message order 'error: ‘functionname’ declared as an ‘inline’ variable'
  2008-06-28 14:20 [Bug c++/36659] New: Confusion error message order 'error: ‘functionname’ declared as an ‘inline’ variable' carlo at gcc dot gnu dot org
@ 2008-06-28 21:26 ` rguenth at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-28 21:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-06-28 21:25 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
      Known to fail|                            |4.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-28 21:25:32
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36659


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-28 21:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-28 14:20 [Bug c++/36659] New: Confusion error message order 'error: ‘functionname’ declared as an ‘inline’ variable' carlo at gcc dot gnu dot org
2008-06-28 21:26 ` [Bug c++/36659] Confusing " rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).