Commit 648f19f6 by Mark Mitchell Committed by Mark Mitchell

cp-tree.h (enter_scope_of): New function.

	* cp-tree.h (enter_scope_of): New function.
	* parse.y (complex_direct_notype_declarator): Use it.
	* semantics.c (enter_scope_of): New function.

From-SVN: r21812
parent def9b006
1998-08-17 Mark Mitchell <mark@markmitchell.com>
* cp-tree.h (enter_scope_of): New function.
* parse.y (complex_direct_notype_declarator): Use it.
* semantics.c (enter_scope_of): New function.
1998-08-17 Jason Merrill <jason@yorick.cygnus.com> 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
* decl.c (grokparms): No, here. * decl.c (grokparms): No, here.
......
...@@ -2962,6 +2962,7 @@ extern void begin_inline_definitions PROTO((void)); ...@@ -2962,6 +2962,7 @@ extern void begin_inline_definitions PROTO((void));
extern tree finish_member_class_template PROTO((tree, tree)); extern tree finish_member_class_template PROTO((tree, tree));
extern void finish_template_decl PROTO((tree)); extern void finish_template_decl PROTO((tree));
extern tree finish_template_type PROTO((tree, tree, int)); extern tree finish_template_type PROTO((tree, tree, int));
extern void enter_scope_of PROTO((tree));
/* in sig.c */ /* in sig.c */
extern tree build_signature_pointer_type PROTO((tree, int, int)); extern tree build_signature_pointer_type PROTO((tree, int, int));
......
...@@ -697,32 +697,32 @@ static const short yyrline[] = { 0, ...@@ -697,32 +697,32 @@ static const short yyrline[] = { 0,
2696, 2698, 2704, 2707, 2709, 2711, 2713, 2717, 2720, 2738, 2696, 2698, 2704, 2707, 2709, 2711, 2713, 2717, 2720, 2738,
2748, 2750, 2751, 2755, 2760, 2763, 2765, 2767, 2769, 2773, 2748, 2750, 2751, 2755, 2760, 2763, 2765, 2767, 2769, 2773,
2779, 2782, 2784, 2786, 2788, 2792, 2795, 2798, 2800, 2802, 2779, 2782, 2784, 2786, 2788, 2792, 2795, 2798, 2800, 2802,
2804, 2808, 2811, 2814, 2816, 2818, 2820, 2832, 2843, 2847, 2804, 2808, 2811, 2814, 2816, 2818, 2820, 2822, 2829, 2833,
2852, 2856, 2861, 2863, 2867, 2870, 2872, 2876, 2878, 2879, 2838, 2842, 2847, 2849, 2853, 2856, 2858, 2862, 2864, 2865,
2882, 2884, 2886, 2892, 2907, 2913, 2919, 2933, 2935, 2939, 2868, 2870, 2872, 2878, 2893, 2899, 2905, 2919, 2921, 2925,
2953, 2955, 2957, 2961, 2967, 2980, 2982, 2986, 2999, 3005, 2939, 2941, 2943, 2947, 2953, 2966, 2968, 2972, 2985, 2991,
3007, 3008, 3009, 3017, 3022, 3031, 3032, 3036, 3039, 3045, 2993, 2994, 2995, 3003, 3008, 3017, 3018, 3022, 3025, 3031,
3051, 3054, 3056, 3058, 3060, 3064, 3068, 3072, 3075, 3080, 3037, 3040, 3042, 3044, 3046, 3050, 3054, 3058, 3061, 3066,
3083, 3085, 3087, 3089, 3091, 3093, 3095, 3097, 3101, 3105, 3069, 3071, 3073, 3075, 3077, 3079, 3081, 3083, 3087, 3091,
3109, 3113, 3114, 3116, 3118, 3120, 3122, 3124, 3126, 3128, 3095, 3099, 3100, 3102, 3104, 3106, 3108, 3110, 3112, 3114,
3130, 3138, 3140, 3141, 3142, 3145, 3151, 3153, 3158, 3160, 3116, 3124, 3126, 3127, 3128, 3131, 3137, 3139, 3144, 3146,
3163, 3177, 3180, 3183, 3187, 3190, 3197, 3199, 3202, 3204, 3149, 3163, 3166, 3169, 3173, 3176, 3183, 3185, 3188, 3190,
3206, 3209, 3212, 3215, 3218, 3220, 3223, 3227, 3229, 3235, 3192, 3195, 3198, 3201, 3204, 3206, 3209, 3213, 3215, 3221,
3237, 3238, 3240, 3245, 3247, 3249, 3251, 3253, 3256, 3257, 3223, 3224, 3226, 3231, 3233, 3235, 3237, 3239, 3242, 3243,
3259, 3262, 3263, 3266, 3266, 3269, 3269, 3272, 3272, 3274, 3245, 3248, 3249, 3252, 3252, 3255, 3255, 3258, 3258, 3260,
3276, 3278, 3280, 3286, 3292, 3295, 3298, 3304, 3306, 3308, 3262, 3264, 3266, 3272, 3278, 3281, 3284, 3290, 3292, 3294,
3312, 3314, 3315, 3316, 3318, 3321, 3328, 3333, 3341, 3345, 3298, 3300, 3301, 3302, 3304, 3307, 3314, 3319, 3327, 3331,
3347, 3350, 3352, 3355, 3359, 3361, 3364, 3366, 3369, 3386, 3333, 3336, 3338, 3341, 3345, 3347, 3350, 3352, 3355, 3372,
3392, 3400, 3402, 3404, 3408, 3411, 3412, 3420, 3424, 3428, 3378, 3386, 3388, 3390, 3394, 3397, 3398, 3406, 3410, 3414,
3431, 3432, 3438, 3441, 3444, 3446, 3450, 3455, 3458, 3468, 3417, 3418, 3424, 3427, 3430, 3432, 3436, 3441, 3444, 3454,
3473, 3474, 3481, 3484, 3487, 3489, 3492, 3494, 3504, 3518, 3459, 3460, 3467, 3470, 3473, 3475, 3478, 3480, 3490, 3504,
3522, 3525, 3527, 3531, 3535, 3538, 3541, 3543, 3547, 3549, 3508, 3511, 3513, 3517, 3521, 3524, 3527, 3529, 3533, 3535,
3556, 3563, 3566, 3569, 3573, 3577, 3583, 3587, 3592, 3594, 3542, 3549, 3552, 3555, 3559, 3563, 3569, 3573, 3578, 3580,
3597, 3602, 3608, 3619, 3622, 3624, 3628, 3633, 3635, 3642, 3583, 3588, 3594, 3605, 3608, 3610, 3614, 3619, 3621, 3628,
3645, 3647, 3649, 3655, 3660, 3663, 3665, 3667, 3669, 3671, 3631, 3633, 3635, 3641, 3646, 3649, 3651, 3653, 3655, 3657,
3673, 3675, 3677, 3679, 3681, 3683, 3685, 3687, 3689, 3691, 3659, 3661, 3663, 3665, 3667, 3669, 3671, 3673, 3675, 3677,
3693, 3695, 3697, 3699, 3701, 3703, 3705, 3707, 3709, 3711, 3679, 3681, 3683, 3685, 3687, 3689, 3691, 3693, 3695, 3697,
3713, 3715, 3717, 3719, 3721, 3723, 3725, 3728, 3730 3699, 3701, 3703, 3705, 3707, 3709, 3711, 3714, 3716
}; };
#endif #endif
...@@ -3591,7 +3591,7 @@ static const short yycheck[] = { 4, ...@@ -3591,7 +3591,7 @@ static const short yycheck[] = { 4,
82, 83, 84 82, 83, 84
}; };
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ /* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/cygnus/gnupro-98r1/share/bison.simple" #line 3 "/usr/lib/bison.simple"
/* Skeleton output parser for bison, /* Skeleton output parser for bison,
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
...@@ -3784,7 +3784,7 @@ __yy_memcpy (char *to, char *from, int count) ...@@ -3784,7 +3784,7 @@ __yy_memcpy (char *to, char *from, int count)
#endif #endif
#endif #endif
#line 196 "/usr/cygnus/gnupro-98r1/share/bison.simple" #line 196 "/usr/lib/bison.simple"
/* The user can define YYPARSE_PARAM as the name of an argument to be passed /* The user can define YYPARSE_PARAM as the name of an argument to be passed
into yyparse. The argument should have type void *. into yyparse. The argument should have type void *.
...@@ -6793,75 +6793,61 @@ case 616: ...@@ -6793,75 +6793,61 @@ case 616:
break;} break;}
case 617: case 617:
#line 2821 "parse.y" #line 2821 "parse.y"
{ if (TREE_CODE (OP0 (yyvsp[0].ttype)) == NAMESPACE_DECL) { enter_scope_of (yyvsp[0].ttype); ;
{
push_decl_namespace (OP0 (yyvsp[0].ttype));
TREE_COMPLEXITY (yyvsp[0].ttype) = -1;
}
else if (OP0 (yyvsp[0].ttype) != current_class_type)
{
push_nested_class (OP0 (yyvsp[0].ttype), 3);
TREE_COMPLEXITY (yyvsp[0].ttype) = current_class_depth;
}
;
break;} break;}
case 618: case 618:
#line 2833 "parse.y" #line 2823 "parse.y"
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype);
if (yyvsp[-1].ttype != current_class_type) enter_scope_of (yyval.ttype);
{
push_nested_class (yyvsp[-1].ttype, 3);
TREE_COMPLEXITY (yyval.ttype) = current_class_depth;
}
; ;
break;} break;}
case 619: case 619:
#line 2845 "parse.y" #line 2831 "parse.y"
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ;
break;} break;}
case 620: case 620:
#line 2848 "parse.y" #line 2834 "parse.y"
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ; yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 621: case 621:
#line 2854 "parse.y" #line 2840 "parse.y"
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ; yyval.ttype = build_parse_node (SCOPE_REF, yyval.ttype, yyvsp[0].ttype); ;
break;} break;}
case 622: case 622:
#line 2857 "parse.y" #line 2843 "parse.y"
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ; yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 624: case 624:
#line 2864 "parse.y" #line 2850 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 625: case 625:
#line 2869 "parse.y" #line 2855 "parse.y"
{ yyval.ttype = build_functional_cast (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ; { yyval.ttype = build_functional_cast (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ;
break;} break;}
case 626: case 626:
#line 2871 "parse.y" #line 2857 "parse.y"
{ yyval.ttype = reparse_decl_as_expr (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ; { yyval.ttype = reparse_decl_as_expr (yyvsp[-3].ftype.t, yyvsp[-1].ttype); ;
break;} break;}
case 627: case 627:
#line 2873 "parse.y" #line 2859 "parse.y"
{ yyval.ttype = reparse_absdcl_as_expr (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; { yyval.ttype = reparse_absdcl_as_expr (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
break;} break;}
case 632: case 632:
#line 2885 "parse.y" #line 2871 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 633: case 633:
#line 2887 "parse.y" #line 2873 "parse.y"
{ got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ; { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 634: case 634:
#line 2894 "parse.y" #line 2880 "parse.y"
{ {
if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE)
{ {
...@@ -6877,7 +6863,7 @@ case 634: ...@@ -6877,7 +6863,7 @@ case 634:
; ;
break;} break;}
case 635: case 635:
#line 2908 "parse.y" #line 2894 "parse.y"
{ {
if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyvsp[-1].ttype) == IDENTIFIER_NODE)
yyval.ttype = lastiddecl; yyval.ttype = lastiddecl;
...@@ -6885,7 +6871,7 @@ case 635: ...@@ -6885,7 +6871,7 @@ case 635:
; ;
break;} break;}
case 636: case 636:
#line 2914 "parse.y" #line 2900 "parse.y"
{ {
if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE)
yyval.ttype = lastiddecl; yyval.ttype = lastiddecl;
...@@ -6893,15 +6879,15 @@ case 636: ...@@ -6893,15 +6879,15 @@ case 636:
; ;
break;} break;}
case 637: case 637:
#line 2920 "parse.y" #line 2906 "parse.y"
{ got_scope = yyval.ttype = complete_type (TREE_TYPE (yyvsp[-1].ttype)); ; { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyvsp[-1].ttype)); ;
break;} break;}
case 639: case 639:
#line 2936 "parse.y" #line 2922 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 640: case 640:
#line 2941 "parse.y" #line 2927 "parse.y"
{ {
if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't') if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't')
yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype);
...@@ -6916,26 +6902,26 @@ case 640: ...@@ -6916,26 +6902,26 @@ case 640:
; ;
break;} break;}
case 641: case 641:
#line 2954 "parse.y" #line 2940 "parse.y"
{ yyval.ttype = TREE_TYPE (yyvsp[0].ttype); ; { yyval.ttype = TREE_TYPE (yyvsp[0].ttype); ;
break;} break;}
case 642: case 642:
#line 2956 "parse.y" #line 2942 "parse.y"
{ yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 643: case 643:
#line 2958 "parse.y" #line 2944 "parse.y"
{ yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[0].ttype); ;
break;} break;}
case 644: case 644:
#line 2963 "parse.y" #line 2949 "parse.y"
{ {
if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype); cp_error ("`%T' is not a class or namespace", yyvsp[0].ttype);
; ;
break;} break;}
case 645: case 645:
#line 2968 "parse.y" #line 2954 "parse.y"
{ {
if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't') if (TREE_CODE_CLASS (TREE_CODE (yyvsp[-1].ttype)) == 't')
yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype); yyval.ttype = make_typename_type (yyvsp[-1].ttype, yyvsp[0].ttype);
...@@ -6950,15 +6936,15 @@ case 645: ...@@ -6950,15 +6936,15 @@ case 645:
; ;
break;} break;}
case 646: case 646:
#line 2981 "parse.y" #line 2967 "parse.y"
{ got_scope = yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[-1].ttype); ; { got_scope = yyval.ttype = make_typename_type (yyvsp[-2].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 647: case 647:
#line 2983 "parse.y" #line 2969 "parse.y"
{ got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ; { got_scope = yyval.ttype = make_typename_type (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 648: case 648:
#line 2988 "parse.y" #line 2974 "parse.y"
{ {
if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE) if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE)
yyvsp[-1].ttype = lastiddecl; yyvsp[-1].ttype = lastiddecl;
...@@ -6972,7 +6958,7 @@ case 648: ...@@ -6972,7 +6958,7 @@ case 648:
; ;
break;} break;}
case 649: case 649:
#line 3000 "parse.y" #line 2986 "parse.y"
{ {
if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE) if (TREE_CODE (yyvsp[-1].ttype) != IDENTIFIER_NODE)
yyval.ttype = lastiddecl; yyval.ttype = lastiddecl;
...@@ -6980,11 +6966,11 @@ case 649: ...@@ -6980,11 +6966,11 @@ case 649:
; ;
break;} break;}
case 650: case 650:
#line 3006 "parse.y" #line 2992 "parse.y"
{ got_scope = yyval.ttype = complete_type (TREE_TYPE (yyval.ttype)); ; { got_scope = yyval.ttype = complete_type (TREE_TYPE (yyval.ttype)); ;
break;} break;}
case 653: case 653:
#line 3010 "parse.y" #line 2996 "parse.y"
{ {
if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyval.ttype) == IDENTIFIER_NODE)
yyval.ttype = lastiddecl; yyval.ttype = lastiddecl;
...@@ -6992,11 +6978,11 @@ case 653: ...@@ -6992,11 +6978,11 @@ case 653:
; ;
break;} break;}
case 654: case 654:
#line 3019 "parse.y" #line 3005 "parse.y"
{ yyval.ttype = build_min_nt (TEMPLATE_ID_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ; { yyval.ttype = build_min_nt (TEMPLATE_ID_EXPR, yyvsp[-3].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 655: case 655:
#line 3024 "parse.y" #line 3010 "parse.y"
{ {
if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE) if (TREE_CODE (yyvsp[0].ttype) == IDENTIFIER_NODE)
yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype); yyval.ttype = IDENTIFIER_GLOBAL_VALUE (yyvsp[0].ttype);
...@@ -7006,148 +6992,148 @@ case 655: ...@@ -7006,148 +6992,148 @@ case 655:
; ;
break;} break;}
case 657: case 657:
#line 3033 "parse.y" #line 3019 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 658: case 658:
#line 3038 "parse.y" #line 3024 "parse.y"
{ got_scope = NULL_TREE; ; { got_scope = NULL_TREE; ;
break;} break;}
case 659: case 659:
#line 3040 "parse.y" #line 3026 "parse.y"
{ yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ; { yyval.ttype = yyvsp[-1].ttype; got_scope = NULL_TREE; ;
break;} break;}
case 660: case 660:
#line 3047 "parse.y" #line 3033 "parse.y"
{ got_scope = void_type_node; ; { got_scope = void_type_node; ;
break;} break;}
case 661: case 661:
#line 3053 "parse.y" #line 3039 "parse.y"
{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 662: case 662:
#line 3055 "parse.y" #line 3041 "parse.y"
{ yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ; { yyval.ttype = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); ;
break;} break;}
case 663: case 663:
#line 3057 "parse.y" #line 3043 "parse.y"
{ yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 664: case 664:
#line 3059 "parse.y" #line 3045 "parse.y"
{ yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ; { yyval.ttype = make_reference_declarator (yyvsp[0].ttype, NULL_TREE); ;
break;} break;}
case 665: case 665:
#line 3061 "parse.y" #line 3047 "parse.y"
{ tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE);
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg);
; ;
break;} break;}
case 666: case 666:
#line 3065 "parse.y" #line 3051 "parse.y"
{ tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
; ;
break;} break;}
case 668: case 668:
#line 3074 "parse.y" #line 3060 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
break;} break;}
case 669: case 669:
#line 3076 "parse.y" #line 3062 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
break;} break;}
case 670: case 670:
#line 3082 "parse.y" #line 3068 "parse.y"
{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; { yyval.ttype = make_pointer_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
break;} break;}
case 671: case 671:
#line 3084 "parse.y" #line 3070 "parse.y"
{ yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ; { yyval.ttype = make_pointer_declarator (NULL_TREE, yyvsp[0].ttype); ;
break;} break;}
case 672: case 672:
#line 3086 "parse.y" #line 3072 "parse.y"
{ yyval.ttype = make_pointer_declarator (yyvsp[0].ftype.t, NULL_TREE); ; { yyval.ttype = make_pointer_declarator (yyvsp[0].ftype.t, NULL_TREE); ;
break;} break;}
case 673: case 673:
#line 3088 "parse.y" #line 3074 "parse.y"
{ yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ; { yyval.ttype = make_pointer_declarator (NULL_TREE, NULL_TREE); ;
break;} break;}
case 674: case 674:
#line 3090 "parse.y" #line 3076 "parse.y"
{ yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; { yyval.ttype = make_reference_declarator (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
break;} break;}
case 675: case 675:
#line 3092 "parse.y" #line 3078 "parse.y"
{ yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ; { yyval.ttype = make_reference_declarator (NULL_TREE, yyvsp[0].ttype); ;
break;} break;}
case 676: case 676:
#line 3094 "parse.y" #line 3080 "parse.y"
{ yyval.ttype = make_reference_declarator (yyvsp[0].ftype.t, NULL_TREE); ; { yyval.ttype = make_reference_declarator (yyvsp[0].ftype.t, NULL_TREE); ;
break;} break;}
case 677: case 677:
#line 3096 "parse.y" #line 3082 "parse.y"
{ yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ; { yyval.ttype = make_reference_declarator (NULL_TREE, NULL_TREE); ;
break;} break;}
case 678: case 678:
#line 3098 "parse.y" #line 3084 "parse.y"
{ tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE); { tree arg = make_pointer_declarator (yyvsp[0].ttype, NULL_TREE);
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-1].ttype, arg);
; ;
break;} break;}
case 679: case 679:
#line 3102 "parse.y" #line 3088 "parse.y"
{ tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
; ;
break;} break;}
case 681: case 681:
#line 3111 "parse.y" #line 3097 "parse.y"
{ yyval.ttype = yyvsp[-1].ttype; ; { yyval.ttype = yyvsp[-1].ttype; ;
break;} break;}
case 683: case 683:
#line 3115 "parse.y" #line 3101 "parse.y"
{ yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_call_declarator (yyval.ttype, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 684: case 684:
#line 3117 "parse.y" #line 3103 "parse.y"
{ yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_call_declarator (yyval.ttype, empty_parms (), yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 685: case 685:
#line 3119 "parse.y" #line 3105 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ; { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, yyvsp[-1].ttype); ;
break;} break;}
case 686: case 686:
#line 3121 "parse.y" #line 3107 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ; { yyval.ttype = build_parse_node (ARRAY_REF, yyval.ttype, NULL_TREE); ;
break;} break;}
case 687: case 687:
#line 3123 "parse.y" #line 3109 "parse.y"
{ yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_call_declarator (NULL_TREE, yyvsp[-3].ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 688: case 688:
#line 3125 "parse.y" #line 3111 "parse.y"
{ set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 689: case 689:
#line 3127 "parse.y" #line 3113 "parse.y"
{ set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ; { set_quals_and_spec (yyval.ttype, yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 690: case 690:
#line 3129 "parse.y" #line 3115 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ; { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, yyvsp[-1].ttype); ;
break;} break;}
case 691: case 691:
#line 3131 "parse.y" #line 3117 "parse.y"
{ yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ; { yyval.ttype = build_parse_node (ARRAY_REF, NULL_TREE, NULL_TREE); ;
break;} break;}
case 698: case 698:
#line 3154 "parse.y" #line 3140 "parse.y"
{ if (pedantic) { if (pedantic)
pedwarn ("ANSI C++ forbids label declarations"); ; pedwarn ("ANSI C++ forbids label declarations"); ;
break;} break;}
case 701: case 701:
#line 3165 "parse.y" #line 3151 "parse.y"
{ tree link; { tree link;
for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link)) for (link = yyvsp[-1].ttype; link; link = TREE_CHAIN (link))
{ {
...@@ -7158,181 +7144,181 @@ case 701: ...@@ -7158,181 +7144,181 @@ case 701:
; ;
break;} break;}
case 702: case 702:
#line 3179 "parse.y" #line 3165 "parse.y"
{; {;
break;} break;}
case 704: case 704:
#line 3185 "parse.y" #line 3171 "parse.y"
{ yyval.ttype = begin_compound_stmt (0); ; { yyval.ttype = begin_compound_stmt (0); ;
break;} break;}
case 705: case 705:
#line 3187 "parse.y" #line 3173 "parse.y"
{ yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ; { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ;
break;} break;}
case 706: case 706:
#line 3192 "parse.y" #line 3178 "parse.y"
{ {
yyval.ttype = begin_if_stmt (); yyval.ttype = begin_if_stmt ();
cond_stmt_keyword = "if"; cond_stmt_keyword = "if";
; ;
break;} break;}
case 707: case 707:
#line 3197 "parse.y" #line 3183 "parse.y"
{ finish_if_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ; { finish_if_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 708: case 708:
#line 3199 "parse.y" #line 3185 "parse.y"
{ yyval.ttype = finish_then_clause (yyvsp[-3].ttype); ; { yyval.ttype = finish_then_clause (yyvsp[-3].ttype); ;
break;} break;}
case 710: case 710:
#line 3204 "parse.y" #line 3190 "parse.y"
{ yyval.ttype = begin_compound_stmt (0); ; { yyval.ttype = begin_compound_stmt (0); ;
break;} break;}
case 711: case 711:
#line 3206 "parse.y" #line 3192 "parse.y"
{ yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ; { yyval.ttype = finish_compound_stmt (0, yyvsp[-1].ttype); ;
break;} break;}
case 712: case 712:
#line 3211 "parse.y" #line 3197 "parse.y"
{; {;
break;} break;}
case 714: case 714:
#line 3217 "parse.y" #line 3203 "parse.y"
{ finish_stmt (); ; { finish_stmt (); ;
break;} break;}
case 715: case 715:
#line 3219 "parse.y" #line 3205 "parse.y"
{ finish_expr_stmt (yyvsp[-1].ttype); ; { finish_expr_stmt (yyvsp[-1].ttype); ;
break;} break;}
case 716: case 716:
#line 3221 "parse.y" #line 3207 "parse.y"
{ begin_else_clause (); ; { begin_else_clause (); ;
break;} break;}
case 717: case 717:
#line 3223 "parse.y" #line 3209 "parse.y"
{ {
finish_else_clause (yyvsp[-3].ttype); finish_else_clause (yyvsp[-3].ttype);
finish_if_stmt (); finish_if_stmt ();
; ;
break;} break;}
case 718: case 718:
#line 3228 "parse.y" #line 3214 "parse.y"
{ finish_if_stmt (); ; { finish_if_stmt (); ;
break;} break;}
case 719: case 719:
#line 3230 "parse.y" #line 3216 "parse.y"
{ {
yyval.ttype = begin_while_stmt (); yyval.ttype = begin_while_stmt ();
cond_stmt_keyword = "while"; cond_stmt_keyword = "while";
; ;
break;} break;}
case 720: case 720:
#line 3235 "parse.y" #line 3221 "parse.y"
{ finish_while_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ; { finish_while_stmt_cond (yyvsp[0].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 721: case 721:
#line 3237 "parse.y" #line 3223 "parse.y"
{ finish_while_stmt (yyvsp[-3].ttype); ; { finish_while_stmt (yyvsp[-3].ttype); ;
break;} break;}
case 722: case 722:
#line 3239 "parse.y" #line 3225 "parse.y"
{ yyval.ttype = begin_do_stmt (); ; { yyval.ttype = begin_do_stmt (); ;
break;} break;}
case 723: case 723:
#line 3241 "parse.y" #line 3227 "parse.y"
{ {
finish_do_body (yyvsp[-2].ttype); finish_do_body (yyvsp[-2].ttype);
cond_stmt_keyword = "do"; cond_stmt_keyword = "do";
; ;
break;} break;}
case 724: case 724:
#line 3246 "parse.y" #line 3232 "parse.y"
{ finish_do_stmt (yyvsp[-1].ttype, yyvsp[-5].ttype); ; { finish_do_stmt (yyvsp[-1].ttype, yyvsp[-5].ttype); ;
break;} break;}
case 725: case 725:
#line 3248 "parse.y" #line 3234 "parse.y"
{ yyval.ttype = begin_for_stmt (); ; { yyval.ttype = begin_for_stmt (); ;
break;} break;}
case 726: case 726:
#line 3250 "parse.y" #line 3236 "parse.y"
{ finish_for_init_stmt (yyvsp[-2].ttype); ; { finish_for_init_stmt (yyvsp[-2].ttype); ;
break;} break;}
case 727: case 727:
#line 3252 "parse.y" #line 3238 "parse.y"
{ finish_for_cond (yyvsp[-1].ttype, yyvsp[-5].ttype); ; { finish_for_cond (yyvsp[-1].ttype, yyvsp[-5].ttype); ;
break;} break;}
case 728: case 728:
#line 3254 "parse.y" #line 3240 "parse.y"
{ finish_for_expr (yyvsp[-1].ttype, yyvsp[-8].ttype); ; { finish_for_expr (yyvsp[-1].ttype, yyvsp[-8].ttype); ;
break;} break;}
case 729: case 729:
#line 3256 "parse.y" #line 3242 "parse.y"
{ finish_for_stmt (yyvsp[-3].ttype, yyvsp[-10].ttype); ; { finish_for_stmt (yyvsp[-3].ttype, yyvsp[-10].ttype); ;
break;} break;}
case 730: case 730:
#line 3258 "parse.y" #line 3244 "parse.y"
{ begin_switch_stmt (); ; { begin_switch_stmt (); ;
break;} break;}
case 731: case 731:
#line 3260 "parse.y" #line 3246 "parse.y"
{ yyval.ttype = finish_switch_cond (yyvsp[-1].ttype); ; { yyval.ttype = finish_switch_cond (yyvsp[-1].ttype); ;
break;} break;}
case 732: case 732:
#line 3262 "parse.y" #line 3248 "parse.y"
{ finish_switch_stmt (yyvsp[-3].ttype, yyvsp[-1].ttype); ; { finish_switch_stmt (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 733: case 733:
#line 3264 "parse.y" #line 3250 "parse.y"
{ finish_case_label (yyvsp[-1].ttype, NULL_TREE); ; { finish_case_label (yyvsp[-1].ttype, NULL_TREE); ;
break;} break;}
case 735: case 735:
#line 3267 "parse.y" #line 3253 "parse.y"
{ finish_case_label (yyvsp[-3].ttype, yyvsp[-1].ttype); ; { finish_case_label (yyvsp[-3].ttype, yyvsp[-1].ttype); ;
break;} break;}
case 737: case 737:
#line 3270 "parse.y" #line 3256 "parse.y"
{ finish_case_label (NULL_TREE, NULL_TREE); ; { finish_case_label (NULL_TREE, NULL_TREE); ;
break;} break;}
case 739: case 739:
#line 3273 "parse.y" #line 3259 "parse.y"
{ finish_break_stmt (); ; { finish_break_stmt (); ;
break;} break;}
case 740: case 740:
#line 3275 "parse.y" #line 3261 "parse.y"
{ finish_continue_stmt (); ; { finish_continue_stmt (); ;
break;} break;}
case 741: case 741:
#line 3277 "parse.y" #line 3263 "parse.y"
{ finish_return_stmt (NULL_TREE); ; { finish_return_stmt (NULL_TREE); ;
break;} break;}
case 742: case 742:
#line 3279 "parse.y" #line 3265 "parse.y"
{ finish_return_stmt (yyvsp[-1].ttype); ; { finish_return_stmt (yyvsp[-1].ttype); ;
break;} break;}
case 743: case 743:
#line 3281 "parse.y" #line 3267 "parse.y"
{ {
finish_asm_stmt (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE, finish_asm_stmt (yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, NULL_TREE,
NULL_TREE); NULL_TREE);
; ;
break;} break;}
case 744: case 744:
#line 3287 "parse.y" #line 3273 "parse.y"
{ {
finish_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE, finish_asm_stmt (yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE,
NULL_TREE); NULL_TREE);
; ;
break;} break;}
case 745: case 745:
#line 3293 "parse.y" #line 3279 "parse.y"
{ finish_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ; { finish_asm_stmt (yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype, NULL_TREE); ;
break;} break;}
case 746: case 746:
#line 3297 "parse.y" #line 3283 "parse.y"
{ finish_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ; { finish_asm_stmt (yyvsp[-10].ttype, yyvsp[-8].ttype, yyvsp[-6].ttype, yyvsp[-4].ttype, yyvsp[-2].ttype); ;
break;} break;}
case 747: case 747:
#line 3299 "parse.y" #line 3285 "parse.y"
{ {
if (pedantic) if (pedantic)
pedwarn ("ANSI C++ forbids computed gotos"); pedwarn ("ANSI C++ forbids computed gotos");
...@@ -7340,29 +7326,29 @@ case 747: ...@@ -7340,29 +7326,29 @@ case 747:
; ;
break;} break;}
case 748: case 748:
#line 3305 "parse.y" #line 3291 "parse.y"
{ finish_goto_stmt (yyvsp[-1].ttype); ; { finish_goto_stmt (yyvsp[-1].ttype); ;
break;} break;}
case 749: case 749:
#line 3307 "parse.y" #line 3293 "parse.y"
{ finish_stmt (); ; { finish_stmt (); ;
break;} break;}
case 750: case 750:
#line 3309 "parse.y" #line 3295 "parse.y"
{ error ("label must be followed by statement"); { error ("label must be followed by statement");
yyungetc ('}', 0); yyungetc ('}', 0);
finish_stmt (); ; finish_stmt (); ;
break;} break;}
case 751: case 751:
#line 3313 "parse.y" #line 3299 "parse.y"
{ finish_stmt (); ; { finish_stmt (); ;
break;} break;}
case 754: case 754:
#line 3317 "parse.y" #line 3303 "parse.y"
{ do_local_using_decl (yyvsp[0].ttype); ; { do_local_using_decl (yyvsp[0].ttype); ;
break;} break;}
case 756: case 756:
#line 3323 "parse.y" #line 3309 "parse.y"
{ {
if (! current_function_parms_stored) if (! current_function_parms_stored)
store_parm_decls (); store_parm_decls ();
...@@ -7370,13 +7356,13 @@ case 756: ...@@ -7370,13 +7356,13 @@ case 756:
; ;
break;} break;}
case 757: case 757:
#line 3329 "parse.y" #line 3315 "parse.y"
{ {
expand_start_all_catch (); expand_start_all_catch ();
; ;
break;} break;}
case 758: case 758:
#line 3333 "parse.y" #line 3319 "parse.y"
{ {
int nested = (hack_decl_function_context int nested = (hack_decl_function_context
(current_function_decl) != NULL_TREE); (current_function_decl) != NULL_TREE);
...@@ -7385,41 +7371,41 @@ case 758: ...@@ -7385,41 +7371,41 @@ case 758:
; ;
break;} break;}
case 759: case 759:
#line 3343 "parse.y" #line 3329 "parse.y"
{ yyval.ttype = begin_try_block (); ; { yyval.ttype = begin_try_block (); ;
break;} break;}
case 760: case 760:
#line 3345 "parse.y" #line 3331 "parse.y"
{ finish_try_block (yyvsp[-1].ttype); ; { finish_try_block (yyvsp[-1].ttype); ;
break;} break;}
case 761: case 761:
#line 3347 "parse.y" #line 3333 "parse.y"
{ finish_handler_sequence (yyvsp[-3].ttype); ; { finish_handler_sequence (yyvsp[-3].ttype); ;
break;} break;}
case 764: case 764:
#line 3357 "parse.y" #line 3343 "parse.y"
{ yyval.ttype = begin_handler(); ; { yyval.ttype = begin_handler(); ;
break;} break;}
case 765: case 765:
#line 3359 "parse.y" #line 3345 "parse.y"
{ finish_handler_parms (yyvsp[-1].ttype); ; { finish_handler_parms (yyvsp[-1].ttype); ;
break;} break;}
case 766: case 766:
#line 3361 "parse.y" #line 3347 "parse.y"
{ finish_handler (yyvsp[-3].ttype); ; { finish_handler (yyvsp[-3].ttype); ;
break;} break;}
case 769: case 769:
#line 3371 "parse.y" #line 3357 "parse.y"
{ expand_start_catch_block (NULL_TREE, NULL_TREE); ; { expand_start_catch_block (NULL_TREE, NULL_TREE); ;
break;} break;}
case 770: case 770:
#line 3387 "parse.y" #line 3373 "parse.y"
{ check_for_new_type ("inside exception declarations", yyvsp[-1].ftype); { check_for_new_type ("inside exception declarations", yyvsp[-1].ftype);
expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ftype.t), expand_start_catch_block (TREE_PURPOSE (yyvsp[-1].ftype.t),
TREE_VALUE (yyvsp[-1].ftype.t)); ; TREE_VALUE (yyvsp[-1].ftype.t)); ;
break;} break;}
case 771: case 771:
#line 3394 "parse.y" #line 3380 "parse.y"
{ tree label; { tree label;
do_label: do_label:
label = define_label (input_filename, lineno, yyvsp[-1].ttype); label = define_label (input_filename, lineno, yyvsp[-1].ttype);
...@@ -7428,98 +7414,98 @@ case 771: ...@@ -7428,98 +7414,98 @@ case 771:
; ;
break;} break;}
case 772: case 772:
#line 3401 "parse.y" #line 3387 "parse.y"
{ goto do_label; ; { goto do_label; ;
break;} break;}
case 773: case 773:
#line 3403 "parse.y" #line 3389 "parse.y"
{ goto do_label; ; { goto do_label; ;
break;} break;}
case 774: case 774:
#line 3405 "parse.y" #line 3391 "parse.y"
{ goto do_label; ; { goto do_label; ;
break;} break;}
case 775: case 775:
#line 3410 "parse.y" #line 3396 "parse.y"
{ if (yyvsp[-1].ttype) cplus_expand_expr_stmt (yyvsp[-1].ttype); ; { if (yyvsp[-1].ttype) cplus_expand_expr_stmt (yyvsp[-1].ttype); ;
break;} break;}
case 777: case 777:
#line 3413 "parse.y" #line 3399 "parse.y"
{ if (pedantic) { if (pedantic)
pedwarn ("ANSI C++ forbids compound statements inside for initializations"); pedwarn ("ANSI C++ forbids compound statements inside for initializations");
; ;
break;} break;}
case 778: case 778:
#line 3422 "parse.y" #line 3408 "parse.y"
{ emit_line_note (input_filename, lineno); { emit_line_note (input_filename, lineno);
yyval.ttype = NULL_TREE; ; yyval.ttype = NULL_TREE; ;
break;} break;}
case 779: case 779:
#line 3425 "parse.y" #line 3411 "parse.y"
{ emit_line_note (input_filename, lineno); ; { emit_line_note (input_filename, lineno); ;
break;} break;}
case 780: case 780:
#line 3430 "parse.y" #line 3416 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 782: case 782:
#line 3433 "parse.y" #line 3419 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 783: case 783:
#line 3440 "parse.y" #line 3426 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 786: case 786:
#line 3447 "parse.y" #line 3433 "parse.y"
{ yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ;
break;} break;}
case 787: case 787:
#line 3452 "parse.y" #line 3438 "parse.y"
{ yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ; { yyval.ttype = build_tree_list (yyval.ttype, yyvsp[-1].ttype); ;
break;} break;}
case 788: case 788:
#line 3457 "parse.y" #line 3443 "parse.y"
{ yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ; { yyval.ttype = tree_cons (NULL_TREE, yyval.ttype, NULL_TREE); ;
break;} break;}
case 789: case 789:
#line 3459 "parse.y" #line 3445 "parse.y"
{ yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ; { yyval.ttype = tree_cons (NULL_TREE, yyvsp[0].ttype, yyval.ttype); ;
break;} break;}
case 790: case 790:
#line 3470 "parse.y" #line 3456 "parse.y"
{ {
yyval.ttype = empty_parms(); yyval.ttype = empty_parms();
; ;
break;} break;}
case 792: case 792:
#line 3475 "parse.y" #line 3461 "parse.y"
{ yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[0].ftype.t), 0); { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, yyvsp[0].ftype.t), 0);
check_for_new_type ("inside parameter list", yyvsp[0].ftype); ; check_for_new_type ("inside parameter list", yyvsp[0].ftype); ;
break;} break;}
case 793: case 793:
#line 3483 "parse.y" #line 3469 "parse.y"
{ yyval.ttype = finish_parmlist (yyval.ttype, 0); ; { yyval.ttype = finish_parmlist (yyval.ttype, 0); ;
break;} break;}
case 794: case 794:
#line 3485 "parse.y" #line 3471 "parse.y"
{ yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
break;} break;}
case 795: case 795:
#line 3488 "parse.y" #line 3474 "parse.y"
{ yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
break;} break;}
case 796: case 796:
#line 3490 "parse.y" #line 3476 "parse.y"
{ yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE, { yyval.ttype = finish_parmlist (build_tree_list (NULL_TREE,
yyvsp[-1].ftype.t), 1); ; yyvsp[-1].ftype.t), 1); ;
break;} break;}
case 797: case 797:
#line 3493 "parse.y" #line 3479 "parse.y"
{ yyval.ttype = finish_parmlist (NULL_TREE, 1); ; { yyval.ttype = finish_parmlist (NULL_TREE, 1); ;
break;} break;}
case 798: case 798:
#line 3495 "parse.y" #line 3481 "parse.y"
{ {
/* This helps us recover from really nasty /* This helps us recover from really nasty
parse errors, for example, a missing right parse errors, for example, a missing right
...@@ -7531,7 +7517,7 @@ case 798: ...@@ -7531,7 +7517,7 @@ case 798:
; ;
break;} break;}
case 799: case 799:
#line 3505 "parse.y" #line 3491 "parse.y"
{ {
/* This helps us recover from really nasty /* This helps us recover from really nasty
parse errors, for example, a missing right parse errors, for example, a missing right
...@@ -7544,98 +7530,98 @@ case 799: ...@@ -7544,98 +7530,98 @@ case 799:
; ;
break;} break;}
case 800: case 800:
#line 3520 "parse.y" #line 3506 "parse.y"
{ maybe_snarf_defarg (); ; { maybe_snarf_defarg (); ;
break;} break;}
case 801: case 801:
#line 3522 "parse.y" #line 3508 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 804: case 804:
#line 3533 "parse.y" #line 3519 "parse.y"
{ check_for_new_type ("in a parameter list", yyvsp[0].ftype); { check_for_new_type ("in a parameter list", yyvsp[0].ftype);
yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); ; yyval.ttype = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); ;
break;} break;}
case 805: case 805:
#line 3536 "parse.y" #line 3522 "parse.y"
{ check_for_new_type ("in a parameter list", yyvsp[-1].ftype); { check_for_new_type ("in a parameter list", yyvsp[-1].ftype);
yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); ; yyval.ttype = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); ;
break;} break;}
case 806: case 806:
#line 3539 "parse.y" #line 3525 "parse.y"
{ check_for_new_type ("in a parameter list", yyvsp[0].ftype); { check_for_new_type ("in a parameter list", yyvsp[0].ftype);
yyval.ttype = chainon (yyval.ttype, yyvsp[0].ftype.t); ; yyval.ttype = chainon (yyval.ttype, yyvsp[0].ftype.t); ;
break;} break;}
case 807: case 807:
#line 3542 "parse.y" #line 3528 "parse.y"
{ yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ; { yyval.ttype = chainon (yyval.ttype, build_tree_list (NULL_TREE, yyvsp[0].ttype)); ;
break;} break;}
case 808: case 808:
#line 3544 "parse.y" #line 3530 "parse.y"
{ yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ; { yyval.ttype = chainon (yyval.ttype, build_tree_list (yyvsp[0].ttype, yyvsp[-2].ttype)); ;
break;} break;}
case 810: case 810:
#line 3550 "parse.y" #line 3536 "parse.y"
{ check_for_new_type ("in a parameter list", yyvsp[-1].ftype); { check_for_new_type ("in a parameter list", yyvsp[-1].ftype);
yyval.ttype = build_tree_list (NULL_TREE, yyvsp[-1].ftype.t); ; yyval.ttype = build_tree_list (NULL_TREE, yyvsp[-1].ftype.t); ;
break;} break;}
case 811: case 811:
#line 3560 "parse.y" #line 3546 "parse.y"
{ tree specs = strip_attrs (yyvsp[-1].ftype.t); { tree specs = strip_attrs (yyvsp[-1].ftype.t);
yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag;
yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); ; yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); ;
break;} break;}
case 812: case 812:
#line 3564 "parse.y" #line 3550 "parse.y"
{ yyval.ftype.t = build_tree_list (yyvsp[-1].ftype.t, yyvsp[0].ttype); { yyval.ftype.t = build_tree_list (yyvsp[-1].ftype.t, yyvsp[0].ttype);
yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
break;} break;}
case 813: case 813:
#line 3567 "parse.y" #line 3553 "parse.y"
{ yyval.ftype.t = build_tree_list (get_decl_list (yyvsp[-1].ftype.t), yyvsp[0].ttype); { 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; ; yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
break;} break;}
case 814: case 814:
#line 3570 "parse.y" #line 3556 "parse.y"
{ tree specs = strip_attrs (yyvsp[-1].ftype.t); { tree specs = strip_attrs (yyvsp[-1].ftype.t);
yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype);
yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
break;} break;}
case 815: case 815:
#line 3574 "parse.y" #line 3560 "parse.y"
{ tree specs = strip_attrs (yyvsp[0].ftype.t); { tree specs = strip_attrs (yyvsp[0].ftype.t);
yyval.ftype.t = build_tree_list (specs, NULL_TREE); yyval.ftype.t = build_tree_list (specs, NULL_TREE);
yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
break;} break;}
case 816: case 816:
#line 3578 "parse.y" #line 3564 "parse.y"
{ tree specs = strip_attrs (yyvsp[-1].ttype); { tree specs = strip_attrs (yyvsp[-1].ttype);
yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype); yyval.ftype.t = build_tree_list (specs, yyvsp[0].ttype);
yyval.ftype.new_type_flag = 0; ; yyval.ftype.new_type_flag = 0; ;
break;} break;}
case 817: case 817:
#line 3585 "parse.y" #line 3571 "parse.y"
{ yyval.ftype.t = build_tree_list (NULL_TREE, yyvsp[0].ftype.t); { yyval.ftype.t = build_tree_list (NULL_TREE, yyvsp[0].ftype.t);
yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ; yyval.ftype.new_type_flag = yyvsp[0].ftype.new_type_flag; ;
break;} break;}
case 818: case 818:
#line 3588 "parse.y" #line 3574 "parse.y"
{ yyval.ftype.t = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t); { yyval.ftype.t = build_tree_list (yyvsp[0].ttype, yyvsp[-1].ftype.t);
yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ; yyval.ftype.new_type_flag = yyvsp[-1].ftype.new_type_flag; ;
break;} break;}
case 821: case 821:
#line 3599 "parse.y" #line 3585 "parse.y"
{ see_typename (); ; { see_typename (); ;
break;} break;}
case 822: case 822:
#line 3604 "parse.y" #line 3590 "parse.y"
{ {
error ("type specifier omitted for parameter"); error ("type specifier omitted for parameter");
yyval.ttype = build_tree_list (integer_type_node, NULL_TREE); yyval.ttype = build_tree_list (integer_type_node, NULL_TREE);
; ;
break;} break;}
case 823: case 823:
#line 3609 "parse.y" #line 3595 "parse.y"
{ {
error ("type specifier omitted for parameter"); error ("type specifier omitted for parameter");
if (TREE_CODE (yyval.ttype) == SCOPE_REF if (TREE_CODE (yyval.ttype) == SCOPE_REF
...@@ -7646,193 +7632,193 @@ case 823: ...@@ -7646,193 +7632,193 @@ case 823:
; ;
break;} break;}
case 824: case 824:
#line 3621 "parse.y" #line 3607 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 825: case 825:
#line 3623 "parse.y" #line 3609 "parse.y"
{ yyval.ttype = yyvsp[-1].ttype; ; { yyval.ttype = yyvsp[-1].ttype; ;
break;} break;}
case 826: case 826:
#line 3625 "parse.y" #line 3611 "parse.y"
{ yyval.ttype = build_decl_list (NULL_TREE, NULL_TREE); ; { yyval.ttype = build_decl_list (NULL_TREE, NULL_TREE); ;
break;} break;}
case 827: case 827:
#line 3630 "parse.y" #line 3616 "parse.y"
{ yyval.ttype = build_decl_list (NULL_TREE, groktypename(yyvsp[0].ftype.t)); ; { yyval.ttype = build_decl_list (NULL_TREE, groktypename(yyvsp[0].ftype.t)); ;
break;} break;}
case 829: case 829:
#line 3636 "parse.y" #line 3622 "parse.y"
{ {
TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype; TREE_CHAIN (yyvsp[0].ttype) = yyval.ttype;
yyval.ttype = yyvsp[0].ttype; yyval.ttype = yyvsp[0].ttype;
; ;
break;} break;}
case 830: case 830:
#line 3644 "parse.y" #line 3630 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 831: case 831:
#line 3646 "parse.y" #line 3632 "parse.y"
{ yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 832: case 832:
#line 3648 "parse.y" #line 3634 "parse.y"
{ yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ; { yyval.ttype = make_reference_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); ;
break;} break;}
case 833: case 833:
#line 3650 "parse.y" #line 3636 "parse.y"
{ tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype); { tree arg = make_pointer_declarator (yyvsp[-1].ttype, yyvsp[0].ttype);
yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg); yyval.ttype = build_parse_node (SCOPE_REF, yyvsp[-2].ttype, arg);
; ;
break;} break;}
case 834: case 834:
#line 3657 "parse.y" #line 3643 "parse.y"
{ got_scope = NULL_TREE; ; { got_scope = NULL_TREE; ;
break;} break;}
case 835: case 835:
#line 3662 "parse.y" #line 3648 "parse.y"
{ yyval.ttype = ansi_opname[MULT_EXPR]; ; { yyval.ttype = ansi_opname[MULT_EXPR]; ;
break;} break;}
case 836: case 836:
#line 3664 "parse.y" #line 3650 "parse.y"
{ yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ; { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ;
break;} break;}
case 837: case 837:
#line 3666 "parse.y" #line 3652 "parse.y"
{ yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ; { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ;
break;} break;}
case 838: case 838:
#line 3668 "parse.y" #line 3654 "parse.y"
{ yyval.ttype = ansi_opname[PLUS_EXPR]; ; { yyval.ttype = ansi_opname[PLUS_EXPR]; ;
break;} break;}
case 839: case 839:
#line 3670 "parse.y" #line 3656 "parse.y"
{ yyval.ttype = ansi_opname[MINUS_EXPR]; ; { yyval.ttype = ansi_opname[MINUS_EXPR]; ;
break;} break;}
case 840: case 840:
#line 3672 "parse.y" #line 3658 "parse.y"
{ yyval.ttype = ansi_opname[BIT_AND_EXPR]; ; { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ;
break;} break;}
case 841: case 841:
#line 3674 "parse.y" #line 3660 "parse.y"
{ yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ; { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ;
break;} break;}
case 842: case 842:
#line 3676 "parse.y" #line 3662 "parse.y"
{ yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ; { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ;
break;} break;}
case 843: case 843:
#line 3678 "parse.y" #line 3664 "parse.y"
{ yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ; { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ;
break;} break;}
case 844: case 844:
#line 3680 "parse.y" #line 3666 "parse.y"
{ yyval.ttype = ansi_opname[COMPOUND_EXPR]; ; { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ;
break;} break;}
case 845: case 845:
#line 3682 "parse.y" #line 3668 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 846: case 846:
#line 3684 "parse.y" #line 3670 "parse.y"
{ yyval.ttype = ansi_opname[LT_EXPR]; ; { yyval.ttype = ansi_opname[LT_EXPR]; ;
break;} break;}
case 847: case 847:
#line 3686 "parse.y" #line 3672 "parse.y"
{ yyval.ttype = ansi_opname[GT_EXPR]; ; { yyval.ttype = ansi_opname[GT_EXPR]; ;
break;} break;}
case 848: case 848:
#line 3688 "parse.y" #line 3674 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 849: case 849:
#line 3690 "parse.y" #line 3676 "parse.y"
{ yyval.ttype = ansi_assopname[yyvsp[0].code]; ; { yyval.ttype = ansi_assopname[yyvsp[0].code]; ;
break;} break;}
case 850: case 850:
#line 3692 "parse.y" #line 3678 "parse.y"
{ yyval.ttype = ansi_opname [MODIFY_EXPR]; ; { yyval.ttype = ansi_opname [MODIFY_EXPR]; ;
break;} break;}
case 851: case 851:
#line 3694 "parse.y" #line 3680 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 852: case 852:
#line 3696 "parse.y" #line 3682 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 853: case 853:
#line 3698 "parse.y" #line 3684 "parse.y"
{ yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ; { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ;
break;} break;}
case 854: case 854:
#line 3700 "parse.y" #line 3686 "parse.y"
{ yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ; { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ;
break;} break;}
case 855: case 855:
#line 3702 "parse.y" #line 3688 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ;
break;} break;}
case 856: case 856:
#line 3704 "parse.y" #line 3690 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ;
break;} break;}
case 857: case 857:
#line 3706 "parse.y" #line 3692 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ;
break;} break;}
case 858: case 858:
#line 3708 "parse.y" #line 3694 "parse.y"
{ yyval.ttype = ansi_opname[COND_EXPR]; ; { yyval.ttype = ansi_opname[COND_EXPR]; ;
break;} break;}
case 859: case 859:
#line 3710 "parse.y" #line 3696 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 860: case 860:
#line 3712 "parse.y" #line 3698 "parse.y"
{ yyval.ttype = ansi_opname[COMPONENT_REF]; ; { yyval.ttype = ansi_opname[COMPONENT_REF]; ;
break;} break;}
case 861: case 861:
#line 3714 "parse.y" #line 3700 "parse.y"
{ yyval.ttype = ansi_opname[MEMBER_REF]; ; { yyval.ttype = ansi_opname[MEMBER_REF]; ;
break;} break;}
case 862: case 862:
#line 3716 "parse.y" #line 3702 "parse.y"
{ yyval.ttype = ansi_opname[CALL_EXPR]; ; { yyval.ttype = ansi_opname[CALL_EXPR]; ;
break;} break;}
case 863: case 863:
#line 3718 "parse.y" #line 3704 "parse.y"
{ yyval.ttype = ansi_opname[ARRAY_REF]; ; { yyval.ttype = ansi_opname[ARRAY_REF]; ;
break;} break;}
case 864: case 864:
#line 3720 "parse.y" #line 3706 "parse.y"
{ yyval.ttype = ansi_opname[NEW_EXPR]; ; { yyval.ttype = ansi_opname[NEW_EXPR]; ;
break;} break;}
case 865: case 865:
#line 3722 "parse.y" #line 3708 "parse.y"
{ yyval.ttype = ansi_opname[DELETE_EXPR]; ; { yyval.ttype = ansi_opname[DELETE_EXPR]; ;
break;} break;}
case 866: case 866:
#line 3724 "parse.y" #line 3710 "parse.y"
{ yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ; { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ;
break;} break;}
case 867: case 867:
#line 3726 "parse.y" #line 3712 "parse.y"
{ yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ; { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ;
break;} break;}
case 868: case 868:
#line 3729 "parse.y" #line 3715 "parse.y"
{ yyval.ttype = grokoptypename (yyvsp[-1].ftype.t, yyvsp[0].ttype); ; { yyval.ttype = grokoptypename (yyvsp[-1].ftype.t, yyvsp[0].ttype); ;
break;} break;}
case 869: case 869:
#line 3731 "parse.y" #line 3717 "parse.y"
{ yyval.ttype = ansi_opname[ERROR_MARK]; ; { yyval.ttype = ansi_opname[ERROR_MARK]; ;
break;} break;}
} }
/* the action file gets copied in in place of this dollarsign */ /* the action file gets copied in in place of this dollarsign */
#line 498 "/usr/cygnus/gnupro-98r1/share/bison.simple" #line 498 "/usr/lib/bison.simple"
yyvsp -= yylen; yyvsp -= yylen;
yyssp -= yylen; yyssp -= yylen;
...@@ -8028,7 +8014,7 @@ yyerrhandle: ...@@ -8028,7 +8014,7 @@ yyerrhandle:
yystate = yyn; yystate = yyn;
goto yynewstate; goto yynewstate;
} }
#line 3734 "parse.y" #line 3720 "parse.y"
#ifdef SPEW_DEBUG #ifdef SPEW_DEBUG
......
...@@ -2818,25 +2818,11 @@ complex_direct_notype_declarator: ...@@ -2818,25 +2818,11 @@ complex_direct_notype_declarator:
| direct_notype_declarator '[' ']' | direct_notype_declarator '[' ']'
{ $$ = build_parse_node (ARRAY_REF, $$, NULL_TREE); } { $$ = build_parse_node (ARRAY_REF, $$, NULL_TREE); }
| notype_qualified_id | notype_qualified_id
{ if (TREE_CODE (OP0 ($1)) == NAMESPACE_DECL) { enter_scope_of ($1); }
{
push_decl_namespace (OP0 ($1));
TREE_COMPLEXITY ($1) = -1;
}
else if (OP0 ($1) != current_class_type)
{
push_nested_class (OP0 ($1), 3);
TREE_COMPLEXITY ($1) = current_class_depth;
}
}
| nested_name_specifier notype_template_declarator | nested_name_specifier notype_template_declarator
{ got_scope = NULL_TREE; { got_scope = NULL_TREE;
$$ = build_parse_node (SCOPE_REF, $1, $2); $$ = build_parse_node (SCOPE_REF, $1, $2);
if ($1 != current_class_type) enter_scope_of ($$);
{
push_nested_class ($1, 3);
TREE_COMPLEXITY ($$) = current_class_depth;
}
} }
; ;
......
...@@ -1427,3 +1427,24 @@ finish_template_type (name, args, entering_scope) ...@@ -1427,3 +1427,24 @@ finish_template_type (name, args, entering_scope)
return decl; return decl;
} }
/* SR is a SCOPE_REF node. Enter the scope of SR, whether it is a
namespace scope or a class scope. */
void
enter_scope_of (sr)
tree sr;
{
tree scope = TREE_OPERAND (sr, 0);
if (TREE_CODE (scope) == NAMESPACE_DECL)
{
push_decl_namespace (scope);
TREE_COMPLEXITY (sr) = -1;
}
else if (scope != current_class_type)
{
push_nested_class (scope, 3);
TREE_COMPLEXITY (sr) = current_class_depth;
}
}
// Build don't link:
template <class T>
struct S1 {};
namespace N {
}
struct S2
{
typedef N::S1<int> S2_T; // ERROR - parse error
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment