This is the mail archive of the gcc-bugs@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]

[Bug middle-end/26679] [4.2 Regression] boostrap failure due to warning in gcc/varasm.c



------- Comment #6 from graham dot stott at btinternet dot com  2006-03-14 18:55 -------
Subject: Re:  boostrap failure due to warning in gcc/varasm.c

All,

If the warning isn't bogus then we probably need to do the shift in two steps
(i.e. hwi = (hwi >> (shift - 1)) >> 1) as done elsewhere to avoid the 
potential warning.

--- joseph at codesourcery dot com <gcc-bugzilla@gcc.gnu.org> wrote:

> 
> 
> ------- Comment #4 from joseph at codesourcery dot com  2006-03-14 15:11
> -------
> Subject: Re:  boostrap failure due to warning in
>  gcc/varasm.c
> 
> On Tue, 14 Mar 2006, pinskia at gcc dot gnu dot org wrote:
> 
> > What compiler are you using to get that warning?
> > There should be no warning as shift is a variable and n is a variable and
> > should be zero.
> 
> shift is a const variable initialized with a constant, so when building 
> with optimization (this is the stage1 compiler building the stage2 
> compiler) it gets replaced by its value.  Because the warning is given 
> before dead code elimination, the fact that n is also a constant and the 
> code is unreachable is irrelevant.  Why this error is newly appeared I'm 
> not sure.
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26679
> 
> 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26679


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