Message ID | AANLkTik0e-1CVnqd5+nV4i--mqWjoQJS8GvCRE8Ywp3P@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Thu, Jul 22, 2010 at 3:34 AM, Le-Chun Wu <lcwu@google.com> wrote: > This patch fix the warning triggered by self-assignment check in > gcc/dbxout.c. Bootstrapped and tested on x86_64-gnu-linux. OK for > trunk? Ok. Thanks, Richard. > Thanks, > > Le-chun > > 2010-07-21 Le-Chun Wu <lcwu@google.com> > > * dbxout.c (DEBUGGER_ARG_OFFSET): Change OFFSET to OFFSET+0 to avoid > self-assign warning. > > > Index: gcc/dbxout.c > =================================================================== > --- gcc/dbxout.c (revision 162385) > +++ gcc/dbxout.c (working copy) > @@ -289,9 +289,12 @@ static const char *base_input_file; > #endif > > /* A C expression for the integer offset value of an argument (N_PSYM) > - having address X (an RTX). The nominal offset is OFFSET. */ > + having address X (an RTX). The nominal offset is OFFSET. > + Note that we use OFFSET + 0 here to avoid the self-assign warning > + when the macro is called in a context like > + number = DEBUGGER_ARG_OFFSET(number, X) */ > #ifndef DEBUGGER_ARG_OFFSET > -#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET) > +#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + 0) > #endif > > /* This obstack holds the stab string currently being constructed. We >
Index: gcc/dbxout.c =================================================================== --- gcc/dbxout.c (revision 162385) +++ gcc/dbxout.c (working copy) @@ -289,9 +289,12 @@ static const char *base_input_file; #endif /* A C expression for the integer offset value of an argument (N_PSYM) - having address X (an RTX). The nominal offset is OFFSET. */ + having address X (an RTX). The nominal offset is OFFSET. + Note that we use OFFSET + 0 here to avoid the self-assign warning + when the macro is called in a context like + number = DEBUGGER_ARG_OFFSET(number, X) */ #ifndef DEBUGGER_ARG_OFFSET -#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET) +#define DEBUGGER_ARG_OFFSET(OFFSET, X) (OFFSET + 0) #endif /* This obstack holds the stab string currently being constructed. We