apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: [PATCH] Fix testing of "BEOS" symbol
Date Tue, 16 Nov 2004 00:09:10 GMT
Julian Foad wrote:

> This patch only fixes one instance, but one which is in a header file 
> and so is encountered frequently.  There are other BEOS-related 
> symbols being tested badly in C files which I am not fixing here.  I 
> found these with "gcc -Wundef".

I'm not sure this is a good change. As has been said before, it is 
perfectly valid in C to test an undefined symbol with #if and expect the 
test to behave as if the symbol's value was 0. That said, I don't think 
-Wundef should be a standard option, even in maintainer mode.

Imagine what happens if some system header does

    #define BEOS 0

The code will suddenly be incorrect.

-- Brane

View raw message