Re: [PATCH] MIPS: Transform old-style macros to newer "__noreturn" standard.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert P. J. Day wrote:
>
> 
>   f() __attribute__((noreturn)) ;
> 
> you get:
> 
>   warning: data definition has no type or storage class
> 
> but gcc doesn't complain if you declare it thusly:
> 
>   __attribute__((noreturn)) f() ;
> 
> that strikes me as a flaw in gcc, no?
> 

Doesn't matter.  gcc accepts "void __attribute__((noreturn)) f();", and
thus, one can define:

#define __noreturn void __attribute__((noreturn))

... and declare functions as:

__noreturn f();

... which is the syntactially sane way of doing it.

	-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux