Tested with gcc 15 and clang 20.
Note clang didn't need the adjustment,
but it was applied for clang also, to be defensive.
* tests/test-memset_explicit.c (do_secret_stuff): Mark stack variable
as not to be initialized with either zero or pattern on each invocation.
tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
+2025-09-17 Pádraig Brady <P@draigBrady.com>
+
+ tests: support -ftrivial-auto-var-init
+ * tests/test-memset_explicit.c (do_secret_stuff): Mark stack variable
+ as not to be initialized with either zero or pattern on each invocation.
+ tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
+
2025-09-17 Paul Eggert <eggert@cs.ucla.edu>
stringeq: port to platforms declaring memeq, streq
# endif
do_secret_stuff (int volatile pass, char *volatile *volatile last_stackbuf)
{
+# if _GL_GNUC_PREREQ (12, 0) || __clang_major__ >= 14
+ /* Support -ftrivial-auto-var-init */
+ __attribute__ ((uninitialized))
+# endif
char stackbuf[SECRET_SIZE];
if (pass == 1)
{
# endif
do_secret_stuff (int pass, char *volatile *last_stackbuf)
{
+# if _GL_GNUC_PREREQ (12, 0) || __clang_major__ >= 14
+ /* Support -ftrivial-auto-var-init */
+ __attribute__ ((uninitialized))
+# endif
char stackbuf[SECRET_SIZE];
if (pass == 1)
{