diff options
-rw-r--r-- | gcc/c-decl.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 34fca5d..74ac13a 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -30,9 +30,11 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include "system.h" #include "tree.h" +#include "rtl.h" #include "flags.h" #include "function.h" #include "output.h" +#include "expr.h" #include "c-tree.h" #include "c-lex.h" #include "toplev.h" @@ -3012,13 +3014,19 @@ init_decl_processing () array type. */ char_array_type_node = build_array_type (char_type_node, array_domain_type); + /* Likewise for arrays of ints. */ int_array_type_node = build_array_type (integer_type_node, array_domain_type); + /* This is for wide string constants. */ wchar_array_type_node = build_array_type (wchar_type_node, array_domain_type); + record_component_aliases (char_array_type_node); + record_component_aliases (int_array_type_node); + record_component_aliases (wchar_array_type_node); + void_list_node = tree_cons (NULL_TREE, void_type_node, NULL_TREE); default_function_type @@ -4399,6 +4407,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) type = build_array_type (type, itype); if (type_quals) type = c_build_qualified_type (type, type_quals); + record_component_aliases (type); #if 0 /* don't clear these; leave them set so that the array type or the variable is itself const or volatile. */ @@ -4571,6 +4580,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) && TREE_CODE (type) == ARRAY_TYPE && TYPE_DOMAIN (type) == 0) { type = build_array_type (TREE_TYPE (type), 0); + record_component_aliases (type); if (size_varies) C_TYPE_VARIABLE_SIZE (type) = 1; } @@ -4683,11 +4693,13 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) type = build_array_type (c_build_qualified_type (TREE_TYPE (type), type_quals), TYPE_DOMAIN (type)); + record_component_aliases (type); #if 0 /* Leave the field const or volatile as well. */ type_quals = TYPE_UNQUALIFIED; #endif } decl = build_decl (FIELD_DECL, declarator, type); + TREE_ADDRESSABLE (decl) = ! bitfield; if (size_varies) C_DECL_VARIABLE_SIZE (decl) = 1; } @@ -4763,6 +4775,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized) type = build_array_type (c_build_qualified_type (TREE_TYPE (type), type_quals), TYPE_DOMAIN (type)); + record_component_aliases (type); #if 0 /* Leave the variable const or volatile as well. */ type_quals = TYPE_UNQUALIFIED; #endif |