From: jaruga@... Date: 2020-12-11T14:23:01+00:00 Subject: [ruby-core:101417] [Ruby master Bug#17385] Test failures on gcc 11 Issue #17385 has been updated by jaruga (Jun Aruga). > Does this work? I tested with the patch. But no it does not work. Here is the log. Sorry for the long long. I noticed the warnings appear at the timing of the `make`. In the log the `1) Failure` I see today might be not related to the gcc 11 issue. ``` + /usr/bin/make -O -j8 V=1 VERBOSE=1 'COPY=cp -p' Q= BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0 CPPFLAGS = DLDFLAGS = -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-soname,libruby.so.3.0 -fstack-protector-strong -m64 SOLIBS = -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm LANG = C LC_ALL = LC_CTYPE = MFLAGS = -j8 -Otarget --jobserver-auth=4,5 gcc (GCC) 11.0.0 20201204 (Red Hat 11.0.0-0) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0 -o dmyext.o -c dmyext.c gcc -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0 -o dmydln.o -c dmydln.c In file included from ./include/ruby/internal/assume.h:29, from ./include/ruby/backward/2/assume.h:24, from ./include/ruby/defines.h:73, from ./include/ruby/ruby.h:23, from dmydln.c:1: ./include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ ./include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ ./include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ ./include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ ./include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ ./include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ ... + make check 'TESTS=-v ' 'MSPECOPT=-fs -P '\''raises TypeError if one of the passed exceptions is not a Module'\''' BASERUBY = echo executable host ruby is required. use --with-baseruby option.; false CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -DRUBY_DEVEL=1 -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0 CPPFLAGS = DLDFLAGS = -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-soname,libruby.so.3.0 -fstack-protector-strong -m64 SOLIBS = -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm LANG = C LC_ALL = LC_CTYPE = MFLAGS = ... 1) Failure: TestBundledCA#test_accessing_rubygems [/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/test/rubygems/test_bundled_ca.rb:46]: rubygems.org is not verifiable using the included certificates. Error was: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate) 2) Failure: TestMkmf::TestConvertible#test_typeof_builtin [/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/test/mkmf/test_convertible.rb:9]: convertible_int: checking for convertible type of short... -------------------- short -------------------- convertible_int: checking for convertible type of int... -------------------- int -------------------- convertible_int: checking for convertible type of long... -------------------- long -------------------- convertible_int: checking for convertible type of signed short... -------------------- failed "gcc -o conftest -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC conftest.c -L. -L/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -m64 -lruby-static -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm -lm -lc" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: /*top*/ 6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1]; /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:12: error: conflicting types for 'foo' 6 | extern int foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern int foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern short foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:13: error: conflicting types for 'foo' 6 | extern long foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern long foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:18: error: conflicting types for 'foo' 6 | extern long long foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern long long foo(); /* end */ -------------------- .. <"short"> expected but was . 3) Failure: TestMkmf::TestConvertible#test_typeof_typedef [/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/test/mkmf/test_convertible.rb:22]: convertible_int: checking for convertible type of test1_t... -------------------- failed "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: typedef test1_t rbcv_typedef_; 5: 6: /*top*/ 7: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1]; /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:12: error: conflicting types for 'foo' 8 | extern int foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern int foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern short foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:13: error: conflicting types for 'foo' 8 | extern long foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern long foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:18: error: conflicting types for 'foo' 8 | extern long long foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern long long foo(); /* end */ -------------------- .. <"short"> expected but was . Finished tests in 652.047166s, 32.1096 tests/s, 4087.8914 assertions/s. 20937 tests, 2665498 assertions, 3 failures, 0 errors, 52 skips ruby -v: ruby 3.0.0dev (2020-12-04 master 1cfc6e7b7a) [x86_64-linux] ``` ---------------------------------------- Bug #17385: Test failures on gcc 11 https://bugs.ruby-lang.org/issues/17385#change-89178 * Author: jaruga (Jun Aruga) * Status: Open * Priority: Normal * Target version: 3.0 * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- There is gcc 11 (development version) [1]. On Fedora rawhide (Fedora 34), the gcc version is 11.0.0-0.7.fc34. I got 2 test failures on Fedora 34. The failures come from a warning `-Wsizeof-array-div` that is a new feature on gcc 11. Here is the log. ``` + make check 'TESTS=-v ' 'MSPECOPT=-fs -P '\''raises TypeError if one of the passed exceptions is not a Module'\''' ... 1) Failure: TestMkmf::TestConvertible#test_typeof_builtin [/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/test/mkmf/test_convertible.rb:9]: convertible_int: checking for convertible type of short... -------------------- short -------------------- convertible_int: checking for convertible type of int... -------------------- int -------------------- convertible_int: checking for convertible type of long... -------------------- long -------------------- convertible_int: checking for convertible type of signed short... -------------------- failed "gcc -o conftest -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC conftest.c -L. -L/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a -L. -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -m64 -lruby-static -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm -lm -lc" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: int main(int argc, char **argv) 4: { 5: return !!argv[argc]; 6: } /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: /*top*/ 6: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1]; /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:12: error: conflicting types for 'foo' 6 | extern int foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern int foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern short foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:13: error: conflicting types for 'foo' 6 | extern long foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern long foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:6:18: error: conflicting types for 'foo' 6 | extern long long foo(); | ^~~ conftest.c:5:22: note: previous declaration of 'foo' was here 5 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: typedef signed short rbcv_typedef_; 4: 5: extern rbcv_typedef_ foo(); 6: extern long long foo(); /* end */ -------------------- .. <"short"> expected but was . 2) Failure: TestMkmf::TestConvertible#test_typeof_typedef [/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/test/mkmf/test_convertible.rb:22]: convertible_int: checking for convertible type of test1_t... -------------------- failed "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: warning: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Wsizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: typedef test1_t rbcv_typedef_; 5: 6: /*top*/ 7: int conftest_const[((rbcv_typedef_)-1 < 0) ? 1 : -1]; /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:12: error: conflicting types for 'foo' 8 | extern int foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern int foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern short foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:13: error: conflicting types for 'foo' 8 | extern long foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern long foo(); /* end */ "gcc -I. -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/.ext/include/x86_64-linux -I/builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include -I./test -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -m64 -Werror -c conftest.c" In file included from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/assume.h:29, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/backward/2/assume.h:24, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/defines.h:73, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/ruby.h:23, from /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby.h:31, from conftest.c:1: /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: error: expression does not compute the number of elements in this array; element type is 'VALUE' {aka 'long unsigned int'}, not 'char' [-Werror=sizeof-array-div] 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rbasic.h:40:59: note: add parentheses around the second 'sizeof' to silence this warning 40 | RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T))) | ^ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/cast.h:33:29: note: in definition of macro 'RBIMPL_CAST' 33 | # define RBIMPL_CAST(expr) (expr) | ^~~~ /builddir/build/BUILD/ruby-3.0.0-1cfc6e7b7a/include/ruby/internal/core/rstring.h:70:31: note: in expansion of macro 'RBIMPL_EMBED_LEN_MAX_OF' 70 | RSTRING_EMBED_LEN_MAX = RBIMPL_EMBED_LEN_MAX_OF(char) - 1 | ^~~~~~~~~~~~~~~~~~~~~~~ conftest.c:8:18: error: conflicting types for 'foo' 8 | extern long long foo(); | ^~~ conftest.c:7:22: note: previous declaration of 'foo' was here 7 | extern rbcv_typedef_ foo(); | ^~~ cc1: all warnings being treated as errors checked program was: /* begin */ 1: #include "ruby.h" 2: 3: #include 4: 5: typedef test1_t rbcv_typedef_; 6: 7: extern rbcv_typedef_ foo(); 8: extern long long foo(); /* end */ -------------------- .. <"short"> expected but was . Finished tests in 806.091775s, 25.9722 tests/s, 3308.1320 assertions/s. 20936 tests, 2666658 assertions, 2 failures, 0 errors, 52 skips ruby -v: ruby 3.0.0dev (2020-12-04 master 1cfc6e7b7a) [x86_64-linux] ``` Seeing the gcc 11 release note [2], it seems that the new warning `-Wsizeof-array-div` causes the failures. > C family > New warnings: > -Wsizeof-array-div, enabled by -Wall, warns about divisions of two sizeof operators when the first one is applied to an array and the divisor does not equal the size of the array element. Here is the detail of the warning. [3] Could you fix it? Thank you. [1] https://gcc.gnu.org/ [2] https://gcc.gnu.org/gcc-11/changes.html [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91741 -- https://bugs.ruby-lang.org/ Unsubscribe: