Go to file
David Malcolm d260823576 pretty-print: support URL escape sequences (PR 87488)
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
describes an emerging standard for embedding URLs in escape sequences
for marking up text output.  This is supported e.g. by recent releases
of GNOME Terminal.

This patch adds support to our pretty-printing framework for emitting
URLs.

A followup patch uses this to add URLs to the pertinent documentation
for the output of -fdiagnostics-show-option.

gcc/ChangeLog:
	PR 87488
	* common.opt (fdiagnostics-urls=): New option.
	(diagnostic-url.h): Add SourceInclude.
	(diagnostic_url_rule): New enum.
	* diagnostic-color.c: Include "diagnostic-url.h".
	(diagnostic_urls_enabled_p): New function.
	* diagnostic-url.h: New file.
	* diagnostic.c: Include "diagnostic-url.h".
	(diagnostic_urls_init): New function.
	* diagnostic.h (diagnostic_urls_init): New decl.
	* doc/invoke.texi (Diagnostic Message Formatting Options): Add
	-fdiagnostics-urls to the list.
	(-fdiagnostics-urls): New option.
	* gcc.c (driver_handle_option): Handle OPT_fdiagnostics_urls_.
	(driver::global_initializations): Call diagnostic_urls_init.
	* opts-global.c (init_options_once): Likewise.
	* opts.c (common_handle_option): Handle OPT_fdiagnostics_urls_.
	* pretty-print.c (pretty_printer::pretty_printer): Initialize
	show_urls.
	(pp_begin_url): New function.
	(pp_end_url): New function.
	(selftest::test_urls): New selftest.
	(selftest::pretty_print_c_tests): Call it.
	* pretty-print.h (pretty_printer::show_urls): New field.
	(pp_begin_url): New decl.
	(pp_end_url): New decl.

gcc/testsuite/ChangeLog:
	PR 87488
	* lib/prune.exp (TEST_ALWAYS_FLAGS): Add -fdiagnostics-urls=never.

From-SVN: r276841
2019-10-10 16:57:30 +00:00
INSTALL
config [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
contrib Tweak clang-format configuration. 2019-09-18 13:32:25 +00:00
fixincludes [Darwin, fixincludes] Fix PR83531 2019-08-18 18:54:13 +00:00
gcc pretty-print: support URL escape sequences (PR 87488) 2019-10-10 16:57:30 +00:00
gnattools PR81878: fix --disable-bootstrap --enable-languages=ada 2018-11-20 00:07:47 +00:00
gotools libgo: update to Go 1.13beta1 release 2019-09-06 18:12:46 +00:00
include Fix file descriptor existence of MinGW. 2019-08-08 07:50:28 +00:00
intl iconv.m4 (AM_ICONV_LINK): Don't overwrite CPPFLAGS. 2018-11-07 15:41:21 -07:00
libada libada: Respect `--enable-version-specific-runtime-libs' 2019-10-01 19:14:11 +00:00
libatomic Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libbacktrace Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libcc1 Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libcpp [preprocessor/91991] column location overflow 2019-10-04 19:08:09 +00:00
libdecnumber Update copyright years. 2019-01-01 13:31:55 +01:00
libffi Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libgcc fptr.c: Disable -Warray-bounds warning. 2019-10-03 23:51:42 +00:00
libgfortran Extend 'libgfortran/runtime/minimal.c' per r274599 "PR fortran/68401 Improve allocation error message" 2019-10-08 12:20:41 +02:00
libgo runtime: mark go-context.S as no-executable-stack and split-stack supported 2019-10-02 20:11:35 +00:00
libgomp [PR92036] Add 'libgomp.oacc-c-c++-common/data-firstprivate-1.c' 2019-10-09 13:31:14 +02:00
libhsail-rt Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libiberty rust-demangle.c (looks_like_rust): Remove. 2019-10-03 15:54:47 -06:00
libitm Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libobjc Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
liboffloadmic Regenerate `liboffloadmic/plugin/configure' for r275564 ("[ARM/FDPIC v6 02/24] [ARM] FDPIC... 2019-10-01 19:57:44 +00:00
libphobos Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libquadmath Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libsanitizer Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libssp Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
libstdc++-v3 PR libstdc++/91057 fix bootstrap failure on powerpc 2019-10-10 17:16:17 +01:00
libvtv Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
lto-plugin Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
maintainer-scripts update_web_docs_svn: Proceed even if the invocation of sphinx fails. 2019-08-04 22:31:54 +00:00
zlib Regenerate `configure' scripts for `uclinuxfdpiceabi' libtool.m4 update 2019-09-27 21:24:42 +00:00
.dir-locals.el
.gitattributes
.gitignore Add .clangd and compile_commands.json to .gitignore. 2019-08-28 19:33:28 +00:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Remove Cell Broadband Engine SPU targets 2019-10-08 12:20:50 +02:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS Remove Cell Broadband Engine SPU targets 2019-10-08 12:20:50 +02:00
Makefile.def Sync top-level change from gdb 2019-06-15 21:32:03 +00:00
Makefile.in Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
Makefile.tpl Makefile.tpl (HOST_EXPORTS): Add CXX_FOR_BUILD. 2019-08-23 15:37:22 -06:00
README
ar-lib Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
compile
config-ml.in Add D front-end, libphobos library, and D2 testsuite. 2018-10-28 19:51:47 +00:00
config.guess Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
config.rpath
config.sub Update config.sub and config.guess. 2019-09-09 11:14:32 +02:00
configure GCC port for eBPF 2019-09-09 12:13:23 +02:00
configure.ac GCC port for eBPF 2019-09-09 12:13:23 +02:00
depcomp
install-sh
libtool-ldflags
libtool.m4 [ARM/FDPIC v6 02/24] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts 2019-09-10 09:37:00 +02:00
ltgcc.m4
ltmain.sh libtool.m4: Sort output of 'find' to enable deterministic builds. 2018-07-05 13:13:45 -06:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
symlink-tree
test-driver Update GCC to autoconf 2.69, automake 1.15.1 (PR bootstrap/82856). 2018-10-31 17:03:16 +00:00
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.