From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: David Wohlferd <dw@LimeGreenSocks.com>,
Bernd Schmidt <bschmidt@redhat.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Richard Henderson <rth@redhat.com>,
"jason@redhat.com" <jason@redhat.com>
Cc: "segher@kernel.crashing.org" <segher@kernel.crashing.org>,
"sandra@codesourcery.com" <sandra@codesourcery.com>,
"Paul_Koning@Dell.com" <Paul_Koning@Dell.com>,
Jeff Law <law@redhat.com>,
"bernds_cb1@t-online.de" <bernds_cb1@t-online.de>,
Andrew Haley <aph@redhat.com>
Subject: AW: AW: Wonly-top-basic-asm
Date: Thu, 11 Feb 2016 06:51:00 -0000 [thread overview]
Message-ID: <VI1PR07MB09115C3D154139D85DFA9430E4A80@VI1PR07MB0911.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <56BBCC90.9020001@LimeGreenSocks.com>
On 11.2.2016, David Wohlferd wrote:
>
> Since no one expressed any objections, I have renamed the option from
> -Wonly-top-basic-asm to -Wbasic-asm-in-function. This more clearly
> conveys what the option does (give a warning if you find basic asm in a
> function).
>
why not simply -Wbasic-asm ?
> I believe the attached patch addresses all the other outstanding comments.
>
Indentation wrong here. The whole block must be indented by 2 spaces.
> if (c_parser_next_token_is (parser, CPP_CLOSE_PAREN) && !is_goto)
>+ {
>+ /* Warn on basic asm used inside of functions,
>+ EXCEPT when in naked functions. Also allow asm (""). */
Comments should end with dot space space */
>+ if (warn_basic_asm_in_function && TREE_STRING_LENGTH (str) != 1)
>+ if (lookup_attribute ("naked",
>+ DECL_ATTRIBUTES (current_function_decl))
the DECL_ATTRIBUTES should be at the same column as the "naked".
>+ == NULL_TREE)
>+ warning_at (asm_loc, OPT_Wbasic_asm_in_function,
>+ "asm statement in function does not use extended syntax");
>+
> goto done_asm;
>+ }
>@@ -18199,6 +18201,17 @@
> /* If the extended syntax was not used, mark the ASM_EXPR. */
> if (!extended_p)
> {
>+ /* Warn on basic asm used inside of functions,
>+ EXCEPT when in naked functions. Also allow asm (""). */
Comments should end with dot space space */
>+ if (warn_basic_asm_in_function
>+ && TREE_STRING_LENGTH (string) != 1)
>+ if (lookup_attribute ("naked",
>+ DECL_ATTRIBUTES (current_function_decl))
the DECL_ATTRIBUTES should be at the same column as the "naked".
> ChangeLog:
> 2016-02-10 David Wohlferd <dw@LimeGreenSocks.com>
>
> * doc/extend.texi: Doc basic asm behavior and new
> -Wbasic-asm-in-function option.
> * doc/invoke.texi: Doc new -Wbasic-asm-in-function option.
> * c-family/c.opt: Define -Wbasic-asm-in-function.
> * c/c-parser.c: Implement -Wbasic-asm-in-function for C.
> * cp/parser.c: Implement -Wbasic-asm-in-function for c++.
C++, isn't it always upper case?
> * testsuite/c-c++-common/Wbasic-asm-in-function.c: New tests for
> -Wbasic-asm-in-function.
> * testsuite/c-c++-common/Wbasic-asm-in-function-2.c: Ditto.
>
ChangeLog lines begin with TAB.
Please split the ChangeLog, there are separate ChangeLogs
at gcc/ChangeLog (doc changes go in there)
gcc/c/ChangeLog, gcc/cp/ChangeLog, gcc/c-family/ChangLog
and gcc/testsuite/ChangeLog, the respective ChangeLog entries
use relative file names.
Please add the function name where you changed in brackets.
For instance:
* c-parser.c (cp_parser_asm_definition): Implement -Wbasic-asm-in-function.
Thanks
Bernd.
> While I have a release on file with FSF, I don't have write access to SVN.
>
> dw
next prev parent reply other threads:[~2016-02-11 6:51 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-24 22:24 Wonly-top-basic-asm David Wohlferd
2016-01-25 12:25 ` Wonly-top-basic-asm Bernd Schmidt
2016-01-28 7:21 ` Wonly-top-basic-asm David Wohlferd
2016-02-08 3:46 ` Wonly-top-basic-asm David Wohlferd
2016-02-08 6:45 ` AW: Wonly-top-basic-asm Bernd Edlinger
2016-02-08 20:15 ` David Wohlferd
2016-02-10 23:50 ` David Wohlferd
2016-02-11 6:51 ` Bernd Edlinger [this message]
2016-02-12 7:01 ` AW: " David Wohlferd
2016-02-11 15:40 ` Bernd Schmidt
2016-02-11 16:03 ` Sandra Loosemore
2016-02-12 7:08 ` David Wohlferd
2016-02-12 7:05 ` David Wohlferd
2016-02-12 12:51 ` Bernd Schmidt
2016-02-13 1:03 ` Sandra Loosemore
2016-02-14 4:00 ` David Wohlferd
2016-02-20 1:03 ` David Wohlferd
2016-02-20 12:08 ` Wonly-top-basic-asm Bernd Edlinger
2016-02-21 10:28 ` Wonly-top-basic-asm David Wohlferd
2016-02-26 15:10 ` Wonly-top-basic-asm Bernd Schmidt
2016-02-29 7:02 ` Wonly-top-basic-asm David Wohlferd
2016-03-11 0:56 ` Wonly-top-basic-asm David Wohlferd
2016-03-14 15:29 ` Wonly-top-basic-asm Bernd Schmidt
2016-03-17 5:24 ` Wonly-top-basic-asm David Wohlferd
2016-03-18 13:32 ` Wonly-top-basic-asm Bernd Schmidt
2016-03-18 15:01 ` Wonly-top-basic-asm Richard Biener
2016-03-18 19:14 ` Wonly-top-basic-asm Bernd Schmidt
2016-02-14 3:57 ` AW: Wonly-top-basic-asm David Wohlferd
2016-01-26 0:32 ` Wonly-top-basic-asm Segher Boessenkool
2016-01-26 12:11 ` Wonly-top-basic-asm Bernd Schmidt
2016-01-26 16:12 ` Wonly-top-basic-asm Segher Boessenkool
2016-01-26 23:38 ` Wonly-top-basic-asm David Wohlferd
2016-02-16 14:03 ` Wonly-top-basic-asm Jan Hubicka
2016-02-16 20:02 ` Wonly-top-basic-asm Bernd Edlinger
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=VI1PR07MB09115C3D154139D85DFA9430E4A80@VI1PR07MB0911.eurprd07.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=Paul_Koning@Dell.com \
--cc=aph@redhat.com \
--cc=bernds_cb1@t-online.de \
--cc=bschmidt@redhat.com \
--cc=dw@LimeGreenSocks.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=law@redhat.com \
--cc=rth@redhat.com \
--cc=sandra@codesourcery.com \
--cc=segher@kernel.crashing.org \
/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).