public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
To: Mike Stump <mrs@apple.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: gcc 4.0.1 regressions with friend injection
Date: Tue, 26 Jul 2005 01:09:00 -0000	[thread overview]
Message-ID: <m3k6je4boa.fsf@uniton.integrable-solutions.net> (raw)
In-Reply-To: <DE2D3687-8D17-4759-A239-7397F781F386@apple.com>

Mike Stump <mrs@apple.com> writes:

| We are seeing tons of regressions (9 of 2377 for fink, over 100 or so
| out of 8000 was it for internal projects) in the build state of
| projects with code like:
| 
|     class bar {
|        friend class foo;
|        void baz(foo *x) {}
|     };
| 
| from 4.0.0 in 4.0.1.  This is really unfortunate.  What we really
| need is a warning (that can be easily turned off with a -Wno- switch)
| for the next 2 years, and then an error, if you must.  Doing this
| from x.0.0 to x.0.1 is, uhm, well, more costly than if it had been
| done in 4.0.0.  :-(
| 
| Thoughts?

This area has been a historical weakness of GCC, causing us to reject
valid-code or accept valid-code-with-wrong-semantics.  As you point
out above, it can can the overload set and such.  Because the point of
declaration is far away from the point of possible overload
resolution, it is not all clear when an "invalid declaration accepted
for past bug compayibility" should be or not be part of the overload
set.  You can warn, but it you turn it off, it is not obvious what the
semantics should be.  

(This reminds me of the "implicit typename" stuff)

-- Gaby

  reply	other threads:[~2005-07-26  1:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26  0:55 Mike Stump
2005-07-26  1:09 ` Gabriel Dos Reis [this message]
2005-07-26  4:07   ` William Beebe

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=m3k6je4boa.fsf@uniton.integrable-solutions.net \
    --to=gdr@integrable-solutions.net \
    --cc=gcc@gcc.gnu.org \
    --cc=mrs@apple.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).