Re: warning in 2.4.1pre10

J . A . Magallon (jamagallon@able.es)
Thu, 25 Jan 2001 01:58:53 +0100


On 01.25 Peter Samuelson wrote:
>
> [J. A. Magallon]
> > It is harmless, 'cause the last sentence in the funtion is a panic,
> > but it is good to add the 'return 0', just to shut up the compiler.
>
> The correct fix is __attribute__((noreturn)) in the panic() prototype.
> As it happens, this has already been done....
>

I know Linux will never be compiled with any other thing than gcc. But
what I do not understand is why if there is a standard C way of doing
something you have to use an strange extension of gcc.
Same happens with 'return' and 'break'. You type the same to add a
'/* DO NOT REMEMBER THE PRECISE COMMENT */' to shut up the compiler
instead of just writing
case X:
...
return xxx;
break;

???
Size optimization for the couple of bytes of the jump in return or break ?

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.1-pre10 #4 SMP Wed Jan 24 00:20:15 CET 2001 i686

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/