I think that we should remove the following, rather useless, compile-time check:
The test program fails to declare a return type, so it should hopefully always fail to compile with a C++ compiler.
Designated initializers were introduced in ISO/IEC 9899:1999 (C99), but the code base is supposed to be compatible with an earlier version of the standard (C90). The InnoDB code based was switched from C to C++ in MySQL 5.6 and MariaDB 10.0.
C++ did not introduce syntax for designated initializers until ISO/IEC 14882:2020. MariaDB Server is still stuck with the 2011 or earlier version of the standard.
Therefore, this check as well as the macro STRUCT_FLD are best removed, to make the declarations easier to read and to slightly reduce the compile time by removing a useless compile-time check.