]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/80003 (i386.c: %s placeholder is no semantic grammar unit)
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Mar 2019 21:32:21 +0000 (22:32 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Mar 2019 21:32:21 +0000 (22:32 +0100)
PR target/80003
* config/i386/i386.c (ix86_set_func_type): Make sure diagnostics
doesn't start with a capital letter and doesn't end with a dot.
(ix86_function_arg_boundary): Make sure diagnostics doesn't start
with a capital letter.
(ix86_mangle_function_version_assembler_name): Likewise.
(ix86_generate_version_dispatcher_body): Likewise.
(fold_builtin_cpu): Likewise.
(get_builtin_code_for_version): Likewise.  Remove extraneous space.
(ix86_handle_interrupt_attribute): Make the diagnostics easier for
translators, wrap full type name in %qs.

* gcc.target/i386/pr68657.c: Adjust expected diagnostics wording.
* gcc.target/i386/interrupt-6.c: Likewise.
* g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output.

From-SVN: r269471

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.target/i386/pr57362.C
gcc/testsuite/gcc.target/i386/interrupt-6.c
gcc/testsuite/gcc.target/i386/pr68657.c

index e2ece539fe471d34569d9ec03aafa47a6d862464..e7a7d58a34b923c83eb8afedd8e1ac91351d5155 100644 (file)
@@ -1,5 +1,17 @@
 2019-03-07  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/80003
+       * config/i386/i386.c (ix86_set_func_type): Make sure diagnostics
+       doesn't start with a capital letter and doesn't end with a dot.
+       (ix86_function_arg_boundary): Make sure diagnostics doesn't start
+       with a capital letter.
+       (ix86_mangle_function_version_assembler_name): Likewise.
+       (ix86_generate_version_dispatcher_body): Likewise.
+       (fold_builtin_cpu): Likewise.
+       (get_builtin_code_for_version): Likewise.  Remove extraneous space.
+       (ix86_handle_interrupt_attribute): Make the diagnostics easier for
+       translators, wrap full type name in %qs.
+
        PR translation/79999
        * gimplify.c (gimplify_omp_ordered): Reword diagnostics to talk about
        depend clause with source (or sink) modifier.
index c8f9957163b2332783ae96133ba085ae101c28a9..2d6a993238b56352badf7f58b985509817a1adb8 100644 (file)
@@ -5800,8 +5800,8 @@ ix86_set_func_type (tree fndecl)
 
          /* Only dwarf2out.c can handle -WORD(AP) as a pointer argument.  */
          if (write_symbols != NO_DEBUG && write_symbols != DWARF2_DEBUG)
-           sorry ("Only DWARF debug format is supported for interrupt "
-                  "service routine.");
+           sorry ("only DWARF debug format is supported for interrupt "
+                  "service routine");
        }
       else
        {
@@ -9069,7 +9069,7 @@ ix86_function_arg_boundary (machine_mode mode, const_tree type)
        {
          warned = true;
          inform (input_location,
-                 "The ABI for passing parameters with %d-byte"
+                 "the ABI for passing parameters with %d-byte"
                  " alignment has changed in GCC 4.6",
                  align / BITS_PER_UNIT);
        }
@@ -32116,7 +32116,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
       if (predicate_list && arg_str == NULL)
        {
          error_at (DECL_SOURCE_LOCATION (decl),
-               "No dispatcher found for the versioning attributes");
+                   "no dispatcher found for the versioning attributes");
          return 0;
        }
     
@@ -32166,7 +32166,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
       if (predicate_list && i == NUM_FEATURES)
        {
          error_at (DECL_SOURCE_LOCATION (decl),
-                   "No dispatcher found for %s", token);
+                   "no dispatcher found for %s", token);
          return 0;
        }
       token = strtok (NULL, ",");
@@ -32176,7 +32176,7 @@ get_builtin_code_for_version (tree decl, tree *predicate_list)
   if (predicate_list && predicate_chain == NULL_TREE)
     {
       error_at (DECL_SOURCE_LOCATION (decl),
-               "No dispatcher found for the versioning attributes : %s",
+               "no dispatcher found for the versioning attributes: %s",
                attrs_str);
       return 0;
     }
@@ -32338,12 +32338,12 @@ ix86_mangle_function_version_assembler_name (tree decl, tree id)
       && lookup_attribute ("gnu_inline",
                           DECL_ATTRIBUTES (decl)))
     error_at (DECL_SOURCE_LOCATION (decl),
-             "Function versions cannot be marked as gnu_inline,"
+             "function versions cannot be marked as gnu_inline,"
              " bodies have to be generated");
 
   if (DECL_VIRTUAL_P (decl)
       || DECL_VINDEX (decl))
