This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]