Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Warning #673: the initial sequence of preprocessing directives is not compatible with those of precompiled header file

SergeyKostrov
Valued Contributor II
685 Views

I'd like to bring attention of Intel software engineers to a Warning #673: >>... >>Compiling with Intel(R) C++ Compiler XE 12.1.3.300 [IA-32]... (Intel C++ Environment) >>Class01.cpp >>Warning #673: the initial sequence of preprocessing directives is not compatible with those of precompiled header file "Debug\ConTestApp.pchi" >>... This is a very old problem and it could be even reproduced with Intel C++ compiler v8.1 Update 38 ( Release date 06.06.2006 ). Something goes wrong as soon as Stdafx.h is included as follows: [ Class01.cpp ] #include "..\Stdafx.h" #include "..\Include\Class01.h" Class01::Class01() { } instead of: #include "Stdafx.h" #include "..\Include\Class01.h" Class01::Class01() { }

0 Kudos
7 Replies
SergeyKostrov
Valued Contributor II
685 Views
Attached is a VS project that reproduces the Warning #673.
0 Kudos
Mark_S_Intel1
Employee
685 Views

Thank you for the report and the test case. I will investigate and get back to you.

--mark

0 Kudos
SergeyKostrov
Valued Contributor II
685 Views
Thanks, Mark and let me know if you have any questions.
0 Kudos
Mark_S_Intel1
Employee
685 Views

I was able to reproduce the warning you are getting.  Note that ConestApp.cpp uses #include "Stdafx.h" but Class01.cpp uses #include "..\Stdafx.h" .

Our PCH implementation is a little different than Microsoft’s.  Our PCH implementation expects these to be an exact match.  They would match if the .cpp file used to create the PCH was in the same directory as the files using the PCH.  I believe we go ahead and use the PCH anyway even if they do not match.  

 --mark

0 Kudos
SergeyKostrov
Valued Contributor II
685 Views
>>...Our PCH implementation is a little different than Microsoft’s. >>Our PCH implementation expects these to be an exact match... Thank you very much, Mark! A structure of the test projects ( for MSC or for ICC ) models a structure of another real project. Unfortunately, the project is not small and "..\Stdafx.h" can not be changed. However, I finally know why the warning is displayed!
0 Kudos
Mark_S_Intel1
Employee
685 Views

You are welcome Sergey.  There is more information on this topic at http://software.intel.com/en-us/articles/cdiag673

Thanks,
--mark

0 Kudos
SergeyKostrov
Valued Contributor II
685 Views
After I've updated Intel Parallel Studio XE 2013 ( from Initial Release to Update 2 ) I see a new compiler option: /Wpch-messages[-] - enable ( DEFAULT ) / disable PCH information messages and I'd like to confirm that it is related to the problem described in the thread. Thanks in advance.
0 Kudos
Reply