Re: Is gcc thread-unsafe?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linus Torvalds
Date: Friday, October 26, 2007 - 8:09 am

On Fri, 26 Oct 2007, Bart Van Assche wrote:

Note that I'm very ambivalent about gcc. I think it's a *great* compiler. 
I have my doubts about some of the things it does, but hey, it is an old 
project, it has accumulated cruft over time, and cleaning things up is 
often almost impossible.

And bugs happen. I'm not complaining about that at all either, even if 
sometimes a compiler bug is damn frustrating.

And the fact is, most of the gcc developers are great.

So my basic worry about gcc is in fact none of the individual technical 
problems themselves - those can be fixed. No, the problem I've seen in gcc 
is that _some_ of the developers seem to be total d*ckheads when it comes 
to "language definition", and seem to think that it's more important to 
read the language spec like a lawyer than it is to solve actual user 
problems.

And that has come up before. It has nothing to do with this particular 
"gcc doesn't create thread-safe code" issue. We had the exact same issue 
with gcc creating totally unusable code due to having a fundamentally 
braindead memory aliasing model. The language-lawyering people basically 
could push their *idiotic* model onto gcc, just by quoting the standard, 
and not caring about actual users at all.

And that's a problem. In the kernel, we've historically always cared a lot 
about POSIX and SuS, but while conforming to standards have been primary 
goals since pretty much day one (ie I asked around about POSIX before the 
very first release, and it's how I met some suckers^Wupstanding citizens 
to try those early kernels), it has *always* taken a back seat to things 
like compatibility with existing apps.

The gcc lists seem to often get to the point where people quote the 
standard, and that's that. In that environment, the paper standard (that 
hass *nothing* to do with reality) trumps any other argument. "What we do 
is _allowed_ by the standard" seems to be a good argument, even if it 
breaks real code and there is no sane way to avoid doing it.

And I really don't think it's everybody. At all. But I think it's the case 
that sometimes it's easier to quote the standard than write good code, and 
so gcc lists have more people quoting the papers than trying to fix some 
problem.

			Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Oct 26, 7:40 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 8:09 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 8:27 am)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 8:34 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 9:28 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Oct 26, 10:07 am)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Oct 26, 10:12 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 10:25 am)
RE: Is gcc thread-unsafe?, David Schwartz, (Fri Oct 26, 11:06 am)
Re: Is gcc thread-unsafe?, Alan Cox, (Fri Oct 26, 11:08 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 11:14 am)
Re: Is gcc thread-unsafe?, Andi Kleen, (Fri Oct 26, 1:39 pm)
Re: Is gcc thread-unsafe?, Giacomo Catenazzi, (Fri Oct 26, 2:45 pm)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Fri Oct 26, 3:24 pm)
RE: Is gcc thread-unsafe?, Andrew Haley, (Tue Oct 30, 3:20 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Fri Nov 2, 8:29 am)
Re: Is gcc thread-unsafe?, Andrew Haley, (Fri Nov 2, 8:38 am)
RE: Is gcc thread-unsafe?, David Schwartz, (Fri Nov 2, 10:18 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Sun Nov 4, 8:13 am)
Re: Is gcc thread-unsafe?, Linus Torvalds, (Sun Nov 4, 10:45 am)
Re: Is gcc thread-unsafe?, Andrew Haley, (Sun Nov 4, 10:58 am)
Re: Is gcc thread-unsafe?, Bart Van Assche, (Sun Nov 4, 11:06 am)