Skip to content

Word mixing live comsub (left) and parent-fatal unbound (right): GNU prints the child diagnostic first via literal interleaving (q5 shape) #319

Closed

Description

@caomengxuan666

From wt13/fixpack #307 residue (probe q5): a single word with a command substitution on the left and an unbound parameter on the right - GNU expands left-to-right so the forked child's unbound diagnostic prints BEFORE the parent's fatal one; our static pre-scan cannot interleave. Reproducer in target/issue-suites/results/fixpack307/ (q5).

Activity

  1. added
    bug
    on Sep 29, 2026
  2. caomengxuan666 commented on Sep 29, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by wt16/fix16 (82463f9, master): the nounset pre-scan reported the fatal error before any expansion ran, discarding the side effects of live command substitutions to its left. GNU expands left-to-right and forks at the comsub point (subst.c:13219/11229 word-list order, :7143 fork-at-point); the scan now collects and executes the left-prefix comsub bodies through expand_command_substitution before reporting. q5a-q5g all MATCH (incl. unbound-on-the-left where the comsub does NOT run, cross-word ordering, and the nine #307 boundary shapes); new-exp suite unchanged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions