Mercurial > hg > CbC > CbC_gcc
comparison gcc/diagnostic.h @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | b7f97abdc517 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
1 /* Various declarations for language-independent diagnostics subroutines. | 1 /* Various declarations for language-independent diagnostics subroutines. |
2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 | 2 Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
3 Free Software Foundation, Inc. | 3 Free Software Foundation, Inc. |
4 Contributed by Gabriel Dos Reis <gdr@codesourcery.com> | 4 Contributed by Gabriel Dos Reis <gdr@codesourcery.com> |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
26 #include "options.h" | 26 #include "options.h" |
27 | 27 |
28 /* Constants used to discriminate diagnostics. */ | 28 /* Constants used to discriminate diagnostics. */ |
29 typedef enum | 29 typedef enum |
30 { | 30 { |
31 #define DEFINE_DIAGNOSTIC_KIND(K, msgid) K, | 31 #define DEFINE_DIAGNOSTIC_KIND(K, msgid) K, |
32 #include "diagnostic.def" | 32 #include "diagnostic.def" |
33 #undef DEFINE_DIAGNOSTIC_KIND | 33 #undef DEFINE_DIAGNOSTIC_KIND |
34 DK_LAST_DIAGNOSTIC_KIND | 34 DK_LAST_DIAGNOSTIC_KIND |
35 } diagnostic_t; | 35 } diagnostic_t; |
36 | 36 |
39 list in diagnostic.def. */ | 39 list in diagnostic.def. */ |
40 typedef struct diagnostic_info | 40 typedef struct diagnostic_info |
41 { | 41 { |
42 text_info message; | 42 text_info message; |
43 location_t location; | 43 location_t location; |
44 unsigned int override_column; | |
44 /* TREE_BLOCK if the diagnostic is to be reported in some inline | 45 /* TREE_BLOCK if the diagnostic is to be reported in some inline |
45 function inlined into other function, otherwise NULL. */ | 46 function inlined into other function, otherwise NULL. */ |
46 tree abstract_origin; | 47 tree abstract_origin; |
47 /* The kind of diagnostic it is about. */ | 48 /* The kind of diagnostic it is about. */ |
48 diagnostic_t kind; | 49 diagnostic_t kind; |
67 int diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]; | 68 int diagnostic_count[DK_LAST_DIAGNOSTIC_KIND]; |
68 | 69 |
69 /* True if we should display the "warnings are being tread as error" | 70 /* True if we should display the "warnings are being tread as error" |
70 message, usually displayed once per compiler run. */ | 71 message, usually displayed once per compiler run. */ |
71 bool issue_warnings_are_errors_message; | 72 bool issue_warnings_are_errors_message; |
72 | 73 |
73 /* True if it has been requested that warnings be treated as errors. */ | 74 /* True if it has been requested that warnings be treated as errors. */ |
74 bool warning_as_error_requested; | 75 bool warning_as_error_requested; |
75 | 76 |
76 /* For each option index that can be passed to warning() et all | 77 /* For each option index that can be passed to warning() et all |
77 (OPT_* from options.h), this array may contain a new kind that | 78 (OPT_* from options.h), this array may contain a new kind that |
182 #define diagnostic_report_warnings_p(LOC) \ | 183 #define diagnostic_report_warnings_p(LOC) \ |
183 (!inhibit_warnings \ | 184 (!inhibit_warnings \ |
184 && !(in_system_header_at (LOC) && !warn_system_headers)) | 185 && !(in_system_header_at (LOC) && !warn_system_headers)) |
185 | 186 |
186 #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) | 187 #define report_diagnostic(D) diagnostic_report_diagnostic (global_dc, D) |
188 | |
189 /* Override the column number to be used for reporting a | |
190 diagnostic. */ | |
191 #define diagnostic_override_column(DI, COL) (DI)->override_column = (COL) | |
187 | 192 |
188 /* Diagnostic related functions. */ | 193 /* Diagnostic related functions. */ |
189 extern void diagnostic_initialize (diagnostic_context *); | 194 extern void diagnostic_initialize (diagnostic_context *); |
190 extern void diagnostic_report_current_module (diagnostic_context *); | 195 extern void diagnostic_report_current_module (diagnostic_context *); |
191 extern void diagnostic_report_current_function (diagnostic_context *, | 196 extern void diagnostic_report_current_function (diagnostic_context *, |
206 ATTRIBUTE_GCC_DIAG(2,0); | 211 ATTRIBUTE_GCC_DIAG(2,0); |
207 extern bool emit_diagnostic (diagnostic_t, location_t, int, | 212 extern bool emit_diagnostic (diagnostic_t, location_t, int, |
208 const char *, ...) ATTRIBUTE_GCC_DIAG(4,5); | 213 const char *, ...) ATTRIBUTE_GCC_DIAG(4,5); |
209 #endif | 214 #endif |
210 extern char *diagnostic_build_prefix (diagnostic_info *); | 215 extern char *diagnostic_build_prefix (diagnostic_info *); |
216 void default_diagnostic_starter (diagnostic_context *, diagnostic_info *); | |
217 void default_diagnostic_finalizer (diagnostic_context *, diagnostic_info *); | |
211 | 218 |
212 /* Pure text formatting support functions. */ | 219 /* Pure text formatting support functions. */ |
213 extern char *file_name_as_prefix (const char *); | 220 extern char *file_name_as_prefix (const char *); |
214 | 221 |
215 /* In tree-pretty-print.c */ | 222 /* In tree-pretty-print.c */ |
219 extern void print_generic_stmt_indented (FILE *, tree, int, int); | 226 extern void print_generic_stmt_indented (FILE *, tree, int, int); |
220 extern void print_generic_expr (FILE *, tree, int); | 227 extern void print_generic_expr (FILE *, tree, int); |
221 extern void print_generic_decl (FILE *, tree, int); | 228 extern void print_generic_decl (FILE *, tree, int); |
222 extern void debug_c_tree (tree); | 229 extern void debug_c_tree (tree); |
223 extern void dump_omp_clauses (pretty_printer *, tree, int, int); | 230 extern void dump_omp_clauses (pretty_printer *, tree, int, int); |
231 extern void print_call_name (pretty_printer *, tree, int); | |
224 | 232 |
225 /* In gimple-pretty-print.c */ | 233 /* In gimple-pretty-print.c */ |
226 extern void debug_generic_expr (tree); | 234 extern void debug_generic_expr (tree); |
227 extern void debug_generic_stmt (tree); | 235 extern void debug_generic_stmt (tree); |
228 extern void debug_tree_chain (tree); | 236 extern void debug_tree_chain (tree); |
231 extern void print_gimple_seq (FILE *, gimple_seq, int, int); | 239 extern void print_gimple_seq (FILE *, gimple_seq, int, int); |
232 extern void print_gimple_stmt (FILE *, gimple, int, int); | 240 extern void print_gimple_stmt (FILE *, gimple, int, int); |
233 extern void print_gimple_expr (FILE *, gimple, int, int); | 241 extern void print_gimple_expr (FILE *, gimple, int, int); |
234 extern void dump_gimple_stmt (pretty_printer *, gimple, int, int); | 242 extern void dump_gimple_stmt (pretty_printer *, gimple, int, int); |
235 | 243 |
244 /* In toplev.c */ | |
245 extern bool default_tree_printer (pretty_printer *, text_info *, const char *, | |
246 int, bool, bool, bool); | |
247 | |
236 #endif /* ! GCC_DIAGNOSTIC_H */ | 248 #endif /* ! GCC_DIAGNOSTIC_H */ |