www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15244] New: Misleading compiler warning: "Error: use


          Issue ID: 15244
           Summary: Misleading compiler warning: "Error: use .min_normal
                    property instead of .min"
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: acehreli yahoo.com

void main() {

Error: use .min_normal property instead of .min

I like the warning but it is misleading. When a person (especially a beginner)
writes double.min, they mean "the minimum value" but the warning tells them to
use something else: double.min_normal.

I recommend that the message be changed to something like

Error: .min is deprecated for floating point types. Do you mean -double.max or


Oct 24 2015