diff mbox series

[C++,obvious] Remove REFERENCE_VLA_OK

Message ID 411f5ed3-f071-bca1-18fc-5607069dbddc@oracle.com
State New
Headers show
Series [C++,obvious] Remove REFERENCE_VLA_OK | expand

Commit Message

Paolo Carlini May 15, 2019, 2:27 p.m. UTC
Hi,

noticed this nit a few weeks ago: currently we only set the flag in one 
place and nowhere read it. I'm going to commit the below as obvious 
later today, barring objections.

Thanks, Paolo.

/////////////////////
2019-05-15  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h (REFERENCE_VLA_OK): Remove.
	* lambda.c (build_capture_proxy): Remove use of the above.
diff mbox series

Patch

Index: cp-tree.h
===================================================================
--- cp-tree.h	(revision 271211)
+++ cp-tree.h	(working copy)
@@ -482,7 +482,6 @@  extern GTY(()) tree cp_global_trees[CPTI_MAX];
    5: CLASS_TYPE_P (in RECORD_TYPE and UNION_TYPE)
       ENUM_FIXED_UNDERLYING_TYPE_P (in ENUMERAL_TYPE)
       AUTO_IS_DECLTYPE (in TEMPLATE_TYPE_PARM)
-      REFERENCE_VLA_OK (in REFERENCE_TYPE)
    6: TYPE_DEPENDENT_P_VALID
 
    Usage of DECL_LANG_FLAG_?:
@@ -3714,11 +3713,6 @@  struct GTY(()) lang_decl {
    && TREE_TYPE (TREE_OPERAND (NODE, 0))		\
    && TYPE_REF_P (TREE_TYPE (TREE_OPERAND ((NODE), 0))))
 
-/* True if NODE is a REFERENCE_TYPE which is OK to instantiate to be a
-   reference to VLA type, because it's used for VLA capture.  */
-#define REFERENCE_VLA_OK(NODE) \
-  (TYPE_LANG_FLAG_5 (REFERENCE_TYPE_CHECK (NODE)))
-
 #define NEW_EXPR_USE_GLOBAL(NODE) \
   TREE_LANG_FLAG_0 (NEW_EXPR_CHECK (NODE))
 #define DELETE_EXPR_USE_GLOBAL(NODE) \
Index: lambda.c
===================================================================
--- lambda.c	(revision 271211)
+++ lambda.c	(working copy)
@@ -420,7 +420,6 @@  build_capture_proxy (tree member, tree init)
       type = build_cplus_array_type (TREE_TYPE (TREE_TYPE (ptr)),
 				     build_index_type (max));
       type = build_reference_type (type);
-      REFERENCE_VLA_OK (type) = true;
       object = convert (type, ptr);
     }