From e2ecd91c7bff7cc5180c3bbd6dd1ff62b801350b Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Sun, 5 Sep 1999 01:06:48 +0000 Subject: c-decl.c (struct language_function): Renamed from struct c_function. * c-decl.c (struct language_function): Renamed from struct c_function. Delete elt NEXT. (c_function_chain): Delete. (push_c_function_context): New arg F. Don't warn about nested functions here. Fill LANGUAGE elt of F. Delete code to update c_function_chain. Don't call push_function_context. (pop_c_function_context): New arg F. Restore from there instead of from c_function_chain. Don't call pop_function_context. Clear out LANGUAGE field of F when done. * c-lang.c: Include "function.h" (lang_init): Initialize save_lang_status and restore_lang_status. * c-parse.in (nested_function, nested_function_notype): Warn about nested functions. Call push_function_context/pop_function_context instead of the _c_ variants. * c-tree.h (push_c_function_context, pop_c_function_context): Update prototype. * Makefile.in (c-lang.o): Update dependencies. * emit-rtl.c (init_emit): Use xmalloc to allocate regno_reg_rtx, regno_pointer_flag, regno_pointer_align. (gen_reg_rtx): Use xrealloc to enlarge them. (free_emit_status): New function. * function.c (mark_machine_status, mark_lang_status): New variables. (assign_stack_local_1): Renamed from assign_outer_stack_local. Merge in some bits from assign_stack_local. All callers changed to use new name. (assign_stack_local): Just call assign_stack_local_1. (free_after_compilation): New function. (put_reg_into_stack): Simplify to always call assign_stack_local_1. (trampoline_address): Likewise. (assign_parms): Use xcalloc/xrealloc to allocate parm_reg_stack_loc. (prepare_function_start): Explicitly clear some more variables. * function.h (struct function): New elt can_garbage_collect. (mark_machine_status, mark_lang_status): Declare variables. (free_after_compilation, free_emit_status, free_varasm_status, init_varasm_status): Declare functions. * toplev.c (rest_of_compilation): Call free_after_compilation when done with the current function. * varasm.c (free_varasm_status): New function. From-SVN: r29117 --- gcc/ChangeLog | 42 ++++ gcc/Makefile.in | 2 +- gcc/c-decl.c | 31 +-- gcc/c-lang.c | 4 + gcc/c-parse.c | 400 +++++++++++++++---------------- gcc/c-parse.in | 18 +- gcc/c-parse.y | 18 +- gcc/c-tree.h | 4 +- gcc/emit-rtl.c | 30 ++- gcc/function.c | 171 +++++--------- gcc/function.h | 9 + gcc/objc/objc-parse.c | 642 +++++++++++++++++++++++++------------------------- gcc/objc/objc-parse.y | 18 +- gcc/toplev.c | 4 + gcc/varasm.c | 16 ++ 15 files changed, 735 insertions(+), 674 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d417604..2eaa68f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,45 @@ +Sat Sep 4 18:01:45 1999 Bernd Schmidt + + * c-decl.c (struct language_function): Renamed from struct c_function. + Delete elt NEXT. + (c_function_chain): Delete. + (push_c_function_context): New arg F. Don't warn about nested + functions here. Fill LANGUAGE elt of F. Delete code to update + c_function_chain. Don't call push_function_context. + (pop_c_function_context): New arg F. Restore from there instead of + from c_function_chain. Don't call pop_function_context. Clear out + LANGUAGE field of F when done. + * c-lang.c: Include "function.h" + (lang_init): Initialize save_lang_status and restore_lang_status. + * c-parse.in (nested_function, nested_function_notype): Warn about + nested functions. Call push_function_context/pop_function_context + instead of the _c_ variants. + * c-tree.h (push_c_function_context, pop_c_function_context): Update + prototype. + * Makefile.in (c-lang.o): Update dependencies. + + * emit-rtl.c (init_emit): Use xmalloc to allocate regno_reg_rtx, + regno_pointer_flag, regno_pointer_align. + (gen_reg_rtx): Use xrealloc to enlarge them. + (free_emit_status): New function. + * function.c (mark_machine_status, mark_lang_status): New variables. + (assign_stack_local_1): Renamed from assign_outer_stack_local. Merge + in some bits from assign_stack_local. All callers changed to use new + name. + (assign_stack_local): Just call assign_stack_local_1. + (free_after_compilation): New function. + (put_reg_into_stack): Simplify to always call assign_stack_local_1. + (trampoline_address): Likewise. + (assign_parms): Use xcalloc/xrealloc to allocate parm_reg_stack_loc. + (prepare_function_start): Explicitly clear some more variables. + * function.h (struct function): New elt can_garbage_collect. + (mark_machine_status, mark_lang_status): Declare variables. + (free_after_compilation, free_emit_status, free_varasm_status, + init_varasm_status): Declare functions. + * toplev.c (rest_of_compilation): Call free_after_compilation when + done with the current function. + * varasm.c (free_varasm_status): New function. + Sat Sep 4 17:15:13 1999 Richard Henderson * sparc.h (EXPAND_BUILTIN_VA_START): Define. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 2ff35b7..a358df2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -1335,7 +1335,7 @@ c-decl.o : c-decl.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h \ c-typeck.o : c-typeck.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h \ flags.h intl.h output.h $(EXPR_H) $(RTL_H) toplev.h c-lang.o : c-lang.c $(CONFIG_H) system.h $(TREE_H) c-tree.h c-common.h \ - c-lex.h toplev.h output.h + c-lex.h toplev.h output.h function.h c-lex.o : c-lex.c $(CONFIG_H) system.h $(TREE_H) $(RTL_H) c-lex.h c-tree.h \ c-common.h $(srcdir)/c-parse.h $(srcdir)/c-gperf.h c-pragma.h input.h \ intl.h flags.h toplev.h output.h mbchar.h diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 97fdd8a..68720ec 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6981,9 +6981,8 @@ finish_function (nested) that keep track of the progress of compilation of the current function. Used for nested functions. */ -struct c_function +struct language_function { - struct c_function *next; tree named_labels; tree shadowed_labels; int returns_value; @@ -6993,24 +6992,16 @@ struct c_function struct binding_level *binding_level; }; -struct c_function *c_function_chain; - /* Save and reinitialize the variables used during compilation of a C function. */ void -push_c_function_context () +push_c_function_context (f) + struct function *f; { - struct c_function *p - = (struct c_function *) xmalloc (sizeof (struct c_function)); - - if (pedantic) - pedwarn ("ANSI C forbids nested functions"); - - push_function_context (); - - p->next = c_function_chain; - c_function_chain = p; + struct language_function *p; + p = (struct language_function *) xmalloc (sizeof (struct language_function)); + f->language = p; p->named_labels = named_labels; p->shadowed_labels = shadowed_labels; @@ -7024,9 +7015,10 @@ push_c_function_context () /* Restore the variables used during compilation of a C function. */ void -pop_c_function_context () +pop_c_function_context (f) + struct function *f; { - struct c_function *p = c_function_chain; + struct language_function *p = f->language; tree link; /* Bring back all the labels that were shadowed. */ @@ -7044,10 +7036,6 @@ pop_c_function_context () DECL_ARGUMENTS (current_function_decl) = 0; } - pop_function_context (); - - c_function_chain = p->next; - named_labels = p->named_labels; shadowed_labels = p->shadowed_labels; current_function_returns_value = p->returns_value; @@ -7057,6 +7045,7 @@ pop_c_function_context () current_binding_level = p->binding_level; free (p); + f->language = 0; } /* integrate_decl_tree calls this function, but since we don't use the diff --git a/gcc/c-lang.c b/gcc/c-lang.c index c8c4645..dbf46c4 100644 --- a/gcc/c-lang.c +++ b/gcc/c-lang.c @@ -22,6 +22,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" #include "tree.h" +#include "function.h" #include "input.h" #include "c-tree.h" #include "c-lex.h" @@ -68,6 +69,9 @@ lang_init () check_newline (); yy_cur--; #endif + + save_lang_status = &push_c_function_context; + restore_lang_status = &pop_c_function_context; } void diff --git a/gcc/c-parse.c b/gcc/c-parse.c index 9f2e7af..17a6b75 100644 --- a/gcc/c-parse.c +++ b/gcc/c-parse.c @@ -380,27 +380,27 @@ static const short yyrline[] = { 0, 1013, 1016, 1020, 1023, 1027, 1032, 1035, 1039, 1042, 1044, 1046, 1048, 1055, 1057, 1058, 1059, 1064, 1066, 1071, 1079, 1084, 1088, 1091, 1093, 1098, 1100, 1101, 1104, 1104, 1107, - 1110, 1112, 1114, 1117, 1119, 1122, 1128, 1130, 1134, 1145, - 1153, 1157, 1168, 1176, 1183, 1185, 1190, 1193, 1198, 1200, - 1202, 1209, 1211, 1219, 1225, 1230, 1232, 1234, 1241, 1243, - 1249, 1255, 1257, 1259, 1264, 1266, 1273, 1275, 1278, 1281, - 1285, 1288, 1292, 1295, 1299, 1304, 1306, 1310, 1312, 1314, - 1316, 1320, 1322, 1325, 1328, 1331, 1334, 1338, 1340, 1343, - 1345, 1350, 1353, 1358, 1360, 1362, 1376, 1383, 1388, 1394, - 1399, 1401, 1406, 1408, 1412, 1416, 1420, 1430, 1432, 1437, - 1442, 1445, 1449, 1452, 1456, 1459, 1462, 1465, 1469, 1472, - 1476, 1480, 1482, 1484, 1486, 1488, 1490, 1492, 1494, 1498, - 1506, 1514, 1516, 1518, 1522, 1524, 1527, 1530, 1541, 1543, - 1548, 1550, 1553, 1567, 1570, 1573, 1575, 1577, 1585, 1593, - 1603, 1621, 1626, 1631, 1634, 1648, 1657, 1661, 1665, 1669, - 1675, 1679, 1684, 1687, 1692, 1695, 1696, 1713, 1718, 1721, - 1733, 1735, 1745, 1755, 1756, 1764, 1767, 1779, 1783, 1800, - 1810, 1819, 1824, 1829, 1834, 1838, 1842, 1853, 1860, 1867, - 1874, 1885, 1891, 1894, 1899, 1922, 1956, 1987, 2018, 2033, - 2047, 2051, 2055, 2058, 2063, 2065, 2068, 2070, 2074, 2079, - 2082, 2088, 2093, 2098, 2100, 2109, 2110, 2116, 2118, 2128, - 2130, 2134, 2137, 2143, 2153, 2162, 2171, 2181, 2195, 2200, - 2205, 2207, 2216, 2219, 2224, 2227, 2231 + 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, 1331, 1334, 1337, 1340, 1344, 1346, 1349, + 1351, 1356, 1359, 1364, 1366, 1368, 1382, 1389, 1394, 1400, + 1405, 1407, 1412, 1414, 1418, 1422, 1426, 1436, 1438, 1443, + 1448, 1451, 1455, 1458, 1462, 1465, 1468, 1471, 1475, 1478, + 1482, 1486, 1488, 1490, 1492, 1494, 1496, 1498, 1500, 1504, + 1512, 1520, 1522, 1524, 1528, 1530, 1533, 1536, 1547, 1549, + 1554, 1556, 1559, 1573, 1576, 1579, 1581, 1583, 1591, 1599, + 1609, 1627, 1632, 1637, 1640, 1654, 1663, 1667, 1671, 1675, + 1681, 1685, 1690, 1693, 1698, 1701, 1702, 1719, 1724, 1727, + 1739, 1741, 1751, 1761, 1762, 1770, 1773, 1785, 1789, 1806, + 1816, 1825, 1830, 1835, 1840, 1844, 1848, 1859, 1866, 1873, + 1880, 1891, 1897, 1900, 1905, 1928, 1962, 1993, 2024, 2039, + 2053, 2057, 2061, 2064, 2069, 2071, 2074, 2076, 2080, 2085, + 2088, 2094, 2099, 2104, 2106, 2115, 2116, 2122, 2124, 2134, + 2136, 2140, 2143, 2149, 2159, 2168, 2177, 2187, 2201, 2206, + 2211, 2213, 2222, 2225, 2230, 2233, 2237 }; #endif @@ -2759,241 +2759,247 @@ case 208: break;} case 209: #line 1136 "c-parse.y" -{ push_c_function_context (); +{ if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); ; break;} case 210: -#line 1145 "c-parse.y" +#line 1148 "c-parse.y" { store_parm_decls (); ; break;} case 211: -#line 1153 "c-parse.y" +#line 1156 "c-parse.y" { finish_function (1); - pop_c_function_context (); ; + pop_function_context (); ; break;} case 212: -#line 1159 "c-parse.y" -{ push_c_function_context (); +#line 1162 "c-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); ; break;} case 213: -#line 1168 "c-parse.y" +#line 1174 "c-parse.y" { store_parm_decls (); ; break;} case 214: -#line 1176 "c-parse.y" +#line 1182 "c-parse.y" { finish_function (1); - pop_c_function_context (); ; + pop_function_context (); ; break;} case 217: -#line 1192 "c-parse.y" +#line 1198 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 218: -#line 1194 "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 1199 "c-parse.y" +#line 1205 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 220: -#line 1201 "c-parse.y" +#line 1207 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 221: -#line 1203 "c-parse.y" +#line 1209 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 222: -#line 1210 "c-parse.y" +#line 1216 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 224: -#line 1221 "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 1226 "c-parse.y" +#line 1232 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc9x) error ("`[*]' in parameter declaration only allowed in ISO C 9x"); ; break;} case 226: -#line 1231 "c-parse.y" +#line 1237 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 227: -#line 1233 "c-parse.y" +#line 1239 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 228: -#line 1235 "c-parse.y" +#line 1241 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 229: -#line 1242 "c-parse.y" +#line 1248 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 231: -#line 1251 "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 1256 "c-parse.y" +#line 1262 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 233: -#line 1258 "c-parse.y" +#line 1264 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 234: -#line 1260 "c-parse.y" +#line 1266 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, NULL_TREE); if (! flag_isoc9x) error ("`[*]' in parameter declaration only allowed in ISO C 9x"); ; break;} case 235: -#line 1265 "c-parse.y" +#line 1271 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 236: -#line 1267 "c-parse.y" +#line 1273 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 237: -#line 1274 "c-parse.y" +#line 1280 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 239: -#line 1280 "c-parse.y" +#line 1286 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 240: -#line 1282 "c-parse.y" +#line 1288 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 241: -#line 1287 "c-parse.y" +#line 1293 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 242: -#line 1289 "c-parse.y" +#line 1295 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 243: -#line 1294 "c-parse.y" +#line 1300 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 244: -#line 1296 "c-parse.y" +#line 1302 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 245: -#line 1301 "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 1305 "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 1307 "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 1311 "c-parse.y" +#line 1317 "c-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 249: -#line 1313 "c-parse.y" +#line 1319 "c-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 250: -#line 1315 "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 1317 "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 1321 "c-parse.y" +#line 1327 "c-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 253: -#line 1323 "c-parse.y" +#line 1329 "c-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 254: -#line 1326 "c-parse.y" +#line 1332 "c-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 255: -#line 1329 "c-parse.y" +#line 1335 "c-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (NULL_TREE); ; break;} case 256: -#line 1332 "c-parse.y" +#line 1338 "c-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 257: -#line 1335 "c-parse.y" +#line 1341 "c-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 261: -#line 1346 "c-parse.y" +#line 1352 "c-parse.y" { if (pedantic && ! flag_isoc9x) pedwarn ("comma at end of enumerator list"); ; break;} case 262: -#line 1352 "c-parse.y" +#line 1358 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 263: -#line 1354 "c-parse.y" +#line 1360 "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 1359 "c-parse.y" +#line 1365 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 265: -#line 1361 "c-parse.y" +#line 1367 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 266: -#line 1363 "c-parse.y" +#line 1369 "c-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 267: -#line 1378 "c-parse.y" +#line 1384 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -3001,14 +3007,14 @@ case 267: resume_momentary (yyvsp[-1].itype); ; break;} case 268: -#line 1384 "c-parse.y" +#line 1390 "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 269: -#line 1389 "c-parse.y" +#line 1395 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -3016,144 +3022,144 @@ case 269: resume_momentary (yyvsp[-1].itype); ; break;} case 270: -#line 1395 "c-parse.y" +#line 1401 "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 1400 "c-parse.y" +#line 1406 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 272: -#line 1402 "c-parse.y" +#line 1408 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-1].itype; ; break;} case 274: -#line 1409 "c-parse.y" +#line 1415 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 275: -#line 1414 "c-parse.y" +#line 1420 "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 1418 "c-parse.y" +#line 1424 "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 1421 "c-parse.y" +#line 1427 "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 1433 "c-parse.y" +#line 1439 "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 1438 "c-parse.y" +#line 1444 "c-parse.y" { yyval.ttype = error_mark_node; ; break;} case 281: -#line 1444 "c-parse.y" +#line 1450 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 282: -#line 1446 "c-parse.y" +#line 1452 "c-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 283: -#line 1451 "c-parse.y" +#line 1457 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 284: -#line 1453 "c-parse.y" +#line 1459 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 285: -#line 1458 "c-parse.y" +#line 1464 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 287: -#line 1464 "c-parse.y" +#line 1470 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 288: -#line 1466 "c-parse.y" +#line 1472 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 289: -#line 1471 "c-parse.y" +#line 1477 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 290: -#line 1473 "c-parse.y" +#line 1479 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 291: -#line 1478 "c-parse.y" +#line 1484 "c-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 292: -#line 1481 "c-parse.y" +#line 1487 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 293: -#line 1483 "c-parse.y" +#line 1489 "c-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 294: -#line 1485 "c-parse.y" +#line 1491 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 295: -#line 1487 "c-parse.y" +#line 1493 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 296: -#line 1489 "c-parse.y" +#line 1495 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 297: -#line 1491 "c-parse.y" +#line 1497 "c-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 298: -#line 1493 "c-parse.y" +#line 1499 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 299: -#line 1495 "c-parse.y" +#line 1501 "c-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 300: -#line 1499 "c-parse.y" +#line 1505 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 301: -#line 1508 "c-parse.y" +#line 1514 "c-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 303: -#line 1517 "c-parse.y" +#line 1523 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 304: -#line 1519 "c-parse.y" +#line 1525 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 308: -#line 1531 "c-parse.y" +#line 1537 "c-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3162,12 +3168,12 @@ case 308: ; break;} case 310: -#line 1544 "c-parse.y" +#line 1550 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 313: -#line 1555 "c-parse.y" +#line 1561 "c-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3178,19 +3184,19 @@ case 313: ; break;} case 314: -#line 1569 "c-parse.y" +#line 1575 "c-parse.y" {; break;} case 316: -#line 1573 "c-parse.y" +#line 1579 "c-parse.y" { compstmt_count++; ; break;} case 317: -#line 1576 "c-parse.y" +#line 1582 "c-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 318: -#line 1578 "c-parse.y" +#line 1584 "c-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); @@ -3200,7 +3206,7 @@ case 318: pop_momentary (); ; break;} case 319: -#line 1586 "c-parse.y" +#line 1592 "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); @@ -3210,7 +3216,7 @@ case 319: pop_momentary (); ; break;} case 320: -#line 1594 "c-parse.y" +#line 1600 "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); @@ -3220,7 +3226,7 @@ case 320: pop_momentary (); ; break;} case 321: -#line 1605 "c-parse.y" +#line 1611 "c-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3238,11 +3244,11 @@ case 321: ; break;} case 322: -#line 1622 "c-parse.y" +#line 1628 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 325: -#line 1636 "c-parse.y" +#line 1642 "c-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3252,7 +3258,7 @@ case 325: position_after_white_space (); ; break;} case 326: -#line 1650 "c-parse.y" +#line 1656 "c-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3262,43 +3268,43 @@ case 326: position_after_white_space (); ; break;} case 327: -#line 1658 "c-parse.y" +#line 1664 "c-parse.y" { expand_loop_continue_here (); ; break;} case 328: -#line 1662 "c-parse.y" +#line 1668 "c-parse.y" { yyval.filename = input_filename; ; break;} case 329: -#line 1666 "c-parse.y" +#line 1672 "c-parse.y" { yyval.lineno = lineno; ; break;} case 330: -#line 1671 "c-parse.y" +#line 1677 "c-parse.y" { ; break;} case 331: -#line 1676 "c-parse.y" +#line 1682 "c-parse.y" { ; break;} case 332: -#line 1681 "c-parse.y" +#line 1687 "c-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 333: -#line 1686 "c-parse.y" +#line 1692 "c-parse.y" { yyval.ends_in_label = 0; ; break;} case 334: -#line 1688 "c-parse.y" +#line 1694 "c-parse.y" { yyval.ends_in_label = 1; ; break;} case 335: -#line 1694 "c-parse.y" +#line 1700 "c-parse.y" { stmt_count++; ; break;} case 337: -#line 1697 "c-parse.y" +#line 1703 "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 @@ -3317,19 +3323,19 @@ case 337: clear_momentary (); ; break;} case 338: -#line 1714 "c-parse.y" +#line 1720 "c-parse.y" { c_expand_start_else (); yyvsp[-1].itype = stmt_count; position_after_white_space (); ; break;} case 339: -#line 1718 "c-parse.y" +#line 1724 "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 1722 "c-parse.y" +#line 1728 "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 @@ -3340,11 +3346,11 @@ case 340: "empty body in an if-statement"); ; break;} case 341: -#line 1734 "c-parse.y" +#line 1740 "c-parse.y" { c_expand_end_cond (); ; break;} case 342: -#line 1736 "c-parse.y" +#line 1742 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3356,7 +3362,7 @@ case 342: emit_nop (); ; break;} case 343: -#line 1746 "c-parse.y" +#line 1752 "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. */ @@ -3367,11 +3373,11 @@ case 343: position_after_white_space (); ; break;} case 344: -#line 1755 "c-parse.y" +#line 1761 "c-parse.y" { expand_end_loop (); ; break;} case 345: -#line 1758 "c-parse.y" +#line 1764 "c-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); @@ -3379,12 +3385,12 @@ case 345: clear_momentary (); ; break;} case 346: -#line 1765 "c-parse.y" +#line 1771 "c-parse.y" { expand_end_loop (); clear_momentary (); ; break;} case 347: -#line 1769 "c-parse.y" +#line 1775 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3397,12 +3403,12 @@ case 347: ; break;} case 348: -#line 1781 "c-parse.y" +#line 1787 "c-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 349: -#line 1784 "c-parse.y" +#line 1790 "c-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -3420,7 +3426,7 @@ case 349: position_after_white_space (); ; break;} case 350: -#line 1800 "c-parse.y" +#line 1806 "c-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -3433,7 +3439,7 @@ case 350: expand_end_loop (); ; break;} case 351: -#line 1811 "c-parse.y" +#line 1817 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); @@ -3443,7 +3449,7 @@ case 351: position_after_white_space (); ; break;} case 352: -#line 1819 "c-parse.y" +#line 1825 "c-parse.y" { expand_end_case (yyvsp[-3].ttype); if (yychar == CONSTANT || yychar == STRING) pop_momentary_nofree (); @@ -3451,33 +3457,33 @@ case 352: pop_momentary (); ; break;} case 353: -#line 1825 "c-parse.y" +#line 1831 "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 1830 "c-parse.y" +#line 1836 "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 1835 "c-parse.y" +#line 1841 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 356: -#line 1839 "c-parse.y" +#line 1845 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 357: -#line 1843 "c-parse.y" +#line 1849 "c-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -3489,7 +3495,7 @@ case 357: error ("argument of `asm' is not a constant string"); ; break;} case 358: -#line 1854 "c-parse.y" +#line 1860 "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, @@ -3497,7 +3503,7 @@ case 358: input_filename, lineno); ; break;} case 359: -#line 1861 "c-parse.y" +#line 1867 "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, @@ -3505,7 +3511,7 @@ case 359: input_filename, lineno); ; break;} case 360: -#line 1869 "c-parse.y" +#line 1875 "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, @@ -3513,7 +3519,7 @@ case 360: input_filename, lineno); ; break;} case 361: -#line 1875 "c-parse.y" +#line 1881 "c-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -3526,7 +3532,7 @@ case 361: ; break;} case 362: -#line 1886 "c-parse.y" +#line 1892 "c-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -3534,7 +3540,7 @@ case 362: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 365: -#line 1901 "c-parse.y" +#line 1907 "c-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -3557,14 +3563,14 @@ case 365: ; break;} case 366: -#line 1922 "c-parse.y" +#line 1928 "c-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 367: -#line 1957 "c-parse.y" +#line 1963 "c-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -3597,7 +3603,7 @@ case 367: position_after_white_space (); ; break;} case 368: -#line 1988 "c-parse.y" +#line 1994 "c-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -3630,7 +3636,7 @@ case 368: position_after_white_space (); ; break;} case 369: -#line 2019 "c-parse.y" +#line 2025 "c-parse.y" { tree duplicate; register tree label @@ -3647,7 +3653,7 @@ case 369: position_after_white_space (); ; break;} case 370: -#line 2034 "c-parse.y" +#line 2040 "c-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -3659,52 +3665,52 @@ case 370: position_after_white_space (); ; break;} case 371: -#line 2049 "c-parse.y" +#line 2055 "c-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 372: -#line 2052 "c-parse.y" +#line 2058 "c-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 373: -#line 2057 "c-parse.y" +#line 2063 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 375: -#line 2064 "c-parse.y" +#line 2070 "c-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 378: -#line 2071 "c-parse.y" +#line 2077 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 379: -#line 2076 "c-parse.y" +#line 2082 "c-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 380: -#line 2081 "c-parse.y" +#line 2087 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 381: -#line 2083 "c-parse.y" +#line 2089 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 382: -#line 2089 "c-parse.y" +#line 2095 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 383: -#line 2093 "c-parse.y" +#line 2099 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 385: -#line 2101 "c-parse.y" +#line 2107 "c-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -3714,19 +3720,19 @@ case 385: clear_parm_order (); ; break;} case 386: -#line 2109 "c-parse.y" +#line 2115 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 387: -#line 2111 "c-parse.y" +#line 2117 "c-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 388: -#line 2117 "c-parse.y" +#line 2123 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 389: -#line 2119 "c-parse.y" +#line 2125 "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. @@ -3738,23 +3744,23 @@ case 389: ; break;} case 390: -#line 2129 "c-parse.y" +#line 2135 "c-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 391: -#line 2131 "c-parse.y" +#line 2137 "c-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 392: -#line 2136 "c-parse.y" +#line 2142 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 393: -#line 2138 "c-parse.y" +#line 2144 "c-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 394: -#line 2145 "c-parse.y" +#line 2151 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3765,7 +3771,7 @@ case 394: resume_momentary (yyvsp[-2].itype); ; break;} case 395: -#line 2154 "c-parse.y" +#line 2160 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3776,7 +3782,7 @@ case 395: resume_momentary (yyvsp[-2].itype); ; break;} case 396: -#line 2163 "c-parse.y" +#line 2169 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3787,7 +3793,7 @@ case 396: resume_momentary (yyvsp[-2].itype); ; break;} case 397: -#line 2172 "c-parse.y" +#line 2178 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3798,7 +3804,7 @@ case 397: resume_momentary (yyvsp[-2].itype); ; break;} case 398: -#line 2182 "c-parse.y" +#line 2188 "c-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -3809,19 +3815,19 @@ case 398: resume_momentary (yyvsp[-2].itype); ; break;} case 399: -#line 2196 "c-parse.y" +#line 2202 "c-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 400: -#line 2200 "c-parse.y" +#line 2206 "c-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 402: -#line 2208 "c-parse.y" +#line 2214 "c-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -3829,23 +3835,23 @@ case 402: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 403: -#line 2218 "c-parse.y" +#line 2224 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 404: -#line 2220 "c-parse.y" +#line 2226 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 405: -#line 2226 "c-parse.y" +#line 2232 "c-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 406: -#line 2228 "c-parse.y" +#line 2234 "c-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 407: -#line 2233 "c-parse.y" +#line 2239 "c-parse.y" { yyval.itype = pedantic; pedantic = 0; ; break;} @@ -4071,5 +4077,5 @@ yyerrhandle: } return 1; } -#line 2237 "c-parse.y" +#line 2243 "c-parse.y" diff --git a/gcc/c-parse.in b/gcc/c-parse.in index a329a16..7dd6520 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -1301,11 +1301,14 @@ end ifc nested_function: declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1319,16 +1322,19 @@ nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; notype_nested_function: notype_declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1342,7 +1348,7 @@ notype_nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; /* Any kind of declarator (thus, all declarators allowed diff --git a/gcc/c-parse.y b/gcc/c-parse.y index 9833b0f..14b381a 100644 --- a/gcc/c-parse.y +++ b/gcc/c-parse.y @@ -1133,11 +1133,14 @@ designator: nested_function: declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1151,16 +1154,19 @@ nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; notype_nested_function: notype_declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1174,7 +1180,7 @@ notype_nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; /* Any kind of declarator (thus, all declarators allowed diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 8e5aa73..e11ed7b 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -222,13 +222,13 @@ extern tree lookup_name_current_level_global PROTO((tree)); extern tree maybe_build_cleanup PROTO((tree)); extern void parmlist_tags_warning PROTO((void)); extern void pending_xref_error PROTO((void)); -extern void pop_c_function_context PROTO((void)); +extern void push_c_function_context PROTO((struct function *)); +extern void pop_c_function_context PROTO((struct function *)); extern void pop_label_level PROTO((void)); extern tree poplevel PROTO((int, int, int)); extern void print_lang_decl PROTO((FILE *, tree, int)); extern void print_lang_identifier PROTO((FILE *, tree, int)); extern void print_lang_type PROTO((FILE *, tree, int)); -extern void push_c_function_context PROTO((void)); extern void push_label_level PROTO((void)); extern void push_parm_decl PROTO((tree)); extern tree pushdecl PROTO((tree)); diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index c16ffe4..fd04427 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -502,18 +502,17 @@ gen_reg_rtx (mode) { int old_size = f->emit->regno_pointer_flag_length; rtx *new1; - char *new = (char *) savealloc (old_size * 2); - memcpy (new, f->emit->regno_pointer_flag, old_size); + char *new; + new = xrealloc (f->emit->regno_pointer_flag, old_size * 2); memset (new + old_size, 0, old_size); f->emit->regno_pointer_flag = new; - new = (char *) savealloc (old_size * 2); - memcpy (new, f->emit->regno_pointer_align, old_size); + new = xrealloc (f->emit->regno_pointer_align, old_size * 2); memset (new + old_size, 0, old_size); f->emit->regno_pointer_align = new; - new1 = (rtx *) savealloc (old_size * 2 * sizeof (rtx)); - memcpy (new1, regno_reg_rtx, old_size * sizeof (rtx)); + new1 = (rtx *) xrealloc (f->emit->x_regno_reg_rtx, + old_size * 2 * sizeof (rtx)); memset (new1 + old_size, 0, old_size * sizeof (rtx)); regno_reg_rtx = new1; @@ -1597,6 +1596,19 @@ restore_emit_status (p) last_label_num = 0; clear_emit_caches (); } + +/* Clear out all parts of our state in F that can safely be discarded + after the function has been compiled, to let garbage collection + reclaim the memory. */ +void +free_emit_status (f) + struct function *f; +{ + free (f->emit->x_regno_reg_rtx); + free (f->emit->regno_pointer_flag); + free (f->emit->regno_pointer_align); + f->emit->x_regno_reg_rtx = 0; +} /* Go through all the RTL insn bodies and copy any invalid shared structure. It does not work to do this twice, because the mark bits set here @@ -3404,15 +3416,15 @@ init_emit () f->emit->regno_pointer_flag_length = LAST_VIRTUAL_REGISTER + 101; f->emit->regno_pointer_flag - = (char *) savealloc (f->emit->regno_pointer_flag_length); + = (char *) xmalloc (f->emit->regno_pointer_flag_length); bzero (f->emit->regno_pointer_flag, f->emit->regno_pointer_flag_length); f->emit->regno_pointer_align - = (char *) savealloc (f->emit->regno_pointer_flag_length); + = (char *) xmalloc (f->emit->regno_pointer_flag_length); bzero (f->emit->regno_pointer_align, f->emit->regno_pointer_flag_length); regno_reg_rtx - = (rtx *) savealloc (f->emit->regno_pointer_flag_length * sizeof (rtx)); + = (rtx *) xmalloc (f->emit->regno_pointer_flag_length * sizeof (rtx)); bzero ((char *) regno_reg_rtx, f->emit->regno_pointer_flag_length * sizeof (rtx)); diff --git a/gcc/function.c b/gcc/function.c index 6d07ff3..cb474b2 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -120,10 +120,12 @@ static int virtuals_instantiated; void (*init_machine_status) PROTO((struct function *)); void (*save_machine_status) PROTO((struct function *)); void (*restore_machine_status) PROTO((struct function *)); +void (*mark_machine_status) PROTO((struct function *)); /* Likewise, but for language-specific data. */ void (*save_lang_status) PROTO((struct function *)); void (*restore_lang_status) PROTO((struct function *)); +void (*mark_lang_status) PROTO((struct function *)); /* The FUNCTION_DECL for an inline function currently being expanded. */ tree inline_function_decl; @@ -219,7 +221,7 @@ struct insns_for_mem_entry { /* Forward declarations. */ -static rtx assign_outer_stack_local PROTO ((enum machine_mode, HOST_WIDE_INT, +static rtx assign_stack_local_1 PROTO ((enum machine_mode, HOST_WIDE_INT, int, struct function *)); static rtx assign_stack_temp_for_type PROTO ((enum machine_mode, HOST_WIDE_INT, int, tree)); @@ -375,6 +377,21 @@ pop_function_context () { pop_function_context_from (current_function_decl); } + +/* Clear out all parts of the state in F that can safely be discarded + after the function has been compiled, to let garbage collection + reclaim the memory. */ +void +free_after_compilation (f) + struct function *f; +{ + free_emit_status (f); + free_varasm_status (f); + + free (f->x_parm_reg_stack_loc); + + f->can_garbage_collect = 1; +} /* Allocate fixed slots in the stack frame of the current function. */ @@ -411,18 +428,27 @@ get_frame_size () -1 means use BIGGEST_ALIGNMENT and round size to multiple of that, positive specifies alignment boundary in bits. - We do not round to stack_boundary here. */ + We do not round to stack_boundary here. -rtx -assign_stack_local (mode, size, align) + FUNCTION specifies the function to allocate in. */ + +static rtx +assign_stack_local_1 (mode, size, align, function) enum machine_mode mode; HOST_WIDE_INT size; int align; + struct function *function; { register rtx x, addr; int bigend_correction = 0; int alignment; + /* Allocate in the memory associated with the function in whose frame + we are assigning. */ + if (function != current_function) + push_obstacks (function->function_obstack, + function->function_maybepermanent_obstack); + if (align == 0) { tree type; @@ -448,7 +474,7 @@ assign_stack_local (mode, size, align) alignment = align / BITS_PER_UNIT; #ifdef FRAME_GROWS_DOWNWARD - frame_offset -= size; + function->x_frame_offset -= size; #endif /* Round frame offset to that alignment. @@ -457,9 +483,9 @@ assign_stack_local (mode, size, align) like. So we instead assume that ALIGNMENT is a power of two and use logical operations which are unambiguous. */ #ifdef FRAME_GROWS_DOWNWARD - frame_offset = FLOOR_ROUND (frame_offset, alignment); + function->x_frame_offset = FLOOR_ROUND (function->x_frame_offset, alignment); #else - frame_offset = CEIL_ROUND (frame_offset, alignment); + function->x_frame_offset = CEIL_ROUND (function->x_frame_offset, alignment); #endif /* On a big-endian machine, if we are allocating more space than we will use, @@ -469,7 +495,7 @@ assign_stack_local (mode, size, align) /* If we have already instantiated virtual registers, return the actual address relative to the frame pointer. */ - if (virtuals_instantiated) + if (function == current_function && virtuals_instantiated) addr = plus_constant (frame_pointer_rtx, (frame_offset + bigend_correction + STARTING_FRAME_OFFSET)); @@ -478,90 +504,29 @@ assign_stack_local (mode, size, align) frame_offset + bigend_correction); #ifndef FRAME_GROWS_DOWNWARD - frame_offset += size; + function->x_frame_offset += size; #endif x = gen_rtx_MEM (mode, addr); - stack_slot_list = gen_rtx_EXPR_LIST (VOIDmode, x, stack_slot_list); + function->x_stack_slot_list + = gen_rtx_EXPR_LIST (VOIDmode, x, function->x_stack_slot_list); + + if (function != current_function) + pop_obstacks (); return x; } -/* Assign a stack slot in a containing function. - First three arguments are same as in preceding function. - The last argument specifies the function to allocate in. */ - -static rtx -assign_outer_stack_local (mode, size, align, function) +/* Wrapper around assign_stack_local_1; assign a local stack slot for the + current function. */ +rtx +assign_stack_local (mode, size, align) enum machine_mode mode; HOST_WIDE_INT size; int align; - struct function *function; { - register rtx x, addr; - int bigend_correction = 0; - int alignment; - - /* Allocate in the memory associated with the function in whose frame - we are assigning. */ - push_obstacks (function->function_obstack, - function->function_maybepermanent_obstack); - - if (align == 0) - { - tree type; - - alignment = GET_MODE_ALIGNMENT (mode); - if (mode == BLKmode) - alignment = BIGGEST_ALIGNMENT; - - /* Allow the target to (possibly) increase the alignment of this - stack slot. */ - type = type_for_mode (mode, 0); - if (type) - alignment = LOCAL_ALIGNMENT (type, alignment); - - alignment /= BITS_PER_UNIT; - } - else if (align == -1) - { - alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT; - size = CEIL_ROUND (size, alignment); - } - else - alignment = align / BITS_PER_UNIT; - -#ifdef FRAME_GROWS_DOWNWARD - function->x_frame_offset -= size; -#endif - - /* Round frame offset to that alignment. */ -#ifdef FRAME_GROWS_DOWNWARD - function->x_frame_offset = FLOOR_ROUND (function->x_frame_offset, alignment); -#else - function->x_frame_offset = CEIL_ROUND (function->x_frame_offset, alignment); -#endif - - /* On a big-endian machine, if we are allocating more space than we will use, - use the least significant bytes of those that are allocated. */ - if (BYTES_BIG_ENDIAN && mode != BLKmode) - bigend_correction = size - GET_MODE_SIZE (mode); - - addr = plus_constant (virtual_stack_vars_rtx, - function->x_frame_offset + bigend_correction); -#ifndef FRAME_GROWS_DOWNWARD - function->x_frame_offset += size; -#endif - - x = gen_rtx_MEM (mode, addr); - - function->x_stack_slot_list - = gen_rtx_EXPR_LIST (VOIDmode, x, function->x_stack_slot_list); - - pop_obstacks (); - - return x; + return assign_stack_local_1 (mode, size, align, current_function); } /* Allocate a temporary stack slot and record it for possible later @@ -1334,27 +1299,17 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p, int used_p; struct hash_table *ht; { + struct function *func = function ? function : current_function; rtx new = 0; int regno = original_regno; if (regno == 0) regno = REGNO (reg); - if (function) - { - if (regno < function->x_max_parm_reg) - new = function->x_parm_reg_stack_loc[regno]; - if (new == 0) - new = assign_outer_stack_local (decl_mode, GET_MODE_SIZE (decl_mode), - 0, function); - } - else - { - if (regno < max_parm_reg) - new = parm_reg_stack_loc[regno]; - if (new == 0) - new = assign_stack_local (decl_mode, GET_MODE_SIZE (decl_mode), 0); - } + if (regno < func->x_max_parm_reg) + new = func->x_parm_reg_stack_loc[regno]; + if (new == 0) + new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func); PUT_CODE (reg, MEM); PUT_MODE (reg, decl_mode); @@ -3993,8 +3948,7 @@ assign_parms (fndecl, second_time) } max_parm_reg = LAST_VIRTUAL_REGISTER + 1; - parm_reg_stack_loc = (rtx *) savealloc (max_parm_reg * sizeof (rtx)); - bzero ((char *) parm_reg_stack_loc, max_parm_reg * sizeof (rtx)); + parm_reg_stack_loc = (rtx *) xcalloc (max_parm_reg, sizeof (rtx)); #ifdef INIT_CUMULATIVE_INCOMING_ARGS INIT_CUMULATIVE_INCOMING_ARGS (args_so_far, fntype, NULL_RTX); @@ -4568,9 +4522,8 @@ assign_parms (fndecl, second_time) but it's also rare and we need max_parm_reg to be precisely correct. */ max_parm_reg = regno + 1; - new = (rtx *) savealloc (max_parm_reg * sizeof (rtx)); - bcopy ((char *) parm_reg_stack_loc, (char *) new, - old_max_parm_reg * sizeof (rtx)); + new = (rtx *) xrealloc (parm_reg_stack_loc, + max_parm_reg * sizeof (rtx)); bzero ((char *) (new + old_max_parm_reg), (max_parm_reg - old_max_parm_reg) * sizeof (rtx)); parm_reg_stack_loc = new; @@ -5241,7 +5194,7 @@ fix_lexical_addr (addr, var) if (fp->x_arg_pointer_save_area == 0) fp->x_arg_pointer_save_area - = assign_outer_stack_local (Pmode, GET_MODE_SIZE (Pmode), 0, fp); + = assign_stack_local_1 (Pmode, GET_MODE_SIZE (Pmode), 0, fp); addr = fix_lexical_addr (XEXP (fp->x_arg_pointer_save_area, 0), var); addr = memory_address (Pmode, addr); @@ -5328,10 +5281,8 @@ trampoline_address (function) #else #define TRAMPOLINE_REAL_SIZE (TRAMPOLINE_SIZE) #endif - if (fp != 0) - tramp = assign_outer_stack_local (BLKmode, TRAMPOLINE_REAL_SIZE, 0, fp); - else - tramp = assign_stack_local (BLKmode, TRAMPOLINE_REAL_SIZE, 0); + tramp = assign_stack_local_1 (BLKmode, TRAMPOLINE_REAL_SIZE, 0, + fp ? fp : current_function); #endif /* Record the trampoline for reuse and note it for later initialization @@ -5543,7 +5494,8 @@ static void prepare_function_start () { current_function = (struct function *) xcalloc (1, sizeof (struct function)); - + current_function->can_garbage_collect = 0; + init_stmt_for_function (); cse_not_expected = ! optimize; @@ -5584,6 +5536,11 @@ prepare_function_start () init_varasm_status (current_function); + /* Clear out data used for inlining. */ + current_function->inlinable = 0; + current_function->original_decl_initial = 0; + current_function->original_arg_vector = 0; + /* Set if a call to setjmp is seen. */ current_function_calls_setjmp = 0; @@ -5605,8 +5562,6 @@ prepare_function_start () current_function_uses_pic_offset_table = 0; current_function_cannot_inline = 0; - current_function->inlinable = 0; - /* We have not yet needed to make a label to jump to for tail-recursion. */ tail_recursion_label = 0; diff --git a/gcc/function.h b/gcc/function.h index d34da40..0b6eb66 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -184,6 +184,9 @@ struct function struct emit_status *emit; struct varasm_status *varasm; + /* Nonzero if we are done compiling this function. */ + int can_garbage_collect; + /* For function.c. */ /* Name of this function. */ @@ -533,10 +536,12 @@ extern HOST_WIDE_INT get_func_frame_size PROTO((struct function *)); save and restore machine-specific data, in push_function_context and pop_function_context. */ extern void (*init_machine_status) PROTO((struct function *)); +extern void (*mark_machine_status) PROTO((struct function *)); extern void (*save_machine_status) PROTO((struct function *)); extern void (*restore_machine_status) PROTO((struct function *)); /* Likewise, but for language-specific data. */ +extern void (*mark_lang_status) PROTO((struct function *)); extern void (*save_lang_status) PROTO((struct function *)); extern void (*restore_lang_status) PROTO((struct function *)); @@ -544,7 +549,11 @@ extern void (*restore_lang_status) PROTO((struct function *)); extern void save_tree_status PROTO((struct function *)); extern void restore_tree_status PROTO((struct function *)); extern void restore_emit_status PROTO((struct function *)); +extern void free_after_compilation PROTO((struct function *)); +extern void init_varasm_status PROTO((struct function *)); +extern void free_varasm_status PROTO((struct function *)); +extern void free_emit_status PROTO((struct function *)); extern rtx get_first_block_beg PROTO((void)); extern void init_virtual_regs PROTO((struct emit_status *)); diff --git a/gcc/objc/objc-parse.c b/gcc/objc/objc-parse.c index bec8a37..05463a2 100644 --- a/gcc/objc/objc-parse.c +++ b/gcc/objc/objc-parse.c @@ -456,41 +456,41 @@ static const short yyrline[] = { 0, 1168, 1171, 1173, 1175, 1177, 1184, 1186, 1187, 1188, 1193, 1195, 1200, 1208, 1213, 1217, 1220, 1222, 1227, 1229, 1230, 1233, 1233, 1236, 1239, 1241, 1243, 1246, 1248, 1251, 1259, - 1270, 1278, 1282, 1293, 1301, 1308, 1310, 1315, 1318, 1323, - 1325, 1327, 1334, 1336, 1337, 1345, 1351, 1353, 1355, 1362, - 1364, 1370, 1376, 1378, 1380, 1382, 1389, 1391, 1394, 1397, - 1401, 1404, 1408, 1411, 1415, 1420, 1422, 1426, 1428, 1430, - 1432, 1436, 1438, 1441, 1444, 1447, 1450, 1454, 1456, 1459, - 1461, 1466, 1469, 1474, 1476, 1478, 1482, 1506, 1513, 1518, - 1524, 1529, 1531, 1536, 1538, 1542, 1546, 1550, 1560, 1562, - 1567, 1572, 1575, 1579, 1582, 1586, 1589, 1592, 1595, 1599, - 1602, 1606, 1610, 1612, 1614, 1616, 1618, 1620, 1622, 1624, - 1628, 1636, 1644, 1646, 1648, 1652, 1654, 1657, 1660, 1673, - 1675, 1680, 1682, 1685, 1699, 1702, 1705, 1707, 1709, 1717, - 1725, 1735, 1753, 1758, 1763, 1766, 1780, 1789, 1793, 1797, - 1801, 1807, 1811, 1816, 1819, 1824, 1827, 1828, 1845, 1850, - 1853, 1865, 1867, 1877, 1887, 1888, 1896, 1899, 1911, 1915, - 1932, 1942, 1951, 1956, 1961, 1966, 1970, 1974, 1985, 1992, - 1999, 2006, 2017, 2023, 2026, 2031, 2054, 2088, 2119, 2150, - 2165, 2179, 2183, 2187, 2190, 2195, 2197, 2200, 2202, 2206, - 2211, 2214, 2220, 2225, 2230, 2232, 2241, 2242, 2248, 2250, - 2260, 2262, 2266, 2269, 2275, 2285, 2294, 2303, 2313, 2327, - 2332, 2337, 2339, 2348, 2351, 2356, 2359, 2363, 2371, 2373, - 2374, 2375, 2376, 2377, 2391, 2394, 2398, 2404, 2410, 2417, - 2422, 2428, 2435, 2441, 2447, 2452, 2458, 2465, 2471, 2477, - 2483, 2491, 2497, 2503, 2511, 2518, 2524, 2533, 2540, 2548, - 2553, 2556, 2566, 2568, 2571, 2573, 2574, 2577, 2582, 2583, - 2600, 2607, 2613, 2617, 2620, 2621, 2624, 2632, 2638, 2647, - 2657, 2664, 2668, 2673, 2682, 2689, 2693, 2703, 2705, 2706, - 2708, 2710, 2711, 2712, 2713, 2715, 2717, 2720, 2728, 2735, - 2735, 2742, 2748, 2750, 2756, 2761, 2766, 2775, 2777, 2783, - 2785, 2788, 2790, 2791, 2792, 2795, 2801, 2803, 2807, 2810, - 2817, 2823, 2828, 2835, 2840, 2845, 2850, 2857, 2861, 2864, - 2870, 2872, 2873, 2874, 2877, 2879, 2880, 2881, 2882, 2883, - 2884, 2885, 2886, 2887, 2888, 2889, 2890, 2891, 2892, 2893, - 2894, 2895, 2896, 2897, 2897, 2900, 2906, 2911, 2916, 2922, - 2924, 2927, 2929, 2936, 2948, 2953, 2959, 2961, 2967, 2971, - 2972, 2978, 2980, 2983, 2985, 2991, 2996, 3002, 3009, 3018 + 1273, 1281, 1285, 1299, 1307, 1314, 1316, 1321, 1324, 1329, + 1331, 1333, 1340, 1342, 1343, 1351, 1357, 1359, 1361, 1368, + 1370, 1376, 1382, 1384, 1386, 1388, 1395, 1397, 1400, 1403, + 1407, 1410, 1414, 1417, 1421, 1426, 1428, 1432, 1434, 1436, + 1438, 1442, 1444, 1447, 1450, 1453, 1456, 1460, 1462, 1465, + 1467, 1472, 1475, 1480, 1482, 1484, 1488, 1512, 1519, 1524, + 1530, 1535, 1537, 1542, 1544, 1548, 1552, 1556, 1566, 1568, + 1573, 1578, 1581, 1585, 1588, 1592, 1595, 1598, 1601, 1605, + 1608, 1612, 1616, 1618, 1620, 1622, 1624, 1626, 1628, 1630, + 1634, 1642, 1650, 1652, 1654, 1658, 1660, 1663, 1666, 1679, + 1681, 1686, 1688, 1691, 1705, 1708, 1711, 1713, 1715, 1723, + 1731, 1741, 1759, 1764, 1769, 1772, 1786, 1795, 1799, 1803, + 1807, 1813, 1817, 1822, 1825, 1830, 1833, 1834, 1851, 1856, + 1859, 1871, 1873, 1883, 1893, 1894, 1902, 1905, 1917, 1921, + 1938, 1948, 1957, 1962, 1967, 1972, 1976, 1980, 1991, 1998, + 2005, 2012, 2023, 2029, 2032, 2037, 2060, 2094, 2125, 2156, + 2171, 2185, 2189, 2193, 2196, 2201, 2203, 2206, 2208, 2212, + 2217, 2220, 2226, 2231, 2236, 2238, 2247, 2248, 2254, 2256, + 2266, 2268, 2272, 2275, 2281, 2291, 2300, 2309, 2319, 2333, + 2338, 2343, 2345, 2354, 2357, 2362, 2365, 2369, 2377, 2379, + 2380, 2381, 2382, 2383, 2397, 2400, 2404, 2410, 2416, 2423, + 2428, 2434, 2441, 2447, 2453, 2458, 2464, 2471, 2477, 2483, + 2489, 2497, 2503, 2509, 2517, 2524, 2530, 2539, 2546, 2554, + 2559, 2562, 2572, 2574, 2577, 2579, 2580, 2583, 2588, 2589, + 2606, 2613, 2619, 2623, 2626, 2627, 2630, 2638, 2644, 2653, + 2663, 2670, 2674, 2679, 2688, 2695, 2699, 2709, 2711, 2712, + 2714, 2716, 2717, 2718, 2719, 2721, 2723, 2726, 2734, 2741, + 2741, 2748, 2754, 2756, 2762, 2767, 2772, 2781, 2783, 2789, + 2791, 2794, 2796, 2797, 2798, 2801, 2807, 2809, 2813, 2816, + 2823, 2829, 2834, 2841, 2846, 2851, 2856, 2863, 2867, 2870, + 2876, 2878, 2879, 2880, 2883, 2885, 2886, 2887, 2888, 2889, + 2890, 2891, 2892, 2893, 2894, 2895, 2896, 2897, 2898, 2899, + 2900, 2901, 2902, 2903, 2903, 2906, 2912, 2917, 2922, 2928, + 2930, 2933, 2935, 2942, 2954, 2959, 2965, 2967, 2973, 2977, + 2978, 2984, 2986, 2989, 2991, 2997, 3002, 3008, 3015, 3024 }; #endif @@ -3343,227 +3343,233 @@ case 219: break;} case 220: #line 1261 "objc-parse.y" -{ push_c_function_context (); +{ if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); ; break;} case 221: -#line 1270 "objc-parse.y" +#line 1273 "objc-parse.y" { store_parm_decls (); ; break;} case 222: -#line 1278 "objc-parse.y" +#line 1281 "objc-parse.y" { finish_function (1); - pop_c_function_context (); ; + pop_function_context (); ; break;} case 223: -#line 1284 "objc-parse.y" -{ push_c_function_context (); +#line 1287 "objc-parse.y" +{ if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, yyvsp[0].ttype, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); ; break;} case 224: -#line 1293 "objc-parse.y" +#line 1299 "objc-parse.y" { store_parm_decls (); ; break;} case 225: -#line 1301 "objc-parse.y" +#line 1307 "objc-parse.y" { finish_function (1); - pop_c_function_context (); ; + pop_function_context (); ; break;} case 228: -#line 1317 "objc-parse.y" +#line 1323 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 229: -#line 1319 "objc-parse.y" +#line 1325 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 230: -#line 1324 "objc-parse.y" +#line 1330 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 231: -#line 1326 "objc-parse.y" +#line 1332 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 232: -#line 1328 "objc-parse.y" +#line 1334 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 233: -#line 1335 "objc-parse.y" +#line 1341 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 236: -#line 1347 "objc-parse.y" +#line 1353 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 237: -#line 1352 "objc-parse.y" +#line 1358 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 238: -#line 1354 "objc-parse.y" +#line 1360 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 239: -#line 1356 "objc-parse.y" +#line 1362 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 240: -#line 1363 "objc-parse.y" +#line 1369 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 242: -#line 1372 "objc-parse.y" +#line 1378 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 243: -#line 1377 "objc-parse.y" +#line 1383 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 244: -#line 1379 "objc-parse.y" +#line 1385 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 245: -#line 1381 "objc-parse.y" +#line 1387 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 246: -#line 1383 "objc-parse.y" +#line 1389 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 247: -#line 1390 "objc-parse.y" +#line 1396 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 249: -#line 1396 "objc-parse.y" +#line 1402 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 250: -#line 1398 "objc-parse.y" +#line 1404 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 251: -#line 1403 "objc-parse.y" +#line 1409 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 252: -#line 1405 "objc-parse.y" +#line 1411 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 253: -#line 1410 "objc-parse.y" +#line 1416 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 254: -#line 1412 "objc-parse.y" +#line 1418 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 255: -#line 1417 "objc-parse.y" +#line 1423 "objc-parse.y" { yyval.ttype = start_struct (RECORD_TYPE, yyvsp[-1].ttype); /* Start scope of tag before parsing components. */ ; break;} case 256: -#line 1421 "objc-parse.y" +#line 1427 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 257: -#line 1423 "objc-parse.y" +#line 1429 "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 1427 "objc-parse.y" +#line 1433 "objc-parse.y" { yyval.ttype = xref_tag (RECORD_TYPE, yyvsp[0].ttype); ; break;} case 259: -#line 1429 "objc-parse.y" +#line 1435 "objc-parse.y" { yyval.ttype = start_struct (UNION_TYPE, yyvsp[-1].ttype); ; break;} case 260: -#line 1431 "objc-parse.y" +#line 1437 "objc-parse.y" { yyval.ttype = finish_struct (yyvsp[-3].ttype, yyvsp[-2].ttype, chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); ; break;} case 261: -#line 1433 "objc-parse.y" +#line 1439 "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 1437 "objc-parse.y" +#line 1443 "objc-parse.y" { yyval.ttype = xref_tag (UNION_TYPE, yyvsp[0].ttype); ; break;} case 263: -#line 1439 "objc-parse.y" +#line 1445 "objc-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (yyvsp[-1].ttype); ; break;} case 264: -#line 1442 "objc-parse.y" +#line 1448 "objc-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-7].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 265: -#line 1445 "objc-parse.y" +#line 1451 "objc-parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = start_enum (NULL_TREE); ; break;} case 266: -#line 1448 "objc-parse.y" +#line 1454 "objc-parse.y" { yyval.ttype= finish_enum (yyvsp[-4].ttype, nreverse (yyvsp[-3].ttype), chainon (yyvsp[-6].ttype, yyvsp[0].ttype)); resume_momentary (yyvsp[-5].itype); ; break;} case 267: -#line 1451 "objc-parse.y" +#line 1457 "objc-parse.y" { yyval.ttype = xref_tag (ENUMERAL_TYPE, yyvsp[0].ttype); ; break;} case 271: -#line 1462 "objc-parse.y" +#line 1468 "objc-parse.y" { if (pedantic && ! flag_isoc9x) pedwarn ("comma at end of enumerator list"); ; break;} case 272: -#line 1468 "objc-parse.y" +#line 1474 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 273: -#line 1470 "objc-parse.y" +#line 1476 "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 1475 "objc-parse.y" +#line 1481 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 275: -#line 1477 "objc-parse.y" +#line 1483 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 276: -#line 1479 "objc-parse.y" +#line 1485 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 277: -#line 1483 "objc-parse.y" +#line 1489 "objc-parse.y" { tree interface = lookup_interface (yyvsp[-1].ttype); @@ -3578,7 +3584,7 @@ case 277: ; break;} case 278: -#line 1508 "objc-parse.y" +#line 1514 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -3586,14 +3592,14 @@ case 278: resume_momentary (yyvsp[-1].itype); ; break;} case 279: -#line 1514 "objc-parse.y" +#line 1520 "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 280: -#line 1519 "objc-parse.y" +#line 1525 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -3601,144 +3607,144 @@ case 280: resume_momentary (yyvsp[-1].itype); ; break;} case 281: -#line 1525 "objc-parse.y" +#line 1531 "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 1530 "objc-parse.y" +#line 1536 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 283: -#line 1532 "objc-parse.y" +#line 1538 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-1].itype; ; break;} case 285: -#line 1539 "objc-parse.y" +#line 1545 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 286: -#line 1544 "objc-parse.y" +#line 1550 "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 1548 "objc-parse.y" +#line 1554 "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 1551 "objc-parse.y" +#line 1557 "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 1563 "objc-parse.y" +#line 1569 "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 1568 "objc-parse.y" +#line 1574 "objc-parse.y" { yyval.ttype = error_mark_node; ; break;} case 292: -#line 1574 "objc-parse.y" +#line 1580 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[0].ttype, NULL_TREE); ; break;} case 293: -#line 1576 "objc-parse.y" +#line 1582 "objc-parse.y" { yyval.ttype = build_enumerator (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 294: -#line 1581 "objc-parse.y" +#line 1587 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 295: -#line 1583 "objc-parse.y" +#line 1589 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 296: -#line 1588 "objc-parse.y" +#line 1594 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 298: -#line 1594 "objc-parse.y" +#line 1600 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 299: -#line 1596 "objc-parse.y" +#line 1602 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 300: -#line 1601 "objc-parse.y" +#line 1607 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 301: -#line 1603 "objc-parse.y" +#line 1609 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 302: -#line 1608 "objc-parse.y" +#line 1614 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 303: -#line 1611 "objc-parse.y" +#line 1617 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 304: -#line 1613 "objc-parse.y" +#line 1619 "objc-parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 305: -#line 1615 "objc-parse.y" +#line 1621 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 306: -#line 1617 "objc-parse.y" +#line 1623 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 307: -#line 1619 "objc-parse.y" +#line 1625 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, yyvsp[-2].ttype, NULL_TREE); ; break;} case 308: -#line 1621 "objc-parse.y" +#line 1627 "objc-parse.y" { yyval.ttype = build_nt (CALL_EXPR, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 309: -#line 1623 "objc-parse.y" +#line 1629 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 310: -#line 1625 "objc-parse.y" +#line 1631 "objc-parse.y" { yyval.ttype = build_nt (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 311: -#line 1629 "objc-parse.y" +#line 1635 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 312: -#line 1638 "objc-parse.y" +#line 1644 "objc-parse.y" { if (pedantic && yyvsp[0].ends_in_label) pedwarn ("ANSI C forbids label at end of compound statement"); ; break;} case 314: -#line 1647 "objc-parse.y" +#line 1653 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 315: -#line 1649 "objc-parse.y" +#line 1655 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 319: -#line 1661 "objc-parse.y" +#line 1667 "objc-parse.y" { emit_line_note (input_filename, lineno); pushlevel (0); clear_last_expr (); @@ -3749,12 +3755,12 @@ case 319: ; break;} case 321: -#line 1676 "objc-parse.y" +#line 1682 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids label declarations"); ; break;} case 324: -#line 1687 "objc-parse.y" +#line 1693 "objc-parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -3765,19 +3771,19 @@ case 324: ; break;} case 325: -#line 1701 "objc-parse.y" +#line 1707 "objc-parse.y" {; break;} case 327: -#line 1705 "objc-parse.y" +#line 1711 "objc-parse.y" { compstmt_count++; ; break;} case 328: -#line 1708 "objc-parse.y" +#line 1714 "objc-parse.y" { yyval.ttype = convert (void_type_node, integer_zero_node); ; break;} case 329: -#line 1710 "objc-parse.y" +#line 1716 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_end_bindings (getdecls (), 1, 0); yyval.ttype = poplevel (1, 1, 0); @@ -3787,7 +3793,7 @@ case 329: pop_momentary (); ; break;} case 330: -#line 1718 "objc-parse.y" +#line 1724 "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); @@ -3797,7 +3803,7 @@ case 330: pop_momentary (); ; break;} case 331: -#line 1726 "objc-parse.y" +#line 1732 "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); @@ -3807,7 +3813,7 @@ case 331: pop_momentary (); ; break;} case 332: -#line 1737 "objc-parse.y" +#line 1743 "objc-parse.y" { if (current_function_decl == 0) { error ("braced-group within expression allowed only inside a function"); @@ -3825,11 +3831,11 @@ case 332: ; break;} case 333: -#line 1754 "objc-parse.y" +#line 1760 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 336: -#line 1768 "objc-parse.y" +#line 1774 "objc-parse.y" { emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_cond (truthvalue_conversion (yyvsp[-1].ttype), 0, compstmt_count); @@ -3839,7 +3845,7 @@ case 336: position_after_white_space (); ; break;} case 337: -#line 1782 "objc-parse.y" +#line 1788 "objc-parse.y" { stmt_count++; compstmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); @@ -3849,43 +3855,43 @@ case 337: position_after_white_space (); ; break;} case 338: -#line 1790 "objc-parse.y" +#line 1796 "objc-parse.y" { expand_loop_continue_here (); ; break;} case 339: -#line 1794 "objc-parse.y" +#line 1800 "objc-parse.y" { yyval.filename = input_filename; ; break;} case 340: -#line 1798 "objc-parse.y" +#line 1804 "objc-parse.y" { yyval.lineno = lineno; ; break;} case 341: -#line 1803 "objc-parse.y" +#line 1809 "objc-parse.y" { ; break;} case 342: -#line 1808 "objc-parse.y" +#line 1814 "objc-parse.y" { ; break;} case 343: -#line 1813 "objc-parse.y" +#line 1819 "objc-parse.y" { yyval.ends_in_label = yyvsp[0].ends_in_label; ; break;} case 344: -#line 1818 "objc-parse.y" +#line 1824 "objc-parse.y" { yyval.ends_in_label = 0; ; break;} case 345: -#line 1820 "objc-parse.y" +#line 1826 "objc-parse.y" { yyval.ends_in_label = 1; ; break;} case 346: -#line 1826 "objc-parse.y" +#line 1832 "objc-parse.y" { stmt_count++; ; break;} case 348: -#line 1829 "objc-parse.y" +#line 1835 "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 @@ -3904,19 +3910,19 @@ case 348: clear_momentary (); ; break;} case 349: -#line 1846 "objc-parse.y" +#line 1852 "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 1856 "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 1860 "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 @@ -3927,11 +3933,11 @@ case 351: "empty body in an if-statement"); ; break;} case 352: -#line 1866 "objc-parse.y" +#line 1872 "objc-parse.y" { c_expand_end_cond (); ; break;} case 353: -#line 1868 "objc-parse.y" +#line 1874 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-2].filename, yyvsp[-1].lineno); /* The emit_nop used to come before emit_line_note, @@ -3943,7 +3949,7 @@ case 353: emit_nop (); ; break;} case 354: -#line 1878 "objc-parse.y" +#line 1884 "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. */ @@ -3954,11 +3960,11 @@ case 354: position_after_white_space (); ; break;} case 355: -#line 1887 "objc-parse.y" +#line 1893 "objc-parse.y" { expand_end_loop (); ; break;} case 356: -#line 1890 "objc-parse.y" +#line 1896 "objc-parse.y" { emit_line_note (input_filename, lineno); expand_exit_loop_if_false (NULL_PTR, truthvalue_conversion (yyvsp[-2].ttype)); @@ -3966,12 +3972,12 @@ case 356: clear_momentary (); ; break;} case 357: -#line 1897 "objc-parse.y" +#line 1903 "objc-parse.y" { expand_end_loop (); clear_momentary (); ; break;} case 358: -#line 1901 "objc-parse.y" +#line 1907 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); /* See comment in `while' alternative, above. */ @@ -3984,12 +3990,12 @@ case 358: ; break;} case 359: -#line 1913 "objc-parse.y" +#line 1919 "objc-parse.y" { yyvsp[0].lineno = lineno; yyval.filename = input_filename; ; break;} case 360: -#line 1916 "objc-parse.y" +#line 1922 "objc-parse.y" { /* Start the loop. Doing this after parsing all the expressions ensures we will end the loop. */ @@ -4007,7 +4013,7 @@ case 360: position_after_white_space (); ; break;} case 361: -#line 1932 "objc-parse.y" +#line 1938 "objc-parse.y" { /* Emit the increment expression, with a line number. */ emit_line_note (yyvsp[-4].filename, yyvsp[-5].lineno); expand_loop_continue_here (); @@ -4020,7 +4026,7 @@ case 361: expand_end_loop (); ; break;} case 362: -#line 1943 "objc-parse.y" +#line 1949 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-5].filename, yyvsp[-4].lineno); c_expand_start_case (yyvsp[-1].ttype); @@ -4030,7 +4036,7 @@ case 362: position_after_white_space (); ; break;} case 363: -#line 1951 "objc-parse.y" +#line 1957 "objc-parse.y" { expand_end_case (yyvsp[-3].ttype); if (yychar == CONSTANT || yychar == STRING) pop_momentary_nofree (); @@ -4038,33 +4044,33 @@ case 363: pop_momentary (); ; break;} case 364: -#line 1957 "objc-parse.y" +#line 1963 "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 1962 "objc-parse.y" +#line 1968 "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 1967 "objc-parse.y" +#line 1973 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-3].filename, yyvsp[-2].lineno); c_expand_return (NULL_TREE); ; break;} case 367: -#line 1971 "objc-parse.y" +#line 1977 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); c_expand_return (yyvsp[-1].ttype); ; break;} case 368: -#line 1975 "objc-parse.y" +#line 1981 "objc-parse.y" { stmt_count++; emit_line_note (yyvsp[-7].filename, yyvsp[-6].lineno); STRIP_NOPS (yyvsp[-2].ttype); @@ -4076,7 +4082,7 @@ case 368: error ("argument of `asm' is not a constant string"); ; break;} case 369: -#line 1986 "objc-parse.y" +#line 1992 "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, @@ -4084,7 +4090,7 @@ case 369: input_filename, lineno); ; break;} case 370: -#line 1993 "objc-parse.y" +#line 1999 "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, @@ -4092,7 +4098,7 @@ case 370: input_filename, lineno); ; break;} case 371: -#line 2001 "objc-parse.y" +#line 2007 "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, @@ -4100,7 +4106,7 @@ case 371: input_filename, lineno); ; break;} case 372: -#line 2007 "objc-parse.y" +#line 2013 "objc-parse.y" { tree decl; stmt_count++; emit_line_note (yyvsp[-4].filename, yyvsp[-3].lineno); @@ -4113,7 +4119,7 @@ case 372: ; break;} case 373: -#line 2018 "objc-parse.y" +#line 2024 "objc-parse.y" { if (pedantic) pedwarn ("ANSI C forbids `goto *expr;'"); stmt_count++; @@ -4121,7 +4127,7 @@ case 373: expand_computed_goto (convert (ptr_type_node, yyvsp[-1].ttype)); ; break;} case 376: -#line 2033 "objc-parse.y" +#line 2039 "objc-parse.y" { /* The value returned by this action is */ /* 1 if everything is OK */ @@ -4144,14 +4150,14 @@ case 376: ; break;} case 377: -#line 2054 "objc-parse.y" +#line 2060 "objc-parse.y" { if (yyvsp[-1].itype) iterator_for_loop_end (yyvsp[-3].ttype); ; break;} case 378: -#line 2089 "objc-parse.y" +#line 2095 "objc-parse.y" { register tree value = check_case_value (yyvsp[-1].ttype); register tree label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE); @@ -4184,7 +4190,7 @@ case 378: position_after_white_space (); ; break;} case 379: -#line 2120 "objc-parse.y" +#line 2126 "objc-parse.y" { register tree value1 = check_case_value (yyvsp[-3].ttype); register tree value2 = check_case_value (yyvsp[-1].ttype); register tree label @@ -4217,7 +4223,7 @@ case 379: position_after_white_space (); ; break;} case 380: -#line 2151 "objc-parse.y" +#line 2157 "objc-parse.y" { tree duplicate; register tree label @@ -4234,7 +4240,7 @@ case 380: position_after_white_space (); ; break;} case 381: -#line 2166 "objc-parse.y" +#line 2172 "objc-parse.y" { tree label = define_label (input_filename, lineno, yyvsp[-2].ttype); stmt_count++; emit_nop (); @@ -4246,52 +4252,52 @@ case 381: position_after_white_space (); ; break;} case 382: -#line 2181 "objc-parse.y" +#line 2187 "objc-parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 383: -#line 2184 "objc-parse.y" +#line 2190 "objc-parse.y" { emit_line_note (input_filename, lineno); ; break;} case 384: -#line 2189 "objc-parse.y" +#line 2195 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 386: -#line 2196 "objc-parse.y" +#line 2202 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 389: -#line 2203 "objc-parse.y" +#line 2209 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 390: -#line 2208 "objc-parse.y" +#line 2214 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 391: -#line 2213 "objc-parse.y" +#line 2219 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), NULL_TREE); ; break;} case 392: -#line 2215 "objc-parse.y" +#line 2221 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, combine_strings (yyvsp[0].ttype), yyvsp[-2].ttype); ; break;} case 393: -#line 2221 "objc-parse.y" +#line 2227 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (0); ; break;} case 394: -#line 2225 "objc-parse.y" +#line 2231 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 396: -#line 2233 "objc-parse.y" +#line 2239 "objc-parse.y" { tree parm; if (pedantic) pedwarn ("ANSI C forbids forward parameter declarations"); @@ -4301,19 +4307,19 @@ case 396: clear_parm_order (); ; break;} case 397: -#line 2241 "objc-parse.y" +#line 2247 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 398: -#line 2243 "objc-parse.y" +#line 2249 "objc-parse.y" { yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 399: -#line 2249 "objc-parse.y" +#line 2255 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 400: -#line 2251 "objc-parse.y" +#line 2257 "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. @@ -4325,23 +4331,23 @@ case 400: ; break;} case 401: -#line 2261 "objc-parse.y" +#line 2267 "objc-parse.y" { yyval.ttype = get_parm_info (1); ; break;} case 402: -#line 2263 "objc-parse.y" +#line 2269 "objc-parse.y" { yyval.ttype = get_parm_info (0); ; break;} case 403: -#line 2268 "objc-parse.y" +#line 2274 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 404: -#line 2270 "objc-parse.y" +#line 2276 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 405: -#line 2277 "objc-parse.y" +#line 2283 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4352,7 +4358,7 @@ case 405: resume_momentary (yyvsp[-2].itype); ; break;} case 406: -#line 2286 "objc-parse.y" +#line 2292 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4363,7 +4369,7 @@ case 406: resume_momentary (yyvsp[-2].itype); ; break;} case 407: -#line 2295 "objc-parse.y" +#line 2301 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4374,7 +4380,7 @@ case 407: resume_momentary (yyvsp[-2].itype); ; break;} case 408: -#line 2304 "objc-parse.y" +#line 2310 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4385,7 +4391,7 @@ case 408: resume_momentary (yyvsp[-2].itype); ; break;} case 409: -#line 2314 "objc-parse.y" +#line 2320 "objc-parse.y" { yyval.ttype = build_tree_list (build_tree_list (current_declspecs, yyvsp[-1].ttype), build_tree_list (prefix_attributes, @@ -4396,19 +4402,19 @@ case 409: resume_momentary (yyvsp[-2].itype); ; break;} case 410: -#line 2328 "objc-parse.y" +#line 2334 "objc-parse.y" { pushlevel (0); clear_parm_order (); declare_parm_level (1); ; break;} case 411: -#line 2332 "objc-parse.y" +#line 2338 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; parmlist_tags_warning (); poplevel (0, 0, 0); ; break;} case 413: -#line 2340 "objc-parse.y" +#line 2346 "objc-parse.y" { tree t; for (t = yyvsp[-1].ttype; t; t = TREE_CHAIN (t)) if (TREE_VALUE (t) == NULL_TREE) @@ -4416,28 +4422,28 @@ case 413: yyval.ttype = tree_cons (NULL_TREE, NULL_TREE, yyvsp[-1].ttype); ; break;} case 414: -#line 2350 "objc-parse.y" +#line 2356 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 415: -#line 2352 "objc-parse.y" +#line 2358 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 416: -#line 2358 "objc-parse.y" +#line 2364 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 417: -#line 2360 "objc-parse.y" +#line 2366 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 418: -#line 2365 "objc-parse.y" +#line 2371 "objc-parse.y" { yyval.itype = pedantic; pedantic = 0; ; break;} case 424: -#line 2378 "objc-parse.y" +#line 2384 "objc-parse.y" { if (objc_implementation_context) { @@ -4450,27 +4456,27 @@ case 424: ; break;} case 425: -#line 2393 "objc-parse.y" +#line 2399 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 426: -#line 2395 "objc-parse.y" +#line 2401 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 427: -#line 2400 "objc-parse.y" +#line 2406 "objc-parse.y" { objc_declare_class (yyvsp[-1].ttype); ; break;} case 428: -#line 2406 "objc-parse.y" +#line 2412 "objc-parse.y" { objc_declare_alias (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 429: -#line 2412 "objc-parse.y" +#line 2418 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-2].ttype, NULL_TREE, yyvsp[-1].ttype); @@ -4478,20 +4484,20 @@ case 429: ; break;} case 430: -#line 2418 "objc-parse.y" +#line 2424 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 431: -#line 2423 "objc-parse.y" +#line 2429 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 432: -#line 2429 "objc-parse.y" +#line 2435 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-1].ttype, NULL_TREE, yyvsp[0].ttype); @@ -4499,14 +4505,14 @@ case 432: ; break;} case 433: -#line 2436 "objc-parse.y" +#line 2442 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 434: -#line 2442 "objc-parse.y" +#line 2448 "objc-parse.y" { objc_interface_context = objc_ivar_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[-1].ttype); @@ -4514,20 +4520,20 @@ case 434: ; break;} case 435: -#line 2448 "objc-parse.y" +#line 2454 "objc-parse.y" { continue_class (objc_interface_context); ; break;} case 436: -#line 2453 "objc-parse.y" +#line 2459 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 437: -#line 2459 "objc-parse.y" +#line 2465 "objc-parse.y" { objc_interface_context = start_class (CLASS_INTERFACE_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); @@ -4535,14 +4541,14 @@ case 437: ; break;} case 438: -#line 2466 "objc-parse.y" +#line 2472 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 439: -#line 2472 "objc-parse.y" +#line 2478 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-1].ttype, NULL_TREE, NULL_TREE); @@ -4550,14 +4556,14 @@ case 439: ; break;} case 440: -#line 2478 "objc-parse.y" +#line 2484 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 441: -#line 2484 "objc-parse.y" +#line 2490 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[0].ttype, NULL_TREE, NULL_TREE); @@ -4566,7 +4572,7 @@ case 441: ; break;} case 442: -#line 2492 "objc-parse.y" +#line 2498 "objc-parse.y" { objc_implementation_context = objc_ivar_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4574,14 +4580,14 @@ case 442: ; break;} case 443: -#line 2498 "objc-parse.y" +#line 2504 "objc-parse.y" { objc_ivar_chain = continue_class (objc_implementation_context); ; break;} case 444: -#line 2504 "objc-parse.y" +#line 2510 "objc-parse.y" { objc_implementation_context = start_class (CLASS_IMPLEMENTATION_TYPE, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); @@ -4590,7 +4596,7 @@ case 444: ; break;} case 445: -#line 2512 "objc-parse.y" +#line 2518 "objc-parse.y" { objc_interface_context = start_class (CATEGORY_INTERFACE_TYPE, yyvsp[-4].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); @@ -4598,14 +4604,14 @@ case 445: ; break;} case 446: -#line 2519 "objc-parse.y" +#line 2525 "objc-parse.y" { finish_class (objc_interface_context); objc_interface_context = NULL_TREE; ; break;} case 447: -#line 2525 "objc-parse.y" +#line 2531 "objc-parse.y" { objc_implementation_context = start_class (CATEGORY_IMPLEMENTATION_TYPE, yyvsp[-3].ttype, yyvsp[-1].ttype, NULL_TREE); @@ -4614,7 +4620,7 @@ case 447: ; break;} case 448: -#line 2535 "objc-parse.y" +#line 2541 "objc-parse.y" { remember_protocol_qualifiers (); objc_interface_context @@ -4622,7 +4628,7 @@ case 448: ; break;} case 449: -#line 2541 "objc-parse.y" +#line 2547 "objc-parse.y" { forget_protocol_qualifiers(); finish_protocol(objc_interface_context); @@ -4630,13 +4636,13 @@ case 449: ; break;} case 450: -#line 2550 "objc-parse.y" +#line 2556 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 452: -#line 2558 "objc-parse.y" +#line 2564 "objc-parse.y" { if (yyvsp[-2].code == LT_EXPR && yyvsp[0].code == GT_EXPR) yyval.ttype = yyvsp[-1].ttype; @@ -4645,32 +4651,32 @@ case 452: ; break;} case 455: -#line 2572 "objc-parse.y" +#line 2578 "objc-parse.y" { objc_public_flag = 2; ; break;} case 456: -#line 2573 "objc-parse.y" +#line 2579 "objc-parse.y" { objc_public_flag = 0; ; break;} case 457: -#line 2574 "objc-parse.y" +#line 2580 "objc-parse.y" { objc_public_flag = 1; ; break;} case 458: -#line 2579 "objc-parse.y" +#line 2585 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 460: -#line 2584 "objc-parse.y" +#line 2590 "objc-parse.y" { if (pedantic) pedwarn ("extra semicolon in struct or union specified"); ; break;} case 461: -#line 2602 "objc-parse.y" +#line 2608 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -4678,7 +4684,7 @@ case 461: resume_momentary (yyvsp[-1].itype); ; break;} case 462: -#line 2608 "objc-parse.y" +#line 2614 "objc-parse.y" { yyval.ttype = yyvsp[0].ttype; current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); @@ -4686,15 +4692,15 @@ case 462: resume_momentary (yyvsp[-1].itype); ; break;} case 463: -#line 2614 "objc-parse.y" +#line 2620 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 464: -#line 2619 "objc-parse.y" +#line 2625 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 467: -#line 2626 "objc-parse.y" +#line 2632 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4703,7 +4709,7 @@ case 467: ; break;} case 468: -#line 2633 "objc-parse.y" +#line 2639 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4711,7 +4717,7 @@ case 468: ; break;} case 469: -#line 2639 "objc-parse.y" +#line 2645 "objc-parse.y" { yyval.ttype = add_instance_variable (objc_ivar_context, objc_public_flag, @@ -4720,7 +4726,7 @@ case 469: ; break;} case 470: -#line 2649 "objc-parse.y" +#line 2655 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4730,7 +4736,7 @@ case 470: ; break;} case 471: -#line 2657 "objc-parse.y" +#line 2663 "objc-parse.y" { forget_protocol_qualifiers (); add_class_method (objc_implementation_context, yyvsp[0].ttype); @@ -4739,20 +4745,20 @@ case 471: ; break;} case 472: -#line 2664 "objc-parse.y" +#line 2670 "objc-parse.y" { continue_method_def (); ; break;} case 473: -#line 2668 "objc-parse.y" +#line 2674 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 474: -#line 2674 "objc-parse.y" +#line 2680 "objc-parse.y" { remember_protocol_qualifiers (); if (objc_implementation_context) @@ -4762,7 +4768,7 @@ case 474: ; break;} case 475: -#line 2682 "objc-parse.y" +#line 2688 "objc-parse.y" { forget_protocol_qualifiers (); add_instance_method (objc_implementation_context, yyvsp[0].ttype); @@ -4771,28 +4777,28 @@ case 475: ; break;} case 476: -#line 2689 "objc-parse.y" +#line 2695 "objc-parse.y" { continue_method_def (); ; break;} case 477: -#line 2693 "objc-parse.y" +#line 2699 "objc-parse.y" { finish_method_def (); objc_method_context = NULL_TREE; ; break;} case 479: -#line 2705 "objc-parse.y" +#line 2711 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 484: -#line 2712 "objc-parse.y" +#line 2718 "objc-parse.y" {yyval.ttype = NULL_TREE; ; break;} case 488: -#line 2722 "objc-parse.y" +#line 2728 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4800,7 +4806,7 @@ case 488: ; break;} case 489: -#line 2728 "objc-parse.y" +#line 2734 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4808,7 +4814,7 @@ case 489: ; break;} case 491: -#line 2736 "objc-parse.y" +#line 2742 "objc-parse.y" { /* Remember protocol qualifiers in prototypes. */ remember_protocol_qualifiers (); @@ -4816,7 +4822,7 @@ case 491: ; break;} case 492: -#line 2742 "objc-parse.y" +#line 2748 "objc-parse.y" { /* Forget protocol qualifiers here. */ forget_protocol_qualifiers (); @@ -4824,94 +4830,94 @@ case 492: ; break;} case 494: -#line 2752 "objc-parse.y" +#line 2758 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-2].ttype, yyvsp[0].ttype, NULL_TREE); ; break;} case 495: -#line 2757 "objc-parse.y" +#line 2763 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[0].ttype, NULL_TREE); ; break;} case 496: -#line 2762 "objc-parse.y" +#line 2768 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 497: -#line 2767 "objc-parse.y" +#line 2773 "objc-parse.y" { yyval.ttype = build_method_decl (objc_inherit_code, NULL_TREE, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 506: -#line 2797 "objc-parse.y" +#line 2803 "objc-parse.y" { current_declspecs = TREE_VALUE (declspec_stack); prefix_attributes = TREE_PURPOSE (declspec_stack); declspec_stack = TREE_CHAIN (declspec_stack); resume_momentary (yyvsp[-2].itype); ; break;} case 507: -#line 2802 "objc-parse.y" +#line 2808 "objc-parse.y" { shadow_tag (yyvsp[-1].ttype); ; break;} case 508: -#line 2804 "objc-parse.y" +#line 2810 "objc-parse.y" { pedwarn ("empty declaration"); ; break;} case 509: -#line 2809 "objc-parse.y" +#line 2815 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 510: -#line 2811 "objc-parse.y" +#line 2817 "objc-parse.y" { push_parm_decl (yyvsp[0].ttype); ; break;} case 511: -#line 2819 "objc-parse.y" +#line 2825 "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 2824 "objc-parse.y" +#line 2830 "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 2829 "objc-parse.y" +#line 2835 "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 2837 "objc-parse.y" +#line 2843 "objc-parse.y" { yyval.ttype = NULL_TREE; ; break;} case 515: -#line 2841 "objc-parse.y" +#line 2847 "objc-parse.y" { /* oh what a kludge! */ yyval.ttype = (tree)1; ; break;} case 516: -#line 2846 "objc-parse.y" +#line 2852 "objc-parse.y" { pushlevel (0); ; break;} case 517: -#line 2850 "objc-parse.y" +#line 2856 "objc-parse.y" { /* returns a tree list node generated by get_parm_info */ yyval.ttype = yyvsp[0].ttype; @@ -4919,119 +4925,119 @@ case 517: ; break;} case 520: -#line 2865 "objc-parse.y" +#line 2871 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 525: -#line 2878 "objc-parse.y" +#line 2884 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 526: -#line 2879 "objc-parse.y" +#line 2885 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 527: -#line 2880 "objc-parse.y" +#line 2886 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 528: -#line 2881 "objc-parse.y" +#line 2887 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 529: -#line 2882 "objc-parse.y" +#line 2888 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 530: -#line 2883 "objc-parse.y" +#line 2889 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 531: -#line 2884 "objc-parse.y" +#line 2890 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 532: -#line 2885 "objc-parse.y" +#line 2891 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 533: -#line 2886 "objc-parse.y" +#line 2892 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 534: -#line 2887 "objc-parse.y" +#line 2893 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 535: -#line 2888 "objc-parse.y" +#line 2894 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 536: -#line 2889 "objc-parse.y" +#line 2895 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 537: -#line 2890 "objc-parse.y" +#line 2896 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 538: -#line 2891 "objc-parse.y" +#line 2897 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 539: -#line 2892 "objc-parse.y" +#line 2898 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 540: -#line 2893 "objc-parse.y" +#line 2899 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 541: -#line 2894 "objc-parse.y" +#line 2900 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 542: -#line 2895 "objc-parse.y" +#line 2901 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 543: -#line 2896 "objc-parse.y" +#line 2902 "objc-parse.y" { yyval.ttype = get_identifier (token_buffer); ; break;} case 546: -#line 2902 "objc-parse.y" +#line 2908 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-5].ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 547: -#line 2907 "objc-parse.y" +#line 2913 "objc-parse.y" { yyval.ttype = build_keyword_decl (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} case 548: -#line 2912 "objc-parse.y" +#line 2918 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 549: -#line 2917 "objc-parse.y" +#line 2923 "objc-parse.y" { yyval.ttype = build_keyword_decl (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} case 553: -#line 2930 "objc-parse.y" +#line 2936 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 554: -#line 2938 "objc-parse.y" +#line 2944 "objc-parse.y" { if (TREE_CHAIN (yyvsp[0].ttype) == NULL_TREE) /* just return the expr., remove a level of indirection */ @@ -5042,69 +5048,69 @@ case 554: ; break;} case 555: -#line 2950 "objc-parse.y" +#line 2956 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 556: -#line 2954 "objc-parse.y" +#line 2960 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 558: -#line 2962 "objc-parse.y" +#line 2968 "objc-parse.y" { yyval.ttype = get_class_reference (yyvsp[0].ttype); ; break;} case 559: -#line 2969 "objc-parse.y" +#line 2975 "objc-parse.y" { objc_receiver_context = 1; ; break;} case 560: -#line 2971 "objc-parse.y" +#line 2977 "objc-parse.y" { objc_receiver_context = 0; ; break;} case 561: -#line 2973 "objc-parse.y" +#line 2979 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 565: -#line 2986 "objc-parse.y" +#line 2992 "objc-parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 566: -#line 2993 "objc-parse.y" +#line 2999 "objc-parse.y" { yyval.ttype = build_tree_list (yyvsp[-1].ttype, NULL_TREE); ; break;} case 567: -#line 2997 "objc-parse.y" +#line 3003 "objc-parse.y" { yyval.ttype = build_tree_list (NULL_TREE, NULL_TREE); ; break;} case 568: -#line 3004 "objc-parse.y" +#line 3010 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 569: -#line 3011 "objc-parse.y" +#line 3017 "objc-parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 570: -#line 3020 "objc-parse.y" +#line 3026 "objc-parse.y" { yyval.ttype = groktypename (yyvsp[-1].ttype); ; @@ -5331,5 +5337,5 @@ yyerrhandle: } return 1; } -#line 3025 "objc-parse.y" +#line 3031 "objc-parse.y" diff --git a/gcc/objc/objc-parse.y b/gcc/objc/objc-parse.y index e902024..10f98a3 100644 --- a/gcc/objc/objc-parse.y +++ b/gcc/objc/objc-parse.y @@ -1258,11 +1258,14 @@ designator: nested_function: declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1276,16 +1279,19 @@ nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; notype_nested_function: notype_declarator - { push_c_function_context (); + { if (pedantic) + pedwarn ("ANSI C forbids nested functions"); + + push_function_context (); if (! start_function (current_declspecs, $1, prefix_attributes, NULL_TREE, 1)) { - pop_c_function_context (); + pop_function_context (); YYERROR1; } reinit_parse_for_function (); } @@ -1299,7 +1305,7 @@ notype_nested_function: which called YYERROR1 again, and so on. */ compstmt { finish_function (1); - pop_c_function_context (); } + pop_function_context (); } ; /* Any kind of declarator (thus, all declarators allowed diff --git a/gcc/toplev.c b/gcc/toplev.c index 266c64c..e654146 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -4452,6 +4452,10 @@ rest_of_compilation (decl) init_recog_no_volatile (); + /* We're done with this function. */ + if (! DECL_DEFER_OUTPUT (decl)) + free_after_compilation (current_function); + /* The parsing time is all the time spent in yyparse *except* what is spent in this function. */ diff --git a/gcc/varasm.c b/gcc/varasm.c index e7df584..3f25a98 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -3185,6 +3185,22 @@ init_varasm_status (f) p->x_pool_offset = 0; p->x_const_double_chain = 0; } + +/* Clear out all parts of our state in F that can safely be discarded + after the function has been compiled. */ +void +free_varasm_status (f) + struct function *f; +{ + struct varasm_status *p = f->varasm; + free (p->x_const_rtx_hash_table); + free (p->x_const_rtx_sym_hash_table); + + p->x_first_pool = p->x_last_pool = 0; + p->x_const_rtx_hash_table = 0; + p->x_const_rtx_sym_hash_table = 0; + p->x_const_double_chain = 0; +} enum kind { RTX_DOUBLE, RTX_INT }; -- cgit v1.1