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 (indeed, C++ performs it automatically); the conversion uint8_t*const*->const uint8_t ** (which is what the cast here does) is safe from an aliasing point of view, but not const-correct/-Wcast-qual-correct (cast to const uint8_t * const* instead). It is a limitation of C not to be like C++ here. - Andreas _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".