0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

Merge remote-tracking branch 'origin/nasm-2.14.xx'

Resolved Conflicts:
	asm/assemble.c
	asm/directiv.c
	asm/error.c
	asm/float.c
	asm/labels.c
	asm/listing.c
	asm/nasm.c
	asm/parser.c
	asm/preproc.c
	asm/stdscan.c
	include/error.h
	output/outelf.c
	version

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin (Intel)
2018-12-12 18:05:52 -08:00
6 changed files with 232 additions and 197 deletions

View File

@@ -94,53 +94,54 @@ static inline vefunc nasm_set_verror(vefunc ve)
/*
* These codes define specific types of suppressible warning.
* They are assumed to occupy the most significant bits of the
* severity code.
*/
#define WARN_MASK 0xFFFFF000 /* the mask for this feature */
#define WARN_SHR 12 /* how far to shift right */
#define WARN_SHR 12 /* how far to shift right */
#define WARN(x) ((x) << WARN_SHR)
#define WARN_MASK WARN(~0)
#define WARN_IDX(x) ((x) >> WARN_SHR)
#define WARN(x) ((x) << WARN_SHR)
#define WARN_IDX(x) (((x) & WARN_MASK) >> WARN_SHR)
#define WARN_OTHER WARN( 0) /* any noncategorized warning */
#define WARN_MNP WARN( 1) /* macro-num-parameters warning */
#define WARN_MSR WARN( 2) /* macro self-reference */
#define WARN_MDP WARN( 3) /* macro default parameters check */
#define WARN_OL WARN( 4) /* orphan label (no colon, and
* alone on line) */
#define WARN_NOV WARN( 5) /* numeric overflow */
#define WARN_GNUELF WARN( 6) /* using GNU ELF extensions */
#define WARN_FL_OVERFLOW WARN( 7) /* FP overflow */
#define WARN_FL_DENORM WARN( 8) /* FP denormal */
#define WARN_FL_UNDERFLOW WARN( 9) /* FP underflow */
#define WARN_FL_TOOLONG WARN(10) /* FP too many digits */
#define WARN_USER WARN(11) /* %warning directives */
#define WARN_MNP WARN( 1) /* macro-num-parameters warning */
#define WARN_MSR WARN( 2) /* macro self-reference */
#define WARN_MDP WARN( 3) /* macro default parameters check */
#define WARN_OL WARN( 4) /* orphan label (no colon, and alone on line) */
#define WARN_NOV WARN( 5) /* numeric overflow */
#define WARN_GNUELF WARN( 6) /* using GNU ELF extensions */
#define WARN_FL_OVERFLOW WARN( 7) /* FP overflow */
#define WARN_FL_DENORM WARN( 8) /* FP denormal */
#define WARN_FL_UNDERFLOW WARN( 9) /* FP underflow */
#define WARN_FL_TOOLONG WARN(10) /* FP too many digits */
#define WARN_USER WARN(11) /* %warning directives */
#define WARN_LOCK WARN(12) /* bad LOCK prefixes */
#define WARN_HLE WARN(13) /* bad HLE prefixes */
#define WARN_BND WARN(14) /* bad BND prefixes */
#define WARN_ZEXTRELOC WARN(15) /* relocation zero-extended */
#define WARN_ZEXTRELOC WARN(15) /* relocation zero-extended */
#define WARN_PTR WARN(16) /* not a NASM keyword */
#define WARN_BAD_PRAGMA WARN(17) /* malformed pragma */
#define WARN_BAD_PRAGMA WARN(17) /* malformed pragma */
#define WARN_UNKNOWN_PRAGMA WARN(18) /* unknown pragma */
#define WARN_NOTMY_PRAGMA WARN(19) /* pragma inapplicable */
#define WARN_UNK_WARNING WARN(20) /* unknown warning */
#define WARN_NEG_REP WARN(21) /* negative repeat count */
#define WARN_NEG_REP WARN(21) /* negative repeat count */
#define WARN_PHASE WARN(22) /* phase error in pass 1 */
#define WARN_LABEL_REDEF WARN(23) /* label redefined, but consistent */
#define WARN_LABEL_LATE WARN(24) /* label (re)defined during code generation */
/* The "all" warning acts as a global switch, it must come last */
#define WARN_ALL 23 /* Do not use WARN() here */
struct warning {
const char *name;
const char *help;
bool enabled;
};
extern const struct warning warnings[WARN_ALL+1];
/* These two should come last */
#define WARN_ALL (24+2) /* Do not use WARN() here */
#define WARN_OTHER WARN(WARN_ALL-1) /* any noncategorized warning */
/* This is a bitmask */
#define WARN_ST_ENABLED 1 /* Warning is currently enabled */
#define WARN_ST_ERROR 2 /* Treat this warning as an error */
struct warning {
const char *name;
const char *help;
uint8_t state; /* Default state for this warning */
};
extern const struct warning warnings[WARN_ALL+1];
extern uint8_t warning_state[WARN_ALL];
extern uint8_t warning_state_init[WARN_ALL];