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] |
The issue here is that the C++ front end represents the ref-qualifier as a variant but includes it in the canonical type, because at the language level the types are distinct. Note that this is also true of language-independent qualifiers like "const", so this doesn't seem like an unreasonable thing for the front end to do. But as a result, when build_type_attribute_qual_variant builds a distinct type copy of the ref-qualified type, it is now its own main variant, while the canonical type is still a variant of another type, and verify_type doesn't like that. This patch introduces a langhook to mimic for language-dependent qualifiers the b_t_a_q_v behavior for cv-qualifiers, i.e. strip them before making the copy and reintroduce them afterward. Tested x86_64-pc-linux-gnu. OK for trunk?
Attachment:
70029.diff
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |