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

Per Jessen per@computer.org
Fri Sep 27 05:52:00 GMT 2002


Claudio Bley wrote:

>     Per> the "std" namespace ? I saw some discussion related to this
>     Per> on gcc-bugs, but I didn't see anyone actually calling it a
>     Per> bug. Or am I doing something wrong ?
> 
> Possibly the latter. It is no macro (in C++), it is a templated
> function. It's defined in /usr/include/c++/3.2/bits/stl_algobase.h:

> 
> And it is indeed defined in namespace std.


Thanks for clarifying this for me - much appreciated.


> You are not by any chance trying to compile a Qt/KDE application? Just
> have a look at the preprocessed code (use cpp instead of g++) at this
> location. How does it look like? And what's the command you've used to
> compile this file?


No, I am building SAPDB for linux/390 - the command is :

c++ -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
-c sys/wrk/fast/tmp/LVCSim_liveCacheSink.cpp

The precompiled code is:

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

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

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

/per



-- 
regards,
Per Jessen, Zurich
http://www.enidan.com - home of the J1 serial console.

Windows 2001: "I'm sorry Dave ...  I'm afraid I can't do that."



More information about the Gcc-help mailing list