[Issue 480] New: too many initializers error message doesn't give	line number
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Sat Nov  4 21:34:55 PST 2006
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=480
           Summary: too many initializers error message doesn't give line
                    number
           Product: D
           Version: 0.172
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: wbaxter at gmail.com
Error generated by the line of code:
   int arr[1] = [1,2,3,4,5,6,7];
doesn't give the line number.  
There seem to be two such messages in src/DMD/todt.c:
todt.c:243: error("too many initializers %d for array[%d]", dim, tadim);
todt.c:346: error("too many initializers %d for array[%d]", dim, tadim);
Also the text of the message needs some commas, like
  error(loc, "too many initializers, %d, for array[%d]", dim, tadim);
This makes it difficult to use the compiler error messages as a way to
determine the proper size for static arrays.
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list