3 ms·
I disagree about warnings inside macros. There are lots of functions like strtod which take an argument and say "if this is non-NULL, store a value into the po
by cperciva 10y ago
I disagree about warnings inside macros. There are lots of functions like strtod which take an argument and say "if this is non-NULL, store a value into the pointed-to variable", so that you can write "foo(..., &x)" if you want the value and "foo(..., NULL)" if you don't. This is a recipe for a warning which gets disabled due to an excess of false positives.
(I'd say that this warning could be explicitly disabled for the scope is the macro... but alas, GCC broke _Pragma inside macros.)