Porting from Solaris to Linux RH 7.3

Eljay Love-Jensen eljay@adobe.com
Tue Feb 17 18:18:00 GMT 2004


Hi Iavor,

Using a #include for source-code-within-source-code is unusual, but not forbidden.  In-and-of itself, that isn't going to generate any warnings or errors.

I suspect what you are seeing is actual non-C++ code that was accepted by your Solaris compiler, but the (more) ISO 14882 compliant GCC 3.2.1  compiler is flagging the constructs as erroneous.

For instance, what do you see when you look at file sudrand.h line 31?  Is it something like this...
#endif yada yada yada
...that is illegal and non-C++ compliant.  To make it compliant, you'll need to turn the "yada yada yada" part into a comment...
#endif // yada yada yada

Look at checkvec.h line 33, what's there?  GCC is complaining about a parse error before the ',' because there is a parse error there.  What's causing that parse error...?  I don't know, I'd have to look at the code.

One way to look at the code to help figure out what's going awry is to generate a preprocessed output using GCC's -E switch, and take a look at what the preprocessor is producing, which the compiler is digesting (and finding parse errors).

HTH,
--Eljay




More information about the Gcc-help mailing list