public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* TODO: egcs-g++
@ 1999-04-09 21:31 Ildar Mulyukov
  1999-04-09 22:46 ` Alexandre Oliva
                   ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-09 21:31 UTC (permalink / raw)
  To: egcs

Unfortunately I do not participate egcs project - I don't have enough
experience and time :-(

But when I just started using egcs c++ I encountered 2 problems.

1. Take a look:
#line 5
struct _stru {
    int i;
    union {
        struct { int j0, j1; };
        int j[2];
    }
};

For the construction compiler answers:
test.cxx:9: anonymous class type not used to declare any objects
test.cxx:12: missing ';' before right brace

The worst thing is that TinySoft's VisualC++ eats it ok :-)

2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
except when one ends line with '\'. While CR comes straight after \
compiler thinks it is special symbol and emits an error.

Please inform me whether these will be fixed or not - my work depends of
this.

Thank you in advance
Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-09 21:31 TODO: egcs-g++ Ildar Mulyukov
@ 1999-04-09 22:46 ` Alexandre Oliva
  1999-04-10  1:00   ` Andi Kleen
                     ` (2 more replies)
       [not found] ` <m390c06h4d.fsf.cygnus.egcs@muc.de>
  1999-04-30 23:15 ` Ildar Mulyukov
  2 siblings, 3 replies; 42+ messages in thread
From: Alexandre Oliva @ 1999-04-09 22:46 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: egcs

On Apr 10, 1999, Ildar Mulyukov <ildar@faki-campus.mipt.ru> wrote:

> But when I just started using egcs c++ I encountered 2 problems.

Nope, egcs did encounter 2 problems :-D

> struct _stru {
>     int i;
>     union {
>         struct { int j0, j1; };
                                ^ some variable name is missing here
>         int j[2];
>     }
       ^ struct and union declarations must be terminated with `;'
> };

> The worst thing is that TinySoft's VisualC++ eats it ok :-)

Send them a bug report then :-)

> 2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
> except when one ends line with '\'. While CR comes straight after \
> compiler thinks it is special symbol and emits an error.

AFAIK, this is not supposed to work, but, if it works at all, it would
probably only work in MS-DOS like platforms.  But I'm not sure about
that.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-09 22:46 ` Alexandre Oliva
@ 1999-04-10  1:00   ` Andi Kleen
  1999-04-10 13:21     ` Joe Buck
                       ` (2 more replies)
  1999-04-11 23:44   ` Andris Pavenis
  1999-04-30 23:15   ` Alexandre Oliva
  2 siblings, 3 replies; 42+ messages in thread
From: Andi Kleen @ 1999-04-10  1:00 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs, ildar

oliva@dcc.unicamp.br (Alexandre Oliva) writes:

> On Apr 10, 1999, Ildar Mulyukov <ildar@faki-campus.mipt.ru> wrote:
> 
> > But when I just started using egcs c++ I encountered 2 problems.
> 
> Nope, egcs did encounter 2 problems :-D
> 
> > struct _stru {
> >     int i;
> >     union {
> >         struct { int j0, j1; };
>                                 ^ some variable name is missing here
> >         int j[2];
> >     }
>        ^ struct and union declarations must be terminated with `;'
> > };
> 
> > The worst thing is that TinySoft's VisualC++ eats it ok :-)
> 
> Send them a bug report then :-)

Anonymous structures are a Microsoft extension. They are
also supported by the plan9 compiler I think.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-10  1:00   ` Andi Kleen
@ 1999-04-10 13:21     ` Joe Buck
  1999-04-30 23:15       ` Joe Buck
  1999-04-11  1:53     ` Ildar Mulyukov
  1999-04-30 23:15     ` Andi Kleen
  2 siblings, 1 reply; 42+ messages in thread
From: Joe Buck @ 1999-04-10 13:21 UTC (permalink / raw)
  To: Andi Kleen; +Cc: oliva, egcs, ildar

> > > struct _stru {
> > >     int i;
> > >     union {
> > >         struct { int j0, j1; };
> >                                 ^ some variable name is missing here
> > >         int j[2];
> > >     }
> >        ^ struct and union declarations must be terminated with `;'
> > > };
> > 
> > > The worst thing is that TinySoft's VisualC++ eats it ok :-)
> > 
> > Send them a bug report then :-)
> 
> Anonymous structures are a Microsoft extension. They are
> also supported by the plan9 compiler I think.

Perhaps we should accept them with a warning (in the context of
a surrounding union or struct).  After all, the 800-pound gorilla
says we should. :-)

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
       [not found] ` <m390c06h4d.fsf.cygnus.egcs@muc.de>
@ 1999-04-11  1:40   ` Jason Merrill
  1999-04-11  1:49     ` Ildar Mulyukov
                       ` (3 more replies)
  0 siblings, 4 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-11  1:40 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Alexandre Oliva, egcs, ildar

Would someone explain to me what anonymous structs are good for?  It seems
like a totally pointless extension.

WRT cr/lf issues, in the current development sources cpplib handles them
interchangeably, so you might try that out.

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:40   ` Jason Merrill
@ 1999-04-11  1:49     ` Ildar Mulyukov
  1999-04-11  2:02       ` Jason Merrill
  1999-04-30 23:15       ` Ildar Mulyukov
  1999-04-11  2:50     ` Andi Kleen
                       ` (2 subsequent siblings)
  3 siblings, 2 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-11  1:49 UTC (permalink / raw)
  To: Jason Merrill; +Cc: egcs

On 11 Apr 1999, Jason Merrill wrote:

> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

