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

MEMBER_TYPE_FORCES_BLK and attribute transparent_union


This test program

typedef union
  {
    union wait *__uptr;
    int *__iptr;
  } __WAIT_STATUS __attribute__ ((__transparent_union__));

causes the following warning in an experimental version of mainline
gcc under hppa-unkown-linux-gnu:

wait.c:5: warning: `__transparent_union__' attribute ignored

As a result, glibc will not build.

I am fairly certain this is caused by the following define:

#define MEMBER_TYPE_FORCES_BLK(FIELD, MODE) 1

This causes the union to have type BLKmode rather than the type of the
first field.  As a result, the checks in handle_transparent_union_attribute
fail.

Suggestions?  Should I just skip the check if MEMBER_TYPE_FORCES_BLK
is defined and not zero?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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