compiler.hh (12595:b5a51007feac) | compiler.hh (12701:d1fd92f06385) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2012,2017 ARM Limited | 2 * Copyright (c) 2012,2017-2018 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 57 unchanged lines hidden (view full) --- 68#if defined __has_cpp_attribute 69 // Note: We must separate this if statement because GCC < 5.0 doesn't 70 // support the function-like syntax in #if statements. 71 #if __has_cpp_attribute(fallthrough) 72 #define M5_FALLTHROUGH [[fallthrough]] 73 #else 74 #define M5_FALLTHROUGH 75 #endif | 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 9 * licensed hereunder. You may use the software subject to the license 10 * terms below provided that you ensure that this notice is replicated --- 57 unchanged lines hidden (view full) --- 68#if defined __has_cpp_attribute 69 // Note: We must separate this if statement because GCC < 5.0 doesn't 70 // support the function-like syntax in #if statements. 71 #if __has_cpp_attribute(fallthrough) 72 #define M5_FALLTHROUGH [[fallthrough]] 73 #else 74 #define M5_FALLTHROUGH 75 #endif |
76 77 #if __has_cpp_attribute(nodiscard) 78 #define M5_NODISCARD [[nodiscard]] 79 #else 80 #define M5_NODISCARD 81 #endif |
|
76#else 77 // Unsupported (and no warning) on GCC < 7. 78 #define M5_FALLTHROUGH | 82#else 83 // Unsupported (and no warning) on GCC < 7. 84 #define M5_FALLTHROUGH |
85 86 #define M5_NODISCARD |
|
79#endif 80 81// std::make_unique redefined for C++11 compilers 82namespace m5 83{ 84 85#if __cplusplus == 201402L // C++14 86 --- 19 unchanged lines hidden --- | 87#endif 88 89// std::make_unique redefined for C++11 compilers 90namespace m5 91{ 92 93#if __cplusplus == 201402L // C++14 94 --- 19 unchanged lines hidden --- |