diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-11-26 20:13:16 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-12-02 08:30:43 -0800 |
commit | 5bd5d85117ce968e68d41a746f917a63ed8e6ae6 (patch) | |
tree | 12e674d271cf7dfb97db1f8a1cc629ecfb58d048 /gcc/go/gofrontend/parse.cc | |
parent | ed281e4a944a8b62e66d160b0910bd2be9ef9330 (diff) | |
download | gcc-5bd5d85117ce968e68d41a746f917a63ed8e6ae6.zip gcc-5bd5d85117ce968e68d41a746f917a63ed8e6ae6.tar.gz gcc-5bd5d85117ce968e68d41a746f917a63ed8e6ae6.tar.bz2 |
compiler: reword "declared and not used" error message
This is a gofrontend copy of https://golang.org/cl/203282.
From the CL 203282 description:
"declared and not used" is technically correct, but might confuse
the user. Switching "and" to "but" will hopefully create the
contrast for the users: they did one thing (declaration), but
not the other --- actually using the variable.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273629
Diffstat (limited to 'gcc/go/gofrontend/parse.cc')
-rw-r--r-- | gcc/go/gofrontend/parse.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/parse.cc b/gcc/go/gofrontend/parse.cc index 00ac2f8..b1925ed 100644 --- a/gcc/go/gofrontend/parse.cc +++ b/gcc/go/gofrontend/parse.cc @@ -4817,7 +4817,7 @@ Parse::type_switch_body(Label* label, const Type_switch& type_switch, } } if (!used) - go_error_at(type_switch.location, "%qs declared and not used", + go_error_at(type_switch.location, "%qs declared but not used", Gogo::message_name(var_name).c_str()); } return statement; |