Value range propagation for if-else

Shammah Chancellor via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 24 04:05:23 PDT 2014


On 2014-06-23 13:13:37 +0000, bearophile said:

> Daniel Murphy:
> 
>> What happens when a function is called from different places with 
>> values with different ranges?  What about when it's called from another 
>> compilation unit?
> 
> One solution is to ignore such cases, so that feature gives useful 
> results only when the source is compiled in the same compilation unit.
> 
> An alternative solution is to handle the functions that use those 
> features like templates, and keep the source available across different 
> compilation units. This is perhaps acceptable because I think that kind 
> of features is going to be used mostly for library code and not for 
> most user functions.
> 
> Bye,
> bearophile

Wouldn't that cause compiler errors that only happen depending on what 
order you compile things?

-Shammah



More information about the Digitalmars-d mailing list