Date: Tue, 20 Mar 2001 14:35:08 -0500 From: Andrew Brown <atatat@atatdot.net> To: Greywolf <greywolf@starwolf.com> Cc: Shankar Agarwal <shankar_agarwal@net.com>, tech-kern@netbsd.org, bsd hackers <freebsd-hackers@FreeBSD.ORG> Subject: Re: Question regarding the array of size 0. Message-ID: <20010320143508.A29869@noc.untraceable.net> In-Reply-To: <Pine.NEB.4.30.0103201101010.5239-100000@starjumper.starwolf.com>; from greywolf@starwolf.com on Tue, Mar 20, 2001 at 11:31:40AM -0800 References: <3AB7A76B.2BCF5D6E@net.com> <Pine.NEB.4.30.0103201101010.5239-100000@starjumper.starwolf.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 20, 2001 at 11:31:40AM -0800, Greywolf wrote: >On Tue, 20 Mar 2001, Shankar Agarwal wrote: > ># Date: Tue, 20 Mar 2001 10:54:35 -0800 ># From: Shankar Agarwal <shankar_agarwal@net.com> ># To: tech-kern@netbsd.org ># Cc: bsd hackers <freebsd-hackers@FreeBSD.ORG> ># Subject: Question regarding the array of size 0. ># ># Hi All, ># #define syscallarg(x) \ ># union { \ ># register_t pad; \ ># struct { x datum; } le; \ ># struct { \ ># int8_t pad[ (sizeof (register_t) < sizeof (x)) \ ># ? 0 \ ># : sizeof (register_t) - sizeof (x)]; \ ># x datum; \ ># } be; \ ># } ># ># struct sys_exit_args { ># syscallarg(int) rval; ># }; > >I thought ?: were evaluated at run-time, not compile-time? any halfway decent optimizing compiler ought to be reducing the number of useless constants in its output, this being an example of such. -- |-----< "CODE WARRIOR" >-----| codewarrior@daemon.org * "ah! i see you have the internet twofsonet@graffiti.com (Andrew Brown) that goes *ping*!" andrew@crossbar.com * "information is power -- share the wealth." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010320143508.A29869>