From: Segher Boessenkool <segher@kernel.crashing.org>
To: gcc-patches@gcc.gnu.org
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH 8/8] c: Don't error for const or restrict as asm-qualifier
Date: Thu, 27 Dec 2018 16:32:00 -0000 [thread overview]
Message-ID: <f0e4c2f3f89d0587a2ae547432d9a94bca9d06ff.1545922222.git.segher@kernel.crashing.org> (raw)
In-Reply-To: <cover.1545922222.git.segher@kernel.crashing.org>
In-Reply-To: <cover.1545922222.git.segher@kernel.crashing.org>
2018-12-27 Segher Boessenkool <segher@kernel.crashing.org>
c/
* c-parser.c (c_parser_asm_statement): Output a warning instead of an
error for const and restrict.
testsuite/
* gcc.dg/asm-qual-1.c: Adjust.
---
gcc/c/c-parser.c | 2 +-
gcc/testsuite/gcc.dg/asm-qual-1.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 4baad62..a960169 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -6345,7 +6345,7 @@ c_parser_asm_statement (c_parser *parser)
case RID_CONST:
case RID_RESTRICT:
- error_at (loc, "%qE is not an asm qualifier", token->value);
+ warning_at (loc, 0, "%qE is not an asm qualifier", token->value);
c_parser_consume_token (parser);
continue;
diff --git a/gcc/testsuite/gcc.dg/asm-qual-1.c b/gcc/testsuite/gcc.dg/asm-qual-1.c
index eff6b45..4982a6b 100644
--- a/gcc/testsuite/gcc.dg/asm-qual-1.c
+++ b/gcc/testsuite/gcc.dg/asm-qual-1.c
@@ -8,7 +8,7 @@ f (void)
{
asm volatile ("");
- asm const (""); /* { dg-error {'const' is not an asm qualifier} } */
+ asm const (""); /* { dg-warning {'const' is not an asm qualifier} } */
- asm restrict (""); /* { dg-error {'restrict' is not an asm qualifier} } */
+ asm restrict (""); /* { dg-warning {'restrict' is not an asm qualifier} } */
}
--
1.8.3.1
next prev parent reply other threads:[~2018-12-27 14:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-27 14:59 [PATCH 0/8] asm inline backport Segher Boessenkool
2018-12-27 14:59 ` [PATCH 3/8] c: Delete a stray line in asm inline Segher Boessenkool
2018-12-27 14:59 ` [PATCH 4/8] c/c++, asm: Write the asm-qualifier loop without "done" boolean Segher Boessenkool
2018-12-27 14:59 ` [PATCH 2/8] asm inline Segher Boessenkool
2018-12-27 14:59 ` [PATCH 1/8] asm qualifiers (PR55681) Segher Boessenkool
2018-12-27 14:59 ` [PATCH 7/8] c++, asm: Do not handle any asm-qualifiers in top-level asm Segher Boessenkool
2018-12-27 16:26 ` [PATCH 6/8] c/c++, asm: Use nicer error for const and restrict Segher Boessenkool
2018-12-27 16:30 ` [PATCH 5/8] c/c++, asm: Use nicer error for duplicate asm qualifiers Segher Boessenkool
2018-12-27 16:32 ` Segher Boessenkool [this message]
2019-01-02 9:10 ` [PATCH 0/8] asm inline backport Richard Biener
2019-01-02 9:10 ` Richard Biener
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=f0e4c2f3f89d0587a2ae547432d9a94bca9d06ff.1545922222.git.segher@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-patches@gcc.gnu.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).