https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52534

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=107980

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> Note, if we warn, we shouldn't warn for C23 or later, because one can pass
> anything there, like 3 arguments, or that (unsigned int)n_args, or just one,
> etc.  And __builtin_va_start (ap, 0) is what is used regardless of the
> passed argument in that case.

We only warn for C23 (r15-5939-gfca04028d7075a added the warning and that was
because of a late change to C23):
```
In file included from <source>:1:
<source>: In function 'maxof':
<source>:10:18: warning: 'va_start' macro used with additional arguments other
than identifier of the last named argument [-Wvarargs]
   10 |     va_start(ap, (unsigned int)n_args);
      |                  ^~~~~~~~~~~~~~~~~~~~
```

Reply via email to