Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
Posted Apr 15, 2010 21:48 UTC (Thu) by ncm (subscriber, #165)
(The announcement reminds me that it's been a long time since I had to debug a problem resulting from optimized code behaving differently from the unoptimized. Congratulations to a lot of somebodies, on both counts.)
Almost equally as valuable as the noted improvement would be an ability to compile as if maximally optimizing, and actually emitting all attendant warnings, but writing out unoptimized, maximally debuggable code.
Posted Apr 15, 2010 23:46 UTC (Thu) by jreiser (subscriber, #11027)
What more than: gcc -O3 -c foo.c && gcc -g -O0 -c foo.c >/dev/null 2>&1 ?
Posted Apr 16, 2010 9:21 UTC (Fri) by jengelh (subscriber, #33263)
>What more than [...]?
-Wall, for one. -ggdb3, for another. And for completeness, -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes.
Posted Apr 16, 2010 16:28 UTC (Fri) by jzbiciak (✭ supporter ✭, #5246)
Oy... The redundant declarations one is maybe a bit annoying. :-)
Otherwise, I use these other flags as well:
-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wc++-compat
Now if flex-generated code didn't cause so many warnings. The only warnings in my own "major" app, jzIntv, come from code I didn't write:
bincfg/bincfg_lex.c: In function yy_get_next_buffer:
bincfg/bincfg_lex.c:1858: warning: comparison between signed and unsigned
bincfg/bincfg_lex.c: At top level:
bincfg/bincfg_lex.c:2413: warning: no previous prototype for bc_get_lineno
bincfg/bincfg_lex.c:2422: warning: no previous prototype for bc_get_in
bincfg/bincfg_lex.c:2430: warning: no previous prototype for bc_get_out
bincfg/bincfg_lex.c:2438: warning: no previous prototype for bc_get_leng
bincfg/bincfg_lex.c:2447: warning: no previous prototype for bc_get_text
bincfg/bincfg_lex.c:2456: warning: no previous prototype for bc_set_lineno
bincfg/bincfg_lex.c:2468: warning: no previous prototype for bc_set_in
bincfg/bincfg_lex.c:2473: warning: no previous prototype for bc_set_out
bincfg/bincfg_lex.c:2478: warning: no previous prototype for bc_get_debug
bincfg/bincfg_lex.c:2483: warning: no previous prototype for bc_set_debug
bincfg/bincfg_lex.c:2517: warning: no previous prototype for bc_lex_destroy
*sigh* I have a severe allergy to tweaking generated code.
Posted Apr 16, 2010 10:40 UTC (Fri) by nix (subscriber, #2304)
This feels a right waste to me.
Posted Jul 4, 2010 21:45 UTC (Sun) by oak (subscriber, #2786)
GCC 4.5.0 released
Posted Apr 18, 2010 11:09 UTC (Sun) by makomk (guest, #51493)
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds