This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C PATCH: Don't generate initializers incrementally
- To: jsm28 at cam dot ac dot uk
- Subject: Re: C PATCH: Don't generate initializers incrementally
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Sat, 04 Nov 2000 10:29:54 -0800
- Cc: rth at cygnus dot com, gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <20001027175908C.mitchell@codesourcery.com><Pine.LNX.4.30.0011041746520.18965-100000@jsm28.trin.cam.ac.uk>
>>>>> "Joseph" == Joseph S Myers <jsm28@cam.ac.uk> writes:
Joseph> int i[10000000] = { 0, 1, 2, 3, 4, 5, /* ... */ 9999998,
Joseph> 9999999, [0] = -1 };
Joseph> is valid C99, and unless your assembler lets you go
Joseph> backwards and override previously specified data, the
Joseph> whole array will need to be kept until the closing '}'.
Fascinating. I didn't know that C99 allowed this, but what you say
means that my change actually should make it much easier to implement
this C99 feature.
Someday, we really do want GCC to generate .o files without going
through an assembler, and that means that you can't "fire-and-forget";
you'll generally have to keep the entire .o around as you build it.
So, I think the notion of incrementally generating these things is a
little odd, the `xphoon' example not withstanding.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com