Hi,
I'm getting warnings from ruby system headers, and I see that the pkg-config
file included with the package is using `-I` instead of `-isystem`.
$ cat ruby.c
#include <ruby.h>
int
main(void)
{
static const char *argv[3] = {
"NGINX_Unit", "-rrbconfig",
"-eprint RbConfig::CONFIG['libdir']"
};
RUBY_INIT_STACK;
ruby_init();
return ruby_run_node(ruby_options(3, (char **) argv));
}
$ pkg-config --cflags ruby
-I/usr/include/x86_64-linux-gnu/ruby-2.7.0 -I/usr/include/ruby-2.7.0
$ clang ruby.c $(pkg-config --cflags --libs ruby)
In file included from ruby.c:1:
In file included from /usr/include/ruby-2.7.0/ruby.h:33:
/usr/include/ruby-2.7.0/ruby/ruby.h:1863:1: warning: unknown attribute '__error__' ignored [-Wunknown-attributes]
ERRORFUNC((" argument length doesn't match"), int rb_varargs_bad_length(int,int));
^
/usr/include/x86_64-linux-gnu/ruby-2.7.0/ruby/config.h:153:43: note: expanded from macro 'ERRORFUNC'
#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
^
I suggest using -isystem instead of -I to silence the warnings (and also,
to fix the warnings themselves, but I'll report those upstream directly).
Thanks,
Alex