On Mon, Feb 3, 2020 at 9:32 PM Paul Eggert <egg...@cs.ucla.edu> wrote:
>
> On 2/3/20 3:00 PM, Jeffrey Walton wrote:
>
> > Or, you can use __has_attribute(_Noreturn). __has_attribute(_Noreturn)
> > behaves as expected.
>
> It isn't documented to work, and it doesn't work for me with clang
> version 9.0.0 (Fedora 9.0.0-1.fc31).
>
> > I would not worry about other software using __has_attribute. It is a
> > reserved symbol due to the leading undersocres. Userland software
> > should not have been using it in the first place.
>
> Gnulib is userland software, so we cannot use your argument to justify
> putting "#define __has_attribute(x) 0" into Gnulib.

Yeah, you're right.

This is how GCC recommends using __has_attribute:
https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fattribute.html

Jeff

Reply via email to