Preprocessed output in gcc 4.5.2
Edward Diener
eldlistmailingz@tropicsoft.com
Tue Mar 29 23:32:00 GMT 2011
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.
More information about the Gcc-help
mailing list