/usr/include/c++/3.2/bits/basic_string.tcc:713: parse error before `(' token

Claudio Bley bley@cs.uni-magdeburg.de
Fri Sep 27 07:13:00 GMT 2002


>>>>> "Per" == Per Jessen <per@computer.org> writes:

    Per> c++ -DREL30 -DLINUX -DS390 -DSAG
    Per> -I/opt/sapdb/sapdb-7.4/usr/incl
    Per> -I/opt/sapdb/sapdb-7.4/sys/wrk/incl
    Per> -I/opt/sapdb/sapdb-7.4/sys/wrk/incl/SAPDB -DSYSV -D_SVID
    Per> -I/usr/include/ncurses -w -Wall -D_FILE_OFFSET_BITS=64
    Per> -DLVCSIM_DLL_VMAKE_BUILD -DSAPDB_FAST -D_REENTRANT
    Per> -I/opt/sapdb/devtools/incl -c
    Per> sys/wrk/fast/tmp/LVCSim_liveCacheSink.cpp

    Per> The precompiled code is:

    Per> input: __pos = std::min(__size - __n, __pos);

    Per> output: __pos = std::( ( (__size - __n) <= (__pos) ) ?
    Per> (__size - __n) : (__pos) );

    Per> So maybe this means min() is indeed but incorrectly defined
    Per> as a macro somewhere ?

Yes. And btw, the problem with defining it as macro is that the
arguments may be evaluated twice as you can see. 

In order to find out where the definition of min is coming from 
run g++ -E -dD -DREL30 -DLINUX -DS390 -DSAG
-I/opt/sapdb/sapdb-7.4/usr/incl
-I/opt/sapdb/sapdb-7.4/sys/wrk/incl
-I/opt/sapdb/sapdb-7.4/sys/wrk/incl/SAPDB -DSYSV -D_SVID
-I/usr/include/ncurses -w -Wall -D_FILE_OFFSET_BITS=64
-DLVCSIM_DLL_VMAKE_BUILD -DSAPDB_FAST -D_REENTRANT
-I/opt/sapdb/devtools/incl sys/wrk/fast/tmp/LVCSim_liveCacheSink.cpp

Maybe it helps when you reorder the includes in
LVCSim_liveCacheSink.ccp. Or try to insert '#undef min' right before
include'ing any STL header?

Possibly it would be good to change the

#undef min

in stl_algobase.h to

#define min min

in order to prevent that the min macro gets defined elsewhere assuming
it is embedded between #ifndef ... #endif.

But this can be only a temporary solution at best.

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \



More information about the Gcc-help mailing list