Re: Preprocessed output in gcc 4.5.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 29 March 2011 22:53, Edward Diener wrote:
>
> 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 "("

That would happen for example if you defined those macros like so:

#define SOME_MACRO 1
#if SOME_MACRO() == 1
#endif

i.e. SOME_MACRO is not a function-like macro.

> 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.

How can it show the macro expansions if there's an error expanding the macros?

I tried clang and it doesn't produce output in that situation either,
although it does show some macro expansions in diagnostics when there
are multiple levels of replacement happening.  Maybe you could try
clang to see if its diagnostics help.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux