This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26388] Variable sized storage allocation should be promoted to stack allocation
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 16 Feb 2017 17:20:02 +0000
- Subject: [Bug tree-optimization/26388] Variable sized storage allocation should be promoted to stack allocation
- Auto-submitted: auto-generated
- References: <bug-26388-4@http.gcc.gnu.org/bugzilla/>
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...