Re: [Etherboot-developers] tidy ups
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ke...@us...> - 2003-03-17 23:51:56
|
>Note. A number of the death to warnings cleanups have actually generated code
>that will not compile if the appropriate #if is enabled.
>
>In particular unless a new block is declared variables cannot be declared after
>code is present. So adding an extra { } inside the #ifdef is probably the right
>thing todo.
You sure? I thought it was legal in C now to have declarations anywhere
before use (oversimplifying). gcc has no complaint with this:
main()
{
int i;
i = 42;
int j;
j= 10;
}
In some of the files I moved the declarations right up to just before
use, within the #ifdef and they are enabled by compilation for variants
and no alarm bells went off with gcc.
|