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 tree-optimization/26388] Variable sized storage allocation should be promoted to stack allocation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26388

--- Comment #11 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #10)
> The implementation challenges aside, I think the transformation suggested
> here could break some valid (if rare) C++ programs.  std::vector is
> specified to use std::allocator to obtain storage which in turn is specified
> to use operator new.  Operator new is a replaceable function meaning that a
> program can define its own that keeps track of the number of calls to it by
> vector (and other) member functions.  Such programs could break by GCC
> eliminating the of the operator.
> 
> Richard, in light of this and other concerns in the discussion of this bug,
> do you want to keep this bug open or do you agree with closing it?

LLVM developers got the C++ standard fixed so that this is explicitly
permitted...

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