Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: R.E.Wolff at BitWizard dot nl
Target Milestone: ---
This is the small probgram that reproduces this:
---
#include
#define FAIL
struct test {
#ifdef FAIL
char *t;
#else
char t[8];
#endif
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #5 from Roger Wolff ---
Guys, The compiler found a bug in my code, but it didn't tell me. Like the if
(a = 3) situation, the compiler is correct when it compiles the code according
to the C rules.
I like to compile my code with -Wal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #6 from Roger Wolff ---
So, I've added "-Wall" to my Makefile to get ALL warnings, giving me the
biggest chance of finding bugs through the compiler telling me you have a bug
on line X of file Y.
So IMHO -Wnull-dereference should be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #8 from Roger Wolff ---
Please, start to read what is written. Please.
Assignee: unassigned at gcc dot gnu.org
Reporter: R.E.Wolff at BitWizard dot nl
Target Milestone: ---
As reported in c/96550, the fact that -Wall didn't include -Wnull-dereference
cost me a lot of time in trying to figure out what the problem was with my
code.
I add -Wa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #10 from Roger Wolff ---
Technically correct.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #11 from Roger Wolff ---
Just FYI: I added -Wnull-dereference to my makefile of my real project. It
doesn't trigger a warning in my project when I revert to the buggy code. The
compiler does detect and act upon the null dereference.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
Roger Wolff changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96554
--- Comment #2 from Roger Wolff ---
In my case it promotes a function I didn't declare as into
one that and thereby it caused 80% of my code to become
"dead". It'd be nice to differentiate between the case where a simple
optimization removes a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96554
--- Comment #4 from Roger Wolff ---
Update: LTO messes with the warning. When LTO is enabled, the warning from
-Wnull-dreference is suppressed.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #15 from Roger Wolff ---
I marked it as "resolved', the system then told me to type a message and I did,
but then it had added the "FIXED" tag. Not my idea.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550
--- Comment #17 from Roger Wolff ---
UI suggestion: Then start the selection box on "choose one" instead of a
default that probably doesn't get used often (like everybody else).
12 matches
Mail list logo