Hi,
On 10/24/2012 09:55 PM, Jason Merrill wrote:
On 10/24/2012 03:48 PM, Paolo Carlini wrote:
+ error ("type transparent %q#T cannot be made transparent
because "
+ "a field has neither pointer nor integer type", t);
I'd say "%q#T cannot be made transparent because %q#D has neither
pointer nor integer type", t, field.
Unfortunately, I don't think we can name the specific field/member like
this because it can be misleading in some cases (I had already tried ;)
Consider:
typedef union {
int f;
double x;
} __attribute__(( __transparent_union__ )) example_t;
we end up saying:
‘union<anonymous>’ cannot be made transparent because ‘int <anonymous
union>::f’ has neither pointer nor integer type
whereas the problem is actually x! Shall we content ourselves of
something not naming the field? We are already doing better than the C
front-end ;)
Paolo.