OSDN Git Service

* c-decl.c (finish_decl): When setting the DECL_ASSEMBLER_NAME
[pf3gnuchains/gcc-fork.git] / gcc / c-format.c
index 0c7545a..fd9b200 100644 (file)
@@ -1,6 +1,6 @@
 /* Check calls to formatted I/O functions (-Wformat).
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002 Free Software Foundation, Inc.
+   2001, 2002, 2003 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -21,6 +21,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "config.h"
 #include "system.h"
+#include "coretypes.h"
+#include "tm.h"
 #include "tree.h"
 #include "flags.h"
 #include "toplev.h"
@@ -439,7 +441,7 @@ typedef struct
   /* The flag character in question (0 for end of array).  */
   const int flag_char;
   /* Zero if this entry describes the flag character in general, or a
-     non-zero character that may be found in flags2 if it describes the
+     nonzero character that may be found in flags2 if it describes the
      flag when used with certain formats only.  If the latter, only
      the first such entry found that applies to the current conversion
      specifier is used; the values of `name' and `long_name' it supplies
@@ -469,11 +471,11 @@ typedef struct
   const int flag_char1;
   /* The second flag character.  */
   const int flag_char2;
-  /* Non-zero if the message should say that the first flag is ignored with
+  /* Nonzero if the message should say that the first flag is ignored with
      the second, zero if the combination should simply be objected to.  */
   const int ignored;
   /* Zero if this entry applies whenever this flag combination occurs,
-     a non-zero character from flags2 if it only applies in some
+     a nonzero character from flags2 if it only applies in some
      circumstances (e.g. 'i' for printf formats ignoring 0 with precision).  */
   const int predicate;
 } format_flag_pair;
@@ -729,7 +731,7 @@ static const format_flag_pair strfmon_flag_pairs[] =
 #define T_WI   &wint_type_node
 #define T94_WI { STD_C94, "wint_t", T_WI }
 #define TEX_WI { STD_EXT, "wint_t", T_WI }
-#define T_ST    &c_size_type_node
+#define T_ST    &size_type_node
 #define T99_ST { STD_C99, "size_t", T_ST }
 #define T_SST   &signed_size_type_node
 #define T99_SST        { STD_C99, "signed size_t", T_SST }
@@ -994,25 +996,24 @@ check_function_format (status, attrs, params)
    it warns as usual by replicating the innards of the warning
    function from diagnostic.c.  */
 static void
-status_warning VPARAMS ((int *status, const char *msgid, ...))
+status_warning (int *status, const char *msgid, ...)
 {
   diagnostic_info diagnostic ;
-
-  VA_OPEN (ap, msgid);
-  VA_FIXEDARG (ap, int *, status);
-  VA_FIXEDARG (ap, const char *, msgid);
+  va_list ap;
+  
+  va_start (ap, msgid);
 
   if (status)
     *status = 1;
   else
     {
       /* This duplicates the warning function behavior.  */
-      diagnostic_set_info (&diagnostic, _(msgid), &ap, input_filename, lineno,
-                           DK_WARNING);
+      diagnostic_set_info (&diagnostic, _(msgid), &ap,
+                          input_filename, input_line, DK_WARNING);
       report_diagnostic (&diagnostic);
     }
 
-  VA_CLOSE (ap);
+  va_end (ap);
 }
 
 /* Variables used by the checking of $ operand number formats.  */