Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,2 @@
int i;
void* address_of_i = &i;

View file

@ -0,0 +1,3 @@
#include <memory>
int i;
auto address_of_i = std::addressof(i);

View file

@ -0,0 +1 @@
int& i = *(int*)0xA100;

View file

@ -0,0 +1,3 @@
#include <new>
struct S { int i = 0; S() {} };
auto& s = *new (reinterpret_cast<void*>(0xa100)) S;

View file

@ -0,0 +1,5 @@
static union
{
int i;
int j;
};

View file

@ -0,0 +1,2 @@
int i;
int& j = i;

View file

@ -0,0 +1,4 @@
#include <cstring>
inline float read_as_float(int const& i) { float f; memcpy(&f, &i, sizeof(f)); return f; }
int i = 0x0a112233;
float f = read_as_float(i);