On Dec 12, 2010, at 3:49 PM, Wolfgang Denk wrote:

> Dear Scott Wood,
> 
> In message <[email protected]> you wrote:
>> On Fri, 10 Dec 2010 12:14:43 -0600
>> Kumar Gala <[email protected]> wrote:
>> 
>>> On the OXC & RMU boards I'm seeing the following build error:
>>> 
>>> powerpc-linux-gnu-gcc  -g  -Os   -mrelocatable -ffunction-sections 
>>> -fdata-sections -fPIC -meabi -D__KERNEL__ -DCONFIG_SYS_TEXT_BASE=0xFFF00000 
>>> -I/local/home/galak/git/u-boot-85xx/include -fno-builtin -ffreestanding 
>>> -nostdinc -isystem /local/opt/freesc
>> ale/usr/local/gcc-4.5.55-eglibc-2.11.55/powerpc-linux-gnu/bin/../lib/gcc/powerpc-linux-gnu/4.5.1/include
>>  -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC824X -ffixed-r2 -mstring 
>> -mcpu=603e -msoft-float -Wall -Wstrict-prototypes -fno-stack-protector   \
>>>             -o board.o board.c -c
>>> board.c: In function 'board_init_r':
>>> board.c:761:35: error: token "[" is not valid in preprocessor expressions
>>> make[1]: *** [board.o] Error 1
>>> 
>>> Not sure what to be done about it, since OXC.h defines:
>>> 
>>> #define CONFIG_SYS_FLASH_BASE           (0-flash_info[0].size)
>> 
>> This:
>> 
>> # elif CONFIG_SYS_MONITOR_BASE == CONFIG_SYS_FLASH_BASE
>> 
>> requires that CONFIG_SYS_FLASH_BASE be a preprocessor-evaluatable
>> constant.  flash_info[0].size isn't any sort of constant.  I don't see
>> how it ever worked -- probably just got evaluated as zero, or a string
>> compare, or something.
>> 
>> As for what's to be done, I'll start by getting the attention of anyone
>> who cares about these boards by putting the board names in the
>> subject. :-)
>> 
>> Maybe convert the #elif into a regular if-statement?
> 
> No, I think this is a bug in the tool chain.
> 
> The "#elif" above should never be evaluated because the corresponding
> 
>       # if defined(CONFIG_OXC) || defined(CONFIG_RMU)
> 
> already catches the case for the OXC & RMU boards.
> 
> 
> Or has the rule officially been dropped that the "#if" in the C
> prepro use the same shortcut logic as the "if" in C?

I'm being told that not reporting this as an error is a bug in previous gcc's 
not the new one.  There isn't anything in the C specs about early out handling 
from what I can tell.

- k
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to