[Bug c++/84269] More suggestions for missing #include
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 21 23:13:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84269
--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Another one, from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82967#c1
#include <math.h>
void test (float pf, float inff)
{
assert (pf == inff);
}
<source>: In function 'test':
<source>:5:3: warning: implicit declaration of function 'assert'; did you mean
'sqrt'? [-Wimplicit-function-declaration]
assert (pf == inff);
^~~~~~
sqrt
We should suggest including <assert.h> for this.
More information about the Gcc-bugs
mailing list