Skip to content

Commit

Permalink
Codegen C - Include aligment assertion (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Nov 6, 2021
1 parent 02f4cd6 commit d9958d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/trans/codegen_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1821,8 +1821,8 @@ namespace {
{
// TODO: Handle unsized (should check the size of the fixed-size region)
m_of << "typedef char sizeof_assert_" << Trans_Mangle(p) << "[ (sizeof(struct s_" << Trans_Mangle(p) << ") == " << repr->size << ") ? 1 : -1 ];\n";
//m_of << "typedef char alignof_assert_" << Trans_Mangle(p) << "[ (ALIGNOF(struct s_" << Trans_Mangle(p) << ") == " << repr->align << ") ? 1 : -1 ];\n";
}
m_of << "typedef char alignof_assert_" << Trans_Mangle(p) << "[ (ALIGNOF(struct s_" << Trans_Mangle(p) << ") == " << repr->align << ") ? 1 : -1 ];\n";

m_mir_res = nullptr;
}
Expand Down

0 comments on commit d9958d2

Please sign in to comment.