]> Cypherpunks repositories - gostls13.git/commit
gc: abort if given an unknown debug (-d) flag
authorAustin Clements <austin@google.com>
Tue, 4 Nov 2014 14:43:37 +0000 (09:43 -0500)
committerAustin Clements <austin@google.com>
Tue, 4 Nov 2014 14:43:37 +0000 (09:43 -0500)
commit516d9ef53b656aa5e6eebdc2c09e8d257b13e033
tree3765aaa23b64271c788e12a0549a41ccd25354a0
parent182ec4395eff228673377127b8b8b69911e7762a
gc: abort if given an unknown debug (-d) flag

The check for unknown command line debug flags in gc was
incorrect: the loop over debugtab terminates when it reaches a
nil entry, but it was only reporting an error if the parser
had passed the last entry of debugtab (which it never did).
Fix this by reporting the usage error if the loop reaches a
nil entry.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/166110043
src/cmd/gc/lex.c