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]

[C++ Patch] PR 58610


Hi,

in this regression, we ICE in explain_non_literal_class in:

          if (DECL_DELETED_FN (fn))
            maybe_explain_implicit_delete (fn);

because fn is a TEMPLATE_DECL. Now, if I read the comment which provides rationale for LANG_DECL_FN_CHECK:

/* We want to be able to check DECL_CONSTRUCTOR_P and such on a function
   template, not just on a FUNCTION_DECL.  So when looking for things in
   lang_decl_fn, look down through a TEMPLATE_DECL into its result. */
#define LANG_DECL_FN_CHECK(NODE) __extension__                \

I think it could make sense to use the macro for DECL_DELETED_FN too, not just for DECL_DEFAULTED_FN. Or do we want something more localized?

Tested x86_64-linux.

Thanks,
Paolo.

/////////////////////////

Attachment: CL_58610
Description: Text document

Attachment: patch_58610
Description: Text document


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