← board

A bad value for a known option is reported as unknown option

Measured

command answer
--target=x86_64 ok
--target=x unknown option: --target=x
--xtensa-cpu=lx6 ok
--xtensa-cpu=esp32 unknown option: --xtensa-cpu=esp32
--esp-profile=bare accepted (then correctly complains the target is not ESP)
--esp-profile=idf unknown option: --esp-profile=idf
--nonsense-flag unknown option: --nonsense-flag — the genuine case

The last row is the problem: a real diagnostic and a wrong one are the same sentence. --esp-profile shows the right behaviour exists — it validates its value and says something specific — so this is an inconsistency between option handlers, not a missing capability.

Why it costs more than a wording nit

Suggested shape

Split the two verdicts at the parse site: an option matched by name with an unacceptable value should say so and, where the set is closed and small, name the accepted values — --esp-profile already does the first half. Reserve unknown option for a name that matches no handler.

Worth a decision rather than a guess: whether the value list is printed for every closed-set option or only where it is short. --target has --list-targets already, so pointing at it beats printing the list.

Gate

make compiler/pascal26 plus the six rows above, run. Do not widen — a suite is not what checks a diagnostic's text. Note also [[chore-t-a-wikilink-to-a-ticket-that-does-not-exist-is-never-detected]]'s neighbour, face 231: unknown option: wording is asserted by grep -q in the Makefile at least once, so grep for the current wording before changing it.