1/* Subroutines shared by all languages that are variants of C. 2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 3 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 240 unchanged lines hidden (view full) --- 249/* Nonzero means give `double' the same size as `float'. */ 250 251int flag_short_double; 252 253/* Nonzero means give `wchar_t' the same size as `short'. */ 254 255int flag_short_wchar; 256 |
257/* Nonzero means allow implicit conversions between vectors with 258 differing numbers of subparts and/or differing element types. */ 259int flag_lax_vector_conversions; 260 |
261/* Nonzero means allow Microsoft extensions without warnings or errors. */ 262int flag_ms_extensions; 263 264/* Nonzero means don't recognize the keyword `asm'. */ 265 266int flag_no_asm; 267 268/* Nonzero means to treat bitfields as signed unless they say `unsigned'. */ --- 825 unchanged lines hidden (view full) --- 1094{ 1095 if (TREE_CODE (c) == INTEGER_CST) 1096 return int_fits_type_p (c, type); 1097 1098 c = convert (type, c); 1099 return !TREE_OVERFLOW (c); 1100} 1101 |
1102 1103/* True if vector types T1 and T2 can be converted to each other 1104 without an explicit cast. If EMIT_LAX_NOTE is true, and T1 and T2 1105 can only be converted with -flax-vector-conversions yet that is not 1106 in effect, emit a note telling the user about that option if such 1107 a note has not previously been emitted. */ 1108bool 1109vector_types_convertible_p (tree t1, tree t2, bool emit_lax_note) |
1110{ |
1111 static bool emitted_lax_note = false; 1112 bool convertible_lax; 1113 1114 if ((targetm.vector_opaque_p (t1) || targetm.vector_opaque_p (t2)) 1115 && tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2))) 1116 return true; 1117 1118 convertible_lax = 1119 (tree_int_cst_equal (TYPE_SIZE (t1), TYPE_SIZE (t2)) 1120 && (TREE_CODE (TREE_TYPE (t1)) != REAL_TYPE || 1121 TYPE_PRECISION (t1) == TYPE_PRECISION (t2)) 1122 && (INTEGRAL_TYPE_P (TREE_TYPE (t1)) 1123 == INTEGRAL_TYPE_P (TREE_TYPE (t2)))); 1124 1125 if (!convertible_lax || flag_lax_vector_conversions) 1126 return convertible_lax; 1127 1128 if (TYPE_VECTOR_SUBPARTS (t1) == TYPE_VECTOR_SUBPARTS (t2) 1129 && comptypes (TREE_TYPE (t1), TREE_TYPE (t2))) 1130 return true; 1131 1132 if (emit_lax_note && !emitted_lax_note) 1133 { 1134 emitted_lax_note = true; 1135 inform ("use -flax-vector-conversions to permit " 1136 "conversions between vectors with differing " 1137 "element types or numbers of subparts"); 1138 } 1139 1140 return false; |
1141} 1142 1143/* Convert EXPR to TYPE, warning about conversion problems with constants. 1144 Invoke this function on every expression that is converted implicitly, 1145 i.e. because of language rules and not because of an explicit cast. */ 1146 1147tree 1148convert_and_check (tree type, tree expr) --- 5505 unchanged lines hidden --- |