4 ms·
-pedantic-errors is also a very useful flag. -Wstrict-aliasing=1/-Wsuggest-attribute= can give good suggestions during development. Probably not useful for Ag
by fafner 13y ago
-pedantic-errors is also a very useful flag.
-Wstrict-aliasing=1/-Wsuggest-attribute= can give good suggestions during development.
Probably not useful for Ag: But I do a lot of numeric stuff so -Wfloat-equal is handy for me. For code using float this should be mandatory: -Wdouble-promotion.
- astrange 13y agogcc's -Wstrict-aliasing is extremely inaccurate. It doesn't run inside the aliasing machinery; it's just a cheap heuristic inside the C parser. I'd call it a good example of why you shouldn't strive to fix a warning just because it happens to exist. I thought there was a better tool, but can't find the name, hmm.