Open
Description
I came across this while building gnome-remote-desktop on Gentoo with clang 16. Relevant bug: https://bugs.gentoo.org/885875.
Minimal reproducible code:
struct AUDIO_FORMAT
{
char* data;
};
typedef struct AUDIO_FORMAT AUDIO_FORMAT;
static const AUDIO_FORMAT audio_format_aac = { 0 };
static AUDIO_FORMAT server_formats[] =
{
audio_format_aac,
};
With Clang, I get the following output
test.c:12:3: error: initializer element is not a compile-time constant
audio_format_aac,
^~~~~~~~~~~~~~~~
1 error generated.
While with GCC, it builds successfully.