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]

Re: Add new warning flag "warn_prio_ctor_dtor"


On Thu, 30 Aug 2018, Vinay Kumar wrote:

> +Warn if a priority from 0 to 100 is used for constructor or destructor.
> +The use of constructor and destructor attributes allow you to assign a
> +priority to the constructor/destructor to control its order of execution
> +before main() is called or after it returns. The priority values must be
> +greater than 100 as the compiler reserves priority values between 0-100
> +for the implementation.

Documentation style issues:

@code{main}, no ().

Two spaces after '.' at end of sentence in Texinfo.

TeX-style -- in range, so 0--100.

> +This warning is enabled by @option{-Wall}.

Isn't it enabled by default, not by -Wall (so the main option is 
-Wno-prio-ctor-dtor to disable the warning)?

-- 
Joseph S. Myers
joseph@codesourcery.com


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