www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - deprecated functions/class methods not reported by dmd 0.128

reply zwang <nehzgnaw gmail.com> writes:
Code calling deprecated functions should not compile, but dmd doesn't 
frown on the following:

<code>
deprecated void f(){}
void main(){
   debug f();
}
</code>
Aug 01 2005
next sibling parent reply zwang <nehzgnaw gmail.com> writes:
zwang wrote:
 Code calling deprecated functions should not compile, but dmd doesn't 
 frown on the following:
 
 <code>
 deprecated void f(){}
 void main(){
   debug f();
 }
 </code>
Another example that shouldn't compile: <code> deprecated void main(){} </code>
Aug 01 2005
next sibling parent Vathix <chris dprogramming.com> writes:
 Another example that shouldn't compile:

 <code>
 deprecated void main(){}
 </code>
lol. Maybe it should compile and automatically throw DeprecatedProgramError when run :p
Aug 01 2005
prev sibling parent =?ISO-8859-1?Q?Thomas_K=FChne?= <thomas-dloop kuehne.THISISSPAM.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

zwang schrieb:
 Another example that shouldn't compile:
 
 <code>
 deprecated void main(){}
 </code>
Added to DStress as http://dtsress.kuehne.cn/nocompile/d/deprecated_20.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFC7+1z3w+/yD4P9tIRAknyAKCi4a6effKFOOky04il7QBn2jRS9gCgpma8 rBukIJzeZOC6vyVbgErOgl4= =STzQ -----END PGP SIGNATURE-----
Aug 02 2005
prev sibling parent reply Burton Radons <burton-radons smocky.com> writes:
zwang wrote:

 Code calling deprecated functions should not compile, but dmd doesn't 
 frown on the following:
 
 <code>
 deprecated void f(){}
 void main(){
   debug f();
 }
 </code>
-debug is not automatically enabled. That code allegedly using the deprecated function is uncompiled, which only needs to be syntactically correct.
Aug 01 2005
parent zwang <nehzgnaw gmail.com> writes:
Burton Radons wrote:
 zwang wrote:
 
 Code calling deprecated functions should not compile, but dmd doesn't 
 frown on the following:

 <code>
 deprecated void f(){}
 void main(){
   debug f();
 }
 </code>
-debug is not automatically enabled. That code allegedly using the deprecated function is uncompiled, which only needs to be syntactically correct.
I meant to turn on the -debug switch. But I made a silly mistake while reducing the test case. Yes, you are right. dmd handles the case correctly.
Aug 01 2005