diff options
| author | Alexander Kabaev <kan@FreeBSD.org> | 2002-10-10 04:46:44 +0000 |
|---|---|---|
| committer | Alexander Kabaev <kan@FreeBSD.org> | 2002-10-10 04:46:44 +0000 |
| commit | 819fe3892d227fe0c815ba6504b1453fa28e2693 (patch) | |
| tree | 6db85f77688e666d529c50423ddf73862eb8445e | |
| parent | 2402dbd2276b3c950cf73e4ea1d5cc0114aa8347 (diff) | |
Notes
| -rw-r--r-- | contrib/gcc/c-decl.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index a7c051047fa9..9b149d881551 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -3518,15 +3518,9 @@ start_decl (declarator, declspecs, initialized, attributes) switch (TREE_CODE (decl)) { case TYPE_DECL: - /* typedef foo = bar means give foo the same type as bar. - We haven't parsed bar yet, so `finish_decl' will fix that up. - Any other case of an initialization in a TYPE_DECL is an error. */ - if (pedantic || list_length (declspecs) > 1) - { - error ("typedef `%s' is initialized", - IDENTIFIER_POINTER (DECL_NAME (decl))); - initialized = 0; - } + error ("typedef `%s' is initialized", + IDENTIFIER_POINTER (DECL_NAME (decl))); + initialized = 0; break; case FUNCTION_DECL: @@ -3675,16 +3669,7 @@ finish_decl (decl, init, asmspec_tree) init = 0; if (init) - { - if (TREE_CODE (decl) != TYPE_DECL) - store_init_value (decl, init); - else - { - /* typedef foo = bar; store the type of bar as the type of foo. */ - TREE_TYPE (decl) = TREE_TYPE (init); - DECL_INITIAL (decl) = init = 0; - } - } + store_init_value (decl, init); /* Deduce size of array from initialization, if not already known */ if (TREE_CODE (type) == ARRAY_TYPE |
