__attribute__ ((constructor)) broken in C++

Andreas Schwab schwab@LS5.informatik.uni-dortmund.de
Sun Feb 28 18:15:00 GMT 1999

Jason Merrill <jason@cygnus.com> writes:

|> No; the bug is that I didn't finish changing things from checking for 0 to
|> checking for DEFAULT_INIT_PRIORITY.  Going back to passing 0 around is not
|> the right fix.  I'll deal.

You do not distinguish a user specified priority of DEFAULT_INIT_PRIORITY
(which is a valid init_priority) from a constructor attribute.  If there
are any functions with the former attribute the functions marked by the
latter are registered twice.  That's exactly what i avoid with my patch.


More information about the Gcc-patches mailing list