[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2022-01-12 Thread Marco Elver via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG732ad8ea62ed: [clang][auto-init] Provide __builtin_alloca*_uninitialized variants (authored by melver). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115440/

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2022-01-10 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Yes, this LGTM implementation-wise. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115440/new/ https://reviews.llvm.org/D115440 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2022-01-10 Thread Alexander Potapenko via Phabricator via cfe-commits
glider accepted this revision. glider added a comment. This revision is now accepted and ready to land. FWIW the implementation looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115440/new/ https://reviews.llvm.org/D115440 __

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2022-01-10 Thread Marco Elver via Phabricator via cfe-commits
melver added a comment. Hello, We need a solution for this problem, and because I haven't heard any objections I'll assume the general approach is fine -- @jfb already kindly confirmed that "[...] patch you propose here is a good idea". Review of the implementation would still be much apprecia

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2021-12-14 Thread Marco Elver via Phabricator via cfe-commits
melver added a subscriber: tstellar. melver added a comment. @tstellar , we were told maybe you have some input. TLDR; - Clang and GCC appear to behave differently wrt `-ftrivial-auto-var-init=` on `__builtin_alloca()` (and VLAs?) - Clang's behavior is (per @jfb above) correct; - How to documen

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2021-12-14 Thread Marco Elver via Phabricator via cfe-commits
melver reclaimed this revision. melver added a comment. > Let's consult libc's own documentation > https://www.gnu.org/software/libc/manual/html_node/Variable-Size-Automatic.html > > It states: > >> Automatic Storage with Variable Size >> The function alloca supports a kind of half-dynamic alloca

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2021-12-13 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D115440#3183778 , @melver wrote: > GCC devs say that initializing explicit alloca() is a bug, because they > aren't "automatic storage": > https://lkml.kernel.org/r/20211209201616.gu...@gate.crashing.org > .. which is also the re

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2021-12-09 Thread Marco Elver via Phabricator via cfe-commits
melver abandoned this revision. melver added a comment. GCC devs say that initializing explicit alloca() is a bug, because they aren't "automatic storage": https://lkml.kernel.org/r/20211209201616.gu...@gate.crashing.org .. which is also the reason why GCC's behaviour differs here at the moment.