[MDEV-26443] The check HAVE_C99_INITIALIZERS is not applicable to C++ Created: 2021-08-20 Updated: 2021-08-24 Resolved: 2021-08-20 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.2.41, 10.3.32, 10.4.22, 10.5.13, 10.6.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | upstream | ||
| Description |
|
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. |