This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Optimization of conditional access to globals: thread-unsafe?

From: "Dave Korn" <>
> >   Better write your own compiler then.

On Sun, Oct 28, 2007 at 06:34:01PM -0700, David Miller wrote:
> If this becomes the common attitude of GCC developers, you can pretty
> much guarentee this will drive people to work on LLVM and other
> alternative compiler code bases.

The primary job of GCC is to serve as the compiler for the GNU/Linux
system.  This trumps strict, anal-retentive standards conformance,
though ideally it should come as close as possible to achieving both.

There are cases where we need to depart from the standard somewhat,
because it doesn't reflect existing practice.  Aggressively optimizing
on the basis that overflow of ints is undefined would, for example,
break GCC itself, as well as many Unix and Linux programs.  This makes
the job more difficult.

Unfortunately, too many GCC developers believed what they were told in
their university compiler courses: that the language standard is the
contract.  But that is only part of the story.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]