public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: Jason Merrill <jason@redhat.com>
Cc: rep.dot.nop@gmail.com, Marek Polacek <polacek@redhat.com>,
	Marek Polacek via Gcc-patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH v5] attribs: Implement -Wno-attributes=vendor::attr [PR101940]
Date: Sat, 6 Nov 2021 21:29:42 +0100	[thread overview]
Message-ID: <20211106212942.0d3c0fa8@nbbrfq> (raw)
In-Reply-To: <516f3ddd-8634-9d73-ddd4-ae470f4284cf@redhat.com>

On Sat, 6 Nov 2021 15:29:57 -0400
Jason Merrill <jason@redhat.com> wrote:

> On 11/6/21 14:28, Marek Polacek wrote:
> > On Sat, Nov 06, 2021 at 02:32:26AM +0100, Bernhard Reutner-Fischer wrote:  

> > No, I want q to point into the copy of the string, since I'm about
> > to modify it.  And I'd prefer a single call to xstrdup rather than
> > two.  
> 
> It occurs to me that instead of calling xstrdup at all, since you're 
> already passing the strings to get_identifier you could use 
> get_identifier_with_length instead, and then refer to IDENTIFIER_POINTER 
> of the result.

Right, i should have looked at the full diff.
I can see the point in stripping __attr__ to attr but also stripping
the vendors sounds a bit odd, doesn't it.

IMHO it would have been way easier to just calculate the desired start
and end and get_identifier_with_length for the vendor and attr as Jason
said.

Guess these local lambdas are a thing nowadays :)

Sorry for the noise..

  reply	other threads:[~2021-11-06 20:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 17:06 [PATCH] " Marek Polacek
2021-09-20 17:38 ` Jakub Jelinek
2021-09-20 18:37   ` Marek Polacek
2021-09-20 19:03     ` [PATCH v2] " Marek Polacek
2021-09-20 19:08     ` [PATCH] " Jakub Jelinek
2021-09-20 22:59       ` [PATCH v3] " Marek Polacek
2021-09-23 18:25         ` Jason Merrill
2021-09-28 20:20           ` [PATCH v4] " Marek Polacek
2021-10-11 15:17             ` Marek Polacek
2021-10-29 16:47               ` Marek Polacek
2021-11-05 18:48             ` Jason Merrill
2021-11-06  0:21               ` [PATCH v5] " Marek Polacek
2021-11-06  1:32                 ` Bernhard Reutner-Fischer
2021-11-06 18:28                   ` Marek Polacek
2021-11-06 19:29                     ` Jason Merrill
2021-11-06 20:29                       ` Bernhard Reutner-Fischer [this message]
2021-11-09  1:41                       ` [PATCH v6] " Marek Polacek
2021-11-09  5:12                         ` Jason Merrill
2021-11-09  7:09                           ` Bernhard Reutner-Fischer
2021-11-09 15:55                             ` Marek Polacek
2021-11-09 17:27                               ` Jason Merrill
2021-11-09 19:17                                 ` [PATCH v7] " Marek Polacek
2021-11-09 19:47                                   ` Bernhard Reutner-Fischer
2021-11-09 19:57                                     ` Bernhard Reutner-Fischer
2021-11-09 20:23                                       ` Marek Polacek
2021-11-09 21:30                                   ` [PATCH v8] " Marek Polacek
2021-11-10  5:53                                     ` Jason Merrill
2021-11-09 15:51                           ` [PATCH v6] " Marek Polacek

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=20211106212942.0d3c0fa8@nbbrfq \
    --to=rep.dot.nop@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=polacek@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).