Hey! That's simple. E.g
struct _stru {
    int i;
    union {
        struct { int j0, j1; };
        int j[2];
    };
};
_stru aStructure;

We can directly use both aStructure.j0 and aStructure.j[0] (in "for"
loops).

> WRT cr/lf issues, in the current development sources cpplib handles them
> interchangeably, so you might try that out.

I checked out cvs version of egcs week ago. It could not handle CRLF
properly.

> Jason
> 


Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029




^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-10  1:00   ` Andi Kleen
  1999-04-10 13:21     ` Joe Buck
@ 1999-04-11  1:53     ` Ildar Mulyukov
  1999-04-11 13:15       ` Joe Buck
  1999-04-30 23:15       ` Ildar Mulyukov
  1999-04-30 23:15     ` Andi Kleen
  2 siblings, 2 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-11  1:53 UTC (permalink / raw)
  To: Andi Kleen; +Cc: egcs

On 10 Apr 1999, Andi Kleen wrote:

> Anonymous structures are a Microsoft extension. They are
> also supported by the plan9 compiler I think.
> 
> -Andi
Sorry but how fast would it be implemented?

Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:49     ` Ildar Mulyukov
@ 1999-04-11  2:02       ` Jason Merrill
  1999-04-30 23:15         ` Jason Merrill
  1999-04-30 23:15       ` Ildar Mulyukov
  1 sibling, 1 reply; 42+ messages in thread
From: Jason Merrill @ 1999-04-11  2:02 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: egcs

>>>>> Ildar Mulyukov <ildar@faki-campus.mipt.ru> writes:

 > On 11 Apr 1999, Jason Merrill wrote:
 >> Would someone explain to me what anonymous structs are good for?  It seems
 >> like a totally pointless extension.

 > Hey! That's simple.

OK, I get it.  Thanks.

 >> WRT cr/lf issues, in the current development sources cpplib handles them
 >> interchangeably, so you might try that out.

 > I checked out cvs version of egcs week ago. It could not handle CRLF
 > properly.

You need to configure with --enable-cpplib.

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:40   ` Jason Merrill
  1999-04-11  1:49     ` Ildar Mulyukov
@ 1999-04-11  2:50     ` Andi Kleen
  1999-04-11 13:51       ` Alexandre Oliva
  1999-04-30 23:15       ` Andi Kleen
  1999-04-11  4:08     ` Tim Waugh
  1999-04-30 23:15     ` Jason Merrill
  3 siblings, 2 replies; 42+ messages in thread
From: Andi Kleen @ 1999-04-11  2:50 UTC (permalink / raw)
  To: Jason Merrill, Andi Kleen; +Cc: Alexandre Oliva, egcs, ildar

On Sun, Apr 11, 1999 at 10:40:03AM +0200, Jason Merrill wrote:
> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

It is a nice way to short cut the #define mazes one often sees, e.g.

struct bla { 
	// ...
	union { 
		struct { int a,b; } A;
		int c;
	} blub; 
}; 
#define bla_a blub.A.a
#define bla_b blub.A.b
#define bla_c bla.c

Another use would be "poor man's inheritance" in C:

struct node {
	struct node *prev, *next;
}; 
struct bla { 
	struct node;
	int val; 
}; 

Now you can walk the bla list directly via ->next and ->prev points,
without playing macro games, or having to type the error prone 
nd.prev/nd.next all the time (ok the cast is still ugly). 

I have seen these two situations very often in real world code.

They are also a nice symetry to anonymous unions in C++; I would guess
if you implement one it isn't that hard to implement the other (and
anonymous unions are already implemented in G++, but not in GCC) 

here was a C9x proposal from Ken Thompson that described the rationale
for it better than me, but I cannot find it on the super slow WG14 WWW
server ATM. The comitee did reject it for some reason though.

I think they would be useful, but of course the tradeoff between just
another extension and maintainability is up to the maintainers.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:40   ` Jason Merrill
  1999-04-11  1:49     ` Ildar Mulyukov
  1999-04-11  2:50     ` Andi Kleen
@ 1999-04-11  4:08     ` Tim Waugh
  1999-04-12 13:11       ` Mumit Khan
                         ` (2 more replies)
  1999-04-30 23:15     ` Jason Merrill
  3 siblings, 3 replies; 42+ messages in thread
From: Tim Waugh @ 1999-04-11  4:08 UTC (permalink / raw)
  To: Jason Merrill; +Cc: egcs

On 11 Apr 1999, Jason Merrill wrote:

> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

The WINE people were talking about trying to get support for anonymous
structs into egcs.  The Windows headers seem to be littered with them, so 
it would make people's lives easier who want to write applications for
Windows _and_ WineLib.

But then, the Windows headers are littered with all sorts of things..

Tim.
*/

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:53     ` Ildar Mulyukov
@ 1999-04-11 13:15       ` Joe Buck
  1999-04-30 23:15         ` Joe Buck
  1999-04-30 23:15       ` Ildar Mulyukov
  1 sibling, 1 reply; 42+ messages in thread
From: Joe Buck @ 1999-04-11 13:15 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: ak, egcs

> > Anonymous structures are a Microsoft extension. They are
> > also supported by the plan9 compiler I think.
> > 
> > -Andi
> Sorry but how fast would it be implemented?

It will happen when someone submits a high-quality patch to implement
the feature in a clean manner and the maintainers accept it.  The
time for this to take place might range from "one day" to "never".

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  2:50     ` Andi Kleen
@ 1999-04-11 13:51       ` Alexandre Oliva
  1999-04-30 23:15         ` Alexandre Oliva
  1999-04-30 23:15       ` Andi Kleen
  1 sibling, 1 reply; 42+ messages in thread
