This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] cygwin: fix errors with GCC 5


Hi Yaakov,

On Feb 11 20:26, Yaakov Selkowitz wrote:
> GCC 5 switched from C89 to C11 by default, which implies a change from
> GNU to C99 inline.
> 
> 	winsup/cygwin/
> 	* exceptions.cc (exception::handle): Fix always-true boolean
> 	comparison warning.
> 	* include/cygwin/config.h (__getreent): Mark gnu_inline.
> 	* winbase.h (ilockcmpexch, ilockcmpexch64): Ditto.
> 
> Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
> ---
>  winsup/cygwin/exceptions.cc           | 2 +-
>  winsup/cygwin/include/cygwin/config.h | 1 +
>  winsup/cygwin/winbase.h               | 2 ++
>  3 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
> index c3a45d2..a50973b 100644
> --- a/winsup/cygwin/exceptions.cc
> +++ b/winsup/cygwin/exceptions.cc
> @@ -645,7 +645,7 @@ exception::handle (EXCEPTION_RECORD *e, exception_list *frame, CONTEXT *in,
>      me.andreas->leave ();	/* Return from a "san" caught fault */
>  #endif
>  
> -  if (debugging && ++debugging < 500000)
> +  if (debugging && ++debugging)

This is not the right fix.  debugging is still a bool and you changed
the condition just to get rid of the warning.  The right fix is to keep
the condition and change the type of debugging to, e.g, int.  The
gnu_inline snippets are ok, but I'd like to see a description of what
effect this is fixing in the git comment, for future reference.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]