Hacker News new | ask | show | jobs
by LeFantome 202 days ago
I do not think that is what they meant.

**c is valid but &&b makes no sense.

1 comments

Some languages do define &&b, like Rust, where its effect is similar to the parent post's C example: it creates a temporary stack allocation initialized with &b, and then takes the address of that.

You could argue this is inconsistent or confusing. It is certainly useful though.

Incidentally, C99 lets you do something similar with compound literal syntax; this is a valid expression:

    &(int *){&b}