summaryrefslogtreecommitdiffstats
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-27 01:43:17 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-01-27 01:43:17 +0000
commitbe2828ce3a45f1a520b7d3e932b1fead7462ec7e (patch)
treee7daf0f28ecb5da9660b21aee68e6919f846c183 /gcc/c-common.c
parent6bc988cda5e493c3e632a2d82be7ea8763a618e2 (diff)
downloadppe42-gcc-be2828ce3a45f1a520b7d3e932b1fead7462ec7e.tar.gz
ppe42-gcc-be2828ce3a45f1a520b7d3e932b1fead7462ec7e.zip
Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24879 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 46e427f24a9..ca7bb006c6c 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -81,6 +81,7 @@ typedef struct
char *file;
int needs_warning;
} if_elt;
+static void tfaff PROTO((void));
static if_elt *if_stack;
@@ -1327,7 +1328,11 @@ record_international_format (name, assembler_name, format_num)
info->format_num = format_num;
}
-static char tfaff[] = "too few arguments for format";
+static void
+tfaff ()
+{
+ warning ("too few arguments for format");
+}
/* Check the argument list of a call to printf, scanf, etc.
NAME is the function identifier.
@@ -1594,7 +1599,7 @@ check_format_info (info, params)
++format_chars;
if (params == 0)
{
- warning (tfaff);
+ tfaff ();
return;
}
if (info->first_arg_num != 0)
@@ -1637,7 +1642,7 @@ check_format_info (info, params)
++format_chars;
if (params == 0)
{
- warning (tfaff);
+ tfaff ();
return;
}
cur_param = TREE_VALUE (params);
@@ -1832,7 +1837,7 @@ check_format_info (info, params)
continue;
if (params == 0)
{
- warning (tfaff);
+ tfaff ();
return;
}
cur_param = TREE_VALUE (params);
@@ -1858,9 +1863,9 @@ check_format_info (info, params)
continue;
}
if (TREE_CODE (cur_type) != ERROR_MARK)
- warning ("format argument is not a %s (arg %d)",
- ((fci->pointer_count + aflag == 1)
- ? "pointer" : "pointer to a pointer"),
+ warning ((fci->pointer_count + aflag == 1
+ ? "format argument is not a pointer (arg %d)"
+ : "format argument is not a pointer to a pointer (arg %d)"),
arg_num);
break;
}
OpenPOWER on IntegriCloud