From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id AC3113858D20; Wed, 9 Nov 2022 12:13:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AC3113858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667996003; bh=r19+XMW8Ig3QDP0a5pHZEVWl4pN1Hztm4mzwtXFkQ2E=; h=From:To:Subject:Date:From; b=Wspmelj+iTXzQGXDGoxTIIxa8RePn8cZiBOW9SrDHqXwecYHcVyfE9QIuLf4GxePg yhWUdqOL1+HWpGHH9GWYlr0bq73wHhRbvq/Ao52/yUqa1LgylCUUIQJMmlZaE7qaTp w3nfVwJLRbH3Rup4/bJZox8js6woJAb7+n1vxHco= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3853] sphinx: update diagnostics URLs X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: d943927ff860cea44a9cf64fc6d591a4a6e37f6f X-Git-Newrev: 9c3bc557995463fe1dcc37ec503af780a6c1a341 Message-Id: <20221109121323.AC3113858D20@sourceware.org> Date: Wed, 9 Nov 2022 12:13:23 +0000 (GMT) List-Id: https://gcc.gnu.org/g:9c3bc557995463fe1dcc37ec503af780a6c1a341 commit r13-3853-g9c3bc557995463fe1dcc37ec503af780a6c1a341 Author: Martin Liska Date: Wed Nov 9 13:10:11 2022 +0100 sphinx: update diagnostics URLs gcc/ChangeLog: * opts.cc (get_option_html_page): Port to sphinx URLs. (get_option_url): Likewise. (test_get_option_html_page): Likewise. Diff: --- gcc/opts.cc | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/gcc/opts.cc b/gcc/opts.cc index 3797784c865..c00887ae76e 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -3608,11 +3608,11 @@ get_option_html_page (int option_index) /* Analyzer options are on their own page. */ if (strstr (cl_opt->opt_text, "analyzer-")) - return "gcc/Static-Analyzer-Options.html"; + return "gcc/gcc-command-options/options-that-control-static-analysis.html"; /* Handle -flto= option. */ if (strstr (cl_opt->opt_text, "flto")) - return "gcc/Optimize-Options.html"; + return "gcc/gcc-command-options/options-that-control-optimization.html"; #ifdef CL_Fortran if ((cl_opt->flags & CL_Fortran) != 0 @@ -3623,10 +3623,11 @@ get_option_html_page (int option_index) && (cl_opt->flags & CL_CXX) == 0 #endif ) - return "gfortran/Error-and-Warning-Options.html"; + return ("gfortran/gnu-fortran-command-options/" + "options-to-request-or-suppress-errors-and-warnings.html"); #endif - return "gcc/Warning-Options.html"; + return "gcc/gcc-command-options/options-to-request-or-suppress-warnings.html"; } /* Return malloced memory for a URL describing the option OPTION_INDEX @@ -3645,11 +3646,8 @@ get_option_url (diagnostic_context *, int option_index) "gcc/Warning-Options.html". */ get_option_html_page (option_index), - /* Expect an anchor of the form "index-Wfoo" e.g. - , and thus an id within - the URL of "#index-Wformat". */ - "#index", cl_options[option_index].opt_text, - NULL); + /* Expect an anchor of the form "cmdoption-Wfoo". */ + "#cmdoption", cl_options[option_index].opt_text, NULL); else return NULL; } @@ -3786,12 +3784,16 @@ namespace selftest { static void test_get_option_html_page () { - ASSERT_STREQ (get_option_html_page (OPT_Wcpp), "gcc/Warning-Options.html"); + ASSERT_STREQ (get_option_html_page (OPT_Wcpp), + "gcc/gcc-command-options/" + "options-to-request-or-suppress-warnings.html"); ASSERT_STREQ (get_option_html_page (OPT_Wanalyzer_double_free), - "gcc/Static-Analyzer-Options.html"); + "gcc/gcc-command-options/" + "options-that-control-static-analysis.html"); #ifdef CL_Fortran ASSERT_STREQ (get_option_html_page (OPT_Wline_truncation), - "gfortran/Error-and-Warning-Options.html"); + "gfortran/gnu-fortran-command-options/" + "options-to-request-or-suppress-errors-and-warnings.html"); #endif }