This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: expanding addrs for initializers
- From: Richard Henderson <rth at redhat dot com>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 31 Aug 2005 21:58:34 -0700
- Subject: Re: expanding addrs for initializers
- References: <200508190348.j7J3mQa7007351@greed.delorie.com> <20050819194619.GF11768@redhat.com> <200509010203.j8123Ba7000797@greed.delorie.com>
On Wed, Aug 31, 2005 at 10:03:11PM -0400, DJ Delorie wrote:
> How does the attached patch look? It requires a slightly different
> test case (i.e. "more legal" ;) but allows a more precise validation
> of the multiple conversions.
Better. The basic idea I can accept.
> + && TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE
POINTER_TYPE_P.
> + TREE_TYPE (exp) = saved_type;
I'm not fond of destructively modifying the expression. You can
create a new ADDR_EXPR here just find though.
> + error ("no-op convert from %d bytes to %d bytes in initializer",
> + op_size, type_size);
> + gcc_unreachable ();
internal_error.
r~