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

Re: PATCH: Fix typo (and bootstrap failure) in jump.c


> >>>>> "Gerald" == Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:
> 
>     Gerald> I'm afraid that the following patch did not receive
>     Gerald> suitable testing:
Oops - I've caught that problem myself and forgot to fix it in the
official patch. Duh...
On i386 we don't define REVERSIBLE_CC_MODE, so thats why bootstrap suceeded.
> Note that (as mentioned before) the best way to avoid this kind of
> thing is often to do:
> 
>   if (HAS_FOO) 
>     ...
>   else
>     ...
> 
> rather than:
> 
>   #ifdef HAS_FOO
>     ...
>   #else 
>     ...
>   #endif
Problem is that in this case the macro may or may not be defined.  In case
it is defined we do something else..
> In the case of REVERSIBLE_CC_MODE this would require a little effort,
> in that it's a function-like macro.  But, that's easily fixed: in
> defaults.h add:
> 
>   #ifdef REVERSIBLE_CC_MODE
>   #define HAS_REVERSIBLE_CC_MODE 1
>   #else
>   #define HAS_REVERSIBLE_CC_MODE 0
>   #endif
> 
> Does anyone object to making an effort to follow this style in the
> future?
No, it is definitly good idea.

Honza
> 
> --
> Mark Mitchell                   mark@codesourcery.com
> CodeSourcery, LLC               http://www.codesourcery.com

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