public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
To: gcc-bugs@gcc.gnu.org, js@convergence.de, sirl@gcc.gnu.org
Cc: gcc@gcc.gnu.org
Subject: Re: optimization/7557: gcc-3.1.1 (debian/i386): wrong code with -O2 / bitfields / pointer aliasing
Date: Mon, 12 Aug 2002 15:05:00 -0000	[thread overview]
Message-ID: <20020812220548.7462CF2D45@nile.gnat.com> (raw)

> I wonder: Thousands of software packages use -O2 by default.
> How many of them will fail mysteriously when compiled with gcc-3.1,
> just because of the implied -fstrict-aliasing?

Who knows? But it is just a special case of the general phenomenon that junk
code which people get away with often falls foul of perfectly legitimate 
optimizations, and as compilers improve, such code fails.

It is nice of GCC to provide facilities for keeping old junk code running (there
is certainly no requirement for a C compiler to do so), but it seems clear that
the default for the highest optimization level should be to take advantage
of the aliasing rules, which are after all there *precisely* to enable effective
optimization.

             reply	other threads:[~2002-08-12 15:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-12 15:05 Robert Dewar [this message]
2002-08-13  9:51 ` Johannes Stezenbach
2002-08-14  1:14   ` PATCH for Re: optimization/7557: gcc-3.1.1 (debian/i386): wrong codewith " Gerald Pfeifer
  -- strict thread matches above, loose matches on Subject: below --
2002-08-13 10:00 optimization/7557: gcc-3.1.1 (debian/i386): wrong code with " Robert Dewar
2002-08-13 11:28 ` Johannes Stezenbach
     [not found] <20020809190500.22817.qmail@sources.redhat.com>
2002-08-12  8:53 ` Johannes Stezenbach

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=20020812220548.7462CF2D45@nile.gnat.com \
    --to=dewar@gnat.com \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=js@convergence.de \
    --cc=sirl@gcc.gnu.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).