This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][AArch64] Fix usage of +no in error message for aarch64_parse_extension
- From: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Marcus Shawcroft <marcus dot shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 10 Dec 2014 15:30:36 +0000
- Subject: [PATCH][AArch64] Fix usage of +no in error message for aarch64_parse_extension
- Authentication-results: sourceware.org; auth=none
Hi all,
The error message when parsing feature modifiers can be improved.
Currently, if the user gives something like -march=armv8-a+ the error
message will read:
error: missing feature modifier after '+no' even though '+no' was not given.
With this patch we will now say:
error: missing feature modifier after '+'
Tested aarch64-none-elf.
Ok for trunk?
Thanks,
Kyrill
2014-12-10 Kyrylo Tkachov kyrylo.tkachov@arm.com
* config/aarch64/aarch64.c (aarch64_parse_extension): Update error
message to say +no only when removing extension.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index e682edd..cbf0842 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6506,7 +6506,8 @@ aarch64_parse_extension (char *str)
if (len == 0)
{
- error ("missing feature modifier after %qs", "+no");
+ error ("missing feature modifier after %qs", adding_ext ? "+"
+ : "+no");
return;
}