From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Thu, 28 Feb 2013 14:15:12 +0000 To: 9fans@9fans.net, jas@corpus-callosum.com MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] X11 Topicbox-Message-UUID: 20f17b00-ead8-11e9-9d60-3106f5b1d025 I have rebuilt equis with the change in ape's select and it seems to work fine (tested with xlock and xterm only). this was not quite straightforward due to changes in ape, and the compiler becomming a little stricter. On this subject, what is the general feeling on integer type'ed functions which call exit() before falling off the end of the function? This is fairly common in X11 and I have just added a return 0 on the end to push the code through the compiler, but should the compiler be taught about this case? if so, it gets a bit nasty as this feature is named exit() under ape and exits() in native plan9. Personally I think falling of the end of a function is a bug and should be fixed, but perhaps it should just be a warning rather than an error to make building foreign code simpler. -Steve From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 28 Feb 2013 14:21:08 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=089e011779130d7fc504d6c99a8f Cc: Jeff Sickel Subject: Re: [9fans] X11 Topicbox-Message-UUID: 20f629b6-ead8-11e9-9d60-3106f5b1d025 --089e011779130d7fc504d6c99a8f Content-Type: text/plain; charset=UTF-8 ANSI C has a "_Noreturn" attribute that I started to implement, but I think I might fall back to a #pragma, which would be quicker to do. On 28 February 2013 14:15, Steve Simon wrote: > I have rebuilt equis with the change in ape's select > and it seems to work fine (tested with xlock and xterm only). > > this was not quite straightforward due to changes in ape, and > the compiler becomming a little stricter. > > On this subject, what is the general feeling on integer > type'ed functions which call exit() before falling off the > end of the function? > > This is fairly common in X11 and I have just added a return 0 on > the end to push the code through the compiler, but should the > compiler be taught about this case? > > if so, it gets a bit nasty as this feature is named > exit() under ape and exits() in native plan9. > > Personally I think falling of the end of a function > is a bug and should be fixed, but perhaps it should > just be a warning rather than an error to make > building foreign code simpler. > > -Steve > > --089e011779130d7fc504d6c99a8f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
ANSI C has a "_Noreturn" attribute that I starte= d to implement,
but I think I might fall back to a #pragma, which= would be quicker to do.



On 28 February 2013 14:15, Steve Simon <= span dir=3D"ltr"><steve@quintile.net> wrote:

-Steve


--089e011779130d7fc504d6c99a8f-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Date: Thu, 28 Feb 2013 18:19:59 +0100 Message-ID: <2706566.04NpN2Dq1k@coil> User-Agent: KMail/4.10 (Linux/3.8.0-rc7-l49; KDE/4.10.0; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Subject: Re: [9fans] X11 Topicbox-Message-UUID: 20f9ec9a-ead8-11e9-9d60-3106f5b1d025 On Thursday 28 of February 2013 14:21:08 Charles Forsyth wrote: > ANSI C has a "_Noreturn" attribute that I started to implement, > but I think I might fall back to a #pragma, which would be quicker to= do. another quick hack: #define exit(status) do { exit(status); return 0; } while (0) with do{}while() guarding against treating it as an expression. --=20 dexen deVries [[[=E2=86=93][=E2=86=92]]] From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <2706566.04NpN2Dq1k@coil> References: <2706566.04NpN2Dq1k@coil> Date: Thu, 28 Feb 2013 13:10:15 -0500 Message-ID: From: "Joel C. Salomon" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] X11 Topicbox-Message-UUID: 21045126-ead8-11e9-9d60-3106f5b1d025 On Thu, Feb 28, 2013 at 12:19 PM, dexen deVries w= rote: > #define exit(status) do { exit(status); return 0; } while (0) What does kenc do with a void function attempting to return 0? =E2=80=94Joel From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: "Steve Simon" Date: Thu, 28 Feb 2013 19:46:41 +0000 To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] X11 Topicbox-Message-UUID: 2108855c-ead8-11e9-9d60-3106f5b1d025 > What does kenc do with a void function attempting to return 0? t.c:6 incompatible types: "VOID" and "INT" for op "RETURN" -Steve From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) From: Jeff Sickel In-Reply-To: Date: Thu, 28 Feb 2013 17:02:52 -0600 Content-Transfer-Encoding: 7bit Message-Id: <9AD200D3-04A5-409F-949C-3F36DA5EA0CD@corpus-callosum.com> References: To: 9fans@9fans.net Subject: Re: [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Topicbox-Message-UUID: 210de1fa-ead8-11e9-9d60-3106f5b1d025 I've submitted a patch, ape-select, that just removes the offending EBADF. If there's a desire to up the FD_SETSIZE to 1024 like everyone else, we should address that as a separate patch and modernize the in the process. -jas From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <9AD200D3-04A5-409F-949C-3F36DA5EA0CD@corpus-callosum.com> References: <9AD200D3-04A5-409F-949C-3F36DA5EA0CD@corpus-callosum.com> Date: Thu, 28 Feb 2013 23:13:10 +0000 Message-ID: From: Charles Forsyth To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7bf19844c13bc804d6d10875 Subject: Re: [9fans] X11 [was APE select and awkward Python subprocess PIPEfitting] Topicbox-Message-UUID: 2111f100-ead8-11e9-9d60-3106f5b1d025 --047d7bf19844c13bc804d6d10875 Content-Type: text/plain; charset=UTF-8 On 28 February 2013 23:02, Jeff Sickel wrote: > that just removes the > offending EBADF > it should generate EBADF for any bit set in any of the fd_sets when that bit doesn't correspond to an open file descriptor. the mistake was producing EBADF on a very specific condition associated with an *open* file descriptor --047d7bf19844c13bc804d6d10875 Content-Type: text/html; charset=UTF-8

On 28 February 2013 23:02, Jeff Sickel <jas@corpus-callosum.com> wrote:
that just removes the
offending EBADF

it should generate EBADF for any bit set in any of the fd_sets when that bit doesn't correspond to an open file descriptor.
the mistake was producing EBADF on a very specific condition associated with an *open* file descriptor
--047d7bf19844c13bc804d6d10875-- From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 1 Mar 2013 01:11:52 -0300 Message-ID: From: "Federico G. Benavento" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: Re: [9fans] X11 Topicbox-Message-UUID: 212c6bb6-ead8-11e9-9d60-3106f5b1d025 thanks steve On Thu, Feb 28, 2013 at 4:46 PM, Steve Simon wrote: >> What does kenc do with a void function attempting to return 0? > > t.c:6 incompatible types: "VOID" and "INT" for op "RETURN" > > -Steve > -- Federico G. Benavento From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <2706566.04NpN2Dq1k@coil> Date: Fri, 1 Mar 2013 08:05:27 -0500 Message-ID: From: Comeau At9Fans To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [9fans] X11 Topicbox-Message-UUID: 21f8a23a-ead8-11e9-9d60-3106f5b1d025 On Thu, Feb 28, 2013 at 1:10 PM, Joel C. Salomon wrote: > > On Thu, Feb 28, 2013 at 12:19 PM, dexen deVries wrote: > > #define exit(status) do { exit(status); return 0; } while (0) > What does kenc do with a void function attempting to return 0? incompatible types: "VOID" and "INT" for op "RETURN" There isn't a perfect solution considering existing code etc but similarly can be diagnosed in Steve's case, more along the lines of: warning: missing return statement at end of non-void function "foo" -- Greg Comeau / 4.3.10.1 with C++0xisms now in beta! Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?