mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
warnings: move them to complain.c.
* src/getargs.h, src/getargs.c (warnings, warnings_flags): Move to... * src/complain.h, src/complain.c: Here.
This commit is contained in:
committed by
Akim Demaille
parent
327db05b22
commit
d0f11c1b62
@@ -29,6 +29,8 @@
|
||||
#include "files.h"
|
||||
#include "getargs.h"
|
||||
|
||||
int warnings_flag = Wconflicts_sr | Wconflicts_rr | Wother;
|
||||
|
||||
bool complaint_issued;
|
||||
static unsigned *indent_ptr = 0;
|
||||
|
||||
|
||||
@@ -25,6 +25,25 @@
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
/*-------------.
|
||||
| --warnings. |
|
||||
`-------------*/
|
||||
|
||||
enum warnings
|
||||
{
|
||||
Wnone = 0, /**< Issue no warnings. */
|
||||
Werror = 1 << 0, /**< Warnings are treated as errors. */
|
||||
Wmidrule_values = 1 << 1, /**< Unset or unused midrule values. */
|
||||
Wyacc = 1 << 2, /**< POSIXME. */
|
||||
Wconflicts_sr = 1 << 3, /**< S/R conflicts. */
|
||||
Wconflicts_rr = 1 << 4, /**< R/R conflicts. */
|
||||
Wother = 1 << 5, /**< All other warnings. */
|
||||
Wall = ~Werror /**< All above warnings. */
|
||||
};
|
||||
|
||||
/** What warnings are issued. */
|
||||
extern int warnings_flag;
|
||||
|
||||
/** Record that a warning is about to be issued, and treat it as an
|
||||
error if <tt>warnings_flag & Werror</tt>. This is exported
|
||||
only for the sake of Yacc-compatible conflict reports in conflicts.c.
|
||||
|
||||
@@ -61,8 +61,6 @@ bool glr_parser = false;
|
||||
|
||||
int report_flag = report_none;
|
||||
int trace_flag = trace_none;
|
||||
int warnings_flag = Wconflicts_sr | Wconflicts_rr
|
||||
| Wother;
|
||||
|
||||
static struct bison_language const valid_languages[] = {
|
||||
{ "c", "c-skel.m4", ".c", ".h", true },
|
||||
|
||||
@@ -108,24 +108,6 @@ enum trace
|
||||
/** What debug items bison displays during its run. */
|
||||
extern int trace_flag;
|
||||
|
||||
/*-------------.
|
||||
| --warnings. |
|
||||
`-------------*/
|
||||
|
||||
enum warnings
|
||||
{
|
||||
Wnone = 0, /**< Issue no warnings. */
|
||||
Werror = 1 << 0, /**< Warnings are treated as errors. */
|
||||
Wmidrule_values = 1 << 1, /**< Unset or unused midrule values. */
|
||||
Wyacc = 1 << 2, /**< POSIXME. */
|
||||
Wconflicts_sr = 1 << 3, /**< S/R conflicts. */
|
||||
Wconflicts_rr = 1 << 4, /**< R/R conflicts. */
|
||||
Wother = 1 << 5, /**< All other warnings. */
|
||||
Wall = ~Werror /**< All above warnings. */
|
||||
};
|
||||
/** What warnings are issued. */
|
||||
extern int warnings_flag;
|
||||
|
||||
|
||||
/** Process the command line arguments.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user