On Thursday, April 12, 2012 18:53:41 Andrej Mitrovic wrote: > On 4/12/12, Max Samukha <[email protected]> wrote: > > I think the language should allow taking addresses of references in unsafe > > context. One valid and fairly frequent case is passing the address to C: > > > > extern(C) external_foo(S* s); > > > > void foo(ref S s) > > { > > > > external_foo(&s); > > > > } > > FWIW You can actually use 'ref' in an extern(C) function: > extern(C) external_foo(ref S s); > > wxD uses it.
Which I would have expected to be illegal, but for some bizarre reason, the compiler allows it. http://d.puremagic.com/issues/show_bug.cgi?id=7854 - Jonathan M Davis _______________________________________________ dmd-beta mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/dmd-beta
