Bug 18039 - g++ breaks glibc
Summary: g++ breaks glibc
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-01 22:20 UTC by Stefan Sorensen
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-10-02 21:47:44 UTC
Embargoed:


Attachments (Terms of Use)

Description Stefan Sorensen 2000-10-01 22:20:05 UTC
Compiling 

extern "C" {
void exit (int);
};
#include <stdlib.h>

with g++ yields:

In file included from foo.cpp:6:
/usr/include/stdlib.h:578: declaration of `void exit (int) throw ()'  
throws different exceptions
foo.cpp:2: than previous declaration `void exit (int)'

This breaks autoconf scripts which includes stdlib.h in a AC_TRY_RUN when
the 
language is set to c++.

Seems to be the same as described at
http://gcc.gnu.org/ml/gcc-bugs/1999-07n/msg00534.html

Comment 1 jiefg 2000-10-02 02:13:13 UTC
...tells a lot about what kind of testing RedHat does before launching a new
product. This is VERY frustrating.

Comment 2 Bernhard Rosenkraenzer 2000-10-02 21:47:41 UTC
This is not a bug. void exit(int) is a redefinition because the exit() prototype
in stdlib.h throws exceptions.

Comment 3 Jakub Jelinek 2000-10-03 05:55:25 UTC
As bero mentioned, this really is not a bug and it is good current g++
is more strict about user bugs than it used to. Write correct C++
code and you should get of this warning. If current GNU autoconf
still generates this code it should be fixed, will check it out.


Note You need to log in before you can comment on or make changes to this bug.