From 1c55923e553db95d96342ba66cdc621fd6f0c58f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20B=C3=B6ckenkamp?= Date: Wed, 31 Jul 2013 18:07:55 +0200 Subject: [PATCH] sal/arm: compiler warning fixed (see -Wdelete-non-virtual-dtor) This commit introduces a virtual dtor in the ArmCPUState class to prevent the compiler from producing the following warning: "deleting object of polymorphic class type 'fail::Gem5ArmCPU' which has non-virtual destructor might cause undefined behaviour" Change-Id: I5029662064e72ae87a9f0e36aeaa309e4cb2291b --- src/core/sal/arm/ArmCPUState.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/sal/arm/ArmCPUState.hpp b/src/core/sal/arm/ArmCPUState.hpp index 4060f815..127d0723 100644 --- a/src/core/sal/arm/ArmCPUState.hpp +++ b/src/core/sal/arm/ArmCPUState.hpp @@ -18,6 +18,7 @@ public: * @return the current lr */ virtual address_t getLinkRegister() const = 0; + virtual ~ArmCPUState() { } }; // TODO: Enum for misc registers