DMD Source Guidance: Unused Return Values of Strictly Pure Function Calls

"Nordlöw" per.nordlow at gmail.com
Thu Feb 27 15:39:42 PST 2014


On Thursday, 27 February 2014 at 23:38:34 UTC, Nordlöw wrote:
> Does anybody know where in the DMD source I can figure out if 
> the return value of a function call is used or not?
>
> I'm trying to figure out how to implement automatic detection 
> of unused return values from calls to strictly pure functions.
>
> The closest I have come is the function functionParameters() in 
> expression.c
>
> Ideas anyone?

The return type of course also must be non-void in order for the 
warning to printed.


More information about the Digitalmars-d-learn mailing list