public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23586] New: [3.4/4.0/4.1 regression] Bad diagnostic for invalid namespace-name
@ 2005-08-26 22:20 reichelt at gcc dot gnu dot org
  2005-08-26 22:21 ` [Bug c++/23586] " pinskia at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-26 22:20 UTC (permalink / raw)
  To: gcc-bugs

For an invalid code snippet like

  int i;
  namespace N = i;

we issue the error message

  bug.cc:2: error: expected namespace-name before ';' token
  bug.cc:2: error: unknown namespace '<declaration error>'

with the not very helpful '<declaration error>'.

The situation for the code snippet

  int i;
  using namespace i;

is similar. Here we get the error message:

  bug.cc:2: error: expected namespace-name before ';' token
  bug.cc:2: error: '<type error>' is not a namespace

With the old parser we got

  bug.cc:2: error: unknown namespace `i'

resp.

  bug.cc:2: error: namespace `i' undeclared

so this qualifies as a diagnostic regression.

I'll post a patch soon.

-- 
           Summary: [3.4/4.0/4.1 regression] Bad diagnostic for invalid
                    namespace-name
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-08-31 10:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-26 22:20 [Bug c++/23586] New: [3.4/4.0/4.1 regression] Bad diagnostic for invalid namespace-name reichelt at gcc dot gnu dot org
2005-08-26 22:21 ` [Bug c++/23586] " pinskia at gcc dot gnu dot org
2005-08-26 22:37 ` reichelt at gcc dot gnu dot org
2005-08-30 16:23 ` cvs-commit at gcc dot gnu dot org
2005-08-30 16:28 ` cvs-commit at gcc dot gnu dot org
2005-08-30 16:43 ` [Bug c++/23586] [3.4 " reichelt at gcc dot gnu dot org
2005-08-31  8:47 ` reichelt at gcc dot gnu dot org
2005-08-31 10:16 ` cvs-commit at gcc dot gnu dot org
2005-08-31 10:17 ` reichelt 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).