PATCH: removes expand_constant language hook

Ollie Wild aaw@google.com
Fri Mar 16 21:49:00 GMT 2007


On 3/15/07, Mark Mitchell <mark@codesourcery.com> wrote:
> I like this idea, but I'm not sure if it works -- does it handle
> recursion in the initializer?

Interesting.  It works in the sense that a and t both get initialized
with correct values, but the mechanism for initialization is wildly
different.

Without my patch, you get static initializations like:

.globl a
        .data
        .align 4
        .type   a, @object
        .size   a, 16
a:
        .long   _ZN1S3fooEv
        .long   0
        .long   _ZN1S3barEv
        .long   0

With my patch, initialization is performed by
_Z41__static_initialization_and_destruction_0iifunction.

Looks like I've got some more work to do.

Ollie



More information about the Gcc-patches mailing list