-    sorry ("Virtual function multiversioning not supported");
+    sorry ("virtual function multiversioning not supported");
 
   version_attr = lookup_attribute ("target", DECL_ATTRIBUTES (decl));
 
@@ -32619,7 +32619,7 @@ ix86_generate_version_dispatcher_body (void *node_p)
         virtual methods in base classes but are not explicitly marked as
         virtual.  */
       if (DECL_VINDEX (versn->decl))
-       sorry ("Virtual function multiversioning not supported");
+       sorry ("virtual function multiversioning not supported");
 
       fn_ver_vec.safe_push (versn->decl);
     }
@@ -32898,7 +32898,7 @@ fold_builtin_cpu (tree fndecl, tree *args)
         STRING_CST.   */
       if (!EXPR_P (param_string_cst))
        {
-         error ("Parameter to builtin must be a string constant or literal");
+         error ("parameter to builtin must be a string constant or literal");
          return integer_zero_node;
        }
       param_string_cst = TREE_OPERAND (EXPR_CHECK (param_string_cst), 0);
@@ -32923,7 +32923,7 @@ fold_builtin_cpu (tree fndecl, tree *args)
 
       if (i == NUM_ARCH_NAMES)
        {
-         error ("Parameter to builtin not valid: %s",
+         error ("parameter to builtin not valid: %s",
                 TREE_STRING_POINTER (param_string_cst));
          return integer_zero_node;
        }
@@ -32973,7 +32973,7 @@ fold_builtin_cpu (tree fndecl, tree *args)
 
       if (i == NUM_ISA_NAMES)
        {
-         error ("Parameter to builtin not valid: %s",
+         error ("parameter to builtin not valid: %s",
                 TREE_STRING_POINTER (param_string_cst));
          return integer_zero_node;
        }
@@ -41417,11 +41417,12 @@ ix86_handle_interrupt_attribute (tree *node, tree, tree, int, bool *)
        {
          if (TREE_CODE (TREE_VALUE (current_arg_type)) != INTEGER_TYPE
              || TYPE_MODE (TREE_VALUE (current_arg_type)) != word_mode)
-           error ("interrupt service routine should have unsigned %s"
-                  "int as the second argument",
+           error ("interrupt service routine should have %qs "
+                  "as the second argument",
                   TARGET_64BIT
-                  ? (TARGET_X32 ? "long long " : "long ")
-                  : "");
+                  ? (TARGET_X32 ? "unsigned long long int"
+                                : "unsigned long int")
+                  : "unsigned int");
        }
       nargs++;
       current_arg_type = TREE_CHAIN (current_arg_type);
index 0a90257aa56f1ee7e8ba80b6b86a73acf6a66108..46920d65169431c05e524d3d4e32f8bb0c4d5dc4 100644 (file)
@@ -1,3 +1,10 @@
+2019-03-07  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/80003
+       * gcc.target/i386/pr68657.c: Adjust expected diagnostics wording.
+       * gcc.target/i386/interrupt-6.c: Likewise.
+       * g++.target/i386/pr57362.C: Adjust capitalization in dg-prune-output.
+
 2019-03-07  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/84518
index 8c07e857525578db1851fa72882053c533146cbe..5e612130357aa2c874f7b68f7c75db88bda3b662 100644 (file)
@@ -199,4 +199,4 @@ int foo(void) { return 1; }
 /* { dg-prune-output "attribute.* is unknown" } */
 /* { dg-prune-output "missing 'target' attribute*" } */
 /* { dg-prune-output "redefinition of 'int foo" } */
-/* { dg-prune-output "No dispatcher found for" } */
+/* { dg-prune-output "no dispatcher found for" } */
index 2a0266ad576471a3db59cea069b1566183b5d7fe..bcbcc97c641366f84fa2a3fadf0ed0b5d0ecd5cd 100644 (file)
@@ -8,7 +8,7 @@ extern int error;
 __attribute__((interrupt))
 void
 fn1 (void *p, short error_code)
-{ /* { dg-error "interrupt service routine should have unsigned \(long long |long |\)int as the second argument" } */
+{ /* { dg-error "interrupt service routine should have 'unsigned \(long long |long |\)int' as the second argument" } */
 }
 
 __attribute__((interrupt))
index fcfb489a061963deb658fe1f0b542833f5a198c0..3480242760f0fe0d56f9b83758b555322fa44fb3 100644 (file)
@@ -4,7 +4,7 @@
 typedef int V __attribute__((vector_size (64)));
 
 void foo (V x, V *y) { /* { dg-error "AVX512F vector argument without AVX512F enabled" } */
-  /* { dg-message "The ABI for passing parameters with 64-byte alignment has changed" "" { target *-*-* } .-1 } */
+  /* { dg-message "the ABI for passing parameters with 64-byte alignment has changed" "" { target *-*-* } .-1 } */
   *y = x;
 }