Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/validation/choose_expr.c
          +++ new/usr/src/tools/smatch/src/validation/choose_expr.c
   1    1  static int x = __builtin_choose_expr(0,(char *)0,(void)0);
   2    2  static int y = __builtin_choose_expr(1,(char *)0,(void)0);
   3    3  static char s[42];
   4    4  static int z = 1/(sizeof(__builtin_choose_expr(1,s,0)) - 42);
   5    5  
   6    6  /*
   7    7   * check-name: choose expr builtin
   8    8   * check-error-start
   9    9  choose_expr.c:1:51: warning: incorrect type in initializer (different base types)
  10      -choose_expr.c:1:51:    expected int static [signed] [toplevel] x
  11      -choose_expr.c:1:51:    got void <noident>
       10 +choose_expr.c:1:51:    expected int static [toplevel] x
       11 +choose_expr.c:1:51:    got void
  12   12  choose_expr.c:2:41: warning: incorrect type in initializer (different base types)
  13      -choose_expr.c:2:41:    expected int static [signed] [toplevel] y
  14      -choose_expr.c:2:41:    got char *<noident>
       13 +choose_expr.c:2:41:    expected int static [toplevel] y
       14 +choose_expr.c:2:41:    got char *
  15   15  choose_expr.c:4:17: warning: division by zero
  16   16   * check-error-end
  17   17   */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX