On Okt 08 2025, Jakub Jelinek wrote:

> On Wed, Oct 08, 2025 at 03:13:31PM +0100, Jason Merrill wrote:
>> > --- gcc/ginclude/stdarg.h.jj       2025-10-04 09:42:23.775001859 +0200
>> > +++ gcc/ginclude/stdarg.h  2025-10-06 16:05:22.066861182 +0200
>> > @@ -44,7 +44,8 @@ typedef __builtin_va_list __gnuc_va_list
>> >      if this invocation was from the user program.  */
>> >   #ifdef _STDARG_H
>> > -#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
>> > +#if (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L) \
>> > +    || __cplusplus + 0 >= 202400L
>> 
>> Why __cplusplus + 0?  I don't see that pattern anywhere else.
>
> It was the first time I saw it as well, I thought there is some hidden
> reason for it, but -Wundef warns about both #if foo >= 202400
> and #if foo + 0 >= 202400 equally, so I've dropped it.
> Most likely the header is just too old.

It only helps if __cplusplus is defined as an empty macro.

-- 
Andreas Schwab, [email protected]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to