typeck.c (260011) | typeck.c (260074) |
---|---|
1/* Build expressions with type checking for C++ compiler. 2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 3 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4 Hacked by Michael Tiemann (tiemann@cygnus.com) 5 6This file is part of GCC. 7 8GCC is free software; you can redistribute it and/or modify --- 6215 unchanged lines hidden (view full) --- 6224 /* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */ 6225 if (TREE_CODE (rhs) == NON_LVALUE_EXPR) 6226 rhs = TREE_OPERAND (rhs, 0); 6227 6228 rhstype = TREE_TYPE (rhs); 6229 coder = TREE_CODE (rhstype); 6230 6231 if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE | 1/* Build expressions with type checking for C++ compiler. 2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 3 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4 Hacked by Michael Tiemann (tiemann@cygnus.com) 5 6This file is part of GCC. 7 8GCC is free software; you can redistribute it and/or modify --- 6215 unchanged lines hidden (view full) --- 6224 /* Strip NON_LVALUE_EXPRs since we aren't using as an lvalue. */ 6225 if (TREE_CODE (rhs) == NON_LVALUE_EXPR) 6226 rhs = TREE_OPERAND (rhs, 0); 6227 6228 rhstype = TREE_TYPE (rhs); 6229 coder = TREE_CODE (rhstype); 6230 6231 if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE |
6232 && vector_types_convertible_p (type, rhstype)) | 6232 && vector_types_convertible_p (type, rhstype, true)) |
6233 return convert (type, rhs); 6234 6235 if (rhs == error_mark_node || rhstype == error_mark_node) 6236 return error_mark_node; 6237 if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node) 6238 return error_mark_node; 6239 6240 /* The RHS of an assignment cannot have void type. */ --- 553 unchanged lines hidden (view full) --- 6794 6795 if (TREE_CODE (from) == OFFSET_TYPE 6796 && comptypes (TYPE_OFFSET_BASETYPE (to), 6797 TYPE_OFFSET_BASETYPE (from), 6798 COMPARE_BASE | COMPARE_DERIVED)) 6799 continue; 6800 6801 if (TREE_CODE (to) == VECTOR_TYPE | 6233 return convert (type, rhs); 6234 6235 if (rhs == error_mark_node || rhstype == error_mark_node) 6236 return error_mark_node; 6237 if (TREE_CODE (rhs) == TREE_LIST && TREE_VALUE (rhs) == error_mark_node) 6238 return error_mark_node; 6239 6240 /* The RHS of an assignment cannot have void type. */ --- 553 unchanged lines hidden (view full) --- 6794 6795 if (TREE_CODE (from) == OFFSET_TYPE 6796 && comptypes (TYPE_OFFSET_BASETYPE (to), 6797 TYPE_OFFSET_BASETYPE (from), 6798 COMPARE_BASE | COMPARE_DERIVED)) 6799 continue; 6800 6801 if (TREE_CODE (to) == VECTOR_TYPE |
6802 && vector_types_convertible_p (to, from)) | 6802 && vector_types_convertible_p (to, from, false)) |
6803 return 1; 6804 6805 if (TREE_CODE (to) == INTEGER_TYPE 6806 && TYPE_PRECISION (to) == TYPE_PRECISION (from)) 6807 return 1; 6808 6809 if (TREE_CODE (to) == FUNCTION_TYPE) 6810 return 1; --- 238 unchanged lines hidden --- | 6803 return 1; 6804 6805 if (TREE_CODE (to) == INTEGER_TYPE 6806 && TYPE_PRECISION (to) == TYPE_PRECISION (from)) 6807 return 1; 6808 6809 if (TREE_CODE (to) == FUNCTION_TYPE) 6810 return 1; --- 238 unchanged lines hidden --- |