Hi,
On 23 December 2010 02:36, Nobuyoshi Nakada <nobu / ruby-lang.org> wrote:
> Hi,
>
> At Thu, 23 Dec 2010 03:29:00 +0900,
> Jon wrote in [ruby-core:33815]:
>> As this may turn out to be a 3rd party issue rather than a bug, I'd like=
 some feedback.
>
> It's a bug in curb.
>
>> 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 co=
de
>
> I think the error message explains it completely.
>
>> # curb_postfield.c:446
>> =A0 char *tmpchrs =3D curl_escape(StringValuePtr(name), (int)RSTRING_LEN=
(name));
>
>> Does core consider the above code snippets to be incorrect?
>
> Definitely incorrect.
>
> --
> Nobu Nakada
>
>

This also happen with bson_ext, and probably many other gems.

The failure when installing is not very clear, I searched the origin
of the issue a while and finally remembered this thread.

Why to stop the build instead of just giving a warning
("-Werror=3Ddeclaration-after-statement" instead of
"-Wdeclaration-after-statement") ?

Also, how is one UN*X extension developer supposed to deal with this
error if he does not want to be compatible with VC ?

I think one of the following should be done:
- change into a warning, and not make it an error
- have a very clear message when 'gem install' fails with this error,
and give a way to remove that error (thus removing temporarily the
warn/error flag)

I think an error is fine when you are developing the gem (though there
should be an easy way to ignore it), but it is not fine for a "gem
install" user.

Benoit Daloze