This is the mail archive of the gcc-bugs@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]

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



>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:


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