From: Alexandre Oliva @ 1999-04-11 13:51 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Jason Merrill, egcs, ildar

On Apr 11, 1999, Andi Kleen <ak@muc.de> wrote:

> Another use would be "poor man's inheritance" in C:

> struct node {
> 	struct node *prev, *next;
> }; 
> struct bla { 
> 	struct node;
> 	int val; 
> }; 

Ok, this could be valid extended C, but it already has a different
meaning in C++: it declares a nested class bla::node.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-09 22:46 ` Alexandre Oliva
  1999-04-10  1:00   ` Andi Kleen
@ 1999-04-11 23:44   ` Andris Pavenis
  1999-04-30 23:15     ` Andris Pavenis
  1999-04-30 23:15   ` Alexandre Oliva
  2 siblings, 1 reply; 42+ messages in thread
From: Andris Pavenis @ 1999-04-11 23:44 UTC (permalink / raw)
  To: Alexandre Oliva, Ildar Mulyukov; +Cc: egcs

On Sat, 10 Apr 1999, Alexandre Oliva wrote:
>> 2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
>> except when one ends line with '\'. While CR comes straight after \
>> compiler thinks it is special symbol and emits an error.
>
>AFAIK, this is not supposed to work, but, if it works at all, it would
>probably only work in MS-DOS like platforms.  But I'm not sure about
>that.

It works for DJGPP. But it causes problems when somebody wants to transfer
sources to Linux....  (I tried to build egcs-1.1.2 as Linux to DJGPP
cross-compiler from sources patched under MS-DOS and had to generate 
patched sources once more).

There are more problems  as for example configure generates MS-DOS style text
files when run with DJGPP port of bash (+ other needed tools of course). Some 
scripts even becomes broken as result.

Andris

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  4:08     ` Tim Waugh
@ 1999-04-12 13:11       ` Mumit Khan
  1999-04-12 13:39         ` Zack Weinberg
                           ` (2 more replies)
       [not found]       ` <Pine.SUN.3.93.990412150105.700E-100000.cygnus.egcs@modi.xraylith.wisc.edu>
  1999-04-30 23:15       ` Tim Waugh
  2 siblings, 3 replies; 42+ messages in thread
From: Mumit Khan @ 1999-04-12 13:11 UTC (permalink / raw)
  To: egcs

On Sun, 11 Apr 1999, Tim Waugh wrote:

> On 11 Apr 1999, Jason Merrill wrote:
> 
> > Would someone explain to me what anonymous structs are good for?  It seems
> > like a totally pointless extension.
> 
> The WINE people were talking about trying to get support for anonymous
> structs into egcs.  The Windows headers seem to be littered with them, so 
> it would make people's lives easier who want to write applications for
> Windows _and_ WineLib.

This is also a very important issue for GCC under windows32. We now have 
to resort to reinventing the system headers, which is painful and 
error-prone. The only way to keep GCC up-to-date on this platform is to 
be able to use MS Platform SDK headers, but unfortunately those are 
peppered with these anon struct/union extensions.

There have been two set of patches to date that I know of -- 

(1) Alastair Houghton's changes a year or so ago. It added a few small
  breakages, which is expected; I just never had the time to see what 
  was causing those, let alone try to find a fix.

(2) Antonio Mendes de Oliveira Neto's patches posted to egcs-patches.

> 
> But then, the Windows headers are littered with all sorts of things..

Sigh, yes. I (almost) feel sorry for the person who thought that CPP 
macros are fun and created the gazillions of macros in the API header
files ... must be hated even within the halls of Redmond.

Regards,
Mumit


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 13:11       ` Mumit Khan
@ 1999-04-12 13:39         ` Zack Weinberg
  1999-04-12 15:20           ` Gerald Pfeifer
                             ` (2 more replies)
  1999-04-13  7:15         ` Gavin Romig-Koch
  1999-04-30 23:15         ` Mumit Khan
  2 siblings, 3 replies; 42+ messages in thread
From: Zack Weinberg @ 1999-04-12 13:39 UTC (permalink / raw)
  To: egcs

On Mon, 12 Apr 1999 15:11:44 -0500 (CDT), Mumit Khan wrote:
>On Sun, 11 Apr 1999, Tim Waugh wrote:
>
>> On 11 Apr 1999, Jason Merrill wrote:
>> 
>> > Would someone explain to me what anonymous structs are good for?  It seems
>> > like a totally pointless extension.
>> 
>> The WINE people were talking about trying to get support for anonymous
>> structs into egcs.  The Windows headers seem to be littered with them, so 
>> it would make people's lives easier who want to write applications for
>> Windows _and_ WineLib.
>
>This is also a very important issue for GCC under windows32. We now have 
>to resort to reinventing the system headers, which is painful and 
>error-prone. The only way to keep GCC up-to-date on this platform is to 
>be able to use MS Platform SDK headers, but unfortunately those are 
>peppered with these anon struct/union extensions.

It would be useful on non-Windows platforms too.  I personally want it
so I can clean up an API headache in glibc.  Linux defines the TCP/IP
packet-header structs differently from everyone else.  We can't just
change it because it'll break a lot of basic stuff (ifconfig, tcpdump,
etc.)  With anonymous unions, I can make code written to either layout
Just Work.

zw

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 13:39         ` Zack Weinberg
@ 1999-04-12 15:20           ` Gerald Pfeifer
  1999-04-12 18:01             ` Jeffrey A Law
  1999-04-30 23:15             ` Gerald Pfeifer
       [not found]           ` <Pine.GSO.4.10.9904130014560.14974-100000.cygnus.egcs@alphard.dbai.tuwien.ac.at>
  1999-04-30 23:15           ` Zack Weinberg
  2 siblings, 2 replies; 42+ messages in thread
From: Gerald Pfeifer @ 1999-04-12 15:20 UTC (permalink / raw)
  To: egcs

On 11 Apr 1999, Jason Merrill wrote:
> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.
and later someone replied
> The WINE people were talking about trying to get support for anonymous
> structs into egcs.  The Windows headers seem to be littered with them

Indeed at http://www.cygnus.com/news/corel.html there is a press release
that describes a deal between Corel and Cygnus in the course of which 
Cygnus will implement anonymous unions.

At http://www.integrita.com/cgi-local/lwgate.pl/WINE-DEVEL/archives/1999-03/Subject/article-210.html
the Corel project leader explictely mentions:

  4) General syntactic enhancements to make MSVC code compile.  This
  includes things like __stdcall, anonymous unions, etc etc.  

Apparently those Cygnus employees assigned these task are not subscribed
to the egcs lists, however,... ;-)

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 15:20           ` Gerald Pfeifer
@ 1999-04-12 18:01             ` Jeffrey A Law
  1999-04-30 23:15               ` Jeffrey A Law
  1999-04-30 23:15             ` Gerald Pfeifer
  1 sibling, 1 reply; 42+ messages in thread
From: Jeffrey A Law @ 1999-04-12 18:01 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: egcs

  In message <Pine.GSO.4.10.9904130014560.14974-100000@alphard.dbai.tuwien.ac.a
t>you write:
  > Apparently those Cygnus employees assigned these task are not subscribed
  > to the egcs lists, however,... ;-)
Why would you think that?  We're describing a general MSVC compatability
feature set.  That page mentions specific examples, some of which have already
been done in egcs.

I don't see how the mention of certain enhancements in egcs on that page
would lead one to conclude that the Cygnus employees who are assigned to
the work don't read the egcs lists.

jeff

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
       [not found]           ` <Pine.GSO.4.10.9904130014560.14974-100000.cygnus.egcs@alphard.dbai.tuwien.ac.at>
