misc: Update attribute syntax, and reorganize compiler.hh.
This change replaces the __attribute__ syntax with the now standard [[]] syntax. It also reorganizes compiler.hh so that all special macros have some explanatory text saying what they do, and each attribute which has a standard version can use that if available and what version of c++ it's standard in is put in a comment. Also, the requirements as far as where you put [[]] style attributes are a little more strict than the old school __attribute__ style. The use of the attribute macros was updated to fit these new, more strict requirements. Change-Id: Iace44306a534111f1c38b9856dc9e88cd9b49d2a Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/35219 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -151,7 +151,7 @@ class ProbeManager
|
||||
{
|
||||
private:
|
||||
/** Required for sensible debug messages.*/
|
||||
const M5_CLASS_VAR_USED SimObject *object;
|
||||
M5_CLASS_VAR_USED const SimObject *object;
|
||||
/** Vector for name look-up. */
|
||||
std::vector<ProbePoint *> points;
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ System::Threads::quiesce(ContextID id)
|
||||
{
|
||||
auto &t = thread(id);
|
||||
# if THE_ISA != NULL_ISA
|
||||
BaseCPU M5_VAR_USED *cpu = t.context->getCpuPtr();
|
||||
M5_VAR_USED BaseCPU *cpu = t.context->getCpuPtr();
|
||||
DPRINTFS(Quiesce, cpu, "quiesce()\n");
|
||||
# endif
|
||||
t.quiesce();
|
||||
@@ -250,7 +250,7 @@ System::System(Params *p)
|
||||
warn_once("Cache line size is neither 16, 32, 64 nor 128 bytes.\n");
|
||||
|
||||
// Get the generic system requestor IDs
|
||||
RequestorID tmp_id M5_VAR_USED;
|
||||
M5_VAR_USED RequestorID tmp_id;
|
||||
tmp_id = getRequestorId(this, "writebacks");
|
||||
assert(tmp_id == Request::wbRequestorId);
|
||||
tmp_id = getRequestorId(this, "functional");
|
||||
|
||||
Reference in New Issue
Block a user