public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity
@ 2004-07-13 19:06 boris at kolpackov dot net
  2004-07-13 19:21 ` [Bug c++/16529] [3.4/3.5 regression] ICE for: " bangerth at dealii dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: boris at kolpackov dot net @ 2004-07-13 19:06 UTC (permalink / raw)
  To: gcc-bugs

According to 7.3.2/4 

"A namespace-name or namespace-alias shall not be declared as the name of any
other entity in the same declarative region. A namespace-name defined at global
scope shall not be declared as the name of any other entity in any global scope
of the program. No diagnostic is required for a violation of this rule by
declarations in different translation units."

the following c++ is ill-formed:

namespace m
{
}

namespace n
{
  namespace m
  {
  }
}

namespace m = n::m;

-- 
           Summary: namespace-alias shall no be declared as the name of any
                    other entity
           Product: gcc
           Version: 3.4.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: boris at kolpackov dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
@ 2004-07-13 19:21 ` bangerth at dealii dot org
  2004-07-13 19:38 ` boris at kolpackov dot net
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-07-13 19:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-07-13 19:21 -------
Confirmed. In fact, I get ICEs with newer versions of gcc with your code: 
 
g/x> /home/bangerth/bin/gcc-3.2.3/bin/c++ -c x.cc 
x.cc:12: redefinition of `m' 
x.cc:2: `m' previously declared here 
 
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc 
x.cc:12: error: redefinition of `m' 
x.cc:2: error: `m' previously declared here 
x.cc:12: internal compiler error: tree check: expected var_decl, have  
   namespace_decl in warn_extern_redeclared_static, at cp/decl.c:3278 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc:12: internal compiler error: tree check: expected var_decl, have 
namespace_decl in duplicate_decls, at cp/decl.c:1751 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc 
x.cc:12: internal compiler error: tree check: expected var_decl, have 
namespace_decl in duplicate_decls, at cp/decl.c:1745 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
The ICEs are a regression, as is the fact that we now don't even get to see 
the original error message any more. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-invalid-code
      Known to fail|                            |3.3.4 3.4.0 3.5.0
      Known to work|                            |3.2.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-13 19:21:21
               date|                            |
            Summary|namespace-alias shall no be |[3.4/3.5 regression] ICE
                   |declared as the name of any |for: namespace-alias shall
                   |other entity                |no be declared as the name
                   |                            |of any other entity
   Target Milestone|---                         |3.4.2


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
  2004-07-13 19:21 ` [Bug c++/16529] [3.4/3.5 regression] ICE for: " bangerth at dealii dot org
@ 2004-07-13 19:38 ` boris at kolpackov dot net
  2004-07-13 19:41 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: boris at kolpackov dot net @ 2004-07-13 19:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From boris at kolpackov dot net  2004-07-13 19:38 -------
Not sure about ICE; for me both gcc-3.4.0 and gcc-3.4.1 compile code above
without any diagnostic.

-- 


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
  2004-07-13 19:21 ` [Bug c++/16529] [3.4/3.5 regression] ICE for: " bangerth at dealii dot org
  2004-07-13 19:38 ` boris at kolpackov dot net
@ 2004-07-13 19:41 ` pinskia at gcc dot gnu dot org
  2004-07-13 20:27 ` bangerth at dealii dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-13 19:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-07-13 19:41 -------
That is most likely because  Wolfgang has checking turned on. So this is ice-on-invalid-code, ICE-
checking (which means it ICE only when checking is turned on) and accepts-invalid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, ice-
                   |                            |checking


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
                   ` (2 preceding siblings ...)
  2004-07-13 19:41 ` pinskia at gcc dot gnu dot org
@ 2004-07-13 20:27 ` bangerth at dealii dot org
  2004-08-01 21:37 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2004-07-13 20:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-07-13 20:27 -------
My versions are also a few days old already: 
  gcc version 3.4.1 20040612 (prerelease) 
  gcc version 3.5.0 20040628 (experimental) 
I guess it's time to update again. 
 
W. 

-- 


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
                   ` (3 preceding siblings ...)
  2004-07-13 20:27 ` bangerth at dealii dot org
@ 2004-08-01 21:37 ` mmitchel at gcc dot gnu dot org
  2004-08-02  2:05 ` mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-01 21:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-01 21:37 -------
Working on a fix.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/16529] [3.4/3.5 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
                   ` (4 preceding siblings ...)
  2004-08-01 21:37 ` mmitchel at gcc dot gnu dot org
@ 2004-08-02  2:05 ` mmitchel at gcc dot gnu dot org
  2005-02-11 21:16 ` [Bug c++/16529] [3.4/4.0 " reichelt at gcc dot gnu dot org
  2005-02-11 21:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-02  2:05 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-08-02 02:05 -------
Fixed in GCC 3.4.2 and GCC 3.5.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug c++/16529] [3.4/4.0 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
                   ` (5 preceding siblings ...)
  2004-08-02  2:05 ` mmitchel at gcc dot gnu dot org
@ 2005-02-11 21:16 ` reichelt at gcc dot gnu dot org
  2005-02-11 21:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-11 21:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-02-11 16:58 -------
Btw, fix and testcase are here (wrongly attributed to PR16489):
http://gcc.gnu.org/ml/gcc-cvs/2004-08/msg00026.html


-- 


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


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

* [Bug c++/16529] [3.4/4.0 regression] ICE for: namespace-alias shall no be declared as the name of any other entity
  2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
                   ` (6 preceding siblings ...)
  2005-02-11 21:16 ` [Bug c++/16529] [3.4/4.0 " reichelt at gcc dot gnu dot org
@ 2005-02-11 21:23 ` reichelt at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-11 21:23 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-02-11 17:04 -------
*** Bug 11762 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bkoz at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-02-11 17:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-13 19:06 [Bug c++/16529] New: namespace-alias shall no be declared as the name of any other entity boris at kolpackov dot net
2004-07-13 19:21 ` [Bug c++/16529] [3.4/3.5 regression] ICE for: " bangerth at dealii dot org
2004-07-13 19:38 ` boris at kolpackov dot net
2004-07-13 19:41 ` pinskia at gcc dot gnu dot org
2004-07-13 20:27 ` bangerth at dealii dot org
2004-08-01 21:37 ` mmitchel at gcc dot gnu dot org
2004-08-02  2:05 ` mmitchel at gcc dot gnu dot org
2005-02-11 21:16 ` [Bug c++/16529] [3.4/4.0 " reichelt at gcc dot gnu dot org
2005-02-11 21:23 ` 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).