c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST.
* c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST. (RESTORE_WARN_FLAGS): Unpack it. Change semantic type of extension to ttype. * c-common.c (split_specs_attrs): Expect an INTEGER_CST. * c-parse.y, c-parse.c, objc/objc-parse.y, objc/objc-parse.c: Regenerate. From-SVN: r31478
This commit is contained in:
parent
18990de52b
commit
101e59f492
@ -1,3 +1,12 @@
|
||||
2000-01-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
|
||||
|
||||
* c-parse.in (SAVE_WARN_FLAGS): Create an INTEGER_CST.
|
||||
(RESTORE_WARN_FLAGS): Unpack it.
|
||||
Change semantic type of extension to ttype.
|
||||
* c-common.c (split_specs_attrs): Expect an INTEGER_CST.
|
||||
* c-parse.y, c-parse.c, objc/objc-parse.y,
|
||||
objc/objc-parse.c: Regenerate.
|
||||
|
||||
2000-01-17 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* fixinc/fixlib.c: Add copyright notice.
|
||||
|
@ -1079,6 +1079,15 @@ split_specs_attrs (specs_attrs, declspecs, prefix_attributes)
|
||||
{
|
||||
tree t, s, a, next, specs, attrs;
|
||||
|
||||
/* This can happen after an __extension__ in pedantic mode. */
|
||||
if (specs_attrs != NULL_TREE
|
||||
&& TREE_CODE (specs_attrs) == INTEGER_CST)
|
||||
{
|
||||
*declspecs = NULL_TREE;
|
||||
*prefix_attributes = NULL_TREE;
|
||||
return;
|
||||
}
|
||||
|
||||
/* This can happen in c++ (eg: decl: typespec initdecls ';'). */
|
||||
if (specs_attrs != NULL_TREE
|
||||
&& TREE_CODE (specs_attrs) != TREE_LIST)
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
/* A Bison parser, made from c-parse.y
|
||||
by GNU Bison version 1.28 */
|
||||
by GNU Bison version 1.27
|
||||
*/
|
||||
|
||||
#define YYBISON 1 /* Identify Bison output. */
|
||||
|
||||
@ -98,7 +99,7 @@ const char * const language_string = "GNU C";
|
||||
#line 64 "c-parse.y"
|
||||
typedef union {long itype; tree ttype; enum tree_code code;
|
||||
char *filename; int lineno; int ends_in_label; } YYSTYPE;
|
||||
#line 186 "c-parse.y"
|
||||
#line 184 "c-parse.y"
|
||||
|
||||
/* Number of statements (loosely speaking) and compound statements
|
||||
seen so far. */
|
||||
@ -122,9 +123,11 @@ static int undeclared_variable_notice;
|
||||
|
||||
/* For __extension__, save/restore the warning flags which are
|
||||
controlled by __extension__. */
|
||||
#define SAVE_WARN_FLAGS() (pedantic | (warn_pointer_arith << 1))
|
||||
#define RESTORE_WARN_FLAGS(val) \
|
||||
#define SAVE_WARN_FLAGS() \
|
||||
build_int_2 (pedantic | (warn_pointer_arith << 1), 0)
|
||||
#define RESTORE_WARN_FLAGS(tval) \
|
||||
do { \
|
||||
int val = TREE_INT_CST_LOW (tval); \
|
||||
pedantic = val & 1; \
|
||||
warn_pointer_arith = (val >> 1) & 1; \
|
||||
} while (0)
|
||||
@ -1263,8 +1266,8 @@ static const short yycheck[] = { 38,
|
||||
51, 52, 53, 54
|
||||
};
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "/usr/share/misc/bison.simple"
|
||||
/* This file comes from bison-1.28. */
|
||||
#line 3 "/usr/share/bison.simple"
|
||||
/* This file comes from bison-1.27. */
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
||||
@ -1477,7 +1480,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 217 "/usr/share/misc/bison.simple"
|
||||
#line 216 "/usr/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 *.
|
||||
@ -1842,7 +1845,7 @@ case 9:
|
||||
break;}
|
||||
case 10:
|
||||
#line 270 "c-parse.y"
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 11:
|
||||
#line 275 "c-parse.y"
|
||||
@ -2012,7 +2015,7 @@ case 46:
|
||||
case 47:
|
||||
#line 406 "c-parse.y"
|
||||
{ yyval.ttype = yyvsp[0].ttype;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 48:
|
||||
#line 409 "c-parse.y"
|
||||
@ -2511,7 +2514,7 @@ case 126:
|
||||
break;}
|
||||
case 127:
|
||||
#line 864 "c-parse.y"
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 128:
|
||||
#line 874 "c-parse.y"
|
||||
@ -3065,7 +3068,7 @@ case 271:
|
||||
case 272:
|
||||
#line 1441 "c-parse.y"
|
||||
{ yyval.ttype = yyvsp[0].ttype;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 274:
|
||||
#line 1448 "c-parse.y"
|
||||
@ -3882,13 +3885,13 @@ case 406:
|
||||
break;}
|
||||
case 407:
|
||||
#line 2272 "c-parse.y"
|
||||
{ yyval.itype = SAVE_WARN_FLAGS();
|
||||
{ yyval.ttype = SAVE_WARN_FLAGS();
|
||||
pedantic = 0;
|
||||
warn_pointer_arith = 0; ;
|
||||
break;}
|
||||
}
|
||||
/* the action file gets copied in in place of this dollarsign */
|
||||
#line 543 "/usr/share/misc/bison.simple"
|
||||
#line 542 "/usr/share/bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
@ -166,7 +166,7 @@ end ifc
|
||||
%type <ttype> init maybeasm
|
||||
%type <ttype> asm_operands nonnull_asm_operands asm_operand asm_clobbers
|
||||
%type <ttype> maybe_attribute attributes attribute attribute_list attrib
|
||||
%type <ttype> any_word
|
||||
%type <ttype> any_word extension
|
||||
|
||||
%type <ttype> compstmt compstmt_nostart compstmt_primary_start
|
||||
|
||||
@ -185,8 +185,6 @@ end ifc
|
||||
%type <ttype> parmlist_or_identifiers parmlist_or_identifiers_1
|
||||
%type <ttype> identifiers_or_typenames
|
||||
|
||||
%type <itype> extension
|
||||
|
||||
%type <itype> setspecs
|
||||
|
||||
%type <ends_in_label> lineno_stmt_or_label lineno_stmt_or_labels stmt_or_label
|
||||
@ -231,9 +229,11 @@ static int undeclared_variable_notice;
|
||||
|
||||
/* For __extension__, save/restore the warning flags which are
|
||||
controlled by __extension__. */
|
||||
#define SAVE_WARN_FLAGS() (pedantic | (warn_pointer_arith << 1))
|
||||
#define RESTORE_WARN_FLAGS(val) \
|
||||
#define SAVE_WARN_FLAGS() \
|
||||
build_int_2 (pedantic | (warn_pointer_arith << 1), 0)
|
||||
#define RESTORE_WARN_FLAGS(tval) \
|
||||
do { \
|
||||
int val = TREE_INT_CST_LOW (tval); \
|
||||
pedantic = val & 1; \
|
||||
warn_pointer_arith = (val >> 1) & 1; \
|
||||
} while (0)
|
||||
|
@ -154,7 +154,7 @@ const char * const language_string = "GNU C";
|
||||
%type <ttype> init maybeasm
|
||||
%type <ttype> asm_operands nonnull_asm_operands asm_operand asm_clobbers
|
||||
%type <ttype> maybe_attribute attributes attribute attribute_list attrib
|
||||
%type <ttype> any_word
|
||||
%type <ttype> any_word extension
|
||||
|
||||
%type <ttype> compstmt compstmt_nostart compstmt_primary_start
|
||||
|
||||
@ -173,8 +173,6 @@ const char * const language_string = "GNU C";
|
||||
%type <ttype> parmlist_or_identifiers parmlist_or_identifiers_1
|
||||
%type <ttype> identifiers_or_typenames
|
||||
|
||||
%type <itype> extension
|
||||
|
||||
%type <itype> setspecs
|
||||
|
||||
%type <ends_in_label> lineno_stmt_or_label lineno_stmt_or_labels stmt_or_label
|
||||
@ -206,9 +204,11 @@ static int undeclared_variable_notice;
|
||||
|
||||
/* For __extension__, save/restore the warning flags which are
|
||||
controlled by __extension__. */
|
||||
#define SAVE_WARN_FLAGS() (pedantic | (warn_pointer_arith << 1))
|
||||
#define RESTORE_WARN_FLAGS(val) \
|
||||
#define SAVE_WARN_FLAGS() \
|
||||
build_int_2 (pedantic | (warn_pointer_arith << 1), 0)
|
||||
#define RESTORE_WARN_FLAGS(tval) \
|
||||
do { \
|
||||
int val = TREE_INT_CST_LOW (tval); \
|
||||
pedantic = val & 1; \
|
||||
warn_pointer_arith = (val >> 1) & 1; \
|
||||
} while (0)
|
||||
|
@ -1,6 +1,7 @@
|
||||
|
||||
/* A Bison parser, made from objc-parse.y
|
||||
by GNU Bison version 1.28 */
|
||||
by GNU Bison version 1.27
|
||||
*/
|
||||
|
||||
#define YYBISON 1 /* Identify Bison output. */
|
||||
|
||||
@ -99,7 +100,7 @@ const char * const language_string = "GNU Obj-C";
|
||||
#line 65 "objc-parse.y"
|
||||
typedef union {long itype; tree ttype; enum tree_code code;
|
||||
char *filename; int lineno; int ends_in_label; } YYSTYPE;
|
||||
#line 198 "objc-parse.y"
|
||||
#line 196 "objc-parse.y"
|
||||
|
||||
/* Number of statements (loosely speaking) and compound statements
|
||||
seen so far. */
|
||||
@ -123,9 +124,11 @@ static int undeclared_variable_notice;
|
||||
|
||||
/* For __extension__, save/restore the warning flags which are
|
||||
controlled by __extension__. */
|
||||
#define SAVE_WARN_FLAGS() (pedantic | (warn_pointer_arith << 1))
|
||||
#define RESTORE_WARN_FLAGS(val) \
|
||||
#define SAVE_WARN_FLAGS() \
|
||||
build_int_2 (pedantic | (warn_pointer_arith << 1), 0)
|
||||
#define RESTORE_WARN_FLAGS(tval) \
|
||||
do { \
|
||||
int val = TREE_INT_CST_LOW (tval); \
|
||||
pedantic = val & 1; \
|
||||
warn_pointer_arith = (val >> 1) & 1; \
|
||||
} while (0)
|
||||
@ -1746,8 +1749,8 @@ static const short yycheck[] = { 56,
|
||||
46, 47, 48, 49, 50, 51, 52, 53, 54
|
||||
};
|
||||
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
|
||||
#line 3 "/usr/share/misc/bison.simple"
|
||||
/* This file comes from bison-1.28. */
|
||||
#line 3 "/usr/share/bison.simple"
|
||||
/* This file comes from bison-1.27. */
|
||||
|
||||
/* Skeleton output parser for bison,
|
||||
Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
|
||||
@ -1960,7 +1963,7 @@ __yy_memcpy (char *to, char *from, unsigned int count)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#line 217 "/usr/share/misc/bison.simple"
|
||||
#line 216 "/usr/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 *.
|
||||
@ -2325,7 +2328,7 @@ case 10:
|
||||
break;}
|
||||
case 11:
|
||||
#line 294 "objc-parse.y"
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 12:
|
||||
#line 299 "objc-parse.y"
|
||||
@ -2495,7 +2498,7 @@ case 49:
|
||||
case 50:
|
||||
#line 432 "objc-parse.y"
|
||||
{ yyval.ttype = yyvsp[0].ttype;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 51:
|
||||
#line 435 "objc-parse.y"
|
||||
@ -3093,7 +3096,7 @@ case 136:
|
||||
break;}
|
||||
case 137:
|
||||
#line 982 "objc-parse.y"
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
{ RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 138:
|
||||
#line 992 "objc-parse.y"
|
||||
@ -3652,7 +3655,7 @@ case 282:
|
||||
case 283:
|
||||
#line 1569 "objc-parse.y"
|
||||
{ yyval.ttype = yyvsp[0].ttype;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].itype); ;
|
||||
RESTORE_WARN_FLAGS (yyvsp[-1].ttype); ;
|
||||
break;}
|
||||
case 285:
|
||||
#line 1576 "objc-parse.y"
|
||||
@ -4471,7 +4474,7 @@ case 417:
|
||||
break;}
|
||||
case 418:
|
||||
#line 2402 "objc-parse.y"
|
||||
{ yyval.itype = SAVE_WARN_FLAGS();
|
||||
{ yyval.ttype = SAVE_WARN_FLAGS();
|
||||
pedantic = 0;
|
||||
warn_pointer_arith = 0; ;
|
||||
break;}
|
||||
@ -5150,7 +5153,7 @@ case 570:
|
||||
break;}
|
||||
}
|
||||
/* the action file gets copied in in place of this dollarsign */
|
||||
#line 543 "/usr/share/misc/bison.simple"
|
||||
#line 542 "/usr/share/bison.simple"
|
||||
|
||||
yyvsp -= yylen;
|
||||
yyssp -= yylen;
|
||||
|
@ -155,7 +155,7 @@ const char * const language_string = "GNU Obj-C";
|
||||
%type <ttype> init maybeasm
|
||||
%type <ttype> asm_operands nonnull_asm_operands asm_operand asm_clobbers
|
||||
%type <ttype> maybe_attribute attributes attribute attribute_list attrib
|
||||
%type <ttype> any_word
|
||||
%type <ttype> any_word extension
|
||||
|
||||
%type <ttype> compstmt compstmt_nostart compstmt_primary_start
|
||||
|
||||
@ -174,8 +174,6 @@ const char * const language_string = "GNU Obj-C";
|
||||
%type <ttype> parmlist_or_identifiers parmlist_or_identifiers_1
|
||||
%type <ttype> identifiers_or_typenames
|
||||
|
||||
%type <itype> extension
|
||||
|
||||
%type <itype> setspecs
|
||||
|
||||
%type <ends_in_label> lineno_stmt_or_label lineno_stmt_or_labels stmt_or_label
|
||||
@ -218,9 +216,11 @@ static int undeclared_variable_notice;
|
||||
|
||||
/* For __extension__, save/restore the warning flags which are
|
||||
controlled by __extension__. */
|
||||
#define SAVE_WARN_FLAGS() (pedantic | (warn_pointer_arith << 1))
|
||||
#define RESTORE_WARN_FLAGS(val) \
|
||||
#define SAVE_WARN_FLAGS() \
|
||||
build_int_2 (pedantic | (warn_pointer_arith << 1), 0)
|
||||
#define RESTORE_WARN_FLAGS(tval) \
|
||||
do { \
|
||||
int val = TREE_INT_CST_LOW (tval); \
|
||||
pedantic = val & 1; \
|
||||
warn_pointer_arith = (val >> 1) & 1; \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user