Forum
error line numbers affected by #if(n)def - Printable Version

+- Forum (https://www.boriel.com/forum)
+-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12)
+--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11)
+---- Forum: Bug Reports (https://www.boriel.com/forum/forumdisplay.php?fid=15)
+---- Thread: error line numbers affected by #if(n)def (/showthread.php?tid=200)



error line numbers affected by #if(n)def - programandala.net - 04-16-2010

I realized the line numbers shown in the error reports don't include the lines discarded by #ifdef and #ifndef. I mean, the lines of the source discarded by #ifdef and #ifndef are not counted.
I guess the compiler discards those parts before doing the next pass, but the annoyng effect is the lines of errors and warnings are not real.
This is a problem, mainly with long programs where conditional compilation is used a lot.