c-typeck.c (error_init, [...]): Call gettext on argument before printing.
authorZack Weinberg <zack@gcc.gnu.org>
Mon, 17 Dec 2001 04:19:08 +0000 (04:19 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 17 Dec 2001 04:19:08 +0000 (04:19 +0000)
* c-typeck.c (error_init, pedwarn_init, warning_init): Call
gettext on argument before printing.

* fold-const.c (negate_expr): Always call fold on new
NEGATE_EXPR.

From-SVN: r48087

gcc/c-typeck.c
gcc/fold-const.c

index 1c34502e61a14ad453f6d51b094abf114f922450..50d7f9bf5d2fb20360d7503b82983405b24cccfd 100644 (file)
@@ -4646,7 +4646,7 @@ error_init (msgid)
 {
   char *ofwhat;
 
-  error ("%s", msgid);
+  error ("%s", _(msgid));
   ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     error ("(near initialization for `%s')", ofwhat);
@@ -4662,7 +4662,7 @@ pedwarn_init (msgid)
 {
   char *ofwhat;
 
-  pedwarn ("%s", msgid);
+  pedwarn ("%s", _(msgid));
   ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     pedwarn ("(near initialization for `%s')", ofwhat);
@@ -4678,7 +4678,7 @@ warning_init (msgid)
 {
   char *ofwhat;
 
-  warning ("%s", msgid);
+  warning ("%s", _(msgid));
   ofwhat = print_spelling ((char *) alloca (spelling_length () + 1));
   if (*ofwhat)
     warning ("(near initialization for `%s')", ofwhat);
index 79387fbc6bc92ac19baae4c7a46b61c99aff368c..ce93a03593a39be26453a666ffc960617b53452a 100644 (file)
@@ -1382,7 +1382,7 @@ negate_expr (t)
       break;
     }
 
-  return convert (type, build1 (NEGATE_EXPR, TREE_TYPE (t), t));
+  return convert (type, fold (build1 (NEGATE_EXPR, TREE_TYPE (t), t)));
 }
 \f
 /* Split a tree IN into a constant, literal and variable parts that could be