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

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

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() { }

8 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

Attached is a VS project that reproduces the Warning #673.

Anexos: 

AnexoTamanho
Download contestapp.zip8.74 KB

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

--mark

Thanks, Mark and let me know if you have any questions.

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

>>...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!

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

Thanks,
--mark

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.

Faça login para deixar um comentário.