https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82892

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>:

https://gcc.gnu.org/g:5341eb669658c7c73d55021b10a4765bf4ce3078

commit r15-5739-g5341eb669658c7c73d55021b10a4765bf4ce3078
Author: David Malcolm <dmalc...@redhat.com>
Date:   Wed Nov 27 19:21:15 2024 -0500

    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 <dmalc...@redhat.com>

Reply via email to