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

Chris Lattner clattner at apple.com
Wed Apr 25 09:58:26 PDT 2007


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.

-Chris




More information about the llvm-commits mailing list