Skip to content

Commit

Permalink
c-opts.c (c_common_parse_file): Unconditionally give a warning, suita…
Browse files Browse the repository at this point in the history
…ble 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
  • Loading branch information
Zack Weinberg committed Dec 10, 2006
1 parent 17c2c77 commit 566c618
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 169 deletions.
30 changes: 19 additions & 11 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
26 changes: 19 additions & 7 deletions gcc/c-opts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 (;;)
Expand Down
24 changes: 0 additions & 24 deletions gcc/c-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
23 changes: 20 additions & 3 deletions gcc/c-pragma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading

0 comments on commit 566c618

Please sign in to comment.