Why does gcc not have a warning option for &x+k where x is an identifier or result of . or -> operator and k!=0,1 (!=0 if dereferenced)?
-
Show this thread
-
Oops, it does. -Warray-bounds. It's even included in -Wall and I had it on. Unfortunately it only works at -O2 and higher (-ftree-vrp) and I had -Os...
1 reply 0 retweets 2 likesShow this thread -
This is probably going to be the deciding factor that convinces me to kill the current musl default path-specific -Os/-O3 config and use -O2 by default for everything. Broken warnings are not fun.
1 reply 0 retweets 0 likesShow this thread -
Hm, nope. -Os includes it too. And it works on a minimal test case but not the case that I hit in real code in musl...
2 replies 0 retweets 1 likeShow this thread -
Replying to @RichFelker
Compilers ought to warn about it early after frontend is done, no need to bring big guns like VRP. Should also change the OOB pointer to something more likely to raise alarms at runtime, e.g. (void*)-4096
1 reply 0 retweets 1 like
Yes, I think it's using heavy machinery and failing where simple machinery would catch most of the interesting cases... I also just filed https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87192 …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.