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]
Other format: [Raw text]

Re: [patch] Fix violation of self-assignment check in GCC source [4/4]


On Thu, Jul 22, 2010 at 1:30 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Thu, Jul 22, 2010 at 3:44 AM, Le-Chun Wu <lcwu@google.com> wrote:
>> This patch fix the warning triggered by self-assignment check in
>> config/i386/i386.c. (Note that the compiler does not emit bogus
>> uninitialized warning on fcode any more so the self-init hack is no
>> longer needed.) Bootstrapped and tested on x86_64-gnu-linux. OK for
>> trunk?
>
> Hm, that's self-init. ?Do we now warn for this by default?

Not now. But self-init will trigger a warning if/when the
-Wself-assign is submitted and enabled by -Wall.

>
> Anyway, if there is no longer a bogus warning about unintiialized
> use then this patch is ok.

Yes, there is no longer a bogus warning (most likely resolved by David
Li's patch that makes the uninitialized variable analysis predicate
aware).

Thanks,

Le-chun

>
> Thanks,
> Richard.
>
>> Thanks,
>>
>> Le-chun
>>
>> 2010-07-21 ?Le-Chun Wu ?<lcwu@google.com>
>>
>> ? ? ? * config/i386/i386.c (ix86_vectorize_builtin_vec_perm): Remove
>> ? ? ? unnecessary self-init.
>>
>>
>> Index: gcc/config/i386/i386.c
>> ===================================================================
>> --- gcc/config/i386/i386.c ? ? ?(revision 162385)
>> +++ gcc/config/i386/i386.c ? ? ?(working copy)
>> @@ -30013,7 +30013,7 @@ ix86_vectorize_builtin_vec_perm (tree ve
>> ? tree itype = TREE_TYPE (vec_type);
>> ? bool u = TYPE_UNSIGNED (itype);
>> ? enum machine_mode vmode = TYPE_MODE (vec_type);
>> - ?enum ix86_builtins fcode = fcode; /* Silence bogus warning. ?*/
>> + ?enum ix86_builtins fcode;
>> ? bool ok = TARGET_SSE2;
>>
>> ? switch (vmode)
>>
>


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