[Bug c++/11454] New: pedantic causes errors with exceptions, were warnings under 2.95

kirkm at altera dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 7 18:27:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: pedantic causes errors with exceptions, were warnings
                    under 2.95
           Product: gcc
           Version: 3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kirkm at altera dot com
                CC: gcc-bugs at gcc dot gnu dot org

Using -pedantic causes warnings under 2.95 to become errors under 3.2.  
Specifically, where tt.C is simply: 

int f(); 
int f() throw(); 

With gcc 2.95 
[picaso]:/il2/users/jeanb> g++ -pedantic -c tt.C 
tt.C:3: warning: declaration of `f()' throws different exceptions 
tt.C:1: warning: previous declaration here 

With gcc 3.2 
[goya]:/il2/users/jeanb> g++ -pedantic -c tt.C 
tt.C:3: declaration of `int f() throw ()' throws different exceptions 
tt.C:1: than previous declaration `int f()' 

This is causing significant headaches for our porting efforts from 2.95 to 3.2 
as 3rd party and OS headers often differ in the way they specify no exceptions 
(either without a throw clause or with a blank throw clause).

Thanks,
Kirk



More information about the Gcc-bugs mailing list