1990-06-18 16:31:11 -04:00
|
|
|
%{
|
1998-10-07 05:57:38 -04:00
|
|
|
/* Command-line: gperf -L KR-C -F ', 0, 0' -p -j1 -i 1 -g -o -t -N is_reserved_word -k1,3,$ c-parse.gperf */
|
1990-06-18 16:31:11 -04:00
|
|
|
%}
|
1999-03-31 02:43:52 -05:00
|
|
|
struct resword { const char *name; short token; enum rid rid; };
|
1990-06-18 16:31:11 -04:00
|
|
|
%%
|
1993-04-09 19:07:39 -04:00
|
|
|
@class, CLASS, NORID
|
|
|
|
@compatibility_alias, ALIAS, NORID
|
|
|
|
@defs, DEFS, NORID
|
|
|
|
@encode, ENCODE, NORID
|
|
|
|
@end, END, NORID
|
|
|
|
@implementation, IMPLEMENTATION, NORID
|
|
|
|
@interface, INTERFACE, NORID
|
|
|
|
@private, PRIVATE, NORID
|
|
|
|
@protected, PROTECTED, NORID
|
|
|
|
@protocol, PROTOCOL, NORID
|
|
|
|
@public, PUBLIC, NORID
|
|
|
|
@selector, SELECTOR, NORID
|
1990-06-18 16:31:11 -04:00
|
|
|
__alignof, ALIGNOF, NORID
|
|
|
|
__alignof__, ALIGNOF, NORID
|
1992-03-19 13:32:44 -05:00
|
|
|
__asm, ASM_KEYWORD, NORID
|
|
|
|
__asm__, ASM_KEYWORD, NORID
|
1990-06-18 16:31:11 -04:00
|
|
|
__attribute, ATTRIBUTE, NORID
|
|
|
|
__attribute__, ATTRIBUTE, NORID
|
1993-03-04 12:59:12 -05:00
|
|
|
__complex, TYPESPEC, RID_COMPLEX
|
|
|
|
__complex__, TYPESPEC, RID_COMPLEX
|
1990-06-18 16:31:11 -04:00
|
|
|
__const, TYPE_QUAL, RID_CONST
|
|
|
|
__const__, TYPE_QUAL, RID_CONST
|
|
|
|
__extension__, EXTENSION, NORID
|
1993-03-25 13:02:30 -05:00
|
|
|
__imag, IMAGPART, NORID
|
|
|
|
__imag__, IMAGPART, NORID
|
1990-06-18 16:31:11 -04:00
|
|
|
__inline, SCSPEC, RID_INLINE
|
|
|
|
__inline__, SCSPEC, RID_INLINE
|
1993-03-04 12:59:12 -05:00
|
|
|
__iterator, SCSPEC, RID_ITERATOR
|
1993-03-01 21:13:14 -05:00
|
|
|
__iterator__, SCSPEC, RID_ITERATOR
|
1990-06-18 16:31:11 -04:00
|
|
|
__label__, LABEL, NORID
|
1993-03-25 13:02:30 -05:00
|
|
|
__real, REALPART, NORID
|
|
|
|
__real__, REALPART, NORID
|
invoke.texi: Document -flang-isoc9x.
* invoke.texi: Document -flang-isoc9x.
* Makefile.in (OBJS): Add splay-tree.o.
(c-common.o): Depend on rtl.h.
(splay-tree.o): List dependencies and provide build rule.
* rtl.h (record_alias_subset): New function.
* alias.c: Include splay-tree.h.
(alias_set_entry): New type.
(CHECK_ALIAS_SETS_FOR_CONSISTENCY): Remove.
(DIFFERENT_ALIAS_SETS_P): Use mem_in_disjoint_alias_sets_p.
(mems_in_disjoin_alias_sets_p): New function.
(alias_set_compare): Likewise.
(insert_subset_children): Likewise.
(get_alias_set_entry): Likewise.
* tree.h (TYPE_RESTRICT): New macro.
(TYPE_UNQUALIFIED): New manifest constant.
(TYPE_QUAL_CONST): Likewise
(TYPE_QUAL_VOLATILE): Likewise.
(TYPE_QUAL_RESTRICT): Likewise.
(tree_type): Add restrict_flag. Reduce count of free bits.
(DECL_POINTER_ALIAS_SET): New macro.
(DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise.
(tree_decl): Add pointer_alias_set.
(build_qualified_type): New function.
(build_type_variant): Define in terms of build_qualified_type.
* tree.c (set_type_quals): New function.
(make_node): Initializae DECL_POINTER_ALIAS_SET.
(build_type_attribute_variant): Use build_qualified_type and
set_type_quals.
(build_type_variant): Rename, and modify, to become...
(build_qualified_type): New function.
(build_complex_type): Use set_type_quals.
* c-tree.h (C_TYPE_OBJECT_P): New macro.
(C_TYPE_FUNCTION_P): Likewise.
(C_TYPE_INCOMPLETE_P): Likewise.
(C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise.
(c_apply_type_quals_to_decl): New function.
(c_build_qualified_type): New function.
(c_build_type_variant): Define in terms of c_build_qualified_type.
(flag_isoc9x): Declare.
* c-typeck.c (qualify_type): Use c_build_qualified_type.
(common_type): Change to use TYPE_QUALS.
(comptypes): Likewise.
(convert_for_assignment): Likewise.
* c-aux-info.c (gen_type): Likewise. Deal with `restrict'.
* c-decl.c (flag_isoc9x): Define.
(c_decode_option): Handle -flang-isoc9x.
(grokdeclarator): Update to handle restrict. Use TYPE_QUALS,
c_build_qualified_type, etc. Use c_apply_type_quals_to_decl.
* c-lex.c (init_lex): Deal with restrict.
(init_lex): Don't treat restrict as a reserved word in
-traditional mode, or without -flang-isoc9x.
* c-lex.h (rid): Add RID_RESTRICT.
* c-parse.gperf (restrict, __restrict, __restrict__): Make
equivalent to RID_RESTRICT.
* c-parse.in (TYPE_QUAL): Update comment.
* c-common.c: Include rtl.h.
(c_find_base_decl): New function.
(c_build_type_variant): Rename, and modify, to become ...
(c_build_qualified_type): New function.
(c_apply_type_quals_to_decl): Likewise.
(c_get_alias_set): For INDIRECT_REFs, check to see if we can find
a particular alias set for the reference.
* toplev.c (documented_lang_options): Add -flang-isoc9x.
From-SVN: r23212
1998-10-21 05:53:40 -04:00
|
|
|
__restrict, TYPE_QUAL, RID_RESTRICT
|
|
|
|
__restrict__, TYPE_QUAL, RID_RESTRICT
|
1990-06-18 16:31:11 -04:00
|
|
|
__signed, TYPESPEC, RID_SIGNED
|
|
|
|
__signed__, TYPESPEC, RID_SIGNED
|
|
|
|
__typeof, TYPEOF, NORID
|
|
|
|
__typeof__, TYPEOF, NORID
|
|
|
|
__volatile, TYPE_QUAL, RID_VOLATILE
|
|
|
|
__volatile__, TYPE_QUAL, RID_VOLATILE
|
1992-03-19 13:32:44 -05:00
|
|
|
asm, ASM_KEYWORD, NORID
|
1990-06-18 16:31:11 -04:00
|
|
|
auto, SCSPEC, RID_AUTO
|
|
|
|
break, BREAK, NORID
|
1993-04-09 19:07:39 -04:00
|
|
|
bycopy, TYPE_QUAL, RID_BYCOPY
|
1998-10-08 07:28:08 -04:00
|
|
|
byref, TYPE_QUAL, RID_BYREF
|
1990-06-18 16:31:11 -04:00
|
|
|
case, CASE, NORID
|
|
|
|
char, TYPESPEC, RID_CHAR
|
|
|
|
const, TYPE_QUAL, RID_CONST
|
|
|
|
continue, CONTINUE, NORID
|
|
|
|
default, DEFAULT, NORID
|
|
|
|
do, DO, NORID
|
|
|
|
double, TYPESPEC, RID_DOUBLE
|
|
|
|
else, ELSE, NORID
|
|
|
|
enum, ENUM, NORID
|
|
|
|
extern, SCSPEC, RID_EXTERN
|
|
|
|
float, TYPESPEC, RID_FLOAT
|
|
|
|
for, FOR, NORID
|
|
|
|
goto, GOTO, NORID
|
1993-04-09 19:07:39 -04:00
|
|
|
id, OBJECTNAME, RID_ID
|
1990-06-18 16:31:11 -04:00
|
|
|
if, IF, NORID
|
1993-04-09 19:07:39 -04:00
|
|
|
in, TYPE_QUAL, RID_IN
|
|
|
|
inout, TYPE_QUAL, RID_INOUT
|
1990-06-18 16:31:11 -04:00
|
|
|
inline, SCSPEC, RID_INLINE
|
|
|
|
int, TYPESPEC, RID_INT
|
|
|
|
long, TYPESPEC, RID_LONG
|
1993-04-09 19:07:39 -04:00
|
|
|
oneway, TYPE_QUAL, RID_ONEWAY
|
|
|
|
out, TYPE_QUAL, RID_OUT
|
1990-06-18 16:31:11 -04:00
|
|
|
register, SCSPEC, RID_REGISTER
|
invoke.texi: Document -flang-isoc9x.
* invoke.texi: Document -flang-isoc9x.
* Makefile.in (OBJS): Add splay-tree.o.
(c-common.o): Depend on rtl.h.
(splay-tree.o): List dependencies and provide build rule.
* rtl.h (record_alias_subset): New function.
* alias.c: Include splay-tree.h.
(alias_set_entry): New type.
(CHECK_ALIAS_SETS_FOR_CONSISTENCY): Remove.
(DIFFERENT_ALIAS_SETS_P): Use mem_in_disjoint_alias_sets_p.
(mems_in_disjoin_alias_sets_p): New function.
(alias_set_compare): Likewise.
(insert_subset_children): Likewise.
(get_alias_set_entry): Likewise.
* tree.h (TYPE_RESTRICT): New macro.
(TYPE_UNQUALIFIED): New manifest constant.
(TYPE_QUAL_CONST): Likewise
(TYPE_QUAL_VOLATILE): Likewise.
(TYPE_QUAL_RESTRICT): Likewise.
(tree_type): Add restrict_flag. Reduce count of free bits.
(DECL_POINTER_ALIAS_SET): New macro.
(DECL_POINTER_ALIAS_SET_KNOWN_P): Likewise.
(tree_decl): Add pointer_alias_set.
(build_qualified_type): New function.
(build_type_variant): Define in terms of build_qualified_type.
* tree.c (set_type_quals): New function.
(make_node): Initializae DECL_POINTER_ALIAS_SET.
(build_type_attribute_variant): Use build_qualified_type and
set_type_quals.
(build_type_variant): Rename, and modify, to become...
(build_qualified_type): New function.
(build_complex_type): Use set_type_quals.
* c-tree.h (C_TYPE_OBJECT_P): New macro.
(C_TYPE_FUNCTION_P): Likewise.
(C_TYPE_INCOMPLETE_P): Likewise.
(C_TYPE_OBJECT_OR_INCOMPLETE_P): Likewise.
(c_apply_type_quals_to_decl): New function.
(c_build_qualified_type): New function.
(c_build_type_variant): Define in terms of c_build_qualified_type.
(flag_isoc9x): Declare.
* c-typeck.c (qualify_type): Use c_build_qualified_type.
(common_type): Change to use TYPE_QUALS.
(comptypes): Likewise.
(convert_for_assignment): Likewise.
* c-aux-info.c (gen_type): Likewise. Deal with `restrict'.
* c-decl.c (flag_isoc9x): Define.
(c_decode_option): Handle -flang-isoc9x.
(grokdeclarator): Update to handle restrict. Use TYPE_QUALS,
c_build_qualified_type, etc. Use c_apply_type_quals_to_decl.
* c-lex.c (init_lex): Deal with restrict.
(init_lex): Don't treat restrict as a reserved word in
-traditional mode, or without -flang-isoc9x.
* c-lex.h (rid): Add RID_RESTRICT.
* c-parse.gperf (restrict, __restrict, __restrict__): Make
equivalent to RID_RESTRICT.
* c-parse.in (TYPE_QUAL): Update comment.
* c-common.c: Include rtl.h.
(c_find_base_decl): New function.
(c_build_type_variant): Rename, and modify, to become ...
(c_build_qualified_type): New function.
(c_apply_type_quals_to_decl): Likewise.
(c_get_alias_set): For INDIRECT_REFs, check to see if we can find
a particular alias set for the reference.
* toplev.c (documented_lang_options): Add -flang-isoc9x.
From-SVN: r23212
1998-10-21 05:53:40 -04:00
|
|
|
restrict, TYPE_QUAL, RID_RESTRICT
|
1990-06-18 16:31:11 -04:00
|
|
|
return, RETURN, NORID
|
|
|
|
short, TYPESPEC, RID_SHORT
|
|
|
|
signed, TYPESPEC, RID_SIGNED
|
|
|
|
sizeof, SIZEOF, NORID
|
|
|
|
static, SCSPEC, RID_STATIC
|
|
|
|
struct, STRUCT, NORID
|
|
|
|
switch, SWITCH, NORID
|
|
|
|
typedef, SCSPEC, RID_TYPEDEF
|
|
|
|
typeof, TYPEOF, NORID
|
|
|
|
union, UNION, NORID
|
|
|
|
unsigned, TYPESPEC, RID_UNSIGNED
|
|
|
|
void, TYPESPEC, RID_VOID
|
|
|
|
volatile, TYPE_QUAL, RID_VOLATILE
|
|
|
|
while, WHILE, NORID
|