Commit 574a0ef5 by Mark Mitchell Committed by Mark Mitchell

lex.c (check_newline): Use push_srcloc and pop_srcloc, rather than duplicating functionality here.

	* lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
	than duplicating functionality here.
	* optimize.c: Include input.h.
	(expand_call_inline): Use push_srcloc and pop_srcloc.
	* parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
	* parse.c: Regenerated.
	* Makefile.in (lex.o): Depend on input.h.
	(optimize.o): Likewise.

From-SVN: r32142
parent 68723fae
2000-02-24 Mark Mitchell <mark@codesourcery.com>
* lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
than duplicating functionality here.
* optimize.c: Include input.h.
(expand_call_inline): Use push_srcloc and pop_srcloc.
* parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
* parse.c: Regenerated.
* Makefile.in (lex.o): Depend on input.h.
(optimize.o): Likewise.
2000-02-24 Nathan Sidwell <nathan@codesourcery.com> 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
* decl.c (grokdeclarator): Diagnose qualifiers on non-member * decl.c (grokdeclarator): Diagnose qualifiers on non-member
......
# Makefile for GNU C++ compiler. # Makefile for GNU C++ compiler.
# Copyright (C) 1987, 88, 90-5, 1998, 1999 Free Software Foundation, Inc. # Copyright (C) 1987, 88, 90-5, 1998, 1999, 2000 Free Software Foundation, Inc.
#This file is part of GNU CC. #This file is part of GNU CC.
...@@ -246,7 +246,8 @@ spew.o : spew.c $(CXX_TREE_H) $(PARSE_H) $(srcdir)/../flags.h \ ...@@ -246,7 +246,8 @@ spew.o : spew.c $(CXX_TREE_H) $(PARSE_H) $(srcdir)/../flags.h \
lex.o : lex.c $(CXX_TREE_H) \ lex.o : lex.c $(CXX_TREE_H) \
$(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h \ $(PARSE_H) input.c $(srcdir)/../flags.h hash.h lex.h \
$(srcdir)/../c-pragma.h $(srcdir)/../toplev.h \ $(srcdir)/../c-pragma.h $(srcdir)/../toplev.h \
$(srcdir)/../output.h $(srcdir)/../mbchar.h $(srcdir)/../ggc.h $(srcdir)/../output.h $(srcdir)/../mbchar.h $(srcdir)/../ggc.h \
$(srcdir)/../input.h
decl.o : decl.c $(CXX_TREE_H) $(srcdir)/../flags.h \ decl.o : decl.c $(CXX_TREE_H) $(srcdir)/../flags.h \
lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h \ lex.h decl.h $(srcdir)/../stack.h $(srcdir)/../output.h \
$(srcdir)/../except.h $(srcdir)/../toplev.h \ $(srcdir)/../except.h $(srcdir)/../toplev.h \
...@@ -301,7 +302,8 @@ semantics.o: semantics.c $(CXX_TREE_H) lex.h \ ...@@ -301,7 +302,8 @@ semantics.o: semantics.c $(CXX_TREE_H) lex.h \
$(srcdir)/../output.h $(RTL_H) $(srcdir)/../output.h $(RTL_H)
dump.o: dump.c $(CXX_TREE_H) dump.o: dump.c $(CXX_TREE_H)
optimize.o: optimize.c $(CXX_TREE_H) \ optimize.o: optimize.c $(CXX_TREE_H) \
$(srcdir)/../rtl.h $(srcdir)/../integrate.h ../insn-config.h $(srcdir)/../rtl.h $(srcdir)/../integrate.h ../insn-config.h \
$(srcdir)/../input.h
# #
# These exist for maintenance purposes. # These exist for maintenance purposes.
......
...@@ -2322,8 +2322,9 @@ check_newline () ...@@ -2322,8 +2322,9 @@ check_newline ()
register int token; register int token;
int saw_line; int saw_line;
enum { act_none, act_push, act_pop } action; enum { act_none, act_push, act_pop } action;
int old_lineno, action_number, l; int action_number, l;
int entering_c_header; int entering_c_header;
char *new_file;
restart: restart:
/* Read first nonwhite char on the line. Do this before incrementing the /* Read first nonwhite char on the line. Do this before incrementing the
...@@ -2531,9 +2532,9 @@ linenum: ...@@ -2531,9 +2532,9 @@ linenum:
body_time = this_time; body_time = this_time;
} }
input_filename = TREE_STRING_POINTER (yylval.ttype); new_file = TREE_STRING_POINTER (yylval.ttype);
GNU_xref_file (input_filename); GNU_xref_file (new_file);
if (main_input_filename == 0) if (main_input_filename == 0)
{ {
...@@ -2543,29 +2544,24 @@ linenum: ...@@ -2543,29 +2544,24 @@ linenum:
{ {
while (ifiles->next) while (ifiles->next)
ifiles = ifiles->next; ifiles = ifiles->next;
ifiles->filename = file_name_nondirectory (input_filename); ifiles->filename = file_name_nondirectory (new_file);
} }
main_input_filename = input_filename; main_input_filename = new_file;
} }
extract_interface_info ();
old_lineno = lineno;
action = act_none; action = act_none;
action_number = 0; action_number = 0;
lineno = l;
/* Each change of file name /* Each change of file name
reinitializes whether we are now in a system header. */ reinitializes whether we are now in a system header. */
in_system_header = 0; in_system_header = 0;
entering_c_header = 0; entering_c_header = 0;
if (!read_line_number (&action_number)) if (!read_line_number (&action_number) && input_file_stack)
{ {
/* Update the name in the top element of input_file_stack. */ input_file_stack->name = input_filename = new_file;
if (input_file_stack) input_file_stack->line = lineno = l;
input_file_stack->name = input_filename;
} }
/* `1' after file name means entering new file. /* `1' after file name means entering new file.
...@@ -2599,14 +2595,8 @@ linenum: ...@@ -2599,14 +2595,8 @@ linenum:
if (action == act_push) if (action == act_push)
{ {
/* Pushing to a new file. */ /* Pushing to a new file. */
struct file_stack *p push_srcloc (new_file, l);
= (struct file_stack *) xmalloc (sizeof (struct file_stack)); input_file_stack->indent_level = indent_level;
input_file_stack->line = old_lineno;
p->next = input_file_stack;
p->name = input_filename;
p->indent_level = indent_level;
input_file_stack = p;
input_file_stack_tick++;
debug_start_source_file (input_filename); debug_start_source_file (input_filename);
if (c_header_level) if (c_header_level)
++c_header_level; ++c_header_level;
...@@ -2621,8 +2611,6 @@ linenum: ...@@ -2621,8 +2611,6 @@ linenum:
/* Popping out of a file. */ /* Popping out of a file. */
if (input_file_stack->next) if (input_file_stack->next)
{ {
struct file_stack *p = input_file_stack;
if (c_header_level && --c_header_level == 0) if (c_header_level && --c_header_level == 0)
{ {
if (entering_c_header) if (entering_c_header)
...@@ -2630,27 +2618,25 @@ linenum: ...@@ -2630,27 +2618,25 @@ linenum:
--pending_lang_change; --pending_lang_change;
} }
if (indent_level != p->indent_level) if (indent_level != input_file_stack->indent_level)
{ {
warning_with_file_and_line warning_with_file_and_line
(p->name, old_lineno, (input_filename, lineno,
"This file contains more `%c's than `%c's.", "This file contains more `%c's than `%c's.",
indent_level > p->indent_level ? '{' : '}', indent_level > input_file_stack->indent_level ? '{' : '}',
indent_level > p->indent_level ? '}' : '{'); indent_level > input_file_stack->indent_level ? '}' : '{');
} }
input_file_stack = p->next;
free (p); pop_srcloc ();
input_file_stack_tick++; input_file_stack->name = new_file;
lineno = l;
debug_end_source_file (input_file_stack->line); debug_end_source_file (input_file_stack->line);
} }
else else
error ("#-lines for entering and leaving files don't match"); error ("#-lines for entering and leaving files don't match");
} }
/* Now that we've pushed or popped the input stack, extract_interface_info ();
update the name in the top element. */
if (input_file_stack)
input_file_stack->name = input_filename;
/* skip the rest of this line. */ /* skip the rest of this line. */
skipline: skipline:
......
...@@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -25,6 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "cp-tree.h" #include "cp-tree.h"
#include "rtl.h" #include "rtl.h"
#include "insn-config.h" #include "insn-config.h"
#include "input.h"
#include "integrate.h" #include "integrate.h"
#include "varray.h" #include "varray.h"
...@@ -569,6 +570,13 @@ expand_call_inline (tp, walk_subtrees, data) ...@@ -569,6 +570,13 @@ expand_call_inline (tp, walk_subtrees, data)
if (!inlinable_function_p (fn, id)) if (!inlinable_function_p (fn, id))
return NULL_TREE; return NULL_TREE;
/* Set the current filename and line number to the function we are
inlining so that when we create new _STMT nodes here they get
line numbers corresponding to the function we are calling. We
wrap the whole inlined body in an EXPR_WITH_FILE_AND_LINE as well
because individual statements don't record the filename. */
push_srcloc (fn->decl.filename, fn->decl.linenum);
/* Build a statement-expression containing code to initialize the /* Build a statement-expression containing code to initialize the
arguments, the actual inline expansion of the body, and a label arguments, the actual inline expansion of the body, and a label
for the return statements within the function to jump to. The for the return statements within the function to jump to. The
...@@ -660,6 +668,7 @@ expand_call_inline (tp, walk_subtrees, data) ...@@ -660,6 +668,7 @@ expand_call_inline (tp, walk_subtrees, data)
/*col=*/0); /*col=*/0);
EXPR_WFL_EMIT_LINE_NOTE (*tp) = 1; EXPR_WFL_EMIT_LINE_NOTE (*tp) = 1;
TREE_CHAIN (*tp) = chain; TREE_CHAIN (*tp) = chain;
pop_srcloc ();
/* If the value of the new expression is ignored, that's OK. We /* If the value of the new expression is ignored, that's OK. We
don't warn about this for CALL_EXPRs, so we shouldn't warn about don't warn about this for CALL_EXPRs, so we shouldn't warn about
......
...@@ -810,16 +810,16 @@ static const short yyrline[] = { 0, ...@@ -810,16 +810,16 @@ static const short yyrline[] = { 0,
3307, 3309, 3312, 3315, 3318, 3321, 3327, 3329, 3330, 3333, 3307, 3309, 3312, 3315, 3318, 3321, 3327, 3329, 3330, 3333,
3335, 3336, 3337, 3339, 3342, 3345, 3348, 3354, 3358, 3360, 3335, 3336, 3337, 3339, 3342, 3345, 3348, 3354, 3358, 3360,
3363, 3365, 3368, 3372, 3374, 3377, 3379, 3382, 3399, 3407, 3363, 3365, 3368, 3372, 3374, 3377, 3379, 3382, 3399, 3407,
3410, 3412, 3414, 3418, 3421, 3422, 3430, 3434, 3438, 3441, 3410, 3412, 3414, 3418, 3421, 3422, 3430, 3433, 3436, 3439,
3442, 3448, 3451, 3454, 3456, 3460, 3465, 3468, 3478, 3483, 3440, 3446, 3449, 3452, 3454, 3458, 3463, 3466, 3476, 3481,
3484, 3491, 3494, 3497, 3499, 3502, 3504, 3514, 3528, 3532, 3482, 3489, 3492, 3495, 3497, 3500, 3502, 3512, 3526, 3530,
3535, 3537, 3541, 3545, 3548, 3551, 3553, 3557, 3559, 3566, 3533, 3535, 3539, 3543, 3546, 3549, 3551, 3555, 3557, 3564,
3573, 3576, 3580, 3584, 3588, 3594, 3598, 3603, 3605, 3608, 3571, 3574, 3578, 3582, 3586, 3592, 3596, 3601, 3603, 3606,
3613, 3619, 3630, 3633, 3635, 3639, 3647, 3650, 3654, 3657, 3611, 3617, 3628, 3631, 3633, 3637, 3645, 3648, 3652, 3655,
3659, 3661, 3667, 3672, 3675, 3677, 3679, 3681, 3683, 3685, 3657, 3659, 3665, 3670, 3673, 3675, 3677, 3679, 3681, 3683,
3687, 3689, 3691, 3693, 3695, 3697, 3699, 3701, 3703, 3705, 3685, 3687, 3689, 3691, 3693, 3695, 3697, 3699, 3701, 3703,
3707, 3709, 3711, 3713, 3715, 3717, 3719, 3721, 3723, 3725, 3705, 3707, 3709, 3711, 3713, 3715, 3717, 3719, 3721, 3723,
3727, 3729, 3731, 3733, 3735, 3737, 3740, 3742 3725, 3727, 3729, 3731, 3733, 3735, 3738, 3740
}; };
#endif #endif
...@@ -7848,75 +7848,70 @@ case 786: ...@@ -7848,75 +7848,70 @@ case 786:
break;} break;}
case 787: case 787:
#line 3432 "parse.y" #line 3432 "parse.y"
{ emit_line_note (input_filename, lineno); { yyval.ttype = NULL_TREE; ;
yyval.ttype = NULL_TREE; ;
break;}
case 788:
#line 3435 "parse.y"
{ emit_line_note (input_filename, lineno); ;
break;} break;}
case 789: case 789:
#line 3440 "parse.y" #line 3438 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 791: case 791:
#line 3443 "parse.y" #line 3441 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 792: case 792:
#line 3450 "parse.y" #line 3448 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 795: case 795:
#line 3457 "parse.y" #line 3455 "parse.y"
{ yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ; { yyval.ttype = chainon (yyval.ttype, yyvsp[0].ttype); ;
break;} break;}
case 796: case 796:
#line 3462 "parse.y" #line 3460 "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 797: case 797:
#line 3467 "parse.y" #line 3465 "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 798: case 798:
#line 3469 "parse.y" #line 3467 "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 799: case 799:
#line 3480 "parse.y" #line 3478 "parse.y"
{ {
yyval.ttype = empty_parms(); yyval.ttype = empty_parms();
; ;
break;} break;}
case 801: case 801:
#line 3485 "parse.y" #line 3483 "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 802: case 802:
#line 3493 "parse.y" #line 3491 "parse.y"
{ yyval.ttype = finish_parmlist (yyval.ttype, 0); ; { yyval.ttype = finish_parmlist (yyval.ttype, 0); ;
break;} break;}
case 803: case 803:
#line 3495 "parse.y" #line 3493 "parse.y"
{ yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
break;} break;}
case 804: case 804:
#line 3498 "parse.y" #line 3496 "parse.y"
{ yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ; { yyval.ttype = finish_parmlist (yyvsp[-1].ttype, 1); ;
break;} break;}
case 805: case 805:
#line 3500 "parse.y" #line 3498 "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 806: case 806:
#line 3503 "parse.y" #line 3501 "parse.y"
{ yyval.ttype = finish_parmlist (NULL_TREE, 1); ; { yyval.ttype = finish_parmlist (NULL_TREE, 1); ;
break;} break;}
case 807: case 807:
#line 3505 "parse.y" #line 3503 "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
...@@ -7928,7 +7923,7 @@ case 807: ...@@ -7928,7 +7923,7 @@ case 807:
; ;
break;} break;}
case 808: case 808:
#line 3515 "parse.y" #line 3513 "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
...@@ -7941,99 +7936,99 @@ case 808: ...@@ -7941,99 +7936,99 @@ case 808:
; ;
break;} break;}
case 809: case 809:
#line 3530 "parse.y" #line 3528 "parse.y"
{ maybe_snarf_defarg (); ; { maybe_snarf_defarg (); ;
break;} break;}
case 810: case 810:
#line 3532 "parse.y" #line 3530 "parse.y"
{ yyval.ttype = yyvsp[0].ttype; ; { yyval.ttype = yyvsp[0].ttype; ;
break;} break;}
case 813: case 813:
#line 3543 "parse.y" #line 3541 "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 814: case 814:
#line 3546 "parse.y" #line 3544 "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 815: case 815:
#line 3549 "parse.y" #line 3547 "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 816: case 816:
#line 3552 "parse.y" #line 3550 "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 817: case 817:
#line 3554 "parse.y" #line 3552 "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 819: case 819:
#line 3560 "parse.y" #line 3558 "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 820: case 820:
#line 3570 "parse.y" #line 3568 "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 821: case 821:
#line 3574 "parse.y" #line 3572 "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 822: case 822:
#line 3577 "parse.y" #line 3575 "parse.y"
{ yyval.ftype.t = build_tree_list (build_decl_list (NULL_TREE, yyvsp[-1].ftype.t), { yyval.ftype.t = build_tree_list (build_decl_list (NULL_TREE, yyvsp[-1].ftype.t),
yyvsp[0].ttype); 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 823: case 823:
#line 3581 "parse.y" #line 3579 "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 824: case 824:
#line 3585 "parse.y" #line 3583 "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 825: case 825:
#line 3589 "parse.y" #line 3587 "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 = 0; ; yyval.ftype.new_type_flag = 0; ;
break;} break;}
case 826: case 826:
#line 3596 "parse.y" #line 3594 "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 827: case 827:
#line 3599 "parse.y" #line 3597 "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 830: case 830:
#line 3610 "parse.y" #line 3608 "parse.y"
{ see_typename (); ; { see_typename (); ;
break;} break;}
case 831: case 831:
#line 3615 "parse.y" #line 3613 "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 832: case 832:
#line 3620 "parse.y" #line 3618 "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
...@@ -8044,192 +8039,192 @@ case 832: ...@@ -8044,192 +8039,192 @@ case 832:
; ;
break;} break;}
case 833: case 833:
#line 3632 "parse.y" #line 3630 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 834: case 834:
#line 3634 "parse.y" #line 3632 "parse.y"
{ yyval.ttype = yyvsp[-1].ttype; ; { yyval.ttype = yyvsp[-1].ttype; ;
break;} break;}
case 835: case 835:
#line 3636 "parse.y" #line 3634 "parse.y"
{ yyval.ttype = empty_except_spec; ; { yyval.ttype = empty_except_spec; ;
break;} break;}
case 836: case 836:
#line 3641 "parse.y" #line 3639 "parse.y"
{ {
check_for_new_type ("exception specifier", yyvsp[0].ftype); check_for_new_type ("exception specifier", yyvsp[0].ftype);
yyval.ttype = groktypename (yyvsp[0].ftype.t); yyval.ttype = groktypename (yyvsp[0].ftype.t);
; ;
break;} break;}
case 837: case 837:
#line 3649 "parse.y" #line 3647 "parse.y"
{ yyval.ttype = add_exception_specifier (NULL_TREE, yyvsp[0].ttype, 1); ; { yyval.ttype = add_exception_specifier (NULL_TREE, yyvsp[0].ttype, 1); ;
break;} break;}
case 838: case 838:
#line 3651 "parse.y" #line 3649 "parse.y"
{ yyval.ttype = add_exception_specifier (yyvsp[-2].ttype, yyvsp[0].ttype, 1); ; { yyval.ttype = add_exception_specifier (yyvsp[-2].ttype, yyvsp[0].ttype, 1); ;
break;} break;}
case 839: case 839:
#line 3656 "parse.y" #line 3654 "parse.y"
{ yyval.ttype = NULL_TREE; ; { yyval.ttype = NULL_TREE; ;
break;} break;}
case 840: case 840:
#line 3658 "parse.y" #line 3656 "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 841: case 841:
#line 3660 "parse.y" #line 3658 "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 842: case 842:
#line 3662 "parse.y" #line 3660 "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 843: case 843:
#line 3669 "parse.y" #line 3667 "parse.y"
{ got_scope = NULL_TREE; ; { got_scope = NULL_TREE; ;
break;} break;}
case 844: case 844:
#line 3674 "parse.y" #line 3672 "parse.y"
{ yyval.ttype = ansi_opname[MULT_EXPR]; ; { yyval.ttype = ansi_opname[MULT_EXPR]; ;
break;} break;}
case 845: case 845:
#line 3676 "parse.y" #line 3674 "parse.y"
{ yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ; { yyval.ttype = ansi_opname[TRUNC_DIV_EXPR]; ;
break;} break;}
case 846: case 846:
#line 3678 "parse.y" #line 3676 "parse.y"
{ yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ; { yyval.ttype = ansi_opname[TRUNC_MOD_EXPR]; ;
break;} break;}
case 847: case 847:
#line 3680 "parse.y" #line 3678 "parse.y"
{ yyval.ttype = ansi_opname[PLUS_EXPR]; ; { yyval.ttype = ansi_opname[PLUS_EXPR]; ;
break;} break;}
case 848: case 848:
#line 3682 "parse.y" #line 3680 "parse.y"
{ yyval.ttype = ansi_opname[MINUS_EXPR]; ; { yyval.ttype = ansi_opname[MINUS_EXPR]; ;
break;} break;}
case 849: case 849:
#line 3684 "parse.y" #line 3682 "parse.y"
{ yyval.ttype = ansi_opname[BIT_AND_EXPR]; ; { yyval.ttype = ansi_opname[BIT_AND_EXPR]; ;
break;} break;}
case 850: case 850:
#line 3686 "parse.y" #line 3684 "parse.y"
{ yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ; { yyval.ttype = ansi_opname[BIT_IOR_EXPR]; ;
break;} break;}
case 851: case 851:
#line 3688 "parse.y" #line 3686 "parse.y"
{ yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ; { yyval.ttype = ansi_opname[BIT_XOR_EXPR]; ;
break;} break;}
case 852: case 852:
#line 3690 "parse.y" #line 3688 "parse.y"
{ yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ; { yyval.ttype = ansi_opname[BIT_NOT_EXPR]; ;
break;} break;}
case 853: case 853:
#line 3692 "parse.y" #line 3690 "parse.y"
{ yyval.ttype = ansi_opname[COMPOUND_EXPR]; ; { yyval.ttype = ansi_opname[COMPOUND_EXPR]; ;
break;} break;}
case 854: case 854:
#line 3694 "parse.y" #line 3692 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 855: case 855:
#line 3696 "parse.y" #line 3694 "parse.y"
{ yyval.ttype = ansi_opname[LT_EXPR]; ; { yyval.ttype = ansi_opname[LT_EXPR]; ;
break;} break;}
case 856: case 856:
#line 3698 "parse.y" #line 3696 "parse.y"
{ yyval.ttype = ansi_opname[GT_EXPR]; ; { yyval.ttype = ansi_opname[GT_EXPR]; ;
break;} break;}
case 857: case 857:
#line 3700 "parse.y" #line 3698 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 858: case 858:
#line 3702 "parse.y" #line 3700 "parse.y"
{ yyval.ttype = ansi_assopname[yyvsp[0].code]; ; { yyval.ttype = ansi_assopname[yyvsp[0].code]; ;
break;} break;}
case 859: case 859:
#line 3704 "parse.y" #line 3702 "parse.y"
{ yyval.ttype = ansi_opname [MODIFY_EXPR]; ; { yyval.ttype = ansi_opname [MODIFY_EXPR]; ;
break;} break;}
case 860: case 860:
#line 3706 "parse.y" #line 3704 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 861: case 861:
#line 3708 "parse.y" #line 3706 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 862: case 862:
#line 3710 "parse.y" #line 3708 "parse.y"
{ yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ; { yyval.ttype = ansi_opname[POSTINCREMENT_EXPR]; ;
break;} break;}
case 863: case 863:
#line 3712 "parse.y" #line 3710 "parse.y"
{ yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ; { yyval.ttype = ansi_opname[PREDECREMENT_EXPR]; ;
break;} break;}
case 864: case 864:
#line 3714 "parse.y" #line 3712 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_ANDIF_EXPR]; ;
break;} break;}
case 865: case 865:
#line 3716 "parse.y" #line 3714 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_ORIF_EXPR]; ;
break;} break;}
case 866: case 866:
#line 3718 "parse.y" #line 3716 "parse.y"
{ yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ; { yyval.ttype = ansi_opname[TRUTH_NOT_EXPR]; ;
break;} break;}
case 867: case 867:
#line 3720 "parse.y" #line 3718 "parse.y"
{ yyval.ttype = ansi_opname[COND_EXPR]; ; { yyval.ttype = ansi_opname[COND_EXPR]; ;
break;} break;}
case 868: case 868:
#line 3722 "parse.y" #line 3720 "parse.y"
{ yyval.ttype = ansi_opname[yyvsp[0].code]; ; { yyval.ttype = ansi_opname[yyvsp[0].code]; ;
break;} break;}
case 869: case 869:
#line 3724 "parse.y" #line 3722 "parse.y"
{ yyval.ttype = ansi_opname[COMPONENT_REF]; ; { yyval.ttype = ansi_opname[COMPONENT_REF]; ;
break;} break;}
case 870: case 870:
#line 3726 "parse.y" #line 3724 "parse.y"
{ yyval.ttype = ansi_opname[MEMBER_REF]; ; { yyval.ttype = ansi_opname[MEMBER_REF]; ;
break;} break;}
case 871: case 871:
#line 3728 "parse.y" #line 3726 "parse.y"
{ yyval.ttype = ansi_opname[CALL_EXPR]; ; { yyval.ttype = ansi_opname[CALL_EXPR]; ;
break;} break;}
case 872: case 872:
#line 3730 "parse.y" #line 3728 "parse.y"
{ yyval.ttype = ansi_opname[ARRAY_REF]; ; { yyval.ttype = ansi_opname[ARRAY_REF]; ;
break;} break;}
case 873: case 873:
#line 3732 "parse.y" #line 3730 "parse.y"
{ yyval.ttype = ansi_opname[NEW_EXPR]; ; { yyval.ttype = ansi_opname[NEW_EXPR]; ;
break;} break;}
case 874: case 874:
#line 3734 "parse.y" #line 3732 "parse.y"
{ yyval.ttype = ansi_opname[DELETE_EXPR]; ; { yyval.ttype = ansi_opname[DELETE_EXPR]; ;
break;} break;}
case 875: case 875:
#line 3736 "parse.y" #line 3734 "parse.y"
{ yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ; { yyval.ttype = ansi_opname[VEC_NEW_EXPR]; ;
break;} break;}
case 876: case 876:
#line 3738 "parse.y" #line 3736 "parse.y"
{ yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ; { yyval.ttype = ansi_opname[VEC_DELETE_EXPR]; ;
break;} break;}
case 877: case 877:
#line 3741 "parse.y" #line 3739 "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 878: case 878:
#line 3743 "parse.y" #line 3741 "parse.y"
{ yyval.ttype = ansi_opname[ERROR_MARK]; ; { yyval.ttype = ansi_opname[ERROR_MARK]; ;
break;} break;}
} }
...@@ -8454,7 +8449,7 @@ yyerrhandle: ...@@ -8454,7 +8449,7 @@ yyerrhandle:
} }
return 1; return 1;
} }
#line 3746 "parse.y" #line 3744 "parse.y"
#ifdef SPEW_DEBUG #ifdef SPEW_DEBUG
......
...@@ -3429,10 +3429,8 @@ for.init.statement: ...@@ -3429,10 +3429,8 @@ for.init.statement:
maybe_cv_qualifier: maybe_cv_qualifier:
/* empty */ /* empty */
{ emit_line_note (input_filename, lineno); { $$ = NULL_TREE; }
$$ = NULL_TREE; }
| CV_QUALIFIER | CV_QUALIFIER
{ emit_line_note (input_filename, lineno); }
; ;
xexpr: xexpr:
......
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