You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Kor de Jong <k....@geog.uu.nl> on 2000/06/15 08:22:34 UTC

Compile with optimalization

Hi,

I have some trouble compiling my app. I'm running redhat
linux 6.0 and am using the gcc compiler 2.95.2. I have
Xerces version 1.1.0.

If I compile my app and turn on optimalization (-O2 or -O3
compiler switches) I get a screen full of error messages.
It turns out that in optimizing mode some ansi C functions
are macro's (have a look at ctypes.h: tolower, toupper for
example). The Xerces header util/Compilers/GCCDefs.hpp
also declares tolower and toupper. In optimizing mode these
names are replaced by the preprocessor by the macro
definitions after which the compiler complains about parse
errors.

If I turn optimalization off, the app compiles fine.

Is this a known problem and is there a workaround or isn't
this a problem at all and am I most probably just doing
something wrong?

Thanks in advance for any response,
Kor

-- 
Kor de Jong - k.dejong@geog.uu.nl - www.geog.uu.nl/fg/