On Wed, 5 Apr 2017, Mark Kettenis wrote:
> Our <sys/cdefs.h> only defines these if when __STRICT_ANSI__ isn't
> defined.  As a result, functions like exit(3) are not properly marked
> as "noreturn".  This in turn makes compilers complain that other
> "noreturn" functions actually may return.

ok guenther@ on your existing diff, but...


> Alternatively we could gut the pre-gcc-2.5 case completely and simply
> change this into:
> 
> #if __GNUC_PREREQ__(2, 5)
> #define __dead          __attribute__((__noreturn__))
> #define __pure          __attribute__((__const__))
> #else
> #define __dead
> #define __pure
> #endif
> 
> Thoughts?  ok?  Should this wait a bit to get better testing in ports?

*If* we keep support for pre-2.5 gcc (?! why?) then the antique branch
of the #if would need to preserve the
        #define __attribute__(x)

line.  But I'm with millert@ in thinking that we shouldn't keep that support.


Philip

Reply via email to