From 71653180cfbab88d037392402436b4ab0356151e Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Mon, 5 Jun 2000 13:16:14 +0000 Subject: [PATCH] tree.h (VOID_TYPE_P): New macro. * tree.h (VOID_TYPE_P): New macro. (COMPLETE_OR_VOID_TYPE_P): Use VOID_TYPE_P. * c-decl.c (grokdeclarator): Use VOID_TYPE_P. (get_parm_info): Likewise. (store_parm_decls): Likewise. (combine_parm_decls): Likewise. (finish_function): Likewise. * c-typeck.c (build_function_call): Likewise. (build_binary_op): Likewise. (build_conditional_expr): Likewise. (internal_build_compound_expr): Likewise. (convert_for_assignment): Likewise. * stmt.c (expend_expr_stmt): Likewise. (warn_if_unused_value): Likewise. (expand_return): Likewise. * c-parse.in (primary): Likewise. * c-parse.y, c-parse.c, c-parse.h: Regenerate. * objc/objc-parse.y, objc/objc-parse.c: Regenerate. From-SVN: r34402 --- gcc/ChangeLog | 21 ++ gcc/c-decl.c | 21 +- gcc/c-parse.c | 587 +++++++++++++++-------------- gcc/c-parse.in | 3 +- gcc/c-parse.y | 3 +- gcc/c-typeck.c | 26 +- gcc/objc/objc-parse.c | 845 +++++++++++++++++++++--------------------- gcc/objc/objc-parse.y | 3 +- gcc/stmt.c | 8 +- gcc/tree.h | 5 +- 10 files changed, 768 insertions(+), 754 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ed4b5fc421a..23391b3bf89 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,24 @@ +2000-06-05 Nathan Sidwell + + * tree.h (VOID_TYPE_P): New macro. + (COMPLETE_OR_VOID_TYPE_P): Use VOID_TYPE_P. + * c-decl.c (grokdeclarator): Use VOID_TYPE_P. + (get_parm_info): Likewise. + (store_parm_decls): Likewise. + (combine_parm_decls): Likewise. + (finish_function): Likewise. + * c-typeck.c (build_function_call): Likewise. + (build_binary_op): Likewise. + (build_conditional_expr): Likewise. + (internal_build_compound_expr): Likewise. + (convert_for_assignment): Likewise. + * stmt.c (expend_expr_stmt): Likewise. + (warn_if_unused_value): Likewise. + (expand_return): Likewise. + * c-parse.in (primary): Likewise. + * c-parse.y, c-parse.c, c-parse.h: Regenerate. + * objc/objc-parse.y, objc/objc-parse.c: Regenerate. + Mon Jun 5 06:46:28 2000 Richard Kenner * alias.c (get_alias_set): If compnent is addressable, use alias diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 75e50b5d7de..3c57f66983e 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -4290,7 +4290,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) /* Check for some types that there cannot be arrays of. */ - if (TYPE_MAIN_VARIANT (type) == void_type_node) + if (VOID_TYPE_P (type)) { error ("declaration of `%s' as array of voids", name); type = error_mark_node; @@ -4598,7 +4598,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) We don't complain about parms either, but that is because a better error message can be made later. */ - if (TYPE_MAIN_VARIANT (type) == void_type_node && decl_context != PARM + if (VOID_TYPE_P (type) && decl_context != PARM && ! ((decl_context != FIELD && TREE_CODE (type) != FUNCTION_TYPE) && ((specbits & (1 << (int) RID_EXTERN)) || (current_binding_level == global_binding_level @@ -4725,7 +4725,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) pedwarn ("ANSI C forbids qualified function types"); if (pedantic - && TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (decl))) == void_type_node + && VOID_TYPE_P (TREE_TYPE (TREE_TYPE (decl))) && TYPE_QUALS (TREE_TYPE (TREE_TYPE (decl))) && ! DECL_IN_SYSTEM_HEADER (decl)) pedwarn ("ANSI C forbids qualified void function return type"); @@ -4733,7 +4733,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) /* GNU C interprets a `volatile void' return type to indicate that the function does not return. */ if ((type_quals & TYPE_QUAL_VOLATILE) - && TREE_TYPE (TREE_TYPE (decl)) != void_type_node) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (decl)))) warning ("`noreturn' function returns non-void value"); if (extern_ref) @@ -4948,7 +4948,7 @@ get_parm_info (void_at_end) /* Just `void' (and no ellipsis) is special. There are really no parms. */ if (void_at_end && parms != 0 && TREE_CHAIN (parms) == 0 - && TYPE_MAIN_VARIANT (TREE_TYPE (parms)) == void_type_node + && VOID_TYPE_P (TREE_TYPE (parms)) && DECL_NAME (parms) == 0) { parms = NULL_TREE; @@ -5009,7 +5009,7 @@ get_parm_info (void_at_end) DECL_ARG_TYPE (decl) = integer_type_node; types = tree_cons (NULL_TREE, TREE_TYPE (decl), types); - if (TYPE_MAIN_VARIANT (TREE_VALUE (types)) == void_type_node && ! erred + if (VOID_TYPE_P (TREE_VALUE (types)) && ! erred && DECL_NAME (decl) == 0) { error ("`void' in parameter list must be the entire list"); @@ -5993,8 +5993,7 @@ store_parm_decls () if (DECL_NAME (parm) == 0) error_with_decl (parm, "parameter name omitted"); else if (TREE_CODE (TREE_TYPE (parm)) != ERROR_MARK - && (TYPE_MAIN_VARIANT (TREE_TYPE (parm)) - == void_type_node)) + && VOID_TYPE_P (TREE_TYPE (parm))) { error_with_decl (parm, "parameter `%s' declared void"); /* Change the type to error_mark_node so this parameter @@ -6097,7 +6096,7 @@ store_parm_decls () } /* If the declaration says "void", complain and ignore it. */ - if (found && TYPE_MAIN_VARIANT (TREE_TYPE (found)) == void_type_node) + if (found && VOID_TYPE_P (TREE_TYPE (found))) { error_with_decl (found, "parameter `%s' declared void"); TREE_TYPE (found) = integer_type_node; @@ -6395,7 +6394,7 @@ combine_parm_decls (specparms, parmlist, void_at_end) } /* If the declaration says "void", complain and ignore it. */ - if (found && TYPE_MAIN_VARIANT (TREE_TYPE (found)) == void_type_node) + if (found && VOID_TYPE_P (TREE_TYPE (found))) { error_with_decl (found, "parameter `%s' declared void"); TREE_TYPE (found) = integer_type_node; @@ -6567,7 +6566,7 @@ finish_function (nested) if (TREE_THIS_VOLATILE (fndecl) && current_function_returns_null) warning ("`noreturn' function does return"); else if (warn_return_type && can_reach_end - && TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (fndecl))) != void_type_node) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl)))) /* If this function returns non-void and control can drop through, complain. */ warning ("control reaches end of non-void function"); diff --git a/gcc/c-parse.c b/gcc/c-parse.c index aff33d8e468..cd51c2429da 100644 --- a/gcc/c-parse.c +++ b/gcc/c-parse.c @@ -391,39 +391,39 @@ static const short yyrline[] = { 0, 439, 442, 445, 448, 450, 452, 456, 460, 464, 466, 469, 473, 500, 502, 504, 506, 508, 510, 512, 514, 516, 518, 520, 522, 524, 526, 530, 532, 536, 538, - 541, 545, 547, 554, 557, 565, 576, 675, 676, 678, - 684, 686, 709, 718, 720, 722, 726, 732, 734, 739, - 741, 749, 751, 752, 762, 767, 769, 770, 771, 778, - 783, 787, 790, 798, 803, 805, 806, 807, 814, 824, - 828, 833, 837, 841, 845, 847, 849, 858, 861, 865, - 867, 869, 874, 878, 881, 885, 888, 890, 902, 905, - 907, 909, 913, 917, 919, 922, 935, 938, 942, 944, - 952, 953, 954, 958, 960, 966, 967, 968, 971, 973, - 976, 978, 981, 984, 990, 997, 999, 1006, 1013, 1016, - 1023, 1026, 1030, 1033, 1037, 1042, 1045, 1049, 1052, 1054, - 1056, 1058, 1065, 1067, 1068, 1069, 1074, 1076, 1078, 1080, - 1085, 1089, 1092, 1094, 1099, 1101, 1102, 1105, 1105, 1108, - 1111, 1113, 1115, 1118, 1120, 1123, 1129, 1131, 1135, 1149, - 1157, 1161, 1175, 1183, 1190, 1192, 1197, 1200, 1205, 1207, - 1209, 1216, 1218, 1226, 1232, 1237, 1239, 1241, 1248, 1250, - 1256, 1262, 1264, 1266, 1271, 1273, 1280, 1282, 1285, 1288, - 1292, 1295, 1299, 1302, 1306, 1311, 1313, 1317, 1319, 1321, - 1323, 1327, 1329, 1331, 1334, 1336, 1339, 1343, 1345, 1348, - 1350, 1355, 1358, 1363, 1365, 1367, 1381, 1387, 1400, 1405, - 1410, 1412, 1417, 1419, 1423, 1427, 1431, 1441, 1443, 1448, - 1453, 1456, 1460, 1463, 1467, 1470, 1473, 1476, 1480, 1483, - 1487, 1491, 1493, 1495, 1497, 1499, 1501, 1503, 1505, 1509, - 1517, 1525, 1527, 1529, 1533, 1535, 1538, 1541, 1551, 1553, - 1558, 1560, 1563, 1577, 1580, 1583, 1585, 1587, 1591, 1595, - 1601, 1619, 1624, 1629, 1632, 1646, 1655, 1659, 1663, 1667, - 1673, 1677, 1682, 1685, 1690, 1693, 1694, 1710, 1715, 1718, - 1730, 1732, 1742, 1752, 1753, 1760, 1762, 1774, 1778, 1792, - 1798, 1804, 1805, 1810, 1815, 1819, 1823, 1834, 1841, 1848, - 1855, 1866, 1872, 1875, 1880, 1903, 1933, 1964, 1995, 2010, - 2024, 2028, 2032, 2035, 2040, 2042, 2045, 2047, 2051, 2056, - 2059, 2065, 2070, 2075, 2077, 2086, 2087, 2093, 2095, 2105, - 2107, 2111, 2114, 2120, 2129, 2137, 2145, 2154, 2167, 2172, - 2177, 2179, 2188, 2191, 2196, 2199, 2203 + 541, 545, 547, 554, 557, 565, 576, 674, 675, 677, + 683, 685, 708, 717, 719, 721, 725, 731, 733, 738, + 740, 748, 750, 751, 761, 766, 768, 769, 770, 777, + 782, 786, 789, 797, 802, 804, 805, 806, 813, 823, + 827, 832, 836, 840, 844, 846, 848, 857, 860, 864, + 866, 868, 873, 877, 880, 884, 887, 889, 901, 904, + 906, 908, 912, 916, 918, 921, 934, 937, 941, 943, + 951, 952, 953, 957, 959, 965, 966, 967, 970, 972, + 975, 977, 980, 983, 989, 996, 998, 1005, 1012, 1015, + 1022, 1025, 1029, 1032, 1036, 1041, 1044, 1048, 1051, 1053, + 1055, 1057, 1064, 1066, 1067, 1068, 1073, 1075, 1077, 1079, + 1084, 1088, 1091, 1093, 1098, 1100, 1101, 1104, 1104, 1107, + 1110, 1112, 1114, 1117, 1119, 1122, 1128, 1130, 1134, 1148, + 1156, 1160, 1174, 1182, 1189, 1191, 1196, 1199, 1204, 1206, + 1208, 1215, 1217, 1225, 1231, 1236, 1238, 1240, 1247, 1249, + 1255, 1261, 1263, 1265, 1270, 1272, 1279, 1281, 1284, 1287, + 1291, 1294, 1298, 1301, 1305, 1310, 1312, 1316, 1318, 1320, + 1322, 1326, 1328, 1330, 1333, 1335, 1338, 1342, 1344, 1347, + 1349, 1354, 1357, 1362, 1364, 1366, 1380, 1386, 1399, 1404, + 1409, 1411, 1416, 1418, 1422, 1426, 1430, 1440, 1442, 1447, + 1452, 1455, 1459, 1462, 1466, 1469, 1472, 1475, 1479, 1482, + 1486, 1490, 1492, 1494, 1496, 1498, 1500, 1502, 1504, 1508, + 1516, 1524, 1526, 1528, 1532, 1534, 1537, 1540, 1550, 1552, + 1557, 1559, 1562, 1576, 1579, 1582, 1584, 1586, 1590, 1594, + 1600, 1618, 1623, 1628, 1631, 1645, 1654, 1658, 1662, 1666, + 1672, 1676, 1681, 1684, 1689, 1692, 1693, 1709, 1714, 1717, + 1729, 1731, 1741, 1751, 1752, 1759, 1761, 1773, 1777, 1791, + 1797, 1803, 1804, 1809, 1814, 1818, 1822, 1833, 1840, 1847, + 1854, 1865, 1871, 1874, 1879, 1902, 1932, 1963, 1994, 2009, + 2023, 2027, 2031, 2034, 2039, 2041, 2044, 2046, 2050, 2055, + 2058, 2064, 2069, 2074, 2076, 2085, 2086, 2092, 2094, 2104, + 2106, 2110, 2113, 2119, 2128, 2136, 2144, 2153, 2166, 2171, + 2176, 2178, 2187, 2190, 2195, 2198, 2202 }; #endif @@ -1274,7 +1274,7 @@ static const short yycheck[] = { 38, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/misc/bison.simple" +#line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -1488,7 +1488,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/misc/bison.simple" +#line 217 "/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 *. @@ -2301,8 +2301,7 @@ case 87: IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (yyval.ttype))) != TYPE_MODE (integer_type_node)) - && (TREE_TYPE (TREE_TYPE (yyval.ttype)) - != void_type_node)) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (yyval.ttype)))) pedwarn ("type mismatch in implicit declaration for built-in function `%s'", IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); /* If it really returns void, change that to int. */ @@ -2336,11 +2335,11 @@ case 87: ; break;} case 89: -#line 677 "c-parse.y" +#line 676 "c-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 90: -#line 679 "c-parse.y" +#line 678 "c-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (class == 'e' || class == '1' || class == '2' || class == '<') @@ -2348,11 +2347,11 @@ case 90: yyval.ttype = yyvsp[-1].ttype; ; break;} case 91: -#line 685 "c-parse.y" +#line 684 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 92: -#line 687 "c-parse.y" +#line 686 "c-parse.y" { tree rtl_exp; if (pedantic) pedwarn ("ANSI C forbids braced-groups within expressions"); @@ -2377,7 +2376,7 @@ case 92: ; break;} case 93: -#line 710 "c-parse.y" +#line 709 "c-parse.y" { /* Make sure we call expand_end_stmt_expr. Otherwise we are likely to lose sequences and crash later. */ @@ -2388,21 +2387,21 @@ case 93: ; break;} case 94: -#line 719 "c-parse.y" +#line 718 "c-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 95: -#line 721 "c-parse.y" +#line 720 "c-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 96: -#line 723 "c-parse.y" +#line 722 "c-parse.y" { yyval.ttype = build_component_ref (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 97: -#line 727 "c-parse.y" +#line 726 "c-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); @@ -2410,57 +2409,57 @@ case 97: ; break;} case 98: -#line 733 "c-parse.y" +#line 732 "c-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 99: -#line 735 "c-parse.y" +#line 734 "c-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 101: -#line 742 "c-parse.y" +#line 741 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); if (warn_traditional && !in_system_header) warning ("Use of ANSI string concatenation"); ; break;} case 104: -#line 754 "c-parse.y" +#line 753 "c-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ANSI C does not permit use of `varargs.h'"); ; break;} case 105: -#line 764 "c-parse.y" +#line 763 "c-parse.y" { ; break;} case 110: -#line 780 "c-parse.y" +#line 779 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 111: -#line 784 "c-parse.y" +#line 783 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 112: -#line 788 "c-parse.y" +#line 787 "c-parse.y" { shadow_tag_warned (yyvsp[-1].ttype, 1); pedwarn ("empty declaration"); ; break;} case 113: -#line 791 "c-parse.y" +#line 790 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 114: -#line 800 "c-parse.y" +#line 799 "c-parse.y" { ; break;} case 119: -#line 815 "c-parse.y" +#line 814 "c-parse.y" { pending_xref_error (); declspec_stack = tree_cons (prefix_attributes, current_declspecs, @@ -2469,127 +2468,127 @@ case 119: ¤t_declspecs, &prefix_attributes); ; break;} case 120: -#line 825 "c-parse.y" +#line 824 "c-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 121: -#line 830 "c-parse.y" +#line 829 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 122: -#line 834 "c-parse.y" +#line 833 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 123: -#line 838 "c-parse.y" +#line 837 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 124: -#line 842 "c-parse.y" +#line 841 "c-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 125: -#line 846 "c-parse.y" +#line 845 "c-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 126: -#line 848 "c-parse.y" +#line 847 "c-parse.y" { pedwarn ("empty declaration"); ; break;} case 127: -#line 850 "c-parse.y" +#line 849 "c-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 128: -#line 860 "c-parse.y" +#line 859 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 129: -#line 862 "c-parse.y" +#line 861 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 130: -#line 866 "c-parse.y" +#line 865 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 131: -#line 868 "c-parse.y" +#line 867 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 132: -#line 870 "c-parse.y" +#line 869 "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 133: -#line 875 "c-parse.y" +#line 874 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 134: -#line 880 "c-parse.y" +#line 879 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 135: -#line 882 "c-parse.y" +#line 881 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 136: -#line 887 "c-parse.y" +#line 886 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 137: -#line 889 "c-parse.y" +#line 888 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 138: -#line 891 "c-parse.y" +#line 890 "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 139: -#line 904 "c-parse.y" +#line 903 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 140: -#line 906 "c-parse.y" +#line 905 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 141: -#line 908 "c-parse.y" +#line 907 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 142: -#line 910 "c-parse.y" +#line 909 "c-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 143: -#line 915 "c-parse.y" +#line 914 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 144: -#line 918 "c-parse.y" +#line 917 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 145: -#line 920 "c-parse.y" +#line 919 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 146: -#line 923 "c-parse.y" +#line 922 "c-parse.y" { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -2597,176 +2596,176 @@ case 146: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 147: -#line 937 "c-parse.y" +#line 936 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 148: -#line 939 "c-parse.y" +#line 938 "c-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 149: -#line 943 "c-parse.y" +#line 942 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 150: -#line 945 "c-parse.y" +#line 944 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 153: -#line 955 "c-parse.y" +#line 954 "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 154: -#line 959 "c-parse.y" +#line 958 "c-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} case 155: -#line 961 "c-parse.y" +#line 960 "c-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 163: -#line 983 "c-parse.y" +#line 982 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 164: -#line 985 "c-parse.y" +#line 984 "c-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 165: -#line 992 "c-parse.y" +#line 991 "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 166: -#line 997 "c-parse.y" +#line 996 "c-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 167: -#line 1000 "c-parse.y" +#line 999 "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 168: -#line 1008 "c-parse.y" +#line 1007 "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 169: -#line 1013 "c-parse.y" +#line 1012 "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 170: -#line 1017 "c-parse.y" +#line 1016 "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 171: -#line 1025 "c-parse.y" +#line 1024 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 172: -#line 1027 "c-parse.y" +#line 1026 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 173: -#line 1032 "c-parse.y" +#line 1031 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 174: -#line 1034 "c-parse.y" +#line 1033 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 175: -#line 1039 "c-parse.y" +#line 1038 "c-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 176: -#line 1044 "c-parse.y" +#line 1043 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 177: -#line 1046 "c-parse.y" +#line 1045 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 178: -#line 1051 "c-parse.y" +#line 1050 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 179: -#line 1053 "c-parse.y" +#line 1052 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 180: -#line 1055 "c-parse.y" +#line 1054 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 181: -#line 1057 "c-parse.y" +#line 1056 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 182: -#line 1059 "c-parse.y" +#line 1058 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 188: -#line 1077 "c-parse.y" +#line 1076 "c-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} case 189: -#line 1079 "c-parse.y" +#line 1078 "c-parse.y" { yyval.ttype = pop_init_level (0); ; break;} case 190: -#line 1081 "c-parse.y" +#line 1080 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 191: -#line 1087 "c-parse.y" +#line 1086 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids empty initializer braces"); ; break;} case 197: -#line 1103 "c-parse.y" +#line 1102 "c-parse.y" { set_init_label (yyvsp[-1].ttype); ; break;} case 200: -#line 1110 "c-parse.y" +#line 1109 "c-parse.y" { push_init_level (0); ; break;} case 201: -#line 1112 "c-parse.y" +#line 1111 "c-parse.y" { process_init_element (pop_init_level (0)); ; break;} case 202: -#line 1114 "c-parse.y" +#line 1113 "c-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} case 206: -#line 1125 "c-parse.y" +#line 1124 "c-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} case 207: -#line 1130 "c-parse.y" +#line 1129 "c-parse.y" { set_init_index (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 208: -#line 1132 "c-parse.y" +#line 1131 "c-parse.y" { set_init_index (yyvsp[-1].ttype, NULL_TREE); ; break;} case 209: -#line 1137 "c-parse.y" +#line 1136 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -2780,16 +2779,16 @@ case 209: reinit_parse_for_function (); ; break;} case 210: -#line 1149 "c-parse.y" +#line 1148 "c-parse.y" { store_parm_decls (); ; break;} case 211: -#line 1157 "c-parse.y" +#line 1156 "c-parse.y" { finish_function (1); pop_function_context (); ; break;} case 212: -#line 1163 "c-parse.y" +#line 1162 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -2803,216 +2802,216 @@ case 212: reinit_parse_for_function (); ; break;} case 213: -#line 1175 "c-parse.y" +#line 1174 "c-parse.y" { store_parm_decls (); ; break;} case 214: -#line 1183 "c-parse.y" +#line 1182 "c-parse.y" { finish_function (1); pop_function_context (); ; break;} case 217: -#line 1199 "c-parse.y" +#line 1198 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 218: -#line 1201 "c-parse.y" +#line 1200 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 219: -#line 1206 "c-parse.y" +#line 1205 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 220: -#line 1208 "c-parse.y" +#line 1207 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 221: -#line 1210 "c-parse.y" +#line 1209 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 222: -#line 1217 "c-parse.y" +#line 1216 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 224: -#line 1228 "c-parse.y" +#line 1227 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 225: -#line 1233 "c-parse.y" +#line 1232 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc99) error ("`[*]' in parameter declaration only allowed in ISO C 99"); ; break;} case 226: -#line 1238 "c-parse.y" +#line 1237 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 227: -#line 1240 "c-parse.y" +#line 1239 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 228: -#line 1242 "c-parse.y" +#line 1241 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 229: -#line 1249 "c-parse.y" +#line 1248 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 231: -#line 1258 "c-parse.y" +#line 1257 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 232: -#line 1263 "c-parse.y" +#line 1262 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 233: -#line 1265 "c-parse.y" +#line 1264 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 234: -#line 1267 "c-parse.y" +#line 1266 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc99) error ("`[*]' in parameter declaration only allowed in ISO C 99"); ; break;} case 235: -#line 1272 "c-parse.y" +#line 1271 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 236: -#line 1274 "c-parse.y" +#line 1273 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 237: -#line 1281 "c-parse.y" +#line 1280 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 239: -#line 1287 "c-parse.y" +#line 1286 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 240: -#line 1289 "c-parse.y" +#line 1288 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 241: -#line 1294 "c-parse.y" +#line 1293 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 242: -#line 1296 "c-parse.y" +#line 1295 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 243: -#line 1301 "c-parse.y" +#line 1300 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 244: -#line 1303 "c-parse.y" +#line 1302 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 245: -#line 1308 "c-parse.y" +#line 1307 "c-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 246: -#line 1312 "c-parse.y" +#line 1311 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 247: -#line 1314 "c-parse.y" +#line 1313 "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 248: -#line 1318 "c-parse.y" +#line 1317 "c-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 249: -#line 1320 "c-parse.y" +#line 1319 "c-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 250: -#line 1322 "c-parse.y" +#line 1321 "c-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 251: -#line 1324 "c-parse.y" +#line 1323 "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 252: -#line 1328 "c-parse.y" +#line 1327 "c-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 253: -#line 1330 "c-parse.y" +#line 1329 "c-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 254: -#line 1332 "c-parse.y" +#line 1331 "c-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} case 255: -#line 1335 "c-parse.y" +#line 1334 "c-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} case 256: -#line 1337 "c-parse.y" +#line 1336 "c-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 257: -#line 1340 "c-parse.y" +#line 1339 "c-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 261: -#line 1351 "c-parse.y" +#line 1350 "c-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} case 262: -#line 1357 "c-parse.y" +#line 1356 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 263: -#line 1359 "c-parse.y" +#line 1358 "c-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} case 264: -#line 1364 "c-parse.y" +#line 1363 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 265: -#line 1366 "c-parse.y" +#line 1365 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 266: -#line 1368 "c-parse.y" +#line 1367 "c-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 267: -#line 1383 "c-parse.y" +#line 1382 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 268: -#line 1388 "c-parse.y" +#line 1387 "c-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports @@ -3027,151 +3026,151 @@ case 268: ; break;} case 269: -#line 1401 "c-parse.y" +#line 1400 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 270: -#line 1406 "c-parse.y" +#line 1405 "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 271: -#line 1411 "c-parse.y" +#line 1410 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 272: -#line 1413 "c-parse.y" +#line 1412 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 274: -#line 1420 "c-parse.y" +#line 1419 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 275: -#line 1425 "c-parse.y" +#line 1424 "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 276: -#line 1429 "c-parse.y" +#line 1428 "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 277: -#line 1432 "c-parse.y" +#line 1431 "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 279: -#line 1444 "c-parse.y" +#line 1443 "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 280: -#line 1449 "c-parse.y" +#line 1448 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 281: -#line 1455 "c-parse.y" +#line 1454 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 282: -#line 1457 "c-parse.y" +#line 1456 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 283: -#line 1462 "c-parse.y" +#line 1461 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 284: -#line 1464 "c-parse.y" +#line 1463 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 285: -#line 1469 "c-parse.y" +#line 1468 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 287: -#line 1475 "c-parse.y" +#line 1474 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 288: -#line 1477 "c-parse.y" +#line 1476 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 289: -#line 1482 "c-parse.y" +#line 1481 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 290: -#line 1484 "c-parse.y" +#line 1483 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 291: -#line 1489 "c-parse.y" +#line 1488 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 292: -#line 1492 "c-parse.y" +#line 1491 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 293: -#line 1494 "c-parse.y" +#line 1493 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 294: -#line 1496 "c-parse.y" +#line 1495 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 295: -#line 1498 "c-parse.y" +#line 1497 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 296: -#line 1500 "c-parse.y" +#line 1499 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 297: -#line 1502 "c-parse.y" +#line 1501 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 298: -#line 1504 "c-parse.y" +#line 1503 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 299: -#line 1506 "c-parse.y" +#line 1505 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 300: -#line 1510 "c-parse.y" +#line 1509 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 301: -#line 1519 "c-parse.y" +#line 1518 "c-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 303: -#line 1528 "c-parse.y" +#line 1527 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 304: -#line 1530 "c-parse.y" +#line 1529 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 308: -#line 1542 "c-parse.y" +#line 1541 "c-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3179,12 +3178,12 @@ case 308: ; break;} case 310: -#line 1554 "c-parse.y" +#line 1553 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 313: -#line 1565 "c-parse.y" +#line 1564 "c-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3195,37 +3194,37 @@ case 313: ; break;} case 314: -#line 1579 "c-parse.y" +#line 1578 "c-parse.y" {; break;} case 316: -#line 1583 "c-parse.y" +#line 1582 "c-parse.y" { compstmt_count++; ; break;} case 317: -#line 1586 "c-parse.y" +#line 1585 "c-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 318: -#line 1588 "c-parse.y" +#line 1587 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); ; break;} case 319: -#line 1592 "c-parse.y" +#line 1591 "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); ; break;} case 320: -#line 1596 "c-parse.y" +#line 1595 "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); ; break;} case 321: -#line 1603 "c-parse.y" +#line 1602 "c-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3243,11 +3242,11 @@ case 321: ; break;} case 322: -#line 1620 "c-parse.y" +#line 1619 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 325: -#line 1634 "c-parse.y" +#line 1633 "c-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3257,7 +3256,7 @@ case 325: position_after_white_space (); ; break;} case 326: -#line 1648 "c-parse.y" +#line 1647 "c-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3267,43 +3266,43 @@ case 326: position_after_white_space (); ; break;} case 327: -#line 1656 "c-parse.y" +#line 1655 "c-parse.y" { expand_loop_continue_here (); ; break;} case 328: -#line 1660 "c-parse.y" +#line 1659 "c-parse.y" { yyval.filename = input_filename; ; break;} case 329: -#line 1664 "c-parse.y" +#line 1663 "c-parse.y" { yyval.lineno = lineno; ; break;} case 330: -#line 1669 "c-parse.y" +#line 1668 "c-parse.y" { ; break;} case 331: -#line 1674 "c-parse.y" +#line 1673 "c-parse.y" { ; break;} case 332: -#line 1679 "c-parse.y" +#line 1678 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 333: -#line 1684 "c-parse.y" +#line 1683 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 334: -#line 1686 "c-parse.y" +#line 1685 "c-parse.y" { yyval.ends_in_label = 1; ; break;} case 335: -#line 1692 "c-parse.y" +#line 1691 "c-parse.y" { stmt_count++; ; break;} case 337: -#line 1695 "c-parse.y" +#line 1694 "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 @@ -3321,19 +3320,19 @@ case 337: iterator_expand (yyvsp[-1].ttype); ; break;} case 338: -#line 1711 "c-parse.y" +#line 1710 "c-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 339: -#line 1715 "c-parse.y" +#line 1714 "c-parse.y" { c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) warning ("empty body in an else-statement"); ; break;} case 340: -#line 1719 "c-parse.y" +#line 1718 "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 @@ -3344,11 +3343,11 @@ case 340: "empty body in an if-statement"); ; break;} case 341: -#line 1731 "c-parse.y" +#line 1730 "c-parse.y" { c_expand_end_cond (); ; break;} case 342: -#line 1733 "c-parse.y" +#line 1732 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3360,7 +3359,7 @@ case 342: emit_nop (); ; break;} case 343: -#line 1743 "c-parse.y" +#line 1742 "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. */ @@ -3371,22 +3370,22 @@ case 343: position_after_white_space (); ; break;} case 344: -#line 1752 "c-parse.y" +#line 1751 "c-parse.y" { expand_end_loop (); ; break;} case 345: -#line 1755 "c-parse.y" +#line 1754 "c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); expand_end_loop (); ; break;} case 346: -#line 1761 "c-parse.y" +#line 1760 "c-parse.y" { expand_end_loop (); ; break;} case 347: -#line 1764 "c-parse.y" +#line 1763 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3399,12 +3398,12 @@ case 347: ; break;} case 348: -#line 1776 "c-parse.y" +#line 1775 "c-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 349: -#line 1779 "c-parse.y" +#line 1778 "c-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -3419,7 +3418,7 @@ case 349: position_after_white_space (); ; break;} case 350: -#line 1792 "c-parse.y" +#line 1791 "c-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -3428,44 +3427,44 @@ case 350: expand_end_loop (); ; break;} case 351: -#line 1799 "c-parse.y" +#line 1798 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); position_after_white_space (); ; break;} case 352: -#line 1804 "c-parse.y" +#line 1803 "c-parse.y" { expand_end_case (yyvsp[-3].ttype); ; break;} case 353: -#line 1806 "c-parse.y" +#line 1805 "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 354: -#line 1811 "c-parse.y" +#line 1810 "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 355: -#line 1816 "c-parse.y" +#line 1815 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 356: -#line 1820 "c-parse.y" +#line 1819 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 357: -#line 1824 "c-parse.y" +#line 1823 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -3477,7 +3476,7 @@ case 357: error ("argument of `asm' is not a constant string"); ; break;} case 358: -#line 1835 "c-parse.y" +#line 1834 "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, @@ -3485,7 +3484,7 @@ case 358: input_filename, lineno); ; break;} case 359: -#line 1842 "c-parse.y" +#line 1841 "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, @@ -3493,7 +3492,7 @@ case 359: input_filename, lineno); ; break;} case 360: -#line 1850 "c-parse.y" +#line 1849 "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, @@ -3501,7 +3500,7 @@ case 360: input_filename, lineno); ; break;} case 361: -#line 1856 "c-parse.y" +#line 1855 "c-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -3514,7 +3513,7 @@ case 361: ; break;} case 362: -#line 1867 "c-parse.y" +#line 1866 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -3522,7 +3521,7 @@ case 362: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 365: -#line 1882 "c-parse.y" +#line 1881 "c-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -3545,14 +3544,14 @@ case 365: ; break;} case 366: -#line 1903 "c-parse.y" +#line 1902 "c-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 367: -#line 1934 "c-parse.y" +#line 1933 "c-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -3585,7 +3584,7 @@ case 367: position_after_white_space (); ; break;} case 368: -#line 1965 "c-parse.y" +#line 1964 "c-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -3618,7 +3617,7 @@ case 368: position_after_white_space (); ; break;} case 369: -#line 1996 "c-parse.y" +#line 1995 "c-parse.y" { tree duplicate; register tree label @@ -3635,7 +3634,7 @@ case 369: position_after_white_space (); ; break;} case 370: -#line 2011 "c-parse.y" +#line 2010 "c-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -3647,52 +3646,52 @@ case 370: position_after_white_space (); ; break;} case 371: -#line 2026 "c-parse.y" +#line 2025 "c-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 372: -#line 2029 "c-parse.y" +#line 2028 "c-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 373: -#line 2034 "c-parse.y" +#line 2033 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 375: -#line 2041 "c-parse.y" +#line 2040 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 378: -#line 2048 "c-parse.y" +#line 2047 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 379: -#line 2053 "c-parse.y" +#line 2052 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 380: -#line 2058 "c-parse.y" +#line 2057 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 381: -#line 2060 "c-parse.y" +#line 2059 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 382: -#line 2066 "c-parse.y" +#line 2065 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 383: -#line 2070 "c-parse.y" +#line 2069 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 385: -#line 2078 "c-parse.y" +#line 2077 "c-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -3702,19 +3701,19 @@ case 385: clear_parm_order (); ; break;} case 386: -#line 2086 "c-parse.y" +#line 2085 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 387: -#line 2088 "c-parse.y" +#line 2087 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 388: -#line 2094 "c-parse.y" +#line 2093 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 389: -#line 2096 "c-parse.y" +#line 2095 "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. @@ -3726,23 +3725,23 @@ case 389: ; break;} case 390: -#line 2106 "c-parse.y" +#line 2105 "c-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 391: -#line 2108 "c-parse.y" +#line 2107 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 392: -#line 2113 "c-parse.y" +#line 2112 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 393: -#line 2115 "c-parse.y" +#line 2114 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 394: -#line 2122 "c-parse.y" +#line 2121 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3752,7 +3751,7 @@ case 394: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 395: -#line 2130 "c-parse.y" +#line 2129 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3762,7 +3761,7 @@ case 395: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 396: -#line 2138 "c-parse.y" +#line 2137 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3772,7 +3771,7 @@ case 396: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 397: -#line 2146 "c-parse.y" +#line 2145 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3782,7 +3781,7 @@ case 397: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 398: -#line 2155 "c-parse.y" +#line 2154 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3792,19 +3791,19 @@ case 398: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 399: -#line 2168 "c-parse.y" +#line 2167 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 400: -#line 2172 "c-parse.y" +#line 2171 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 402: -#line 2180 "c-parse.y" +#line 2179 "c-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -3812,30 +3811,30 @@ case 402: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 403: -#line 2190 "c-parse.y" +#line 2189 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 404: -#line 2192 "c-parse.y" +#line 2191 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 405: -#line 2198 "c-parse.y" +#line 2197 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 406: -#line 2200 "c-parse.y" +#line 2199 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 407: -#line 2205 "c-parse.y" +#line 2204 "c-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/misc/bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -4055,5 +4054,5 @@ yyerrhandle: } return 1; } -#line 2210 "c-parse.y" +#line 2209 "c-parse.y" diff --git a/gcc/c-parse.in b/gcc/c-parse.in index adc247a0162..aa547511cfb 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -733,8 +733,7 @@ end ifobjc IDENTIFIER_POINTER (DECL_NAME ($$))); else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) != TYPE_MODE (integer_type_node)) - && (TREE_TYPE (TREE_TYPE ($$)) - != void_type_node)) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) pedwarn ("type mismatch in implicit declaration for built-in function `%s'", IDENTIFIER_POINTER (DECL_NAME ($$))); /* If it really returns void, change that to int. */ diff --git a/gcc/c-parse.y b/gcc/c-parse.y index c228e6e67da..e86cbda0c3d 100644 --- a/gcc/c-parse.y +++ b/gcc/c-parse.y @@ -639,8 +639,7 @@ primary: IDENTIFIER_POINTER (DECL_NAME ($$))); else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) != TYPE_MODE (integer_type_node)) - && (TREE_TYPE (TREE_TYPE ($$)) - != void_type_node)) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) pedwarn ("type mismatch in implicit declaration for built-in function `%s'", IDENTIFIER_POINTER (DECL_NAME ($$))); /* If it really returns void, change that to int. */ diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 0f01c578d4d..f58845692ac 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1467,7 +1467,7 @@ build_function_call (function, params) function, coerced_params, NULL_TREE); TREE_SIDE_EFFECTS (result) = 1; - if (TREE_TYPE (result) == void_type_node) + if (VOID_TYPE_P (TREE_TYPE (result))) return result; return require_complete_type (result); } @@ -2099,7 +2099,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) and both must be object or both incomplete. */ if (comp_target_types (type0, type1)) result_type = common_type (type0, type1); - else if (TYPE_MAIN_VARIANT (tt0) == void_type_node) + else if (VOID_TYPE_P (tt0)) { /* op0 != orig_op0 detects the case of something whose value is 0 but which isn't a valid null ptr const. */ @@ -2107,7 +2107,7 @@ build_binary_op (code, orig_op0, orig_op1, convert_p) && TREE_CODE (tt1) == FUNCTION_TYPE) pedwarn ("ANSI C forbids comparison of `void *' with function pointer"); } - else if (TYPE_MAIN_VARIANT (tt1) == void_type_node) + else if (VOID_TYPE_P (tt1)) { if (pedantic && (!integer_zerop (op1) || op1 != orig_op1) && TREE_CODE (tt0) == FUNCTION_TYPE) @@ -3408,13 +3408,13 @@ build_conditional_expr (ifexp, op1, op2) else if (integer_zerop (op2) && TREE_TYPE (type2) == void_type_node && TREE_CODE (orig_op2) != NOP_EXPR) result_type = qualify_type (type1, type2); - else if (TYPE_MAIN_VARIANT (TREE_TYPE (type1)) == void_type_node) + else if (VOID_TYPE_P (TREE_TYPE (type1))) { if (pedantic && TREE_CODE (TREE_TYPE (type2)) == FUNCTION_TYPE) pedwarn ("ANSI C forbids conditional expr between `void *' and function pointer"); result_type = qualify_type (type1, type2); } - else if (TYPE_MAIN_VARIANT (TREE_TYPE (type2)) == void_type_node) + else if (VOID_TYPE_P (TREE_TYPE (type2))) { if (pedantic && TREE_CODE (TREE_TYPE (type1)) == FUNCTION_TYPE) pedwarn ("ANSI C forbids conditional expr between `void *' and function pointer"); @@ -3533,7 +3533,7 @@ internal_build_compound_expr (list, first_p) any side-effects, unless it was explicitly cast to (void). */ if ((extra_warnings || warn_unused_value) && ! (TREE_CODE (TREE_VALUE (list)) == CONVERT_EXPR - && TREE_TYPE (TREE_VALUE (list)) == void_type_node)) + && VOID_TYPE_P (TREE_TYPE (TREE_VALUE (list))))) warning ("left-hand operand of comma expression has no effect"); /* When pedantic, a compound expression can be neither an lvalue @@ -4010,8 +4010,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) and vice versa; otherwise, targets must be the same. Meanwhile, the lhs target must have all the qualifiers of the rhs. */ - if (TYPE_MAIN_VARIANT (ttl) == void_type_node - || TYPE_MAIN_VARIANT (ttr) == void_type_node + if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) || comp_target_types (memb_type, rhstype)) { /* If this type won't generate any warnings, use it. */ @@ -4086,17 +4085,15 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) /* Any non-function converts to a [const][volatile] void * and vice versa; otherwise, targets must be the same. Meanwhile, the lhs target must have all the qualifiers of the rhs. */ - if (TYPE_MAIN_VARIANT (ttl) == void_type_node - || TYPE_MAIN_VARIANT (ttr) == void_type_node + if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) || comp_target_types (type, rhstype) || (unsigned_type (TYPE_MAIN_VARIANT (ttl)) == unsigned_type (TYPE_MAIN_VARIANT (ttr)))) { if (pedantic - && ((TYPE_MAIN_VARIANT (ttl) == void_type_node - && TREE_CODE (ttr) == FUNCTION_TYPE) + && ((VOID_TYPE_P (ttl) && TREE_CODE (ttr) == FUNCTION_TYPE) || - (TYPE_MAIN_VARIANT (ttr) == void_type_node + (VOID_TYPE_P (ttr) /* Check TREE_CODE to catch cases like (void *) (char *) 0 which are not ANSI null ptr constants. */ && (!integer_zerop (rhs) || TREE_CODE (rhs) == NOP_EXPR) @@ -4113,8 +4110,7 @@ convert_for_assignment (type, rhs, errtype, fundecl, funname, parmnum) errtype, funname, parmnum); /* If this is not a case of ignoring a mismatch in signedness, no warning. */ - else if (TYPE_MAIN_VARIANT (ttl) == void_type_node - || TYPE_MAIN_VARIANT (ttr) == void_type_node + else if (VOID_TYPE_P (ttl) || VOID_TYPE_P (ttr) || comp_target_types (type, rhstype)) ; /* If there is a mismatch, do warn. */ diff --git a/gcc/objc/objc-parse.c b/gcc/objc/objc-parse.c index 5407d329439..d8c1d25f44f 100644 --- a/gcc/objc/objc-parse.c +++ b/gcc/objc/objc-parse.c @@ -471,54 +471,54 @@ static const short yyrline[] = { 0, 491, 495, 497, 500, 504, 531, 533, 535, 537, 539, 541, 543, 545, 547, 549, 551, 553, 555, 557, 561, 563, 567, 569, 572, 576, 578, 585, 588, 596, 607, - 767, 768, 770, 776, 778, 801, 810, 812, 814, 826, - 840, 842, 844, 846, 848, 850, 852, 857, 859, 866, - 868, 872, 874, 875, 885, 890, 892, 893, 894, 901, - 906, 910, 913, 921, 926, 928, 929, 930, 937, 947, - 951, 956, 960, 964, 968, 970, 972, 981, 984, 988, - 990, 992, 997, 1001, 1004, 1008, 1011, 1013, 1025, 1028, - 1030, 1032, 1036, 1040, 1042, 1045, 1058, 1061, 1065, 1067, - 1075, 1076, 1077, 1081, 1083, 1088, 1090, 1092, 1098, 1099, - 1100, 1103, 1105, 1108, 1110, 1113, 1116, 1122, 1129, 1131, - 1138, 1145, 1148, 1155, 1158, 1162, 1165, 1169, 1174, 1177, - 1181, 1184, 1186, 1188, 1190, 1197, 1199, 1200, 1201, 1206, - 1208, 1210, 1212, 1217, 1221, 1224, 1226, 1231, 1233, 1234, - 1237, 1237, 1240, 1243, 1245, 1247, 1250, 1252, 1255, 1263, - 1277, 1285, 1289, 1303, 1311, 1318, 1320, 1325, 1328, 1333, - 1335, 1337, 1344, 1346, 1347, 1355, 1361, 1363, 1365, 1372, - 1374, 1380, 1386, 1388, 1390, 1392, 1399, 1401, 1404, 1407, - 1411, 1414, 1418, 1421, 1425, 1430, 1432, 1436, 1438, 1440, - 1442, 1446, 1448, 1450, 1453, 1455, 1458, 1462, 1464, 1467, - 1469, 1474, 1477, 1482, 1484, 1486, 1490, 1514, 1520, 1533, - 1538, 1543, 1545, 1550, 1552, 1556, 1560, 1564, 1574, 1576, - 1581, 1586, 1589, 1593, 1596, 1600, 1603, 1606, 1609, 1613, - 1616, 1620, 1624, 1626, 1628, 1630, 1632, 1634, 1636, 1638, - 1642, 1650, 1658, 1660, 1662, 1666, 1668, 1671, 1674, 1686, - 1688, 1693, 1695, 1698, 1712, 1715, 1718, 1720, 1722, 1726, - 1730, 1736, 1754, 1759, 1764, 1767, 1781, 1790, 1794, 1798, - 1802, 1808, 1812, 1817, 1820, 1825, 1828, 1829, 1845, 1850, - 1853, 1865, 1867, 1877, 1887, 1888, 1895, 1897, 1909, 1913, - 1927, 1933, 1939, 1940, 1945, 1950, 1954, 1958, 1969, 1976, - 1983, 1990, 2001, 2007, 2010, 2015, 2038, 2068, 2099, 2130, - 2145, 2159, 2163, 2167, 2170, 2175, 2177, 2180, 2182, 2186, - 2191, 2194, 2200, 2205, 2210, 2212, 2221, 2222, 2228, 2230, - 2240, 2242, 2246, 2249, 2255, 2264, 2272, 2280, 2289, 2302, - 2307, 2312, 2314, 2323, 2326, 2331, 2334, 2338, 2347, 2349, - 2350, 2351, 2352, 2353, 2367, 2370, 2374, 2380, 2386, 2393, - 2398, 2404, 2411, 2417, 2423, 2428, 2434, 2441, 2447, 2453, - 2459, 2467, 2473, 2479, 2487, 2494, 2500, 2509, 2516, 2524, - 2529, 2532, 2542, 2544, 2547, 2549, 2550, 2553, 2558, 2559, - 2576, 2582, 2587, 2591, 2594, 2595, 2598, 2606, 2612, 2621, - 2631, 2638, 2642, 2647, 2656, 2663, 2667, 2677, 2679, 2680, - 2682, 2684, 2685, 2686, 2687, 2689, 2691, 2694, 2702, 2709, - 2709, 2716, 2722, 2724, 2730, 2735, 2740, 2749, 2751, 2757, - 2759, 2762, 2764, 2765, 2766, 2769, 2774, 2776, 2780, 2783, - 2790, 2796, 2801, 2808, 2813, 2818, 2823, 2830, 2834, 2837, - 2843, 2845, 2846, 2847, 2850, 2852, 2853, 2854, 2855, 2856, - 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, 2866, - 2867, 2868, 2869, 2870, 2870, 2873, 2879, 2884, 2889, 2895, - 2897, 2900, 2902, 2909, 2921, 2926, 2932, 2934, 2940, 2944, - 2945, 2951, 2953, 2956, 2958, 2964, 2969, 2975, 2982, 2991 + 766, 767, 769, 775, 777, 800, 809, 811, 813, 825, + 839, 841, 843, 845, 847, 849, 851, 856, 858, 865, + 867, 871, 873, 874, 884, 889, 891, 892, 893, 900, + 905, 909, 912, 920, 925, 927, 928, 929, 936, 946, + 950, 955, 959, 963, 967, 969, 971, 980, 983, 987, + 989, 991, 996, 1000, 1003, 1007, 1010, 1012, 1024, 1027, + 1029, 1031, 1035, 1039, 1041, 1044, 1057, 1060, 1064, 1066, + 1074, 1075, 1076, 1080, 1082, 1087, 1089, 1091, 1097, 1098, + 1099, 1102, 1104, 1107, 1109, 1112, 1115, 1121, 1128, 1130, + 1137, 1144, 1147, 1154, 1157, 1161, 1164, 1168, 1173, 1176, + 1180, 1183, 1185, 1187, 1189, 1196, 1198, 1199, 1200, 1205, + 1207, 1209, 1211, 1216, 1220, 1223, 1225, 1230, 1232, 1233, + 1236, 1236, 1239, 1242, 1244, 1246, 1249, 1251, 1254, 1262, + 1276, 1284, 1288, 1302, 1310, 1317, 1319, 1324, 1327, 1332, + 1334, 1336, 1343, 1345, 1346, 1354, 1360, 1362, 1364, 1371, + 1373, 1379, 1385, 1387, 1389, 1391, 1398, 1400, 1403, 1406, + 1410, 1413, 1417, 1420, 1424, 1429, 1431, 1435, 1437, 1439, + 1441, 1445, 1447, 1449, 1452, 1454, 1457, 1461, 1463, 1466, + 1468, 1473, 1476, 1481, 1483, 1485, 1489, 1513, 1519, 1532, + 1537, 1542, 1544, 1549, 1551, 1555, 1559, 1563, 1573, 1575, + 1580, 1585, 1588, 1592, 1595, 1599, 1602, 1605, 1608, 1612, + 1615, 1619, 1623, 1625, 1627, 1629, 1631, 1633, 1635, 1637, + 1641, 1649, 1657, 1659, 1661, 1665, 1667, 1670, 1673, 1685, + 1687, 1692, 1694, 1697, 1711, 1714, 1717, 1719, 1721, 1725, + 1729, 1735, 1753, 1758, 1763, 1766, 1780, 1789, 1793, 1797, + 1801, 1807, 1811, 1816, 1819, 1824, 1827, 1828, 1844, 1849, + 1852, 1864, 1866, 1876, 1886, 1887, 1894, 1896, 1908, 1912, + 1926, 1932, 1938, 1939, 1944, 1949, 1953, 1957, 1968, 1975, + 1982, 1989, 2000, 2006, 2009, 2014, 2037, 2067, 2098, 2129, + 2144, 2158, 2162, 2166, 2169, 2174, 2176, 2179, 2181, 2185, + 2190, 2193, 2199, 2204, 2209, 2211, 2220, 2221, 2227, 2229, + 2239, 2241, 2245, 2248, 2254, 2263, 2271, 2279, 2288, 2301, + 2306, 2311, 2313, 2322, 2325, 2330, 2333, 2337, 2346, 2348, + 2349, 2350, 2351, 2352, 2366, 2369, 2373, 2379, 2385, 2392, + 2397, 2403, 2410, 2416, 2422, 2427, 2433, 2440, 2446, 2452, + 2458, 2466, 2472, 2478, 2486, 2493, 2499, 2508, 2515, 2523, + 2528, 2531, 2541, 2543, 2546, 2548, 2549, 2552, 2557, 2558, + 2575, 2581, 2586, 2590, 2593, 2594, 2597, 2605, 2611, 2620, + 2630, 2637, 2641, 2646, 2655, 2662, 2666, 2676, 2678, 2679, + 2681, 2683, 2684, 2685, 2686, 2688, 2690, 2693, 2701, 2708, + 2708, 2715, 2721, 2723, 2729, 2734, 2739, 2748, 2750, 2756, + 2758, 2761, 2763, 2764, 2765, 2768, 2773, 2775, 2779, 2782, + 2789, 2795, 2800, 2807, 2812, 2817, 2822, 2829, 2833, 2836, + 2842, 2844, 2845, 2846, 2849, 2851, 2852, 2853, 2854, 2855, + 2856, 2857, 2858, 2859, 2860, 2861, 2862, 2863, 2864, 2865, + 2866, 2867, 2868, 2869, 2869, 2872, 2878, 2883, 2888, 2894, + 2896, 2899, 2901, 2908, 2920, 2925, 2931, 2933, 2939, 2943, + 2944, 2950, 2952, 2955, 2957, 2963, 2968, 2974, 2981, 2990 }; #endif @@ -1758,7 +1758,7 @@ static const short yycheck[] = { 56, 50, 51, 52, 53, 54, 55, 56, 57 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/misc/bison.simple" +#line 3 "/usr/lib/bison.simple" /* This file comes from bison-1.28. */ /* Skeleton output parser for bison, @@ -1972,7 +1972,7 @@ __yy_memcpy (char *to, char *from, unsigned int count) #endif #endif -#line 217 "/usr/share/misc/bison.simple" +#line 217 "/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 *. @@ -2821,8 +2821,7 @@ case 90: IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE (yyval.ttype))) != TYPE_MODE (integer_type_node)) - && (TREE_TYPE (TREE_TYPE (yyval.ttype)) - != void_type_node)) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (yyval.ttype)))) pedwarn ("type mismatch in implicit declaration for built-in function `%s'", IDENTIFIER_POINTER (DECL_NAME (yyval.ttype))); /* If it really returns void, change that to int. */ @@ -2881,11 +2880,11 @@ case 90: ; break;} case 92: -#line 769 "objc-parse.y" +#line 768 "objc-parse.y" { yyval.ttype = combine_strings (yyvsp[0].ttype); ; break;} case 93: -#line 771 "objc-parse.y" +#line 770 "objc-parse.y" { char class = TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)); if (class == 'e' || class == '1' || class == '2' || class == '<') @@ -2893,11 +2892,11 @@ case 93: yyval.ttype = yyvsp[-1].ttype; ; break;} case 94: -#line 777 "objc-parse.y" +#line 776 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 95: -#line 779 "objc-parse.y" +#line 778 "objc-parse.y" { tree rtl_exp; if (pedantic) pedwarn ("ANSI C forbids braced-groups within expressions"); @@ -2922,7 +2921,7 @@ case 95: ; break;} case 96: -#line 802 "objc-parse.y" +#line 801 "objc-parse.y" { /* Make sure we call expand_end_stmt_expr. Otherwise we are likely to lose sequences and crash later. */ @@ -2933,15 +2932,15 @@ case 96: ; break;} case 97: -#line 811 "objc-parse.y" +#line 810 "objc-parse.y" { yyval.ttype = build_function_call (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 98: -#line 813 "objc-parse.y" +#line 812 "objc-parse.y" { yyval.ttype = build_array_ref (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 99: -#line 815 "objc-parse.y" +#line 814 "objc-parse.y" { if (doing_objc_thang) { @@ -2955,7 +2954,7 @@ case 99: ; break;} case 100: -#line 827 "objc-parse.y" +#line 826 "objc-parse.y" { tree expr = build_indirect_ref (yyvsp[-2].ttype, "->"); @@ -2971,79 +2970,79 @@ case 100: ; break;} case 101: -#line 841 "objc-parse.y" +#line 840 "objc-parse.y" { yyval.ttype = build_unary_op (POSTINCREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 102: -#line 843 "objc-parse.y" +#line 842 "objc-parse.y" { yyval.ttype = build_unary_op (POSTDECREMENT_EXPR, yyvsp[-1].ttype, 0); ; break;} case 103: -#line 845 "objc-parse.y" +#line 844 "objc-parse.y" { yyval.ttype = build_message_expr (yyvsp[0].ttype); ; break;} case 104: -#line 847 "objc-parse.y" +#line 846 "objc-parse.y" { yyval.ttype = build_selector_expr (yyvsp[0].ttype); ; break;} case 105: -#line 849 "objc-parse.y" +#line 848 "objc-parse.y" { yyval.ttype = build_protocol_expr (yyvsp[0].ttype); ; break;} case 106: -#line 851 "objc-parse.y" +#line 850 "objc-parse.y" { yyval.ttype = build_encode_expr (yyvsp[0].ttype); ; break;} case 107: -#line 853 "objc-parse.y" +#line 852 "objc-parse.y" { yyval.ttype = build_objc_string_object (yyvsp[0].ttype); ; break;} case 109: -#line 860 "objc-parse.y" +#line 859 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 111: -#line 869 "objc-parse.y" +#line 868 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 114: -#line 877 "objc-parse.y" +#line 876 "objc-parse.y" { c_mark_varargs (); if (pedantic) pedwarn ("ANSI C does not permit use of `varargs.h'"); ; break;} case 115: -#line 887 "objc-parse.y" +#line 886 "objc-parse.y" { ; break;} case 120: -#line 903 "objc-parse.y" +#line 902 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 121: -#line 907 "objc-parse.y" +#line 906 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 122: -#line 911 "objc-parse.y" +#line 910 "objc-parse.y" { shadow_tag_warned (yyvsp[-1].ttype, 1); pedwarn ("empty declaration"); ; break;} case 123: -#line 914 "objc-parse.y" +#line 913 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 124: -#line 923 "objc-parse.y" +#line 922 "objc-parse.y" { ; break;} case 129: -#line 938 "objc-parse.y" +#line 937 "objc-parse.y" { pending_xref_error (); declspec_stack = tree_cons (prefix_attributes, current_declspecs, @@ -3052,127 +3051,127 @@ case 129: ¤t_declspecs, &prefix_attributes); ; break;} case 130: -#line 948 "objc-parse.y" +#line 947 "objc-parse.y" { prefix_attributes = chainon (prefix_attributes, yyvsp[0].ttype); ; break;} case 131: -#line 953 "objc-parse.y" +#line 952 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 132: -#line 957 "objc-parse.y" +#line 956 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 133: -#line 961 "objc-parse.y" +#line 960 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 134: -#line 965 "objc-parse.y" +#line 964 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 135: -#line 969 "objc-parse.y" +#line 968 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 136: -#line 971 "objc-parse.y" +#line 970 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 137: -#line 973 "objc-parse.y" +#line 972 "objc-parse.y" { RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 138: -#line 983 "objc-parse.y" +#line 982 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 139: -#line 985 "objc-parse.y" +#line 984 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 140: -#line 989 "objc-parse.y" +#line 988 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 141: -#line 991 "objc-parse.y" +#line 990 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 142: -#line 993 "objc-parse.y" +#line 992 "objc-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 143: -#line 998 "objc-parse.y" +#line 997 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 144: -#line 1003 "objc-parse.y" +#line 1002 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 145: -#line 1005 "objc-parse.y" +#line 1004 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 146: -#line 1010 "objc-parse.y" +#line 1009 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 147: -#line 1012 "objc-parse.y" +#line 1011 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 148: -#line 1014 "objc-parse.y" +#line 1013 "objc-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 149: -#line 1027 "objc-parse.y" +#line 1026 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 150: -#line 1029 "objc-parse.y" +#line 1028 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 151: -#line 1031 "objc-parse.y" +#line 1030 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 152: -#line 1033 "objc-parse.y" +#line 1032 "objc-parse.y" { yyval.ttype = tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 153: -#line 1038 "objc-parse.y" +#line 1037 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); TREE_STATIC (yyval.ttype) = 1; ; break;} case 154: -#line 1041 "objc-parse.y" +#line 1040 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 155: -#line 1043 "objc-parse.y" +#line 1042 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 156: -#line 1046 "objc-parse.y" +#line 1045 "objc-parse.y" { if (extra_warnings && TREE_STATIC (yyvsp[-1].ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -3180,180 +3179,180 @@ case 156: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 157: -#line 1060 "objc-parse.y" +#line 1059 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 158: -#line 1062 "objc-parse.y" +#line 1061 "objc-parse.y" { yyval.ttype = chainon (yyvsp[0].ttype, tree_cons (NULL_TREE, yyvsp[-1].ttype, yyvsp[-2].ttype)); ; break;} case 159: -#line 1066 "objc-parse.y" +#line 1065 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 160: -#line 1068 "objc-parse.y" +#line 1067 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 163: -#line 1078 "objc-parse.y" +#line 1077 "objc-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 164: -#line 1082 "objc-parse.y" +#line 1081 "objc-parse.y" { yyval.ttype = get_static_reference (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 165: -#line 1084 "objc-parse.y" +#line 1083 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} case 166: -#line 1089 "objc-parse.y" +#line 1088 "objc-parse.y" { yyval.ttype = get_object_reference (yyvsp[0].ttype); ; break;} case 167: -#line 1091 "objc-parse.y" +#line 1090 "objc-parse.y" { yyval.ttype = TREE_TYPE (yyvsp[-1].ttype); ; break;} case 168: -#line 1093 "objc-parse.y" +#line 1092 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} case 176: -#line 1115 "objc-parse.y" +#line 1114 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 177: -#line 1117 "objc-parse.y" +#line 1116 "objc-parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 178: -#line 1124 "objc-parse.y" +#line 1123 "objc-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 179: -#line 1129 "objc-parse.y" +#line 1128 "objc-parse.y" { finish_init (); finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype); ; break;} case 180: -#line 1132 "objc-parse.y" +#line 1131 "objc-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 181: -#line 1140 "objc-parse.y" +#line 1139 "objc-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 182: -#line 1145 "objc-parse.y" +#line 1144 "objc-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 183: -#line 1149 "objc-parse.y" +#line 1148 "objc-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 184: -#line 1157 "objc-parse.y" +#line 1156 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 185: -#line 1159 "objc-parse.y" +#line 1158 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 186: -#line 1164 "objc-parse.y" +#line 1163 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 187: -#line 1166 "objc-parse.y" +#line 1165 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 188: -#line 1171 "objc-parse.y" +#line 1170 "objc-parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 189: -#line 1176 "objc-parse.y" +#line 1175 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 190: -#line 1178 "objc-parse.y" +#line 1177 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 191: -#line 1183 "objc-parse.y" +#line 1182 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 192: -#line 1185 "objc-parse.y" +#line 1184 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 193: -#line 1187 "objc-parse.y" +#line 1186 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 194: -#line 1189 "objc-parse.y" +#line 1188 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 195: -#line 1191 "objc-parse.y" +#line 1190 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 201: -#line 1209 "objc-parse.y" +#line 1208 "objc-parse.y" { really_start_incremental_init (NULL_TREE); ; break;} case 202: -#line 1211 "objc-parse.y" +#line 1210 "objc-parse.y" { yyval.ttype = pop_init_level (0); ; break;} case 203: -#line 1213 "objc-parse.y" +#line 1212 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 204: -#line 1219 "objc-parse.y" +#line 1218 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids empty initializer braces"); ; break;} case 210: -#line 1235 "objc-parse.y" +#line 1234 "objc-parse.y" { set_init_label (yyvsp[-1].ttype); ; break;} case 213: -#line 1242 "objc-parse.y" +#line 1241 "objc-parse.y" { push_init_level (0); ; break;} case 214: -#line 1244 "objc-parse.y" +#line 1243 "objc-parse.y" { process_init_element (pop_init_level (0)); ; break;} case 215: -#line 1246 "objc-parse.y" +#line 1245 "objc-parse.y" { process_init_element (yyvsp[0].ttype); ; break;} case 219: -#line 1257 "objc-parse.y" +#line 1256 "objc-parse.y" { set_init_label (yyvsp[0].ttype); ; break;} case 220: -#line 1265 "objc-parse.y" +#line 1264 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -3367,16 +3366,16 @@ case 220: reinit_parse_for_function (); ; break;} case 221: -#line 1277 "objc-parse.y" +#line 1276 "objc-parse.y" { store_parm_decls (); ; break;} case 222: -#line 1285 "objc-parse.y" +#line 1284 "objc-parse.y" { finish_function (1); pop_function_context (); ; break;} case 223: -#line 1291 "objc-parse.y" +#line 1290 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids nested functions"); @@ -3390,195 +3389,195 @@ case 223: reinit_parse_for_function (); ; break;} case 224: -#line 1303 "objc-parse.y" +#line 1302 "objc-parse.y" { store_parm_decls (); ; break;} case 225: -#line 1311 "objc-parse.y" +#line 1310 "objc-parse.y" { finish_function (1); pop_function_context (); ; break;} case 228: -#line 1327 "objc-parse.y" +#line 1326 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 229: -#line 1329 "objc-parse.y" +#line 1328 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 230: -#line 1334 "objc-parse.y" +#line 1333 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 231: -#line 1336 "objc-parse.y" +#line 1335 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 232: -#line 1338 "objc-parse.y" +#line 1337 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 233: -#line 1345 "objc-parse.y" +#line 1344 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 236: -#line 1357 "objc-parse.y" +#line 1356 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 237: -#line 1362 "objc-parse.y" +#line 1361 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 238: -#line 1364 "objc-parse.y" +#line 1363 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 239: -#line 1366 "objc-parse.y" +#line 1365 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 240: -#line 1373 "objc-parse.y" +#line 1372 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 242: -#line 1382 "objc-parse.y" +#line 1381 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 243: -#line 1387 "objc-parse.y" +#line 1386 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 244: -#line 1389 "objc-parse.y" +#line 1388 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 245: -#line 1391 "objc-parse.y" +#line 1390 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 246: -#line 1393 "objc-parse.y" +#line 1392 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 247: -#line 1400 "objc-parse.y" +#line 1399 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 249: -#line 1406 "objc-parse.y" +#line 1405 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 250: -#line 1408 "objc-parse.y" +#line 1407 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 251: -#line 1413 "objc-parse.y" +#line 1412 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 252: -#line 1415 "objc-parse.y" +#line 1414 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 253: -#line 1420 "objc-parse.y" +#line 1419 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 254: -#line 1422 "objc-parse.y" +#line 1421 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 255: -#line 1427 "objc-parse.y" +#line 1426 "objc-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 256: -#line 1431 "objc-parse.y" +#line 1430 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 257: -#line 1433 "objc-parse.y" +#line 1432 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (RECORD_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 258: -#line 1437 "objc-parse.y" +#line 1436 "objc-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 259: -#line 1439 "objc-parse.y" +#line 1438 "objc-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 260: -#line 1441 "objc-parse.y" +#line 1440 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 261: -#line 1443 "objc-parse.y" +#line 1442 "objc-parse.y" { yyval.ttype = finish_struct (start_struct (UNION_TYPE, NULL_TREE), yyvsp[-2].ttype, chainon (yyvsp[-4].ttype, yyvsp[0].ttype)); ; break;} case 262: -#line 1447 "objc-parse.y" +#line 1446 "objc-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 263: -#line 1449 "objc-parse.y" +#line 1448 "objc-parse.y" { yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 264: -#line 1451 "objc-parse.y" +#line 1450 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); ; break;} case 265: -#line 1454 "objc-parse.y" +#line 1453 "objc-parse.y" { yyval.ttype = start_enum (NULL_TREE); ; break;} case 266: -#line 1456 "objc-parse.y" +#line 1455 "objc-parse.y" { yyval.ttype = finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 267: -#line 1459 "objc-parse.y" +#line 1458 "objc-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 271: -#line 1470 "objc-parse.y" +#line 1469 "objc-parse.y" { if (pedantic && ! flag_isoc99) pedwarn ("comma at end of enumerator list"); ; break;} case 272: -#line 1476 "objc-parse.y" +#line 1475 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 273: -#line 1478 "objc-parse.y" +#line 1477 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); pedwarn ("no semicolon at end of struct or union"); ; break;} case 274: -#line 1483 "objc-parse.y" +#line 1482 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 275: -#line 1485 "objc-parse.y" +#line 1484 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 276: -#line 1487 "objc-parse.y" +#line 1486 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 277: -#line 1491 "objc-parse.y" +#line 1490 "objc-parse.y" { tree interface = lookup_interface (yyvsp[-1].ttype); @@ -3593,14 +3592,14 @@ case 277: ; break;} case 278: -#line 1516 "objc-parse.y" +#line 1515 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 279: -#line 1521 "objc-parse.y" +#line 1520 "objc-parse.y" { /* Support for unnamed structs or unions as members of structs or unions (which is [a] useful and [b] supports @@ -3615,151 +3614,151 @@ case 279: ; break;} case 280: -#line 1534 "objc-parse.y" +#line 1533 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 281: -#line 1539 "objc-parse.y" +#line 1538 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids member declarations with no members"); shadow_tag(yyvsp[0].ttype); yyval.ttype = NULL_TREE; ; break;} case 282: -#line 1544 "objc-parse.y" +#line 1543 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 283: -#line 1546 "objc-parse.y" +#line 1545 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ; break;} case 285: -#line 1553 "objc-parse.y" +#line 1552 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 286: -#line 1558 "objc-parse.y" +#line 1557 "objc-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 287: -#line 1562 "objc-parse.y" +#line 1561 "objc-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 288: -#line 1565 "objc-parse.y" +#line 1564 "objc-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 290: -#line 1577 "objc-parse.y" +#line 1576 "objc-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 291: -#line 1582 "objc-parse.y" +#line 1581 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 292: -#line 1588 "objc-parse.y" +#line 1587 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 293: -#line 1590 "objc-parse.y" +#line 1589 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 294: -#line 1595 "objc-parse.y" +#line 1594 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 295: -#line 1597 "objc-parse.y" +#line 1596 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 296: -#line 1602 "objc-parse.y" +#line 1601 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 298: -#line 1608 "objc-parse.y" +#line 1607 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 299: -#line 1610 "objc-parse.y" +#line 1609 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 300: -#line 1615 "objc-parse.y" +#line 1614 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 301: -#line 1617 "objc-parse.y" +#line 1616 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 302: -#line 1622 "objc-parse.y" +#line 1621 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 303: -#line 1625 "objc-parse.y" +#line 1624 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 304: -#line 1627 "objc-parse.y" +#line 1626 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 305: -#line 1629 "objc-parse.y" +#line 1628 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 306: -#line 1631 "objc-parse.y" +#line 1630 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 307: -#line 1633 "objc-parse.y" +#line 1632 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 308: -#line 1635 "objc-parse.y" +#line 1634 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 309: -#line 1637 "objc-parse.y" +#line 1636 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 310: -#line 1639 "objc-parse.y" +#line 1638 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 311: -#line 1643 "objc-parse.y" +#line 1642 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 312: -#line 1652 "objc-parse.y" +#line 1651 "objc-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 314: -#line 1661 "objc-parse.y" +#line 1660 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 315: -#line 1663 "objc-parse.y" +#line 1662 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 319: -#line 1675 "objc-parse.y" +#line 1674 "objc-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3769,12 +3768,12 @@ case 319: ; break;} case 321: -#line 1689 "objc-parse.y" +#line 1688 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 324: -#line 1700 "objc-parse.y" +#line 1699 "objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3785,37 +3784,37 @@ case 324: ; break;} case 325: -#line 1714 "objc-parse.y" +#line 1713 "objc-parse.y" {; break;} case 327: -#line 1718 "objc-parse.y" +#line 1717 "objc-parse.y" { compstmt_count++; ; break;} case 328: -#line 1721 "objc-parse.y" +#line 1720 "objc-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 329: -#line 1723 "objc-parse.y" +#line 1722 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); ; break;} case 330: -#line 1727 "objc-parse.y" +#line 1726 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 331: -#line 1731 "objc-parse.y" +#line 1730 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), kept_level_p (), 0); yyval.ttype = poplevel (kept_level_p (), 0, 0); ; break;} case 332: -#line 1738 "objc-parse.y" +#line 1737 "objc-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3833,11 +3832,11 @@ case 332: ; break;} case 333: -#line 1755 "objc-parse.y" +#line 1754 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 336: -#line 1769 "objc-parse.y" +#line 1768 "objc-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3847,7 +3846,7 @@ case 336: position_after_white_space (); ; break;} case 337: -#line 1783 "objc-parse.y" +#line 1782 "objc-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3857,43 +3856,43 @@ case 337: position_after_white_space (); ; break;} case 338: -#line 1791 "objc-parse.y" +#line 1790 "objc-parse.y" { expand_loop_continue_here (); ; break;} case 339: -#line 1795 "objc-parse.y" +#line 1794 "objc-parse.y" { yyval.filename = input_filename; ; break;} case 340: -#line 1799 "objc-parse.y" +#line 1798 "objc-parse.y" { yyval.lineno = lineno; ; break;} case 341: -#line 1804 "objc-parse.y" +#line 1803 "objc-parse.y" { ; break;} case 342: -#line 1809 "objc-parse.y" +#line 1808 "objc-parse.y" { ; break;} case 343: -#line 1814 "objc-parse.y" +#line 1813 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 344: -#line 1819 "objc-parse.y" +#line 1818 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 345: -#line 1821 "objc-parse.y" +#line 1820 "objc-parse.y" { yyval.ends_in_label = 1; ; break;} case 346: -#line 1827 "objc-parse.y" +#line 1826 "objc-parse.y" { stmt_count++; ; break;} case 348: -#line 1830 "objc-parse.y" +#line 1829 "objc-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 @@ -3911,19 +3910,19 @@ case 348: iterator_expand (yyvsp[-1].ttype); ; break;} case 349: -#line 1846 "objc-parse.y" +#line 1845 "objc-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 350: -#line 1850 "objc-parse.y" +#line 1849 "objc-parse.y" { c_expand_end_cond (); if (extra_warnings && stmt_count == yyvsp[-3].itype) warning ("empty body in an else-statement"); ; break;} case 351: -#line 1854 "objc-parse.y" +#line 1853 "objc-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 @@ -3934,11 +3933,11 @@ case 351: "empty body in an if-statement"); ; break;} case 352: -#line 1866 "objc-parse.y" +#line 1865 "objc-parse.y" { c_expand_end_cond (); ; break;} case 353: -#line 1868 "objc-parse.y" +#line 1867 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3950,7 +3949,7 @@ case 353: emit_nop (); ; break;} case 354: -#line 1878 "objc-parse.y" +#line 1877 "objc-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. */ @@ -3961,22 +3960,22 @@ case 354: position_after_white_space (); ; break;} case 355: -#line 1887 "objc-parse.y" +#line 1886 "objc-parse.y" { expand_end_loop (); ; break;} case 356: -#line 1890 "objc-parse.y" +#line 1889 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); expand_end_loop (); ; break;} case 357: -#line 1896 "objc-parse.y" +#line 1895 "objc-parse.y" { expand_end_loop (); ; break;} case 358: -#line 1899 "objc-parse.y" +#line 1898 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3989,12 +3988,12 @@ case 358: ; break;} case 359: -#line 1911 "objc-parse.y" +#line 1910 "objc-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 360: -#line 1914 "objc-parse.y" +#line 1913 "objc-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -4009,7 +4008,7 @@ case 360: position_after_white_space (); ; break;} case 361: -#line 1927 "objc-parse.y" +#line 1926 "objc-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -4018,44 +4017,44 @@ case 361: expand_end_loop (); ; break;} case 362: -#line 1934 "objc-parse.y" +#line 1933 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); position_after_white_space (); ; break;} case 363: -#line 1939 "objc-parse.y" +#line 1938 "objc-parse.y" { expand_end_case (yyvsp[-3].ttype); ; break;} case 364: -#line 1941 "objc-parse.y" +#line 1940 "objc-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 365: -#line 1946 "objc-parse.y" +#line 1945 "objc-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 366: -#line 1951 "objc-parse.y" +#line 1950 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 367: -#line 1955 "objc-parse.y" +#line 1954 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 368: -#line 1959 "objc-parse.y" +#line 1958 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -4067,7 +4066,7 @@ case 368: error ("argument of `asm' is not a constant string"); ; break;} case 369: -#line 1970 "objc-parse.y" +#line 1969 "objc-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, @@ -4075,7 +4074,7 @@ case 369: input_filename, lineno); ; break;} case 370: -#line 1977 "objc-parse.y" +#line 1976 "objc-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, @@ -4083,7 +4082,7 @@ case 370: input_filename, lineno); ; break;} case 371: -#line 1985 "objc-parse.y" +#line 1984 "objc-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, @@ -4091,7 +4090,7 @@ case 371: input_filename, lineno); ; break;} case 372: -#line 1991 "objc-parse.y" +#line 1990 "objc-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -4104,7 +4103,7 @@ case 372: ; break;} case 373: -#line 2002 "objc-parse.y" +#line 2001 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -4112,7 +4111,7 @@ case 373: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 376: -#line 2017 "objc-parse.y" +#line 2016 "objc-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -4135,14 +4134,14 @@ case 376: ; break;} case 377: -#line 2038 "objc-parse.y" +#line 2037 "objc-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 378: -#line 2069 "objc-parse.y" +#line 2068 "objc-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -4175,7 +4174,7 @@ case 378: position_after_white_space (); ; break;} case 379: -#line 2100 "objc-parse.y" +#line 2099 "objc-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -4208,7 +4207,7 @@ case 379: position_after_white_space (); ; break;} case 380: -#line 2131 "objc-parse.y" +#line 2130 "objc-parse.y" { tree duplicate; register tree label @@ -4225,7 +4224,7 @@ case 380: position_after_white_space (); ; break;} case 381: -#line 2146 "objc-parse.y" +#line 2145 "objc-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -4237,52 +4236,52 @@ case 381: position_after_white_space (); ; break;} case 382: -#line 2161 "objc-parse.y" +#line 2160 "objc-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 383: -#line 2164 "objc-parse.y" +#line 2163 "objc-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 384: -#line 2169 "objc-parse.y" +#line 2168 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 386: -#line 2176 "objc-parse.y" +#line 2175 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 389: -#line 2183 "objc-parse.y" +#line 2182 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 390: -#line 2188 "objc-parse.y" +#line 2187 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 391: -#line 2193 "objc-parse.y" +#line 2192 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 392: -#line 2195 "objc-parse.y" +#line 2194 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 393: -#line 2201 "objc-parse.y" +#line 2200 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 394: -#line 2205 "objc-parse.y" +#line 2204 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 396: -#line 2213 "objc-parse.y" +#line 2212 "objc-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -4292,19 +4291,19 @@ case 396: clear_parm_order (); ; break;} case 397: -#line 2221 "objc-parse.y" +#line 2220 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 398: -#line 2223 "objc-parse.y" +#line 2222 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 399: -#line 2229 "objc-parse.y" +#line 2228 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 400: -#line 2231 "objc-parse.y" +#line 2230 "objc-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. @@ -4316,23 +4315,23 @@ case 400: ; break;} case 401: -#line 2241 "objc-parse.y" +#line 2240 "objc-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 402: -#line 2243 "objc-parse.y" +#line 2242 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 403: -#line 2248 "objc-parse.y" +#line 2247 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 404: -#line 2250 "objc-parse.y" +#line 2249 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 405: -#line 2257 "objc-parse.y" +#line 2256 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4342,7 +4341,7 @@ case 405: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 406: -#line 2265 "objc-parse.y" +#line 2264 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4352,7 +4351,7 @@ case 406: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 407: -#line 2273 "objc-parse.y" +#line 2272 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4362,7 +4361,7 @@ case 407: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 408: -#line 2281 "objc-parse.y" +#line 2280 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4372,7 +4371,7 @@ case 408: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 409: -#line 2290 "objc-parse.y" +#line 2289 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4382,19 +4381,19 @@ case 409: declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 410: -#line 2303 "objc-parse.y" +#line 2302 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 411: -#line 2307 "objc-parse.y" +#line 2306 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 413: -#line 2315 "objc-parse.y" +#line 2314 "objc-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -4402,29 +4401,29 @@ case 413: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 414: -#line 2325 "objc-parse.y" +#line 2324 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 415: -#line 2327 "objc-parse.y" +#line 2326 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 416: -#line 2333 "objc-parse.y" +#line 2332 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 417: -#line 2335 "objc-parse.y" +#line 2334 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 418: -#line 2340 "objc-parse.y" +#line 2339 "objc-parse.y" { yyval.ttype = SAVE_WARN_FLAGS(); pedantic = 0; warn_pointer_arith = 0; ; break;} case 424: -#line 2354 "objc-parse.y" +#line 2353 "objc-parse.y" { if (objc_implementation_context) { @@ -4437,27 +4436,27 @@ case 424: ; break;} case 425: -#line 2369 "objc-parse.y" +#line 2368 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 426: -#line 2371 "objc-parse.y" +#line 2370 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 427: -#line 2376 "objc-parse.y" +#line 2375 "objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} case 428: -#line 2382 "objc-parse.y" +#line 2381 "objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 429: -#line 2388 "objc-parse.y" +#line 2387 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); @@ -4465,20 +4464,20 @@ case 429: ; break;} case 430: -#line 2394 "objc-parse.y" +#line 2393 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 431: -#line 2399 "objc-parse.y" +#line 2398 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 432: -#line 2405 "objc-parse.y" +#line 2404 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); @@ -4486,14 +4485,14 @@ case 432: ; break;} case 433: -#line 2412 "objc-parse.y" +#line 2411 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 434: -#line 2418 "objc-parse.y" +#line 2417 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); @@ -4501,20 +4500,20 @@ case 434: ; break;} case 435: -#line 2424 "objc-parse.y" +#line 2423 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 436: -#line 2429 "objc-parse.y" +#line 2428 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 437: -#line 2435 "objc-parse.y" +#line 2434 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); @@ -4522,14 +4521,14 @@ case 437: ; break;} case 438: -#line 2442 "objc-parse.y" +#line 2441 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 439: -#line 2448 "objc-parse.y" +#line 2447 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); @@ -4537,14 +4536,14 @@ case 439: ; break;} case 440: -#line 2454 "objc-parse.y" +#line 2453 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 441: -#line 2460 "objc-parse.y" +#line 2459 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); @@ -4553,7 +4552,7 @@ case 441: ; break;} case 442: -#line 2468 "objc-parse.y" +#line 2467 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4561,14 +4560,14 @@ case 442: ; break;} case 443: -#line 2474 "objc-parse.y" +#line 2473 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 444: -#line 2480 "objc-parse.y" +#line 2479 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); @@ -4577,7 +4576,7 @@ case 444: ; break;} case 445: -#line 2488 "objc-parse.y" +#line 2487 "objc-parse.y" { objc_interface_context = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); @@ -4585,14 +4584,14 @@ case 445: ; break;} case 446: -#line 2495 "objc-parse.y" +#line 2494 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 447: -#line 2501 "objc-parse.y" +#line 2500 "objc-parse.y" { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4601,7 +4600,7 @@ case 447: ; break;} case 448: -#line 2511 "objc-parse.y" +#line 2510 "objc-parse.y" { remember_protocol_qualifiers (); objc_interface_context @@ -4609,7 +4608,7 @@ case 448: ; break;} case 449: -#line 2517 "objc-parse.y" +#line 2516 "objc-parse.y" { forget_protocol_qualifiers(); finish_protocol(objc_interface_context); @@ -4617,13 +4616,13 @@ case 449: ; break;} case 450: -#line 2526 "objc-parse.y" +#line 2525 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 452: -#line 2534 "objc-parse.y" +#line 2533 "objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; @@ -4632,54 +4631,54 @@ case 452: ; break;} case 455: -#line 2548 "objc-parse.y" +#line 2547 "objc-parse.y" { objc_public_flag = 2; ; break;} case 456: -#line 2549 "objc-parse.y" +#line 2548 "objc-parse.y" { objc_public_flag = 0; ; break;} case 457: -#line 2550 "objc-parse.y" +#line 2549 "objc-parse.y" { objc_public_flag = 1; ; break;} case 458: -#line 2555 "objc-parse.y" +#line 2554 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 460: -#line 2560 "objc-parse.y" +#line 2559 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 461: -#line 2578 "objc-parse.y" +#line 2577 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 462: -#line 2583 "objc-parse.y" +#line 2582 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 463: -#line 2588 "objc-parse.y" +#line 2587 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 464: -#line 2593 "objc-parse.y" +#line 2592 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 467: -#line 2600 "objc-parse.y" +#line 2599 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4688,7 +4687,7 @@ case 467: ; break;} case 468: -#line 2607 "objc-parse.y" +#line 2606 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4696,7 +4695,7 @@ case 468: ; break;} case 469: -#line 2613 "objc-parse.y" +#line 2612 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4705,7 +4704,7 @@ case 469: ; break;} case 470: -#line 2623 "objc-parse.y" +#line 2622 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4715,7 +4714,7 @@ case 470: ; break;} case 471: -#line 2631 "objc-parse.y" +#line 2630 "objc-parse.y" { forget_protocol_qualifiers (); add_class_method (objc_implementation_context, yyvsp[0].ttype); @@ -4724,20 +4723,20 @@ case 471: ; break;} case 472: -#line 2638 "objc-parse.y" +#line 2637 "objc-parse.y" { continue_method_def (); ; break;} case 473: -#line 2642 "objc-parse.y" +#line 2641 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 474: -#line 2648 "objc-parse.y" +#line 2647 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4747,7 +4746,7 @@ case 474: ; break;} case 475: -#line 2656 "objc-parse.y" +#line 2655 "objc-parse.y" { forget_protocol_qualifiers (); add_instance_method (objc_implementation_context, yyvsp[0].ttype); @@ -4756,28 +4755,28 @@ case 475: ; break;} case 476: -#line 2663 "objc-parse.y" +#line 2662 "objc-parse.y" { continue_method_def (); ; break;} case 477: -#line 2667 "objc-parse.y" +#line 2666 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 479: -#line 2679 "objc-parse.y" +#line 2678 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 484: -#line 2686 "objc-parse.y" +#line 2685 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 488: -#line 2696 "objc-parse.y" +#line 2695 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4785,7 +4784,7 @@ case 488: ; break;} case 489: -#line 2702 "objc-parse.y" +#line 2701 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4793,7 +4792,7 @@ case 489: ; break;} case 491: -#line 2710 "objc-parse.y" +#line 2709 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4801,7 +4800,7 @@ case 491: ; break;} case 492: -#line 2716 "objc-parse.y" +#line 2715 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4809,93 +4808,93 @@ case 492: ; break;} case 494: -#line 2726 "objc-parse.y" +#line 2725 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 495: -#line 2731 "objc-parse.y" +#line 2730 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 496: -#line 2736 "objc-parse.y" +#line 2735 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 497: -#line 2741 "objc-parse.y" +#line 2740 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 506: -#line 2771 "objc-parse.y" +#line 2770 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); ; break;} case 507: -#line 2775 "objc-parse.y" +#line 2774 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 508: -#line 2777 "objc-parse.y" +#line 2776 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 509: -#line 2782 "objc-parse.y" +#line 2781 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 510: -#line 2784 "objc-parse.y" +#line 2783 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 511: -#line 2792 "objc-parse.y" +#line 2791 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, yyvsp[0].ttype)); ; break;} case 512: -#line 2797 "objc-parse.y" +#line 2796 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, yyvsp[0].ttype)); ; break;} case 513: -#line 2802 "objc-parse.y" +#line 2801 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, yyvsp[0].ttype)); ; break;} case 514: -#line 2810 "objc-parse.y" +#line 2809 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 515: -#line 2814 "objc-parse.y" +#line 2813 "objc-parse.y" { /* oh what a kludge! */ yyval.ttype = objc_ellipsis_node; ; break;} case 516: -#line 2819 "objc-parse.y" +#line 2818 "objc-parse.y" { pushlevel (0); ; break;} case 517: -#line 2823 "objc-parse.y" +#line 2822 "objc-parse.y" { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; @@ -4903,119 +4902,119 @@ case 517: ; break;} case 520: -#line 2838 "objc-parse.y" +#line 2837 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 525: -#line 2851 "objc-parse.y" +#line 2850 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 526: -#line 2852 "objc-parse.y" +#line 2851 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 527: -#line 2853 "objc-parse.y" +#line 2852 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 528: -#line 2854 "objc-parse.y" +#line 2853 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 529: -#line 2855 "objc-parse.y" +#line 2854 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 530: -#line 2856 "objc-parse.y" +#line 2855 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 531: -#line 2857 "objc-parse.y" +#line 2856 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 532: -#line 2858 "objc-parse.y" +#line 2857 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 533: -#line 2859 "objc-parse.y" +#line 2858 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 534: -#line 2860 "objc-parse.y" +#line 2859 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 535: -#line 2861 "objc-parse.y" +#line 2860 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 536: -#line 2862 "objc-parse.y" +#line 2861 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 537: -#line 2863 "objc-parse.y" +#line 2862 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 538: -#line 2864 "objc-parse.y" +#line 2863 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 539: -#line 2865 "objc-parse.y" +#line 2864 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 540: -#line 2866 "objc-parse.y" +#line 2865 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 541: -#line 2867 "objc-parse.y" +#line 2866 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 542: -#line 2868 "objc-parse.y" +#line 2867 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 543: -#line 2869 "objc-parse.y" +#line 2868 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 546: -#line 2875 "objc-parse.y" +#line 2874 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 547: -#line 2880 "objc-parse.y" +#line 2879 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} case 548: -#line 2885 "objc-parse.y" +#line 2884 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 549: -#line 2890 "objc-parse.y" +#line 2889 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} case 553: -#line 2903 "objc-parse.y" +#line 2902 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 554: -#line 2911 "objc-parse.y" +#line 2910 "objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ @@ -5026,76 +5025,76 @@ case 554: ; break;} case 555: -#line 2923 "objc-parse.y" +#line 2922 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 556: -#line 2927 "objc-parse.y" +#line 2926 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 558: -#line 2935 "objc-parse.y" +#line 2934 "objc-parse.y" { yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} case 559: -#line 2942 "objc-parse.y" +#line 2941 "objc-parse.y" { objc_receiver_context = 1; ; break;} case 560: -#line 2944 "objc-parse.y" +#line 2943 "objc-parse.y" { objc_receiver_context = 0; ; break;} case 561: -#line 2946 "objc-parse.y" +#line 2945 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 565: -#line 2959 "objc-parse.y" +#line 2958 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 566: -#line 2966 "objc-parse.y" +#line 2965 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} case 567: -#line 2970 "objc-parse.y" +#line 2969 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} case 568: -#line 2977 "objc-parse.y" +#line 2976 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 569: -#line 2984 "objc-parse.y" +#line 2983 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 570: -#line 2993 "objc-parse.y" +#line 2992 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 543 "/usr/share/misc/bison.simple" +#line 543 "/usr/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -5315,5 +5314,5 @@ yyerrhandle: } return 1; } -#line 2998 "objc-parse.y" +#line 2997 "objc-parse.y" diff --git a/gcc/objc/objc-parse.y b/gcc/objc/objc-parse.y index 10e135ff66c..7bf9119175d 100644 --- a/gcc/objc/objc-parse.y +++ b/gcc/objc/objc-parse.y @@ -706,8 +706,7 @@ primary: IDENTIFIER_POINTER (DECL_NAME ($$))); else if ((TYPE_MODE (TREE_TYPE (TREE_TYPE ($$))) != TYPE_MODE (integer_type_node)) - && (TREE_TYPE (TREE_TYPE ($$)) - != void_type_node)) + && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE ($$)))) pedwarn ("type mismatch in implicit declaration for built-in function `%s'", IDENTIFIER_POINTER (DECL_NAME ($$))); /* If it really returns void, change that to int. */ diff --git a/gcc/stmt.c b/gcc/stmt.c index f134de17fee..5016e67c9f2 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -1860,7 +1860,7 @@ expand_expr_stmt (exp) if (! TREE_SIDE_EFFECTS (exp) && (extra_warnings || warn_unused_value) && !(TREE_CODE (exp) == CONVERT_EXPR - && TREE_TYPE (exp) == void_type_node)) + && VOID_TYPE_P (TREE_TYPE (exp)))) warning_with_file_and_line (emit_filename, emit_lineno, "statement with no effect"); else if (warn_unused_value) @@ -1970,7 +1970,7 @@ warn_if_unused_value (exp) case CONVERT_EXPR: case NON_LVALUE_EXPR: /* Don't warn about values cast to void. */ - if (TREE_TYPE (exp) == void_type_node) + if (VOID_TYPE_P (TREE_TYPE (exp))) return 0; /* Don't warn about conversions not explicit in the user's program. */ if (TREE_NO_UNUSED_WARNING (exp)) @@ -2849,7 +2849,7 @@ expand_return (retval) else if ((TREE_CODE (retval) == MODIFY_EXPR || TREE_CODE (retval) == INIT_EXPR) && TREE_CODE (TREE_OPERAND (retval, 0)) == RESULT_DECL) retval_rhs = TREE_OPERAND (retval, 1); - else if (TREE_TYPE (retval) == void_type_node) + else if (VOID_TYPE_P (TREE_TYPE (retval))) /* Recognize tail-recursive call to void function. */ retval_rhs = retval; else @@ -3074,7 +3074,7 @@ expand_return (retval) } else if (cleanups && retval_rhs != 0 - && TREE_TYPE (retval_rhs) != void_type_node + && !VOID_TYPE_P (TREE_TYPE (retval_rhs)) && (GET_CODE (result_rtl) == REG || (GET_CODE (result_rtl) == PARALLEL))) { diff --git a/gcc/tree.h b/gcc/tree.h index 6990ec22b25..450dbd1164a 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -453,9 +453,12 @@ extern void tree_class_check_failed PARAMS ((const tree, char, /* Nonzero if this type is a complete type. */ #define COMPLETE_TYPE_P(NODE) (TYPE_SIZE (NODE) != NULL_TREE) +/* Nonzero if this type is the (possibly qualified) void type. */ +#define VOID_TYPE_P(NODE) (TYPE_MAIN_VARIANT (NODE) == void_type_node) + /* Nonzero if this type is complete or is cv void. */ #define COMPLETE_OR_VOID_TYPE_P(NODE) \ - (COMPLETE_TYPE_P (NODE) || TREE_CODE (NODE) == VOID_TYPE) + (COMPLETE_TYPE_P (NODE) || VOID_TYPE_P (NODE)) /* Nonzero if this type is complete or is an array with unspecified bound. */ #define COMPLETE_OR_UNBOUND_ARRAY_TYPE_P(NODE) \ -- 2.30.2