Remove `-Wdeclaration-after-statement` from gcc options;
MODIFY
build_config/travis.rb
build_config/travis.rb
@@ -4,7 +4,6 @@ MRuby::Build.new('full-debug') do |conf|
# include all core GEMs
conf.gembox 'full-core'
- conf.cc.flags += %w(-Werror=declaration-after-statement)
conf.cc.defines += %w(MRB_GC_STRESS MRB_ENABLE_DEBUG_HOOK)
conf.enable_test
@@ -15,7 +14,6 @@ MRuby::Build.new do |conf|
# include all core GEMs
conf.gembox 'full-core'
- conf.cc.flags += %w(-Werror=declaration-after-statement)
conf.compilers.each do |c|
c.defines += %w(MRB_GC_FIXED_ARENA)
end

MODIFY
tasks/toolchains/gcc.rake
tasks/toolchains/gcc.rake
@@ -2,7 +2,7 @@ MRuby::Toolchain.new(:gcc) do |conf, params|
default_command = params[:default_command] || 'gcc'
compiler_flags = %w(-g -O3 -Wall -Wundef)
c_mandatory_flags = %w(-std=gnu99)
- cxx_invalid_flags = %w(-Wdeclaration-after-statement -Werror-implicit-function-declaration)
+ cxx_invalid_flags = %w(-Werror-implicit-function-declaration)
[conf.cc, conf.objc, conf.asm, conf.cxx].each do |compiler|
if compiler == conf.cxx

Remove `-Wdeclaration-after-statement` from gcc options; #5159