Clarification of __attribute__ init_priority

Vladimir Simonov sv@sw.ru
Tue May 17 17:28:00 GMT 2011


On 05/17/2011 08:44 PM, Ian Lance Taylor wrote:
> Vladimir Simonov<sv@sw.ru>  writes:
>
>> 2. If 1 is true what about anonymous namespace? Is it considered the same namespace
>> for different translation units?

Thank you for you answer.
One question below.
>> But it means that init priority can't be set lover(value greater) then default.
>> Is it correct?
>
> All objects with an init_priority attribute are constructed before any
> object with no init_priority attribute.
And are destructed _after_ any object with no init_priority attribute:)
I just like to have a object destructed _before_ any object with no
init_priority attribute. Is it possible? May be I'm conceptually wrong
in my willing?

Regards
Vladimir



More information about the Gcc-help mailing list