public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@transmeta.com>
To: <dewar@gnat.com>
Cc: <moshier@moshier.ne.mediaone.net>, <gcc@gcc.gnu.org>,
	<tprince@computer.org>
Subject: Re: What is acceptable for -ffast-math? (Was: associative law incombine)
Date: Sun, 29 Jul 2001 21:33:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0107292123290.1157-100000@penguin.transmeta.com> (raw)
In-Reply-To: <20010729212202.A605BF2B53@nile.gnat.com>

On Sun, 29 Jul 2001 dewar@gnat.com wrote:
>
> <<Further, GCC is supposed to be standards compliant by default.  You
> seem to be advocating that GCC should, without warning, generate
> programs that violate the standard and are mathematically wrong.
> >>
>
> and that violate the expectations of programmers who *do* know what they
> are doing!

Note that most of the people I know who _do_ know what they are doing also
want to have the option o ftelling the compiler when they don't care, and
want to allow the compiler to do "illegal" things if that allows the
compiler to generate better code.

It's sad that C99 doesn't seem to allow the Fortran kind of "you go and
make the best you can of this expression unless I tell you otherwise".
Which means that we'd _have_ to be non-standard to allow the optimization
at all. Which obviously means a flag (one way or the other).

Rather than have a good way to do it on a case-by-case basis, which is
probably what the people who _really_ care would prefer.

In C, you can't reasonably use the Fortran "parenthesis are significant"
approach - the way the C pre-processor works you often have lots of extra
parenthesis for that reason. However, C does have the well-established
sequence point rule, so it would make sense to have that kind of
extension.

And hey, if you want to make it be an extra flag, just make it a _simple_
one. Like "-ffast-math". Don't make people have to know 100 esoteric flags
that are compiler-release-specific. That's completely useless.

		Linus

  reply	other threads:[~2001-07-29 21:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-29 14:22 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-29 21:33 ` Linus Torvalds [this message]
2001-07-30 14:43   ` Alexandre Oliva
2001-07-30 15:45     ` Neil Booth
2001-07-30 16:03       ` Alexandre Oliva
2001-07-30 16:11         ` Neil Booth
2001-07-30 16:28           ` Alexandre Oliva
2001-07-30 19:08     ` Joern Rennecke
2001-07-30 19:22       ` Alexandre Oliva
2001-07-30 19:29         ` Gabriel Dos Reis
2001-07-30 19:34           ` Alexandre Oliva
2001-07-30 19:54             ` Gabriel Dos Reis
2001-07-30 21:31         ` What is acceptable for -ffast-math? (Was: associative law incombine) Mark Mitchell
2001-07-30 19:27       ` What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos Reis
  -- strict thread matches above, loose matches on Subject: below --
2001-08-01 11:44 Gabriel Dos Reis
2001-08-01 11:58 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:38 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-08-01 10:46 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:58   ` Gabriel Dos_Reis
2001-08-01 10:28 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos_Reis
2001-08-01 10:41 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:55   ` Gabriel Dos_Reis
2001-08-01 10:13 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-08-01 10:32 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01  9:46 Wolfgang Bangerth
2001-08-01  9:58 ` Gabriel Dos_Reis
2001-08-01 10:08   ` Wolfgang Bangerth
2001-08-01 11:12     ` Gabriel Dos_Reis
2001-08-01  9:24 What is acceptable for -ffast-math? (Was: associative law in combine) Tim Hollebeek
2001-08-01  9:54 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-08-01 10:26   ` Gabriel Dos_Reis
2001-08-01 10:35     ` Linus Torvalds
2001-08-01 10:45       ` Gabriel Dos_Reis
2001-07-31 17:37 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31 19:05 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-31  7:26 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31 17:28 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 21:43 What is acceptable for -ffast-math? (Was: associative law in combine) Joern Rennecke
2001-07-31 18:12 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 21:11 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos Reis
2001-07-31 18:12 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30 16:29 What is acceptable for -ffast-math? (Was: associative law in combine) Alexandre Oliva
2001-07-30 17:21 ` What is acceptable for -ffast-math? (Was: associative law incombine) Joseph S. Myers
2001-07-30 13:10 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-31  2:54 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30  8:59 What is acceptable for -ffast-math? (Was: associative law in combine) mike stump
2001-07-30 15:46 ` What is acceptable for -ffast-math? (Was: associative law incombine) Stephen L Moshier
2001-07-30  6:00 What is acceptable for -ffast-math? (Was: associative law in combine) dewar
2001-07-30 10:34 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-30  0:23 What is acceptable for -ffast-math? (Was: associative law in combine) Gabriel Dos Reis
2001-07-30 11:37 ` What is acceptable for -ffast-math? (Was: associative law incombine) Linus Torvalds
2001-07-29 12:52 * Re: What is acceptable for -ffast-math? (Was: associative lawin combine) Linus Torvalds
2001-07-29 14:03 ` What is acceptable for -ffast-math? (Was: associative law incombine) Stephen L Moshier
2001-07-29 21:08   ` Linus Torvalds

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=Pine.LNX.4.33.0107292123290.1157-100000@penguin.transmeta.com \
    --to=torvalds@transmeta.com \
    --cc=dewar@gnat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=moshier@moshier.ne.mediaone.net \
    --cc=tprince@computer.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).