[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RP] patches to make it compile with very old compilers
From: |
Matthias Kilian |
Subject: |
Re: [RP] patches to make it compile with very old compilers |
Date: |
Mon, 20 Jul 2009 08:51:54 +0200 |
User-agent: |
Mutt/1.4.2.3i |
On Mon, Jul 20, 2009 at 08:11:26AM +0200, Bernhard R. Link wrote:
> * Matthias Kilian <address@hidden> [090719 09:47]:
> > For arrays of unspecified length (mentioned in an earlier mail,
> > IIRC): I think something like
> >
> > struct foo {
> > int bar;
> > char baz[];
> > };
> >
> > can easily be replaced by
> >
> > struct foo {
> > int bar;
> > char baz[0];
> > };
> >
> > without semantic changes (i.e. sizeof (struct foo) is the same for
> > both variants).
>
> Note that this is an gcc extension. So while it will make it work
> with older gcc compilers, it might cause to break with other compilers,
> even other up-to-date ones.
Ah, in this case, your approach (using a 1-sized array) is of course
better.
- [RP] patches to make it compile with very old compilers, Bernhard R. Link, 2009/07/17
- Re: [RP] patches to make it compile with very old compilers, J. R. Mauro, 2009/07/17
- Re: [RP] patches to make it compile with very old compilers, Shawn Betts, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Matthias Kilian, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Shawn Betts, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Matthias Kilian, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Shawn Betts, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, J.R. Mauro, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Shawn Betts, 2009/07/19
- Re: [RP] patches to make it compile with very old compilers, Bernhard R. Link, 2009/07/20
- Re: [RP] patches to make it compile with very old compilers,
Matthias Kilian <=