[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pure and const function attributes
From: |
Paul Eggert |
Subject: |
Re: pure and const function attributes |
Date: |
Tue, 5 May 2020 17:29:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
On 5/5/20 1:29 AM, Marc Nieper-Wißkirchen wrote:
> If I understand correctly, the patch seems to cover compilers that
> declare "__has_attribute", which should cover GCC and Clang. Does it
> make sense to support MSC's "__declspec" as well?
I don't use MSC so I'm not qualified to comment. I am a bit worried about bloat
here, though. This stuff goes into every config.h.
> As for the future-proof C2X approach: In the GCC 10 Changes
> (https://gcc.gnu.org/gcc-10/changes.html), the C2X standard attributes
> are written without double underscores. In the attached patch, they
> are. What is correct?
The C2X draft says that both forms are OK. I used double-underscore as it's less
likely to infringe on the user namespace.