From: Jason Merrill <jason@redhat.com>
To: Paolo Carlini <paolo.carlini@oracle.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [C++ Patch] Three additional bitfield diagnostic tweaks (a regression fix included)
Date: Thu, 06 Dec 2018 15:11:00 -0000 [thread overview]
Message-ID: <767ff78b-747c-d48c-f061-766faab2f8e9@redhat.com> (raw)
In-Reply-To: <f9ea299f-5867-a6be-56e1-88024dd9e428@oracle.com>
On 12/6/18 5:49 AM, Paolo Carlini wrote:
> Hi,
>
> I'm bundling together 3 more. In attachment order:
>
> 1- Since we decided to explicitly print the wrong type, I suppose we
> want to consistently do that in templates too.
OK.
> 2- Unfortunately I have to fix another buglet I recently introduced,
> completely similar to c++/88222 fixed by Marek. Well, at least we will
> not print anymore an empty '' when the unqualified_id is null because
> the field is unnamed.
> - error_at (declarator->id_loc,
> - "%qE is neither function nor member function; "
> - "cannot be declared friend", unqualified_id);
> + if (unqualified_id && declarator)
> + error_at (declarator->id_loc,
> + "%qE is neither function nor member function; "
> + "cannot be declared friend", unqualified_id);
> + else
> + error ("unnamed field is neither function nor member "
> + "function; cannot be declared friend");
I wonder if we want to use the 'name' variable here.
> 3- In the non-static case too, when from grokdeclarator we are calling
> FIELD_DECL and passing the location as first argument, I think we want
> to likewise pass declarator->id_loc when available.
> - decl = build_decl (input_location,
> + decl = build_decl (declarator
> + ? declarator->id_loc
> + : input_location,
I think we want to put this in a local variable, to share with the
static case and probably other places in grokdeclarator.
Jason
next prev parent reply other threads:[~2018-12-06 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 10:52 Paolo Carlini
2018-12-06 15:11 ` Jason Merrill [this message]
2018-12-06 17:23 ` Paolo Carlini
2018-12-06 19:38 ` 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=767ff78b-747c-d48c-f061-766faab2f8e9@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=paolo.carlini@oracle.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).