Initializer priorities (Was: IA-64 ABI meeting results)

Jim Dehnert dehnert at baalbek.engr.sgi.com
Thu Mar 30 23:51:52 UTC 2000


> From loewis at informatik.hu-berlin.de  Thu Mar 30 00:51:51 2000
> 
> # Meeting concensus is that the desirable order is right to left on
> # the link command line, i.e. last listed relocatable object is
> # initialized first.
> 
> What exactly is the requirement for specifying anything more than
> that? The C++ standard leaves the order explicitly
> implementation-defined, so portable programs should not expect any
> particular order. Also, Standard C++ does not provide a mechanism for
> assigning priorities to specific objects.

That's correct, and several vendors, including IBM and gnu, have
concluded that the priority extension is highly desirable.  The C++
ABI group simply observed that given a choice between accepting
incompatibility between extensions or defining a simple facility that
would provide compatibility between vendors that chose to support this,
we preferred the latter.

> To me, this looks like a vendor extension, even though it is supported
> by a number of vendors (in one way or the other). What I don't see is
> the general utility of this facility. Perhaps someone can explain the
> requirements that lead to this extension?

Since SGI has not implemented this, I hope one of those who have will
provide a more detailed answer.  But I recall the rationale discussed
as being essentially that as applications grow, it becomes more and
more desirable to be able to coordinate initialization between
declarations in different object files, allowing declarations to be
placed based on program design rather than constructor interactions.
A secondary concern is being able to coordinate C++ initialization with
initialization in other languages.

Would IBM or Cygnus care to elaborate?

Jim

-	    Jim Dehnert		dehnert at sgi.com
				(650)933-4272




More information about the cxx-abi-dev mailing list