summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-10 04:29:45 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2000-11-10 04:29:45 +0000
commitc25509f2935768c84f5a12ac00dc6d8f7fa69a30 (patch)
tree6fdac42a5241d2f4e1527d266faf70cae27bb05d /gcc/c-decl.c
parent5d894556f49d8855376f48fa2d23f5e00b878206 (diff)
downloadgcc-c25509f2935768c84f5a12ac00dc6d8f7fa69a30.tar.gz
* Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.
(c-dump.o): New target. * c-common.h (flag_dump_translation_unit): New variable. (C_TYPE_QUALS): New macro. (strip_array_types): New function. (DECL_C_BIT_FIELD): New macro. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (dump_info_p): New typedef. (dump_tree_fn): Likewise. (lang_dump_tree): New variable. (dump_node_to_file): New function. * c-common.c (flag_dump_translation_unit): Define it. (strip_array_types): New function. * c-decl.c (c_decode_option): Handle -fdump-translation-unit. * c-lang.c (finish_file): Call dump_node_to_file if flag_dump_translation_unit. * c-semantics.c (mark_rtl_for_local_static): Fix typo in comment. * c-tree.h (DECL_C_BIT_FIELD): Remove declaration. * c-dump.c: New file. * Make-lang.in (CXX_C_OBJS): Add c-dump.o. (dump.o): Update dependency list. * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. (flag_dump_translation_unit): Likewise. (CP_TYPE_QUALS): Adjust definition. (DECL_C_BIT_FIELD): Remove. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (add_maybe_template): Likewise. (strip_array_types): Likewise. (dump_node_to_file): Likewise. (cp_dump_tree): New function. * decl.c (init_decl_processing): Set lang_dump_tree. * decl2.c (flag_dump_translation_unit): Remove. * dump.c: Move most of it to ../c-dump.c. (cp_dump_tree): New function. * pt.c (add_maybe_template): Remove. * typeck.c (strip_array_types): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37358 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index c1093ceecb9..45dbb2c4d83 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -510,6 +510,7 @@ c_decode_option (argc, argv)
char **argv;
{
int strings_processed;
+ const char *option_value = NULL;
char *p = argv[0];
#if USE_CPPLIB
strings_processed = cpp_handle_option (&parse_in, argc, argv);
@@ -667,6 +668,14 @@ c_decode_option (argc, argv)
flag_no_builtin = 0;
else if (!strcmp (p, "-fno-builtin"))
flag_no_builtin = 1;
+ else if ((option_value
+ = skip_leading_substring (p, "-fdump-translation-unit-")))
+ {
+ if (p[22] == '\0')
+ error ("no file specified with -fdump-translation-unit");
+ else
+ flag_dump_translation_unit = option_value;
+ }
else if (!strcmp (p, "-ansi"))
goto iso_1990;
else if (!strcmp (p, "-Werror-implicit-function-declaration"))
@@ -5464,7 +5473,8 @@ finish_struct (t, fieldlist, attributes)
"`%s' is narrower than values of its type");
DECL_SIZE (x) = bitsize_int (width);
- DECL_BIT_FIELD (x) = DECL_C_BIT_FIELD (x) = 1;
+ DECL_BIT_FIELD (x) = 1;
+ SET_DECL_C_BIT_FIELD (x);
if (width == 0)
{