public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Bryce McKinlay <bryce@waitaki.otago.ac.nz> To: apbianco@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: java/4775 Date: Wed, 21 Nov 2001 02:56:00 -0000 [thread overview] Message-ID: <20011127032601.10799.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR java/4775; it has been noted by GNATS. From: Bryce McKinlay <bryce@waitaki.otago.ac.nz> To: apbianco@cygnus.com Cc: gcc-gnats@gcc.gnu.org, mlhartme@mlhartme.de, gcc-bugs@gcc.gnu.org Subject: Re: java/4775 Date: Tue, 27 Nov 2001 16:25:08 +1300 Alexandre Petit-Bianco wrote: >>I'm curious why the second part of this patch is neccessary >> > >Last time I checked (some time ago, I'd have to re-check,) proper >finals initialization is carried out by checking that at least a ctor >in the chain of call will initialize a final properly. So it's faster >and prevents things from breaking when regular non static methods are >being found invoked in ctor bodies... > But regular method calls can just be ignored, right? They are not allowed to initialize finals anyway. I don't see why TREE_CODE (decl) != FUNCTION_DECL needs to be an error condition. Also it seems fragile to check explicitly the tree structure of the call (eg the NOP_EXPR etc), because that could change, so why not just do this? @@ -12670,8 +12665,10 @@ if (TREE_CODE (decl) != FUNCTION_DECL) decl = TREE_OPERAND (TREE_OPERAND (decl, 0), 0); - if (TREE_CODE (decl) != FUNCTION_DECL) - abort (); + /* Skip something that isn't a call to a ctor */ + if ((TREE_CODE (decl) == FUNCTION_DECL && !DECL_CONSTRUCTOR_P (decl)) + || TREE_CODE (decl) != FUNCTION_DECL) + return -1; if (DECL_FUNCTION_ALL_FINAL_INITIALIZED (decl)) return 1; if (DECL_FINIT_P (decl) || DECL_CONTEXT (decl) != current_class) regards Bryce.
next reply other threads:[~2001-11-27 3:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-11-21 2:56 Bryce McKinlay [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-11-21 2:53 java/4775 Alexandre Petit-Bianco 2001-11-21 2:49 java/4775 Bryce McKinlay
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=20011127032601.10799.qmail@sourceware.cygnus.com \ --to=bryce@waitaki.otago.ac.nz \ --cc=apbianco@gcc.gnu.org \ --cc=gcc-prs@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: linkBe 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).