public inbox for cygwin-developers@cygwin.com
 help / color / mirror / Atom feed
* Porting to GCC 6 (was: fhandler_dsp.cc error: nonnull argument ‘this’ compared to NULL)
       [not found] <987d64f0-88dd-d11d-d52b-5e20c9957193@SystematicSw.ab.ca>
@ 2017-09-11 23:48 ` Yaakov Selkowitz
  2017-09-17  2:01   ` Porting to GCC 6 Ken Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Yaakov Selkowitz @ 2017-09-11 23:48 UTC (permalink / raw)
  To: cygwin-developers


[-- Attachment #1.1: Type: text/plain, Size: 5134 bytes --]

Redirecting to cygwin-developers, as we don't have a patch yet.

On 2017-09-09 23:11, Brian Inglis wrote:
> Getting failure building latest git with current gcc 6.3

There are more:

/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/crt0.c: In function
'mainCRTStartup':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/crt0.c:23:3: error:
calling '__builtin_return_address' with a nonzero argument is unsafe
[-Werror=frame-address]
   (void)__builtin_return_address(1);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: ***
[/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/../Makefile.common:44:
crt0.o] Error 1
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/init.cc: In function
'void threadfunc_fe(void*)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/init.cc:26:36:
error: calling 'void* __builtin_return_address(unsigned int)' with a
nonzero argument is unsafe [-Werror=frame-address]
   (void)__builtin_return_address(1);
                                    ^
make[3]: ***
[/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/../Makefile.common:41:
init.o] Error 1
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc: In
member function 'void
fhandler_dev_dsp::Audio_out::buf_info(audio_buf_info*, int, int, int)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc:503:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (this && dev_)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc: In
member function 'void
fhandler_dev_dsp::Audio_in::buf_info(audio_buf_info*, int, int, int)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc:960:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (this && dev_)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'bool _pinfo::exists()':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:532:32:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   return this && process_state && !(process_state & (PID_EXITED |
PID_REAPED | PID_EXECED));

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'commune_result _pinfo::commune_request(__uint32_t, ...)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:723:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'fhandler_pipe* _pinfo::pipe_fhandler(int64_t, size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:822:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::fd(int, size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:835:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::fds(size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:859:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::root(size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:887:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::cwd(size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:933:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::cmdline(size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:979:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
function 'char* _pinfo::environ(size_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:1039:3:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   if (!this || !pid)
   ^~
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/signal.cc: In member
function 'int _pinfo::kill(siginfo_t&)':
/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/signal.cc:263:8:
error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
   else if (this && process_state == PID_EXITED)
        ^~
cc1plus: all warnings being treated as errors

Note that commit 0008bdea02b690ab19ffe997499cb9a96ee5a66d was intended
to fix the nonnull-compare errors but had to be reverted.

-- 
Yaakov


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Porting to GCC 6
  2017-09-11 23:48 ` Porting to GCC 6 (was: fhandler_dsp.cc error: nonnull argument ‘this’ compared to NULL) Yaakov Selkowitz
@ 2017-09-17  2:01   ` Ken Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Ken Brown @ 2017-09-17  2:01 UTC (permalink / raw)
  To: cygwin-developers

On 9/11/2017 7:48 PM, Yaakov Selkowitz wrote:
> Redirecting to cygwin-developers, as we don't have a patch yet.
> 
> On 2017-09-09 23:11, Brian Inglis wrote:
>> Getting failure building latest git with current gcc 6.3
> 
> There are more:
> 
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/crt0.c: In function
> 'mainCRTStartup':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/crt0.c:23:3: error:
> calling '__builtin_return_address' with a nonzero argument is unsafe
> [-Werror=frame-address]
>     (void)__builtin_return_address(1);
>     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> make[3]: ***
> [/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/../Makefile.common:44:
> crt0.o] Error 1
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/init.cc: In function
> 'void threadfunc_fe(void*)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/init.cc:26:36:
> error: calling 'void* __builtin_return_address(unsigned int)' with a
> nonzero argument is unsafe [-Werror=frame-address]
>     (void)__builtin_return_address(1);
>                                      ^
> make[3]: ***
> [/home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/../Makefile.common:41:
> init.o] Error 1
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc: In
> member function 'void
> fhandler_dev_dsp::Audio_out::buf_info(audio_buf_info*, int, int, int)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc:503:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (this && dev_)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc: In
> member function 'void
> fhandler_dev_dsp::Audio_in::buf_info(audio_buf_info*, int, int, int)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/fhandler_dsp.cc:960:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (this && dev_)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'bool _pinfo::exists()':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:532:32:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     return this && process_state && !(process_state & (PID_EXITED |
> PID_REAPED | PID_EXECED));
> 
> ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'commune_result _pinfo::commune_request(__uint32_t, ...)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:723:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'fhandler_pipe* _pinfo::pipe_fhandler(int64_t, size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:822:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::fd(int, size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:835:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::fds(size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:859:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::root(size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:887:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::cwd(size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:933:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::cmdline(size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:979:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc: In member
> function 'char* _pinfo::environ(size_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/pinfo.cc:1039:3:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     if (!this || !pid)
>     ^~
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/signal.cc: In member
> function 'int _pinfo::kill(siginfo_t&)':
> /home/Yaakov/src/cygwin/newlib-cygwin/winsup/cygwin/signal.cc:263:8:
> error: nonnull argument 'this' compared to NULL [-Werror=nonnull-compare]
>     else if (this && process_state == PID_EXITED)
>          ^~
> cc1plus: all warnings being treated as errors
> 
> Note that commit 0008bdea02b690ab19ffe997499cb9a96ee5a66d was intended
> to fix the nonnull-compare errors but had to be reverted.

I think I may have fixed this.  I found some errors in that commit. 
After fixing the errors, the zsh problem that caused the commit to be 
reverted was gone.  Of course there still could be some errors that I 
missed and that will show up later.

To simplify future debugging if there are further errors, I've broken 
the fix up into several commits that I'll send to cygwin-patches shortly.

Ken

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-17  2:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <987d64f0-88dd-d11d-d52b-5e20c9957193@SystematicSw.ab.ca>
2017-09-11 23:48 ` Porting to GCC 6 (was: fhandler_dsp.cc error: nonnull argument ‘this’ compared to NULL) Yaakov Selkowitz
2017-09-17  2:01   ` Porting to GCC 6 Ken Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).