File: sizeof_struct.c

package info (click to toggle)
chibicc 1.0.23.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,832 kB
  • sloc: ansic: 62,911; sh: 275; makefile: 92
file content (12 lines) | stat: -rw-r--r-- 171 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12


#include "test.h"
struct {
  char c;
  char arr[];
} s = {1,2,3};
int main(void) {
    printf("%zu\n",sizeof(s)); // expected 1
    ASSERT(1, sizeof(s));
    return 0;
}