ordering of constructors

llewelly@xmission.com llewelly@xmission.com
Sat Apr 10 06:20:00 GMT 2004


Daniel Jacobowitz <drow@false.org> writes:
[snip]

> For block scope variables, we used to initialize them on entry to the
> function.  It certainly appears that we still do that; see "guard
> variable" in the v3 ABI.  Right now that means we emit:
>         cmpb    $0, _ZGVZ3foovE10static_bar
>         jne     .L2
>         movl    $_ZZ3foovE10static_bar, (%esp)
>         call    _ZN3BarC1Ev
>         movb    $1, _ZGVZ3foovE10static_bar
> 
> That's not even thread-safe; I think there may be a PR about this
> somewhere?

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13684

maybe?



More information about the Gcc mailing list