]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
[gcc.git] / gcc / cp / ChangeLog
1 2004-07-26 Geoffrey Keating <geoffk@apple.com>
2
3 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4 (lang_specific_driver): If the C++ or math library options don't
5 start with '-l', don't count them as added libraries.
6
7 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
8
9 * decl.c (xref_basetypes): Adjust base access vector creation.
10 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
11 access accesses.
12 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
13
14 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
15 Brian Ryner <bryner@brianryner.com>
16
17 PR c++/15000
18 PR c++/9283
19 * class.c (check_field_decls): Apply hidden visibility if
20 -fvisibility-inlines-hidden and inlined unless otherwise specified
21 (build_vtable): Set vtable visibility to class visibility.
22 (check_field_decls): Default static member visibility to class
23 visibility.
24 (check_methods): Default method visibility to class visibility.
25 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
26 CLASSTYPE_VISIBILITY_SPECIFIED macro.
27 * decl.c (duplicate_decls): New logic for merging definition decls
28 with declaration decls. Added ignore & warning when non default
29 applied to global operator new or delete.
30 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
31 wherever VISIBILITY was changed
32 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
33 visibility.
34 (tinfo_base_init): Set typeinfo name visibility to class visibility.
35
36 2004-07-25 Bernardo Innocenti <bernie@develer.com>
37
38 * decl.c: Rename all identifiers named `class' to `cl'.
39 * cp-tree.h: Likewise.
40
41 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
42
43 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
44 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
45 * name-lookup.c (binding_entry_make): Use GGC_NEW.
46 (binding_table_construct): Use GGC_CNEWVEC.
47 (binding_table_new): Use GGC_NEW.
48 (cxx_binding_make): Likewise.
49 (begin_scope): Likewise.
50 (push_to_top_level): Use GCC_CNEW.
51 * parser.c (cp_token_cache_new): Likewise.
52 (cp_token_cache_push_token): Likewise.
53 (cp_lexer_new_main): Likewise.
54 (cp_lexer_new_from_tokens): Likewise.
55 (cp_parser_context_new): Likewise.
56 (cp_parser_new): Likewise.
57 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
58 * lex.c (cxx_make_type): Use GGC_CNEW.
59 (retrofit_lang_decl): Use GGC_NEWVAR.
60 (cxx_dup_lang_specific_decl): Likewise.
61 (copy_lang_type): Likewise.
62 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
63 (save_function_data): Likewise.
64 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
65 (cxx_push_function_context): Likewise.
66
67 2004-07-25 Richard Henderson <rth@redhat.com>
68
69 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
70 DECL_IGNORED_P on RESULT_DECL.
71 * semantics.c (finalize_nrv): Copy them too.
72
73 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
74
75 * search.c (lookup_conversion_operator): Avoid two loops.
76 (add_conversions): Remove.
77 (check_hidden_convs, split_conversions,
78 lookup_conversions_r): New.
79 (lookup_conversions): Use lookup_conversions_r.
80
81 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
82
83 * pt.c (get_template_base): Check type is completable.
84
85 2004-07-21 Eric Christopher <echristo@redhat.com>
86
87 * decl.c (poplevel): Inline unused variable checking.
88 Change formatting.
89
90 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
91
92 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
93 integer vectors.
94
95 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
96
97 PR c++/14497
98 * pt.c (check_explicit_specialization): Remove extension to accept
99 specializations without template headers. Fall-through to normal
100 processing.
101
102 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
103
104 PR c++/509
105 * pt.c (determine_specialization): New parameter template_count.
106 Disambiguate between member templates and member functions counting
107 the template headers.
108 (check_explicit_specialization): Update caller.
109 (tsubst_friend_function): Likewise.
110
111 2004-07-20 Steven Bosscher <stevenb@suse.de>
112
113 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
114 * cp-tree.h (tinst_level_t): New tree type.
115 (union lang_tree_node): Handle it.
116 (TINST_LOCATION): New accessor macro.
117 (make_tinst_level): New prototype.
118 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
119 * decl.c (cp_tree_node_structure): Likewise.
120 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
121 (print_instantiation_partial_context): Likewise.
122 * pt.c (pop_tinst_level): Likewise.
123 (push_tinst_level): Use make_tinst_level.
124 * tree.c (make_tinst_level): New function.
125 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
126
127 2004-07-20 Mark Mitchell <mark@codesourcery.com>
128
129 * parser.c (cp_parser_simple_type_specifier): Fix typo.
130
131 PR c++/16637
132 * parser.c (cp_parser_simple_type_specifier): Do not record usage
133 of globally-qualified names.
134
135 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
136
137 PR c++/16175
138 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
139 cv qualifier.
140
141 2004-07-19 Mark Mitchell <mark@codesourcery.com>
142
143 PR c++/16623
144 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
145 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
146 * class.c (add_implicitly_declared_members): Use
147 CLASSTYPE_LAZY_ASSIGNMENT_OP.
148 * method.c (lazily_declare_fn): Clear
149 CLASSTYPE_LAZY_ASSIGNMENT_OP.
150 * search.c (lookup_fnfields_1): Check it.
151
152 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
153
154 * cp-tree.h (vec_binfo_member): Remove.
155 * tree.c (vec_binfo_member): Remove.
156
157 * cp-tree.h (struct lang_type_class): Remove vfields field.
158 (CLASSTYPE_VFIELDS): Remove.
159 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
160 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
161 handling.
162 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
163 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
164 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
165
166 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
167
168 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
169 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
170 Moved to common.
171 (BINFO_LANG_SLOTS): Remove.
172 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
173 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
174 * class.c (check_bases): Adjust BINFO accessors.
175 (determine_primary_base, finish_struct_bits,
176 maybe_warn_about_overly_private_class, warn_hidden,
177 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
178 warn_about_ambiguous_bases, get_vfield_name,
179 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
180 add_vcall_offset_vtbl_entries_r): Likewise.
181 * dump.c (cp_dump_tree): Likewise.
182 * init.c (sort_mem_initializers, expand_member_init, build_delete,
183 push_base_cleanups): Likewise.
184 * method.c (do_build_copy_constructor, do_build_assign_ref,
185 synthesize_exception_spec): Likewise.
186 name-lookup.c (arg_assoc_class): Likewise.
187 * pt.c (instantiate_class_template,
188 get_template_base_recursive): Likewise.
189 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
190 * typeck2.c (process_init_constructor): Likewise.
191 * search.c (lookup_base_r, dynamic_cast_base_recurse,
192 dfs_access_in_type, dfs_walk_real, look_for_overrides,
193 types_overlap_p, copied_binfo, original_binfo): Likewise.
194 (binfo_for_vtable): Remove
195
196 2004-07-20 Steven Bosscher <stevenb@suse.de>
197
198 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
199 thunk_alias, and the access and virtual_offset fields.
200 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
201 * decl.c (finish_case_label): Update c_add_case_node call.
202
203 2004-07-19 Mark Mitchell <mark@codesourcery.com>
204
205 Revert patch for PR c++/16623.
206
207 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
208
209 * except.c: Remove two spurious carriage returns.
210
211 2004-07-19 Mark Mitchell <mark@codesourcery.com>
212
213 PR c++/16623
214 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
215 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
216 * class.c (add_implicitly_declared_members): Use
217 CLASSTYPE_LAZY_ASSIGNMENT_OP.
218 * method.c (lazily_declare_fn): Clear
219 CLASSTYPE_LAZY_ASSIGNMENT_OP.
220 * search.c (lookup_fnfields_1): Check it.
221
222 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
223
224 * class.c (add_method): Delay adding the slot until the end.
225 (determine_primary_base): Adjust VEC_iterate invokation.
226 (resort_type_method_vec, finish_struct_methods, warn_hidden,
227 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
228 build_vtbl_initializer): Likewise.
229 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
230 build_vbase_delete): Likewise.
231 * method.c (do_build_copy_constructor): Likewise.
232 * name-lookup.c (new_class_binding, print_binding_level,
233 poplevel_class, store_class_bindings, push_to_top_level,
234 pop_from_top_level): Likewise.
235 * pt.c (check_explicit_specialization): Likewise.
236 * search.c (lookup_conversion_operator, lookup_fnfields_1,
237 get_pure_virtuals, add_conversions, dfs_check_overlap,
238 binfo_for_vbase): Likewise.
239
240 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
241
242 PR c++/12170
243 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
244 innermost set of template arguments during deduction. Simplify.
245
246 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
247
248 * typeck.c (build_modify_expr, build_x_modify_expr): Set
249 TREE_NO_WARNING on assignments with an operator other than '='.
250
251 2004-07-10 Steven Bosscher <stevenb@suse.de>
252 Joseph S. Myers <jsm@polyomino.org.uk>
253
254 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
255 * decl2.c (grokfield): Don't check current_class_depth via
256 unused TREE_COMPLEXITY.
257 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
258 to avoid the missing parentheses warning.
259 Don't set C_SET_EXP_ORIGINAL_CODE.
260
261 2004-07-18 Mark Mitchell <mark@codesourcery.com>
262
263 * tree.c (no_linkage_helper): Remove.
264 (no_linkage_check): Don't use walk_tree_without_duplicates.
265
266 * mangle.c (write_expression): Issue a sorry for zero-operand
267 functional casts.
268
269 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
270
271 PR c++/13092
272 * init.c (build_offset_ref): Build SCOPE_REF with non-null
273 TREE_TYPE for non-dependent names.
274 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
275 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
276 unknown_type_node as its TREE_TYPE.
277 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
278 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
279 (dump_expr) <SCOPE_REF case>: Likewise.
280
281 2004-07-17 Jason Merrill <jason@redhat.com>
282
283 PR c++/16115
284 * call.c (type_passed_as): Make the invisible reference type
285 __restrict.
286 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
287 cp_genericize_r. Handle invisible reference lowering.
288 (is_invisiref_parm): New fn.
289 (cp_genericize): Adjust the types of invisible reference parms.
290 Don't repeat the walk for clones.
291 * decl.c (store_parm_decls): Don't generate any code for clones.
292
293 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
294
295 * cp-tree.h (builtin_function): Declare.
296
297 2004-07-16 Mark Mitchell <mark@codesourcery.com>
298
299 * class.c (finish_struct_methods): Remove unncessary code.
300 (add_implicitly_declared_members): Create declarations for default
301 constructors and copy constructors lazily.
302 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
303 lazy_copy_ctor.
304 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
305 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
306 * decl2.c (check_classfn): Robustify.
307 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
308 (locate_ctor): Handle lazy default constructors.
309 (locate_copy): Handle lazy copy constructors.
310 (implicitly_declare_fn): Make sure we're looking at the
311 TYPE_MAIN_VARIANT for a class before creating functions. Don't
312 set TYPE_HAS_CONSTRUCTOR.
313 (lazily_declare_fn): New function.
314 * name-lookup.c (constructor_name_full): Simplify.
315 * search.c (lookup_fnfields_1): Lazily create methods, as
316 necessary.
317 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
318
319 2004-07-16 Steven Bosscher <stevenb@suse.de>
320
321 * cp-tree.h (struct lang_type): Don't have three GTY options on a
322 single bit GTY desc.
323
324 2004-07-16 Richard Henderson <rth@redhat.com>
325
326 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
327 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
328 * tree.c (cp_copy_res_decl_for_inlining): Remove.
329
330 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
331
332 * class.c (finish_struct_bits): Use for loop.
333 (propagate_binfo_offsets): Do primary binfo outside of loop.
334
335 PR c++/16583
336 * dump.c (cp_dump_tree): Don't dump the bases if there's no
337 binfo.
338
339 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
340
341 2004-07-15 Mark Mitchell <mark@codesourcery.com>
342
343 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
344 has_abstract_assign_ref. Make methods a VEC(tree) *.
345 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
346 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
347 (CLASSTYPE_DESTRUCTORS): Likewise.
348 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
349 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
350 (add_method): Change prototoype.
351 * class.c (add_method): Remove error_p parameter. Adjust for
352 changes to CLASSTYPE_METHOD_VEC.
353 (handle_using_decl): Adjust call to add_method.
354 (maybe_warn_about_overly_private_class): Adjust for
355 changes to CLASSTYPE_METHOD_VEC.
356 (resort_type_method_vec): Likewise.
357 (finish_struct_methods): Likewise.
358 (check_for_override): Likewise.
359 (warn_hidden): Likewise.
360 (add_implicitly_declared_members): Defer creation of assignment
361 operators. Adjust call to add_method.
362 (clone_function_decl): Adjust call to add_method.
363 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
364 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
365 * decl.c (grok_special_member_properties): Don't set
366 TYPE_HAS_ABSTRACT_ASSIGN_REF.
367 * decl2.c (check_classfn): Adjust for
368 changes to CLASSTYPE_METHOD_VEC.
369 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
370 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
371 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
372 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
373 cp_finish_decl.
374 * pt.c (check_explicit_specialization): Adjust for
375 changes to CLASSTYPE_METHOD_VEC.
376 (instantiate_class_template): Do not set
377 TYPE_HAS_ABSTRACT_ASSIGN_REF.
378 * ptree.c (cxx_print_type): Don't try to print
379 CLASSTYPE_METHOD_VEC.
380 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
381 * search.c (lookup_field_r): Adjust for
382 changes to CLASSTYPE_METHOD_VEC.
383 (lookup_fnfields): Likewise.
384 (lookup_conversion_operator): Likewise.
385 (lookup_fnfields_1): Likewise. Create assignment operators
386 lazily.
387 (look_for_overrides_here): Adjust for
388 changes to CLASSTYPE_METHOD_VEC.
389 (add_conversions): Likewise.
390 * semantics.c (finish_member_declaration): Adjust call to add_method.
391
392 2004-07-15 Jason Merrill <jason@redhat.com>
393
394 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
395 references and pointers are compatible.
396
397 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
398
399 * decl.c (xref_basetypes): Refactor.
400 * tree.c (copy_base_binfos): Replace with ...
401 (copy_binfo): ... this. Deep copy the given binfo, (not the just
402 bases of the given base).
403 * cp-tree.h (copy_base_binfo): Remove.
404 (copy_binfo): Declare.
405
406 2004-07-15 Mark Mitchell <mark@codesourcery.com>
407
408 * name-lookup.c (set_inherited_value_binding_p): Add class_type
409 parameter.
410 (get_class_binding): Adjust.
411 (push_class_level_binding): Don't use set_inherited_value_binding_p.
412
413 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
414
415 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
416 * decl.c (xref_basetypes): Set it here.
417
418 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
419 Don't check for incomplete base.
420 (get_vfield_name): Simplify while loop.
421 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
422
423 2004-07-14 Mark Mitchell <mark@codesourcery.com>
424
425 * lex.c (cxx_make_type): Remove call to get_pointer_type.
426
427 * cp-tree.h (IDENTIFIER_VALUE): Remove.
428 (BINFO_PUSHDECLS_MARKED): Likewise.
429 (maybe_inject_for_scope_var): Likewise.
430 (push_class_decls): Likewise.
431 * name-lookup.h (push_class_binding): Remove.
432 (innermost_non_namespace_value): New function.
433 (outer_binding): Likewise.
434 * class.c (add_method): Push bindings before adding to
435 TYPE_METHODS.
436 (restore_class_cache): Do not restore class_shadowed.
437 (pushclass): Do not add USING_DECLs. Do not call
438 push_class_decls.
439 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
440 * decl.c (pushdecl): Use outer_binding.
441 (poplevel): Set the scope for an out-of-scope for-loop declaration
442 appropriately.
443 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
444 * name-lookup.c (new_class_binding): New function.
445 (push_binding): Use it.
446 (pushdecl): Use innermost_non_namespace_value.
447 (maybe_inject_for_scope_var): Remove.
448 (push_class_binding): Remove.
449 (set_inherited_value_binding_p): New function.
450 (get_class_binding): New function.
451 (push_class_level_binding): Assert that the current_class_type is
452 being defined.
453 (outer_binding): New function.
454 (innermost_non_namespace_value): Likewise.
455 (lookup_name_real): Use outer_binding.
456 (lookup_name_current_level): Ignore out-of-scope variables.
457 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
458 (lookup_template_class): Likewise.
459 * search.c (dfs_push_type_decls): Remove.
460 (dfs_push_decls): Likewise.
461 (setup_class_bindings): Likewise.
462 (lookup_field_1): Handle USING_DECLs from dependent scopes.
463 (marked_pushdecls_p): Remove.
464 (unmarked_pushdecls_p): Remove.
465 (marked_identifiers): Remove.
466 (setup_class_bindings): Remove.
467 (dfs_push_type_decls): Remove.
468 (dfs_push_decls): Remove.
469 (push_class_decls): Remove.
470
471 2004-07-13 Mark Mitchell <mark@codesourcery.com>
472
473 PR c++/16518
474 PR c++/16337
475 * decl.c (grokvardecl): Make declspecs parameter const.
476 (grokdeclarator): Likewise. Adjust accordingly.
477 * decl.h (grokdeclarator): Adjust declaration.
478 * parser.c (cp_parser_init_declarator): Do not clear
479 decl_specifiers->attributes.
480
481 * cp-tree.h (lang_identifier): Remove class_value.
482 (IDENTIFIER_CLASS_VALUE): Remove.
483 (pop_class_decls): Likewise.
484 (init_search_processing): Likewise.
485 * class.c (handle_using_decl): Use lookup_member, not
486 IDENTIFIER_CLASS_VALUE.
487 (restore_class_cache): New function, split out from ...
488 (pushclass): ... here. Do not call clear_identifier_class_values.
489 (invalidate_class_lookup_cache): Do not clear
490 IDENTIFIER_CLASS_VALUE.
491 (popclass): Do not call pop_class_decls.
492 (maybe_note_name_used_in_class): Do not save names looked up after
493 the class is complete. Use lookup_member, not
494 IDENTIFIER_CLASS_VALUE.
495 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
496 * decl.c (cxx_init_decl_processing): Do not call
497 init_search_processing.
498 * method.c (do_build_copy_constructor): Remove unnecessary code.
499 (do_build_assign_ref): Likewise.
500 * name-lookup.c (pushdecl): Use lookup_member, not
501 IDENTIFIER_CLASS_VALUE.
502 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
503 type_shadowed list.
504 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
505 (push_class_binding): Do not set it.
506 (clear_identifier_class_values): Remove.
507 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
508 (store_binding): Do not save it.
509 (pop_from_top_level): Do not restore it.
510 * name-lookup.h (cxx_saved_binding): Remove class_value.
511 (clear_identifier_class_values): Remove.
512 * ptree.c (cxx_print_identifier): Do not print
513 IDENTIFIER_CLASS_VALUE.
514 * search.c (search_obstack): Remove.
515 (push_stack_level): Remove.
516 (pop_stack_level): Remove.
517 (search_level): Remove.
518 (search_stack): Remove.
519 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
520 (setup_class_bindings): Use IDENTIFIER_MARKED, not
521 IDENTIFIER_CLASS_VALUE.
522 (marked_identifiers): New variable.
523 (push_class_decls): Clear IDENTIFIER_MARKED.
524 (pop_class_decls): Don't call pop_search_level.
525 (init_search_processing): Remove.
526
527 2004-07-12 Mark Mitchell <mark@codesourcery.com>
528
529 * cp-tree.h (get_aggr_typedef): Remove.
530 * init.c (get_aggr_typedef): Likewise.
531
532 * name-lookup.c (push_class_level_binding): Simplify.
533
534 2004-07-12 Andrew Pinski <apinski@apple.com>
535
536 PR c++/16475
537 Revert:
538 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
539 PR c++/16276
540 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
541 is not public.
542
543 2004-07-12 Eric Christopher <echristo@redhat.com>
544
545 * parser.c (cp_parser_class_head): Remove unused variable.
546
547 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
548
549 * decl.c (grok_op_properties): Reject [de-]allocation functions
550 declared in a namespace, or declared as static.
551
552 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
553
554 * cp-tree.h (make_binfo): Remove.
555 * decl.c (xref_basetypes): Use make_tree_binfo directly.
556 * tree.h (copy_base_binfos): Likewise.
557 (make_binfo): Remove.
558
559 * call.c (build_user_type_conversion_1, build_new_op,
560 check_constructor_callable, build_temp,
561 perform_direct_initialization_of_possible): Pass type directly to
562 lookup_fnfields & build_special_member_call.
563 (build_special_member_call): Accept a type, and complete it.
564 * class.c (finish_stuct_bits): Copy the BINFOs here.
565 * cvt.c (ocp_convert): Pass type directly to
566 build_special_member_call.
567 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
568 (xref_basetypes): Allocate the binfo here. Adjust.
569 * init.c (build_init, build_new_1): Pass type directly to
570 build_special_member_call.
571 * lex.c (cxx_make_type): Do not allocate binfo here.
572 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
573 * parser.c (cp_parser_class_head): Always call xref_basetypes.
574 * pt.c (instantiate_class_template): Likewise. Inhibit access
575 checking for template friends.
576 * ptree.c (cxx_print_type): Adjust record printing.
577 * search.c (lookup_base): When taking a type, complete it before
578 looking for a binfo.
579 (lookup_member): Delay completing a type.
580 (push_class_decls): Don't walk an incomplete type.
581 (lookup_conversions): Likewise.
582 * semantics.c (finish_stmt_expr_expr): Pass type directly to
583 build_special_member_call.
584 * tree.c (copy_base_binfos): Adjust.
585 (make_binfo): Likewise.
586 * typeck.c (build_modify_expr): Pass type directly to
587 build_special_member_call.
588 * typeck2.c (process_init_constructor): Check a binfo exists.
589 (build_m_component_ref): Allow accessing an incomplete type.
590 (build_functional_cast): Pass type directly to
591 build_special_member_call.
592
593 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
594
595 PR c++/2204
596 * config-lang.in (gtfiles): Add typeck2.c.
597 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
598 gt-cp-typeck2.h.
599 * cp-tree.h: Declare complete_type_check_abstract.
600 * typeck2.c (pat_calc_hash, pat_compare,
601 complete_type_check_abstract): New functions.
602 (abstract_virtuals_error): If the type is abstract, register the
603 declaration within abstract_pending_vars for further checks.
604 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
605 * decl.c (cp_finish_decl): Do not strip array types.
606 (create_array_type_for_decl): Check for abstractness of the element
607 type.
608 (complete_vars): Call complete_type_check_abstract.
609 * class.c (finish_struct): Prepare a list of virtual functions for
610 template types, and call complete_vars on it to check for abstractness.
611
612 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
613
614 PR tree-optimization/14107
615 * decl.c (finish_function): Remove temporary band-aid.
616
617 2004-07-11 Mark Mitchell <mark@codesourcery.com>
618
619 * call.c (build_operator_new_call): Avoid using push_to_top_level.
620 (build_new_op): Adjust call to lookup_function_nonclass.
621 * name-lookup.c (identifier_type_value): Adjust call to
622 lookup_name_real.
623 (lookup_name_real): Add block_p parameter.
624 (lookup_name_nonclass): Adjust call to lookup_name_real.
625 (lookup_function_nonclass): Likewise.
626 (lookup_name): Likewise.
627 * name-lookup.h (lookup_name_real): Change prototype.
628 (lookup_name_nonclass): Likewise.
629 * parser.c (cp_parser_lookup_name): Likewise.
630
631 * cp-tree.h (saved_scope): Make old_bindings a vector.
632 (unuse_fields): Remove.
633 * name-lookup.h (cxx_saved_binding): Define it.
634 * class.c (pushclass): Don't use unuse_fields.
635 * name-lookup.c (cxx_saved_binding_make): Remove.
636 (store_binding): Add new bindings to a vector, using an
637 accumulator style, rather than adding them to a list.
638 (store_bindings): Adjust accordingly.
639 (store_class_bindings): Likewise.
640 (push_to_top_level): Likewise.
641 (pop_from_top_level): Likewise.
642 * optimize.c (maybe_clone_body): Must push_to_top_level and
643 pop_from_top_level calls outside of loop.
644 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
645 calls here from cp_parser_late_parsing_default_args.
646 (cp_parser_save_default_args): Record the class type in which the
647 function is declared.
648 (cp_parser_late_parsing_default_args): Do not call
649 push_nested_class/pop_nested_class.
650 * search.c (dfs_unuse_fields): Remove.
651 (unuse_fields): Remove.
652
653 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
654
655 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
656 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
657 * cp-tree.h (poplevel): Declare.
658 (set_block): Remove.
659 * decl.c (set_block): Remove.
660
661 2004-07-10 Mike Stump <mrs@apple.com>
662
663 * decl2.c (import_export_class): Never export/import vtables
664 with inline key functions.
665
666 2004-07-09 Steven Bosscher <stevenb@suse.de>
667
668 * typeck.c (c_expand_asm_operands): Remove.
669
670 2004-07-09 Mike Stump <mrs@apple.com>
671
672 * typeck.c (build_class_member_access_expr): Skip null deref
673 warning when we don't dereference it.
674
675 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
676
677 PR c++/8211
678 PR c++/16165
679 * class.c (check_field_decls): Improve -Weffc++ warning: do not
680 warn for pointers to functions/members, or for classes without
681 destructors.
682
683 2004-07-08 Mark Mitchell <mark@codesourcery.com>
684
685 * name-lookup.h (struct cp_binding_level): Update documentation
686 for class_shadowed.
687
688 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
689
690 PR c++/16169
691 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
692 returning CALL_EXPR, and non-reference return type.
693
694 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
695
696 * name-lookup.c (push_binding): Use VEC_reserve.
697
698 2004-07-08 Richard Henderson <rth@redhat.com>
699
700 * cp-tree.h (expand_eh_spec_block): Remove.
701
702 2004-07-07 Mark Mitchell <mark@codesourcery.com>
703
704 * cp-tree.h (saved_scope): Remove x_previous_class_type and
705 x_previous_class_values; add x_previous_class_level.
706 (previous_class_type): Remove.
707 (previous_class_values): Remove.
708 (previous_class_level): New macro.
709 * class.c (pushclass): Restore the identifier cache more
710 expeditiously.
711 (invalidate_class_lookup_cache): Use vector for class_shadowed and
712 previous_class_values.
713 * decl.c (poplevel): Likewise.
714 * name-lookup.c (cxx_binding_init): New function.
715 (cxx_binding_make): Use it.
716 (push_binding): For a binding in a class level, use a vector of
717 cp_class_binding nodes.
718 (push_binding_level): New function.
719 (begin_scope): Use it.
720 (leave_scope): Do not put class binding levels on the free list.
721 (print_binding_level): Adjust for the fact that class_shadowed is
722 a vector.
723 (poplevel_class): Likewise.
724 (clear_identifier_class_values): Likewise.
725 (push_class_level_binding): Likewise.
726 (set_class_shadows): Remove.
727 (store_binding): New function.
728 (store_class_bindings): New function.
729 (push_to_top_level): Use store_class_bindings as appropriate.
730 (pop_from_top_level): Use previous_class_level, not
731 previous_class_type.
732 * name-lookup.h (cp_class_binding): New type.
733 (cp_binding_level): Use a vector object for class_shadowed.
734 (push_binding_level): Declare.
735 (set_class_shadows): Remove.
736
737 2004-07-07 Andrew Pinski <apinski@apple.com>
738
739 * class.c (instantiate_type): BUFFER_REF is dead.
740 * lex.c (init_operators): IN_EXPR is dead.
741
742 2004-07-07 Jason Merrill <jason@redhat.com>
743
744 PR c++/16334
745 * call.c (build_new_op): Give overload warnings for built-in
746 candidates.
747
748 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
749
750 PR c++/16276
751 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
752 is not public.
753
754 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
755
756 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
757 * class.c (build_primary_vtable, check_bases,
758 determine_primary_base, finish_struct_bits,
759 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
760 get_basefndecls, warn_hidden, walk_subobject_offsets,
761 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
762 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
763 finish_struct_1, get_vfield_name, contains_empty_class_p,
764 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
765 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
766 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
767 BINFO macros.
768 * decl.c (xref_basetypes): Likewise.
769 * dump.c (cp_dump_tree): Likewise.
770 * error.c (dump_expr): Likewise.
771 * init.c (sort_mem_initializers, expand_member_init,
772 push_base_cleanups): Likewise.
773 * method.c (do_build_copy_constructor, do_build_assign_reg,
774 synthesize_exception_spec): Likewise.
775 * name-lookup.c (arg_assoc_class): Likewise.
776 * pt.c (instantiate_class_template, tsubst,
777 get_template_base_recursive): Likewise.
778 * ptree.c (cxx_print_type): Likewise.
779 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
780 * search.c (lookup_base_r, dynamic_cast_base_recurse,
781 dfs_access_in_type, access_in_type, lookup_field_queue_p,
782 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
783 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
784 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
785 binfo_for_vtable, copied_binfo, original_binfo): Likewise
786 * tree.c (copy_base_binfos, make_binfo): Likewise.
787 * typeck.c (commmon_base_type): Likewise
788 * typeck2.c (process_init_constructor): Likewise
789
790 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
791
792 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
793
794 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
795
796 PR c++/3671
797 * pt.c (convert_nontype_argument): Disallow conversions between
798 different enumeration types.
799
800 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
801
802 * cp-tree.h (BINFO_MARKED): Remove.
803 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
804 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
805 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
806 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
807 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
808 (mark_primary_bases, determine_primary_base, base_derived_from,
809 dfs_find_final_overrider, dfs_find_final_overrider_q,
810 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
811 dfs_modify_vtables, walk_subobject_offsets,
812 layout_nonempty_base_or_field, build_base_field,
813 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
814 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
815 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
816 build_ctor_vtbl_group, accumulate_vtble_inits,
817 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
818 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
819 add_vcall_offset_vtbl_entries_1): Likewise.
820 * decl.c (xref_basetypes): Incomming virtual base indicated by
821 TREE_TYPE. Adjust.
822 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
823 * init.c (finish_init_stmts, sort_mem_initializers,
824 emit_mem_initializers, build_vtble_address, expand_member_init,
825 push_base_cleanups): Likewise.
826 * method.c (do_build_copy_constructor): Likewise.
827 * pt.c (instantiate_class_template,
828 get_template_base_recursive): Likewise.
829 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
830 get_pseudo_ti_desc): Likewise.
831 * search.c (lookup_base_r, dynamic_cast_base_recurse,
832 binfo_from_vbase, binfo_via_virtual, copied_binfo,
833 original_binfo): Likewise.
834 * semantics.c (finish_base_specifier): Virtualness is indicated
835 by TREE_TYPE.
836 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
837
838 2004-07-06 Mark Mitchell <mark@codesourcery.com>
839
840 Revert:
841 2004-06-24 Jason Merrill <jason@redhat.com>
842 PR c++/16115
843 * decl.c (grokparms): Give the PARM_DECL reference type if the
844 parameter is passed by invisible reference.
845
846 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
847
848 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
849 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
850 * pt.c (check_instantiated_args, unify): Likewise.
851
852 2004-07-05 Phil Edwards <phil@codesourcery.com>
853
854 * Make-lang.in (check-c++, lang_checks): Add some comments.
855
856 2004-07-05 Zack Weinberg <zack@codesourcery.com>
857
858 * cp-mudflap.c: Delete file.
859 * Makefile.in: Remove all references to cp-mudflap.o.
860
861 2004-07-05 Zack Weinberg <zack@codesourcery.com>
862
863 * decl.c (cxx_init_decl_processing): Call
864 build_common_tree_nodes before creating the global NAMESPACE_DECL.
865
866 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
867
868 PR c++/2518
869 * call.c (build_operator_new_call): Look only at global scope.
870
871 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
872
873 * call.c (enforce_access): Expect TREE_BINFO.
874 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
875 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
876 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
877 Adjust.
878 (BINFO_LANG_ELTS): Remove.
879 (BINFO_LANG_SLOTS): New.
880 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
881 (CLASSTYPE_TEMPLATE_INFO): Adjust.
882 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
883 * search.c (lookup_member): Check TREE_BINFO.
884 * semantics.c (perform_or_defer_access_check): Likewise.
885 (check_accessibility_of_qualified_id): Check
886 deferred_access_no_check.
887 * tree.c (make_binfo): Use make_tree_binfo.
888
889 2004-07-04 Mark Mitchell <mark@codesourcery.com>
890
891 * method.c (implicitly_declare_fn): Set linkage of generated
892 functions.
893
894 2004-07-04 Richard Henderson <rth@redhat.com>
895
896 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
897
898 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
899
900 PR c++/3761
901 * name-lookup.c (push_class_level_binding): Don't pass a
902 TREE_LIST of ambiguous names to check_template_shadow as it
903 only handles declarations. Instead, pull the declaration
904 out and pass that.
905
906 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
907
908 PR c++/14971
909 * pt.c (check_explicit_specialization): Clarify error message.
910
911 2004-07-02 Richard Henderson <rth@redhat.com>
912
913 * tree.c (cp_unsave_r): Update remap_save_expr call.
914
915 2004-07-02 Mark Mitchell <mark@codesourcery.com>
916
917 PR c++/16240
918 * mangle.c (write_template_arg): Correct mangling.
919
920 PR c++/16297
921 * decl.c (grokdeclarator): Robustify.
922
923 2004-07-01 Richard Henderson <rth@redhat.com>
924
925 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
926 * method.c (synthesize_method): Don't clear_last_expr.
927 * name-lookup.c (maybe_push_cleanup_level): Likewise.
928
929 2004-07-01 Nick Clifton <nickc@redhat.com>
930
931 * decl2.c (import_export_class): Invoke the
932 import_export_class field in the gcc_target structure if it is not
933 empty.
934
935 2004-06-30 Richard Henderson (rth@redhat.com>
936
937 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
938 * method.c (use_thunk): Likewise.
939
940 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
941
942 * call.c (build_over_call), typeck.c (build_function_call): Call
943 check_function_arguments instead of check_function_format.
944
945 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
946
947 * call.c (build_over_call), typeck.c (build_function_call): Update
948 calls to check_function_format.
949
950 2004-06-30 Richard Henderson <rth@redhat.com>
951
952 * call.c (build_over_call): Use __builtin_memcpy for copying
953 CLASS_AS_BASE rather than funny casting.
954
955 2004-06-30 Richard Henderson <rth@redhat.com>
956
957 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
958 TYPE_SIZE_UNIT of full_type.
959
960 2004-06-30 Per Bothner <per@bothner.com>
961
962 Conditionally compile support for --enable-mapped_location.
963 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
964 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
965 adjustments - which I don't understand.
966 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
967 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
968 (print_instantiation_partial_context): Use expand_location.
969 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
970 * name-lookup.c: Likewise.
971 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
972 * name-lookup.c: Use input_line macro.
973 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
974 (cp_parser_statement): Rename locaal variable statement_locus to
975 statement_location and use SET_EXPR_LOCATION macro.
976 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
977 * tree.c (cp_walk_subtrees): Likewise.
978
979 2004-06-29 Per Bothner <per@bothner.com>
980
981 * tree.c (build_min_nt, build_min, build_min_non_dep):
982 Don't set TREE_COMPLEXITY from input_line.
983
984 2004-06-29 Paul Brook <paul@codesourcery.com>
985
986 * init.c: Include target.h.
987 (get_cookie_size): Remove and replace with target hook.
988 Update callers.
989 (build_new_1): Store the element size in the cookie.
990
991 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
992
993 PR c++/16260
994 * parser.c (cp_parser_template_declaration_after_export): Disable
995 access checks here ...
996 (cp_parser_class_specifier): ... not here.
997
998 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
999
1000 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
1001 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
1002 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
1003 TREE_CHECK macro.
1004
1005 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1006
1007 * cp-tree.h (struct deferred_access): Move to ...
1008 * semantics.c (struct deferred_access): ... here. Adjust.
1009 (deferred_access_stack): Make a VEC(deferred_access),
1010 (deferred_access_free_list): Remove.
1011 (deferred_access_no_check): New.
1012 (push_deferring_access_checks, resume_deferring_access_checks,
1013 stop_deferring_access_checks, pop_deferring_access_checks,
1014 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
1015 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
1016
1017 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1018
1019 PR c++/16174
1020 * call.c (build_temp): Declare.
1021 (check_constructor_callable): New.
1022 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
1023 CONSTRUCTOR_CALLABLE.
1024 (convert_like_real, initialize_reference): Use
1025 check_constructor_callable.
1026 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
1027 (LOOKUP_*): Renumber.
1028
1029 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1030
1031 * friend.c (add_friend): Only perform access checks when context
1032 is a class.
1033 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
1034 * parser.c (cp_parser_class_specifier): Disable access checks here
1035 when parsing the body of a templated class.
1036 * semantics.c (perform_or_defer_access_checks): Reorder to allow
1037 NULL binfos when not checking access.
1038
1039 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
1040
1041 Use vector API for vbase list.
1042 * cp-tree.h: Include vec.h
1043 (DEF_VEC_P (tree)): New type.
1044 (struct lang_type_class): Change vbase's member type.
1045 (binfo_for_vbase): Declare.
1046 * class.c (determine_primary_base, base_derived_from,
1047 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
1048 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
1049 build_vtbl_initializer): Adjust.
1050 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
1051 vbases.
1052 * init.c (sort_mem_initializers, expand_member_init,
1053 push_base_cleanups): Adjust.
1054 * method.c (do_build_copy_constructor): Adjust.
1055 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
1056 (binfo_for_vbase): New.
1057 * tree.c (copy_base_binfos): Adjust.
1058
1059 2004-06-28 Mark Mitchell <mark@codesourcery.com>
1060
1061 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
1062
1063 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1064
1065 PR c++/14123
1066 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
1067 paranthesis in case of pointers to array members.
1068 * error.c (dump_type_prefix): Likewise.
1069 (dump_type_suffix): Maybe issue a whitespace when printing
1070 ARRAY_TYPE.
1071
1072 2004-06-27 Mark Mitchell <mark@codesourcery.com>
1073
1074 PR c++/16193
1075 * parser.c (cp_parser_set_decl_spec_type): Refine test for
1076 redefinition of built-in types.
1077
1078 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
1079
1080 * error.c (pp_template_argument_list_start): Remove.
1081 (pp_template_argument_list_end): Likewise.
1082 (pp_separate_with_comma): Use pp_cxx_separate_with.
1083 (reinit_global_formatting_buffer): Remove.
1084 (pp_non_consecutive_character): Likewise.
1085 (dump_scope): Use pp_cxx_colon_colon.
1086 (dump_template_parameter): Use pp_cxx_identifier,
1087 pp_cxx_tree_identifier and pp_cxx_whitespace.
1088 (dump_templat_bindings): Replace use of pp_string with sequence
1089 of pp_cxx_whitespace and pp_equal.
1090 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
1091 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
1092 padding here.
1093 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
1094 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
1095 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
1096 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
1097 pp_cxx_right_bracket, pp_cxx_identifier throughout,
1098 (dump_decl): Likewise.
1099 (dump_template_decl): Likewise.
1100 (dump_function_decl): Likewise. Set padding as appropriate.
1101 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
1102 pp_cxx_right_paren.
1103 (dump_exception_spec): Likewise.
1104 (dump_function_name): Use pp_cxx_tree_identifier and
1105 pp_cxx_identifier.
1106 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
1107 pp_cxx_end_template_argument_list.
1108 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
1109 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
1110 pp_cxx_whitespace throughout.
1111 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
1112 pp_cxx_right_paren.
1113 (dump_unary_op): Likewise.
1114 (reinit_cxx_pp): New function.
1115 (type_as_string); Use it.
1116 (expr_as_string): Likewise.
1117 (decl_as_string); Likewise.
1118 (context_as_string): Likewise.
1119 (lang_decl_name): Likewise.
1120 (decl_to_string): Likewise.
1121 (expr_to_string): Likewise.
1122 (parm_to_string): Likewise.
1123 (type_to_string): Likewise.
1124 (args_to_string): Likewise.
1125 (cv_to_string): Likewise.
1126
1127 2004-06-26 Mark Mitchell <mark@codesourcery.com>
1128
1129 * cp-tree.h (cp_cv_quals): New type.
1130 (cp_declarator): Use it instead of "tree" as appropriate.
1131 (grok_method_quals): Adjust prototype.
1132 (grokclassfn): Likewise.
1133 (do_friend): Likewise.
1134 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
1135 (grokdeclarator): Likewise.
1136 * decl2.c (grok_method_quals): Likewise.
1137 (grokclassfn): Likewise.
1138 * friend.c (do_friend): Likewise.
1139 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
1140 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
1141 (make_pointer_declarator): Likewise.
1142 (make_reference_declarator): Likewise.
1143 (make_ptrmem_declarator): Likewise.
1144 (cp_parser_ptr_operator): Likewise.
1145 (cp_parser_cv_qualifier_seq_opt): Likewise.
1146 (cp_parser_cv_qualifier_opt): Remove.
1147 (cp_parser_new_declarator_opt): Adjust call to
1148 cp_parser_ptr_operator.
1149 (cp_parser_conversion_declaration_opt): Likewise.
1150 (cp_parser_declarator): Use cp_cv_quals, not tree.
1151 (cp_parser_direct_declarator): Likewise.
1152
1153 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1154
1155 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
1156 Rename DECL_STMT to DECL_EXPR.
1157 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
1158 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
1159 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
1160
1161 2004-06-26 Jan Hubicka <jh@suse.cz>
1162
1163 PR C++/14865
1164 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
1165 reachability analysis.
1166
1167 2004-06-25 Mark Mitchell <mark@codesourcery.com>
1168
1169 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
1170 2004-06-23 change.
1171
1172 2004-06-25 Paul Brook <paul@codesourcery.com>
1173
1174 * decl2.c (get_guard): Call targetm.cxx.guard_type.
1175 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
1176
1177 2004-06-24 Mark Mitchell <mark@codesourcery.com>
1178
1179 * decl.c (grokdeclarator): Restore error messages about __thread.
1180 * parser.c (cp_parser_decl_specifier_seq): Likewise.
1181
1182 2004-06-24 Jason Merrill <jason@redhat.com>
1183
1184 PR c++/16115
1185 * decl.c (grokparms): Give the PARM_DECL reference type if the
1186 parameter is passed by invisible reference.
1187
1188 2004-06-24 Andreas Schwab <schwab@suse.de>
1189
1190 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
1191
1192 2004-06-23 Mark Mitchell <mark@codesourcery.com>
1193
1194 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
1195 (cp/decl.o): Likewise.
1196 (cp/decl2.o): Likewise.
1197 (cp/pt.o): Likewise.
1198 (cp/semantics.o): Likewise.
1199 * config-lang.in (gtfiles): Do not reference cp/lex.h.
1200 * class.c: Do not include lex.h.
1201 (add_implicitly_declared_members): Do not use
1202 adding_implicit_members.
1203 (check_bases_and_members): Do not talk about grok_x_components.
1204 * cp/cp-tree.h (adding_implicit_members): Remove.
1205 (cp_storage_class): New type.
1206 (cp_decl_spec): Likewise.
1207 (cp_decl_specifier_seq): Likewise.
1208 (cp_parameter_declarator): Use it for the decl_specifiers field.
1209 (check_tag_decl): Adjust prototype.
1210 (shadow_tag): Likewise.
1211 (groktypename): Likewise.
1212 (start_decl): Likewise.
1213 (start_function): Likewise.
1214 (start_method): Likewise.
1215 (grok_x_components): Remove.
1216 (grokfield): Adjust prototype.
1217 (grokbitfield): Likewise.
1218 (finish_member_class_template): Remove.
1219 * decl.c: Do not include lex.h.
1220 (adding_implicit_members): Do not define.
1221 (check_tag_decl): Do not use trees to represent decl-specifiers.
1222 (shadow_tag): Likewise.
1223 (groktypename): Likewise.
1224 (start_decl): Likewise.
1225 (grokvardecl): Likewise.
1226 (grokdeclarator): Likewise.
1227 (grokparms): Likewise.
1228 (start_function): Likewise.
1229 (start_method): Likewise.
1230 * decl.h (grokdeclarator): Adjust prototype.
1231 * decl2.c: Do not include lex.h.
1232 (grok_x_components): Remove.
1233 (grokfield): Do not use trees to represent decl-specifiers.
1234 (grokbitfield): Likewise.
1235 * lex.c: Do not include lex.h.
1236 * lex.h: Remove.
1237 * parser.c: Include target.h.
1238 (clear_decl_specs): New function.
1239 (cp_parser_translation_unit): Do not use trees to represent
1240 decl-specifiers.
1241 (cp_parser_postfix_expression): Likewise.
1242 (cp_parser_new_type_id): Likewise.
1243 (cp_parser_condition): Likewise.
1244 (cp_parser_simple_declaration): Likewise.
1245 (cp_parser_decl_specifier_seq): Likewise.
1246 (cp_parser_function_specifier_opt): Likewise.
1247 (cp_parser_conversion_type_id): Likewise.
1248 (cp_parser_template_parameter): Likewise.
1249 (cp_parser_explicit_instantiation): Likewise.
1250 (cp_parser_type_specifier): Likewise.
1251 (cp_parser_simple_type_specifier): Likewise.
1252 (cp_parser_init_declarator): Likewise.
1253 (cp_parser_type_id): Likewise.
1254 (cp_parser_type_specifier_seq): Likewise.
1255 (cp_parser_parameter_declaration): Likewise.
1256 (cp_parser_member_declaration): Likewise.
1257 (cp_parser_exception_declaration): Likewise.
1258 (cp_parser_function_definition_from_specifiers_and_declarator):
1259 Likewise.
1260 (cp_parser_single_declaration): Likewise.
1261 (cp_parser_save_member_function_body): Likewise.
1262 (cp_parser_friend_p): Likewise.
1263 (cp_parser_set_storage_class): New function.
1264 (cp_parser_set_decl_spec_type): Likewise.
1265 * pt.c: Do not include lex.h.
1266 * semantics.c: Likewise.
1267 (finish_member_class_template): Remove.
1268
1269 2004-06-23 Roger Sayle <roger@eyesopen.com>
1270
1271 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
1272 longer take both "args" and "convert_args" as arguments.
1273 (build_op_delete_call): Update call to build_cxx_call.
1274 (build_over_call): Likewise, update call to build_cxx_call.
1275 * cp-tree.h (build_cxx_call): Update funtion prototype.
1276 * typeck.c (build_function_call): Don't call expand_tree_builtin.
1277 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
1278 (throw_bad_typeid): Likewise.
1279 (build_dynamic_cast_1): Likewise.
1280
1281 2004-06-22 Richard Henderson <rth@redhat.com>
1282
1283 * class.c (build_vfn_ref): Take a pointer not object. Build
1284 an OBJ_TYPE_REF.
1285 (cp_fold_obj_type_ref): New.
1286 * call.c (build_over_call): Update build_vfn_ref call.
1287 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
1288 * cp-tree.h (cp_fold_obj_type_ref): Declare.
1289
1290 2004-06-21 Jason Merrill <jason@redhat.com>
1291
1292 PR c++/16112
1293 * cp-gimplify.c (cp_gimplify_init_expr): Look through
1294 CLEANUP_POINT_EXPR.
1295
1296 2004-06-21 Mark Mitchell <mark@codesourcery.com>
1297
1298 * cp-tree.def (NEW_EXPR): Add a fourth slot.
1299 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
1300 (TREE_PARMLIST): Likewise.
1301 (CALL_DECLARATOR_PARMS): Likewise.
1302 (CALL_DECLARATOR_QUALS): Likewise.
1303 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1304 (cp_declarator_kind): New type.
1305 (cp_parameter_declarator): Likewise.
1306 (cp_declarator): Likewise.
1307 (cp_error_declarator): Likewise.
1308 (no_parameters): Likewise.
1309 (groktypename): Change prototype.
1310 (start_decl): Likewise.
1311 (start_handler_parms): Likewise.
1312 (get_scope_of_declarator): Likewise.
1313 (start_function): Likewise.
1314 (start_preparsed_function): New function.
1315 (start_function): Change prototype.
1316 (start_method): Likewise.
1317 (grokfield): Likewise.
1318 (grokbitfield): Likewise.
1319 (build_new): Likewise.
1320 (make_pointer_declarator): Remove.
1321 (make_reference_declarator): Likewise.
1322 (make_call_declarator): Likewise.
1323 (set_quals_and_spec): Likewise.
1324 (process_template_parm): Change prototype.
1325 (begin_function_definition): Remove.
1326 (finish_parmlist): Remove.
1327 * decl.c (groktypename): Do not use trees to represent
1328 declarators.
1329 (start_decl): Likewise.
1330 (start_handler_parms): Remove.
1331 (get_scope_of_declarator): Reimplement.
1332 (grokdeclarator): Do not use trees to represent declarators.
1333 (grokparms): Likewise.
1334 (start_function): Likewise.
1335 (start_method): Likewise.
1336 (build_void_list_mode): Do not use TREE_PARMLIST.
1337 * decl.h (grokdeclarator): Change prototype.
1338 * decl2.c (grok_method_quals): Robustify.
1339 (grok_x_components): Do not use trees to represent declarators.
1340 (grokfield): Likewise.
1341 (grokbitfield): Likewise.
1342 (start_objects): Build FUNCTION_DECLs, not declarators.
1343 (start_static_storage_duration_function): Likewise.
1344 * init.c (build_new): Simplify.
1345 * lex.c (make_pointer_declarator): Remove.
1346 (make_reference_declarator): Likewise.
1347 (make_call_declarator): Likewise.
1348 (set_quals_and_spec): Likewise.
1349 * method.c (use_thunk): Use start_preparsed_function.
1350 (synthesize_method): Likewise.
1351 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
1352 * optimize.c (maybe_clone_body): Use start_preparsed_function.
1353 * parser.c (cp_error_declarator): New variable.
1354 (declarator_obstack): Likewise.
1355 (alloc_declarator): New function.
1356 (make_declarator): Likewise.
1357 (make_id_declarator): Likewise.
1358 (make_pointer_declarator): Likewise.
1359 (make_reference_declarator): Likewise.
1360 (make_ptrmem_declarator): Likewise.
1361 (make_call_declarator): Likewise.
1362 (make_array_declarator): Likewise.
1363 (no_parameters): New variable.
1364 (make_parameter_declarator): Likewise.
1365 (cp_parser_check_for_definition_in_return_type): Do not use trees
1366 to represent declarators.
1367 (cp_parser_translation_unit): Likewise.
1368 (cp_parser_new_expression): Likewise.
1369 (cp_parser_new_type_id): Likewise.
1370 (cp_parser_new_declarator_opt): Likewise.
1371 (cp_parser_direct_new_declarator): Likewise.
1372 (cp_parser_condition): Likewise.
1373 (cp_parser_declaration_statement): Likewise.
1374 (cp_parser_declaration): Likewise.
1375 (cp_parser_conversion_type_id): Likewise.
1376 (cp_parser_conversion_declarator_opt): Likewise.
1377 (cp_parser_template_parameter_list): Likewise.
1378 (cp_parser_template_parameter): Likewise.
1379 (cp_parser_explicit_instantiation): Likewise.
1380 (cp_parser_init_declarator): Likewise.
1381 (cp_parser_declarator): Likewise.
1382 (cp_parser_direct_declarator): Likewise.
1383 (cp_parser_type_id): Likewise.
1384 (cp_parser_parameter_declaration_clause): Likewise.
1385 (cp_parser_parameter_declaration_list): Likewise.
1386 (cp_parser_parameter_declaration): Likewise.
1387 (cp_parser_member_declaration): Likewise.
1388 (cp_parser_exception_declaration): Likewise.
1389 (cp_parser_check_declarator_template_parameters): Likewise.
1390 (cp_parser_function_definition_from_specifiers_and_declarator):
1391 Likewise.
1392 (cp_parser_save_member_function_body): Likewise.
1393 * pt.c (process_template_parm): Add is_non_type parameter.
1394 (convert_template_argument): Adjust call to groktypename.
1395 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
1396 (tsubst): Do not expect declarators.
1397 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
1398 argument.
1399 (instantiate_decl): Use start_preparsed_function.
1400 * semantics.c (begin_function_definition): Remove.
1401 (finish_parmlist): Remove.
1402 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
1403 declarators.
1404
1405 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1406
1407 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
1408 (build_new_method_call): Likewise.
1409 * decl.c (local_variable_p_walkfn): Don't walk into types.
1410 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
1411 (build_anon_union_vars): Add new operand for COMPONENT_REF.
1412 * init.c (buld_new): Add new operand for ARRAY_REF.
1413 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
1414 (do_build_assign_ref): Likewise.
1415 * parser.c (cp_parser_direct_new_declarator): Add new operands
1416 for ARRAY_REF.
1417 (cp_parser_direct_declarator): Likewise.
1418 * pt.c (tsubst): Likewise.
1419 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
1420 for COMPONENT_REF.
1421 * semantics.c (finish_non_static_data_member): Add new operand
1422 for COMPONENT_REF.
1423 * typeck.c (build_class_member_access_expr): Likewise.
1424 (build_class_member_access_expr, finish_class_member_access_expr):
1425 Likewise.
1426 (build_ptrmemfunc_access_expr): Likewise.
1427 (build_array_ref): Add new operands for ARRAY_REF.
1428 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
1429 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
1430
1431 2004-06-21 Richard Henderson <rth@redhat.com>
1432
1433 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
1434 * parser.c (cp_parser_jump_statement): Update commentary.
1435 * pt.c (tsubst_expr): Use RETURN_EXPR.
1436 * semantics.c (finish_return_stmt): Likewise.
1437 (finalize_nrv_r): Likewise.
1438 * typeck.c, typeck2.c: Update file start commentary.
1439
1440 2004-06-21 Richard Henderson <rth@redhat.com>
1441
1442 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
1443
1444 2004-06-20 Richard Henderson <rth@redhat.com>
1445
1446 * cp-tree.h (add_decl_stmt): Declare.
1447 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
1448 * semantics.c (maybe_cleanup_point_expr): New.
1449 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
1450 finish_for_expr, finish_switch_cond): Use it.
1451 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
1452
1453 2004-06-20 Richard Henderson <rth@redhat.com>
1454
1455 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
1456 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
1457 (cp_gimplify_expr): Call it.
1458 (gimplify_cleanup_stmt): Move from c-gimplify.c.
1459 (cp_genericize): New.
1460 * decl.c (finish_function): Call it.
1461 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
1462 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
1463 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
1464 (cp_genericize): Declare.
1465 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
1466 * dump.c (cp_dump_tree): Likewise.
1467 * semantics.c (push_cleanup): Move from c-semantics.c.
1468
1469 2004-06-20 Zack Weinberg <zack@codesourcery.com>
1470
1471 * cp-lang.c (has_c_linkage): Implement.
1472
1473 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
1474 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
1475 (builtin_function_1): Don't call make_decl_rtl.
1476 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
1477 (grokvardecl): Don't call mangle_decl.
1478 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
1479 DECL_ASSEMBLER_NAME.
1480 * method.c (set_mangled_name_for_decl): Delete.
1481 * name-lookup.c (pushdecl): When a local extern shadows a
1482 file-scope declaration of the same object, give both DECLs the
1483 same DECL_UID.
1484 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
1485 on DECL_ASSEMBLER_NAME.
1486
1487 2004-06-19 Richard Henderson <rth@redhat.com>
1488
1489 * cp-gimplify.c: Remove unnecessary prototypes.
1490 (cp_gimplify_stmt): Merge into ...
1491 (cp_gimplify_expr): ... here. Move to end of file. Handle
1492 stmts_are_full_exprs_p frobbing.
1493 * cp-tree.h (cp_gimplify_stmt): Remove.
1494 * pt.c (tsubst_expr): Merge prep_stmt and unify.
1495 * tree.c (init_tree): Don't set lang_gimplify_stmt.
1496
1497 2004-06-18 Richard Henderson <rth@redhat.com>
1498
1499 PR c++/16034
1500 * semantics.c (begin_cond): New.
1501 (finish_cond): Rewrite to handle template DECL_STMTs specially.
1502 Assume that non-template decls go land before the conditional.
1503 (simplify_loop_decl_cond): Likewise.
1504 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
1505 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
1506 begin_switch_stmt, finish_switch_cond): Update to match.
1507
1508 2004-06-17 Jason Merrill <jason@redhat.com>
1509
1510 PR c++/16015
1511 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
1512 (finish_stmt_expr_expr): Update type after conversions.
1513 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
1514 Handle void initializer.
1515 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
1516
1517 2004-06-17 Geoffrey Keating <geoffk@apple.com>
1518
1519 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
1520 * cp-tree.h (defer_fn): Delete.
1521 * decl2.c (defer_fn): Delete.
1522 (finish_file): Simplify deferred_fns loops; check that
1523 only used inline functions get into deferred_fns.
1524 (mark_used): Inline previous contents of defer_fn.
1525
1526 2004-06-16 Richard Henderson <rth@redhat.com>
1527
1528 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
1529 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
1530 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
1531 of CTOR_INITIALIZER ...
1532 (pp_cxx_statement): ... here.
1533 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
1534 (finish_function): Use alloc_stmt_list to zap entire function.
1535 * parser.c (cp_parser_compound_statement): Update commentary.
1536 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
1537 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
1538 (finish_stmt_expr): Don't look through COMPOUND_STMT.
1539
1540 2004-06-16 Geoffrey Keating <geoffk@apple.com>
1541
1542 * pt.c (mark_decl_instantiated): Don't call defer_fn.
1543
1544 2004-06-16 Richard Henderson <rth@redhat.com>
1545
1546 * parser.c (cp_parser_labeled_statement): Update commentary.
1547 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
1548 * tree.c (mark_local_for_remap_r): Likewise.
1549
1550 2004-06-16 Richard Henderson <rth@redhat.com>
1551
1552 * parser.c (cp_parser_asm_definition): Update commentary.
1553 * pt.c (tsubst_expr): Use ASM_EXPR.
1554 * semantics.c (finish_asm_stmt): Likewise.
1555
1556 2004-06-16 Richard Henderson <rth@redhat.com>
1557
1558 * decl.c (finish_destructor_body): Use LABEL_EXPR.
1559 * parser.c (cp_parser_statement): Update commentary.
1560 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
1561 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
1562 * tree.c (mark_local_for_remap_r): Likewise.
1563
1564 2004-06-16 Richard Henderson <rth@redhat.com>
1565
1566 PR c++/16012
1567 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
1568 statement in FOR_INIT_STMT for templates.
1569
1570 2004-06-15 Richard Henderson <rth@redhat.com>
1571
1572 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
1573 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
1574 (genericize_try_block): Use gimplify_stmt.
1575 (genericize_catch_block, genericize_eh_spec_block): Likewise.
1576 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
1577 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
1578 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
1579 (cp_tree_chain_matters_p): Remove.
1580 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
1581 (COMPOUND_STMT_BODY_BLOCK): New.
1582 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
1583 (EXPR_STMT_STMT_EXPR_RESULT): New.
1584 (building_stmt_tree): Check cur_stmt_list.
1585 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
1586 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
1587 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
1588 (cp_finish_decl): Use push_cleanup.
1589 (start_function, finish_function): Use statement lists.
1590 (finish_stmt): Do nothing.
1591 * except.c (begin_eh_spec_block): Use statement lists.
1592 (check_handlers_1, check_handlers): Likewise.
1593 * init.c (construct_virtual_base): Don't add extra compound stmts.
1594 (build_vec_init): Likewise.
1595 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
1596 * name-lookup.h (struct cp_binding_level): Add statement_list.
1597 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
1598 (cp_parser_labeled_statement, cp_parser_expression_statement,
1599 cp_parser_statement_seq_opt): Likewise.
1600 (cp_parser_compound_statement): Likewise. Take bool for try block.
1601 (cp_parser_selection_statement): Tidy if processing.
1602 (cp_parser_already_scoped_statement): Rewrite to do what it says.
1603 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
1604 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
1605 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
1606 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
1607 (finish_cond): New, rewritten from FINISH_COND.
1608 (simplify_loop_decl_cond): New.
1609 (finish_expr_stmt): Avoid nested EXPR_STMTs.
1610 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
1611 begin_else_clause, finish_else_clause, finish_if_stmt,
1612 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
1613 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
1614 finish_for_cond, finish_for_stmt, begin_switch_stmt,
1615 finish_switch_cond, finish_switch_stmt, begin_try_block,
1616 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
1617 finish_handler_sequence, finish_function_handler_sequence,
1618 begin_handler, finish_handler_parms, finish_handler,
1619 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
1620 using statement lists.
1621 (begin_compound_stmt): Replace has_no_scope argument with flags.
1622 Update all callers. Use statement lists.
1623 (finish_compound_stmt): Likewise.
1624 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
1625 (current_scope_stmt_stack): Remove.
1626 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
1627 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
1628 Rewrite with statement lists.
1629
1630 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
1631
1632 * parser.c: Change all assignments of c_lex_string_translate
1633 to true and false to 1 and 0.
1634 (cp_lexer_read_token): Convert type of the translated string.
1635 (cp_parser_skip_to_closing_parentheses): Preserve original
1636 value of c_lex_string_translate, and set it to -1 while
1637 running.
1638 (cp_parser_cache_group): Likewise.
1639 (cp_parser_cache_group_1): Renamed.
1640 (cp_parser_asm_operand_list): Remove redundant setting of
1641 c_lex_string_translate.
1642 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
1643 Handle chained strings.
1644
1645 2004-06-12 Andrew Pinski <apinski@apple.com>
1646
1647 PR c++/14639
1648 Revert:
1649 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1650
1651 * cp-tree.h: Fix typo.
1652
1653 * cp-tree.h: Include cgraph.h
1654 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1655 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1656
1657 2004-06-12 Jason Merrill <jason@redhat.com>
1658
1659 PR tree-optimization/14107
1660 * decl.c (finish_function): Warn about no return in all functions.
1661
1662 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
1663
1664 * cp-tree.h (struct language_function): Remove cannot_inline.
1665 * decl.c (save_function_data): cannot_inline is no more.
1666 (cxx_push_function_context): Likewise.
1667 * decl2.c (start_objects, start_static_storage_duration_function):
1668 Reset DECL_INLINE, set DECL_UNINLINABLE.
1669
1670 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1671
1672 PR c++/15967
1673 * search.c (lookup_field): Propagate the ambiguity list.
1674 (lookup_fnfields): Likewise.
1675
1676 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1677
1678 PR c++/15947
1679 * parser.c (cp_parser_template_name): Ctors/dtors never need a
1680 template keyword to disambiguate.
1681
1682 2004-06-14 Mark Mitchell <mark@codesourcery.com>
1683
1684 PR c++/15096
1685 * decl.c (grokdeclarator): Ignore pointer-to-members when
1686 computing template depth.
1687
1688 PR c++/14930
1689 * name-lookup.c (pushtag): Do not try to put class declarations in
1690 explicit specialization scopes.
1691
1692 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
1693
1694 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
1695
1696 2004-06-11 Mark Mitchell <mark@codesourcery.com>
1697
1698 PR c++/15862
1699 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
1700 bindings for undeclared built-ins.
1701
1702 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1703
1704 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
1705 appear at the correct location.
1706
1707 2004-06-10 Jason Merrill <jason@redhat.com>
1708
1709 PR c++/15875
1710 Revert:
1711 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1712 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1713 TREE_TYPE for non-dependent names.
1714 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1715 unknown_type_node as its TREE_TYPE.
1716 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1717 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1718 (dump_expr) <SCOPE_REF case>: Likewise.
1719
1720 2004-06-10 Mark Mitchell <mark@codesourcery.com>
1721
1722 PR c++/15227
1723 * parser.c (cp_parser_direct_declarator): Robustify.
1724
1725 PR c++/15877
1726 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
1727 constants in non-dependent contexts.
1728
1729 PR c++/14211
1730 PR c++/15076
1731 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
1732 necessary.
1733
1734 2004-06-10 Jakub Jelinek <jakub@redhat.com>
1735
1736 PR c++/14791
1737 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
1738 specially.
1739
1740 2004-06-09 Mark Mitchell <mark@codesourcery.com>
1741
1742 Revert:
1743 PR c++/15815
1744 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1745 * lex.c (handle_pragma_interface): Deprecate.
1746 (handle_pragma_implementation): Likewise.
1747
1748 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
1749
1750 * g++spec.c (lang_specific_driver): Remove check for -lm
1751 and -lmath when check it see if it was the math library.
1752
1753 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1754
1755 PR c++/7841
1756 * parser.c (cp_parser_direct_declarator): Reject constructor named
1757 as qualified template-id.
1758
1759 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1760
1761 PR c++/15815
1762 * lex.c (handle_pragma_interface): Deprecate.
1763 (handle_pragma_implementation): Likewise.
1764
1765 2004-06-07 Mark Mitchell <mark@codesourcery.com>
1766
1767 PR c++/15766
1768 * parser.c (cp_parser_iteration_statement): Fix typo in error
1769 message.
1770
1771 PR c++/14777
1772 * pt.c (tsubst_default_argument): Do not defer access checks
1773 while substituting into the default argument.
1774
1775 PR c++/15554
1776 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
1777 constant in a non-dependent context.
1778
1779 PR c++/15057
1780 * except.c (build_throw): Ensure that temp_expr has been
1781 initialized.
1782
1783 2004-06-06 Roger Sayle <roger@eyesopen.com>
1784
1785 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
1786
1787 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1788
1789 PR c++/15503
1790 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
1791 'typename', and accept 'template'.
1792
1793 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
1794 Jan Hubicka <jh@suse.cz>
1795
1796 PR c++/14639
1797 * method.c (use_think): Do not mark thunk as referenced.
1798
1799 2004-06-03 Matt Austern <austern@apple.com>
1800
1801 PR c++/15428
1802 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
1803 is nonzero, and if we see a noninline definition of a key method,
1804 make the vtables nonweak.
1805
1806 2004-06-02 Matt Austern <austern@apple.com>
1807
1808 * cp-tree.h (instantiate_decl): new boolean parameter,
1809 undefined_ok. Current behavior is equivalent to its being 0.
1810 * decl2.c (mark_used): Add new argument when calling instantiate_decl
1811 * pt.c (mark_decl_instantiated): Unconditionally make
1812 instantiations explicit unconditionally
1813 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
1814 since mark_decl_instantiated now does it.
1815 (instantiate_class_member): New. Instantiate a member of an
1816 explicitly instantiated class template.
1817 (do_type_instantiation): Explicitly instantiate members of an
1818 explicitly instantiated class template.
1819 (instantiate_decl): if undefined_ok is nonzero, and if we're
1820 trying to explicitly instantiated a template with no definition,
1821 change it to an implicit instantiation.
1822 (instantiate_pending_templates): Add new argument to instantiate_decl.
1823 * tree.c (cp_cannot_inline_tree_fn): Likewise.
1824
1825 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
1826
1827 * cp-tree.h: Fix typo.
1828
1829 * cp-tree.h: Include cgraph.h
1830 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
1831 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
1832
1833 2004-06-01 Jason Merrill <jason@redhat.com>
1834
1835 PR c++/15142
1836 * call.c (call_builtin_trap): Remove type parm.
1837 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
1838 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
1839
1840 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1841
1842 PR c++/13092
1843 * init.c (build_offset_ref): Build SCOPE_REF with non-null
1844 TREE_TYPE for non-dependent names.
1845 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
1846 unknown_type_node as its TREE_TYPE.
1847 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
1848 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
1849 (dump_expr) <SCOPE_REF case>: Likewise.
1850
1851 2004-06-01 Richard Henderson <rth@redhat.com>
1852 Andrew Pinski <pinskia@physics.uc.edu>
1853
1854 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
1855 * parser.c (struct cp_parser): Remove in_offsetof.
1856 (cp_parser_new): Don't set it.
1857 (cp_parser_unary_expression): Don't check it.
1858 (cp_parser_postfix_open_square_expression): Split out from ...
1859 (cp_parser_postfix_expression): ... here.
1860 (cp_parser_postfix_dot_deref_expression): Likewise.
1861 (cp_parser_builtin_offsetof): New.
1862 (cp_parser_primary_expression): Use it.
1863
1864 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1865
1866 PR c++/14932
1867 * parser.c (cp_parser_postfix_expression): Allow subscript
1868 operator in offsetof.
1869
1870 2004-05-31 Mark Mitchell <mark@codesourcery.com>
1871
1872 PR c++/15701
1873 * friend.c (add_friend): Do not try to perform access checks for
1874 functions from dependent classes.
1875
1876 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
1877
1878 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
1879 (pp_cxx_begin_template_argument_list): Turn into a function.
1880 (pp_cxx_end_template_argument_list): Likewise.
1881 (pp_cxx_separate_with): Define.
1882 (pp_cxx_unqualified_id): Tidy.
1883 (pp_cxx_primary_expression): Likewise.
1884 (pp_cxx_postfix_expression): Likewise.
1885 (pp_cxx_expression): Likewise.
1886 (pp_cxx_simple_type_specifier): Likewise.
1887 (pp_cxx_type_specifier_seq): Likewise.
1888 (pp_cxx_parameter_declaration_clause): Likewise.
1889 (pp_cxx_exception_specification): Likewise.
1890 (pp_cxx_direct_declarator): Likewise.
1891 (pp_cxx_type_id): Likewise.
1892 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
1893 cxx-pretty-print.c.
1894 (pp_cxx_left_paren): Likewise.
1895 (pp_cxx_right_paren): Likewise.
1896 (pp_cxx_left_brace): Likewise.
1897 (pp_cxx_right_brace): Likewise.
1898 (pp_cxx_left_bracket): Likewise.
1899 (pp_cxx_right_bracket): Likewise.
1900 (pp_cxx_dot): Likewise.
1901 (pp_cxx_identifier): Likewise.
1902 (pp_cxx_tree_identifier): Likewise.
1903 (pp_cxx_ampersand): New macro.
1904 (pp_cxx_star): Likewise.
1905 (pp_cxx_arrow): Likewise.
1906 (pp_cxx_semicolon): Likewise.
1907 (pp_cxx_complement): Likewise.
1908 (pp_cxx_begin_template_argument_list): Declaree.
1909 (pp_cxx_end_template_argument_list): Likewise.
1910 (pp_cxx_colon_colon): likewise.
1911
1912 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
1913
1914 * parser.c (cp_parser_simple_type_specifier): Explicitly test
1915 against NULL_TREE.
1916
1917 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
1918
1919 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
1920 typeck.c: Fix comment formatting.
1921
1922 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
1923
1924 * cp-lang.c (cp_expand_decl): Remove.
1925 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
1926
1927 2004-05-30 Andreas Jaeger <aj@suse.de>
1928
1929 * lang-specs.h: Add missing initializers for .ii.
1930
1931 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
1932
1933 * decl.c (cp_make_fname_decl): Free return value from
1934 fname_as_string.
1935
1936 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1937
1938 PR c++/15083
1939 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
1940 even in a templat.e
1941 * init.c (build_new): Likewise.
1942
1943 PR c++/15640
1944 * name-lookup.c (arg_assoc): Robustify.
1945
1946 PR c++/15471
1947 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
1948 when determining the scope to use for a pointer to member.
1949 (lookup_anon_field): Give it external linkage.
1950 * cp-tree.h (lookup_anon_field): Declare it.
1951 * expr.c (cplus_expand_constant): Use it.
1952
1953 2004-05-28 Mark Mitchell <mark@codesourcery.com>
1954
1955 PR c++/14668
1956 * parser.c (cp_parser_simple_type_specifier): Call
1957 maybe_note_name_used_in_class.
1958
1959 2004-05-28 Tom Marshall <tmarshall@real.com>
1960
1961 PR c++/15214
1962 * class.c (finish_struct_1): Warn only if the dtor is non-private or
1963 the class has friends.
1964
1965 2004-05-27 Adam Nemet <anemet@lnxw.com>
1966
1967 PR c++/12883
1968 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
1969 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
1970
1971 2004-05-24 Geoffrey Keating <geoffk@apple.com>
1972
1973 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
1974 if it might be needed.
1975 * pt.c (mark_decl_instantiated): Only call defer_fn if
1976 the function actually needs processing in finish_file.
1977 * decl2.c (finish_file): Add check that elements in
1978 deferred_fns_used are really needed there. Remove unnecessary
1979 test of DECL_SAVED_TREE.
1980
1981 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
1982
1983 * Make-lang.in: No need to specify $(LIBCPP).
1984
1985 2004-05-23 Mark Mitchell <mark@codesourcery.com>
1986
1987 PR c++/15044
1988 * parser.c (cp_parser_class_head): Robustify.
1989
1990 PR c++/15317
1991 * parser.c (cp_parser_decl_specifier_seq): Correct error in
1992 comment.
1993 (cp_parser_constructor_declarator_p): Treat attributes
1994 as decl-specifiers.
1995
1996 PR c++/15329
1997 * typeck.c (build_unary_op): Do not attempt to resolve casts to
1998 base classes in templates.
1999
2000 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2001
2002 PR c++/15165
2003 * pt.c (instantiate_template): Robustify.
2004
2005 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2006
2007 PR c++/15025
2008 * decl.c (xref_tag): Issue errors about redeclaring template
2009 classes as non-template classes.
2010
2011 2004-05-23 Mark Mitchell <mark@codesourcery.com>
2012
2013 PR c++/14821
2014 * name-lookup.c (supplement_binding): Allow redefinitions of
2015 namespace aliases.
2016
2017 PR c++/14883
2018 * parser.c (cp_parser_template_argument): Robustify.
2019
2020 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2021
2022 * class.c (alter_access): Use %E format specifier to print an
2023 identifier node. Avoid looking at the IDENTIFIER_POINTER.
2024 (push_lang_context): Likewise.
2025 * decl.c (lookup_label): Likewise.
2026 (grokdeclarator): Likewise.
2027 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
2028 * pt.c (do_type_instantiation): Likewise.
2029 * tree.c (handle_java_interface_attribute): Likewise.
2030 (handle_com_interface_attribute): Likewise.
2031 (handle_init_priority_attribute): Likewise.
2032
2033 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2034
2035 PR c++/15285
2036 PR c++/15299
2037 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
2038 recognized as overloaded functions.
2039
2040 2004-05-22 Mark Mitchell <mark@codesourcery.com>
2041
2042 PR c++/15507
2043 * class.c (layout_nonempty_base_or_field): Do not try to avoid
2044 layout conflicts for unions.
2045
2046 PR c++/15542
2047 * typeck.c (build_x_unary_op): Instantiate template class
2048 specializations before looking for "operator &".
2049
2050 PR c++/15427
2051 * typeck.c (complete_type): Layout non-dependent array types, even
2052 in templates.
2053
2054 PR c++/15287
2055 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
2056 template.
2057
2058 2004-05-22 Roger Sayle <roger@eyesopen.com>
2059
2060 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
2061 returning when TREE_TYPE is error_mark_node.
2062 * typeck.c (require_complete_type): Return error_mark_node if
2063 value's type is an error_mark_node.
2064
2065 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
2066
2067 * optimize.c (calls_setjmp_r): Remove.
2068 (calls_setjmp_p): Remove.
2069 * cp-tree.c (calls_setjmp_p): Remove.
2070 * decl.c (finish_function): Do not call calls_setjmp_p.
2071
2072 2004-05-18 Zack Weinberg <zack@codesourcery.com>
2073
2074 * decl.c (cp_finish_decl): Use mark_decl_referenced.
2075 * decl2.c (maybe_make_one_only): Likewise.
2076 * method.c (use_thunk): Likewise.
2077
2078 2004-05-18 Jason Merrill <jason@redhat.com>
2079
2080 * class.c (build_base_path): Tidy a bit.
2081
2082 2004-05-14 Geoffrey Keating <geoffk@apple.com>
2083
2084 * name-lookup.c (struct scope_binding): New.
2085 (EMPTY_SCOPE_BINDING): New.
2086 (lookup_using_namespace): Take a scope_binding instead of a
2087 cxx_binding.
2088 (qualified_lookup_using_namespace): Likewise.
2089 (cxx_binding_clear): Delete.
2090 (do_nonmember_using_decl): Use a scope_binding instead of a
2091 cxx_binding.
2092 (lookup_tag): Don't call select_decl.
2093 (ambiguous_decl): Don't return anything (and change callers to match).
2094 Take a scope_binding as the second parameter.
2095 (lookup_namespace_name): Use a scope_binding instead of a
2096 cxx_binding.
2097 (unqualified_namespace_lookup): Likewise.
2098 (lookup_qualified_name): Likewise.
2099 (select_decl): Take a scope_binding instead of a cxx_binding.
2100 Use macros rather than hand-coding tests for type-ness.
2101
2102 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2103
2104 * cp-gimplify.c: Rename from cp-simplify.c.
2105 * Make-lang.in, optimize.c: Update.
2106
2107 2004-05-13 Diego Novillo <dnovillo@redhat.com>
2108
2109 Merge from tree-ssa-20020619-branch. See
2110 ChangeLog.tree-ssa for details.
2111
2112 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
2113 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
2114 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
2115 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
2116 Merged.
2117 * cp-mudflap.c: New file.
2118 * cp-simplify.c:: New file.
2119
2120 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2121
2122 PR c++/14389
2123 * decl2.c (check_classfn): For member templates, compare also the
2124 template parameters to match the declaration.
2125 * cp-tree.h: Adjust declaration of check_classfn.
2126 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
2127 * friend.c (do_friend): Likewise.
2128 * pt.c (tsubst_friend_function): Likewise.
2129
2130 2004-05-01 Zack Weinberg <zack@codesourcery.com>
2131
2132 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
2133 Instead, dig into the representation type to find the array bound.
2134
2135 2004-04-30 Jason Merrill <jason@redhat.com>
2136
2137 Refer to base members using COMPONENT_REFs where possible.
2138 * class.c (build_simple_base_path): New fn.
2139 (build_base_path): Use it for non-virtual base references.
2140 (layout_class_type): Change base fields to their real type
2141 after layout is done.
2142 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
2143 * cp-lang.c (cxx_get_alias_set): Use it.
2144
2145 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
2146
2147 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
2148 comment typos.
2149
2150 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2151
2152 PR c++/15064
2153 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
2154 used in integral constant expressions.
2155
2156 2004-04-22 Mark Mitchell <mark@codesourcery.com>
2157
2158 * init.c (build_aggr_init): Fix accidental use of C99 construct in
2159 previous change.
2160
2161 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
2162 braced initializer.
2163 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
2164 * decl.c (reshape_init): Use it.
2165 * init.c (perform_member_init): Remove redundant condition.
2166 (build_aggr_init): Adjust to handle brace-enclosed initializers
2167 correctly.
2168 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2169
2170 * parser.c (cp_parser_initializer_clause): Do not set
2171 TREE_HAS_CONSTRUCTOR on the initializer.
2172 * rtti.c (tinfo_base_init): Likewise.
2173 (generic_initializer): Likewise.
2174 (ptr_initializer): Likewise.
2175 (ptm_initializer): Likewise.
2176 (class_initializer): Likewise.
2177 (get_pseudo_ti_init): Likewise.
2178 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
2179
2180 2004-04-22 Alan Modra <amodra@bigpond.net.au>
2181
2182 * name-lookup.c (anonymous_namespace_name): Make static.
2183
2184 2004-04-19 Roger Sayle <roger@eyesopen.com>
2185
2186 PR middle-end/14531
2187 * class.c (build_base_path): Call fold whilst building the NULL
2188 pointer check expression trees.
2189
2190 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
2191
2192 * init.c (build_new_1): Don't use type size argument for Java
2193 _Jv_AllocObject call.
2194
2195 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
2196
2197 * method.c (make_alias_for_thunk): Remove preprocessor guard on
2198 declaration and definition.
2199
2200 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
2201
2202 PR c++/14808
2203 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
2204 than ASM_OUTPUT_DEF.
2205
2206 2004-04-08 Jakub Jelinek <jakub@redhat.com>
2207
2208 * decl2.c (mark_used): Don't segfault if cfun != NULL but
2209 current_function_decl == NULL.
2210
2211 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
2212
2213 PR c++/3518
2214 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
2215 level.
2216
2217 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2218
2219 * init.c (decl_constant_value): Don't look at DECL_INITIAL
2220 of PARM_DECL.
2221 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
2222 or TREE_SIDE_EFFECTS of a type.
2223
2224 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
2225
2226 PR c++/14007
2227 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
2228 cv-qualifier unification.
2229 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
2230
2231 2004-04-02 Jan Hubicka <jh@suse.cz>
2232
2233 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
2234 * cp-tree.h (cp_update_decl_after_saving): Declare.
2235 * tree.c (cp_update_decl_after_saving): Define.
2236
2237 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2238
2239 PR c++/14803
2240 * typeck.c (get_delta_difference): Call fold before returning the
2241 value.
2242
2243 2004-04-01 Richard Henderson <rth@redhat.com>
2244
2245 PR c++/14804
2246 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
2247 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
2248
2249 2004-04-01 Mark Mitchell <mark@codesourcery.com>
2250
2251 PR c++/14810
2252 * name-lookup.c (maybe_push_cleanup_level): Robustify.
2253
2254 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2255
2256 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
2257
2258 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2259
2260 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
2261 * class.c (check_bitfield_decl): Likewise.
2262 * cvt.c (type_promotes_to): Likewise.
2263 * decl.c (finish_enum): Likewise.
2264 * mangle.c (write_builtin_type): Likewise.
2265 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
2266 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
2267 (build_binary_op): Likewise.
2268
2269 2004-03-31 Jan Hubicka <jh@suse.cz>
2270
2271 * tree.h (optimize_function): Kill prototype.
2272 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
2273 * semantics.c (expand_body): Kill.
2274
2275 2004-03-30 Mark Mitchell <mark@codesourcery.com>
2276
2277 PR c++/14724
2278 * decl.c (start_decl_1): Do not decide whether or not to create a
2279 new cleanup level until after the type has been completed.
2280
2281 PR c++/14763
2282 * pt.c (tsubst_default_argument): Clear current_function_decl.
2283
2284 2004-03-30 Zack Weinberg <zack@codesourcery.com>
2285
2286 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
2287
2288 2004-03-29 Zack Weinberg <zack@codesourcery.com>
2289
2290 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
2291 is null, just print the literal name and return.
2292
2293 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
2294
2295 * cxx-pretty-print.c: Fix comment typos.
2296
2297 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
2298
2299 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
2300 Update copyright.
2301
2302 2004-03-23 Ziemowit Laski <zlaski@apple.com>
2303
2304 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
2305 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
2306 target hook.
2307
2308 2004-03-23 Zack Weinberg <zack@codesourcery.com>
2309
2310 PR 12267, 12391, 12560, 13129, 14114, 14133
2311 * cp-lang.c (c_reset_state): Delete.
2312 (push_file_scope, pop_file_scope): New stubs.
2313 * parser.c (c_parse_file): Call sorry() here if called more than once.
2314
2315 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2316
2317 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
2318 for INTEGER_CST.
2319
2320 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2321
2322 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
2323
2324 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
2325
2326 * error.c (enum pad): Remove.
2327 (dump_qualifiers): Likewise.
2328 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
2329 (dump_aggr_type): Likewise.
2330 (dump_type_suffix): Likewise.
2331 (dump_simple_decl): Likewise.
2332 (dump_function_decl): Likewise.
2333 (cv_to_string): Likewise.
2334 (dump_type_prefix): Likewise. Adjust return void.
2335 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
2336 cxx_pretty_print.h.
2337 (pp_cxx_template_keyword_if_needed): Document.
2338 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
2339 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
2340 MUST_NOT_THROW_EXPR.
2341
2342 2004-03-21 Mark Mitchell <mark@codesourcery.com>
2343
2344 PR c++/14616
2345 * decl.c (cp_finish_decl): Compute the size of arrays declared in
2346 templates, if their type is non-dependent.
2347
2348 2004-03-19 Mark Mitchell <mark@codesourcery.com>
2349
2350 * call.c (build_op_delete_call): Do not forget the placement
2351 arguments when iterating through mutiple delete operators.
2352
2353 * cp-tree.h (svaed_scope): Remove last_parms.
2354 (NEW_DELETE_OPNAME_P): New macro.
2355 (last_function_parms): Remove.
2356 (do_friend): Adjust prototype.
2357 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
2358 using last_function_parms.
2359 (grokfndecl): Take the PARM_DECLs as an argument, rather than
2360 using last_function_parms.
2361 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
2362 for class-specific operator new and operator delete.
2363 (grok_op_properties): Do not look for allocation functions with
2364 METHOD_TYPEs.
2365 (start_function): Use DECL_ARGUMENTS instead of
2366 last_function_parms.
2367 * decl.h (last_function_parms): Do not declare.
2368 * decl2.c (grokclassfn): Do not use last_function_parms.
2369 * friend.c (do_friend): Remove parmdecls parameter.
2370 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
2371 (pop_from_top_level): Do not restore it.
2372 * pt.c (check_explicit_specialization): Do not adjust
2373 last_function_parms.
2374
2375 * name-lookup.c (do_local_using_decl): Create a local binding for
2376 types brought in via using declarations.
2377
2378 * name-lookup.c (lookup_arg_dependent): Handle block-scope
2379 function declarations correctly.
2380
2381 * semantics.c (finish_id_expression): Correct handling of
2382 conversion operators to dependent types.
2383
2384 * typeck.c (lookup_destructor): Allow the use of destructors from
2385 base classes.
2386
2387 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2388
2389 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
2390 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
2391 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
2392 the field is named TEMPLATE_TYPE_PARM_INDEX.
2393
2394 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2395
2396 PR c++/14545
2397 * parser.c (cp_parser_functional_cast): A cast to anything
2398 but integral or enumaration type is not an integral constant
2399 expression.
2400 * pt.c (value_dependent_expression_p): Handle cast expressions
2401 without operands (such as "int()").
2402
2403 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2404
2405 * semantics.c (finish_pseudo_destructor_expr): Allow differing
2406 cv-qualification between the type named by the
2407 pseudo-destructor-name and the object-type.
2408
2409 * search.c (accessible_base_p): Handle non-proper bases.
2410
2411 * name-lookup.c (do_nonmember_using_decl): If a using declaration
2412 refers to a single overloaded function, set the type of the
2413 function.
2414 * tree.c (lvalue_type): Simplify.
2415 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
2416 unknown type.
2417 (build_unary_op): Handle OVERLOADs with known types.
2418
2419 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
2420 function templates.
2421
2422 * parser.c (cp_parser_postfix_expression): Handle the use of
2423 "typename" in non-dependent contexts. Convert appropriately when
2424 when using a qualified name after "->" or ".".
2425
2426 * call.c (conditional_conversion): Honor the requirement that some
2427 conversions refer to the original object.
2428
2429 2004-03-18 Mark Mitchell <mark@codesourcery.com>
2430
2431 * call.c (build_conditional_expr): Do not call force_rvalue for
2432 operands of void_type when the conditional expression itself has
2433 void type.
2434 * name-lookup.c (pushdecl): Don't consider a declaration of a
2435 function named "main" to be an overload of a type named "main".
2436 * parser.c (cp_parser_template_name): Perform name lookup when the
2437 template name is proceeded by "template" if the qualifying scope
2438 is non-dependent.
2439 * typeck.c (composite_pointer_type_r): Correctly handle
2440 pointer-to-member types.
2441 (build_const_cast): Likewise.
2442
2443 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2444
2445 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
2446 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
2447 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
2448 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
2449 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
2450 (TYPEOF_TYPE_EXPR): New macro.
2451 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
2452 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
2453 * pt.c (tsubst): Likewise.
2454 * semantics.c (finish_typeof): Likewise.
2455 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
2456 and TEMPLATE_TYPE_PARM.
2457 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
2458 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
2459
2460 2004-03-16 Mark Mitchell <mark@codesourcery.com>
2461
2462 PR c++/14586
2463 * cp-tree.h (build_new_op): Change prototype.
2464 (build_x_binary_op): Likewise.
2465 * call.c (build_new_op): Add overloaded_p parameter.
2466 * decl2.c (grok_array_decl): Adjust call to build_new_op.
2467 * parser.c (cp_parser_binary_expression): Note that uses of
2468 overloaded operators prevents an expression from being considered
2469 an integral constant.
2470 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
2471 build_x_binary_op.
2472 * semantics.c (finish_call_expr): Likewise.
2473 * typeck.c (rationalize_conditional_expr): Likewise.
2474 (build_x_indirect_ref): Likewise.
2475 (build_x_binary_op): Likewise.
2476 (build_x_unary_op): Likewise.
2477 (build_x_compound_expr): Likewise.
2478 (build_modify_expr): Likewise.
2479 * typeck2.c (build_x_arrow): Likewise.
2480
2481 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
2482
2483 * cp-lang.c, ptree.c: Update copyright.
2484
2485 2004-03-13 Mark Mitchell <mark@codesourcery.com>
2486
2487 PR c++/14550
2488 * parser.c (cp_parser_non_integral_constant_expression): Encode
2489 more of the idiom that surrounded calls to this function within
2490 the function itself
2491 (cp_parser_primary_expression): Adjust accordingly.
2492 (cp_parser_postfix_expression): Likewise.
2493 (cp_parser_unary_expression): Likewise.
2494 (cp_parser_cast_expression): Likewise.
2495 (cp_parser_assignment_expression): Likewise.
2496 (cp_parser_expression): Likewise.
2497 (cp_parser_new_expression): Note that new-expressions are not
2498 allowed in integral constant expressions.
2499 (cp_parser_delete_expression): Likewise.
2500
2501 2004-03-12 Matt Austern <austern@apple.com>
2502
2503 * decl2.c (maybe_make_one_only): Look at
2504 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
2505 to make an explicit instantiation weak.
2506 * method.c (use_thunk): Make sure we call comdat_linkage
2507 when appropriate.
2508 * pt.c (do_type_instantiation): On systems where weak symbols
2509 don't go in a static archive's TOC, explicit instantiation of a
2510 class must imply *explicit* instantiation of its memeber.
2511
2512 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
2513
2514 * call.c, cp-tree.h, pt.c: Fix comment typos.
2515
2516 2004-03-10 Mark Mitchell <mark@codesourcery.com>
2517
2518 PR c++/14510
2519 * decl.c (xref_tag): Disregard non-type declarations when
2520 looking up a tagged type.
2521
2522 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
2523
2524 PR c++/14397
2525 * call.c (convert_like_real): Build a const qualified temporary,
2526 when testing ctor access.
2527
2528 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2529
2530 * call.c (initialize_reference): Fix typo.
2531
2532 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2533
2534 PR c++/14409
2535 * pt.c (determine_specialization): For member templates, match also
2536 constness.
2537
2538 PR c++/14448
2539 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
2540 non-dependent.
2541 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
2542
2543 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2544
2545 PR c++/14230
2546 * call.c (initialize_reference): Handle initializers that are
2547 class-member access expressions applies to rvalues.
2548
2549 2004-03-09 Mark Mitchell <mark@codesourcery.com>
2550
2551 PR c++/14432
2552 * name-lookup.c (supplement_binding): Ignore functions that are
2553 marked DECL_ANTICIPATED.
2554
2555 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2556
2557 PR c++/14401
2558 * class.c (check_field_decls): Complain about non-static data
2559 members of reference type in unions. Propagate
2560 CLASSTYPE_REF_FIELDS_NEED_INIT and
2561 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
2562 data members.
2563 * init.c (perform_member_init): Complain about mbmers with const
2564 type that are not explicitly initialized.
2565
2566 2004-03-08 Mark Mitchell <mark@codesourcery.com>
2567
2568 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
2569 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
2570 (lang_identifier): Remove implicit_decl and error_locus.
2571 (IDENTIFIER_IMPLICIT_DECL): Remove.
2572 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
2573 (IDENTIFIER_ERROR_LOCUS): Likewise.
2574 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
2575 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
2576 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2577 (implicitly_declare): Remove.
2578 * decl.c (warn_extern_redeclared_static): Remove check of
2579 IDENTIFIER_IMPLICIT_DECL.
2580 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
2581 (implicitly_declare): Remove.
2582 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
2583 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
2584 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
2585 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
2586 in the innermost scope, rather than at namespace scope.
2587 * name-lookup.c (push_local_binding): Give it external linkage.
2588 (pushdecl): Remove dead code.
2589 * name-lookup.h (push_local_binding): Declare it.
2590 * ptree.c (cxx_print_identifier): Don't print
2591 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
2592 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
2593 not IDENTIFIER_ERROR_LOCUS.
2594 * typeck.c (build_function_call): Remove dead code.
2595
2596 2004-03-08 Jason Merrill <jason@redhat.com>
2597
2598 PR c++/13170
2599 * decl.c (xref_tag): Remove attribute handling.
2600 * cp-tree.h: Adjust prototype.
2601 * decl.c, parser.c, rtti.c: Adjust callers.
2602 * parser.c (cp_parser_class_head): Pass back attributes in the
2603 class head.
2604 (cp_parser_class_specifier): Adjust.
2605
2606 2004-03-08 Matt Austern <austern@apple.com>
2607
2608 PR debug/14079
2609 * name-lookup.c (add_decl_to_level): Add extern variables, as well
2610 as static, to static_decls array.
2611
2612 2004-03-05 Jason Merrill <jason@redhat.com>
2613
2614 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
2615
2616 2004-03-04 Geoffrey Keating <geoffk@apple.com>
2617
2618 * decl.c (grokfndecl): Update old incorrect comment.
2619 (grokvardecl): Diagnose C++ variables of type with no linkage.
2620
2621 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2622
2623 PR c++/14369
2624 * pt.c (build_non_dependent_expr): Do not create a
2625 NON_DEPENDENT_EXPR for a THROW_EXPR.
2626
2627 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
2628
2629 PR c++/14369
2630 * error.c (dump_expr): Handle THROW_EXPR.
2631
2632 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2633
2634 PR c++/14360
2635 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
2636 lookup if ordinary name-lookup finds a non-function.
2637 * pt.c (tsubst_copy_and_build): Likewise.
2638
2639 PR c++/14361
2640 * parser.c (cp_parser_late_parsing_default_args): Check that there
2641 are no extra tokens after the end of the default-argument
2642 expression.
2643
2644 2004-03-01 Mark Mitchell <mark@codesourcery.com>
2645
2646 PR c++/14324
2647 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
2648 having C++ linkage for name-mangling purposes.
2649
2650 PR c++/14260
2651 * parser.c (cp_parser_direct_declarator): Recognize constructor
2652 declarators that use a template-id to name the class being
2653 constructed.
2654
2655 PR c++/14337
2656 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
2657 (tsubst_expr): Do not call tsubst_copy, even when
2658 processing_template_decl.
2659
2660 2004-03-01 Jeff Law <law@redhat.com>
2661
2662 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
2663 the proper type.
2664
2665 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2666
2667 PR c++/14138
2668 * name-lookup.h (push_scope): Change prototype.
2669 * name-lookup.c (push_scope): Do not reenter the current class
2670 scope.
2671 * decl.c (grokfndecl): Check return code from push_scope before
2672 calling pop_scope.
2673 * decl2.c (check_classfn): Likewise.
2674 * parser.c (cp_parser_conversion_function_id): Likewise.
2675 (cp_parser_init_declarator): Likewise.
2676 (cp_parser_direct_declarator): Likewise.
2677 (cp_parser_class_specifier): Likewise.
2678 (cp_parser_class_head): Likewise.
2679 (cp_parser_lookup_name): Likewise.
2680 (cp_parser_constructor_declarator_p): Likewise.
2681 * pt.c (instantiate_class_template): Likewise.
2682 (resolve_typename_type): Likewise.
2683
2684 2004-02-29 Mark Mitchell <mark@codesourcery.com>
2685
2686 PR c++/14267
2687 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
2688 extension.
2689
2690 PR debug/12103
2691 * class.c (update_vtable_entry_for_fn): Do not go through
2692 covariance machinery if the type returned by an overrider is the
2693 same as the original.
2694
2695 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
2696
2697 * call.c: Fix a comment typo.
2698
2699 2004-02-27 Ziemowit Laski <zlaski@apple.com>
2700
2701 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
2702
2703 2004-02-26 Mark Mitchell <mark@codesourcery.com>
2704
2705 PR c++/14278
2706 * parser.c (cp_parser_parameter_declaration_list): Commit
2707 to fewer tentative parses.
2708
2709 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2710
2711 PR c++/14284
2712 * pt.c (dependent_type_p_r): A template template parameter is a
2713 dependent type.
2714
2715 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2716
2717 PR c++/14246
2718 * mangle.c (write_template_arg_literal): Don't rely on identity for
2719 boolean constants.
2720
2721 2004-02-24 Jason Merrill <jason@redhat.com>
2722
2723 * tree.c (build_exception_variant): Use check_qualified_type.
2724
2725 2004-02-23 Zack Weinberg <zack@codesourcery.com>
2726 Kazu Hirata <kazu@cs.umass.edu>
2727
2728 * decl.c (cxx_init_decl_processing): Don't check
2729 flag_writable_strings.
2730
2731 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
2732
2733 PR c++/14156
2734 * typeck.c (maybe_warn_about_returning_address_of_location):
2735 Change check for VAR_DECL to use DECL_P instead.
2736
2737 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2738
2739 PR c++/14250
2740 * cvt.c (build_expr_type_conversion): Type must be complete before
2741 looking up for conversions.
2742
2743 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2744
2745 PR c++/14143
2746 * name-lookup.c (arg_assoc_class): Don't look into template
2747 arguments if it is not a primary template.
2748
2749 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2750
2751 PR c++/12007
2752 * method.c (use_thunk): Always clone function argument tree.
2753
2754 2004-02-20 Mark Mitchell <mark@codesourcery.com>
2755
2756 PR c++/14199
2757 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
2758
2759 PR c++/14173
2760 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
2761 for all type variants.
2762
2763 2004-02-19 Mark Mitchell <mark@codesourcery.com>
2764
2765 PR c++/13927
2766 * decl.c (duplicate_decls): Return error_mark_node for invalid
2767 redeclarations.
2768 * name-lookup.c (push_namespace): Ignore the return value from
2769 pushdecl.
2770 * pt.c (push_template_decl_real): Robustify.
2771
2772 PR c++/14186
2773 * name-lookup.c (push_class_level_binding): Do not complain about
2774 adding a binding for a member whose name is the same as the
2775 enclosing class if the member is located in a base class of the
2776 current class.
2777
2778 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2779
2780 PR c++/14181
2781 * parser.c (cp_parser_new_expression): Parse an ill-formed
2782 direct-new-declarator after a parenthesized type-id to emit good
2783 diagnostic.
2784
2785 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
2786
2787 * cp-tree.def, cvt.c: Update copyright.
2788
2789 2004-02-17 Mark Mitchell <mark@codesourcery.com>
2790
2791 PR c++/11326
2792 * cp-tree.h (abi_version_at_least): Remove.
2793 * mangle.c: Include flags.h.
2794
2795 2004-02-15 Mark Mitchell <mark@codesourcery.com>
2796
2797 PR c++/13971
2798 * call.c (build_conditional_expr): Handle conversions between
2799 class types which result in differently cv-qualified type
2800 variants.
2801
2802 PR c++/14086
2803 * class.c (delete_duplicate_fields_1): Remove.
2804 (delete_duplicate_fields): Likewise.
2805 (finish_struct_anon): Remove check for members with the same name
2806 as their enclosing class.
2807 (check_field_decls): Do not call duplicate_fields.
2808 * decl.c (grokdeclarator): Remove check for static data members
2809 with the same name as their enclosing class.
2810 * name-lookup.c (push_class_level_binding): Check for members with
2811 the same name as their enclosing class.
2812
2813 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
2814
2815 PR c++/14085
2816 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
2817
2818 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2819
2820 PR c++/13635
2821 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
2822 has full set of arguments.
2823
2824 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2825
2826 PR c++/13927
2827 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
2828
2829 2004-02-13 Mark Mitchell <mark@codesourcery.com>
2830
2831 PR c++/14122
2832 * cp-tree.h (delete_sanity): Change prototype.
2833 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
2834 Remove dead code. Adjust code to warn about deleting an array.
2835 * typekc.c (decay_conversion): Use build_address and build_nop.
2836
2837 PR c++/14108
2838 * search.c (accessible_p): Do not check access in thunks.
2839
2840 PR c++/14083
2841 * call.c (build_conditional_expr): Call force_rvalue on the
2842 non-void operand in the case that one result is a throw-expression
2843 and the other is not.
2844
2845 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
2846
2847 PR c++/9851
2848 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
2849 the type name and look ahead for ::~, and bail out early with a
2850 better error message if the parse is going to fail.
2851
2852 2004-02-12 Mark Mitchell <mark@codesourcery.com>
2853
2854 * call.c (conversion_kind): New type.
2855 (conversion_rank): Likewise.
2856 (conversion): Likewise.
2857 (CONVERSION_RANK): New macro.
2858 (conversion_obstack): New variable.
2859 (obstack_initialized): Likewise.
2860 (z_candidate): Change type of convs and second_conv.
2861 (candidate_warning): New type.
2862 (IDENTITY_RANK): Remove.
2863 (EXACT_RANK): Likewise.
2864 (PROMO_RANK): Likewise.
2865 (STD_RANK): Likewise.
2866 (PBOOL_RANK): Likewise.
2867 (USER_RANK): Likewise.
2868 (ELLIPSIS_RANK): Likewise.
2869 (BAD_RANK): Likewise.
2870 (ICS_RANK): Likewise.
2871 (ICS_STD_RANK): Likewise.
2872 (ICS_USER_FLAG): Likewise.
2873 (ICS_ELLIPSIS_FLAG): Likewise.
2874 (ICS_THIS_FLAG): Likewise.
2875 (ICS_BAD_FLAG): Likewise.
2876 (NEED_TEMPORARY_P): Likewise.
2877 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
2878 (USER_CONV_CAND): Likewise.
2879 (USER_CONV_FN): Likewise.
2880 (conversion_obstack_alloc): New function.
2881 (alloc_conversion): Likewise.
2882 (validate_conversion_obstack): Likewise.
2883 (alloc_conversions): Likewise.
2884 (build_conv): Adjust to deal with new conversion data structures.
2885 (build_identity_conv): New function.
2886 (build_ambiguous_conv): Likewise.
2887 (standard_conversion): Adjust to deal with new conversion data
2888 structures.
2889 (convert_class_to_reference): Likewise.
2890 (direct_reference_binding): Likewise.
2891 (reference_binding): Likewise.
2892 (implicit_conversion): Likewise.
2893 (add_candidate): Likewise.
2894 (add_function_candidate): Likewise.
2895 (add_conv_candidate): Likewise.
2896 (build_builtin_candidate): Likewise.
2897 (print_z_candidate): Likewise.
2898 (merge_conversion_sequences): Likewise.
2899 (build_user_type_conversion_1): Likewise.
2900 (build_user_type_conversion): Likewise.
2901 (build_new_function_call): Likewise.
2902 (build_object_call): Likewise.
2903 (conditional_conversion): Likewise.
2904 (build_conditional_expr): Likewise.
2905 (build_new_op): Likewise.
2906 (build_op_delete_call): Likewise.
2907 (convert_like_real): Likewise.
2908 (build_over_call): Likewise.
2909 (build_new_method_call): Likewise.
2910 (is_subseq): Likewise.
2911 (maybe_handle_implicit_object): Likewise.
2912 (maybe_handle_ref_bind): Likewise.
2913 (compare_ics): Likewise.
2914 (source_type): Likewise.
2915 (add_warning): Likewise.
2916 (joust): Likewise.
2917 (can_convert_arg): Likewise.
2918 (can_convert_arg_bad): Likewise.
2919 (perform_implicit_conversion): Likewise.
2920 (perform_direct_initialization_if_possible): Likewise.
2921 (initialize_reference): Likewise.
2922 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
2923 * cp-tree.def (WRAPPER): Likewise.
2924 (IDENTITY_CONV): Remove.
2925 (LVALUE_CONV): Likewise.
2926 (QUAL_CONV): Likewise.
2927 (STD_CONV): Likewise.
2928 (PTR_CONV): Likewise.
2929 (PMEM_CONV): Likewise.
2930 (BASE_CONV): Likewise.
2931 (REF_BIND): Likewise.
2932 (USER_CONV): Likewise.
2933 (AMBIG_CONV): Likewise.
2934 (RVALUE_CONV): Likewise.
2935 * cp-tree.h (tree_wrapper): Remove.
2936 (WRAPPER_ZC): Remove.
2937 (lang_tree_node): Remove wrapper.
2938 (LOOKUP_SPECULATIVELY): Remove.
2939 (build_op_delete_call): Adjust prototype.
2940 (validate_conversion_obstack): Declare.
2941 (build_zc_wrapper): Remove.
2942 * cvt.c (convert_to_reference): Remove dead code.
2943 (ocp_convert): Likewise.
2944 * decl.c (redeclaration_error_message): Correct handling of
2945 templates.
2946 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
2947 (cp_tree_node_structure): Remove WRAPPER case.
2948 * decl2.c (finish_file): Call validate_conversion_obstack.
2949 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
2950 (build_op_delete_call): Likewise.
2951 (build_x_delete): Likewise.
2952 (build_delete): Adjust call to build_op_delete_call.
2953 * pt.c (tsubst_friend_declaration): Adjust code to determine
2954 whether or not a friend template is a definition.
2955 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
2956 * tree.c (build_zc_wrapper): Remove.
2957
2958 2004-02-12 Zack Weinberg <zack@codesourcery.com>
2959
2960 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
2961 * cp-tree.h: Don't declare cxx_builtin_type_decls.
2962 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
2963 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
2964
2965 2004-02-10 Mark Mitchell <mark@codesourcery.com>
2966
2967 * typeck.c (lookup_destructor): Fix typo in error message.
2968
2969 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
2970
2971 * call.c, parser.c, tree.c: Fix comment typos.
2972
2973 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2974
2975 Bug 13856
2976 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
2977 * decl.c (duplicate_decls, start_function): Likewise.
2978
2979 2004-02-07 Zack Weinberg <zack@codesourcery.com>
2980
2981 * name-lookup.c (pushdecl): Issue shadow warnings directly.
2982 * parser.c (free_parser_stacks): Delete.
2983
2984 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
2985
2986 * rtti.c: Update copyright.
2987
2988 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2989
2990 PR c++/14033
2991 * decl.c (require_complete_types_for_parms): Do not insert
2992 error_mark_node in the parameter list.
2993
2994 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2995
2996 PR c++/14028
2997 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
2998 error when terminator can not be found.
2999
3000 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
3001
3002 Make-lang.in (po-generated): Delete.
3003
3004 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
3005
3006 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
3007 targetm.calls.promote_prototypes.
3008
3009 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3010
3011 PR middle-end/13750
3012 Revert:
3013 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3014 PR pch/13361
3015 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3016 (handle_pragma_implementation): Likewise.
3017
3018 2004-02-05 Mark Mitchell <mark@codesourcery.com>
3019
3020 PR c++/13714
3021 * typeck.c (lookup_destructor): Tweak error message.
3022
3023 2004-02-05 Jan Hubicka <jh@suse.cz>
3024
3025 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
3026 functions.
3027
3028 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3029
3030 PR c++/14008
3031 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
3032 code, only emits the diagnostic now. Added lookup of the identifier
3033 and support for qualified ids.
3034 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
3035 Parse an (invalid) type name as id-expression within a declarator.
3036 (cp_parser_simple_declaration): Use it.
3037 (cp_parser_member_declaration): Likewise.
3038 (cp_parser_make_typename_type): New function. Handle errors through
3039 cp_parser_diagnose_invalid_typename.
3040 (cp_parser_elaborated_type_specifier): Use it.
3041
3042 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3043
3044 PR c++/13932
3045 * call.c (convert_like_real): Use "converting" rather than
3046 "argument" as the descriptive keyword to
3047 dubious_conversion_warnings.
3048 * typeck.c (convert_for_assignment): Do not call
3049 dubious_conversion_warnings.
3050
3051 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3052
3053 PR c++/13086
3054 * init.c (build_delete): Emit a more informative error message in
3055 case of an incomplete type, and on the correct source line.
3056
3057 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
3058
3059 * error.c, search.c: Update copyright.
3060
3061 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3062
3063 PR c++/9941
3064 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
3065 linkage for the typeinfo name string.
3066
3067 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3068
3069 PR c++/13969
3070 * cp-tree.h (fold_non_dependent_expr): New function.
3071 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
3072 (cp_parser_template_argument): Use fold_non_dependent_expr.
3073 (cp_parser_direct_declarator): Likewise.
3074 * pt.c (fold_non_dependent_expr): New function.
3075 (convert_nontype_argument): Use it.
3076 (tsubst_qualified_id): Simplify.
3077 (tsubst_copy_and_build): Likewise.
3078
3079 2004-02-04 Mark Mitchell <mark@codesourcery.com>
3080
3081 * decl.c (cxx_push_function_context): Do not set
3082 current_function_is_thunk.
3083 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
3084 actual function.
3085
3086 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3087
3088 PR c++/13997
3089 * pt.c (more_specialized_class): Increase processing_template_decl
3090 while partial ordering.
3091
3092 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3093
3094 PR c++/13925
3095 * decl.c (start_function): Do not call pushdecl for any
3096 instantiation or specialization of a primary template.
3097
3098 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3099
3100 PR c++/13950
3101 * parser.c (cp_parser_class_name): Robustify.
3102
3103 PR c++/13970
3104 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
3105
3106 PR c++/14002
3107 * semantics.c (finish_id_expression): Do not return an
3108 IDENTIFIER_NODE when lookup finds a PARM_DECL.
3109
3110 2004-02-03 Mark Mitchell <mark@codesourcery.com>
3111
3112 PR c++/13978
3113 * pt.c (build_non_dependent_expr): Do not build
3114 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
3115
3116 PR c++/13968
3117 * semantics.c (finish_id_expression): Do not return an
3118 IDENTIFIER_NODE when lookup finds a VAR_DECL.
3119
3120 PR c++/13975
3121 * parser.c (cp_parser_simple_declaration): When skipping to the
3122 end of the statement swallow the terminating semicolon.
3123
3124 2004-02-02 Mark Mitchell <mark@codesourcery.com>
3125
3126 PR c++/13113
3127 * init.c (build_offset_ref): Improve error recovery for invalid
3128 uses of non-static member functions.
3129
3130 PR c++/13854
3131 * cp-tree.h (cp_build_type_attribute_variant): New function.
3132 * class.c (build_clone): Use cp_build_type_attribute_variant.
3133 * decl.c (duplicate_decls): Likewise.
3134 * pt.c (copy_default_args_to_explicit_spec): Likewise.
3135 (tsubst_function_type): Likewise.
3136 * tree.c (build_exception_variant): Check attributes before
3137 concluding that two types are the same.
3138 (cp_build_type-attribute_variant): New method.
3139 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
3140
3141 PR c++/13907
3142 * call.c (convert_class_to_reference): Keep better track of
3143 pedantically invalid user-defined conversions.
3144
3145 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3146
3147 PR c++/13957
3148 * pt.c (tsubst_qualified_id): Improved error message when a type
3149 is expected but not found.
3150
3151 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
3152
3153 * class.c: Fix comment typos.
3154 * decl.c: Likewise.
3155 * error.c: Likewise.
3156 * parser.c: Likewise.
3157 * pt.c: Likewise.
3158 * search.c: Likewise.
3159 * typeck.c: Likewise.
3160
3161 2004-01-30 Richard Henderson <rth@redhat.com>
3162
3163 PR c++/13693
3164 * method.c (use_thunk): Don't force_target_expr for void thunks.
3165 * tree.c (build_target_expr_with_type): Assert non-void type.
3166 (force_target_expr): Likewise.
3167
3168 2004-01-30 Michael Matz <matz@suse.de>
3169
3170 * parser.c (cp_parser_labeled_statement): Accept case ranges.
3171
3172 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3173
3174 DR206
3175 PR c++/13813
3176 * decl.c (grokdeclarator): Check immediatly type completeness for
3177 non-dependent types.
3178
3179 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3180
3181 PR c++/13683
3182 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
3183 a sizeof expression.block
3184
3185 2004-01-29 Mark Mitchell <mark@codesourcery.com>
3186
3187 PR c++/13883
3188 * mangle.c (write_encoding): Correct encoding of member template
3189 constructors.
3190
3191 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3192
3193 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
3194 template name as it was `<::' (digraph typo).
3195 (cp_parser_nth_token_starts_template_argument_list_p): New function.
3196 (cp_parser_id_expression): Use it.
3197 (cp_parser_nested_name_specifier_opt): Likewise.
3198 (cp_parser_template_name): Likewise.
3199 (cp_parser_class_name): Likewise.
3200 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
3201
3202 2004-01-28 Mark Mitchell <mark@codesourcery.com>
3203
3204 PR c++/13791
3205 * typeck.c (merge_types): Do not merge attributes into
3206 TYPENAME_TYPEs.
3207
3208 PR c++/13736
3209 * parser.c (cp_parser_direct_declarator): Do not prevent
3210 backtracking inside a parenthesized declarator.
3211 (cp_parser_parameter_declaration): Fix typo in comment.
3212
3213 2004-01-28 Jan Hubicka <jh@suse.cz>
3214
3215 * semantics.c (expand_body) Do emit_associated_thunks before
3216 expansion.
3217
3218 2004-01-27 Devang Patel <dpatel@apple.com>
3219
3220 * name-lookup.c: Include "debug.h"
3221 (do_namespace_alias): Invoke debug_hooks to emit debug info
3222 for namespace alias.
3223 (do_local_using_decl): Invoke debug_hooks to emit debug info
3224 for using decl.
3225 (do_class_using_decl): Same.
3226 (do_toplevel_using_decl): Same.
3227 (do_using_directive): Same.
3228 (cp_emit_debug_info_for_using): New function.
3229 * Make-lang.in (cp/parser.o): Depend on debug.h
3230 (cp/name-lookup.o): Same.
3231
3232 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3233
3234 * cp-tree.h (language_function, lang_type_header): Use
3235 BOOL_BITFIELD.
3236 * name-lookup.h (cp_binding_level): Likewise.
3237
3238 2004-01-26 Mark Mitchell <mark@codesourcery.com>
3239
3240 PR c++/13663
3241 * semantics.c (finish_for_expr): Check for unresolved overloaded
3242 functions.
3243
3244 * class.c (add_method): Just check processing_template_decl to
3245 determine whether or not we are within a template.
3246 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3247 * init.c (decl_constant_value): Check the type of the declaration,
3248 not TREE_READONLY.
3249 * name-lookup.c (maybe_push_to_top_level): Rename to ...
3250 (push_to_top_level): ... this.
3251 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
3252 * pt.c (push_template_decl_real): Reorder condition for speed.
3253 (convert_template_argument): Use dependency-checking functions in
3254 place of uses_template_parms.
3255 (lookup_template_class): Avoid calling uses_template_parms more
3256 than once.
3257 (uses_template_parms): Reimplement, using dependency-checking
3258 functions.
3259 (instantiate_class_template): Use push_to_top_level, not
3260 maybe_push_to_top_level.
3261 (type_unification_real): Simplify.
3262 (type_dependent_expression_p): Handle OFFSET_REFs and
3263 TEMPLATE_DECLs.
3264 (any_dependent_template_arguments_p): Handle multiple levels of
3265 template argument.
3266 * semantics.c (expand_or_defer_fn): Do not check
3267 uses_template_parms for template instantiations.
3268 * typeck.c (comptypes): Avoid calling cp_type_quals.
3269
3270 2004-01-25 Mark Mitchell <mark@codesourcery.com>
3271
3272 PR c++/13833
3273 * call.c (build_over_call): Do not convert arguments when
3274 processing a template.
3275 * pt.c (build_non_dependent_expr): Do not build a
3276 NON_DEPENDENT_EXPR for arithmetic constants.
3277
3278 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3279
3280 PR c++/13810
3281 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
3282 returns a TYPE_DECL. no further lookup is required.
3283 * semantics.c (check_template_template_default_arg): A TYPE_DECL
3284 is invalid. Rework to give better diagnostics.
3285
3286 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3287
3288 PR c++/13797
3289 * pt.c (instantiate_class_template): Add an error_mark_node
3290 check.
3291 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
3292
3293 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
3294
3295 PR c++/13701
3296 * decl.c (finish_function): Move the call to
3297 finish_fname_decls below the call to
3298 finish_eh_spec_block.
3299
3300 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3301
3302 * optimize.c, typeck2.c: Update copyright.
3303
3304 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
3305
3306 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
3307 init.c, mangle.c, typeck.c: Update copyright.
3308
3309 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
3310
3311 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
3312
3313 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3314
3315 * Make-lang.in: Replace $(docdir) with doc.
3316 (c++.info, c++.srcinfo): Dummy entry.
3317 (c++.man, c++.srcman): New rules.
3318 (c++.install-man): Revamp rule.
3319
3320 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
3321
3322 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
3323 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
3324 immediate $(shell) instead of deferred backquote.
3325
3326 2004-01-19 Mark Mitchell <mark@codesourcery.com>
3327
3328 PR c++/13651
3329 * parser.c (cp_parser_postfix_expression): When encountering
3330 incomplete type on left-hand side of "->" or ".", treat the entire
3331 expression as erroneous.
3332
3333 PR c++/13592
3334 * call.c (build_field_call): Remove.
3335 (n_build_method_call): Likewise.
3336 (build_method_call): Likewise.
3337 (build_new_method_call): Do not call build_field_call.
3338 * class.c (n_build_method_call): Remove.
3339 (print_class_statistics): Do not print it.
3340 * cp-tree.h (build_method_call): Remove declaration.
3341 (finish_object_call_expr): Likewise.
3342 (build_new_1): Do not use build_method_call.
3343 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
3344 when the function appearing on the right-hand-side of "." or "->"
3345 is not actually a function.
3346 * pt.c (tsubst_copy_and_build): Likewise.
3347 * semantics.c (finish_object_call_expr): Remove.
3348
3349 2004-01-18 Mark Mitchell <mark@codesourcery.com>
3350
3351 PR c++/13710
3352 * pt.c (tsubst): Use finish_typeof.
3353
3354 2004-01-18 Jason Merrill <jason@redhat.com>
3355
3356 PR c++/11725
3357 * except.c (build_throw): In a template, set
3358 current_function_returns_abnormally.
3359
3360 2004-01-17 Fred Fish <fnf@intrinsity.com>
3361
3362 PR c++/11895
3363 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
3364 except don't call array_type_nelts() with a VECTOR_TYPE.
3365
3366 2004-01-16 Jan Hubicka <jh@suse.cz>
3367
3368 * mangle.c (write_mangled_name): Remove inline modifier.
3369
3370 2004-01-16 Mark Mitchell <mark@codesourcery.com>
3371
3372 PR c++/13574
3373 * decl.c (compute_array_index_type): Fix grammar in comment.
3374 * init.c (build_zero_init): Handle zero-sized arrays correctly.
3375
3376 PR c++/13178
3377 * call.c (name_as_c_string): Print conversion operator names
3378 correctly.
3379
3380 PR c++/13478
3381 * call.c (initialize_reference): Pass -1 for inner parameter to
3382 convert_like_real.
3383
3384 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3385
3386 PR c++/13407
3387 * parser.c (cp_parser_base_specifier): Check for an invalid
3388 keyword `typename' and emit an user-friendly error message.
3389
3390 2004-01-15 Geoffrey Keating <geoffk@apple.com>
3391
3392 PR pch/13361
3393 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3394 (handle_pragma_implementation): Likewise.
3395
3396 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3397
3398 PR c++/9259
3399 * typeck.c (build_class_member_access_expr): Allow to access members
3400 of the currently open class.
3401 (finish_class_member_access_expr): Likewise.
3402
3403 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3404
3405 PR c++/13659
3406 * name-lookup.c (validate_nonmember_using_decl): Take scope and
3407 name by value, instead of computing them.
3408 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
3409 arguments. Pass them to validate_nonmember_using_decl.
3410 * name-lookup.h (do_local_using_decl): Adjust.
3411 (do_toplevel_using_decl): Likewise.
3412 * parser.c (cp_parser_using_declaration): Likewise.
3413 * pt.c (tsubst_expr): Likewise.
3414
3415 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
3416
3417 PR c++/13594
3418 PR c++/13658
3419 * name-lookup.c (qualified_lookup_using_namespace): Search
3420 strongly-associated namespaces first, and only then try other
3421 namespaces.
3422
3423 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
3424
3425 * Make-lang.in (c++.srcextra): Dummy entry.
3426
3427 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3428
3429 PR c++/8856
3430 * parser.c (cp_parser_template_name): Don't try to parse a
3431 conversion-function-id, as it cannot be a template-name.
3432 (cp_parser_simple_type_specifier): Check for invalid template-ids
3433 even after a built-in type.
3434
3435 2004-01-14 Jan Hubicka <jh@suse.cz>
3436
3437 PR c++/12850
3438 * pt.c (instantiate_decl): Do not increase function_depth.
3439
3440 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
3441
3442 PR c++/9021
3443 PR c++/11005
3444 * parser.c (cp_parser_elaborated_type_specifier): Warn about
3445 attributes and discard.
3446 * decl.c (xref_tag): Don't overwite existing attributes with
3447 NULL_TREE.
3448
3449 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3450
3451 PR c++/12335
3452 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
3453 is no destructor while looking up a BIT_NOT_EXPR.
3454
3455 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
3456
3457 * cxxfilt.c: Remove unused file.
3458
3459 2004-01-14 Jan Hubicka <jh@suse.cz>
3460
3461 Partial fix to PR c++/12850
3462 * decl2.c (mark_used): Do not proactively instantiate templates
3463 when compiling in unit-at-a-time or not optimizing.
3464 * optimize.c (maybe_clone_body): Do not increase function depth.
3465
3466 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3467
3468 PR c++/13474
3469 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
3470
3471 2004-01-12 Steven Bosscher <stevenb@suse.de>
3472
3473 PR c++/13558
3474 * parser.c (cp_parser_member_declaration): Any non-type is also
3475 not a class or a function.
3476
3477 2004-01-12 Jason Merrill <jason@redhat.com>
3478
3479 PR c++/12815
3480 * class.c (build_base_path): Do not mark vtable references as
3481 TREE_CONSTANT.
3482 (build_vtbl_ref_1): Likewise.
3483
3484 2004-01-12 Richard Henderson <rth@redhat.com>
3485
3486 PR opt/10776
3487 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
3488 (store_init_value): Use it.
3489 * decl.c (check_initializer): Expect full initialization code
3490 from store_init_value.
3491 * init.c (expand_aggr_init_1): Likewise.
3492 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
3493
3494 2004-01-12 Mark Mitchell <mark@codesourcery.com>
3495
3496 * class.c (layout_class_type): For non-POD class types, also copy
3497 the DECL_SIZE and DECL_MODE of fields to the base class type.
3498
3499 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3500
3501 PR c++/13289
3502 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
3503 calling regenerate_decl_from_template.
3504
3505 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
3506
3507 PR c++/4100
3508 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
3509 decl-specifier occurring along with a class definition.
3510
3511 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
3512
3513 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
3514 clauses to comments describing declares_class_or_enum.
3515 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
3516 false.
3517
3518 2004-01-12 Jan Hubicka <jh@suse.cz>
3519
3520 * pt.c (for_each_template_parm): Do not check for duplicates.
3521 (for_each_template_parm): Use walk_tree duplicate checking code.
3522
3523 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
3524
3525 PR c++/3478
3526 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
3527 is error_mark_node, don't add any more decl_specs.
3528 (cp_parser_init_declarator): After committing to a declaration, if
3529 the decl_specifiers start with error_mark_node, issue an error and
3530 change the type to "int".
3531
3532 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
3533
3534 PR bootstrap/7817
3535 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
3536
3537 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3538
3539 DR 337
3540 PR c++/9256
3541 * pt.c (tsubst): Substitution must fail if we are attempting to
3542 create an array with element type that is an abstract class type.
3543 * decl.c (cp_finish_decl): Strip pointers and array types recursively
3544 before calling abstract_virtuals_error.
3545
3546 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
3547
3548 * name-lookup.c (qualified_lookup_using_namespace): Consider
3549 strong using directives even if we've already found a binding.
3550
3551 2004-01-09 Mark Mitchell <mark@codesourcery.com>
3552
3553 * cp-tree.h (cxx_expand_expr): Change prototype.
3554 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
3555
3556 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3557
3558 PR c++/12573
3559 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
3560 looking into them recursively. They can be there because of the
3561 new __offsetof__ extension.
3562
3563 2004-01-07 Zack Weinberg <zack@codesourcery.com>
3564
3565 * parser.c (cp_parser_save_member_function_body): Mark the
3566 definition static.
3567
3568 2004-01-05 Mark Mitchell <mark@codesourcery.com>
3569
3570 PR c++/13057
3571 * class.c (build_clone): Copy type attributes from the original
3572 function to the clone.
3573
3574 PR c++/12815
3575 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
3576 references as constant.
3577
3578 PR c++/12132
3579 * parser.c (cp_parser_explicit_instantiation): Improve error
3580 recovery.
3581 (cp_parser_require): Improve indication of the error location.
3582
3583 PR c++/13451
3584 * parser.c (cp_parser_class_head): Reorder logic to check for
3585 invalid qualification.
3586
3587 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3588
3589 PR c++/13157
3590 * name-lookup.c (lookup_using_namespace): Remove spacesp
3591 parameter.
3592 (unqualified_namespace_lookup): Likewise.
3593 (lookup_qualified_name): Adjust accordingly.
3594 (lookup_name_real): Likewise.
3595 (lookup_arg_dependent): Do not eliminate the namespace of the
3596 functions found by unqualified name lookup unless that is the
3597 current namespace.
3598
3599 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
3600
3601 * semantics.c (push_deferring_access_checks): Fix format.
3602 (resume_deferring_access_checks): Likewise.
3603 (stop_deferring_access_checks): Likewise.
3604 (pop_deferring_access_checks): Likewise.
3605 (get_deferred_access_checks): Likewise.
3606 (pop_to_parent_deferring_access_checks): Likewise.
3607 (perform_deferred_access_checks): Likewise.
3608 (perform_or_defer_access_check): Likewise.
3609
3610 2004-01-04 Richard Henderson <rth@redhat.com>
3611
3612 * call.c (build_over_call): Don't create a save_expr of an
3613 aggregate, but rather its address.
3614
3615 2004-01-04 Mark Mitchell <mark@codesourcery.com>
3616
3617 PR c++/13529
3618 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
3619 an offsetof expression.
3620
3621 * parser.c (cp_parser_parameter_declaration): Fix comment.
3622
3623 PR c++/12226
3624 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
3625 (reference_binding): Set it when appropriate.
3626 (build_temp): New function, split out from ...
3627 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
3628 (initialize_reference): Likewise.
3629
3630 PR c++/13536
3631 * parser.c (cp_parser): Add in_type_id_in_expr_p.
3632 (cp_parser_new): Initialize it.
3633 (cp_parser_postfix_expression): Set it.
3634 (cp_parser_sizeof_operand): Likewise.
3635 (cp_parser_parameteR_declaration): Do not commit early to tenative
3636 parsers when in_type_id_in_expr_p is set.
3637
3638 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3639
3640 PR c++/13094
3641 * parser.c (cp_parser_template_argument): Don't call
3642 make_unbound_class_template directly.
3643 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
3644 UNBOUND_CLASS_TEMPLATE tree node.
3645
3646 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
3647
3648 PR target/12729
3649 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
3650
3651 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3652
3653 PR c++/13520
3654 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
3655 (DECL_FUNCTION_TEMPLATE_P): Use it.
3656 (DECL_CLASS_TEMPLATE_P): Likewise.
3657 * parser.c (cp_parser_lookup_name): Add is_template parameter.
3658 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
3659 (cp_parser_template_name): Likewise.
3660 (cp_parser_elaborated_type_specifier): Likewise.
3661 (cp_parser_namespace_name): Likewise.
3662 (cp_parser_class_name): Likewise.
3663 (cp_parser_lookup_name_simple): Likewise.
3664
3665 See ChangeLog.3 for earlier changes.
This page took 0.170166 seconds and 6 git commands to generate.