Changeset 2246
- Timestamp:
- Jul 15, 2005, 3:30:58 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gcc/gcc/tree.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r2245 r2246 1525 1525 { 1526 1526 enum tree_code code = TREE_CODE (t); 1527 1527 1528 1528 switch (TREE_CODE_CLASS (code)) 1529 1529 { … … 1531 1531 case 't': return TS_TYPE; 1532 1532 case 'b': return TS_BLOCK; 1533 case 'r': case '<': case '1': case '2': case 'e': case 's': 1533 case 'r': case '<': case '1': case '2': case 'e': case 's': 1534 1534 return TS_EXP; 1535 1535 default: /* 'c' and 'x' */ … … 4164 4164 because a VLA may not appear as a structure member. However, in 4165 4165 GNU C code like: 4166 4166 4167 4167 struct S { int i[f()]; }; 4168 4168 … … 4176 4176 return false; 4177 4177 4178 /* If TYPE itself has variable size, it is variably modified. 4178 /* If TYPE itself has variable size, it is variably modified. 4179 4179 4180 4180 We do not yet have a representation of the C99 '[*]' syntax. 4181 4181 When a representation is chosen, this function should be modified 4182 4182 to test for that case as well. */ 4183 if (TYPE_SIZE (type) 4183 if (TYPE_SIZE (type) 4184 4184 && TYPE_SIZE (type) != error_mark_node 4185 4185 && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST) 4186 4186 return true; 4187 4187 4188 /* If TYPE is a pointer or reference, it is variably modified if 4188 /* If TYPE is a pointer or reference, it is variably modified if 4189 4189 the type pointed to is variably modified. */ 4190 4190 if ((TREE_CODE (type) == POINTER_TYPE … … 4192 4192 && variably_modified_type_p (TREE_TYPE (type))) 4193 4193 return true; 4194 4194 4195 4195 /* If TYPE is an array, it is variably modified if the array 4196 4196 elements are. (Note that the VLA case has already been checked … … 4209 4209 if (variably_modified_type_p (TREE_TYPE (type))) 4210 4210 return true; 4211 for (parm = TYPE_ARG_TYPES (type); 4212 parm && parm != void_list_node; 4211 for (parm = TYPE_ARG_TYPES (type); 4212 parm && parm != void_list_node; 4213 4213 parm = TREE_CHAIN (parm)) 4214 4214 if (variably_modified_type_p (TREE_VALUE (parm))) … … 4409 4409 unsigned HOST_WIDE_INT value; 4410 4410 char *new_random_seed; 4411 4411 4412 4412 if (flag_random_seed != NULL) 4413 4413 return; … … 4417 4417 { 4418 4418 struct timeval tv; 4419 4419 4420 4420 gettimeofday (&tv, NULL); 4421 value = (((unsigned HOST_WIDE_INT) tv.tv_usec << 16) 4421 value = (((unsigned HOST_WIDE_INT) tv.tv_usec << 16) 4422 4422 ^ tv.tv_sec ^ getpid ()); 4423 4423 } … … 4448 4448 default_flag_random_seed (); 4449 4449 4450 /* This isn't a very good hash, but it does guarantee no collisions 4450 /* This isn't a very good hash, but it does guarantee no collisions 4451 4451 when the random string is generated by the code above and the time 4452 4452 delta is small. */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.