![]() The compilation of the configure check fails with an error. This will be the subject of a separate ticket.ĭoes the '-Werror' here mean that the issue is an hard error…? It is not a matter of a missing #include. I will also test against the other branches, and produce different patches for those branches if necessary.Īnother occurrence of a -Wimplicit-function-declaration, generated by Freeciv's configuration scripts, comes from a check on c11 functionality. I will attach patches to this ticket, which I have tested on the S2_6 branch, version 2.6.6 code. The fix for all but one of these errors is simple: patch m4/x.m4 to add one line in each of two places, and patch m4/vsnprintf.m4 to add two lines in one place. In the long term, it helps MacPorts to distribute Freeciv if Freeciv can prevent these warnings upstream from MacPorts. ![]() See MacPorts ticket #64551 freeciv X11 config tests gives -Wimplicit-function-declaration warning on exit, strcmp. As an interim measure, the MacPorts distribution can patch Freeciv to prevent these errors. Since 2021, the MacPorts distribution software has specifically elevated -Wimplicit-function-declaration errors to the user's attention. For more on the Xcode compiler issue, see the writeup in the MacPorts wiki at. Thus, compiler errors have not been a reason to clean up these macros - until now. Also, defining functions without explicitly declaring them has been illegal C language since about the late 1980s, but many compilers have tolerated it. This means in turn that the macros may get the wrong result about the system's capabilities, and so they may configure Freeciv incorrectly. This means that the programs generated by the configuration macros may, on macOS, fail to compile, instead of compiling and running. ![]() If a function prototype is not declared, the compiler is unable to guess which kind of args the function uses. On those CPUs, the calling sequence for varargs functions differ from the calling sequence for functions with a fixed number of parameters. They do this as part of support for the Apple ARM architecture CPUs. MacOS's Xcode compilers (based on clang) have applied -Werror and -Wimplicit-function-declaration options since about 2019. Adding #include and #include to those macros prevents those warnings, without changing what the configuration macros are trying to check for. ![]() Three configuration macros create simple C programs which, when compiled on macOS, needlessly cause -Wimplicit-function-declaration errors. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |