summaryrefslogtreecommitdiffstats
path: root/contrib/gcc
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2002-10-10 04:46:44 +0000
committerkan <kan@FreeBSD.org>2002-10-10 04:46:44 +0000
commit570c92f0241b01e273a00aa807c05663360fb6d3 (patch)
tree6db85f77688e666d529c50423ddf73862eb8445e /contrib/gcc
parent09f8d1030c3338edfdbcfb6963421d513ed5835b (diff)
downloadFreeBSD-src-570c92f0241b01e273a00aa807c05663360fb6d3.zip
FreeBSD-src-570c92f0241b01e273a00aa807c05663360fb6d3.tar.gz
Merge FreeBSD modifications into gcc 3.2.1-prerelease:
1.2 kernel printf enchancements framework 1.3 suppress warnings on K&R main Approved by: obrien
Diffstat (limited to 'contrib/gcc')
-rw-r--r--contrib/gcc/c-decl.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c
index a7c0510..9b149d8 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
OpenPOWER on IntegriCloud