From 19d6ff234b94378a0e269022d7b1181ce4dcc0b7 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 22 Apr 1999 15:04:02 -0700 Subject: [PATCH] c-parse.in (expr_no_commas): Verify we've an expr before calling C_SET_EXP_ORIGINAL_CODE. * c-parse.in (expr_no_commas): Verify we've an expr before calling C_SET_EXP_ORIGINAL_CODE. From-SVN: r26590 --- gcc/ChangeLog | 5 + gcc/c-parse.c | 621 +++++++++++++++++++++++++------------------------ gcc/c-parse.in | 18 +- gcc/c-parse.y | 18 +- 4 files changed, 348 insertions(+), 314 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 006cfeb58d5..031dbafcfd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Sat Apr 24 17:26:43 1999 Richard Henderson + + * c-parse.in (expr_no_commas): Verify we've an expr before + calling C_SET_EXP_ORIGINAL_CODE. + Thu Apr 22 22:22:15 EDT 1999 John Wehle (john@feith.com) * toplev.c (rest_of_compilation): Always set diff --git a/gcc/c-parse.c b/gcc/c-parse.c index a1d2d6d1c47..c12dc182bb8 100644 --- a/gcc/c-parse.c +++ b/gcc/c-parse.c @@ -365,39 +365,39 @@ static const short yyrline[] = { 0, 445, 448, 451, 454, 456, 460, 464, 468, 470, 473, 477, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 528, 530, 534, 536, 540, 542, 545, - 549, 551, 558, 561, 564, 570, 669, 670, 672, 678, - 680, 694, 717, 719, 721, 725, 731, 733, 738, 740, - 745, 747, 748, 758, 763, 765, 766, 767, 774, 780, - 785, 788, 796, 801, 803, 804, 805, 812, 823, 827, - 833, 838, 843, 848, 850, 852, 861, 864, 868, 870, - 872, 877, 881, 884, 888, 891, 893, 905, 908, 910, - 912, 916, 920, 922, 925, 938, 941, 945, 947, 955, - 956, 957, 961, 963, 969, 970, 971, 974, 976, 979, - 981, 984, 987, 993, 1000, 1002, 1009, 1016, 1019, 1026, - 1029, 1033, 1036, 1040, 1045, 1048, 1052, 1055, 1057, 1059, - 1061, 1068, 1070, 1071, 1072, 1077, 1079, 1084, 1092, 1097, - 1101, 1104, 1106, 1111, 1113, 1114, 1117, 1117, 1120, 1123, - 1125, 1127, 1130, 1132, 1135, 1141, 1143, 1147, 1158, 1166, - 1170, 1181, 1189, 1196, 1198, 1203, 1206, 1211, 1213, 1215, - 1222, 1224, 1232, 1238, 1243, 1245, 1247, 1254, 1256, 1262, - 1268, 1270, 1272, 1277, 1279, 1286, 1288, 1291, 1294, 1298, - 1301, 1305, 1308, 1312, 1317, 1319, 1323, 1325, 1327, 1329, - 1333, 1335, 1338, 1341, 1344, 1347, 1351, 1353, 1356, 1358, - 1363, 1366, 1371, 1373, 1375, 1389, 1396, 1401, 1407, 1412, - 1414, 1419, 1421, 1425, 1429, 1433, 1443, 1445, 1450, 1455, - 1458, 1462, 1465, 1469, 1472, 1475, 1478, 1482, 1485, 1489, - 1493, 1495, 1497, 1499, 1501, 1503, 1505, 1507, 1517, 1525, - 1527, 1529, 1533, 1535, 1538, 1541, 1552, 1554, 1559, 1561, - 1564, 1578, 1581, 1584, 1586, 1588, 1596, 1604, 1615, 1620, - 1623, 1637, 1646, 1650, 1654, 1658, 1664, 1668, 1673, 1676, - 1681, 1684, 1685, 1702, 1707, 1710, 1722, 1724, 1734, 1744, - 1745, 1753, 1756, 1768, 1772, 1789, 1799, 1808, 1813, 1818, - 1823, 1827, 1831, 1842, 1849, 1856, 1863, 1874, 1880, 1883, - 1888, 1911, 1945, 1976, 2007, 2022, 2036, 2040, 2044, 2047, - 2052, 2054, 2057, 2059, 2063, 2068, 2071, 2077, 2082, 2087, - 2089, 2098, 2099, 2105, 2107, 2117, 2119, 2123, 2126, 2132, - 2142, 2151, 2160, 2170, 2184, 2189, 2194, 2196, 2205, 2208, - 2213, 2216, 2220 + 549, 551, 558, 561, 569, 580, 679, 680, 682, 688, + 690, 704, 727, 729, 731, 735, 741, 743, 748, 750, + 755, 757, 758, 768, 773, 775, 776, 777, 784, 790, + 795, 798, 806, 811, 813, 814, 815, 822, 833, 837, + 843, 848, 853, 858, 860, 862, 871, 874, 878, 880, + 882, 887, 891, 894, 898, 901, 903, 915, 918, 920, + 922, 926, 930, 932, 935, 948, 951, 955, 957, 965, + 966, 967, 971, 973, 979, 980, 981, 984, 986, 989, + 991, 994, 997, 1003, 1010, 1012, 1019, 1026, 1029, 1036, + 1039, 1043, 1046, 1050, 1055, 1058, 1062, 1065, 1067, 1069, + 1071, 1078, 1080, 1081, 1082, 1087, 1089, 1094, 1102, 1107, + 1111, 1114, 1116, 1121, 1123, 1124, 1127, 1127, 1130, 1133, + 1135, 1137, 1140, 1142, 1145, 1151, 1153, 1157, 1168, 1176, + 1180, 1191, 1199, 1206, 1208, 1213, 1216, 1221, 1223, 1225, + 1232, 1234, 1242, 1248, 1253, 1255, 1257, 1264, 1266, 1272, + 1278, 1280, 1282, 1287, 1289, 1296, 1298, 1301, 1304, 1308, + 1311, 1315, 1318, 1322, 1327, 1329, 1333, 1335, 1337, 1339, + 1343, 1345, 1348, 1351, 1354, 1357, 1361, 1363, 1366, 1368, + 1373, 1376, 1381, 1383, 1385, 1399, 1406, 1411, 1417, 1422, + 1424, 1429, 1431, 1435, 1439, 1443, 1453, 1455, 1460, 1465, + 1468, 1472, 1475, 1479, 1482, 1485, 1488, 1492, 1495, 1499, + 1503, 1505, 1507, 1509, 1511, 1513, 1515, 1517, 1527, 1535, + 1537, 1539, 1543, 1545, 1548, 1551, 1562, 1564, 1569, 1571, + 1574, 1588, 1591, 1594, 1596, 1598, 1606, 1614, 1625, 1630, + 1633, 1647, 1656, 1660, 1664, 1668, 1674, 1678, 1683, 1686, + 1691, 1694, 1695, 1712, 1717, 1720, 1732, 1734, 1744, 1754, + 1755, 1763, 1766, 1778, 1782, 1799, 1809, 1818, 1823, 1828, + 1833, 1837, 1841, 1852, 1859, 1866, 1873, 1884, 1890, 1893, + 1898, 1921, 1955, 1986, 2017, 2032, 2046, 2050, 2054, 2057, + 2062, 2064, 2067, 2069, 2073, 2078, 2081, 2087, 2092, 2097, + 2099, 2108, 2109, 2115, 2117, 2127, 2129, 2133, 2136, 2142, + 2152, 2161, 2170, 2180, 2194, 2199, 2204, 2206, 2215, 2218, + 2223, 2226, 2230 }; #endif @@ -1197,7 +1197,7 @@ static const short yycheck[] = { 38, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/cygnus/gnupro-98r2/share/bison.simple" +#line 3 "/usr/lib/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. @@ -1214,8 +1214,7 @@ static const short yycheck[] = { 38, You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* As a special exception, when this file is copied by Bison into a Bison output file, you may use that output file without restriction. @@ -1391,7 +1390,7 @@ __yy_memcpy (char *to, char *from, int count) #endif #endif -#line 196 "/usr/cygnus/gnupro-98r2/share/bison.simple" +#line 196 "/usr/lib/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -2100,17 +2099,27 @@ case 83: break;} case 84: #line 562 "c-parse.y" -{ yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); - C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; +{ char class; + yyval.ttype = build_modify_expr (yyvsp[-2].ttype, NOP_EXPR, yyvsp[0].ttype); + class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); + ; break;} case 85: -#line 565 "c-parse.y" -{ yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); +#line 570 "c-parse.y" +{ char class; + yyval.ttype = build_modify_expr (yyvsp[-2].ttype, yyvsp[-1].code, yyvsp[0].ttype); /* This inhibits warnings in truthvalue_conversion. */ - C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); ; + class = TREE_CODE_CLASS (TREE_CODE (yyval.ttype)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE (yyval.ttype, ERROR_MARK); + ; break;} case 86: -#line 572 "c-parse.y" +#line 582 "c-parse.y" { yyval.ttype = lastiddecl; if (!yyval.ttype || yyval.ttype == error_mark_node) @@ -2210,11 +2219,11 @@ case 86: ; break;} case 88: -#line 671 "c-parse.y" +#line 681 "c-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 89: -#line 673 "c-parse.y" +#line 683 "c-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (class == 'e' || class == '1' || class == '2' || class == '<') @@ -2222,11 +2231,11 @@ case 89: yyval.ttype = yyvsp[-1].ttype; ; break;} case 90: -#line 679 "c-parse.y" +#line 689 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 91: -#line 681 "c-parse.y" +#line 691 "c-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -2242,7 +2251,7 @@ case 91: yyval.ttype = expand_start_stmt_expr (); ; break;} case 92: -#line 695 "c-parse.y" +#line 705 "c-parse.y" { tree rtl_exp; if (pedantic) pedwarn ("ANSI C forbids braced-groups within expressions"); @@ -2267,21 +2276,21 @@ case 92: ; break;} case 93: -#line 718 "c-parse.y" +#line 728 "c-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 94: -#line 720 "c-parse.y" +#line 730 "c-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 95: -#line 722 "c-parse.y" +#line 732 "c-parse.y" { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 96: -#line 726 "c-parse.y" +#line 736 "c-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); @@ -2289,56 +2298,56 @@ case 96: ; break;} case 97: -#line 732 "c-parse.y" +#line 742 "c-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 98: -#line 734 "c-parse.y" +#line 744 "c-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 100: -#line 741 "c-parse.y" +#line 751 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 103: -#line 750 "c-parse.y" +#line 760 "c-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ANSI C does not permit use of `varargs.h'"); ; break;} case 104: -#line 760 "c-parse.y" +#line 770 "c-parse.y" { ; break;} case 109: -#line 776 "c-parse.y" +#line 786 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); ; break;} case 110: -#line 781 "c-parse.y" +#line 791 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); ; break;} case 111: -#line 786 "c-parse.y" +#line 796 "c-parse.y" { shadow_tag_warned (yyvsp[-1].ttype, 1); pedwarn ("empty declaration"); ; break;} case 112: -#line 789 "c-parse.y" +#line 799 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 113: -#line 798 "c-parse.y" +#line 808 "c-parse.y" { ; break;} case 118: -#line 813 "c-parse.y" +#line 823 "c-parse.y" { yyval.itype = suspend_momentary (); pending_xref_error (); declspec_stack = tree_cons (prefix_attributes, @@ -2348,131 +2357,131 @@ case 118: ¤t_declspecs, &prefix_attributes); ; break;} case 119: -#line 824 "c-parse.y" +#line 834 "c-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 120: -#line 829 "c-parse.y" +#line 839 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); ; break;} case 121: -#line 834 "c-parse.y" +#line 844 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); ; break;} case 122: -#line 839 "c-parse.y" +#line 849 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-1].itype); ; break;} case 123: -#line 844 "c-parse.y" +#line 854 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-1].itype); ; break;} case 124: -#line 849 "c-parse.y" +#line 859 "c-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 125: -#line 851 "c-parse.y" +#line 861 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 126: -#line 853 "c-parse.y" +#line 863 "c-parse.y" { pedantic = yyvsp[-1].itype; ; break;} case 127: -#line 863 "c-parse.y" +#line 873 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 128: -#line 865 "c-parse.y" +#line 875 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 129: -#line 869 "c-parse.y" +#line 879 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 130: -#line 871 "c-parse.y" +#line 881 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 131: -#line 873 "c-parse.y" +#line 883 "c-parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 132: -#line 878 "c-parse.y" +#line 888 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 133: -#line 883 "c-parse.y" +#line 893 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 134: -#line 885 "c-parse.y" +#line 895 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 135: -#line 890 "c-parse.y" +#line 900 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 136: -#line 892 "c-parse.y" +#line 902 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 137: -#line 894 "c-parse.y" +#line 904 "c-parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 138: -#line 907 "c-parse.y" +#line 917 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 139: -#line 909 "c-parse.y" +#line 919 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 140: -#line 911 "c-parse.y" +#line 921 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 141: -#line 913 "c-parse.y" +#line 923 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 142: -#line 918 "c-parse.y" +#line 928 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 143: -#line 921 "c-parse.y" +#line 931 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 144: -#line 923 "c-parse.y" +#line 933 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 145: -#line 926 "c-parse.y" +#line 936 "c-parse.y" { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -2480,138 +2489,138 @@ case 145: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 146: -#line 940 "c-parse.y" +#line 950 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 147: -#line 942 "c-parse.y" +#line 952 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 148: -#line 946 "c-parse.y" +#line 956 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 149: -#line 948 "c-parse.y" +#line 958 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 152: -#line 958 "c-parse.y" +#line 968 "c-parse.y" { /* For a typedef name, record the meaning, not the name. In case of `foo foo, bar;'. */ yyval.ttype = lookup_name (yyvsp[0].ttype); ; break;} case 153: -#line 962 "c-parse.y" +#line 972 "c-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} case 154: -#line 964 "c-parse.y" +#line 974 "c-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 162: -#line 986 "c-parse.y" +#line 996 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 163: -#line 988 "c-parse.y" +#line 998 "c-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 164: -#line 995 "c-parse.y" +#line 1005 "c-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, yyvsp[-1].ttype, prefix_attributes); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} case 165: -#line 1000 "c-parse.y" +#line 1010 "c-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 166: -#line 1003 "c-parse.y" +#line 1013 "c-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, yyvsp[0].ttype, prefix_attributes); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} case 167: -#line 1011 "c-parse.y" +#line 1021 "c-parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, yyvsp[-1].ttype, prefix_attributes); start_init (yyval.ttype, yyvsp[-2].ttype, global_bindings_p ()); ; break;} case 168: -#line 1016 "c-parse.y" +#line 1026 "c-parse.y" { finish_init (); decl_attributes (yyvsp[-1].ttype, yyvsp[-3].ttype, prefix_attributes); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 169: -#line 1020 "c-parse.y" +#line 1030 "c-parse.y" { tree d = start_decl (yyvsp[-2].ttype, current_declspecs, 0, yyvsp[0].ttype, prefix_attributes); finish_decl (d, NULL_TREE, yyvsp[-1].ttype); ; break;} case 170: -#line 1028 "c-parse.y" +#line 1038 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 171: -#line 1030 "c-parse.y" +#line 1040 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 172: -#line 1035 "c-parse.y" +#line 1045 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 173: -#line 1037 "c-parse.y" +#line 1047 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 174: -#line 1042 "c-parse.y" +#line 1052 "c-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 175: -#line 1047 "c-parse.y" +#line 1057 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 176: -#line 1049 "c-parse.y" +#line 1059 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 177: -#line 1054 "c-parse.y" +#line 1064 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 178: -#line 1056 "c-parse.y" +#line 1066 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 179: -#line 1058 "c-parse.y" +#line 1068 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 180: -#line 1060 "c-parse.y" +#line 1070 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 181: -#line 1062 "c-parse.y" +#line 1072 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 187: -#line 1080 "c-parse.y" +#line 1090 "c-parse.y" { really_start_incremental_init (NULL_TREE); /* Note that the call to clear_momentary is in process_init_element. */ push_momentary (); ; break;} case 188: -#line 1085 "c-parse.y" +#line 1095 "c-parse.y" { yyval.ttype = pop_init_level (0); if (yyval.ttype == error_mark_node && ! (yychar == STRING || yychar == CONSTANT)) @@ -2620,44 +2629,44 @@ case 188: pop_momentary_nofree (); ; break;} case 189: -#line 1093 "c-parse.y" +#line 1103 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 190: -#line 1099 "c-parse.y" +#line 1109 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids empty initializer braces"); ; break;} case 196: -#line 1115 "c-parse.y" +#line 1125 "c-parse.y" { set_init_label (yyvsp[-1].ttype); ; break;} case 199: -#line 1122 "c-parse.y" +#line 1132 "c-parse.y" { push_init_level (0); ; break;} case 200: -#line 1124 "c-parse.y" +#line 1134 "c-parse.y" { process_init_element (pop_init_level (0)); ; break;} case 201: -#line 1126 "c-parse.y" +#line 1136 "c-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} case 205: -#line 1137 "c-parse.y" +#line 1147 "c-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} case 206: -#line 1142 "c-parse.y" +#line 1152 "c-parse.y" { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 207: -#line 1144 "c-parse.y" +#line 1154 "c-parse.y" { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; break;} case 208: -#line 1149 "c-parse.y" +#line 1159 "c-parse.y" { push_c_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) @@ -2668,16 +2677,16 @@ case 208: reinit_parse_for_function (); ; break;} case 209: -#line 1158 "c-parse.y" +#line 1168 "c-parse.y" { store_parm_decls (); ; break;} case 210: -#line 1166 "c-parse.y" +#line 1176 "c-parse.y" { finish_function (1); pop_c_function_context (); ; break;} case 211: -#line 1172 "c-parse.y" +#line 1182 "c-parse.y" { push_c_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) @@ -2688,211 +2697,211 @@ case 211: reinit_parse_for_function (); ; break;} case 212: -#line 1181 "c-parse.y" +#line 1191 "c-parse.y" { store_parm_decls (); ; break;} case 213: -#line 1189 "c-parse.y" +#line 1199 "c-parse.y" { finish_function (1); pop_c_function_context (); ; break;} case 216: -#line 1205 "c-parse.y" +#line 1215 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 217: -#line 1207 "c-parse.y" +#line 1217 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 218: -#line 1212 "c-parse.y" +#line 1222 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 219: -#line 1214 "c-parse.y" +#line 1224 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 220: -#line 1216 "c-parse.y" +#line 1226 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 221: -#line 1223 "c-parse.y" +#line 1233 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 223: -#line 1234 "c-parse.y" +#line 1244 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 224: -#line 1239 "c-parse.y" +#line 1249 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc9x) error ("`[*]' in parameter declaration only allowed in ISO C 9x"); ; break;} case 225: -#line 1244 "c-parse.y" +#line 1254 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 226: -#line 1246 "c-parse.y" +#line 1256 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 227: -#line 1248 "c-parse.y" +#line 1258 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 228: -#line 1255 "c-parse.y" +#line 1265 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 230: -#line 1264 "c-parse.y" +#line 1274 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 231: -#line 1269 "c-parse.y" +#line 1279 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 232: -#line 1271 "c-parse.y" +#line 1281 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 233: -#line 1273 "c-parse.y" +#line 1283 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc9x) error ("`[*]' in parameter declaration only allowed in ISO C 9x"); ; break;} case 234: -#line 1278 "c-parse.y" +#line 1288 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 235: -#line 1280 "c-parse.y" +#line 1290 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 236: -#line 1287 "c-parse.y" +#line 1297 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 238: -#line 1293 "c-parse.y" +#line 1303 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 239: -#line 1295 "c-parse.y" +#line 1305 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 240: -#line 1300 "c-parse.y" +#line 1310 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 241: -#line 1302 "c-parse.y" +#line 1312 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 242: -#line 1307 "c-parse.y" +#line 1317 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 243: -#line 1309 "c-parse.y" +#line 1319 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 244: -#line 1314 "c-parse.y" +#line 1324 "c-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 245: -#line 1318 "c-parse.y" +#line 1328 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 246: -#line 1320 "c-parse.y" +#line 1330 "c-parse.y" { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 247: -#line 1324 "c-parse.y" +#line 1334 "c-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 248: -#line 1326 "c-parse.y" +#line 1336 "c-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 249: -#line 1328 "c-parse.y" +#line 1338 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 250: -#line 1330 "c-parse.y" +#line 1340 "c-parse.y" { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 251: -#line 1334 "c-parse.y" +#line 1344 "c-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 252: -#line 1336 "c-parse.y" +#line 1346 "c-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 253: -#line 1339 "c-parse.y" +#line 1349 "c-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 254: -#line 1342 "c-parse.y" +#line 1352 "c-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (NULL_TREE); ; break;} case 255: -#line 1345 "c-parse.y" +#line 1355 "c-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 256: -#line 1348 "c-parse.y" +#line 1358 "c-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 260: -#line 1359 "c-parse.y" +#line 1369 "c-parse.y" { if (pedantic && ! flag_isoc9x) pedwarn ("comma at end of enumerator list"); ; break;} case 261: -#line 1365 "c-parse.y" +#line 1375 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 262: -#line 1367 "c-parse.y" +#line 1377 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} case 263: -#line 1372 "c-parse.y" +#line 1382 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 264: -#line 1374 "c-parse.y" +#line 1384 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 265: -#line 1376 "c-parse.y" +#line 1386 "c-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 266: -#line 1391 "c-parse.y" +#line 1401 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -2900,14 +2909,14 @@ case 266: resume_momentary (yyvsp[-1].itype); ; break;} case 267: -#line 1397 "c-parse.y" +#line 1407 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 268: -#line 1402 "c-parse.y" +#line 1412 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -2915,140 +2924,140 @@ case 268: resume_momentary (yyvsp[-1].itype); ; break;} case 269: -#line 1408 "c-parse.y" +#line 1418 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 270: -#line 1413 "c-parse.y" +#line 1423 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 271: -#line 1415 "c-parse.y" +#line 1425 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-1].itype; ; break;} case 273: -#line 1422 "c-parse.y" +#line 1432 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 274: -#line 1427 "c-parse.y" +#line 1437 "c-parse.y" { yyval.ttype = grokfield (yyvsp[-3].filename, yyvsp[-2].lineno, yyvsp[-1].ttype, current_declspecs, NULL_TREE); decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 275: -#line 1431 "c-parse.y" +#line 1441 "c-parse.y" { yyval.ttype = grokfield (yyvsp[-5].filename, yyvsp[-4].lineno, yyvsp[-3].ttype, current_declspecs, yyvsp[-1].ttype); decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 276: -#line 1434 "c-parse.y" +#line 1444 "c-parse.y" { yyval.ttype = grokfield (yyvsp[-4].filename, yyvsp[-3].lineno, NULL_TREE, current_declspecs, yyvsp[-1].ttype); decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 278: -#line 1446 "c-parse.y" +#line 1456 "c-parse.y" { if (yyvsp[-2].ttype == error_mark_node) yyval.ttype = yyvsp[-2].ttype; else yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-2].ttype); ; break;} case 279: -#line 1451 "c-parse.y" +#line 1461 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 280: -#line 1457 "c-parse.y" +#line 1467 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 281: -#line 1459 "c-parse.y" +#line 1469 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 282: -#line 1464 "c-parse.y" +#line 1474 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 283: -#line 1466 "c-parse.y" +#line 1476 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 284: -#line 1471 "c-parse.y" +#line 1481 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 286: -#line 1477 "c-parse.y" +#line 1487 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 287: -#line 1479 "c-parse.y" +#line 1489 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 288: -#line 1484 "c-parse.y" +#line 1494 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 289: -#line 1486 "c-parse.y" +#line 1496 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 290: -#line 1491 "c-parse.y" +#line 1501 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 291: -#line 1494 "c-parse.y" +#line 1504 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 292: -#line 1496 "c-parse.y" +#line 1506 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 293: -#line 1498 "c-parse.y" +#line 1508 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 294: -#line 1500 "c-parse.y" +#line 1510 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 295: -#line 1502 "c-parse.y" +#line 1512 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 296: -#line 1504 "c-parse.y" +#line 1514 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 297: -#line 1506 "c-parse.y" +#line 1516 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 298: -#line 1508 "c-parse.y" +#line 1518 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 299: -#line 1519 "c-parse.y" +#line 1529 "c-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 301: -#line 1528 "c-parse.y" +#line 1538 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 302: -#line 1530 "c-parse.y" +#line 1540 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 306: -#line 1542 "c-parse.y" +#line 1552 "c-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3057,12 +3066,12 @@ case 306: ; break;} case 308: -#line 1555 "c-parse.y" +#line 1565 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 311: -#line 1566 "c-parse.y" +#line 1576 "c-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3073,19 +3082,19 @@ case 311: ; break;} case 312: -#line 1580 "c-parse.y" +#line 1590 "c-parse.y" {; break;} case 314: -#line 1584 "c-parse.y" +#line 1594 "c-parse.y" { compstmt_count++; ; break;} case 315: -#line 1587 "c-parse.y" +#line 1597 "c-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 316: -#line 1589 "c-parse.y" +#line 1599 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); @@ -3095,7 +3104,7 @@ case 316: pop_momentary (); ; break;} case 317: -#line 1597 "c-parse.y" +#line 1607 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); @@ -3105,7 +3114,7 @@ case 317: pop_momentary (); ; break;} case 318: -#line 1605 "c-parse.y" +#line 1615 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); @@ -3115,7 +3124,7 @@ case 318: pop_momentary (); ; break;} case 321: -#line 1625 "c-parse.y" +#line 1635 "c-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3125,7 +3134,7 @@ case 321: position_after_white_space (); ; break;} case 322: -#line 1639 "c-parse.y" +#line 1649 "c-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3135,43 +3144,43 @@ case 322: position_after_white_space (); ; break;} case 323: -#line 1647 "c-parse.y" +#line 1657 "c-parse.y" { expand_loop_continue_here (); ; break;} case 324: -#line 1651 "c-parse.y" +#line 1661 "c-parse.y" { yyval.filename = input_filename; ; break;} case 325: -#line 1655 "c-parse.y" +#line 1665 "c-parse.y" { yyval.lineno = lineno; ; break;} case 326: -#line 1660 "c-parse.y" +#line 1670 "c-parse.y" { ; break;} case 327: -#line 1665 "c-parse.y" +#line 1675 "c-parse.y" { ; break;} case 328: -#line 1670 "c-parse.y" +#line 1680 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 329: -#line 1675 "c-parse.y" +#line 1685 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 330: -#line 1677 "c-parse.y" +#line 1687 "c-parse.y" { yyval.ends_in_label = 1; ; break;} case 331: -#line 1683 "c-parse.y" +#line 1693 "c-parse.y" { stmt_count++; ; break;} case 333: -#line 1686 "c-parse.y" +#line 1696 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); /* It appears that this should not be done--that a non-lvalue array @@ -3190,19 +3199,19 @@ case 333: clear_momentary (); ; break;} case 334: -#line 1703 "c-parse.y" +#line 1713 "c-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 335: -#line 1707 "c-parse.y" +#line 1717 "c-parse.y" { c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) warning ("empty body in an else-statement"); ; break;} case 336: -#line 1711 "c-parse.y" +#line 1721 "c-parse.y" { c_expand_end_cond (); /* This warning is here instead of in simple_if, because we do not want a warning if an empty if is followed by an @@ -3213,11 +3222,11 @@ case 336: "empty body in an if-statement"); ; break;} case 337: -#line 1723 "c-parse.y" +#line 1733 "c-parse.y" { c_expand_end_cond (); ; break;} case 338: -#line 1725 "c-parse.y" +#line 1735 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3229,7 +3238,7 @@ case 338: emit_nop (); ; break;} case 339: -#line 1735 "c-parse.y" +#line 1745 "c-parse.y" { /* Don't start the loop till we have succeeded in parsing the end test. This is to make sure that we end every loop we start. */ @@ -3240,11 +3249,11 @@ case 339: position_after_white_space (); ; break;} case 340: -#line 1744 "c-parse.y" +#line 1754 "c-parse.y" { expand_end_loop (); ; break;} case 341: -#line 1747 "c-parse.y" +#line 1757 "c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); @@ -3252,12 +3261,12 @@ case 341: clear_momentary (); ; break;} case 342: -#line 1754 "c-parse.y" +#line 1764 "c-parse.y" { expand_end_loop (); clear_momentary (); ; break;} case 343: -#line 1758 "c-parse.y" +#line 1768 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3270,12 +3279,12 @@ case 343: ; break;} case 344: -#line 1770 "c-parse.y" +#line 1780 "c-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 345: -#line 1773 "c-parse.y" +#line 1783 "c-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -3293,7 +3302,7 @@ case 345: position_after_white_space (); ; break;} case 346: -#line 1789 "c-parse.y" +#line 1799 "c-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -3306,7 +3315,7 @@ case 346: expand_end_loop (); ; break;} case 347: -#line 1800 "c-parse.y" +#line 1810 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); @@ -3316,7 +3325,7 @@ case 347: position_after_white_space (); ; break;} case 348: -#line 1808 "c-parse.y" +#line 1818 "c-parse.y" { expand_end_case (yyvsp[-3].ttype); if (yychar == CONSTANT || yychar == STRING) pop_momentary_nofree (); @@ -3324,33 +3333,33 @@ case 348: pop_momentary (); ; break;} case 349: -#line 1814 "c-parse.y" +#line 1824 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if ( ! expand_exit_something ()) error ("break statement not within loop or switch"); ; break;} case 350: -#line 1819 "c-parse.y" +#line 1829 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); if (! expand_continue_loop (NULL_PTR)) error ("continue statement not within a loop"); ; break;} case 351: -#line 1824 "c-parse.y" +#line 1834 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 352: -#line 1828 "c-parse.y" +#line 1838 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 353: -#line 1832 "c-parse.y" +#line 1842 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -3362,7 +3371,7 @@ case 353: error ("argument of `asm' is not a constant string"); ; break;} case 354: -#line 1843 "c-parse.y" +#line 1853 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-9].filename, yyvsp[-8].lineno); c_expand_asm_operands (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, @@ -3370,7 +3379,7 @@ case 354: input_filename, lineno); ; break;} case 355: -#line 1850 "c-parse.y" +#line 1860 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-11].filename, yyvsp[-10].lineno); c_expand_asm_operands (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, @@ -3378,7 +3387,7 @@ case 355: input_filename, lineno); ; break;} case 356: -#line 1858 "c-parse.y" +#line 1868 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-13].filename, yyvsp[-12].lineno); c_expand_asm_operands (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, @@ -3386,7 +3395,7 @@ case 356: input_filename, lineno); ; break;} case 357: -#line 1864 "c-parse.y" +#line 1874 "c-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -3399,7 +3408,7 @@ case 357: ; break;} case 358: -#line 1875 "c-parse.y" +#line 1885 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -3407,7 +3416,7 @@ case 358: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 361: -#line 1890 "c-parse.y" +#line 1900 "c-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -3430,14 +3439,14 @@ case 361: ; break;} case 362: -#line 1911 "c-parse.y" +#line 1921 "c-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 363: -#line 1946 "c-parse.y" +#line 1956 "c-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -3470,7 +3479,7 @@ case 363: position_after_white_space (); ; break;} case 364: -#line 1977 "c-parse.y" +#line 1987 "c-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -3503,7 +3512,7 @@ case 364: position_after_white_space (); ; break;} case 365: -#line 2008 "c-parse.y" +#line 2018 "c-parse.y" { tree duplicate; register tree label @@ -3520,7 +3529,7 @@ case 365: position_after_white_space (); ; break;} case 366: -#line 2023 "c-parse.y" +#line 2033 "c-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -3532,52 +3541,52 @@ case 366: position_after_white_space (); ; break;} case 367: -#line 2038 "c-parse.y" +#line 2048 "c-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 368: -#line 2041 "c-parse.y" +#line 2051 "c-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 369: -#line 2046 "c-parse.y" +#line 2056 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 371: -#line 2053 "c-parse.y" +#line 2063 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 374: -#line 2060 "c-parse.y" +#line 2070 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 375: -#line 2065 "c-parse.y" +#line 2075 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 376: -#line 2070 "c-parse.y" +#line 2080 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 377: -#line 2072 "c-parse.y" +#line 2082 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 378: -#line 2078 "c-parse.y" +#line 2088 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 379: -#line 2082 "c-parse.y" +#line 2092 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 381: -#line 2090 "c-parse.y" +#line 2100 "c-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -3587,19 +3596,19 @@ case 381: clear_parm_order (); ; break;} case 382: -#line 2098 "c-parse.y" +#line 2108 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 383: -#line 2100 "c-parse.y" +#line 2110 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 384: -#line 2106 "c-parse.y" +#line 2116 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 385: -#line 2108 "c-parse.y" +#line 2118 "c-parse.y" { yyval.ttype = get_parm_info (0); /* Gcc used to allow this as an extension. However, it does not work for all targets, and thus has been disabled. @@ -3611,23 +3620,23 @@ case 385: ; break;} case 386: -#line 2118 "c-parse.y" +#line 2128 "c-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 387: -#line 2120 "c-parse.y" +#line 2130 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 388: -#line 2125 "c-parse.y" +#line 2135 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 389: -#line 2127 "c-parse.y" +#line 2137 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 390: -#line 2134 "c-parse.y" +#line 2144 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3638,7 +3647,7 @@ case 390: resume_momentary (yyvsp[-2].itype); ; break;} case 391: -#line 2143 "c-parse.y" +#line 2153 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3649,7 +3658,7 @@ case 391: resume_momentary (yyvsp[-2].itype); ; break;} case 392: -#line 2152 "c-parse.y" +#line 2162 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3660,18 +3669,18 @@ case 392: resume_momentary (yyvsp[-2].itype); ; break;} case 393: -#line 2161 "c-parse.y" -{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, - yyvsp[-1].ttype), - build_tree_list (prefix_attributes, - yyvsp[0].ttype)); - current_declspecs = TREE_VALUE (declspec_stack); - prefix_attributes = TREE_PURPOSE (declspec_stack); - declspec_stack = TREE_CHAIN (declspec_stack); - resume_momentary (yyvsp[-2].itype); ; - break;} -case 394: #line 2171 "c-parse.y" +{ yyval.ttype = build_tree_list (build_tree_list (current_declspecs, + yyvsp[-1].ttype), + build_tree_list (prefix_attributes, + yyvsp[0].ttype)); + current_declspecs = TREE_VALUE (declspec_stack); + prefix_attributes = TREE_PURPOSE (declspec_stack); + declspec_stack = TREE_CHAIN (declspec_stack); + resume_momentary (yyvsp[-2].itype); ; + break;} +case 394: +#line 2181 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3682,19 +3691,19 @@ case 394: resume_momentary (yyvsp[-2].itype); ; break;} case 395: -#line 2185 "c-parse.y" +#line 2195 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 396: -#line 2189 "c-parse.y" +#line 2199 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 398: -#line 2197 "c-parse.y" +#line 2207 "c-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -3702,29 +3711,29 @@ case 398: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 399: -#line 2207 "c-parse.y" +#line 2217 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 400: -#line 2209 "c-parse.y" +#line 2219 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 401: -#line 2215 "c-parse.y" +#line 2225 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 402: -#line 2217 "c-parse.y" +#line 2227 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 403: -#line 2222 "c-parse.y" +#line 2232 "c-parse.y" { yyval.itype = pedantic; pedantic = 0; ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 498 "/usr/cygnus/gnupro-98r2/share/bison.simple" +#line 498 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -3920,5 +3929,5 @@ yyerrhandle: yystate = yyn; goto yynewstate; } -#line 2226 "c-parse.y" +#line 2236 "c-parse.y" diff --git a/gcc/c-parse.in b/gcc/c-parse.in index 9aac25694a4..c8ff12de753 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -604,12 +604,22 @@ expr_no_commas: { skip_evaluation -= $1 == boolean_true_node; $$ = build_conditional_expr ($1, $2, $5); } | expr_no_commas '=' expr_no_commas - { $$ = build_modify_expr ($1, NOP_EXPR, $3); - C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); } + { char class; + $$ = build_modify_expr ($1, NOP_EXPR, $3); + class = TREE_CODE_CLASS (TREE_CODE ($$)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); + } | expr_no_commas ASSIGN expr_no_commas - { $$ = build_modify_expr ($1, $2, $3); + { char class; + $$ = build_modify_expr ($1, $2, $3); /* This inhibits warnings in truthvalue_conversion. */ - C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } + class = TREE_CODE_CLASS (TREE_CODE ($$)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); + } ; primary: diff --git a/gcc/c-parse.y b/gcc/c-parse.y index ca310ae60a1..59c2be93bad 100644 --- a/gcc/c-parse.y +++ b/gcc/c-parse.y @@ -559,12 +559,22 @@ expr_no_commas: { skip_evaluation -= $1 == boolean_true_node; $$ = build_conditional_expr ($1, $2, $5); } | expr_no_commas '=' expr_no_commas - { $$ = build_modify_expr ($1, NOP_EXPR, $3); - C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); } + { char class; + $$ = build_modify_expr ($1, NOP_EXPR, $3); + class = TREE_CODE_CLASS (TREE_CODE ($$)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE ($$, MODIFY_EXPR); + } | expr_no_commas ASSIGN expr_no_commas - { $$ = build_modify_expr ($1, $2, $3); + { char class; + $$ = build_modify_expr ($1, $2, $3); /* This inhibits warnings in truthvalue_conversion. */ - C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); } + class = TREE_CODE_CLASS (TREE_CODE ($$)); + if (class == 'e' || class == '1' + || class == '2' || class == '<') + C_SET_EXP_ORIGINAL_CODE ($$, ERROR_MARK); + } ; primary: