[PATCH] Fix special case for C2x strtol binary constant handling (BZ# 30371)
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Thu May 25 12:22:09 GMT 2023
On 25/05/23 08:33, Florian Weimer wrote:
> * Adhemerval Zanella via Libc-alpha:
>
>> diff --git a/stdlib/tst-strtol-binary-main.c b/stdlib/tst-strtol-binary-main.c
>> index ece3100298..54cda5cd03 100644
>> --- a/stdlib/tst-strtol-binary-main.c
>> +++ b/stdlib/tst-strtol-binary-main.c
>
>> +#define CHECK_RES(ARG, RES, EP, EXPECTED, EXPECTED_EP) \
>> do \
>> { \
>> if (TEST_C2X) \
>> { \
>> TEST_COMPARE ((RES), EXPECTED); \
>> - TEST_COMPARE (*(EP), 0); \
>> + TEST_VERIFY ((EP) == EXPECTED_EP); \
>> } \
>> else \
>> { \
>
> You could add TEST_COMPARE_STRING (EP, EXPECTED_EP); as a debugging aid.
> Patch looks okay.
I though about it, but since the interface explicit state the the result
should point to the string itself I don't think it adds much.
>
> Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks.
More information about the Libc-alpha
mailing list