diff options
author | David Malcolm <dmalcolm@redhat.com> | 2019-12-05 14:47:35 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-04-27 15:02:57 -0400 |
commit | fa29cf0c3f19b648e30b16fd2485c3c17a528a6e (patch) | |
tree | 887f4679b10686e6d407e49c3815f8f0c4666601 /gcc/selftest-run-tests.c | |
parent | 76458c912b0cdda59e094fa64b98aea9ffee214a (diff) | |
download | gcc-fa29cf0c3f19b648e30b16fd2485c3c17a528a6e.zip gcc-fa29cf0c3f19b648e30b16fd2485c3c17a528a6e.tar.gz gcc-fa29cf0c3f19b648e30b16fd2485c3c17a528a6e.tar.bz2 |
Fix warning URLs for Fortran and analyzer [PR 92830]
PR 92830 reports that we always use "gcc/Warning-Options.html" when we
emit escaped documentation URLs when printing "[-Wname-of-option]" for
a warning.
This page is wrong for most Fortran warnings, and for analyzer warnings.
I considered various schemes involving adding extra tags to the .opt
format to capture where options are documented, but for now this patch
fixes the issue by introducing some special-casing logic.
It only fixes the URLs for warning options, not for other command-line
options, but those are the only options for which get_option_url is
currently called.
gcc/ChangeLog:
PR 92830
* configure.ac (DOCUMENTATION_ROOT_URL): Drop trailing "gcc/" from
default value, so that it can by supplied by get_option_html_page.
* configure: Regenerate.
* opts.c: Include "selftest.h".
(get_option_html_page): New function.
(get_option_url): Use it. Reformat to place comments next to the
expressions they refer to.
(selftest::test_get_option_html_page): New.
(selftest::opts_c_tests): New.
* selftest-run-tests.c (selftest::run_tests): Call
selftest::opts_c_tests.
* selftest.h (selftest::opts_c_tests): New decl.
Diffstat (limited to 'gcc/selftest-run-tests.c')
-rw-r--r-- | gcc/selftest-run-tests.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/selftest-run-tests.c b/gcc/selftest-run-tests.c index d47e928..f0a81d4 100644 --- a/gcc/selftest-run-tests.c +++ b/gcc/selftest-run-tests.c @@ -73,6 +73,7 @@ selftest::run_tests () typed_splay_tree_c_tests (); unique_ptr_tests_cc_tests (); opt_proposer_c_tests (); + opts_c_tests (); json_cc_tests (); cgraph_c_tests (); optinfo_emit_json_cc_tests (); |