[omniORB] operator LongDouble error compiling with SGI STL

Sergio Murru s.murru at fidia.it
Wed Jul 9 19:30:51 BST 2003


We've found a rather strange compilation error using SGI STL and omniORB
4.0.1

this is the error

gcc -I/usr/local/omniORB-4.0.1/include
-I/usr/local/omniORB-4.0.1/include/omniORB4  -O0 -g -Wall
-I/usr/local/STL -x c++ -D__x86__ -D__linux__ -D__OSVERSION__=2  -c
testbug.cpp -o testbug.o 
In file included from /usr/local/STL/algo.h:32,
                 from testbug.cpp:2:
/usr/local/STL/stl_algo.h:452: declaration of `operator LongDouble' as
non-function
/usr/local/STL/stl_algo.h:452: confused by earlier errors, bailing out
make: *** [testbug.o] Error 1

the following is the shortest program that causes this error:

#----------------------------------------------------------------------
#include <omniORB4/CORBA.h>
#include <algo.h>

int main()
{
    return 0;
}
#----------------------------------------------------------------------

the following is the makefile

#----------------------------------------------------------------------
CC = gcc
LINK = gcc

SRCS = testbug.cpp

DFLAGS = -O0 -g
DFLAGS += -Wall
DFLAGS += -I/usr/local/STL -x c++
DFLAGS += -D__x86__ -D__linux__ -D__OSVERSION__=2 

INCL = -I/usr/local/omniORB-4.0.1/include
INCL += -I/usr/local/omniORB-4.0.1/include/omniORB4 

WHERELINK = -L/usr/local/omniORB-4.0.1/lib/
WHERELINK += -L/usr/lib/gcc-lib/i486-suse-linux/2.95.2


OPT_COMP = -fno-omit-frame-pointer
OPT_COMP += -fbuiltin
OPT_COMP += -fdefer-pop

#Librerire da linkare
LINKLIBS =
LINKLIBS += -lc
LINKLIBS += -lstdc++
LINKLIBS += -lomniORB4
LINKLIBS += -lomniDynamic4
LINKLIBS += -lomnithread


TUTTI_GLI_OBJ = $(patsubst %.cpp, %.o, $(SRCS))

all: $(TUTTI_GLI_OBJ)
        $(LINK) -o ServerPSC $(WHERELINK) $(TUTTI_GLI_OBJ) $(LINKLIBS)  


$(TUTTI_GLI_OBJ): %.o: %.cpp
        $(CC) $(INCL) $(DFLAGS) -c $< -o $@ 


clean:
        rm -fr $(TUTTI_GLI_OBJ) ServerPSC

stub:
        /usr/local/omniORB-4.0.1/bin/omniidl -bcxx -Wbh=.h -Wbs=.cpp
CncServer.idl
#----------------------------------------------------------------------


we've seen this error using gcc 2.95.2 and 2.95.3
the SGI STL can be downloaded from
http://www.sgi.com/tech/stl/download.html
The OSs we are using are Linux Suse 8.0 and 7.0

We've found that inverting the #include order the error is not
generated.
What is the cause of this error?

We've searched the STL source code, and there is no use of operator
LongDouble. 

The error is generated in the declaration of the "transform" template.

Thanks for your help,
Sergio.



More information about the omniORB-list mailing list