@ 1999-04-12 20:48             ` Jason Merrill
  1999-04-30 23:15               ` Jason Merrill
  0 siblings, 1 reply; 42+ messages in thread
From: Jason Merrill @ 1999-04-12 20:48 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: egcs

>>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

 >   4) General syntactic enhancements to make MSVC code compile.  This
 >   includes things like __stdcall, anonymous unions, etc etc.  

 > Apparently those Cygnus employees assigned these task are not subscribed
 > to the egcs lists, however,... ;-)

Actually, that would be me.  I knew it was part of the contract, I just
wanted someone to tell me why.  :)

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
       [not found]       ` <Pine.SUN.3.93.990412150105.700E-100000.cygnus.egcs@modi.xraylith.wisc.edu>
@ 1999-04-12 20:56         ` Jason Merrill
  1999-04-12 21:30           ` Jeffrey A Law
  1999-04-30 23:15           ` Jason Merrill
  0 siblings, 2 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-12 20:56 UTC (permalink / raw)
  To: Mumit Khan; +Cc: egcs

>>>>> Mumit Khan <khan@xraylith.wisc.edu> writes:

 > There have been two set of patches to date that I know of -- 

 > (1) Alastair Houghton's changes a year or so ago. It added a few small
 >   breakages, which is expected; I just never had the time to see what 
 >   was causing those, let alone try to find a fix.

Do you have this handy?

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 20:56         ` Jason Merrill
@ 1999-04-12 21:30           ` Jeffrey A Law
  1999-04-30 23:15             ` Jeffrey A Law
  1999-04-30 23:15           ` Jason Merrill
  1 sibling, 1 reply; 42+ messages in thread
From: Jeffrey A Law @ 1999-04-12 21:30 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Mumit Khan, egcs

  In message < u9zp4dgolp.fsf@yorick.cygnus.com >you write:
  > >>>>> Mumit Khan <khan@xraylith.wisc.edu> writes:
  > 
  >  > There have been two set of patches to date that I know of -- 
  > 
  >  > (1) Alastair Houghton's changes a year or so ago. It added a few small
  >  >   breakages, which is expected; I just never had the time to see what 
  >  >   was causing those, let alone try to find a fix.
  > 
  > Do you have this handy?
I don't have Alastair's stuff, but I do have Antonio's patches.


jeff

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 13:11       ` Mumit Khan
  1999-04-12 13:39         ` Zack Weinberg
