All of lore.kernel.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: "Albert Cahalan" <acahalan@gmail.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org,
	s0348365@sms.ed.ac.uk, bunk@stusta.de, mikpe@it.uu.se,
	torvalds@osdl.org
Subject: Re: kernel + gcc 4.1 = several problems
Date: Thu, 4 Jan 2007 18:24:08 +0100	[thread overview]
Message-ID: <8069085182dff3b0e63a661d81804dbb@kernel.crashing.org> (raw)
In-Reply-To: <787b0d920701040904i553e521fsb290acf5059f0b62@mail.gmail.com>

>> Lack of the flag does not break any valid C code, only code
>> making unwarranted assumptions (i.e., buggy code).
>
> Right, if "C" means "strictly conforming ISO C" to you.

Without any further qualification, it of course does, yes.

> (in which case, nearly all real-world code is broken)

Not "nearly all" -- but lots of code, yes.

> FYI, the kernel also assumes that a "char" is 8 bits.
> Maybe you should run away screaming.

No, that's fine with me.  It's fine with GCC as well
of course.

>> Anyway, with 4.1 you shouldn't see frequent problems due to
>
> Right, it gets much worse with the current gcc snapshots.

Yes.  And that problem will be fixed some way pretty soon --
simply because it _has_ to be fixed.

> IMHO you should play such games with "g++ -O9", but that's
> a discussion for a different mailing list.

For a different mailing list indeed; let me just point out
that for certain important quite common cases it's an ~50%
overall speedup.

>> "not using -fwrapv while my code is broken WRT signed overflow"
>> yet; and if/when problems start to happen, to "correct" action
>> to take is not to add the compiler flag, but to fix the code.
>
> Nope, unless we decide that the performance advantages of
> a language change are worth the risk and pain.

If the kernel breaks all over the place, of course you should add
the flag.  But it won't, it would break *all* programs all over
the place then, and that wouldn't be acceptable to GCC.  If instead
only a few kernel code bugs pop up, it's easy to fix.

Aaaaanyway -- my only real point was to point out that there's
no doomsday scenario here, yes current GCC TOT seems to regress
here (for some definition of that word), but GCC development
is in stage 1, that sort of thing happens.  It'll stabilise
again.

In the meantime, building git HEAD kernels with GCC 4.1 and
4.2 will probably rattle out quite a few bugs still, both
in the kernel and in GCC -- neither is used all that often
it seems?


Segher


  reply	other threads:[~2007-01-04 17:25 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04  7:11 kernel + gcc 4.1 = several problems Albert Cahalan
2007-01-04 16:43 ` Segher Boessenkool
2007-01-04 17:04   ` Albert Cahalan
2007-01-04 17:24     ` Segher Boessenkool [this message]
2007-01-04 17:47       ` Linus Torvalds
2007-01-04 18:53         ` Segher Boessenkool
2007-01-04 19:10         ` Al Viro
2007-01-05 17:17       ` Pavel Machek
2007-01-06  8:23         ` Segher Boessenkool
2007-01-04 17:37     ` Linus Torvalds
2007-01-04 18:34       ` Segher Boessenkool
2007-01-04 22:02         ` Geert Bosch
2007-01-07  4:25       ` Denis Vlasenko
2007-01-07  4:45         ` Linus Torvalds
2007-01-07  5:26           ` Jeff Garzik
2007-01-07 15:10         ` Segher Boessenkool
2007-01-26 22:05           ` Michael K. Edwards
2007-01-04 18:08     ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2007-01-03  2:12 Mikael Pettersson
2007-01-03  2:20 ` Alistair John Strachan
2007-01-05 15:53   ` Alistair John Strachan
2007-01-05 16:02     ` Linus Torvalds
2007-01-05 16:19       ` Alistair John Strachan
2007-01-05 16:49         ` Linus Torvalds
2007-01-07  0:36           ` Pavel Machek
2007-01-07  0:57             ` Alistair John Strachan
2007-01-03  5:55 ` Willy Tarreau
2007-01-03 10:29 ` Alan
2007-01-03 10:32   ` Grzegorz Kulewski
2007-01-03 11:51     ` Jeff Garzik
2007-01-03 12:44     ` Alan
2007-01-03 13:32       ` Arjan van de Ven
2007-01-03 13:58         ` Jakub Jelinek
2007-01-03 14:28         ` Alan
2007-01-03 16:06           ` Linus Torvalds
2007-01-03 16:03     ` Linus Torvalds
2007-01-03 17:01       ` l.genoni
2007-01-03 17:45         ` Tim Schmielau
2007-01-03 20:24           ` Linus Torvalds
2007-01-03 17:06       ` l.genoni
2007-01-03 17:53       ` Mariusz Kozlowski
2007-01-03 19:47       ` Denis Vlasenko
2007-01-03 20:38         ` Linus Torvalds
2007-01-03 21:48           ` Denis Vlasenko
2007-01-03 22:13             ` Linus Torvalds
2007-01-03 21:44       ` Thomas Sailer
2007-01-03 22:08         ` Linus Torvalds
2007-01-04  3:08       ` Zou, Nanhai
2007-01-04 15:34         ` Linus Torvalds
2006-12-20 14:21 Oops in 2.6.19.1 Alistair John Strachan
2006-12-30 16:59 ` Alistair John Strachan
2006-12-31 16:27   ` Adrian Bunk
2006-12-31 16:55     ` Alistair John Strachan
2007-01-02 21:10       ` kernel + gcc 4.1 = several problems Adrian Bunk
2007-01-02 21:56         ` Alistair John Strachan
2007-01-02 22:06           ` D. Hazelton
2007-01-02 23:24             ` Adrian Bunk
2007-01-02 23:41               ` D. Hazelton
2007-01-03  2:05                 ` Horst H. von Brand
2007-01-02 22:13           ` Linus Torvalds
2007-01-02 23:18             ` Alistair John Strachan
2007-01-03  1:43               ` Linus Torvalds
2007-01-02 22:01         ` Linus Torvalds
2007-01-02 23:09           ` David Rientjes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8069085182dff3b0e63a661d81804dbb@kernel.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=acahalan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    --cc=s0348365@sms.ed.ac.uk \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.