Wireshark-commits: Re: [Wireshark-commits] rev 21195: /trunk/ /trunk/: configure.in
From: "ronnie sahlberg" <ronniesahlberg@xxxxxxxxx>
Date: Mon, 26 Mar 2007 06:19:48 +0000
The problem here is the line

if test xyes != x && echo yes | gcc -E -Wdeclaration-after-statement -
2>&1 | grep yes
/dev/null ; then

at lest the versions of gcc that do not provide that -W   do not check
the -W arguments when compiling with -E
thus making the test pointless.


if test xyes != x && echo yes | gcc -E -Wi-just-made-this-warning-up -
2>&1 | grep yes
/dev/null ; then


also successfully passes through older gcc and enters the then-arm.


On 3/26/07, ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
The checks in configure.in
for this doesnt work properly for
GCC versions which do not support this -W directive.

Eventhough it is not supported by GCC
AC_MSG_CHECKING(to see if we can add '-Wdeclaration-after-statement'...
still adds it to the compile flags.

I will see if i can figure out why the test fails.
Me and automake/configure are not on friendly terms.



On 3/26/07, morriss@xxxxxxxxxxxxx <morriss@xxxxxxxxxxxxx> wrote:
> http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=21195
>
> User: morriss
> Date: 2007/03/26 12:32 AM
>
> Log:
>  If we're using gcc, try to use -Wdeclaration-after-statement to catch
more
> non-portable commits.  I'm not sure if this is the Right Way to test to
see
> if the compiler can handle a specific option but it's simple and efficient
> enough.
>
> Directory: /trunk/
>   Changes    Path            Action
>   +8 -0      configure.in    Modified
>
> _______________________________________________
> Wireshark-commits mailing list
> Wireshark-commits@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-commits
>