diff options
author | Mark Wielaard <mark@klomp.org> | 2020-05-19 23:18:09 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2020-05-22 23:21:56 +0200 |
commit | 45c50b6a63a120d3eb6957883c4c7b968c84d010 (patch) | |
tree | 1448d767725d0846fda35da6d62253fbde7d31e4 /gcc/tree-ssa-loop-ivcanon.c | |
parent | 72af65b91cc2a2eb726afe56af6b44d6c57bb10f (diff) | |
download | gcc-45c50b6a63a120d3eb6957883c4c7b968c84d010.zip gcc-45c50b6a63a120d3eb6957883c4c7b968c84d010.tar.gz gcc-45c50b6a63a120d3eb6957883c4c7b968c84d010.tar.bz2 |
Suggest including <stdbool.h> for bool, true and false
Currently gcc suggests to use _Bool instead of bool and doesn't give
any suggestions when true or false are used, but undefined. This patch
makes it so that (for C99 or higher) a fixit hint is emitted to include
<stdbool.h>.
gcc/c-family/ChangeLog:
* known-headers.cc (get_stdlib_header_for_name): Return
"<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
flag_isoc99.
gcc/testsuite/ChangeLog:
* gcc.dg/spellcheck-stdbool.c: New test.
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
0 files changed, 0 insertions, 0 deletions