[FFmpeg-devel] [PATCH] avcodec: add farbfeld encoder
Rémi Denis-Courmont
remi at remlab.net
Tue Jun 4 09:04:41 EEST 2024
Le 4 juin 2024 00:56:21 GMT+03:00, Andreas Rheinhardt <andreas.rheinhardt at outlook.com> a écrit :
>Rémi Denis-Courmont:
>> Le maanantaina 3. kesäkuuta 2024, 22.29.13 EEST marcus a écrit :
>>>> Bogus cast / aliasing violation.
>>>
>>> I thought qualifiers don't affect aliasing rules in C. Am I wrong?
>>
>> If they didn't, the compiler wouldn't warn about incompatible pointer type
>> conversions in the absence of the explict cast.
>>
>
>Wrong: The conversion uint8_t*const*->const uint8_t * const* is safe
Nope. The pointer types have the same representation and in practice neither LLVM IR nor GIMPLE can differentiate them, but they are not compatible according to spec (C11 §6.7.6.1).
You can convert `const uint8_t **` to `const uint8_t *const *`, for sure (C11 §6.3.2.3), but that's not the same conversion
More information about the ffmpeg-devel
mailing list