[Mono-bugs] [Bug 31781][Nor] New - compiling empty files yields an error

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
5 Oct 2002 05:28:00 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by vladimir@pobox.com.

http://bugzilla.ximian.com/show_bug.cgi?id=31781

--- shadow/31781	Sat Oct  5 01:28:00 2002
+++ shadow/31781.tmp.14834	Sat Oct  5 01:28:00 2002
@@ -0,0 +1,35 @@
+Bug#: 31781
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: vladimir@pobox.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: compiling empty files yields an error
+
+Attempting to compile a file that contains no data, i.e.
+
+/* this is a comment */
+
+yields an error similar to:
+
+syntax error, expecting ABSTRACT CLASS DELEGATE ENUM EXTERN INTERFACE
+INTERNAL NAMESPACE NEW OVERRIDE PRIVATE PROTECTED PUBLIC READONLY SEALED
+STATIC STRUCT UNSAFE USING VIRTUAL VOLATILE OPEN_BRACKET
+bar.cs (6,1), Token: EOF   : Parsing error
+Mono.CSharp.yyParser.yyException: irrecoverable syntax error
+in <0x00864> 00 Mono.CSharp.CSharpParser:yyparse (Mono.CSharp.yyParser.yyInput)
+in <0x0006b> 00 Mono.CSharp.CSharpParser:parse ()
+
+Such files can exist when whole classes aren't compiled due to #if's (so
+that an alternate os-specific implementation can be used, say).  Note that
+including a dummy "namespace Foo { }" makes it compile fine.