public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/sphinx-v5)] options: Port get_option_url to Sphinx.
@ 2021-08-27 8:05 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-08-27 8:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:aa2cd91f513254a765a01f2b1b1753e0f4c92bf3
commit aa2cd91f513254a765a01f2b1b1753e0f4c92bf3
Author: Martin Liska <mliska@suse.cz>
Date: Thu Aug 26 13:58:18 2021 +0200
options: Port get_option_url to Sphinx.
gcc/ChangeLog:
* opts.c (get_option_html_page): Port to Sphinx URLs.
(get_option_url): Likewise.
(test_get_option_html_page): Likewise.
Diff:
---
gcc/opts.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/gcc/opts.c b/gcc/opts.c
index e0501551ef5..afde9401589 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -3401,11 +3401,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
@@ -3416,10 +3416,11 @@ get_option_html_page (int option_index)
&& (cl_opt->flags & CL_CXX) == 0
#endif
)
- return "gfortran/Error-and-Warning-Options.html";
+ return "fortran/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
@@ -3435,13 +3436,13 @@ get_option_url (diagnostic_context *, int option_index)
DOCUMENTATION_ROOT_URL,
/* get_option_html_page will return something like
- "gcc/Warning-Options.html". */
+ "gcc-command-options/"
+ "options-to-request-or-suppress-warnings.html". */
get_option_html_page (option_index),
- /* Expect an anchor of the form "index-Wfoo" e.g.
- <a name="index-Wformat"></a>, and thus an id within
- the URL of "#index-Wformat". */
- "#index", cl_options[option_index].opt_text,
+ /* Expect an anchor of the form
+ "#cmdoption-Wunknown-pragmas". */
+ "#cmdoption", cl_options[option_index].opt_text,
NULL);
else
return NULL;
@@ -3578,12 +3579,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");
+ "fortran/gnu-fortran-command-options/"
+ "options-to-request-or-suppress-errors-and-warnings.html");
#endif
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v5)] options: Port get_option_url to Sphinx.
@ 2021-08-27 9:05 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-08-27 9:05 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:328c1dd3fdccb228548b9b94e5bf80190e3fdb9b
commit 328c1dd3fdccb228548b9b94e5bf80190e3fdb9b
Author: Martin Liska <mliska@suse.cz>
Date: Thu Aug 26 13:58:18 2021 +0200
options: Port get_option_url to Sphinx.
gcc/ChangeLog:
* opts.c (get_option_html_page): Port to Sphinx URLs.
(get_option_url): Likewise.
(test_get_option_html_page): Likewise.
Diff:
---
gcc/opts.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/gcc/opts.c b/gcc/opts.c
index e0501551ef5..afde9401589 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -3401,11 +3401,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
@@ -3416,10 +3416,11 @@ get_option_html_page (int option_index)
&& (cl_opt->flags & CL_CXX) == 0
#endif
)
- return "gfortran/Error-and-Warning-Options.html";
+ return "fortran/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
@@ -3435,13 +3436,13 @@ get_option_url (diagnostic_context *, int option_index)
DOCUMENTATION_ROOT_URL,
/* get_option_html_page will return something like
- "gcc/Warning-Options.html". */
+ "gcc-command-options/"
+ "options-to-request-or-suppress-warnings.html". */
get_option_html_page (option_index),
- /* Expect an anchor of the form "index-Wfoo" e.g.
- <a name="index-Wformat"></a>, and thus an id within
- the URL of "#index-Wformat". */
- "#index", cl_options[option_index].opt_text,
+ /* Expect an anchor of the form
+ "#cmdoption-Wunknown-pragmas". */
+ "#cmdoption", cl_options[option_index].opt_text,
NULL);
else
return NULL;
@@ -3578,12 +3579,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");
+ "fortran/gnu-fortran-command-options/"
+ "options-to-request-or-suppress-errors-and-warnings.html");
#endif
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gcc(refs/users/marxin/heads/sphinx-v5)] options: Port get_option_url to Sphinx.
@ 2021-08-26 11:58 Martin Liska
0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-08-26 11:58 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:143d3307d2fa607d1d1c6e990b8845e31469d4f3
commit 143d3307d2fa607d1d1c6e990b8845e31469d4f3
Author: Martin Liska <mliska@suse.cz>
Date: Thu Aug 26 13:58:18 2021 +0200
options: Port get_option_url to Sphinx.
gcc/ChangeLog:
* opts.c (get_option_html_page): Port to Sphinx URLs.
(get_option_url): Likewise.
(test_get_option_html_page): Likewise.
Diff:
---
gcc/opts.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/gcc/opts.c b/gcc/opts.c
index e0501551ef5..afde9401589 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -3401,11 +3401,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
@@ -3416,10 +3416,11 @@ get_option_html_page (int option_index)
&& (cl_opt->flags & CL_CXX) == 0
#endif
)
- return "gfortran/Error-and-Warning-Options.html";
+ return "fortran/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
@@ -3435,13 +3436,13 @@ get_option_url (diagnostic_context *, int option_index)
DOCUMENTATION_ROOT_URL,
/* get_option_html_page will return something like
- "gcc/Warning-Options.html". */
+ "gcc-command-options/"
+ "options-to-request-or-suppress-warnings.html". */
get_option_html_page (option_index),
- /* Expect an anchor of the form "index-Wfoo" e.g.
- <a name="index-Wformat"></a>, and thus an id within
- the URL of "#index-Wformat". */
- "#index", cl_options[option_index].opt_text,
+ /* Expect an anchor of the form
+ "#cmdoption-Wunknown-pragmas". */
+ "#cmdoption", cl_options[option_index].opt_text,
NULL);
else
return NULL;
@@ -3578,12 +3579,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");
+ "fortran/gnu-fortran-command-options/"
+ "options-to-request-or-suppress-errors-and-warnings.html");
#endif
}
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-27 9:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 8:05 [gcc(refs/users/marxin/heads/sphinx-v5)] options: Port get_option_url to Sphinx Martin Liska
-- strict thread matches above, loose matches on Subject: below --
2021-08-27 9:05 Martin Liska
2021-08-26 11:58 Martin Liska
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).