Commit 566c6181 by Zack Weinberg

c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for the…

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
parent 17c2c775
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> 2006-12-09 Jan Hubicka <jh@suse.cz>
* cgraph.c: Update copyright. * cgraph.c: Update copyright.
......
...@@ -1163,14 +1163,26 @@ c_common_parse_file (int set_yydebug) ...@@ -1163,14 +1163,26 @@ c_common_parse_file (int set_yydebug)
{ {
unsigned int i; 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) if (set_yydebug)
warning (0, "YYDEBUG was not defined at build time, -dy ignored"); switch (c_language)
#endif {
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; i = 0;
for (;;) for (;;)
......
...@@ -59,10 +59,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -59,10 +59,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#include "cgraph.h" #include "cgraph.h"
/* Miscellaneous data and functions needed for the parser. */
int yydebug;
/* Objective-C specific parser/lexer information. */ /* Objective-C specific parser/lexer information. */
static int objc_pq_context = 0; static int objc_pq_context = 0;
...@@ -200,26 +196,6 @@ static const struct resword reswords[] = ...@@ -200,26 +196,6 @@ static const struct resword reswords[] =
}; };
#define N_reswords (sizeof reswords / sizeof (struct resword)) #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. */ /* Initialization routine for this file. */
void void
......
...@@ -49,9 +49,26 @@ typedef enum pragma_kind { ...@@ -49,9 +49,26 @@ typedef enum pragma_kind {
PRAGMA_FIRST_EXTERNAL PRAGMA_FIRST_EXTERNAL
} pragma_kind; } pragma_kind;
/* Cause the `yydebug' variable to be defined. */
#define YYDEBUG 1 /* All clauses defined by OpenMP 2.5.
extern int yydebug; 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; extern struct cpp_reader* parse_in;
......
2006-12-09 Zack Weinberg <zackw@panix.com>
* parser.c (yydebug, enum pragma_omp_clause): Delete.
2006-12-07 Mark Mitchell <mark@codesourcery.com> 2006-12-07 Mark Mitchell <mark@codesourcery.com>
PR c++/29732 PR c++/29732
......
...@@ -18073,25 +18073,6 @@ cp_parser_objc_statement (cp_parser * parser) { ...@@ -18073,25 +18073,6 @@ cp_parser_objc_statement (cp_parser * parser) {
/* OpenMP 2.5 parsing routines. */ /* 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. /* Returns name of the next clause.
If the clause is not recognized PRAGMA_OMP_CLAUSE_NONE is returned and If the clause is not recognized PRAGMA_OMP_CLAUSE_NONE is returned and
the token is not consumed. Otherwise appropriate pragma_omp_clause is the token is not consumed. Otherwise appropriate pragma_omp_clause is
...@@ -19441,8 +19422,4 @@ c_parse_file (void) ...@@ -19441,8 +19422,4 @@ c_parse_file (void)
the_parser = NULL; the_parser = NULL;
} }
/* This variable must be provided by every front end. */
int yydebug;
#include "gt-cp-parser.h" #include "gt-cp-parser.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment