public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13857] New: nested namespaces error msg
@ 2004-01-25 15:43 debian-gcc at lists dot debian dot org
  2004-01-25 15:55 ` [Bug c++/13857] " gdr at integrable-solutions dot net
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2004-01-25 15:43 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/229088]

seen in 3.3.3 and 3.4 CVS

In this example the error message mentions the wrong namespace: 
 
 
namespace outer { namespace inner { void foo(); } } 
 
void outer::foo() 
{ 
// error: `void outer::foo()' should have been declared inside `outer' 
}

-- 
           Summary: nested namespaces error msg
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c++/13857] nested namespaces error msg
  2004-01-25 15:43 [Bug c++/13857] New: nested namespaces error msg debian-gcc at lists dot debian dot org
  2004-01-25 15:55 ` [Bug c++/13857] " gdr at integrable-solutions dot net
@ 2004-01-25 15:55 ` pinskia at gcc dot gnu dot org
  2004-01-25 16:00 ` gdr at integrable-solutions dot net
  2004-01-25 16:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-25 15:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-25 15:55 -------
Confirmed but not a regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-25 15:55:10
               date|                            |


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


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

* [Bug c++/13857] nested namespaces error msg
  2004-01-25 15:43 [Bug c++/13857] New: nested namespaces error msg debian-gcc at lists dot debian dot org
@ 2004-01-25 15:55 ` gdr at integrable-solutions dot net
  2004-01-25 15:55 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-25 15:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-25 15:55 -------
Subject: Re:  New: nested namespaces error msg

"debian-gcc at lists dot debian dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| [forwarded from http://bugs.debian.org/229088]
| 
| seen in 3.3.3 and 3.4 CVS
| 
| In this example the error message mentions the wrong namespace: 
|  
|  
| namespace outer { namespace inner { void foo(); } } 
|  
| void outer::foo() 
| { 
| // error: `void outer::foo()' should have been declared inside `outer' 
| }

I don't understand this report.  As far as I can tell, the error
message is correct.  You cannot define something as being part of a
namespace (using a qualified-id)  if it wasn't previously declared
there.  You can perfectly have outer::foo and outer::inner::foo.
The compiler is not telepathic.

-- Gaby


-- 


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


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

* [Bug c++/13857] nested namespaces error msg
  2004-01-25 15:43 [Bug c++/13857] New: nested namespaces error msg debian-gcc at lists dot debian dot org
  2004-01-25 15:55 ` [Bug c++/13857] " gdr at integrable-solutions dot net
  2004-01-25 15:55 ` pinskia at gcc dot gnu dot org
@ 2004-01-25 16:00 ` gdr at integrable-solutions dot net
  2004-01-25 16:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: gdr at integrable-solutions dot net @ 2004-01-25 16:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2004-01-25 16:00 -------
Subject: Re:  nested namespaces error msg

"pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

| Confirmed but not a regression.

It is not even a bug.

-- Gaby


-- 


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


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

* [Bug c++/13857] nested namespaces error msg
  2004-01-25 15:43 [Bug c++/13857] New: nested namespaces error msg debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2004-01-25 16:00 ` gdr at integrable-solutions dot net
@ 2004-01-25 16:04 ` pinskia at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-25 16:04 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-25 16:04 -------
I had to reread the report but I now agree with Gaby that the error is right and there is no way for 
GCC to read your mind.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2004-01-25 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-25 15:43 [Bug c++/13857] New: nested namespaces error msg debian-gcc at lists dot debian dot org
2004-01-25 15:55 ` [Bug c++/13857] " gdr at integrable-solutions dot net
2004-01-25 15:55 ` pinskia at gcc dot gnu dot org
2004-01-25 16:00 ` gdr at integrable-solutions dot net
2004-01-25 16:04 ` pinskia 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).