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


--- Comment #0 from bearophile_hugs eml.cc 2010-10-24 18:29:24 PDT ---
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


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-01-19
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



--- Comment #2 from bearophile_hugs eml.cc 2012-01-21 18:21:23 PST ---
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


--- Comment #3 from yebblies <yebblies gmail.com> 2012-01-22 16:52:31 EST ---
(In reply to comment #2)
 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