Mercurial > illumos > git > illumos-gate
view usr/src/tools/smatch/src/validation/choose_expr.c @ 19241:79022555a4a9
11972 resync smatch
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Approved by: Dan McDonald <danmcd@joyent.com>
author | John Levon <john.levon@joyent.com> |
---|---|
date | Mon, 11 Nov 2019 16:23:50 +0000 |
parents | b73b4fe381d3 |
children |
line wrap: on
line source
static int x = __builtin_choose_expr(0,(char *)0,(void)0); static int y = __builtin_choose_expr(1,(char *)0,(void)0); static char s[42]; static int z = 1/(sizeof(__builtin_choose_expr(1,s,0)) - 42); /* * check-name: choose expr builtin * check-error-start choose_expr.c:1:51: warning: incorrect type in initializer (different base types) choose_expr.c:1:51: expected int static [toplevel] x choose_expr.c:1:51: got void choose_expr.c:2:41: warning: incorrect type in initializer (different base types) choose_expr.c:2:41: expected int static [toplevel] y choose_expr.c:2:41: got char * choose_expr.c:4:17: warning: division by zero * check-error-end */