This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: why are these alias sets different?
Mark Mitchell <mark@codesourcery.com> writes:
>>>>>> "Zack" == Zack Weinberg <zack@bitmover.com> writes:
>
> Zack> I'm implementing the suggestion that Nick?
> made, to warn
I asked for warnings, but I was not specific about how or where they
were implemented.
> Zack> when we see a cast between pointers in different alias sets.
> Zack> This is easy (just a few lines in c-typeck.c), close enough
> Zack> to source that we get sane line numbers, and I think it'll
> Zack> be reasonably accurate. I have it working except for the
> Zack> union-type extension, which should only warn with -pedantic.
>
>That's certainly worth a try. I don't know how many false positives
>we'll see, but if it's not too many this will be a useful warning.
Right now, I would not mind a a lot of false positives so long as number
of warnings is less than number of lines in the file - it would still help
tracking down bugs in the large body of code written by many people that
is perl...
>Definitely you can give a more helpful warning-message than with the
>RMS suggestion (at least without a major effort).
If RMS's suggestion was to add a warning when generated code differed because
of aliasing assumptions then that would be a help too - even if it only
points at function.
--
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.