]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
re PR c++/21151 (ICE when compiling c++ PCH of class definition within template funct...
[gcc.git] / gcc / cp / ChangeLog
1 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
2
3 PR c++/21151
4 * name-lookup.c (pushtag): Push local class even in a template.
5
6 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
7
8 PR c++/21165
9 * init.c (integral_constant_value): Check the type of the
10 initializer, not the decl.
11
12 2005-05-30 Mark Mitchell <mark@codesourcery.com>
13
14 PR c++/21784
15 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
16 functions, even when the used name is not a function.
17
18 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
19
20 * operators.def, optimize.c: Update copyright.
21
22 2005-05-28 Mark Mitchell <mark@codesourcery.com>
23
24 PR c++/21210
25 * call.c (standard_conversion): Permit conversions to complex
26 types if conversion to the corresponding scalar type would be
27 permitted.
28
29 PR c++/21340
30 * method.c (implicitly_declare_fn): Clear processing_template_decl
31 when generating implicit declaration.
32
33 2005-05-27 Mark Mitchell <mark@codesourcery.com>
34
35 PR c++/21614
36 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
37 conversions to base classes of incomplete types.
38
39 2005-05-27 Ian Lance Taylor <ian@airs.com>
40
41 * semantics.c (add_stmt): Add C++ frontend specific version.
42 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
43 (stmts_are_full_exprs_p): Declare.
44
45 2005-05-27 Roger Sayle <roger@eyesopen.com>
46 Giovanni Bajo <giovannibajo@gcc.gnu.org>
47
48 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
49 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
50 of CONVERT_EXPR.
51 (cp_parser_unary_expression): Likewise.
52 * typeck.c (build_unary_op): Likewise.
53 * call.c (add_builtin_candidate, build_new_op): Likewise.
54 * error.c (dump_expr): Likewise.
55 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
56 * decl.c (ambi_op_p, grok_op_properties): Likewise.
57 * dump.c (dump_op): Likewise.
58 * lex.c (init_operators): Likewise.
59 * operators.def ("+"): Likewise.
60 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
61 conversion, if the result and argument types differ.
62 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
63 like a NOP_EXPR when !processing_template_decl.
64
65 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
66 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
67
68 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
69
70 PR c++/21455
71 * typeck.c (get_delta_difference): Cope with incomplete but equal
72 classes. Reorder if.
73
74 PR c++/21681
75 * parser.c (cp_parser_late_parsing_for_member): Disable access
76 checking for template functions.
77
78 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
79
80 PR c++/21768
81 * pt.c (redeclare_class_template): Change error message according
82 to coding conventions.
83
84 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
85
86 * call.c (build_op_delete_call): Fix quoting in error message.
87
88 2005-05-25 Richard Henderson <rth@redhat.com>
89
90 PR libgcj/21692
91 * cp-tree.h (make_alias_for): Declare.
92 * decl2.c (build_java_method_aliases): New.
93 (cp_finish_file): Call it.
94 * method.c (make_alias_for): Split out from ...
95 (make_alias_for_thunk): ... here.
96
97 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
98
99 PR c++/21686
100 * semantics.c (finish_id_expression): Fix quoting in error message.
101
102 2005-05-25 DJ Delorie <dj@redhat.com>
103
104 * decl.c (duplicate_decls): Move warning control from if() to
105 warning(OPT_*).
106 * name-lookup.c (parse_using_directive): Likewise.
107 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
108 (cp_parser_init_declarator): Likewise.
109 * tree.c (handle_com_interface_attribute): Likewise.
110
111 2005-05-24 Ziemowit Laski <zlaski@apple.com>
112
113 * class.c (layout_class_type): Do not issue C++ ABI warnings
114 for ObjC structs.
115 * decl.c (objc_mark_locals_volatile): Streamline by calling
116 objc_volatilize_decl().
117 * parser.c (cp_parser_objc_message_expression): Allow simple
118 type specifiers (instead of merely type names) as message
119 receivers.
120 * pt.c (template_args_equal): Do not call objc_comptypes().
121 * typeck.c (composite_pointer_type): If both pointers are
122 ObjC-esque, arbitrarily choose the first; do not call
123 objc_comptypes().
124 (comptypes): Do not call objc_comptypes().
125 (convert_for_assignment): Call objc_compare_types().
126 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
127 concluding that types do not match.
128
129 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
130
131 PR C++/21645
132 * optimize.c (update_cloned_parm): Copy the TYPE also from the
133 original one.
134
135 2005-05-19 Jakub Jelinek <jakub@redhat.com>
136
137 PR c++/21495
138 * decl.c (grokdeclarator): Fix "storage class specified for"
139 error reporting.
140
141 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
142
143 * parser.c: Fix comment typos.
144
145 2005-05-18 Geoffrey Keating <geoffk@apple.com>
146
147 * Make-lang.in (cc1plus-dummy): New.
148 (cc1plus-checksum.c): New.
149 (cc1plus-checksum.o): New.
150 (cc1plus): Add cc1plus-checksum.o.
151
152 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
153
154 PR C++/19664
155 * decl2.c (determine_visibility): Don't set visibility to
156 hidden if it has been set explicitly by user.
157
158 2005-05-17 Ziemowit Laski <zlaski@apple.com>
159 Mike Stump <mrs@apple.com>
160
161 Yet more Objective-C++...
162
163 * cp-objcp-common.h (cxx_get_alias_set): Move from
164 here...
165 (cxx_warn_unused_global_decl): Likewise.
166 (cp_expr_size): Likewise.
167 (cp_tree_size): Likewise.
168 (cp_var_mod_type_p): Likewise.
169 (cxx_initialize_diagnostics): Likewise.
170 (cxx_types_compatible_p): Likewise.
171 * cp-tree.h: to here.
172 (do_poplevel): Add.
173 * lex.c (D_OBJC): Add.
174 (init_reswords): Add.
175 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
176 * parser.c: Add c-common.h include.
177 * pt.c: Add c-common.h and cp-objcp-common.h includes.
178 (template_args_equal): Use objc_comptypes as well.
179 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
180 * semantics.c (do_poplevel): Remove static.
181
182 * decl.c (objc_mark_locals_volatile): Don't change decls that are
183 already ok.
184 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
185 Objective C++ early enough.
186 * lex.c (struct resword reswords): Add Objective-C++ support.
187 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
188 (cp_parser_objc_message_receiver): Add.
189 (cp_parser_objc_message_args): Likewise.
190 (cp_parser_objc_message_expression): Likewise.
191 (cp_parser_objc_encode_expression): Likewise.
192 (cp_parser_objc_defs_expression): Likewise.
193 (cp_parser_objc_protocol_expression): Likewise.
194 (cp_parser_objc_selector_expression): Likewise.
195 (cp_parser_objc_expression): Likewise.
196 (cp_parser_objc_visibility_spec): Likewise.
197 (cp_parser_objc_method_type): Likewise.
198 (cp_parser_objc_protocol_qualifiers): Likewise.
199 (cp_parser_objc_typename): Likewise.
200 (cp_parser_objc_selector_p): Likewise.
201 (cp_parser_objc_selector): Likewise.
202 (cp_parser_objc_method_keyword_params): Likewise.
203 (cp_parser_objc_method_tail_params_opt): Likewise.
204 (cp_parser_objc_interstitial_code): Likewise.
205 (cp_parser_objc_method_signature): Likewise.
206 (cp_parser_objc_method_prototype_list): Likewise.
207 (cp_parser_objc_method_definition_list): Likewise.
208 (cp_parser_objc_class_ivars): Likewise.
209 (cp_parser_objc_identifier_list): Likewise.
210 (cp_parser_objc_alias_declaration): Likewise.
211 (cp_parser_objc_class_declaration): Likewise.
212 (cp_parser_objc_protocol_declaration): Likewise.
213 (cp_parser_objc_protocol_refs_opt): Likewise.
214 (cp_parser_objc_superclass_or_category): Likewise.
215 (cp_parser_objc_class_interface): Likewise.
216 (cp_parser_objc_class_implementation): Likewise.
217 (cp_parser_objc_end_implementation): Likewise.
218 (cp_parser_objc_declaration): Likewise.
219 (cp_parser_objc_try_catch_finally_statement): Likewise.
220 (cp_parser_objc_synchronized_statement): Likewise.
221 (cp_parser_objc_throw_statement): Likewise.
222 (cp_parser_objc_statement): Likewise.
223 (cp_parser_primary_expression): Add Objective-C++.
224 (cp_parser_statement): Likewise.
225 (cp_parser_declaration): Likewise.
226 (cp_parser_simple_type_specifier): Likewise.
227 (cp_parser_type_name): Likewise.
228 (cp_parser_parameter_declaration_list): Likewise.
229 (cp_parser_member_declaration) Likewise.
230 * tree.c: Include debug.h.
231 * typeck.c (composite_pointer_type): Add Objective-C++ support.
232 (finish_class_member_access_expr): Likewise.
233 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
234 (build_modify_expr): Allow objc to generate write barriers.
235
236 * Make-lang.in (cp/tree.o): Add debug.h.
237 * tree.c (lvalue_p_1, case CONST_DECL): Add.
238
239 2005-05-18 Jan Hubicka <jh@suse.cz>
240
241 * method.c: Include tree-pass.h
242 (use_thunk): Lower body before expanding.
243
244 2005-05-17 Jakub Jelinek <jakub@redhat.com>
245
246 PR c++/21454
247 * decl.c (maybe_deduce_size_from_array_init): Call
248 cp_apply_type_quals_to_decl after completing array type.
249
250 2005-05-16 Richard Henderson <rth@redhat.com>
251
252 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
253 (build_library_fn): ... here.
254
255 2005-05-12 Ian Lance Taylor <ian@airs.com>
256
257 * cp-tree.h (cp_stmt_codes): Don't define.
258 (statement_code_p): Declare.
259 (STATEMENT_CODE_P): Define.
260 * lex.c (statement_code_p): Define.
261 (cxx_init): Use actual codes in stmt_codes initializer, not
262 cp_stmt_codes macro. Initialize statement_code_p directly, rather
263 than using INIT_STATEMENT_CODES.
264
265 2005-05-09 Mark Mitchell <mark@codesourcery.com>
266
267 * typeck.c (build_unary_op): Do not resort to address arithmetic
268 when taking the address of a COMPONENT_REF.
269
270 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
271
272 * class.c (vtbl_init_data_s): Change the type of fns to
273 VEC(tree,gc)*.
274 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
275 Use VEC instead of VARRAY.
276
277 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
278
279 * mangle.c: Remove a reference to the MIPS -mint64 option.
280
281 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
282
283 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
284 VARRAY.
285 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
286 * name-lookup.h (cp_binding_level): Change the type of
287 static_decls to VEC(tree,gc)*.
288
289 * mangle.c (globals): Change the type of substitutions to
290 VEC(tree,gc)*.
291 (dump_substitution_candidates, add_substitution,
292 find_substitution, finish_mangling, init_mangle): Use VEC
293 instead of VARRAY.
294
295 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
296
297 * decl2.c (spew_debug): Remove.
298
299 * decl2.c (ssdf_decls, start_static_storage_duration_function,
300 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
301
302 * decl2.c (pending_statics, note_vague_linkage_var,
303 cp_finish_file): Use VEC instead of VARRAY.
304 (pending_statics_used): Remove.
305
306 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
307
308 * decl2.c (deferred_fns, note_vague_linkage_fn,
309 cp_finish_file): Use VEC instead of VARRAY.
310
311 2005-05-05 Mark Mitchell <mark@codesourcery.com>
312
313 PR c++/21352
314 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
315
316 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
317
318 * pt.c: Fix a comment typo.
319
320 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
321
322 * cp-tree.h (language_function): Change the type of
323 x_local_names to VEC.
324 * decl.c (push_local_name): Adjust uses of local_names.
325
326 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
327
328 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
329
330 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
331
332 * class.c (local_classes, init_class_processing): Use VEC
333 instead of VARRAY.
334 * cp-tree.h (local_classes): Likewise.
335 * mangle.c (discriminator_for_local_entity): Likewise.
336 * name-lookup.c (pushtag): Likewise.
337
338 * class.c (current_lang_depth, push_lang_context,
339 pop_lang_context): Use VEC instead of VARRAY.
340 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
341 VARRAY.
342 * name-lookup.c (push_to_top_level): Use VEC instead of
343 VARRAY.
344
345 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
346
347 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
348 for BUILT_IN_MD built-ins.
349
350 2005-05-02 Michael Matz <matz@suse.de>
351
352 PR c++/19542
353 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
354 common frontend.
355 (null_node): Remove.
356 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
357
358 2005-04-25 Ian Lance Taylor <ian@airs.com>
359
360 * cp-tree.def: Add EXPR_STMT.
361 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
362 (EXPR_STMT_EXPR): Define.
363 * cp-gimplify.c: Include "flags.h".
364 (gimplify_expr_stmt): New static function.
365 (cp_gimplify_expr): Handle EXPR_STMT.
366 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
367 rather than pp_expression.
368 (pp_cxx_statement): Handle EXPR_STMT.
369 * dump.c (cp_dump_tree): Handle EXPR_STMT.
370 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
371 initializer.
372
373 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
374
375 PR C++/21188
376 * rtti.c (ifnonnull): Cast the zero comparison operand
377 to the correct type.
378
379 2005-04-24 Jakub Jelinek <jakub@redhat.com>
380
381 PR middle-end/20991
382 * class.c: Include cgraph.h.
383 (cp_fold_obj_type_ref): Set node->local.vtable_method.
384 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
385
386 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
387
388 * mangle.c (write_builtin_type): Handle integer types which are
389 not one of the shared integer type nodes and emit a "vendor
390 extended builtin type" with an encoding in the form of "u5int96".
391
392 2005-04-24 Ian Lance Taylor <ian@airs.com>
393
394 * cp-tree.def (USING_STMT): Change class to tcc_statement.
395 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
396 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
397 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
398
399 2005-04-23 DJ Delorie <dj@redhat.com>
400
401 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
402 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
403 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
404 callers.
405
406 2005-04-22 Per Bothner <per@bothner.com>
407
408 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
409 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
410
411 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
412
413 PR c++/21087
414 * name-lookup.c (push_overloaded_decl): Do not overload with
415 non-duplicate anticipated built-in.
416
417 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
418
419 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
420 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
421
422 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
423
424 * cp-tree.h: Adjust for new VEC API.
425 Define VEC(tree_pair_s,gc).
426 (struct save_scope): Adjust.
427 (struct lang_type_class): Adjust.
428 (unemitted_tinfo_decls): Adjust.
429 * class.c (add_method, resort_type_method_vec,
430 finish_struct_methods, struct find_final_overrider_data,
431 dfs_find_final_overrider_pre, find_final_overrider,
432 get_vcall_index, warn_hidden, walk_subobject_offsets,
433 check_methods, fixup_inline_methods, end_of_class,
434 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
435 add_vcall_offset): Adjust.
436 * decl.c (xref_basetypes, finish_method): Adjust.
437 * decl2.c (check_classfn): Adjust.
438 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
439 * method.c (do_build_copy_constructor): Adjust.
440 * name-lookup.c (new_class_binding, store_binding,
441 store_bindings, store_class_bindings): Adjust.
442 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
443 VEC(cp_class_binding,gc).
444 (struct cp_binding_level): Adjust.
445 * parser.c: Define VEC(cp_token_position,heap).
446 (struct cp_lexer): Adjust.
447 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
448 cp_lexer_save_tokens): Adjust.
449 * pt.c (retrieve_specialization,
450 check_explicit_specialization): Adjust.
451 * rtti.c (unemitted_tinfo_decls): Adjust.
452 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
453 get_pseudo_ti_desc): Adjust.
454 * search.c (dfs_access_in_type, lookup_conversion_operator,
455 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
456 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
457 * semantics.c: Define VEC(deferred_access,gc).
458 (push_deferring_access_checks): Adjust.
459 * typeck2.c (abstract_virtuals_error): Adjust.
460
461 2005-04-20 Ian Lance Taylor <ian@airs.com>
462
463 * cp-tree.def: Add STMT_EXPR.
464 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
465 (STMT_EXPR_STMT): Define.
466 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
467 STMT_EXPR.
468 (pp_cxx_expression): Likewise.
469 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
470 * dump.c (cp_dump_tree): Handle STMT_EXPR.
471
472 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
473
474 * decl.c (expand_static_init): Call build2 and build3 instead
475 of build.
476
477 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
478
479 2005-04-17 Ian Lance Taylor <ian@airs.com>
480
481 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
482 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
483 ARROW_EXPR.
484 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
485 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
486 ALIGNOF_EXPR.
487 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
488 c_sizeof_or_alignof_type for change in parameter type.
489
490 2005-04-16 Mark Mitchell <mark@codesourcery.com>
491
492 PR c++/21025
493 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
494 which sizeof/alignof is dependent, rather than just whether we are
495 processing_template_decl.
496
497 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
498
499 * cp-tree.h (LOOKUP_GLOBAL): Remove.
500 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
501 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
502 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
503 their values.
504
505 2005-04-15 Richard Henderson <rth@redhat.com>
506
507 PR middle-end/14311
508 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
509
510 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
511
512 * cp-tree.h (lang_type_class): Remove redefined. Move
513 java_interface into where redefined was. Increment the width
514 of dummy.
515 (TYPE_REDEFINED): Remove.
516
517 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
518
519 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
520 CLASSTYPE_TEMPLATE_LEVEL): Remove.
521
522 2005-04-11 Mark Mitchell <mark@codesourcery.com>
523
524 * decl2.c (determine_visibility): Don't use export_class_data.
525 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
526 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
527
528 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
529
530 * cp-tree.h (cxx_alignof): Remove.
531
532 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
533
534 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
535 CONV_STATIC_CAST): Remove.
536
537 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
538
539 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
540
541 * cp-tree.h (cp_deprecated): Remove.
542
543 2005-04-08 Ian Lance Taylor <ian@airs.com>
544
545 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
546 CONTINUE_STMT, SWITCH_STMT.
547 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
548 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
549 (WHILE_COND, WHILE_BODY): Define.
550 (DO_COND, DO_BODY): Define.
551 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
552 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
553 * cp-gimplify.c (enum bc_t): Define.
554 (struct cp_gimplify_ctx, ctxp): Define.
555 (push_context, pop_context): New static functions.
556 (begin_bc_block, finish_bc_block): New static functions.
557 (build_bc_goto): New static function.
558 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
559 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
560 (gimplify_switch_stmt): Likewise.
561 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
562 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
563 (cp_genericize): Call push_context and pop_context.
564 * semantics.c (finish_break_stmt): Just call build_stmt
565 (BREAK_STMT) rather than build_break_stmt.
566 (finish_continue_stmt): Corresponding change.
567 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
568 parameters.
569 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
570 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
571 * dump.c (cp_dump_tree): Likewise.
572
573 2005-04-08 Mark Mitchell <mark@codesourcery.com>
574
575 PR c++/20905
576 * parser.c (cp_parser_type_specifier_seq): Add is_condition
577 parameter.
578 (cp_parser_new_type_id): Pass it.
579 (cp_parser_condition): Likewise.
580 (cp_parser_conversion_type_id): Likewise.
581 (cp_parser_type_id): Likewise.
582 (cp_parser_type_specifier_seq): In a condition, do not allow
583 invalid type-specifier combinations.
584 (cp_parser_exception_declaration): Adjust call to
585 cp_parser_type_specifier_seq.
586
587 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
588 * cp-tree.h (struct tinst_level): Add in_system_header_p.
589 (TINST_IN_SYSTEM_HEADER_P): New macro.
590 (make_tinst_level): Remove.
591 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
592 the instantiated class.
593 (push_tinst_level): Do not use make_tinst_level. Set
594 TINST_IN_SYSTEM_HEADER_P.
595 (pop_tinst_level): Likewise.
596 (instantiate_class_template): Set in_system_header.
597 (instantiate_pending_templates): Likewise.
598 * tree.c (make_tinst_level): Remove.
599
600 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
601
602 * decl.c (start_decl): Apply pending #pragma weak regardless of
603 scope.
604
605 2005-04-06 Mark Mitchell <mark@codesourcery.com>
606
607 PR c++/20212
608 * pt.c (regenerate_decl_from_template): Copy attributes for
609 parameters from the pattern to the instantiation.
610
611 2005-04-05 Mark Mitchell <mark@codesourcery.com>
612
613 PR c++/20734
614 * cp-tree.def (OFFSET_REF): Correct comments.
615 * init.c (build_offset_ref): Remove misleading comment.
616 * typeck.c (build_unary_op): Handle pointer-to-member creation
617 here, rather than ...
618 (unary_complex_lvalue): ... here.
619
620 2005-04-06 Jason Merrill <jason@redhat.com>
621
622 PR c++/19312
623 * tree.c (stabilize_init): Don't bother trying to stabilize
624 something with no side-effects.
625
626 2005-04-05 Mark Mitchell <mark@codesourcery.com>
627
628 PR c++/20763
629 * decl.c (grokdeclarator): Correct attribute handling.
630
631 2005-04-05 Mark Mitchell <mark@codesourcery.com>
632
633 PR c++/19159
634 * decl2.c (import_export_decl): Use non-COMDAT external linkage
635 for virtual tables, typeinfo, etc. that will be emitted in only
636 one translation unit on systems without weak symbols.
637
638 2005-04-04 Mark Mitchell <mark@codesourcery.com>
639
640 PR c++/20679
641 * parser.c (cp_parser_template_name): Fix thinko.
642
643 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
644
645 PR c++/20746
646 * method.c (use_thunk): Protect covariant pointer return
647 adjustments from NULL pointers.
648
649 2005-04-04 Jan Hubicka <jh@suse.cz>
650
651 * decl2.c (finish_objects): Revert my previous patch.
652 (cp_finish_file): Likewise.
653
654 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
655
656 * pt.c: Fix comment typos.
657
658 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
659
660 PR c++/20723
661 * pt.c (more_specialized_fn): Member functions are unordered wrt
662 non-members. Conversion operators are unordered wrt other
663 functions.
664
665 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
666
667 * call.c (add_template_candidates_real): Remove length parameter
668 from fn_type_unification call.
669 * class.c (resolve_address_of_overloaded_function): Likewise
670 * cp-tree.h (fn_type_unification): Remove length parameter.
671 * pt.c (get_bindings_overload): Remove.
672 (get_bindings_real): Rename to ...
673 (get_bindings): ... here. Remove length and strict
674 parameters. Change return type flag to boolean. Remove original
675 forwarding function.
676 (determine_specialization): Adjust get_bindings call.
677 (fn_type_unification): Remove length parameter. Adjust.
678 (type_unification_real): Remove length parameter. Adjust.
679 (resolve_overloaded_unification): Adjust get_bindings call.
680 (try_one_overload): Simplify confusing cascaded if control flow.
681 (unify): Remove length paramter from type_unification_real call.
682 (most_specialized_instantiation): Adjust get_bindings calls.
683 (most_specialized): Likewise.
684
685 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
686
687 PR c++/19203, implement DR 214
688 * call.c (joust): Use more_specialized_fn.
689 * cp-tree.h (DEDUCE_ORDER): Remove.
690 (more_specialized): Replace with ...
691 (more_specialized_fn): ... this.
692 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
693 case.
694 (type_unification_real): Remove DEDUCE_ORDER case.
695 (more_specialized): Replace with ...
696 (more_specialized_fn): ... this. Implement DR 214.
697 (most_specialized_instantiation): Use get_bindings_real directly.
698
699 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
700
701 PR c++/18644
702 * call.c (build_new_op): Remove check for -Wsynth.
703
704 2005-03-31 Jan Hubicka <jh@suse.cz>
705
706 * decl2.c (finish_objects): Mark ctor as needed.
707 (cp_finish_file): Output variables only in nonunit-at-a-time.
708
709 2005-03-29 Richard Henderson <rth@redhat.com>
710
711 PR c/20519
712 * decl.c (cp_complete_array_type): Rename from complete_array_type.
713 Use the new complete_array_type in c-common.c. Update all callers.
714 * cp-tree.h (cp_complete_array_type): Update to match.
715
716 2005-03-24 Geoffrey Keating <geoffk@apple.com>
717
718 * typeck.c (build_static_cast_1): Allow scalar_cast between
719 any integral, floating, or enumeration type.
720
721 2005-03-24 Steven Bosscher <stevenb@suse.de>
722
723 * typeck.c (comptypes): First determine if the types are compatible
724 from a target-independent point of view. Check target attributes
725 last.
726
727 * class.c (build_base_path):
728 (build_vbase_offset_vtbl_entries):
729 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
730 * error.c (dump_expr): Likewise.
731 * init.c (build_zero_init, expand_cleanup_for_base,
732 build_vec_delete_1): Likewise.
733 * mangle.c (write_integer_cst): Likewise.
734 * method.c (thunk_adjust): Likewise.
735 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
736 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
737 * typeck.c (build_ptrmemfunc_access_expr,
738 (get_member_function_from_ptrfunc): Likewise.
739
740 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
741
742 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
743
744 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
745
746 * cp-tree.h (perform_integral_promotions): Remove.
747 (default_conversion): Add.
748
749 2005-03-22 Mark Mitchell <mark@codesourcery.com>
750
751 * parser.c (cp_parser_warn_min_max): New function.
752 (cp_parser_binary_expression): Use it.
753 (cp_parser_assignment_operator_opt): Likewise.
754 (cp_parser_operator): Likewise.
755
756 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
757
758 PR c++/19980
759 * decl.c (start_preparsed_function): Robustify.
760
761 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
762
763 PR c++/20499
764 * parser.c (cp_parser_class_head): Return NULL_TREE when
765 encountering a redefinition.
766
767 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
768
769 PR c++/20465
770 PR c++/20381
771 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
772 template.
773
774 2005-03-21 Paolo Carlini <pcarlini@suse.de>
775
776 PR c++/20461
777 PR c++/20536
778 * init.c (emit_mem_initializers): Don't crash on undefined
779 types.
780
781 2005-03-21 Paolo Carlini <pcarlini@suse.de>
782
783 PR c++/20147
784 * semantics.c (finish_stmt_expr_expr): Return immediately
785 if error_operand_p (expr).
786
787 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
788
789 * cp-tree.h (lvalue_or_else, lvalue_p): New.
790 * typeck.c (lvalue_or_else): New. Call lvalue_error.
791
792 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
793
794 PR c++/20240
795 * decl.c (decls_match): Compare context of VAR_DECL.
796
797 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
798
799 PR c++/20333
800 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
801 Check the return value of cp_parser_nested_name_specifier.
802
803 2005-03-18 Dale Johannesen <dalej@apple.com>
804
805 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
806
807 2005-03-18 Paolo Carlini <pcarlini@suse.de>
808
809 PR c++/20463
810 * parser.c (cp_parser_diagnose_invalid_type_name):
811 Check TYPE_BINFO (current_class_type) before attempting
812 to emit inform messages.
813
814 2005-03-17 Paolo Carlini <pcarlini@suse.de>
815
816 PR c++/19966
817 * cp-tree.h (grok_op_properties): Change return type to void.
818 * decl.c (grok_op_properties): Return early - don't check the
819 arity - in case of a static member or an operator that cannot
820 be non-member; tidy a bit.
821
822 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
823
824 PR c++/20186
825 * pt.c (contains_dependent_cast_p): Remove.
826 (fold_non_dependent_expr): Don't use it.
827 (value_dependent_expression_p): Use a switch statement.
828 reference_exprs can be dependent.
829
830 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
831
832 PR c++/4403
833 PR c++/9783, DR433
834 * name-lookup.c (pushtag): Skip template parameter scope when
835 scope is ts_global. Don't push tag into template parameter
836 scope.
837 * pt.c (instantiate_class_template): Reorder friend class
838 template substitution to handle non-dependent friend class
839 that hasn't been previously declared.
840
841 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
842
843 Friend class name lookup 5/n
844 PR c++/1016
845 * cp-tree.h (pushtag): Adjust declaration.
846 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
847 lookup_name fails.
848 (xref_tag): Adjust call to pushtag. Make hidden class visible.
849 (start_enum): Adjust call to pushtag.
850 * name-lookup.c (ambiguous_decl): Ignore hidden names.
851 (qualify_lookup): Change return type to bool.
852 (hidden_name_p): New function.
853 (lookup_namespace_name, unqualified_namespace_lookup,
854 lookup_name_real): Use it.
855 (lookup_type_scope): Update comments.
856 (maybe_process_template_type_declaration): Change parameter name
857 from globalize to is_friend.
858 (pushtag): Change globalize parameter of type int to tag_scope.
859 Hide name if introduced by friend declaration.
860 * name-lookup.h (hidden_name_p): Add declaration.
861 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
862 here.
863 * pt.c (push_template_decl_real): Make hidden class template
864 visible.
865 (lookup_template_class, instantiate_class_template): Adjust call
866 to pushtag.
867 * semantics.c (begin_class_definition): Likewise.
868 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
869 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
870 ts_global.
871
872 2005-03-13 Mark Mitchell <mark@codesourcery.com>
873
874 PR c++/20157
875 * pt.c (determine_specialization): Reject non-specializations.
876
877 2005-03-11 Per Bothner <per@bothner.com>
878
879 * cp-tree.h (struct cp_declarator): New id_loc field.
880 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
881 location using c_lex_with_flags, instead of input_location.
882 (cp_parser_direct_declarator): Set declarator's id_loc from
883 cp_token's id_loc.
884
885 2005-03-10 Jakub Jelinek <jakub@redhat.com>
886
887 PR c++/18384, c++/18327
888 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
889 and index. Convert max_index to size_type_node if it isn't
890 host_integerp (, 1).
891
892 2005-03-09 Mark Mitchell <mark@codesourcery.com>
893
894 PR c++/20208
895 * pt.c (tsubst_decl): Apply array-to-pointer and
896 function-to-pointer conversions to function arguments.
897 (regenerate_decl_from_template): Likewise.
898
899 2005-03-09 Paolo Carlini <pcarlini@suse.de>
900
901 PR c++/16859
902 * decl.c (complete_array_type): In pedantic mode, return
903 3 for an empty initializer list as the initializer for an
904 array of unknown bound (8.5.1/4).
905 (maybe_deduce_size_from_array_init): Fix final test to use
906 the above.
907
908 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
909
910 PR c++/20186
911 * pt.c (contains_dependent_cast_p): New.
912 (fold_non_dependent_expr): Call it.
913
914 2005-03-08 Mark Mitchell <mark@codesourcery.com>
915
916 PR c++/20142
917 * cp-tree.h (target_type): Remove.
918 * decl.c (layout_var_decl): Remove #if 0'd code.
919 (cp_finish_decl): Remove dead code.
920 * init.c (build_vec_init): When determining whether or not the
921 element type has an asignment operator, look through all array
922 dimensions.
923 * typeck.c (target_type): Remove.
924
925 2005-03-07 Mark Mitchell <mark@codesourcery.com>
926
927 * class.c (finish_struct_1): Do not warn about non-virtual
928 destructors in Java classes.
929
930 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
931
932 PR c++/19311
933 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
934 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
935 for OFFSET_TYPE.
936 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
937 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
938 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
939 template.
940
941 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
942
943 * name-lookup.c (push_overloaded_decl): Don't error if the new
944 decl matches the old one.
945 * decl.c (redeclaration_error_message): Likewise.
946
947 2005-03-01 Per Bothner <per@bothner.com>
948
949 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
950 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
951
952 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
953
954 PR c++/20232
955 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
956 covariancy.
957
958 * cp-tree.g (THUNK_TARGET): Expand comment.
959 * method.c (use_thunk): Make sure we also use the target, if that
960 is a thunk.
961
962 2005-02-27 Jakub Jelinek <jakub@redhat.com>
963
964 PR c++/20206
965 * decl.c (cxx_comdat_group): Put thunks for
966 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
967 comdat group as the thunk target.
968
969 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
970
971 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
972 parser.c: Fix comment typo(s).
973
974 2005-02-24 Jakub Jelinek <jakub@redhat.com>
975
976 PR c++/20175
977 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
978 initializes a char/wchar_t array.
979
980 2005-02-23 Mark Mitchell <mark@codesourcery.com>
981
982 PR c++/19878
983 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
984 with internal linkage.
985
986 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
987
988 * decl.c (grokvardecl): Don't exempt anonymous types from having
989 linkage for variables that have linkage other than "C".
990
991 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
992
993 * cp-objcp-common.h, error.c: Update copyright.
994
995 2005-02-22 Mark Mitchell <mark@codesourcery.com>
996
997 PR c++/20073
998 * decl.c (start_decl_1): Don't clear TREE_READONLY.
999 (cp_finish_decl): Likewise.
1000 (complete_vars): Call cp_apply_type_quals_to_decl.
1001 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
1002 cases where that's not valid.
1003
1004 PR c++/19991
1005 * init.c (integral_constant_value): Iterate if the value of a decl
1006 is itself a constant.
1007
1008 PR c++/20152
1009 * parser.c (cp_parser_class_head): Check for redefintions here.
1010 * semantics.c (begin_class_definition): Not here.
1011
1012 PR c++/20153
1013 * decl2.c (build_anon_union_vars): Add type parameter.
1014 (finish_anon_union): Pass it.
1015
1016 PR c++/20148
1017 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
1018 Handle STATEMENT_LIST.
1019
1020 PR c++/19883
1021 * parser.c (cp_parser_direct_declarator): Always complain about
1022 non-constant array bounds when in a function scope.
1023 * semantics.c (finish_id_expression): Do not mark dependent names
1024 as non-constant.
1025
1026 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
1027
1028 PR c++/19076
1029 PR c++/6628
1030 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
1031 * decl.c (grokdeclarator): Pedwarn about qualifying a function
1032 type.
1033 Add qualifiers when declaring a typedef of a function type.
1034 Member function pointers pick up the qualifiers of the typedef
1035 used to declare them.
1036 Don't complain about creating cv-qualified function types.
1037 Complain about qualified function typedefs that are used to
1038 declare non-static member functions or free functions.
1039 Use cp_apply_type_quals_to_decl.
1040 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
1041 (grokclassfn): Use cp_apply_type_quals_to_decl.
1042 * error.c (dump_type_suffix): Print qualifiers for function
1043 types.
1044 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
1045 (tsubst): When substituting a function type into a member
1046 pointer type, pass along the qualifiers.
1047 (unify): Unify member pointers to member function pointers.
1048 * tree.c (cp_build_qualified_type_real): Function types may be
1049 qualified. This includes restrict qualifiers.
1050 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
1051 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
1052 added to function types.
1053
1054 2005-02-20 Zack Weinberg <zack@codesourcery.com>
1055
1056 PR 18785
1057 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
1058 c_common_to_target_charset. Delete bogus comment.
1059
1060 2005-02-18 Richard Henderson <rth@redhat.com>
1061
1062 PR libstdc++/10606
1063 * except.c (do_get_exception_ptr): New.
1064 (expand_start_catch_block): Use it.
1065
1066 2005-02-19 Jakub Jelinek <jakub@redhat.com>
1067
1068 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
1069 if type is not error_mark_node.
1070
1071 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1072
1073 PR c++/19508
1074 * decl2.c (grokfield): Do not apply attributes to template parameters
1075 as they are ignored by tsubst anyway.
1076
1077 2005-02-18 Jakub Jelinek <jakub@redhat.com>
1078
1079 PR c++/19813
1080 * decl.c (start_decl_1): Clear TREE_READONLY flag if
1081 its type has TYPE_NEEDS_CONSTRUCTING.
1082 (complete_vars): Likewise.
1083
1084 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
1085
1086 PR c++/20028
1087 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
1088 template along with TYPE_SIZE.
1089
1090 PR c++/20022
1091 * semantics.c (perform_deferred_access_checks): Use
1092 get_deferred_access_checks to get the top of the stack.
1093
1094 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1095
1096 PR c++/17788
1097 * class.c (add_implicitly_declared_members, check_field_decl)
1098 (check_field_decls, check_bases): Remove arguments, tests and
1099 assignments of cant_have_default_ctor-related variables.
1100
1101 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
1102
1103 * decl2.c (mark_used): Set the source location of the used decl to
1104 the current input location here...
1105 * method.c (synthesize_method): ... not here. Set input_location
1106 from the decl instead.
1107
1108 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1109
1110 PR c++/19608
1111 * parser.c (cp_parser_late_parsing_for_member): Use
1112 current_function_decl as scope to push to and from.
1113
1114 PR c++/19884
1115 * pt.c (check_explicit_specialization): Make sure namespace
1116 binding lookup found an overloaded function.
1117 (lookup_template_function): Just assert FNS is an overloaded
1118 function.
1119
1120 PR c++/19895
1121 * decl.c (grokdeclarator): Check for error mark node in ptrmem
1122 construction.
1123
1124 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
1125
1126 PR c++/17816
1127 * decl.c (redeclaration_error_message): Report redefinition of
1128 pure virtual function.
1129
1130 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
1131
1132 PR c++/19891
1133 * class.c (build_simple_base_path): Build the component_ref
1134 directly.
1135 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
1136 rather than using lookup_base.
1137 * search.c (dfs_walk_once): Add non-recursive assert check.
1138 * typeck.c (build_class_member_access_expr): It is possible for
1139 the member type to be both const and volatile.
1140
1141 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1142
1143 PR c++/14479
1144 PR c++/19487
1145 * pt.c (maybe_check_template_type): Remove.
1146 * cp-tree.h (maybe_check_template_type): Remove prototype.
1147 * name-lookup.c (maybe_process_template_type_declaration): Don't
1148 use maybe_check_template_type.
1149
1150 2005-02-11 Richard Henderson <rth@redhat.com>
1151
1152 PR c++/19632
1153 * pt.c (get_mostly_instantiated_function_type): Save and restore
1154 flag_access_control instead of push/pop_access_scope.
1155
1156 2005-02-10 Mark Mitchell <mark@codesourcery.com>
1157
1158 PR c++/19755
1159 * decl.c (reshape_init): Issue warnings about missing braces.
1160
1161 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
1162
1163 * cp-tree.def, except.c, ptree.c: Update copyright.
1164
1165 2005-02-09 Mark Mitchell <mark@codesourcery.com>
1166
1167 PR c++/19811
1168 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
1169 attempting name lookup.
1170
1171 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
1172
1173 PR c++/19787
1174 * call.c (initialize_reference): Robustify.
1175
1176 PR ++/19732
1177 * decl.c (grokdeclarator): Check for invalid use of destructor
1178 names.
1179
1180 PR c++/19762
1181 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
1182 names with invalid types.
1183
1184 PR c++/19826
1185 * parser.c (cp_parser_direct_declarator): Allow type-dependent
1186 expressions as array bounds.
1187
1188 PR c++/19739
1189 * parser.c (cp_parser_attributes_list): Allow empty lists.
1190
1191 2005-02-08 Mark Mitchell <mark@codesourcery.com>
1192
1193 PR c++/19733
1194 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
1195 (check_bases): Give warnings about a base class with a
1196 non-virtual destructor, even if it is implicit.
1197 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
1198 (maybe_warn_about_overly_private_class): Don't use
1199 TYPE_HAS_DESTRUCTOR.
1200 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
1201 (check_for_override): Give it external linkage.
1202 (add_implicitly_declared_members): Generate destructors lazily.
1203 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1204 TYPE_HAS_DESTRUCTOR.
1205 (check_bases_and_members): Call check_methods before
1206 check_field_decls.
1207 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
1208 TYPE_HAS_DESTRUCTOR.
1209 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
1210 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
1211 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
1212 (lang_type_class): Add lazy_destructor.
1213 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
1214 (CLASSTYPE_DESTRUCTORS): Robustify.
1215 (TYPE_HAS_DESTRUCTOR): Remove.
1216 (check_for_override): Declare.
1217 (build_vbase_delete): Remove.
1218 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
1219 expressions.
1220 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
1221 * except.c (dtor_nothrow): Lazily create destructors if necessary.
1222 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1223 * init.c (build_delete): Lazily create destructors, if necessary.
1224 (build_vbase_delete): Remove.
1225 * method.c (locate_dtor): Simplify.
1226 (implicitly_declare_fn): Add support for destructors.
1227 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
1228 necessary.
1229 * pt.c (check_explicit_specialization): Don't use
1230 TYPE_HAS_DESTRUCTOR.
1231 (instantiate_class_template): Likewise.
1232 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
1233 * rtti.c (emit_support_tinfos): Robustify.
1234 * search.c (lookup_fnfields_1): Lazily create destructors.
1235 * typeck.c (build_class_member_access_expr): Remove
1236 PSEUDO_DTOR_EXPR handling.
1237 (lookup_destructor): Likewise.
1238
1239 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
1240
1241 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
1242 copyright.
1243
1244 2005-02-07 Mark Mitchell <mark@codesourcery.com>
1245
1246 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
1247 on boolean variables.
1248 (cp_lexer_stop_debugging): Likewise.
1249
1250 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1251
1252 PR c++/17401
1253 * parser.c (cp_parser_pure_specifier): Emit a specific error
1254 message with an invalid pure specifier.
1255 * decl2.c (grok_function_init): Remove.
1256 (grokfield): An initializer for a method is a always a pure
1257 specifier.
1258
1259 2005-02-02 Matt Austern <austern@apple.com>
1260
1261 PR c++/19628
1262 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
1263 * parser.c (cp_parser_postfix_expression): Accept function call in
1264 constant expression if builtin_valid_in_constant_expr_p is true
1265 for that function.
1266 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
1267 * semantics.c (finish_id_expression): Accept function call in constant
1268 expression if builtin_valid_in_constant_expr_p is true for that
1269 function.
1270 * tree.c (builtin_valid_in_constant_expr_p): New.
1271
1272 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1273
1274 PR c++/17413
1275 * pt.c (check_instantiated_args): Improve error message.
1276 Fix logic when to print its second part.
1277
1278 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1279
1280 * cp-tree.h (complete_type_or_else): Remove macro.
1281 (complete_type_or_diagnostic): Rename to complete_type_or_else
1282 and remove last argument.
1283 * typeck.c (complete_type_or_diagnostic): Rename to
1284 complete_type_or_else and remove last argument.
1285
1286 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1287
1288 * cp-tree.h (commonparms): Remove prototype.
1289 (convert_arguments): Likewise.
1290 (PFN_FROM_PTRMEMFUNC): Remove.
1291 * typeck.c (commonparms): Make static.
1292 (convert_arguments): Add prototype. Make static.
1293 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
1294
1295 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1296
1297 * parser.c (cp_parser_primary_expression): Don't complain about
1298 floating-point literals in integral constant expressions when
1299 !pedantic.
1300
1301 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
1302
1303 * parser.c (cp_parser_template_id): Revert comment patch too.
1304
1305 PR c++/18757
1306 PR c++/19366
1307 PR c++/19499
1308 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
1309 Issue an error when creating the template id.
1310 * pt.c (fn_type_unification): Return early if the explicit
1311 template arg list is an error_mark_node.
1312
1313 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1314
1315 * decl.c (build_enumerator): Do not issue duplicate error messages
1316 about invalid enumeration constants.
1317 * parser.c (cp_parser_non_integral_constant_expression): Always
1318 set parser->non_integral_constant_expression_p.
1319 (cp_parser_primary_expression): Add cast_p parameter. Issue
1320 errors about invalid uses of floating-point literals in
1321 cast-expressions.
1322 (cp_parser_postfix_expression): Add cast_p parameter.
1323 (cp_parser_open_square_expression): Pass it.
1324 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
1325 (cp_parser_unary_expression): Likewise.
1326 (cp_parser_new_placement): Pass it.
1327 (cp_parser_direct_new_declarator): Likewise.
1328 (cp_parser_new_initializer): Likewise.
1329 (cp_parser_cast_expression): Add cast_p parameter.
1330 (cp_parser_binary_expression): Likewise.
1331 (cp_parser_question_colon_clause): Likewise.
1332 (cp_parser_assignment_expression): Likewise.
1333 (cp_parser_expression): Likewise.
1334 (cp_parser_constant_expression): If an integral constant
1335 expression is invalid, return error_mark_node.
1336 (cp_parser_expression_statement): Pass cast_p.
1337 (cp_parser_condition): Likewise.
1338 (cp_parser_iteration_statement): Likewise.
1339 (cp_parser_jump_statement): Likewise.
1340 (cp_parser_mem_initializer): Likewise.
1341 (cp_parser_template_argument): Likewise.
1342 (cp_parser_parameter_declaration): Likewise.
1343 (cp_parser_initializer): Likewise.
1344 (cp_parser_throw_expression): Likewise.
1345 (cp_parser_attribute_list): Likewise.
1346 (cp_parser_simple_cast_expression): Likewise.
1347 (cp_parser_functional_cast): Likewise.
1348 (cp_parser_late_parsing_default_args): Likewise.
1349 (cp_parser_sizeof_operand): Save/restore
1350 non_integral_constant_expression_p.
1351
1352 2005-01-31 Mike Stump <mrs@apple.com>
1353
1354 * parser.c (cp_lexer_new_main): Get the first token, first, before
1355 doing anything.
1356
1357 2005-01-31 Mark Mitchell <mark@codesourcery.com>
1358
1359 * decl.c (start_decl): Add missing parentheses.
1360
1361 2005-01-30 Mark Mitchell <mark@codesourcery.com>
1362
1363 PR c++/19555
1364 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
1365 * decl.c (duplicate_decls): Do not discard
1366 DECL_IMPLICIT_INSTANTIATION when merging declarations.
1367 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
1368 variables that do not have DECL_USE_TEMPLATE.
1369
1370 PR c++/19395
1371 * decl.c (grokdeclarator): Refactor code so that qualified names
1372 are never allowed as the declarator in a typedef.
1373
1374 PR c++/19367
1375 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
1376 builtin declarations.
1377
1378 PR c++/19457
1379 * call.c (convert_like_real): Inline call to
1380 dubious_conversion_warnings here.
1381 * cp-tree.h (dubious_conversion_warnings): Remove.
1382 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
1383 setting TREE_NEGATED_INT.
1384 * typeck.c (dubious_conversion_warnings): Remove.
1385
1386 PR c++/19349
1387 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
1388 memory.
1389
1390 2005-01-28 Mark Mitchell <mark@codesourcery.com>
1391
1392 PR c++/19253
1393 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
1394 tentative parses.
1395
1396 PR c++/19667
1397 * pt.c (redeclare_class_template): Robustify.
1398
1399 2005-01-27 Steven Bosscher <stevenb@suse.de>
1400
1401 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
1402 instead of SWITCH_EXPR ones.
1403 * pt.c (tsubst_expr): Likewise.
1404 * semantics.c (begin_switch_stmt, finish_switch_cond,
1405 finish_switch_stmt): Likewise.
1406
1407 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
1408
1409 PR c++/18370
1410 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
1411
1412 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
1413
1414 * class.c (abort_fndecl_addr): New variable.
1415 (build_vtbl_initializer): If we have a pure virtual function
1416 share the abort function's address.
1417 Include gt-cp-class.h at the end.
1418 * config-lang.in (gtfiles): Add cp/class.c.
1419
1420 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1421
1422 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
1423 (pp_cxx_function_definition): Make static.
1424 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
1425 (pp_cxx_function_definition): Likewise.
1426
1427 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1428
1429 * name-lookup.c (print_binding_level): Make static.
1430 (constructor_name_full): Make static inline.
1431 (current_decl_namespace): Make static.
1432 * name-lookup.h (constructor_name_full): Remove prototype.
1433 (print_binding_level): Likewise.
1434 (current_decl_namespace): Likewise.
1435
1436 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1437
1438 * decl.h (debug_bindings_indentation): Remove.
1439
1440 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
1441
1442 * typeck.c: Fix a comment typo.
1443
1444 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1445
1446 PR c++/19208
1447 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
1448 at least once.
1449 (tsubst): Use fold_decl_constant_value in place of a bare call to
1450 integral_constant_value.
1451
1452 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
1453
1454 * typeck.c (more_qualified_p): Remove.
1455 * cp-tree.h: Remove the corresponding prototype.
1456
1457 2005-01-19 Matt Austern <austern@apple.com>
1458
1459 * typeck.c (comptypes): Handle return code from objc_comptypes
1460 correctly.
1461
1462 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
1463
1464 * cp-tree.h, name-lookup.h: Remove unused prototypes.
1465
1466 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1467
1468 PR c++/19375
1469 * semantics.c (finish_id_expression): Disable access checking for
1470 already lookuped FIELD_DECL.
1471
1472 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1473
1474 * decl.c (delete_block): Remove.
1475 * cp-tree.h: Remove the corresponding prototype.
1476
1477 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
1478 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
1479 Remove.
1480 * cp-tree.h: Remove the corresponding prototypes.
1481
1482 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
1483 cp_update_decl_after_saving, name_p): Remove.
1484 * cp-tree.h: Remove the corresponding prototypes.
1485
1486 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
1487
1488 PR c/19472
1489 * semantics.c (finish_asm_stmt): Strip nops off
1490 input memory operands.
1491
1492 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
1493
1494 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
1495 typeck2.c: Update copyright.
1496
1497 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
1498
1499 * class.c (get_enclosing_class): Remove.
1500 * cp-tree.h: Remove the corresponding prototypes.
1501
1502 * cvt.c (convert_lvalue): Remove.
1503 * cp-tree.h: Remove the corresponding prototype.
1504
1505 * pt.c (tinst_for_decl): Remove.
1506 * cp-tree.h: Remove the corresponding prototypes.
1507
1508 * tree.c (hash_chainon): Remove.
1509 * cp-tree.h: Remove the corresponding prototypes.
1510
1511 2005-01-15 Jakub Jelinek <jakub@redhat.com>
1512
1513 PR c++/19263
1514 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
1515 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
1516
1517 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1518
1519 * Make-lang.in (cp-warn): Don't append $(WERROR).
1520
1521 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
1522
1523 * cp-tree.h: Fix a comment typo.
1524
1525 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
1526
1527 PR c++/19298
1528 * pt.c (tsubst_qualified_id): Call convert_from_reference.
1529
1530 2005-01-06 Mark Mitchell <mark@codesourcery.com>
1531
1532 PR c++/19244
1533 * class.c (add_implicitly_declared_members): Remove dead code.
1534 * decl.c (grokfndecl): Add sfk parameter. Use it do set
1535 DECL_CONSTRUCTOR_P.
1536 (grokdeclarator): Adjust calls to grokfndecl.
1537 * method.c (implicitly_declare_fn): Improve documentation.
1538 * parser.c (cp_parser_direct_declarator): Do not consider a
1539 function to be a constructor if the containing class was
1540 originally anonymous.
1541
1542 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1543
1544 PR c++/17154
1545 * search.c (lookup_field_1): Handle using declaration in
1546 class template partial specialization.
1547
1548 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1549
1550 PR c++/19258
1551 * pt.c (push_access_scope): Handle friend defined in class.
1552 (pop_access_scope): Likewise.
1553
1554 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
1555
1556 PR c++/19270
1557 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
1558 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
1559 array-new handling code. Use build_x_binary_op.
1560
1561 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
1562
1563 PR c++/19030
1564 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
1565 * name-lookup.h (push_scope): Return pushed scope, not flag.
1566 * name-lookup.c (push_scope): Return scope that should be popped,
1567 not a flag.
1568 * decl.c (start_decl): Adjust.
1569 (grokfndecl): Adjust scope push and pop.
1570 * decl2.c (check_classfn): Likewise.
1571 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
1572 cp_parser_init_declarator, cp_parser_direct_declarator,
1573 cp_parser_class_specifier, cp_parser_class_head,
1574 cp_parser_lookup_name,
1575 cp_parser_constructor_declarator_p): Likewise.
1576 * pt.c (instantiate_class_template,
1577 resolve_typename_type): Likewise.
1578
1579 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aaachen.de>
1580
1581 PR c++/14136
1582 * parser.c (cp_parser_unqualified_id): Do not issue error message
1583 for typedef-name as destructor declarator when performing an
1584 uncommitted tentative parse.
1585
1586 2005-01-01 Steven Bosscher <stevenb@suse.de>
1587
1588 PR middle-end/17544
1589 * decl.c (finish_function): Fix comment. Annotate the compiler
1590 generated return with the current file name and line 0.
1591
1592 2004-12-31 Richard Henderson <rth@redhat.com>
1593
1594 PR middle-end/17799
1595 * call.c (make_temporary_var_for_ref_to_temp): Set DECL_IGNORED_P.
1596 * class.c (build_vtable): Don't conditionallize setting it
1597 based on DWARF2_DEBUG.
1598 (layout_class_type): Set DECL_IGNORED_P.
1599 * decl2.c (get_guard): Likewise.
1600 * rtti.c (get_tinfo_decl, build_lang_decl): Likewise.
1601 * tree.c (build_local_temp): Likewise.
1602
1603 2004-12-30 Mark Mitchell <mark@codesourcery.com>
1604
1605 * cp-tree.h (cp_declarator): Split "name" field into
1606 qualifying_scope and unqualified_name.
1607 * decl.c (get_scope_of_declarator): Adjust accordingly.
1608 (grokdeclarator): Likewise.
1609 * decl2.c (grokfield): Likewise, and adjust call to
1610 do_class_using_decl.
1611 * name-lookup.c (do_class_using_decl): Split "decl" into
1612 "scope" and "name". Remove unnecessary code.
1613 * name-lookup.h (do_class_using_decl): Adjust declaration.
1614 * parser.c (make_id_declarator): Split "id" into qualifying_scope
1615 and unqualified_name.
1616 (cp_parser_using_declaration): Adjust call to do_class_using_decl.
1617 (cp_parser_direct_declarator): Adjust to handle the fact that
1618 cp_parser_declarator_id no longer returns a SCOPE_REF.
1619 (cp_parser_direct_declarator): Likewise.
1620 (cp_parser_declarator_id): Do not create a SCOPE_REF for qualified
1621 names.
1622 (cp_parser_member_declaration): Adjust call to make_id_declarator.
1623 (cp_parser_check_declarator_template_parameters): Do not expect a
1624 SCOPE_REF.
1625
1626 * decl.c (duplicate_decls): Call ggc_free on declarations we will
1627 not be needing any longer.
1628
1629 PR c++/19190
1630 * cvt.c (convert_to_void): Do not use STRIP_NOPs.
1631
1632 2004-12-28 Richard Henderson <rth@redhat.com>
1633
1634 PR inline-asm/15740
1635 * semantics.c (finish_asm_stmt): Resolve asm names. Validate input
1636 constraints. Mark memory inputs addressable.
1637
1638 2004-12-27 Jason Merrill <jason@redhat.com>
1639
1640 * decl.c (expand_static_init): Don't use shortcut if
1641 targetm.relaxed_ordering.
1642
1643 2004-12-27 Mark Mitchell <mark@codesourcery.com>
1644
1645 PR c++/19149
1646 * decl.c (check_tag_decl): Robustify.
1647
1648 2004-12-23 Mark Mitchell <mark@codesourcery.com>
1649
1650 PR c++/17595
1651 * parser.c (cp_parser_error): Issue better messages about
1652 #pragma in locations where it is not permitted.
1653
1654 PR c++/17413
1655 * pt.c (check_instantiated_args): Remove bogus SFINAE code.
1656
1657 * cvt.c (convert_to_void): Fix typo in comment.
1658
1659 2004-12-23 Alexandre Oliva <aoliva@redhat.com>
1660
1661 PR c++/18962
1662 * pt.c (check_explicit_specialization): Use the argument list from
1663 the definition in a template function specialization definition.
1664
1665 2004-12-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1666
1667 PR c++/18733
1668 * pt.c (check_explicit_specialization): Use special logic to validate
1669 befriended specializations.
1670
1671 2004-12-22 Mark Mitchell <mark@codesourcery.com>
1672
1673 * rtti.c (emit_support_tinfos): Avoid using C99 semantics.
1674
1675 PR c++/18464
1676 * call.c (build_this): In templates, do not bother with
1677 build_unary_op.
1678 * typeck.c (unary_complex_lvalue): In a template, always refuse
1679 simplifications.
1680
1681 PR c++/18492
1682 * cp-gimplify.c (cp_genericize): Relax assertion.
1683
1684 PR c++/11224
1685 * cvt.c (convert_to_void): Warn about unused values.
1686
1687 PR c++/18257
1688 * rtti.c (emit_support_tinfos): On systems without weak symbols,
1689 emit the runtime library type-info objects as non-COMDAT.
1690
1691 2004-12-21 Mark Mitchell <mark@codesourcery.com>
1692
1693 PR c++/18378
1694 * call.c (convert_like_real): Do not permit the use of a copy
1695 constructor to copy a packed field.
1696
1697 PR c++/19063
1698 * decl.c (grokdeclarator): Return error_mark_node, not
1699 void_type_node, to indicate errors.
1700 * parser.c (cp_parser_template_parameter_list): Robustify.
1701 (cp_parser_template_parameter): Likewise.
1702
1703 PR c++/19034
1704 * tree.c (cp_tree_equal): Handle OVERLOAD.
1705
1706 2004-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1707
1708 * decl.c (define_label): Use POP_TIMEVAR_AND_RETURN.
1709 * name-lookup.c (pushdecl_class_level): Likewise.
1710
1711 2004-12-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1712
1713 * name-lookup.c (pushtag): Add missing POP_TIMEVAR_AND_RETURN.
1714
1715 2004-12-21 Andrew Pinski <pinskia@physics.uc.edu>
1716
1717 PR c++/18984
1718 * cp-gimplify.c (cp_genericize_r): Don't insert first but instead
1719 check to see if contains the pointer. Insert the statement before
1720 returning.
1721
1722 2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
1723
1724 PR c++/14075
1725 * decl.c (check_initializer): Check string initializer of array is
1726 not parenthesized.
1727 * cp-tree.h (PAREN_STRING_LITERAL_P): New.
1728 * semantics.c (finish_parenthesized_expr): Mark a STRING_CST.
1729 * error.c (dump_expr): <STRING_CST case> Add parens, if needed.
1730
1731 * cp-tree.def (TEMPLATE_TYPE_PARM,
1732 BOUND_TEMPLATE_TEMPLATE_PARM, TYPE_OF_TYPE, TYPENAME_TYPE): Reorder
1733 for better code efficiency.
1734 * cp-tree.h (CLASS_TYPE_P): Short circuit IS_AGGR_TYPE check.
1735 (CAN_HAVE_FULL_LANG_DECL_P): Reorder for better optimization.
1736 (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P,
1737 INTEGRAL_OR_ENUMERATION_TYPE_P, SCALAR_TYPE_P,
1738 CP_AGGREGATE_TYPE_P, TYPE_PTROB_P, TYPE_REF_OBJ_P,
1739 TYPE_PTROBV_P): Likewise.
1740
1741 PR c++/18975
1742 * method.c (do_build_copy_constructor): Refactor. Don't const
1743 qualify a mutable field.
1744 (do_build_assign_ref): Likewise.
1745
1746 2004-12-20 Matt Austern <austern@apple.com>
1747
1748 PR c++/19044
1749 * decl.c (make_rtl_for_nonlocal_decl): Use
1750 set_builtin_user_assembler_name.
1751
1752 2004-12-19 Mark Mitchell <mark@codesourcery.com>
1753
1754 * cp-tree.h (note_decl_for_pch): New function.
1755 * class.c (build_clone): Call note_decl_for_pch.
1756 * semantics.c (finish_member_declaration): Likewise.
1757 (note_decl_for_pch): New function.
1758
1759 2004-12-17 Steven Bosscher <stevenb@suse.de>
1760
1761 * init.c (build_zero_init): max_index is the number of
1762 elements, minus 1.
1763
1764 2004-12-17 Nathan Sidwell <nathan@codesourcery.com>
1765
1766 PR c++/18721
1767 * class.c (add_method): Do not push conversion operators into a
1768 binding level.
1769
1770 * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE_TYPE): Reformat.
1771 * error.c (dump_decl): <TYPE_DECL case> Remove extraneous braces.
1772
1773 2004-12-16 Nathan Sidwell <nathan@codesourcery.com>
1774
1775 PR c++/18905
1776 * cp-tree.h (integral_constant_value): Declare.
1777 * call.c (null_ptr_cst_p): Use integral_constant_value, not
1778 decl_constant_value.
1779 (convert_like_real): Likewise.
1780 * class.c (check_bitfield_decl): Likewise.
1781 * cvt.c (ocp_convert): Likewise.
1782 (convert): Remove unnecessary decl_constant_value call.
1783 * decl.c (compute_array_index_type): Use integral_constant_value,
1784 not decl_constant_value.
1785 (build_enumerator): Likewise.
1786 * decl2.c (grokfield): Likewise.
1787 * init.c (decl_constant_value): Simplify.
1788 (integral_constant_value): New.
1789 * pt.c (fold_decl_constant_value): Use integral_constant_value,
1790 remove subsequent check.
1791 (tsubst): Use integral_constant_value, not decl_constant_value.
1792 (tsubst_copy, unify): Likewise.
1793 * typeck.c (decay_conversion): Likewise.
1794 (build_compound_expr): Remove unnecessary decl_constant_value
1795 calls.
1796 (build_static_cast_1, build_reinterpret_cast_1):
1797 (convert_for_assignment): Remove comment about not calling
1798 decl_constant_value.
1799
1800 2004-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1801
1802 PR c++/18825
1803 * pt.c (instantiate_class_template): Set input_location for
1804 friend function.
1805 (tsubst_friend_function): Don't set input_location here.
1806 Make sure the context is complete if necessary.
1807
1808 2004-12-15 Nathan Sidwell <nathan@codesourcery.com>
1809
1810 PR c++/18981
1811 * parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
1812 flag setting.
1813
1814 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1815
1816 PR c++/18738
1817 * decl.c (make_typename_type): Do not handle namespace-scoped
1818 names here.
1819 (tag_name): Handle typename_type.
1820 (check_elaborated_type_specifier): Handle typenames.
1821 * parser.c (cp_parser_diagnose_invalid_type_name): Improve
1822 comment.
1823 (cp_parser_elaborated_type_specifier): Use
1824 cp_parser_diagnose_invalid_type_name.
1825
1826 2004-12-14 Andrew Pinski <pinskia@physics.uc.edu>
1827
1828 PR c++/18965
1829 * init.c (build_zero_init): If the max_index is 0, there is no
1830 need to create a RANGE_EXPR.
1831
1832 2004-12-14 Mark Mitchell <mark@codesourcery.com>
1833
1834 PR c++/18793
1835 * cp-objcp-common.c (cp_expr_size): Loosen assertion.
1836
1837 2004-12-14 Nathan Sidwell <nathan@codesourcery.com>
1838
1839 PR c++/18949
1840 * pt.c (tsubst_copy_and_build): <INDIRECT_REF case> Check that a
1841 REFERENCE_REF_P is dereferencing a reference type.
1842 * typeck.c (build_static_cast): Convert from reference even in a
1843 template.
1844 (build_reinterpret_cast, build_const_cast, build_c_cast): Likewise.
1845
1846 2004-12-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1847
1848 * parser.c (cp_parser_uncommitted_to_tentative_parse_p): New function.
1849 (cp_parser_name_lookup_error): Use it.
1850 (cp_parser_check_for_invalid_template_id): Likewise.
1851 (cp_parser_skip_to_closing_parenthesis): Likewise.
1852 (cp_parser_nested_name_specifier_opt): Likewise.
1853 (cp_parser_simple_declaration, cp_parser_template_id): Likewise.
1854 (cp_parser_parameter_declaration_list): Likewise.
1855 (cp_parser_parameter_declaration): Likewise.
1856 (cp_parser_template_name): Let cp_parser_simulate_error perform
1857 the checking.
1858 (cp_parser_committed_to_tentative_parse): Remove.
1859
1860 2004-12-13 Andrew Pinski <pinskia@physics.uc.edu>
1861
1862 PR c++/18968
1863 * class.c (build_base_path): Convert the zero constant to the correct
1864 type when comparing.
1865
1866 2004-12-13 Mark Mitchell <mark@codesourcery.com>
1867
1868 PR c++/18925
1869 * class.c (layout_class_type): Determine the visibility of static
1870 data members.
1871
1872 2004-12-12 Roger Sayle <roger@eyesopen.com>
1873
1874 PR middle-end/12454
1875 * cp-gimplify.c (gimplify_if_stmt): Optimize the case where the
1876 condition is a constant and the unexecuted clause is empty.
1877
1878 2004-12-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1879
1880 PR c++/18731
1881 * parser.c (cp_parser_class_head): Reject typedef-name in class head.
1882
1883 2004-12-09 Matt Austern <austern@apple.com>
1884
1885 PR c++/18514
1886 * name-lookup.c (do_nonmember_using_decl): A real function
1887 declaration takes precedence over an anticipated declaration.
1888
1889 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1890
1891 * parser.c (cp_parser_member_declaration): Fix comment typo.
1892
1893 2004-12-09 Alexandre Oliva <aoliva@redhat.com>
1894
1895 PR c++/18757
1896 * parser.c (cp_parser_template_id): Don't create a CPP_TEMPLATE_ID
1897 if parsing failed.
1898
1899 2004-12-09 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1900
1901 PR c++/18073
1902 * typeck.c (build_reinterpret_cast_1): Allow cast from vector type.
1903
1904 2004-12-09 Nathan Sidwell <nathan@codesourcery.com>
1905
1906 PR c++/16681
1907 * init.c (build_zero_init): Build a RANGE_EXPR for an array
1908 initializer.
1909
1910 2004-12-08 Kelley Cook <kcook@gcc.gnu.org>
1911
1912 * typeck.c: Remove DOS line endings.
1913
1914 2004-12-08 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1915
1916 PR c++/18100
1917 * decl.c (lookup_and_check_tag): Diagnose nested class with
1918 the same name as enclosing class.
1919
1920 2004-12-08 Nathan Sidwell <nathan@codesourcery.com>
1921
1922 PR c++/18803
1923 * cp-tree.h (REFERENCE_REF_P): New.
1924 (CPTI_TYPE_INFO_TYPE): Rename to ...
1925 (CPTI_CONST_TYPE_INFO_TYPE): ... here.
1926 (CPTI_TYPE_INFO_REF_TYPE): Remove.
1927 (type_info_type_node): Rename to ...
1928 (const_type_info_type_node): ... here.
1929 (type_info_ref_type): Remove.
1930 * call.c (build_user_type_conversion): Reformat.
1931 (resolve_args): Do not convert_from_reference.
1932 (build_object_call): Call convert_from_reference.
1933 (prep_operand): Do not convert_from_reference.
1934 (build_new_method_call): Likewise.
1935 * class.c (build_vfield_ref): Likewise.
1936 * cvt.c (convert_to_reference): Likewise.
1937 (convert_from_reference): Build INDIRECT_REF here, not with
1938 build_indirect_ref.
1939 (convert_force): Do not convert_from_reference.
1940 (build_expr_type_conversion): Likewise.
1941 * decl.c (grok_reference_init): Likewise.
1942 * decl2.c (delete_sanity): Likewise.
1943 * except.c (initialize_handler_parm): Use POINTER_TYPE_P.
1944 * init.c (build_dtor_call): Do not convert_from_reference.
1945 * parser.c (cp_parser_template_argument): Unwrap indirected
1946 reference. Allow TEMPLATE_PARM_INDEX as an object parm.
1947 * pt.c (tsubst_copy_and_build) <case INDIRECT_REF>: Use
1948 convert_from_reference, if indicated.
1949 <case CALL_EXPR>: Do not convert_from_reference.
1950 <case PARM_DECL, VAR_DECL>: Convert_from_reference if needed.
1951 (tsubst_initializer_list): Do not convert_from_reference.
1952 * rtti.c (init_rtti_processing): Adjust node creation.
1953 (throw_bad_typeid): Use const_type_info_type_node.
1954 Do not convert_from_reference.
1955 (typeid_ok_p): Use const_type_info_type_node.
1956 (build_typeid, get_typeid): Always return type_info typed node.
1957 (build_dynamic_cast_1): Dont convert_from_reference. Refactor.
1958 * semantics.c (finish_stmt_expr_expr): Do not
1959 convert_from_reference.
1960 (finish_id_expression): Convert_from_reference as appropriate.
1961 * typeck.c (decay_conversion): Do not convert_from_reference.
1962 (finish_class_member_access_expr): Likewise.
1963 (build_indirect_ref): Use POINTER_TYPE_P.
1964 (convert_arguments): Do not convert_from_reference.
1965 (build_modify_expr): Likewise.
1966 (convert_for_initialization): Likewise.
1967 * typeck2.c (build_x_arrow): Likewise.
1968
1969 2004-12-07 Ziemowit Laski <zlaski@apple.com>
1970
1971 * cp-tree.h (struct lang_type_class): Rename 'objc_protocols'
1972 field to 'objc_info'.
1973
1974 2004-12-07 Kazu Hirata <kazu@cs.umass.edu>
1975
1976 * pt.c: Replace a use of first_rtl_op with TREE_CODE_LENGTH.
1977
1978 2004-12-07 Roger Sayle <roger@eyesopen.com>
1979
1980 * name-lookup.c (leave_scope): We only need to update
1981 class_binding_level when leaving a class scope.
1982
1983 2004-12-06 Ziemowit Laski <zlaski@apple.com>
1984
1985 * cp-tree.h (struct lang_type_class): Add 'objc_protocols' field.
1986
1987 2004-12-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1988
1989 PR c++/17011, c++/17971
1990 * pt.c (tsubst_copy) <FIELD_DECL case>: Check and diagnose
1991 invalid field.
1992 (tsubst_copy_and_build) <COMPONENT_REF case>: Check
1993 error_mark_node after member substitution.
1994 * semantics.c (finish_id_expression): Call
1995 finish_non_static_data_member for non-dependent FIELD_DECL.
1996
1997 2004-12-03 Nathan Sidwell <nathan@codesourcery.com>
1998
1999 PR c++/18782
2000 * decl.c (grokdeclarator): Make sure class in pointer to member is
2001 not a namespace.
2002
2003 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2004
2005 PR c++/18318
2006 * parser.c (cp_parser_new_type_id): Move array size expression
2007 checks from here ...
2008 * init.c (build_new): ... to here.
2009
2010 2004-12-02 Nathan Sidwell <nathan@codesourcery.com>
2011
2012 PR c++/18758
2013 * parser.c (cp_parser_class_head): Return NULL_TREE when
2014 push_template_decl fails. Update comment.
2015
2016 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2017
2018 PR c++/15664, c++/18276
2019 * pt.c (tsubst_decl) <TEMPLATE_DECL case>: Reorganize. Correctly
2020 tsubst TEMPLATE_DECL that is a TEMPLATE_TEMPLATE_PARM.
2021
2022 2004-12-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2023
2024 PR c++/18123
2025 * parser.c (cp_parser_type_specifier): Catch template declaration
2026 of enum.
2027
2028 2004-12-01 Matt Austern <austern@apple.com>
2029
2030 * name-lookup.c (namespace_binding): Omit alias check for global
2031 namespace.
2032
2033 2004-12-01 Nathan Sidwell <nathan@codesourcery.com>
2034
2035 PR c++/18729
2036 * parser.c (cp_parser_class_name): Check decl's type is not
2037 error_mark_node.
2038
2039 PR c++/17431
2040 * call.c (standard_conversion): Add FLAGS parameter. Do not allow
2041 derived to base conversion when checking constructor
2042 accessibility.
2043 (implicit_conversion): Pass FLAGS to standard_conversion.
2044 (check_constructir_callable): Disallow conversion functions.
2045
2046 2004-11-30 Kazu Hirata <kazu@cs.umass.edu>
2047
2048 * parser.c: Fix comment typos.
2049
2050 2004-11-27 Mark Mitchell <mark@codesourcery.com>
2051
2052 PR c++/18368
2053 * parser.c (cp_parser_check_for_definition_in_return_type): Take
2054 the defined type as a parameter, and inform the user about the
2055 possibility of a missing semicolon.
2056 (cp_parser_explicit_instantiation): Adjust call to
2057 cp_parser_check_for_definition_in_return_type.
2058 (cp_parser_init_declarator): Likewise.
2059 (cp_parser_member_declaration): Likewise.
2060
2061 PR c++/18674
2062 * cp-tree.def (TYPENAME_TYPE): Remove discussion of implicit
2063 typename from comments.
2064 * cp-tree.h (TYPENAME_IS_ENUM_P): New macro.
2065 (TYPENAME_IS_CLASS_P): Likewise.
2066 (make_typename_type): Change prototype.
2067 * decl.c (struct_typename_info): New type.
2068 (typename_compare): Expect the second argument to be a
2069 typename_info, not a tree.
2070 (build_typename_type): Add tag_type parameter. Do not create a
2071 new type until necessary.
2072 (make_typename_type): Add tag_type parameter.
2073 * error.c (TYPENAME_TYPE): Print tags other than "typename" if
2074 appropriate.
2075 * friend.c (make_friend_class): Adjust call to make_typename_type.
2076 * parser.c (cp_parser_make_typename_type): Likewise.
2077 (cp_parser_primary_expression): Adjust call to
2078 cp_parser_lookup_name.
2079 (cp_parser_unqualified_id): Adjust calls to cp_parser_class_name.
2080 (cp_parser_class_or_namespace_name): Likewise.
2081 (cp_parser_postfix_expression): Adjust calls to
2082 make_typename_type.
2083 (cp_parser_mem_initializer_id): Adjust calls to
2084 cp_parser_class_name.
2085 (cp_parser_type_parameter): Adjust calls to cp_parser_lookup_name.
2086 (cp_parser_template_name): Likewise.
2087 (cp_parser_template_argument): Likewise.
2088 (cp_parser_type_name): Adjust call to cp_parser_class_name.
2089 (cp_parser_elaborated_type_specifier): Adjust calls to
2090 make_typename_type and cp_parser_lookup_name.
2091 (cp_parser_namespace_name): Likewise.
2092 (cp_parser_class_name): Replace type_p parameter with tag_type.
2093 Adjust calls to make_typename_type and cp_parser_lookup_name.
2094 (cp_parser_class_head): Adjust calls to cp_parser_class_name.
2095 (cp_parser_base_specifier): Likewise.
2096 (cp_parser_lookup_name): Replace is_type parameter with tag_type.
2097 Adjust calls to make_typename_type and lookup_qualified_name.
2098 (cp_parser_lookup_name_simple): Adjust call to
2099 cp_parser_lookup_name.
2100 (cp_parser_constructor_declarator_p): Adjust call to
2101 cp_parser_class_name.
2102 * pt.c (convert_template_argument): Adjust all to
2103 make_typename_type.
2104 (tsubst_decl): Do not pre-substitute the type of the declaration.
2105 (tsubst): Hand off declarations more quickly. Adjust call to
2106 make_typename_type.
2107
2108 PR c++/18512
2109 * parser.c (cp_parser_postfix_dot_deref_expression): Robustify.
2110
2111 2004-11-29 Daniel Jacobowitz <dan@codesourcery.com>
2112
2113 PR c/7544
2114 * Make-lang.in (cp/decl2.o): Update dependencies.
2115 * decl2.c (finish_file): Call maybe_apply_pending_pragma_weaks.
2116
2117 2004-11-29 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2118
2119 PR c++/18652
2120 * name-lookup.c (pushtag): Change return type to tree.
2121 * cp-tree.h (pushtag): Adjust declaration.
2122 * decl.c (xref_tag, start_enum): Use return value of pushtag.
2123 * pt.c (push_template_decl_real): Return immediately if
2124 pushdecl_namespace_level returns error_mark_node.
2125
2126 2004-11-27 Kazu Hirata <kazu@cs.umass.edu>
2127
2128 * pt.c: Fix a comment typo.
2129
2130 2004-11-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2131
2132 Friend class name lookup 4/n
2133 * class.c (pushclass): Don't call cxx_remember_type_decls.
2134 * cp-tree.h (clear_anon_tags): Remove declaration.
2135 * decl.c (grokdeclarator): Don't call lookup_tag_reverse.
2136 * name-lookup.c (binding_entry_free, binding_table_free): Comment
2137 out functions.
2138 (binding_table_find_anon_type, binding_table_reverse_maybe_remap,
2139 binding_table_remove_anonymous_types, cxx_remember_type_decls,
2140 bt_print_entry, clear_anon_tags, follow_tag_typedef, lookup_tag,
2141 lookup_tag_reverse): Remove
2142 (begin_scope, leave_scope, kept_level_p, print_binding_level):
2143 Don't use type_decls field in cp_binding_level.
2144 (maybe_process_template_type_declaration, pushtag): Set
2145 CLASSTYPE_NESTED_UTDS directly.
2146 * name-lookup.h (binding_table_remove_anonymous_types,
2147 cxx_remember_type_decls, lookup_tag, lookup_tag_reverse): Remove
2148 declaration.
2149 (cp_binding_level): Remove type_decls field.
2150
2151 2004-11-26 Kazu Hirata <kazu@cs.umass.edu>
2152
2153 * typeck.c: Fix a comment typo.
2154
2155 2004-11-25 Mark Mitchell <mark@codesourcery.com>
2156
2157 PR c++/18445
2158 * class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
2159 unknown_type as non matching. Tidy up.
2160 * pt.c (build_non_dependent_expr): Do not build a
2161 NON_DEPENDENT_EXPR for a VAR_DECL.
2162
2163 PR c++/18001
2164 * cp-tree.h (lvalue_or_else): Remove declaration.
2165 * tree.c (lvalue_or_else): Remove.
2166 * typeck.c (build_unary_op): Adjust call to lvalue_or_else.
2167 (build_modify_expr): Likewise.
2168
2169 PR c++/18625
2170 * decl.c (duplicate_decls): Return error_mark_node on error, as
2171 specified.
2172
2173 PR c++/18466
2174 * decl.c (grokvardecl): Keep track of whether or not a there was
2175 explicit qualification.
2176 * name-lookup.c (set_decl_namespace): Complain about explicit
2177 qualification of a name within its own namespace.
2178
2179 PR c++/18545
2180 * typeck.c (check_return_expr): Robustify.
2181
2182 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2183
2184 Friend class name lookup 3/n, PR c++/3332
2185 * name-lookup.c (push_inner_scope, pop_inner_scope): New functions.
2186 (lookup_type_scope): Don't deal with name from user declaration
2187 specially.
2188 * name-lookup.h (push_inner_scope, pop_inner_scope): Add declarations.
2189 * parser.c (cp_parser_class_specifier): Use push_inner_scope and
2190 pop_inner_scope.
2191
2192 2004-11-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2193
2194 Friend class name lookup 2/n, PR c++/14513, c++/15410
2195 * name-lookup.c (lookup_name_real): Simplify.
2196 (lookup_type_scope): Add SCOPE parameter. Handle friend class
2197 lookup.
2198 * name-lookup.h (tag_scope): New enum type.
2199 (lookup_type_scope): Adjust declaration.
2200 * decl.c (lookup_and_check_tag, xref_tag, xref_tag_from_type):
2201 Change bool parameter GLOBALIZED to TAG_SCOPE parameter SCOPE.
2202 (start_enum): Likewise. Add assertion test that NAME is
2203 IDENTIFIER_NODE. Use anonymous name for dummy ENUMERAL_TYPE in
2204 case of error.
2205 * cp-tree.h (xref_tag, xref_tag_from_type): Adjust declarations.
2206 * parser.c (cp_parser_elaborated_type_specifier,
2207 cp_parser_class_head): Adjust call to xref_tag.
2208 * pt.c (lookup_template_class, instantiate_class_template):
2209 Likewise.
2210 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
2211 tinfo_base_init, emit_support_tinfos): Likewise.
2212
2213 2004-11-25 Joseph S. Myers <joseph@codesourcery.com>
2214
2215 * g++spec.c, lex.c: Avoid ` as left quote in diagnostics.
2216
2217 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2218
2219 PR c++/17473
2220 * name-lookup.c (supplement_binding): Do not allow typedefs to be
2221 redefined in class scope.
2222
2223 PR c++/18285
2224 * parser.c (cp_parser_set_decl_type_spec): Do not try to allow
2225 redefinitions of builtin types other that "bool" or "wchar_t".
2226
2227 2004-11-24 Steven Bosscher <stevenb@suse.de>
2228
2229 * decl.c (cxx_init_decl_processing): Don't clear
2230 flag_inline_functions.
2231
2232 2004-11-24 Mark Mitchell <mark@codesourcery.com>
2233
2234 * pt.c (tsubst_function_type): Do not permit function types which
2235 return arrays or functions.
2236
2237 PR c++/18586
2238 * parser.c (cp_parser_init_declarator): Do not pop scope twice.
2239
2240 PR c++/18530
2241 * cp-tree.h (CTOR_NAME): Remove.
2242 (DTOR_NAME): Remove.
2243 * decl.c (initialize_predefined_identifiers): Add spaces to the
2244 end of constructor and destructor names.
2245
2246 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2247
2248 PR c++/8929
2249 * decl.c (start_decl): Check for invalid specialization headers.
2250
2251 2004-11-24 Paolo Bonzini <bonzini@gnu.org>
2252
2253 PR c++/16882
2254
2255 * call.c (standard_conversion): Move check for conversions between
2256 vector pointers...
2257 * typeck.c (ptr_reasonably_similar): ... here.
2258
2259 2004-11-23 Ben Elliston <bje@au.ibm.com>
2260
2261 * cp-tree.h (context_as_string): Remove extern.
2262 * error.c (context_as_string): Remove.
2263
2264 * cp-tree.h (cp_type_qual_from_rid): Remove extern.
2265 * lex.c (cp_type_qual_from_rid): Remove.
2266
2267 * cp-tree.h (do_poplevel): Remove extern.
2268 (check_multiple_declarators): Likewise.
2269 * semantics.c (do_poplevel): Make static.
2270 (check_multiple_declarators): Remove.
2271
2272 * cp-tree.h (check_final_overrider): Remove extern.
2273 * search.c (check_final_overrider): Make static.
2274
2275 * cp-tree.h (build_artificial_parm): Remove extern.
2276 * decl2.c (build_artificial_parm): Make static.
2277
2278 2004-11-22 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2279
2280 PR c++/18354
2281 * typeck.c (build_unary_op) <CONVERT_EXPR, NEGATE_EXPR>: Unify code.
2282 Make sure the result is always a rvalue.
2283
2284 2004-11-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2285
2286 * decl.c (start_preparsed_function): Call check_function_type even
2287 in templates.
2288 (require_complete_types_for_parms): Skip dependent types.
2289 (check_function_type): Likewise.
2290
2291 2004-11-16 Steven Bosscher <stevenb@suse.de>
2292
2293 * Make-lang.in (cp/decl.o, cp/search.o): Don't depend on stack.h.
2294 * search.c: Don't include it.
2295
2296 2004-11-15 Andrew Pinski <pinskia@physics.uc.edu>
2297
2298 * cp-gimplify.c: Include pointer-set.h
2299 (cp_genericize_r): Use pointer_sets instead of a hashtable.
2300 Also instert the new statement for CLEANUP_STMT.
2301 (cp_genericize): Use pointer_sets instead of a hashtable.
2302 * Make-lang.in (cp-gimplify.o): Depend on pointer-set.h.
2303
2304 2004-11-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2305
2306 Friend class name lookup 1/n, PR c++/18471
2307 * decl.c (lookup_and_check_tag): New function.
2308 (xref_tag, start_enum): Use it.
2309 (check_elaborated_type_specifier): Move TEMPLATE_TYPE_PARM check
2310 before !DECL_IMPLICIT_TYPEDEF_P. Also display previously declared
2311 location.
2312 * name-lookup.c (lookup_name_current_level): Rename to ...
2313 (lookup_name_innermost_nonclass_level): ... this.
2314 (lookup_type_scope): New function.
2315 * name-lookup.h (lookup_name_current_level): Rename to ...
2316 (lookup_name_innermost_nonclass_level): ... this.
2317 (lookup_type_scope): Add declaration.
2318
2319 2004-11-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2320
2321 PR c++/17344
2322 * pt.c (coerce_template_parms): Only emit error message about
2323 invalid template argument when TF_ERROR.
2324
2325 2004-11-12 Mark Mitchell <mark@codesourcery.com>
2326
2327 PR c++/18389
2328 * decl.c (start_decl): Make sure to set *pop_scope_p. Return
2329 error_mark_node to indicate errors.
2330
2331 PR c++/18429
2332 * parser.c (cp_parser_direct_declarator): Disallow non-constant
2333 array bounds when not inside a function.
2334
2335 PR c++/18436
2336 * pt.c (tsubst_copy_and_build): Do not do Koenig lookup when an
2337 unqualified name resolves to a member function.
2338
2339 PR c++/18407
2340 * pt.c (tsubst_copy_and_build): Handle qualified names used from a
2341 derived class correctly.
2342
2343 * decl2.c (import_export_decl): Fix typo in comment.
2344 * tree.c (pod_type_p): Likewise.
2345
2346 2004-11-10 Andrew Pinski <pinskia@physics.uc.edu>
2347
2348 * typeck.c (cxx_mark_addressable): Add braces around the first if.
2349
2350 2004-11-10 Adam Nemet <anemet@lnxw.com>
2351
2352 PR middle-end/18160
2353 * typeck.c (cxx_mark_addressable): Issue an error if address of an
2354 explicit register variable is requested.
2355
2356 2004-11-10 Nathan Sidwell <nathan@codesourcery.com>
2357
2358 PR c++/18143
2359 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK): New.
2360 (struct lang_decl_flags): Add thunk_p flag.
2361 (struct lang_decl): Remove separate fixed_offset. Place
2362 cloned_function and fixed_offset into union.
2363 (DECL_CLONED_FUNCTION_P, DECL_CLONED_FUNCTION): Adjust.
2364 (DECL_THUNK_P, SET_DECL_THUNK_P): Adjust.
2365 (THUNK_FIXED_OFFSET): Adjust.
2366 * method.c (make_thunk): Adjust.
2367
2368 2004-11-09 Mark Mitchell <mark@codesourcery.com>
2369
2370 PR c++/18369
2371 * init.c (build_new_1): Handle parenthesized type-ids that name an
2372 array type. Tidy.
2373
2374 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
2375
2376 * call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
2377 pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
2378 quoting in diagnostics.
2379 * parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
2380 quoting in printf format.
2381 * decl.c (duplicate_decls, start_decl): Use %qD instead of
2382 unquoted %D.
2383
2384 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
2385
2386 * class.c, decl.c, lex.c, name-lookup.c, parser.c, pt.c,
2387 search.c, typeck2.c: Fix comment formatting.
2388
2389 2004-11-04 Ulrich Weigand <uweigand@de.ibm.com>
2390
2391 PR tree-optimization/18184
2392 * cp-objcp-common.c (cxx_types_compatible_p): Do not treat pointers
2393 of different modes or alias-all flags as equivalent.
2394 * typeck.c (comptypes): Likewise.
2395
2396 2004-11-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2397
2398 DR 49, 100
2399 * cp-tree.h (TYPE_REF_OBJ_P): New macro.
2400 (TYPE_PTR_P, TYPE_PTROB_P, TYPE_PTROBV_P, TYPE_PTRFN_P,
2401 TYPE_REFFN_P): Document.
2402 (fold_decl_constant_value): New prototype.
2403 * pt.c (convert_nontype_argument_function): Rewrite and extract
2404 parts into...
2405 (fold_decl_constant_value, convert_nontype_argument_function): New.
2406 (lookup_template_class): Add comment about useless double call.
2407 * mangle.c (write_expression): Strip conversions before lowering
2408 pointer to members.
2409 * cvt.c (ocp_convert): Check LOOKUP_COMPLAIN for a pedwarn. Disallow
2410 enum to enum conversion.
2411
2412 2004-11-02 Mark Mitchell <mark@codesourcery.com>
2413
2414 PR c++/18124
2415 * parser.c (cp_parser_type_parameter): Robustify.
2416
2417 PR c++/18155
2418 * parser.c (cp_parser_single_declaration): Disallow template
2419 typedefs.
2420
2421 PR c++/18177
2422 * typeck.c (build_const_cast): Use error_operand_p.
2423
2424 2004-11-02 Ziemowit Laski <zlaski@apple.com>
2425
2426 * cp-lang.c (cxx_types_compatible_p): Remove prototype and definition.
2427 (LANG_HOOKS_TYPES_COMPATIBLE_P): Move to cp-objcp-common.h.
2428 * cp-objcp-common.c (cxx_types_compatible_p): Moved definition here
2429 from cp-lang.c.
2430 * cp-objcp-common.h (cxx_types_compatible_p): Moved prototype here
2431 from cp-lang.c.
2432 (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from cp-lang.c.
2433
2434 2004-11-01 Nathan Sidwell <nathan@codesourcery.com>
2435
2436 PR c++/18064
2437 * search.c (check_final_overrider): Deprecate gnu covariant extension.
2438
2439 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2440
2441 Convert diagnostics to use quoting flag q 9/n
2442 * typeck.c (build_x_unary_op, convert_member_func_to_ptr,
2443 get_delta_difference): Use new quotation style.
2444 * repo.c (reopen_repo_file_for_write): Likewise.
2445 * pt.c (do_type_instantiation): Likewise.
2446 * parser.c (cp_parser_diagnose_invalid_type_name):
2447 * name-lookup.c (push_overloaded_decl, set_decl_namespace):
2448 * error.c (cp_print_error_function,
2449 print_instantiation_full_context): Likewise.
2450 * decl.c (define_label, grok_reference_init,
2451 maybe_deduce_size_from_array_init, revert_static_member_fn):
2452 * decl2.c (check_classfn): Likewise.
2453 * class.c (add_method, check_field_decls, layout_class_type,
2454 resolve_address_of_overloaded_function): Likewise.
2455 * call.c (build_x_va_arg, build_over_call): Likewise.
2456
2457 2004-10-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
2458
2459 Convert diagnostics to use quoting flag q 8/n
2460 * cvt.c (cp_convert_to_pointer, warn_ref_binding,
2461 convert_to_reference, ocp_convert, convert_to_void
2462 cp_convert_to_pointer): Use new quotation style.
2463
2464 2004-10-31 Mark Mitchell <mark@codesourcery.com>
2465
2466 PR c++/15172
2467 * typeck2.c (store_init_value): Use split_nonconstant_init even
2468 for types that require construction.
2469
2470 1004-10-28 Matt Austern <austern@apple.com>
2471
2472 PR c++/17542
2473 * cp-tree.h (class_key_or_enum_as_string): Declare.
2474 * error.c (class_key_or_enum): Rename to class_key_or_enum_as_string
2475 and remove static qualifier.
2476 * decl.c (shadow_tag): Warn about ignored attributes in class/struct/
2477 union/enum declaration.
2478
2479 2004-10-29 Kazu Hirata <kazu@cs.umass.edu>
2480
2481 * pt.c: Fix a comment typo.
2482
2483 2004-10-28 Nathan Sidwell <nathan@codesourcery.com>
2484
2485 * typeck.c (composite_pointer_type): Remove comment about DR 195.
2486 (build_reinterpret_cast_1): Revert DR195 patch. Only emit a
2487 warning when being pedantic.
2488 (build_reinterpet_cast, build_c_cast): Adjust.
2489
2490 2004-10-29 Mark Mitchell <mark@codesourcery.com>
2491
2492 PR c++/17695
2493 * decl.c (grokdeclarator): Mark TYPE_DECLs as abstract when they
2494 appear in a constructor/destructor that will be cloned.
2495
2496 1004-10-28 Matt Austern <austern@apple.com>
2497
2498 PR c++/14124
2499 * decl.c (finish_enum): Handle packed attribute.
2500 * parser.c (cp_parser_enum_specifier): Process trailing attributes.
2501
2502 2004-10-28 Mark Mitchell <mark@codesourcery.com>
2503
2504 PR c++/17132
2505 * pt.c (instantiate_class_template): Increment
2506 processing_template_decl when substituting into a member class
2507 template.
2508
2509 2004-10-27 Mark Mitchell <mark@codesourcery.com>
2510
2511 PR c++/17435
2512 * call.c (convert_like_real): Fix formatting.
2513 (initialize_reference): When binding a temporary to a base class,
2514 ensure that the nominal copy made is to the derived class, not the
2515 base class.
2516
2517 PR c++/18140
2518 * parser.c (cp_parser_next_token_ends_template_argument_p): Do not
2519 include ">>".
2520
2521 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2522
2523 * decl.c (bad_specifiers): Move the q after the %.
2524
2525 2004-10-27 Andrew Pinski <pinskia@physics.uc.edu>
2526
2527 * parser.c (cp_parser_diagnose_invalid_type_name): Move the q after
2528 the %.
2529
2530 2004-10-26 Mark Mitchell <mark@codesourcery.com>
2531
2532 * name-lookup.c (do_namespace_alias): Use FROB_CONTEXT.
2533 * search.c (current_scope): Fix prototype.
2534
2535 PR c++/18093
2536 * search.c (current_scope): Return the innermost non-block scope,
2537 not the innermost non-block, non-namespace scope.
2538 (at_namespace_scope_p): Adjust accordingly.
2539 (dfs_accessible_post): Do not pass namespaces to is_friend.
2540 (dfs_walk_once_accessible_r): Likewise.
2541 * decl.c (grokvardecl): Adjust call to current_scope.
2542 (build_enumerator): Likewise.
2543 * parser.c (cp_parser_using_declaration): Likewise.
2544 (cp_parser_direct_declarator): Use at_namespace_scope_p instead of
2545 current_scope.
2546 (cp_parser_class_head): Adjust call to current_scope.
2547 * name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
2548 alias.
2549
2550 PR c++/18020
2551 * pt.c (tusbst_copy_and_build): Resolve enumeration constants to
2552 their underlying values.
2553
2554 PR c++/18161
2555 * typeck.c (build_binary_op): Honor build_type, even when in a
2556 template.
2557
2558 2004-10-26 Nathan Sidwell <nathan@codesourcery.com>
2559
2560 * parser.c (cp_lexer_get_preprocessor_token): Remove unneeded
2561 padding token checking.
2562
2563 2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
2564
2565 PR c++/18121
2566 * decl.c (grokdeclarator) <case cdk_array>: Remove the call
2567 layout_type as it is already done by create_array_type_for_decl.
2568
2569 2004-10-22 Nathan Sidwell <nathan@codesourcery.com>
2570
2571 PR c++/18095
2572 * parser.c (eof_token): Make const, correctly initialize rid and
2573 location fields.
2574 (struct cp_lexer): Replace buffer_end pointer with buffer_length
2575 count. Adjust.
2576 (cp_lexer_new_main): Directly grow lexer's buffer here. Don't
2577 zero it out.
2578 (cp_lexer_new_from_tokens): Adjust.
2579 (cp_lexer_grow_buffer): Remove.
2580 (cp_lexer_peek_nth_token, cp_lexer_consume_token,
2581 cp_lexer_purge_token): Add const casts.
2582
2583 2004-10-21 Mark Mitchell <mark@codesourcery.com>
2584
2585 PR c++/18073
2586 PR c++/10841
2587 * cp-tree.h (convert_to_base): Change prototype.
2588 (build_ptrmemfunc): Likewise.
2589 (convert_ptrmem): New function.
2590 * call.c (struct conversion): Adjust documentation for base_p.
2591 (standard_conversion): Set base_p for ck_pmem conversions as
2592 appropriate.
2593 (convert_like_real): Use convert_to_base for ck_pmem and ck_ptr
2594 conversions.
2595 * class.c (convert_to_base): Handle both pointers and objects.
2596 Add nonnull parameter.
2597 (build_vfield_ref): Adjust call to convert_to_base.
2598 * cvt.c (cp_convert_to_pointer): Adjust call to build_ptrmemfunc.
2599 (convert_force): Likewise.
2600 * typeck.c (build_unary_op): Likewise.
2601 (convert_ptrmem): New function.
2602 (build_static_cast_1): Use it.
2603 (build_reinterpret_cast): Allow conversions to vector types.
2604 (get_delta_difference): Add c_cast_p parameter.
2605 (build_ptrmemfunc): Likewise. Adjust calls to
2606 get_delta_difference.
2607
2608 2004-10-21 Andrew Pinski <pinskia@physics.uc.edu>
2609
2610 PR c++/13560
2611 * error.c (cp_error_at): Output the context as it might be
2612 different file as the other location.
2613
2614 2004-10-21 Kazu Hirata <kazu@cs.umass.edu>
2615
2616 * typeck.c: Fix a comment typo.
2617
2618 2004-10-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2619
2620 PR c++/13495
2621 * decl.c (make_unbound_class_template): Add PARM_LIST parameter.
2622 * cp-tree.h (make_unbound_class_template): Adjust prototype.
2623 * parser.c (cp_parser_lookup_name): Adjust call to
2624 make_unbound_class_template.
2625 (cp_parser_single_declaration): Handle member class of class
2626 template as template friend parsing correctly.
2627 * friend.c (is_friend): Call is_specialization_of_friend for
2628 template friend class.
2629 (make_friend_class): Handle member class of class template as
2630 template friend.
2631 * pt.c (is_specialization_of_friend): Likewise.
2632 (instantiate_class_template): Likewise.
2633 (tsubst): Adjust call to make_unbound_class_template.
2634
2635 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2636
2637 * typeck.c (composite_pointer_type): Add comment about DR 195
2638 (build_reinterpret_cast_1): Add for_reinterpret_cast_p parameter.
2639 Allow function pointer conversions that DR195 suggests.
2640 (build_reinterpret_cast, build_c_cast): Update
2641 build_reinterpret_cast_1 calls.
2642
2643 2004-10-20 Kazu Hirata <kazu@cs.umass.edu>
2644
2645 * call.c, typeck.c: Fix comment typos.
2646
2647 2004-10-20 Nathan Sidwell <nathan@codesourcery.com>
2648
2649 * parser.c (cp_token_position): New typedef. Define VEC thereof.
2650 (struct cp_lexer): Allow buffer and buffer_end to be NULL. Make
2651 next_token and last_token cp_token_position. Make saved_tokens a
2652 VEC(cp_token_position).
2653 (eof_token): New static variable.
2654 (CP_SAVED_TOKENS_SIZE): Rename to ...
2655 (CP_SAVED_TOKEN_STACK): ... here.
2656 (cp_lexer_new_main): Adjust main lexer creation and buffer
2657 filling.
2658 (cp_lexer_new_from_tokens): Do not copy the tokens, merely point
2659 to the parent buffer. Do not append eof token.
2660 (cp_lexer_destroy): Only free buffer if non-NULL. Free token
2661 stack.
2662 (cp_lexer_next_token, cp_lexer_prev_token): Remove.
2663 (cp_lexer_token_position, cp_lexer_token_at): New.
2664 (cp_lexer_saving_tokens): Adjust. Make inline.
2665 (cp_lexer_advance_token, cp_lexer_token_difference): Remove.
2666 (cp_lexer_peek_token_emit_debug_info): Fold into ...
2667 (cp_lexer_peek_token): ... here.
2668 (cp_lexer_peek_nth_token): Don't peek past EOF.
2669 (cp_lexer_consume_token): Set next_token to eof_token, if reaching
2670 EOF.
2671 (cp_lexer_purge_token): Adjust eof setting.
2672 (cp_lexer_purge_tokens_after): Likewise.
2673 (cp_lexer_save_tokens): Push next_token directly.
2674 (cp_lexer_commit_tokens): Adjust.
2675 (cp_lexer_rollback_tokens): Pop next_token directly.
2676 (cp_parser_check_for_invalid_template_id): Adjust token purging.
2677 (cp_parser_translation_unit): Do not consume the EOF.
2678 (cp_parser_nested_name_specifier_opt): Adjust token purging.
2679 (cp_parser_template_id, cp_parser_template_name): Likewise.
2680
2681 2004-10-19 Mark Mitchell <mark@codesourcery.com>
2682
2683 PR c++/14035
2684 * call.c (struct conversion): Add base_p.
2685 (convert_like): Add c_cast_p argument.
2686 (convert_like_with_conversion): Likewise.
2687 (build_conv): Clear base_p.
2688 (standard_conversion): Set it, for derived-to-base conversions.
2689 (convert_like_real): Add c_cast_p parameter. Handle pointer
2690 conversions directly rather than relying on ocp_convert.
2691 (perform_direct_initialization_if_possible): Add c_cast_p
2692 parameter.
2693 * cp-tree.h (perform_direct_initialization_if_possible): Change
2694 prototype.
2695 (convert_member_func_to_ptr): New function.
2696 * typeck.c (check_for_casting_away_constness): Add diag_fn
2697 parameter.
2698 (build_static_cast_1): New function, split out from ...
2699 (build_static_cast): ... here. Use build_static_cast_1.
2700 (build_reinterpret_cast_1): New function, split out from ...
2701 (build_reinterpret_cast): ... here. Use build_reinterpret_cast_1.
2702 (build_const_cast_1): New function, split out from ...
2703 (build_const_cast): ... here. Use build_const_cast_1.
2704 (build_c_cast): Rewrite to use build_const_cast_1,
2705 build_static_cast_1, and build_reinterpret_cast_1.
2706 (convert_member_func_to_ptr): New function.
2707
2708 2004-10-19 Paolo Bonzini <bonzini@gnu.org>
2709
2710 PR c++/18047
2711 * parser.c (enum cp_parser_prec): Give relational expressions
2712 a higher precedence than equality expressions.
2713
2714 2004-10-15 Nathan Sidwell <nathan@codesourcery.com>
2715
2716 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Adjust lookup_base call.
2717 (ACCESSIBLY_UNIQUELY_DERIVED_P): Remove.
2718 (PUBLICLY_UNIQUELY_DERIVED_P): Adjust lookup_base call.
2719 (enum base_access): Reorganize.
2720 (accessible_base_p, accessible_p): Add consider_local_p parameter.
2721 * call.c (standard_conversion): Update comment about
2722 DERIVED_FROM_P.
2723 (enforce_access): Adjust accessible_p call.
2724 (build_over_call): Adjust accessible_base_p call.
2725 * class.c (convert_to_base): Adjust lookup_base call.
2726 (build_vtbl_ref_1): Likewise.
2727 (warn_about_ambiguous_bases): Likewise. Add early exit.
2728 * cvt.c (convert_to_pointer_force) Adjust lookup_base call.
2729 * search.c (accessible_base_p): Add consider_local_p parameter.
2730 (lookup_base): Pass consider_local_p to accessible_base_p call.
2731 (friend_accessible_p): Check whether scope is a class member.
2732 Remove unnecessary class template check.
2733 (accessible_p): Add consider_local_p parameter. Use it.
2734 (adjust_result_of_qualified_name_lookup): Adjust lookup_base call.
2735 * tree.c (maybe_dummy_object): Likewise.
2736 * typeck.c (comp_except_type): Use PUBLICLY_UNIQUELY_DERIVED_P.
2737 (build_class_member_access_expr): Adjust lookup_base call.
2738 * typeck2.c (binfo_or_else): Likewise.
2739 * rtti.c (build_dynamic_cast_1): Access can consider friendship
2740 and current scope.
2741
2742 2004-10-17 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2743
2744 PR c++/17743
2745 * decl2.c (grokfield): Apply attributes also to TYPE_DECLs.
2746
2747 2004-10-16 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2748
2749 PR c++/10479
2750 * parser.c (cp_parser_parenthesized_expression_list): Fold
2751 non-dependent expressions in attribute lists.
2752
2753 2004-10-15 Mark Mitchell <mark@codesourcery.com>
2754
2755 PR c++/17042
2756 * decl.c (declare_global_var): Use the return value from pushdecl.
2757
2758 PR c++/14667
2759 * parser.c (cp_parser_simple_declaration): Do not diagnose invalid
2760 type names if we have already found a valid type.
2761 (cp_parser_member_declaration): Likewise.
2762
2763 PR c++/17916
2764 * parser.c (cp_parser_member_specification_opt): Handle
2765 CPP_PRAGMA.
2766
2767 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2768
2769 * dump.c, g++spec.c, repo.c: Update copyright.
2770
2771 2004-10-15 Kazu Hirata <kazu@cs.umass.edu>
2772
2773 * decl.c: Fix a comment typo.
2774
2775 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2776
2777 PR c++/16301
2778 * name-lookup.c (parse_using_directive): If we have a
2779 error_mark_node, do not set the decl namespace associations
2780 on it.
2781
2782 2004-10-14 Mark Mitchell <mark@codesourcery.com>
2783
2784 PR c++/17976
2785 * decl.c (cp_finish_decl): Do not call expand_static_init more
2786 than once for a single variable.
2787
2788 2004-10-14 Matt Austern <austern@apple.com>
2789
2790 * Make-lang.in (pt.o): depends on pointer-set.h
2791 * cp-tree.h (cp_walk_subtrees): Last argument is pointer_set_t* now.
2792 * pt.c (struct pair_fn_data): Use pointer_set_t, not htab_t
2793 (for_each_template_parm): Convert from htab_t to pointer_set_t.
2794 * tree.c (cp_walk_subtrees): Last argument is pointer_set_t* now.
2795
2796 2004-10-13 Andrew Pinski <pinskia@physics.uc.edu>
2797
2798 PR c++/17661
2799 * semantics.c (finish_for_expr): Convert expression to void
2800 so that we don't create temporaries for a?b:c.
2801
2802 2004-10-13 Kazu Hirata <kazu@cs.umass.edu>
2803
2804 * search.c: Fix a comment typo.
2805
2806 2004-10-12 Nathan Sidwell <nathan@codesourcery.com>
2807
2808 * class.c (dfs_modify_vtables): Simplify condition. Return
2809 dfs_skip_bases as appropriate.
2810 (modify_all_vtables): Walk in pre-order.
2811 * search.c (dfs_walk_all, dfs_walk_once_r,
2812 dfs_walk_once_accessible_r): Assert post order function never
2813 returns dfs_skip_bases.
2814
2815 * search.c (struct lookup_base_data_s): New.
2816 (lookup_base_r): Replace with ...
2817 (dfs_lookup_base): ... this.
2818 (lookup_base): Use dfs_walk_all.
2819
2820 2004-10-12 Kazu Hirata <kazu@cs.umass.edu>
2821
2822 * search.c: Fix comment typos.
2823
2824 2004-10-11 Mark Mitchell <mark@codesourcery.com>
2825
2826 PR c++/15786
2827 * parser.c (cp_parser_declarator): Add member_p parameter.
2828 (cp_parser_condition): Adjust calls to cp_parser_declarator.
2829 (cp_parser_explicit_instantiation): Likewise.
2830 (cp_parser_init_declarator): Likewise.
2831 (cp_parser_direct_declarator): Add member_p parameter. Do not
2832 parse tentatively when parsing the parameters to a member.
2833 (cp_parser_type_id): Adjust calls to cp_parser_declarator.
2834 (cp_parser_parameter_declaration): Likewise.
2835 (cp_parser_member_declaration): Likewise.
2836 (cp_parser_exception_declaration): Likewise.
2837
2838 PR c++/17936
2839 * cp-tree.h (CLASSTYPE_TEMPLATE_SPECIALIZATION): Add a comment.
2840 * pt.c (optimize_specialization_lookup_p): Do not optimize lookups
2841 for members of partial or explicit specializations.
2842
2843 PR c++/17929
2844 * decl2.c (finish_anon_union): Robustify.
2845
2846 2004-10-11 Nathan Sidwell <nathan@codesourcery.com>
2847
2848 * cp-tree.h (get_dynamic_cast_base_type): Rename to ...
2849 (dcast_base_hint): ... here.
2850 * rtti.c (build_dynamic_cast_1): Use dcast_base_hint.
2851 * search.c (struct dcast_data_s): New.
2852 (dynamic_cast_base_recurse): Remove. Replace with ...
2853 (dfs_dcast_hint_pre, dfs_dcast_base_post): ... these. New.
2854 (get_dynamic_cast_base_type): Rename to ...
2855 (dcast_base_hint): ... here. Use dfs_walk_once_accessible.
2856 (accessible_r): Remove.
2857 (dfs_accessible_post): New, broken out of accessible_r.
2858 (accessible_p): Use dfs_walk_once_accessible.
2859 (dfs_walk_once_accessible_r): New. From accessible_r.
2860 (dfs_walk_once_accessible): New. From acessible_p.
2861
2862 * cp-tree.h (SAME_BINFO_TYPE_P): New.
2863 * class.c (build_base_path): Use SAME_BINFO_TYPE_P to compare
2864 binfo types.
2865 (convert_to_base_statically, determine_primary_bases,
2866 update_vtable_entry_for_fn, dfs_modify_vtables, build_vtt_inits,
2867 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
2868 accumulate_vtbl_inits, dfs_accumulate_vtbl_inits,
2869 build_vtbl_initializer, add_vcall_offset_vtbl_entries_1): Likewise.
2870 * init.c (expand_member_init): Likewise.
2871 * search.c (lookup_base_r, dynamic_cast_base_recurse,
2872 binfo_via_virtual, copied_binfo, binfo_for_vbase,
2873 original_binfo): Likewise.
2874 * tree.c (copy_binfo): Likewise.
2875
2876 2004-10-11 Kazu Hirata <kazu@cs.umass.edu>
2877
2878 * semantics.c: Fix comment typos.
2879
2880 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2881
2882 PR c++/17554
2883 part of c++/17657
2884 middle-end/17703
2885 * semantics.c (maybe_cleanup_point_expr): Call
2886 fold_build_cleanup_point_expr.
2887 (maybe_cleanup_point_expr_void): New function.
2888 (add_decl_expr): Call maybe_cleanup_point_expr_void.
2889 (finish_expr_stmt): Likewise.
2890 (finish_return_stmt): Likewise.
2891 (finish_for_expr): Likewise.
2892 (finish_asm_stmt): Likewise.
2893 * typeck.c (condition_conversion): Call
2894 fold_build_cleanup_point_expr.
2895
2896 2004-10-10 Andrew Pinski <pinskia@physics.uc.edu>
2897
2898 PR c++/17907
2899 * semantics.c (add_decl_expr): If the decl has a size which
2900 has side effects then the decl expression needs a cleanup point.
2901
2902 2004-10-10 Mark Mitchell <mark@codesourcery.com>
2903
2904 PR c++/17393
2905 * decl.c (grokdeclarator): Robustify error-recovery on invalid
2906 declarations.
2907
2908 2004-10-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
2909
2910 Convert diagnostics to use quoting flag q 7/n
2911 * typeck.c (composite_pointer_type_r, composite_pointer_type,
2912 cxx_sizeof_or_alignof_type, cxx_sizeof_or_alignof_expr,
2913 string_conv_p, build_class_member_access_expr,
2914 build_class_member_access_expr, lookup_destructor,
2915 finish_class_member_access_expr, build_indirect_ref,
2916 get_member_function_from_ptrfunc, build_function_call,
2917 convert_arguments, build_binary_op, pointer_diff, build_unary_op,
2918 check_for_casting_away_constness, build_static_cast,
2919 build_reinterpret_cast, build_const_cast, build_c_cast,
2920 build_modify_expr, get_delta_difference, build_ptrmemfunc,
2921 dubious_conversion_warnings, convert_for_assignment,
2922 convert_for_initialization,
2923 maybe_warn_about_returning_address_of_local, check_return_expr):
2924 Use quoting marks.
2925
2926 * typeck2.c (error_not_base_type, readonly_error,
2927 abstract_virtuals_error, cxx_incomplete_type_diagnostic,
2928 store_init_value, digest_init, build_x_arrow,
2929 build_m_component_ref, require_complete_eh_spec_types): Likewise.
2930
2931 * tree.c (cp_build_qualified_type_real,
2932 handle_java_interface_attribute, handle_init_priority_attribute):
2933 Likewise.
2934
2935 * semantics.c (finish_asm_stmt, finish_non_static_data_member,
2936 finish_pseudo_destructor_expr,
2937 check_template_template_default_arg, begin_class_definition,
2938 finish_base_specifier, qualified_name_lookup_error,
2939 finish_id_expression, finish_typeof): Likewise.
2940
2941 * search.c (lookup_base, check_final_overrider,
2942 look_for_overrides_r): Likewise.
2943
2944 * rtti.c (get_tinfo_decl, build_dynamic_cast_1): Likewise.
2945
2946 2004-10-09 Mark Mitchell <mark@codesourcery.com>
2947
2948 PR c++/17867
2949 * error.c (dump_expr): Correct handling of AGGR_INIT_EXPRs using a
2950 constructor.
2951
2952 PR c++/17670
2953 * init.c (build_new): Correct comments.
2954 * parser.c (cp_parser_new_expression): Use NULL_TREE for nelts in
2955 the non-array case.
2956
2957 PR c++/17821
2958 * parser.c (cp_parser_postfix_dot_deref_expression): If the
2959 pseduo-destructor-name production does not work, fall back to the
2960 ordinary production.
2961
2962 PR c++/17826
2963 * tree.c (cp_tree_equal): Handle a BASELINK.
2964
2965 PR c++/17524
2966 * cp-tree.h (check_var_type): New function.
2967 * decl.c (check_var_type): New function, split out from ...
2968 (grokdeclarator): ... here.
2969 * pt.c (tsubst_decl): Use check_var_type.
2970
2971 PR c++/17685
2972 * decl.c (grokdeclarator): Disallow declarations of operators as
2973 non-functions.
2974
2975 2004-10-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2976
2977 PR c++/17868
2978 * error.c (dump_expr): Add missing case for RDIV_EXPR.
2979
2980 2004-10-08 Kazu Hirata <kazu@cs.umass.edu>
2981
2982 * pt.c, search.c: Fix comment typos.
2983
2984 2004-10-08 Nathan Sidwell <nathan@codesourcery.com>
2985
2986 * cp-tree.h (dfs_walk, dfs_walk_real, dfs_unmark, markedp,
2987 unmarkedp): Remove.
2988 (dfs_skip_bases, dfs_walk_all, dfs_walk_once): New.
2989 * class.c (struct find_final_overrider_data): Remove most_derived,
2990 vpath_list and vpath fields. Add path field.
2991 (dfs_find_final_ocerrider_1): Add DEPTH parameter. Adjust.
2992 (dfs_find_final_overrider): Rename to ...
2993 (dfs_find_final_overrider_pre): ... here. Adjust.
2994 (dfs_find_final_overrider_post): Adjust.
2995 (dfs_find_final_overrider_q): Fold into
2996 dfs_find_final_overrider_pre.
2997 (find_final_overrider): Adjust dfs searching.
2998 (dfs_modify_vtables): Don't mark binfo here.
2999 (modify_all_vtables): Use dfs_walk_once.
3000 (build_vtt_inits): Likwise. Use dfs_walk_all.
3001 (dfs_build_secondary_vptr_vtt_inits): Don't mark binfo here.
3002 Return dfs_skip_bases as appropriate.
3003 (dfs_fixup_binfo_vtbls): Return dfs_skip_bases as appropriate.
3004 * init.c (dfs_initialized_vtbl_ptrs): Return dfs_skip_bases as
3005 appropriate. Don't mark binfo here.
3006 (initialize_vtbl_ptrs): Use dfs_walk_once.
3007 * search.c (struct vbase_info): Remove unused struct.
3008 (access_in_type): Use dfs_walk_once.
3009 (dfs_access_in_type): Don't mark binfo here.
3010 (dfs_accessible_queue_p, dfs_accessible_p) Remove.
3011 Fold into ...
3012 (accessible_r): ... here. New. Specialize dfs_walk_once.
3013 (accessible_p): Use accessible_r.
3014 (lookup_field_queue_p): Remove. Fold into ...
3015 (lookup_field_r): ... here. Adjust.
3016 (lookup_member): Use dfs_walk_all.
3017 (dfs_walk_real, dfs_walk): Replace with ...
3018 (dfs_walk_all, dfs_walk_once): ... these.
3019 (dfs_walk_once_r, dfs_unmark_r): Workers for dfs_walk_once.
3020 (dfs_unmark, unmarkedp, markedp): Remove.
3021 (dfs_get_pure_virtuals): Don't mark binfo here.
3022 (get_pure_virtuals): Use dfs_walk_once.
3023 (dfs_debug_unmarked_p): Remove. Fold into ...
3024 (dfs_debug_mark): ... here.
3025 (note_debug_info_needed): Use dfs_walk_all.
3026
3027 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3028
3029 * pt.c (tsubst_expr) <case ASM_EXPR>: Look passed the
3030 CLEANUP_POINT_EXPR to get the asm expression.
3031
3032 2004-10-07 Mark Mitchell <mark@codesourcery.com>
3033
3034 * cp-tree.h (ICS_USER_FLAG): Remove comment about obsolete flag.
3035 (DECL_MEMBER_TEMPLATE_P): New macro.
3036 (is_member_template): Remove.
3037 (class_method_index_for_fn): New function.
3038 * pt.c (build_over_call): Use DECL_MEMBER_TEMPLATE_P.
3039 * class.c (finish_struct_methods): Remove out-of-date comment.
3040 * decl.c (copy_fn_p): Use DECL_MBMER_TEMPLATE_P.
3041 * decl2.c (check_classfn): Use DECL_MEMBER_TEMPLATE_P and
3042 class_method_index_for_fn.
3043 * pt.c (is_member_template): Remove.
3044 (is_member_template_class): Likewise.
3045 (optimize_specialization_lookup_p): New function.
3046 (retrieve_specialization): Optimize lookups for members that are
3047 not member templates.
3048 (register_specialization): Adjust accordingly.
3049 (build_template_decl): Add member_template_p parameter. Set
3050 DECL_MEMBER_TEMPLATE_P.
3051 (process_partial_specialization): Adjust call to
3052 retrieve_specialization.
3053 (push_template_decl_real): Determine whether the template is a
3054 member template.
3055 (lookup_template_class): Use retrieve_specialization.
3056 (tsubst_decl): Adjust call to retrieve_specialization.
3057 (tsubst_exception_specification): New function.
3058 (tsubst): Use it.
3059 (tsubst_copy): Use DECL_MEMBER_TEMPLATE_P.
3060 (instantiate_template): Adjust call to retrieve_specialization.
3061 (regenerate_decl_from_template): Do not actually generate a new
3062 DECL.
3063 (instantiate_decl): Adjust call to retrieve_specialization.
3064 (class_method_index_for_fn): New method.
3065
3066 2004-10-07 Andrew Pinski <pinskia@physics.uc.edu>
3067
3068 * parser.c (cp_parser_asm_definition): Look passed the
3069 CLEANUP_POINT_EXPR to get the asm expression.
3070
3071 2004-10-06 Andrew Pinski <pinskia@physics.uc.edu>
3072
3073 PR c++/17368
3074 * semantics.c (finish_asm_stmt): Asm expressions need cleanup
3075 also.
3076
3077 2004-10-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
3078
3079 Convert diagnostics to use quoting flag q 6/n
3080 * pt.c (finish_member_template_decl, check_specialization_scope,
3081 maybe_process_partial_specialization, determine_specialization,
3082 check_explicit_specialization, maybe_check_template_type,
3083 process_partial_specialization, check_default_tmpl_args,
3084 push_template_decl_real, redeclare_class_template,
3085 convert_nontype_argument, coerce_template_parms,
3086 lookup_template_class, push_tinst_level,
3087 instantiate_class_template, tsubst_arg_types,
3088 tsubst_function_type, tsubst, tsubst_qualified_id,
3089 tsubst_copy_and_build, check_instantiated_args,
3090 do_decl_instantiation, do_type_instantiation,
3091 invalid_nontype_parm_type_p, check_specialization_namespace,
3092 convert_template_argument, determine_specialization,
3093 check_template_shadow, tsubst_decl
3094 instantiate_pending_templates): Use quoting marks.
3095
3096 2004-10-05 Nathan Sidwell <nathan@codesourcery.com>
3097
3098 PR c++/17829
3099 * parser.c (cp_parser_postfix_expression): Inhibit Koenig when
3100 unqualified lookup finds a member function.
3101
3102 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3103
3104 Convert diagnostics to use quoting flag q 5/n
3105 * parser.c (cp_parser_name_lookup_error,
3106 cp_parser_diagnose_invalid_type_name,
3107 cp_parser_primary_expression, cp_parser_unqualified_id,
3108 cp_parser_nested_name_specifier_opt, cp_parser_labeled_statement,
3109 cp_parser_jump_statement, cp_parser_simple_declaration,
3110 cp_parser_decl_specifier_seq, cp_parser_mem_initializer_id,
3111 cp_parser_type_parameter, cp_parser_template_id,
3112 cp_parser_template_name, cp_parser_direct_declarator,
3113 cp_parser_parameter_declaration_list, cp_parser_class_head,
3114 cp_parser_base_specifier, cp_parser_lookup_name,
3115 cp_parser_late_parsing_default_args,
3116 cp_parser_optional_template_keyword
3117 cp_parser_elaborated_type_specifier, cp_parser_check_class_key,
3118 cp_parser_check_access_in_redeclaration): Use quoting marks.
3119
3120 * name-lookup.c (supplement_binding, pushdecl,
3121 check_for_out_of_scope_variable, validate_nonmember_using_decl,
3122 do_nonmember_using_decl, lookup_tag, set_decl_namespace,
3123 push_namespace, do_namespace_alias, do_using_directive,
3124 ambiguous_decl, lookup_namespace_name, add_function): Likewise.
3125
3126 * method.c (use_thunk): Likewise.
3127
3128 * lex.c (unqualified_name_lookup_error,
3129 unqualified_fn_lookup_error): Likewise.
3130
3131 2004-10-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
3132
3133 Convert diagnostics to use quoting flag q 4/n
3134 * except.c (decl_is_java_type, build_throw,
3135 is_admissible_throw_operand, check_handlers_1, check_handlers):
3136 Use quoting formats.
3137 * friend.c (add_friend, make_friend_class, do_friend): Likewise.
3138 * init.c (sort_mem_initializers, emit_mem_initializers,
3139 member_init_ok_or_else, expand_member_init, is_aggr_type,
3140 build_offset_ref, build_java_class_ref): Likewise.
3141
3142 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3143
3144 Convert diagnostics to use quoting flag q 3/n
3145 * decl.c (pop_label, duplicate_decls, redeclaration_error_message,
3146 redeclaration_error_message, lookup_label, check_goto,
3147 make_typename_type, make_unbound_class_template,
3148 fixup_anonymous_aggr, check_tag_decl, start_decl, start_decl_1,
3149 grok_reference_init, layout_var_decl, maybe_commonize_var,
3150 check_for_uninitialized_const_var, reshape_init_array,
3151 reshape_init, check_initializer, cp_finish_decl,
3152 member_function_or_else, bad_specifiers, grokfndecl, grokvardecl,
3153 check_static_variable_definition, compute_array_index_type,
3154 create_array_type_for_decl, check_special_function_return_type,
3155 grokdeclarator, check_default_argument, grokparms,
3156 grok_ctor_properties, grok_op_properties,
3157 check_elaborated_type_specifier, xref_tag, finish_enum,
3158 build_enumerator, check_function_type, start_preparsed_function,
3159 store_parm_decls): Use quoting formats.
3160 * decl2.c (grok_array_decl, delete_sanity, check_member_template,
3161 check_java_method, check_classfn, finish_static_data_member_decl,
3162 grokfield, grokbitfield, grok_function_init,
3163 build_anon_union_vars, coerce_new_type, coerce_delete_type,
3164 check_default_args): Likewise.
3165 * parser.c (cp_parser_decl_specifier_seq): Likewise.
3166
3167 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3168
3169 Convert diagnostics to use quoting flag q 2/n
3170 * class.c (build_base_path, add_method, alter_access,
3171 handle_using_decl, check_bases,
3172 maybe_warn_about_overly_private_class, find_final_overrider,
3173 warn_hidden, finish_struct_anon, add_implicitly_declared_members,
3174 check_bitfield_decl, check_field_decls, layout_empty_base,
3175 build_base_field, check_methods, layout_virtual_bases,
3176 warn_about_ambiguous_bases, layout_class_type, finish_struct_1,
3177 resolve_address_of_overloaded_function, instantiate_type,
3178 note_name_declared_in_class): Use format flag "q" for quoting.
3179
3180 2004-10-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
3181
3182 Convert diagnostics to use quoting flag q 1/n
3183 * error.c (locate_error): Ignore quoting flag q.
3184 * call.c (build_user_type_conversion_1, build_operator_new_call,
3185 build_object_call, op_error, build_conditional_expr,
3186 build_new_op, build_op_delete_call, enforce_access,
3187 convert_like_real, convert_arg_to_ellipsis, build_x_va_arg,
3188 convert_default_arg, build_over_call, build_new_method_call,
3189 joust, perform_implicit_conversion, initialize_reference): Use the
3190 quoting flag q.
3191
3192 2004-10-03 Andrew Pinski <pinskia@physics.uc.edu>
3193
3194 PR c++/17797
3195 * typeck.c (build_reinterpret_cast): Return if the inner type
3196 is error_mark_node.
3197
3198 2004-10-01 Jan Hubicka <jh@suse.cz>
3199
3200 * semantics.c (expand_body): Update call of tree_rest_of_compilation.
3201
3202 2004-09-30 Nathan Sidwell <nathan@codesourcery.com>
3203
3204 * cp-tree.h (struct lang_decl): Shrink by reordering fields and
3205 turning operator_code and fixed_offset into bitfields.
3206
3207 2004-09-29 Joseph S. Myers <jsm@polyomino.org.uk>
3208
3209 * decl.c (duplicate_decls): Merge TREE_DEPRECATED.
3210
3211 2004-09-29 Jason Merrill <jason@redhat.com>
3212
3213 PR tree-optimization/17697
3214 * decl.c (duplicate_decls): Copy TREE_NOTHROW from newdecl to olddecl.
3215
3216 2004-09-28 Jason Merrill <jason@redhat.com>
3217
3218 PR middle-end/17525
3219 * class.c (build_base_field): Set TYPE_MODE.
3220
3221 2004-09-28 Roger Sayle <roger@eyesopen.com>
3222
3223 PR driver/17537
3224 * g++spec.c (lang_specific_driver): Unrecognized libraries, other
3225 than -lc and -lm, may require linking against libstc++.
3226
3227 2004-09-28 Kazu Hirata <kazu@cs.umass.edu>
3228
3229 * tree.c: Fix a comment typo.
3230
3231 2004-09-28 Nathan Sidwell <nathan@codesourcery.com>
3232
3233 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): Remove.
3234 (struct secondary_vptr_vtt_init_data_s): New.
3235 (build_vtt_inits): Adjust dfs_walkers.
3236 (dfs_build_secondary_vptr_vtt_inits): Caller data is a
3237 secondary_vptr_vtt_init_data_s structure. Adjust.
3238 (dfs_ctor_vtable_bases_queue_p): Remove.
3239 (dfs_fixup_binfo_vtbls): No need to clear BINFO_MARKED. Simplify.
3240
3241 * pt.c (struct get_template_base_data_s): Remove.
3242 (get_template_base_r): Fold into get_template_base.
3243 (get_template_base): Walk base binfos directly in inheritance
3244 graph order.
3245
3246 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3247
3248 PR c++/17642
3249 * cp-tree.h (fold_if_not_in_template): New function.
3250 * call.c (build_conditional_expr): Use fold_if_not_in_template.
3251 (build_cxx_call): Likewise.
3252 * cvt.c (convert_to_complex): Likewise.
3253 (ocp_convert): Likewise.
3254 (convert): Likewise.
3255 (convert_force): Likewise.
3256 * decl.c (compute_array_index_type): Clear
3257 processing_template_decl while folding array bounds.
3258 * pt.c (convert_nontype_argument): Clear
3259 processing_template_decl while processing non-type argument
3260 initialization.
3261 * tree.c (fold_if_not_in_template): New function.
3262 * typeck.c (build_class_member_access_expr): Use
3263 fold_if_not_in_template.
3264 (build_array_ref): Likewise.
3265 (build_binary_op): Likewise. Do not try to optimize computations
3266 when processing templates.
3267 (cp_pointer_int_sum): Use fold_if_not_in_template.
3268 (pointer_diff): Likewise.
3269 (build_unary_op): Likewise.
3270 (build_reinterpret_cast): Likewise.
3271 (get_delta_difference): Likewise.
3272 (expand_ptrmemfunc_cst): Likewise.
3273 (dubious_conversion_warnings): Likewise.
3274
3275 2004-09-27 Matt Austern <austern@apple.com>
3276
3277 * cp/parser.c (struct cp_token): New one-bit field , implicit_extern_c
3278 (cp_lexer_get_preprocessor_token): Set implicit_extern_c for
3279 tokens that come from headers that are implicitly extern "C".
3280 (struct cp_parser): new one-bit field, implicit_extern_c.
3281 (cp_parser_new): Set parser's implicit_extern_c to false.
3282 (cp_parser_translation_unit): Pop lang context if we were in a
3283 header that was implicitly extern "C".
3284 (cp_parser_declaration_seq_opt): Push/pop lang context as
3285 required by the token's and parser's implicit_extern_c.
3286
3287 2004-09-27 Mark Mitchell <mark@codesourcery.com>
3288
3289 PR c++/17585
3290 * cp-tree.h (shared_member_p): Declare.
3291 * search.c (shared_member_p): Give it external linkage.
3292 * semantics.c (finish_qualified_id_expr): Use it.
3293 (finish_id_expression): Likewise.
3294
3295 PR c++/17585
3296 * semantics.c (finish_id_expression): Do not add "this->" to
3297 static member functions.
3298
3299 2004-09-27 Nathan Sidwell <nathan@codesourcery.com>
3300
3301 PR c++/17681
3302 * error.c (dump_type): Change TREE_VEC case into TREE_BINFO.
3303
3304 * class.c (struct count_depth_data): Remove.
3305 (dfs_depth_post, dfs_depth_q): Remove.
3306 (find_final_overrider): Use number of vbase classes as depth
3307 bound.
3308
3309 * cp-tree.h (types_overlap_p): Remove.
3310 * search.c (struct overlap_info): Remove.
3311 (dfs_check_overlap, dfs_no_overlap_yet, types_overlap_p): Remove.
3312
3313 * pt.c (GTB_VIA_VIRTUAL, GTB_IGNORE_TYPE): Remove.
3314 (get_template_base_recursive): Remove. Replace with ...
3315 (get_template_base_r): ... this.
3316 (struct get_template_base_data_s): New.
3317 (get_template_base): Use get_template_base_r via dfs_walk. Always
3318 return NULL on failure.
3319 (unify): Remove error_mark_node check from get_template_base result.
3320
3321 2004-09-24 Paolo Bonzini <bonzini@gnu.org>
3322
3323 * parser.c (cp_parser_expression_stack): Clarify why it is
3324 an array of NUM_PREC_VALUES elements.
3325 (cp_parser_binary_expression): Clarify why we do not need to
3326 handle stack overflow.
3327
3328 2004-09-24 Nathan Sidwell <nathan@codesourcery.com>
3329
3330 PR c++/16889
3331 * search.c (lookup_field_queue_p): Correct check for hidden base.
3332
3333 * search.c (bfs_walk): Remove.
3334 (lookup_member): Use dfs_walk_real.
3335 (dfs_walk_real): Move and adjust documentation from bfs_walk.
3336
3337 2004-09-23 Zack Weinberg <zack@codesourcery.com>
3338
3339 * decl.c (grokfndecl): If ::main is found not to return int,
3340 correct it after issuing a diagnostic.
3341 (grokdeclarator): If the incoming type was error_mark_node, do
3342 not complain about declaring something with no type.
3343 (start_function): Change check for ::main not returning int to
3344 an assertion, as grokfndecl now catches this when the user did it.
3345 * init.c (perform_member_init, sort_mem_initializers)
3346 (emit_mem_initializers): Make most diagnostics be issued on
3347 the line of current_function_decl, not whatever the current
3348 input line is.
3349 * parser.c (cp_lexer_peek_token_emit_debug_info): Surround
3350 definition and declaration with #ifdef ENABLE_CHECKING.
3351 Avoid unnecessary use of fprintf.
3352 (cp_lexer_print_token, cp_lexer_debug_stream): Adjust stub
3353 definitions to avoid warnings.
3354 (cp_lexer_new_main): Add assertion that first token is not a
3355 padding token.
3356 (cp_lexer_new_from_token_array): Fold into ...
3357 (cp_lexer_new_from_tokens): ... here. Add assertion that
3358 first token is not a padding token.
3359 (cp_lexer_set_source_position_from_token): Move nearer to callers.
3360 Remove unused lexer argument.
3361 (cp_lexer_peek_token): Just print debugging report (if enabled)
3362 and return lexer->next_token.
3363 (cp_lexer_skip_purged_tokens): Delete.
3364 (cp_lexer_next_token_is, cp_lexer_next_token_is_not): Make
3365 inline, simplify bodies.
3366 (cp_lexer_peek_nth_token): Add debugging report a la
3367 cp_lexer_peek_token.
3368 (cp_lexer_consume_token): Correct commentary. Advance over
3369 purged tokens here. Set current source position here, from
3370 token to be returned. Avoid unnecessary use of fprintf.
3371 (cp_lexer_purge_token): Advance next_token pointer over this and
3372 subsequent purged tokens.
3373 (cp_parser_error): Adjust source position to that of the
3374 peeked token.
3375 (cp_parser_push_lexer_for_tokens, cp_parser_pop_lexer): New functions.
3376 (cp_parser_string_literal): Remove some excessive cleverness.
3377 (cp_parser_enum_specifier): Call start_enum before consuming
3378 the opening brace.
3379 (cp_parser_member_declaration): Make the "extra semicolon"
3380 diagnostic consistently-worded with the other place this is
3381 diagnosed. Explicitly set the diagnostic location to the
3382 location of the offending semicolon.
3383 (cp_parser_enclosed_template_argument_list): Use %</%> quoting
3384 in diagnostics. Do not use cp_parser_require. Set location
3385 of diagnostics about improper use of '>>' to location of
3386 offending token.
3387 (cp_parser_late_parsing_for_member):
3388 Use cp_parser_push_lexer_for_tokens and cp_parser_pop_lexer.
3389 (cp_parser_late_parsing_default_args): Likewise. Manually
3390 move some logic outside the loop.
3391
3392 2004-09-23 Andrew Pinski <pinskia@physics.uc.edu>
3393
3394 PR c++/17618
3395 * cvt.c (cp_convert_to_pointer): Return early when the type is
3396 an error_mark_node.
3397
3398 2004-09-21 Fariborz Jahanian <fjahanian@apple.com>
3399
3400 PR c++/13989
3401 PR c++/9844
3402 * decl.c (grokfndecl): Add new argument "attrlist", use it
3403 to call cplus_decl_attributes.
3404 (start_function): Remove call to cplus_decl_attributes.
3405 * cvt.c (ocp_convert): Add support to use type conversion
3406 function to vector type.
3407 * parser.c (cp_parser_conversion_type_id): Add attributes, if any,
3408 to the parsed type.
3409
3410 2004-09-23 Paolo Bonzini <bonzini@gnu.org>
3411
3412 PR c++/17596
3413
3414 * parser.c (cp_parser_token_tree_map_node,
3415 cp_parser_pm_expression, cp_parser_additive_expression,
3416 cp_parser_multiplicative_expression, cp_parser_shift_expression,
3417 cp_parser_relational_expression, cp_parser_equality_expression,
3418 cp_parser_and_expression, cp_parser_exclusive_or_expression,
3419 cp_parser_inclusive_or_expression,
3420 cp_parser_logical_and_expression,
3421 cp_parser_logical_or_expression): Removed.
3422 (enum cp_parser_prec, struct cp_parser_token_tree_map_node,
3423 binops, binops_by_token): New.
3424 (cp_parser_assignment_expression): Use cp_parser_binary_expression.
3425 (cp_parser_new): Initialize binops_by_token.
3426 (cp_parser_binary_expression): Rewritten.
3427 (N_CP_TTYPES): New.
3428
3429 2004-09-23 Kazu Hirata <kazu@cs.umass.edu>
3430
3431 * parser.c: Fix a comment typo.
3432
3433 2004-09-23 Nathan Sidwell <nathan@codesourcery.com>
3434
3435 PR c++/17620
3436 * decl.c (xref_basetypes): Look through typedefs before checking
3437 for duplicate base.
3438
3439 2004-09-22 Nathan Sidwell <nathan@codesourcery.com>
3440
3441 * cp-tree.h (unemitted_tinfo_decls): Make a VEC(tree).
3442 * decl2.c (cp_finish_file): Adjust tinfo decl emission loop.
3443 * rtti.c (unemitted_tinfo_decls): Make a VEC(tree).
3444 (init_rtti_processing): Initialize it to something realistic.
3445 (get_tinfo_decl): Adjust pushing the new decl.
3446
3447 * cp-tree.h (struct lang_type_class): Remove marked flags, add
3448 diamond_shaped and repeated_base flags. Reorder to keep 8-bit blocks.
3449 (TYPE_MARKED_P): New.
3450 (CLASSTYPE_DIAMOND_SHAPED_P, CLASSTYPE_REPEATED_BASE_P): New.
3451 (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
3452 CLEAR_CLASSTYPE_MARKED_N): Remove.
3453 (CLASSTYPE_MARKED_*, SET_CLASSTYPE_MARKED_*,
3454 CLEAR_CLASSTYPE_MARKED_*): Remove.
3455 * decl.c (xref_basetypes): Use TYPE_MARKED_P. Determine diamond
3456 shaped and repeated base properties.
3457 * lex.c (cxx_make_type): Don't clear TYPE_ALIAS_SET.
3458 * rtti.c (dfs_class_hint_mark, dfs_class_hint_unmark,
3459 class_hint_flags): Remove.
3460 (get_pseudo_ti_init): Use CLASSTYPE_REPEATED_BASE_P and
3461 CLASSTYPE_DIAMOND_SHAPED_P.
3462
3463 2004-09-21 Ziemowit Laski <zlaski@apple.com>
3464
3465 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved here from
3466 cp-objcp-common.h.
3467 (objcp_tsubst_copy_and_build): Reformat function signature.
3468 * cp-objcp-common.h (objcp_tsubst_copy_and_build): Likewise.
3469 (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Moved to cp-lang.c.
3470
3471 2004-09-21 Zack Weinberg <zack@codesourcery.com>
3472
3473 * parser.c (cp_lexer_peek_token, cp_lexer_consume_token):
3474 Don't handle CPP_PRAGMA tokens specially.
3475 (cp_lexer_handle_pragma): Use cp_lexer_consume_token. Don't
3476 purge the token; do clear token->value after processing. Add
3477 assertion at beginning that token->value is nonzero.
3478 (cp_parser_statement, cp_parser_declaration_seq_opt): Handle
3479 CPP_PRAGMA as a full statement or declaration in its own right.
3480
3481 2004-09-21 Matt Austern <austern@apple.com>
3482
3483 PR c++/15049
3484 * decl.c (grokvardecl): Accept declarations of global variables
3485 using anonymous types.
3486
3487 2004-09-21 Roger Sayle <roger@eyesopen.com>
3488
3489 PR c++/7503
3490 * tree.c (lvalue_p_1): Disallow MIN_EXPR and MAX_EXPR as lvalues
3491 if either operand has side-effects.
3492 * typeck.c (rationalize_conditional_expr): Assert that neither
3493 operand of MIN_EXPR or MAX_EXPR has side-effects.
3494 (build_modify_expr): Add support for MIN_EXPR and MAX_EXPR.
3495 Check that the "lhs" is a valid lvalue, i.e. that neither operand
3496 of a MIN_EXPR or MAX_EXPR has a side-effect.
3497
3498 2004-09-21 Nathan Sidwell <nathan@codesourcery.com>
3499
3500 * cp-tree.h (struct lang_type_header): Remove
3501 uses_multiple_inheritance field.
3502 (TYPE_USES_MULTIPLE_INHERITANCE): Remove.
3503 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): Remove.
3504 (TYPE_USES_VIRTUAL_BASECLASSES): Remove.
3505 (DECL_NEEDS_VTT_PARM_P): Use CLASSTYPE_VBASECLASSES.
3506 (TYPE_CONTAINS_VPTR_P): Likewise.
3507 * call.c (add_template_candidate_real): Use
3508 CLASSTYPE_VBASECLASSES.
3509 (build_special_member_call): Likewise.
3510 * class.c (finish_struct_bits): Remove
3511 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P & TYPE_USES_VIRTUAL_BASECLASSES
3512 bookkeeping.
3513 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3514 (create_vtable_ptr): Remove TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P
3515 bookkeeping.
3516 (build_vtt_inits): Use CLASSTYPE_VBASECLASSES.
3517 (accumulate_vtbl_inits, build_vbase_offset_vtbl_entries):
3518 Likewise.
3519 * decl.c (xref_basetypes): Remove TYPE_USES_MULTIPLE_INHERITANCE,
3520 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3521 bookkeeping.
3522 (cxx_maybe_build_cleanup): Use CLASSTYPE_VBASECLASSES.
3523 * decl2.c (maybe_retrofit_in_chrg): Likewise.
3524 * init.c (expand_member, push_base_cleanups): Likewise.
3525 * pt.c (instantiate_class_template): Remove
3526 TYPE_USES_MULTIPLE_INHERITANCE,
3527 TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P, TYPE_USES_VIRTUAL_BASECLASSES
3528 bookkeeping.
3529 * ptree.c (cxx_print_type): Remove TYPE_USES_MULTIPLE_INHERITANCE
3530 check.
3531 * typeck2.c (process_init_constructor): Replace some sorrys with
3532 asserts.
3533
3534 2004-09-21 Andreas Tobler <a.tobler@schweiz.ch>
3535
3536 * decl.c (reshape_init_array): Initialize max_index_cst to fix
3537 bootstrap failure.
3538
3539 2004-09-20 Mark Mitchell <mark@codesourcery.com>
3540
3541 PR c++/17530
3542 * pt.c (tsubst): Fix parentheses to accomodate emacs.
3543 (tsubst_baselink): If we get a single function, mark it as used.
3544
3545 2004-09-20 Matt Austern <austern@apple.com>
3546 Zack Weinberg <zack@codesourcery.com>
3547
3548 * decl.c (make_rtl_for_nonlocal_decl, start_preparsed_function):
3549 Apply lbasename to input_filename before passing to get_fileinfo.
3550 * semantics.c (begin_class_definition): Likewise.
3551 * lex.c (handle_pragma_interface): Apply get_fileinfo to the
3552 correct filename. Rename variables to be less confusing.
3553 (handle_pragma_implementation): Likewise. Disable "appears
3554 after file is included" diagnostic.
3555
3556 * parser.c (struct cp_token): Add in_system_header fiag.
3557 (CP_TOKEN_BLOCK_NUM_TOKENS, struct cp_token_block)
3558 (CP_TOKEN_BUFFER_SIZE, cp_token_cache_push_token)
3559 (CPP_NONE, cp_lexer_read_token): Delete.
3560 (struct cp_lexer): Remove first_token, string_tokens,
3561 main_lexer_p fields. Clarify comments.
3562 (struct cp_token_cache): Now just a pair of pointers.
3563 (CP_LEXER_BUFFER_SIZE): New #define.
3564 (CPP_PURGED): New fake token type.
3565 (cp_lexer_new_from_token_array, cp_lexer_destroy)
3566 (cp_lexer_peek_token_emit_debug_info, cp_lexer_skip_purged_tokens)
3567 (cp_lexer_handle_pragma, cp_token_cache_new, cp_parser_string_literal):
3568 New functions.
3569 (cp_lexer_new_from_tokens): Now a simple wrapper around
3570 cp_lexer_new_from_token_array.
3571 (cp_lexer_set_source_position_from_token): Also update
3572 in_system_header.
3573 (cp_lexer_next_token, cp_lexer_prev_token, cp_lexer_advance_token):
3574 Don't wrap round.
3575 (cp_lexer_token_difference): Dont handle wrapping round.
3576 (cp_lexer_new_main): Enable pragma deferral and raw strings,
3577 read the entire translation unit through c_lex_with_flags into
3578 this lexer's buffer, then turn raw strings back off again.
3579 (cp_lexer_grow_buffer): Adjust for buffer no longer being circular.
3580 (cp_lexer_get_preprocessor_token): No need to handle not being
3581 the main lexer. Set token->in_system_header too.
3582 (cp_lexer_peek_token): Skip purged tokens. Feed pragma tokens
3583 to cp_lexer_handle_pragma. No need to call cp_lexer_read_token.
3584 (cp_lexer_peek_nth_token): Likewise.
3585 (cp_lexer_purge_token): Mark the token PURGED, don't shift all
3586 the other tokens down.
3587 (cp_lexer_purge_tokens_after): Likewise.
3588 (cp_lexer_save_tokens, cp_lexer_rollback_tokens): Don't worry
3589 about there being no tokens.
3590 (cp_lexer_print_token): Revise to give useful information on
3591 all tokens.
3592 (struct cp_parser): Add field translate_strings_p.
3593 (cp_parser_new): Initialize it.
3594 (cp_parser_translation_unit): Destroy the lexer when done.
3595 (cp_parser_parameter_declaration): Restructure saving of
3596 default arguments.
3597 (cp_parser_save_member_function_body): Likewise.
3598 (cp_parser_check_for_invalid_template_id)
3599 (cp_parser_nested_name_specifier_opt, cp_parser_template_id):
3600 Adjust calls to cp_lexer_advance_token.
3601 (cp_parser_skip_to_closing_parenthesis, cp_parser_declaration):
3602 No need to fiddle c_lex_string_translate.
3603 (cp_parser_primary_expression, cp_parser_linkage_specification)
3604 (cp_parser_asm_definition, cp_parser_asm_specification_opt)
3605 (cp_parser_asm_operand_list, cp_parser_asm_clobber_list)
3606 Use cp_parser_string_literal.
3607 (cp_parser_attribute_list): Save and restore
3608 parser->translate_strings_p, not c_lex_string_translate.
3609 (cp_parser_cache_group): Delete.
3610 (cp_parser_cache_group_1): Rename cp_parser_cache_group. Do
3611 not take a cache argument.
3612
3613 2004-09-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
3614
3615 PR c++/14179
3616 * decl.c (reshape_init): Extract array handling into...
3617 (reshape_init_array): New function. Use integers instead of trees
3618 for indices. Handle out-of-range designated initializers.
3619
3620 2004-09-20 Steven Bosscher <stevenb@suse.de>
3621
3622 * lex.c (cxx_init): Don't set the ridpointer for RID_NULL
3623 to null_node.
3624
3625 2004-09-19 Mark Mitchell <mark@codesourcery.com>
3626
3627 * decl2.c (determine_visibility): Allow class visibility
3628 directives to override targetm.cxx.export_class_data.
3629
3630 2004-09-18 Kazu Hirata <kazu@cs.umass.edu>
3631
3632 * call.c, semantics.c: Follow spelling conventions.
3633 * class.c: Fix a comment typo.
3634
3635 2004-09-16 Geoffrey Keating <geoffk@apple.com>
3636
3637 PR pch/13361
3638 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
3639 (handle_pragma_implementation): Likewise.
3640
3641 2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
3642 Zack Weinberg <zack@codesourcery.com>
3643
3644 * cp-tree.def: Use tree_code_class enumeration constants
3645 instead of code letters.
3646 * call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
3647 * mangle.c, pt.c, semantics.c, tree.c, typeck.c:
3648 Update for new tree-class enumeration constants.
3649
3650 2004-09-16 Mark Mitchell <mark@codesourcery.com>
3651
3652 PR c++/16002
3653 * parser.c (cp_parser_simple_declaration): Commit to tentative
3654 parses after seeing a decl-specifier.
3655 (cp_parser_simple_declaration): Eliminate spurious message.
3656 (cp_parser_init_declarator): Adjust error message.
3657
3658 PR c++/16029
3659 * lex.c (unqualified_name_lookup_error): Mark the dummy
3660 declaration as used.
3661
3662 PR c++/17501
3663 * parser.c (cp_parser_nested_name_specifier): Do not resolve
3664 typename types if the user explicitly said "typename".
3665
3666 2004-09-16 Andrew MacLeod <amacleod@redhat.com>
3667
3668 * error.c (dump_decl): Make sure there is lang_specific info before
3669 checking for DTOR and CTOR decls.
3670
3671 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3672
3673 * class.c (copy_virtuals): Remove.
3674 (build_primary_vtable): Use copy_list directly.
3675 (build_secondary_vtable): Likewise.
3676 (update_vtable_entry_for_fn): Clear BV_CALL_INDEX here.
3677 (create_vtable_ptr): Likewise.
3678
3679 2004-09-16 Kazu Hirata <kazu@cs.umass.edu>
3680
3681 * search.c: Follow spelling conventions.
3682
3683 2004-09-16 Nathan Sidwell <nathan@codesourcery.com>
3684
3685 * cp-tree.h (struct lang_type_class): Make pure_virtuals a
3686 VEC(tree).
3687 (CLASSTYPE_INLINE_FRIENDS, CLASSTYPE_PURE_VIRTUALS): Update
3688 comments.
3689 * call.c (build_new_method_call): Don't confirm a pure virtual is
3690 in CLASSTYPE_PURE_VIRTUALS. Reorder checks. Make it a warning.
3691 * class.c (check_methods): CLASSTYPE_INLINE_FRIENDS is a VEC(tree).
3692 (fixup_inline_methods, finish_struct): Likewise.
3693 * decl.c (finish_method): Likewise.
3694 * search.c (dfs_get_pure_virtuals, get_pure_virtuals):
3695 CLASSTYPE_PURE_VIRTUALS is a VEC(tree).
3696 * typeck2.c (abstract_virtuals_error): Likewise. Truncate the
3697 vector to avoid repeating the list in error messages.
3698
3699 2004-09-15 Mark Mitchell <mark@codesourcery.com>
3700
3701 * cp-objcp-common.h (LANG_HOOKS_COMDAT_GROUP): Define.
3702 * cp-tree.h (cxx_comdat_group): Declare.
3703 * decl.c (cxx_comdat_group): New function.
3704
3705 2004-09-15 Nathan Sidwell <nathan@codesourcery.com>
3706
3707 * search.c (get_pure_virtuals): Remove unused variables.
3708
3709 * cp-tree.h (struct lang_decl_flags): Remove
3710 needs_final_overrider.
3711 (DECL_NEEDS_FINAL_OVERRIDER_P): Remove.
3712 * decl.c (duplicate_decls): Do not copy DECL_NEEDS_FINAL_OVERRIDER_P.
3713 * class.c (finish_struct_bits): Correct comment about
3714 CLASSTYPE_PURE_VIRTUALS.
3715 * search.c (get_pure_virtuals): Remove useless loop.
3716
3717 2004-09-14 Mark Mitchell <mark@codesourcery.com>
3718
3719 PR c++/17324
3720 * mangle.c (partially_mangled_name): New variable.
3721 (partially_mangled_name_len): Likewise.
3722 (save_partially_mangled_name): New function.
3723 (restore_partially_mangled_name): Likewise.
3724 (write_encoding): Save and restore partially mangled names around
3725 calls to get_mostly_instantiated_function_type.
3726 (write_unqualified_name): Likewise.
3727
3728 2004-09-14 Nathan Sidwell <nathan@codesourcery.com>
3729
3730 * pt.c (unify): Replace gcc_unreachable with gcc_assert.
3731
3732 2004-09-13 Mark Mitchell <mark@codesourcery.com>
3733
3734 PR c++/16162
3735 * parser.c (cp_parser_id_expression): Correct value for
3736 is_declarator.
3737 (cp_parser_nested_name_specifier_opt): Look through typenames as
3738 necessary.
3739 (cp_parser_template_name): Honor check_dependency_p.
3740
3741 PR c++/16716
3742 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name):
3743 Robustify.
3744
3745 PR c++/17327
3746 * pt.c (unify): Add ENUMERAL_TYPE case. Replace sorry with
3747 gcc_unreacable.
3748
3749 2004-09-12 Richard Henderson <rth@redhat.com>
3750
3751 PR c++/16254
3752 * semantics.c (maybe_cleanup_point_expr): Don't call fold.
3753 * typeck.c (condition_conversion): Likewise.
3754
3755 2004-09-11 Richard Henderson <rth@redhat.com>
3756
3757 PR c++/17404
3758 * pt.c (cur_stmt_expr): Move from tsubst_expr.
3759 (tsubst_expr) <case STMT_EXPR>: Move ...
3760 (tsubst_copy_and_build): ... here.
3761
3762 2004-09-10 Zack Weinberg <zack@codesourcery.com>
3763
3764 * cp-tree.h (interface_only, interface_unknown): Delete declarations;
3765 comment explaining them moved to c-common.h.
3766 * lex.c (interface_only, interface_unknown, extract_interface_info):
3767 Delete definitions.
3768 (cxx_finish): Don't reset interface_unknown.
3769 (handle_pragma_interface): Don't set interface_only and
3770 interface_unknown; just the like-named fields in finfo.
3771 (handle_pragma_implementation): Adjust comment.
3772 * decl2.c (cp_finish_file): Don't reset interface_only and
3773 interface_unknown.
3774 * method.c (synthesize_method): Don't reset interface_unknown or
3775 call extract_interface_info.
3776 * pt.c (pop_tinst_level): Don't call extract_interface_info.
3777 * decl.c (start_cleanup_fn): Don't save or restore interface_only
3778 and interface_unknown.
3779 (make_rtl_for_nonlocal_decl): Call get_fileinfo on input_filename
3780 and use the result instead of the interface_only/interface_unknown
3781 globals.
3782 (start_preparsed_function): Likewise.
3783 * lex.c (cxx_make_type): Likewise.
3784 * semantics.c (begin_class_definition): Likewise.
3785 (expand_body): Don't call extract_interface_info.
3786
3787 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3788
3789 * decl.c (objc_mark_locals_volatile): Make description of
3790 routine more descriptive; only mark VAR_DECLs at each
3791 binding level.
3792
3793 2004-09-10 Richard Henderson <rth@redhat.com>
3794
3795 PR c++/17386
3796 * call.c (build_vfield_ref): Move...
3797 * class.c (build_vfield_ref): ... here. Convert datum to the
3798 primary base containing the vptr.
3799 (make_new_vtable): Simplify build_primary_vtable arguments.
3800 (finish_struct_1): Do not duplicate TYPE_VFIELD.
3801 * typeck.c (build_class_member_access_expr): Don't warn for
3802 null object access to base fields.
3803
3804 2004-09-10 Ziemowit Laski <zlaski@apple.com>
3805
3806 * decl.c (objc_get_current_scope, objc_mark_locals_volatile):
3807 New functions, to be called from ObjC++.
3808
3809 2004-09-10 Kazu Hirata <kazu@cs.umass.edu>
3810
3811 * class.c, cp-tree.h, decl.c, decl2.c, mangle.c,
3812 name-lookup.h, parser.c, search.c, semantics.c, typeck2.c: Fix
3813 comment typos.
3814
3815 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3816
3817 * typeck.c (build_c_cast): Preserve the cast if casting
3818 to and from an Objective-C type.
3819
3820 2004-09-09 Ziemowit Laski <zlaski@apple.com>
3821
3822 * Make-lang.in (cp/typeck.o): Depend on c-common.h.
3823 * typeck.c: Include c-common.h.
3824 (comptypes): For RECORD_TYPEs, call objc_comptypes() and
3825 return the result if nonnegative.
3826
3827 2004-09-09 Zack Weinberg <zack@codesourcery.com>
3828
3829 * decl2.c (import_export_class)
3830 * lex.c (handle_pragma_interface):
3831 Test MULTIPLE_SYMBOL_SPACES with if, not #ifdef.
3832
3833 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3834
3835 * Make-lang.in (cp/semantics.o): Depend on c-common.h.
3836 * semantics.c: Include c-common.h.
3837 (finish_compound_stmt): Call objc_clear_super_receiver().
3838
3839 2004-09-08 Ziemowit Laski <zlaski@apple.com>
3840
3841 * cp-tree.h (do_poplevel): New prototype.
3842 * semantics.c (do_poplevel): Make externally visible.
3843
3844 2004-09-08 Nathan Sidwell <nathan@codesourcery.com>
3845
3846 * cp-tree.h (tree_pair_s): Define a GC'd vector.
3847 * name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
3848 * semantics.c (deferred_access): Likewise.
3849
3850 2004-09-06 Daniel Jacobowitz <dan@debian.org>
3851
3852 * semantics.c (expand_body): Assert that we are not nested.
3853
3854 2004-09-06 Zack Weinberg <zack@codesourcery.com>
3855
3856 * decl.c (build_enumerator): Use add_double and int_fits_type_p
3857 instead of cp_build_binary_op, to avoid creating short-lived trees.
3858 * parser.c (cp_parse_type_specifier <RID_ENUM>): Use two-token
3859 lookahead instead of backtracking. Move some code to avoid a
3860 conditional branch.
3861 (cp_parser_enum_specifier): Avoid duplication of effort with caller.
3862 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3863 (cp_parser_enumerator_list, cp_parser_enumerator_definition):
3864 Use cp_lexer_next_token_is/cp_lexer_next_token_is_not as appropriate.
3865
3866 2004-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3867
3868 * decl.c (grok_declarator): Remove a redundant semicolon.
3869
3870 * parser.c (cp_parser_decl_specifier_seq, cp_parser_type_specifier):
3871 Correct comments describing function parameters.
3872
3873 2004-09-03 Matt Austern <austern@apple.com>
3874 Compile speed improvement.
3875 * parser.c (cp_lexer_print_token): Only define if ENABLE_CHECKING set.
3876 Otherwise define a stub macro that expands to nothing.
3877 (cp_lexer_debugging_p): Only define if ENABLE_CHECKING set. Otherwise
3878 define a stub macro that expands to 0.
3879 (cp_lexer_start_debugging): Only define if ENABLE_CHECKING set.
3880 (cp_lexer_stop_debugging): Likewise.
3881 (cp_lexer_debug_stream): Only define if ENABLE_CHECKING set. Otherwise
3882 define a stub macro that expands to NULL.
3883 (cp_lexer_new_main): Only set debugging_p if ENABLE_CHECKING set.
3884 (cp_lexer_new_from_tokens): Likewise.
3885
3886 2004-09-03 Jan Hubicka <jh@suse.cz>
3887
3888 * decl.c (finish_function): Clean out pointers we no longer need.
3889
3890 2004-09-03 Jan Beulich <jbeulich@novell.com>
3891
3892 * g++spec.c (MATH_LIBRARY_PROFILE): Default to MATH_LIBRARY rather
3893 than "-lm".
3894
3895 2004-09-02 Paul Brook <paul@codesourcery.com>
3896
3897 * decl2.c (determine_visibility): Only check data visibility
3898 for VAR_DECLS.
3899
3900 2004-08-31 Mark Mitchell <mark@codesourcery.com>
3901
3902 * cp-tree.h (DECL_CONSTRUCTION_VTABLE_P): New macro.
3903 * class.c (build_ctor_vtbl_group): Set DECL_CONSTRUCTION_VTABLE_P.
3904 * decl2.c (determine_visibility): Honor
3905 TARGET_CXX_EXPORT_CLASS_DATA.
3906
3907 * class.c (key_method): Rename to ...
3908 (determine_key_method): ... this.
3909 (finish_struct_1): Adjust accordingly.
3910 * cp-tree.h (key_method): Declare.
3911 * decl2.c (maybe_emit_vtables): Determine the key method here if
3912 it has not already been done.
3913
3914 2004-08-31 Ziemowit Laski <zlaski@apple.com>
3915
3916 * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-objcp-common.o.
3917 (cp/cp-lang.o): Depend on debug.h, gtype-cp.h and cp/cp-objcp-common.h.
3918 (cp/cp-decl.c): Do not depend on gtype-cp.h.
3919 (cp/cp-objcp-common.o): New target.
3920 * cp-lang.c: Include debug.h, cp-objcp-common.h and gtype-cp.h.
3921 (cxx_get_alias_set, cxx_warn_unused_global_decl, cp_expr_size,
3922 cp_tree_size, cp_var_mod_type_p, cxx_initialize_diagnostics): Move
3923 prototypes and definitions to cp-objcp-common.h and cp-objcp-common.c,
3924 respectively.
3925 (LANG_HOOKS_TREE_SIZE, LANG_HOOKS_FINISH,
3926 LANG_HOOKS_CLEAR_BINDING_STACK, LANG_HOOKS_INIT_OPTIONS,
3927 LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
3928 LANG_HOOKS_HANDLE_FILENAME, LANG_HOOKS_MISSING_ARGUMENT,
3929 LANG_HOOKS_POST_OPTIONS, LANG_HOOKS_GET_ALIAS_SET,
3930 LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_EXPAND_EXPR,
3931 LANG_HOOKS_EXPAND_DECL, LANG_HOOKS_PARSE_FILE,
3932 LANG_HOOKS_DUP_LANG_SPECIFIC_DECL, LANG_HOOKS_TRUTHVALUE_CONVERSION,
3933 LANG_HOOKS_SET_DECL_ASSEMBLER_NAME, LANG_HOOKS_MARK_ADDRESSABLE,
3934 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
3935 LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
3936 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_PRINT_ERROR_FUNCTION,
3937 LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, LANG_HOOKS_WRITE_GLOBALS,
3938 LANG_HOOKS_FUNCTION_INIT, LANG_HOOKS_FUNCTION_FINAL,
3939 LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P,
3940 LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
3941 LANG_HOOKS_ATTRIBUTE_TABLE, LANG_HOOKS_TREE_INLINING_WALK_SUBTREES,
3942 LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
3943 LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS,
3944 LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P,
3945 LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
3946 LANG_HOOKS_TREE_INLINING_VAR_MOD_TYPE_P,
3947 LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
3948 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN, LANG_HOOKS_EXPR_SIZE,
3949 LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR,
3950 LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_MAKE_TYPE,
3951 LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE,
3952 LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
3953 LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE, LANG_HOOKS_INCOMPLETE_TYPE_ERROR,
3954 LANG_HOOKS_TYPE_PROMOTES_TO, LANG_HOOKS_REGISTER_BUILTIN_TYPE,
3955 LANG_HOOKS_GIMPLIFY_EXPR, LANG_HOOKS_FOLD_OBJ_TYPE_REF): Move
3956 hooks to cp-objcp-common.h.
3957 (finish_file): New function.
3958 * cp-objcp-common.c: New file.
3959 * cp-objcp-common.h: New file.
3960 * cp-tree.h (cp_finish_file): New prototype.
3961 * decl.c: Do not include gtype-cp.h.
3962 * decl2.c (finish_file): Rename to cp_finish_file.
3963
3964 2004-08-31 Richard Henderson <rth@redhat.com>
3965
3966 PR c++/17221
3967 * pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
3968 (tsubst_copy_and_build): ... here.
3969
3970 2004-08-30 Mark Mitchell <mark@codesourcery.com>
3971
3972 * cp-tree.h (initialize_artificial_var): Declare.
3973 * decl.c (initialize_artifical_var): New function.
3974 * class.c (initialize_array): Remove.
3975 (initialize_vtable): Use initialize_artificial_var.
3976 (build_vtt): Likewise.
3977 (build_ctor_vtbl_group): Likewise.
3978
3979 2004-08-30 Richard Henderson <rth@redhat.com>
3980
3981 * class.c (build_base_path): Use build_address directly.
3982 * typeck.c (build_unary_op): Don't lower &a.b to pointer
3983 arithmetic directly.
3984 * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
3985 means !initializer_constant_valid_p.
3986
3987 2004-08-30 Richard Henderson <rth@redhat.com>
3988
3989 * class.c (fixed_type_or_null): Use get_base_address before
3990 assuming an ADDR_EXPR is non-null.
3991
3992 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
3993
3994 * name-lookup.c (pop_binding, pushdecl,
3995 set_identifier_type_value_with_scope, push_overloaded_decl,
3996 arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
3997 * parser.c (cp_parser_diagnose_invalid_type_name,
3998 cp_parser_postfix_expression, cp_parser_unary_expression,
3999 cp_parser_check_declarator_template_para): Likewise.
4000 * pt.c (push_inline_template_parms_recursive,
4001 check_explicit_specialization, convert_nontype_argument,
4002 coerce_template_template_parms, uses_template_parms,
4003 instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
4004 tsubst_expr, instantiate_template,
4005 maybe_adjust_types_for_deduction, type_unification_real,
4006 resolve_overloaded_unification, template_decl_level,
4007 type_dependent_expression_p): Likewise.
4008 * search.c (lookup_base_r): Likewise.
4009 * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
4010 * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
4011 verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
4012 * typeck.c (common_type, get_member_function_from_ptrfunc,
4013 build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
4014 * typeck2.c (cxx_incomplete_type_diagnostic,
4015 split_nonconstant_init_1, store_init_value,
4016 process_init_constructor): Likewise.
4017
4018 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4019
4020 * call.c (check_dtor_name): Replace abort with gcc_assert or
4021 gcc_unreachable.
4022 (build_call, add_builtin_candidate, build_new_op,
4023 convert_like_real, build_over_call, in_charge_arg_for_name,
4024 source_type, joust): Likewise.
4025 * class.c (build_simple_base_path, get_vcall_index,
4026 finish_struct_1, instantiate_type, get_enclosing_class,
4027 add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
4028 * cp-gimplify.c (cp_genericize): Likewise.
4029 * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
4030 * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
4031 * decl.c (poplevel, make_unbound_class_template, reshape_init,
4032 check_special_function_return_type, grokdeclarator,
4033 grok_op_properties, tag_name, xref_tag, start_preparsed_function,
4034 finish_function): Likewise.
4035 * decl2.c (grokfield, maybe_emit_vtables):Likewise.
4036 * error.c (dump_global_iord, dump_decl, dump_template_decl,
4037 language_to_string): Likewise.
4038 * except.c (choose_personality_routine): Likewise.
4039 * friend.c (do_friend): Likewise.
4040 * g++spec.c (lang_specific_driver): Likewise.
4041 * init.c (build_zero_init, expand_default_init, build_new_1,
4042 build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
4043 * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
4044 * mangle.c (add_substitution, write_unscoped_name,
4045 write_template_prefix, write_identifier,
4046 write_special_name_destructor, write_type, write_builtin_type,
4047 write_expression, write_template_param,
4048 write_java_integer_type_codes): Likewise.
4049 * method.c (implicitly_declare_fn): Likewise.
4050
4051 2004-08-30 Nathan Sidwell <nathan@codesourcery.com>
4052
4053 * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
4054 (BINFO_INDIRECT_PRIMARY_P): Remove.
4055 * class.c (determine_primary_base): Rename to ...
4056 (determine_primary_bases): ... here. Set all primary bases.
4057 (set_primary_base): Remove.
4058 (mark_primary_bases): Remove.
4059 (build_simple_base_path, walk_subobject_offsets,
4060 propagate_binfo_offsets, end_of_class): Adjust.
4061 (layout_class_type): Rename determine_primary_base call.
4062 (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
4063 to type_as_string.
4064 (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
4065 build_rtti_vtbl_entries): Adjust.
4066 * init.c (build_vtbl_address): Adjust.
4067
4068 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
4069
4070 2004-08-28 Ziemowit Laski <zlaski@apple.com>
4071
4072 * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
4073 CXX_AND_OBJCXX_OBJS.
4074 (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
4075 separately on the link line.
4076
4077 2004-08-28 Jason Merrill <jason@redhat.com>
4078
4079 * decl.c (expand_static_init): Avoid bogus warnings.
4080
4081 2004-08-27 Jason Merrill <jason@redhat.com>
4082
4083 PR c++/16851
4084 * tree.c (stabilize_init): See through a COMPOUND_EXPR.
4085
4086 PR c++/13684
4087 * decl.c (expand_static_init): Use thread-safety API.
4088 (register_dtor_fn): Return the call, don't expand it.
4089 * tree.c (add_stmt_to_compound): New fn.
4090 (stabilize_call): Use it.
4091
4092 2004-08-27 Richard Henderson <rth@redhat.com>
4093
4094 * cp-tree.def (OFFSETOF_EXPR): New.
4095 * parser.c (cp_parser_builtin_offsetof): Either built an
4096 OFFSETOF_EXPR, or call fold_offsetof immediately.
4097 * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
4098
4099 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4100
4101 * call.c (validate_conversion_obstack): Replace
4102 my_friendly_assert with gcc_assert or gcc_unreachable.
4103 (direct_reference_binding, merge_conversion_sequences,
4104 build_user_type_conversion_1, perform_overload_resolution,
4105 build_op_delete_call, enforce_access, call_builtin_trap,
4106 build_over_call, build_special_member_call, build_new_method_call,
4107 initialize_reference): Likewise.
4108 * class.c (build_base_path, build_primary_vtable, alter_access,
4109 check_bases, update_vtable_entry_for_fn, layout_empty_base,
4110 clone_function_decl, adjust_clone_args,
4111 type_requires_array_cookie, include_empty_classes,
4112 finish_struct_1, resolve_address_of_overloaded_function,
4113 instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
4114 dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
4115 accumulate_vtbl_inits, build_vtbl_initializer,
4116 build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
4117 * cvt.c (build_up_reference, convert_to_reference): Likewise.
4118 * decl.c (poplevel, duplicate_decls, make_typename_type,
4119 cxx_init_decl_processing, reshape_init, check_initializer,
4120 make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
4121 expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
4122 grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
4123 xref_basetypes, start_preparsed_function, save_function_data,
4124 finish_function, finish_method, maybe_register_incomplete_var,
4125 complete_vars): Likewise.
4126 * decl2.c (grok_array_decl, check_member_template,
4127 check_classfn, finish_static_data_member_decl, coerce_new_type,
4128 coerce_delete_type, import_export_class, decl_needed_p,
4129 determine_visibility, import_export_decl, build_cleanup,
4130 start_static_initialization_or_destructi, do_static_destruction,
4131 prune_vars_needing_no_initialization,
4132 build_offset_ref_call_from_tree): Likewise.
4133 * error.c (dump_decl, dump_expr): Likewise.
4134 * init.c (finish_init_stmts, build_zero_init,
4135 expand_virtual_init, expand_default_init, expand_aggr_init_1,
4136 build_offset_ref, build_new_1, build_delete, build_vbase_delete):
4137 Likewise.
4138 * mangle.c (write_method_parms, write_template_args,
4139 write_expression, write_template_arg): Likewise.
4140 * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
4141 * name-lookup.c (pop_binding, begin_scope, leave_scope,
4142 resume_scope, push_using_decl, validate_nonmember_using_decl,
4143 is_ancestor, poplevel_class, set_inherited_value_binding_p,
4144 push_class_level_binding, do_class_using_decl, push_namespace,
4145 pop_namespace, add_using_namespace, ambiguous_decl,
4146 lookup_namespace_name, lookup_type_current_level,
4147 maybe_process_template_type_declaration): Likewise.
4148 * parser.c (cp_lexer_peek_nth_token,
4149 cp_parser_parse_and_diagnose_invalid_typ,
4150 cp_parser_translation_unit, cp_parser_template_id,
4151 cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
4152 * pt.c (push_access_scope, finish_member_template_decl,
4153 push_inline_template_parms_recursive, add_outermost_template_args,
4154 get_innermost_template_args, begin_explicit_instantiation,
4155 end_explicit_instantiation, retrieve_specialization,
4156 is_specialization_of, is_specialization_of_friend,
4157 register_specialization, check_explicit_specialization,
4158 comp_template_parms, process_template_parm,
4159 process_partial_specialization, convert_nontype_argument,
4160 coerce_template_template_parms, coerce_template_parms,
4161 mangle_class_name_for_template, lookup_template_function,
4162 lookup_template_class, instantiate_class_template, tsubst_decl,
4163 tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
4164 instantiate_template, fn_type_unification, type_unification_real,
4165 get_template_base, regenerate_decl_from_template,
4166 template_for_substitution, instantiate_decl,
4167 get_mostly_instantiated_function_type, dependent_scope_ref_p,
4168 value_dependent_expression_p, resolve_typename_type): Likewise.
4169 * repo.c (repo_emit_p): Likewise.
4170 * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
4171 create_tinfo_types, emit_tinfo_decl): Likewise.
4172 * search.c (lookup_base_r, lookup_base, lookup_field_1,
4173 dfs_access_in_type, build_baselink, lookup_member,
4174 adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
4175 * semantics.c (perform_or_defer_access_check,
4176 finish_non_static_data_member, finish_stmt_expr_expr,
4177 finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
4178 finish_template_template_parm, finish_member_declaration,
4179 emit_associated_thunks): Likewise.
4180 * tree.c (build_target_expr_with_type, force_target_expr,
4181 copy_binfo, get_first_fn, cp_tree_equal): Likewise.
4182 * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
4183 cxx_sizeof_or_alignof_type, perform_integral_promotions,
4184 build_class_member_access_expr, finish_class_member_access_expr,
4185 build_ptrmemfunc_access_expr, build_unary_op,
4186 unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
4187 build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
4188 * typeck2.c (complete_type_check_abstract,
4189 abstract_virtuals_error, process_init_constructor,
4190 add_exception_specifier): Likewise.
4191
4192 2004-08-27 Nathan Sidwell <nathan@codesourcery.com>
4193
4194 * class.c (build_vtbl_initializer): Use ssize_int.
4195 * decl.c (complete_array_type): Likewise.
4196 * method.c (finish_thunk): Likewise.
4197 * search.c (get_dynamic_base_type): Likewise.
4198
4199 2004-08-26 Richard Henderson <rth@redhat.com>
4200
4201 * cp-tree.h (DECL_FIELD_IS_BASE): New.
4202 * class.c (build_base_field): Set it.
4203 (build_simple_base_path): Use it.
4204 (fixed_type_or_null): Don't consider base fields definitive.
4205
4206 2004-08-25 Roger Sayle <roger@eyesopen.com>
4207
4208 PR middle-end/16693
4209 PR tree-optimization/16372
4210 * decl.c (finish_enum): Make the precision of the enumerated type
4211 the same width as the underlying integer type.
4212
4213 2004-08-25 Mark Mitchell <mark@codesourcery.com>
4214
4215 PR c++/17155
4216 * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
4217 functions.
4218
4219 * mangle.c (get_identifier_nocopy): Add cast.
4220
4221 * cp-tree.h (mangle_type): Remove.
4222 * mangle.c (globals): GTY it.
4223 (mangle_obstack): New variable.
4224 (name_obstack): Likewise.
4225 (name_base): Likewise.
4226 (write_char): Adjust accordingly.
4227 (write_chars): Likewise.
4228 (write_string): Likewise.
4229 (start_mangling): Initialize G.substitutions only one. Add
4230 ident_p parameter.
4231 (finish_mangling): Use VARRAY_CLEAR to reclaim
4232 storage in G.substitutions. Use obstack_finish.
4233 (init_mangle): Adjust for changes to variable names above.
4234 Initialize G.substitutions.
4235 (mangle_decl_string): Adjust call to start_mangling.
4236 (get_identifier_nocopy): New function.
4237 (mangle_decl): Use it.
4238 (mangle_type_string): Adjust call to start_mangling.
4239 (mangle_special_for_type): Likewise.
4240 (mangle_vtt_for_type): Likewise.
4241 (mangle_ctor_vtbl_for_type): Likewise.
4242 (mangle_thunk): Likewise.
4243 (mangle_guard_variable): Likewise.
4244 (mangle_ref_init_variable): Likewise.
4245
4246 2004-08-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4247
4248 PR c++/14428
4249 * pt.c (redeclare_class_template): Check the type of non-type and
4250 template template parameter.
4251
4252 2004-08-25 Nathan Sidwell <nathan@codesourcery.com>
4253
4254 * call.c (convert_class_to_reference): Adjust build_int_cst calls.
4255 (build_user_type_conversion_1, convert_like_real,
4256 build_java_interface_fn_ref, build_special_member_call): Likewise.
4257 * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
4258 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4259 * cvt.c (cp_convert_to_pointer): Likewise.
4260 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4261 * decl2.c (start_static_initialization_or_destruction,
4262 generate_ctor_or_dtor_function): Likewise.
4263 * except.c (build_throw): Likewise.
4264 * mangle.c (write_integer_cst): Likewise.
4265 * method.c (finish_thunk): Likewise.
4266 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4267 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4268 get_pseudo_ti_init): Likewise.
4269 * search.c (get_dynamic_cast_base_type): Likewise.
4270
4271 2004-08-25 Zack Weinberg <zack@codesourcery.com>
4272
4273 * class.c, search.c: Remove references to DWARF_DEBUG.
4274
4275 2004-08-25 Adam Nemet <anemet@lnxw.com>
4276
4277 * repo.c (extract_string): Reset backquote after one character.
4278 (get_base_filename): Fix indentation.
4279
4280 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4281
4282 * decl.c (cxx_init_decl_processing): Adjust
4283 build_common_tree_nodes call.
4284
4285 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4286
4287 PR c++/16889
4288 * (is_subobject_of_p): Resurrect & optimize.
4289 (lookup_field_r): Use it.
4290
4291 2004-08-24 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4292
4293 PR c++/16706
4294 * search.c (friend_accessible_p): Increment processing_template_decl
4295 when deal with TEMPLATE_DECL of SCOPE.
4296
4297 2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
4298
4299 PR c++/17149
4300 * semantics.c (check_accessibility_of_qualified_id): Defer check
4301 if qualifying_type is a template parameter.
4302
4303 2004-08-23 Mark Mitchell <mark@codesourcery.com>
4304
4305 PR c++/17163
4306 * pt.c (instantiate_decl): Do not try to apply
4307 DECL_DECLARED_INLINED_P to a VAR_DECL.
4308
4309 * search.c (build_baselink): Fix typo in comment.
4310
4311 2004-08-22 Andrew Pinski <apinski@apple.com>
4312
4313 Revert:
4314 2004-08-22 Andrew Pinski <apinski@apple.com>
4315 PR c++/14029
4316 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4317 expression is not constant.
4318
4319 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
4320
4321 * name-lookup.c (pushdecl): Rename build_type_copy call.
4322 * tree.c (cp_build_qualified_type_real,
4323 build_exception_variant, handle_java_interface_attribute): Likewise.
4324
4325 2004-08-22 Andrew Pinski <apinski@apple.com>
4326
4327 PR c++/14029
4328 * typeck.c (build_unary_op): Use &a.b if the folded lowered
4329 expression is not constant.
4330
4331 2004-08-20 Mark Mitchell <mark@codesourcery.com>
4332
4333 PR c++/17121
4334 * decl.c (expand_static_init): Use DECL_FUNCTION_SCOPE_P.
4335
4336 2004-08-21 Joseph S. Myers <jsm@polyomino.org.uk>
4337
4338 PR c++/17120
4339 * pt.c (tsubst_copy_and_build): Avoid clearing TREE_NO_WARNING for
4340 MODOP_EXPR.
4341
4342 2004-08-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4343
4344 * pt.c (register_specialization): Check DECL_TEMPLATE_SPECIALIZATION
4345 before calling comp_template_args.
4346
4347 2004-08-20 Nathan Sidwell <nathan@codesourcery.com>
4348
4349 * class.c (build_vtbl_initializer): Use build_int_cst for
4350 negative size types.
4351 * decl.c (complete_array_type): Likewise.
4352 * method.c (finish_thunk): Likewise.
4353
4354 2004-08-20 Andreas Tobler <a.tobler@schweiz.ch>
4355
4356 * tree.c: Remove unused mark_local_for_remap_r.
4357
4358 2004-08-19 Eric Christopher <echristo@redhat.com>
4359
4360 * cp-tree.h (cxx_unsave_expr_now): Delete prototype.
4361 * tree.c (cxx_unsave_expr_now): Delete.
4362 (cp_unsave_r): Ditto.
4363
4364 2004-08-19 Mark Mitchell <mark@codesourcery.com>
4365
4366 PR c++/15890
4367 * pt.c (push_template_decl_real): Disallow template allocation
4368 functions with fewer than two parameters.
4369
4370 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4371
4372 * cp-tree.h (build_shared_int_cst): Remove.
4373 * tree.c (shared_int_cache): Remove.
4374 (build_shared_int_cst): Remove.
4375 * class.c (finish_struct_1): Use build_int_cst.
4376
4377 2004-08-19 Nathan Sidwell <nathan@codesourcery.com>
4378
4379 * decl.c (finish_enum): Do not copy value node early, copy
4380 later.
4381 * lex.c (cxx_init): Force null_node to be unique.
4382
4383 2004-08-19 Joseph S. Myers <jsm@polyomino.org.uk>
4384
4385 PR c++/17041
4386 * pt.c (tsubst_copy, tsubst_copy_and_build): Copy TREE_NO_WARNING
4387 from input for MODOP_EXPR.
4388
4389 2004-08-18 Mark Mitchell <mark@codesourcery.com>
4390
4391 * pt.c (dependent_template_p): Fix typo in commment.
4392
4393 PR c++/17068
4394 * pt.c (dependent_template_p): Treat IDENTIFIER_NODEs as
4395 dependent.
4396
4397 2004-08-17 Mark Mitchell <mark@codesourcery.com>
4398
4399 PR c++/16246
4400 * pt.c (unify): Tidy ARRAY_TYPE handling. Make sure that non-type
4401 arguments have the same type as the corresponding parameter.
4402
4403 PR c++/16215
4404 * parser.c (cp_parser_name_lookup_error): If parser->object_scope
4405 is set use it for diagnostic purposes.
4406 (cp_parser_pseudo_destructor_name): Remove special-case error
4407 message.
4408
4409 PR c++/15871
4410 * semantics.c (expand_or_defer_fn): Honor -fkeep-inline-functions.
4411
4412 PR c++/16965
4413 * cp-tree.h (qualified_name_lookup_error): Add parameter.
4414 * name-lookup.c (do_class_using_decl): Restrict set of entities
4415 passed to cp_emit_debug_info_for_using more carefully.
4416 (lookup_qualified_name): Allow lookup_member to return sets of
4417 ambiguous entries.
4418 * parser.c (cp_parser_lookup_name): Add ambiguous_p parameter.
4419 (cp_parser_primary_expression): Handle ambiguous lookups.
4420 (cp_parser_template_name): Adjust use of cp_parser_lookup_name.
4421 (cp_parser_template_argument): Likewise.
4422 (cp_parser_elaborate_type_specifier): Likewise.
4423 (cp_parser_namespace_name): Likewise.
4424 (cp_parser_class_name): Likewise.
4425 (cp_parser_lookup_name_simple): Likewise.
4426 * pt.c (tsubst_qualified_id): Handle ambiguous results.
4427 (tsubst_expr): Likewise.
4428 * semantics.c (qualified_name_lookup_error): Add decl paramter.
4429 For ambiguous lookups, print candidates.
4430
4431 2004-08-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4432
4433 PR c++/6749
4434 * pt.c (instantiate_pending_templates): Add int parameter. Don't
4435 return anything.
4436 * cp-tree.h (instantiate_pending_templates): Adjust prototype.
4437 * decl2.c (finish_file): Adjust call to
4438 instantiate_pending_templates.
4439
4440 2004-08-15 Roger Sayle <roger@eyesopen.com>
4441
4442 * call.c (build_vfield_ref, build_call, build_conditional_expr,
4443 convert_arg_to_ellipsis, build_x_va_arg, build_over_call,
4444 build_java_interface_fn_ref, build_special_member_call,
4445 build_new_method_call, initialize_reference): Replace calls to
4446 build with calls to buildN.
4447 * class.c (build_base_path, convert_to_base_statically,
4448 build_vfn_ref, instantiate_type, dfs_accumulate_vtbl_inits,
4449 build_vtbl_initializer): Likewise.
4450 * cp-gimplify.c (genericize_try_block, genericize_catch_block,
4451 gimplify_if_stmt, cp_genericize_r): Likewise.
4452 * cvt.c (convert_to_void): Likewise.
4453 * decl.c (check_initializer, finish_constructor_body,
4454 finish_destructor_body): Likewise.
4455 * error.c (dump_expr): Likewise.
4456 * except.c (build_exc_ptr, expand_start_catch_block, build_throw):
4457 Likewise.
4458 * init.c (perform_member_init, expand_virtual_init,
4459 expand_cleanup_for_base, build_init, expand_default_init,
4460 build_offset_ref, decl_constant_value, build_new, build_new_1,
4461 build_vec_delete_1, build_vec_init, build_delete,
4462 push_base_cleanups, build_vec_delete): Likewise.
4463 * mangle.c (write_integer_cst): Likewise.
4464 * method.c (thunk_adjust, do_build_copy_constructor,
4465 do_build_assign_ref): Likewise.
4466 * pt.c (lookup_template_function, tsubst, tsubst_copy_and_build,
4467 unify, build_non_dependent_expr): Likewise.
4468 * rtti.c (build_headof, build_typeid, ifnonnull,
4469 build_dyanmic_cast_1, tinfo_base_init): Likewise.
4470 * semantics.c (begin_compound_stmt, finish_call_expr,
4471 finish_pseudo_destructor_expr, finish_id_expression,
4472 simplify_aggr_init_expr, finalize_nrv_r): Likewise.
4473 * tree.c (build_target_expr, build_cplus_new, array_type_nelts_top,
4474 array_type_nelts_total, stabilize_call): Likewise.
4475 * typeck.c (decay_conversion, build_class_member_access_expr,
4476 lookup_destructor, build_ptrmemfunc_access_expr, build_array_ref,
4477 get_member_function_from_ptrfunc, build_binary_op, pointer_diff,
4478 build_x_unary_op, build_unary_op, unary_complex_lvalue,
4479 build_compound_expr, build_modify_expr, expand_ptrmemfunc_cst,
4480 check_return_expr): Likewise.
4481 * typeck2.c (split_nonconstant_1, split_nonconstant_init_1,
4482 split_nonconstant_init, store_init_value, build_m_component_ref):
4483 Likewise.
4484
4485 2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
4486
4487 * call.c (convert_class_to_reference,
4488 build_user_type_conversion_1, convert_like_real,
4489 build_java_interface_fn_ref, build_special_member_call): Use
4490 build_int_cst.
4491 * class.c (build_vtbl_initializer): Likewise.
4492 * cp-gimplify.c (cp_gimplify_expr): Likewise.
4493 * cvt.c (cp_convert_to_pointer): Likewise.
4494 * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
4495 * decl2.c (start_static_initialization_or_destruction,
4496 generate_ctor_or_dtor_function): Likewise.
4497 * except.c (build_throw): Likewise.
4498 * lex.c (cxx_init): Likewise.
4499 * mangle.c (write_integer_cst): Likewise.
4500 * rtti.c (build_headof, get_tinfo_decl_dynamic,
4501 build_dynamic_cast_1, ptr_initializer, ptm_initializer,
4502 get_pseudo_ti_init): Likewise.
4503 * search.c (get_dynamic_cast_base_type): Likewise.
4504 * tree.c (build_shared_int_cst): Likewise.
4505
4506 2004-08-12 Mark Mitchell <mark@codesourcery.com>
4507
4508 PR c++/16273
4509 * class.c (count_depth_data): New type.
4510 (dfs_depth_post): New function.
4511 (dfs_depth_q): Likewise.
4512 (find_final_overrider_data_s): Change type of vpath.
4513 Add vpath_list.
4514 (dfs_find_final_overrider_1): New function.
4515 (dfs_find_final_overrider): Use it.
4516 (dfs_find_final_overrider_q): Adjust use of vpath.
4517 (dfs_find_final_overrider_post): Likewise.
4518 (find_final_overrider): Use dfs_depth. Allocate and deallocate
4519 vpath_list.
4520
4521 2004-08-12 Jan Beulich <jbeulich@novell.com>
4522
4523 * parser.c (cp_parser_asm_definition): Properly consume scope operator
4524 tokens preceding the clobbers. Don't check for scope operator
4525 following inputs. Simplify inputs handling to match that now used for
4526 clobbers.
4527
4528 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4529
4530 PR c++/16698
4531 * except.c (build_throw): Allocate cleanup_type and the function
4532 for __cxa_throw separately.
4533
4534 PR c++/16853
4535 * call.c (standard_conversion): Do not accept conversions between
4536 pointers to members if the class types are unrelated.
4537
4538 PR c++/16618
4539 * parser.c (cp_parser_builtin_offsetof): Cast to "const volatile
4540 char &" instead of just "char &".
4541
4542 PR c++/16870
4543 * pt.c (tsubst): Just return the unknown_type_node.
4544
4545 2004-08-11 Mark Mitchell <mark@codesourcery.com>
4546
4547 PR c++/16964
4548 * parser.c (cp_parser_class_specifier): Robustify.
4549
4550 PR c++/16904
4551 * pt.c (tsubst_copy_and_build): Complain about invalid
4552 qualification.
4553
4554 PR c++/16929
4555 * pt.c (tsubst_default_argument): Clear out current_class_ptr and
4556 current_class_ref while tsubsting.
4557
4558 2004-08-10 Mark Mitchell <mark@codesourcery.com>
4559
4560 PR c++/16971
4561 * parser.c (cp_parser_init_declarator): Robustify.
4562
4563 2004-08-06 Richard Sandiford <rsandifo@redhat.com>
4564
4565 * typeck2.c (process_init_constructor): Guard the missing field warning
4566 with warn_missing_field_initializers rather than extra_warnings.
4567
4568 2004-08-06 Paolo Bonzini <bonzini@gnu.org>
4569
4570 * class.c (instantiate_type) <ENTRY_VALUE_EXPR>: Do not handle.
4571
4572 2004-08-05 Mark Mitchell <mark@codesourcery.com>
4573
4574 * decl.c (start_preparsed_function): Move determine_visibility
4575 call.
4576 * decl2.c (determine_visibility): Incorporate dllexport testing.
4577
4578 2004-08-05 Geoffrey Keating <geoffk@apple.com>
4579
4580 * g++spec.c (lang_specific_driver): An -Xlinker or -Wl, option
4581 means that libstdc++ is needed.
4582
4583 2004-08-05 Nathan Sidwell <nathan@codesourcery.com>
4584
4585 * cvt.c (cp_convert_to_pointer): Adjust force_fit_type call.
4586
4587 2004-08-04 Geoffrey Keating <geoffk@apple.com>
4588
4589 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_ASSEMBLER_NAME rather
4590 than passing it as a parameter to rest_of_decl_compilation.
4591 * decl2.c (grokfield): Use set_user_assembler_name.
4592
4593 2004-08-04 Nathan Sidwell <nathan@codesourcery.com>
4594
4595 * decl.c (complete_array_type): Don't gratuitously copy
4596 maxindex. Its type is always set.
4597
4598 2004-08-04 Paul Brook <paul@codesourcery.com>
4599
4600 * Make-lang.in (cp/semantics.o, cp/optimize.o): Depend on TARGET_H.
4601 * cp-tree.h (struct language_function): Rename x_dtor_label to
4602 x_cdtor_label.
4603 (dtor_label): Rename ...
4604 (cdtor_label): ... to this.
4605 * decl.c (begin_constructor_body): Remove.
4606 (check_special_function_return_type): Maybe change the return type.
4607 (grokdeclarator): Pass the class type.
4608 (start_preparsed_function): Constructors may need a return label.
4609 (finish_constructor_body, finish_destructor_body): Set the return
4610 value.
4611 (begin_function_body): Don't call begin_constructor_body.
4612 (finish_function): Don't warn for constructors or destructors.
4613 (implicitly_declare_fn): Maybe change the return type.
4614 * optimize.c: Include target.h.
4615 (maybe_clone_body): Remap the function result.
4616 * semantics.c: Include target.h.
4617 (finish_return_stmt): Maybe jump to return label for constructors.
4618
4619 2004-08-03 Mark Mitchell <mark@codesourcery.com>
4620
4621 * class.c (build_vtable): Do not set DECL_VISIBILITY here.
4622 (check_field_decls): Or here.
4623 (check_methods): Or here.
4624 (initialize_array): Don't mess with DECL_CONTEXT.
4625 * cp-tree.h (start_decl): Adjust prototype.
4626 (determine_visibility): New function.
4627 * decl.c (duplicate_decls): Remove checks for hidden "operator
4628 new".
4629 (build_library_fn_1): Give all library functions default
4630 visibility.
4631 (start_decl): Add pop_scope_p parameter. Tidy.
4632 (cp_finish_decl): Do not pop scopes here. Call
4633 determine_visibility for variable definitions.
4634 (start_preparsed_function): Call determine_visibility.
4635 * decl2.c (determine_visibility): New function.
4636 * method.c (use_thunk): Fix formatting.
4637 * parser.c (cp_parser_condition): Adjust calls to start_decl.
4638 (cp_parser_init_declarator): Likewise.
4639 * pt.c (instantiate_decl): Always call pop_nested_class.
4640 * rtti.c (get_tinfo_decl): Do not set DECL_VISIBILITY.
4641 (tinfo_base_init): Likewise.
4642
4643 2004-08-02 Mark Mitchell <mark@codesourcery.com>
4644
4645 PR c++/16707
4646 * name-lookup.c (validate_nonmember_using_decl): Robustify.
4647
4648 2004-08-01 Mark Mitchell <mark@codesourcery.com>
4649
4650 PR c++/16224
4651 * name-lookup.c (decl_namespace): Remove.
4652 (current_decl_namespace): Use decl_namespace_context instead of
4653 decl_namespace.
4654 (push_decl_namespace): Likewise.
4655 (arg_assoc_class): Likewise.
4656 (arg_assoc_type): Likewise.
4657 * pt.c (check_specialization_namespace): New function.
4658 (maybe_process_partial_specialization): Use it.
4659 (register_specialization): Likewise.
4660
4661 PR c++/16489
4662 * cp-tree.h (DECL_INTEGRAL_CONSTANT_VAR_P): New macro.
4663 * call.c (null_ptr_cst_p): Handle variables with constant
4664 initializers.
4665 * pt.c (convert_nontype_argument): Use
4666 DECL_INTEGRAL_CONSTANT_VAR_P.
4667 * semantics.c (finish_id_expression): Likewise.
4668
4669 PR c++/16529
4670 * decl.c (duplicate_decls): Reject duplicate namespace
4671 declarations.
4672
4673 PR c++/16810
4674 * typeck.c (build_ptrmemfunc): Loosen assertion.
4675
4676 2004-08-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
4677
4678 * call.c (z_candidate::template_decl): Rename from template.
4679 (add_template_candidate_real): Adjust member reference.
4680 (joust): Likewise.
4681
4682 2004-07-29 Mark Mitchell <mark@codesourcery.com>
4683
4684 * cp-tree.h (IDENTIFIER_REPO_CHOSEN): Define.
4685 (lang_decl_flags): Narrow the width of "languages". Add
4686 repo_available_p.
4687 (DECL_NEEDED_P): Remove.
4688 (FOR_EACH_CLONE): New macro.
4689 (DECL_REPO_AVAILABLE_P): Likewise.
4690 (DECL_TINFO_P): Likewise.
4691 (set_linkage_according_to_type): Declare.
4692 (import_export_vtable): Remove.
4693 (import_export_tinfo): Likewise.
4694 (mark_needed): New function.
4695 (decl_needed_p): Likewise.
4696 (note_vauge_linkage_fn): Likewise.
4697 (init_repo): Change prototype.
4698 (repo_template_used): Remove.
4699 (repo_template_instantiated): Likewise.
4700 (repo_emit_p): New function.
4701 (repo_export_class_p): Likewise.
4702 (no_linkage_check): Change prototype.
4703 * class.c (set_linkage_according_to_type): New function.
4704 (build_vtable): Use it. Do not call import_export_vtable. Set
4705 DECL_IGNORED_P if appropriate.
4706 * decl.c (duplicate_decls): Preserve DECL_REPO_AVAILABLE_P.
4707 (make_rtL_for_nonlocal_decls): Check for template instantiations
4708 explicitly.
4709 (grokfndecl): Adjust call to no_linkage_check.
4710 (set_linkage_for_static_data_member): New function.
4711 (grokvardecl): Use it. Adjust call to no_linkage_check.
4712 (grokdeclarator): Use set_linkage_for_static_data_member.
4713 * decl2.c (note_vague_linkage_fn): New function.
4714 (note_vague_linkage_var): Likewise.
4715 (finish_static_data_member_decl): Use it.
4716 (import_export_vtable): Remove.
4717 (import_export_class): Use repo_export_class_p.
4718 (var_finalized_p): Simplify.
4719 (maybe_emit_vtables): Simplify.
4720 (mark_needed): New function.
4721 (decl_needed_p): Likewise.
4722 (import_export_decl): Add documentation and consistency checks.
4723 Use repo_emit_p. Handle virtual tables and RTTI information
4724 here.
4725 (import_export_tinfo): Remove.
4726 (write_out_vars): Call import_export_decl.
4727 (cxx_callgraph_analyze_expr): Ensure that all vtables are emitted
4728 whenever one is.
4729 (finish_file): Use decl_needed_p. Do not call import_export_decl
4730 for undefined static data members. Do not warn about undefined
4731 inlines when using a repository.
4732 (mark_used): Use note_vague_linkage_fn. Always defer template
4733 instantiations.
4734 * lex.c (cxx_init): Adjust call to init_repo. Always set
4735 flag_unit_at_a-time.
4736 * method.c (synthesize_method): Remove unncessary
4737 import_export_decl call.
4738 (implicitly_declare_fn): Use set_linkage_according_to_type.
4739 * optimize.c (maybe_clone_body): Use FOR_EACH_CLONE.
4740 * pt.c (instantiate_class_template): Don't redundantly add classes
4741 to keyed_classes. Don't call repo_template_used.
4742 (tsubst_decl): Set DECL_INTERFACE_KNOWN for instantiations of
4743 templates with internal linkage.
4744 (check_instantiated_args): Adjust call to no_linkage_check.
4745 (instantiate_template): Use FOR_EACH_CLONE.
4746 (mark_definable): New function.
4747 (mark_decl_instantiated): Use it.
4748 (do_decl_instantiation): Adjust tests for explicit instantiation
4749 after "extern template".
4750 (instantiate_class_member): Do not use repo_template_instantiated.
4751 (do_type_instantiation): Simplify.
4752 (instantiate_decl): Use mark_definable. Check repo_emit_p.
4753 Simplify.
4754 * repo.c (repo_get_id): Remove.
4755 (original_repo): Remove.
4756 (IDENTIFIER_REPO_USED): Remove.
4757 (IDENTIFIER_REPO_CHOSEN): Remove.
4758 Remove all #if 0'd code.
4759 (repo_template_used): Remove.
4760 (repo_template_instantiated): Remove.
4761 (temporary_obstack_initialized_p): New variable.
4762 (init_repo): Register with lang_post_pch_load. Avoid creating
4763 identifiers unnecessarily. Don't use original_repo. Close the
4764 file here.
4765 (reopen_repo_file_for_write): Not here.
4766 (finish_repo): Always write out a new repository file.
4767 (repo_emit_p): New function.
4768 (repo_export_class_p): Likewise.
4769 * rtti.c (get_tinfo_decl): Use set_linkage_according_to_type.
4770 (involves_incomplete_p): New function.
4771 (tinfo_base_init): Use it.
4772 (ptr_initializer): Remove non_public_ptr parameter.
4773 (ptm_initializer): Likewise.
4774 (get_pseudo_ti_init): Likewise.
4775 (unemitted_tinfo_decl_p): Remove.
4776 (emit_tinfo_decl): Use import_export_decl.
4777 * semantics.c (expand_body): Move updates of static_ctors and
4778 static_dtors to ...
4779 (expand_or_defer_fn): ... here.
4780 * tree.c (no_linkage_check): Add relaxed_p parameter.
4781
4782 2004-07-28 Eric Christopher <echristo@redhat.com>
4783
4784 * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
4785
4786 2004-07-28 Nathan Sidwell <nathan@codesourcery.com>
4787
4788 * cp-tree.h (struct tree_pair_s): New.
4789 (typedef tree_pair_p): New.
4790 (DEF_VEC_O(tree_pair_s)): New.
4791 (struct lang_type_class): Make vcall_indices a VEC(tree_pair_s).
4792 (CLASSTYPE_VCALL_INDICES): Update documentation.
4793 * class.c (get_vcall_index): Adjust.
4794 (add_vcall_offset): Adjust.
4795
4796 2004-07-27 Kelley Cook <kcook@gcc.gnu.org>
4797
4798 * pt.c, typeck.c: Remove spurious carriage returns.
4799
4800 2004-07-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4801
4802 PR c++/14429
4803 * pt.c (coerce_template_template_parms) <PARM_DECL case>: Only check
4804 when the type of ARG is not dependent.
4805
4806 2004-07-26 Geoffrey Keating <geoffk@apple.com>
4807
4808 * g++spec.c (LIBSTDCXX_PROFILE): Default to LIBSTDCXX.
4809 (lang_specific_driver): If the C++ or math library options don't
4810 start with '-l', don't count them as added libraries.
4811
4812 2004-07-26 Nathan Sidwell <nathan@codesourcery.com>
4813
4814 * decl.c (xref_basetypes): Adjust base access vector creation.
4815 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Adjust base
4816 access accesses.
4817 * search.c (dynamic_cast_base_recurse, dfs_access_in_type): Likewise.
4818
4819 2004-07-26 Niall Douglas <s_fsfeurope2@nedprod.com>
4820 Brian Ryner <bryner@brianryner.com>
4821
4822 PR c++/15000
4823 PR c++/9283
4824 * class.c (check_field_decls): Apply hidden visibility if
4825 -fvisibility-inlines-hidden and inlined unless otherwise specified
4826 (build_vtable): Set vtable visibility to class visibility.
4827 (check_field_decls): Default static member visibility to class
4828 visibility.
4829 (check_methods): Default method visibility to class visibility.
4830 * cp-tree.h: Added CLASSTYPE_VISIBILITY and
4831 CLASSTYPE_VISIBILITY_SPECIFIED macro.
4832 * decl.c (duplicate_decls): New logic for merging definition decls
4833 with declaration decls. Added ignore & warning when non default
4834 applied to global operator new or delete.
4835 * method.c, optimize.c, rtti.c: Added setting of VISIBILITY_SPECIFIED
4836 wherever VISIBILITY was changed
4837 * rtti.c (get_tinfo_decl): Set typeinfo visibility to class
4838 visibility.
4839 (tinfo_base_init): Set typeinfo name visibility to class visibility.
4840
4841 2004-07-25 Bernardo Innocenti <bernie@develer.com>
4842
4843 * decl.c: Rename all identifiers named `class' to `cl'.
4844 * cp-tree.h: Likewise.
4845
4846 2004-07-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
4847
4848 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Use GGC_CNEW.
4849 * typeck2.c (abstract_virtuals_error): Use GGC_NEW.
4850 * name-lookup.c (binding_entry_make): Use GGC_NEW.
4851 (binding_table_construct): Use GGC_CNEWVEC.
4852 (binding_table_new): Use GGC_NEW.
4853 (cxx_binding_make): Likewise.
4854 (begin_scope): Likewise.
4855 (push_to_top_level): Use GCC_CNEW.
4856 * parser.c (cp_token_cache_new): Likewise.
4857 (cp_token_cache_push_token): Likewise.
4858 (cp_lexer_new_main): Likewise.
4859 (cp_lexer_new_from_tokens): Likewise.
4860 (cp_parser_context_new): Likewise.
4861 (cp_parser_new): Likewise.
4862 (cp_lexer_new_from_tokens): Use GGC_NEWVEC.
4863 * lex.c (cxx_make_type): Use GGC_CNEW.
4864 (retrofit_lang_decl): Use GGC_NEWVAR.
4865 (cxx_dup_lang_specific_decl): Likewise.
4866 (copy_lang_type): Likewise.
4867 * decl.c (use_label): Use GGC_NEW instead of ggc_alloc.
4868 (save_function_data): Likewise.
4869 (lookup_label): Use GGC_CNEW instead of ggc_alloc_cleared.
4870 (cxx_push_function_context): Likewise.
4871
4872 2004-07-25 Richard Henderson <rth@redhat.com>
4873
4874 * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
4875 DECL_IGNORED_P on RESULT_DECL.
4876 * semantics.c (finalize_nrv): Copy them too.
4877
4878 2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
4879
4880 * search.c (lookup_conversion_operator): Avoid two loops.
4881 (add_conversions): Remove.
4882 (check_hidden_convs, split_conversions,
4883 lookup_conversions_r): New.
4884 (lookup_conversions): Use lookup_conversions_r.
4885
4886 2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
4887
4888 * pt.c (get_template_base): Check type is completable.
4889
4890 2004-07-21 Eric Christopher <echristo@redhat.com>
4891
4892 * decl.c (poplevel): Inline unused variable checking.
4893 Change formatting.
4894
4895 2004-07-21 Paolo Bonzini <bonzini@gnu.org>
4896
4897 * typeck.c (build_binary_op): Do not use RDIV_EXPR for
4898 integer vectors.
4899
4900 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4901
4902 PR c++/14497
4903 * pt.c (check_explicit_specialization): Remove extension to accept
4904 specializations without template headers. Fall-through to normal
4905 processing.
4906
4907 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4908
4909 PR c++/509
4910 * pt.c (determine_specialization): New parameter template_count.
4911 Disambiguate between member templates and member functions counting
4912 the template headers.
4913 (check_explicit_specialization): Update caller.
4914 (tsubst_friend_function): Likewise.
4915
4916 2004-07-20 Steven Bosscher <stevenb@suse.de>
4917
4918 * cp-tree.def (TINST_LEVEL): Make it an 'x' node.
4919 * cp-tree.h (tinst_level_t): New tree type.
4920 (union lang_tree_node): Handle it.
4921 (TINST_LOCATION): New accessor macro.
4922 (make_tinst_level): New prototype.
4923 * cp-lang.c (cp_tree_size): Handle TINST_LEVEL.
4924 * decl.c (cp_tree_node_structure): Likewise.
4925 * error.c (print_instantiation_full_context): Use TINST_LOCATION.
4926 (print_instantiation_partial_context): Likewise.
4927 * pt.c (pop_tinst_level): Likewise.
4928 (push_tinst_level): Use make_tinst_level.
4929 * tree.c (make_tinst_level): New function.
4930 (cp_walk_subtrees): Walk TINST_DECL for a TINST_LEVEL node.
4931
4932 2004-07-20 Mark Mitchell <mark@codesourcery.com>
4933
4934 * parser.c (cp_parser_simple_type_specifier): Fix typo.
4935
4936 PR c++/16637
4937 * parser.c (cp_parser_simple_type_specifier): Do not record usage
4938 of globally-qualified names.
4939
4940 2004-07-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4941
4942 PR c++/16175
4943 * error.c (dump_type) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Output
4944 cv qualifier.
4945
4946 2004-07-19 Mark Mitchell <mark@codesourcery.com>
4947
4948 PR c++/16623
4949 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
4950 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
4951 * class.c (add_implicitly_declared_members): Use
4952 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4953 * method.c (lazily_declare_fn): Clear
4954 CLASSTYPE_LAZY_ASSIGNMENT_OP.
4955 * search.c (lookup_fnfields_1): Check it.
4956
4957 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4958
4959 * cp-tree.h (vec_binfo_member): Remove.
4960 * tree.c (vec_binfo_member): Remove.
4961
4962 * cp-tree.h (struct lang_type_class): Remove vfields field.
4963 (CLASSTYPE_VFIELDS): Remove.
4964 (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
4965 * class.c (determine_primary_base): Remove CLASSTYPE_VFIELDS
4966 handling.
4967 (dfs_modify_vtables): Use TYPE_CONTAINS_VPTR_P.
4968 (finish_struct_1): Remove CLASSTYPE_VFIELDS handling.
4969 * init.c (dfs_initialize_vtbl_ptrs): Use TYPE_CONTAINS_VPTR_P.
4970
4971 2004-07-20 Nathan Sidwell <nathan@codesourcery.com>
4972
4973 * cp-tree.h (DEF_VEC_P(tree)): Remove here.
4974 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
4975 Moved to common.
4976 (BINFO_LANG_SLOTS): Remove.
4977 * tree.c (copy_binfo): Adjust BINFO creation and accessors.
4978 * decl.c (xref_basetypes): Adjust BINFO creation and accessors.
4979 * class.c (check_bases): Adjust BINFO accessors.
4980 (determine_primary_base, finish_struct_bits,
4981 maybe_warn_about_overly_private_class, warn_hidden,
4982 walk_subobject_offsets, propagate_binfo_offsets, end_of_class,
4983 warn_about_ambiguous_bases, get_vfield_name,
4984 dump_class_hierarchy_r, build_vtt_inits, accumulate_vtbl_inits,
4985 add_vcall_offset_vtbl_entries_r): Likewise.
4986 * dump.c (cp_dump_tree): Likewise.
4987 * init.c (sort_mem_initializers, expand_member_init, build_delete,
4988 push_base_cleanups): Likewise.
4989 * method.c (do_build_copy_constructor, do_build_assign_ref,
4990 synthesize_exception_spec): Likewise.
4991 name-lookup.c (arg_assoc_class): Likewise.
4992 * pt.c (instantiate_class_template,
4993 get_template_base_recursive): Likewise.
4994 * rtti.c (get_pseudo_ti_init, get_pseudo_ti_desc): Likewise.
4995 * typeck2.c (process_init_constructor): Likewise.
4996 * search.c (lookup_base_r, dynamic_cast_base_recurse,
4997 dfs_access_in_type, dfs_walk_real, look_for_overrides,
4998 types_overlap_p, copied_binfo, original_binfo): Likewise.
4999 (binfo_for_vtable): Remove
5000
5001 2004-07-20 Steven Bosscher <stevenb@suse.de>
5002
5003 * cp-tree.h (struct lang_decl_flags): Unify the template_info and
5004 thunk_alias, and the access and virtual_offset fields.
5005 (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
5006 * decl.c (finish_case_label): Update c_add_case_node call.
5007
5008 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5009
5010 Revert patch for PR c++/16623.
5011
5012 2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
5013
5014 * except.c: Remove two spurious carriage returns.
5015
5016 2004-07-19 Mark Mitchell <mark@codesourcery.com>
5017
5018 PR c++/16623
5019 * cp-tree.h (lang_type_class): Add lazy_assignment_op.
5020 (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
5021 * class.c (add_implicitly_declared_members): Use
5022 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5023 * method.c (lazily_declare_fn): Clear
5024 CLASSTYPE_LAZY_ASSIGNMENT_OP.
5025 * search.c (lookup_fnfields_1): Check it.
5026
5027 2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
5028
5029 * class.c (add_method): Delay adding the slot until the end.
5030 (determine_primary_base): Adjust VEC_iterate invokation.
5031 (resort_type_method_vec, finish_struct_methods, warn_hidden,
5032 walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
5033 build_vtbl_initializer): Likewise.
5034 * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
5035 build_vbase_delete): Likewise.
5036 * method.c (do_build_copy_constructor): Likewise.
5037 * name-lookup.c (new_class_binding, print_binding_level,
5038 poplevel_class, store_class_bindings, push_to_top_level,
5039 pop_from_top_level): Likewise.
5040 * pt.c (check_explicit_specialization): Likewise.
5041 * search.c (lookup_conversion_operator, lookup_fnfields_1,
5042 get_pure_virtuals, add_conversions, dfs_check_overlap,
5043 binfo_for_vbase): Likewise.
5044
5045 2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5046
5047 PR c++/12170
5048 * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
5049 innermost set of template arguments during deduction. Simplify.
5050
5051 2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
5052
5053 * typeck.c (build_modify_expr, build_x_modify_expr): Set
5054 TREE_NO_WARNING on assignments with an operator other than '='.
5055
5056 2004-07-10 Steven Bosscher <stevenb@suse.de>
5057 Joseph S. Myers <jsm@polyomino.org.uk>
5058
5059 * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
5060 * decl2.c (grokfield): Don't check current_class_depth via
5061 unused TREE_COMPLEXITY.
5062 * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
5063 to avoid the missing parentheses warning.
5064 Don't set C_SET_EXP_ORIGINAL_CODE.
5065
5066 2004-07-18 Mark Mitchell <mark@codesourcery.com>
5067
5068 * tree.c (no_linkage_helper): Remove.
5069 (no_linkage_check): Don't use walk_tree_without_duplicates.
5070
5071 * mangle.c (write_expression): Issue a sorry for zero-operand
5072 functional casts.
5073
5074 2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5075
5076 PR c++/13092
5077 * init.c (build_offset_ref): Build SCOPE_REF with non-null
5078 TREE_TYPE for non-dependent names.
5079 * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
5080 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
5081 unknown_type_node as its TREE_TYPE.
5082 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
5083 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
5084 (dump_expr) <SCOPE_REF case>: Likewise.
5085
5086 2004-07-17 Jason Merrill <jason@redhat.com>
5087
5088 PR c++/16115
5089 * call.c (type_passed_as): Make the invisible reference type
5090 __restrict.
5091 * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
5092 cp_genericize_r. Handle invisible reference lowering.
5093 (is_invisiref_parm): New fn.
5094 (cp_genericize): Adjust the types of invisible reference parms.
5095 Don't repeat the walk for clones.
5096 * decl.c (store_parm_decls): Don't generate any code for clones.
5097
5098 2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
5099
5100 * cp-tree.h (builtin_function): Declare.
5101
5102 2004-07-16 Mark Mitchell <mark@codesourcery.com>
5103
5104 * class.c (finish_struct_methods): Remove unncessary code.
5105 (add_implicitly_declared_members): Create declarations for default
5106 constructors and copy constructors lazily.
5107 * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
5108 lazy_copy_ctor.
5109 (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
5110 (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
5111 * decl2.c (check_classfn): Robustify.
5112 (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
5113 (locate_ctor): Handle lazy default constructors.
5114 (locate_copy): Handle lazy copy constructors.
5115 (implicitly_declare_fn): Make sure we're looking at the
5116 TYPE_MAIN_VARIANT for a class before creating functions. Don't
5117 set TYPE_HAS_CONSTRUCTOR.
5118 (lazily_declare_fn): New function.
5119 * name-lookup.c (constructor_name_full): Simplify.
5120 * search.c (lookup_fnfields_1): Lazily create methods, as
5121 necessary.
5122 (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
5123
5124 2004-07-16 Steven Bosscher <stevenb@suse.de>
5125
5126 * cp-tree.h (struct lang_type): Don't have three GTY options on a
5127 single bit GTY desc.
5128
5129 2004-07-16 Richard Henderson <rth@redhat.com>
5130
5131 * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
5132 * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
5133 * tree.c (cp_copy_res_decl_for_inlining): Remove.
5134
5135 2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
5136
5137 * class.c (finish_struct_bits): Use for loop.
5138 (propagate_binfo_offsets): Do primary binfo outside of loop.
5139
5140 PR c++/16583
5141 * dump.c (cp_dump_tree): Don't dump the bases if there's no
5142 binfo.
5143
5144 * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
5145
5146 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5147
5148 * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
5149 has_abstract_assign_ref. Make methods a VEC(tree) *.
5150 (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
5151 (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
5152 (CLASSTYPE_DESTRUCTORS): Likewise.
5153 (TYPE_HAS_REAL_ASSIGN_REF): Remove.
5154 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
5155 (add_method): Change prototoype.
5156 * class.c (add_method): Remove error_p parameter. Adjust for
5157 changes to CLASSTYPE_METHOD_VEC.
5158 (handle_using_decl): Adjust call to add_method.
5159 (maybe_warn_about_overly_private_class): Adjust for
5160 changes to CLASSTYPE_METHOD_VEC.
5161 (resort_type_method_vec): Likewise.
5162 (finish_struct_methods): Likewise.
5163 (check_for_override): Likewise.
5164 (warn_hidden): Likewise.
5165 (add_implicitly_declared_members): Defer creation of assignment
5166 operators. Adjust call to add_method.
5167 (clone_function_decl): Adjust call to add_method.
5168 (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
5169 (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
5170 * decl.c (grok_special_member_properties): Don't set
5171 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5172 * decl2.c (check_classfn): Adjust for
5173 changes to CLASSTYPE_METHOD_VEC.
5174 * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
5175 (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
5176 (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
5177 (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
5178 cp_finish_decl.
5179 * pt.c (check_explicit_specialization): Adjust for
5180 changes to CLASSTYPE_METHOD_VEC.
5181 (instantiate_class_template): Do not set
5182 TYPE_HAS_ABSTRACT_ASSIGN_REF.
5183 * ptree.c (cxx_print_type): Don't try to print
5184 CLASSTYPE_METHOD_VEC.
5185 * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
5186 * search.c (lookup_field_r): Adjust for
5187 changes to CLASSTYPE_METHOD_VEC.
5188 (lookup_fnfields): Likewise.
5189 (lookup_conversion_operator): Likewise.
5190 (lookup_fnfields_1): Likewise. Create assignment operators
5191 lazily.
5192 (look_for_overrides_here): Adjust for
5193 changes to CLASSTYPE_METHOD_VEC.
5194 (add_conversions): Likewise.
5195 * semantics.c (finish_member_declaration): Adjust call to add_method.
5196
5197 2004-07-15 Jason Merrill <jason@redhat.com>
5198
5199 * cp-lang.c (cxx_types_compatible_p): To the middle-end,
5200 references and pointers are compatible.
5201
5202 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5203
5204 * decl.c (xref_basetypes): Refactor.
5205 * tree.c (copy_base_binfos): Replace with ...
5206 (copy_binfo): ... this. Deep copy the given binfo, (not the just
5207 bases of the given base).
5208 * cp-tree.h (copy_base_binfo): Remove.
5209 (copy_binfo): Declare.
5210
5211 2004-07-15 Mark Mitchell <mark@codesourcery.com>
5212
5213 * name-lookup.c (set_inherited_value_binding_p): Add class_type
5214 parameter.
5215 (get_class_binding): Adjust.
5216 (push_class_level_binding): Don't use set_inherited_value_binding_p.
5217
5218 2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
5219
5220 * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
5221 * decl.c (xref_basetypes): Set it here.
5222
5223 * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
5224 Don't check for incomplete base.
5225 (get_vfield_name): Simplify while loop.
5226 * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
5227
5228 2004-07-14 Mark Mitchell <mark@codesourcery.com>
5229
5230 * lex.c (cxx_make_type): Remove call to get_pointer_type.
5231
5232 * cp-tree.h (IDENTIFIER_VALUE): Remove.
5233 (BINFO_PUSHDECLS_MARKED): Likewise.
5234 (maybe_inject_for_scope_var): Likewise.
5235 (push_class_decls): Likewise.
5236 * name-lookup.h (push_class_binding): Remove.
5237 (innermost_non_namespace_value): New function.
5238 (outer_binding): Likewise.
5239 * class.c (add_method): Push bindings before adding to
5240 TYPE_METHODS.
5241 (restore_class_cache): Do not restore class_shadowed.
5242 (pushclass): Do not add USING_DECLs. Do not call
5243 push_class_decls.
5244 * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
5245 * decl.c (pushdecl): Use outer_binding.
5246 (poplevel): Set the scope for an out-of-scope for-loop declaration
5247 appropriately.
5248 (cp_finish_decl): Don't call maybe_inject_for_scope_var.
5249 * name-lookup.c (new_class_binding): New function.
5250 (push_binding): Use it.
5251 (pushdecl): Use innermost_non_namespace_value.
5252 (maybe_inject_for_scope_var): Remove.
5253 (push_class_binding): Remove.
5254 (set_inherited_value_binding_p): New function.
5255 (get_class_binding): New function.
5256 (push_class_level_binding): Assert that the current_class_type is
5257 being defined.
5258 (outer_binding): New function.
5259 (innermost_non_namespace_value): Likewise.
5260 (lookup_name_real): Use outer_binding.
5261 (lookup_name_current_level): Ignore out-of-scope variables.
5262 * pt.c (check_template_shadow): Use innermost_non_namespace_value.
5263 (lookup_template_class): Likewise.
5264 * search.c (dfs_push_type_decls): Remove.
5265 (dfs_push_decls): Likewise.
5266 (setup_class_bindings): Likewise.
5267 (lookup_field_1): Handle USING_DECLs from dependent scopes.
5268 (marked_pushdecls_p): Remove.
5269 (unmarked_pushdecls_p): Remove.
5270 (marked_identifiers): Remove.
5271 (setup_class_bindings): Remove.
5272 (dfs_push_type_decls): Remove.
5273 (dfs_push_decls): Remove.
5274 (push_class_decls): Remove.
5275
5276 2004-07-13 Mark Mitchell <mark@codesourcery.com>
5277
5278 PR c++/16518
5279 PR c++/16337
5280 * decl.c (grokvardecl): Make declspecs parameter const.
5281 (grokdeclarator): Likewise. Adjust accordingly.
5282 * decl.h (grokdeclarator): Adjust declaration.
5283 * parser.c (cp_parser_init_declarator): Do not clear
5284 decl_specifiers->attributes.
5285
5286 * cp-tree.h (lang_identifier): Remove class_value.
5287 (IDENTIFIER_CLASS_VALUE): Remove.
5288 (pop_class_decls): Likewise.
5289 (init_search_processing): Likewise.
5290 * class.c (handle_using_decl): Use lookup_member, not
5291 IDENTIFIER_CLASS_VALUE.
5292 (restore_class_cache): New function, split out from ...
5293 (pushclass): ... here. Do not call clear_identifier_class_values.
5294 (invalidate_class_lookup_cache): Do not clear
5295 IDENTIFIER_CLASS_VALUE.
5296 (popclass): Do not call pop_class_decls.
5297 (maybe_note_name_used_in_class): Do not save names looked up after
5298 the class is complete. Use lookup_member, not
5299 IDENTIFIER_CLASS_VALUE.
5300 * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
5301 * decl.c (cxx_init_decl_processing): Do not call
5302 init_search_processing.
5303 * method.c (do_build_copy_constructor): Remove unnecessary code.
5304 (do_build_assign_ref): Likewise.
5305 * name-lookup.c (pushdecl): Use lookup_member, not
5306 IDENTIFIER_CLASS_VALUE.
5307 (set_identifier_type_value_with_scope): Set TREE_TYPE on the
5308 type_shadowed list.
5309 (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
5310 (push_class_binding): Do not set it.
5311 (clear_identifier_class_values): Remove.
5312 (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
5313 (store_binding): Do not save it.
5314 (pop_from_top_level): Do not restore it.
5315 * name-lookup.h (cxx_saved_binding): Remove class_value.
5316 (clear_identifier_class_values): Remove.
5317 * ptree.c (cxx_print_identifier): Do not print
5318 IDENTIFIER_CLASS_VALUE.
5319 * search.c (search_obstack): Remove.
5320 (push_stack_level): Remove.
5321 (pop_stack_level): Remove.
5322 (search_level): Remove.
5323 (search_stack): Remove.
5324 (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
5325 (setup_class_bindings): Use IDENTIFIER_MARKED, not
5326 IDENTIFIER_CLASS_VALUE.
5327 (marked_identifiers): New variable.
5328 (push_class_decls): Clear IDENTIFIER_MARKED.
5329 (pop_class_decls): Don't call pop_search_level.
5330 (init_search_processing): Remove.
5331
5332 2004-07-12 Mark Mitchell <mark@codesourcery.com>
5333
5334 * cp-tree.h (get_aggr_typedef): Remove.
5335 * init.c (get_aggr_typedef): Likewise.
5336
5337 * name-lookup.c (push_class_level_binding): Simplify.
5338
5339 2004-07-12 Andrew Pinski <apinski@apple.com>
5340
5341 PR c++/16475
5342 Revert:
5343 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5344 PR c++/16276
5345 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5346 is not public.
5347
5348 2004-07-12 Eric Christopher <echristo@redhat.com>
5349
5350 * parser.c (cp_parser_class_head): Remove unused variable.
5351
5352 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5353
5354 * decl.c (grok_op_properties): Reject [de-]allocation functions
5355 declared in a namespace, or declared as static.
5356
5357 2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
5358
5359 * cp-tree.h (make_binfo): Remove.
5360 * decl.c (xref_basetypes): Use make_tree_binfo directly.
5361 * tree.h (copy_base_binfos): Likewise.
5362 (make_binfo): Remove.
5363
5364 * call.c (build_user_type_conversion_1, build_new_op,
5365 check_constructor_callable, build_temp,
5366 perform_direct_initialization_of_possible): Pass type directly to
5367 lookup_fnfields & build_special_member_call.
5368 (build_special_member_call): Accept a type, and complete it.
5369 * class.c (finish_stuct_bits): Copy the BINFOs here.
5370 * cvt.c (ocp_convert): Pass type directly to
5371 build_special_member_call.
5372 * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
5373 (xref_basetypes): Allocate the binfo here. Adjust.
5374 * init.c (build_init, build_new_1): Pass type directly to
5375 build_special_member_call.
5376 * lex.c (cxx_make_type): Do not allocate binfo here.
5377 * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
5378 * parser.c (cp_parser_class_head): Always call xref_basetypes.
5379 * pt.c (instantiate_class_template): Likewise. Inhibit access
5380 checking for template friends.
5381 * ptree.c (cxx_print_type): Adjust record printing.
5382 * search.c (lookup_base): When taking a type, complete it before
5383 looking for a binfo.
5384 (lookup_member): Delay completing a type.
5385 (push_class_decls): Don't walk an incomplete type.
5386 (lookup_conversions): Likewise.
5387 * semantics.c (finish_stmt_expr_expr): Pass type directly to
5388 build_special_member_call.
5389 * tree.c (copy_base_binfos): Adjust.
5390 (make_binfo): Likewise.
5391 * typeck.c (build_modify_expr): Pass type directly to
5392 build_special_member_call.
5393 * typeck2.c (process_init_constructor): Check a binfo exists.
5394 (build_m_component_ref): Allow accessing an incomplete type.
5395 (build_functional_cast): Pass type directly to
5396 build_special_member_call.
5397
5398 2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5399
5400 PR c++/2204
5401 * config-lang.in (gtfiles): Add typeck2.c.
5402 * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
5403 gt-cp-typeck2.h.
5404 * cp-tree.h: Declare complete_type_check_abstract.
5405 * typeck2.c (pat_calc_hash, pat_compare,
5406 complete_type_check_abstract): New functions.
5407 (abstract_virtuals_error): If the type is abstract, register the
5408 declaration within abstract_pending_vars for further checks.
5409 Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
5410 * decl.c (cp_finish_decl): Do not strip array types.
5411 (create_array_type_for_decl): Check for abstractness of the element
5412 type.
5413 (complete_vars): Call complete_type_check_abstract.
5414 * class.c (finish_struct): Prepare a list of virtual functions for
5415 template types, and call complete_vars on it to check for abstractness.
5416
5417 2004-07-12 Paolo Bonzini <bonzini@gnu.org>
5418
5419 PR tree-optimization/14107
5420 * decl.c (finish_function): Remove temporary band-aid.
5421
5422 2004-07-11 Mark Mitchell <mark@codesourcery.com>
5423
5424 * call.c (build_operator_new_call): Avoid using push_to_top_level.
5425 (build_new_op): Adjust call to lookup_function_nonclass.
5426 * name-lookup.c (identifier_type_value): Adjust call to
5427 lookup_name_real.
5428 (lookup_name_real): Add block_p parameter.
5429 (lookup_name_nonclass): Adjust call to lookup_name_real.
5430 (lookup_function_nonclass): Likewise.
5431 (lookup_name): Likewise.
5432 * name-lookup.h (lookup_name_real): Change prototype.
5433 (lookup_name_nonclass): Likewise.
5434 * parser.c (cp_parser_lookup_name): Likewise.
5435
5436 * cp-tree.h (saved_scope): Make old_bindings a vector.
5437 (unuse_fields): Remove.
5438 * name-lookup.h (cxx_saved_binding): Define it.
5439 * class.c (pushclass): Don't use unuse_fields.
5440 * name-lookup.c (cxx_saved_binding_make): Remove.
5441 (store_binding): Add new bindings to a vector, using an
5442 accumulator style, rather than adding them to a list.
5443 (store_bindings): Adjust accordingly.
5444 (store_class_bindings): Likewise.
5445 (push_to_top_level): Likewise.
5446 (pop_from_top_level): Likewise.
5447 * optimize.c (maybe_clone_body): Must push_to_top_level and
5448 pop_from_top_level calls outside of loop.
5449 * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope
5450 calls here from cp_parser_late_parsing_default_args.
5451 (cp_parser_save_default_args): Record the class type in which the
5452 function is declared.
5453 (cp_parser_late_parsing_default_args): Do not call
5454 push_nested_class/pop_nested_class.
5455 * search.c (dfs_unuse_fields): Remove.
5456 (unuse_fields): Remove.
5457
5458 2004-07-11 Joseph S. Myers <jsm@polyomino.org.uk>
5459
5460 * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP, LANG_HOOKS_PUSHLEVEL,
5461 LANG_HOOKS_POPLEVEL, LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Remove.
5462 * cp-tree.h (poplevel): Declare.
5463 (set_block): Remove.
5464 * decl.c (set_block): Remove.
5465
5466 2004-07-10 Mike Stump <mrs@apple.com>
5467
5468 * decl2.c (import_export_class): Never export/import vtables
5469 with inline key functions.
5470
5471 2004-07-09 Steven Bosscher <stevenb@suse.de>
5472
5473 * typeck.c (c_expand_asm_operands): Remove.
5474
5475 2004-07-09 Mike Stump <mrs@apple.com>
5476
5477 * typeck.c (build_class_member_access_expr): Skip null deref
5478 warning when we don't dereference it.
5479
5480 2004-07-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5481
5482 PR c++/8211
5483 PR c++/16165
5484 * class.c (check_field_decls): Improve -Weffc++ warning: do not
5485 warn for pointers to functions/members, or for classes without
5486 destructors.
5487
5488 2004-07-08 Mark Mitchell <mark@codesourcery.com>
5489
5490 * name-lookup.h (struct cp_binding_level): Update documentation
5491 for class_shadowed.
5492
5493 2004-07-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5494
5495 PR c++/16169
5496 * typeck.c (check_return_expr): Improve -Weffc++ warning: handle
5497 returning CALL_EXPR, and non-reference return type.
5498
5499 2004-07-08 Nathan Sidwell <nathan@codesourcery.com>
5500
5501 * name-lookup.c (push_binding): Use VEC_reserve.
5502
5503 2004-07-08 Richard Henderson <rth@redhat.com>
5504
5505 * cp-tree.h (expand_eh_spec_block): Remove.
5506
5507 2004-07-07 Mark Mitchell <mark@codesourcery.com>
5508
5509 * cp-tree.h (saved_scope): Remove x_previous_class_type and
5510 x_previous_class_values; add x_previous_class_level.
5511 (previous_class_type): Remove.
5512 (previous_class_values): Remove.
5513 (previous_class_level): New macro.
5514 * class.c (pushclass): Restore the identifier cache more
5515 expeditiously.
5516 (invalidate_class_lookup_cache): Use vector for class_shadowed and
5517 previous_class_values.
5518 * decl.c (poplevel): Likewise.
5519 * name-lookup.c (cxx_binding_init): New function.
5520 (cxx_binding_make): Use it.
5521 (push_binding): For a binding in a class level, use a vector of
5522 cp_class_binding nodes.
5523 (push_binding_level): New function.
5524 (begin_scope): Use it.
5525 (leave_scope): Do not put class binding levels on the free list.
5526 (print_binding_level): Adjust for the fact that class_shadowed is
5527 a vector.
5528 (poplevel_class): Likewise.
5529 (clear_identifier_class_values): Likewise.
5530 (push_class_level_binding): Likewise.
5531 (set_class_shadows): Remove.
5532 (store_binding): New function.
5533 (store_class_bindings): New function.
5534 (push_to_top_level): Use store_class_bindings as appropriate.
5535 (pop_from_top_level): Use previous_class_level, not
5536 previous_class_type.
5537 * name-lookup.h (cp_class_binding): New type.
5538 (cp_binding_level): Use a vector object for class_shadowed.
5539 (push_binding_level): Declare.
5540 (set_class_shadows): Remove.
5541
5542 2004-07-07 Andrew Pinski <apinski@apple.com>
5543
5544 * class.c (instantiate_type): BUFFER_REF is dead.
5545 * lex.c (init_operators): IN_EXPR is dead.
5546
5547 2004-07-07 Jason Merrill <jason@redhat.com>
5548
5549 PR c++/16334
5550 * call.c (build_new_op): Give overload warnings for built-in
5551 candidates.
5552
5553 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
5554
5555 PR c++/16276
5556 * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
5557 is not public.
5558
5559 2004-07-07 Nathan Sidwell <nathan@codesourcery.com>
5560
5561 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Remove.
5562 * class.c (build_primary_vtable, check_bases,
5563 determine_primary_base, finish_struct_bits,
5564 maybe_warn_about_overly_private_class, dfs_find_final_overrider_q,
5565 get_basefndecls, warn_hidden, walk_subobject_offsets,
5566 build_base_fields, create_vtable_ptr, propagate_binfo_offsets,
5567 layout_virtual_bases, end_of_class, warn_about_ambiguous_bases,
5568 finish_struct_1, get_vfield_name, contains_empty_class_p,
5569 dump_class_hierarchy_r, finish_vtbls, build_vtt_inits,
5570 dfs_ctor_vtable_bases_queue_p, accumulate_vtbl_inits,
5571 add_vcall_offset_vtbl_entries_r, cp_fold_obj_type_ref): Adjust
5572 BINFO macros.
5573 * decl.c (xref_basetypes): Likewise.
5574 * dump.c (cp_dump_tree): Likewise.
5575 * error.c (dump_expr): Likewise.
5576 * init.c (sort_mem_initializers, expand_member_init,
5577 push_base_cleanups): Likewise.
5578 * method.c (do_build_copy_constructor, do_build_assign_reg,
5579 synthesize_exception_spec): Likewise.
5580 * name-lookup.c (arg_assoc_class): Likewise.
5581 * pt.c (instantiate_class_template, tsubst,
5582 get_template_base_recursive): Likewise.
5583 * ptree.c (cxx_print_type): Likewise.
5584 * rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
5585 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5586 dfs_access_in_type, access_in_type, lookup_field_queue_p,
5587 bfs_walk, dfs_walk_real, look_for_overrides, markedp, unmarkedp,
5588 marked_pushdecls_p, unmarked_pushdecls_p, dfs_debug_markedp,
5589 dfs_debug_unmarkedp, dfs_check_overlap, dfs_no_overlap_yet,
5590 binfo_for_vtable, copied_binfo, original_binfo): Likewise
5591 * tree.c (copy_base_binfos, make_binfo): Likewise.
5592 * typeck.c (commmon_base_type): Likewise
5593 * typeck2.c (process_init_constructor): Likewise
5594
5595 2004-07-06 Joseph S. Myers <jsm@polyomino.org.uk>
5596
5597 * decl.c (check_tag_decl): Name redeclared type in diagnostic.
5598
5599 2004-07-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5600
5601 PR c++/3671
5602 * pt.c (convert_nontype_argument): Disallow conversions between
5603 different enumeration types.
5604
5605 2004-07-06 Nathan Sidwell <nathan@codesourcery.com>
5606
5607 * cp-tree.h (BINFO_MARKED): Remove.
5608 (BINFO_VTABLE_PATH_MARKED, BINFO_NEW_VTABLE_MARKED,
5609 BINFO_DEPENDENT_BASE_P, BINFO_LOST_PRIMARY_P,
5610 BINFO_INDIRECT_PRIMARY_P): Use appropriate BINFO_FLAG_n.
5611 (SET_BINFO_NEW_VTABLE_MARKED): Use BINFO_VIRTUAL_P.
5612 * class.c (build_base_path): Use BINFO_VIRTUAL_P.
5613 (mark_primary_bases, determine_primary_base, base_derived_from,
5614 dfs_find_final_overrider, dfs_find_final_overrider_q,
5615 dfs_find_inal_overrider_post, update_vtable_entry_for_fn,
5616 dfs_modify_vtables, walk_subobject_offsets,
5617 layout_nonempty_base_or_field, build_base_field,
5618 build_base_fields, propagate_binfo_offsets, layout_virtual_bases,
5619 end_of_class, get_vfield_name, dump_class_hierarchy, dump_vtable,
5620 finish_vtbls, build_vtt_inits, dfs_build_secondary_vptr_vtt_inits,
5621 build_ctor_vtbl_group, accumulate_vtble_inits,
5622 dfs_accumulate_vtbls_inits, build_vbase_offset_vtbl_entries,
5623 build_vcall_offset_vtbl_entries, add_vcall_offset_vtbl_entries_r,
5624 add_vcall_offset_vtbl_entries_1): Likewise.
5625 * decl.c (xref_basetypes): Incomming virtual base indicated by
5626 TREE_TYPE. Adjust.
5627 * dump.c (cp_dump_tree): Use BINFO_VIRTUAL_P.
5628 * init.c (finish_init_stmts, sort_mem_initializers,
5629 emit_mem_initializers, build_vtble_address, expand_member_init,
5630 push_base_cleanups): Likewise.
5631 * method.c (do_build_copy_constructor): Likewise.
5632 * pt.c (instantiate_class_template,
5633 get_template_base_recursive): Likewise.
5634 * rtti.c (dfs_class_hint_mark, get_pseudo_ti_init,
5635 get_pseudo_ti_desc): Likewise.
5636 * search.c (lookup_base_r, dynamic_cast_base_recurse,
5637 binfo_from_vbase, binfo_via_virtual, copied_binfo,
5638 original_binfo): Likewise.
5639 * semantics.c (finish_base_specifier): Virtualness is indicated
5640 by TREE_TYPE.
5641 * tree.c (copy_base_binfos): Use BINFO_VIRTUAL_P.
5642
5643 2004-07-06 Mark Mitchell <mark@codesourcery.com>
5644
5645 Revert:
5646 2004-06-24 Jason Merrill <jason@redhat.com>
5647 PR c++/16115
5648 * decl.c (grokparms): Give the PARM_DECL reference type if the
5649 parameter is passed by invisible reference.
5650
5651 2004-07-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5652
5653 * cp-lang.c (cp_var_mod_type_p): Add extra arg.
5654 * decl.c (grokdeclarator): Extra arg to variably_modified_type_p.
5655 * pt.c (check_instantiated_args, unify): Likewise.
5656
5657 2004-07-05 Phil Edwards <phil@codesourcery.com>
5658
5659 * Make-lang.in (check-c++, lang_checks): Add some comments.
5660
5661 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5662
5663 * cp-mudflap.c: Delete file.
5664 * Makefile.in: Remove all references to cp-mudflap.o.
5665
5666 2004-07-05 Zack Weinberg <zack@codesourcery.com>
5667
5668 * decl.c (cxx_init_decl_processing): Call
5669 build_common_tree_nodes before creating the global NAMESPACE_DECL.
5670
5671 2004-07-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5672
5673 PR c++/2518
5674 * call.c (build_operator_new_call): Look only at global scope.
5675
5676 2004-07-05 Nathan Sidwell <nathan@codesourcery.com>
5677
5678 * call.c (enforce_access): Expect TREE_BINFO.
5679 * class.c (binfo_ctor_vtable): Check TREE_BINFO.
5680 * cp-tree.h (RECORD_OR_UNION_TYPE_CHECK): Remove.
5681 (BINFO_SUBVTT_INDEX, BINFO_VPTR_INDEX, BINFO_PRIMARY_BASE_OF):
5682 Adjust.
5683 (BINFO_LANG_ELTS): Remove.
5684 (BINFO_LANG_SLOTS): New.
5685 (TYPE_RAISES_EXCEPTIONS, ENUM_TEMPLATE_INFO): Use TYPE_LANG_SLOT_1.
5686 (CLASSTYPE_TEMPLATE_INFO): Adjust.
5687 * pt.c (tsubst): Split TREE_BINFO case from TREE_VEC case.
5688 * search.c (lookup_member): Check TREE_BINFO.
5689 * semantics.c (perform_or_defer_access_check): Likewise.
5690 (check_accessibility_of_qualified_id): Check
5691 deferred_access_no_check.
5692 * tree.c (make_binfo): Use make_tree_binfo.
5693
5694 2004-07-04 Mark Mitchell <mark@codesourcery.com>
5695
5696 * method.c (implicitly_declare_fn): Set linkage of generated
5697 functions.
5698
5699 2004-07-04 Richard Henderson <rth@redhat.com>
5700
5701 * typeck.c (cxx_mark_addressable): Don't put_var_into_stack.
5702
5703 2004-07-03 Scott Brumbaugh <scottb.lists@verizon.net>
5704
5705 PR c++/3761
5706 * name-lookup.c (push_class_level_binding): Don't pass a
5707 TREE_LIST of ambiguous names to check_template_shadow as it
5708 only handles declarations. Instead, pull the declaration
5709 out and pass that.
5710
5711 2004-07-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5712
5713 PR c++/14971
5714 * pt.c (check_explicit_specialization): Clarify error message.
5715
5716 2004-07-02 Richard Henderson <rth@redhat.com>
5717
5718 * tree.c (cp_unsave_r): Update remap_save_expr call.
5719
5720 2004-07-02 Mark Mitchell <mark@codesourcery.com>
5721
5722 PR c++/16240
5723 * mangle.c (write_template_arg): Correct mangling.
5724
5725 PR c++/16297
5726 * decl.c (grokdeclarator): Robustify.
5727
5728 2004-07-01 Richard Henderson <rth@redhat.com>
5729
5730 * class.c (fixed_type_or_null): Don't handle RTL_EXPR.
5731 * method.c (synthesize_method): Don't clear_last_expr.
5732 * name-lookup.c (maybe_push_cleanup_level): Likewise.
5733
5734 2004-07-01 Nick Clifton <nickc@redhat.com>
5735
5736 * decl2.c (import_export_class): Invoke the
5737 import_export_class field in the gcc_target structure if it is not
5738 empty.
5739
5740 2004-06-30 Richard Henderson (rth@redhat.com>
5741
5742 * decl.c (start_preparsed_function): Don't set immediate_size_expand.
5743 * method.c (use_thunk): Likewise.
5744
5745 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5746
5747 * call.c (build_over_call), typeck.c (build_function_call): Call
5748 check_function_arguments instead of check_function_format.
5749
5750 2004-06-30 Joseph S. Myers <jsm@polyomino.org.uk>
5751
5752 * call.c (build_over_call), typeck.c (build_function_call): Update
5753 calls to check_function_format.
5754
5755 2004-06-30 Richard Henderson <rth@redhat.com>
5756
5757 * call.c (build_over_call): Use __builtin_memcpy for copying
5758 CLASS_AS_BASE rather than funny casting.
5759
5760 2004-06-30 Richard Henderson <rth@redhat.com>
5761
5762 * init.c (build_new_1): Fill in TYPE_DOMAIN, TYPE_SIZE and
5763 TYPE_SIZE_UNIT of full_type.
5764
5765 2004-06-30 Per Bothner <per@bothner.com>
5766
5767 Conditionally compile support for --enable-mapped_location.
5768 * decl.c (pop_label): Handle (imperfectly) USE_MAPPED_LOCATION case.
5769 * decl2.c: If USE_MAPPED_LOCATION, don't do some line number
5770 adjustments - which I don't understand.
5771 * error.c (dump_decl): Rename "<interrnal>" to "<built-in>".
5772 * error.c: Use LOCATION_FILE and EXPR_LOCATION macros.
5773 (print_instantiation_partial_context): Use expand_location.
5774 * decl.c (duplicate_decl): Use new DECL_IS_BUILTIN macro.
5775 * name-lookup.c: Likewise.
5776 * lex.c (cxx_init): Likewise. Also use BUILTINS_LOCATION.
5777 * name-lookup.c: Use input_line macro.
5778 * parser.c (cp_lexer_get_preprocessor_token): Use UNKNOWN_LOCATION.
5779 (cp_parser_statement): Rename locaal variable statement_locus to
5780 statement_location and use SET_EXPR_LOCATION macro.
5781 * pt.c: Handle USE_MAPPED_LOCATION case. Use new macros.
5782 * tree.c (cp_walk_subtrees): Likewise.
5783
5784 2004-06-29 Per Bothner <per@bothner.com>
5785
5786 * tree.c (build_min_nt, build_min, build_min_non_dep):
5787 Don't set TREE_COMPLEXITY from input_line.
5788
5789 2004-06-29 Paul Brook <paul@codesourcery.com>
5790
5791 * init.c: Include target.h.
5792 (get_cookie_size): Remove and replace with target hook.
5793 Update callers.
5794 (build_new_1): Store the element size in the cookie.
5795
5796 2004-06-29 Nathan Sidwell <nathan@codesourcery.com>
5797
5798 PR c++/16260
5799 * parser.c (cp_parser_template_declaration_after_export): Disable
5800 access checks here ...
5801 (cp_parser_class_specifier): ... not here.
5802
5803 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5804
5805 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK,
5806 VAR_FUNCTION_OR_PARM_DECL_CHECK, RECORD_OR_UNION_TYPE_CHECK,
5807 BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Use appropriate
5808 TREE_CHECK macro.
5809
5810 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5811
5812 * cp-tree.h (struct deferred_access): Move to ...
5813 * semantics.c (struct deferred_access): ... here. Adjust.
5814 (deferred_access_stack): Make a VEC(deferred_access),
5815 (deferred_access_free_list): Remove.
5816 (deferred_access_no_check): New.
5817 (push_deferring_access_checks, resume_deferring_access_checks,
5818 stop_deferring_access_checks, pop_deferring_access_checks,
5819 get_deferred_access_checks, pop_to_parent_deferring_access_checks,
5820 perform_deferred_access_checks, perform_or_defer_access_check): Adjust.
5821
5822 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5823
5824 PR c++/16174
5825 * call.c (build_temp): Declare.
5826 (check_constructor_callable): New.
5827 (reference_binding): Only set CHECK_COPY_CONSTRUCTOR if not for
5828 CONSTRUCTOR_CALLABLE.
5829 (convert_like_real, initialize_reference): Use
5830 check_constructor_callable.
5831 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): New.
5832 (LOOKUP_*): Renumber.
5833
5834 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5835
5836 * friend.c (add_friend): Only perform access checks when context
5837 is a class.
5838 * lex.c (cxx_make_type): Only create a binfo for aggregate types.
5839 * parser.c (cp_parser_class_specifier): Disable access checks here
5840 when parsing the body of a templated class.
5841 * semantics.c (perform_or_defer_access_checks): Reorder to allow
5842 NULL binfos when not checking access.
5843
5844 2004-06-28 Nathan Sidwell <nathan@codesourcery.com>
5845
5846 Use vector API for vbase list.
5847 * cp-tree.h: Include vec.h
5848 (DEF_VEC_P (tree)): New type.
5849 (struct lang_type_class): Change vbase's member type.
5850 (binfo_for_vbase): Declare.
5851 * class.c (determine_primary_base, base_derived_from,
5852 update_vtable_entry_for_fn, walk_subobject_offsets, end_of_class,
5853 warn_about_ambiguous_bases, dfs_accumulate_vtbl_inits,
5854 build_vtbl_initializer): Adjust.
5855 * decl.c (xref_basetypes): Adjust, accumulate upper bound of
5856 vbases.
5857 * init.c (sort_mem_initializers, expand_member_init,
5858 push_base_cleanups): Adjust.
5859 * method.c (do_build_copy_constructor): Adjust.
5860 * search.c (get_pure_virtuals, copied_binfo, original_binfo): Adjust.
5861 (binfo_for_vbase): New.
5862 * tree.c (copy_base_binfos): Adjust.
5863
5864 2004-06-28 Mark Mitchell <mark@codesourcery.com>
5865
5866 * parser.c (cp_parser_set_decl_spec_type): Fix thinko.
5867
5868 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5869
5870 PR c++/14123
5871 * cxx-pretty-print.c (pp_cxx_ptr_operator): Properly put
5872 paranthesis in case of pointers to array members.
5873 * error.c (dump_type_prefix): Likewise.
5874 (dump_type_suffix): Maybe issue a whitespace when printing
5875 ARRAY_TYPE.
5876
5877 2004-06-27 Mark Mitchell <mark@codesourcery.com>
5878
5879 PR c++/16193
5880 * parser.c (cp_parser_set_decl_spec_type): Refine test for
5881 redefinition of built-in types.
5882
5883 2004-06-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
5884
5885 * error.c (pp_template_argument_list_start): Remove.
5886 (pp_template_argument_list_end): Likewise.
5887 (pp_separate_with_comma): Use pp_cxx_separate_with.
5888 (reinit_global_formatting_buffer): Remove.
5889 (pp_non_consecutive_character): Likewise.
5890 (dump_scope): Use pp_cxx_colon_colon.
5891 (dump_template_parameter): Use pp_cxx_identifier,
5892 pp_cxx_tree_identifier and pp_cxx_whitespace.
5893 (dump_templat_bindings): Replace use of pp_string with sequence
5894 of pp_cxx_whitespace and pp_equal.
5895 (dump_type): Use pp_cxx_identifier, pp_cxx_tree_identifier,
5896 pp_cxx_colon_colon, pp_cxx_whitespace throughout. Don't set
5897 padding here.
5898 (dump_aggr_type): Use pp_cxx_identifier amd pp_cxx_tree_identifier.
5899 (dump_type_prefix): Don't set padding. Use pp_cxx_whitespace,
5900 pp_cxx_left_parent, pp_cxx_colon_colon and pp_cxx_star troughout.
5901 (dump_type_suffix): Use pp_cxx_right_paren, pp_cxx_left_bracket,
5902 pp_cxx_right_bracket, pp_cxx_identifier throughout,
5903 (dump_decl): Likewise.
5904 (dump_template_decl): Likewise.
5905 (dump_function_decl): Likewise. Set padding as appropriate.
5906 (dump_parameters): Use pp_cxx_left_paren, pp_cxx_identifier and
5907 pp_cxx_right_paren.
5908 (dump_exception_spec): Likewise.
5909 (dump_function_name): Use pp_cxx_tree_identifier and
5910 pp_cxx_identifier.
5911 (dump_template_parms): Use pp_cxx_begin_template_argument_list and
5912 pp_cxx_end_template_argument_list.
5913 (dump_expr): Use pp_cxx_left_paren, pp_cxx_right_paren,
5914 pp_cxx_colon_colon, pp_cxx_identifier, pp_cxx_tree_identifier and
5915 pp_cxx_whitespace throughout.
5916 (dump_binary_op): Use pp_cxx_whitespace, pp_cxx_left_paren and
5917 pp_cxx_right_paren.
5918 (dump_unary_op): Likewise.
5919 (reinit_cxx_pp): New function.
5920 (type_as_string); Use it.
5921 (expr_as_string): Likewise.
5922 (decl_as_string); Likewise.
5923 (context_as_string): Likewise.
5924 (lang_decl_name): Likewise.
5925 (decl_to_string): Likewise.
5926 (expr_to_string): Likewise.
5927 (parm_to_string): Likewise.
5928 (type_to_string): Likewise.
5929 (args_to_string): Likewise.
5930 (cv_to_string): Likewise.
5931
5932 2004-06-26 Mark Mitchell <mark@codesourcery.com>
5933
5934 * cp-tree.h (cp_cv_quals): New type.
5935 (cp_declarator): Use it instead of "tree" as appropriate.
5936 (grok_method_quals): Adjust prototype.
5937 (grokclassfn): Likewise.
5938 (do_friend): Likewise.
5939 * decl.c (grokfndecl): Use cp_cv_quals, not tree.
5940 (grokdeclarator): Likewise.
5941 * decl2.c (grok_method_quals): Likewise.
5942 (grokclassfn): Likewise.
5943 * friend.c (do_friend): Likewise.
5944 * method.c (implicitly_declare_fn): Adjust call to grokclassfn.
5945 * parser.c (make_call_declarator): Use cp_cv_quals, not tree.
5946 (make_pointer_declarator): Likewise.
5947 (make_reference_declarator): Likewise.
5948 (make_ptrmem_declarator): Likewise.
5949 (cp_parser_ptr_operator): Likewise.
5950 (cp_parser_cv_qualifier_seq_opt): Likewise.
5951 (cp_parser_cv_qualifier_opt): Remove.
5952 (cp_parser_new_declarator_opt): Adjust call to
5953 cp_parser_ptr_operator.
5954 (cp_parser_conversion_declaration_opt): Likewise.
5955 (cp_parser_declarator): Use cp_cv_quals, not tree.
5956 (cp_parser_direct_declarator): Likewise.
5957
5958 2004-06-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5959
5960 * call.c, cp-tree.h, cxx-pretty-print.c, decl.c, decl2.c:
5961 Rename DECL_STMT to DECL_EXPR.
5962 * init.c, name-lookup.c, parser.c, pt.c, semantics.c: Likewise.
5963 * cp-lang.c (LANG_HOOKS_SAFE_FROM_P): Deleted.
5964 * tree.c (cp_walk_subtrees): Don't call c_walk_subtrees.
5965
5966 2004-06-26 Jan Hubicka <jh@suse.cz>
5967
5968 PR C++/14865
5969 * decl2.c (maybe_emit_vtables): Always import_export_vtable for the
5970 reachability analysis.
5971
5972 2004-06-25 Mark Mitchell <mark@codesourcery.com>
5973
5974 * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
5975 2004-06-23 change.
5976
5977 2004-06-25 Paul Brook <paul@codesourcery.com>
5978
5979 * decl2.c (get_guard): Call targetm.cxx.guard_type.
5980 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
5981
5982 2004-06-24 Mark Mitchell <mark@codesourcery.com>
5983
5984 * decl.c (grokdeclarator): Restore error messages about __thread.
5985 * parser.c (cp_parser_decl_specifier_seq): Likewise.
5986
5987 2004-06-24 Jason Merrill <jason@redhat.com>
5988
5989 PR c++/16115
5990 * decl.c (grokparms): Give the PARM_DECL reference type if the
5991 parameter is passed by invisible reference.
5992
5993 2004-06-24 Andreas Schwab <schwab@suse.de>
5994
5995 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
5996
5997 2004-06-23 Mark Mitchell <mark@codesourcery.com>
5998
5999 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
6000 (cp/decl.o): Likewise.
6001 (cp/decl2.o): Likewise.
6002 (cp/pt.o): Likewise.
6003 (cp/semantics.o): Likewise.
6004 * config-lang.in (gtfiles): Do not reference cp/lex.h.
6005 * class.c: Do not include lex.h.
6006 (add_implicitly_declared_members): Do not use
6007 adding_implicit_members.
6008 (check_bases_and_members): Do not talk about grok_x_components.
6009 * cp/cp-tree.h (adding_implicit_members): Remove.
6010 (cp_storage_class): New type.
6011 (cp_decl_spec): Likewise.
6012 (cp_decl_specifier_seq): Likewise.
6013 (cp_parameter_declarator): Use it for the decl_specifiers field.
6014 (check_tag_decl): Adjust prototype.
6015 (shadow_tag): Likewise.
6016 (groktypename): Likewise.
6017 (start_decl): Likewise.
6018 (start_function): Likewise.
6019 (start_method): Likewise.
6020 (grok_x_components): Remove.
6021 (grokfield): Adjust prototype.
6022 (grokbitfield): Likewise.
6023 (finish_member_class_template): Remove.
6024 * decl.c: Do not include lex.h.
6025 (adding_implicit_members): Do not define.
6026 (check_tag_decl): Do not use trees to represent decl-specifiers.
6027 (shadow_tag): Likewise.
6028 (groktypename): Likewise.
6029 (start_decl): Likewise.
6030 (grokvardecl): Likewise.
6031 (grokdeclarator): Likewise.
6032 (grokparms): Likewise.
6033 (start_function): Likewise.
6034 (start_method): Likewise.
6035 * decl.h (grokdeclarator): Adjust prototype.
6036 * decl2.c: Do not include lex.h.
6037 (grok_x_components): Remove.
6038 (grokfield): Do not use trees to represent decl-specifiers.
6039 (grokbitfield): Likewise.
6040 * lex.c: Do not include lex.h.
6041 * lex.h: Remove.
6042 * parser.c: Include target.h.
6043 (clear_decl_specs): New function.
6044 (cp_parser_translation_unit): Do not use trees to represent
6045 decl-specifiers.
6046 (cp_parser_postfix_expression): Likewise.
6047 (cp_parser_new_type_id): Likewise.
6048 (cp_parser_condition): Likewise.
6049 (cp_parser_simple_declaration): Likewise.
6050 (cp_parser_decl_specifier_seq): Likewise.
6051 (cp_parser_function_specifier_opt): Likewise.
6052 (cp_parser_conversion_type_id): Likewise.
6053 (cp_parser_template_parameter): Likewise.
6054 (cp_parser_explicit_instantiation): Likewise.
6055 (cp_parser_type_specifier): Likewise.
6056 (cp_parser_simple_type_specifier): Likewise.
6057 (cp_parser_init_declarator): Likewise.
6058 (cp_parser_type_id): Likewise.
6059 (cp_parser_type_specifier_seq): Likewise.
6060 (cp_parser_parameter_declaration): Likewise.
6061 (cp_parser_member_declaration): Likewise.
6062 (cp_parser_exception_declaration): Likewise.
6063 (cp_parser_function_definition_from_specifiers_and_declarator):
6064 Likewise.
6065 (cp_parser_single_declaration): Likewise.
6066 (cp_parser_save_member_function_body): Likewise.
6067 (cp_parser_friend_p): Likewise.
6068 (cp_parser_set_storage_class): New function.
6069 (cp_parser_set_decl_spec_type): Likewise.
6070 * pt.c: Do not include lex.h.
6071 * semantics.c: Likewise.
6072 (finish_member_class_template): Remove.
6073
6074 2004-06-23 Roger Sayle <roger@eyesopen.com>
6075
6076 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
6077 longer take both "args" and "convert_args" as arguments.
6078 (build_op_delete_call): Update call to build_cxx_call.
6079 (build_over_call): Likewise, update call to build_cxx_call.
6080 * cp-tree.h (build_cxx_call): Update funtion prototype.
6081 * typeck.c (build_function_call): Don't call expand_tree_builtin.
6082 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
6083 (throw_bad_typeid): Likewise.
6084 (build_dynamic_cast_1): Likewise.
6085
6086 2004-06-22 Richard Henderson <rth@redhat.com>
6087
6088 * class.c (build_vfn_ref): Take a pointer not object. Build
6089 an OBJ_TYPE_REF.
6090 (cp_fold_obj_type_ref): New.
6091 * call.c (build_over_call): Update build_vfn_ref call.
6092 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
6093 * cp-tree.h (cp_fold_obj_type_ref): Declare.
6094
6095 2004-06-21 Jason Merrill <jason@redhat.com>
6096
6097 PR c++/16112
6098 * cp-gimplify.c (cp_gimplify_init_expr): Look through
6099 CLEANUP_POINT_EXPR.
6100
6101 2004-06-21 Mark Mitchell <mark@codesourcery.com>
6102
6103 * cp-tree.def (NEW_EXPR): Add a fourth slot.
6104 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
6105 (TREE_PARMLIST): Likewise.
6106 (CALL_DECLARATOR_PARMS): Likewise.
6107 (CALL_DECLARATOR_QUALS): Likewise.
6108 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
6109 (cp_declarator_kind): New type.
6110 (cp_parameter_declarator): Likewise.
6111 (cp_declarator): Likewise.
6112 (cp_error_declarator): Likewise.
6113 (no_parameters): Likewise.
6114 (groktypename): Change prototype.
6115 (start_decl): Likewise.
6116 (start_handler_parms): Likewise.
6117 (get_scope_of_declarator): Likewise.
6118 (start_function): Likewise.
6119 (start_preparsed_function): New function.
6120 (start_function): Change prototype.
6121 (start_method): Likewise.
6122 (grokfield): Likewise.
6123 (grokbitfield): Likewise.
6124 (build_new): Likewise.
6125 (make_pointer_declarator): Remove.
6126 (make_reference_declarator): Likewise.
6127 (make_call_declarator): Likewise.
6128 (set_quals_and_spec): Likewise.
6129 (process_template_parm): Change prototype.
6130 (begin_function_definition): Remove.
6131 (finish_parmlist): Remove.
6132 * decl.c (groktypename): Do not use trees to represent
6133 declarators.
6134 (start_decl): Likewise.
6135 (start_handler_parms): Remove.
6136 (get_scope_of_declarator): Reimplement.
6137 (grokdeclarator): Do not use trees to represent declarators.
6138 (grokparms): Likewise.
6139 (start_function): Likewise.
6140 (start_method): Likewise.
6141 (build_void_list_mode): Do not use TREE_PARMLIST.
6142 * decl.h (grokdeclarator): Change prototype.
6143 * decl2.c (grok_method_quals): Robustify.
6144 (grok_x_components): Do not use trees to represent declarators.
6145 (grokfield): Likewise.
6146 (grokbitfield): Likewise.
6147 (start_objects): Build FUNCTION_DECLs, not declarators.
6148 (start_static_storage_duration_function): Likewise.
6149 * init.c (build_new): Simplify.
6150 * lex.c (make_pointer_declarator): Remove.
6151 (make_reference_declarator): Likewise.
6152 (make_call_declarator): Likewise.
6153 (set_quals_and_spec): Likewise.
6154 * method.c (use_thunk): Use start_preparsed_function.
6155 (synthesize_method): Likewise.
6156 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
6157 * optimize.c (maybe_clone_body): Use start_preparsed_function.
6158 * parser.c (cp_error_declarator): New variable.
6159 (declarator_obstack): Likewise.
6160 (alloc_declarator): New function.
6161 (make_declarator): Likewise.
6162 (make_id_declarator): Likewise.
6163 (make_pointer_declarator): Likewise.
6164 (make_reference_declarator): Likewise.
6165 (make_ptrmem_declarator): Likewise.
6166 (make_call_declarator): Likewise.
6167 (make_array_declarator): Likewise.
6168 (no_parameters): New variable.
6169 (make_parameter_declarator): Likewise.
6170 (cp_parser_check_for_definition_in_return_type): Do not use trees
6171 to represent declarators.
6172 (cp_parser_translation_unit): Likewise.
6173 (cp_parser_new_expression): Likewise.
6174 (cp_parser_new_type_id): Likewise.
6175 (cp_parser_new_declarator_opt): Likewise.
6176 (cp_parser_direct_new_declarator): Likewise.
6177 (cp_parser_condition): Likewise.
6178 (cp_parser_declaration_statement): Likewise.
6179 (cp_parser_declaration): Likewise.
6180 (cp_parser_conversion_type_id): Likewise.
6181 (cp_parser_conversion_declarator_opt): Likewise.
6182 (cp_parser_template_parameter_list): Likewise.
6183 (cp_parser_template_parameter): Likewise.
6184 (cp_parser_explicit_instantiation): Likewise.
6185 (cp_parser_init_declarator): Likewise.
6186 (cp_parser_declarator): Likewise.
6187 (cp_parser_direct_declarator): Likewise.
6188 (cp_parser_type_id): Likewise.
6189 (cp_parser_parameter_declaration_clause): Likewise.
6190 (cp_parser_parameter_declaration_list): Likewise.
6191 (cp_parser_parameter_declaration): Likewise.
6192 (cp_parser_member_declaration): Likewise.
6193 (cp_parser_exception_declaration): Likewise.
6194 (cp_parser_check_declarator_template_parameters): Likewise.
6195 (cp_parser_function_definition_from_specifiers_and_declarator):
6196 Likewise.
6197 (cp_parser_save_member_function_body): Likewise.
6198 * pt.c (process_template_parm): Add is_non_type parameter.
6199 (convert_template_argument): Adjust call to groktypename.
6200 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
6201 (tsubst): Do not expect declarators.
6202 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
6203 argument.
6204 (instantiate_decl): Use start_preparsed_function.
6205 * semantics.c (begin_function_definition): Remove.
6206 (finish_parmlist): Remove.
6207 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
6208 declarators.
6209
6210 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6211
6212 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
6213 (build_new_method_call): Likewise.
6214 * decl.c (local_variable_p_walkfn): Don't walk into types.
6215 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
6216 (build_anon_union_vars): Add new operand for COMPONENT_REF.
6217 * init.c (buld_new): Add new operand for ARRAY_REF.
6218 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
6219 (do_build_assign_ref): Likewise.
6220 * parser.c (cp_parser_direct_new_declarator): Add new operands
6221 for ARRAY_REF.
6222 (cp_parser_direct_declarator): Likewise.
6223 * pt.c (tsubst): Likewise.
6224 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
6225 for COMPONENT_REF.
6226 * semantics.c (finish_non_static_data_member): Add new operand
6227 for COMPONENT_REF.
6228 * typeck.c (build_class_member_access_expr): Likewise.
6229 (build_class_member_access_expr, finish_class_member_access_expr):
6230 Likewise.
6231 (build_ptrmemfunc_access_expr): Likewise.
6232 (build_array_ref): Add new operands for ARRAY_REF.
6233 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
6234 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
6235
6236 2004-06-21 Richard Henderson <rth@redhat.com>
6237
6238 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
6239 * parser.c (cp_parser_jump_statement): Update commentary.
6240 * pt.c (tsubst_expr): Use RETURN_EXPR.
6241 * semantics.c (finish_return_stmt): Likewise.
6242 (finalize_nrv_r): Likewise.
6243 * typeck.c, typeck2.c: Update file start commentary.
6244
6245 2004-06-21 Richard Henderson <rth@redhat.com>
6246
6247 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
6248
6249 2004-06-20 Richard Henderson <rth@redhat.com>
6250
6251 * cp-tree.h (add_decl_stmt): Declare.
6252 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
6253 * semantics.c (maybe_cleanup_point_expr): New.
6254 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
6255 finish_for_expr, finish_switch_cond): Use it.
6256 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
6257
6258 2004-06-20 Richard Henderson <rth@redhat.com>
6259
6260 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
6261 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
6262 (cp_gimplify_expr): Call it.
6263 (gimplify_cleanup_stmt): Move from c-gimplify.c.
6264 (cp_genericize): New.
6265 * decl.c (finish_function): Call it.
6266 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
6267 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
6268 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
6269 (cp_genericize): Declare.
6270 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
6271 * dump.c (cp_dump_tree): Likewise.
6272 * semantics.c (push_cleanup): Move from c-semantics.c.
6273
6274 2004-06-20 Zack Weinberg <zack@codesourcery.com>
6275
6276 * cp-lang.c (has_c_linkage): Implement.
6277
6278 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
6279 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
6280 (builtin_function_1): Don't call make_decl_rtl.
6281 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
6282 (grokvardecl): Don't call mangle_decl.
6283 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
6284 DECL_ASSEMBLER_NAME.
6285 * method.c (set_mangled_name_for_decl): Delete.
6286 * name-lookup.c (pushdecl): When a local extern shadows a
6287 file-scope declaration of the same object, give both DECLs the
6288 same DECL_UID.
6289 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
6290 on DECL_ASSEMBLER_NAME.
6291
6292 2004-06-19 Richard Henderson <rth@redhat.com>
6293
6294 * cp-gimplify.c: Remove unnecessary prototypes.
6295 (cp_gimplify_stmt): Merge into ...
6296 (cp_gimplify_expr): ... here. Move to end of file. Handle
6297 stmts_are_full_exprs_p frobbing.
6298 * cp-tree.h (cp_gimplify_stmt): Remove.
6299 * pt.c (tsubst_expr): Merge prep_stmt and unify.
6300 * tree.c (init_tree): Don't set lang_gimplify_stmt.
6301
6302 2004-06-18 Richard Henderson <rth@redhat.com>
6303
6304 PR c++/16034
6305 * semantics.c (begin_cond): New.
6306 (finish_cond): Rewrite to handle template DECL_STMTs specially.
6307 Assume that non-template decls go land before the conditional.
6308 (simplify_loop_decl_cond): Likewise.
6309 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
6310 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
6311 begin_switch_stmt, finish_switch_cond): Update to match.
6312
6313 2004-06-17 Jason Merrill <jason@redhat.com>
6314
6315 PR c++/16015
6316 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
6317 (finish_stmt_expr_expr): Update type after conversions.
6318 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
6319 Handle void initializer.
6320 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
6321
6322 2004-06-17 Geoffrey Keating <geoffk@apple.com>
6323
6324 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
6325 * cp-tree.h (defer_fn): Delete.
6326 * decl2.c (defer_fn): Delete.
6327 (finish_file): Simplify deferred_fns loops; check that
6328 only used inline functions get into deferred_fns.
6329 (mark_used): Inline previous contents of defer_fn.
6330
6331 2004-06-16 Richard Henderson <rth@redhat.com>
6332
6333 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
6334 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
6335 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
6336 of CTOR_INITIALIZER ...
6337 (pp_cxx_statement): ... here.
6338 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
6339 (finish_function): Use alloc_stmt_list to zap entire function.
6340 * parser.c (cp_parser_compound_statement): Update commentary.
6341 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
6342 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
6343 (finish_stmt_expr): Don't look through COMPOUND_STMT.
6344
6345 2004-06-16 Geoffrey Keating <geoffk@apple.com>
6346
6347 * pt.c (mark_decl_instantiated): Don't call defer_fn.
6348
6349 2004-06-16 Richard Henderson <rth@redhat.com>
6350
6351 * parser.c (cp_parser_labeled_statement): Update commentary.
6352 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
6353 * tree.c (mark_local_for_remap_r): Likewise.
6354
6355 2004-06-16 Richard Henderson <rth@redhat.com>
6356
6357 * parser.c (cp_parser_asm_definition): Update commentary.
6358 * pt.c (tsubst_expr): Use ASM_EXPR.
6359 * semantics.c (finish_asm_stmt): Likewise.
6360
6361 2004-06-16 Richard Henderson <rth@redhat.com>
6362
6363 * decl.c (finish_destructor_body): Use LABEL_EXPR.
6364 * parser.c (cp_parser_statement): Update commentary.
6365 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
6366 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
6367 * tree.c (mark_local_for_remap_r): Likewise.
6368
6369 2004-06-16 Richard Henderson <rth@redhat.com>
6370
6371 PR c++/16012
6372 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
6373 statement in FOR_INIT_STMT for templates.
6374
6375 2004-06-15 Richard Henderson <rth@redhat.com>
6376
6377 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
6378 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
6379 (genericize_try_block): Use gimplify_stmt.
6380 (genericize_catch_block, genericize_eh_spec_block): Likewise.
6381 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
6382 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
6383 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
6384 (cp_tree_chain_matters_p): Remove.
6385 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
6386 (COMPOUND_STMT_BODY_BLOCK): New.
6387 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
6388 (EXPR_STMT_STMT_EXPR_RESULT): New.
6389 (building_stmt_tree): Check cur_stmt_list.
6390 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
6391 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
6392 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
6393 (cp_finish_decl): Use push_cleanup.
6394 (start_function, finish_function): Use statement lists.
6395 (finish_stmt): Do nothing.
6396 * except.c (begin_eh_spec_block): Use statement lists.
6397 (check_handlers_1, check_handlers): Likewise.
6398 * init.c (construct_virtual_base): Don't add extra compound stmts.
6399 (build_vec_init): Likewise.
6400 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
6401 * name-lookup.h (struct cp_binding_level): Add statement_list.
6402 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
6403 (cp_parser_labeled_statement, cp_parser_expression_statement,
6404 cp_parser_statement_seq_opt): Likewise.
6405 (cp_parser_compound_statement): Likewise. Take bool for try block.
6406 (cp_parser_selection_statement): Tidy if processing.
6407 (cp_parser_already_scoped_statement): Rewrite to do what it says.
6408 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
6409 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
6410 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
6411 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
6412 (finish_cond): New, rewritten from FINISH_COND.
6413 (simplify_loop_decl_cond): New.
6414 (finish_expr_stmt): Avoid nested EXPR_STMTs.
6415 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
6416 begin_else_clause, finish_else_clause, finish_if_stmt,
6417 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
6418 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
6419 finish_for_cond, finish_for_stmt, begin_switch_stmt,
6420 finish_switch_cond, finish_switch_stmt, begin_try_block,
6421 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
6422 finish_handler_sequence, finish_function_handler_sequence,
6423 begin_handler, finish_handler_parms, finish_handler,
6424 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
6425 using statement lists.
6426 (begin_compound_stmt): Replace has_no_scope argument with flags.
6427 Update all callers. Use statement lists.
6428 (finish_compound_stmt): Likewise.
6429 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
6430 (current_scope_stmt_stack): Remove.
6431 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
6432 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
6433 Rewrite with statement lists.
6434
6435 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
6436
6437 * parser.c: Change all assignments of c_lex_string_translate
6438 to true and false to 1 and 0.
6439 (cp_lexer_read_token): Convert type of the translated string.
6440 (cp_parser_skip_to_closing_parentheses): Preserve original
6441 value of c_lex_string_translate, and set it to -1 while
6442 running.
6443 (cp_parser_cache_group): Likewise.
6444 (cp_parser_cache_group_1): Renamed.
6445 (cp_parser_asm_operand_list): Remove redundant setting of
6446 c_lex_string_translate.
6447 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
6448 Handle chained strings.
6449
6450 2004-06-12 Andrew Pinski <apinski@apple.com>
6451
6452 PR c++/14639
6453 Revert:
6454 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6455
6456 * cp-tree.h: Fix typo.
6457
6458 * cp-tree.h: Include cgraph.h
6459 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6460 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6461
6462 2004-06-12 Jason Merrill <jason@redhat.com>
6463
6464 PR tree-optimization/14107
6465 * decl.c (finish_function): Warn about no return in all functions.
6466
6467 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
6468
6469 * cp-tree.h (struct language_function): Remove cannot_inline.
6470 * decl.c (save_function_data): cannot_inline is no more.
6471 (cxx_push_function_context): Likewise.
6472 * decl2.c (start_objects, start_static_storage_duration_function):
6473 Reset DECL_INLINE, set DECL_UNINLINABLE.
6474
6475 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6476
6477 PR c++/15967
6478 * search.c (lookup_field): Propagate the ambiguity list.
6479 (lookup_fnfields): Likewise.
6480
6481 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6482
6483 PR c++/15947
6484 * parser.c (cp_parser_template_name): Ctors/dtors never need a
6485 template keyword to disambiguate.
6486
6487 2004-06-14 Mark Mitchell <mark@codesourcery.com>
6488
6489 PR c++/15096
6490 * decl.c (grokdeclarator): Ignore pointer-to-members when
6491 computing template depth.
6492
6493 PR c++/14930
6494 * name-lookup.c (pushtag): Do not try to put class declarations in
6495 explicit specialization scopes.
6496
6497 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
6498
6499 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
6500
6501 2004-06-11 Mark Mitchell <mark@codesourcery.com>
6502
6503 PR c++/15862
6504 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
6505 bindings for undeclared built-ins.
6506
6507 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6508
6509 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
6510 appear at the correct location.
6511
6512 2004-06-10 Jason Merrill <jason@redhat.com>
6513
6514 PR c++/15875
6515 Revert:
6516 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6517 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6518 TREE_TYPE for non-dependent names.
6519 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6520 unknown_type_node as its TREE_TYPE.
6521 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6522 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6523 (dump_expr) <SCOPE_REF case>: Likewise.
6524
6525 2004-06-10 Mark Mitchell <mark@codesourcery.com>
6526
6527 PR c++/15227
6528 * parser.c (cp_parser_direct_declarator): Robustify.
6529
6530 PR c++/15877
6531 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
6532 constants in non-dependent contexts.
6533
6534 PR c++/14211
6535 PR c++/15076
6536 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
6537 necessary.
6538
6539 2004-06-10 Jakub Jelinek <jakub@redhat.com>
6540
6541 PR c++/14791
6542 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
6543 specially.
6544
6545 2004-06-09 Mark Mitchell <mark@codesourcery.com>
6546
6547 Revert:
6548 PR c++/15815
6549 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6550 * lex.c (handle_pragma_interface): Deprecate.
6551 (handle_pragma_implementation): Likewise.
6552
6553 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
6554
6555 * g++spec.c (lang_specific_driver): Remove check for -lm
6556 and -lmath when check it see if it was the math library.
6557
6558 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6559
6560 PR c++/7841
6561 * parser.c (cp_parser_direct_declarator): Reject constructor named
6562 as qualified template-id.
6563
6564 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6565
6566 PR c++/15815
6567 * lex.c (handle_pragma_interface): Deprecate.
6568 (handle_pragma_implementation): Likewise.
6569
6570 2004-06-07 Mark Mitchell <mark@codesourcery.com>
6571
6572 PR c++/15766
6573 * parser.c (cp_parser_iteration_statement): Fix typo in error
6574 message.
6575
6576 PR c++/14777
6577 * pt.c (tsubst_default_argument): Do not defer access checks
6578 while substituting into the default argument.
6579
6580 PR c++/15554
6581 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
6582 constant in a non-dependent context.
6583
6584 PR c++/15057
6585 * except.c (build_throw): Ensure that temp_expr has been
6586 initialized.
6587
6588 2004-06-06 Roger Sayle <roger@eyesopen.com>
6589
6590 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
6591
6592 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6593
6594 PR c++/15503
6595 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
6596 'typename', and accept 'template'.
6597
6598 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
6599 Jan Hubicka <jh@suse.cz>
6600
6601 PR c++/14639
6602 * method.c (use_think): Do not mark thunk as referenced.
6603
6604 2004-06-03 Matt Austern <austern@apple.com>
6605
6606 PR c++/15428
6607 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
6608 is nonzero, and if we see a noninline definition of a key method,
6609 make the vtables nonweak.
6610
6611 2004-06-02 Matt Austern <austern@apple.com>
6612
6613 * cp-tree.h (instantiate_decl): new boolean parameter,
6614 undefined_ok. Current behavior is equivalent to its being 0.
6615 * decl2.c (mark_used): Add new argument when calling instantiate_decl
6616 * pt.c (mark_decl_instantiated): Unconditionally make
6617 instantiations explicit unconditionally
6618 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
6619 since mark_decl_instantiated now does it.
6620 (instantiate_class_member): New. Instantiate a member of an
6621 explicitly instantiated class template.
6622 (do_type_instantiation): Explicitly instantiate members of an
6623 explicitly instantiated class template.
6624 (instantiate_decl): if undefined_ok is nonzero, and if we're
6625 trying to explicitly instantiated a template with no definition,
6626 change it to an implicit instantiation.
6627 (instantiate_pending_templates): Add new argument to instantiate_decl.
6628 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6629
6630 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
6631
6632 * cp-tree.h: Fix typo.
6633
6634 * cp-tree.h: Include cgraph.h
6635 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
6636 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
6637
6638 2004-06-01 Jason Merrill <jason@redhat.com>
6639
6640 PR c++/15142
6641 * call.c (call_builtin_trap): Remove type parm.
6642 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
6643 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
6644
6645 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6646
6647 PR c++/13092
6648 * init.c (build_offset_ref): Build SCOPE_REF with non-null
6649 TREE_TYPE for non-dependent names.
6650 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
6651 unknown_type_node as its TREE_TYPE.
6652 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
6653 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
6654 (dump_expr) <SCOPE_REF case>: Likewise.
6655
6656 2004-06-01 Richard Henderson <rth@redhat.com>
6657 Andrew Pinski <pinskia@physics.uc.edu>
6658
6659 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
6660 * parser.c (struct cp_parser): Remove in_offsetof.
6661 (cp_parser_new): Don't set it.
6662 (cp_parser_unary_expression): Don't check it.
6663 (cp_parser_postfix_open_square_expression): Split out from ...
6664 (cp_parser_postfix_expression): ... here.
6665 (cp_parser_postfix_dot_deref_expression): Likewise.
6666 (cp_parser_builtin_offsetof): New.
6667 (cp_parser_primary_expression): Use it.
6668
6669 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6670
6671 PR c++/14932
6672 * parser.c (cp_parser_postfix_expression): Allow subscript
6673 operator in offsetof.
6674
6675 2004-05-31 Mark Mitchell <mark@codesourcery.com>
6676
6677 PR c++/15701
6678 * friend.c (add_friend): Do not try to perform access checks for
6679 functions from dependent classes.
6680
6681 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6682
6683 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
6684 (pp_cxx_begin_template_argument_list): Turn into a function.
6685 (pp_cxx_end_template_argument_list): Likewise.
6686 (pp_cxx_separate_with): Define.
6687 (pp_cxx_unqualified_id): Tidy.
6688 (pp_cxx_primary_expression): Likewise.
6689 (pp_cxx_postfix_expression): Likewise.
6690 (pp_cxx_expression): Likewise.
6691 (pp_cxx_simple_type_specifier): Likewise.
6692 (pp_cxx_type_specifier_seq): Likewise.
6693 (pp_cxx_parameter_declaration_clause): Likewise.
6694 (pp_cxx_exception_specification): Likewise.
6695 (pp_cxx_direct_declarator): Likewise.
6696 (pp_cxx_type_id): Likewise.
6697 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
6698 cxx-pretty-print.c.
6699 (pp_cxx_left_paren): Likewise.
6700 (pp_cxx_right_paren): Likewise.
6701 (pp_cxx_left_brace): Likewise.
6702 (pp_cxx_right_brace): Likewise.
6703 (pp_cxx_left_bracket): Likewise.
6704 (pp_cxx_right_bracket): Likewise.
6705 (pp_cxx_dot): Likewise.
6706 (pp_cxx_identifier): Likewise.
6707 (pp_cxx_tree_identifier): Likewise.
6708 (pp_cxx_ampersand): New macro.
6709 (pp_cxx_star): Likewise.
6710 (pp_cxx_arrow): Likewise.
6711 (pp_cxx_semicolon): Likewise.
6712 (pp_cxx_complement): Likewise.
6713 (pp_cxx_begin_template_argument_list): Declaree.
6714 (pp_cxx_end_template_argument_list): Likewise.
6715 (pp_cxx_colon_colon): likewise.
6716
6717 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
6718
6719 * parser.c (cp_parser_simple_type_specifier): Explicitly test
6720 against NULL_TREE.
6721
6722 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
6723
6724 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
6725 typeck.c: Fix comment formatting.
6726
6727 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
6728
6729 * cp-lang.c (cp_expand_decl): Remove.
6730 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
6731
6732 2004-05-30 Andreas Jaeger <aj@suse.de>
6733
6734 * lang-specs.h: Add missing initializers for .ii.
6735
6736 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
6737
6738 * decl.c (cp_make_fname_decl): Free return value from
6739 fname_as_string.
6740
6741 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6742
6743 PR c++/15083
6744 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
6745 even in a templat.e
6746 * init.c (build_new): Likewise.
6747
6748 PR c++/15640
6749 * name-lookup.c (arg_assoc): Robustify.
6750
6751 PR c++/15471
6752 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
6753 when determining the scope to use for a pointer to member.
6754 (lookup_anon_field): Give it external linkage.
6755 * cp-tree.h (lookup_anon_field): Declare it.
6756 * expr.c (cplus_expand_constant): Use it.
6757
6758 2004-05-28 Mark Mitchell <mark@codesourcery.com>
6759
6760 PR c++/14668
6761 * parser.c (cp_parser_simple_type_specifier): Call
6762 maybe_note_name_used_in_class.
6763
6764 2004-05-28 Tom Marshall <tmarshall@real.com>
6765
6766 PR c++/15214
6767 * class.c (finish_struct_1): Warn only if the dtor is non-private or
6768 the class has friends.
6769
6770 2004-05-27 Adam Nemet <anemet@lnxw.com>
6771
6772 PR c++/12883
6773 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
6774 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
6775
6776 2004-05-24 Geoffrey Keating <geoffk@apple.com>
6777
6778 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
6779 if it might be needed.
6780 * pt.c (mark_decl_instantiated): Only call defer_fn if
6781 the function actually needs processing in finish_file.
6782 * decl2.c (finish_file): Add check that elements in
6783 deferred_fns_used are really needed there. Remove unnecessary
6784 test of DECL_SAVED_TREE.
6785
6786 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
6787
6788 * Make-lang.in: No need to specify $(LIBCPP).
6789
6790 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6791
6792 PR c++/15044
6793 * parser.c (cp_parser_class_head): Robustify.
6794
6795 PR c++/15317
6796 * parser.c (cp_parser_decl_specifier_seq): Correct error in
6797 comment.
6798 (cp_parser_constructor_declarator_p): Treat attributes
6799 as decl-specifiers.
6800
6801 PR c++/15329
6802 * typeck.c (build_unary_op): Do not attempt to resolve casts to
6803 base classes in templates.
6804
6805 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6806
6807 PR c++/15165
6808 * pt.c (instantiate_template): Robustify.
6809
6810 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6811
6812 PR c++/15025
6813 * decl.c (xref_tag): Issue errors about redeclaring template
6814 classes as non-template classes.
6815
6816 2004-05-23 Mark Mitchell <mark@codesourcery.com>
6817
6818 PR c++/14821
6819 * name-lookup.c (supplement_binding): Allow redefinitions of
6820 namespace aliases.
6821
6822 PR c++/14883
6823 * parser.c (cp_parser_template_argument): Robustify.
6824
6825 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
6826
6827 * class.c (alter_access): Use %E format specifier to print an
6828 identifier node. Avoid looking at the IDENTIFIER_POINTER.
6829 (push_lang_context): Likewise.
6830 * decl.c (lookup_label): Likewise.
6831 (grokdeclarator): Likewise.
6832 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
6833 * pt.c (do_type_instantiation): Likewise.
6834 * tree.c (handle_java_interface_attribute): Likewise.
6835 (handle_com_interface_attribute): Likewise.
6836 (handle_init_priority_attribute): Likewise.
6837
6838 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6839
6840 PR c++/15285
6841 PR c++/15299
6842 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
6843 recognized as overloaded functions.
6844
6845 2004-05-22 Mark Mitchell <mark@codesourcery.com>
6846
6847 PR c++/15507
6848 * class.c (layout_nonempty_base_or_field): Do not try to avoid
6849 layout conflicts for unions.
6850
6851 PR c++/15542
6852 * typeck.c (build_x_unary_op): Instantiate template class
6853 specializations before looking for "operator &".
6854
6855 PR c++/15427
6856 * typeck.c (complete_type): Layout non-dependent array types, even
6857 in templates.
6858
6859 PR c++/15287
6860 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
6861 template.
6862
6863 2004-05-22 Roger Sayle <roger@eyesopen.com>
6864
6865 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
6866 returning when TREE_TYPE is error_mark_node.
6867 * typeck.c (require_complete_type): Return error_mark_node if
6868 value's type is an error_mark_node.
6869
6870 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
6871
6872 * optimize.c (calls_setjmp_r): Remove.
6873 (calls_setjmp_p): Remove.
6874 * cp-tree.c (calls_setjmp_p): Remove.
6875 * decl.c (finish_function): Do not call calls_setjmp_p.
6876
6877 2004-05-18 Zack Weinberg <zack@codesourcery.com>
6878
6879 * decl.c (cp_finish_decl): Use mark_decl_referenced.
6880 * decl2.c (maybe_make_one_only): Likewise.
6881 * method.c (use_thunk): Likewise.
6882
6883 2004-05-18 Jason Merrill <jason@redhat.com>
6884
6885 * class.c (build_base_path): Tidy a bit.
6886
6887 2004-05-14 Geoffrey Keating <geoffk@apple.com>
6888
6889 * name-lookup.c (struct scope_binding): New.
6890 (EMPTY_SCOPE_BINDING): New.
6891 (lookup_using_namespace): Take a scope_binding instead of a
6892 cxx_binding.
6893 (qualified_lookup_using_namespace): Likewise.
6894 (cxx_binding_clear): Delete.
6895 (do_nonmember_using_decl): Use a scope_binding instead of a
6896 cxx_binding.
6897 (lookup_tag): Don't call select_decl.
6898 (ambiguous_decl): Don't return anything (and change callers to match).
6899 Take a scope_binding as the second parameter.
6900 (lookup_namespace_name): Use a scope_binding instead of a
6901 cxx_binding.
6902 (unqualified_namespace_lookup): Likewise.
6903 (lookup_qualified_name): Likewise.
6904 (select_decl): Take a scope_binding instead of a cxx_binding.
6905 Use macros rather than hand-coding tests for type-ness.
6906
6907 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6908
6909 * cp-gimplify.c: Rename from cp-simplify.c.
6910 * Make-lang.in, optimize.c: Update.
6911
6912 2004-05-13 Diego Novillo <dnovillo@redhat.com>
6913
6914 Merge from tree-ssa-20020619-branch. See
6915 ChangeLog.tree-ssa for details.
6916
6917 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
6918 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
6919 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
6920 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
6921 Merged.
6922 * cp-mudflap.c: New file.
6923 * cp-simplify.c:: New file.
6924
6925 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6926
6927 PR c++/14389
6928 * decl2.c (check_classfn): For member templates, compare also the
6929 template parameters to match the declaration.
6930 * cp-tree.h: Adjust declaration of check_classfn.
6931 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
6932 * friend.c (do_friend): Likewise.
6933 * pt.c (tsubst_friend_function): Likewise.
6934
6935 2004-05-01 Zack Weinberg <zack@codesourcery.com>
6936
6937 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
6938 Instead, dig into the representation type to find the array bound.
6939
6940 2004-04-30 Jason Merrill <jason@redhat.com>
6941
6942 Refer to base members using COMPONENT_REFs where possible.
6943 * class.c (build_simple_base_path): New fn.
6944 (build_base_path): Use it for non-virtual base references.
6945 (layout_class_type): Change base fields to their real type
6946 after layout is done.
6947 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
6948 * cp-lang.c (cxx_get_alias_set): Use it.
6949
6950 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
6951
6952 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
6953 comment typos.
6954
6955 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6956
6957 PR c++/15064
6958 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
6959 used in integral constant expressions.
6960
6961 2004-04-22 Mark Mitchell <mark@codesourcery.com>
6962
6963 * init.c (build_aggr_init): Fix accidental use of C99 construct in
6964 previous change.
6965
6966 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
6967 braced initializer.
6968 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
6969 * decl.c (reshape_init): Use it.
6970 * init.c (perform_member_init): Remove redundant condition.
6971 (build_aggr_init): Adjust to handle brace-enclosed initializers
6972 correctly.
6973 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6974
6975 * parser.c (cp_parser_initializer_clause): Do not set
6976 TREE_HAS_CONSTRUCTOR on the initializer.
6977 * rtti.c (tinfo_base_init): Likewise.
6978 (generic_initializer): Likewise.
6979 (ptr_initializer): Likewise.
6980 (ptm_initializer): Likewise.
6981 (class_initializer): Likewise.
6982 (get_pseudo_ti_init): Likewise.
6983 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
6984
6985 2004-04-22 Alan Modra <amodra@bigpond.net.au>
6986
6987 * name-lookup.c (anonymous_namespace_name): Make static.
6988
6989 2004-04-19 Roger Sayle <roger@eyesopen.com>
6990
6991 PR middle-end/14531
6992 * class.c (build_base_path): Call fold whilst building the NULL
6993 pointer check expression trees.
6994
6995 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
6996
6997 * init.c (build_new_1): Don't use type size argument for Java
6998 _Jv_AllocObject call.
6999
7000 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
7001
7002 * method.c (make_alias_for_thunk): Remove preprocessor guard on
7003 declaration and definition.
7004
7005 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
7006
7007 PR c++/14808
7008 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
7009 than ASM_OUTPUT_DEF.
7010
7011 2004-04-08 Jakub Jelinek <jakub@redhat.com>
7012
7013 * decl2.c (mark_used): Don't segfault if cfun != NULL but
7014 current_function_decl == NULL.
7015
7016 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
7017
7018 PR c++/3518
7019 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
7020 level.
7021
7022 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7023
7024 * init.c (decl_constant_value): Don't look at DECL_INITIAL
7025 of PARM_DECL.
7026 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
7027 or TREE_SIDE_EFFECTS of a type.
7028
7029 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
7030
7031 PR c++/14007
7032 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
7033 cv-qualifier unification.
7034 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
7035
7036 2004-04-02 Jan Hubicka <jh@suse.cz>
7037
7038 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
7039 * cp-tree.h (cp_update_decl_after_saving): Declare.
7040 * tree.c (cp_update_decl_after_saving): Define.
7041
7042 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7043
7044 PR c++/14803
7045 * typeck.c (get_delta_difference): Call fold before returning the
7046 value.
7047
7048 2004-04-01 Richard Henderson <rth@redhat.com>
7049
7050 PR c++/14804
7051 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
7052 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
7053
7054 2004-04-01 Mark Mitchell <mark@codesourcery.com>
7055
7056 PR c++/14810
7057 * name-lookup.c (maybe_push_cleanup_level): Robustify.
7058
7059 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7060
7061 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
7062
7063 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7064
7065 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
7066 * class.c (check_bitfield_decl): Likewise.
7067 * cvt.c (type_promotes_to): Likewise.
7068 * decl.c (finish_enum): Likewise.
7069 * mangle.c (write_builtin_type): Likewise.
7070 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
7071 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
7072 (build_binary_op): Likewise.
7073
7074 2004-03-31 Jan Hubicka <jh@suse.cz>
7075
7076 * tree.h (optimize_function): Kill prototype.
7077 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
7078 * semantics.c (expand_body): Kill.
7079
7080 2004-03-30 Mark Mitchell <mark@codesourcery.com>
7081
7082 PR c++/14724
7083 * decl.c (start_decl_1): Do not decide whether or not to create a
7084 new cleanup level until after the type has been completed.
7085
7086 PR c++/14763
7087 * pt.c (tsubst_default_argument): Clear current_function_decl.
7088
7089 2004-03-30 Zack Weinberg <zack@codesourcery.com>
7090
7091 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
7092
7093 2004-03-29 Zack Weinberg <zack@codesourcery.com>
7094
7095 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
7096 is null, just print the literal name and return.
7097
7098 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
7099
7100 * cxx-pretty-print.c: Fix comment typos.
7101
7102 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
7103
7104 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
7105 Update copyright.
7106
7107 2004-03-23 Ziemowit Laski <zlaski@apple.com>
7108
7109 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
7110 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
7111 target hook.
7112
7113 2004-03-23 Zack Weinberg <zack@codesourcery.com>
7114
7115 PR 12267, 12391, 12560, 13129, 14114, 14133
7116 * cp-lang.c (c_reset_state): Delete.
7117 (push_file_scope, pop_file_scope): New stubs.
7118 * parser.c (c_parse_file): Call sorry() here if called more than once.
7119
7120 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7121
7122 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
7123 for INTEGER_CST.
7124
7125 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7126
7127 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
7128
7129 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
7130
7131 * error.c (enum pad): Remove.
7132 (dump_qualifiers): Likewise.
7133 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
7134 (dump_aggr_type): Likewise.
7135 (dump_type_suffix): Likewise.
7136 (dump_simple_decl): Likewise.
7137 (dump_function_decl): Likewise.
7138 (cv_to_string): Likewise.
7139 (dump_type_prefix): Likewise. Adjust return void.
7140 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
7141 cxx_pretty_print.h.
7142 (pp_cxx_template_keyword_if_needed): Document.
7143 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
7144 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
7145 MUST_NOT_THROW_EXPR.
7146
7147 2004-03-21 Mark Mitchell <mark@codesourcery.com>
7148
7149 PR c++/14616
7150 * decl.c (cp_finish_decl): Compute the size of arrays declared in
7151 templates, if their type is non-dependent.
7152
7153 2004-03-19 Mark Mitchell <mark@codesourcery.com>
7154
7155 * call.c (build_op_delete_call): Do not forget the placement
7156 arguments when iterating through mutiple delete operators.
7157
7158 * cp-tree.h (svaed_scope): Remove last_parms.
7159 (NEW_DELETE_OPNAME_P): New macro.
7160 (last_function_parms): Remove.
7161 (do_friend): Adjust prototype.
7162 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
7163 using last_function_parms.
7164 (grokfndecl): Take the PARM_DECLs as an argument, rather than
7165 using last_function_parms.
7166 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
7167 for class-specific operator new and operator delete.
7168 (grok_op_properties): Do not look for allocation functions with
7169 METHOD_TYPEs.
7170 (start_function): Use DECL_ARGUMENTS instead of
7171 last_function_parms.
7172 * decl.h (last_function_parms): Do not declare.
7173 * decl2.c (grokclassfn): Do not use last_function_parms.
7174 * friend.c (do_friend): Remove parmdecls parameter.
7175 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
7176 (pop_from_top_level): Do not restore it.
7177 * pt.c (check_explicit_specialization): Do not adjust
7178 last_function_parms.
7179
7180 * name-lookup.c (do_local_using_decl): Create a local binding for
7181 types brought in via using declarations.
7182
7183 * name-lookup.c (lookup_arg_dependent): Handle block-scope
7184 function declarations correctly.
7185
7186 * semantics.c (finish_id_expression): Correct handling of
7187 conversion operators to dependent types.
7188
7189 * typeck.c (lookup_destructor): Allow the use of destructors from
7190 base classes.
7191
7192 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7193
7194 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
7195 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
7196 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
7197 the field is named TEMPLATE_TYPE_PARM_INDEX.
7198
7199 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7200
7201 PR c++/14545
7202 * parser.c (cp_parser_functional_cast): A cast to anything
7203 but integral or enumaration type is not an integral constant
7204 expression.
7205 * pt.c (value_dependent_expression_p): Handle cast expressions
7206 without operands (such as "int()").
7207
7208 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7209
7210 * semantics.c (finish_pseudo_destructor_expr): Allow differing
7211 cv-qualification between the type named by the
7212 pseudo-destructor-name and the object-type.
7213
7214 * search.c (accessible_base_p): Handle non-proper bases.
7215
7216 * name-lookup.c (do_nonmember_using_decl): If a using declaration
7217 refers to a single overloaded function, set the type of the
7218 function.
7219 * tree.c (lvalue_type): Simplify.
7220 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
7221 unknown type.
7222 (build_unary_op): Handle OVERLOADs with known types.
7223
7224 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
7225 function templates.
7226
7227 * parser.c (cp_parser_postfix_expression): Handle the use of
7228 "typename" in non-dependent contexts. Convert appropriately when
7229 when using a qualified name after "->" or ".".
7230
7231 * call.c (conditional_conversion): Honor the requirement that some
7232 conversions refer to the original object.
7233
7234 2004-03-18 Mark Mitchell <mark@codesourcery.com>
7235
7236 * call.c (build_conditional_expr): Do not call force_rvalue for
7237 operands of void_type when the conditional expression itself has
7238 void type.
7239 * name-lookup.c (pushdecl): Don't consider a declaration of a
7240 function named "main" to be an overload of a type named "main".
7241 * parser.c (cp_parser_template_name): Perform name lookup when the
7242 template name is proceeded by "template" if the qualifying scope
7243 is non-dependent.
7244 * typeck.c (composite_pointer_type_r): Correctly handle
7245 pointer-to-member types.
7246 (build_const_cast): Likewise.
7247
7248 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7249
7250 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
7251 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
7252 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
7253 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
7254 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
7255 (TYPEOF_TYPE_EXPR): New macro.
7256 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
7257 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
7258 * pt.c (tsubst): Likewise.
7259 * semantics.c (finish_typeof): Likewise.
7260 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
7261 and TEMPLATE_TYPE_PARM.
7262 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
7263 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
7264
7265 2004-03-16 Mark Mitchell <mark@codesourcery.com>
7266
7267 PR c++/14586
7268 * cp-tree.h (build_new_op): Change prototype.
7269 (build_x_binary_op): Likewise.
7270 * call.c (build_new_op): Add overloaded_p parameter.
7271 * decl2.c (grok_array_decl): Adjust call to build_new_op.
7272 * parser.c (cp_parser_binary_expression): Note that uses of
7273 overloaded operators prevents an expression from being considered
7274 an integral constant.
7275 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
7276 build_x_binary_op.
7277 * semantics.c (finish_call_expr): Likewise.
7278 * typeck.c (rationalize_conditional_expr): Likewise.
7279 (build_x_indirect_ref): Likewise.
7280 (build_x_binary_op): Likewise.
7281 (build_x_unary_op): Likewise.
7282 (build_x_compound_expr): Likewise.
7283 (build_modify_expr): Likewise.
7284 * typeck2.c (build_x_arrow): Likewise.
7285
7286 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
7287
7288 * cp-lang.c, ptree.c: Update copyright.
7289
7290 2004-03-13 Mark Mitchell <mark@codesourcery.com>
7291
7292 PR c++/14550
7293 * parser.c (cp_parser_non_integral_constant_expression): Encode
7294 more of the idiom that surrounded calls to this function within
7295 the function itself
7296 (cp_parser_primary_expression): Adjust accordingly.
7297 (cp_parser_postfix_expression): Likewise.
7298 (cp_parser_unary_expression): Likewise.
7299 (cp_parser_cast_expression): Likewise.
7300 (cp_parser_assignment_expression): Likewise.
7301 (cp_parser_expression): Likewise.
7302 (cp_parser_new_expression): Note that new-expressions are not
7303 allowed in integral constant expressions.
7304 (cp_parser_delete_expression): Likewise.
7305
7306 2004-03-12 Matt Austern <austern@apple.com>
7307
7308 * decl2.c (maybe_make_one_only): Look at
7309 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
7310 to make an explicit instantiation weak.
7311 * method.c (use_thunk): Make sure we call comdat_linkage
7312 when appropriate.
7313 * pt.c (do_type_instantiation): On systems where weak symbols
7314 don't go in a static archive's TOC, explicit instantiation of a
7315 class must imply *explicit* instantiation of its memeber.
7316
7317 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
7318
7319 * call.c, cp-tree.h, pt.c: Fix comment typos.
7320
7321 2004-03-10 Mark Mitchell <mark@codesourcery.com>
7322
7323 PR c++/14510
7324 * decl.c (xref_tag): Disregard non-type declarations when
7325 looking up a tagged type.
7326
7327 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
7328
7329 PR c++/14397
7330 * call.c (convert_like_real): Build a const qualified temporary,
7331 when testing ctor access.
7332
7333 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7334
7335 * call.c (initialize_reference): Fix typo.
7336
7337 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7338
7339 PR c++/14409
7340 * pt.c (determine_specialization): For member templates, match also
7341 constness.
7342
7343 PR c++/14448
7344 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
7345 non-dependent.
7346 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
7347
7348 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7349
7350 PR c++/14230
7351 * call.c (initialize_reference): Handle initializers that are
7352 class-member access expressions applies to rvalues.
7353
7354 2004-03-09 Mark Mitchell <mark@codesourcery.com>
7355
7356 PR c++/14432
7357 * name-lookup.c (supplement_binding): Ignore functions that are
7358 marked DECL_ANTICIPATED.
7359
7360 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7361
7362 PR c++/14401
7363 * class.c (check_field_decls): Complain about non-static data
7364 members of reference type in unions. Propagate
7365 CLASSTYPE_REF_FIELDS_NEED_INIT and
7366 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
7367 data members.
7368 * init.c (perform_member_init): Complain about mbmers with const
7369 type that are not explicitly initialized.
7370
7371 2004-03-08 Mark Mitchell <mark@codesourcery.com>
7372
7373 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
7374 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
7375 (lang_identifier): Remove implicit_decl and error_locus.
7376 (IDENTIFIER_IMPLICIT_DECL): Remove.
7377 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
7378 (IDENTIFIER_ERROR_LOCUS): Likewise.
7379 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
7380 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
7381 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
7382 (implicitly_declare): Remove.
7383 * decl.c (warn_extern_redeclared_static): Remove check of
7384 IDENTIFIER_IMPLICIT_DECL.
7385 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
7386 (implicitly_declare): Remove.
7387 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
7388 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
7389 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
7390 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
7391 in the innermost scope, rather than at namespace scope.
7392 * name-lookup.c (push_local_binding): Give it external linkage.
7393 (pushdecl): Remove dead code.
7394 * name-lookup.h (push_local_binding): Declare it.
7395 * ptree.c (cxx_print_identifier): Don't print
7396 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
7397 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
7398 not IDENTIFIER_ERROR_LOCUS.
7399 * typeck.c (build_function_call): Remove dead code.
7400
7401 2004-03-08 Jason Merrill <jason@redhat.com>
7402
7403 PR c++/13170
7404 * decl.c (xref_tag): Remove attribute handling.
7405 * cp-tree.h: Adjust prototype.
7406 * decl.c, parser.c, rtti.c: Adjust callers.
7407 * parser.c (cp_parser_class_head): Pass back attributes in the
7408 class head.
7409 (cp_parser_class_specifier): Adjust.
7410
7411 2004-03-08 Matt Austern <austern@apple.com>
7412
7413 PR debug/14079
7414 * name-lookup.c (add_decl_to_level): Add extern variables, as well
7415 as static, to static_decls array.
7416
7417 2004-03-05 Jason Merrill <jason@redhat.com>
7418
7419 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
7420
7421 2004-03-04 Geoffrey Keating <geoffk@apple.com>
7422
7423 * decl.c (grokfndecl): Update old incorrect comment.
7424 (grokvardecl): Diagnose C++ variables of type with no linkage.
7425
7426 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7427
7428 PR c++/14369
7429 * pt.c (build_non_dependent_expr): Do not create a
7430 NON_DEPENDENT_EXPR for a THROW_EXPR.
7431
7432 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
7433
7434 PR c++/14369
7435 * error.c (dump_expr): Handle THROW_EXPR.
7436
7437 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7438
7439 PR c++/14360
7440 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
7441 lookup if ordinary name-lookup finds a non-function.
7442 * pt.c (tsubst_copy_and_build): Likewise.
7443
7444 PR c++/14361
7445 * parser.c (cp_parser_late_parsing_default_args): Check that there
7446 are no extra tokens after the end of the default-argument
7447 expression.
7448
7449 2004-03-01 Mark Mitchell <mark@codesourcery.com>
7450
7451 PR c++/14324
7452 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
7453 having C++ linkage for name-mangling purposes.
7454
7455 PR c++/14260
7456 * parser.c (cp_parser_direct_declarator): Recognize constructor
7457 declarators that use a template-id to name the class being
7458 constructed.
7459
7460 PR c++/14337
7461 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
7462 (tsubst_expr): Do not call tsubst_copy, even when
7463 processing_template_decl.
7464
7465 2004-03-01 Jeff Law <law@redhat.com>
7466
7467 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
7468 the proper type.
7469
7470 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7471
7472 PR c++/14138
7473 * name-lookup.h (push_scope): Change prototype.
7474 * name-lookup.c (push_scope): Do not reenter the current class
7475 scope.
7476 * decl.c (grokfndecl): Check return code from push_scope before
7477 calling pop_scope.
7478 * decl2.c (check_classfn): Likewise.
7479 * parser.c (cp_parser_conversion_function_id): Likewise.
7480 (cp_parser_init_declarator): Likewise.
7481 (cp_parser_direct_declarator): Likewise.
7482 (cp_parser_class_specifier): Likewise.
7483 (cp_parser_class_head): Likewise.
7484 (cp_parser_lookup_name): Likewise.
7485 (cp_parser_constructor_declarator_p): Likewise.
7486 * pt.c (instantiate_class_template): Likewise.
7487 (resolve_typename_type): Likewise.
7488
7489 2004-02-29 Mark Mitchell <mark@codesourcery.com>
7490
7491 PR c++/14267
7492 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
7493 extension.
7494
7495 PR debug/12103
7496 * class.c (update_vtable_entry_for_fn): Do not go through
7497 covariance machinery if the type returned by an overrider is the
7498 same as the original.
7499
7500 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
7501
7502 * call.c: Fix a comment typo.
7503
7504 2004-02-27 Ziemowit Laski <zlaski@apple.com>
7505
7506 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
7507
7508 2004-02-26 Mark Mitchell <mark@codesourcery.com>
7509
7510 PR c++/14278
7511 * parser.c (cp_parser_parameter_declaration_list): Commit
7512 to fewer tentative parses.
7513
7514 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7515
7516 PR c++/14284
7517 * pt.c (dependent_type_p_r): A template template parameter is a
7518 dependent type.
7519
7520 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7521
7522 PR c++/14246
7523 * mangle.c (write_template_arg_literal): Don't rely on identity for
7524 boolean constants.
7525
7526 2004-02-24 Jason Merrill <jason@redhat.com>
7527
7528 * tree.c (build_exception_variant): Use check_qualified_type.
7529
7530 2004-02-23 Zack Weinberg <zack@codesourcery.com>
7531 Kazu Hirata <kazu@cs.umass.edu>
7532
7533 * decl.c (cxx_init_decl_processing): Don't check
7534 flag_writable_strings.
7535
7536 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
7537
7538 PR c++/14156
7539 * typeck.c (maybe_warn_about_returning_address_of_location):
7540 Change check for VAR_DECL to use DECL_P instead.
7541
7542 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7543
7544 PR c++/14250
7545 * cvt.c (build_expr_type_conversion): Type must be complete before
7546 looking up for conversions.
7547
7548 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7549
7550 PR c++/14143
7551 * name-lookup.c (arg_assoc_class): Don't look into template
7552 arguments if it is not a primary template.
7553
7554 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7555
7556 PR c++/12007
7557 * method.c (use_thunk): Always clone function argument tree.
7558
7559 2004-02-20 Mark Mitchell <mark@codesourcery.com>
7560
7561 PR c++/14199
7562 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
7563
7564 PR c++/14173
7565 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
7566 for all type variants.
7567
7568 2004-02-19 Mark Mitchell <mark@codesourcery.com>
7569
7570 PR c++/13927
7571 * decl.c (duplicate_decls): Return error_mark_node for invalid
7572 redeclarations.
7573 * name-lookup.c (push_namespace): Ignore the return value from
7574 pushdecl.
7575 * pt.c (push_template_decl_real): Robustify.
7576
7577 PR c++/14186
7578 * name-lookup.c (push_class_level_binding): Do not complain about
7579 adding a binding for a member whose name is the same as the
7580 enclosing class if the member is located in a base class of the
7581 current class.
7582
7583 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7584
7585 PR c++/14181
7586 * parser.c (cp_parser_new_expression): Parse an ill-formed
7587 direct-new-declarator after a parenthesized type-id to emit good
7588 diagnostic.
7589
7590 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
7591
7592 * cp-tree.def, cvt.c: Update copyright.
7593
7594 2004-02-17 Mark Mitchell <mark@codesourcery.com>
7595
7596 PR c++/11326
7597 * cp-tree.h (abi_version_at_least): Remove.
7598 * mangle.c: Include flags.h.
7599
7600 2004-02-15 Mark Mitchell <mark@codesourcery.com>
7601
7602 PR c++/13971
7603 * call.c (build_conditional_expr): Handle conversions between
7604 class types which result in differently cv-qualified type
7605 variants.
7606
7607 PR c++/14086
7608 * class.c (delete_duplicate_fields_1): Remove.
7609 (delete_duplicate_fields): Likewise.
7610 (finish_struct_anon): Remove check for members with the same name
7611 as their enclosing class.
7612 (check_field_decls): Do not call duplicate_fields.
7613 * decl.c (grokdeclarator): Remove check for static data members
7614 with the same name as their enclosing class.
7615 * name-lookup.c (push_class_level_binding): Check for members with
7616 the same name as their enclosing class.
7617
7618 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
7619
7620 PR c++/14085
7621 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
7622
7623 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
7624
7625 PR c++/13635
7626 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
7627 has full set of arguments.
7628
7629 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7630
7631 PR c++/13927
7632 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
7633
7634 2004-02-13 Mark Mitchell <mark@codesourcery.com>
7635
7636 PR c++/14122
7637 * cp-tree.h (delete_sanity): Change prototype.
7638 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
7639 Remove dead code. Adjust code to warn about deleting an array.
7640 * typekc.c (decay_conversion): Use build_address and build_nop.
7641
7642 PR c++/14108
7643 * search.c (accessible_p): Do not check access in thunks.
7644
7645 PR c++/14083
7646 * call.c (build_conditional_expr): Call force_rvalue on the
7647 non-void operand in the case that one result is a throw-expression
7648 and the other is not.
7649
7650 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
7651
7652 PR c++/9851
7653 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
7654 the type name and look ahead for ::~, and bail out early with a
7655 better error message if the parse is going to fail.
7656
7657 2004-02-12 Mark Mitchell <mark@codesourcery.com>
7658
7659 * call.c (conversion_kind): New type.
7660 (conversion_rank): Likewise.
7661 (conversion): Likewise.
7662 (CONVERSION_RANK): New macro.
7663 (conversion_obstack): New variable.
7664 (obstack_initialized): Likewise.
7665 (z_candidate): Change type of convs and second_conv.
7666 (candidate_warning): New type.
7667 (IDENTITY_RANK): Remove.
7668 (EXACT_RANK): Likewise.
7669 (PROMO_RANK): Likewise.
7670 (STD_RANK): Likewise.
7671 (PBOOL_RANK): Likewise.
7672 (USER_RANK): Likewise.
7673 (ELLIPSIS_RANK): Likewise.
7674 (BAD_RANK): Likewise.
7675 (ICS_RANK): Likewise.
7676 (ICS_STD_RANK): Likewise.
7677 (ICS_USER_FLAG): Likewise.
7678 (ICS_ELLIPSIS_FLAG): Likewise.
7679 (ICS_THIS_FLAG): Likewise.
7680 (ICS_BAD_FLAG): Likewise.
7681 (NEED_TEMPORARY_P): Likewise.
7682 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
7683 (USER_CONV_CAND): Likewise.
7684 (USER_CONV_FN): Likewise.
7685 (conversion_obstack_alloc): New function.
7686 (alloc_conversion): Likewise.
7687 (validate_conversion_obstack): Likewise.
7688 (alloc_conversions): Likewise.
7689 (build_conv): Adjust to deal with new conversion data structures.
7690 (build_identity_conv): New function.
7691 (build_ambiguous_conv): Likewise.
7692 (standard_conversion): Adjust to deal with new conversion data
7693 structures.
7694 (convert_class_to_reference): Likewise.
7695 (direct_reference_binding): Likewise.
7696 (reference_binding): Likewise.
7697 (implicit_conversion): Likewise.
7698 (add_candidate): Likewise.
7699 (add_function_candidate): Likewise.
7700 (add_conv_candidate): Likewise.
7701 (build_builtin_candidate): Likewise.
7702 (print_z_candidate): Likewise.
7703 (merge_conversion_sequences): Likewise.
7704 (build_user_type_conversion_1): Likewise.
7705 (build_user_type_conversion): Likewise.
7706 (build_new_function_call): Likewise.
7707 (build_object_call): Likewise.
7708 (conditional_conversion): Likewise.
7709 (build_conditional_expr): Likewise.
7710 (build_new_op): Likewise.
7711 (build_op_delete_call): Likewise.
7712 (convert_like_real): Likewise.
7713 (build_over_call): Likewise.
7714 (build_new_method_call): Likewise.
7715 (is_subseq): Likewise.
7716 (maybe_handle_implicit_object): Likewise.
7717 (maybe_handle_ref_bind): Likewise.
7718 (compare_ics): Likewise.
7719 (source_type): Likewise.
7720 (add_warning): Likewise.
7721 (joust): Likewise.
7722 (can_convert_arg): Likewise.
7723 (can_convert_arg_bad): Likewise.
7724 (perform_implicit_conversion): Likewise.
7725 (perform_direct_initialization_if_possible): Likewise.
7726 (initialize_reference): Likewise.
7727 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
7728 * cp-tree.def (WRAPPER): Likewise.
7729 (IDENTITY_CONV): Remove.
7730 (LVALUE_CONV): Likewise.
7731 (QUAL_CONV): Likewise.
7732 (STD_CONV): Likewise.
7733 (PTR_CONV): Likewise.
7734 (PMEM_CONV): Likewise.
7735 (BASE_CONV): Likewise.
7736 (REF_BIND): Likewise.
7737 (USER_CONV): Likewise.
7738 (AMBIG_CONV): Likewise.
7739 (RVALUE_CONV): Likewise.
7740 * cp-tree.h (tree_wrapper): Remove.
7741 (WRAPPER_ZC): Remove.
7742 (lang_tree_node): Remove wrapper.
7743 (LOOKUP_SPECULATIVELY): Remove.
7744 (build_op_delete_call): Adjust prototype.
7745 (validate_conversion_obstack): Declare.
7746 (build_zc_wrapper): Remove.
7747 * cvt.c (convert_to_reference): Remove dead code.
7748 (ocp_convert): Likewise.
7749 * decl.c (redeclaration_error_message): Correct handling of
7750 templates.
7751 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
7752 (cp_tree_node_structure): Remove WRAPPER case.
7753 * decl2.c (finish_file): Call validate_conversion_obstack.
7754 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
7755 (build_op_delete_call): Likewise.
7756 (build_x_delete): Likewise.
7757 (build_delete): Adjust call to build_op_delete_call.
7758 * pt.c (tsubst_friend_declaration): Adjust code to determine
7759 whether or not a friend template is a definition.
7760 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
7761 * tree.c (build_zc_wrapper): Remove.
7762
7763 2004-02-12 Zack Weinberg <zack@codesourcery.com>
7764
7765 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
7766 * cp-tree.h: Don't declare cxx_builtin_type_decls.
7767 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
7768 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
7769
7770 2004-02-10 Mark Mitchell <mark@codesourcery.com>
7771
7772 * typeck.c (lookup_destructor): Fix typo in error message.
7773
7774 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
7775
7776 * call.c, parser.c, tree.c: Fix comment typos.
7777
7778 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7779
7780 Bug 13856
7781 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
7782 * decl.c (duplicate_decls, start_function): Likewise.
7783
7784 2004-02-07 Zack Weinberg <zack@codesourcery.com>
7785
7786 * name-lookup.c (pushdecl): Issue shadow warnings directly.
7787 * parser.c (free_parser_stacks): Delete.
7788
7789 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
7790
7791 * rtti.c: Update copyright.
7792
7793 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7794
7795 PR c++/14033
7796 * decl.c (require_complete_types_for_parms): Do not insert
7797 error_mark_node in the parameter list.
7798
7799 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7800
7801 PR c++/14028
7802 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
7803 error when terminator can not be found.
7804
7805 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
7806
7807 Make-lang.in (po-generated): Delete.
7808
7809 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
7810
7811 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
7812 targetm.calls.promote_prototypes.
7813
7814 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7815
7816 PR middle-end/13750
7817 Revert:
7818 2004-01-15 Geoffrey Keating <geoffk@apple.com>
7819 PR pch/13361
7820 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
7821 (handle_pragma_implementation): Likewise.
7822
7823 2004-02-05 Mark Mitchell <mark@codesourcery.com>
7824
7825 PR c++/13714
7826 * typeck.c (lookup_destructor): Tweak error message.
7827
7828 2004-02-05 Jan Hubicka <jh@suse.cz>
7829
7830 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
7831 functions.
7832
7833 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7834
7835 PR c++/14008
7836 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
7837 code, only emits the diagnostic now. Added lookup of the identifier
7838 and support for qualified ids.
7839 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
7840 Parse an (invalid) type name as id-expression within a declarator.
7841 (cp_parser_simple_declaration): Use it.
7842 (cp_parser_member_declaration): Likewise.
7843 (cp_parser_make_typename_type): New function. Handle errors through
7844 cp_parser_diagnose_invalid_typename.
7845 (cp_parser_elaborated_type_specifier): Use it.
7846
7847 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7848
7849 PR c++/13932
7850 * call.c (convert_like_real): Use "converting" rather than
7851 "argument" as the descriptive keyword to
7852 dubious_conversion_warnings.
7853 * typeck.c (convert_for_assignment): Do not call
7854 dubious_conversion_warnings.
7855
7856 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7857
7858 PR c++/13086
7859 * init.c (build_delete): Emit a more informative error message in
7860 case of an incomplete type, and on the correct source line.
7861
7862 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
7863
7864 * error.c, search.c: Update copyright.
7865
7866 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7867
7868 PR c++/9941
7869 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
7870 linkage for the typeinfo name string.
7871
7872 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7873
7874 PR c++/13969
7875 * cp-tree.h (fold_non_dependent_expr): New function.
7876 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
7877 (cp_parser_template_argument): Use fold_non_dependent_expr.
7878 (cp_parser_direct_declarator): Likewise.
7879 * pt.c (fold_non_dependent_expr): New function.
7880 (convert_nontype_argument): Use it.
7881 (tsubst_qualified_id): Simplify.
7882 (tsubst_copy_and_build): Likewise.
7883
7884 2004-02-04 Mark Mitchell <mark@codesourcery.com>
7885
7886 * decl.c (cxx_push_function_context): Do not set
7887 current_function_is_thunk.
7888 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
7889 actual function.
7890
7891 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7892
7893 PR c++/13997
7894 * pt.c (more_specialized_class): Increase processing_template_decl
7895 while partial ordering.
7896
7897 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7898
7899 PR c++/13925
7900 * decl.c (start_function): Do not call pushdecl for any
7901 instantiation or specialization of a primary template.
7902
7903 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7904
7905 PR c++/13950
7906 * parser.c (cp_parser_class_name): Robustify.
7907
7908 PR c++/13970
7909 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
7910
7911 PR c++/14002
7912 * semantics.c (finish_id_expression): Do not return an
7913 IDENTIFIER_NODE when lookup finds a PARM_DECL.
7914
7915 2004-02-03 Mark Mitchell <mark@codesourcery.com>
7916
7917 PR c++/13978
7918 * pt.c (build_non_dependent_expr): Do not build
7919 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
7920
7921 PR c++/13968
7922 * semantics.c (finish_id_expression): Do not return an
7923 IDENTIFIER_NODE when lookup finds a VAR_DECL.
7924
7925 PR c++/13975
7926 * parser.c (cp_parser_simple_declaration): When skipping to the
7927 end of the statement swallow the terminating semicolon.
7928
7929 2004-02-02 Mark Mitchell <mark@codesourcery.com>
7930
7931 PR c++/13113
7932 * init.c (build_offset_ref): Improve error recovery for invalid
7933 uses of non-static member functions.
7934
7935 PR c++/13854
7936 * cp-tree.h (cp_build_type_attribute_variant): New function.
7937 * class.c (build_clone): Use cp_build_type_attribute_variant.
7938 * decl.c (duplicate_decls): Likewise.
7939 * pt.c (copy_default_args_to_explicit_spec): Likewise.
7940 (tsubst_function_type): Likewise.
7941 * tree.c (build_exception_variant): Check attributes before
7942 concluding that two types are the same.
7943 (cp_build_type-attribute_variant): New method.
7944 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
7945
7946 PR c++/13907
7947 * call.c (convert_class_to_reference): Keep better track of
7948 pedantically invalid user-defined conversions.
7949
7950 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7951
7952 PR c++/13957
7953 * pt.c (tsubst_qualified_id): Improved error message when a type
7954 is expected but not found.
7955
7956 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
7957
7958 * class.c: Fix comment typos.
7959 * decl.c: Likewise.
7960 * error.c: Likewise.
7961 * parser.c: Likewise.
7962 * pt.c: Likewise.
7963 * search.c: Likewise.
7964 * typeck.c: Likewise.
7965
7966 2004-01-30 Richard Henderson <rth@redhat.com>
7967
7968 PR c++/13693
7969 * method.c (use_thunk): Don't force_target_expr for void thunks.
7970 * tree.c (build_target_expr_with_type): Assert non-void type.
7971 (force_target_expr): Likewise.
7972
7973 2004-01-30 Michael Matz <matz@suse.de>
7974
7975 * parser.c (cp_parser_labeled_statement): Accept case ranges.
7976
7977 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7978
7979 DR206
7980 PR c++/13813
7981 * decl.c (grokdeclarator): Check immediatly type completeness for
7982 non-dependent types.
7983
7984 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7985
7986 PR c++/13683
7987 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
7988 a sizeof expression.block
7989
7990 2004-01-29 Mark Mitchell <mark@codesourcery.com>
7991
7992 PR c++/13883
7993 * mangle.c (write_encoding): Correct encoding of member template
7994 constructors.
7995
7996 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
7997
7998 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
7999 template name as it was `<::' (digraph typo).
8000 (cp_parser_nth_token_starts_template_argument_list_p): New function.
8001 (cp_parser_id_expression): Use it.
8002 (cp_parser_nested_name_specifier_opt): Likewise.
8003 (cp_parser_template_name): Likewise.
8004 (cp_parser_class_name): Likewise.
8005 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
8006
8007 2004-01-28 Mark Mitchell <mark@codesourcery.com>
8008
8009 PR c++/13791
8010 * typeck.c (merge_types): Do not merge attributes into
8011 TYPENAME_TYPEs.
8012
8013 PR c++/13736
8014 * parser.c (cp_parser_direct_declarator): Do not prevent
8015 backtracking inside a parenthesized declarator.
8016 (cp_parser_parameter_declaration): Fix typo in comment.
8017
8018 2004-01-28 Jan Hubicka <jh@suse.cz>
8019
8020 * semantics.c (expand_body) Do emit_associated_thunks before
8021 expansion.
8022
8023 2004-01-27 Devang Patel <dpatel@apple.com>
8024
8025 * name-lookup.c: Include "debug.h"
8026 (do_namespace_alias): Invoke debug_hooks to emit debug info
8027 for namespace alias.
8028 (do_local_using_decl): Invoke debug_hooks to emit debug info
8029 for using decl.
8030 (do_class_using_decl): Same.
8031 (do_toplevel_using_decl): Same.
8032 (do_using_directive): Same.
8033 (cp_emit_debug_info_for_using): New function.
8034 * Make-lang.in (cp/parser.o): Depend on debug.h
8035 (cp/name-lookup.o): Same.
8036
8037 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8038
8039 * cp-tree.h (language_function, lang_type_header): Use
8040 BOOL_BITFIELD.
8041 * name-lookup.h (cp_binding_level): Likewise.
8042
8043 2004-01-26 Mark Mitchell <mark@codesourcery.com>
8044
8045 PR c++/13663
8046 * semantics.c (finish_for_expr): Check for unresolved overloaded
8047 functions.
8048
8049 * class.c (add_method): Just check processing_template_decl to
8050 determine whether or not we are within a template.
8051 * decl2.c (maybe_retrofit_in_chrg): Likewise.
8052 * init.c (decl_constant_value): Check the type of the declaration,
8053 not TREE_READONLY.
8054 * name-lookup.c (maybe_push_to_top_level): Rename to ...
8055 (push_to_top_level): ... this.
8056 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
8057 * pt.c (push_template_decl_real): Reorder condition for speed.
8058 (convert_template_argument): Use dependency-checking functions in
8059 place of uses_template_parms.
8060 (lookup_template_class): Avoid calling uses_template_parms more
8061 than once.
8062 (uses_template_parms): Reimplement, using dependency-checking
8063 functions.
8064 (instantiate_class_template): Use push_to_top_level, not
8065 maybe_push_to_top_level.
8066 (type_unification_real): Simplify.
8067 (type_dependent_expression_p): Handle OFFSET_REFs and
8068 TEMPLATE_DECLs.
8069 (any_dependent_template_arguments_p): Handle multiple levels of
8070 template argument.
8071 * semantics.c (expand_or_defer_fn): Do not check
8072 uses_template_parms for template instantiations.
8073 * typeck.c (comptypes): Avoid calling cp_type_quals.
8074
8075 2004-01-25 Mark Mitchell <mark@codesourcery.com>
8076
8077 PR c++/13833
8078 * call.c (build_over_call): Do not convert arguments when
8079 processing a template.
8080 * pt.c (build_non_dependent_expr): Do not build a
8081 NON_DEPENDENT_EXPR for arithmetic constants.
8082
8083 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8084
8085 PR c++/13810
8086 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
8087 returns a TYPE_DECL. no further lookup is required.
8088 * semantics.c (check_template_template_default_arg): A TYPE_DECL
8089 is invalid. Rework to give better diagnostics.
8090
8091 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8092
8093 PR c++/13797
8094 * pt.c (instantiate_class_template): Add an error_mark_node
8095 check.
8096 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
8097
8098 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
8099
8100 PR c++/13701
8101 * decl.c (finish_function): Move the call to
8102 finish_fname_decls below the call to
8103 finish_eh_spec_block.
8104
8105 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8106
8107 * optimize.c, typeck2.c: Update copyright.
8108
8109 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
8110
8111 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
8112 init.c, mangle.c, typeck.c: Update copyright.
8113
8114 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
8115
8116 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
8117
8118 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8119
8120 * Make-lang.in: Replace $(docdir) with doc.
8121 (c++.info, c++.srcinfo): Dummy entry.
8122 (c++.man, c++.srcman): New rules.
8123 (c++.install-man): Revamp rule.
8124
8125 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
8126
8127 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
8128 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
8129 immediate $(shell) instead of deferred backquote.
8130
8131 2004-01-19 Mark Mitchell <mark@codesourcery.com>
8132
8133 PR c++/13651
8134 * parser.c (cp_parser_postfix_expression): When encountering
8135 incomplete type on left-hand side of "->" or ".", treat the entire
8136 expression as erroneous.
8137
8138 PR c++/13592
8139 * call.c (build_field_call): Remove.
8140 (n_build_method_call): Likewise.
8141 (build_method_call): Likewise.
8142 (build_new_method_call): Do not call build_field_call.
8143 * class.c (n_build_method_call): Remove.
8144 (print_class_statistics): Do not print it.
8145 * cp-tree.h (build_method_call): Remove declaration.
8146 (finish_object_call_expr): Likewise.
8147 (build_new_1): Do not use build_method_call.
8148 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
8149 when the function appearing on the right-hand-side of "." or "->"
8150 is not actually a function.
8151 * pt.c (tsubst_copy_and_build): Likewise.
8152 * semantics.c (finish_object_call_expr): Remove.
8153
8154 2004-01-18 Mark Mitchell <mark@codesourcery.com>
8155
8156 PR c++/13710
8157 * pt.c (tsubst): Use finish_typeof.
8158
8159 2004-01-18 Jason Merrill <jason@redhat.com>
8160
8161 PR c++/11725
8162 * except.c (build_throw): In a template, set
8163 current_function_returns_abnormally.
8164
8165 2004-01-17 Fred Fish <fnf@intrinsity.com>
8166
8167 PR c++/11895
8168 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
8169 except don't call array_type_nelts() with a VECTOR_TYPE.
8170
8171 2004-01-16 Jan Hubicka <jh@suse.cz>
8172
8173 * mangle.c (write_mangled_name): Remove inline modifier.
8174
8175 2004-01-16 Mark Mitchell <mark@codesourcery.com>
8176
8177 PR c++/13574
8178 * decl.c (compute_array_index_type): Fix grammar in comment.
8179 * init.c (build_zero_init): Handle zero-sized arrays correctly.
8180
8181 PR c++/13178
8182 * call.c (name_as_c_string): Print conversion operator names
8183 correctly.
8184
8185 PR c++/13478
8186 * call.c (initialize_reference): Pass -1 for inner parameter to
8187 convert_like_real.
8188
8189 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8190
8191 PR c++/13407
8192 * parser.c (cp_parser_base_specifier): Check for an invalid
8193 keyword `typename' and emit an user-friendly error message.
8194
8195 2004-01-15 Geoffrey Keating <geoffk@apple.com>
8196
8197 PR pch/13361
8198 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
8199 (handle_pragma_implementation): Likewise.
8200
8201 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8202
8203 PR c++/9259
8204 * typeck.c (build_class_member_access_expr): Allow to access members
8205 of the currently open class.
8206 (finish_class_member_access_expr): Likewise.
8207
8208 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8209
8210 PR c++/13659
8211 * name-lookup.c (validate_nonmember_using_decl): Take scope and
8212 name by value, instead of computing them.
8213 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
8214 arguments. Pass them to validate_nonmember_using_decl.
8215 * name-lookup.h (do_local_using_decl): Adjust.
8216 (do_toplevel_using_decl): Likewise.
8217 * parser.c (cp_parser_using_declaration): Likewise.
8218 * pt.c (tsubst_expr): Likewise.
8219
8220 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
8221
8222 PR c++/13594
8223 PR c++/13658
8224 * name-lookup.c (qualified_lookup_using_namespace): Search
8225 strongly-associated namespaces first, and only then try other
8226 namespaces.
8227
8228 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
8229
8230 * Make-lang.in (c++.srcextra): Dummy entry.
8231
8232 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8233
8234 PR c++/8856
8235 * parser.c (cp_parser_template_name): Don't try to parse a
8236 conversion-function-id, as it cannot be a template-name.
8237 (cp_parser_simple_type_specifier): Check for invalid template-ids
8238 even after a built-in type.
8239
8240 2004-01-14 Jan Hubicka <jh@suse.cz>
8241
8242 PR c++/12850
8243 * pt.c (instantiate_decl): Do not increase function_depth.
8244
8245 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
8246
8247 PR c++/9021
8248 PR c++/11005
8249 * parser.c (cp_parser_elaborated_type_specifier): Warn about
8250 attributes and discard.
8251 * decl.c (xref_tag): Don't overwite existing attributes with
8252 NULL_TREE.
8253
8254 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8255
8256 PR c++/12335
8257 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
8258 is no destructor while looking up a BIT_NOT_EXPR.
8259
8260 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8261
8262 * cxxfilt.c: Remove unused file.
8263
8264 2004-01-14 Jan Hubicka <jh@suse.cz>
8265
8266 Partial fix to PR c++/12850
8267 * decl2.c (mark_used): Do not proactively instantiate templates
8268 when compiling in unit-at-a-time or not optimizing.
8269 * optimize.c (maybe_clone_body): Do not increase function depth.
8270
8271 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8272
8273 PR c++/13474
8274 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
8275
8276 2004-01-12 Steven Bosscher <stevenb@suse.de>
8277
8278 PR c++/13558
8279 * parser.c (cp_parser_member_declaration): Any non-type is also
8280 not a class or a function.
8281
8282 2004-01-12 Jason Merrill <jason@redhat.com>
8283
8284 PR c++/12815
8285 * class.c (build_base_path): Do not mark vtable references as
8286 TREE_CONSTANT.
8287 (build_vtbl_ref_1): Likewise.
8288
8289 2004-01-12 Richard Henderson <rth@redhat.com>
8290
8291 PR opt/10776
8292 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
8293 (store_init_value): Use it.
8294 * decl.c (check_initializer): Expect full initialization code
8295 from store_init_value.
8296 * init.c (expand_aggr_init_1): Likewise.
8297 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
8298
8299 2004-01-12 Mark Mitchell <mark@codesourcery.com>
8300
8301 * class.c (layout_class_type): For non-POD class types, also copy
8302 the DECL_SIZE and DECL_MODE of fields to the base class type.
8303
8304 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8305
8306 PR c++/13289
8307 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
8308 calling regenerate_decl_from_template.
8309
8310 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
8311
8312 PR c++/4100
8313 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
8314 decl-specifier occurring along with a class definition.
8315
8316 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
8317
8318 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
8319 clauses to comments describing declares_class_or_enum.
8320 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
8321 false.
8322
8323 2004-01-12 Jan Hubicka <jh@suse.cz>
8324
8325 * pt.c (for_each_template_parm): Do not check for duplicates.
8326 (for_each_template_parm): Use walk_tree duplicate checking code.
8327
8328 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
8329
8330 PR c++/3478
8331 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
8332 is error_mark_node, don't add any more decl_specs.
8333 (cp_parser_init_declarator): After committing to a declaration, if
8334 the decl_specifiers start with error_mark_node, issue an error and
8335 change the type to "int".
8336
8337 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
8338
8339 PR bootstrap/7817
8340 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
8341
8342 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8343
8344 DR 337
8345 PR c++/9256
8346 * pt.c (tsubst): Substitution must fail if we are attempting to
8347 create an array with element type that is an abstract class type.
8348 * decl.c (cp_finish_decl): Strip pointers and array types recursively
8349 before calling abstract_virtuals_error.
8350
8351 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
8352
8353 * name-lookup.c (qualified_lookup_using_namespace): Consider
8354 strong using directives even if we've already found a binding.
8355
8356 2004-01-09 Mark Mitchell <mark@codesourcery.com>
8357
8358 * cp-tree.h (cxx_expand_expr): Change prototype.
8359 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
8360
8361 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
8362
8363 PR c++/12573
8364 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
8365 looking into them recursively. They can be there because of the
8366 new __offsetof__ extension.
8367
8368 2004-01-07 Zack Weinberg <zack@codesourcery.com>
8369
8370 * parser.c (cp_parser_save_member_function_body): Mark the
8371 definition static.
8372
8373 2004-01-05 Mark Mitchell <mark@codesourcery.com>
8374
8375 PR c++/13057
8376 * class.c (build_clone): Copy type attributes from the original
8377 function to the clone.
8378
8379 PR c++/12815
8380 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
8381 references as constant.
8382
8383 PR c++/12132
8384 * parser.c (cp_parser_explicit_instantiation): Improve error
8385 recovery.
8386 (cp_parser_require): Improve indication of the error location.
8387
8388 PR c++/13451
8389 * parser.c (cp_parser_class_head): Reorder logic to check for
8390 invalid qualification.
8391
8392 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8393
8394 PR c++/13157
8395 * name-lookup.c (lookup_using_namespace): Remove spacesp
8396 parameter.
8397 (unqualified_namespace_lookup): Likewise.
8398 (lookup_qualified_name): Adjust accordingly.
8399 (lookup_name_real): Likewise.
8400 (lookup_arg_dependent): Do not eliminate the namespace of the
8401 functions found by unqualified name lookup unless that is the
8402 current namespace.
8403
8404 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
8405
8406 * semantics.c (push_deferring_access_checks): Fix format.
8407 (resume_deferring_access_checks): Likewise.
8408 (stop_deferring_access_checks): Likewise.
8409 (pop_deferring_access_checks): Likewise.
8410 (get_deferred_access_checks): Likewise.
8411 (pop_to_parent_deferring_access_checks): Likewise.
8412 (perform_deferred_access_checks): Likewise.
8413 (perform_or_defer_access_check): Likewise.
8414
8415 2004-01-04 Richard Henderson <rth@redhat.com>
8416
8417 * call.c (build_over_call): Don't create a save_expr of an
8418 aggregate, but rather its address.
8419
8420 2004-01-04 Mark Mitchell <mark@codesourcery.com>
8421
8422 PR c++/13529
8423 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
8424 an offsetof expression.
8425
8426 * parser.c (cp_parser_parameter_declaration): Fix comment.
8427
8428 PR c++/12226
8429 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
8430 (reference_binding): Set it when appropriate.
8431 (build_temp): New function, split out from ...
8432 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
8433 (initialize_reference): Likewise.
8434
8435 PR c++/13536
8436 * parser.c (cp_parser): Add in_type_id_in_expr_p.
8437 (cp_parser_new): Initialize it.
8438 (cp_parser_postfix_expression): Set it.
8439 (cp_parser_sizeof_operand): Likewise.
8440 (cp_parser_parameteR_declaration): Do not commit early to tenative
8441 parsers when in_type_id_in_expr_p is set.
8442
8443 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8444
8445 PR c++/13094
8446 * parser.c (cp_parser_template_argument): Don't call
8447 make_unbound_class_template directly.
8448 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
8449 UNBOUND_CLASS_TEMPLATE tree node.
8450
8451 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
8452
8453 PR target/12729
8454 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
8455
8456 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
8457
8458 PR c++/13520
8459 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
8460 (DECL_FUNCTION_TEMPLATE_P): Use it.
8461 (DECL_CLASS_TEMPLATE_P): Likewise.
8462 * parser.c (cp_parser_lookup_name): Add is_template parameter.
8463 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
8464 (cp_parser_template_name): Likewise.
8465 (cp_parser_elaborated_type_specifier): Likewise.
8466 (cp_parser_namespace_name): Likewise.
8467 (cp_parser_class_name): Likewise.
8468 (cp_parser_lookup_name_simple): Likewise.
8469
8470 See ChangeLog.3 for earlier changes.
This page took 0.356078 seconds and 6 git commands to generate.