public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: Martin Sebor <msebor@gmail.com>, Jeff Law <law@redhat.com>,
		gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][v2] Fix target attribute handling (PR c++/81355).
Date: Wed, 09 Aug 2017 19:44:00 -0000	[thread overview]
Message-ID: <CADzB+2nGrZCyF8pq94z3KVNvod1KSDyR6wKC=FWhUZ5n-m-=ow@mail.gmail.com> (raw)
In-Reply-To: <8464ad76-cf88-efdf-2dc5-402ea6946f7a@suse.cz>

On Wed, Aug 9, 2017 at 6:45 AM, Martin Liška <mliska@suse.cz> wrote:
> On 08/08/2017 08:03 PM, Martin Sebor wrote:
>> On 08/07/2017 10:59 PM, Martin Liška wrote:
>>> On 08/02/2017 09:56 PM, Martin Sebor wrote:
>>>> On 08/02/2017 01:04 PM, Jeff Law wrote:
>>>>> On 07/28/2017 05:13 AM, Martin Liška wrote:
>>>>>> Hello.
>>>>>>
>>>>>> Following patch skips empty strings in 'target' attribute.
>>>>>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>>>>>
>>>>>> Ready to be installed?
>>>>>> Martin
>>>>>>
>>>>>> gcc/ChangeLog:
>>>>>>
>>>>>> 2017-07-13  Martin Liska  <mliska@suse.cz>
>>>>>>
>>>>>>     PR c++/81355
>>>>>>     * attribs.c (sorted_attr_string): Skip empty strings.
>>>>>>
>>>>>> gcc/testsuite/ChangeLog:
>>>>>>
>>>>>> 2017-07-13  Martin Liska  <mliska@suse.cz>
>>>>>>
>>>>>>     PR c++/81355
>>>>>>     * g++.dg/other/pr81355.C: New test.
>>>>> OK.  THough one could legitimately ask if this ought to be a parsing error.
>>>>
>>>> I would suggest to at least issue a warning.  It seems that
>>>> the empty string must almost certainly be a bug here, say due
>>>> to unintended macro expansion.
>>>>
>>>> Otherwise, if it should remain silently (and intentionally)
>>>> accepted, I recommend to document it.  As it is, the manual
>>>> says that the "string" argument is equivalent to compiling
>>>> with -mstring which for "" would be rejected by the driver.
>>>>
>>>> Martin
>>>
>>> Thanks you both for feedback. I decided to come up with an error message for that.
>>>
>>> Feedback appreciated.
>>
>> My only comment is on the text of the error message.  I think
>> the %' directive is supposed to be used instead of a bare
>> apostrophe.  But rather than using the somewhat informal "can't"
>> I would suggest to follow other similar diagnostics that might
>> print something like:
>>
>>   empty string in attribute %<target%>
>>
>> (analogous to "empty precision in %s format" or "empty scalar
>> initializer" etc. in gcc.pot)
>>
>> or
>>
>>   attribute %<target%> argument may not be empty
>>
>> (similar to "output filename may not be empty").
>>
>> Martin
>
> Hi.
>
> Thank you both for review, both notes resolved in v3.
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?

OK.

Jason

  reply	other threads:[~2017-08-09 19:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 11:13 [PATCH] " Martin Liška
2017-08-02 19:04 ` Jeff Law
2017-08-02 19:56   ` Martin Sebor
2017-08-08  4:59     ` [PATCH][v2] " Martin Liška
2017-08-08 16:36       ` Jason Merrill
2017-08-08 18:03       ` Martin Sebor
2017-08-09 10:45         ` Martin Liška
2017-08-09 19:44           ` Jason Merrill [this message]
2017-09-18 13:01 ` Backport fix: [PATCH] " Martin Liška
2017-09-18 13:06   ` Jakub Jelinek
2017-09-19  8:19     ` Martin Liška

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='CADzB+2nGrZCyF8pq94z3KVNvod1KSDyR6wKC=FWhUZ5n-m-=ow@mail.gmail.com' \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=mliska@suse.cz \
    --cc=msebor@gmail.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).