https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118283
Bug ID: 118283 Summary: Issues when building with GCC15+MinGW-w64 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: brechtsanders at users dot sourceforge.net Target Milestone: --- I was able to compile GCC 15 (20241229 snapshot) against MinGW-w64. So I tried building a lot of open source projects with it. Several projects fail to build and a lot of the time the reason was one of the following: - `bool` now seems to be defined in C. Several projects use bool as a variable name or define it using typedef, both of which will result in compile errors. - `error: too many arguments to function` is quite common. Apparently older versions of GCC (and LLVM) didn't care so much about this. One library in particular that has this issue is getopt. Its source can be found at https://frodo.looijaard.name/project/getopt but a lot of libraries distribute it with their sources. The issue with getopt is that `getopt()` defined `extern int getopt ();` and then later calls it with 3 arguments. A similar thing is the case for `getenv()` where it is defined as `char *getenv ();` and then later called with 1 argument. Possibly the same issue will cause a lot of things to not be properly detected by autoconf/configure as I have seen on multiple occasions existence of a function is checked by defining it without arguments to see if the symbol is valid. Are both these issues by design in the C standard used by default by GCC 15? Or is there a compiler flag to avoid these issues, in particular a flag that would change `error: too many arguments to function` into a warning that can be ignored?