Opened 10 months ago

Last modified 10 months ago

#67787 new defect

Detect other possible default -Werror compiler errors during configure

Reported by: chrstphrchvz (Christopher Chavez) Owned by:
Priority: Normal Milestone:
Component: base Version: 2.8.1
Keywords: Cc:
Port:

Description

In response to Apple Clang 12 treating implicit function declarations as errors rather than warnings, MacPorts now warns if a port may have configured incorrectly because of such errors.

Newer LLVM Clang and possibly future GCC treat other warnings as errors by default; https://wiki.gentoo.org/wiki/Modern_C_porting currently lists -Werror=int-conversion, -Werror=implicit-int, and -Werror=incompatible-function-pointer-types. Can MacPorts’ warnings be extended to check for these other errors as well, and/or reorganized to accommodate future ones more easily?

Change History (1)

comment:1 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)

See [1c483e276e41f88c0ccdd4f4defb412ad9591e06/macports-base] where I recently fixed base to match the llvm.org versions of the implicit function declaration errors. You should be able to add the int conversion and implicit int messages there too. Be sure to check if Apple clang and llvm.org clang have different message wordings and if so add both of them.

Note: See TracTickets for help on using tickets.