------- Additional Comments From jacob dot navia at ants dot com 2005-08-29 19:58 ------- Subject: RE: gcc doesn't compile the stl headers
Hi OK, Since you tell me that is not standard C++, a developer (Mr Prasad Kommoju) went through all the min/max usage in our code and changed them. After having done all that work, we now find a fresh new problem. Isn't this fun? He writes: "I got internal compiler error as follows:" ------- /home/jacob/gcc4/bin/g++ -D_SERVER_CPP_FLAGS -D_64BIT -DANTS_ASSERT -I. -I../Win32/include -I../Shared -I../Atomics -DNODEBUG -D_NODEBUG -DNDEBUG -D_NDEBUG -DUNIX_COMPILE -D_REENTRANT -D_REDHAT -m64 -fPIC -fno-omit-frame-pointer -O0 -w -D__ DBL_SO_SPLIT -I. -I../Win32/include -I../CryptoLibrary -I../VParse -I../VParse/inc -I../Atomics -I../CompilerLibrary -I../Driver/CPThreadLibrary -I../CompilerLibrary -I../avipl -o Release/AntsAuthIdElement.lo -c AntsAuthIdElement.cpp ./Atomic8Byte.h: In member function 'bool AtomicDouble::SetIfEqual(double, double) volatile': ./Atomic8Byte.h:1075: internal compiler error: in create_tmp_var, at gimplify.c:368 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. ------- OK? Should we file a new bug report? Thanks jacob -----Original Message----- From: pinskia at physics dot uc dot edu [mailto:[EMAIL PROTECTED] Sent: Friday, August 26, 2005 11:37 AM To: Jacob Navia Subject: [Bug c++/23273] gcc doesn't compile the stl headers ------- Additional Comments From pinskia at physics dot uc dot edu 2005-08-26 18:37 ------- Subject: Re: gcc doesn't compile the stl headers > > > ------- Additional Comments From jacob dot navia at ants dot com 2005-08-26 > 18:31 ------- > Subject: RE: gcc doesn't compile the stl headers > > Hi. > > You sent me this message: > > -----Original Message----- > From: pinskia at gcc dot gnu dot org [mailto:[EMAIL PROTECTED] > Sent: Monday, August 22, 2005 6:36 AM > To: Jacob Navia > Subject: [Bug c++/23273] gcc doesn't compile the stl headers > > > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-22 > 13:35 ------- > This is not a bug. You have a macro max which is defined and so you get: > std::(((size())>(__n))?(size()):(__n)) which is a bug. > > It is a bug in your code. > > ------------------------------- > Why do we have min and max macros? > /* > On Linux and Solaris this isn't allowed: > > int i; float x; min(i,x); > > It says that there is no instantiation of min<T,T>() that matches > (int,float). Until they fix their type-resolving > mechanism, we have to make-do with macros. > */ > #ifndef min > #define min(a,b) ((a) < (b) ? (a): (b)) > #endif > #ifndef max > #define max(a,b) ((a) > (b) ? (a): (b)) > #endif > > OK. Now this work-around works in gcc 3.xxx but not now... sigh. > Can you tell me if the original problem has been fixed? The orginal problem is in your code as the standard says min/max are templates of only one template agrument. There is nothing which can be fixed in GCC or libstdc++ at all since your code is not valid C++. -- Pinski -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23273