[Bug middle-end/87489] Spurious -Wnonnull warning

2018-10-30 Thread achurch+gcc at achurch dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87489 --- Comment #7 from Andrew Church --- Would it be reasonable to have the FE warning trigger only on a literal null value and not on variables whose values are known to be null? I don't know the history behind -Wnonnull warning at two separate po

[Bug middle-end/87489] Spurious -Wnonnull warning

2018-10-30 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87489 --- Comment #6 from Martin Sebor --- (In reply to Andrew Church from comment #5) > Simpler testcase (based on the testcase in bug 87041): This is a case of the warning being issued by the front end well before dead code elimination has had a cha

[Bug middle-end/87489] Spurious -Wnonnull warning

2018-10-29 Thread achurch+gcc at achurch dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87489 --- Comment #5 from Andrew Church --- Simpler testcase (based on the testcase in bug 87041): extern int strcmp(const char *a, const char *b) __attribute__((nonnull(1, 2))); int foo(void) { const char * const s = 0; if (s) return

[Bug middle-end/87489] Spurious -Wnonnull warning

2018-10-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87489 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #4

[Bug middle-end/87489] Spurious -Wnonnull warning

2018-10-02 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87489 Manuel López-Ibáñez changed: What|Removed |Added Keywords||diagnostic Status|UNCO