[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb crooked traces



On Tue, Oct 12, 2010 at 12:29:32AM +0200, Stephan Boettcher wrote:
> Andrew Poelstra <asp11@xxxxxx> writes:
> 
> > ... To the best of my knowledge, gcc uses a 32-bit long
> > even on 64-bit systems, to maintain compatibility with old code.
> > This was true last I checked, a year or two ago.
> 
>    main(){printf("%lx\n",(long)(-1));}
> 
> yields
> 
>    ffffffffffffffff
> 
> with 
> 
>   gcc (Debian 4.4.4-13) 4.4.5 20100902 (prerelease)
> 
> in aggreement with
> 
> > On a 64 bit systems, pointers are going to be 64 bits -- after all,
> > that is why you are going to 64 bits.  The C spec says "longs shall be
> > big enough to hold a pointer" so that you can cast pointers and longs,
> > and can union pointers and longs.
>

You're right. Just checked with
  gcc version 4.5.1 20100924 (Red Hat 4.5.1-4) (GCC)
  gcc version 4.3.2 (Debian 4.3.2-1.1)
  gcc version 4.4.4 20100624 (Red Hat 4.4.4-9) (GCC)

Having said that, I think using the <stdint.h> types as John Doty suggested
would be the best option.


Andrew
 


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user