This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C PATCH: Don't generate initializers incrementally


>>>>> "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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]