warnings: be ready to print warnings categories

A function to print warnings categories, like -Wyacc, -Wother, etc.

* src/complain.h, src/complain.c (print_warning_categories): New function.
* src/output.c (ARRAY_CARDINALITY): Move it to file 'src/system.h'.
* src/complain.h (enum warnings): New value, 'silent', "complain"
must not display the warning type.
This commit is contained in:
Victor Santet
2012-06-29 15:22:09 +02:00
committed by Akim Demaille
parent 3e153163c7
commit b640317060
5 changed files with 42 additions and 14 deletions

View File

@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
#define STREQ(L, R) (strcmp(L, R) == 0)
#define STRNEQ(L, R) (!STREQ(L, R))