summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johnson <peter@tortall.net>2015-11-06 20:15:04 -0800
committerPeter Johnson <peter@tortall.net>2015-11-06 20:15:04 -0800
commit51af4082cc898b122b88f11fd34033fc00fad81e (patch)
tree13fbd0bbceade448ca8bf26f4bd2d95d80e37288
parent0efd093199b725ede61737d19f4a411ed310a3aa (diff)
downloadyasm-51af4082cc898b122b88f11fd34033fc00fad81e.tar.gz
Added -Wno-segreg-in-64bit.
This allows suppressing the annoying 'segment register ignored in 64-bit mode' warning.
-rw-r--r--frontends/tasm/tasm.c2
-rw-r--r--frontends/vsyasm/vsyasm.c2
-rw-r--r--frontends/yasm/yasm.c2
-rw-r--r--libyasm/errwarn.h3
-rw-r--r--modules/arch/x86/x86regtmod.gperf2
5 files changed, 9 insertions, 2 deletions
diff --git a/frontends/tasm/tasm.c b/frontends/tasm/tasm.c
index 8019ff75..93c11c98 100644
--- a/frontends/tasm/tasm.c
+++ b/frontends/tasm/tasm.c
@@ -791,6 +791,8 @@ opt_warning_handler(char *cmd, /*@unused@*/ char *param, int extra)
action(YASM_WARN_UNINIT_CONTENTS);
else if (strcmp(cmd, "size-override") == 0)
action(YASM_WARN_SIZE_OVERRIDE);
+ else if (strcmp(cmd, "segreg-in-64bit") == 0)
+ action(YASM_WARN_SEGREG_IN_64BIT);
else
return 1;
diff --git a/frontends/vsyasm/vsyasm.c b/frontends/vsyasm/vsyasm.c
index a057b6f7..892b9b33 100644
--- a/frontends/vsyasm/vsyasm.c
+++ b/frontends/vsyasm/vsyasm.c
@@ -1120,6 +1120,8 @@ opt_warning_handler(char *cmd, /*@unused@*/ char *param, int extra)
action(YASM_WARN_UNINIT_CONTENTS);
else if (strcmp(cmd, "size-override") == 0)
action(YASM_WARN_SIZE_OVERRIDE);
+ else if (strcmp(cmd, "segreg-in-64bit") == 0)
+ action(YASM_WARN_SEGREG_IN_64BIT);
else
return 1;
diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c
index 74c16223..75d96755 100644
--- a/frontends/yasm/yasm.c
+++ b/frontends/yasm/yasm.c
@@ -1094,6 +1094,8 @@ opt_warning_handler(char *cmd, /*@unused@*/ char *param, int extra)
action(YASM_WARN_UNINIT_CONTENTS);
else if (strcmp(cmd, "size-override") == 0)
action(YASM_WARN_SIZE_OVERRIDE);
+ else if (strcmp(cmd, "segreg-in-64bit") == 0)
+ action(YASM_WARN_SEGREG_IN_64BIT);
else
return 1;
diff --git a/libyasm/errwarn.h b/libyasm/errwarn.h
index ede2f287..25f68226 100644
--- a/libyasm/errwarn.h
+++ b/libyasm/errwarn.h
@@ -43,7 +43,8 @@ typedef enum yasm_warn_class {
YASM_WARN_ORPHAN_LABEL, /**< Label alone on a line without a colon */
YASM_WARN_UNINIT_CONTENTS, /**< Uninitialized space in code/data section */
YASM_WARN_SIZE_OVERRIDE,/**< Double size override */
- YASM_WARN_IMPLICIT_SIZE_OVERRIDE /**< Implicit size override */
+ YASM_WARN_IMPLICIT_SIZE_OVERRIDE, /**< Implicit size override */
+ YASM_WARN_SEGREG_IN_64BIT /**< Segment register ignored in 64-bit mode */
} yasm_warn_class;
/** Error classes. Bitmask-based to support limited subclassing. */
diff --git a/modules/arch/x86/x86regtmod.gperf b/modules/arch/x86/x86regtmod.gperf
index 64ee7d9d..38986df0 100644
--- a/modules/arch/x86/x86regtmod.gperf
+++ b/modules/arch/x86/x86regtmod.gperf
@@ -284,7 +284,7 @@ yasm_x86__parse_check_regtmod(yasm_arch *arch, const char *id, size_t id_len,
}
if (type == YASM_ARCH_SEGREG && bits != 0 && arch_x86->mode_bits == bits) {
- yasm_warn_set(YASM_WARN_GENERAL,
+ yasm_warn_set(YASM_WARN_SEGREG_IN_64BIT,
N_("`%s' segment register ignored in %u-bit mode"), id,
bits);
}