This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/9829: [3.2/3.3 regression] Missing colon in nested namespace usage causes ICE


>Number:         9829
>Category:       c++
>Synopsis:       [3.2/3.3 regression] Missing colon in nested namespace usage causes ICE
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-illegal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 24 12:56:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Carson
>Release:        unknown-1.0
>Organization:
>Environment:
gcc-3.2.3-20030222
gcc-3.3-20030222
>Description:
The following (illegal) code snippet causes an ICE under gcc-3.2.3-20030222 and gcc-3.3-20030222

ice.cxx:
--------------------------------------
namespace a {
    namespace b {
        void foo();
    }
}

void
a::b:foo()
{
}
---------------------------

% g++32 ice.cxx
ice.cxx:8: `a::b' as declarator
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

% g++33 ice.cxx
ice.cxx:8: internal compiler error: in grokdeclarator, at cp/decl.c:10394
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Whereas gcc-3.4-20030222 and gcc-3.0.x 'work'

% g++34 ice.cxx
ice.cxx:8: error: invalid function declaration

% g++30 ice.cxx
ice.cxx:8: `a::b' as declarator (compiler error)
ice.cxx:8: syntax error before `:' token

[ Seems to occur on both an ix86 machine and a Sun Sparc machine... ]
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]