glcpp: Reword diagnostic for #elif with no expression
Rather than telling the user what to fix, the standard convention is to describe what the detected problem is. With this change, test 081-elif-without-expression now passes.
This commit is contained in:
@@ -1950,7 +1950,7 @@ yyreduce:
|
||||
if (parser->skip_stack &&
|
||||
parser->skip_stack->type == SKIP_TO_ELSE)
|
||||
{
|
||||
glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif needs an expression");
|
||||
glcpp_error(& (yylsp[(1) - (2)]), parser, "#elif with no expression");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -276,7 +276,7 @@ control_line:
|
||||
if (parser->skip_stack &&
|
||||
parser->skip_stack->type == SKIP_TO_ELSE)
|
||||
{
|
||||
glcpp_error(& @1, parser, "#elif needs an expression");
|
||||
glcpp_error(& @1, parser, "#elif with no expression");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -3,4 +3,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user