Skip to content

Commit

Permalink
Codegen C - Include aligment assertion (thepowersgang#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang authored and rdrpenguin04 committed Nov 7, 2021
1 parent b7a6e5f commit 65538e5
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 65538e5

Please sign in to comment.