This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++ PATCH: Fix covariant[23].C


This patch fixes the failures I introduced for covariant[23].C.

Tested lightly on i686-pc-linux-gnu, applied as obvious on the
mainline, and -- shortly -- on the 3.3 branch.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com

2003-12-10  Mark Mitchell  <mark@codesourcery.com>

	* cp-tree.h (DECL_CONV_FN_P): Check that DECL_NAME is non-NULL.

Index: cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.937
retrieving revision 1.938
diff -c -5 -p -r1.937 -r1.938
*** cp-tree.h	9 Dec 2003 04:08:49 -0000	1.937
--- cp-tree.h	10 Dec 2003 14:06:21 -0000	1.938
*************** struct lang_decl GTY(())
*** 1838,1848 ****
     && (DECL_BASE_CONSTRUCTOR_P (NODE)			\
         || DECL_BASE_DESTRUCTOR_P (NODE)))
  
  /* Nonzero if NODE is a user-defined conversion operator.  */
  #define DECL_CONV_FN_P(NODE) \
!   (IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)))
  
  /* If FN is a conversion operator, the type to which it converts.
     Otherwise, NULL_TREE.  */
  #define DECL_CONV_FN_TYPE(FN) \
    (DECL_CONV_FN_P (FN) ? TREE_TYPE (DECL_NAME (FN)) : NULL_TREE)
--- 1838,1848 ----
     && (DECL_BASE_CONSTRUCTOR_P (NODE)			\
         || DECL_BASE_DESTRUCTOR_P (NODE)))
  
  /* Nonzero if NODE is a user-defined conversion operator.  */
  #define DECL_CONV_FN_P(NODE) \
!   (DECL_NAME (NODE) && IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)))
  
  /* If FN is a conversion operator, the type to which it converts.
     Otherwise, NULL_TREE.  */
  #define DECL_CONV_FN_TYPE(FN) \
    (DECL_CONV_FN_P (FN) ? TREE_TYPE (DECL_NAME (FN)) : NULL_TREE)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]