jeremy  barrett <[EMAIL PROTECTED]> writes:

>> The order of static_init...() and initAx() is not specified,
>> gcc-3.3.3 for Linux/x86 calls initAx() after static_init...(),
>> while gcc-4.3.0 calls them in reverse order.
>
> ps - is this documented anywhere, or would i have to read the gcc
> source to know?

The 'info gcc' says for __attribute__((constructor)):

  `constructor'
     The `constructor' attribute causes the function to be called
     automatically before execution enters `main ()'. 

That's *all* gcc promises. No guarantees of exactly when they are
called, nor in which order.

Reading gcc source would let you know what a particular version of
gcc does, but not what guarantees there are. If it's not in the
manual, assume it's not specified.

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to