diff options
author | Joseph Myers <jsm@polyomino.org.uk> | 2004-03-28 00:31:41 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2004-03-28 00:31:41 +0000 |
commit | 5baeaac0676b282f9ac9815f245e60e1d2f9b31f (patch) | |
tree | 3acc8edeeba4106c03dff66761ed088a39992358 /gcc/c-tree.h | |
parent | 4c24abdce41dacb7cceffefa2bc2fd5edea24c43 (diff) | |
download | gcc-5baeaac0676b282f9ac9815f245e60e1d2f9b31f.zip gcc-5baeaac0676b282f9ac9815f245e60e1d2f9b31f.tar.gz gcc-5baeaac0676b282f9ac9815f245e60e1d2f9b31f.tar.bz2 |
c-tree.h (C_DECL_REGISTER): New.
* c-tree.h (C_DECL_REGISTER): New.
* c-aux-info.c (gen_decl), c-decl.c (objc_mark_locals_volatile,
finish_decl, grokdeclarator, get_parm_info), c-typeck.c
(build_array_ref, c_mark_addressable): Set and use it.
* c-decl.c (grokdeclarator), c-typeck.c (c_mark_addressable):
Allow structures with volatile fields to be declared register.
Don't check TREE_ADDRESSABLE before warning about taking address
of register.
* c-decl.c (finish_decl): Don't allow structures with volatile
fields to be placed in named register.
* doc/trouble.texi: Remove reference to structures with volatile
fields in registers.
testsuite:
* gcc.dg/940409-1.c: Remove XFAIL.
* gcc.dg/reg-vol-struct-1.c: New test.
From-SVN: r80037
Diffstat (limited to 'gcc/c-tree.h')
-rw-r--r-- | gcc/c-tree.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/c-tree.h b/gcc/c-tree.h index bd53dbc..eb167ca 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -115,6 +115,11 @@ struct lang_type GTY(()) been declared. */ #define C_DECL_DECLARED_BUILTIN(EXP) DECL_LANG_FLAG_4 (EXP) +/* Record whether a decl was declared register. This is strictly a + front-end flag, whereas DECL_REGISTER is used for code generation; + they may differ for structures with volatile fields. */ +#define C_DECL_REGISTER(EXP) DECL_LANG_FLAG_5 (EXP) + /* Nonzero for a decl which either doesn't exist or isn't a prototype. N.B. Could be simplified if all built-in decls had complete prototypes (but this is presently difficult because some of them need FILE*). */ |