Merge pull request #25774 from neikeq/fix-noreturn-attr-check
Fix check to determine if [[noreturn]] attribute is usable
This commit is contained in:
commit
3afd9deded
1 changed files with 1 additions and 5 deletions
|
@ -31,10 +31,6 @@
|
||||||
#ifndef UTIL_MACROS_H
|
#ifndef UTIL_MACROS_H
|
||||||
#define UTIL_MACROS_H
|
#define UTIL_MACROS_H
|
||||||
|
|
||||||
#ifndef __has_cpp_attribute
|
|
||||||
#define __has_cpp_attribute(attr_token) 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define _GD_VARNAME_CONCAT_B_(m_ignore, m_name) m_name
|
#define _GD_VARNAME_CONCAT_B_(m_ignore, m_name) m_name
|
||||||
#define _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_B_(hello there, m_a##m_b##m_c)
|
#define _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_B_(hello there, m_a##m_b##m_c)
|
||||||
#define _GD_VARNAME_CONCAT_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c)
|
#define _GD_VARNAME_CONCAT_(m_a, m_b, m_c) _GD_VARNAME_CONCAT_A_(m_a, m_b, m_c)
|
||||||
|
@ -61,7 +57,7 @@
|
||||||
// noreturn
|
// noreturn
|
||||||
// TODO: Get rid of this macro once we upgrade to C++11
|
// TODO: Get rid of this macro once we upgrade to C++11
|
||||||
|
|
||||||
#if __has_cpp_attribute(deprecated)
|
#if (__cplusplus >= 201103L)
|
||||||
#define GD_NORETURN [[noreturn]]
|
#define GD_NORETURN [[noreturn]]
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define GD_NORETURN __attribute__((noreturn))
|
#define GD_NORETURN __attribute__((noreturn))
|
||||||
|
|
Loading…
Reference in a new issue