www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5114] New: Too many error messages with main(;

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5114

           Summary: Too many error messages with main(;
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



This is a wrong program:


void main() {
    main(;
}


But DMD 2.049 shows too many errors:


test.d(2): expression expected, not ';'
test.d(3): found '}' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'
test.d(3): found 'EOF' when expecting ','
test.d(3): expression expected, not 'EOF'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 24 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5114


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



20:25:30 PST ---
https://github.com/D-Programming-Language/dmd/commit/9466d6c8668ca8005ebf1d991647ee6451113fae

https://github.com/D-Programming-Language/dmd/commit/9302e96e7cf164420d5e44ae3ae2020050cf724d

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 19 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5114




After the latest DMD updates (minutes ago), the program now gives me:


test.d(2): expression expected, not ';'
test.d(3): found '}' when expecting ','
test.d(3): found 'EOF' when expecting ')'
test.d(3): found 'EOF' when expecting ';' following statement
test.d(3): found 'EOF' when expecting '}' following compound statement


This is an improvement.

Note: among the errors I don't see the "premature end of file" error message
that's inside Walter change:

+
+            if (token.value == TOKeof)
+            {   error("premature end of file");
+                break;
+            }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 21 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5114


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com




 Note: among the errors I don't see the "premature end of file" error message
 that's inside Walter change:
 
 +
 +            if (token.value == TOKeof)
 +            {   error("premature end of file");
 +                break;
 +            }
This is inside Parser::parseEnum - when eof is encountered inside and enum declaration's body. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 21 2012