Redefinition of exception on SUN (version gcc 2.95.1)

Jeffrey A Law law@cygnus.com
Mon Oct 11 10:09:00 GMT 1999


  In message < 199910111424.KAA00056@mailfw1.ford.com >you write:
  > To whom it may concern,
  > I have question about using mathematical functions and generic STL
  > containers (vector,stack..) together in one compilation unit.
  > (Pre compiled version of compiler 2.95.1, on SUN Ultra 2, OS - 2.6).
  > 
  > This problem is with "struct exception" definition in
  > /usr/include/math.h 
  > file and an another "class exception" definition in <exception> from 
  > g++ include stuff (eventually used in g++ <new> include file).Compiler 
  > naturally complains about redefinition its statement.
  > 
  > Does anyone know simple solution ???
This most likely indicates that you have mis-installed gcc.

GCC arranges for a special version of math.h to be used instead of the system
math.h to avoid the problems with the bogus struct exception.

jeffk



More information about the Gcc-help mailing list