bug-gnulib
[Top][All Lists]
Advanced

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

Re: Avoid clang warnings regarding [[__nodiscard__]]


From: Paul Eggert
Subject: Re: Avoid clang warnings regarding [[__nodiscard__]]
Date: Sat, 28 Jan 2023 11:06:05 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2023-01-28 02:57, Bruno Haible wrote:
+  /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] 
produces
+     a warning.  */
+#  if __clang_major__ >= 1000

I found this a little hard to follow, as I don't know __clang_major__ by heart and at first misread that as version 10.0.0. How about something like the attached, to simplify this for Clang non-experts?

Attachment: nodiscard.diff
Description: Text Data


reply via email to

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