On Sunday 03 March 2002 01:00 pm, Erik Trulsson wrote:
> On Sun, Mar 03, 2002 at 10:27:17AM -0700, Ian wrote:
> > > In <sys/proc.h>:
> > >
> > > /*
> > > * pargs, used to hold a copy of the command line, if it had a sane
> > > * length
> > > */
> > > struct  pargs {
> > > u_int   ar_ref;         /* Reference count */
> > > u_int   ar_length;      /* Length */
> > > u_char  ar_args[0];     /* Arguments */
> > > };
>
> It might be worth mentioning that this trick is not actually allowed
> according to the C standard and in principle invokes undefined
> behaviour. OTOH, AFAIK the trick does work on all existing compilers,
> so while it is not standard-conforming it is quite portable.

I can't even imagine how one *would* write a compiler where this would 
fail--does anybody know the putative risk that led ANSI to "ban" this (IMHO) 
perfectly-reasonable bahvior?

-- 
Brian T. Schellenberger . . . . . . .   [EMAIL PROTECTED] (work)
Brian, the man from Babble-On . . . .   [EMAIL PROTECTED] (personal)
                                ME -->  http://www.babbleon.org
http://www.eff.org   <-- GOOD GUYS -->  http://www.programming-freedom.org 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to