#3602 closed Bugs (fixed)
created pch.cpp file is missing a terminating newline.
Reported by: | Paul A. Bristow | Owned by: | Vladimir Prus |
---|---|---|---|
Milestone: | Boost 1.42.0 | Component: | build |
Version: | Boost Development Trunk | Severity: | Problem |
Keywords: | missing newline /Za pch.cpp | Cc: |
Description
In Boost.math testing
cpp-pch pch : pch.hpp : <use>../../test/buildboost_test_exec_monitor ;
writes a file pch.pch.cpp that is missing a terminating newline. "fatal error C1004: unexpected end-of-file found"
#include "pch.hpp"
This is required in strict C++ compliance mode /Za.
compile-c-c++-pch ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch pch.pch.cpp ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch.cpp(1) : fatal error C1004: unexpected end-of-file found
call "C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo @"..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch.rsp" "..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch.cpp"
...failed compile-c-c++-pch ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.obj...
Attachments (1)
Change History (6)
by , 13 years ago
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Status: | new → assigned |
---|
comment:3 by , 13 years ago
Sadly not quite
pch.pch.cpp ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch.cpp(1) : warning C4067: unexpected tokens following preprocessor directive - expected a newline ..\..\..\bin.v2\libs\math\test\msvc-9.0\debug\asynch-exceptions-on\threading-multi\pch.pch.cpp(1) : fatal error C1004: unexpected end-of-file found
pch.pch.cpp contains:
#include "pch.hpp"\n
So isn't translating the \n into a newline :-(
(using bjam 3.1.17 I believe
follow-up: 5 comment:4 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 by , 13 years ago
Replying to vladimir_prus:
(In [57965]) When generating PCH-compiling cpp, end it with newline.
Fixes #3602.
Confirms Works OK for me with jamfile including requirements
<toolset>msvc:<cxxflags>/Za # disable MS Extensions in Boost.Test
cpp-pch pch : pch.hpp : <use>../../test/buildboost_test_exec_monitor ;
that failed before.
Thanks.
Paul, does the attached patch help? Please note you need current Boost.Jam -- you can get that by running 'bootstrap.bat' in the root of boost source tree.