[libav-devel] [PATCH] libfdk-aac: Don't use defined() in a #define

Martin Storsjö martin at martin.st
Wed Sep 12 22:28:06 CEST 2018

On Wed, 12 Sep 2018, Martin Storsjö wrote:

> MSVC expands the preprocessor directives differently, making the
> version check fail in the previous form.
> ---
> I'm pretty sure I've seen a better description of this issue somewhere,
> I don't remember off-hand right now where that was. But I think the
> gist of it was that the previous form was undefined according to the
> C standard, even if GCC and clang handle it in the same way.

This is similar to 5e3f6dc70198426fe0741e3017826b8bf3ee5ad8, which points 
out that if building with -Wexpansion-to-defined, the compiler (at least 
clang) would warn about it, clarifying that macro expansion of 'defined' 
has undefined behaviour.

// Martin

More information about the libav-devel mailing list