Order of CTORs (Notes from the 14 July meeting)
Jim Dehnert
dehnert at baalbek.engr.sgi.com
Wed Jul 21 01:43:57 UTC 1999
> C2. ORDER OF CTORS/DTORS
>
> Cygnus scheme: priorities are 16-bit unsigned integers, lower numbers are
> higher priority. In each translation unit, there's a single initialization
> function for each priority. Anything that's prioritized has a higher
> priority than anything that isn't explicitly assigned a priority. IBM
> scheme: priorities are 32-bit signed integers, higher numbers are higher
> priority. Something that isn't explicitly assigned a priority effectively
> gets a priority of 0.
>
> Consensus: nobody is sure that negative priorities are very important, but
> also nobody can think of a reason not to allow them. We accept the idea
> that priorities are 32-bit signed integers. On a source level Cygnus will
> keep lower numbers as higher priority, but that's a source issue, not an
> ABI issue.
Am I missing something? If we want to mix objects, consistent
treatment of the priorities will matter. I suppose we could agree on
the binary treatment without agreeing on the source representation,
but it seems much better to also agree on a source form, even if some
existing compilers still need to map old forms to the new one.
- Jim Dehnert x3-4272
More information about the cxx-abi-dev
mailing list