public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, GCC][AArch64] Fix diagnostics issues
@ 2012-06-13 13:34 Sofiane Naci
  2012-07-19 12:39 ` [AArch64] Improve diagnostics Sofiane Naci
  0 siblings, 1 reply; 2+ messages in thread
From: Sofiane Naci @ 2012-06-13 13:34 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 616 bytes --]

Hi,

This patch fixes some diagnostics wording and formatting issues in the
AArch64 port.
A patch that adds missing test cases for some of these diagnostics will be
sent separately.

Thanks
Sofiane

-----

2012-06-11  Sofiane Naci <sofiane.naci@arm.com>

	[AArch64] Fix diagnosis issues.

	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
	error_at and fix quoting in error message.
	* config/aarch64/aarch64.c
	(aarch64_parse_extension): Update error messages and fix quoting.
	(aarch64_parse_arch): Likewise.
	(aarch64_parse_cpu): Likewise.
	(aarch64_parse_tune): Likewise.

[-- Attachment #2: aarch64-improve-diagnostics.patch --]
[-- Type: application/octet-stream, Size: 2356 bytes --]

diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index 297ca18..276ea93 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -1122,8 +1122,9 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval,
 	    case SIMD_ARG_CONSTANT:
 	      if (!(*insn_data[icode].operand[argc + have_retval].predicate)
 		  (op[argc], mode[argc]))
-		error ("incompatible type for argument %d, "
-		       "expected 'const int'", argc + 1);
+		error_at (DECL_SOURCE_LOCATION (exp),
+		       "incompatible type for argument %d, "
+		       "expected %<const int%>", argc + 1);
 	      break;
 
 	    case SIMD_ARG_STOP:
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 34d0475..00ea574 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4436,7 +4436,7 @@ aarch64_parse_extension (char *str)
 
       if (len == 0)
 	{
-	  error ("missing architectural extension");
+	  error ("missing feature modifier after %qs", "+no");
 	  return;
 	}
 
@@ -4457,7 +4457,7 @@ aarch64_parse_extension (char *str)
       if (opt->name == NULL)
 	{
 	  /* Extension not found in list.  */
-	  error ("unknown architectural extension `%s'", str);
+	  error ("unknown feature modifier %qs", str);
 	  return;
 	}
 
@@ -4488,7 +4488,7 @@ aarch64_parse_arch (void)
 
   if (len == 0)
     {
-      error ("missing arch name `%s'\n", str);
+      error ("missing arch name in -march=%qs", str);
       return;
     }
 
@@ -4512,7 +4512,7 @@ aarch64_parse_arch (void)
     }
 
   /* ARCH name not found in list.  */
-  error ("unknown value (%s) for -march", str);
+  error ("unknown value %qs for -march", str);
   return;
 }
 
@@ -4537,7 +4537,7 @@ aarch64_parse_cpu (void)
 
   if (len == 0)
     {
-      error ("missing cpu name in `%s'", str);
+      error ("missing cpu name in -mcpu=%qs", str);
       return;
     }
 
@@ -4560,7 +4560,7 @@ aarch64_parse_cpu (void)
     }
 
   /* CPU name not found in list.  */
-  error ("unknown value (%s) for -mcpu", str);
+  error ("unknown value %qs for -mcpu", str);
   return;
 }
 
@@ -4584,7 +4584,7 @@ aarch64_parse_tune (void)
     }
 
   /* CPU name not found in list.  */
-  error ("unknown value (%s) for -mtune", str);
+  error ("unknown value %qs for -mtune", str);
   return;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [AArch64] Improve diagnostics
  2012-06-13 13:34 [PATCH, GCC][AArch64] Fix diagnostics issues Sofiane Naci
