decl2.c (check_classfn): Fix uninitialized warning.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 15 Jan 2003 01:21:46 +0000 (01:21 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 15 Jan 2003 01:21:46 +0000 (01:21 +0000)
cp:
* decl2.c (check_classfn): Fix uninitialized warning.
(build_anon_union_vars): Likewise.
* pt.c (tsubst_copy): Likewise.

gcc:
* genattr.c (main): Rearrange output to avoid prototype warning.
* genautomata.c (transform_3): Fix ambiguous-else warning.
* local-alloc.c (requires_inout): Add parentheses around
assignment used as truth-value.
* timevar.c: Move system includes above local includes.  Include
toplev.h
* Makefile.in (timevar.o): Depend on toplev.h.

From-SVN: r61308

gcc/ChangeLog
gcc/Makefile.in
gcc/cp/ChangeLog
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/genattr.c
gcc/genautomata.c
gcc/local-alloc.c
gcc/timevar.c

index e339622de9f6c7f860db68274422ece0435bbd97..1f04fa4b19625aff86c1e9255ef902a1b751fe1b 100644 (file)
@@ -1,3 +1,13 @@
+2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * genattr.c (main): Rearrange output to avoid prototype warning.
+       * genautomata.c (transform_3): Fix ambiguous-else warning.
+       * local-alloc.c (requires_inout): Add parentheses around
+       assignment used as truth-value.
+       * timevar.c: Move system includes above local includes.  Include
+       toplev.h
+       * Makefile.in (timevar.o): Depend on toplev.h.
+
 2003-01-14  Denis Chertykov  <denisc@overta.ru>
 
        * config/ip2k/ip2k.h (VALID_MACHINE_DECL_ATTRIBUTE): Remove.
index 98ee7c18d51742b5e039b1a8b3e4ad5adbb2f03b..dbd6a688ca2bf81e4aab412b932e282098bf1656 100644 (file)
@@ -1660,7 +1660,7 @@ cfglayout.o : cfglayout.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $
    insn-config.h $(BASIC_BLOCK_H) hard-reg-set.h output.h function.h \
    cfglayout.h
 timevar.o : timevar.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TIMEVAR_H) flags.h \
-   intl.h
+   intl.h toplev.h
 regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
    insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h $(RECOG_H) function.h \
    resource.h $(OBSTACK_H) flags.h $(TM_P_H)
index b49c6da080fabb5703c753b9dab5acffbc01380e..2f9d10bc94ed756795534c75b16a7f0806486208 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * decl2.c (check_classfn): Fix uninitialized warning.
+       (build_anon_union_vars): Likewise.
+       * pt.c (tsubst_copy): Likewise.
+
 2003-01-14  Jeffrey D. Oldham  <oldham@codesourcery.com>
 
        Further conform g++'s __vmi_class_type_info to the C++ ABI
index 47b841cbd3bdf90d463d87e37bd5e50aef159256..6179df62656848931ba586cf98dc9ad32dfe68fb 100644 (file)
@@ -681,7 +681,7 @@ check_classfn (tree ctype, tree function)
   if (ix >= 0)
     {
       tree methods = CLASSTYPE_METHOD_VEC (ctype);
-      tree fndecls, fndecl;
+      tree fndecls, fndecl = 0;
       bool is_conv_op;
       const char *format = NULL;
       
@@ -1294,6 +1294,8 @@ build_anon_union_vars (tree object)
        }
       else if (ANON_AGGR_TYPE_P (TREE_TYPE (field)))
        decl = build_anon_union_vars (ref);
+      else
+       decl = 0;
 
       if (main_decl == NULL_TREE)
        main_decl = decl;
index e7486afca258743372a7bb919dbaa816c8c15764..133318d169cac74e15caf549a852fd345f13cd4a 100644 (file)
@@ -7242,7 +7242,7 @@ tsubst_copy (t, args, complain, in_decl)
        tree name;
        tree qualifying_scope;
        tree fns;
-       tree template_args;
+       tree template_args = 0;
        bool template_id_p = false;
 
        /* A baselink indicates a function from a base class.  The
index 1e910edb3538a5aff54a6427dbe55338f72203af..72d13f59826c62381620831efa8e45c364761f46 100644 (file)
@@ -441,12 +441,12 @@ main (argc, argv)
       printf ("   unit with given code is currently reserved in given\n");
       printf ("   DFA state.  */\n");
       printf ("extern int cpu_unit_reservation_p PARAMS ((state_t, int));\n");
+      printf ("#endif\n\n");
       printf ("/* Clean insn code cache.  It should be called if there\n");
       printf ("   is a chance that condition value in a\n");
       printf ("   define_insn_reservation will be changed after\n");
       printf ("   last call of dfa_start.  */\n");
       printf ("extern void dfa_clean_insn_cache PARAMS ((void));\n\n");
-      printf ("#endif\n\n");
       printf ("/* Initiate and finish work with DFA.  They should be\n");
       printf ("   called as the first and the last interface\n");
       printf ("   functions.  */\n");
index 308c189dfbe5c8b219319e85afc931dc3c7f428e..8ee2c22aae0c259e5a0e7e2678a267a0dd04601e 100644 (file)
@@ -5275,18 +5275,20 @@ transform_3 (regexp)
       max_seq_length = 0;
       if (regexp->mode == rm_allof)
        for (i = 0; i < REGEXP_ALLOF (regexp)->regexps_num; i++)
-         if (REGEXP_ALLOF (regexp)->regexps [i]->mode == rm_sequence)
-           {
-             seq = REGEXP_ALLOF (regexp)->regexps [i];
-             if (max_seq_length < REGEXP_SEQUENCE (seq)->regexps_num)
-               max_seq_length = REGEXP_SEQUENCE (seq)->regexps_num;
-           }
-         else if (REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_unit
-                  && REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_nothing)
-           {
-             max_seq_length = 0;
-             break;
-           }
+         {
+           if (REGEXP_ALLOF (regexp)->regexps [i]->mode == rm_sequence)
+             {
+               seq = REGEXP_ALLOF (regexp)->regexps [i];
+               if (max_seq_length < REGEXP_SEQUENCE (seq)->regexps_num)
+                 max_seq_length = REGEXP_SEQUENCE (seq)->regexps_num;
+             }
+           else if (REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_unit
+                    && REGEXP_ALLOF (regexp)->regexps [i]->mode != rm_nothing)
+             {
+               max_seq_length = 0;
+               break;
+             }
+         }
       if (max_seq_length != 0)
        {
          if (max_seq_length == 1 || REGEXP_ALLOF (regexp)->regexps_num <= 1)
index ee40f5774d0e823b7bb5e6c9ac94cd143ba17f27..36dca9be193d1672b8b0c41d148adf0fa2a1c582 100644 (file)
@@ -2427,7 +2427,7 @@ requires_inout (p)
   int num_matching_alts = 0;
   int len;
 
-  for ( ; c = *p; p += len)
+  for ( ; (c = *p); p += len)
     {
       len = CONSTRAINT_LEN (c, p);
       switch (c)
index 195040cdd4910aba0e4c173486fd906168c078c8..11bcec97a30fc9fc79eededf75961d7d2d723c8a 100644 (file)
@@ -21,17 +21,18 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 
 #include "config.h"
 #include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "intl.h"
-#include "rtl.h"
-
 #ifdef HAVE_SYS_TIMES_H
 # include <sys/times.h>
 #endif
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
+#include "coretypes.h"
+#include "tm.h"
+#include "intl.h"
+#include "rtl.h"
+#include "toplev.h"
+
 
 #ifndef HAVE_CLOCK_T
 typedef int clock_t;