public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@cygnus.com>
To: oliva@dcc.unicamp.br (Alexandre Oliva), egcs@cygnus.com
Subject: Re: Is it a bug ?
Date: Mon, 08 Dec 1997 22:22:00 -0000	[thread overview]
Message-ID: <u9zpmb3ukv.fsf@yorick.cygnus.com> (raw)
In-Reply-To: <orvhwzzkd1.fsf.cygnus.egcs.bugs@grupiara.dcc.unicamp.br>

>>>>> Alexandre Oliva <oliva@dcc.unicamp.br> writes:

> knizhnik  writes:
>> It looks like bug in compiler (if class A has no constructor then
>> no error message is produced)

> That's because the implicit constructor defined for A won't ever
> throw, that is, it is declared as:

> A::A() throw() {}

More correctly, the implicit constructor is trivial, so it doesn't get
called at all.

> So no exception handling code is inserted there.  Declaring the
> constructor of A as such should help

g++ currently doesn't do any optimization based on throw specs.

> but I believe access control should not be performed at that point.  The
> Nov'97 is not clear about that.

I disagree.  [expr.new] just says that a deallocation function is called;
it gives no indication that this call would be any different from any other
call, so access control should be performed.

Jason

       reply	other threads:[~1997-12-08 22:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <199712081205.NAA25992@vbormc.vbo.dec.com>
     [not found] ` <orvhwzzkd1.fsf.cygnus.egcs.bugs@grupiara.dcc.unicamp.br>
1997-12-08 22:22   ` Jason Merrill [this message]
1998-04-30 10:25 is it a bug? JC Loredo-Osti
1998-04-30 15:45 ` Joe Buck
1998-04-30 13:20   ` JC Loredo-Osti

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=u9zpmb3ukv.fsf@yorick.cygnus.com \
    --to=jason@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=oliva@dcc.unicamp.br \
    /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).