This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Simplify preprocessor conditional in push_block
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 06 Oct 2003 08:44:25 -0700
- Subject: Re: [PATCH] Simplify preprocessor conditional in push_block
- References: <200310061430.25009.ebotcazou@libertysurf.fr>
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
> Hi,
>
> Any reason to keep this rather intricate preprocessor conditional
>
> #ifndef STACK_GROWS_DOWNWARD
> if (0)
> #else
> if (1)
> #endif
>
> in push_block? If the patch is approved, I'll bootstrap it before the commit.
>
>
> 2003-10-06 Eric Botcazou <ebotcazou@libertysurf.fr>
>
> * expr.c (push_block): Simply preprocessor conditional.
Better, provide
#ifndef STACK_GROWS_DOWNWARD
#define STACK_GROWS_DOWNWARD 1
#endif
in defaults.h, then delete all existing definitions, and make all
ports that currently do _not_ define this macro instead define it as
#define STACK_GROWS_DOWNWARD 0
... and then you can use just
if (STACK_GROWS_DOWNWARD)
in push_block (but you'll have to tweak all other locations that use
it, too.)
zw