🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #378

Re: struct comparison

#378
From: Guy Harris
Date: Wed, 26 Jul 1989 00:10
19 lines
1380 bytes
>Just like the compiler doesn't have enough information to
>initialize a union, right? !
>
>A simple rule like comparing first members of unions and the
>pointers themselves would work nicely in a lot of cases and
>match the way initialization works.

Uh, as far as I'm concerned, the "first member" rule's only use is to
give a meaning to the default initialization of unions.  It means I
can't initialize, say, an array of union types or objects containing
union types if different elements of that array have different union
members "active", for example (e.g., a symbol table, with symbols
having, say, string, integral, or floating-point values, selected by a
discriminator - if I want the initial symbol table to have values of
more than one type, I lose).

Had it not been for the necessity of giving *some* meaning to
initialization of unions, I'd just as soon have left initialization of
them undefined....
Technical Details
Message-ID: <2289@auspex.auspex.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!auspex!guy
References: <2874@solo3.cs.vu.nl> <1989Jul14.155312.2063@utzoo.uucp> <4644@freja.diku.dk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!cs.utexas.edu!uunet!auspex!guy
From: guy@auspex.auspex.com (Guy Harris)
Newsgroups: comp.std.c
Subject: Re: struct comparison
Message-ID: <2289@auspex.auspex.com>
Date: 26 Jul 89 00:10:37 GMT
References: <2874@solo3.cs.vu.nl> <1989Jul14.155312.2063@utzoo.uucp> <4644@freja.diku.dk>
Reply-To: guy@auspex.auspex.com (Guy Harris)
Organization: Auspex Systems, Santa Clara
Lines: 19