Skip to content

Commit f04992a

Browse files
author
Daniel Kroening
committed
ask CL preprocessor for UTF-8 output
1 parent ae1d039 commit f04992a

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

appveyor.yml

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ test_script:
7171
rmdir /s /q ansi-c\Forward_Declaration2
7272
rmdir /s /q ansi-c\Incomplete_Type1
7373
rmdir /s /q ansi-c\Union_Padding1
74-
rmdir /s /q ansi-c\Universal_characters1
7574
rmdir /s /q ansi-c\function_return1
7675
rmdir /s /q ansi-c\gcc_attributes7
7776
rmdir /s /q ansi-c\gcc_version1

buildspec-windows.yml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ phases:
3535
Remove-Item ansi-c\Forward_Declaration2 -Force -Recurse
3636
Remove-Item ansi-c\Incomplete_Type1 -Force -Recurse
3737
Remove-Item ansi-c\Union_Padding1 -Force -Recurse
38-
Remove-Item ansi-c\Universal_characters1 -Force -Recurse
3938
Remove-Item ansi-c\function_return1 -Force -Recurse
4039
Remove-Item ansi-c\gcc_attributes7 -Force -Recurse
4140
Remove-Item ansi-c\gcc_version1 -Force -Recurse

src/ansi-c/c_preprocess.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,13 @@ bool c_preprocess_visual_studio(
335335
// understands.
336336
command_file << char(0xef) << char(0xbb) << char(0xbf);
337337

338-
command_file << "/nologo" << "\n";
339-
command_file << "/E" << "\n";
338+
command_file << "/nologo" << '\n';
339+
command_file << "/E" << '\n';
340+
341+
// This option will make CL produce utf-8 output, as
342+
// opposed to 8-bit with some code page.
343+
command_file << "/source-charset:utf-8" << '\n';
344+
340345
command_file << "/D__CPROVER__" << "\n";
341346
command_file << "/D__WORDSIZE=" << config.ansi_c.pointer_width << "\n";
342347

0 commit comments

Comments
 (0)