aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-08-25 00:58:27 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-08-25 00:58:27 +0000
commit83bab8db08a04afe820ffd6b159a0de852ef0ae0 (patch)
treedb5daa1309969dcd75e507b485cbdcb1ec86be2a /gcc/c-decl.c
parentaee3c6b0389ecf8b01ee17fa25dc00b0666ee27c (diff)
downloadgcc-83bab8db08a04afe820ffd6b159a0de852ef0ae0.zip
gcc-83bab8db08a04afe820ffd6b159a0de852ef0ae0.tar.gz
gcc-83bab8db08a04afe820ffd6b159a0de852ef0ae0.tar.bz2
Makefile.in (C_AND_OBJC_OBJS): Remove c-iterate.o.
* Makefile.in (C_AND_OBJC_OBJS): Remove c-iterate.o. (c-iterate.o): Remove target. * gcc/c-common.h (enum rid): Remove RID_ITERATOR. * gcc/c-decl.c (init_decl_processing): Remove call to init_iterators. (finish_decl): Don't handle iterators. (grokdeclarator): Likewise. * gcc/c-parse.gperf: Remove __iterator and __iterator__ keywords. * gcc/c-gperf.h: Regenerated. * gcc/c-iterate.c: Removed. * gcc/c-lex.c (init_lex): Don't handle iterators. * gcc/c-parse.in (primary): Remove pop_iterator_stack call. (compstmt_primary_start): Remove push_iterator_stack call. (stmt): Don't allow iterator statements. Replace iterator_expand with expand_expr_stmt. (all_iter_stmt): Remove. (all_iter_stmt_simple): Likewise. (all_iter_stmt_with_decl): Likewise. * gcc/c-tree.h (ITERATOR_P): Remove. (ITERATOR_BOUND_P): Likewise. (init_iterators): Remove declaration. (iterator_expand): Likewise. (iterator_for_loop_start): Likewise. (iterator_for_loop_end): Likewise. (iterator_for_loop_record): Likewise. (push_iterator_stack): Likewise. (pop_iterator_stack): Likewise. * gcc/c-typeck.c (decl_constant_value): Don't check ITERATOR_P. (readonly_warning): Likewise. * gcc/tree.h (ITERATOR_BOUND_P): Don't mention it. * Make-lang.in (cc1chill): Don't depend on c-iterate.o. * gcc.dg/noncompile/930622-2.c: Adjust error message. From-SVN: r35967
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 59b238b..2e336f4 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3199,8 +3199,6 @@ init_decl_processing ()
/* Prepare to check format strings against argument lists. */
init_function_format_info ();
- init_iterators ();
-
incomplete_decl_finalize_hook = finish_incomplete_decl;
/* Record our roots. */
@@ -3580,14 +3578,6 @@ finish_decl (decl, init, asmspec_tree)
if (TREE_CODE (decl) == PARM_DECL)
init = 0;
- if (ITERATOR_P (decl))
- {
- if (init == 0)
- error_with_decl (decl, "iterator has no initial value");
- else
- init = save_expr (init);
- }
-
if (init)
{
if (TREE_CODE (decl) != TYPE_DECL)
@@ -4254,7 +4244,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
if (specbits & 1 << (int) RID_EXTERN) nclasses++;
if (specbits & 1 << (int) RID_REGISTER) nclasses++;
if (specbits & 1 << (int) RID_TYPEDEF) nclasses++;
- if (specbits & 1 << (int) RID_ITERATOR) nclasses++;
/* Warn about storage classes that are invalid for certain
kinds of declarations (parameters, typenames, etc.). */
@@ -4315,18 +4304,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
else if (current_binding_level == global_binding_level
&& specbits & (1 << (int) RID_AUTO))
error ("top-level declaration of `%s' specifies `auto'", name);
- else if ((specbits & 1 << (int) RID_ITERATOR)
- && TREE_CODE (declarator) != IDENTIFIER_NODE)
- {
- error ("iterator `%s' has derived type", name);
- type = error_mark_node;
- }
- else if ((specbits & 1 << (int) RID_ITERATOR)
- && TREE_CODE (type) != INTEGER_TYPE)
- {
- error ("iterator `%s' has noninteger type", name);
- type = error_mark_node;
- }
}
/* Now figure out the structure of the declarator proper.
@@ -4879,9 +4856,6 @@ grokdeclarator (declarator, declspecs, decl_context, initialized)
TREE_STATIC (decl) = (specbits & (1 << (int) RID_STATIC)) != 0;
TREE_PUBLIC (decl) = DECL_EXTERNAL (decl);
}
-
- if (specbits & 1 << (int) RID_ITERATOR)
- ITERATOR_P (decl) = 1;
}
/* Record `register' declaration for warnings on &