This is the mail archive of the gcc-bugs@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]

[Bug middle-end/19515] [4.0 Regression] Violation of C99 6.7.8 §21


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-20 09:10 -------
>From expr.c:count_type_elements: 
 
    case UNION_TYPE: 
    case QUAL_UNION_TYPE: 
      { 
        /* Ho hum.  How in the world do we guess here?  Clearly it isn't 
           right to count the fields.  Guess based on the number of words.  */ 
        HOST_WIDE_INT n = int_size_in_bytes (type); 
        if (n < 0) 
          return -1; 
        return n / UNITS_PER_WORD; 
      } 
 
So we cannot use count_type_elements in gimplify_init_constructor. 
 
I think we should somehow compute the size of the CONSTRUCTOR and compare 
it with int_size_in_bytes (TREE_TYPE (object))...? 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19515


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