This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DCE eliminating valid statement for ACATS c34007p
- From: Paul Brook <paul at codesourcery dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 6 Sep 2005 15:30:25 +0100
- Subject: Re: DCE eliminating valid statement for ACATS c34007p
- References: <10509061417.AA06251@vlsi1.ultra.nyu.edu>
> ? ? 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