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>
* cgraph.c: Update copyright.
......@@ -104,18 +112,18 @@
2006-12-08 Andrew MacLeod <amacleod@redhat.com>
* Makefile.in: Add new file tree-ssa-ter.c.
* tree-outof-ssa.c (struct temp_expr_table_d, new_temp_expr_table,
free_temp_expr_table, add_value_to_version_list,
add_value_to_partition_list, remove_value_from_partition_list,
add_dependence, check_replaceable, finish_expr, mark_replaceable,
kill_expr, kill_virtual_exprs, find_replaceable_in_bb,
* tree-outof-ssa.c (struct temp_expr_table_d, new_temp_expr_table,
free_temp_expr_table, add_value_to_version_list,
add_value_to_partition_list, remove_value_from_partition_list,
add_dependence, check_replaceable, finish_expr, mark_replaceable,
kill_expr, kill_virtual_exprs, find_replaceable_in_bb,
find_replaceable_exprs, dump_replaceable_exprs): Move to tree-ssa-ter.c.
* tree-ssa-live.h (find_replaceable_exprs, dump_replaceable_exprs): Add
prototypes.
* tree-ssa-ter.c: New file using code moved from tree-outof-ssa.c.
(struct value_expr_d): Remove.
(struct temp_expr_table_d): Rename fields, add explicit vector of
replaceable expressions instead of sharing. Change value_expr_p's to
replaceable expressions instead of sharing. Change value_expr_p's to
bitmap. Delete free_list.
(new_temp_expr_table): Rename fields, count number of ssa_names in
each partition.
......@@ -131,7 +139,7 @@
partition list, free the bitmap if it is empty.
(add_dependence): Use renamed field, cleanup. Don't add a dependence
on partitions with only one member.
(is_replaceable_p): New. Split out replaceability check from
(is_replaceable_p): New. Split out replaceability check from
check_replaceable.
(process_replaceable): New. Code split from check_replaceable.
(check_replaceable): Removed.
......@@ -208,7 +216,7 @@
(struct gcc_target): Add record_gcc_switches and
record_gcc_switches_section fields.
* target-def.h (TARGET_ASM_RECORD_GCC_SWITCHES): Provide a
default definition.
default definition.
(TARGET_ASM_RECORD_GCC_SWITCHES_SECTION): Provide a default
definition.
* toplev.c (print_single_switch): Simplify by providing a
......@@ -218,9 +226,9 @@
(print_to_asm_out_file): New function.
(print_to_stderr): New function.
(init_asm_output): If flag_record_gcc_switches is set then if
the target supports recording the switches then emit them into
the assembler output file, otherwise tell the user that the
switch is not supported.
the target supports recording the switches then emit them into
the assembler output file, otherwise tell the user that the
switch is not supported.
* varasm.c (eld_record_gcc_switches): New function. Example
handler for the record_gcc_switches target hook.
* doc/tm.texi (TARGET_ASM_RECORD_GCC_SWITCHES): Document the new
......
......@@ -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 (;;)
......
......@@ -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
......
......@@ -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;
......
......@@ -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"
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