There is a error in the file licence_info.cpp under tools\bcp

The original line 18 is (pay attention the correspond the parentheses) "Copyright|\\(c\\)|? I compile bcp with vc71 toolset and fails. I change this line with "Copyright|\\(c\\)|?" It's OK. I also check the code in the CVS, This error is not corrected.

I try again.
I compile the bcp with mingw and it pass, but compiling with vc7.1 it fail.
The error is:
licence_info.cpp(18) : error C2001: newline in constant
CALL "C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\bin\VCVARS32.BAT" >nul
"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\bin\cl"
/Zm800 -nologo /EHsc -c -DNDEBUG -DNDEBUG -DBOOST_REGEX_NO_LIB=1 /Ogity
/O2 /Gs /Ob2 /EHsc /GR /MD /Op /wd4675 /Zc:forScope
Zc:wchar_t -I"..\..\bin\boost\tools\bcp" -I"C:\opt\boost" -Fo"..\..\bin
\boost\tools\bcp\bcp.exe\vc-7_1\release\threading-multi\licence_info.obj" -
Tp"licence_info.cpp"
...failed vc-C++
..\..\bin\boost\tools\bcp\bcp.exe\vc-7_1\release\threading-multi\licence_inf
o.obj...
I think it is not the vc7.1's fault. I refer to the MSDN and the book of
"the C++ programming language"
The standard c++ do not accept the grammar
printf("Hello, // error
world");
printf("Hello,\n // error
world");
only accept the grammar
printf("Hello,\ // OK
world");
printf("Hello," // OK
" world");
I think what the code want to do is concatenating all the string literal.
May I am wrong since I find all the other string literal encircling with
quatation("") but the line 18 is not.
In any cases it can not works with vc7.1.
----- Original Message -----
From: "John Maddock"
---------------------------------------------------------------------------- ----

Huifeng Shen wrote:
I think John is right, you might run into a character coding issue. For John and for me, the line is question looks correct, the string is terminated correctly. As I am sending this mail in UTF-8, you should be able to see the line as it looks for us: "Copyright|\\(c\\)|©" The character code for the last character before the closing quote is 0xA9, which might be the start of some composite character in the encoding you use locally, swallowing the following closing double quote. Anyway, I think the code in question is at least very bad style because is uses a non-ASCII character, which gives you all sort of portability problems. Maybe it should be replaced with "Copyright|\\(c\\)|\xA9". Markus

I think that's right, thanks for letting me know what the character code is, saves me looking it up :-) And this reminds me: we really should have regression tests for the tools integrated into the test framefwork, it would have picked this up earlier. Thanks, John.
participants (3)
-
Huifeng Shen
-
John Maddock
-
Markus Schöpflin