bug-gnulib
[Top][All Lists]
Advanced

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

Re: clang and _Noreturn


From: Bruno Haible
Subject: Re: clang and _Noreturn
Date: Mon, 24 Apr 2017 22:38:51 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-72-generic; KDE/5.18.0; x86_64; ; )

Hi Paul,

> > the only position that works for both C and C++ is the first one:
> >    _GL_NORETURN_FUNC extern void foo (void);
> 
> Maybe a shorter name for this usage: _GL_NORETURN, perhaps?

If we want to offer a short macro name, such as _GL_NORETURN, it should
be usable in both places, function declarations and function pointers.
That is, make it an alias of _GL_NORETURN_FUNCPTR.

> Don't some compilers complain if the storage class ('extern', here) is 
> not first?

GCC and clang, at least, prefer 'extern' after '[[noreturn]]'.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]