Checking for one_only/weak support is better done
before deciding to turn references to __cxa_pure_virtual weak.
This helps at least on VxWorks where one_only / weak support
varies between kernel and rtp modes as well as across VxWorks
versions.
2021-12-30 Olivier Hainque <hainque@adacore.com>
gcc/cp/
* decl.c (cxx_init_decl_processing): Move code possibly
altering flag_weak before code testing it.
nullptr_node = build_int_cst (nullptr_type_node, 0);
}
+ if (! supports_one_only ())
+ flag_weak = 0;
+
abort_fndecl
= build_library_fn_ptr ("__cxa_pure_virtual", void_ftype,
ECF_NORETURN | ECF_NOTHROW | ECF_COLD);
if (flag_exceptions)
init_exception_processing ();
- if (! supports_one_only ())
- flag_weak = 0;
-
if (modules_p ())
init_modules (parse_in);