diff options
author | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 1999-10-16 06:09:09 +0000 |
commit | cae8fa8120c70195f34a2456f18c4c848a2d3e0c (patch) | |
tree | f7d3a3ab9c32694206552e767626366f016f2062 /contrib/gcc/cp/spew.c | |
parent | 84656b55b6e25e30322dc903a05de53706361d3d (diff) | |
download | FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.zip FreeBSD-src-cae8fa8120c70195f34a2456f18c4c848a2d3e0c.tar.gz |
Virgin import of the GCC 2.95.1 compilers
Diffstat (limited to 'contrib/gcc/cp/spew.c')
-rw-r--r-- | contrib/gcc/cp/spew.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/contrib/gcc/cp/spew.c b/contrib/gcc/cp/spew.c index f153150..a573cba 100644 --- a/contrib/gcc/cp/spew.c +++ b/contrib/gcc/cp/spew.c @@ -1,5 +1,5 @@ /* Type Analyzer for GNU C++. - Copyright (C) 1987, 89, 92, 93, 94, 1995 Free Software Foundation, Inc. + Copyright (C) 1987, 89, 92-97, 1998 Free Software Foundation, Inc. Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com) This file is part of GNU CC. @@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */ #include "parse.h" #include "flags.h" #include "obstack.h" +#include "toplev.h" /* This takes a token stream that hasn't decided much about types and tries to figure out as much as it can, with excessive lookahead and @@ -47,7 +48,7 @@ struct token { static int do_aggr PROTO((void)); static int probe_obstack PROTO((struct obstack *, tree, unsigned int)); -static void scan_tokens PROTO((int)); +static void scan_tokens PROTO((unsigned int)); #ifdef SPEW_DEBUG static int num_tokens PROTO((void)); @@ -155,9 +156,9 @@ consume_token () static void scan_tokens (n) - int n; + unsigned int n; { - int i; + unsigned int i; struct token *tmp; /* We cannot read past certain tokens, so make sure we don't. */ @@ -244,7 +245,7 @@ int yylex () { struct token tmp_token; - tree trrr; + tree trrr = NULL_TREE; int old_looking_for_typename = 0; retry: @@ -360,6 +361,19 @@ yylex () break; case SCSPEC: + /* If export, warn that it's unimplemented and go on. */ + if (tmp_token.yylval.ttype == get_identifier("export")) + { + warning ("keyword 'export' not implemented and will be ignored"); + consume_token (); + goto retry; + } + else + { + ++first_token; + break; + } + case NEW: /* do_aggr needs to check if the previous token was RID_NEW, so just increment first_token instead of calling consume_token. */ |