]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cp/ChangeLog
decl.c (lookup_name_real): Also do implicit typename thing for artificial TYPE_DECLs.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
CommitLineData
830fcda8
JM
11998-09-01 Jason Merrill <jason@yorick.cygnus.com>
2
3 * decl.c (lookup_name_real): Also do implicit typename thing for
4 artificial TYPE_DECLs.
5 * search.c (lookup_field): Likewise.
6 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
7 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
8 (enter_scope_of): Extract type from implicit typename.
9 (begin_class_definition): Likewise.
10 * lex.c (identifier_type): Handle implicit typename when checking
11 for SELFNAME.
12
13 * cp-tree.h: Declare flag_strict_prototype.
14 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
15 -fstrict-prototype.
16 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
17 specified, set it to the value of pedantic.
18
0c8bfdbc
MM
191998-09-01 Mark Mitchell <mark@markmitchell.com>
20
21 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
22
9360ac70
MM
231998-08-31 Mark Mitchell <mark@markmitchell.com>
24
25 * decl.c (finish_enum): Handle member enums of classes declared in
26 template functions.
27
28 * decl2.c (grok_x_components): Strip attributres before calling
29 groktypename.
30
84663f74
JM
311998-08-31 Jason Merrill <jason@yorick.cygnus.com>
32
33 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
34 -fenum-int-equivalence and -fno-nonnull-objects.
35 * class.c (check_for_override): Remove support for -fall-virtual.
36 (finish_struct_1): Likewise.
37 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
38 * typeck.c (build_binary_op_nodefault): Likewise.
39 * cvt.c (ocp_convert): Likewise.
40 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
41 * class.c (build_vbase_path): Likewise.
42
d62590d2
L
43Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
44
45 * Makefile.in (INTERFACE): New, set to 1.
46
8b5b8b7c
MM
471998-08-30 Mark Mitchell <mark@markmitchell.com>
48
0aa5b426
MM
49 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
50 comparing with global_namespace.
51 (dump_aggr_type): Likewise.
52
7e2421f7
MM
53 * decl.c (grokfndecl): Issue error on declaration of friend
54 templates with explicit template arguments.
55
8b5b8b7c
MM
56 * pt.c (convert_template_argument): New function, split out
57 from...
58 (coerce_template_parms): Here.
59 (tsubst): Attempt better error-recovery.
60
4e327c30
BK
611998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
62
63 * pt.c (decl_template_parm_p): Add checks for
64 TEMPLATE_TEMPLATE_PARM.
65
479781c5
MM
661998-08-28 Mark Mitchell <mark@markmitchell.com>
67
68 * lex.c (do_identifier): Fix thinko in previous change.
69
a1dd0d36
JM
701998-08-28 Jason Merrill <jason@yorick.cygnus.com>
71
72 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
73 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
74
751998-08-28 Richard Henderson <rth@cygnus.com>
76
77 Add support for discarding unused virtual functions.
78 * lang-options.h: Add -fvtable-gc.
79 * cp-tree.h: Add flag_vtable_gc.
80 * decl2.c (output_vtable_inherit): New fn.
81 (finish_vtable_vardecl): Call it.
82 * class.c (build_vtable_entry_ref): New fn.
83 (build_vtbl_ref): Call it.
84
ea6021e8
MM
851998-08-28 Mark Mitchell <mark@markmitchell.com>
86
079e1098
MM
87 * cp-tree.h (build_enumerator): Take the enumeration type as a
88 paramter.
89 * decl.c (finish_enum): Don't set the TREE_TYPE for the
90 enumeration constant values if we're processing_template_decls.
91 Don't set the type for the CONST_DECLs either; that's done in
84663f74 92 build_enumerator.
079e1098 93 (build_enumerator): Take the enumeration type as a
479781c5 94 parameter.
079e1098
MM
95 * lex.c (do_identifier): Don't resolve enumeration constants while
96 processing template declarations, even if they happen to be
97 TEMPLATE_PARM_INDEXs.
479781c5 98
079e1098
MM
99 * parse.y (current_enum_type): New variable.
100 (primary): Don't allow statement-expression in local classes just
101 as we don't in global classes.
102 (structsp): Use current_enum_type.
103 (enum_list): Likewise.
104 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
105 finish_enum; they no longer occur.
106
ea6021e8
MM
107 * cp-tree.h (finish_base_specifier): New function.
108 * parse.y (base_class): Use it.
109 * semantics.c (finish_base_specifier): Define it.
110
111 * parse.y (structsp): Warn on use of typename outside of template
112 declarations.
113
dfbcd65a
JM
1141998-08-27 Jason Merrill <jason@yorick.cygnus.com>
115
56ae6d77
JM
116 * lex.c (handle_cp_pragma): Remove #pragma vtable.
117 * lang-options.h: Remove +e options.
118 * decl2.c (lang_decode_option): Likewise.
119 (import_export_vtable): Don't check write_virtuals.
120 (finish_vtable_vardecl, finish_file): Likewise.
121 * search.c (dfs_debug_mark): Likewise.
122 * semantics.c (begin_class_definition): Likewise.
123 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
124
125 * call.c (build_over_call): Check flag_elide_constructors.
126 * decl2.c: flag_elide_constructors defaults to 1.
127 * typeck.c (convert_arguments): Remove return_loc parm.
128 (build_function_call_real): Adjust.
129
e907984f
JM
130 * search.c: Tear out all mi_matrix and memoize code.
131 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
132 * lang-options.h: Remove documentation for -fhandle-exceptions,
133 -fmemoize-lookups and -fsave-memoized.
134 * cp-tree.h: Lose mi_matrix and memoize support.
135 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
136 * class.c: Lose struct class_level.
137 (pushclass, popclass): Lose memoize support.
138 * init.c (build_offset_ref): Likewise.
139
dfbcd65a
JM
140 Never change BINFO_INHERITANCE_CHAIN.
141 * init.c (emit_base_init): Change modification of
142 BINFO_INHERITANCE_CHAIN to an assert.
143 * search.c (get_base_distance_recursive): Likewise.
144 (get_base_distance): Likewise.
145 (lookup_member): Likewise.
146 (convert_pointer_to_single_level): Likewise.
147 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
148 (lookup_fnfields): Likewise.
149 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
150 (unshare_base_binfos): Don't call propagate_binfo_offsets.
151 (layout_basetypes): Call propagate_binfo_offsets instead of
152 unshare_base_binfos.
153 * decl.c (xref_basetypes): Call unshare_base_binfos.
154 * pt.c (instantiate_class_template): Likewise.
155 * tree.c (reverse_path): Remove 'copy' parm; always make a
156 temporary copy.
157 * class.c (build_vbase_path): Just call it.
158 * search.c (compute_access): Likewise. Don't re-reverse.
159
ca107ded
MM
1601998-08-27 Mark Mitchell <mark@markmitchell.com>
161
162 * class.c (build_vbase_path): Use reverse_path.
163 (finish_base_struct): Move warnings for inaccessible bases to
164 layout_basetypes.
165 (modify_one_vtable): Remove check of TREE_USED (binfo).
166 (fixup_vtable_deltas1): Likewise.
167 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
168 (xref_tag): Remove binfos parameter.
169 (make_binfo): Remove chain parameter.
170 (reverse_path): Add copy parameter.
171 * decl.c (init_decl_processing): Change calls to xref_tag.
172 (xref_tag): Remove binfos parameter.
173 (xref_basetypes): Change calls to make_binfo.
174 * decl2.c (grok_x_components): Change calls to xref_tag.
175 (handle_class_head): Likewise.
176 * friend.c (do_friend): Likewise.
177 * lex.c (make_lang_type): Change calls to make_binfo.
178 * parse.y (structsp): Change calls to xref_tag.
179 (named_complex_class_head_sans_basetype): Likewise.
180 (named_class_head): Likewise.
181 * rtti.c (init_rtti_processing): Likewise.
182 * search.c (compute_access): Change calls to reverse_path.
183 (dfs_get_vbase_types): Change calls to make_binfo.
184 (get_vbase_types): Remove dead code.
185 * tree.c (unshare_base_binfos): Change calls to make_binfo.
186 (layout_basetypes): Warn here about inaccessible bases.
187 (make_binfo): Remove chain parameter.
188 (reverse_path): Add copy parameter.
189
0ec57017
JM
1901998-08-27 Jason Merrill <jason@yorick.cygnus.com>
191
8c1bd4f5
JM
192 * class.c: #if 0 complete_type_p.
193 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
194 * method.c (process_overload_item): Likewise.
195 * typeck.c (comp_target_types): Likewise.
196
0ec57017
JM
197 Stop sharing binfos for indirect virtual bases.
198 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
199 (layout_basetypes): Likewise.
200 (unshare_base_binfos): Copy vbases, too.
201 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
202 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
203 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
204 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
205 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
206 reference to BINFO_VIA_PUBLIC.
207 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
208 (push_class_decls): Use them.
209 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
210 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
211
e8bd800e
MM
2121998-08-27 Mark Mitchell <mark@markmitchell.com>
213
214 * decl.c (build_enumerator): Set DECL_CONTEXT for the
215 CONST_DECLs.
216
c0a483c7
MM
2171998-08-26 Mark Mitchell <mark@markmitchell.com>
218
dbfe2124
MM
219 * cp-tree.h (finish_enum): Change prototype.
220 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
221 VALUES parameter. Don't try to compute mins/maxs if
222 processing_template_decl.
223 * parse.y (structsp): Use new calling sequence for finish_enum.
224 * pt.c (tsubst_enum): Likewise. Take the new type as input.
225 (lookup_template_class): Remove unused variables. Tweak.
226 Register enums on instantiation list before substituting
227 enumeration constants.
228 (tsubst_decl): Remove unused variables.
229 (regenerate_decl_from_template): Likewise.
230
231 * decl.c (duplicate_decls): Don't obliterate the
232 DECL_TEMPLATE_INFO for a template if we're not replacing it with
233 anything.
234
c0a483c7
MM
235 * lex.c (do_identifier): Fix typo in comment.
236
789f983a
KG
237Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
238
239 * errfn.c: Remove stdarg.h/varargs.h.
240 * tree.c: Likewise.
241
8e710788
BK
2421998-08-25 Brendan Kehoe <brendan@cygnus.com>
243
244 * pt.c (tsubst_copy): Only do typename overloading on an
245 IDENTIFIER_NODE that happens to look like a typename if it actually
246 has a type for us to use.
247
a5d1cd09
JM
2481998-08-25 Jason Merrill <jason@yorick.cygnus.com>
249
250 * typeck.c (comp_cv_target_types): Split out...
251 (comp_target_types): From here. Don't allow cv-qual changes under
252 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
253 (build_ptrmemfunc): Pass 1 to nptrs.
254 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
255
b80c4d77
MM
2561998-08-25 Mark Mitchell <mark@markmitchell.com>
257
bca9e8f7
MM
258 * search.c (dependent_base_p): Don't compare a binfo to
259 current_class_type; use the TREE_TYPE of the binfo instead.
260
b80c4d77
MM
261 * cp-tree.h (CLASS_TYPE_P): Revise definition.
262
51ddb82e
JM
2631998-08-25 Jason Merrill <jason@yorick.cygnus.com>
264
9a224b4a
JM
265 * decl.c (duplicate_decls): Don't complain about different
266 exceptions from an internal decl even if pedantic.
267
51ddb82e
JM
268 * typeck.c (convert_for_assignment): Converting from pm of vbase
269 to derived is an error, not a sorry.
270
271 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
272 * class.c (fixed_type_or_null): Rename from
273 resolves_to_fixed_type_p. Return the dynamic type of the
274 expression, if fixed, or null.
275 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
276 does not match the static type.
277 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
278 resolves_to_fixed_type_p again.
279
d8c4447d
MM
2801998-08-24 Mark Mitchell <mark@markmitchell.com>
281
282 * pt.c (tsubst_decl): Move special case code for dealing with
283 tricky friend templates here from ...
284 (regenerate_decl_from_template): Here.
285
cce2be43
JM
2861998-08-24 Jason Merrill <jason@yorick.cygnus.com>
287
288 * decl.c (start_decl): Remove redundant linkage check.
289
2901998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
291
292 * typeck.c (c_expand_return): Handle the case that valtype
293 is wider than the functions return type.
294
c92366fb
MM
2951998-08-24 Mark Mitchell <mark@markmitchell.com>
296
297 * cp-tree.h (CLASS_TYPE_P): New macro.
298 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
b19abc28
MM
299 * pt.c (process_template_parm): Undo previous change.
300
037155f1
BK
3011998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
302
303 * cp-tree.h: Declare.
304 * pt.c (decl_template_parm_p): New function.
305 * decl.c (pushdecl): Check decls for redeclaring template parms.
306 (xref_tag): Make redeclaration an error, print decl.
307 * decl2.c (grokfield): Check field_decls for redeclaration as well.
308
479aecf1
JM
3091998-08-24 Jason Merrill <jason@yorick.cygnus.com>
310
311 * parse.y (primary): Fix up the type of string constants.
312
9700b81f
MM
3131998-08-24 Mark Mitchell <mark@markmitchell.com>
314
315 * typeck.c (convert_for_initialization): Move check for odd uses
316 of NULL to avoid duplicate warnings.
317
d9cf7c82
JM
3181998-08-24 Jason Merrill <jason@yorick.cygnus.com>
319
320 * tree.c (lvalue_type): Fix for arrays.
321 * typeck.c (string_conv_p): New fn.
322 (convert_for_assignment): Use it.
323 (build_unary_op): Use lvalue_type.
324 * call.c (standard_conversion, convert_like): Use string_conv_p.
325 (add_function_candidate): Use lvalue_type.
326 * cvt.c (convert_to_reference): Likewise.
327 * decl2.c (lang_decode_option): Ignore -traditional.
328 * decl.c (init_decl_processing): flag_writable_strings inhibits
329 flag_const_strings.
330
3311998-08-24 Andrew MacLeod <amacleod@cygnus.com>
332
333 * lang-options.h (lang_options): Add fconst-strings to the list
334 of valid options.
335 * decl2.c (lang_f_options, lang_decode_option): Likewise.
336
31928556
JM
3371998-08-24 Nathan Sidwell <nathan@acm.org>
338
339 * lex.c (real_yylex): Don't warn about long long constants if
340 we're allowing long long.
341
df44f2b0 342