[Bug c/82967] "did you mean" suggestions are way too suggestive

dmalcolm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 21 23:12:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82967

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |dmalcolm at gcc dot gnu.org
   Target Milestone|---                         |9.0

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Another example:

#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

(ideally we ought to suggest including <assert.h> for this one, but even so,
the suggestion is unreasonable)


More information about the Gcc-bugs mailing list