This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


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

Re: glibc-19980524: invalid use of GCC's `transparent union'


Hi!

>>>>> Roland McGrath writes:

 >> I disagree, and believe that it is a good idea to give an error for
 >> such redeclarations.

 RM> That defeats the explicit purpose of the feature.

I should not have talked at all about the ``intention of
transparent_union,'' since that was more argumentative than I meant to
be, and I didn't mean to imply that your design was wrong.

I'd like to refocus on a single issue: what the right thing is to do
right now.

First, I believe the GNU C library should incorporate my patch, which
at least work on all platforms (for all compilers), and provide the
best functionality we can hope for.

Second, somebody should talk to the GCC (and egcs) people and get
transparent_union fixed the way you (Roland) intended it to be.  Make
sure that they update the documentation, so that if this issue comes
up again, people will understand that allowing redeclarations is part
of the specified GCC behaviour.

That way, even on broken GCC systems, at least glibc will compile and
work correctly.  People will be able to upgrade to fixed GCC's at
their leisure, if they want the full transparent_union functionality.

So, I think the question should now be: are there any objections to
using my patch?  Regardless of whether or not GCC supports
transparent_union correctly, my patch still makes the code more
readable.

Thanks,

-- 
Gordon Matzigkeit   \ Proudly running pieces of the GNU operating system.
gord@profitpress.com \ Jacques Cousteau loved programming in assembler.


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