From be295d1ffa57211b377c2751436701f8eb7f8c07 Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 16 Nov 1998 20:45:16 +0000 Subject: [PATCH] * typeck2.c (my_friendly_abort): Don't fatal twice in a row. * typeck.c (c_expand_start_case): Use build_expr_type_conversion. Simplify. Fixes Sec6/4_2/G06164.gr * parse.y (structsp): Fix cut-and-paste error. Fixes Sec6/4_2/C06166.cm * init.c (build_new): Complain about non-integral size. Fixes Sec5/3_4/E05276.C * parse.y (unary_expr): Complain about defining types in sizeof. Fixes Sec5/3_3/S05178.C * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn. Fixes Sec5/3_3/S05161.C * rtti.c (build_x_typeid): Complain about typeid without including . (get_typeid): Likewise. Complain about typeid of incomplete type. (get_tinfo_fn_dynamic): Likewise. (get_typeid_1): Not static anymore. * except.c (build_eh_type_type): Use get_typeid_1. Fixes Sec5/2_8/C05517.cm * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to ambiguous or private bases. Fix warning for reference cast. Fixes Sec5/2_7/C05516.cm git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23678 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 25 ++ gcc/cp/cp-tree.h | 1 + gcc/cp/except.c | 4 +- gcc/cp/init.c | 5 + gcc/cp/parse.c | 1249 +++++++++++++++++++++++++++--------------------------- gcc/cp/parse.y | 5 +- gcc/cp/rtti.c | 68 ++- gcc/cp/typeck.c | 56 +-- gcc/cp/typeck2.c | 2 +- 9 files changed, 724 insertions(+), 691 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bbd8664..4faa807 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,28 @@ +1998-11-16 Jason Merrill + + * typeck2.c (my_friendly_abort): Don't fatal twice in a row. + + * typeck.c (c_expand_start_case): Use build_expr_type_conversion. + Simplify. + + * parse.y (structsp): Fix cut-and-paste error. + + * init.c (build_new): Complain about non-integral size. + + * parse.y (unary_expr): Complain about defining types in sizeof. + + * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn. + + * rtti.c (build_x_typeid): Complain about typeid without + including . + (get_typeid): Likewise. Complain about typeid of incomplete type. + (get_tinfo_fn_dynamic): Likewise. + (get_typeid_1): Not static anymore. + * except.c (build_eh_type_type): Use get_typeid_1. + + * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to + ambiguous or private bases. Fix warning for reference cast. + 1998-11-16 Mark Mitchell * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 8cf5594..033c29a 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2984,6 +2984,7 @@ extern tree build_typeid PROTO((tree)); extern tree build_x_typeid PROTO((tree)); extern tree get_tinfo_fn PROTO((tree)); extern tree get_typeid PROTO((tree)); +extern tree get_typeid_1 PROTO((tree)); extern tree build_dynamic_cast PROTO((tree, tree)); extern void synthesize_tinfo_fn PROTO((tree)); diff --git a/gcc/cp/except.c b/gcc/cp/except.c index d2cc3e4..a1d028e 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -411,9 +411,7 @@ build_eh_type_type (type) type = TYPE_MAIN_VARIANT (type); if (flag_rtti) - { - return build1 (ADDR_EXPR, ptr_type_node, get_typeid (type)); - } + return build1 (ADDR_EXPR, ptr_type_node, get_typeid_1 (type)); typestring = build_overload_name (type, 1, 1); exp = combine_strings (build_string (strlen (typestring)+1, typestring)); diff --git a/gcc/cp/init.c b/gcc/cp/init.c index e923230..c7df0b0 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1960,6 +1960,11 @@ build_new (placement, decl, init, use_global_new) } else { + int flags = pedantic ? WANT_INT : (WANT_INT | WANT_ENUM); + if (build_expr_type_conversion (flags, this_nelts, 0) + == NULL_TREE) + pedwarn ("size in array new must have integral type"); + this_nelts = save_expr (cp_convert (sizetype, this_nelts)); absdcl = TREE_OPERAND (absdcl, 0); if (this_nelts == integer_zero_node) diff --git a/gcc/cp/parse.c b/gcc/cp/parse.c index 3f7b4bb..99ae3ae 100644 --- a/gcc/cp/parse.c +++ b/gcc/cp/parse.c @@ -205,10 +205,6 @@ parse_decl(declarator, specs_attrs, attributes, initialized, decl) attributes, prefix_attributes); return sm; } -#ifndef YYDEBUG -#define YYDEBUG 1 -#endif - #include #ifndef __cplusplus @@ -669,72 +665,72 @@ static const short yyrline[] = { 0, 983, 986, 991, 995, 1000, 1004, 1007, 1008, 1012, 1031, 1038, 1041, 1043, 1044, 1045, 1048, 1052, 1053, 1057, 1061, 1064, 1066, 1070, 1073, 1076, 1080, 1083, 1085, 1087, 1089, - 1092, 1096, 1098, 1100, 1102, 1108, 1111, 1114, 1117, 1129, - 1134, 1138, 1142, 1147, 1149, 1153, 1157, 1159, 1168, 1172, - 1175, 1178, 1183, 1186, 1188, 1196, 1209, 1214, 1220, 1222, - 1224, 1237, 1240, 1242, 1244, 1246, 1248, 1250, 1252, 1254, - 1256, 1258, 1260, 1262, 1264, 1266, 1268, 1270, 1272, 1274, - 1276, 1278, 1280, 1284, 1286, 1288, 1305, 1308, 1310, 1311, - 1312, 1313, 1314, 1317, 1320, 1323, 1327, 1330, 1332, 1337, - 1339, 1340, 1343, 1345, 1353, 1355, 1357, 1359, 1363, 1366, - 1370, 1374, 1375, 1376, 1380, 1388, 1389, 1390, 1404, 1406, - 1409, 1411, 1422, 1427, 1429, 1431, 1433, 1435, 1437, 1439, - 1442, 1444, 1461, 1462, 1466, 1470, 1474, 1478, 1480, 1484, - 1486, 1488, 1496, 1498, 1500, 1502, 1506, 1508, 1510, 1512, - 1517, 1519, 1521, 1523, 1526, 1528, 1530, 1574, 1577, 1581, - 1584, 1588, 1591, 1596, 1598, 1602, 1615, 1618, 1625, 1632, - 1637, 1639, 1644, 1646, 1653, 1655, 1659, 1663, 1669, 1673, - 1676, 1679, 1682, 1692, 1694, 1697, 1701, 1704, 1707, 1710, - 1713, 1719, 1725, 1727, 1732, 1734, 1743, 1746, 1748, 1751, - 1757, 1759, 1769, 1773, 1776, 1779, 1784, 1787, 1795, 1797, - 1799, 1801, 1804, 1807, 1822, 1841, 1844, 1846, 1849, 1851, - 1855, 1857, 1861, 1863, 1867, 1870, 1874, 1880, 1881, 1893, - 1900, 1903, 1909, 1913, 1918, 1924, 1925, 1933, 1936, 1940, - 1943, 1947, 1952, 1955, 1959, 1962, 1964, 1966, 1968, 1975, - 1977, 1978, 1979, 1983, 1986, 1990, 1993, 1999, 2001, 2004, - 2007, 2010, 2016, 2019, 2022, 2024, 2026, 2030, 2036, 2044, - 2046, 2050, 2052, 2057, 2060, 2063, 2065, 2067, 2071, 2076, - 2083, 2087, 2091, 2098, 2102, 2105, 2108, 2114, 2126, 2128, - 2131, 2151, 2153, 2156, 2158, 2163, 2165, 2167, 2169, 2171, - 2173, 2177, 2185, 2188, 2190, 2194, 2200, 2205, 2210, 2212, - 2216, 2219, 2223, 2229, 2232, 2249, 2255, 2257, 2260, 2263, - 2265, 2269, 2271, 2275, 2280, 2286, 2289, 2290, 2311, 2334, - 2336, 2340, 2351, 2365, 2370, 2377, 2379, 2380, 2381, 2384, - 2399, 2404, 2410, 2412, 2417, 2419, 2421, 2423, 2425, 2427, - 2430, 2440, 2447, 2472, 2478, 2481, 2484, 2486, 2497, 2502, - 2505, 2510, 2513, 2520, 2530, 2533, 2540, 2550, 2552, 2555, - 2557, 2560, 2567, 2575, 2582, 2588, 2594, 2602, 2606, 2611, - 2615, 2618, 2627, 2629, 2633, 2636, 2641, 2645, 2651, 2662, - 2665, 2669, 2673, 2681, 2686, 2692, 2695, 2697, 2699, 2705, - 2708, 2710, 2712, 2714, 2718, 2721, 2739, 2749, 2751, 2752, - 2756, 2761, 2764, 2766, 2768, 2770, 2774, 2780, 2782, 2790, - 2793, 2795, 2797, 2799, 2803, 2806, 2809, 2811, 2813, 2815, - 2819, 2822, 2825, 2827, 2829, 2831, 2833, 2840, 2844, 2849, - 2853, 2858, 2860, 2864, 2867, 2869, 2872, 2874, 2875, 2878, - 2880, 2882, 2888, 2903, 2909, 2915, 2929, 2931, 2935, 2949, - 2951, 2953, 2957, 2963, 2976, 2978, 2982, 2995, 3001, 3003, - 3004, 3005, 3013, 3018, 3027, 3028, 3032, 3035, 3041, 3047, - 3050, 3052, 3054, 3056, 3060, 3064, 3068, 3071, 3076, 3079, - 3081, 3083, 3085, 3087, 3089, 3091, 3093, 3097, 3101, 3105, - 3109, 3110, 3112, 3114, 3116, 3118, 3120, 3122, 3124, 3126, - 3134, 3136, 3137, 3138, 3141, 3147, 3149, 3154, 3156, 3159, - 3173, 3176, 3179, 3183, 3186, 3193, 3195, 3198, 3200, 3202, - 3205, 3208, 3211, 3214, 3216, 3219, 3223, 3225, 3231, 3233, - 3234, 3236, 3241, 3243, 3245, 3247, 3249, 3252, 3253, 3255, - 3258, 3259, 3262, 3262, 3265, 3265, 3268, 3268, 3270, 3272, - 3274, 3276, 3282, 3288, 3291, 3294, 3300, 3302, 3304, 3308, - 3310, 3311, 3312, 3314, 3317, 3324, 3329, 3337, 3341, 3343, - 3346, 3348, 3351, 3355, 3357, 3360, 3362, 3365, 3382, 3388, - 3396, 3398, 3400, 3404, 3407, 3408, 3416, 3420, 3424, 3427, - 3428, 3434, 3437, 3440, 3442, 3446, 3451, 3454, 3464, 3469, - 3470, 3477, 3480, 3483, 3485, 3488, 3490, 3500, 3514, 3518, - 3521, 3523, 3527, 3531, 3534, 3537, 3539, 3543, 3545, 3552, - 3559, 3562, 3565, 3569, 3573, 3579, 3583, 3588, 3590, 3593, - 3598, 3604, 3615, 3618, 3620, 3624, 3629, 3631, 3638, 3641, - 3643, 3645, 3651, 3656, 3659, 3661, 3663, 3665, 3667, 3669, - 3671, 3673, 3675, 3677, 3679, 3681, 3683, 3685, 3687, 3689, - 3691, 3693, 3695, 3697, 3699, 3701, 3703, 3705, 3707, 3709, - 3711, 3713, 3715, 3717, 3719, 3721, 3724, 3726 + 1092, 1096, 1098, 1101, 1103, 1109, 1112, 1115, 1118, 1130, + 1135, 1139, 1143, 1148, 1150, 1154, 1158, 1160, 1169, 1173, + 1176, 1179, 1184, 1187, 1189, 1197, 1210, 1215, 1221, 1223, + 1225, 1238, 1241, 1243, 1245, 1247, 1249, 1251, 1253, 1255, + 1257, 1259, 1261, 1263, 1265, 1267, 1269, 1271, 1273, 1275, + 1277, 1279, 1281, 1285, 1287, 1289, 1306, 1309, 1311, 1312, + 1313, 1314, 1315, 1318, 1321, 1324, 1328, 1331, 1333, 1338, + 1340, 1341, 1344, 1346, 1354, 1356, 1358, 1360, 1364, 1367, + 1371, 1375, 1376, 1377, 1381, 1389, 1390, 1391, 1405, 1407, + 1410, 1412, 1423, 1428, 1430, 1432, 1434, 1436, 1438, 1440, + 1443, 1445, 1462, 1463, 1467, 1471, 1475, 1479, 1481, 1485, + 1487, 1489, 1497, 1499, 1501, 1503, 1507, 1509, 1511, 1513, + 1518, 1520, 1522, 1524, 1527, 1529, 1531, 1575, 1578, 1582, + 1585, 1589, 1592, 1597, 1599, 1603, 1616, 1619, 1626, 1633, + 1638, 1640, 1645, 1647, 1654, 1656, 1660, 1664, 1670, 1674, + 1677, 1680, 1683, 1693, 1695, 1698, 1702, 1705, 1708, 1711, + 1714, 1720, 1726, 1728, 1733, 1735, 1744, 1747, 1749, 1752, + 1758, 1760, 1770, 1774, 1777, 1780, 1785, 1788, 1796, 1798, + 1800, 1802, 1805, 1808, 1823, 1842, 1845, 1847, 1850, 1852, + 1856, 1858, 1862, 1864, 1868, 1871, 1875, 1881, 1882, 1894, + 1901, 1904, 1910, 1914, 1919, 1925, 1926, 1934, 1937, 1941, + 1944, 1948, 1953, 1956, 1960, 1963, 1965, 1967, 1969, 1976, + 1978, 1979, 1980, 1984, 1987, 1991, 1994, 2000, 2002, 2005, + 2008, 2011, 2017, 2020, 2023, 2025, 2027, 2031, 2037, 2045, + 2047, 2051, 2053, 2058, 2061, 2064, 2066, 2068, 2072, 2077, + 2084, 2088, 2092, 2099, 2103, 2106, 2109, 2115, 2127, 2129, + 2132, 2152, 2154, 2157, 2159, 2164, 2166, 2168, 2170, 2172, + 2174, 2178, 2186, 2189, 2191, 2195, 2201, 2206, 2211, 2213, + 2217, 2220, 2224, 2230, 2233, 2250, 2256, 2258, 2261, 2264, + 2266, 2270, 2272, 2276, 2281, 2287, 2290, 2291, 2312, 2335, + 2337, 2341, 2352, 2366, 2371, 2378, 2380, 2381, 2382, 2385, + 2400, 2405, 2411, 2413, 2418, 2420, 2422, 2424, 2426, 2428, + 2431, 2441, 2448, 2473, 2479, 2482, 2485, 2487, 2498, 2503, + 2506, 2511, 2514, 2521, 2531, 2534, 2541, 2551, 2553, 2556, + 2558, 2561, 2568, 2576, 2583, 2589, 2595, 2603, 2607, 2612, + 2616, 2619, 2628, 2630, 2634, 2637, 2642, 2646, 2652, 2663, + 2666, 2670, 2674, 2682, 2687, 2693, 2696, 2698, 2700, 2706, + 2709, 2711, 2713, 2715, 2719, 2722, 2740, 2750, 2752, 2753, + 2757, 2762, 2765, 2767, 2769, 2771, 2775, 2781, 2783, 2791, + 2794, 2796, 2798, 2800, 2804, 2807, 2810, 2812, 2814, 2816, + 2820, 2823, 2826, 2828, 2830, 2832, 2834, 2841, 2845, 2850, + 2854, 2859, 2861, 2865, 2868, 2870, 2873, 2875, 2876, 2879, + 2881, 2883, 2889, 2904, 2910, 2916, 2930, 2932, 2936, 2950, + 2952, 2954, 2958, 2964, 2977, 2979, 2983, 2996, 3002, 3004, + 3005, 3006, 3014, 3019, 3028, 3029, 3033, 3036, 3042, 3048, + 3051, 3053, 3055, 3057, 3061, 3065, 3069, 3072, 3077, 3080, + 3082, 3084, 3086, 3088, 3090, 3092, 3094, 3098, 3102, 3106, + 3110, 3111, 3113, 3115, 3117, 3119, 3121, 3123, 3125, 3127, + 3135, 3137, 3138, 3139, 3142, 3148, 3150, 3155, 3157, 3160, + 3174, 3177, 3180, 3184, 3187, 3194, 3196, 3199, 3201, 3203, + 3206, 3209, 3212, 3215, 3217, 3220, 3224, 3226, 3232, 3234, + 3235, 3237, 3242, 3244, 3246, 3248, 3250, 3253, 3254, 3256, + 3259, 3260, 3263, 3263, 3266, 3266, 3269, 3269, 3271, 3273, + 3275, 3277, 3283, 3289, 3292, 3295, 3301, 3303, 3305, 3309, + 3311, 3312, 3313, 3315, 3318, 3325, 3330, 3338, 3342, 3344, + 3347, 3349, 3352, 3356, 3358, 3361, 3363, 3366, 3383, 3389, + 3397, 3399, 3401, 3405, 3408, 3409, 3417, 3421, 3425, 3428, + 3429, 3435, 3438, 3441, 3443, 3447, 3452, 3455, 3465, 3470, + 3471, 3478, 3481, 3484, 3486, 3489, 3491, 3501, 3515, 3519, + 3522, 3524, 3528, 3532, 3535, 3538, 3540, 3544, 3546, 3553, + 3560, 3563, 3566, 3570, 3574, 3580, 3584, 3589, 3591, 3594, + 3599, 3605, 3616, 3619, 3621, 3625, 3630, 3632, 3639, 3642, + 3644, 3646, 3652, 3657, 3660, 3662, 3664, 3666, 3668, 3670, + 3672, 3674, 3676, 3678, 3680, 3682, 3684, 3686, 3688, 3690, + 3692, 3694, 3696, 3698, 3700, 3702, 3704, 3706, 3708, 3710, + 3712, 3714, 3716, 3718, 3720, 3722, 3725, 3727 }; #endif @@ -3687,7 +3683,7 @@ static const short yycheck[] = { 4, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84 }; /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/n/gnu/bison-1.25/share/bison.simple" +#line 3 "/usr/cygnus/gnupro-98r1/share/bison.simple" /* Skeleton output parser for bison, Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. @@ -3880,7 +3876,7 @@ __yy_memcpy (char *to, char *from, int count) #endif #endif -#line 196 "/n/gnu/bison-1.25/share/bison.simple" +#line 196 "/usr/cygnus/gnupro-98r1/share/bison.simple" /* The user can define YYPARSE_PARAM as the name of an argument to be passed into yyparse. The argument should have type void *. @@ -4831,7 +4827,7 @@ case 170: case 173: #line 916 "parse.y" { - cp_error ("template %T was not declared yet", yyvsp[-4].ttype); + cp_error ("template class %T was not declared yet", yyvsp[-4].ttype); yyval.ttype = yyvsp[0].ttype; ; break;} @@ -5025,116 +5021,117 @@ case 222: break;} case 223: #line 1099 "parse.y" -{ yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ftype.t)); ; +{ yyval.ttype = c_sizeof (groktypename (yyvsp[-1].ftype.t)); + check_for_new_type ("sizeof", yyvsp[-1].ftype); ; break;} case 224: -#line 1101 "parse.y" +#line 1102 "parse.y" { yyval.ttype = grok_alignof (yyvsp[0].ttype); ; break;} case 225: -#line 1103 "parse.y" +#line 1104 "parse.y" { yyval.ttype = c_alignof (groktypename (yyvsp[-1].ftype.t)); check_for_new_type ("alignof", yyvsp[-1].ftype); ; break;} case 226: -#line 1109 "parse.y" +#line 1110 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[0].ftype.t, NULL_TREE, yyvsp[-1].itype); check_for_new_type ("new", yyvsp[0].ftype); ; break;} case 227: -#line 1112 "parse.y" +#line 1113 "parse.y" { yyval.ttype = build_new (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype, yyvsp[-2].itype); check_for_new_type ("new", yyvsp[-1].ftype); ; break;} case 228: -#line 1115 "parse.y" +#line 1116 "parse.y" { yyval.ttype = build_new (yyvsp[-1].ttype, yyvsp[0].ftype.t, NULL_TREE, yyvsp[-2].itype); check_for_new_type ("new", yyvsp[0].ftype); ; break;} case 229: -#line 1118 "parse.y" +#line 1119 "parse.y" { yyval.ttype = build_new (yyvsp[-2].ttype, yyvsp[-1].ftype.t, yyvsp[0].ttype, yyvsp[-3].itype); check_for_new_type ("new", yyvsp[-1].ftype); ; break;} case 230: -#line 1131 "parse.y" +#line 1132 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-1].ftype.t), NULL_TREE, yyvsp[-4].itype); check_for_new_type ("new", yyvsp[-1].ftype); ; break;} case 231: -#line 1136 "parse.y" +#line 1137 "parse.y" { yyval.ttype = build_new (NULL_TREE, groktypename(yyvsp[-2].ftype.t), yyvsp[0].ttype, yyvsp[-5].itype); check_for_new_type ("new", yyvsp[-2].ftype); ; break;} case 232: -#line 1140 "parse.y" +#line 1141 "parse.y" { yyval.ttype = build_new (yyvsp[-4].ttype, groktypename(yyvsp[-1].ftype.t), NULL_TREE, yyvsp[-5].itype); check_for_new_type ("new", yyvsp[-1].ftype); ; break;} case 233: -#line 1144 "parse.y" +#line 1145 "parse.y" { yyval.ttype = build_new (yyvsp[-5].ttype, groktypename(yyvsp[-2].ftype.t), yyvsp[0].ttype, yyvsp[-6].itype); check_for_new_type ("new", yyvsp[-2].ftype); ; break;} case 234: -#line 1148 "parse.y" +#line 1149 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 0, yyvsp[-1].itype); ; break;} case 235: -#line 1150 "parse.y" +#line 1151 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, NULL_TREE, 1, yyvsp[-3].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} case 236: -#line 1154 "parse.y" +#line 1155 "parse.y" { yyval.ttype = delete_sanity (yyvsp[0].ttype, yyvsp[-2].ttype, 2, yyvsp[-4].itype); if (yychar == YYEMPTY) yychar = YYLEX; ; break;} case 237: -#line 1158 "parse.y" +#line 1159 "parse.y" { yyval.ttype = build_x_unary_op (REALPART_EXPR, yyvsp[0].ttype); ; break;} case 238: -#line 1160 "parse.y" +#line 1161 "parse.y" { yyval.ttype = build_x_unary_op (IMAGPART_EXPR, yyvsp[0].ttype); ; break;} case 239: -#line 1170 "parse.y" +#line 1171 "parse.y" { finish_new_placement (NULL_TREE, yyvsp[-2].itype); ; break;} case 240: -#line 1173 "parse.y" +#line 1174 "parse.y" { yyval.itype = begin_new_placement (); ; break;} case 241: -#line 1177 "parse.y" +#line 1178 "parse.y" { yyval.ttype = finish_new_placement (yyvsp[-1].ttype, yyvsp[-2].itype); ; break;} case 242: -#line 1179 "parse.y" +#line 1180 "parse.y" { cp_pedwarn ("old style placement syntax, use () instead"); yyval.ttype = finish_new_placement (yyvsp[-1].ttype, yyvsp[-2].itype); ; break;} case 243: -#line 1185 "parse.y" +#line 1186 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 244: -#line 1187 "parse.y" +#line 1188 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 245: -#line 1189 "parse.y" +#line 1190 "parse.y" { cp_error ("`%T' is not a valid expression", yyvsp[-1].ftype.t); yyval.ttype = error_mark_node; ; break;} case 246: -#line 1197 "parse.y" +#line 1198 "parse.y" { if (pedantic) pedwarn ("ANSI C++ forbids initialization of new expression with `='"); @@ -5146,23 +5143,23 @@ case 246: ; break;} case 247: -#line 1211 "parse.y" +#line 1212 "parse.y" { yyvsp[-1].ftype.t = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[-1].ftype.t), 0); yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-1].ftype.t, NULL_TREE, NULL_TREE); check_for_new_type ("cast", yyvsp[-1].ftype); ; break;} case 248: -#line 1215 "parse.y" +#line 1216 "parse.y" { yyvsp[-1].ftype.t = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[-1].ftype.t), 0); yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-1].ftype.t, NULL_TREE, NULL_TREE); check_for_new_type ("cast", yyvsp[-1].ftype); ; break;} case 250: -#line 1223 "parse.y" +#line 1224 "parse.y" { yyval.ttype = reparse_absdcl_as_casts (yyval.ttype, yyvsp[0].ttype); ; break;} case 251: -#line 1225 "parse.y" +#line 1226 "parse.y" { tree init = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); @@ -5175,137 +5172,137 @@ case 251: ; break;} case 253: -#line 1241 "parse.y" +#line 1242 "parse.y" { yyval.ttype = build_x_binary_op (MEMBER_REF, yyval.ttype, yyvsp[0].ttype); ; break;} case 254: -#line 1243 "parse.y" +#line 1244 "parse.y" { yyval.ttype = build_m_component_ref (yyval.ttype, yyvsp[0].ttype); ; break;} case 255: -#line 1245 "parse.y" +#line 1246 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 256: -#line 1247 "parse.y" +#line 1248 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 257: -#line 1249 "parse.y" +#line 1250 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 258: -#line 1251 "parse.y" +#line 1252 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 259: -#line 1253 "parse.y" +#line 1254 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 260: -#line 1255 "parse.y" +#line 1256 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 261: -#line 1257 "parse.y" +#line 1258 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 262: -#line 1259 "parse.y" +#line 1260 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 263: -#line 1261 "parse.y" +#line 1262 "parse.y" { yyval.ttype = build_x_binary_op (LT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} case 264: -#line 1263 "parse.y" +#line 1264 "parse.y" { yyval.ttype = build_x_binary_op (GT_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} case 265: -#line 1265 "parse.y" +#line 1266 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 266: -#line 1267 "parse.y" +#line 1268 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 267: -#line 1269 "parse.y" +#line 1270 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 268: -#line 1271 "parse.y" +#line 1272 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 269: -#line 1273 "parse.y" +#line 1274 "parse.y" { yyval.ttype = build_x_binary_op (yyvsp[-1].code, yyval.ttype, yyvsp[0].ttype); ; break;} case 270: -#line 1275 "parse.y" +#line 1276 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ANDIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} case 271: -#line 1277 "parse.y" +#line 1278 "parse.y" { yyval.ttype = build_x_binary_op (TRUTH_ORIF_EXPR, yyval.ttype, yyvsp[0].ttype); ; break;} case 272: -#line 1279 "parse.y" +#line 1280 "parse.y" { yyval.ttype = build_x_conditional_expr (yyval.ttype, yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 273: -#line 1281 "parse.y" +#line 1282 "parse.y" { yyval.ttype = build_x_modify_expr (yyval.ttype, NOP_EXPR, yyvsp[0].ttype); if (yyval.ttype != error_mark_node) C_SET_EXP_ORIGINAL_CODE (yyval.ttype, MODIFY_EXPR); ; break;} case 274: -#line 1285 "parse.y" +#line 1286 "parse.y" { yyval.ttype = build_x_modify_expr (yyval.ttype, yyvsp[-1].code, yyvsp[0].ttype); ; break;} case 275: -#line 1287 "parse.y" +#line 1288 "parse.y" { yyval.ttype = build_throw (NULL_TREE); ; break;} case 276: -#line 1289 "parse.y" +#line 1290 "parse.y" { yyval.ttype = build_throw (yyvsp[0].ttype); ; break;} case 277: -#line 1307 "parse.y" +#line 1308 "parse.y" { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} case 278: -#line 1309 "parse.y" +#line 1310 "parse.y" { yyval.ttype = build_parse_node (BIT_NOT_EXPR, yyvsp[0].ttype); ; break;} case 284: -#line 1318 "parse.y" +#line 1319 "parse.y" { yyval.ttype = do_identifier (yyvsp[-1].ttype, 1, NULL_TREE); ; break;} case 285: -#line 1322 "parse.y" +#line 1323 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 286: -#line 1324 "parse.y" +#line 1325 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 287: -#line 1329 "parse.y" +#line 1330 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 288: -#line 1331 "parse.y" +#line 1332 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 289: -#line 1334 "parse.y" +#line 1335 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 294: -#line 1346 "parse.y" +#line 1347 "parse.y" { /* Provide support for '(' attributes '*' declarator ')' etc */ @@ -5313,31 +5310,31 @@ case 294: ; break;} case 296: -#line 1356 "parse.y" +#line 1357 "parse.y" { yyval.ttype = build_parse_node (INDIRECT_REF, yyvsp[0].ttype); ; break;} case 297: -#line 1358 "parse.y" +#line 1359 "parse.y" { yyval.ttype = build_parse_node (ADDR_EXPR, yyvsp[0].ttype); ; break;} case 298: -#line 1360 "parse.y" +#line 1361 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 299: -#line 1365 "parse.y" +#line 1366 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 300: -#line 1367 "parse.y" +#line 1368 "parse.y" { yyval.ttype = lookup_template_function (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 304: -#line 1377 "parse.y" +#line 1378 "parse.y" { yyval.ttype = finish_decl_parsing (yyvsp[-1].ttype); ; break;} case 305: -#line 1382 "parse.y" +#line 1383 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == BIT_NOT_EXPR) yyval.ttype = build_x_unary_op (BIT_NOT_EXPR, TREE_OPERAND (yyvsp[0].ttype, 0)); @@ -5346,7 +5343,7 @@ case 305: ; break;} case 308: -#line 1391 "parse.y" +#line 1392 "parse.y" { if (processing_template_decl) push_obstacks (&permanent_obstack, &permanent_obstack); @@ -5362,20 +5359,20 @@ case 308: ; break;} case 309: -#line 1405 "parse.y" +#line 1406 "parse.y" { yyval.ttype = finish_parenthesized_expr (yyvsp[-1].ttype); ; break;} case 310: -#line 1407 "parse.y" +#line 1408 "parse.y" { yyvsp[-1].ttype = reparse_decl_as_expr (NULL_TREE, yyvsp[-1].ttype); yyval.ttype = finish_parenthesized_expr (yyvsp[-1].ttype); ; break;} case 311: -#line 1410 "parse.y" +#line 1411 "parse.y" { yyval.ttype = error_mark_node; ; break;} case 312: -#line 1412 "parse.y" +#line 1413 "parse.y" { tree scope = current_scope (); if (!scope || TREE_CODE (scope) != FUNCTION_DECL) { @@ -5388,43 +5385,43 @@ case 312: ; break;} case 313: -#line 1423 "parse.y" +#line 1424 "parse.y" { yyval.ttype = finish_stmt_expr (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 314: -#line 1428 "parse.y" +#line 1429 "parse.y" { yyval.ttype = finish_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype, 1); ; break;} case 315: -#line 1430 "parse.y" +#line 1431 "parse.y" { yyval.ttype = finish_call_expr (yyvsp[-1].ttype, NULL_TREE, 1); ; break;} case 316: -#line 1432 "parse.y" +#line 1433 "parse.y" { yyval.ttype = finish_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype, 0); ; break;} case 317: -#line 1434 "parse.y" +#line 1435 "parse.y" { yyval.ttype = finish_call_expr (yyvsp[-1].ttype, NULL_TREE, 0); ; break;} case 318: -#line 1436 "parse.y" +#line 1437 "parse.y" { yyval.ttype = grok_array_decl (yyval.ttype, yyvsp[-1].ttype); ; break;} case 319: -#line 1438 "parse.y" +#line 1439 "parse.y" { yyval.ttype = finish_increment_expr (yyvsp[-1].ttype, POSTINCREMENT_EXPR); ; break;} case 320: -#line 1440 "parse.y" +#line 1441 "parse.y" { yyval.ttype = finish_increment_expr (yyvsp[-1].ttype, POSTDECREMENT_EXPR); ; break;} case 321: -#line 1443 "parse.y" +#line 1444 "parse.y" { yyval.ttype = finish_this_expr (); ; break;} case 322: -#line 1445 "parse.y" +#line 1446 "parse.y" { /* This is a C cast in C++'s `functional' notation using the "implicit int" extension so that: @@ -5443,49 +5440,49 @@ case 322: ; break;} case 324: -#line 1463 "parse.y" +#line 1464 "parse.y" { tree type = groktypename (yyvsp[-4].ftype.t); check_for_new_type ("dynamic_cast", yyvsp[-4].ftype); yyval.ttype = build_dynamic_cast (type, yyvsp[-1].ttype); ; break;} case 325: -#line 1467 "parse.y" +#line 1468 "parse.y" { tree type = groktypename (yyvsp[-4].ftype.t); check_for_new_type ("static_cast", yyvsp[-4].ftype); yyval.ttype = build_static_cast (type, yyvsp[-1].ttype); ; break;} case 326: -#line 1471 "parse.y" +#line 1472 "parse.y" { tree type = groktypename (yyvsp[-4].ftype.t); check_for_new_type ("reinterpret_cast", yyvsp[-4].ftype); yyval.ttype = build_reinterpret_cast (type, yyvsp[-1].ttype); ; break;} case 327: -#line 1475 "parse.y" +#line 1476 "parse.y" { tree type = groktypename (yyvsp[-4].ftype.t); check_for_new_type ("const_cast", yyvsp[-4].ftype); yyval.ttype = build_const_cast (type, yyvsp[-1].ttype); ; break;} case 328: -#line 1479 "parse.y" +#line 1480 "parse.y" { yyval.ttype = build_x_typeid (yyvsp[-1].ttype); ; break;} case 329: -#line 1481 "parse.y" +#line 1482 "parse.y" { tree type = groktypename (yyvsp[-1].ftype.t); check_for_new_type ("typeid", yyvsp[-1].ftype); yyval.ttype = get_typeid (TYPE_MAIN_VARIANT (type)); ; break;} case 330: -#line 1485 "parse.y" +#line 1486 "parse.y" { yyval.ttype = do_scoped_id (yyvsp[0].ttype, 1); ; break;} case 331: -#line 1487 "parse.y" +#line 1488 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 332: -#line 1489 "parse.y" +#line 1490 "parse.y" { got_scope = NULL_TREE; if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) @@ -5495,102 +5492,102 @@ case 332: ; break;} case 333: -#line 1497 "parse.y" +#line 1498 "parse.y" { yyval.ttype = build_offset_ref (OP0 (yyval.ttype), OP1 (yyval.ttype)); ; break;} case 334: -#line 1499 "parse.y" +#line 1500 "parse.y" { yyval.ttype = finish_qualified_call_expr (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 335: -#line 1501 "parse.y" +#line 1502 "parse.y" { yyval.ttype = finish_qualified_call_expr (yyvsp[-1].ttype, NULL_TREE); ; break;} case 336: -#line 1503 "parse.y" +#line 1504 "parse.y" { yyval.ttype = build_x_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); ; break;} case 337: -#line 1507 "parse.y" +#line 1508 "parse.y" { yyval.ttype = finish_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ; break;} case 338: -#line 1509 "parse.y" +#line 1510 "parse.y" { yyval.ttype = finish_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ; break;} case 339: -#line 1511 "parse.y" +#line 1512 "parse.y" { yyval.ttype = build_x_component_ref (yyval.ttype, yyvsp[0].ttype, NULL_TREE, 1); ; break;} case 340: -#line 1513 "parse.y" +#line 1514 "parse.y" { if (processing_template_decl) yyval.ttype = build_min_nt (COMPONENT_REF, yyvsp[-1].ttype, copy_to_permanent (yyvsp[0].ttype)); else yyval.ttype = build_object_ref (yyval.ttype, OP0 (yyvsp[0].ttype), OP1 (yyvsp[0].ttype)); ; break;} case 341: -#line 1518 "parse.y" +#line 1519 "parse.y" { yyval.ttype = finish_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ; break;} case 342: -#line 1520 "parse.y" +#line 1521 "parse.y" { yyval.ttype = finish_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ; break;} case 343: -#line 1522 "parse.y" +#line 1523 "parse.y" { yyval.ttype = finish_qualified_object_call_expr (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ; break;} case 344: -#line 1524 "parse.y" +#line 1525 "parse.y" { yyval.ttype = finish_qualified_object_call_expr (yyvsp[-1].ttype, yyvsp[-2].ttype, NULL_TREE); ; break;} case 345: -#line 1527 "parse.y" +#line 1528 "parse.y" { yyval.ttype = finish_pseudo_destructor_call_expr (yyvsp[-3].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 346: -#line 1529 "parse.y" +#line 1530 "parse.y" { yyval.ttype = finish_pseudo_destructor_call_expr (yyvsp[-5].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype); ; break;} case 347: -#line 1531 "parse.y" +#line 1532 "parse.y" { yyval.ttype = error_mark_node; ; break;} case 348: -#line 1576 "parse.y" +#line 1577 "parse.y" { yyval.itype = 0; ; break;} case 349: -#line 1578 "parse.y" +#line 1579 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} case 350: -#line 1583 "parse.y" +#line 1584 "parse.y" { yyval.itype = 0; ; break;} case 351: -#line 1585 "parse.y" +#line 1586 "parse.y" { got_scope = NULL_TREE; yyval.itype = 1; ; break;} case 352: -#line 1590 "parse.y" +#line 1591 "parse.y" { yyval.ttype = boolean_true_node; ; break;} case 353: -#line 1592 "parse.y" +#line 1593 "parse.y" { yyval.ttype = boolean_false_node; ; break;} case 355: -#line 1599 "parse.y" +#line 1600 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} case 356: -#line 1604 "parse.y" +#line 1605 "parse.y" { if (! current_function_parms_stored) store_parm_decls (); @@ -5602,18 +5599,18 @@ case 356: ; break;} case 357: -#line 1617 "parse.y" +#line 1618 "parse.y" { got_object = TREE_TYPE (yyval.ttype); ; break;} case 358: -#line 1619 "parse.y" +#line 1620 "parse.y" { yyval.ttype = build_x_arrow (yyval.ttype); got_object = TREE_TYPE (yyval.ttype); ; break;} case 359: -#line 1627 "parse.y" +#line 1628 "parse.y" { resume_momentary (yyvsp[-1].itype); if (yyvsp[-2].ftype.t && IS_AGGR_TYPE_CODE (TREE_CODE (yyvsp[-2].ftype.t))) @@ -5621,138 +5618,138 @@ case 359: ; break;} case 360: -#line 1633 "parse.y" +#line 1634 "parse.y" { resume_momentary (yyvsp[-1].itype); note_list_got_semicolon (yyvsp[-2].ftype.t); ; break;} case 361: -#line 1638 "parse.y" +#line 1639 "parse.y" { resume_momentary (yyvsp[-1].itype); ; break;} case 362: -#line 1640 "parse.y" +#line 1641 "parse.y" { shadow_tag (yyvsp[-1].ftype.t); note_list_got_semicolon (yyvsp[-1].ftype.t); ; break;} case 363: -#line 1645 "parse.y" +#line 1646 "parse.y" { warning ("empty declaration"); ; break;} case 364: -#line 1647 "parse.y" +#line 1648 "parse.y" { pedantic = yyvsp[-1].itype; ; break;} case 367: -#line 1661 "parse.y" +#line 1662 "parse.y" { yyval.ttype = make_call_declarator (NULL_TREE, empty_parms (), NULL_TREE, NULL_TREE); ; break;} case 368: -#line 1664 "parse.y" +#line 1665 "parse.y" { yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), NULL_TREE, NULL_TREE); ; break;} case 369: -#line 1671 "parse.y" +#line 1672 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 370: -#line 1674 "parse.y" +#line 1675 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 371: -#line 1677 "parse.y" +#line 1678 "parse.y" { yyval.ftype.t = build_decl_list (get_decl_list (yyvsp[-1].ftype.t), yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 372: -#line 1680 "parse.y" +#line 1681 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 373: -#line 1683 "parse.y" +#line 1684 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 376: -#line 1699 "parse.y" +#line 1700 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ttype); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 377: -#line 1702 "parse.y" +#line 1703 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 378: -#line 1705 "parse.y" +#line 1706 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-2].ftype.t, chainon (yyvsp[-1].ttype, yyvsp[0].ttype)); yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ; break;} case 379: -#line 1708 "parse.y" +#line 1709 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ttype)); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 380: -#line 1711 "parse.y" +#line 1712 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ttype)); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 381: -#line 1714 "parse.y" +#line 1715 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-2].ftype.t, chainon (yyvsp[-1].ttype, chainon (yyvsp[0].ttype, yyvsp[-3].ttype))); yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ; break;} case 382: -#line 1721 "parse.y" +#line 1722 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyval.ttype)); yyval.ttype = build_decl_list (NULL_TREE, yyval.ttype); ; break;} case 383: -#line 1726 "parse.y" +#line 1727 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyval.ttype); ; break;} case 384: -#line 1728 "parse.y" +#line 1729 "parse.y" { if (extra_warnings) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} case 385: -#line 1733 "parse.y" +#line 1734 "parse.y" { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 386: -#line 1735 "parse.y" +#line 1736 "parse.y" { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 387: -#line 1745 "parse.y" +#line 1746 "parse.y" { yyval.ttype = yyvsp[0].ftype.t; TREE_STATIC (yyval.ttype) = 1; ; break;} case 388: -#line 1747 "parse.y" +#line 1748 "parse.y" { yyval.ttype = IDENTIFIER_AS_LIST (yyval.ttype); ; break;} case 389: -#line 1749 "parse.y" +#line 1750 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); TREE_STATIC (yyval.ttype) = 1; ; break;} case 390: -#line 1752 "parse.y" +#line 1753 "parse.y" { if (extra_warnings && TREE_STATIC (yyval.ttype)) warning ("`%s' is not at beginning of declaration", IDENTIFIER_POINTER (yyvsp[0].ttype)); @@ -5760,61 +5757,61 @@ case 390: TREE_STATIC (yyval.ttype) = TREE_STATIC (yyvsp[-1].ttype); ; break;} case 391: -#line 1758 "parse.y" +#line 1759 "parse.y" { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, yyvsp[-1].ttype); ; break;} case 392: -#line 1760 "parse.y" +#line 1761 "parse.y" { yyval.ttype = decl_tree_cons (yyvsp[0].ttype, NULL_TREE, NULL_TREE); ; break;} case 393: -#line 1771 "parse.y" +#line 1772 "parse.y" { yyval.ftype.t = get_decl_list (yyvsp[0].ftype.t); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 394: -#line 1774 "parse.y" +#line 1775 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 395: -#line 1777 "parse.y" +#line 1778 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 396: -#line 1780 "parse.y" +#line 1781 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[-1].ftype.t, chainon (yyvsp[0].ttype, yyvsp[-2].ftype.t)); yyval.ftype.new_type_flag = yyvsp[-2].ftype.new_type_flag; ; break;} case 397: -#line 1786 "parse.y" +#line 1787 "parse.y" { yyval.ttype = build_decl_list (NULL_TREE, yyvsp[0].ftype.t); ; break;} case 398: -#line 1788 "parse.y" +#line 1789 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ftype.t, yyvsp[-1].ttype); ; break;} case 400: -#line 1798 "parse.y" +#line 1799 "parse.y" { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ; break;} case 401: -#line 1800 "parse.y" +#line 1801 "parse.y" { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ; break;} case 402: -#line 1802 "parse.y" +#line 1803 "parse.y" { yyval.ftype.t = finish_typeof (yyvsp[-1].ttype); yyval.ftype.new_type_flag = 0; ; break;} case 403: -#line 1805 "parse.y" +#line 1806 "parse.y" { yyval.ftype.t = groktypename (yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = 0; ; break;} case 404: -#line 1808 "parse.y" +#line 1809 "parse.y" { tree type = TREE_TYPE (yyvsp[-1].ttype); yyval.ftype.new_type_flag = 0; @@ -5831,7 +5828,7 @@ case 404: ; break;} case 405: -#line 1823 "parse.y" +#line 1824 "parse.y" { tree type = groktypename (yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = 0; @@ -5848,200 +5845,200 @@ case 405: ; break;} case 406: -#line 1843 "parse.y" +#line 1844 "parse.y" { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ; break;} case 407: -#line 1845 "parse.y" +#line 1846 "parse.y" { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; ; break;} case 410: -#line 1852 "parse.y" +#line 1853 "parse.y" { check_multiple_declarators (); ; break;} case 412: -#line 1858 "parse.y" +#line 1859 "parse.y" { check_multiple_declarators (); ; break;} case 414: -#line 1864 "parse.y" +#line 1865 "parse.y" { check_multiple_declarators (); ; break;} case 415: -#line 1869 "parse.y" +#line 1870 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 416: -#line 1871 "parse.y" +#line 1872 "parse.y" { if (TREE_CHAIN (yyvsp[-1].ttype)) yyvsp[-1].ttype = combine_strings (yyvsp[-1].ttype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 417: -#line 1876 "parse.y" +#line 1877 "parse.y" { yyval.ttype = start_decl (yyvsp[-3].ttype, current_declspecs, 1, yyvsp[-1].ttype, prefix_attributes); ; break;} case 418: -#line 1880 "parse.y" +#line 1881 "parse.y" { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 1, LOOKUP_ONLYCONVERTING); ; break;} case 419: -#line 1882 "parse.y" +#line 1883 "parse.y" { yyval.ttype = start_decl (yyvsp[-2].ttype, current_declspecs, 0, yyvsp[0].ttype, prefix_attributes); cp_finish_decl (yyval.ttype, NULL_TREE, yyvsp[-1].ttype, 1, 0); ; break;} case 420: -#line 1895 "parse.y" +#line 1896 "parse.y" { yyvsp[0].itype = parse_decl (yyvsp[-3].ttype, yyvsp[-4].ttype, yyvsp[-1].ttype, 1, &yyval.ttype); ; break;} case 421: -#line 1900 "parse.y" +#line 1901 "parse.y" { cp_finish_decl (yyvsp[-1].ttype, yyvsp[0].ttype, yyvsp[-4].ttype, 1, LOOKUP_ONLYCONVERTING); yyval.itype = yyvsp[-2].itype; ; break;} case 422: -#line 1904 "parse.y" +#line 1905 "parse.y" { tree d; yyval.itype = parse_decl (yyvsp[-2].ttype, yyvsp[-3].ttype, yyvsp[0].ttype, 0, &d); cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 1, 0); ; break;} case 423: -#line 1911 "parse.y" +#line 1912 "parse.y" { yyval.itype = yyvsp[0].itype; ; break;} case 424: -#line 1915 "parse.y" +#line 1916 "parse.y" { yyval.itype = yyvsp[0].itype; ; break;} case 425: -#line 1920 "parse.y" +#line 1921 "parse.y" { /* Set things up as initdcl0_innards expects. */ yyvsp[0].ttype = yyvsp[-1].ttype; yyvsp[-1].ttype = NULL_TREE; ; break;} case 426: -#line 1924 "parse.y" +#line 1925 "parse.y" {; break;} case 427: -#line 1926 "parse.y" +#line 1927 "parse.y" { tree d; parse_decl(yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype, 0, &d); cp_finish_decl (d, NULL_TREE, yyvsp[-1].ttype, 1, 0); ; break;} case 428: -#line 1935 "parse.y" +#line 1936 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 429: -#line 1937 "parse.y" +#line 1938 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 430: -#line 1942 "parse.y" +#line 1943 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 431: -#line 1944 "parse.y" +#line 1945 "parse.y" { yyval.ttype = chainon (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 432: -#line 1949 "parse.y" +#line 1950 "parse.y" { yyval.ttype = yyvsp[-2].ttype; ; break;} case 433: -#line 1954 "parse.y" +#line 1955 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 434: -#line 1956 "parse.y" +#line 1957 "parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 435: -#line 1961 "parse.y" +#line 1962 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 436: -#line 1963 "parse.y" +#line 1964 "parse.y" { yyval.ttype = build_tree_list (yyvsp[0].ttype, NULL_TREE); ; break;} case 437: -#line 1965 "parse.y" +#line 1966 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, build_tree_list (NULL_TREE, yyvsp[-1].ttype)); ; break;} case 438: -#line 1967 "parse.y" +#line 1968 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-5].ttype, tree_cons (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype)); ; break;} case 439: -#line 1969 "parse.y" +#line 1970 "parse.y" { yyval.ttype = build_tree_list (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 444: -#line 1985 "parse.y" +#line 1986 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ttype); ; break;} case 445: -#line 1987 "parse.y" +#line 1988 "parse.y" { yyval.ttype = chainon (yyvsp[-2].ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 446: -#line 1992 "parse.y" +#line 1993 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 447: -#line 1994 "parse.y" +#line 1995 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 449: -#line 2002 "parse.y" +#line 2003 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, NULL_TREE); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} case 450: -#line 2005 "parse.y" +#line 2006 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-1].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} case 451: -#line 2008 "parse.y" +#line 2009 "parse.y" { yyval.ttype = build_nt (CONSTRUCTOR, NULL_TREE, nreverse (yyvsp[-2].ttype)); TREE_HAS_CONSTRUCTOR (yyval.ttype) = 1; ; break;} case 452: -#line 2011 "parse.y" +#line 2012 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 453: -#line 2018 "parse.y" +#line 2019 "parse.y" { yyval.ttype = build_tree_list (NULL_TREE, yyval.ttype); ; break;} case 454: -#line 2020 "parse.y" +#line 2021 "parse.y" { yyval.ttype = expr_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} case 455: -#line 2023 "parse.y" +#line 2024 "parse.y" { yyval.ttype = build_expr_list (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 456: -#line 2025 "parse.y" +#line 2026 "parse.y" { yyval.ttype = build_expr_list (yyval.ttype, yyvsp[0].ttype); ; break;} case 457: -#line 2027 "parse.y" +#line 2028 "parse.y" { yyval.ttype = expr_tree_cons (yyvsp[-2].ttype, yyvsp[0].ttype, yyval.ttype); ; break;} case 458: -#line 2032 "parse.y" +#line 2033 "parse.y" { start_function (NULL_TREE, TREE_VALUE (yyvsp[0].ttype), NULL_TREE, 1); reinit_parse_for_function (); ; break;} case 459: -#line 2038 "parse.y" +#line 2039 "parse.y" { int nested = (hack_decl_function_context (current_function_decl) != NULL_TREE); @@ -6050,37 +6047,37 @@ case 459: ; break;} case 460: -#line 2045 "parse.y" +#line 2046 "parse.y" { process_next_inline (yyvsp[-2].ttype); ; break;} case 461: -#line 2047 "parse.y" +#line 2048 "parse.y" { process_next_inline (yyvsp[-2].ttype); ; break;} case 464: -#line 2059 "parse.y" +#line 2060 "parse.y" { replace_defarg (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 465: -#line 2061 "parse.y" +#line 2062 "parse.y" { replace_defarg (yyvsp[-2].ttype, error_mark_node); ; break;} case 467: -#line 2066 "parse.y" +#line 2067 "parse.y" { do_pending_defargs (); ; break;} case 468: -#line 2068 "parse.y" +#line 2069 "parse.y" { do_pending_defargs (); ; break;} case 469: -#line 2073 "parse.y" +#line 2074 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = current_enum_type; current_enum_type = start_enum (yyvsp[-1].ttype); ; break;} case 470: -#line 2077 "parse.y" +#line 2078 "parse.y" { TYPE_VALUES (current_enum_type) = yyvsp[-2].ttype; yyval.ftype.t = finish_enum (current_enum_type); yyval.ftype.new_type_flag = 1; @@ -6089,51 +6086,51 @@ case 470: check_for_missing_semicolon (yyval.ftype.t); ; break;} case 471: -#line 2084 "parse.y" +#line 2085 "parse.y" { yyval.ftype.t = finish_enum (start_enum (yyvsp[-2].ttype)); yyval.ftype.new_type_flag = 1; check_for_missing_semicolon (yyval.ftype.t); ; break;} case 472: -#line 2088 "parse.y" +#line 2089 "parse.y" { yyvsp[0].itype = suspend_momentary (); yyval.ttype = current_enum_type; current_enum_type = start_enum (make_anon_name ()); ; break;} case 473: -#line 2092 "parse.y" +#line 2093 "parse.y" { TYPE_VALUES (current_enum_type) = yyvsp[-2].ttype; yyval.ftype.t = finish_enum (current_enum_type); yyval.ftype.new_type_flag = 1; - current_enum_type = yyvsp[-2].ttype; + current_enum_type = yyvsp[-3].ttype; resume_momentary ((int) yyvsp[-5].itype); check_for_missing_semicolon (yyval.ftype.t); ; break;} case 474: -#line 2099 "parse.y" +#line 2100 "parse.y" { yyval.ftype.t = finish_enum (start_enum (make_anon_name())); yyval.ftype.new_type_flag = 1; check_for_missing_semicolon (yyval.ftype.t); ; break;} case 475: -#line 2103 "parse.y" +#line 2104 "parse.y" { yyval.ftype.t = xref_tag (enum_type_node, yyvsp[0].ttype, 1); yyval.ftype.new_type_flag = 0; ; break;} case 476: -#line 2106 "parse.y" +#line 2107 "parse.y" { yyval.ftype.t = xref_tag (enum_type_node, yyvsp[0].ttype, 1); yyval.ftype.new_type_flag = 0; ; break;} case 477: -#line 2109 "parse.y" +#line 2110 "parse.y" { yyval.ftype.t = yyvsp[0].ttype; yyval.ftype.new_type_flag = 0; if (!processing_template_decl) cp_pedwarn ("using `typename' outside of template"); ; break;} case 478: -#line 2116 "parse.y" +#line 2117 "parse.y" { int semi; @@ -6145,17 +6142,17 @@ case 478: ; break;} case 479: -#line 2126 "parse.y" +#line 2127 "parse.y" { finish_default_args (); ; break;} case 480: -#line 2128 "parse.y" +#line 2129 "parse.y" { yyval.ftype.t = yyvsp[-3].ttype; yyval.ftype.new_type_flag = 1; begin_inline_definitions (); ; break;} case 481: -#line 2132 "parse.y" +#line 2133 "parse.y" { yyval.ftype.new_type_flag = 0; if (TYPE_BINFO (yyvsp[0].ttype) == NULL_TREE) @@ -6175,88 +6172,88 @@ case 481: ; break;} case 485: -#line 2159 "parse.y" +#line 2160 "parse.y" { if (pedantic && !in_system_header) pedwarn ("comma at end of enumerator list"); ; break;} case 487: -#line 2166 "parse.y" +#line 2167 "parse.y" { error ("storage class specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} case 488: -#line 2168 "parse.y" +#line 2169 "parse.y" { error ("type specifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} case 489: -#line 2170 "parse.y" +#line 2171 "parse.y" { error ("type qualifier `%s' not allowed after struct or class", IDENTIFIER_POINTER (yyvsp[0].ttype)); ; break;} case 490: -#line 2172 "parse.y" +#line 2173 "parse.y" { error ("no body nor ';' separates two class, struct or union declarations"); ; break;} case 491: -#line 2174 "parse.y" +#line 2175 "parse.y" { yyval.ttype = build_decl_list (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 492: -#line 2179 "parse.y" +#line 2180 "parse.y" { current_aggr = yyvsp[-1].ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 493: -#line 2187 "parse.y" +#line 2188 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 494: -#line 2189 "parse.y" +#line 2190 "parse.y" { yyungetc ('{', 1); ; break;} case 495: -#line 2191 "parse.y" +#line 2192 "parse.y" { yyungetc (':', 1); ; break;} case 496: -#line 2196 "parse.y" +#line 2197 "parse.y" { current_aggr = yyvsp[-2].ttype; yyval.ttype = handle_class_head (yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 497: -#line 2201 "parse.y" +#line 2202 "parse.y" { current_aggr = yyvsp[-3].ttype; yyval.ttype = handle_class_head (yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 498: -#line 2206 "parse.y" +#line 2207 "parse.y" { current_aggr = yyvsp[-2].ttype; yyval.ttype = handle_class_head (yyvsp[-2].ttype, NULL_TREE, yyvsp[0].ttype); ; break;} case 499: -#line 2211 "parse.y" +#line 2212 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 500: -#line 2213 "parse.y" +#line 2214 "parse.y" { current_aggr = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 501: -#line 2218 "parse.y" +#line 2219 "parse.y" { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, 1); ; break;} case 502: -#line 2220 "parse.y" +#line 2221 "parse.y" { yyval.ttype = xref_tag (current_aggr, yyvsp[0].ttype, 0); ; break;} case 503: -#line 2224 "parse.y" +#line 2225 "parse.y" { yyval.ttype = yyvsp[-1].ttype; if (yyvsp[0].ttype) @@ -6264,11 +6261,11 @@ case 503: ; break;} case 504: -#line 2230 "parse.y" +#line 2231 "parse.y" { push_scope (CP_DECL_CONTEXT (yyvsp[0].ttype)); ; break;} case 505: -#line 2232 "parse.y" +#line 2233 "parse.y" { pop_scope (CP_DECL_CONTEXT (yyvsp[-2].ttype)); yyval.ttype = TREE_TYPE (yyvsp[-2].ttype); @@ -6286,44 +6283,44 @@ case 505: ; break;} case 506: -#line 2251 "parse.y" +#line 2252 "parse.y" { yyval.ttype = xref_tag (yyval.ttype, make_anon_name (), 0); yyungetc ('{', 1); ; break;} case 509: -#line 2262 "parse.y" +#line 2263 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 510: -#line 2264 "parse.y" +#line 2265 "parse.y" { yyungetc(':', 1); yyval.ttype = NULL_TREE; ; break;} case 511: -#line 2266 "parse.y" +#line 2267 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 513: -#line 2272 "parse.y" +#line 2273 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} case 514: -#line 2277 "parse.y" +#line 2278 "parse.y" { yyval.ttype = finish_base_specifier (access_default_node, yyvsp[0].ttype, current_aggr == signature_type_node); ; break;} case 515: -#line 2281 "parse.y" +#line 2282 "parse.y" { yyval.ttype = finish_base_specifier (yyvsp[-2].ttype, yyvsp[0].ttype, current_aggr == signature_type_node); ; break;} case 516: -#line 2288 "parse.y" +#line 2289 "parse.y" { if (yyval.ttype != error_mark_node) yyval.ttype = TYPE_MAIN_DECL (yyvsp[0].ttype); ; break;} case 518: -#line 2291 "parse.y" +#line 2292 "parse.y" { if (current_aggr == signature_type_node) { @@ -6346,7 +6343,7 @@ case 518: ; break;} case 519: -#line 2312 "parse.y" +#line 2313 "parse.y" { if (current_aggr == signature_type_node) { @@ -6369,13 +6366,13 @@ case 519: ; break;} case 521: -#line 2337 "parse.y" +#line 2338 "parse.y" { if (yyvsp[-1].ttype != ridpointers[(int)RID_VIRTUAL]) cp_error ("`%D' access", yyvsp[-1].ttype); yyval.ttype = access_default_virtual_node; ; break;} case 522: -#line 2341 "parse.y" +#line 2342 "parse.y" { if (yyvsp[-2].ttype != access_default_virtual_node) error ("multiple access specifiers"); @@ -6388,7 +6385,7 @@ case 522: ; break;} case 523: -#line 2352 "parse.y" +#line 2353 "parse.y" { if (yyvsp[-1].ttype != ridpointers[(int)RID_VIRTUAL]) cp_error ("`%D' access", yyvsp[-1].ttype); else if (yyval.ttype == access_public_node) @@ -6402,17 +6399,17 @@ case 523: ; break;} case 524: -#line 2367 "parse.y" +#line 2368 "parse.y" { yyvsp[-1].ttype = begin_class_definition (yyvsp[-1].ttype); ; break;} case 525: -#line 2372 "parse.y" +#line 2373 "parse.y" { finish_member_declaration (build_self_reference ()); ; break;} case 530: -#line 2386 "parse.y" +#line 2387 "parse.y" { if (current_aggr == signature_type_node) { @@ -6424,49 +6421,49 @@ case 530: ; break;} case 531: -#line 2401 "parse.y" +#line 2402 "parse.y" { finish_member_declaration (yyvsp[0].ttype); ; break;} case 532: -#line 2405 "parse.y" +#line 2406 "parse.y" { finish_member_declaration (yyvsp[0].ttype); ; break;} case 534: -#line 2413 "parse.y" +#line 2414 "parse.y" { error ("missing ';' before right brace"); yyungetc ('}', 0); ; break;} case 535: -#line 2418 "parse.y" +#line 2419 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} case 536: -#line 2420 "parse.y" +#line 2421 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} case 537: -#line 2422 "parse.y" +#line 2423 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} case 538: -#line 2424 "parse.y" +#line 2425 "parse.y" { yyval.ttype = finish_method (yyval.ttype); ; break;} case 539: -#line 2426 "parse.y" +#line 2427 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 540: -#line 2428 "parse.y" +#line 2429 "parse.y" { yyval.ttype = yyvsp[0].ttype; pedantic = yyvsp[-1].itype; ; break;} case 541: -#line 2431 "parse.y" +#line 2432 "parse.y" { if (yyvsp[0].ttype) yyval.ttype = finish_member_template_decl (yyvsp[0].ttype); @@ -6478,14 +6475,14 @@ case 541: ; break;} case 542: -#line 2441 "parse.y" +#line 2442 "parse.y" { yyval.ttype = finish_member_class_template (yyvsp[-1].ftype.t); finish_template_decl (yyvsp[-2].ttype); ; break;} case 543: -#line 2452 "parse.y" +#line 2453 "parse.y" { /* Most of the productions for component_decl only allow the creation of one new member, so we call @@ -6508,7 +6505,7 @@ case 543: ; break;} case 544: -#line 2473 "parse.y" +#line 2474 "parse.y" { if (!yyvsp[0].itype) grok_x_components (yyvsp[-1].ttype); @@ -6516,45 +6513,45 @@ case 544: ; break;} case 545: -#line 2479 "parse.y" +#line 2480 "parse.y" { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ; break;} case 546: -#line 2482 "parse.y" +#line 2483 "parse.y" { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ; break;} case 547: -#line 2485 "parse.y" +#line 2486 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, NULL_TREE, yyvsp[0].ttype); ; break;} case 548: -#line 2487 "parse.y" +#line 2488 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 549: -#line 2498 "parse.y" +#line 2499 "parse.y" { tree specs, attrs; split_specs_attrs (yyvsp[-4].ttype, &specs, &attrs); yyval.ttype = grokfield (yyvsp[-3].ttype, specs, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, attrs)); ; break;} case 550: -#line 2503 "parse.y" +#line 2504 "parse.y" { yyval.ttype = grokfield (yyval.ttype, NULL_TREE, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, NULL_TREE)); ; break;} case 551: -#line 2506 "parse.y" +#line 2507 "parse.y" { yyval.ttype = do_class_using_decl (yyvsp[0].ttype); ; break;} case 552: -#line 2512 "parse.y" +#line 2513 "parse.y" { yyval.itype = 0; ; break;} case 553: -#line 2514 "parse.y" +#line 2515 "parse.y" { if (PROCESSING_REAL_TEMPLATE_DECL_P ()) yyvsp[0].ttype = finish_member_template_decl (yyvsp[0].ttype); @@ -6563,7 +6560,7 @@ case 553: ; break;} case 554: -#line 2521 "parse.y" +#line 2522 "parse.y" { check_multiple_declarators (); if (PROCESSING_REAL_TEMPLATE_DECL_P ()) @@ -6573,11 +6570,11 @@ case 554: ; break;} case 555: -#line 2532 "parse.y" +#line 2533 "parse.y" { yyval.itype = 0; ; break;} case 556: -#line 2534 "parse.y" +#line 2535 "parse.y" { if (PROCESSING_REAL_TEMPLATE_DECL_P ()) yyvsp[0].ttype = finish_member_template_decl (yyvsp[0].ttype); @@ -6586,7 +6583,7 @@ case 556: ; break;} case 557: -#line 2541 "parse.y" +#line 2542 "parse.y" { check_multiple_declarators (); if (PROCESSING_REAL_TEMPLATE_DECL_P ()) @@ -6596,7 +6593,7 @@ case 557: ; break;} case 562: -#line 2562 "parse.y" +#line 2563 "parse.y" { split_specs_attrs (yyvsp[-4].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-4].ttype = current_declspecs; @@ -6604,7 +6601,7 @@ case 562: build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ; break;} case 563: -#line 2568 "parse.y" +#line 2569 "parse.y" { split_specs_attrs (yyvsp[-4].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-4].ttype = current_declspecs; @@ -6612,7 +6609,7 @@ case 563: cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 564: -#line 2577 "parse.y" +#line 2578 "parse.y" { split_specs_attrs (yyvsp[-4].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-4].ttype = current_declspecs; @@ -6620,7 +6617,7 @@ case 564: build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ; break;} case 565: -#line 2583 "parse.y" +#line 2584 "parse.y" { split_specs_attrs (yyvsp[-4].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-4].ttype = current_declspecs; @@ -6628,7 +6625,7 @@ case 565: build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ; break;} case 566: -#line 2589 "parse.y" +#line 2590 "parse.y" { split_specs_attrs (yyvsp[-4].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-4].ttype = current_declspecs; @@ -6636,7 +6633,7 @@ case 566: cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 567: -#line 2595 "parse.y" +#line 2596 "parse.y" { split_specs_attrs (yyvsp[-3].ttype, ¤t_declspecs, &prefix_attributes); yyvsp[-3].ttype = current_declspecs; @@ -6644,54 +6641,54 @@ case 567: cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 568: -#line 2604 "parse.y" +#line 2605 "parse.y" { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ; break;} case 569: -#line 2607 "parse.y" +#line 2608 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 570: -#line 2613 "parse.y" +#line 2614 "parse.y" { yyval.ttype = grokfield (yyval.ttype, current_declspecs, yyvsp[0].ttype, yyvsp[-2].ttype, build_tree_list (yyvsp[-1].ttype, prefix_attributes)); ; break;} case 571: -#line 2616 "parse.y" +#line 2617 "parse.y" { yyval.ttype = grokbitfield (yyval.ttype, current_declspecs, yyvsp[-1].ttype); cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 572: -#line 2619 "parse.y" +#line 2620 "parse.y" { yyval.ttype = grokbitfield (NULL_TREE, current_declspecs, yyvsp[-1].ttype); cplus_decl_attributes (yyval.ttype, yyvsp[0].ttype, prefix_attributes); ; break;} case 574: -#line 2630 "parse.y" +#line 2631 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 575: -#line 2635 "parse.y" +#line 2636 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, NULL_TREE, current_enum_type); ; break;} case 576: -#line 2637 "parse.y" +#line 2638 "parse.y" { yyval.ttype = build_enumerator (yyval.ttype, yyvsp[0].ttype, current_enum_type); ; break;} case 577: -#line 2643 "parse.y" +#line 2644 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 578: -#line 2646 "parse.y" +#line 2647 "parse.y" { yyval.ftype.t = build_decl_list (yyvsp[0].ftype.t, NULL_TREE); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 579: -#line 2653 "parse.y" +#line 2654 "parse.y" { if (pedantic) pedwarn ("ANSI C++ forbids array dimensions with parenthesized type in new"); @@ -6701,71 +6698,71 @@ case 579: ; break;} case 580: -#line 2664 "parse.y" +#line 2665 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 581: -#line 2666 "parse.y" +#line 2667 "parse.y" { yyval.ttype = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} case 582: -#line 2671 "parse.y" +#line 2672 "parse.y" { yyval.ftype.t = IDENTIFIER_AS_LIST (yyvsp[0].ttype); yyval.ftype.new_type_flag = 0; ; break;} case 583: -#line 2674 "parse.y" +#line 2675 "parse.y" { yyval.ftype.t = decl_tree_cons (NULL_TREE, yyvsp[0].ttype, yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 584: -#line 2683 "parse.y" +#line 2684 "parse.y" { yyval.itype = suspend_momentary (); ; break;} case 585: -#line 2688 "parse.y" +#line 2689 "parse.y" { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = yyvsp[0].ttype; ; break;} case 586: -#line 2694 "parse.y" +#line 2695 "parse.y" { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 587: -#line 2696 "parse.y" +#line 2697 "parse.y" { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = yyvsp[-1].ttype; ; break;} case 588: -#line 2698 "parse.y" +#line 2699 "parse.y" { resume_momentary ((int) yyvsp[-1].itype); yyval.ttype = empty_parms (); ; break;} case 589: -#line 2700 "parse.y" +#line 2701 "parse.y" { resume_momentary ((int) yyvsp[-3].itype); yyval.ttype = NULL_TREE; ; break;} case 590: -#line 2707 "parse.y" +#line 2708 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 591: -#line 2709 "parse.y" +#line 2710 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 592: -#line 2711 "parse.y" +#line 2712 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 593: -#line 2713 "parse.y" +#line 2714 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 594: -#line 2715 "parse.y" +#line 2716 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 596: -#line 2723 "parse.y" +#line 2724 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) { @@ -6784,7 +6781,7 @@ case 596: ; break;} case 597: -#line 2740 "parse.y" +#line 2741 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype); @@ -6794,37 +6791,37 @@ case 597: ; break;} case 600: -#line 2753 "parse.y" +#line 2754 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 601: -#line 2758 "parse.y" +#line 2759 "parse.y" { yyval.ttype = get_type_decl (yyvsp[0].ttype); ; break;} case 602: -#line 2763 "parse.y" +#line 2764 "parse.y" { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 603: -#line 2765 "parse.y" +#line 2766 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} case 604: -#line 2767 "parse.y" +#line 2768 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} case 605: -#line 2769 "parse.y" +#line 2770 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 606: -#line 2771 "parse.y" +#line 2772 "parse.y" { push_nested_class (yyvsp[-1].ttype, 3); yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); TREE_COMPLEXITY (yyval.ttype) = current_class_depth; ; break;} case 609: -#line 2783 "parse.y" +#line 2784 "parse.y" { /* Provide support for '(' attributes '*' declarator ')' etc */ @@ -6832,122 +6829,122 @@ case 609: ; break;} case 610: -#line 2792 "parse.y" +#line 2793 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 611: -#line 2794 "parse.y" +#line 2795 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 612: -#line 2796 "parse.y" +#line 2797 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 613: -#line 2798 "parse.y" +#line 2799 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 614: -#line 2800 "parse.y" +#line 2801 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 616: -#line 2808 "parse.y" +#line 2809 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 617: -#line 2810 "parse.y" +#line 2811 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 618: -#line 2812 "parse.y" +#line 2813 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 619: -#line 2814 "parse.y" +#line 2815 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 620: -#line 2816 "parse.y" +#line 2817 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 622: -#line 2824 "parse.y" +#line 2825 "parse.y" { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-2].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 623: -#line 2826 "parse.y" +#line 2827 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 624: -#line 2828 "parse.y" +#line 2829 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} case 625: -#line 2830 "parse.y" +#line 2831 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} case 626: -#line 2832 "parse.y" +#line 2833 "parse.y" { enter_scope_of (yyvsp[0].ttype); ; break;} case 627: -#line 2834 "parse.y" +#line 2835 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); enter_scope_of (yyval.ttype); ; break;} case 628: -#line 2842 "parse.y" +#line 2843 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} case 629: -#line 2845 "parse.y" +#line 2846 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 630: -#line 2851 "parse.y" +#line 2852 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; break;} case 631: -#line 2854 "parse.y" +#line 2855 "parse.y" { got_scope = NULL_TREE; yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 633: -#line 2861 "parse.y" +#line 2862 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 634: -#line 2866 "parse.y" +#line 2867 "parse.y" { yyval.ttype = build_functional_cast (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ; break;} case 635: -#line 2868 "parse.y" +#line 2869 "parse.y" { yyval.ttype = reparse_decl_as_expr (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ; break;} case 636: -#line 2870 "parse.y" +#line 2871 "parse.y" { yyval.ttype = reparse_absdcl_as_expr (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 641: -#line 2881 "parse.y" +#line 2882 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 642: -#line 2883 "parse.y" +#line 2884 "parse.y" { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 643: -#line 2890 "parse.y" +#line 2891 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE) { @@ -6963,7 +6960,7 @@ case 643: ; break;} case 644: -#line 2904 "parse.y" +#line 2905 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE) yyval.ttype = lastiddecl; @@ -6971,7 +6968,7 @@ case 644: ; break;} case 645: -#line 2910 "parse.y" +#line 2911 "parse.y" { if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE) yyval.ttype = lastiddecl; @@ -6979,15 +6976,15 @@ case 645: ; break;} case 646: -#line 2916 "parse.y" +#line 2917 "parse.y" { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyvsp[-1].ttype)); ; break;} case 648: -#line 2932 "parse.y" +#line 2933 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 649: -#line 2937 "parse.y" +#line 2938 "parse.y" { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't') yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); @@ -7002,26 +6999,26 @@ case 649: ; break;} case 650: -#line 2950 "parse.y" +#line 2951 "parse.y" { yyval.ttype = TREE_TYPE (yyvsp[0].ttype); ; break;} case 651: -#line 2952 "parse.y" +#line 2953 "parse.y" { yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 652: -#line 2954 "parse.y" +#line 2955 "parse.y" { yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[0].ttype); ; break;} case 653: -#line 2959 "parse.y" +#line 2960 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype); ; break;} case 654: -#line 2964 "parse.y" +#line 2965 "parse.y" { if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't') yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); @@ -7036,15 +7033,15 @@ case 654: ; break;} case 655: -#line 2977 "parse.y" +#line 2978 "parse.y" { got_scope = yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[-1].ttype); ; break;} case 656: -#line 2979 "parse.y" +#line 2980 "parse.y" { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 657: -#line 2984 "parse.y" +#line 2985 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE) yyvsp[-1].ttype = lastiddecl; @@ -7058,7 +7055,7 @@ case 657: ; break;} case 658: -#line 2996 "parse.y" +#line 2997 "parse.y" { if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE) yyval.ttype = lastiddecl; @@ -7066,11 +7063,11 @@ case 658: ; break;} case 659: -#line 3002 "parse.y" +#line 3003 "parse.y" { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyval.ttype)); ; break;} case 662: -#line 3006 "parse.y" +#line 3007 "parse.y" { if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE) yyval.ttype = lastiddecl; @@ -7078,11 +7075,11 @@ case 662: ; break;} case 663: -#line 3015 "parse.y" +#line 3016 "parse.y" { yyval.ttype = build_min_nt (TEMPLATE_ID_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 664: -#line 3020 "parse.y" +#line 3021 "parse.y" { if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype); @@ -7092,148 +7089,148 @@ case 664: ; break;} case 666: -#line 3029 "parse.y" +#line 3030 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 667: -#line 3034 "parse.y" +#line 3035 "parse.y" { got_scope = NULL_TREE; ; break;} case 668: -#line 3036 "parse.y" +#line 3037 "parse.y" { yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ; break;} case 669: -#line 3043 "parse.y" +#line 3044 "parse.y" { got_scope = void_type_node; ; break;} case 670: -#line 3049 "parse.y" +#line 3050 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 671: -#line 3051 "parse.y" +#line 3052 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 672: -#line 3053 "parse.y" +#line 3054 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 673: -#line 3055 "parse.y" +#line 3056 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; break;} case 674: -#line 3057 "parse.y" +#line 3058 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} case 675: -#line 3061 "parse.y" +#line 3062 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 677: -#line 3070 "parse.y" +#line 3071 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 678: -#line 3072 "parse.y" +#line 3073 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} case 679: -#line 3078 "parse.y" +#line 3079 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 680: -#line 3080 "parse.y" +#line 3081 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 681: -#line 3082 "parse.y" +#line 3083 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[0].ftype.t, NULL_TREE); ; break;} case 682: -#line 3084 "parse.y" +#line 3085 "parse.y" { yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ; break;} case 683: -#line 3086 "parse.y" +#line 3087 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 684: -#line 3088 "parse.y" +#line 3089 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; break;} case 685: -#line 3090 "parse.y" +#line 3091 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[0].ftype.t, NULL_TREE); ; break;} case 686: -#line 3092 "parse.y" +#line 3093 "parse.y" { yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ; break;} case 687: -#line 3094 "parse.y" +#line 3095 "parse.y" { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); ; break;} case 688: -#line 3098 "parse.y" +#line 3099 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 690: -#line 3107 "parse.y" +#line 3108 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 692: -#line 3111 "parse.y" +#line 3112 "parse.y" { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 693: -#line 3113 "parse.y" +#line 3114 "parse.y" { yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 694: -#line 3115 "parse.y" +#line 3116 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; break;} case 695: -#line 3117 "parse.y" +#line 3118 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; break;} case 696: -#line 3119 "parse.y" +#line 3120 "parse.y" { yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 697: -#line 3121 "parse.y" +#line 3122 "parse.y" { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 698: -#line 3123 "parse.y" +#line 3124 "parse.y" { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 699: -#line 3125 "parse.y" +#line 3126 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; break;} case 700: -#line 3127 "parse.y" +#line 3128 "parse.y" { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ; break;} case 707: -#line 3150 "parse.y" +#line 3151 "parse.y" { if (pedantic) pedwarn ("ANSI C++ forbids label declarations"); ; break;} case 710: -#line 3161 "parse.y" +#line 3162 "parse.y" { tree link; for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) { @@ -7244,181 +7241,181 @@ case 710: ; break;} case 711: -#line 3175 "parse.y" +#line 3176 "parse.y" {; break;} case 713: -#line 3181 "parse.y" +#line 3182 "parse.y" { yyval.ttype = begin_compound_stmt (0); ; break;} case 714: -#line 3183 "parse.y" +#line 3184 "parse.y" { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ; break;} case 715: -#line 3188 "parse.y" +#line 3189 "parse.y" { yyval.ttype = begin_if_stmt (); cond_stmt_keyword = "if"; ; break;} case 716: -#line 3193 "parse.y" +#line 3194 "parse.y" { finish_if_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 717: -#line 3195 "parse.y" +#line 3196 "parse.y" { yyval.ttype = finish_then_clause (yyvsp[-3].ttype); ; break;} case 719: -#line 3200 "parse.y" +#line 3201 "parse.y" { yyval.ttype = begin_compound_stmt (0); ; break;} case 720: -#line 3202 "parse.y" +#line 3203 "parse.y" { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ; break;} case 721: -#line 3207 "parse.y" +#line 3208 "parse.y" {; break;} case 723: -#line 3213 "parse.y" +#line 3214 "parse.y" { finish_stmt (); ; break;} case 724: -#line 3215 "parse.y" +#line 3216 "parse.y" { finish_expr_stmt (yyvsp[-1].ttype); ; break;} case 725: -#line 3217 "parse.y" +#line 3218 "parse.y" { begin_else_clause (); ; break;} case 726: -#line 3219 "parse.y" +#line 3220 "parse.y" { finish_else_clause (yyvsp[-3].ttype); finish_if_stmt (); ; break;} case 727: -#line 3224 "parse.y" +#line 3225 "parse.y" { finish_if_stmt (); ; break;} case 728: -#line 3226 "parse.y" +#line 3227 "parse.y" { yyval.ttype = begin_while_stmt (); cond_stmt_keyword = "while"; ; break;} case 729: -#line 3231 "parse.y" +#line 3232 "parse.y" { finish_while_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ; break;} case 730: -#line 3233 "parse.y" +#line 3234 "parse.y" { finish_while_stmt (yyvsp[-3].ttype); ; break;} case 731: -#line 3235 "parse.y" +#line 3236 "parse.y" { yyval.ttype = begin_do_stmt (); ; break;} case 732: -#line 3237 "parse.y" +#line 3238 "parse.y" { finish_do_body (yyvsp[-2].ttype); cond_stmt_keyword = "do"; ; break;} case 733: -#line 3242 "parse.y" +#line 3243 "parse.y" { finish_do_stmt (yyvsp[-1].ttype, yyvsp[-5].ttype); ; break;} case 734: -#line 3244 "parse.y" +#line 3245 "parse.y" { yyval.ttype = begin_for_stmt (); ; break;} case 735: -#line 3246 "parse.y" +#line 3247 "parse.y" { finish_for_init_stmt (yyvsp[-2].ttype); ; break;} case 736: -#line 3248 "parse.y" +#line 3249 "parse.y" { finish_for_cond (yyvsp[-1].ttype, yyvsp[-5].ttype); ; break;} case 737: -#line 3250 "parse.y" +#line 3251 "parse.y" { finish_for_expr (yyvsp[-1].ttype, yyvsp[-8].ttype); ; break;} case 738: -#line 3252 "parse.y" +#line 3253 "parse.y" { finish_for_stmt (yyvsp[-3].ttype, yyvsp[-10].ttype); ; break;} case 739: -#line 3254 "parse.y" +#line 3255 "parse.y" { begin_switch_stmt (); ; break;} case 740: -#line 3256 "parse.y" +#line 3257 "parse.y" { yyval.ttype = finish_switch_cond (yyvsp[-1].ttype); ; break;} case 741: -#line 3258 "parse.y" +#line 3259 "parse.y" { finish_switch_stmt (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 742: -#line 3260 "parse.y" +#line 3261 "parse.y" { finish_case_label (yyvsp[-1].ttype, NULL_TREE); ; break;} case 744: -#line 3263 "parse.y" +#line 3264 "parse.y" { finish_case_label (yyvsp[-3].ttype, yyvsp[-1].ttype); ; break;} case 746: -#line 3266 "parse.y" +#line 3267 "parse.y" { finish_case_label (NULL_TREE, NULL_TREE); ; break;} case 748: -#line 3269 "parse.y" +#line 3270 "parse.y" { finish_break_stmt (); ; break;} case 749: -#line 3271 "parse.y" +#line 3272 "parse.y" { finish_continue_stmt (); ; break;} case 750: -#line 3273 "parse.y" +#line 3274 "parse.y" { finish_return_stmt (NULL_TREE); ; break;} case 751: -#line 3275 "parse.y" +#line 3276 "parse.y" { finish_return_stmt (yyvsp[-1].ttype); ; break;} case 752: -#line 3277 "parse.y" +#line 3278 "parse.y" { finish_asm_stmt (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, NULL_TREE); ; break;} case 753: -#line 3283 "parse.y" +#line 3284 "parse.y" { finish_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE); ; break;} case 754: -#line 3289 "parse.y" +#line 3290 "parse.y" { finish_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ; break;} case 755: -#line 3293 "parse.y" +#line 3294 "parse.y" { finish_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ; break;} case 756: -#line 3295 "parse.y" +#line 3296 "parse.y" { if (pedantic) pedwarn ("ANSI C++ forbids computed gotos"); @@ -7426,29 +7423,29 @@ case 756: ; break;} case 757: -#line 3301 "parse.y" +#line 3302 "parse.y" { finish_goto_stmt (yyvsp[-1].ttype); ; break;} case 758: -#line 3303 "parse.y" +#line 3304 "parse.y" { finish_stmt (); ; break;} case 759: -#line 3305 "parse.y" +#line 3306 "parse.y" { error ("label must be followed by statement"); yyungetc ('}', 0); finish_stmt (); ; break;} case 760: -#line 3309 "parse.y" +#line 3310 "parse.y" { finish_stmt (); ; break;} case 763: -#line 3313 "parse.y" +#line 3314 "parse.y" { do_local_using_decl (yyvsp[0].ttype); ; break;} case 765: -#line 3319 "parse.y" +#line 3320 "parse.y" { if (! current_function_parms_stored) store_parm_decls (); @@ -7456,13 +7453,13 @@ case 765: ; break;} case 766: -#line 3325 "parse.y" +#line 3326 "parse.y" { expand_start_all_catch (); ; break;} case 767: -#line 3329 "parse.y" +#line 3330 "parse.y" { int nested = (hack_decl_function_context (current_function_decl) != NULL_TREE); @@ -7471,41 +7468,41 @@ case 767: ; break;} case 768: -#line 3339 "parse.y" +#line 3340 "parse.y" { yyval.ttype = begin_try_block (); ; break;} case 769: -#line 3341 "parse.y" +#line 3342 "parse.y" { finish_try_block (yyvsp[-1].ttype); ; break;} case 770: -#line 3343 "parse.y" +#line 3344 "parse.y" { finish_handler_sequence (yyvsp[-3].ttype); ; break;} case 773: -#line 3353 "parse.y" +#line 3354 "parse.y" { yyval.ttype = begin_handler(); ; break;} case 774: -#line 3355 "parse.y" +#line 3356 "parse.y" { finish_handler_parms (yyvsp[-1].ttype); ; break;} case 775: -#line 3357 "parse.y" +#line 3358 "parse.y" { finish_handler (yyvsp[-3].ttype); ; break;} case 778: -#line 3367 "parse.y" +#line 3368 "parse.y" { expand_start_catch_block (NULL_TREE, NULL_TREE); ; break;} case 779: -#line 3383 "parse.y" +#line 3384 "parse.y" { check_for_new_type ("inside exception declarations", yyvsp[-1].ftype); expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ftype.t), TREE_VALUE (yyvsp[-1].ftype.t)); ; break;} case 780: -#line 3390 "parse.y" +#line 3391 "parse.y" { tree label; do_label: label = define_label (input_filename, lineno, yyvsp[-1].ttype); @@ -7514,98 +7511,98 @@ case 780: ; break;} case 781: -#line 3397 "parse.y" +#line 3398 "parse.y" { goto do_label; ; break;} case 782: -#line 3399 "parse.y" +#line 3400 "parse.y" { goto do_label; ; break;} case 783: -#line 3401 "parse.y" +#line 3402 "parse.y" { goto do_label; ; break;} case 784: -#line 3406 "parse.y" +#line 3407 "parse.y" { if (yyvsp[-1].ttype) cplus_expand_expr_stmt (yyvsp[-1].ttype); ; break;} case 786: -#line 3409 "parse.y" +#line 3410 "parse.y" { if (pedantic) pedwarn ("ANSI C++ forbids compound statements inside for initializations"); ; break;} case 787: -#line 3418 "parse.y" +#line 3419 "parse.y" { emit_line_note (input_filename, lineno); yyval.ttype = NULL_TREE; ; break;} case 788: -#line 3421 "parse.y" +#line 3422 "parse.y" { emit_line_note (input_filename, lineno); ; break;} case 789: -#line 3426 "parse.y" +#line 3427 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 791: -#line 3429 "parse.y" +#line 3430 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 792: -#line 3436 "parse.y" +#line 3437 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 795: -#line 3443 "parse.y" +#line 3444 "parse.y" { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; break;} case 796: -#line 3448 "parse.y" +#line 3449 "parse.y" { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ; break;} case 797: -#line 3453 "parse.y" +#line 3454 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ; break;} case 798: -#line 3455 "parse.y" +#line 3456 "parse.y" { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; break;} case 799: -#line 3466 "parse.y" +#line 3467 "parse.y" { yyval.ttype = empty_parms(); ; break;} case 801: -#line 3471 "parse.y" +#line 3472 "parse.y" { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[0].ftype.t), 0); check_for_new_type ("inside parameter list", yyvsp[0].ftype); ; break;} case 802: -#line 3479 "parse.y" +#line 3480 "parse.y" { yyval.ttype = finish_parmlist (yyval.ttype, 0); ; break;} case 803: -#line 3481 "parse.y" +#line 3482 "parse.y" { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; break;} case 804: -#line 3484 "parse.y" +#line 3485 "parse.y" { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; break;} case 805: -#line 3486 "parse.y" +#line 3487 "parse.y" { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[-1].ftype.t), 1); ; break;} case 806: -#line 3489 "parse.y" +#line 3490 "parse.y" { yyval.ttype = finish_parmlist (NULL_TREE, 1); ; break;} case 807: -#line 3491 "parse.y" +#line 3492 "parse.y" { /* This helps us recover from really nasty parse errors, for example, a missing right @@ -7617,7 +7614,7 @@ case 807: ; break;} case 808: -#line 3501 "parse.y" +#line 3502 "parse.y" { /* This helps us recover from really nasty parse errors, for example, a missing right @@ -7630,98 +7627,98 @@ case 808: ; break;} case 809: -#line 3516 "parse.y" +#line 3517 "parse.y" { maybe_snarf_defarg (); ; break;} case 810: -#line 3518 "parse.y" +#line 3519 "parse.y" { yyval.ttype = yyvsp[0].ttype; ; break;} case 813: -#line 3529 "parse.y" +#line 3530 "parse.y" { check_for_new_type ("in a parameter list", yyvsp[0].ftype); yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); ; break;} case 814: -#line 3532 "parse.y" +#line 3533 "parse.y" { check_for_new_type ("in a parameter list", yyvsp[-1].ftype); yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); ; break;} case 815: -#line 3535 "parse.y" +#line 3536 "parse.y" { check_for_new_type ("in a parameter list", yyvsp[0].ftype); yyval.ttype = chainon (yyval.ttype, yyvsp[0].ftype.t); ; break;} case 816: -#line 3538 "parse.y" +#line 3539 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; break;} case 817: -#line 3540 "parse.y" +#line 3541 "parse.y" { yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ; break;} case 819: -#line 3546 "parse.y" +#line 3547 "parse.y" { check_for_new_type ("in a parameter list", yyvsp[-1].ftype); yyval.ttype = build_tree_list (NULL_TREE, yyvsp[-1].ftype.t); ; break;} case 820: -#line 3556 "parse.y" +#line 3557 "parse.y" { tree specs = strip_attrs (yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); ; break;} case 821: -#line 3560 "parse.y" +#line 3561 "parse.y" { yyval.ftype.t = build_tree_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 822: -#line 3563 "parse.y" +#line 3564 "parse.y" { yyval.ftype.t = build_tree_list (get_decl_list (yyvsp[-1].ftype.t), yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 823: -#line 3566 "parse.y" +#line 3567 "parse.y" { tree specs = strip_attrs (yyvsp[-1].ftype.t); yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 824: -#line 3570 "parse.y" +#line 3571 "parse.y" { tree specs = strip_attrs (yyvsp[0].ftype.t); yyval.ftype.t = build_tree_list (specs, NULL_TREE); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 825: -#line 3574 "parse.y" +#line 3575 "parse.y" { tree specs = strip_attrs (yyvsp[-1].ttype); yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); yyval.ftype.new_type_flag = 0; ; break;} case 826: -#line 3581 "parse.y" +#line 3582 "parse.y" { yyval.ftype.t = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; break;} case 827: -#line 3584 "parse.y" +#line 3585 "parse.y" { yyval.ftype.t = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; break;} case 830: -#line 3595 "parse.y" +#line 3596 "parse.y" { see_typename (); ; break;} case 831: -#line 3600 "parse.y" +#line 3601 "parse.y" { error ("type specifier omitted for parameter"); yyval.ttype = build_tree_list (integer_type_node, NULL_TREE); ; break;} case 832: -#line 3605 "parse.y" +#line 3606 "parse.y" { error ("type specifier omitted for parameter"); if (TREE_CODE (yyval.ttype) == SCOPE_REF @@ -7732,193 +7729,193 @@ case 832: ; break;} case 833: -#line 3617 "parse.y" +#line 3618 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 834: -#line 3619 "parse.y" +#line 3620 "parse.y" { yyval.ttype = yyvsp[-1].ttype; ; break;} case 835: -#line 3621 "parse.y" +#line 3622 "parse.y" { yyval.ttype = build_decl_list (NULL_TREE, NULL_TREE); ; break;} case 836: -#line 3626 "parse.y" +#line 3627 "parse.y" { yyval.ttype = build_decl_list (NULL_TREE, groktypename(yyvsp[0].ftype.t)); ; break;} case 838: -#line 3632 "parse.y" +#line 3633 "parse.y" { TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; yyval.ttype = yyvsp[0].ttype; ; break;} case 839: -#line 3640 "parse.y" +#line 3641 "parse.y" { yyval.ttype = NULL_TREE; ; break;} case 840: -#line 3642 "parse.y" +#line 3643 "parse.y" { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 841: -#line 3644 "parse.y" +#line 3645 "parse.y" { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; break;} case 842: -#line 3646 "parse.y" +#line 3647 "parse.y" { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); ; break;} case 843: -#line 3653 "parse.y" +#line 3654 "parse.y" { got_scope = NULL_TREE; ; break;} case 844: -#line 3658 "parse.y" +#line 3659 "parse.y" { yyval.ttype = ansi_opname[MULT_EXPR]; ; break;} case 845: -#line 3660 "parse.y" +#line 3661 "parse.y" { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ; break;} case 846: -#line 3662 "parse.y" +#line 3663 "parse.y" { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ; break;} case 847: -#line 3664 "parse.y" +#line 3665 "parse.y" { yyval.ttype = ansi_opname[PLUS_EXPR]; ; break;} case 848: -#line 3666 "parse.y" +#line 3667 "parse.y" { yyval.ttype = ansi_opname[MINUS_EXPR]; ; break;} case 849: -#line 3668 "parse.y" +#line 3669 "parse.y" { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ; break;} case 850: -#line 3670 "parse.y" +#line 3671 "parse.y" { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ; break;} case 851: -#line 3672 "parse.y" +#line 3673 "parse.y" { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ; break;} case 852: -#line 3674 "parse.y" +#line 3675 "parse.y" { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ; break;} case 853: -#line 3676 "parse.y" +#line 3677 "parse.y" { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ; break;} case 854: -#line 3678 "parse.y" +#line 3679 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} case 855: -#line 3680 "parse.y" +#line 3681 "parse.y" { yyval.ttype = ansi_opname[LT_EXPR]; ; break;} case 856: -#line 3682 "parse.y" +#line 3683 "parse.y" { yyval.ttype = ansi_opname[GT_EXPR]; ; break;} case 857: -#line 3684 "parse.y" +#line 3685 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} case 858: -#line 3686 "parse.y" +#line 3687 "parse.y" { yyval.ttype = ansi_assopname[yyvsp[0].code]; ; break;} case 859: -#line 3688 "parse.y" +#line 3689 "parse.y" { yyval.ttype = ansi_opname [MODIFY_EXPR]; ; break;} case 860: -#line 3690 "parse.y" +#line 3691 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} case 861: -#line 3692 "parse.y" +#line 3693 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} case 862: -#line 3694 "parse.y" +#line 3695 "parse.y" { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ; break;} case 863: -#line 3696 "parse.y" +#line 3697 "parse.y" { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ; break;} case 864: -#line 3698 "parse.y" +#line 3699 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ; break;} case 865: -#line 3700 "parse.y" +#line 3701 "parse.y" { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ; break;} case 866: -#line 3702 "parse.y" +#line 3703 "parse.y" { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ; break;} case 867: -#line 3704 "parse.y" +#line 3705 "parse.y" { yyval.ttype = ansi_opname[COND_EXPR]; ; break;} case 868: -#line 3706 "parse.y" +#line 3707 "parse.y" { yyval.ttype = ansi_opname[yyvsp[0].code]; ; break;} case 869: -#line 3708 "parse.y" +#line 3709 "parse.y" { yyval.ttype = ansi_opname[COMPONENT_REF]; ; break;} case 870: -#line 3710 "parse.y" +#line 3711 "parse.y" { yyval.ttype = ansi_opname[MEMBER_REF]; ; break;} case 871: -#line 3712 "parse.y" +#line 3713 "parse.y" { yyval.ttype = ansi_opname[CALL_EXPR]; ; break;} case 872: -#line 3714 "parse.y" +#line 3715 "parse.y" { yyval.ttype = ansi_opname[ARRAY_REF]; ; break;} case 873: -#line 3716 "parse.y" +#line 3717 "parse.y" { yyval.ttype = ansi_opname[NEW_EXPR]; ; break;} case 874: -#line 3718 "parse.y" +#line 3719 "parse.y" { yyval.ttype = ansi_opname[DELETE_EXPR]; ; break;} case 875: -#line 3720 "parse.y" +#line 3721 "parse.y" { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ; break;} case 876: -#line 3722 "parse.y" +#line 3723 "parse.y" { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ; break;} case 877: -#line 3725 "parse.y" +#line 3726 "parse.y" { yyval.ttype = grokoptypename (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; break;} case 878: -#line 3727 "parse.y" +#line 3728 "parse.y" { yyval.ttype = ansi_opname[ERROR_MARK]; ; break;} } /* the action file gets copied in in place of this dollarsign */ -#line 498 "/n/gnu/bison-1.25/share/bison.simple" +#line 498 "/usr/cygnus/gnupro-98r1/share/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -8114,7 +8111,7 @@ yyerrhandle: yystate = yyn; goto yynewstate; } -#line 3730 "parse.y" +#line 3731 "parse.y" #ifdef SPEW_DEBUG diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index c56f3a7..a055fa1 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -1096,7 +1096,8 @@ unary_expr: | SIZEOF unary_expr %prec UNARY { $$ = expr_sizeof ($2); } | SIZEOF '(' type_id ')' %prec HYPERUNARY - { $$ = c_sizeof (groktypename ($3.t)); } + { $$ = c_sizeof (groktypename ($3.t)); + check_for_new_type ("sizeof", $3); } | ALIGNOF unary_expr %prec UNARY { $$ = grok_alignof ($2); } | ALIGNOF '(' type_id ')' %prec HYPERUNARY @@ -2092,7 +2093,7 @@ structsp: { TYPE_VALUES (current_enum_type) = $4; $$.t = finish_enum (current_enum_type); $$.new_type_flag = 1; - current_enum_type = $4; + current_enum_type = $3; resume_momentary ((int) $1); check_for_missing_semicolon ($$.t); } | ENUM '{' '}' diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c index 14b16c8..6ccda36 100644 --- a/gcc/cp/rtti.c +++ b/gcc/cp/rtti.c @@ -39,7 +39,6 @@ static tree call_void_fn PROTO((char *)); static tree build_headof_sub PROTO((tree)); static tree build_headof PROTO((tree)); static tree get_tinfo_var PROTO((tree)); -static tree get_typeid_1 PROTO((tree)); static tree ifnonnull PROTO((tree, tree)); static tree build_dynamic_cast_1 PROTO((tree, tree)); static void expand_si_desc PROTO((tree, tree)); @@ -204,6 +203,12 @@ get_tinfo_fn_dynamic (exp) /* Peel off cv qualifiers. */ type = TYPE_MAIN_VARIANT (type); + if (TYPE_SIZE (complete_type (type)) == NULL_TREE) + { + cp_error ("taking typeid of incomplete type `%T'", type); + return error_mark_node; + } + /* If exp is a reference to polymorphic type, get the real type_info. */ if (TYPE_VIRTUAL_P (type) && ! resolves_to_fixed_type_p (exp, 0)) { @@ -211,13 +216,7 @@ get_tinfo_fn_dynamic (exp) tree t; if (! flag_rtti) - { - warning ("taking dynamic typeid of object without -frtti"); - push_obstacks (&permanent_obstack, &permanent_obstack); - init_rtti_processing (); - pop_obstacks (); - flag_rtti = 1; - } + error ("taking dynamic typeid of object with -fno-rtti"); /* If we don't have rtti stuff, get to a sub-object that does. */ if (! CLASSTYPE_VFIELDS (type)) @@ -256,6 +255,12 @@ build_x_typeid (exp) tree type = TREE_TYPE (tinfo_fn_type); int nonnull; + if (TYPE_SIZE (type_info_type_node) == NULL_TREE) + { + error ("must #include before using typeid"); + return error_mark_node; + } + if (processing_template_decl) return build_min_nt (TYPEID_EXPR, exp); @@ -379,11 +384,13 @@ get_tinfo_fn (type) return d; } -static tree +tree get_typeid_1 (type) tree type; { - tree t = build_call + tree t; + + t = build_call (get_tinfo_fn (type), TREE_TYPE (tinfo_fn_type), NULL_TREE); return convert_from_reference (t); } @@ -396,15 +403,15 @@ get_typeid (type) { if (type == error_mark_node) return error_mark_node; - - if (! flag_rtti) + + if (TYPE_SIZE (type_info_type_node) == NULL_TREE) { - warning ("requesting typeid of object without -frtti"); - push_obstacks (&permanent_obstack, &permanent_obstack); - init_rtti_processing (); - pop_obstacks (); - flag_rtti = 1; + error ("must #include before using typeid"); + return error_mark_node; } + + if (! flag_rtti) + error ("requesting typeid with -fno-rtti"); if (processing_template_decl) return build_min_nt (TYPEID_EXPR, type); @@ -419,6 +426,12 @@ get_typeid (type) that is the operand of typeid are always ignored. */ type = TYPE_MAIN_VARIANT (type); + if (TYPE_SIZE (complete_type (type)) == NULL_TREE) + { + cp_error ("taking typeid of incomplete type `%T'", type); + return error_mark_node; + } + return get_typeid_1 (type); } @@ -446,6 +459,7 @@ build_dynamic_cast_1 (type, expr) tree exprtype = TREE_TYPE (expr); enum tree_code ec; tree dcast_fn; + tree old_expr = expr; assert (exprtype != NULL_TREE); ec = TREE_CODE (exprtype); @@ -512,6 +526,20 @@ build_dynamic_cast_1 (type, expr) distance = get_base_distance (TREE_TYPE (type), TREE_TYPE (exprtype), 1, &path); + + if (distance == -2) + { + cp_error ("dynamic_cast from `%T' to ambiguous base class `%T'", + TREE_TYPE (exprtype), TREE_TYPE (type)); + return error_mark_node; + } + if (distance == -3) + { + cp_error ("dynamic_cast from `%T' to private base class `%T'", + TREE_TYPE (exprtype), TREE_TYPE (type)); + return error_mark_node; + } + if (distance >= 0) return build_vbase_path (PLUS_EXPR, type, expr, path, 0); } @@ -547,11 +575,11 @@ build_dynamic_cast_1 (type, expr) dynamic_cast(b) (b an object) cannot succeed. */ if (ec == REFERENCE_TYPE) { - if (TREE_CODE (expr) == VAR_DECL - && TREE_CODE (TREE_TYPE (expr)) == RECORD_TYPE) + if (TREE_CODE (old_expr) == VAR_DECL + && TREE_CODE (TREE_TYPE (old_expr)) == RECORD_TYPE) { cp_warning ("dynamic_cast of `%#D' to `%#T' can never succeed", - expr, type); + old_expr, type); return throw_bad_cast (); } } diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c index aa026ae..53ca221 100644 --- a/gcc/cp/typeck.c +++ b/gcc/cp/typeck.c @@ -1520,15 +1520,12 @@ expr_sizeof (e) && (TREE_CODE (TREE_TYPE (e)) == ARRAY_TYPE || TREE_CODE (TREE_TYPE (e)) == FUNCTION_TYPE)) e = default_conversion (e); - else if (TREE_CODE (e) == TREE_LIST) + else if (is_overloaded_fn (e)) { - tree t = TREE_VALUE (e); - if (t != NULL_TREE - && ((TREE_TYPE (t) - && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE) - || is_overloaded_fn (t))) - pedwarn ("ANSI C++ forbids taking the sizeof a function type"); + pedwarn ("ANSI C++ forbids taking the sizeof a function type"); + return size_int (1); } + return c_sizeof (TREE_TYPE (e)); } @@ -7290,45 +7287,26 @@ tree c_expand_start_case (exp) tree exp; { - tree type; - register enum tree_code code; - - /* Convert from references, etc. */ - exp = default_conversion (exp); - type = TREE_TYPE (exp); - code = TREE_CODE (type); - - if (IS_AGGR_TYPE_CODE (code)) - exp = build_type_conversion (CONVERT_EXPR, integer_type_node, exp, 1); + tree type, idx; + exp = build_expr_type_conversion (WANT_INT | WANT_ENUM, exp, 1); if (exp == NULL_TREE) { error ("switch quantity not an integer"); exp = error_mark_node; } - type = TREE_TYPE (exp); - code = TREE_CODE (type); - - if (code != INTEGER_TYPE && code != ENUMERAL_TYPE && code != ERROR_MARK) - { - error ("switch quantity not an integer"); - exp = error_mark_node; - } - else - { - tree idx; + if (exp == error_mark_node) + return error_mark_node; - exp = default_conversion (exp); - type = TREE_TYPE (exp); - idx = get_unwidened (exp, 0); - /* We can't strip a conversion from a signed type to an unsigned, - because if we did, int_fits_type_p would do the wrong thing - when checking case values for being in range, - and it's too hard to do the right thing. */ - if (TREE_UNSIGNED (TREE_TYPE (exp)) - == TREE_UNSIGNED (TREE_TYPE (idx))) - exp = idx; - } + exp = default_conversion (exp); + type = TREE_TYPE (exp); + idx = get_unwidened (exp, 0); + /* We can't strip a conversion from a signed type to an unsigned, + because if we did, int_fits_type_p would do the wrong thing + when checking case values for being in range, + and it's too hard to do the right thing. */ + if (TREE_UNSIGNED (TREE_TYPE (exp)) == TREE_UNSIGNED (TREE_TYPE (idx))) + exp = idx; expand_start_case (1, fold (build1 (CLEANUP_POINT_EXPR, TREE_TYPE (exp), exp)), diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 3cdf723..8766925 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -395,7 +395,7 @@ my_friendly_abort (i) else error ("Internal compiler error %d.", i); - fatal ("Please submit a full bug report to `egcs-bugs@cygnus.com'."); + error ("Please submit a full bug report to `egcs-bugs@cygnus.com'."); fatal ("See for details."); } -- 2.7.4