Re: [AD] anonymous unions in C

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


They're not part of neither C version, but were introduced by C++.

I checked on H. Schildt "C - the complete reference", which covers c99 too, and "C++ - the complete reference".



--- Gio 30/10/08, Peter Hull <peterhull90@xxxxxxxxxx> ha scritto:

> Da: Peter Hull <peterhull90@xxxxxxxxxx>
> Oggetto: [AD] anonymous unions in C
> A: alleg-developers@xxxxxxxxxx
> Data: Giovedì 30 ottobre 2008, 15:39
> Are anonymous unions allowed in standard C? I ask because
> there is one
> in fshook-stdio.c, line 333
> struct ALLEGRO_FS_ENTRY_STDIO {
> ...
>    union {
>       FILE *handle;
>       DIR *dir;
>    };
> ...
> };
> 
> AFAIK it isn't, but from a bit of googling it seems
> like gcc and msvc
> both allow it. Unfortunately I haven't got a proper
> reference book and
> I'm a bit hazy on what's C89, C99 or whatever.
> 
> Pete
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK
> & win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> -- 
> https://lists.sourceforge.net/lists/listinfo/alleg-developers


      Unisciti alla community di Io fotografo e video, il nuovo corso di fotografia di Gazzetta dello sport:
http://www.flickr.com/groups/iofotografoevideo




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/