Hi

On Wed, Feb 22, 2023 at 2:29 PM Marc-André Lureau
<marcandre.lur...@gmail.com> wrote:
>
> Hi
>
> On Wed, Feb 22, 2023 at 2:23 PM Markus Armbruster <arm...@redhat.com> wrote:
> > > Another option is to always pass a dummy last argument? :)
> > >
> > > void command(first,
> > > #ifdef A
> > >     a,
> > > #endif
> > > #ifdef B
> > >     b,
> > > #endif
> > >     dummy)
> >
> > Yet another option:
> >
> >   void command(first
> >   #ifdef A
> >       , a
> >   #endif
> >   #ifdef B
> >       , b
> >   #endif
> >       )
> >
> > [...]
> >
>
> Since I think we always have a first argument, that might be indeed
> the best solution. I'll try that. thanks
>

Actually, this is just moving the problem to the first argument. (and
it also breaks clang-format, which doesn't have a allow-leading-commas
option or similar). So I'll just add an error when using conditional
fields/args last.


-- 
Marc-André Lureau

Reply via email to