This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/29286] [4.0/4.1/4.2 Regression] placement new does not change the dynamic type as it should



------- Comment #19 from ian at airs dot com  2006-10-03 16:03 -------
Mike suggests: "it would appear that it is unsafe to reorder writes of
otherwise non-conflicting types past each other as type based analysis alone
isn't enough to ensure they don't conflict."

That would be bad in the general case.  It would not be as bad as prohibiting
the reorder of reads and writes, but it would be bad.  Let's find a way such
that we do not have to do that.

Fortunately I believe that in a correct program we only have a problem when we
can actually see the placement new (can any disprove that)?  I personally don't
have a problem with saying that placement new is special.  When placement new
is used, it has to move the pointer into alias set 0.

With regard to Mark's comment #15, the problem here is not heap allocation, as
I see it.  The C standard explains how to use heap allocation: use a char*
pointer.  The problem is doing something akin to heap allocation without using
a char* pointer.


-- 

ian at airs dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]