1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
Index: gcc/c-common.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-common.c,v
retrieving revision 1.393.2.5
diff -c -3 -p -r1.393.2.5 c-common.c
*** gcc/c-common.c 7 Jun 2003 22:13:24 -0000 1.393.2.5
--- gcc/c-common.c 5 Sep 2003 15:42:48 -0000
*************** int flag_permissive;
*** 568,573 ****
--- 568,582 ----
int flag_enforce_eh_specs = 1;
+ /* Filename for xml dump of translation unit. */
+
+ const char* flag_xml = 0;
+
+ /* Start locations for dump of translation unit. */
+
+ const char* flag_xml_start = 0;
+
+
/* The version of the C++ ABI in use. The following values are
allowed:
Index: gcc/c-common.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-common.h,v
retrieving revision 1.164
diff -c -3 -p -r1.164 c-common.h
*** gcc/c-common.h 1 Dec 2002 17:51:44 -0000 1.164
--- gcc/c-common.h 5 Sep 2003 15:42:50 -0000
*************** extern int flag_permissive;
*** 732,737 ****
--- 732,745 ----
extern int flag_enforce_eh_specs;
+ /* Filename for xml dump of translation unit. */
+
+ extern const char* flag_xml;
+
+ /* Start locations for dump of translation unit. */
+
+ extern const char* flag_xml_start;
+
/* The version of the C++ ABI in use. The following values are
allowed:
Index: gcc/c-opts.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-opts.c,v
retrieving revision 1.24.6.3
diff -c -3 -p -r1.24.6.3 c-opts.c
*** gcc/c-opts.c 12 Jun 2003 11:58:31 -0000 1.24.6.3
--- gcc/c-opts.c 5 Sep 2003 15:42:52 -0000
*************** static void sanitize_cpp_opts PARAMS ((v
*** 253,258 ****
--- 253,260 ----
OPT("fvtable-gc", CL_CXX, OPT_fvtable_gc) \
OPT("fvtable-thunks", CL_CXX, OPT_fvtable_thunks) \
OPT("fweak", CL_CXX, OPT_fweak) \
+ OPT("fxml-start=", CL_CXX | CL_JOINED, OPT_fxml_start) \
+ OPT("fxml=", CL_CXX | CL_JOINED, OPT_fxml) \
OPT("fxref", CL_CXX, OPT_fxref) \
OPT("gen-decls", CL_OBJC, OPT_gen_decls) \
OPT("lang-asm", CL_C_ONLY, OPT_lang_asm) \
*************** c_common_decode_option (argc, argv)
*** 1124,1129 ****
--- 1126,1145 ----
case OPT_fenforce_eh_specs:
flag_enforce_eh_specs = on;
+ break;
+
+ case OPT_fxml:
+ if (*arg == '\0')
+ error ("no file specified with -fxml");
+ else
+ flag_xml = arg;
+ break;
+
+ case OPT_fxml_start:
+ if (*arg == '\0')
+ error ("no file specified with -fxml-start");
+ else
+ flag_xml_start = arg;
break;
case OPT_fexternal_templates:
Index: gcc/cp/Make-lang.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/Make-lang.in,v
retrieving revision 1.125.4.6
diff -c -3 -p -r1.125.4.6 Make-lang.in
*** gcc/cp/Make-lang.in 23 Jun 2003 20:31:53 -0000 1.125.4.6
--- gcc/cp/Make-lang.in 5 Sep 2003 15:42:56 -0000
*************** CXX_OBJS = cp/call.o cp/decl.o cp/expr.o
*** 86,92 ****
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
! cp/optimize.o cp/mangle.o cp/cp-lang.o
# Use loose warnings for this front end.
cp-warn =
--- 86,92 ----
cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o \
cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o \
cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o \
! cp/optimize.o cp/mangle.o cp/cp-lang.o cp/xml.o
# Use loose warnings for this front end.
cp-warn =
*************** cp/dump.o: cp/dump.c $(CXX_TREE_H) tree-
*** 276,281 ****
--- 276,282 ----
cp/optimize.o: cp/optimize.c $(CXX_TREE_H) rtl.h integrate.h insn-config.h \
input.h $(PARAMS_H) debug.h tree-inline.h
cp/mangle.o: cp/mangle.c $(CXX_TREE_H) toplev.h real.h gt-cp-mangle.h $(TM_P_H)
+ cp/xml.o: cp/xml.c $(CXX_TREE_H) toplev.h
cp/parse.o: cp/parse.c $(CXX_TREE_H) flags.h cp/lex.h except.h output.h \
cp/decl.h $(SYSTEM_H) toplev.h $(GGC_H) gt-cp-parse.h
Index: gcc/cp/cp-tree.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.776.2.30
diff -c -3 -p -r1.776.2.30 cp-tree.h
*** gcc/cp/cp-tree.h 25 Jul 2003 00:30:59 -0000 1.776.2.30
--- gcc/cp/cp-tree.h 5 Sep 2003 15:43:06 -0000
*************** extern int walk_namespaces
*** 3845,3850 ****
--- 3845,3851 ----
void *));
extern int wrapup_globals_for_namespace PARAMS ((tree, void *));
extern tree cp_namespace_decls PARAMS ((tree));
+ extern tree cp_namespace_namespaces PARAMS ((tree));
extern tree create_implicit_typedef PARAMS ((tree, tree));
extern tree maybe_push_decl PARAMS ((tree));
extern tree build_target_expr_with_type PARAMS ((tree, tree));
*************** extern tree mangle_ref_init_variable
*** 4484,4489 ****
--- 4485,4506 ----
/* in dump.c */
extern int cp_dump_tree PARAMS ((void *, tree));
+
+ /* Filename for xml dump of translation unit. */
+ extern const char* flag_xml;
+
+ /* Start locations for dump of translation unit. */
+ extern const char* flag_xml_start;
+
+ /* Tell xml.c what version of GCC is being built. Format is 0xMMmmpp,
+ where MM is the major version number, mm is the minor version
+ number, and pp is the patch level.
+ Examples: gcc 3.0.4 = 0x030004
+ gcc 3.2.0 = 0x030200 */
+ #define GCC_XML_GCC_VERSION 0x030301
+
+ /* in xml.c */
+ extern void do_xml_output PARAMS ((const char *));
/* -- end of C++ */
Index: gcc/cp/decl.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.965.2.58
diff -c -3 -p -r1.965.2.58 decl.c
*** gcc/cp/decl.c 25 Jul 2003 00:31:00 -0000 1.965.2.58
--- gcc/cp/decl.c 5 Sep 2003 15:43:20 -0000
*************** cp_namespace_decls (ns)
*** 2020,2025 ****
--- 2020,2033 ----
return NAMESPACE_LEVEL (ns)->names;
}
+ /* Return the namespace declarations that are members of the namespace NS. */
+ tree
+ cp_namespace_namespaces (ns)
+ tree ns;
+ {
+ return NAMESPACE_LEVEL (ns)->namespaces;
+ }
+
struct walk_globals_data {
walk_globals_pred p;
walk_globals_fn f;
Index: gcc/cp/lang-options.h
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/Attic/lang-options.h,v
retrieving revision 1.43.38.1
diff -c -3 -p -r1.43.38.1 lang-options.h
*** gcc/cp/lang-options.h 29 Apr 2003 14:31:52 -0000 1.43.38.1
--- gcc/cp/lang-options.h 5 Sep 2003 15:43:20 -0000
*************** DEFINE_LANG_NAME ("C++")
*** 117,122 ****
--- 117,126 ----
{ "-fxref",
N_("Emit cross referencing information") },
{ "-fno-xref", "" },
+ { "-fxml=",
+ N_("Enable XML output to a file (use with -fsyntax-only)") },
+ { "-fno-xml", "" },
+ { "-fxml-start=", "Specify start locations for XML dump (use with -fxml)" },
{ "-Wreturn-type",
N_("Warn about inconsistent return types") },
Index: gcc/cp/semantics.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/cp/semantics.c,v
retrieving revision 1.282.4.6
diff -c -3 -p -r1.282.4.6 semantics.c
*** gcc/cp/semantics.c 6 Jul 2003 22:02:17 -0000 1.282.4.6
--- gcc/cp/semantics.c 5 Sep 2003 15:43:21 -0000
*************** finish_translation_unit ()
*** 1598,1603 ****
--- 1598,1607 ----
finish_fname_decls ();
finish_file ();
+
+ /* Do XML output if enabled. */
+ if (flag_xml)
+ do_xml_output (flag_xml);
}
/* Finish a template type parameter, specified as AGGR IDENTIFIER.
|