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: Vector misalignment


On Mon, Aug 16, 2010 at 7:28 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Mon, Aug 16, 2010 at 11:15 AM, Artem Shinkarov
> <artyom.shinkaroff@gmail.com> wrote:
>> 2010-08-16 Artem Shinkarov <artyom.shinkaroff@gmail.com>
>>
>> ? ? ? ?gcc/
>> ? ? ? ?* c-typeck.c (build_c_cast): Add warning.
>> ? ? ? ?* common.opt: New warning type Wmisaligned.
>
> We already have -Wcast-align, why are you adding a new option?

Probably you are right, I thought that I could come up with something
more than just pointer checks, I was mainly concentrated on vector
operations and possible misalignments there. But for this patch we
could change Wmisalignment to Wcast-align, currently it fits.

> ?Also
> is there a reason why you are adding code to the C front-end without a
> corresponding change to the C++ front-end?

Well, mostly lack of time and knowledge.

At this point I would like to gather some ideas about the way we could
produce these warnings at all. My current approach has some
disadvantages, for instance it would produce warnings for the correct
code. But currently I don't know how we can make it better,
considering the fact that we want to warn on -O0 as well.


Thanks,
Artem.


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