This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: False ???noreturn??? function does return warnings


Jan Hubicka <hubicka@ucw.cz> writes:
[...]
>> static inline void __attribute__((noreturn)) BUG(void)
>> {
>> 	__asm__ __volatile__("trap");
>> 	__builtin_unreached();
>
> This is bit dificult to do in general since it introduces new kind of
> control flow construct.  It would be better to express such functions
> explicitely to GCC.

How about

static inline void __attribute__((noreturn)) BUG(void)
{
    __asm__ __volatile__ __noreturn__("trap");
}

then ;)

-- Sergei.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]