[Debian-med-packaging] Bug#701888: Bug#701888: insighttoolkit4: FTBFS on powerpcspe with "error: #if with no expression"
Steve M. Robbins
steve at sumost.ca
Sun Mar 3 20:57:03 UTC 2013
On February 28, 2013 10:05:12 AM Roland Stigge wrote:
> On 02/28/2013 04:02 PM, Steve M. Robbins wrote:
> >> This is because of WORDS_BIGENDIAN (which is either defined or
> >> not) used as "#if WORDS_BIGENDIAN".
> >
> > That is has always been legal C preprocessor syntax (an undefined
> > macro is "false") [1] so what has changed?
> >
> > [1] http://gcc.gnu.org/onlinedocs/cpp/If.html
>
> In case of undefined WORDS_BIGENDIAN, it actually works. :-) But in
> case of "#define WORDS_BIGENDIAN" (as on powerpc*), the problem
> occurs. Easily reproducible:
> [...]
> It is consistent with the phrase you are probably referring to in the
> link you posted:
>
> "Identifiers that are not macros, which are all considered to be the
> number zero. This allows you to write #if MACRO instead of #ifdef
> MACRO, if you know that MACRO, when defined, will always have a
> nonzero value."
>
> Plain "#define WORDS_BIGENDIAN" doesn't seem to provide the latter...
Right. I now see that I was fooled because using -DWORDS_BIGENDIAN
on the command line *seems* to just define the macro without giving
it a value, same as "#define WORDS_BIGENDIAN". However, what really
happens is that it's defined be value "1"; i.e. equivalent to
"#define WORDS_BIGENDIAN 1".
Thanks for the report and patch.
-Steve
More information about the Debian-med-packaging
mailing list