xref: /illumos-gate/usr/src/tools/smatch/src/validation/sizeof-builtin.c (revision 8af575c0afc1d79bd23c3e1a78a546c9963e5083)
1 int test(void);
2 int test(void)
3 {
4 	return sizeof &__builtin_trap;
5 }
6 
7 /*
8  * check-name: sizeof-builtin
9  * check-command: sparse -Wno-decl $file
10  * check-known-to-fail
11  *
12  * check-error-start
13 sizeof-function.c:4:16: error: expression using addressof on a builtin function
14  * check-error-end
15  */
16