Skip to content

Commit c873f2b

Browse files
committed
[GR-18163] Use -Werror=implicit-function-declaration for all C extensions
PullRequest: truffleruby/3244
2 parents 8a4df09 + 8962633 commit c873f2b

File tree

8 files changed

+38
-5
lines changed

8 files changed

+38
-5
lines changed

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# 22.2.0
2+
3+
New features:
4+
5+
6+
Bug fixes:
7+
8+
9+
Compatibility:
10+
11+
12+
Performance:
13+
14+
15+
Changes:
16+
17+
* `-Werror=implicit-function-declaration` is now used for compiling C extensions to fail more clearly and earlier if a function is missing, like CRuby 3.2 (#2618, @eregon).
18+
119
# 22.1.0
220

321
New features:

ci.jsonnet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ local composition_environment = utils.add_inclusion_tracking(part_definitions, "
507507
"ruby-test-mri-linux": $.platform.linux + $.jdk.v11 + $.env.jvm + gate + $.run.test_mri + { timelimit: "01:10:00" },
508508
"ruby-test-mri-darwin": $.platform.darwin + $.jdk.v11 + $.env.jvm + gate + $.run.test_mri + { timelimit: "01:30:00" },
509509
"ruby-test-integration-linux": $.platform.linux + $.jdk.v11 + $.env.jvm + gate + $.run.test_integration,
510-
"ruby-test-cexts-linux": $.platform.linux + $.jdk.v11 + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_cexts,
510+
"ruby-test-cexts-linux": $.platform.linux + $.jdk.v11 + $.env.jvm + gate + $.use.gem_test_pack + $.use.sqlite331 + $.run.test_cexts,
511511
"ruby-test-cexts-darwin": $.platform.darwin + $.jdk.v11 + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_cexts + { timelimit: "01:20:00" },
512512
"ruby-test-gems-linux": $.platform.linux + $.jdk.v11 + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_gems,
513513
"ruby-test-gems-darwin": $.platform.darwin + $.jdk.v11 + $.env.jvm + gate + $.use.gem_test_pack + $.run.test_gems,

lib/cext/ABI_check.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6
1+
7

lib/cext/ABI_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
15
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,10 @@
1+
#ifndef INTERNAL_FILE_H /*-*-C-*-vi:se ft=c:*/
2+
#define INTERNAL_FILE_H
3+
14
#include "ruby.h"
5+
6+
#ifdef __APPLE__
7+
VALUE rb_str_normalize_ospath(const char *ptr, long len);
8+
#endif
9+
10+
#endif /* INTERNAL_FILE_H */
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
#ifndef INTERNAL_TIME_H /*-*-C-*-vi:se ft=c:*/
2+
#define INTERNAL_TIME_H
3+
14
#include "ruby.h"
5+
6+
void ruby_reset_leap_second_info(void);
7+
8+
#endif /* INTERNAL_TIME_H */

lib/truffle/rbconfig.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ module RbConfig
7272
optflags = ''
7373
debugflags = ''
7474
warnflags = [
75-
'-Wimplicit-function-declaration', # To make missing C ext functions clear
75+
'-Werror=implicit-function-declaration', # https://bugs.ruby-lang.org/issues/18615
7676
'-Wno-int-conversion', # MRI has VALUE defined as long while we have it as void*
7777
'-Wno-int-to-pointer-cast', # Same as above
7878
'-Wno-incompatible-pointer-types', # Fix byebug 8.2.1 compile (st_data_t error)

test/mri/failing.exclude

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ ruby/test_pattern_matching.rb # syntax error, unexpected modifier_if (SyntaxErr
3232
ruby/test_memory_view.rb # rb_memory_view_register not found
3333

3434
# Too slow
35-
3635
racc/test_racc_command.rb
3736

3837
# Other issues

0 commit comments

Comments
 (0)