This is the mail archive of the gcc-patches@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: expanding addrs for initializers


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~


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