On Sat, 31 May 2008 01:54:45 +0200
Luca Barbato <[EMAIL PROTECTED]> wrote:
> > ISO/IEC 14882:1998 section 3.7.1 paragraph 2.
> 
> "If an object of static storage duration has initialization or a 
> destructor with side effects, it shall not be eliminated even if
> it appears to be unused, except that a class object or its copy
> may be eliminated as specified in 12.8."
> 
> Unchanged in the 2003 revision.
> 
> Is that related to linking? I don't think so.

Linking with as-needed is the stage in which the elimination occurs,
and as-needed is the cause of the elimination. So yes, it is related.

> Still, PE and ELF are older than the first C++ spec so, IFF your
> reading of this chapter is correct, C++ is broken by design.

Not at all. Read "The Design and Evolution of C++", and you shall see
that requiring changes to the linker where necessary for sensible
behaviour was considered acceptable, and with good reason.
-- 
Ciaran McCreesh

Attachment: signature.asc
Description: PGP signature

Reply via email to