This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Preprocessed output in gcc 4.5.2


On 3/29/2011 4:58 PM, Jonathan Wakely wrote:
On 29 March 2011 21:52, Jonathan Wakely wrote:

error: missing binary operator before token "("

That's an error from the preprocessor, so -E is probably working (i.e. it's not insisting on compiling) but it thinks the input is invalid so it doesn't produce output.

You could try using -E -fdirectives-only which disables macro expansion, but still processes directives such as #define and #if, to see if the results are what you expect.

I will try it but I doubt if it will show me anything effective. The error it is showing is of the form:


#if SOME_MACRO() == 1 && SOME_OTHER_MACRO() == 2

where it is saying:

error: missing binary operator before token "("

Clearly the error depends on the macro expansion of 'SOME_MACRO' and possibly 'SOME_OTHER_MACRO()' at that point. But gcc is being supremely difficult and not showing me what the macro expansions are when I use the -E option once it gives me the error.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]