[Aldor-l] #line bugfix

Ralf Hemmecke ralf at hemmecke.de
Sun Dec 2 19:57:24 EST 2007


The following patch (against https://aquarium.aldor.csd.uwo.ca/svn, Rev. 
18) fixes the bug that the compiler cannot deal properly with #line 
directives.

Please check with more tests. Since I had to guess quite a bit, I cannot 
state that this is the best solution. At least it seemingly fixes the 
issues I encountered.

Use:
   cd aldor/trunk/aldor/aldor/src
   patch include.c include.patch

Ralf


 > cd aldor/trunk/aldor/aldor/src
 > diff -e include.c rhx-include.c > include.patch

---BEGIN include.patch
700d
698c
		  /* rhx: We trust the programmer of the #line statement
		     in the .as file that the filename is correct.
		     If in an error case the file cannot be found the
		     compiler aborts with a (Fatal Error) message.

		     #1 (Fatal Error) Could not open file `dir/file.ext' with mode `r'.

		     It would actually be very helpful for a
		     programmer if we could abort the compilation
		     already here with an error message saying that
		     the filename appearing in the #line directive
		     cannot be found.
		  */
		  fileState.curFname = fnameParse(fname);
.
---END include.patch





More information about the Aldor-l mailing list