[Bug c/96550] New: gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550 --- Comment #8 from Roger Wolff --- Please, start to read what is written. Please.

[Bug c/96554] New: -Wall does not include -Wnull-dereference

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550 --- Comment #10 from Roger Wolff --- Technically correct.

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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.

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96550 Roger Wolff changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/96554] -Wall does not include -Wnull-dereference

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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

[Bug c/96554] -Wall does not include -Wnull-dereference

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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.

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-10 Thread R.E.Wolff at BitWizard dot nl
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.

[Bug c/96550] gcc is smart in figuring out a non-returning function.

2020-08-11 Thread R.E.Wolff at BitWizard dot nl
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).