It's a warning that was introduced with gcc 4.3, and we have warnings
cause errors.  When I ported the tree to gcc 4.3, I chose to keep the
warning (there was some debate) because we're supporting so many users
now that some of them might not be so savvy on the particulars of
operator precedence.  There were not in fact very many cases that were
ambiguous.

  Nate

On Thu, Jan 8, 2009 at 12:14 PM,  <[email protected]> wrote:
> I think your change is right, but just in case could you please try tracing 
> with
> different combinations of turning on and explicitly off Exec, ExecMicro, and
> ExecMacro? I sent an email recently which talked about how the new options
> work.
>
> My compiler must not have that warning, but I have seen that at work a few
> times. Do we want to and is there a way to disable it? It seems a little
> excessive to call that an error.
>
> Gabe
>
> Quoting nathan binkert <[email protected]>:
>
>> Gabe just committed this code, and your fix looks right to me.
>>
>>   Nate
>>
>> On Thu, Jan 8, 2009 at 11:36 AM, Rick Strong <[email protected]> wrote:
>> > Hi all,
>> >
>> > It appears that there is a compiler error in src/cpu/exetrace.cc for gcc
>> > version 4.3.2 for m5dev.
>> >
>> >
>> > scons: Building targets ...
>> > g++ -o /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.do -c
>> > -Wno-deprecated -pipe -fno-strict-aliasing -Wall -Wno-sign-compare
>> > -Werror -Wundef -ggdb3 -DTHE_ISA=ALPHA_ISA -DDEBUG -DTRACING_ON=1
>> > -Iext/dnet -I/usr/include/python2.5
>> > -I/home/rstrong/build/m5dev/build/libelf
>> > -I/home/rstrong/build/m5dev/build/gzstream
>> > -I/home/rstrong/build/m5dev/build/ALPHA_SE
>> > /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc
>> > cc1plus: warnings being treated as errors
>> > /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc: In member
>> > function 'virtual void Trace::ExeTracerRecord::dump()':
>> > /home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.cc:134: error:
>> > suggest parentheses around && within ||
>> > /home/rstrong/build/m5dev/build/ALPHA_SE/arch/alpha/isa_traits.hh: At
>> > global scope:
>> > /home/rstrong/build/m5dev/build/ALPHA_SE/arch/alpha/isa_traits.hh:159:
>> > error: 'AlphaISA::SyscallPseudoReturnReg' defined but not used
>> > scons: *** [/home/rstrong/build/m5dev/build/ALPHA_SE/cpu/exetrace.do]
>> > Error 1
>> > scons: building terminated because of errors.
>> >
>> >
>> > The fix I propose below fixes this with a simple addition of an extra
>> > set of parenthesis. Does everyone agree? Has anyone else had this
>> > problem from m5dev?
>> >
>> > diff -r 9279812da5ee src/cpu/exetrace.cc
>> > --- a/src/cpu/exetrace.cc   Wed Jan 07 00:05:33 2009 -0800
>> > +++ b/src/cpu/exetrace.cc   Thu Jan 08 04:13:52 2009 -0800
>> > @@ -128,10 +128,10 @@
>> >      * complete/print when they fault.
>> >      */
>> >     if (IsOn(ExecMacro) && staticInst->isMicroop() &&
>> > -            (IsOn(ExecMicro) &&
>> > +            ((IsOn(ExecMicro) &&
>> >              macroStaticInst && staticInst->isFirstMicroop()) ||
>> >             (!IsOn(ExecMicro) &&
>> > -             macroStaticInst && staticInst->isLastMicroop())) {
>> > +             macroStaticInst && staticInst->isLastMicroop()))) {
>> >         traceInst(macroStaticInst, false);
>> >     }
>> >     if (IsOn(ExecMicro) || !staticInst->isMicroop()) {
>> >
>> >
>> >
>> > Best,
>> > -Rick
>> > _______________________________________________
>> > m5-dev mailing list
>> > [email protected]
>> > http://m5sim.org/mailman/listinfo/m5-dev
>> >
>> >
>> _______________________________________________
>> m5-dev mailing list
>> [email protected]
>> http://m5sim.org/mailman/listinfo/m5-dev
>>
>
>
>
>
>
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to