www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - what exactly does -v1 do?

reply kenny <funisher gmail.com> writes:
I can't find any reference to it on the website. What exactly is version 1.0?
I'm not using tons of advanced features of D and it makes no difference for me.
Feb 22 2007
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
kenny wrote:

 I can't find any reference to it on the website. What exactly is version
 1.0? I'm not using tons of advanced features of D and it makes no
 difference for me.
Language features added to DMD after release 1.000 will not work when using that switch. -- Lars Ivar Igesund blog at http://larsivi.net DSource, #d.tango & #D: larsivi Dancing the Tango
Feb 22 2007
parent reply Tyler Knott <tywebmail mailcity.com> writes:
Lars Ivar Igesund wrote:
 Language features added to DMD after release 1.000 will not work when using
 that switch. 
 
Except they do work? This compiles on DMD 1.007 with -v1 (as the only flag) without error: void main() { mixin(`int foo;`); } //mixin declarations are definitely post-1.0
Feb 22 2007
parent reply torhu <fake address.dude> writes:
Tyler Knott wrote:
 Lars Ivar Igesund wrote:
 Language features added to DMD after release 1.000 will not work when using
 that switch. 
 
Except they do work? This compiles on DMD 1.007 with -v1 (as the only flag) without error: void main() { mixin(`int foo;`); } //mixin declarations are definitely post-1.0
I suppose it's only for features that break backward compatibility. It enables implicit conversion from objects to void pointers. That's all I know that it does as of 1.007. If you need older (pre 'D spec 1') features to work, -d will enable some of them. Implicit conversion from arrays to pointers comes to mind.
Feb 22 2007
parent Stewart Gordon <smjg_1998 yahoo.com> writes:
torhu Wrote:

 Tyler Knott wrote:
<snip>
 Except they do work?  This compiles on DMD 1.007 with -v1 (as 
 the only flag) without error:
 
 void main() { mixin(`int foo;`); } //mixin declarations are 
 definitely post-1.0
I suppose it's only for features that break backward compatibility. It enables implicit conversion from objects to void pointers. That's all I know that it does as of 1.007.
<snip> Strikes me as a bug. It would seem to me that the _whole point_ of it is to enable programmers to explicitly target 1.0. That is, at least in theory, they can release code and make a valid statement that it will work in DMD 1.00, and D 1.0 compilers in general. Stewart.
Feb 23 2007