GCC Middle and Back End API Reference
diagnostic.h File Reference
#include "rich-location.h"
#include "pretty-print.h"
#include "diagnostic-core.h"
Include dependency graph for diagnostic.h:

Go to the source code of this file.

Data Structures

struct  diagnostic_info
 
struct  diagnostic_info::inlining_info
 
class  diagnostic_output_format
 
class  diagnostic_text_output_format
 
class  diagnostic_option_classifier
 
struct  diagnostic_option_classifier::diagnostic_classification_change_t
 
struct  diagnostic_source_printing_options
 
class  diagnostic_context
 

Namespaces

namespace  text_art
 
namespace  json
 

Macros

#define diagnostic_context_auxiliary_data(DC)   (DC)->m_client_aux_data
 
#define diagnostic_info_auxiliary_data(DI)   (DI)->x_data
 
#define diagnostic_format_decoder(DC)   ((DC)->printer->format_decoder)
 
#define diagnostic_prefixing_rule(DC)   ((DC)->printer->wrapping.rule)
 
#define errorcount   global_dc->diagnostic_count (DK_ERROR)
 
#define warningcount   global_dc->diagnostic_count (DK_WARNING)
 
#define werrorcount   global_dc->diagnostic_count (DK_WERROR)
 
#define sorrycount   global_dc->diagnostic_count (DK_SORRY)
 
#define diagnostic_report_warnings_p(DC, LOC)
 

Typedefs

typedef void(* diagnostic_starter_fn) (diagnostic_context *, const diagnostic_info *)
 
typedef void(* diagnostic_start_span_fn) (diagnostic_context *, expanded_location)
 
typedef void(* diagnostic_finalizer_fn) (diagnostic_context *, const diagnostic_info *, diagnostic_t)
 
typedef int(* diagnostic_option_enabled_cb) (int, unsigned, void *)
 
typedef char *(* diagnostic_make_option_name_cb) (const diagnostic_context *, int, diagnostic_t, diagnostic_t)
 
typedef char *(* diagnostic_make_option_url_cb) (const diagnostic_context *, int, unsigned)
 

Enumerations

enum  diagnostics_column_unit { DIAGNOSTICS_COLUMN_UNIT_DISPLAY , DIAGNOSTICS_COLUMN_UNIT_BYTE }
 
enum  diagnostics_escape_format { DIAGNOSTICS_ESCAPE_FORMAT_UNICODE , DIAGNOSTICS_ESCAPE_FORMAT_BYTES }
 
enum  diagnostics_output_format {
  DIAGNOSTICS_OUTPUT_FORMAT_TEXT , DIAGNOSTICS_OUTPUT_FORMAT_JSON_STDERR , DIAGNOSTICS_OUTPUT_FORMAT_JSON_FILE , DIAGNOSTICS_OUTPUT_FORMAT_SARIF_STDERR ,
  DIAGNOSTICS_OUTPUT_FORMAT_SARIF_FILE
}
 
enum  diagnostic_path_format { DPF_NONE , DPF_SEPARATE_EVENTS , DPF_INLINE_EVENTS }
 
enum  diagnostics_extra_output_kind { EXTRA_DIAGNOSTIC_OUTPUT_none , EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1 , EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2 }
 
enum  diagnostic_text_art_charset { DIAGNOSTICS_TEXT_ART_CHARSET_NONE , DIAGNOSTICS_TEXT_ART_CHARSET_ASCII , DIAGNOSTICS_TEXT_ART_CHARSET_UNICODE , DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI }
 

Functions

void diagnostic_inhibit_notes (diagnostic_context *context)
 
diagnostic_starter_fndiagnostic_starter (diagnostic_context *context)
 
diagnostic_start_span_fndiagnostic_start_span (diagnostic_context *context)
 
diagnostic_finalizer_fndiagnostic_finalizer (diagnostic_context *context)
 
void diagnostic_abort_on_error (diagnostic_context *context)
 
bool diagnostic_ready_p ()
 
void diagnostic_override_option_index (diagnostic_info *info, int optidx)
 
void diagnostic_initialize (diagnostic_context *context, int n_opts)
 
void diagnostic_color_init (diagnostic_context *context, int value=-1)
 
void diagnostic_urls_init (diagnostic_context *context, int value=-1)
 
