Contributors:
- DJ Delorie
Delivery Date:
- Now
Description:
- All places in gcc where warnings are generated will be tagged with a mnemonic that uniquely identifies each warning (or group of warnings, when they differ only in, for example, plurality). A mechanism will be added to allow individual control over each warning through these mnemonics. Initially, this will be through a new -W-style command line parameter and perhaps limited #pragma support, but eventually all warning control (like -Wall or -Werror) should be implementable through this mechanism.
Benefits:
- Warning control allows application developers precise control over which warnings they're willing to accept, allowing the remainder to become errors through -Werror. This allows developers to tell gcc to be more strict, resulting in better code quality.
Risks:
- Due to the pervasive nature of the initial patch, it's likely that some calls to warning() may be missed (mostly, those that are syntactically different than the majority, as the change is done by a perl script). Additionally, projects outside the gcc source tree which use warning() will need to be changed independently. Such fixes are trivial once found.