This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Weird warning when building gcc


Greetings All,

I am wondering if this is a warning worth looking into or is it just another false postive:

/home/nick/gcc/gcc/combine.c:1316:8: warning: ‘prev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if ((next = try_combine (insn, prev, NULL, NULL,

Maybe it's just me being new to the project but is the code for that literally or also identical between this and the 
one where CC0 register is directly used.

 if (HAVE_cc0
                && JUMP_P (insn)
                && (prev = prev_nonnote_insn (insn)) != 0
                && NONJUMP_INSN_P (prev)
                && sets_cc0_p (PATTERN (prev)))
              {
                if ((next = try_combine (insn, prev, NULL, NULL,
                                         &new_direct_jump_p,
                                         last_combined_insn)) != 0)
                  goto retry;
 
                FOR_EACH_LOG_LINK (nextlinks, prev)
                    if ((next = try_combine (insn, prev, nextlinks->insn,
                                             NULL, &new_direct_jump_p,
                                             last_combined_insn)) != 0)
                      goto retry;
              }
  

Without CC0 register explict:
            /* Do the same for an insn that explicitly references CC0.  */
            if (HAVE_cc0 && NONJUMP_INSN_P (insn)
                && (prev = prev_nonnote_insn (insn)) != 0
               && NONJUMP_INSN_P (prev)
               && sets_cc0_p (PATTERN (prev))
               && GET_CODE (PATTERN (insn)) == SET
               && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn))))
             {
              if ((next = try_combine (insn, prev, NULL, NULL,
                                       &new_direct_jump_p,
                                       last_combined_insn)) != 0)
                 goto retry;
 
               FOR_EACH_LOG_LINK (nextlinks, prev)
                   if ((next = try_combine (insn, prev, nextlinks->insn,
                                            NULL, &new_direct_jump_p,
                                            last_combined_insn)) != 0)
                   goto retry;
             }

Maybe it's just me being new here. Further more, was wondering if ctags support is there. I assume it's 
there but was unable to find anything in the build or configuration pages when building gcc. As these
are the only two lines that are different:
		
		&& GET_CODE (PATTERN (insn)) == SET
                && reg_mentioned_p (cc0_rtx, SET_SRC (PATTERN (insn)))


Sorry if this a stupid question but it seems really weird to me,

Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]