]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/29089 (Words substituted for %s in a sentence can not be translated)
authorDirk Mueller <dmueller@suse.de>
Sun, 29 Oct 2006 19:52:52 +0000 (19:52 +0000)
committerDirk Mueller <mueller@gcc.gnu.org>
Sun, 29 Oct 2006 19:52:52 +0000 (19:52 +0000)
       PR c++/29089
       * typeck.c (build_unary_op): Duplicate warning message
       for easier translation.

From-SVN: r118156

gcc/cp/ChangeLog
gcc/cp/typeck.c

index 1d46779ddfd2bb55d5e53ae389ec1f16bf38686f..fe1cf684fe07d80154d992b35c62a107e556c740 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-29  Dirk Mueller  <dmueller@suse.de>
+
+       PR c++/29089
+       * typeck.c (build_unary_op): Duplicate warning message
+       for easier translation.
+
 2006-10-29  Dirk Mueller  <dmueller@suse.de>
 
        PR c++/16307
index 46eee41b6dfc8495e467e720695f8c67682a946f..2730156c2422ff6ffe456a087fe281db63830530 100644 (file)
@@ -4121,9 +4121,9 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
 
        /* ARM $5.2.5 last annotation says this should be forbidden.  */
        if (TREE_CODE (argtype) == ENUMERAL_TYPE)
-         pedwarn ("ISO C++ forbids %sing an enum",
-                  (code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR)
-                  ? "increment" : "decrement");
+         pedwarn ((code == PREINCREMENT_EXPR || code == POSTINCREMENT_EXPR) ?
+                   "ISO C++ forbids incrementing an enum" :
+                   "ISO C++ forbids decrementing an enum");
 
        /* Compute the increment.  */
 
@@ -4132,16 +4132,20 @@ build_unary_op (enum tree_code code, tree xarg, int noconvert)
            tree type = complete_type (TREE_TYPE (argtype));
 
            if (!COMPLETE_OR_VOID_TYPE_P (type))
-             error ("cannot %s a pointer to incomplete type %qT",
-                    ((code == PREINCREMENT_EXPR
-                      || code == POSTINCREMENT_EXPR)
-                     ? "increment" : "decrement"), TREE_TYPE (argtype));
+             error (((code == PREINCREMENT_EXPR
+                      || code == POSTINCREMENT_EXPR))
+                     ?
+                      "cannot increment a pointer to incomplete type %qT" :
+                      "cannot decrement a pointer to incomplete type %qT",
+                      TREE_TYPE (argtype));
            else if ((pedantic || warn_pointer_arith)
                     && !TYPE_PTROB_P (argtype))
-             pedwarn ("ISO C++ forbids %sing a pointer of type %qT",
-                      ((code == PREINCREMENT_EXPR
+             pedwarn (((code == PREINCREMENT_EXPR
                         || code == POSTINCREMENT_EXPR)
-                       ? "increment" : "decrement"), argtype);
+                       ? 
+                        "ISO C++ forbids incrementing a pointer of type %qT" :
+                        "ISO C++ forbids decrementing a pointer of type %qT"),
+                        argtype);
            inc = cxx_sizeof_nowarn (TREE_TYPE (argtype));
          }
        else