[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix strict aliasing violation
From: |
Tim Rühsen |
Subject: |
Re: [PATCH] Fix strict aliasing violation |
Date: |
Sun, 12 Apr 2020 19:36:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
On 12.04.20 16:18, Andreas Schwab wrote:
> On Apr 12 2020, Tim Rühsen wrote:
>
>> test-dl.c: In function 'test_fn_check':
>> test-dl.c:186:9: warning: ISO C forbids conversion of object pointer to
>> function pointer type [-Wpedantic]
>> 186 | fn_p = (test_fn)fn;
>> | ^
>>
>> Following the code, tt basically turns down to the question "How to
>> convert dlsym() return value into a function pointer correctly".
>
> POSIX requires this to work. Since dlsym isn't part of ISO C, it
> doesn't make sense to use -Wpendantic.
Thanks, pushed your patch and another one to suppress the warning.
Regards, Tim
signature.asc
Description: OpenPGP digital signature