On Wed, 2019-02-13 at 16:54 +0000, Szabolcs Nagy wrote: > > +/* Table of machine attributes. */ > > +static const struct attribute_spec aarch64_attribute_table[] = > > +{ > > + /* { name, min_len, max_len, decl_req, type_req, fn_type_req, > > + affects_type_identity, handler, exclude } */ > > + { "aarch64_vector_pcs", 0, 0, false, true, true, false, NULL, > > NULL }, > > i just noticed that "affects_type_identity" is set to false, > so gcc accepts > > __attribute__((aarch64_vector_pcs)) void f(void); > void (*g)(void) = f; > > without a warning (treats function types with different > pcs as compatible) > > i think we don't want to allow calls through the wrong > pointer type, such assignment should be an error.
I agree. I will submit a patch to change the affects_type_identity flag and add a test for it. Steve Ellcey sell...@marvell.com