GCC Middle and Back End API Reference
diagnostic-url.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  diagnostic_url_rule_t { DIAGNOSTICS_URL_NO = 0 , DIAGNOSTICS_URL_YES = 1 , DIAGNOSTICS_URL_AUTO = 2 }
 
enum  diagnostic_url_format { URL_FORMAT_NONE , URL_FORMAT_ST , URL_FORMAT_BEL }
 

Functions

diagnostic_url_format determine_url_format (diagnostic_url_rule_t)
 

Variables

const diagnostic_url_format URL_FORMAT_DEFAULT = URL_FORMAT_BEL
 

Enumeration Type Documentation

◆ diagnostic_url_format

Tells whether URLs should be emitted, and, if so, how to
terminate strings within the escape sequence.    
Enumerator
URL_FORMAT_NONE 
URL_FORMAT_ST 
URL_FORMAT_BEL 

◆ diagnostic_url_rule_t

Copyright (C) 2019-2024 Free Software Foundation, Inc.
   Contributed by David Malcolm <dmalcolm@redhat.com>.

This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.   
Whether to add URLs to diagnostics:
- DIAGNOSTICS_URL_NO: never
- DIAGNOSTICS_URL_YES: always
- DIAGNOSTICS_URL_AUTO: depending on the output stream.   
Enumerator
DIAGNOSTICS_URL_NO 
DIAGNOSTICS_URL_YES 
DIAGNOSTICS_URL_AUTO 

Function Documentation

◆ determine_url_format()

diagnostic_url_format determine_url_format ( diagnostic_url_rule_t rule)
extern
Determine if URLs should be enabled, based on RULE,
and, if so, which format to use.
This reuses the logic for colorization.   

References auto_enable_urls(), DIAGNOSTICS_URL_AUTO, DIAGNOSTICS_URL_NO, DIAGNOSTICS_URL_YES, gcc_unreachable, parse_env_vars_for_urls(), and URL_FORMAT_NONE.

Referenced by diagnostic_context::urls_init().

Variable Documentation

◆ URL_FORMAT_DEFAULT

const diagnostic_url_format URL_FORMAT_DEFAULT = URL_FORMAT_BEL

Referenced by parse_env_vars_for_urls().