Print this page
12257 resync smatch to 0.6.1-rc1-il-4

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/pre-process.c
          +++ new/usr/src/tools/smatch/src/pre-process.c
↓ open down ↓ 1560 lines elided ↑ open up ↑
1561 1561                          token_type(value) = TOKEN_IDENT;
1562 1562                          value->ident = built_in_ident(buf);
1563 1563                  }
1564 1564                  value->pos.whitespace = 1;
1565 1565                  value->next = &eof_token_entry;
1566 1566          }
1567 1567  
1568 1568          do_define(value->pos, NULL, ident, NULL, value, attr);
1569 1569  }
1570 1570  
     1571 +///
     1572 +// like predefine() but only if one of the non-standard dialect is chosen
     1573 +void predefine_nostd(const char *name)
     1574 +{
     1575 +        if ((standard & STANDARD_GNU) || (standard == STANDARD_NONE))
     1576 +                predefine(name, 1, "1");
     1577 +}
     1578 +
1571 1579  static int do_handle_define(struct stream *stream, struct token **line, struct token *token, int attr)
1572 1580  {
1573 1581          struct token *arglist, *expansion;
1574 1582          struct token *left = token->next;
1575 1583          struct ident *name;
1576 1584  
1577 1585          if (token_type(left) != TOKEN_IDENT) {
1578 1586                  sparse_error(token->pos, "expected identifier to 'define'");
1579 1587                  return 1;
1580 1588          }
↓ open down ↓ 824 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX