public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Mitchell <mark@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Jason Merrill <jason@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] Fix regressions introduced by my PR34094 fix (PR  c++/34238, c++/34340)
Date: Fri, 07 Dec 2007 04:31:00 -0000	[thread overview]
Message-ID: <4758CC95.5040000@codesourcery.com> (raw)
In-Reply-To: <20071205150141.GN16835@devserv.devel.redhat.com>

Jakub Jelinek wrote:

> The following patch (which obsoletes my earlier 34238 patch) fixes all of
> this, but letting cgraph_optimize actually emit all the vars into assembly
> and only checking afterwards if we emitted something we shouldn't, which
> seems to be much more reliable.

The diagnostic is not about what the compiler happens to end up spitting
out; it's about the user's program.  If you do:

  namespace { struct A { static int i; }; }
  static int foo() { return A::i; }

the program is still erroneous, even though the compiler may likely
optimize away foo, and the reference to A::i.  So, I don't think we
should be doing this check after cgraph_optimize.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

  reply	other threads:[~2007-12-07  4:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27  4:17 [C++ PATCH] Fix a regression introduced by my PR34094 fix (PR c++/34238) Jakub Jelinek
2007-12-05 15:03 ` [C++ PATCH] Fix regressions introduced by my PR34094 fix (PR c++/34238, c++/34340) Jakub Jelinek
2007-12-07  4:31   ` Mark Mitchell [this message]
2007-12-07  7:53     ` Jakub Jelinek
2007-12-07 20:52       ` Mark Mitchell
2007-12-10 13:19         ` Jakub Jelinek
2007-12-10 20:51           ` Mark Mitchell
2007-12-17 17:19           ` Jason Merrill

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=4758CC95.5040000@codesourcery.com \
    --to=mark@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    /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).