OSDN Git Service

wchar_t now gets wrapped inside "ifndef __cplusplus",
[pf3gnuchains/gcc-fork.git] / gcc / diagnostic.h
index eb7594e..9d01758 100644 (file)
@@ -19,8 +19,8 @@ along with GNU CC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#ifndef __GCC_DIAGNOSTIC_H__
-#define __GCC_DIAGNOSTIC_H__
+#ifndef GCC_DIAGNOSTIC_H
+#define GCC_DIAGNOSTIC_H
 
 #include "obstack.h"
 
@@ -31,6 +31,16 @@ typedef void (*diagnostic_starter_fn) PARAMS ((output_buffer *,
                                                diagnostic_context *));
 typedef diagnostic_starter_fn diagnostic_finalizer_fn;
 
+typedef enum
+{
+#define DEFINE_DIAGNOSTIC_KIND(K, M) K,  
+#include "diagnostic.def"
+#undef DEFINE_DIAGNOSTIC_KIND
+  DK_LAST_DIAGNOSTIC_KIND
+} diagnostic_t;
+
+#define pedantic_error_kind() (flag_pedantic_errors ? DK_ERROR : DK_WARNING)
+
 #define DIAGNOSTICS_SHOW_PREFIX_ONCE       0x0
 #define DIAGNOSTICS_SHOW_PREFIX_NEVER      0x1
 #define DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE 0x2
@@ -217,4 +227,4 @@ extern int error_function_changed   PARAMS ((void));
 extern void record_last_error_function PARAMS ((void));
 extern void report_problematic_module  PARAMS ((output_buffer *));     
 
-#endif /* __GCC_DIAGNOSTIC_H__ */
+#endif /* ! GCC_DIAGNOSTIC_H */