@ 1999-04-13  7:15         ` Gavin Romig-Koch
  1999-04-30 23:15           ` Gavin Romig-Koch
  1999-04-30 23:15         ` Mumit Khan
  2 siblings, 1 reply; 42+ messages in thread
From: Gavin Romig-Koch @ 1999-04-13  7:15 UTC (permalink / raw)
  To: Mumit Khan; +Cc: egcs

 > There have been two set of patches to date that I know of -- 
 > 
 > (1) Alastair Houghton's changes a year or so ago. It added a few small
 >   breakages, which is expected; I just never had the time to see what 
 >   was causing those, let alone try to find a fix.

Could you point me to these, or send them to me?

                                                -gavin...

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11 13:15       ` Joe Buck
@ 1999-04-30 23:15         ` Joe Buck
  0 siblings, 0 replies; 42+ messages in thread
From: Joe Buck @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: ak, egcs

> > Anonymous structures are a Microsoft extension. They are
> > also supported by the plan9 compiler I think.
> > 
> > -Andi
> Sorry but how fast would it be implemented?

It will happen when someone submits a high-quality patch to implement
the feature in a clean manner and the maintainers accept it.  The
time for this to take place might range from "one day" to "never".


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 18:01             ` Jeffrey A Law
@ 1999-04-30 23:15               ` Jeffrey A Law
  0 siblings, 0 replies; 42+ messages in thread
From: Jeffrey A Law @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: egcs

  In message <Pine.GSO.4.10.9904130014560.14974-100000@alphard.dbai.tuwien.ac.a
t>you write:
  > Apparently those Cygnus employees assigned these task are not subscribed
  > to the egcs lists, however,... ;-)
Why would you think that?  We're describing a general MSVC compatability
feature set.  That page mentions specific examples, some of which have already
been done in egcs.

I don't see how the mention of certain enhancements in egcs on that page
would lead one to conclude that the Cygnus employees who are assigned to
the work don't read the egcs lists.

jeff

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  4:08     ` Tim Waugh
  1999-04-12 13:11       ` Mumit Khan
       [not found]       ` <Pine.SUN.3.93.990412150105.700E-100000.cygnus.egcs@modi.xraylith.wisc.edu>
@ 1999-04-30 23:15       ` Tim Waugh
  2 siblings, 0 replies; 42+ messages in thread
From: Tim Waugh @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Jason Merrill; +Cc: egcs

On 11 Apr 1999, Jason Merrill wrote:

> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

The WINE people were talking about trying to get support for anonymous
structs into egcs.  The Windows headers seem to be littered with them, so 
it would make people's lives easier who want to write applications for
Windows _and_ WineLib.

But then, the Windows headers are littered with all sorts of things..

Tim.
*/


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 13:39         ` Zack Weinberg
  1999-04-12 15:20           ` Gerald Pfeifer
       [not found]           ` <Pine.GSO.4.10.9904130014560.14974-100000.cygnus.egcs@alphard.dbai.tuwien.ac.at>
@ 1999-04-30 23:15           ` Zack Weinberg
  2 siblings, 0 replies; 42+ messages in thread
From: Zack Weinberg @ 1999-04-30 23:15 UTC (permalink / raw)
  To: egcs

On Mon, 12 Apr 1999 15:11:44 -0500 (CDT), Mumit Khan wrote:
>On Sun, 11 Apr 1999, Tim Waugh wrote:
>
>> On 11 Apr 1999, Jason Merrill wrote:
>> 
>> > Would someone explain to me what anonymous structs are good for?  It seems
>> > like a totally pointless extension.
>> 
>> The WINE people were talking about trying to get support for anonymous
>> structs into egcs.  The Windows headers seem to be littered with them, so 
>> it would make people's lives easier who want to write applications for
>> Windows _and_ WineLib.
>
>This is also a very important issue for GCC under windows32. We now have 
>to resort to reinventing the system headers, which is painful and 
>error-prone. The only way to keep GCC up-to-date on this platform is to 
>be able to use MS Platform SDK headers, but unfortunately those are 
>peppered with these anon struct/union extensions.

It would be useful on non-Windows platforms too.  I personally want it
so I can clean up an API headache in glibc.  Linux defines the TCP/IP
packet-header structs differently from everyone else.  We can't just
change it because it'll break a lot of basic stuff (ifconfig, tcpdump,
etc.)  With anonymous unions, I can make code written to either layout
Just Work.

zw

^ permalink raw reply	[flat|nested] 42+ messages in thread

* TODO: egcs-g++
  1999-04-09 21:31 TODO: egcs-g++ Ildar Mulyukov
  1999-04-09 22:46 ` Alexandre Oliva
       [not found] ` <m390c06h4d.fsf.cygnus.egcs@muc.de>
@ 1999-04-30 23:15 ` Ildar Mulyukov
  2 siblings, 0 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-30 23:15 UTC (permalink / raw)
  To: egcs

Unfortunately I do not participate egcs project - I don't have enough
experience and time :-(

But when I just started using egcs c++ I encountered 2 problems.

1. Take a look:
#line 5
struct _stru {
    int i;
    union {
        struct { int j0, j1; };
        int j[2];
    }
};

For the construction compiler answers:
test.cxx:9: anonymous class type not used to declare any objects
test.cxx:12: missing ';' before right brace

The worst thing is that TinySoft's VisualC++ eats it ok :-)

2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
except when one ends line with '\'. While CR comes straight after \
compiler thinks it is special symbol and emits an error.

Please inform me whether these will be fixed or not - my work depends of
this.

Thank you in advance
Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  2:02       ` Jason Merrill
@ 1999-04-30 23:15         ` Jason Merrill
  0 siblings, 0 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: egcs

>>>>> Ildar Mulyukov <ildar@faki-campus.mipt.ru> writes:

 > On 11 Apr 1999, Jason Merrill wrote:
 >> Would someone explain to me what anonymous structs are good for?  It seems
 >> like a totally pointless extension.

 > Hey! That's simple.

OK, I get it.  Thanks.

 >> WRT cr/lf issues, in the current development sources cpplib handles them
 >> interchangeably, so you might try that out.

 > I checked out cvs version of egcs week ago. It could not handle CRLF
 > properly.

You need to configure with --enable-cpplib.

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:53     ` Ildar Mulyukov
  1999-04-11 13:15       ` Joe Buck
@ 1999-04-30 23:15       ` Ildar Mulyukov
  1 sibling, 0 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: egcs

On 10 Apr 1999, Andi Kleen wrote:

> Anonymous structures are a Microsoft extension. They are
> also supported by the plan9 compiler I think.
> 
> -Andi
Sorry but how fast would it be implemented?

Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-09 22:46 ` Alexandre Oliva
  1999-04-10  1:00   ` Andi Kleen
  1999-04-11 23:44   ` Andris Pavenis
@ 1999-04-30 23:15   ` Alexandre Oliva
  2 siblings, 0 replies; 42+ messages in thread
From: Alexandre Oliva @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Ildar Mulyukov; +Cc: egcs

On Apr 10, 1999, Ildar Mulyukov <ildar@faki-campus.mipt.ru> wrote:

> But when I just started using egcs c++ I encountered 2 problems.

Nope, egcs did encounter 2 problems :-D

> struct _stru {
>     int i;
>     union {
>         struct { int j0, j1; };
                                ^ some variable name is missing here
>         int j[2];
>     }
       ^ struct and union declarations must be terminated with `;'
> };

