> > C has been a portable assembler for years before it got normalized and > optimizing compilers took over.
18 years. And now it has been 17 years since C has been standardized so you can say C has been standardized now for half its life. 18 years is a long time when it comes to computers. I know one problem is that most people who learn C don't learn about the undefined behaviors until they hit it. Sequence points is another case in point to the problems of how people learn C (or C++ for that matter). We actually have 57 reports of the sequence point issue in bugzilla. 110 aliasing bug reports. and only 12 overflow issues. Of those 12 overflow issues, 9 of them are reported against 4.1 and above introduced by the VRP pass. 2 are reported because of the folding of (a*C)/C into a (where C is a constant). 1 is about causing a floating point exception (or divide by 0 exception) when dividing INT_MIN by -1 on x86. So we maybe we should also be talking more about sequence point issue, where it is unspecified (though in some cases it turns into being undefined because 2 "stores" to the same variable). That gets more bug reports than even signed overflow and sometimes just as hard to spot as signed overflow (I can give examples where we get way different code output if we did not have sequence points). > There are still some major parts of the > network stack where you don't want to look, and that defy > -fstrict-aliasing.... Actually IIRC freebsd and netbsd has already corrected all of the aliasing issues in the BSD network stack. In fact I remember helping one place that was exposed in the last 4 years. Thanks, Andrew Pinski