aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/short_type.sh
blob: fcbec87186d966cb787952dc9b2d8b6442207745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cat <<'EOF' > expected
2 42
8 123
EOF

test_diff <<'EOF'
int printf();

int main() {
    short a = 42;
    printf("%zu %hd\n", sizeof(a), a);
    short* b = &a;
    *b = 123;
    printf("%zu %hd\n", sizeof(b), *b);
}
EOF