@ 2012-07-19 12:39 ` Sofiane Naci
  0 siblings, 0 replies; 2+ messages in thread
From: Sofiane Naci @ 2012-07-19 12:39 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]

Hi,

I've just committed this patch on the AArch64 branch to improve diagnostics
and error messages.

Thanks
Sofiane

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches-owner@gcc.gnu.org]
On
> Behalf Of Sofiane Naci
> Sent: 13 June 2012 14:30
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH, GCC][AArch64] Fix diagnostics issues
> 
> Hi,
> 
> This patch fixes some diagnostics wording and formatting issues in the
> AArch64 port.
> A patch that adds missing test cases for some of these diagnostics will be
> sent separately.
> 
> Thanks
> Sofiane
> 
> -----
> 
> 2012-06-11  Sofiane Naci <sofiane.naci@arm.com>
> 
> 	[AArch64] Fix diagnosis issues.
> 
> 	* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
> 	error_at and fix quoting in error message.
> 	* config/aarch64/aarch64.c
> 	(aarch64_parse_extension): Update error messages and fix quoting.
> 	(aarch64_parse_arch): Likewise.
> 	(aarch64_parse_cpu): Likewise.
> 	(aarch64_parse_tune): Likewise.

[-- Attachment #2: aarch64-improve-diagnostics.patch --]
[-- Type: application/octet-stream, Size: 2356 bytes --]

diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index 297ca18..276ea93 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -1122,8 +1122,9 @@ aarch64_simd_expand_args (rtx target, int icode, int have_retval,
 	    case SIMD_ARG_CONSTANT:
 	      if (!(*insn_data[icode].operand[argc + have_retval].predicate)
 		  (op[argc], mode[argc]))
-		error ("incompatible type for argument %d, "
-		       "expected 'const int'", argc + 1);
+		error_at (DECL_SOURCE_LOCATION (exp),
+		       "incompatible type for argument %d, "
+		       "expected %<const int%>", argc + 1);
 	      break;
 
 	    case SIMD_ARG_STOP:
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 34d0475..00ea574 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4436,7 +4436,7 @@ aarch64_parse_extension (char *str)
 
       if (len == 0)
 	{
-	  error ("missing architectural extension");
+	  error ("missing feature modifier after %qs", "+no");
 	  return;
 	}
 
@@ -4457,7 +4457,7 @@ aarch64_parse_extension (char *str)
       if (opt->name == NULL)
 	{
 	  /* Extension not found in list.  */
-	  error ("unknown architectural extension `%s'", str);
+	  error ("unknown feature modifier %qs", str);
 	  return;
 	}
 
@@ -4488,7 +4488,7 @@ aarch64_parse_arch (void)
 
   if (len == 0)
     {
-      error ("missing arch name `%s'\n", str);
+      error ("missing arch name in -march=%qs", str);
       return;
     }
 
@@ -4512,7 +4512,7 @@ aarch64_parse_arch (void)
     }
 
   /* ARCH name not found in list.  */
-  error ("unknown value (%s) for -march", str);
+  error ("unknown value %qs for -march", str);
   return;
 }
 
@@ -4537,7 +4537,7 @@ aarch64_parse_cpu (void)
 
   if (len == 0)
     {
-      error ("missing cpu name in `%s'", str);
+      error ("missing cpu name in -mcpu=%qs", str);
       return;
     }
 
@@ -4560,7 +4560,7 @@ aarch64_parse_cpu (void)
     }
 
   /* CPU name not found in list.  */
-  error ("unknown value (%s) for -mcpu", str);
+  error ("unknown value %qs for -mcpu", str);
   return;
 }
 
@@ -4584,7 +4584,7 @@ aarch64_parse_tune (void)
     }
 
   /* CPU name not found in list.  */
-  error ("unknown value (%s) for -mtune", str);
+  error ("unknown value %qs for -mtune", str);
   return;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-19 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 13:34 [PATCH, GCC][AArch64] Fix diagnostics issues Sofiane Naci
2012-07-19 12:39 ` [AArch64] Improve diagnostics Sofiane Naci

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