Bug 18039 - g++ breaks glibc
g++ breaks glibc
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-10-01 18:20 EDT by Stefan Sorensen
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-02 17:47:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Sorensen 2000-10-01 18:20:05 EDT
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-01 22:13:13 EDT
...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 17:47:41 EDT
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 01:55:25 EDT
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.