This commit is contained in:
T0b1
2023-06-15 02:25:57 +02:00
parent b393f3dd28
commit 9ab08de243
15 changed files with 1294 additions and 166 deletions

BIN
tmp/main

Binary file not shown.

View File

@@ -8,11 +8,13 @@ namespace {
}
void helper_fn();
void helper_fn2();
int main(int argc, char* argv[]) {
MyType tmp = MyType{10};
while (tmp.data != 0) {
helper_fn();
helper_fn2();
tmp.data--;
}
return 0;

View File

@@ -1,13 +1,33 @@
#include <cstdint>
#include <unistd.h>
#include <string>
namespace test {
enum MyEnum : uint16_t {
ENUM_VAL1 = 10,
ENUM_VAL2 = 5,
ENUM_VAL3 = 0xFFF,
};
struct MyType {
int data;
uint32_t test_bits : 20;
uint32_t test_bits2: 12;
MyEnum enum_val;
};
}
void helper_fn() {
test::MyType tmp = test::MyType{1};
std::string test = "Hello World";
sleep(tmp.data);
{
test::MyType tmp = test::MyType{2};
sleep(tmp.data);
}
}
void helper_fn2() {
test::MyType tmp = test::MyType{3};
sleep(tmp.data);
}