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]
Other format: [Raw text]

Re: PATCH: removes expand_constant language hook


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


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