aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/parse.y')
-rw-r--r--gcc/cp/parse.y13
1 files changed, 4 insertions, 9 deletions
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index 9f37a7e..73eec6a 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -98,10 +98,6 @@ do { \
error message if the user supplies an empty conditional expression. */
static const char *cond_stmt_keyword;
-/* Nonzero if we have an `extern "C"' acting as an extern specifier. */
-int have_extern_spec;
-int used_extern_spec;
-
/* List of types and structure classes of the current declaration. */
static GTY(()) tree current_declspecs;
@@ -163,7 +159,7 @@ frob_specs (specs_attrs, lookups)
if (current_declspecs
&& TREE_CODE (current_declspecs) != TREE_LIST)
current_declspecs = build_tree_list (NULL_TREE, current_declspecs);
- if (have_extern_spec && !used_extern_spec)
+ if (have_extern_spec)
{
/* We have to indicate that there is an "extern", but that it
was part of a language specifier. For instance,
@@ -174,7 +170,7 @@ frob_specs (specs_attrs, lookups)
current_declspecs = tree_cons (error_mark_node,
get_identifier ("extern"),
current_declspecs);
- used_extern_spec = 1;
+ have_extern_spec = false;
}
}
@@ -510,12 +506,11 @@ extdefs_opt:
;
.hush_warning:
- { have_extern_spec = 1;
- used_extern_spec = 0;
+ { have_extern_spec = true;
$<ttype>$ = NULL_TREE; }
;
.warning_ok:
- { have_extern_spec = 0; }
+ { have_extern_spec = false; }
;
extension: