This is the mail archive of the gcc@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]

comp_type_attributes


Hello,

I am trying to understand comp_type_attributes, which checks whether attributes are compatible. From what I understand, on many platforms, that function can only ever return 1. Indeed, it does some checks to know whether it can answer 1, and if not it forwards to the target, which by default just returns 1. It looks like it could directly forward to the target. Which would leave the pretty printer as the only user of the affects_type_identity property of an attribute...

Now the reason I looked at this is because I was expecting a different behavior. I added a new (function type) attribute in a front-end and specified that it affects type identity. When comp_type_attributes sees this attribute in one type but not the other, it can't answer yes, so it forwards to the target. The target just answers yes by default (some check for their own attributes, but they ignore the rest).

Is that what's supposed to happen? I can use another mechanism than attributes, but this looks suspicious.

--
Marc Glisse


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