One of the important roles of a compiler is to notify the coder the number of errors or warnings and their location in the code.
Would anyone disagree?

On Friday, I really got screwed up because of the incorrect stats about the number of errors and warnings in my code, which Microsoft Visual Studio 6.0(VS 6.0 from now on) generated during compilation.

My job is to maintain software, which makes it possible for my colleagues to control the hardware parts that goes in the PDP(Plasma Display Panel) -- I work for a PDP manufacturer. I have to work on 5 different, yet similar versions the program, which I just explained above because we have several product lines depending on the size and resoultion of the panel we are targeting on. This is very very lame since all the programs basically do the same thing. The only differences among them are very minor such as the location of certain variables located in the memory, which the hardware refers to on operation. Poor engineering practice always leads to a disaster !!!
Anyway, I was assigned a job to add a new feature to all the versions. I worked my way and at some point I where I thought I was finished, I pressed the exclamation mark icon to execute the program. VS 6.0 prompt me whether I was going to rebuild the project before I execute it and I chose yes. While the project was being compiled, I was watching the debug window to see if I have created any errors. I got a bunch of warnings about downcasting doubles to ints implicitly and declaring unreferenced variables(none of them from my portion of the code), but I did not see any errors. However, the number of errors and warning, which is displayed at the end of the compilation was indicating that I had a bunch of errors and no warning. And the really exciting(?) part was that the program was executed as if there were no errors. The newly added feature was added in there.
 
Huh ?!@?$#@%#!^*@&%$

How would you react to this situation? What I did was to reconfigure my project settings. This went on for couple of hours switching from project to project but nothing chaged and got worse. After struggling for some time, I finally figure out what was causing this very absturd behavior.

I always copy a project to a new location and do my work there to preserve the original stable version. It is my own way backing up my work and keeping a history. Anyway, the new feature that I added involved the word error. Therefore, the new folder I created to make a copy of the original to work on contained the word error. The word error in the path name for the files were causing the absurd behavior. The word error was replaced with the word 오류, which means error in Korean and the problem was solved.

I have always thought that VS 6.0 had a counter for counting the number of errors and warnings, but I think Microsoft does it somewhat in a perverted way... <- personal opinion.
I think Microsoft counts the number of errors and warnings by parsing the debug window. I'm not saying that parsing would not work. I'm just saying they are doing it wrong and might be doing it inefficiently. Instead of increasing the counter for errors and warnings as they occur during compilation, my guess is that they parse each line of the debug window and searches for the string "error"and "waring" to increment the counter. And it is obvious that they don't parse the full line, but only until they spot either one of the word.

But why? Why did they do it this way? Why Bill?
Posted by Dansoonie