+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.
{
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)
/* 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. */
#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. */
/* 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)
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.
#endif
#endif
\f
-#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 *.
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"
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"
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"
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"
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"
\f
yyvsp -= yylen;
yyssp -= yylen;
%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
%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
/* 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)
%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
%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
/* 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)
/* 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. */
#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. */
/* 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)
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.
#endif
#endif
\f
-#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 *.
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"
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"
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"
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"
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;}
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"
\f
yyvsp -= yylen;
yyssp -= yylen;
%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
%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
/* 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)