c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for the language, if set_yydebug is true.

* c-opts.c (c_common_parse_file): Unconditionally give a warning,
	suitable for the language, if set_yydebug is true.
	* c-pragma.h: Define enum pragma_omp_clause here.  Don't define
	YYDEBUG or declare yydebug.
	* c-parser.c (yydebug, enum pragma_omp_clause): Delete.
	* cp/parser.c: Likewise.

From-SVN: r119704
This commit is contained in:
Zack Weinberg 2006-12-10 05:09:29 +00:00
parent 17c2c77545
commit 566c6181e6
6 changed files with 163 additions and 169 deletions

View File

@ -1,3 +1,11 @@
2006-12-09 Zack Weinberg <zackw@panix.com>
* c-opts.c (c_common_parse_file): Unconditionally give a warning,
suitable for the language, if set_yydebug is true.
* c-pragma.h: Define enum pragma_omp_clause here. Don't define
YYDEBUG or declare yydebug.
* c-parser.c (yydebug, enum pragma_omp_clause): Delete.
2006-12-09 Jan Hubicka <jh@suse.cz>
* cgraph.c: Update copyright.

View File

@ -1163,14 +1163,26 @@ c_common_parse_file (int set_yydebug)
{
unsigned int i;
/* Enable parser debugging, if requested and we can. If requested
and we can't, notify the user. */
#if YYDEBUG != 0
yydebug = set_yydebug;
#else
if (set_yydebug)
warning (0, "YYDEBUG was not defined at build time, -dy ignored");
#endif
switch (c_language)
{
case clk_c:
warning(0, "The C parser does not support -dy, option ignored");
break;
case clk_objc:
warning(0,
"The Objective-C parser does not support -dy, option ignored");
break;
case clk_cxx:
warning(0, "The C++ parser does not support -dy, option ignored");
break;
case clk_objcxx:
warning(0,
"The Objective-C++ parser does not support -dy, option ignored");
break;
default:
gcc_unreachable ();
}
i = 0;
for (;;)

View File

@ -59,10 +59,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "cgraph.h"
/* Miscellaneous data and functions needed for the parser. */
int yydebug;
/* Objective-C specific parser/lexer information. */
static int objc_pq_context = 0;
@ -200,26 +196,6 @@ static const struct resword reswords[] =
};
#define N_reswords (sizeof reswords / sizeof (struct resword))
/* All OpenMP clauses. OpenMP 2.5. */
typedef enum pragma_omp_clause {
PRAGMA_OMP_CLAUSE_NONE = 0,
PRAGMA_OMP_CLAUSE_COPYIN,
PRAGMA_OMP_CLAUSE_COPYPRIVATE,
PRAGMA_OMP_CLAUSE_DEFAULT,
PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
PRAGMA_OMP_CLAUSE_IF,
PRAGMA_OMP_CLAUSE_LASTPRIVATE,
PRAGMA_OMP_CLAUSE_NOWAIT,
PRAGMA_OMP_CLAUSE_NUM_THREADS,
PRAGMA_OMP_CLAUSE_ORDERED,
PRAGMA_OMP_CLAUSE_PRIVATE,
PRAGMA_OMP_CLAUSE_REDUCTION,
PRAGMA_OMP_CLAUSE_SCHEDULE,
PRAGMA_OMP_CLAUSE_SHARED
} pragma_omp_clause;
/* Initialization routine for this file. */
void

View File

@ -49,9 +49,26 @@ typedef enum pragma_kind {
PRAGMA_FIRST_EXTERNAL
} pragma_kind;
/* Cause the `yydebug' variable to be defined. */
#define YYDEBUG 1
extern int yydebug;
/* All clauses defined by OpenMP 2.5.
Used internally by both C and C++ parsers. */
typedef enum pragma_omp_clause {
PRAGMA_OMP_CLAUSE_NONE = 0,
PRAGMA_OMP_CLAUSE_COPYIN,
PRAGMA_OMP_CLAUSE_COPYPRIVATE,
PRAGMA_OMP_CLAUSE_DEFAULT,
PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
PRAGMA_OMP_CLAUSE_IF,
PRAGMA_OMP_CLAUSE_LASTPRIVATE,
PRAGMA_OMP_CLAUSE_NOWAIT,
PRAGMA_OMP_CLAUSE_NUM_THREADS,
PRAGMA_OMP_CLAUSE_ORDERED,
PRAGMA_OMP_CLAUSE_PRIVATE,
PRAGMA_OMP_CLAUSE_REDUCTION,
PRAGMA_OMP_CLAUSE_SCHEDULE,
PRAGMA_OMP_CLAUSE_SHARED
} pragma_omp_clause;
extern struct cpp_reader* parse_in;

View File

@ -1,3 +1,7 @@
2006-12-09 Zack Weinberg <zackw@panix.com>
* parser.c (yydebug, enum pragma_omp_clause): Delete.
2006-12-07 Mark Mitchell <mark@codesourcery.com>
PR c++/29732

View File

@ -18073,25 +18073,6 @@ cp_parser_objc_statement (cp_parser * parser) {
/* OpenMP 2.5 parsing routines. */
/* All OpenMP clauses. OpenMP 2.5. */
typedef enum pragma_omp_clause {
PRAGMA_OMP_CLAUSE_NONE = 0,
PRAGMA_OMP_CLAUSE_COPYIN,
PRAGMA_OMP_CLAUSE_COPYPRIVATE,
PRAGMA_OMP_CLAUSE_DEFAULT,
PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
PRAGMA_OMP_CLAUSE_IF,
PRAGMA_OMP_CLAUSE_LASTPRIVATE,
PRAGMA_OMP_CLAUSE_NOWAIT,
PRAGMA_OMP_CLAUSE_NUM_THREADS,
PRAGMA_OMP_CLAUSE_ORDERED,
PRAGMA_OMP_CLAUSE_PRIVATE,
PRAGMA_OMP_CLAUSE_REDUCTION,
PRAGMA_OMP_CLAUSE_SCHEDULE,
PRAGMA_OMP_CLAUSE_SHARED
} pragma_omp_clause;
/* Returns name of the next clause.
If the clause is not recognized PRAGMA_OMP_CLAUSE_NONE is returned and
the token is not consumed. Otherwise appropriate pragma_omp_clause is
@ -19441,8 +19422,4 @@ c_parse_file (void)
the_parser = NULL;
}
/* This variable must be provided by every front end. */
int yydebug;
#include "gt-cp-parser.h"