Re: Compiled dmd2.032 in VC++ 2009!

2009-09-09 Thread Walter Bright
Don wrote: Actually I think that even DMD should be using a 128-bit emulator for internal constants, regardless of the machine precision. That's a way off, still, but I think emulator is the way to go, long-term. Likewise, the compiler should not depend on NaNs being handled correctly in the C

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-09 Thread Jeremie Pelletier
negerns Wrote: > I ran into the __pascal calling convention. VS2008 no longer support > > The __pascal calling convention is no longer supported in VS2008. How > did you resolve this? I assumed these were remainders of older code, and removed the __pascal from both the prototypes and declarati

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-09 Thread negerns
I ran into the __pascal calling convention. VS2008 no longer support The __pascal calling convention is no longer supported in VS2008. How did you resolve this?

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-08 Thread Jeremie Pelletier
negerns Wrote: > Jeremie, > > I tried compiling the sources using VS2008 SP1. I did run into some of > what you mentioned but got stuck midway. Could you elaborate on how you > dealt with the missing header #ifndef _MSC_VER #include #endif You don't need this header on VS.

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-08 Thread negerns
Jeremie, I tried compiling the sources using VS2008 SP1. I did run into some of what you mentioned but got stuck midway. Could you elaborate on how you dealt with the missing header complex.h?

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-08 Thread Don
bearophile wrote: Don: I think that even DMD should be using a 128-bit emulator for internal constants, regardless of the machine precision. Can you tell me why? (Note: LDC supports 128 bit integers too. Maybe even 128 bit floating points). Because it'd be nice if the language gave a guaran

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-07 Thread bearophile
Don: > I think that even DMD should be using a 128-bit emulator for > internal constants, regardless of the machine precision. Can you tell me why? (Note: LDC supports 128 bit integers too. Maybe even 128 bit floating points). > the compiler should not depend on NaNs being handled correctly in

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-07 Thread Don
Walter Bright wrote: Jeremie Pelletier wrote: Well I've decided to get a look at the dmd2 source and see what I can contribute to it, only to notice it is very VC++ unfriendly. After a few hours of work, I finally got it to compile, and it works great, for the most part. Can you send me the di

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-07 Thread Rainer Schuetze
For those who like to stick with the DMC compiler to build DMD, but still want the bells and whistles of the Visual Studio IDE, here's what I do: - setup a makefile project that builds DMD using win32.mak - add the source-files to the project to get intellisense support (don't forget to add pr

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-06 Thread Jeremie Pelletier
div0 Wrote: > Jeremie Pelletier wrote: > > div0 Wrote: > >> Jeremie Pelletier wrote: > >> > >> > >> Sweet. If dmd can compile w/ VS outa the box, I'll start poking around > >> in it. Hey you can knock mirco-soft all you like, but VS is the nuts. > > > > Yeah, I side with you here. I may not be a

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-06 Thread Andrei Alexandrescu
Jeremie Pelletier wrote: Rainer Deyke Wrote: Jeremie Pelletier wrote: bearophile Wrote: - if(de.name[$-2 .. $] == ".c") is a bit unsafe, (...) I don't see how unsafe that is in this context. Potential buffer underrun. http://www.digitalmars.com/d/1.0/arrays.html: "A program may not rely on

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-06 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremie Pelletier wrote: > div0 Wrote: >> Jeremie Pelletier wrote: >> >> >> Sweet. If dmd can compile w/ VS outa the box, I'll start poking around >> in it. Hey you can knock mirco-soft all you like, but VS is the nuts. > > Yeah, I side with you here

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-06 Thread bearophile
Jeremie Pelletier: >I usually test for the string length before slicing it.< Me too, but: - mammals aren't perfect, and sometimes they forget things, etc. A compiler, once well programmed, will not forget such tests. - such tests added by me and you slow down code a little (but a good compiler c

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Jeremie Pelletier
Rainer Deyke Wrote: > Jeremie Pelletier wrote: > > bearophile Wrote: > >> - if(de.name[$-2 .. $] == ".c") is a bit unsafe, (...) > > I don't see how unsafe that is in this context. > > Potential buffer underrun. > http://www.digitalmars.com/d/1.0/arrays.html: "A program may not rely on > array bo

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Rainer Deyke
Jeremie Pelletier wrote: > bearophile Wrote: >> - if(de.name[$-2 .. $] == ".c") is a bit unsafe, (...) > I don't see how unsafe that is in this context. Potential buffer underrun. http://www.digitalmars.com/d/1.0/arrays.html: "A program may not rely on array bounds checking happening" -- Rainer

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Jeremie Pelletier
div0 Wrote: > Jeremie Pelletier wrote: > > > Sweet. If dmd can compile w/ VS outa the box, I'll start poking around > in it. Hey you can knock mirco-soft all you like, but VS is the nuts. Yeah, I side with you here. I may not be a fan of the business model Microsoft uses, but their IDE is oh so

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Jeremie Pelletier
bearophile Wrote: > Jeremie Pelletier: > > I also made a simple D script to rename all c files to cpp: > > Generally I suggest to use a scripting language to do a similar task (or a > simper linux shell script, probably one or two lines), but I agree that doing > this I can't see possible fault

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread bearophile
Jeremie Pelletier: > I also made a simple D script to rename all c files to cpp: Generally I suggest to use a scripting language to do a similar task (or a simper linux shell script, probably one or two lines), but I agree that doing this I can't see possible faults/troubles of the same D code.

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jeremie Pelletier wrote: Sweet. If dmd can compile w/ VS outa the box, I'll start poking around in it. Hey you can knock mirco-soft all you like, but VS is the nuts. - -- My enormous talent is exceeded only by my outrageous laziness. http://www.ssTk

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Jeremie Pelletier
Jeremie Pelletier Wrote: > Walter Bright Wrote: > > > Jeremie Pelletier wrote: > > > Well I've decided to get a look at the dmd2 source and see what I can > > > contribute to it, only to notice it is very VC++ unfriendly. After a > > > few hours of work, I finally got it to compile, and it works

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-05 Thread Jeremie Pelletier
Walter Bright Wrote: > Jeremie Pelletier wrote: > > Well I've decided to get a look at the dmd2 source and see what I can > > contribute to it, only to notice it is very VC++ unfriendly. After a > > few hours of work, I finally got it to compile, and it works great, > > for the most part. > > Can

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread BLS
Don wrote: Oh yeah. Looking at the source, I keep thinking, "this would be SO much easier in D!". May I add : more reliable, more readable, more IDE friendly, more "eat your own dog food inside (tm)" ? ... and NO, don't want to hear anything about bootstrapping :)

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Walter Bright
Brad Roberts wrote: Don't consider it an all or nothing exercise. I'll bet there are parts that are easy to agree are generally useful and worth folding in. That can at least make life easier by keeping the unmerged parts smaller and hopefully less painful to deal with. Yup.

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Brad Roberts
On Fri, 4 Sep 2009, Leandro Lucarella wrote: > bearophile, el 4 de septiembre a las 08:15 me escribiste: > > Jeremie Pelletier: > > > > >VC++ has no real support for long double; it supports the syntax as > > >distinct types but they are implemented as double precision, not extended > > >preci

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Walter Bright
Jeremie Pelletier wrote: Well I've decided to get a look at the dmd2 source and see what I can contribute to it, only to notice it is very VC++ unfriendly. After a few hours of work, I finally got it to compile, and it works great, for the most part. Can you send me the diffs? VC++ has no re

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jarrett Billingsley
On Fri, Sep 4, 2009 at 3:19 PM, Jeremie Pelletier wrote: > Jarrett Billingsley Wrote: > >> On Fri, Sep 4, 2009 at 10:22 AM, Jeremie Pelletier wrote: >> > Jason House Wrote: >> > >> >> Don Wrote: >> >> >> >> > Interestingly since DMD has extern(C++), it ought to be possible to >> >> > convert a sing

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jeremie Pelletier
Don Wrote: > Jeremie Pelletier wrote: > > Well I've decided to get a look at the dmd2 source and see what I can > > contribute to it, only to notice it is very VC++ unfriendly. After a > > few hours of work, I finally got it to compile, and it works great, > > for the most part. > > > > VC++ has

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jeremie Pelletier
Jarrett Billingsley Wrote: > On Fri, Sep 4, 2009 at 10:22 AM, Jeremie Pelletier wrote: > > Jason House Wrote: > > > >> Don Wrote: > >> > >> > Interestingly since DMD has extern(C++), it ought to be possible to > >> > convert a single module to D, and still link it in... > >> > >> extern(C++) suppo

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Leandro Lucarella
bearophile, el 4 de septiembre a las 08:15 me escribiste: > Jeremie Pelletier: > > >VC++ has no real support for long double; it supports the syntax as distinct > >types but they are implemented as double precision, not extended precision.< > > This is true in GDC (with GCC backend) too, that's

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jarrett Billingsley
On Fri, Sep 4, 2009 at 10:22 AM, Jeremie Pelletier wrote: > Jason House Wrote: > >> Don Wrote: >> >> > Interestingly since DMD has extern(C++), it ought to be possible to >> > convert a single module to D, and still link it in... >> >> extern(C++) support in D is nearly a joke. There are some big a

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Denis Koroskin
On Fri, 04 Sep 2009 13:40:02 +0400, Don wrote: Jeremie Pelletier wrote: Well I've decided to get a look at the dmd2 source and see what I can contribute to it, only to notice it is very VC++ unfriendly. After a few hours of work, I finally got it to compile, and it works great, for the most pa

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jeremie Pelletier
Jason House Wrote: > Don Wrote: > > > Interestingly since DMD has extern(C++), it ought to be possible to > > convert a single module to D, and still link it in... > > extern(C++) support in D is nearly a joke. There are some big areas for > improvement, such as support for non-virtual functio

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread bearophile
Jeremie Pelletier: >VC++ has no real support for long double; it supports the syntax as distinct >types but they are implemented as double precision, not extended precision.< This is true in GDC (with GCC backend) too, that's why real in D are as large as possible and not fixed-sized as the oth

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Jason House
Don Wrote: > Interestingly since DMD has extern(C++), it ought to be possible to > convert a single module to D, and still link it in... extern(C++) support in D is nearly a joke. There are some big areas for improvement, such as support for non-virtual functions, or allowing use of new, ... I

Re: Compiled dmd2.032 in VC++ 2009!

2009-09-04 Thread Don
Jeremie Pelletier wrote: Well I've decided to get a look at the dmd2 source and see what I can contribute to it, only to notice it is very VC++ unfriendly. After a few hours of work, I finally got it to compile, and it works great, for the most part. VC++ has no real support for long double; it

Compiled dmd2.032 in VC++ 2009!

2009-09-03 Thread Jeremie Pelletier
Well I've decided to get a look at the dmd2 source and see what I can contribute to it, only to notice it is very VC++ unfriendly. After a few hours of work, I finally got it to compile, and it works great, for the most part. VC++ has no real support for long double; it supports the syntax as di