-/*-----------------------------------.
-| Set default %destructor/%printer. |
-`-----------------------------------*/
+/*--------------------------------------------------.
+| Set default tagged/tagless %destructor/%printer. |
+`--------------------------------------------------*/
+
+void
+default_tagged_destructor_set (code_props const *destructor)
+{
+ if (default_tagged_destructor.code)
+ {
+ unsigned i = 0;
+ complain_at_indent (destructor->location, &i,
+ _("redeclaration for default tagged %%destructor"));
+ i += SUB_INDENT;
+ complain_at_indent (default_tagged_destructor.location, &i,
+ _("previous declaration"));
+ }
+ default_tagged_destructor = *destructor;
+}
+
+void
+default_tagless_destructor_set (code_props const *destructor)
+{
+ if (default_tagless_destructor.code)
+ {
+ unsigned i = 0;
+ complain_at_indent (destructor->location, &i,
+ _("redeclaration for default tagless %%destructor"));
+ i += SUB_INDENT;
+ complain_at_indent (default_tagless_destructor.location, &i,
+ _("previous declaration"));
+ }
+ default_tagless_destructor = *destructor;
+}