Skip to content

Commit 889408b

Browse files
committed
Add test case.
1 parent 80ca950 commit 889408b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
| choose_expr.c:3:13:3:42 | __builtin_choose_expr |
2+
| types.c:4:9:4:57 | __builtin_types_compatible_p |
3+
| types.c:6:16:6:65 | __builtin_types_compatible_p |
24
| varargs.c:7:5:7:32 | __builtin_va_start |
35
| varargs.c:9:13:9:37 | __builtin_va_arg |
46
| varargs.c:11:5:11:24 | __builtin_va_end |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
int main(int argc, char **argv) {
3+
char *s;
4+
if (__builtin_types_compatible_p(__typeof__(s), long)) {
5+
puts("long");
6+
} else if (__builtin_types_compatible_p(__typeof__(s), char*)) {
7+
puts("str");
8+
}
9+
return (0);
10+
};
11+

0 commit comments

Comments
 (0)