i386.c: make "sorry" message more amenable to translation (PR target/79926)
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 8 Mar 2019 22:27:08 +0000 (22:27 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 8 Mar 2019 22:27:08 +0000 (22:27 +0000)
gcc/ChangeLog:
PR target/79926
* config/i386/i386.c (ix86_set_current_function): Make "sorry"
messages more amenable to translation, and improve wording.

gcc/testsuite/ChangeLog:
PR target/79926
* gcc.target/i386/interrupt-387-err-1.c: Update expected message.
* gcc.target/i386/interrupt-387-err-2.c: Likewise.
* gcc.target/i386/interrupt-mmx-err-1.c: Likewise.
* gcc.target/i386/interrupt-mmx-err-2.c: Likewise.

From-SVN: r269515

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
gcc/testsuite/gcc.target/i386/interrupt-387-err-2.c
gcc/testsuite/gcc.target/i386/interrupt-mmx-err-1.c
gcc/testsuite/gcc.target/i386/interrupt-mmx-err-2.c

index 15910aa49c41b0f17e561abad1a94e52f319cd4c..564ad3e1bfd41309f18b6269afca97a8f1066184 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-08  David Malcolm  <dmalcolm@redhat.com>
+
+       PR target/79926
+       * config/i386/i386.c (ix86_set_current_function): Make "sorry"
+       messages more amenable to translation, and improve wording.
+
 2019-03-08  Bill Schmidt  <wschmidt@linux.ibm.com>
 
        * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Rebuild
index 319caeda7b50ba0d1c996f3b9b2ee29df1ea1adb..e50938c2ced8e810b6adc8f467ba1900afc758cd 100644 (file)
@@ -5999,12 +5999,15 @@ ix86_set_current_function (tree fndecl)
       if (isa != NULL)
        {
          if (cfun->machine->func_type != TYPE_NORMAL)
-           sorry ("%s instructions aren't allowed in %s service routine",
-                  isa, (cfun->machine->func_type == TYPE_EXCEPTION
-                        ? "exception" : "interrupt"));
+           sorry (cfun->machine->func_type == TYPE_EXCEPTION
+                  ? G_("%s instructions aren%'t allowed in an"
+                       " exception service routine")
+                  : G_("%s instructions aren%'t allowed in an"
+                       " interrupt service routine"),
+                  isa);
          else
-           sorry ("%s instructions aren't allowed in function with "
-                  "no_caller_saved_registers attribute", isa);
+           sorry ("%s instructions aren%'t allowed in a function with "
+                  "the %<no_caller_saved_registers%> attribute", isa);
          /* Don't issue the same error twice.  */
          cfun->machine->func_type = TYPE_NORMAL;
          cfun->machine->no_caller_saved_registers = false;
index 0b820ac00bd14aaca2ffecfb442ff5d7a6706bf9..1605c21422de9d52b2d7d327e27b84d9e0978fef 100644 (file)
@@ -1,3 +1,11 @@
+2019-03-08  David Malcolm  <dmalcolm@redhat.com>
+
+       PR target/79926
+       * gcc.target/i386/interrupt-387-err-1.c: Update expected message.
+       * gcc.target/i386/interrupt-387-err-2.c: Likewise.
+       * gcc.target/i386/interrupt-mmx-err-1.c: Likewise.
+       * gcc.target/i386/interrupt-mmx-err-2.c: Likewise.
+
 2019-03-08  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/63540
index 3fbdc881dda5bbd71d536de953c8a7b484ef8869..8561a3c26d689e7c5ef171f5cfc828c6225ee378 100644 (file)
@@ -6,11 +6,11 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__)));
 void
 __attribute__((interrupt))
 fn1 (void *frame, uword_t error)
-{ /* { dg-message "80387 instructions aren't allowed in exception service routine" } */
+{ /* { dg-message "80387 instructions aren't allowed in an exception service routine" } */
 }
 
 void
 __attribute__((interrupt))
 fn2 (void *frame)
-{ /* { dg-message "80387 instructions aren't allowed in interrupt service routine" } */
+{ /* { dg-message "80387 instructions aren't allowed in an interrupt service routine" } */
 }
index 3203d644419e16fa8205f23d857968548fa1a202..9810f18220b26fd6ab962275ef29a9f3d6494e8f 100644 (file)
@@ -4,5 +4,5 @@
 void
 __attribute__((no_caller_saved_registers))
 fn1 (void)
-{ /* { dg-message "80387 instructions aren't allowed in function with no_caller_saved_registers attribute" } */
+{ /* { dg-message "80387 instructions aren't allowed in a function with the 'no_caller_saved_registers' attribute" } */
 }
index cd1367b54a4127ccac0849970fa8daa9fb30546d..8c145948782380ac66050e82ef933e80e9c1dd8c 100644 (file)
@@ -6,11 +6,11 @@ typedef unsigned int uword_t __attribute__ ((mode (__word__)));
 void
 __attribute__((interrupt))
 fn1 (void *frame)
-{ /* { dg-message "MMX/3Dnow instructions aren't allowed in interrupt service routine" } */
+{ /* { dg-message "MMX/3Dnow instructions aren't allowed in an interrupt service routine" } */
 }
 
 void
 __attribute__((interrupt))
 fn2 (void *frame, uword_t error)
-{ /* { dg-message "MMX/3Dnow instructions aren't allowed in exception service routine" } */
+{ /* { dg-message "MMX/3Dnow instructions aren't allowed in an exception service routine" } */
 }
index 3e9f70c389ed94cf043337bad83a277751c8297a..073700e4ab616e5f48aa42a942dc714d3ecd8d75 100644 (file)
@@ -4,5 +4,5 @@
 void
 __attribute__((no_caller_saved_registers))
 fn1 (void)
-{ /* { dg-message "MMX/3Dnow instructions aren't allowed in function with no_caller_saved_registers attribute" } */
+{ /* { dg-message "MMX/3Dnow instructions aren't allowed in a function with the 'no_caller_saved_registers' attribute" } */
 }