Commit 16275c7f authored by Brad King's avatar Brad King
Browse files

LexerParser: Suppress NVHPC warnings in generated code

parent cefda16d
......@@ -120,7 +120,11 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
# endif
#endif
#line 124 "cmExprParser.cxx"
#if defined(__NVCOMPILER)
# pragma diag_suppress 550 /* variable set but never used */
#endif
#line 128 "cmExprParser.cxx"
# ifndef YY_CAST
# ifdef __cplusplus
......@@ -556,9 +560,9 @@ static const yytype_int8 yytranslate[] =
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_uint8 yyrline[] =
{
0, 81, 81, 86, 89, 94, 97, 102, 105, 110,
113, 116, 121, 124, 127, 132, 135, 138, 144, 149,
152, 155, 158, 163, 166
0, 85, 85, 90, 93, 98, 101, 106, 109, 114,
117, 120, 125, 128, 131, 136, 139, 142, 148, 153,
156, 159, 162, 167, 170
};
#endif
......@@ -1433,194 +1437,194 @@ yyreduce:
switch (yyn)
{
case 2: /* start: exp */
#line 81 "cmExprParser.y"
#line 85 "cmExprParser.y"
{
cmExpr_yyget_extra(yyscanner)->SetResult((yyvsp[0].Number));
}
#line 1441 "cmExprParser.cxx"
#line 1445 "cmExprParser.cxx"
break;
case 3: /* exp: bitwiseor */
#line 86 "cmExprParser.y"
#line 90 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1449 "cmExprParser.cxx"
#line 1453 "cmExprParser.cxx"
break;
case 4: /* exp: exp exp_OR bitwiseor */
#line 89 "cmExprParser.y"
#line 93 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) | (yyvsp[0].Number);
}
#line 1457 "cmExprParser.cxx"
#line 1461 "cmExprParser.cxx"
break;
case 5: /* bitwiseor: bitwisexor */
#line 94 "cmExprParser.y"
#line 98 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1465 "cmExprParser.cxx"
#line 1469 "cmExprParser.cxx"
break;
case 6: /* bitwiseor: bitwiseor exp_XOR bitwisexor */
#line 97 "cmExprParser.y"
#line 101 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) ^ (yyvsp[0].Number);
}
#line 1473 "cmExprParser.cxx"
#line 1477 "cmExprParser.cxx"
break;
case 7: /* bitwisexor: bitwiseand */
#line 102 "cmExprParser.y"
#line 106 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1481 "cmExprParser.cxx"
#line 1485 "cmExprParser.cxx"
break;
case 8: /* bitwisexor: bitwisexor exp_AND bitwiseand */
#line 105 "cmExprParser.y"
#line 109 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) & (yyvsp[0].Number);
}
#line 1489 "cmExprParser.cxx"
#line 1493 "cmExprParser.cxx"
break;
case 9: /* bitwiseand: shift */
#line 110 "cmExprParser.y"
#line 114 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1497 "cmExprParser.cxx"
#line 1501 "cmExprParser.cxx"
break;
case 10: /* bitwiseand: bitwiseand exp_SHIFTLEFT shift */
#line 113 "cmExprParser.y"
#line 117 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) << (yyvsp[0].Number);
}
#line 1505 "cmExprParser.cxx"
#line 1509 "cmExprParser.cxx"
break;
case 11: /* bitwiseand: bitwiseand exp_SHIFTRIGHT shift */
#line 116 "cmExprParser.y"
#line 120 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) >> (yyvsp[0].Number);
}
#line 1513 "cmExprParser.cxx"
#line 1517 "cmExprParser.cxx"
break;
case 12: /* shift: term */
#line 121 "cmExprParser.y"
#line 125 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1521 "cmExprParser.cxx"
#line 1525 "cmExprParser.cxx"
break;
case 13: /* shift: shift exp_PLUS term */
#line 124 "cmExprParser.y"
#line 128 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) + (yyvsp[0].Number);
}
#line 1529 "cmExprParser.cxx"
#line 1533 "cmExprParser.cxx"
break;
case 14: /* shift: shift exp_MINUS term */
#line 127 "cmExprParser.y"
#line 131 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) - (yyvsp[0].Number);
}
#line 1537 "cmExprParser.cxx"
#line 1541 "cmExprParser.cxx"
break;
case 15: /* term: unary */
#line 132 "cmExprParser.y"
#line 136 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1545 "cmExprParser.cxx"
#line 1549 "cmExprParser.cxx"
break;
case 16: /* term: term exp_TIMES unary */
#line 135 "cmExprParser.y"
#line 139 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) * (yyvsp[0].Number);
}
#line 1553 "cmExprParser.cxx"
#line 1557 "cmExprParser.cxx"
break;
case 17: /* term: term exp_DIVIDE unary */
#line 138 "cmExprParser.y"
#line 142 "cmExprParser.y"
{
if (yyvsp[0].Number == 0) {
throw std::overflow_error("divide by zero");
}
(yyval.Number) = (yyvsp[-2].Number) / (yyvsp[0].Number);
}
#line 1564 "cmExprParser.cxx"
#line 1568 "cmExprParser.cxx"
break;
case 18: /* term: term exp_MOD unary */
#line 144 "cmExprParser.y"
#line 148 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-2].Number) % (yyvsp[0].Number);
}
#line 1572 "cmExprParser.cxx"
#line 1576 "cmExprParser.cxx"
break;
case 19: /* unary: factor */
#line 149 "cmExprParser.y"
#line 153 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1580 "cmExprParser.cxx"
#line 1584 "cmExprParser.cxx"
break;
case 20: /* unary: exp_PLUS unary */
#line 152 "cmExprParser.y"
#line 156 "cmExprParser.y"
{
(yyval.Number) = + (yyvsp[0].Number);
}
#line 1588 "cmExprParser.cxx"
#line 1592 "cmExprParser.cxx"
break;
case 21: /* unary: exp_MINUS unary */
#line 155 "cmExprParser.y"
#line 159 "cmExprParser.y"
{
(yyval.Number) = - (yyvsp[0].Number);
}
#line 1596 "cmExprParser.cxx"
#line 1600 "cmExprParser.cxx"
break;
case 22: /* unary: exp_NOT unary */
#line 158 "cmExprParser.y"
#line 162 "cmExprParser.y"
{
(yyval.Number) = ~ (yyvsp[0].Number);
}
#line 1604 "cmExprParser.cxx"
#line 1608 "cmExprParser.cxx"
break;
case 23: /* factor: exp_NUMBER */
#line 163 "cmExprParser.y"
#line 167 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[0].Number);
}
#line 1612 "cmExprParser.cxx"
#line 1616 "cmExprParser.cxx"
break;
case 24: /* factor: exp_OPENPARENT exp exp_CLOSEPARENT */
#line 166 "cmExprParser.y"
#line 170 "cmExprParser.y"
{
(yyval.Number) = (yyvsp[-1].Number);
}
#line 1620 "cmExprParser.cxx"
#line 1624 "cmExprParser.cxx"
break;
#line 1624 "cmExprParser.cxx"
#line 1628 "cmExprParser.cxx"
default: break;
}
......@@ -1845,7 +1849,7 @@ yyreturn:
return yyresult;
}
#line 171 "cmExprParser.y"
#line 175 "cmExprParser.y"
/* End of grammar */
......
......@@ -44,6 +44,10 @@ static void cmExpr_yyerror(yyscan_t yyscanner, const char* message);
# pragma clang diagnostic ignored "-Wused-but-marked-unused"
# endif
#endif
#if defined(__NVCOMPILER)
# pragma diag_suppress 550 /* variable set but never used */
#endif
%}
/* Generate a reentrant parser object. */
......
......@@ -50,6 +50,11 @@
# endif
#endif
#if defined(__NVCOMPILER)
# pragma diag_suppress 111 /* statement is unreachable */
# pragma diag_suppress 550 /* variable set but never used */
#endif
/* Make sure isatty is available. */
#if defined(_WIN32) && !defined(__CYGWIN__)
# include <io.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment