Mercurial > hg > CbC > CbC_gcc
comparison gcc/diagnostic-core.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Declarations of core diagnostic functionality for code that does | 1 /* Declarations of core diagnostic functionality for code that does |
2 not need to deal with diagnostic contexts or diagnostic info | 2 not need to deal with diagnostic contexts or diagnostic info |
3 structures. | 3 structures. |
4 Copyright (C) 1998-2017 Free Software Foundation, Inc. | 4 Copyright (C) 1998-2018 Free Software Foundation, Inc. |
5 | 5 |
6 This file is part of GCC. | 6 This file is part of GCC. |
7 | 7 |
8 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
9 the terms of the GNU General Public License as published by the Free | 9 the terms of the GNU General Public License as published by the Free |
34 /* This is used for tagging pragma pops in the diagnostic | 34 /* This is used for tagging pragma pops in the diagnostic |
35 classification history chain. */ | 35 classification history chain. */ |
36 DK_POP | 36 DK_POP |
37 } diagnostic_t; | 37 } diagnostic_t; |
38 | 38 |
39 /* RAII-style class for grouping related diagnostics. */ | |
40 | |
41 class auto_diagnostic_group | |
42 { | |
43 public: | |
44 auto_diagnostic_group (); | |
45 ~auto_diagnostic_group (); | |
46 }; | |
47 | |
39 extern const char *progname; | 48 extern const char *progname; |
40 | 49 |
41 extern const char *trim_filename (const char *); | 50 extern const char *trim_filename (const char *); |
42 | 51 |
43 /* If we haven't already defined a front-end-specific diagnostics | 52 /* If we haven't already defined a front-end-specific diagnostics |
57 ATTRIBUTE_NORETURN; | 66 ATTRIBUTE_NORETURN; |
58 extern void internal_error_no_backtrace (const char *, ...) | 67 extern void internal_error_no_backtrace (const char *, ...) |
59 ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; | 68 ATTRIBUTE_GCC_DIAG(1,2) ATTRIBUTE_NORETURN; |
60 /* Pass one of the OPT_W* from options.h as the first parameter. */ | 69 /* Pass one of the OPT_W* from options.h as the first parameter. */ |
61 extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); | 70 extern bool warning (int, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); |
62 extern bool warning_n (location_t, int, int, const char *, const char *, ...) | 71 extern bool warning_n (location_t, int, unsigned HOST_WIDE_INT, |
72 const char *, const char *, ...) | |
63 ATTRIBUTE_GCC_DIAG(4,6) ATTRIBUTE_GCC_DIAG(5,6); | 73 ATTRIBUTE_GCC_DIAG(4,6) ATTRIBUTE_GCC_DIAG(5,6); |
74 extern bool warning_n (rich_location *, int, unsigned HOST_WIDE_INT, | |
75 const char *, const char *, ...) | |
76 ATTRIBUTE_GCC_DIAG(4, 6) ATTRIBUTE_GCC_DIAG(5, 6); | |
64 extern bool warning_at (location_t, int, const char *, ...) | 77 extern bool warning_at (location_t, int, const char *, ...) |
65 ATTRIBUTE_GCC_DIAG(3,4); | 78 ATTRIBUTE_GCC_DIAG(3,4); |
66 extern bool warning_at_rich_loc (rich_location *, int, const char *, ...) | 79 extern bool warning_at (rich_location *, int, const char *, ...) |
67 ATTRIBUTE_GCC_DIAG(3,4); | 80 ATTRIBUTE_GCC_DIAG(3,4); |
68 extern bool warning_at_rich_loc_n (rich_location *, int, int, const char *, | |
69 const char *, ...) | |
70 ATTRIBUTE_GCC_DIAG(4, 6) ATTRIBUTE_GCC_DIAG(5, 6); | |
71 extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); | 81 extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); |
72 extern void error_n (location_t, int, const char *, const char *, ...) | 82 extern void error_n (location_t, unsigned HOST_WIDE_INT, const char *, |
83 const char *, ...) | |
73 ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); | 84 ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); |
74 extern void error_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); | 85 extern void error_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); |
75 extern void error_at_rich_loc (rich_location *, const char *, ...) | 86 extern void error_at (rich_location *, const char *, ...) |
76 ATTRIBUTE_GCC_DIAG(2,3); | 87 ATTRIBUTE_GCC_DIAG(2,3); |
77 extern void fatal_error (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3) | 88 extern void fatal_error (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3) |
78 ATTRIBUTE_NORETURN; | 89 ATTRIBUTE_NORETURN; |
79 /* Pass one of the OPT_W* from options.h as the second parameter. */ | 90 /* Pass one of the OPT_W* from options.h as the second parameter. */ |
80 extern bool pedwarn (location_t, int, const char *, ...) | 91 extern bool pedwarn (location_t, int, const char *, ...) |
81 ATTRIBUTE_GCC_DIAG(3,4); | 92 ATTRIBUTE_GCC_DIAG(3,4); |
82 extern bool pedwarn_at_rich_loc (rich_location *, int, const char *, ...) | 93 extern bool pedwarn (rich_location *, int, const char *, ...) |
83 ATTRIBUTE_GCC_DIAG(3,4); | 94 ATTRIBUTE_GCC_DIAG(3,4); |
84 extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); | 95 extern bool permerror (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); |
85 extern bool permerror_at_rich_loc (rich_location *, const char *, | 96 extern bool permerror (rich_location *, const char *, |
86 ...) ATTRIBUTE_GCC_DIAG(2,3); | 97 ...) ATTRIBUTE_GCC_DIAG(2,3); |
87 extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); | 98 extern void sorry (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); |
99 extern void sorry_at (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); | |
88 extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); | 100 extern void inform (location_t, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); |
89 extern void inform_at_rich_loc (rich_location *, const char *, | 101 extern void inform (rich_location *, const char *, ...) ATTRIBUTE_GCC_DIAG(2,3); |
90 ...) ATTRIBUTE_GCC_DIAG(2,3); | 102 extern void inform_n (location_t, unsigned HOST_WIDE_INT, const char *, |
91 extern void inform_n (location_t, int, const char *, const char *, ...) | 103 const char *, ...) |
92 ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); | 104 ATTRIBUTE_GCC_DIAG(3,5) ATTRIBUTE_GCC_DIAG(4,5); |
93 extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); | 105 extern void verbatim (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); |
94 extern bool emit_diagnostic (diagnostic_t, location_t, int, | 106 extern bool emit_diagnostic (diagnostic_t, location_t, int, |
95 const char *, ...) ATTRIBUTE_GCC_DIAG(4,5); | 107 const char *, ...) ATTRIBUTE_GCC_DIAG(4,5); |
96 extern bool emit_diagnostic_valist (diagnostic_t, location_t, int, const char *, | 108 extern bool emit_diagnostic_valist (diagnostic_t, location_t, int, const char *, |