]> gcc.gnu.org Git - gcc.git/commitdiff
* c-common.c (status_warning) [! ANSI_PROTOTYPES]: Load status
authorAlexandre Oliva <aoliva@redhat.com>
Thu, 30 Nov 2000 23:00:57 +0000 (23:00 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Thu, 30 Nov 2000 23:00:57 +0000 (23:00 +0000)
from va_list before using it.

From-SVN: r37900

gcc/ChangeLog
gcc/c-common.c

index dbb46a562185cbabef4686579686f59cd538166a..761488d812fa1101508a470b7a72de3cb5d603c3 100644 (file)
@@ -1,3 +1,8 @@
+2000-11-30  Alexandre Oliva  <aoliva@redhat.com>
+
+       * c-common.c (status_warning) [! ANSI_PROTOTYPES]: Load status
+       from va_list before using it.
+
 2000-11-30  Michael Matz  <matzmich@cs.tu-berlin.de>
 
        * flow.c (make_edge): Early out, if no flags to set.
index d59386d96c59cb87dd44bec93153856247e820db..cb6b78fe89ec5f1b043d52a1027ef930c5bf0937 100644 (file)
@@ -2021,24 +2021,24 @@ status_warning VPARAMS ((int *status, const char *msgid, ...))
   va_list ap;
   diagnostic_context dc;
 
-  if (status)
-    *status = 1;
-  else
-    {
-      VA_START (ap, msgid);
+  VA_START (ap, msgid);
 
 #ifndef ANSI_PROTOTYPES
-      status = va_arg (ap, int *);
-      msgid = va_arg (ap, const char *);
+  status = va_arg (ap, int *);
+  msgid = va_arg (ap, const char *);
 #endif
 
+  if (status)
+    *status = 1;
+  else
+    {
       /* This duplicates the warning function behavior.  */
       set_diagnostic_context
        (&dc, msgid, &ap, input_filename, lineno, /* warn = */ 1);
       report_diagnostic (&dc);
-
-      va_end (ap);
     }
+
+  va_end (ap);
 }
 
 /* Variables used by the checking of $ operand number formats.  */
This page took 0.075968 seconds and 5 git commands to generate.