From: Jon Date: 2010-12-23T06:10:01+09:00 Subject: [ruby-core:33817] Re: trunk warnflags build issue with curb 0.7.9? > As this may turn out to be a 3rd party issue rather than a bug, I'd like some feedback. > > Trunk (as of 30291) has "-Werror=declaration-after-statement" in "CONFIG['warnflags']" of {i386-mingw32,i686-linux}/rbconfig.rb which causes the following failures when trying to install curb v0.7.9. > > # ruby 1.9.3dev [i386-mingw32] with gcc 4.5.1 (TDM) on Win7 32-bit > ... > compiling curb_easy.c > curb_easy.c: In function 'ruby_curl_easy_cleanup': > curb_easy.c:2151:3: error: ISO C90 forbids mixed declarations and code > > # curb_easy.c:2151 > struct curl_slist *ftp_commands = rbce->curl_ftp_commands; > > > # ruby 1.9.3dev [i686-linux] with gcc 4.5.1 on Arch 2.6.36 > ... > compiling curb_postfield.c > curb_postfield.c: In functioon 'ruby_curl_postfield_to_str': > curb_postfield.c:446:5: error: ISO C90 forbids mixed declarations and code > > # curb_postfield.c:446 > char *tmpchrs = curl_escape(StringValuePtr(name), (int)RSTRING_LEN(name)); > > > As this flag is not in ruby_1_9_2, what was the reason why this warnflag was added to trunk? > > Does core consider the above code snippets to be incorrect? To be clear, I'm aware of https://github.com/ruby/ruby/commit/bd0a9d2fb603d308086b37499773bae50065a1fa and suspect it was implemented to give an early indication if the codebase is ever updated in a way that could cause cl build failures. However, since it affects native gems via RbConfig::CONFIG and effectively a new constraint, I wanted to make sure I understand the reasoning behind the commit message. Jon --- http://jonforums.github.com/