This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: RFC: Cygwin 64 bit?
On Jan 19 10:41, Andy Koppe wrote:
> On 19 January 2012 10:25, Corinna Vinschen wrote:
> > On Jan 18 15:54, Corinna Vinschen wrote:
> >> On Jan 18 14:23, Pedro Alves wrote:
> >> > I was looking for a technical reason that's worse, other then the
> >> > amount of mechanical work, which I'm sure could also be easily
> >> > scripted, with the long/int hidden behind a #define,
> >> > from the perspective of code that uses the headers. Â It's obvious
> >> > the pragma is less intrusive to the headers.
> >>
> >> I can't think of any. ÂIn both cases you will get the type mismatches in
> >> certain circumstances within the LP64 code of the application.
> >>
> >> Hmm. ÂThe only other problem I could see with the #pragma approach is a
> >> potential clash of debug information within the same CU. ÂIf you use
> >> Windows headers you would potentially have two entries for long in
> >> .debug_info:
> >>
> >> ÂFrom the LLP64 code:
> >>
> >> Â Â<1><d0>: Abbrev Number: 2 (DW_TAG_base_type)
> >>    <d1>  DW_AT_byte_size  : 4
> >>    <d2>  DW_AT_encoding  Â: 5    Â(signed)
> >>    <d3>  DW_AT_name    Â: long int
> >>
> >> ÂFrom the LP64 code in the same CU:
> >>
> >> Â Â<1><dc>: Abbrev Number: 2 (DW_TAG_base_type)
> >>    <dd>  DW_AT_byte_size  : 8
> >>    <de>  DW_AT_encoding  Â: 5    Â(signed)
> >>    <df>  DW_AT_name    Â: long int
> >
> > That won't be the case, fortunately. ÂA collegue has created a POC patch
> > which would result in only one entry for long, the "right" one with
> > DW_AT_byte_size 8, while the LLP64 usage of long would be converted to
> > the type int internally.
>
> Great. Does that also avoid nonsensical error messages along the lines
> of "Cannot assign 'long *' to 'long *'"?
I don't know. It was just a tiny patch to see if it works. I guess
there would still be some polishing required.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat