A cast as the object of . loses its parentheses #61

Closed
opened 2026-10-08 18:43:17 +02:00 by alex-eg · 1 comment
Owner

(. (cast pa (* const wanted)) distance) emits
(const wanted *)pa->distance, which C reads as a cast of
pa->distance on a void *. Like the conditional entry below, the
writer doesn't parenthesize a lower-precedence operand. Bound to a
typed local first, it works.


Found with sexc dfafe8b while building vs-map-viewer (from its Sex-field-notes.org).

`(. (cast pa (* const wanted)) distance)` emits `(const wanted *)pa->distance`, which C reads as a cast of `pa->distance` on a `void *`. Like the conditional entry below, the writer doesn't parenthesize a lower-precedence operand. Bound to a typed local first, it works. --- Found with sexc `dfafe8b` while building vs-map-viewer (from its `Sex-field-notes.org`).
alex-eg added the bug label 2026-10-08 18:43:17 +02:00
Author
Owner

Fixed by 8bc27cb.

Fixed by 8bc27cb.
Sign in to join this conversation.