aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-01-27 01:43:17 +0000
committerJeff Law <law@gcc.gnu.org>1999-01-26 18:43:17 -0700
commitab87f8c8d19d6b0954516d7f1d8733f42076be81 (patch)
treee7daf0f28ecb5da9660b21aee68e6919f846c183 /gcc/c-common.c
parent01b4cf2b7a1fe9a3f6f070217be5f93854c54545 (diff)
downloadgcc-ab87f8c8d19d6b0954516d7f1d8733f42076be81.zip
gcc-ab87f8c8d19d6b0954516d7f1d8733f42076be81.tar.gz
gcc-ab87f8c8d19d6b0954516d7f1d8733f42076be81.tar.bz2
Merge in gcc2 snapshot 19980929. See gcc/ChangeLog and gcc/FSFChangeLog for
details. From-SVN: r24879
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 46e427f..ca7bb00 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;
}