Sean McBride via Postfix-users:
> On 22 Jun 2026, at 15:48, Wietse Venema wrote:
>
> > Wouldn't -Wimplicit-fallthrough catch that?
> >
> > Sure. And it would break existing legtimate Postfix code.
>
> Deliberate fallthrough can be annotated with [[fallthrough]], but as
> that's new in C23, postfix probably can't use it yet. Still, it's easy
> to create a macro that does some pre-C23 per-complier equivalents, like:
>
> ```
> #if (defined(GCC_VERSION) && GCC_VERSION>=7000000) || blahblah)
> #define POSTFIX_FALLTHROUGH __attribute__((fallthrough));
> #else
> #define POSTFIX_FALLTHROUGH /* FALLTHROUGH */
> #endif
> ```
>
> I've never contributed a patch to postfix before, but I could give it a
> try...
If you can test this on systems:
- Compilers with and without this feature.
- With GCC, and with CLANG.
Note that Postfix does not use autotools.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]