aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-11-27 19:21:15 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2024-11-27 19:21:15 -0500
commit5341eb669658c7c73d55021b10a4765bf4ce3078 (patch)
tree4fcf4200563d9bba8e033d3be34bd1fbbb1aadb2 /gcc/expr.cc
parent5336b63fe81029cfd790208fbc69a08c70b82b01 (diff)
downloadgcc-5341eb669658c7c73d55021b10a4765bf4ce3078.zip
gcc-5341eb669658c7c73d55021b10a4765bf4ce3078.tar.gz
gcc-5341eb669658c7c73d55021b10a4765bf4ce3078.tar.bz2
c-family: offer suggestions for missing command-line options [PR82892]
Some builtin macros are only defined when certain command-line options are provided. Update the error messages for them so that we suggest the pertinent option ('-fopenacc' for '_OPENACC', and '-fopenmp' for '_OPENMP') gcc/c-family/ChangeLog: PR c/82892 * c-common.h (get_option_for_builtin_define): New decl. * c-cppbuiltin.cc (get_option_for_builtin_define): New. * known-headers.cc: Include "opts.h". (suggest_missing_option::suggest_missing_option): New. (suggest_missing_option::~suggest_missing_option): New. * known-headers.h (class suggest_missing_option): New. gcc/c/ChangeLog: PR c/82892 * c-decl.cc (lookup_name_fuzzy): Provide hints for missing command-line options. gcc/cp/ChangeLog: PR c/82892 * name-lookup.cc (suggest_alternatives_for_1): Provide hints for missing command-line options. gcc/testsuite/ChangeLog: PR c/82892 * c-c++-common/spellcheck-missing-option.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions