c++/2759: messes up struct/class keywords

lachaume@gagax6.obs.ujf-grenoble.fr lachaume@gagax6.obs.ujf-grenoble.fr
Mon May 7 06:06:00 GMT 2001


>Number:         2759
>Category:       c++
>Synopsis:       messes up struct/class keywords
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Mon May 07 06:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Regis Lachaume
>Release:        unknown-1.0
>Organization:
>Environment:
latest snapshot on linux
>Description:
The folowing incorrect code compiles without any warning
(compiler options: -W -Wall -ansi -pedantic -O2)
Tried on http://www.codesourcery.com/gcc-compile.shtml

#include <stdexcept>
#include <iostream>

template<class C> struct MyClass { class bad_range; };

template<class C> class MyClass<C>::bad_range: public std::range_error { };

int main() { }
>How-To-Repeat:

>Fix:

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



More information about the Gcc-bugs mailing list