From: tharbaugh@lnxi.com (Thayne Harbaugh)
To: linux-mtd@lists.infradead.org
Subject: [PATCH] C99 initializers for drivers/mtd files
Date: 03 Mar 2003 14:21:29 -0700 [thread overview]
Message-ID: <1046726489.2672.641.camel@tubarao> (raw)
In-Reply-To: <20030303210613.GA7875@wohnheim.fh-wedel.de>
--=-VG6xTcuLBgQIdyzP0w2K
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hmmm. I guess C99 mostly works - with the exception of array
initializers:
[thayne at tubarao tmp]$ cat foo.c
=
=20
struct foo {
int bar;
int baz;
};
=
=20
struct foo fufu[] =3D {
[0].bar =3D 0,
[0].baz =3D 0
};
=
=20
[thayne at tubarao tmp]$ gcc -c foo.c
foo.c:8: unknown field `bar' specified in initializer
It's the array initialization that I want to use. Grrrr!
On Mon, 2003-03-03 at 14:06, J=F6rn Engel wrote:
> On Mon, 3 March 2003 13:49:27 -0700, Thayne Harbaugh wrote:
> >=20
> > GCC 2.95 does not understand C99 and will fail to compile kernels
> > that require this syntax.
>=20
> You had me for a moment. But at least Debians gcc 2.95.4 does not fail
> too badly:
>=20
> joern at Limerick:~/foo$ cat foo.c
> struct foo {
> int bar;
> int baz;
> };
>=20
> struct foo fufu =3D {
> .bar =3D 0,
> .baz =3D 0
> };
> joern at Limerick:~/foo$ gcc --version
> 2.95.4
> joern at Limerick:~/foo$ gcc -c foo.c
> joern at Limerick:~/foo$ ls
> foo.c foo.o
> joern at Limerick:~/foo$ =20
>=20
> What compiler do you have that breaks with C99 initializers?
>=20
> J=F6rn
--=20
Thayne Harbaugh
Linux Networx
--=-VG6xTcuLBgQIdyzP0w2K
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQA+Y8dYfsBPTKE6HMkRAnOQAJ9NZnPOXRGbE+t0GVcUpKvy+fBB3ACfWAp0
9g5zrdqObx7vv79g80fbU9E=
=zBXV
-----END PGP SIGNATURE-----
--=-VG6xTcuLBgQIdyzP0w2K--
next prev parent reply other threads:[~2003-03-03 21:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-26 20:53 [PATCH] C99 initializers for drivers/mtd files Art Haas
2003-02-27 19:44 ` Jörn Engel
2003-02-27 21:46 ` Art Haas
2003-03-02 18:56 ` Jörn Engel
2003-03-03 20:49 ` Thayne Harbaugh
2003-03-03 21:06 ` Jörn Engel
2003-03-03 21:21 ` Thayne Harbaugh [this message]
2003-03-03 21:33 ` Art Haas
2003-03-03 21:41 ` Thayne Harbaugh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1046726489.2672.641.camel@tubarao \
--to=tharbaugh@lnxi.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox