[PATCH v2 5/5] Linux: Consolidate auxiliary vector parsing

Florian Weimer fweimer@redhat.com
Thu Feb 10 10:54:45 GMT 2022


* Adhemerval Zanella:

>>>> +  auxv_values[AT_PAGESZ] = EXEC_PAGESIZE;
>>>> +  auxv_values[AT_FPUCW] = _FPU_DEFAULT;
>>>> +
>>>> +  /* NB: Default to a constant CONSTANT_MINSIGSTKSZ.  */
>>>> +  _Static_assert (__builtin_constant_p (CONSTANT_MINSIGSTKSZ),
>>>> +                  "CONSTANT_MINSIGSTKSZ is constant");
>>>
>>> Shouldn't it warn that CONSTANT_MINSIGSTKSZ is not a constant?
>> 
>> Sorry, would please rephrase?  Should I change this to
>> ""CONSTANT_MINSIGSTKSZ is not constant"?
>
> Yeah because on a the _Static_assert failure the resulting message seems
> to the opposite of what triggered it.

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).

Thanks,
Florian



More information about the Libc-alpha mailing list