| www.delorie.com/gnu/docs/gdb/gdbint_111.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
With few exceptions, developers should include the configuration option `--enable-gdb-build-warnings=,-Werror' when building GDB. The exceptions are listed in the file `gdb/MAINTAINERS'.
This option causes GDB (when built using GCC) to be compiled with a carefully selected list of compiler warning flags. Any warnings from those flags being treated as errors.
The current list of warning flags includes:
format printf attribute on all
printf like functions this checks not just printf calls
but also calls to functions such as fprintf_unfiltered.
if statement.
Pragmatics: Due to the way that GDB is implemented most
functions have unused parameters. Consequently the warning
`-Wunused-parameter' is precluded from the list. The macro
ATTRIBUTE_UNUSED is not used as it leads to false negatives ---
it is not an error to have ATTRIBUTE_UNUSED on a parameter that
is being used. The options `-Wall' and `-Wunused' are also
precluded because they both include `-Wunused-parameter'.
Pragmatics: GDB has not simply accepted the warnings enabled by `-Wall -Werror -W...'. Instead it is selecting warnings when and where their benefits can be demonstrated.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |