[PATCH] Tree SRA and atomicity/volatility
Richard Guenther
richard.guenther@gmail.com
Thu Jan 25 16:41:00 GMT 2007
On 1/25/07, Mark Mitchell <mark@codesourcery.com> wrote:
> Richard Kenner wrote:
> >> So, please, if a frontend assumes that setting TYPE_VOLATILE on
> >> a structure type has defined semantics, then please let's _define_ those.
> >
> > As both Mark and I have been trying to say, that's not possible. The
> > middle-end defines things at roughly the level that a language
> > specification would and these sorts of behaviors of volatile affect
> > lower-level things, which cannot be expressed in such a manner.
>
> I agree. I think TYPE_VOLATILE is the right flag, and that any other
> flag would be essentially equivalent. Or, rather, we might be able to
> specify some particular behavior with additional flags, like
> TYPE_DO_NOT_SRA_ME, but even several such flags would not capture the
> totality of the C "volatile" keyword, so we would still need TYPE_VOLATILE.
>
> Of course, I'm all for specifying whatever we can and writing that down.
> You may recall that I gave Eric B. a lot of grief about documentation
> for the last round of volatile changes, and there is now some
> documentation about them. (It's a little fuzzy, and I argued for less
> fuzzineess than we adopted, but it's certainly much less fuzzy than what
> was there before, and I consider it reasonable progress.)
Ok, so may be it then. I guess the Ada specification for pragma Atomic
is equally vague and fuzzy and allows for an undefined implementation.
Richard.
More information about the Gcc-patches
mailing list