Since a failed static assertion typically means that the program is
broken, I believe that turning the diagnostic warning into an error is
warranted.
Other warnings typically just mean that something _might_ go wrong, but
does not have to.
The only practical use case for a static assertion warning that I can
imagine is regression testing, but that should not normally produce any,
either.

-- Benedikt

Am 06.05.21 um 11:37 schrieb Philipp Klaus Krause:
> The C standard requires a diagnostic for a failed static_assert.
>
> Currently, SDCC uses a warning as this diagnostic. AFAIK, most other
> compilers use an error. Should SDCC also use an error?
>
> Philipp
>
> P.S.: I do not remember why SDCC went with a warning rather than an
> error when support for static_assert was implemented.


_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to