Re: global object constructors and constructor function priorities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maxim Yegorushkin <maxim.yegorushkin@xxxxxxxxx> writes:

> I am reading http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html#Function-Attributes
> where it talks about constructor and destructor function attributes:
>
>     The priorities for constructor and destructor functions are the
> same as those specified for namespace-scope C++ objects.

The sentence is in a paragraph discussing the optional integer priority
argument.  It only applies to the priority argument.  It does not apply
in general.

If you don't use an explicit priority, the order of execution of
functions with the constructor attribute and C++ global constructors is
not specified.  It's unusual to use the constructor attribute in C++
code.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux