Files
dbgui/tmp/sec.cpp
2023-06-19 18:44:42 +02:00

38 lines
597 B
C++

#include <cstdint>
#include <unistd.h>
#include <string>
uint32_t my_glob = 42;
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, 22, 4000};
std::string test = "Hello World";
uint32_t x = 25;
unsigned int y = 30;
sleep(tmp.data);
{
test::MyType tmp = test::MyType{2};
sleep(tmp.data);
}
}
void helper_fn2() {
test::MyType tmp = test::MyType{3};
sleep(tmp.data);
}