[PATCH] libstdc++: Test 17_intro/names.cc with -D_FORTIFY_SOURCE=2 [PR116210]

Siddhesh Poyarekar siddhesh@gotplt.org
Fri Oct 4 14:08:50 GMT 2024


On 2024-10-04 10:03, Siddhesh Poyarekar wrote:
>> diff --git a/libstdc++-v3/testsuite/17_intro/names.cc 
>> b/libstdc++-v3/testsuite/17_intro/names.cc
>> index 6b9a3639aad..bbf45b93dee 100644
>> --- a/libstdc++-v3/testsuite/17_intro/names.cc
>> +++ b/libstdc++-v3/testsuite/17_intro/names.cc
>> @@ -377,4 +377,11 @@
>>   #undef y
>>   #endif
>> +#if defined __GLIBC_PREREQ && defined _FORTIFY_SOURCE
>> +# if __GLIBC_PREREQ(2,35) && ! __GLIBC_PREREQ(2,41)
>> +// https://sourceware.org/bugzilla/show_bug.cgi?id=32052
>> +#  undef sz
>> +# endif
>> +#endif
> 
> We've backported the fix to stable branches, so the version check isn't 
> really that reliable.

I suppose if you really want to test this in libstdc++, you could do 
(untested) something like:


#if !defined __GLIBC_PREREQ || !defined _FORTIFY_SOURCE || !defined sz
# define sz (
#endif


Sid


More information about the Libstdc++ mailing list