classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Classpath build process and VM-specific issues


From: Archie Cobbs
Subject: Re: Classpath build process and VM-specific issues
Date: Mon, 5 Apr 2004 15:28:09 -0500 (CDT)

Andrew Haley wrote:
>  > Prove me wrong with a specific ISO C specification clause, if you
>  > claim otherwise.
> 
> I spent a long time working on and supporting gcc, and this is the
> rule I've had to refer people to more times than any other.  It's
> amazing how many programmers don't know the specfication.

You guys are going off into the weeds. All that's required from C
for the byte[] strategy to work is that this works:

   void *ptr;
   char *buf;

   ptr = <any valid pointer value>
   buf = malloc(sizeof(ptr));
   memcpy(buf, &ptr, sizeof(ptr));

   ... then sometime later ...

   memcpy(&ptr, buf, sizeof(ptr));
   <continue using the fully restored ptr>

I'm not a specophile but I would guess that C does at least guarantee this.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]