diff mbox

[AArch64] Fix usage of +no in error message for aarch64_parse_extension

Message ID 5488671C.7090805@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Dec. 10, 2014, 3:30 p.m. UTC
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.

Comments

Marcus Shawcroft Dec. 11, 2014, 3:05 p.m. UTC | #1
On 10 December 2014 at 15:30, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:

> 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.

OK /Marcus
diff mbox

Patch

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;
 	}