public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Bernd Schmidt <bernds_cb1@t-online.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Bernd Schmidt	<bschmidt@redhat.com>,
	Jason Merrill <jason@redhat.com>
Subject: Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)
Date: Mon, 25 Apr 2016 20:18:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1604252015500.26323@digraph.polyomino.org.uk> (raw)
In-Reply-To: <571A2697.4050208@t-online.de>

On Fri, 22 Apr 2016, Bernd Schmidt wrote:

> +/* Returns the smallest location != UNKNOWN_LOCATION in LOCATIONS,
> +   considering only those c_declspec_words found in LIST, which
> +   must be terminated by cdw_number_of_elements.  */
> +
> +static location_t
> +smallest_type_quals_location (const location_t* locations,
> +			      c_declspec_word *list)

I'd expect list to be a pointer to const...

> @@ -6101,6 +6122,18 @@ grokdeclarator (const struct c_declarato
>  	       qualify the return type, not the function type.  */
>  	    if (type_quals)
>  	      {
> +		enum c_declspec_word ignored_quals_list[] =
> +		  {
> +		    cdw_const, cdw_volatile, cdw_restrict, cdw_address_space,
> +		    cdw_number_of_elements
> +		  };

 ... and ignored_quals_list to be static const here.

-- 
Joseph S. Myers
joseph@codesourcery.com

  parent reply	other threads:[~2016-04-25 20:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 13:27 Bernd Schmidt
2016-04-22 14:00 ` Jason Merrill
2016-04-25 20:18 ` Joseph Myers [this message]
2016-05-04 15:17   ` Bernd Schmidt
2016-06-02  8:47     ` Bernd Schmidt
2016-06-22  3:37     ` Jeff Law
2016-07-15 13:04       ` Bernd Schmidt
2016-07-21 18:39         ` Jeff Law
2016-10-07 12:22           ` Bernd Schmidt

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=alpine.DEB.2.20.1604252015500.26323@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=bernds_cb1@t-online.de \
    --cc=bschmidt@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).