mirror of
https://github.com/bminor/binutils-gdb.git
synced 2026-02-04 15:21:31 +00:00
Currently contrib/check_GNU_style_lib.py warns about '_("foo")', expecting
'_ ("foo")' instead:
...
$ cat tmp.patch
...
+const char *
+foo (void)
+{
+ return _("foo");
+}
$ ./contrib/check_GNU_style.py tmp.patch
=== ERROR type #1: there should be exactly one space between function name \
and parenthesis (1 error(s)) ===
test.c:4:10: return _("foo");
$
...
However '_("")' is an exception [1] to the rule, so skip the ERROR in this
case.
Likewise for 'operator()', which seems common enough:
...
$ find gdb* -type f \
| egrep -v '/testsuite/|ChangeLog' \
| xargs grep "::operator()" \
| wc -l
27
...
for example in gdb/dwarf2/read.c:
...
dwo_file_hash::operator() (const dwo_file_up &file) const noexcept
...
[1] https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Gettext_macro