[Bug c/82892] Spelling hints do not take into account missing compiler options (e.g. -fopenmp)

2017-11-08 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82892

--- Comment #2 from David Malcolm  ---
Thanks for filing this.  I think a natural way to implement this would be on
top of the deferred_diagnostic patch kit here, see e.g.:
  https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00145.html
(that one's still waiting review) and:
  https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00437.html

(I hope to have a go at implementing this for gcc 8 stage 1, but am knee-deep
in another bug right now)

[Bug c/82892] Spelling hints do not take into account missing compiler options (e.g. -fopenmp)

2017-11-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82892

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-11-08
 CC||dmalcolm at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Martin Sebor  ---
I think it would make sense to do that.  Another test case is this:

$ cat t.c && gcc -S -m32 t.c
int lp64 = _LP64;
t.c:1:12: error: ‘_LP64’ undeclared here (not in a function)
 int lp64 = _LP64;
^

Confirmed as an enhancement request (and adding the author of this nice
feature).