Re: Is gcc thread-unsafe?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Giacomo Catenazzi <cate@...>
Cc: Bart Van Assche <bart.vanassche@...>, <linux-kernel@...>
Date: Friday, October 26, 2007 - 6:24 pm

On Fri, 26 Oct 2007, Giacomo Catenazzi wrote:

I see the smiley, but sadly, new standards take ten years or more to 
mature. Which means that even if the upcoming one is "perfect", things 
will be wrong with it, if only because people will have new usage 
scenarios where the standard simply isn't relevant or that it otherwise 
just doesn't address, and that then gets us back to the same issues 
somewhere else.

So it would be much better if developers just didn't think the standard 
trumped "real and existing code and problems", and shot down the language 
lawyers (and don't get me wrong - it's not just in gcc, btw. We _have_ had 
some of the same behavior in the kernel, although I will argue that our 
"backwards compatibility trumps pretty much everything else" rules at 
least solves _some_ of the problems).

Standards are just papers. Yes, they're important, but they are definitely 
not more important than anything else, and they are a lot _less_ important 
than some people seem to think. Gcc has done more for programming by being 
a de-facto standard and widely available, than the _paper_ standards often 
ever do!

It's also sad that a lot of these things seem to be done in the name of 
optimizing code, and then in many cases it drives people *away* from using 
that optimizer for anything but benchmarking.

In the kernel, we historically used to try for extreme optimizations, 
these days we spend more time tuning the optimizations _down_ because they 
aren't optimizations at all (ie using -Os instead of -O2), or they were 
buggy enough that we have to explicitly disable them (aliasing, 
"unit-at-a-time" etc).

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