From: Jakub Jelinek <jakub@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] attribs: Implement -Wno-attributes=vendor::attr [PR101940]
Date: Mon, 20 Sep 2021 21:08:09 +0200 [thread overview]
Message-ID: <20210920190809.GM304296@tucnak> (raw)
In-Reply-To: <YUjUz0Xi9AEDEaG6@redhat.com>
On Mon, Sep 20, 2021 at 02:37:03PM -0400, Marek Polacek wrote:
> > So, wouldn't be this better specified as
> > Wno-attributes=
> > Common Joined RejectNegative
> > (not sure if RejectNegative is actually needed for an option
> > starting with Wno- )?
>
> Looks like RejectNegative is not needed. I could do that, but I think
> it regresses the diagnostic:
>
> error: unrecognized command-line option '-Wattributes=attr::'
> vs
> error: arguments ignored for ‘-Wattributes=’; use ‘-Wno-attributes=’ instead
>
> I prefer the latter. (I've changed the warning into error.)
Ok.
> > > +/* { dg-additional-options "-std=c++11" { target c++ } } */
> > > +/* { dg-additional-options "-Wno-attributes=company::,yoyodyne::attr" } */
> > > +/* { dg-additional-options "-Wno-attributes=c1::attr,c1::attr,c1::__attr__" } */
> > > +/* { dg-additional-options "-Wno-attributes=clang" } */
> > > +/* { dg-additional-options "-Wno-attributes=c2::,c2::attr" } */
> > > +/* { dg-additional-options "-Wno-attributes=c3::attr,c3::" } */
> > > +/* { dg-additional-options "-Wno-attributes=x::," } */
> >
> > Should the above be accepted (I mean trailing , ?) What does that mean?
>
> I'm thinking it should: the arguments to -Wno-attributes= could be
> generated by a tool so accepting the trailing , might help, like in
> enums etc.
I don't think we allow that for any other options that accept a list of
something (except maybe -W{p,c,a,l}, those just pass the args through).
Generating a list that has comma separation only in between items and not
at the end is trivial.
Jakub
next prev parent reply other threads:[~2021-09-20 19:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-20 17:06 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 ` Jakub Jelinek [this message]
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
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=20210920190809.GM304296@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--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).