hirrolot / datatype99

Algebraic data types for C99
MIT License
1.38k stars 23 forks source link

Inconsistent use of diagnostic pragmas (`-Wreturn-type`) #9

Closed hirrolot closed 3 years ago

hirrolot commented 3 years ago

Currently, inside match99, we emit the ... diagnostic push and ... diagnostic ignored "-Wreturn-type" pragmas, but without otherwise99 we won't return to the previous diagnostics state:

https://github.com/Hirrolot/datatype99/blob/e4c8e4688612cb63e471d7f7f1dcd358089ed467/datatype99.h#L154

I've spent some time trying to figure out how to automatically resolve this warning but with no success; therefore, the best solution for now is just don't suppress -Wreturn-type but to force a user to suppress it, if necessary.

FYI: The -Wreturn-type warning can be emitted due to the following reasons: