On Sat, Feb 03, 2007 at 01:42:06AM -0700, icrashedtheinternet wrote: > I just read the GCC Mission Statement and I see nothing there about > conforming to international standards for programming languages. Why > does the GCC Mission Statement not include conforming to > internationally accepted standards? Its very counterproductive not to > use standards.
You incorrectly assume that the mission statement is an exhaustive list of every GCC priority. It isn't. Many GCC contributors are active members of the appropriate standards committees, and GCC tries to conform to appropriate standards and to document known areas of non-compliance. Standards conformance is a goal, but it is not the #1 goal. For example (to risk reviving a recent debate), it appears that almost every large C program in existence assumes, deliberately or accidentally, that int overflow wraps around in a two's complement manner, but a compiler that rigorously enforced conformance to internationally accepted standards could happily break all of that code (e.g. by trapping on every overflow). The result is that GCC explicitly rejects something that you might have been taught in compiler class, that the standard is a contract between the compiler developer and the users and that the compiler can do anything it wants with any code that does not rigorously meet what is defined in the standard. Standard-conforming code should work, but the issue of what to do with technically incorrect, but commonly occurring code is something that we'll continue to struggle with. In some cases, serving the users might require going beyond the standard, in other cases, the cost in lost opportunities for optimization might be too high.