This is the mail archive of the gcc@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: DCE eliminating valid statement for ACATS c34007p


> ? ? But only where the semantics are well defined. I can think of several
> ? ? different possible semantics for talking the address of arbitrary
> ? ? things.
> 
> The counter-argument is that it can used when the semantics need *not* be
> well-defined, in other words, where you're saying you don't care.

We've seen many times before, often with the ADA frontend, that "don't care" 
is often not what the language frontend really wants. Different people have 
different ideas about exactly which subset of semantics are required, and 
which are allowed to be changed.

>     IMHO it's best to make things like this explicit. That way there's no
>     disagreement over which language defined semantics we should be using.
>
> What about case like taking an ADDR_EXPR of a COMPONENT_REF where the
> field is a bitfield?  Trying to over-specify things can get quite complex
> as well.

That's my point. We shouldn't be trying to support this sort of language 
specific weirdness in generic code. Unless you have bit-addressable 
memory/pointers and arbitrary bit-sized types, taking the address of a 
bitfield makes no sense. It's up to the frontend to transform it into 
something sane.

Paul


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