misc: Fix mismatched struct/class "tags" and reenable that warning.

The mismatches were from places where Params structs had been declared
as classes instead of structs, and ruby's MachineID struct.

A comment describing why the warning had been disabled said that it was
because of libstdc++ version 4.8. As far as I can tell, that version is
old enough to be outside the window we support, and so that should no
longer be a problem. It looks like the oldest version of gcc we
support, 5.0, corresponds with approximately libstdc++ version 6.0.21.

https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html#abi.versioning

Change-Id: I75ad92f3723a1883bd47e3919c5572a353344047
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40953
Reviewed-by: Gabe Black <gabe.black@gmail.com>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-02-07 23:17:49 -08:00
parent 55a3e35388
commit 9a0b79459d
16 changed files with 24 additions and 30 deletions

View File

@@ -387,13 +387,7 @@ elif main['CLANG']:
# parantheses are allowed due to Ruby's printing of the AST,
# finally self assignments are allowed as the generated CPU code
# is relying on this
main.Append(CCFLAGS=['-Wno-parentheses',
'-Wno-self-assign',
# Some versions of libstdc++ (4.8?) seem to
# use struct hash and class hash
# interchangeably.
'-Wno-mismatched-tags',
])
main.Append(CCFLAGS=['-Wno-parentheses', '-Wno-self-assign'])
conf.CheckCxxFlag('-Wno-c99-designator')
conf.CheckCxxFlag('-Wno-defaulted-function-deleted')

View File

@@ -52,7 +52,7 @@
#include "sim/sim_object.hh"
#include "sim/system.hh"
class ArmPMUParams;
struct ArmPMUParams;
class Platform;
class ThreadContext;
class ArmInterruptPin;

View File

@@ -41,12 +41,12 @@
#include "dev/arm/doorbell.hh"
#include "dev/io_device.hh"
class Ap2ScpDoorbellParams;
struct Ap2ScpDoorbellParams;
class ArmInterruptPin;
class MHU;
class MHUParams;
struct MHUParams;
class Scp;
class Scp2ApDoorbellParams;
struct Scp2ApDoorbellParams;
class MhuDoorbell : public Doorbell
{

View File

@@ -40,7 +40,7 @@
#include "sim/sim_object.hh"
class DisplayParams;
struct DisplayParams;
class Display : public SimObject
{

View File

@@ -44,7 +44,7 @@
#include "dev/io_device.hh"
class ArmSystem;
class FVPBasePwrCtrlParams;
struct FVPBasePwrCtrlParams;
class ThreadContext;
/**

View File

@@ -64,10 +64,10 @@
/// I2 - System Level Implementation of the Generic Timer
class Checkpoint;
class SystemCounterParams;
class GenericTimerParams;
class GenericTimerFrameParams;
class GenericTimerMemParams;
struct SystemCounterParams;
struct GenericTimerParams;
struct GenericTimerFrameParams;
struct GenericTimerMemParams;
/// Abstract class for elements whose events depend on the counting speed
/// of the System Counter

View File

@@ -43,8 +43,8 @@
#include "dev/io_device.hh"
#include "libnomali/nomali.h"
class NoMaliGpuParams;
class CustomNoMaliGpuParams;
struct NoMaliGpuParams;
struct CustomNoMaliGpuParams;
class RealView;
class NoMaliGpu : public PioDevice

View File

@@ -42,7 +42,7 @@
#include "dev/io_device.hh"
class ArmInterruptPin;
class GenericWatchdogParams;
struct GenericWatchdogParams;
/**
* @file

View File

@@ -40,7 +40,7 @@
#include "dev/arm/amba_device.hh"
class Sp805Params;
struct Sp805Params;
/**
* @file

View File

@@ -38,7 +38,7 @@
#include "gpu-compute/scheduling_policy.hh"
class ComputeUnitParams;
struct ComputeUnitParams;
class Scheduler
{

View File

@@ -46,7 +46,7 @@
#include "mem/qport.hh"
#include "params/QoSMemSinkCtrl.hh"
class QoSMemSinkInterfaceParams;
struct QoSMemSinkInterfaceParams;
class QoSMemSinkInterface;
namespace QoS {

View File

@@ -52,10 +52,10 @@
class DataBlock;
class CacheMsg;
class MachineID;
struct MachineID;
class CacheMemory;
class RubyGPUCoalescerParams;
struct RubyGPUCoalescerParams;
// List of packets that belongs to a specific instruction.
typedef std::list<PacketPtr> PerInstPackets;

View File

@@ -46,10 +46,10 @@
class DataBlock;
class CacheMsg;
class MachineID;
struct MachineID;
class CacheMemory;
class VIPERCoalescerParams;
struct VIPERCoalescerParams;
class VIPERCoalescer : public GPUCoalescer
{

View File

@@ -42,7 +42,7 @@
#include "sim/vma.hh"
class Process;
class ProcessParams;
struct ProcessParams;
class System;
/**

View File

@@ -69,7 +69,7 @@
/** Forward declare the ProbeManager. */
class ProbeManager;
class ProbeListener;
class ProbeListenerObjectParams;
struct ProbeListenerObjectParams;
/**
* Name space containing shared probe point declarations.

View File

@@ -48,7 +48,7 @@
#include "sim/clocked_object.hh"
class TickedObjectParams;
struct TickedObjectParams;
/** Ticked attaches gem5's event queue/scheduler to evaluate
* calls and provides a start/stop interface to ticking.