File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,17 @@ $(H3 $(LNAME2 vrp, Value Range Propagation))
373
373
s = b + b; // OK, 0 ... b.max + b.max
374
374
---
375
375
)
376
- $(P For more information, see $(LINK2 https://digitalmars.com/articles/b62.html, here).)
376
+ $(P Note the implementation does not track the range of possible values for variables,
377
+ only expressions:)
378
+ ---
379
+ extern int i;
380
+ short s = i & 0xff; // OK
381
+ // s is now assumed to be s.min ... s.max, not 0 ... 0xff
382
+ //byte b = s; // error
383
+ byte b = s & 0xff; // OK
384
+ ---
385
+ * For more information, see $(LINK2 https://digitalmars.com/articles/b62.html, the dmc article).
386
+ * See also: $(LINK https://en.wikipedia.org/wiki/Value_range_analysis).
377
387
378
388
379
389
$(H2 $(LNAME2 bool, $(D bool)))
You can’t perform that action at this time.
0 commit comments