+2017-12-29 Simon Marchi <simon.marchi@ericsson.com>
+
+ * common/diagnostics.h
+ (DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES): New macro.
+ * amd64-linux-tdep.c (amd64_canonicalize_syscall): Use it.
+
2017-12-29 Simon Marchi <simon.marchi@ericsson.com>
* linux-thread-db.c (thread_db_detach): Remove call to
static enum gdb_syscall
amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
{
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
+
switch (syscall_number) {
case amd64_sys_read:
case amd64_x32_sys_read:
default:
return gdb_sys_no_syscall;
}
+
+ DIAGNOSTIC_POP
}
/* Parse the arguments of current system call instruction and record
DIAGNOSTIC_IGNORE ("-Wdeprecated-register")
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
DIAGNOSTIC_IGNORE ("-Wunused-function")
+# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES \
+ DIAGNOSTIC_IGNORE ("-Wenum-compare-switch")
#elif defined (__GNUC__) /* GCC */
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION \
DIAGNOSTIC_IGNORE ("-Wunused-function")
+# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
#else /* Other compilers */
# define DIAGNOSTIC_IGNORE_SELF_MOVE
# define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
# define DIAGNOSTIC_IGNORE_UNUSED_FUNCTION
+# define DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
+
#endif
#endif /* COMMON_DIAGNOSTICS_H */