aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-11-20 16:13:47 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-11-20 16:13:47 +0000
commit447306fa90a0acc3c8255daae74427e01374d14f (patch)
tree9ece9daeef3840fc2030973735bdec2731f9bfb4 /gcc/cp
parent462ef1e15017f170e71a73d8b76ae587974e3b9d (diff)
downloadgcc-447306fa90a0acc3c8255daae74427e01374d14f.zip
gcc-447306fa90a0acc3c8255daae74427e01374d14f.tar.gz
gcc-447306fa90a0acc3c8255daae74427e01374d14f.tar.bz2
lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
cp: * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword. * parse.y (extdef): Add EXPORT reduction. * spew.c (yylex): Don't skip export here. testsuite: * g++.old-deja/g++.pt/export1.C: New test. From-SVN: r37585
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/lex.c2
-rw-r--r--gcc/cp/parse.y7
-rw-r--r--gcc/cp/spew.c11
4 files changed, 13 insertions, 13 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7886ddc..3e6af41 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
+ * parse.y (extdef): Add EXPORT reduction.
+ * spew.c (yylex): Don't skip export here.
+
2000-11-19 Mark Mitchell <mark@codesourcery.com>
* decl.c (init_decl_processing): Correct name of pure virtual
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index df5dc94..b0553e0 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -544,7 +544,7 @@ const short rid_to_yy[RID_MAX] =
/* RID_FRIEND */ SCSPEC,
/* RID_VIRTUAL */ SCSPEC,
/* RID_EXPLICIT */ SCSPEC,
- /* RID_EXPORT */ SCSPEC,
+ /* RID_EXPORT */ EXPORT,
/* RID_MUTABLE */ SCSPEC,
/* ObjC */
diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y
index b8dff06..13c678b 100644
--- a/gcc/cp/parse.y
+++ b/gcc/cp/parse.y
@@ -278,7 +278,7 @@ cp_parse_init ()
%token NAMESPACE TYPENAME_KEYWORD USING
%token LEFT_RIGHT TEMPLATE
%token TYPEID DYNAMIC_CAST STATIC_CAST REINTERPRET_CAST CONST_CAST
-%token SCOPE
+%token SCOPE EXPORT
/* Define the operator tokens and their precedences.
The value is an integer because, if used, it is the tree code
@@ -485,6 +485,11 @@ extdef:
{ do_pending_inlines (); }
| datadef
{ do_pending_inlines (); }
+
+ | EXPORT
+ { cp_warning ("keyword `export' not implemented, and will be ignored"); }
+ template_def
+ { do_pending_inlines (); }
| template_def
{ do_pending_inlines (); }
| asm_keyword '(' string ')' ';'
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c
index 9e6b65b..0894993 100644
--- a/gcc/cp/spew.c
+++ b/gcc/cp/spew.c
@@ -803,17 +803,6 @@ yylex ()
consume_token ();
}
}
- /* If export, warn that it's unimplemented and go on. */
- else if (nth_token (0)->yylval.ttype == ridpointers[RID_EXPORT])
- {
- warning ("keyword 'export' not implemented and will be ignored");
-#ifdef SPEW_DEBUG
- if (spew_debug)
- debug_yychar (yychr);
-#endif
- consume_token ();
- goto retry;
- }
/* do_aggr needs to know if the previous token was `friend'. */
else if (nth_token (0)->yylval.ttype == ridpointers[RID_FRIEND])
after_friend = 1;