gcc/cp/ChangeLog:
* tree.cc (handle_init_priority_attribute): Use OPT_prio_ctor_dtor.
gcc/testsuite/ChangeLog:
* g++.dg/special/initp1.C: Test disabling -Wprio-ctor-dtor.
&& !in_system_header_at (input_location))
{
warning
- (0, "requested %<init_priority%> %i is reserved for internal use",
+ (OPT_Wprio_ctor_dtor,
+ "requested %<init_priority%> %i is reserved for internal use",
pri);
}
Two( 15, 16 )
};
-Two coo[ 3 ] __attribute__((init_priority(1000)));
-
-Two koo[ 3 ] __attribute__((init_priority(1000))) = {
+Two coo[ 3 ] __attribute__((init_priority(10))); // { dg-warning "reserved" }
+#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
+Two koo[ 3 ] __attribute__((init_priority(10))) = {
Two( 21, 22 ),
Two( 23, 24 ),
Two( 25, 26 )