]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/opts.c
diagnostics: Add %{...%} pretty-format support for URLs and use it in -Wpsabi diagnostics
[thirdparty/gcc.git] / gcc / opts.c
index c212a1a57dcfbdfb9cb419bfeaeb17aa9f23fdb0..12c0098f6b8e023753b0178f868150682ef3d0f7 100644 (file)
@@ -3190,6 +3190,16 @@ get_option_url (diagnostic_context *, int option_index)
     return NULL;
 }
 
+/* Given "gcc-10/changes.html#foobar", return that URL under
+   CHANGES_ROOT_URL (see --with-changes-root-url).
+   The caller is responsible for freeing the returned string.  */
+
+char *
+get_changes_url (const char *str)
+{
+  return concat (CHANGES_ROOT_URL, str, NULL);
+}
+
 #if CHECKING_P
 
 namespace selftest {