From c8c4f66889686d621abe9393306d3aea1fda3782 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Thu, 23 Apr 2015 13:37:46 -0400 Subject: misc: Appease gcc 5.1 This patch fixes a few small issues to ensure gem5 compiles when using gcc 5.1. First, the GDB_REG_BYTES in the RemoteGDB header are, rather surprisingly, flagged as unused for both ARM and X86. Removing them, however, causes compilation errors as they are actually used in the source file. Moving the constant into the class definition fixes the issue. Possibly a gcc bug. Second, we have an unused EthPktData constructor using auto_ptr, and the latter is deprecated. Since the code is never used it is simply removed. --- src/arch/x86/remote_gdb.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/arch/x86') diff --git a/src/arch/x86/remote_gdb.hh b/src/arch/x86/remote_gdb.hh index f09d1e012..0f41055cd 100644 --- a/src/arch/x86/remote_gdb.hh +++ b/src/arch/x86/remote_gdb.hh @@ -111,6 +111,10 @@ class RemoteGDB : public BaseRemoteGDB GDB64_NUMREGS = (GDB64_GS_32 + 1) / 2 + 1 }; + const int GDB_REG_BYTES = + std::max(RemoteGDB::GDB32_NUMREGS * sizeof(uint32_t), + RemoteGDB::GDB64_NUMREGS * sizeof(uint64_t)); + RemoteGDB(System *system, ThreadContext *context); bool acc(Addr addr, size_t len); @@ -122,10 +126,6 @@ class RemoteGDB : public BaseRemoteGDB bool checkBpLen(size_t len) { return len == 1; } }; -const int GDB_REG_BYTES = - std::max(RemoteGDB::GDB32_NUMREGS * sizeof(uint32_t), - RemoteGDB::GDB64_NUMREGS * sizeof(uint64_t)); - } #endif // __ARCH_X86_REMOTEGDB_HH__ -- cgit v1.2.3