From: Jakub Jelinek <jakub@redhat.com>
To: Patrick Palka <patrick@parcs.ath.cx>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, jason@redhat.com
Subject: Re: [PATCH 1/2] Fix new -Wparentheses warnings encountered during bootstrap
Date: Thu, 31 Mar 2016 21:30:00 -0000 [thread overview]
Message-ID: <20160331213031.GP3017@tucnak.redhat.com> (raw)
In-Reply-To: <1459457625-20610-1-git-send-email-patrick@parcs.ath.cx>
On Thu, Mar 31, 2016 at 04:53:45PM -0400, Patrick Palka wrote:
> @@ -2526,12 +2526,13 @@ struct GTY(()) lang_decl {
>
> */
> #define FOR_EACH_CLONE(CLONE, FN) \
> - if (TREE_CODE (FN) == FUNCTION_DECL \
> - && (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (FN) \
> - || DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (FN))) \
> - for (CLONE = DECL_CHAIN (FN); \
> - CLONE && DECL_CLONED_FUNCTION_P (CLONE); \
> - CLONE = DECL_CHAIN (CLONE))
> + if (!(TREE_CODE (FN) == FUNCTION_DECL \
> + && (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (FN) \
> + || DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (FN))))\
> + ; \
> + else for (CLONE = DECL_CHAIN (FN); \
> + CLONE && DECL_CLONED_FUNCTION_P (CLONE); \
> + CLONE = DECL_CHAIN (CLONE))
Can you please do
+ else \
+ for (CLONE = DECL_CHAIN (FN); \
...
instead?
> --- a/gcc/testsuite/g++.dg/plugin/pragma_plugin.c
> +++ b/gcc/testsuite/g++.dg/plugin/pragma_plugin.c
> @@ -32,14 +32,16 @@ handle_pragma_sayhello (cpp_reader *dummy)
> return;
> }
> if (TREE_STRING_LENGTH (message) > 1)
> - if (cfun)
> - warning (OPT_Wpragmas,
> - "%<pragma GCCPLUGIN sayhello%> from function %qE: %s",
> - cfun->decl, TREE_STRING_POINTER (message));
> + {
> + if (cfun)
> + warning (OPT_Wpragmas,
> + "%<pragma GCCPLUGIN sayhello%> from function %qE: %s",
> + cfun->decl, TREE_STRING_POINTER (message));
> else
> - warning (OPT_Wpragmas,
> + warning (OPT_Wpragmas,
> "%<pragma GCCPLUGIN sayhello%> outside of function: %s",
> TREE_STRING_POINTER (message));
> + }
Several lines with 8 spaces instead of tab above. Can you also indent
the last warning's following lines to be below OPT_?
Otherwise LGTM.
Jakub
next prev parent reply other threads:[~2016-03-31 21:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 20:54 Patrick Palka
2016-03-31 20:57 ` Patrick Palka
2016-03-31 21:10 ` Patrick Palka
2016-03-31 21:14 ` Bernd Schmidt
2016-03-31 21:18 ` Patrick Palka
2016-04-01 11:46 ` Marek Polacek
2016-03-31 21:30 ` Jakub Jelinek [this message]
2016-03-31 22:38 ` Trevor Saunders
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=20160331213031.GP3017@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=patrick@parcs.ath.cx \
/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).