On Sun, Jul 21, 2013 at 06:23:15PM +0200, Sonny Karlsson wrote:
> Some compilers does not issue warnings about implicit declarations by
> default, this causes false positives the accept4() test.
> That is why -Wimplicit is used on that test.

Hm, but -Wimplicit just generates a /warning/, e.g. if I try compiling

int main() {
    printf("Hi\n");
    return 0;
}

it will complain about the implicit declaration, but still compile
just fine (and the return value will be 0).

The error should happen in the linking stage if the needed library
doesn't exist. Right now (unless the needed library is libc), it will
happen anyway - because we're not passing any -llib arguments to $CC.

So I think the proper action should be to add another argument for
needed libraries to check_generic(), instead of or in addition to
adding -Wimplicit again. If we do use -Wimplicit, we should also add
-Werror so it actually does anything. This would increase correctness,
like in the case of using printf() without including stdio.h, but at
the cost of compatibility.

--Valentin
_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to