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 ipa/60965] [4.10 Regression] IPA: Devirtualization versus placement new


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

--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to Andrew Haley from comment #8)
> While it's true that we can play hardball on this one by insisting that only
> char arrays should be used with placement new, it wouldn't really do any
> good.  I don't think it would make any real-world code more efficient.

On the contrary, this bug is an example of making real code more efficient,
just inappropriately because of the special status of char arrays.  We really
don't want to have to assume that any random object can invisibly change type,
as that would make type-based optimizations pretty useless.

As far as I know people always use char arrays for placement new anyway; at
least all the examples I've ever seen do.


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