forked from spevnev/uprintf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scopes.c
33 lines (30 loc) · 1.06 KB
/
scopes.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "uprintf.h"
int main(void) {
// clang-format off
int var = 1; uprintf("int = %S\n", &var); {double var = 1.234; uprintf("double = %S\n", &var);} {const char *var = "string variable"; uprintf("string = %S\n", &var);} while (var++ < 3) {int8_t var = -5; uprintf("int8_t = %S\n", &var);} for (size_t var = 3;var < 5;var++){uprintf("size_t = %S\n", &var);}
// clang-format on
{
const char *var = "var";
do {
float var = 0.123;
{
int var = 333;
if (var > 0) {
bool var = false;
for (int var = 0; var < 1; var++) {
void *var = NULL;
{ uprintf("void* %S\n", &var); }
}
uprintf("bool %S\n", &var);
}
uprintf("int %S\n", &var);
}
uprintf("float %S\n", &var);
} while (0);
uprintf("c_str %S\n", &var);
}
return _upf_test_status;
}