[cxx-abi-dev] ABI: Mangling of reference temporaries

Alain Miniussi alainm at cup.hp.com
Wed Jul 18 20:17:26 UTC 2001


Jason Merrill wrote:
> 
> Consider:
> 
>   int f ();
>   inline int g ()
>   {
>     static int &r = f ();
>     return r;
>   }
> 
>   int main ()
>   {
>     return g ();
>   }
 [..]
> Thoughts?

"What a mess..."
Ok, that's more a reflex than a thought :-)

I think we should define which subset of simple cases is required to work
a specify the rest as "implementationS defined/I_might_even_work" cases. 
Unless it can be established that the benefit is worth the trouble, 
stuff like "two statics with same name" "static bound to temporary"
should fall in the later category.

Alain



More information about the cxx-abi-dev mailing list