On Fri, 23 Jun 2017, Marek Polacek wrote: > You'll also see that I dropped all qualifiers for __auto_type. But I actually > couldn't trigger the > init_type = c_build_qualified_type (init_type, TYPE_UNQUALIFIED); > line in c_parser_declaration_or_fndef (even when running the whole testsuite) > so I'm not convinced it makes any difference.
It looks like it would only make a difference, in the present code, for the case of an atomic register variable, or bit-field in an atomic structure, as the initializer. Those are the cases where convert_lvalue_to_rvalue would not return a non-atomic result, given an atomic argument. With the proposed change, it should apply to any qualified lvalue used as the initializer. > @@ -506,6 +508,7 @@ const struct c_common_resword c_common_reswords[] = > { "typename", RID_TYPENAME, D_CXXONLY | D_CXXWARN }, > { "typeid", RID_TYPEID, D_CXXONLY | D_CXXWARN }, > { "typeof", RID_TYPEOF, D_ASM | D_EXT }, > + { "typeof_noqual", RID_TYPEOF_NOQUAL, D_ASM | D_EXT }, > { "union", RID_UNION, 0 }, > { "unsigned", RID_UNSIGNED, 0 }, > { "using", RID_USING, D_CXXONLY | D_CXXWARN }, I don't think we should have this keyword variant. I think there should be tests of the change to __auto_type. -- Joseph S. Myers jos...@codesourcery.com