[Nickle] references in structured values

Bart Massey bart at cs.pdx.edu
Sun May 16 01:31:02 PDT 2004

I'm having some issues with references in structured values
(arrays and structs).  I guess x.m is implicitly
dereferenced at some point before its address is taken.
This seems bad: you sometimes want to initialize these things
by passing their address.  Am I confused?

    $ nickle
    > typedef struct { &int m; } s;
    > void do_nothing(&poly r) {}
    > s x = {};
    > do_nothing(&x.m)
    Unhandled exception uninitialized_value ("Uninitialized
    <stdin>:5:     do_nothing (&x.m);


More information about the Nickle mailing list