Commit 671d5bcb by Martin Liska Committed by Martin Liska

Define CONSTEXPR macro and use it in vec.h.

2017-05-18  Martin Liska  <mliska@suse.cz>

	* ansidecl.h: Define CONSTEXPR macro.
2017-05-18  Martin Liska  <mliska@suse.cz>

	* vec.h (struct vnull): Use it.

From-SVN: r248205
parent dbcb3c74
2017-05-18 Martin Liska <mliska@suse.cz>
* vec.h (struct vnull): Use it.
2017-05-18 Jan Hubicka <hubicka@ucw.cz> 2017-05-18 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
......
...@@ -416,10 +416,7 @@ struct GTY((user)) vec ...@@ -416,10 +416,7 @@ struct GTY((user)) vec
struct vnull struct vnull
{ {
template <typename T, typename A, typename L> template <typename T, typename A, typename L>
#if __cpp_constexpr >= 200704 CONSTEXPR operator vec<T, A, L> () { return vec<T, A, L>(); }
constexpr
#endif
operator vec<T, A, L> () { return vec<T, A, L>(); }
}; };
extern vnull vNULL; extern vnull vNULL;
......
2017-05-18 Martin Liska <mliska@suse.cz>
* ansidecl.h: Define CONSTEXPR macro.
2017-04-04 Jonathan Wakely <jwakely@redhat.com> 2017-04-04 Jonathan Wakely <jwakely@redhat.com>
* ansidecl.h (ATTRIBUTE_PACKED): Fix typo in comment. * ansidecl.h (ATTRIBUTE_PACKED): Fix typo in comment.
......
...@@ -313,6 +313,12 @@ So instead we use the macro below and test it against specific values. */ ...@@ -313,6 +313,12 @@ So instead we use the macro below and test it against specific values. */
#define ENUM_BITFIELD(TYPE) unsigned int #define ENUM_BITFIELD(TYPE) unsigned int
#endif #endif
#if __cpp_constexpr >= 200704
#define CONSTEXPR constexpr
#else
#define CONSTEXPR
#endif
/* C++11 adds the ability to add "override" after an implementation of a /* C++11 adds the ability to add "override" after an implementation of a
virtual function in a subclass, to: virtual function in a subclass, to:
(A) document that this is an override of a virtual function (A) document that this is an override of a virtual function
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment