Re: [PATCH] m4: WARN FLAGS: Drop -Wenum-compare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK.

On Thu, Feb 26, 2015 at 05:47:03PM +0200, Uri Lublin wrote:
> My RHEL-6 gcc (4.4.7) complains a lot about it:
>    cc1: warning: command line option "-Wenum-compare" is
>    valid for C++/ObjC++ but not for C
> 
> For older gcc version (e.g. 4.4.7), man gcc says
> -Wenum-compare is "C++ and Objective-C++ only".
> 
> For newer gcc (e.g. 4.9.2), man gcc says
> "In C this warning is enabled by -Wall."
> ---
>  m4/spice-compile-warnings.m4 |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
> index 31f2a9c..ee85429 100644
> --- a/m4/spice-compile-warnings.m4
> +++ b/m4/spice-compile-warnings.m4
> @@ -23,6 +23,9 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
>      dontwarn="$dontwarn -Wc++-compat"
>      dontwarn="$dontwarn -Wabi"
>      dontwarn="$dontwarn -Wdeprecated"
> +    # For older gcc versions, -Wenum-compare is "C++ and Objective-C++ only"
> +    # For newer gcc versions, -Wenum-compare is "enabled by -Wall"
> +    dontwarn="$dontwarn -Wenum-compare"
>      # Don't care about ancient C standard compat
>      dontwarn="$dontwarn -Wtraditional"
>      # Don't care about ancient C standard compat
> -- 
> 1.7.1
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: pgps72wZcHhoy.pgp
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]