> The worst thing is that TinySoft's VisualC++ eats it ok :-)

Send them a bug report then :-)

> 2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
> except when one ends line with '\'. While CR comes straight after \
> compiler thinks it is special symbol and emits an error.

AFAIK, this is not supposed to work, but, if it works at all, it would
probably only work in MS-DOS like platforms.  But I'm not sure about
that.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 13:11       ` Mumit Khan
  1999-04-12 13:39         ` Zack Weinberg
  1999-04-13  7:15         ` Gavin Romig-Koch
@ 1999-04-30 23:15         ` Mumit Khan
  2 siblings, 0 replies; 42+ messages in thread
From: Mumit Khan @ 1999-04-30 23:15 UTC (permalink / raw)
  To: egcs

On Sun, 11 Apr 1999, Tim Waugh wrote:

> On 11 Apr 1999, Jason Merrill wrote:
> 
> > Would someone explain to me what anonymous structs are good for?  It seems
> > like a totally pointless extension.
> 
> The WINE people were talking about trying to get support for anonymous
> structs into egcs.  The Windows headers seem to be littered with them, so 
> it would make people's lives easier who want to write applications for
> Windows _and_ WineLib.

This is also a very important issue for GCC under windows32. We now have 
to resort to reinventing the system headers, which is painful and 
error-prone. The only way to keep GCC up-to-date on this platform is to 
be able to use MS Platform SDK headers, but unfortunately those are 
peppered with these anon struct/union extensions.

There have been two set of patches to date that I know of -- 

(1) Alastair Houghton's changes a year or so ago. It added a few small
  breakages, which is expected; I just never had the time to see what 
  was causing those, let alone try to find a fix.

(2) Antonio Mendes de Oliveira Neto's patches posted to egcs-patches.

> 
> But then, the Windows headers are littered with all sorts of things..

Sigh, yes. I (almost) feel sorry for the person who thought that CPP 
macros are fun and created the gazillions of macros in the API header
files ... must be hated even within the halls of Redmond.

Regards,
Mumit



^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 20:56         ` Jason Merrill
  1999-04-12 21:30           ` Jeffrey A Law
@ 1999-04-30 23:15           ` Jason Merrill
  1 sibling, 0 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Mumit Khan; +Cc: egcs

>>>>> Mumit Khan <khan@xraylith.wisc.edu> writes:

 > There have been two set of patches to date that I know of -- 

 > (1) Alastair Houghton's changes a year or so ago. It added a few small
 >   breakages, which is expected; I just never had the time to see what 
 >   was causing those, let alone try to find a fix.

Do you have this handy?

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-10  1:00   ` Andi Kleen
  1999-04-10 13:21     ` Joe Buck
  1999-04-11  1:53     ` Ildar Mulyukov
@ 1999-04-30 23:15     ` Andi Kleen
  2 siblings, 0 replies; 42+ messages in thread
From: Andi Kleen @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Alexandre Oliva; +Cc: egcs, ildar

oliva@dcc.unicamp.br (Alexandre Oliva) writes:

> On Apr 10, 1999, Ildar Mulyukov <ildar@faki-campus.mipt.ru> wrote:
> 
> > But when I just started using egcs c++ I encountered 2 problems.
> 
> Nope, egcs did encounter 2 problems :-D
> 
> > struct _stru {
> >     int i;
> >     union {
> >         struct { int j0, j1; };
>                                 ^ some variable name is missing here
> >         int j[2];
> >     }
>        ^ struct and union declarations must be terminated with `;'
> > };
> 
> > The worst thing is that TinySoft's VisualC++ eats it ok :-)
> 
> Send them a bug report then :-)

Anonymous structures are a Microsoft extension. They are
also supported by the plan9 compiler I think.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:49     ` Ildar Mulyukov
  1999-04-11  2:02       ` Jason Merrill
