Re: 64Bit compatibility warnings

2012-01-24 Thread Andrei Alexandrescu
On 1/24/12 5:37 AM, Don Clugston wrote: On 20/01/12 01:25, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t bugs just because the author is still on a 32 bit mac

Re: 64Bit compatibility warnings

2012-01-24 Thread Iain Buclaw
On 24 January 2012 12:32, Stewart Gordon wrote: > On 24/01/2012 10:37, Don Clugston wrote: > > >> IMHO the ideal solution would be: >> - treat size_t as a magical type (not a simple alias). >> - allow size_t -> uint if you are in a machine-specific version statement >> that implies 32 >> bits (eg

Re: 64Bit compatibility warnings

2012-01-24 Thread Stewart Gordon
On 24/01/2012 10:37, Don Clugston wrote: IMHO the ideal solution would be: - treat size_t as a magical type (not a simple alias). - allow size_t -> uint if you are in a machine-specific version statement that implies 32 bits (eg, version(D_InlineAsm_X86), version(Win32), version(X86)). - allow

Re: 64Bit compatibility warnings

2012-01-24 Thread Don Clugston
On 20/01/12 01:25, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t bugs just because the author is still on a 32 bit machine. Is that feasible? IMHO the idea

Re: 64Bit compatibility warnings

2012-01-21 Thread Jonathan M Davis
On Saturday, January 21, 2012 07:53:51 Nick Sabalausky wrote: > "Trass3r" wrote in message news:op.v8flqsr63ncmek@enigma... > > >> Couldn't it be handled by a special switch on 64 bit compilers, and > >> disabled normally? > > > > Theoretically yes, but it would destroy the original intention. >

Re: 64Bit compatibility warnings

2012-01-21 Thread Richard Webb
On 21/01/2012 13:33, Vladimir Panteleev wrote: On Saturday, 21 January 2012 at 12:53:27 UTC, Nick Sabalausky wrote: "Trass3r" wrote in message news:op.v8flqsr63ncmek@enigma... Couldn't it be handled by a special switch on 64 bit compilers, and disabled normally? Theoretically yes, but it wou

Re: 64Bit compatibility warnings

2012-01-21 Thread bearophile
Stewart Gordon: > From what I gather, some C++ compilers do more than this: they have a > built-in > understanding of the STL types, which they can use to optimise operations on > them better > than can be done in the code implementations of them. I presume future D compilers will recognize

Re: 64Bit compatibility warnings

2012-01-21 Thread Nick Sabalausky
"Trass3r" wrote in message news:op.v8flqsr63ncmek@enigma... >> Couldn't it be handled by a special switch on 64 bit compilers, and >> disabled normally? > > Theoretically yes, but it would destroy the original intention. > Ensuring 64 bit compatibility is as easy as compiling with -m64 from time

Re: 64Bit compatibility warnings

2012-01-21 Thread Vladimir Panteleev
On Saturday, 21 January 2012 at 12:53:27 UTC, Nick Sabalausky wrote: "Trass3r" wrote in message news:op.v8flqsr63ncmek@enigma... Couldn't it be handled by a special switch on 64 bit compilers, and disabled normally? Theoretically yes, but it would destroy the original intention. Ensuring 64 b

Re: 64Bit compatibility warnings

2012-01-21 Thread Stewart Gordon
On 21/01/2012 11:43, Peter Alexander wrote: size_t is defined in druntime as an alias to uint/ulong. In C++ too, size_t is defined in the standard library. The compiler is unaware of any special status that it may have. The whole point of what I'm saying is that it doesn't need to be. wri

Re: 64Bit compatibility warnings

2012-01-21 Thread Trass3r
Or they're on windows. No excuse. Now there are prebuilt gdc packages :)

Re: 64Bit compatibility warnings

2012-01-21 Thread Peter Alexander
On 21/01/12 12:48 AM, Stewart Gordon wrote: On 20/01/2012 00:46, Peter Alexander wrote: On 20/01/12 12:25 AM, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t b

Re: 64Bit compatibility warnings

2012-01-21 Thread Trass3r
Couldn't it be handled by a special switch on 64 bit compilers, and disabled normally? Theoretically yes, but it would destroy the original intention. Ensuring 64 bit compatibility is as easy as compiling with -m64 from time to time, but some people can't be bothered. They won't use a new sw

Re: 64Bit compatibility warnings

2012-01-21 Thread Marco Leise
Am 21.01.2012, 02:16 Uhr, schrieb Timon Gehr : On 01/21/2012 01:48 AM, Stewart Gordon wrote: On 20/01/2012 00:46, Peter Alexander wrote: On 20/01/12 12:25 AM, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code

Re: 64Bit compatibility warnings

2012-01-20 Thread Matt Soucy
On 01/20/2012 08:24 PM, Matt Soucy wrote: On 01/20/2012 08:21 PM, Stewart Gordon wrote: On 21/01/2012 01:16, Timon Gehr wrote: I generally like the idea of making size_t strongly typed, but that would necessitate X!size_t to become a distinct instantiation from X!uint or X!ulong. Furthermore,

Re: 64Bit compatibility warnings

2012-01-20 Thread Matt Soucy
On 01/20/2012 08:21 PM, Stewart Gordon wrote: On 21/01/2012 01:16, Timon Gehr wrote: I generally like the idea of making size_t strongly typed, but that would necessitate X!size_t to become a distinct instantiation from X!uint or X!ulong. Furthermore, it would break all existing D programs that

Re: 64Bit compatibility warnings

2012-01-20 Thread Stewart Gordon
On 21/01/2012 01:16, Timon Gehr wrote: I generally like the idea of making size_t strongly typed, but that would necessitate X!size_t to become a distinct instantiation from X!uint or X!ulong. Furthermore, it would break all existing D programs that are deliberately not 64 bit aware =). You

Re: 64Bit compatibility warnings

2012-01-20 Thread Timon Gehr
On 01/21/2012 01:48 AM, Stewart Gordon wrote: On 20/01/2012 00:46, Peter Alexander wrote: On 20/01/12 12:25 AM, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t

Re: 64Bit compatibility warnings

2012-01-20 Thread Stewart Gordon
On 20/01/2012 00:46, Peter Alexander wrote: On 20/01/12 12:25 AM, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t bugs just because the author is still on a 32

Re: 64Bit compatibility warnings

2012-01-19 Thread Peter Alexander
On 20/01/12 12:25 AM, Trass3r wrote: Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t bugs just because the author is still on a 32 bit machine. Is that feasible? In general,

Re: 64Bit compatibility warnings

2012-01-19 Thread bearophile
Trass3r: > Could we please have at least a warning if code isn't compatible with > 64Bit? > It's really annoying to test out some code and having to fix a bunch of > stupid uint->size_t bugs just because the author is still on a 32 bit > machine. > > Is that feasible? Time ago I have sugge

64Bit compatibility warnings

2012-01-19 Thread Trass3r
Could we please have at least a warning if code isn't compatible with 64Bit? It's really annoying to test out some code and having to fix a bunch of stupid uint->size_t bugs just because the author is still on a 32 bit machine. Is that feasible?