[llvm-commits] [126543] Clean up this macro to only eval each argument once.

Bill isanbard at gmail.com
Wed Apr 25 10:13:00 PDT 2007


On 4/25/07, Chris Lattner <clattner at apple.com> wrote:
>
> On Apr 25, 2007, at 9:56 AM, Bill wrote:
>
> > On 4/25/07, clattner at apple.com <clattner at apple.com> wrote:
> >>  #undef MOVE_BY_PIECES_P
> >> -#define MOVE_BY_PIECES_P(SIZE, ALIGN) ((SIZE-SIZE)+(ALIGN-ALIGN))
> >> +#define MOVE_BY_PIECES_P(SIZE, ALIGN) (0*(SIZE)*(ALIGN))
> >>
> > Why not just make it:
> >
> > #define MOVE_BY_PIECES_P(SIZE, ALIGN)  0
> >
> > ?
>
> That would be way too logical.  Unfortunately, doing that causes
> "unused value" warnings to be emitted.
>
Ah! I got ya.

Ick.

-bw



More information about the llvm-commits mailing list