diff options
| author | welinder@troll.com <welinder@troll.com> | 2004-08-12 15:46:08 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:02:43 -0700 |
| commit | d8f1064cb3ec7d02ea95ceb3fa33a150433cd8e3 (patch) | |
| tree | 46182ef574b85428369119f9c8543002d1cc583a /expand.c | |
| parent | cbac665ddaec668c423537d86b32c3c59d1fa03c (diff) | |
| download | sparse-dev-d8f1064cb3ec7d02ea95ceb3fa33a150433cd8e3.tar.gz | |
expand.c:
Don't complain over undefined preprocessor symbols that start
with an underscore.
This helps quiet a gazillion errors with _cplusplus and others
used by solaris' system headers.
This change may or may not be approapriate on a glibc system.
Diffstat (limited to 'expand.c')
| -rw-r--r-- | expand.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -41,7 +41,9 @@ static int expand_symbol_expression(struct expression *expr) * The preprocessor can cause unknown symbols to be generated */ if (!sym) { - warn(expr->pos, "undefined preprocessor identifier '%s'", show_ident(expr->symbol_name)); + const char *ident = show_ident(expr->symbol_name); + if (ident[0] != '_') + warn(expr->pos, "undefined preprocessor identifier '%s'", ident); expr->type = EXPR_VALUE; expr->value = 0; return UNSAFE; |
