Bug details: ============ Even the most trivial C++ program that includes <complex> fails to compile in combination with -pedantic due to conflicting declaration of hypot(). System and GCC RPM information =============================== $ cat /etc/issue Red Hat Linux release 7.1 (Seawolf) Kernel 2.4.3-12 on an i686 [ All packages up-to-date as of 2001-07-12 using up2date ] $ rpm -qa|grep gcc gcc-objc-2.96-85 gcc-2.96-85 gcc-g77-2.96-85 gcc-c++-2.96-85 gcc-chill-2.96-85 gcc-java-2.96-85 $ rpm -qa|grep libstdc++ libstdc++-2.96-85 libstdc++-devel-2.96-85 Source ====== $ cat hypot-bug.cc #include <complex> Compiler invocation and error output ==================================== $ gcc -c -v -save-temps -pedantic hypot-bug.cc Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) /usr/lib/gcc-lib/i386-redhat-linux/2.96/cpp0 -lang-c++ -D__GNUG__=2 -D__EXCEPTIONS -v -D__GNUC__=2 -D__GNUC_MINOR__=96 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__NO_INLINE__ -pedantic -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -D__tune_i386__ hypot-bug.cc hypot-bug.ii GNU CPP version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) (cpplib) (i386 Linux/ELF) ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/i386-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /usr/include/g++-3 /usr/lib/gcc-lib/i386-redhat-linux/2.96/include /usr/include End of search list. /usr/lib/gcc-lib/i386-redhat-linux/2.96/cc1plus hypot-bug.ii -quiet -dumpbase hypot-bug.cc -pedantic -version -o hypot-bug.s GNU C++ version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) (i386-redhat-linux) compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-85). In file included from /usr/include/g++-3/complex:7, from hypot-bug.cc:1: /usr/include/g++-3/std/complext.h:314: declaration of `double hypot (double, double)' throws different exceptions /usr/include/bits/mathcalls.h:150: than previous declaration `double hypot (double, double) throw ()'
Created attachment 23587 [details] C++ <complex> hypot bug description, with preprocessed source.
Will be fixed in libstdc++-devel-2.96-95 (is already in my tree).
Fix confirmed in libstdc++-3.3.2-1.