initial commit

This commit is contained in:
2026-07-18 20:34:55 +02:00
commit 59ad004c96
474 changed files with 226635 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
#include <assert.h>
#include <stdbool.h>
static int counter;
static int read_const_local_twice(void)
{
const int value = ++counter;
return value + value;
}
static bool update(unsigned char* value)
{
const unsigned char before = *value;
const unsigned char after = before + 2;
const bool changed = after != before;
*value = after;
return changed;
}
int main(void)
{
assert(read_const_local_twice() == 2);
assert(counter == 1);
unsigned char value = 7;
assert(update(&value));
assert(value == 9);
return 0;
}