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:
Carl Worth
2010-08-11 13:50:51 -07:00
parent cb5ea0c79b
commit 624dd585c7
3 changed files with 2 additions and 3 deletions

View File

@@ -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
{

View File

@@ -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
{