diff options
author | Ian Lance Taylor <iant@golang.org> | 2019-06-23 22:10:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-06-23 22:10:19 +0000 |
commit | 587bd42530cee75da83979b18bb170302c915034 (patch) | |
tree | 9f53c18a8d1b2e95240549d6e6f986ff70bebd99 /gcc/ada/gcc-interface/utils.c | |
parent | 26fcb396d1eecc73636ad5a694a16c5bb54fcd26 (diff) | |
download | gcc-587bd42530cee75da83979b18bb170302c915034.zip gcc-587bd42530cee75da83979b18bb170302c915034.tar.gz gcc-587bd42530cee75da83979b18bb170302c915034.tar.bz2 |
compiler: edit error messages to avoid -Wformat-diag warnings
GCC recently introduced -Wformat-diag to scrutinize GCC error messages.
It reports a number of warnings about gofrontend code, such as:
../../trunk/gcc/go/gofrontend/import.cc: In member function ‘Type* Import::type_for_index(int, const string&, size_t, bool*)’:
../../trunk/gcc/go/gofrontend/import.cc:1129:48: warning: unquoted operator ‘>=’ in format [-Wformat-diag]
1129 | "error in %s at %lu: bad type index %d >= %d",
| ^~
../../trunk/gcc/go/gofrontend/ast-dump.cc: In member function ‘void Ast_dump_context::dump(Gogo*, const char*)’:
../../trunk/gcc/go/gofrontend/ast-dump.cc:203:25: warning: unquoted option name ‘-fgo-dump-ast’ in format [-Wformat-diag]
203 | "cannot open %s:%m, -fgo-dump-ast ignored", dumpname.c_str());
| ^~~~~~~~~~~~~
../../trunk/gcc/go/gofrontend/expressions.cc: In static member function ‘static Bexpression* Func_expression::get_code_pointer(Gogo*, Named_object*, Location)’:
../../trunk/gcc/go/gofrontend/expressions.cc:1350:29: warning: misspelled term ‘builtin function’ in format; use ‘built-in function’ instead [-Wformat-diag]
1350 | "invalid use of special builtin function %qs; must be called",
| ^~~~~~~~~~~~~~~~
../../trunk/gcc/go/gofrontend/gogo.cc: In member function ‘void Gogo::add_linkname(const string&, bool, const string&, Location)’:
../../trunk/gcc/go/gofrontend/gogo.cc:2527:4: warning: unquoted sequence of 2 consecutive punctuation characters ‘//’ in format [-Wformat-diag]
2527 | ("%s is not a function; "
| ~^~~~~~~~~~~~~~~~~~~~~~~~
2528 | "//go:linkname is only supported for functions"),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This CL edits error messages to avoid these warnings.
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183497
* go.test/test/blank1.go: Update for diagnostic message changes.
From-SVN: r272608
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
0 files changed, 0 insertions, 0 deletions