summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/parse.y b/parse.y
index 189731b45c..d7261a008d 100644
--- a/parse.y
+++ b/parse.y
@@ -11758,6 +11758,7 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l
break;
case NODE_DSYM:
+ warn_symbol:
SWITCH_BY_COND_TYPE(type, warning, "symbol ")
break;
@@ -11770,6 +11771,9 @@ cond0(struct parser_params *p, NODE *node, enum cond_type type, const YYLTYPE *l
node->nd_lit == Qfalse) {
/* booleans are OK, e.g., while true */
}
+ else if (SYMBOL_P(node->nd_lit)) {
+ goto warn_symbol;
+ }
else {
SWITCH_BY_COND_TYPE(type, warning, "")
}