@ 1999-04-30 23:15       ` Ildar Mulyukov
  1 sibling, 0 replies; 42+ messages in thread
From: Ildar Mulyukov @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Jason Merrill; +Cc: egcs

On 11 Apr 1999, Jason Merrill wrote:

> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

Hey! That's simple. E.g
struct _stru {
    int i;
    union {
        struct { int j0, j1; };
        int j[2];
    };
};
_stru aStructure;

We can directly use both aStructure.j0 and aStructure.j[0] (in "for"
loops).

> WRT cr/lf issues, in the current development sources cpplib handles them
> interchangeably, so you might try that out.

I checked out cvs version of egcs week ago. It could not handle CRLF
properly.

> Jason
> 


Ildar Mulyukov, student of DACR, MIPT (Moscow, Russia)
e-mail: ildar@faki-campus.mipt.ru, ICQ# 4334029





^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 21:30           ` Jeffrey A Law
@ 1999-04-30 23:15             ` Jeffrey A Law
  0 siblings, 0 replies; 42+ messages in thread
From: Jeffrey A Law @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Jason Merrill; +Cc: Mumit Khan, egcs

  In message < u9zp4dgolp.fsf@yorick.cygnus.com >you write:
  > >>>>> Mumit Khan <khan@xraylith.wisc.edu> writes:
  > 
  >  > There have been two set of patches to date that I know of -- 
  > 
  >  > (1) Alastair Houghton's changes a year or so ago. It added a few small
  >  >   breakages, which is expected; I just never had the time to see what 
  >  >   was causing those, let alone try to find a fix.
  > 
  > Do you have this handy?
I don't have Alastair's stuff, but I do have Antonio's patches.


jeff

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  1:40   ` Jason Merrill
                       ` (2 preceding siblings ...)
  1999-04-11  4:08     ` Tim Waugh
@ 1999-04-30 23:15     ` Jason Merrill
  3 siblings, 0 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Alexandre Oliva, egcs, ildar

Would someone explain to me what anonymous structs are good for?  It seems
like a totally pointless extension.

WRT cr/lf issues, in the current development sources cpplib handles them
interchangeably, so you might try that out.

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11 23:44   ` Andris Pavenis
@ 1999-04-30 23:15     ` Andris Pavenis
  0 siblings, 0 replies; 42+ messages in thread
From: Andris Pavenis @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Alexandre Oliva, Ildar Mulyukov; +Cc: egcs

On Sat, 10 Apr 1999, Alexandre Oliva wrote:
>> 2. Compiling dos-formatted files (CR-LF instead of LF) invokes no problem
>> except when one ends line with '\'. While CR comes straight after \
>> compiler thinks it is special symbol and emits an error.
>
>AFAIK, this is not supposed to work, but, if it works at all, it would
>probably only work in MS-DOS like platforms.  But I'm not sure about
>that.

It works for DJGPP. But it causes problems when somebody wants to transfer
sources to Linux....  (I tried to build egcs-1.1.2 as Linux to DJGPP
cross-compiler from sources patched under MS-DOS and had to generate 
patched sources once more).

There are more problems  as for example configure generates MS-DOS style text
files when run with DJGPP port of bash (+ other needed tools of course). Some 
scripts even becomes broken as result.

Andris

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-13  7:15         ` Gavin Romig-Koch
@ 1999-04-30 23:15           ` Gavin Romig-Koch
  0 siblings, 0 replies; 42+ messages in thread
From: Gavin Romig-Koch @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Mumit Khan; +Cc: egcs

 > There have been two set of patches to date that I know of -- 
 > 
 > (1) Alastair Houghton's changes a year or so ago. It added a few small
 >   breakages, which is expected; I just never had the time to see what 
 >   was causing those, let alone try to find a fix.

Could you point me to these, or send them to me?

                                                -gavin...

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11 13:51       ` Alexandre Oliva
@ 1999-04-30 23:15         ` Alexandre Oliva
  0 siblings, 0 replies; 42+ messages in thread
From: Alexandre Oliva @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Jason Merrill, egcs, ildar

On Apr 11, 1999, Andi Kleen <ak@muc.de> wrote:

> Another use would be "poor man's inheritance" in C:

> struct node {
> 	struct node *prev, *next;
> }; 
> struct bla { 
> 	struct node;
> 	int val; 
> }; 

Ok, this could be valid extended C, but it already has a different
meaning in C++: it declares a nested class bla::node.

-- 
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Brasil
{oliva,Alexandre.Oliva}@dcc.unicamp.br  aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
*** E-mail about software projects will be forwarded to mailing lists


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 15:20           ` Gerald Pfeifer
  1999-04-12 18:01             ` Jeffrey A Law
@ 1999-04-30 23:15             ` Gerald Pfeifer
  1 sibling, 0 replies; 42+ messages in thread
From: Gerald Pfeifer @ 1999-04-30 23:15 UTC (permalink / raw)
  To: egcs

On 11 Apr 1999, Jason Merrill wrote:
> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.
and later someone replied
> The WINE people were talking about trying to get support for anonymous
> structs into egcs.  The Windows headers seem to be littered with them

Indeed at http://www.cygnus.com/news/corel.html there is a press release
that describes a deal between Corel and Cygnus in the course of which 
Cygnus will implement anonymous unions.

At http://www.integrita.com/cgi-local/lwgate.pl/WINE-DEVEL/archives/1999-03/Subject/article-210.html
the Corel project leader explictely mentions:

  4) General syntactic enhancements to make MSVC code compile.  This
  includes things like __stdcall, anonymous unions, etc etc.  

Apparently those Cygnus employees assigned these task are not subscribed
to the egcs lists, however,... ;-)

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/


^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-12 20:48             ` Jason Merrill
@ 1999-04-30 23:15               ` Jason Merrill
  0 siblings, 0 replies; 42+ messages in thread
From: Jason Merrill @ 1999-04-30 23:15 UTC (permalink / raw)
  To: pfeifer; +Cc: egcs

>>>>> Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> writes:

 >   4) General syntactic enhancements to make MSVC code compile.  This
 >   includes things like __stdcall, anonymous unions, etc etc.  

 > Apparently those Cygnus employees assigned these task are not subscribed
 > to the egcs lists, however,... ;-)

