Martin Storsjö: > On Sun, 10 Mar 2024, Andreas Rheinhardt wrote: > >> All versions of MSVC that support C11 (namely >= v19.27) >> also support the restrict keyword, therefore av_restrict >> is no longer necessary since 75697836b1db3e0f0a3b7061be6be28d00c675a0. >> >> Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> >> --- >> Untested except via godbolt. >> MSVC actually uses it for optimizations: https://godbolt.org/z/3EzPnff9T > > This change looks good overall, thanks! Fate runs successfully both with > an old version of MSVC targeting x86_64 and a new one targeting aarch64. > > However, MSVC 19.27 (aka 2019 16.7) can't successfully build ffmpeg at > the moment - it regressed in ec1b6e0cd404b2f7f4d202802b1c0a40d52fc9b0. > Now building fails with this error: > > src/libavcodec/ccaption_dec.c(186): error C2143: syntax error: missing > ')' before 'sizeof' > src/libavcodec/ccaption_dec.c(186): error C2143: syntax error: missing > '{' before 'sizeof' > src/libavcodec/ccaption_dec.c(186): error C2059: syntax error: 'sizeof' > > This issue is not present with the following version, MSVC 2019 16.8 > (aka 19.28) though. >
Testing with Godbolt shows that MSVC 19.27 does not support _Static_assert. But it supports static_assert (its synonym defined in assert.h). So this is easy to fix. >> Btw: The block about __declspec(restrict) was always unneeded >> for FFmpeg due to 17fad33f81c7e9787fcdc17934fc1eee6c6aa4bf. >> It came from Libav commit 17fad33f81c7e9787fcdc17934fc1eee6c6aa4bf. > > This looks like a copypaste typo, I presume the latter should have been > 0cff125200ab53fa3ae70d85b4f614f269fe3426. (The code it changed > originated in dfa559bcbd41397b3408c59d016631c7c65e320f in libav.) > Correct. - 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".