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]

[PATCH] C++ fixes for vector types


This fixes initialization and conversion of vector types, and puts
builtin intrinsics in the extern "C" namespace.

The third one is the only slightly controversial part, but we can't do it
in the config/<arch>/<arch>.c file, because it's language specific. 

--Dan
 2000-12-21 Daniel Berlin <dberlin@redhat.com>
 	
 	* cvt.c (ocp_convert): Handle vector type conversion
 	* typeck2.c (digest_init): Handle vector type initializations
 	* decl.c (init_decl_processing): Make builtins go into extern "C" context
 

diff -c3pwBbr /boot/home/write/egcs/gcc/cp/cvt.c ./cvt.c
*** /boot/home/write/egcs/gcc/cp/cvt.c	Tue Jan  2 19:48:02 2001
--- ./cvt.c	Wed Jan  3 14:21:29 2001
*************** ocp_convert (type, expr, convtype, flags
*** 794,799 ****
--- 794,801 ----
    if (code == POINTER_TYPE || code == REFERENCE_TYPE
        || TYPE_PTRMEMFUNC_P (type))
      return fold (cp_convert_to_pointer (type, e, 0));
+   if (code == VECTOR_TYPE)
+     return fold (convert_to_vector (type, e));
    if (code == REAL_TYPE || code == COMPLEX_TYPE)
      {
        if (IS_AGGR_TYPE (TREE_TYPE (e)))
diff -c3pwBbr /boot/home/write/egcs/gcc/cp/decl.c ./decl.c
*** /boot/home/write/egcs/gcc/cp/decl.c	Wed Jan  3 00:24:03 2001
--- ./decl.c	Wed Jan  3 14:21:29 2001
*************** init_decl_processing ()
*** 6528,6538 ****
  
    void_ftype_ptr
      = build_exception_variant (void_ftype_ptr, empty_except_spec);
! 
  #ifdef MD_INIT_BUILTINS
    MD_INIT_BUILTINS;
  #endif
! 
    /* C++ extensions */
  
    unknown_type_node = make_node (UNKNOWN_TYPE);
--- 6528,6538 ----
  
    void_ftype_ptr
      = build_exception_variant (void_ftype_ptr, empty_except_spec);
! push_lang_context(lang_name_c);
  #ifdef MD_INIT_BUILTINS
    MD_INIT_BUILTINS;
  #endif
! pop_lang_context();
    /* C++ extensions */
  
    unknown_type_node = make_node (UNKNOWN_TYPE);
diff -c3pwBbr /boot/home/write/egcs/gcc/cp/typeck2.c ./typeck2.c
*** /boot/home/write/egcs/gcc/cp/typeck2.c	Wed Jan  3 14:39:09 2001
--- ./typeck2.c	Wed Jan  3 14:21:31 2001
*************** digest_init (type, init, tail)
*** 545,551 ****
  
    if (code == INTEGER_TYPE || code == REAL_TYPE || code == POINTER_TYPE
        || code == ENUMERAL_TYPE || code == REFERENCE_TYPE
!       || code == BOOLEAN_TYPE || code == COMPLEX_TYPE
        || TYPE_PTRMEMFUNC_P (type))
      {
        if (raw_constructor)
--- 545,551 ----
  
    if (code == INTEGER_TYPE || code == REAL_TYPE || code == POINTER_TYPE
        || code == ENUMERAL_TYPE || code == REFERENCE_TYPE
!       || code == BOOLEAN_TYPE || code == COMPLEX_TYPE || code == VECTOR_TYPE
        || TYPE_PTRMEMFUNC_P (type))
      {
        if (raw_constructor)


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