Actually, that would be me.  I knew it was part of the contract, I just
wanted someone to tell me why.  :)

Jason

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-11  2:50     ` Andi Kleen
  1999-04-11 13:51       ` Alexandre Oliva
@ 1999-04-30 23:15       ` Andi Kleen
  1 sibling, 0 replies; 42+ messages in thread
From: Andi Kleen @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Jason Merrill, Andi Kleen; +Cc: Alexandre Oliva, egcs, ildar

On Sun, Apr 11, 1999 at 10:40:03AM +0200, Jason Merrill wrote:
> Would someone explain to me what anonymous structs are good for?  It seems
> like a totally pointless extension.

It is a nice way to short cut the #define mazes one often sees, e.g.

struct bla { 
	// ...
	union { 
		struct { int a,b; } A;
		int c;
	} blub; 
}; 
#define bla_a blub.A.a
#define bla_b blub.A.b
#define bla_c bla.c

Another use would be "poor man's inheritance" in C:

struct node {
	struct node *prev, *next;
}; 
struct bla { 
	struct node;
	int val; 
}; 

Now you can walk the bla list directly via ->next and ->prev points,
without playing macro games, or having to type the error prone 
nd.prev/nd.next all the time (ok the cast is still ugly). 

I have seen these two situations very often in real world code.

They are also a nice symetry to anonymous unions in C++; I would guess
if you implement one it isn't that hard to implement the other (and
anonymous unions are already implemented in G++, but not in GCC) 

here was a C9x proposal from Ken Thompson that described the rationale
for it better than me, but I cannot find it on the super slow WG14 WWW
server ATM. The comitee did reject it for some reason though.

I think they would be useful, but of course the tradeoff between just
another extension and maintainability is up to the maintainers.

-Andi

-- 
This is like TV. I don't like TV.

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: TODO: egcs-g++
  1999-04-10 13:21     ` Joe Buck
@ 1999-04-30 23:15       ` Joe Buck
  0 siblings, 0 replies; 42+ messages in thread
From: Joe Buck @ 1999-04-30 23:15 UTC (permalink / raw)
  To: Andi Kleen; +Cc: oliva, egcs, ildar

> > > struct _stru {
> > >     int i;
> > >     union {
> > >         struct { int j0, j1; };
> >                                 ^ some variable name is missing here
> > >         int j[2];
> > >     }
> >        ^ struct and union declarations must be terminated with `;'
> > > };
> > 
> > > The worst thing is that TinySoft's VisualC++ eats it ok :-)
> > 
> > Send them a bug report then :-)
> 
> Anonymous structures are a Microsoft extension. They are
> also supported by the plan9 compiler I think.

Perhaps we should accept them with a warning (in the context of
a surrounding union or struct).  After all, the 800-pound gorilla
says we should. :-)


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~1999-04-30 23:15 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-09 21:31 TODO: egcs-g++ Ildar Mulyukov
1999-04-09 22:46 ` Alexandre Oliva
1999-04-10  1:00   ` Andi Kleen
1999-04-10 13:21     ` Joe Buck
1999-04-30 23:15       ` Joe Buck
1999-04-11  1:53     ` Ildar Mulyukov
1999-04-11 13:15       ` Joe Buck
1999-04-30 23:15         ` Joe Buck
1999-04-30 23:15       ` Ildar Mulyukov
1999-04-30 23:15     ` Andi Kleen
1999-04-11 23:44   ` Andris Pavenis
1999-04-30 23:15     ` Andris Pavenis
1999-04-30 23:15   ` Alexandre Oliva
     [not found] ` <m390c06h4d.fsf.cygnus.egcs@muc.de>
1999-04-11  1:40   ` Jason Merrill
1999-04-11  1:49     ` Ildar Mulyukov
1999-04-11  2:02       ` Jason Merrill
1999-04-30 23:15         ` Jason Merrill
1999-04-30 23:15       ` Ildar Mulyukov
1999-04-11  2:50     ` Andi Kleen
1999-04-11 13:51       ` Alexandre Oliva
1999-04-30 23:15         ` Alexandre Oliva
1999-04-30 23:15       ` Andi Kleen
1999-04-11  4:08     ` Tim Waugh
1999-04-12 13:11       ` Mumit Khan
1999-04-12 13:39         ` Zack Weinberg
1999-04-12 15:20           ` Gerald Pfeifer
1999-04-12 18:01             ` Jeffrey A Law
1999-04-30 23:15               ` Jeffrey A Law
1999-04-30 23:15             ` Gerald Pfeifer
     [not found]           ` <Pine.GSO.4.10.9904130014560.14974-100000.cygnus.egcs@alphard.dbai.tuwien.ac.at>
1999-04-12 20:48             ` Jason Merrill
1999-04-30 23:15               ` Jason Merrill
1999-04-30 23:15           ` Zack Weinberg
1999-04-13  7:15         ` Gavin Romig-Koch
1999-04-30 23:15           ` Gavin Romig-Koch
1999-04-30 23:15         ` Mumit Khan
     [not found]       ` <Pine.SUN.3.93.990412150105.700E-100000.cygnus.egcs@modi.xraylith.wisc.edu>
1999-04-12 20:56         ` Jason Merrill
1999-04-12 21:30           ` Jeffrey A Law
1999-04-30 23:15             ` Jeffrey A Law
1999-04-30 23:15           ` Jason Merrill
1999-04-30 23:15       ` Tim Waugh
1999-04-30 23:15     ` Jason Merrill
1999-04-30 23:15 ` Ildar Mulyukov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).