lkml.org 
[lkml]   [2001]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: warning in 2.4.1pre10

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/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.903 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site