Skip to content

Commit

Permalink
ask CL preprocessor for UTF-8 output
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Kroening committed Jun 9, 2018
1 parent ae1d039 commit f04992a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ test_script:
rmdir /s /q ansi-c\Forward_Declaration2
rmdir /s /q ansi-c\Incomplete_Type1
rmdir /s /q ansi-c\Union_Padding1
rmdir /s /q ansi-c\Universal_characters1
rmdir /s /q ansi-c\function_return1
rmdir /s /q ansi-c\gcc_attributes7
rmdir /s /q ansi-c\gcc_version1
Expand Down
1 change: 0 additions & 1 deletion buildspec-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ phases:
Remove-Item ansi-c\Forward_Declaration2 -Force -Recurse
Remove-Item ansi-c\Incomplete_Type1 -Force -Recurse
Remove-Item ansi-c\Union_Padding1 -Force -Recurse
Remove-Item ansi-c\Universal_characters1 -Force -Recurse
Remove-Item ansi-c\function_return1 -Force -Recurse
Remove-Item ansi-c\gcc_attributes7 -Force -Recurse
Remove-Item ansi-c\gcc_version1 -Force -Recurse
Expand Down
9 changes: 7 additions & 2 deletions src/ansi-c/c_preprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,13 @@ bool c_preprocess_visual_studio(
// understands.
command_file << char(0xef) << char(0xbb) << char(0xbf);

command_file << "/nologo" << "\n";
command_file << "/E" << "\n";
command_file << "/nologo" << '\n';
command_file << "/E" << '\n';

// This option will make CL produce utf-8 output, as
// opposed to 8-bit with some code page.
command_file << "/source-charset:utf-8" << '\n';

command_file << "/D__CPROVER__" << "\n";
command_file << "/D__WORDSIZE=" << config.ansi_c.pointer_width << "\n";

Expand Down

0 comments on commit f04992a

Please sign in to comment.