GCC Middle and Back End API Reference
diagnostic.h File Reference

Go to the source code of this file.

Data Structures

struct  diagnostic_info
struct  diagnostic_classification_change_t
struct  diagnostic_context

Typedefs

typedef struct diagnostic_info diagnostic_info
typedef struct
diagnostic_classification_change_t 
diagnostic_classification_change_t
typedef void(* diagnostic_starter_fn )(diagnostic_context *, diagnostic_info *)
typedef diagnostic_starter_fn diagnostic_finalizer_fn

Functions

static void diagnostic_inhibit_notes ()
void diagnostic_initialize (diagnostic_context *, int)
void diagnostic_finish (diagnostic_context *)
void diagnostic_report_current_module (diagnostic_context *, location_t)
void diagnostic_show_locus (diagnostic_context *, const diagnostic_info *)
diagnostic_t diagnostic_classify_diagnostic (diagnostic_context *, int, diagnostic_t, location_t)
void diagnostic_push_diagnostics (diagnostic_context *, location_t)
void diagnostic_pop_diagnostics (diagnostic_context *, location_t)
bool diagnostic_report_diagnostic (diagnostic_context *, diagnostic_info *)
void diagnostic_set_info (diagnostic_info *, const char *, va_list *, location_t, diagnostic_t) ATTRIBUTE_GCC_DIAG(2
void void diagnostic_set_info_translated (diagnostic_info *, const char *, va_list *, location_t, 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 char * diagnostic_build_prefix (diagnostic_context *, const diagnostic_info *)
void default_diagnostic_starter (diagnostic_context *, diagnostic_info *)
void default_diagnostic_finalizer (diagnostic_context *, diagnostic_info *)
void diagnostic_set_caret_max_width (diagnostic_context *context, int value)
char * file_name_as_prefix (diagnostic_context *, const char *)

Variables

diagnostic_contextglobal_dc

Typedef Documentation

Each time a diagnostic's classification is changed with a pragma,
   we record the change and the location of the change in an array of
   these structs.   
A diagnostic is described by the MESSAGE to send, the FILE and LINE of
   its context and its KIND (ice, error, warning, note, ...)  See complete
   list in diagnostic.def.   
typedef void(* diagnostic_starter_fn)(diagnostic_context *, diagnostic_info *)
Forward declarations.   

Function Documentation

void default_diagnostic_finalizer ( diagnostic_context ,
diagnostic_info  
)
void void void diagnostic_append_note ( diagnostic_context ,
location_t  ,
const char *  ,
  ... 
)
diagnostic_t diagnostic_classify_diagnostic ( diagnostic_context context,
int  option_index,
diagnostic_t  new_kind,
location_t  where 
)
Force diagnostics controlled by OPTIDX to be kind KIND.   
Interface to specify diagnostic kind overrides.  Returns the
   previous setting, or DK_UNSPECIFIED if the parameters are out of
   range.  If OPTION_INDEX is zero, the new setting is for all the
   diagnostics.   

References diagnostic_context::classification_history, diagnostic_context::classify_diagnostic, DK_LAST_DIAGNOSTIC_KIND, diagnostic_classification_change_t::kind, diagnostic_classification_change_t::location, diagnostic_context::n_classification_history, diagnostic_context::n_opts, and diagnostic_classification_change_t::option.

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

void diagnostic_finish ( diagnostic_context )
static void diagnostic_inhibit_notes ( )
inlinestatic
void diagnostic_initialize ( diagnostic_context ,
int   
)
Diagnostic related functions.   
void diagnostic_pop_diagnostics ( diagnostic_context ,
location_t   
)
void diagnostic_push_diagnostics ( diagnostic_context ,
location_t   
)
void diagnostic_report_current_module ( diagnostic_context ,
location_t   
)
bool diagnostic_report_diagnostic ( diagnostic_context context,
diagnostic_info diagnostic 
)
void diagnostic_set_caret_max_width ( diagnostic_context context,
int  value 
)
void diagnostic_set_info ( diagnostic_info ,
const char *  ,
va_list *  ,
location_t  ,
diagnostic_t   
)
void void diagnostic_set_info_translated ( diagnostic_info ,
const char *  ,
va_list *  ,
location_t  ,
diagnostic_t   
)
char* file_name_as_prefix ( diagnostic_context ,
const char *   
)
Pure text formatting support functions.   

Variable Documentation

diagnostic_context* global_dc
This diagnostic_context is used by front-ends that directly output
   diagnostic messages without going through `error', `warning',
   and similar functions.   

Referenced by announce_function(), do_self_spec(), driver_handle_option(), emit_diagnostic(), free_lang_data(), general_init(), init_options_once(), lang_handle_option(), main(), permerror(), print_usage(), process_command(), process_options(), target_handle_option(), toplev_main(), and verbatim().