void diagnostic_finish (diagnostic_context *context)
 
void diagnostic_report_current_module (diagnostic_context *context, location_t where)
 
void diagnostic_show_locus (diagnostic_context *context, rich_location *richloc, diagnostic_t diagnostic_kind, pretty_printer *pp=nullptr)
 
void diagnostic_initialize_input_context (diagnostic_context *context, diagnostic_input_charset_callback ccb, bool should_skip_bom)
 
diagnostic_t diagnostic_classify_diagnostic (diagnostic_context *context, int optidx, diagnostic_t kind, location_t where)
 
void diagnostic_push_diagnostics (diagnostic_context *context, location_t where)
 
void diagnostic_pop_diagnostics (diagnostic_context *context, location_t where)
 
bool diagnostic_report_diagnostic (diagnostic_context *context, diagnostic_info *diagnostic)
 
void diagnostic_set_info (diagnostic_info *, const char *, va_list *, rich_location *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2
 
void void diagnostic_set_info_translated (diagnostic_info *, const char *, va_list *, rich_location *, diagnostic_t) ATTRIBUTE_GCC_DIAG(2
 
void void void diagnostic_append_note (diagnostic_context *, location_t, const char *,...) ATTRIBUTE_GCC_DIAG(3
 
void void void chardiagnostic_build_prefix (diagnostic_context *, const diagnostic_info *)
 
void default_diagnostic_starter (diagnostic_context *, const diagnostic_info *)
 
void default_diagnostic_start_span_fn (diagnostic_context *, expanded_location)
 
void default_diagnostic_finalizer (diagnostic_context *, const diagnostic_info *, diagnostic_t)
 
void diagnostic_set_caret_max_width (diagnostic_context *context, int value)
 
void diagnostic_action_after_output (diagnostic_context *context, diagnostic_t diag_kind)
 
void diagnostic_check_max_errors (diagnostic_context *context, bool flush=false)
 
int get_terminal_width (void)
 
location_t diagnostic_location (const diagnostic_info *diagnostic, int which=0)
 
unsigned int diagnostic_num_locations (const diagnostic_info *diagnostic)
 
expanded_location diagnostic_expand_location (const diagnostic_info *diagnostic, int which=0)
 
bool diagnostic_same_line (const diagnostic_context *context, expanded_location s1, expanded_location s2)
 
const chardiagnostic_get_color_for_kind (diagnostic_t kind)
 
charfile_name_as_prefix (diagnostic_context *, const char *)
 
charbuild_message_string (const char *,...) ATTRIBUTE_PRINTF_1
 
void diagnostic_output_format_init (diagnostic_context *, const char *base_file_name, enum diagnostics_output_format, bool json_formatting)
 
void diagnostic_output_format_init_json_stderr (diagnostic_context *context, bool formatted)
 
void diagnostic_output_format_init_json_file (diagnostic_context *context, bool formatted, const char *base_file_name)
 
void diagnostic_output_format_init_sarif_stderr (diagnostic_context *context, bool formatted)
 
void diagnostic_output_format_init_sarif_file (diagnostic_context *context, bool formatted, const char *base_file_name)
 
void diagnostic_output_format_init_sarif_stream (diagnostic_context *context, bool formatted, FILE *stream)
 
int num_digits (int)
 
json::valuejson_from_expanded_location (diagnostic_context *context, location_t loc)
 
bool warning_enabled_at (location_t loc, int opt)
 
bool option_unspecified_p (int opt)
 
charget_cwe_url (int cwe)
 

Variables

diagnostic_contextglobal_dc
 
const int CARET_LINE_MARGIN = 10
 

Macro Definition Documentation

◆ diagnostic_context_auxiliary_data

#define diagnostic_context_auxiliary_data ( DC)    (DC)->m_client_aux_data
Extension hooks for client.   

◆ diagnostic_format_decoder

#define diagnostic_format_decoder ( DC)    ((DC)->printer->format_decoder)
Same as pp_format_decoder.  Works on 'diagnostic_context *'.   

Referenced by tree_diagnostics_defaults().

◆ diagnostic_info_auxiliary_data

#define diagnostic_info_auxiliary_data ( DI)    (DI)->x_data

◆ diagnostic_prefixing_rule

#define diagnostic_prefixing_rule ( DC)    ((DC)->printer->wrapping.rule)
Same as output_prefixing_rule.  Works on 'diagnostic_context *'.   

Referenced by common_handle_option().

◆ diagnostic_report_warnings_p

#define diagnostic_report_warnings_p ( DC,
LOC )
Value:
(!(DC)->m_inhibit_warnings \
&& !(in_system_header_at (LOC) && !(DC)->m_warn_system_headers))
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
int in_system_header_at(location_t loc)
Definition input.h:204
Returns nonzero if warnings should be emitted.   

Referenced by diagnostic_context::warning_enabled_at().

◆ errorcount

#define errorcount   global_dc->diagnostic_count (DK_ERROR)
The number of errors that have been issued so far.  Ideally, these
would take a diagnostic_context as an argument.   

Referenced by _fatal_insn(), driver::do_spec_on_infiles(), gimplify_bind_expr(), toplev::main(), driver::maybe_run_linker(), and seen_error().

◆ sorrycount

#define sorrycount   global_dc->diagnostic_count (DK_SORRY)
Similarly, but for sorrys.   

Referenced by seen_error().

◆ warningcount

#define warningcount   global_dc->diagnostic_count (DK_WARNING)
Similarly, but for warnings.   

Referenced by toplev::main().

◆ werrorcount

#define werrorcount   global_dc->diagnostic_count (DK_WERROR)
Similarly, but for warnings promoted to errors.   

Referenced by toplev::main().

Typedef Documentation

◆ diagnostic_finalizer_fn

typedef void(* diagnostic_finalizer_fn) (diagnostic_context *, const diagnostic_info *, diagnostic_t)

◆ diagnostic_make_option_name_cb

typedef char *(* diagnostic_make_option_name_cb) (const diagnostic_context *, int, diagnostic_t, diagnostic_t)

◆ diagnostic_make_option_url_cb

typedef char *(* diagnostic_make_option_url_cb) (const diagnostic_context *, int, unsigned)

◆ diagnostic_option_enabled_cb

typedef int(* diagnostic_option_enabled_cb) (int, unsigned, void *)

◆ diagnostic_start_span_fn

typedef void(* diagnostic_start_span_fn) (diagnostic_context *, expanded_location)

◆ diagnostic_starter_fn

typedef void(* diagnostic_starter_fn) (diagnostic_context *, const diagnostic_info *)
Forward declarations.   

Enumeration Type Documentation

◆ diagnostic_path_format

An enum for controlling how diagnostic_paths should be printed.   
Enumerator
DPF_NONE 
DPF_SEPARATE_EVENTS 
DPF_INLINE_EVENTS 

◆ diagnostic_text_art_charset

Values for -fdiagnostics-text-art-charset=.   
Enumerator
DIAGNOSTICS_TEXT_ART_CHARSET_NONE 
DIAGNOSTICS_TEXT_ART_CHARSET_ASCII 
DIAGNOSTICS_TEXT_ART_CHARSET_UNICODE 
DIAGNOSTICS_TEXT_ART_CHARSET_EMOJI 

◆ diagnostics_column_unit

An enum for controlling what units to use for the column number
when diagnostics are output, used by the -fdiagnostics-column-unit option.
Tabs will be expanded or not according to the value of -ftabstop.  The origin
(default 1) is controlled by -fdiagnostics-column-origin.   
Enumerator
DIAGNOSTICS_COLUMN_UNIT_DISPLAY 
DIAGNOSTICS_COLUMN_UNIT_BYTE 

◆ diagnostics_escape_format

An enum for controlling how to print non-ASCII characters/bytes when
a diagnostic suggests escaping the source code on output.   
Enumerator
DIAGNOSTICS_ESCAPE_FORMAT_UNICODE 
DIAGNOSTICS_ESCAPE_FORMAT_BYTES 

◆ diagnostics_extra_output_kind

An enum for capturing values of GCC_EXTRA_DIAGNOSTIC_OUTPUT,
and for -fdiagnostics-parseable-fixits.   
Enumerator
EXTRA_DIAGNOSTIC_OUTPUT_none 
EXTRA_DIAGNOSTIC_OUTPUT_fixits_v1 
EXTRA_DIAGNOSTIC_OUTPUT_fixits_v2 

◆ diagnostics_output_format

Enum for overriding the standard output format.   
Enumerator
DIAGNOSTICS_OUTPUT_FORMAT_TEXT 
DIAGNOSTICS_OUTPUT_FORMAT_JSON_STDERR 
DIAGNOSTICS_OUTPUT_FORMAT_JSON_FILE 
DIAGNOSTICS_OUTPUT_FORMAT_SARIF_STDERR 
DIAGNOSTICS_OUTPUT_FORMAT_SARIF_FILE 

Function Documentation

◆ build_message_string()

char * build_message_string ( const char * msg,
... )
extern
Return a malloc'd string containing MSG formatted a la printf.  The
caller is responsible for freeing the memory.   

References ap, ggc_alloc(), and msg.

Referenced by diagnostic_build_prefix(), file_name_as_prefix(), and diagnostic_context::get_location_text().

◆ default_diagnostic_finalizer()

◆ default_diagnostic_start_span_fn()

◆ default_diagnostic_starter()

◆ diagnostic_abort_on_error()

void diagnostic_abort_on_error ( diagnostic_context * context)
inline
Raise SIGABRT on any diagnostic of severity DK_ERROR or higher.   

References diagnostic_context::m_abort_on_error.

Referenced by setup_core_dumping().

◆ diagnostic_action_after_output()

void diagnostic_action_after_output ( diagnostic_context * context,
diagnostic_t diag_kind )
inline

◆ diagnostic_append_note()

void void void diagnostic_append_note ( diagnostic_context * ,
location_t ,
const char * ,
... )
extern

◆ diagnostic_build_prefix()

void void void char * diagnostic_build_prefix ( diagnostic_context * context,
const diagnostic_info * diagnostic )
extern
Return a malloc'd string describing a location and the severity of the
diagnostic, e.g. "foo.c:42:10: error: ".  The caller is responsible for
freeing the memory.   

References _, build_message_string(), colorize_start(), colorize_stop(), diagnostic_expand_location(), diagnostic_kind_color, diagnostic_kind_text, DK_LAST_DIAGNOSTIC_KIND, gcc_assert, diagnostic_context::get_location_text(), ggc_alloc(), pp_show_color, and diagnostic_context::printer.

Referenced by default_diagnostic_starter(), default_tree_diagnostic_starter(), and diagnostic_append_note().

◆ diagnostic_check_max_errors()

void diagnostic_check_max_errors ( diagnostic_context * context,
bool flush = false )
inline

◆ diagnostic_classify_diagnostic()

diagnostic_t diagnostic_classify_diagnostic ( diagnostic_context * context,
int optidx,
diagnostic_t kind,
location_t where )
inline
Force diagnostics controlled by OPTIDX to be kind KIND.   

References diagnostic_context::classify_diagnostic(), and ggc_alloc().

Referenced by control_warning_option(), process_options(), and set_option().

◆ diagnostic_color_init()

◆ diagnostic_expand_location()

expanded_location diagnostic_expand_location ( const diagnostic_info * diagnostic,
int which = 0 )
inline
Expand the location of this diagnostic. Use this function for
consistency.  Parameter WHICH specifies which location. By default,
expand the first one.   

References ggc_alloc().

Referenced by diagnostic_build_prefix().

◆ diagnostic_finalizer()

diagnostic_finalizer_fn & diagnostic_finalizer ( diagnostic_context * context)
inline
Client supplied function called after a diagnostic message is
displayed (for text-based diagnostic output).   

Referenced by diagnostic_text_output_format::on_end_diagnostic(), and tree_diagnostics_defaults().

◆ diagnostic_finish()

void diagnostic_finish ( diagnostic_context * context)
inline

◆ diagnostic_get_color_for_kind()

const char * diagnostic_get_color_for_kind ( diagnostic_t kind)
extern
Get a color name for diagnostics of type KIND
Result could be NULL.   

References diagnostic_kind_color.

◆ diagnostic_inhibit_notes()

void diagnostic_inhibit_notes ( diagnostic_context * context)
inline

◆ diagnostic_initialize()

void diagnostic_initialize ( diagnostic_context * context,
int n_opts )
inline
Diagnostic related functions.   

References ggc_alloc(), and diagnostic_context::initialize().

Referenced by general_init(), driver::global_initializations(), main(), main(), and main().

◆ diagnostic_initialize_input_context()

void diagnostic_initialize_input_context ( diagnostic_context * context,
diagnostic_input_charset_callback ccb,
bool should_skip_bom )
inline
Because we read source files a second time after the frontend did it the
first time, we need to know how the frontend handled things like character
set conversion and UTF-8 BOM stripping, in order to make everything
consistent.  This function needs to be called by each frontend that requires
non-default behavior, to inform the diagnostics infrastructure how input is
to be processed.  The default behavior is to do no conversion and not to
strip a UTF-8 BOM.

The callback should return the input charset to be used to convert the given
file's contents to UTF-8, or it should return NULL if no conversion is needed
for this file.  SHOULD_SKIP_BOM only applies in case no conversion was
performed, and if true, it will cause a UTF-8 BOM to be skipped at the
beginning of the file.  (In case a conversion was performed, the BOM is
rather skipped as part of the conversion process.)   

References diagnostic_context::initialize_input_context().

◆ diagnostic_location()

location_t diagnostic_location ( const diagnostic_info * diagnostic,
int which = 0 )
inline
Return the location associated to this diagnostic. Parameter WHICH
specifies which location. By default, expand the first one.   

References ggc_alloc().

Referenced by default_diagnostic_starter(), diagnostic_report_current_function(), diagnostic_context::get_any_inlining_info(), diagnostic_context::report_diagnostic(), set_inlining_locations(), and virt_loc_aware_diagnostic_finalizer().

◆ diagnostic_num_locations()

unsigned int diagnostic_num_locations ( const diagnostic_info * diagnostic)
inline
Return the number of locations to be printed in DIAGNOSTIC.   

References ggc_alloc().

◆ diagnostic_output_format_init()

◆ diagnostic_output_format_init_json_file()

void diagnostic_output_format_init_json_file ( diagnostic_context * context,
bool formatted,
const char * base_file_name )
extern
Populate CONTEXT in preparation for JSON output to a file named
BASE_FILE_NAME.gcc.json.   

References base_file_name(), diagnostic_output_format_init_json(), ggc_alloc(), and diagnostic_context::set_output_format().

Referenced by diagnostic_output_format_init().

◆ diagnostic_output_format_init_json_stderr()

void diagnostic_output_format_init_json_stderr ( diagnostic_context * context,
bool formatted )
extern
Populate CONTEXT in preparation for JSON output to stderr.   

References diagnostic_output_format_init_json(), ggc_alloc(), and diagnostic_context::set_output_format().

Referenced by diagnostic_output_format_init().

◆ diagnostic_output_format_init_sarif_file()

void diagnostic_output_format_init_sarif_file ( diagnostic_context * context,
bool formatted,
const char * base_file_name )
extern
Populate CONTEXT in preparation for SARIF output to a file named
BASE_FILE_NAME.sarif.   

References base_file_name(), diagnostic_output_format_init_sarif(), ggc_alloc(), and diagnostic_context::set_output_format().

Referenced by diagnostic_output_format_init().

◆ diagnostic_output_format_init_sarif_stderr()

void diagnostic_output_format_init_sarif_stderr ( diagnostic_context * context,
bool formatted )
extern
Populate CONTEXT in preparation for SARIF output to stderr.   

References diagnostic_output_format_init_sarif(), ggc_alloc(), and diagnostic_context::set_output_format().

Referenced by diagnostic_output_format_init().

◆ diagnostic_output_format_init_sarif_stream()

void diagnostic_output_format_init_sarif_stream ( diagnostic_context * context,
bool formatted,
FILE * stream )
extern
Populate CONTEXT in preparation for SARIF output to STREAM.   

References diagnostic_output_format_init_sarif(), ggc_alloc(), and diagnostic_context::set_output_format().

◆ diagnostic_override_option_index()

void diagnostic_override_option_index ( diagnostic_info * info,
int optidx )
inline
Override the option index to be used for reporting a
diagnostic.   

References ggc_alloc(), and diagnostic_info::option_index.

◆ diagnostic_pop_diagnostics()

void diagnostic_pop_diagnostics ( diagnostic_context * context,
location_t where )
inline

◆ diagnostic_push_diagnostics()

void diagnostic_push_diagnostics ( diagnostic_context * context,
location_t where )
inline

◆ diagnostic_ready_p()

bool diagnostic_ready_p ( )
inline
Returns whether the diagnostic framework has been intialized already and is
ready for use.   

References global_dc, and diagnostic_context::printer.

◆ diagnostic_report_current_module()

void diagnostic_report_current_module ( diagnostic_context * context,
location_t where )
inline

◆ diagnostic_report_diagnostic()

bool diagnostic_report_diagnostic ( diagnostic_context * context,
diagnostic_info * diagnostic )
inline
Report a diagnostic message (an error or a warning) as specified by
DC.  This function is *the* subroutine in terms of which front-ends
should implement their specific diagnostic handling modules.  The
front-end independent format specifiers are exactly those described
in the documentation of output_format.
Return true if a diagnostic was printed, false otherwise.   

References ggc_alloc(), and diagnostic_context::report_diagnostic().

Referenced by diagnostic_for_asm(), and format_string_diagnostic_t::emit_warning_n_va().

◆ diagnostic_same_line()

bool diagnostic_same_line ( const diagnostic_context * context,
expanded_location s1,
expanded_location s2 )
inline
Return true if the two locations can be represented within the same
caret line.  This is used to build a prefix and also to determine
whether to print one or two caret lines.   

References CARET_LINE_MARGIN, ggc_alloc(), diagnostic_context::m_source_printing, and diagnostic_source_printing_options::max_width.

◆ diagnostic_set_caret_max_width()

◆ diagnostic_set_info()

void diagnostic_set_info ( diagnostic_info * ,
const char * ,
va_list * ,
rich_location * ,
diagnostic_t  )
extern

◆ diagnostic_set_info_translated()

void void diagnostic_set_info_translated ( diagnostic_info * ,
const char * ,
va_list * ,
rich_location * ,
diagnostic_t  )
extern

◆ diagnostic_show_locus()

void diagnostic_show_locus ( diagnostic_context * context,
rich_location * richloc,
diagnostic_t diagnostic_kind,
pretty_printer * pp = nullptr )
inline

◆ diagnostic_start_span()

diagnostic_start_span_fn & diagnostic_start_span ( diagnostic_context * context)
inline
Client supplied function called between disjoint spans of source code,
so that the context can print
something to indicate that a new span of source code has begun.   

◆ diagnostic_starter()

diagnostic_starter_fn & diagnostic_starter ( diagnostic_context * context)
inline
Client supplied function to announce a diagnostic
(for text-based diagnostic output).   

Referenced by diagnostic_text_output_format::on_begin_diagnostic(), and tree_diagnostics_defaults().

◆ diagnostic_urls_init()

◆ file_name_as_prefix()

char * file_name_as_prefix ( diagnostic_context * context,
const char * f )
extern
Pure text formatting support functions.   
Same as diagnostic_build_prefix, but only the source FILE is given.   

References build_message_string(), colorize_start(), colorize_stop(), ggc_alloc(), pp_show_color, and diagnostic_context::printer.

Referenced by lhd_print_error_function().

◆ get_cwe_url()

char * get_cwe_url ( int cwe)
extern
Generate a URL string describing CWE.  The caller is responsible for
freeing the string.   

References ggc_alloc().

Referenced by sarif_builder::make_reporting_descriptor_object_for_cwe_id(), and diagnostic_context::print_any_cwe().

◆ get_terminal_width()

int get_terminal_width ( void )
Return the value of the getenv("COLUMNS") as an integer. If the
value is not set to a positive integer, use ioctl to get the
terminal width. If it fails, return INT_MAX.   

References ggc_alloc(), INT_MAX, and NULL.

Referenced by diagnostic_set_caret_max_width(), and print_specific_help().

◆ json_from_expanded_location()

◆ num_digits()

int num_digits ( int value)
extern
Compute the number of digits in the decimal representation of an integer.   
Get the number of digits in the decimal representation of VALUE.   

References gcc_assert, and ggc_alloc().

Referenced by dump_location_info().

◆ option_unspecified_p()

bool option_unspecified_p ( int opt)
inline

◆ warning_enabled_at()

bool warning_enabled_at ( location_t loc,
int opt )
inline

Variable Documentation

◆ CARET_LINE_MARGIN

const int CARET_LINE_MARGIN = 10
This is somehow the right-side margin of a caret line, that is, we
print at least these many characters after the position pointed at
by the caret.   

Referenced by diagnostic_same_line().

◆ global_dc