From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2 5/5] Linux: Consolidate auxiliary vector parsing
Date: Thu, 10 Feb 2022 08:46:16 -0300 [thread overview]
Message-ID: <de9764f7-7b55-74db-9d56-2ade2ce3093a@linaro.org> (raw)
In-Reply-To: <9eae877f-41aa-1f06-e1b5-10c49a033630@linaro.org>
On 10/02/2022 08:40, Adhemerval Zanella wrote:
>
>
> On 10/02/2022 08:31, Florian Weimer wrote:
>> * Adhemerval Zanella:
>>
>>>> The GCC error message doesn't suggest a strong preference either way:
>>>>
>>>> /tmp/t.c:1:1: error: static assertion failed: "failed"
>>>> 1 | _Static_assert (0, "failed");
>>>> | ^~~~~~~~~~~~~~
>>>>
>>>> I think in the existing sources, the message is sometimes indicating the
>>>> failure, or what is being asserted (as is the case here).
>>>
>>> Compiler is will just emit the message if condition is met, my point is
>>> emitting 'CONSTANT_MINSIGSTKSZ is constant' on an error is the opposite
>>> of what triggered it (CONSTANT_MINSIGSTKSZ is really *not* a constant).
>>
>> But the check asserts that CONSTANT_MINSIGSTKSZ is constant, so the
>> message is still correct.
> In fact the _Static_assert does not really matter, __builtin_constant_p
_Static_assert message string*
> will already trigger a valid warning message:
>
> In file included from ../include/features.h:490,
> from ../posix/sys/types.h:25,
> from ../include/sys/types.h:1,
> from ../include/string.h:6,
> from dl-support.c:22:
> ../sysdeps/unix/sysv/linux/dl-parse_auxv.h: In function ‘_dl_parse_auxv’:
> ../sysdeps/unix/sysv/linux/dl-parse_auxv.h:40:19: error: expression in static assertion is not constant
> 40 | _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ),
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../include/sys/cdefs.h:7:59: note: in definition of macro ‘_Static_assert’
> 7 | # define _Static_assert(expr, diagnostic) _Static_assert (expr, diagnostic)
next prev parent reply other threads:[~2022-02-10 11:46 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 11:08 [PATCH v2 0/5] Linux: Auxiliary vector parsing cleanups Florian Weimer
2022-02-03 11:08 ` [PATCH v2 1/5] elf: Merge dl-sysdep.c into the Linux version Florian Weimer
2022-02-08 20:09 ` Adhemerval Zanella
2022-02-03 11:08 ` [PATCH v2 2/5] Linux: Remove HAVE_AUX_SECURE, HAVE_AUX_XID, HAVE_AUX_PAGESIZE Florian Weimer
2022-02-08 20:11 ` Adhemerval Zanella
2022-02-03 11:08 ` [PATCH v2 3/5] Linux: Remove DL_FIND_ARG_COMPONENTS Florian Weimer
2022-02-08 20:12 ` Adhemerval Zanella
2022-02-03 11:08 ` [PATCH v2 4/5] Linux: Assume that NEED_DL_SYSINFO_DSO is always defined Florian Weimer
2022-02-08 20:13 ` Adhemerval Zanella
2022-02-03 11:08 ` [PATCH v2 5/5] Linux: Consolidate auxiliary vector parsing Florian Weimer
2022-02-08 20:19 ` Adhemerval Zanella
2022-02-08 20:34 ` Florian Weimer
2022-02-08 22:57 ` Adhemerval Zanella
2022-02-10 10:54 ` Florian Weimer
2022-02-10 11:29 ` Adhemerval Zanella
2022-02-10 11:31 ` Florian Weimer
2022-02-10 11:40 ` Adhemerval Zanella
2022-02-10 11:46 ` Adhemerval Zanella [this message]
2022-02-11 12:31 ` Szabolcs Nagy
2022-02-11 12:47 ` Adhemerval Zanella
2022-02-11 13:24 ` Szabolcs Nagy
2022-02-11 13:48 ` Adhemerval Zanella
2022-02-11 14:42 ` H.J. Lu
2022-02-11 14:56 ` Florian Weimer
2022-02-11 13:49 ` Florian Weimer
2022-02-11 14:17 ` Adhemerval Zanella
2022-02-11 14:29 ` Szabolcs Nagy
2022-02-11 18:15 ` Adhemerval Zanella
2022-02-11 17:32 ` Florian Weimer
2022-02-11 17:49 ` Szabolcs Nagy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de9764f7-7b55-74db-9d56-2ade2ce3093a@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).