compiler.hh (12225:314b451761dc) compiler.hh (12392:e0dbdf30a2a5)
1/*
2 * Copyright (c) 2012,2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 49 unchanged lines hidden (view full) ---

58#endif
59
60#if defined(__clang__)
61# define M5_CLASS_VAR_USED M5_VAR_USED
62#else
63# define M5_CLASS_VAR_USED
64#endif
65
1/*
2 * Copyright (c) 2012,2017 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 49 unchanged lines hidden (view full) ---

58#endif
59
60#if defined(__clang__)
61# define M5_CLASS_VAR_USED M5_VAR_USED
62#else
63# define M5_CLASS_VAR_USED
64#endif
65
66// This can be removed once all compilers support C++17
67#if defined __has_cpp_attribute
68 // Note: We must separate this if statement because GCC < 5.0 doesn't
69 // support the function-like syntax in #if statements.
70 #if __has_cpp_attribute(fallthrough)
71 #define M5_FALLTHROUGH [[fallthrough]]
72 #else
73 #define M5_FALLTHROUGH
74 #endif
75#else
76 // Unsupported (and no warning) on GCC < 7.
77 #define M5_FALLTHROUGH
78#endif
79
66// std::make_unique redefined for C++11 compilers
67namespace m5
68{
69
70#if __cplusplus == 201402L // C++14
71
72using std::make_unique;
73

--- 17 unchanged lines hidden ---
80// std::make_unique redefined for C++11 compilers
81namespace m5
82{
83
84#if __cplusplus == 201402L // C++14
85
86using std::make_unique;
87

--- 17 unchanged lines hidden ---