Patchwork C++ PATCH to implement C++11 ref-qualifiers

login
register
mail settings
Submitter Jason Merrill
Date April 4, 2013, 3:13 a.m.
Message ID <515CEFD5.8080508@redhat.com>
Download mbox | patch
Permalink /patch/233614/
State New
Headers show

Comments

Jason Merrill - April 4, 2013, 3:13 a.m.
On 04/01/2013 03:03 PM, Jason Merrill wrote:
>     	(FUNCTION_OR_METHOD_TYPE_CHECK): New.

It turns out that there's already a FUNC_OR_METHOD_CHECK in tree.h, so 
I'm removing this duplicate.
Gabriel Dos Reis - April 4, 2013, 3:32 a.m.
On Wed, Apr 3, 2013 at 10:13 PM, Jason Merrill <jason@redhat.com> wrote:
> On 04/01/2013 03:03 PM, Jason Merrill wrote:
>>
>>         (FUNCTION_OR_METHOD_TYPE_CHECK): New.
>
>
> It turns out that there's already a FUNC_OR_METHOD_CHECK in tree.h, so I'm
> removing this duplicate.

and maybe rename the old one to what you thought was a natural name? :-)

-- Gaby

Patch

commit 4a01f2f261f9f0cb33bd959a80fe47782474ab18
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Apr 2 21:01:21 2013 -0400

    	* cp-tree.h (FUNCTION_OR_METHOD_TYPE_CHECK): Remove.
    	(TYPE_RAISES_EXCEPTIONS): Use FUNC_OR_METHOD_CHECK instead.
    	(FUNCTION_REF_QUALIFIED, FUNCTION_RVALUE_QUALIFIED): Likewise.

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 83164a2..e1d1238 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -223,9 +223,6 @@  c-common.h, not after.
 #define BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK(NODE) \
   TREE_CHECK(NODE,BOUND_TEMPLATE_TEMPLATE_PARM)
 
-#define FUNCTION_OR_METHOD_TYPE_CHECK(NODE) \
-  TREE_CHECK2(NODE,FUNCTION_TYPE,METHOD_TYPE)
-
 #if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
 #define THUNK_FUNCTION_CHECK(NODE) __extension__			\
 ({  __typeof (NODE) const __t = (NODE);					\
@@ -1888,7 +1885,7 @@  struct GTY((variable_size)) lang_type {
    (for templates) or an OVERLOAD list of functions (for implicitly
    declared functions).  */
 #define TYPE_RAISES_EXCEPTIONS(NODE) \
-  TYPE_LANG_SLOT_1 (FUNCTION_OR_METHOD_TYPE_CHECK (NODE))
+  TYPE_LANG_SLOT_1 (FUNC_OR_METHOD_CHECK (NODE))
 
 /* For FUNCTION_TYPE or METHOD_TYPE, return 1 iff it is declared `throw()'
    or noexcept(true).  */
@@ -2536,11 +2533,11 @@  struct GTY((variable_size)) lang_decl {
 
 /* 1 iff FUNCTION_TYPE or METHOD_TYPE has a ref-qualifier (either & or &&). */
 #define FUNCTION_REF_QUALIFIED(NODE) \
-  TREE_LANG_FLAG_4 (FUNCTION_OR_METHOD_TYPE_CHECK (NODE))
+  TREE_LANG_FLAG_4 (FUNC_OR_METHOD_CHECK (NODE))
 
 /* 1 iff FUNCTION_TYPE or METHOD_TYPE has &&-ref-qualifier.  */
 #define FUNCTION_RVALUE_QUALIFIED(NODE) \
-  TREE_LANG_FLAG_5 (FUNCTION_OR_METHOD_TYPE_CHECK (NODE))
+  TREE_LANG_FLAG_5 (FUNC_OR_METHOD_CHECK (NODE))
 
 /* Returns 1 iff VAR_DECL is a construction virtual table.
    DECL_VTABLE_OR_VTT_P will be true in this case and must be checked