3 ms·
This was c++ and not C, but it is a preprocessor pitfall. I needed to compare and older and newer version of some file from the RCS, so I saved temporary copie
by tasty_freeze 7y ago
This was c++ and not C, but it is a preprocessor pitfall.
I needed to compare and older and newer version of some file from the RCS, so I saved temporary copies named "new" and "old". diff told me what I needed to know, but I failed to delete those temp files.
Hours later I typed "make" to build my program and got all sorts of errors deeply nested in some library function. Did someone misconfigure the server I was on? OK, maybe it is an incremental build problem? etc. It took took long to figure out the problem.
It turns out that during compilation, as one of the library .h files was being scanned, it contained #include <new>, which picked up the junk file in my working directory instead of using the C library.