diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2021-06-14 11:38:11 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2021-06-14 18:24:10 +0100 |
commit | 93bfadf3a1db7d73e9ca4a4a3d40f7f81ea16d39 (patch) | |
tree | 6cc8a3d4594065f9ed349dc780d51aff4ed46461 /gcc/c-family/known-headers.cc | |
parent | 046a3beb1673bf4a61c131373b6a5e84158e92bf (diff) | |
download | gcc-93bfadf3a1db7d73e9ca4a4a3d40f7f81ea16d39.zip gcc-93bfadf3a1db7d73e9ca4a4a3d40f7f81ea16d39.tar.gz gcc-93bfadf3a1db7d73e9ca4a4a3d40f7f81ea16d39.tar.bz2 |
c-family: Add fix-it suggestions for more <stdlib.h> names [PR101052]
PR c++/101052
gcc/c-family/ChangeLog:
* known-headers.cc (get_stdlib_header_for_name): Add known
headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
exit, and getenv.
gcc/testsuite/ChangeLog:
* g++.dg/spellcheck-stdlib.C: Add checks for <cstdlib> names.
* gcc.dg/spellcheck-stdlib.c: Likewise.
Diffstat (limited to 'gcc/c-family/known-headers.cc')
-rw-r--r-- | gcc/c-family/known-headers.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-family/known-headers.cc b/gcc/c-family/known-headers.cc index 8592471..a391246 100644 --- a/gcc/c-family/known-headers.cc +++ b/gcc/c-family/known-headers.cc @@ -162,7 +162,14 @@ get_stdlib_header_for_name (const char *name, enum stdlib lib) {"stdout", {"<stdio.h>", "<cstdio>"} }, /* <stdlib.h> and <cstdlib>. */ + {"EXIT_FAILURE", {"<stdlib.h>", "<cstdlib>"} }, + {"EXIT_SUCCESS", {"<stdlib.h>", "<cstdlib>"} }, + {"abort", {"<stdlib.h>", "<cstdlib>"} }, + {"atexit", {"<stdlib.h>", "<cstdlib>"} }, + {"calloc", {"<stdlib.h>", "<cstdlib>"} }, + {"exit", {"<stdlib.h>", "<cstdlib>"} }, {"free", {"<stdlib.h>", "<cstdlib>"} }, + {"getenv", {"<stdlib.h>", "<cstdlib>"} }, {"malloc", {"<stdlib.h>", "<cstdlib>"} }, {"realloc", {"<stdlib.h>", "<cstdlib>"} }, |