Do not panic, when the expression walker of the statement walker encounters an invali...
[cparser] / diagnostic.c
index 0a582af..eacf085 100644 (file)
@@ -34,8 +34,6 @@ unsigned diagnostic_count = 0;
 unsigned error_count      = 0;
 /** Number of occurred warnings. */
 unsigned warning_count    = 0;
-/** true if warnings should be inhibited */
-bool inhibit_all_warnings = false;
 
 static const source_position_t *curr_pos = NULL;
 
@@ -129,6 +127,12 @@ static void diagnosticvf(const char *const fmt, va_list ap)
                                        break;
                                }
 
+                               case 't': {
+                                       const token_t *const token = va_arg(ap, const token_t*);
+                                       print_pp_token(stderr, token);
+                                       break;
+                               }
+
                                case 'K': {
                                        const token_t* const token = va_arg(ap, const token_t*);
                                        print_token(stderr, token);
@@ -217,9 +221,6 @@ static void warningvf(const source_position_t *pos,
 
 void warningf(const source_position_t *pos, const char *const fmt, ...)
 {
-       if (inhibit_all_warnings)
-               return;
-
        va_list ap;
        va_start(ap, fmt);
        curr_pos = pos;