Subj : #include BUG ???? [1/1] To : borland.public.cpp.borlandcpp From : Andrew Clark Date : Sun Apr 10 2005 07:54 pm This is a MIME message --=_Turnpike_Eo8k4dAlYXWClyzb= Content-Type: text/plain;charset=us-ascii;format=flowed Hi, I seem to have found a bug but could someone please confirm that it does the same on their version. I am using Borland C++ Builder 6 Personal. Basically I have had this bug for years but was unable to work out what it was but now I know. If you include a file that is not found, but the first 8 characters match an existing file then that file is automatically used instead which previously caused enormous headcaches wondering why the compiler was opening a file that I hadn't requested. Example. #include "123456789.h" if the file is found, it will use it.......... if it is not found but the filename "12345678.h" was found in the directory it will open that one instead without displaying any sort of an error. Strangely enough the file found on the hard disk must match the first 8 characters, not first 7 or any other number. If the #include file is less than 8 characters then it will display an error indicating it could not find the file so that could come down to how borland C++ Builder 6 compiler is handling filenames. I have updated to the latest Update 4 to make sure it hasn't been fixed already. Could an update be released for Borland C++ Builder 6 Personal Edition please fixing the problem. Attached are 2 files which when compiled will highlight the problem. Thanks Andrew --=_Turnpike_Eo8k4dAlYXWClyzb= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=12345678.h Content-Description: 12345678.h Content-MD5: cKG6tU2pPCBqBmS/CzHYxg== #ifndef IncludeMeH #define IncludeMeH #error I didn't request this file=20 #endif= --=_Turnpike_Eo8k4dAlYXWClyzb= Content-Type: text/plain;charset=us-ascii;format=flowed --=_Turnpike_Eo8k4dAlYXWClyzb= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=test.cpp Content-Description: test.cpp Content-MD5: d+9Z7bJeTEMVvrVKuFfbVQ== //-------------------------------------------------------------------------= -- #pragma hdrstop #include "123456789.h" //-------------------------------------------------------------------------= -- #pragma argsused int main(int argc, char* argv[]) { return 0; } //-------------------------------------------------------------------------= -- = --=_Turnpike_Eo8k4dAlYXWClyzb= Content-Type: text/plain;charset=us-ascii;format=flowed -- Andrew Clark --=_Turnpike_Eo8k4dAlYXWClyzb=-- .