1 2004-06-21 Jason Merrill <jason@redhat.com>
4 * cp-gimplify.c (cp_gimplify_init_expr): Look through
7 2004-06-21 Mark Mitchell <mark@codesourcery.com>
9 * cp-tree.def (NEW_EXPR): Add a fourth slot.
10 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
11 (TREE_PARMLIST): Likewise.
12 (CALL_DECLARATOR_PARMS): Likewise.
13 (CALL_DECLARATOR_QUALS): Likewise.
14 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
15 (cp_declarator_kind): New type.
16 (cp_parameter_declarator): Likewise.
17 (cp_declarator): Likewise.
18 (cp_error_declarator): Likewise.
19 (no_parameters): Likewise.
20 (groktypename): Change prototype.
21 (start_decl): Likewise.
22 (start_handler_parms): Likewise.
23 (get_scope_of_declarator): Likewise.
24 (start_function): Likewise.
25 (start_preparsed_function): New function.
26 (start_function): Change prototype.
27 (start_method): Likewise.
28 (grokfield): Likewise.
29 (grokbitfield): Likewise.
30 (build_new): Likewise.
31 (make_pointer_declarator): Remove.
32 (make_reference_declarator): Likewise.
33 (make_call_declarator): Likewise.
34 (set_quals_and_spec): Likewise.
35 (process_template_parm): Change prototype.
36 (begin_function_definition): Remove.
37 (finish_parmlist): Remove.
38 * decl.c (groktypename): Do not use trees to represent
40 (start_decl): Likewise.
41 (start_handler_parms): Remove.
42 (get_scope_of_declarator): Reimplement.
43 (grokdeclarator): Do not use trees to represent declarators.
44 (grokparms): Likewise.
45 (start_function): Likewise.
46 (start_method): Likewise.
47 (build_void_list_mode): Do not use TREE_PARMLIST.
48 * decl.h (grokdeclarator): Change prototype.
49 * decl2.c (grok_method_quals): Robustify.
50 (grok_x_components): Do not use trees to represent declarators.
51 (grokfield): Likewise.
52 (grokbitfield): Likewise.
53 (start_objects): Build FUNCTION_DECLs, not declarators.
54 (start_static_storage_duration_function): Likewise.
55 * init.c (build_new): Simplify.
56 * lex.c (make_pointer_declarator): Remove.
57 (make_reference_declarator): Likewise.
58 (make_call_declarator): Likewise.
59 (set_quals_and_spec): Likewise.
60 * method.c (use_thunk): Use start_preparsed_function.
61 (synthesize_method): Likewise.
62 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
63 * optimize.c (maybe_clone_body): Use start_preparsed_function.
64 * parser.c (cp_error_declarator): New variable.
65 (declarator_obstack): Likewise.
66 (alloc_declarator): New function.
67 (make_declarator): Likewise.
68 (make_id_declarator): Likewise.
69 (make_pointer_declarator): Likewise.
70 (make_reference_declarator): Likewise.
71 (make_ptrmem_declarator): Likewise.
72 (make_call_declarator): Likewise.
73 (make_array_declarator): Likewise.
74 (no_parameters): New variable.
75 (make_parameter_declarator): Likewise.
76 (cp_parser_check_for_definition_in_return_type): Do not use trees
77 to represent declarators.
78 (cp_parser_translation_unit): Likewise.
79 (cp_parser_new_expression): Likewise.
80 (cp_parser_new_type_id): Likewise.
81 (cp_parser_new_declarator_opt): Likewise.
82 (cp_parser_direct_new_declarator): Likewise.
83 (cp_parser_condition): Likewise.
84 (cp_parser_declaration_statement): Likewise.
85 (cp_parser_declaration): Likewise.
86 (cp_parser_conversion_type_id): Likewise.
87 (cp_parser_conversion_declarator_opt): Likewise.
88 (cp_parser_template_parameter_list): Likewise.
89 (cp_parser_template_parameter): Likewise.
90 (cp_parser_explicit_instantiation): Likewise.
91 (cp_parser_init_declarator): Likewise.
92 (cp_parser_declarator): Likewise.
93 (cp_parser_direct_declarator): Likewise.
94 (cp_parser_type_id): Likewise.
95 (cp_parser_parameter_declaration_clause): Likewise.
96 (cp_parser_parameter_declaration_list): Likewise.
97 (cp_parser_parameter_declaration): Likewise.
98 (cp_parser_member_declaration): Likewise.
99 (cp_parser_exception_declaration): Likewise.
100 (cp_parser_check_declarator_template_parameters): Likewise.
101 (cp_parser_function_definition_from_specifiers_and_declarator):
103 (cp_parser_save_member_function_body): Likewise.
104 * pt.c (process_template_parm): Add is_non_type parameter.
105 (convert_template_argument): Adjust call to groktypename.
106 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
107 (tsubst): Do not expect declarators.
108 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
110 (instantiate_decl): Use start_preparsed_function.
111 * semantics.c (begin_function_definition): Remove.
112 (finish_parmlist): Remove.
113 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
116 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
118 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
119 (build_new_method_call): Likewise.
120 * decl.c (local_variable_p_walkfn): Don't walk into types.
121 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
122 (build_anon_union_vars): Add new operand for COMPONENT_REF.
123 * init.c (buld_new): Add new operand for ARRAY_REF.
124 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
125 (do_build_assign_ref): Likewise.
126 * parser.c (cp_parser_direct_new_declarator): Add new operands
128 (cp_parser_direct_declarator): Likewise.
129 * pt.c (tsubst): Likewise.
130 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
132 * semantics.c (finish_non_static_data_member): Add new operand
134 * typeck.c (build_class_member_access_expr): Likewise.
135 (build_class_member_access_expr, finish_class_member_access_expr):
137 (build_ptrmemfunc_access_expr): Likewise.
138 (build_array_ref): Add new operands for ARRAY_REF.
139 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
140 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
142 2004-06-21 Richard Henderson <rth@redhat.com>
144 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
145 * parser.c (cp_parser_jump_statement): Update commentary.
146 * pt.c (tsubst_expr): Use RETURN_EXPR.
147 * semantics.c (finish_return_stmt): Likewise.
148 (finalize_nrv_r): Likewise.
149 * typeck.c, typeck2.c: Update file start commentary.
151 2004-06-21 Richard Henderson <rth@redhat.com>
153 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
155 2004-06-20 Richard Henderson <rth@redhat.com>
157 * cp-tree.h (add_decl_stmt): Declare.
158 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
159 * semantics.c (maybe_cleanup_point_expr): New.
160 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
161 finish_for_expr, finish_switch_cond): Use it.
162 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
164 2004-06-20 Richard Henderson <rth@redhat.com>
166 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
167 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
168 (cp_gimplify_expr): Call it.
169 (gimplify_cleanup_stmt): Move from c-gimplify.c.
170 (cp_genericize): New.
171 * decl.c (finish_function): Call it.
172 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
173 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
174 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
175 (cp_genericize): Declare.
176 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
177 * dump.c (cp_dump_tree): Likewise.
178 * semantics.c (push_cleanup): Move from c-semantics.c.
180 2004-06-20 Zack Weinberg <zack@codesourcery.com>
182 * cp-lang.c (has_c_linkage): Implement.
184 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
185 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
186 (builtin_function_1): Don't call make_decl_rtl.
187 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
188 (grokvardecl): Don't call mangle_decl.
189 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
191 * method.c (set_mangled_name_for_decl): Delete.
192 * name-lookup.c (pushdecl): When a local extern shadows a
193 file-scope declaration of the same object, give both DECLs the
195 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
196 on DECL_ASSEMBLER_NAME.
198 2004-06-19 Richard Henderson <rth@redhat.com>
200 * cp-gimplify.c: Remove unnecessary prototypes.
201 (cp_gimplify_stmt): Merge into ...
202 (cp_gimplify_expr): ... here. Move to end of file. Handle
203 stmts_are_full_exprs_p frobbing.
204 * cp-tree.h (cp_gimplify_stmt): Remove.
205 * pt.c (tsubst_expr): Merge prep_stmt and unify.
206 * tree.c (init_tree): Don't set lang_gimplify_stmt.
208 2004-06-18 Richard Henderson <rth@redhat.com>
211 * semantics.c (begin_cond): New.
212 (finish_cond): Rewrite to handle template DECL_STMTs specially.
213 Assume that non-template decls go land before the conditional.
214 (simplify_loop_decl_cond): Likewise.
215 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
216 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
217 begin_switch_stmt, finish_switch_cond): Update to match.
219 2004-06-17 Jason Merrill <jason@redhat.com>
222 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
223 (finish_stmt_expr_expr): Update type after conversions.
224 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
225 Handle void initializer.
226 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
228 2004-06-17 Geoffrey Keating <geoffk@apple.com>
230 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
231 * cp-tree.h (defer_fn): Delete.
232 * decl2.c (defer_fn): Delete.
233 (finish_file): Simplify deferred_fns loops; check that
234 only used inline functions get into deferred_fns.
235 (mark_used): Inline previous contents of defer_fn.
237 2004-06-16 Richard Henderson <rth@redhat.com>
239 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
240 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
241 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
242 of CTOR_INITIALIZER ...
243 (pp_cxx_statement): ... here.
244 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
245 (finish_function): Use alloc_stmt_list to zap entire function.
246 * parser.c (cp_parser_compound_statement): Update commentary.
247 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
248 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
249 (finish_stmt_expr): Don't look through COMPOUND_STMT.
251 2004-06-16 Geoffrey Keating <geoffk@apple.com>
253 * pt.c (mark_decl_instantiated): Don't call defer_fn.
255 2004-06-16 Richard Henderson <rth@redhat.com>
257 * parser.c (cp_parser_labeled_statement): Update commentary.
258 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
259 * tree.c (mark_local_for_remap_r): Likewise.
261 2004-06-16 Richard Henderson <rth@redhat.com>
263 * parser.c (cp_parser_asm_definition): Update commentary.
264 * pt.c (tsubst_expr): Use ASM_EXPR.
265 * semantics.c (finish_asm_stmt): Likewise.
267 2004-06-16 Richard Henderson <rth@redhat.com>
269 * decl.c (finish_destructor_body): Use LABEL_EXPR.
270 * parser.c (cp_parser_statement): Update commentary.
271 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
272 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
273 * tree.c (mark_local_for_remap_r): Likewise.
275 2004-06-16 Richard Henderson <rth@redhat.com>
278 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
279 statement in FOR_INIT_STMT for templates.
281 2004-06-15 Richard Henderson <rth@redhat.com>
283 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
284 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
285 (genericize_try_block): Use gimplify_stmt.
286 (genericize_catch_block, genericize_eh_spec_block): Likewise.
287 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
288 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
289 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
290 (cp_tree_chain_matters_p): Remove.
291 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
292 (COMPOUND_STMT_BODY_BLOCK): New.
293 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
294 (EXPR_STMT_STMT_EXPR_RESULT): New.
295 (building_stmt_tree): Check cur_stmt_list.
296 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
297 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
298 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
299 (cp_finish_decl): Use push_cleanup.
300 (start_function, finish_function): Use statement lists.
301 (finish_stmt): Do nothing.
302 * except.c (begin_eh_spec_block): Use statement lists.
303 (check_handlers_1, check_handlers): Likewise.
304 * init.c (construct_virtual_base): Don't add extra compound stmts.
305 (build_vec_init): Likewise.
306 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
307 * name-lookup.h (struct cp_binding_level): Add statement_list.
308 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
309 (cp_parser_labeled_statement, cp_parser_expression_statement,
310 cp_parser_statement_seq_opt): Likewise.
311 (cp_parser_compound_statement): Likewise. Take bool for try block.
312 (cp_parser_selection_statement): Tidy if processing.
313 (cp_parser_already_scoped_statement): Rewrite to do what it says.
314 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
315 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
316 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
317 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
318 (finish_cond): New, rewritten from FINISH_COND.
319 (simplify_loop_decl_cond): New.
320 (finish_expr_stmt): Avoid nested EXPR_STMTs.
321 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
322 begin_else_clause, finish_else_clause, finish_if_stmt,
323 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
324 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
325 finish_for_cond, finish_for_stmt, begin_switch_stmt,
326 finish_switch_cond, finish_switch_stmt, begin_try_block,
327 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
328 finish_handler_sequence, finish_function_handler_sequence,
329 begin_handler, finish_handler_parms, finish_handler,
330 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
331 using statement lists.
332 (begin_compound_stmt): Replace has_no_scope argument with flags.
333 Update all callers. Use statement lists.
334 (finish_compound_stmt): Likewise.
335 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
336 (current_scope_stmt_stack): Remove.
337 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
338 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
339 Rewrite with statement lists.
341 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
343 * parser.c: Change all assignments of c_lex_string_translate
344 to true and false to 1 and 0.
345 (cp_lexer_read_token): Convert type of the translated string.
346 (cp_parser_skip_to_closing_parentheses): Preserve original
347 value of c_lex_string_translate, and set it to -1 while
349 (cp_parser_cache_group): Likewise.
350 (cp_parser_cache_group_1): Renamed.
351 (cp_parser_asm_operand_list): Remove redundant setting of
352 c_lex_string_translate.
353 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
354 Handle chained strings.
356 2004-06-12 Andrew Pinski <apinski@apple.com>
360 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
362 * cp-tree.h: Fix typo.
364 * cp-tree.h: Include cgraph.h
365 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
366 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
368 2004-06-12 Jason Merrill <jason@redhat.com>
370 PR tree-optimization/14107
371 * decl.c (finish_function): Warn about no return in all functions.
373 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
375 * cp-tree.h (struct language_function): Remove cannot_inline.
376 * decl.c (save_function_data): cannot_inline is no more.
377 (cxx_push_function_context): Likewise.
378 * decl2.c (start_objects, start_static_storage_duration_function):
379 Reset DECL_INLINE, set DECL_UNINLINABLE.
381 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
384 * search.c (lookup_field): Propagate the ambiguity list.
385 (lookup_fnfields): Likewise.
387 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
390 * parser.c (cp_parser_template_name): Ctors/dtors never need a
391 template keyword to disambiguate.
393 2004-06-14 Mark Mitchell <mark@codesourcery.com>
396 * decl.c (grokdeclarator): Ignore pointer-to-members when
397 computing template depth.
400 * name-lookup.c (pushtag): Do not try to put class declarations in
401 explicit specialization scopes.
403 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
405 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
407 2004-06-11 Mark Mitchell <mark@codesourcery.com>
410 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
411 bindings for undeclared built-ins.
413 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
415 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
416 appear at the correct location.
418 2004-06-10 Jason Merrill <jason@redhat.com>
422 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
423 * init.c (build_offset_ref): Build SCOPE_REF with non-null
424 TREE_TYPE for non-dependent names.
425 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
426 unknown_type_node as its TREE_TYPE.
427 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
428 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
429 (dump_expr) <SCOPE_REF case>: Likewise.
431 2004-06-10 Mark Mitchell <mark@codesourcery.com>
434 * parser.c (cp_parser_direct_declarator): Robustify.
437 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
438 constants in non-dependent contexts.
442 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
445 2004-06-10 Jakub Jelinek <jakub@redhat.com>
448 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
451 2004-06-09 Mark Mitchell <mark@codesourcery.com>
455 2004-06-07 Mark Mitchell <mark@codesourcery.com>
456 * lex.c (handle_pragma_interface): Deprecate.
457 (handle_pragma_implementation): Likewise.
459 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
461 * g++spec.c (lang_specific_driver): Remove check for -lm
462 and -lmath when check it see if it was the math library.
464 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
467 * parser.c (cp_parser_direct_declarator): Reject constructor named
468 as qualified template-id.
470 2004-06-07 Mark Mitchell <mark@codesourcery.com>
473 * lex.c (handle_pragma_interface): Deprecate.
474 (handle_pragma_implementation): Likewise.
476 2004-06-07 Mark Mitchell <mark@codesourcery.com>
479 * parser.c (cp_parser_iteration_statement): Fix typo in error
483 * pt.c (tsubst_default_argument): Do not defer access checks
484 while substituting into the default argument.
487 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
488 constant in a non-dependent context.
491 * except.c (build_throw): Ensure that temp_expr has been
494 2004-06-06 Roger Sayle <roger@eyesopen.com>
496 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
498 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
501 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
502 'typename', and accept 'template'.
504 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
505 Jan Hubicka <jh@suse.cz>
508 * method.c (use_think): Do not mark thunk as referenced.
510 2004-06-03 Matt Austern <austern@apple.com>
513 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
514 is nonzero, and if we see a noninline definition of a key method,
515 make the vtables nonweak.
517 2004-06-02 Matt Austern <austern@apple.com>
519 * cp-tree.h (instantiate_decl): new boolean parameter,
520 undefined_ok. Current behavior is equivalent to its being 0.
521 * decl2.c (mark_used): Add new argument when calling instantiate_decl
522 * pt.c (mark_decl_instantiated): Unconditionally make
523 instantiations explicit unconditionally
524 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
525 since mark_decl_instantiated now does it.
526 (instantiate_class_member): New. Instantiate a member of an
527 explicitly instantiated class template.
528 (do_type_instantiation): Explicitly instantiate members of an
529 explicitly instantiated class template.
530 (instantiate_decl): if undefined_ok is nonzero, and if we're
531 trying to explicitly instantiated a template with no definition,
532 change it to an implicit instantiation.
533 (instantiate_pending_templates): Add new argument to instantiate_decl.
534 * tree.c (cp_cannot_inline_tree_fn): Likewise.
536 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
538 * cp-tree.h: Fix typo.
540 * cp-tree.h: Include cgraph.h
541 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
542 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
544 2004-06-01 Jason Merrill <jason@redhat.com>
547 * call.c (call_builtin_trap): Remove type parm.
548 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
549 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
551 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
554 * init.c (build_offset_ref): Build SCOPE_REF with non-null
555 TREE_TYPE for non-dependent names.
556 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
557 unknown_type_node as its TREE_TYPE.
558 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
559 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
560 (dump_expr) <SCOPE_REF case>: Likewise.
562 2004-06-01 Richard Henderson <rth@redhat.com>
563 Andrew Pinski <pinskia@physics.uc.edu>
565 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
566 * parser.c (struct cp_parser): Remove in_offsetof.
567 (cp_parser_new): Don't set it.
568 (cp_parser_unary_expression): Don't check it.
569 (cp_parser_postfix_open_square_expression): Split out from ...
570 (cp_parser_postfix_expression): ... here.
571 (cp_parser_postfix_dot_deref_expression): Likewise.
572 (cp_parser_builtin_offsetof): New.
573 (cp_parser_primary_expression): Use it.
575 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
578 * parser.c (cp_parser_postfix_expression): Allow subscript
579 operator in offsetof.
581 2004-05-31 Mark Mitchell <mark@codesourcery.com>
584 * friend.c (add_friend): Do not try to perform access checks for
585 functions from dependent classes.
587 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
589 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
590 (pp_cxx_begin_template_argument_list): Turn into a function.
591 (pp_cxx_end_template_argument_list): Likewise.
592 (pp_cxx_separate_with): Define.
593 (pp_cxx_unqualified_id): Tidy.
594 (pp_cxx_primary_expression): Likewise.
595 (pp_cxx_postfix_expression): Likewise.
596 (pp_cxx_expression): Likewise.
597 (pp_cxx_simple_type_specifier): Likewise.
598 (pp_cxx_type_specifier_seq): Likewise.
599 (pp_cxx_parameter_declaration_clause): Likewise.
600 (pp_cxx_exception_specification): Likewise.
601 (pp_cxx_direct_declarator): Likewise.
602 (pp_cxx_type_id): Likewise.
603 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
605 (pp_cxx_left_paren): Likewise.
606 (pp_cxx_right_paren): Likewise.
607 (pp_cxx_left_brace): Likewise.
608 (pp_cxx_right_brace): Likewise.
609 (pp_cxx_left_bracket): Likewise.
610 (pp_cxx_right_bracket): Likewise.
611 (pp_cxx_dot): Likewise.
612 (pp_cxx_identifier): Likewise.
613 (pp_cxx_tree_identifier): Likewise.
614 (pp_cxx_ampersand): New macro.
615 (pp_cxx_star): Likewise.
616 (pp_cxx_arrow): Likewise.
617 (pp_cxx_semicolon): Likewise.
618 (pp_cxx_complement): Likewise.
619 (pp_cxx_begin_template_argument_list): Declaree.
620 (pp_cxx_end_template_argument_list): Likewise.
621 (pp_cxx_colon_colon): likewise.
623 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
625 * parser.c (cp_parser_simple_type_specifier): Explicitly test
628 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
630 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
631 typeck.c: Fix comment formatting.
633 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
635 * cp-lang.c (cp_expand_decl): Remove.
636 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
638 2004-05-30 Andreas Jaeger <aj@suse.de>
640 * lang-specs.h: Add missing initializers for .ii.
642 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
644 * decl.c (cp_make_fname_decl): Free return value from
647 2004-05-28 Mark Mitchell <mark@codesourcery.com>
650 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
652 * init.c (build_new): Likewise.
655 * name-lookup.c (arg_assoc): Robustify.
658 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
659 when determining the scope to use for a pointer to member.
660 (lookup_anon_field): Give it external linkage.
661 * cp-tree.h (lookup_anon_field): Declare it.
662 * expr.c (cplus_expand_constant): Use it.
664 2004-05-28 Mark Mitchell <mark@codesourcery.com>
667 * parser.c (cp_parser_simple_type_specifier): Call
668 maybe_note_name_used_in_class.
670 2004-05-28 Tom Marshall <tmarshall@real.com>
673 * class.c (finish_struct_1): Warn only if the dtor is non-private or
674 the class has friends.
676 2004-05-27 Adam Nemet <anemet@lnxw.com>
679 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
680 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
682 2004-05-24 Geoffrey Keating <geoffk@apple.com>
684 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
685 if it might be needed.
686 * pt.c (mark_decl_instantiated): Only call defer_fn if
687 the function actually needs processing in finish_file.
688 * decl2.c (finish_file): Add check that elements in
689 deferred_fns_used are really needed there. Remove unnecessary
690 test of DECL_SAVED_TREE.
692 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
694 * Make-lang.in: No need to specify $(LIBCPP).
696 2004-05-23 Mark Mitchell <mark@codesourcery.com>
699 * parser.c (cp_parser_class_head): Robustify.
702 * parser.c (cp_parser_decl_specifier_seq): Correct error in
704 (cp_parser_constructor_declarator_p): Treat attributes
708 * typeck.c (build_unary_op): Do not attempt to resolve casts to
709 base classes in templates.
711 2004-05-23 Mark Mitchell <mark@codesourcery.com>
714 * pt.c (instantiate_template): Robustify.
716 2004-05-23 Mark Mitchell <mark@codesourcery.com>
719 * decl.c (xref_tag): Issue errors about redeclaring template
720 classes as non-template classes.
722 2004-05-23 Mark Mitchell <mark@codesourcery.com>
725 * name-lookup.c (supplement_binding): Allow redefinitions of
729 * parser.c (cp_parser_template_argument): Robustify.
731 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
733 * class.c (alter_access): Use %E format specifier to print an
734 identifier node. Avoid looking at the IDENTIFIER_POINTER.
735 (push_lang_context): Likewise.
736 * decl.c (lookup_label): Likewise.
737 (grokdeclarator): Likewise.
738 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
739 * pt.c (do_type_instantiation): Likewise.
740 * tree.c (handle_java_interface_attribute): Likewise.
741 (handle_com_interface_attribute): Likewise.
742 (handle_init_priority_attribute): Likewise.
744 2004-05-22 Mark Mitchell <mark@codesourcery.com>
748 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
749 recognized as overloaded functions.
751 2004-05-22 Mark Mitchell <mark@codesourcery.com>
754 * class.c (layout_nonempty_base_or_field): Do not try to avoid
755 layout conflicts for unions.
758 * typeck.c (build_x_unary_op): Instantiate template class
759 specializations before looking for "operator &".
762 * typeck.c (complete_type): Layout non-dependent array types, even
766 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
769 2004-05-22 Roger Sayle <roger@eyesopen.com>
771 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
772 returning when TREE_TYPE is error_mark_node.
773 * typeck.c (require_complete_type): Return error_mark_node if
774 value's type is an error_mark_node.
776 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
778 * optimize.c (calls_setjmp_r): Remove.
779 (calls_setjmp_p): Remove.
780 * cp-tree.c (calls_setjmp_p): Remove.
781 * decl.c (finish_function): Do not call calls_setjmp_p.
783 2004-05-18 Zack Weinberg <zack@codesourcery.com>
785 * decl.c (cp_finish_decl): Use mark_decl_referenced.
786 * decl2.c (maybe_make_one_only): Likewise.
787 * method.c (use_thunk): Likewise.
789 2004-05-18 Jason Merrill <jason@redhat.com>
791 * class.c (build_base_path): Tidy a bit.
793 2004-05-14 Geoffrey Keating <geoffk@apple.com>
795 * name-lookup.c (struct scope_binding): New.
796 (EMPTY_SCOPE_BINDING): New.
797 (lookup_using_namespace): Take a scope_binding instead of a
799 (qualified_lookup_using_namespace): Likewise.
800 (cxx_binding_clear): Delete.
801 (do_nonmember_using_decl): Use a scope_binding instead of a
803 (lookup_tag): Don't call select_decl.
804 (ambiguous_decl): Don't return anything (and change callers to match).
805 Take a scope_binding as the second parameter.
806 (lookup_namespace_name): Use a scope_binding instead of a
808 (unqualified_namespace_lookup): Likewise.
809 (lookup_qualified_name): Likewise.
810 (select_decl): Take a scope_binding instead of a cxx_binding.
811 Use macros rather than hand-coding tests for type-ness.
813 2004-05-13 Diego Novillo <dnovillo@redhat.com>
815 * cp-gimplify.c: Rename from cp-simplify.c.
816 * Make-lang.in, optimize.c: Update.
818 2004-05-13 Diego Novillo <dnovillo@redhat.com>
820 Merge from tree-ssa-20020619-branch. See
821 ChangeLog.tree-ssa for details.
823 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
824 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
825 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
826 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
828 * cp-mudflap.c: New file.
829 * cp-simplify.c:: New file.
831 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
834 * decl2.c (check_classfn): For member templates, compare also the
835 template parameters to match the declaration.
836 * cp-tree.h: Adjust declaration of check_classfn.
837 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
838 * friend.c (do_friend): Likewise.
839 * pt.c (tsubst_friend_function): Likewise.
841 2004-05-01 Zack Weinberg <zack@codesourcery.com>
843 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
844 Instead, dig into the representation type to find the array bound.
846 2004-04-30 Jason Merrill <jason@redhat.com>
848 Refer to base members using COMPONENT_REFs where possible.
849 * class.c (build_simple_base_path): New fn.
850 (build_base_path): Use it for non-virtual base references.
851 (layout_class_type): Change base fields to their real type
852 after layout is done.
853 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
854 * cp-lang.c (cxx_get_alias_set): Use it.
856 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
858 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
861 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
864 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
865 used in integral constant expressions.
867 2004-04-22 Mark Mitchell <mark@codesourcery.com>
869 * init.c (build_aggr_init): Fix accidental use of C99 construct in
872 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
874 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
875 * decl.c (reshape_init): Use it.
876 * init.c (perform_member_init): Remove redundant condition.
877 (build_aggr_init): Adjust to handle brace-enclosed initializers
879 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
881 * parser.c (cp_parser_initializer_clause): Do not set
882 TREE_HAS_CONSTRUCTOR on the initializer.
883 * rtti.c (tinfo_base_init): Likewise.
884 (generic_initializer): Likewise.
885 (ptr_initializer): Likewise.
886 (ptm_initializer): Likewise.
887 (class_initializer): Likewise.
888 (get_pseudo_ti_init): Likewise.
889 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
891 2004-04-22 Alan Modra <amodra@bigpond.net.au>
893 * name-lookup.c (anonymous_namespace_name): Make static.
895 2004-04-19 Roger Sayle <roger@eyesopen.com>
898 * class.c (build_base_path): Call fold whilst building the NULL
899 pointer check expression trees.
901 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
903 * init.c (build_new_1): Don't use type size argument for Java
904 _Jv_AllocObject call.
906 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
908 * method.c (make_alias_for_thunk): Remove preprocessor guard on
909 declaration and definition.
911 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
914 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
917 2004-04-08 Jakub Jelinek <jakub@redhat.com>
919 * decl2.c (mark_used): Don't segfault if cfun != NULL but
920 current_function_decl == NULL.
922 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
925 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
928 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
930 * init.c (decl_constant_value): Don't look at DECL_INITIAL
932 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
933 or TREE_SIDE_EFFECTS of a type.
935 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
938 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
939 cv-qualifier unification.
940 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
942 2004-04-02 Jan Hubicka <jh@suse.cz>
944 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
945 * cp-tree.h (cp_update_decl_after_saving): Declare.
946 * tree.c (cp_update_decl_after_saving): Define.
948 2004-04-01 Mark Mitchell <mark@codesourcery.com>
951 * typeck.c (get_delta_difference): Call fold before returning the
954 2004-04-01 Richard Henderson <rth@redhat.com>
957 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
958 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
960 2004-04-01 Mark Mitchell <mark@codesourcery.com>
963 * name-lookup.c (maybe_push_cleanup_level): Robustify.
965 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
967 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
969 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
971 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
972 * class.c (check_bitfield_decl): Likewise.
973 * cvt.c (type_promotes_to): Likewise.
974 * decl.c (finish_enum): Likewise.
975 * mangle.c (write_builtin_type): Likewise.
976 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
977 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
978 (build_binary_op): Likewise.
980 2004-03-31 Jan Hubicka <jh@suse.cz>
982 * tree.h (optimize_function): Kill prototype.
983 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
984 * semantics.c (expand_body): Kill.
986 2004-03-30 Mark Mitchell <mark@codesourcery.com>
989 * decl.c (start_decl_1): Do not decide whether or not to create a
990 new cleanup level until after the type has been completed.
993 * pt.c (tsubst_default_argument): Clear current_function_decl.
995 2004-03-30 Zack Weinberg <zack@codesourcery.com>
997 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
999 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1001 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1002 is null, just print the literal name and return.
1004 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1006 * cxx-pretty-print.c: Fix comment typos.
1008 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1010 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1013 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1015 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1016 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1019 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1021 PR 12267, 12391, 12560, 13129, 14114, 14133
1022 * cp-lang.c (c_reset_state): Delete.
1023 (push_file_scope, pop_file_scope): New stubs.
1024 * parser.c (c_parse_file): Call sorry() here if called more than once.
1026 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1028 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1031 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1033 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1035 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1037 * error.c (enum pad): Remove.
1038 (dump_qualifiers): Likewise.
1039 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1040 (dump_aggr_type): Likewise.
1041 (dump_type_suffix): Likewise.
1042 (dump_simple_decl): Likewise.
1043 (dump_function_decl): Likewise.
1044 (cv_to_string): Likewise.
1045 (dump_type_prefix): Likewise. Adjust return void.
1046 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1048 (pp_cxx_template_keyword_if_needed): Document.
1049 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1050 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1051 MUST_NOT_THROW_EXPR.
1053 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1056 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1057 templates, if their type is non-dependent.
1059 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1061 * call.c (build_op_delete_call): Do not forget the placement
1062 arguments when iterating through mutiple delete operators.
1064 * cp-tree.h (svaed_scope): Remove last_parms.
1065 (NEW_DELETE_OPNAME_P): New macro.
1066 (last_function_parms): Remove.
1067 (do_friend): Adjust prototype.
1068 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1069 using last_function_parms.
1070 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1071 using last_function_parms.
1072 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1073 for class-specific operator new and operator delete.
1074 (grok_op_properties): Do not look for allocation functions with
1076 (start_function): Use DECL_ARGUMENTS instead of
1077 last_function_parms.
1078 * decl.h (last_function_parms): Do not declare.
1079 * decl2.c (grokclassfn): Do not use last_function_parms.
1080 * friend.c (do_friend): Remove parmdecls parameter.
1081 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1082 (pop_from_top_level): Do not restore it.
1083 * pt.c (check_explicit_specialization): Do not adjust
1084 last_function_parms.
1086 * name-lookup.c (do_local_using_decl): Create a local binding for
1087 types brought in via using declarations.
1089 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1090 function declarations correctly.
1092 * semantics.c (finish_id_expression): Correct handling of
1093 conversion operators to dependent types.
1095 * typeck.c (lookup_destructor): Allow the use of destructors from
1098 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1100 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1101 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1102 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1103 the field is named TEMPLATE_TYPE_PARM_INDEX.
1105 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1108 * parser.c (cp_parser_functional_cast): A cast to anything
1109 but integral or enumaration type is not an integral constant
1111 * pt.c (value_dependent_expression_p): Handle cast expressions
1112 without operands (such as "int()").
1114 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1116 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1117 cv-qualification between the type named by the
1118 pseudo-destructor-name and the object-type.
1120 * search.c (accessible_base_p): Handle non-proper bases.
1122 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1123 refers to a single overloaded function, set the type of the
1125 * tree.c (lvalue_type): Simplify.
1126 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1128 (build_unary_op): Handle OVERLOADs with known types.
1130 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1133 * parser.c (cp_parser_postfix_expression): Handle the use of
1134 "typename" in non-dependent contexts. Convert appropriately when
1135 when using a qualified name after "->" or ".".
1137 * call.c (conditional_conversion): Honor the requirement that some
1138 conversions refer to the original object.
1140 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1142 * call.c (build_conditional_expr): Do not call force_rvalue for
1143 operands of void_type when the conditional expression itself has
1145 * name-lookup.c (pushdecl): Don't consider a declaration of a
1146 function named "main" to be an overload of a type named "main".
1147 * parser.c (cp_parser_template_name): Perform name lookup when the
1148 template name is proceeded by "template" if the qualifying scope
1150 * typeck.c (composite_pointer_type_r): Correctly handle
1151 pointer-to-member types.
1152 (build_const_cast): Likewise.
1154 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1156 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1157 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1158 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1159 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1160 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1161 (TYPEOF_TYPE_EXPR): New macro.
1162 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1163 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1164 * pt.c (tsubst): Likewise.
1165 * semantics.c (finish_typeof): Likewise.
1166 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1167 and TEMPLATE_TYPE_PARM.
1168 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1169 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1171 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1174 * cp-tree.h (build_new_op): Change prototype.
1175 (build_x_binary_op): Likewise.
1176 * call.c (build_new_op): Add overloaded_p parameter.
1177 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1178 * parser.c (cp_parser_binary_expression): Note that uses of
1179 overloaded operators prevents an expression from being considered
1180 an integral constant.
1181 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1183 * semantics.c (finish_call_expr): Likewise.
1184 * typeck.c (rationalize_conditional_expr): Likewise.
1185 (build_x_indirect_ref): Likewise.
1186 (build_x_binary_op): Likewise.
1187 (build_x_unary_op): Likewise.
1188 (build_x_compound_expr): Likewise.
1189 (build_modify_expr): Likewise.
1190 * typeck2.c (build_x_arrow): Likewise.
1192 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1194 * cp-lang.c, ptree.c: Update copyright.
1196 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1199 * parser.c (cp_parser_non_integral_constant_expression): Encode
1200 more of the idiom that surrounded calls to this function within
1202 (cp_parser_primary_expression): Adjust accordingly.
1203 (cp_parser_postfix_expression): Likewise.
1204 (cp_parser_unary_expression): Likewise.
1205 (cp_parser_cast_expression): Likewise.
1206 (cp_parser_assignment_expression): Likewise.
1207 (cp_parser_expression): Likewise.
1208 (cp_parser_new_expression): Note that new-expressions are not
1209 allowed in integral constant expressions.
1210 (cp_parser_delete_expression): Likewise.
1212 2004-03-12 Matt Austern <austern@apple.com>
1214 * decl2.c (maybe_make_one_only): Look at
1215 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1216 to make an explicit instantiation weak.
1217 * method.c (use_thunk): Make sure we call comdat_linkage
1219 * pt.c (do_type_instantiation): On systems where weak symbols
1220 don't go in a static archive's TOC, explicit instantiation of a
1221 class must imply *explicit* instantiation of its memeber.
1223 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1225 * call.c, cp-tree.h, pt.c: Fix comment typos.
1227 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1230 * decl.c (xref_tag): Disregard non-type declarations when
1231 looking up a tagged type.
1233 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1236 * call.c (convert_like_real): Build a const qualified temporary,
1237 when testing ctor access.
1239 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1241 * call.c (initialize_reference): Fix typo.
1243 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1246 * pt.c (determine_specialization): For member templates, match also
1250 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1252 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1254 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1257 * call.c (initialize_reference): Handle initializers that are
1258 class-member access expressions applies to rvalues.
1260 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1263 * name-lookup.c (supplement_binding): Ignore functions that are
1264 marked DECL_ANTICIPATED.
1266 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1269 * class.c (check_field_decls): Complain about non-static data
1270 members of reference type in unions. Propagate
1271 CLASSTYPE_REF_FIELDS_NEED_INIT and
1272 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1274 * init.c (perform_member_init): Complain about mbmers with const
1275 type that are not explicitly initialized.
1277 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1279 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1280 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1281 (lang_identifier): Remove implicit_decl and error_locus.
1282 (IDENTIFIER_IMPLICIT_DECL): Remove.
1283 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1284 (IDENTIFIER_ERROR_LOCUS): Likewise.
1285 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1286 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1287 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1288 (implicitly_declare): Remove.
1289 * decl.c (warn_extern_redeclared_static): Remove check of
1290 IDENTIFIER_IMPLICIT_DECL.
1291 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1292 (implicitly_declare): Remove.
1293 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1294 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1295 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1296 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1297 in the innermost scope, rather than at namespace scope.
1298 * name-lookup.c (push_local_binding): Give it external linkage.
1299 (pushdecl): Remove dead code.
1300 * name-lookup.h (push_local_binding): Declare it.
1301 * ptree.c (cxx_print_identifier): Don't print
1302 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1303 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1304 not IDENTIFIER_ERROR_LOCUS.
1305 * typeck.c (build_function_call): Remove dead code.
1307 2004-03-08 Jason Merrill <jason@redhat.com>
1310 * decl.c (xref_tag): Remove attribute handling.
1311 * cp-tree.h: Adjust prototype.
1312 * decl.c, parser.c, rtti.c: Adjust callers.
1313 * parser.c (cp_parser_class_head): Pass back attributes in the
1315 (cp_parser_class_specifier): Adjust.
1317 2004-03-08 Matt Austern <austern@apple.com>
1320 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1321 as static, to static_decls array.
1323 2004-03-05 Jason Merrill <jason@redhat.com>
1325 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1327 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1329 * decl.c (grokfndecl): Update old incorrect comment.
1330 (grokvardecl): Diagnose C++ variables of type with no linkage.
1332 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1335 * pt.c (build_non_dependent_expr): Do not create a
1336 NON_DEPENDENT_EXPR for a THROW_EXPR.
1338 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1341 * error.c (dump_expr): Handle THROW_EXPR.
1343 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1346 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1347 lookup if ordinary name-lookup finds a non-function.
1348 * pt.c (tsubst_copy_and_build): Likewise.
1351 * parser.c (cp_parser_late_parsing_default_args): Check that there
1352 are no extra tokens after the end of the default-argument
1355 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1358 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1359 having C++ linkage for name-mangling purposes.
1362 * parser.c (cp_parser_direct_declarator): Recognize constructor
1363 declarators that use a template-id to name the class being
1367 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1368 (tsubst_expr): Do not call tsubst_copy, even when
1369 processing_template_decl.
1371 2004-03-01 Jeff Law <law@redhat.com>
1373 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1376 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1379 * name-lookup.h (push_scope): Change prototype.
1380 * name-lookup.c (push_scope): Do not reenter the current class
1382 * decl.c (grokfndecl): Check return code from push_scope before
1384 * decl2.c (check_classfn): Likewise.
1385 * parser.c (cp_parser_conversion_function_id): Likewise.
1386 (cp_parser_init_declarator): Likewise.
1387 (cp_parser_direct_declarator): Likewise.
1388 (cp_parser_class_specifier): Likewise.
1389 (cp_parser_class_head): Likewise.
1390 (cp_parser_lookup_name): Likewise.
1391 (cp_parser_constructor_declarator_p): Likewise.
1392 * pt.c (instantiate_class_template): Likewise.
1393 (resolve_typename_type): Likewise.
1395 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1398 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1402 * class.c (update_vtable_entry_for_fn): Do not go through
1403 covariance machinery if the type returned by an overrider is the
1404 same as the original.
1406 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1408 * call.c: Fix a comment typo.
1410 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1412 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1414 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1417 * parser.c (cp_parser_parameter_declaration_list): Commit
1418 to fewer tentative parses.
1420 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1423 * pt.c (dependent_type_p_r): A template template parameter is a
1426 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1429 * mangle.c (write_template_arg_literal): Don't rely on identity for
1432 2004-02-24 Jason Merrill <jason@redhat.com>
1434 * tree.c (build_exception_variant): Use check_qualified_type.
1436 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1437 Kazu Hirata <kazu@cs.umass.edu>
1439 * decl.c (cxx_init_decl_processing): Don't check
1440 flag_writable_strings.
1442 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1445 * typeck.c (maybe_warn_about_returning_address_of_location):
1446 Change check for VAR_DECL to use DECL_P instead.
1448 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1451 * cvt.c (build_expr_type_conversion): Type must be complete before
1452 looking up for conversions.
1454 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1457 * name-lookup.c (arg_assoc_class): Don't look into template
1458 arguments if it is not a primary template.
1460 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1463 * method.c (use_thunk): Always clone function argument tree.
1465 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1468 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1471 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1472 for all type variants.
1474 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1477 * decl.c (duplicate_decls): Return error_mark_node for invalid
1479 * name-lookup.c (push_namespace): Ignore the return value from
1481 * pt.c (push_template_decl_real): Robustify.
1484 * name-lookup.c (push_class_level_binding): Do not complain about
1485 adding a binding for a member whose name is the same as the
1486 enclosing class if the member is located in a base class of the
1489 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1492 * parser.c (cp_parser_new_expression): Parse an ill-formed
1493 direct-new-declarator after a parenthesized type-id to emit good
1496 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1498 * cp-tree.def, cvt.c: Update copyright.
1500 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1503 * cp-tree.h (abi_version_at_least): Remove.
1504 * mangle.c: Include flags.h.
1506 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1509 * call.c (build_conditional_expr): Handle conversions between
1510 class types which result in differently cv-qualified type
1514 * class.c (delete_duplicate_fields_1): Remove.
1515 (delete_duplicate_fields): Likewise.
1516 (finish_struct_anon): Remove check for members with the same name
1517 as their enclosing class.
1518 (check_field_decls): Do not call duplicate_fields.
1519 * decl.c (grokdeclarator): Remove check for static data members
1520 with the same name as their enclosing class.
1521 * name-lookup.c (push_class_level_binding): Check for members with
1522 the same name as their enclosing class.
1524 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1527 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1529 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1532 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1533 has full set of arguments.
1535 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1538 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1540 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1543 * cp-tree.h (delete_sanity): Change prototype.
1544 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1545 Remove dead code. Adjust code to warn about deleting an array.
1546 * typekc.c (decay_conversion): Use build_address and build_nop.
1549 * search.c (accessible_p): Do not check access in thunks.
1552 * call.c (build_conditional_expr): Call force_rvalue on the
1553 non-void operand in the case that one result is a throw-expression
1554 and the other is not.
1556 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1559 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1560 the type name and look ahead for ::~, and bail out early with a
1561 better error message if the parse is going to fail.
1563 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1565 * call.c (conversion_kind): New type.
1566 (conversion_rank): Likewise.
1567 (conversion): Likewise.
1568 (CONVERSION_RANK): New macro.
1569 (conversion_obstack): New variable.
1570 (obstack_initialized): Likewise.
1571 (z_candidate): Change type of convs and second_conv.
1572 (candidate_warning): New type.
1573 (IDENTITY_RANK): Remove.
1574 (EXACT_RANK): Likewise.
1575 (PROMO_RANK): Likewise.
1576 (STD_RANK): Likewise.
1577 (PBOOL_RANK): Likewise.
1578 (USER_RANK): Likewise.
1579 (ELLIPSIS_RANK): Likewise.
1580 (BAD_RANK): Likewise.
1581 (ICS_RANK): Likewise.
1582 (ICS_STD_RANK): Likewise.
1583 (ICS_USER_FLAG): Likewise.
1584 (ICS_ELLIPSIS_FLAG): Likewise.
1585 (ICS_THIS_FLAG): Likewise.
1586 (ICS_BAD_FLAG): Likewise.
1587 (NEED_TEMPORARY_P): Likewise.
1588 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1589 (USER_CONV_CAND): Likewise.
1590 (USER_CONV_FN): Likewise.
1591 (conversion_obstack_alloc): New function.
1592 (alloc_conversion): Likewise.
1593 (validate_conversion_obstack): Likewise.
1594 (alloc_conversions): Likewise.
1595 (build_conv): Adjust to deal with new conversion data structures.
1596 (build_identity_conv): New function.
1597 (build_ambiguous_conv): Likewise.
1598 (standard_conversion): Adjust to deal with new conversion data
1600 (convert_class_to_reference): Likewise.
1601 (direct_reference_binding): Likewise.
1602 (reference_binding): Likewise.
1603 (implicit_conversion): Likewise.
1604 (add_candidate): Likewise.
1605 (add_function_candidate): Likewise.
1606 (add_conv_candidate): Likewise.
1607 (build_builtin_candidate): Likewise.
1608 (print_z_candidate): Likewise.
1609 (merge_conversion_sequences): Likewise.
1610 (build_user_type_conversion_1): Likewise.
1611 (build_user_type_conversion): Likewise.
1612 (build_new_function_call): Likewise.
1613 (build_object_call): Likewise.
1614 (conditional_conversion): Likewise.
1615 (build_conditional_expr): Likewise.
1616 (build_new_op): Likewise.
1617 (build_op_delete_call): Likewise.
1618 (convert_like_real): Likewise.
1619 (build_over_call): Likewise.
1620 (build_new_method_call): Likewise.
1621 (is_subseq): Likewise.
1622 (maybe_handle_implicit_object): Likewise.
1623 (maybe_handle_ref_bind): Likewise.
1624 (compare_ics): Likewise.
1625 (source_type): Likewise.
1626 (add_warning): Likewise.
1628 (can_convert_arg): Likewise.
1629 (can_convert_arg_bad): Likewise.
1630 (perform_implicit_conversion): Likewise.
1631 (perform_direct_initialization_if_possible): Likewise.
1632 (initialize_reference): Likewise.
1633 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1634 * cp-tree.def (WRAPPER): Likewise.
1635 (IDENTITY_CONV): Remove.
1636 (LVALUE_CONV): Likewise.
1637 (QUAL_CONV): Likewise.
1638 (STD_CONV): Likewise.
1639 (PTR_CONV): Likewise.
1640 (PMEM_CONV): Likewise.
1641 (BASE_CONV): Likewise.
1642 (REF_BIND): Likewise.
1643 (USER_CONV): Likewise.
1644 (AMBIG_CONV): Likewise.
1645 (RVALUE_CONV): Likewise.
1646 * cp-tree.h (tree_wrapper): Remove.
1647 (WRAPPER_ZC): Remove.
1648 (lang_tree_node): Remove wrapper.
1649 (LOOKUP_SPECULATIVELY): Remove.
1650 (build_op_delete_call): Adjust prototype.
1651 (validate_conversion_obstack): Declare.
1652 (build_zc_wrapper): Remove.
1653 * cvt.c (convert_to_reference): Remove dead code.
1654 (ocp_convert): Likewise.
1655 * decl.c (redeclaration_error_message): Correct handling of
1657 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1658 (cp_tree_node_structure): Remove WRAPPER case.
1659 * decl2.c (finish_file): Call validate_conversion_obstack.
1660 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1661 (build_op_delete_call): Likewise.
1662 (build_x_delete): Likewise.
1663 (build_delete): Adjust call to build_op_delete_call.
1664 * pt.c (tsubst_friend_declaration): Adjust code to determine
1665 whether or not a friend template is a definition.
1666 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1667 * tree.c (build_zc_wrapper): Remove.
1669 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1671 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1672 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1673 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1674 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1676 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1678 * typeck.c (lookup_destructor): Fix typo in error message.
1680 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1682 * call.c, parser.c, tree.c: Fix comment typos.
1684 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1687 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1688 * decl.c (duplicate_decls, start_function): Likewise.
1690 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1692 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1693 * parser.c (free_parser_stacks): Delete.
1695 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1697 * rtti.c: Update copyright.
1699 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1702 * decl.c (require_complete_types_for_parms): Do not insert
1703 error_mark_node in the parameter list.
1705 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1708 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1709 error when terminator can not be found.
1711 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1713 Make-lang.in (po-generated): Delete.
1715 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1717 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1718 targetm.calls.promote_prototypes.
1720 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1724 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1726 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1727 (handle_pragma_implementation): Likewise.
1729 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1732 * typeck.c (lookup_destructor): Tweak error message.
1734 2004-02-05 Jan Hubicka <jh@suse.cz>
1736 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1739 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1742 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1743 code, only emits the diagnostic now. Added lookup of the identifier
1744 and support for qualified ids.
1745 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1746 Parse an (invalid) type name as id-expression within a declarator.
1747 (cp_parser_simple_declaration): Use it.
1748 (cp_parser_member_declaration): Likewise.
1749 (cp_parser_make_typename_type): New function. Handle errors through
1750 cp_parser_diagnose_invalid_typename.
1751 (cp_parser_elaborated_type_specifier): Use it.
1753 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1756 * call.c (convert_like_real): Use "converting" rather than
1757 "argument" as the descriptive keyword to
1758 dubious_conversion_warnings.
1759 * typeck.c (convert_for_assignment): Do not call
1760 dubious_conversion_warnings.
1762 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1765 * init.c (build_delete): Emit a more informative error message in
1766 case of an incomplete type, and on the correct source line.
1768 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1770 * error.c, search.c: Update copyright.
1772 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1775 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1776 linkage for the typeinfo name string.
1778 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1781 * cp-tree.h (fold_non_dependent_expr): New function.
1782 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1783 (cp_parser_template_argument): Use fold_non_dependent_expr.
1784 (cp_parser_direct_declarator): Likewise.
1785 * pt.c (fold_non_dependent_expr): New function.
1786 (convert_nontype_argument): Use it.
1787 (tsubst_qualified_id): Simplify.
1788 (tsubst_copy_and_build): Likewise.
1790 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1792 * decl.c (cxx_push_function_context): Do not set
1793 current_function_is_thunk.
1794 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1797 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1800 * pt.c (more_specialized_class): Increase processing_template_decl
1801 while partial ordering.
1803 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1806 * decl.c (start_function): Do not call pushdecl for any
1807 instantiation or specialization of a primary template.
1809 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1812 * parser.c (cp_parser_class_name): Robustify.
1815 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1818 * semantics.c (finish_id_expression): Do not return an
1819 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1821 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1824 * pt.c (build_non_dependent_expr): Do not build
1825 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1828 * semantics.c (finish_id_expression): Do not return an
1829 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1832 * parser.c (cp_parser_simple_declaration): When skipping to the
1833 end of the statement swallow the terminating semicolon.
1835 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1838 * init.c (build_offset_ref): Improve error recovery for invalid
1839 uses of non-static member functions.
1842 * cp-tree.h (cp_build_type_attribute_variant): New function.
1843 * class.c (build_clone): Use cp_build_type_attribute_variant.
1844 * decl.c (duplicate_decls): Likewise.
1845 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1846 (tsubst_function_type): Likewise.
1847 * tree.c (build_exception_variant): Check attributes before
1848 concluding that two types are the same.
1849 (cp_build_type-attribute_variant): New method.
1850 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1853 * call.c (convert_class_to_reference): Keep better track of
1854 pedantically invalid user-defined conversions.
1856 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1859 * pt.c (tsubst_qualified_id): Improved error message when a type
1860 is expected but not found.
1862 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1864 * class.c: Fix comment typos.
1866 * error.c: Likewise.
1867 * parser.c: Likewise.
1869 * search.c: Likewise.
1870 * typeck.c: Likewise.
1872 2004-01-30 Richard Henderson <rth@redhat.com>
1875 * method.c (use_thunk): Don't force_target_expr for void thunks.
1876 * tree.c (build_target_expr_with_type): Assert non-void type.
1877 (force_target_expr): Likewise.
1879 2004-01-30 Michael Matz <matz@suse.de>
1881 * parser.c (cp_parser_labeled_statement): Accept case ranges.
1883 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1887 * decl.c (grokdeclarator): Check immediatly type completeness for
1888 non-dependent types.
1890 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1893 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
1894 a sizeof expression.block
1896 2004-01-29 Mark Mitchell <mark@codesourcery.com>
1899 * mangle.c (write_encoding): Correct encoding of member template
1902 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1904 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
1905 template name as it was `<::' (digraph typo).
1906 (cp_parser_nth_token_starts_template_argument_list_p): New function.
1907 (cp_parser_id_expression): Use it.
1908 (cp_parser_nested_name_specifier_opt): Likewise.
1909 (cp_parser_template_name): Likewise.
1910 (cp_parser_class_name): Likewise.
1911 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
1913 2004-01-28 Mark Mitchell <mark@codesourcery.com>
1916 * typeck.c (merge_types): Do not merge attributes into
1920 * parser.c (cp_parser_direct_declarator): Do not prevent
1921 backtracking inside a parenthesized declarator.
1922 (cp_parser_parameter_declaration): Fix typo in comment.
1924 2004-01-28 Jan Hubicka <jh@suse.cz>
1926 * semantics.c (expand_body) Do emit_associated_thunks before
1929 2004-01-27 Devang Patel <dpatel@apple.com>
1931 * name-lookup.c: Include "debug.h"
1932 (do_namespace_alias): Invoke debug_hooks to emit debug info
1933 for namespace alias.
1934 (do_local_using_decl): Invoke debug_hooks to emit debug info
1936 (do_class_using_decl): Same.
1937 (do_toplevel_using_decl): Same.
1938 (do_using_directive): Same.
1939 (cp_emit_debug_info_for_using): New function.
1940 * Make-lang.in (cp/parser.o): Depend on debug.h
1941 (cp/name-lookup.o): Same.
1943 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1945 * cp-tree.h (language_function, lang_type_header): Use
1947 * name-lookup.h (cp_binding_level): Likewise.
1949 2004-01-26 Mark Mitchell <mark@codesourcery.com>
1952 * semantics.c (finish_for_expr): Check for unresolved overloaded
1955 * class.c (add_method): Just check processing_template_decl to
1956 determine whether or not we are within a template.
1957 * decl2.c (maybe_retrofit_in_chrg): Likewise.
1958 * init.c (decl_constant_value): Check the type of the declaration,
1960 * name-lookup.c (maybe_push_to_top_level): Rename to ...
1961 (push_to_top_level): ... this.
1962 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
1963 * pt.c (push_template_decl_real): Reorder condition for speed.
1964 (convert_template_argument): Use dependency-checking functions in
1965 place of uses_template_parms.
1966 (lookup_template_class): Avoid calling uses_template_parms more
1968 (uses_template_parms): Reimplement, using dependency-checking
1970 (instantiate_class_template): Use push_to_top_level, not
1971 maybe_push_to_top_level.
1972 (type_unification_real): Simplify.
1973 (type_dependent_expression_p): Handle OFFSET_REFs and
1975 (any_dependent_template_arguments_p): Handle multiple levels of
1977 * semantics.c (expand_or_defer_fn): Do not check
1978 uses_template_parms for template instantiations.
1979 * typeck.c (comptypes): Avoid calling cp_type_quals.
1981 2004-01-25 Mark Mitchell <mark@codesourcery.com>
1984 * call.c (build_over_call): Do not convert arguments when
1985 processing a template.
1986 * pt.c (build_non_dependent_expr): Do not build a
1987 NON_DEPENDENT_EXPR for arithmetic constants.
1989 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1992 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
1993 returns a TYPE_DECL. no further lookup is required.
1994 * semantics.c (check_template_template_default_arg): A TYPE_DECL
1995 is invalid. Rework to give better diagnostics.
1997 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2000 * pt.c (instantiate_class_template): Add an error_mark_node
2002 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2004 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2007 * decl.c (finish_function): Move the call to
2008 finish_fname_decls below the call to
2009 finish_eh_spec_block.
2011 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2013 * optimize.c, typeck2.c: Update copyright.
2015 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2017 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2018 init.c, mangle.c, typeck.c: Update copyright.
2020 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2022 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2024 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2026 * Make-lang.in: Replace $(docdir) with doc.
2027 (c++.info, c++.srcinfo): Dummy entry.
2028 (c++.man, c++.srcman): New rules.
2029 (c++.install-man): Revamp rule.
2031 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2033 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2034 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2035 immediate $(shell) instead of deferred backquote.
2037 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2040 * parser.c (cp_parser_postfix_expression): When encountering
2041 incomplete type on left-hand side of "->" or ".", treat the entire
2042 expression as erroneous.
2045 * call.c (build_field_call): Remove.
2046 (n_build_method_call): Likewise.
2047 (build_method_call): Likewise.
2048 (build_new_method_call): Do not call build_field_call.
2049 * class.c (n_build_method_call): Remove.
2050 (print_class_statistics): Do not print it.
2051 * cp-tree.h (build_method_call): Remove declaration.
2052 (finish_object_call_expr): Likewise.
2053 (build_new_1): Do not use build_method_call.
2054 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2055 when the function appearing on the right-hand-side of "." or "->"
2056 is not actually a function.
2057 * pt.c (tsubst_copy_and_build): Likewise.
2058 * semantics.c (finish_object_call_expr): Remove.
2060 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2063 * pt.c (tsubst): Use finish_typeof.
2065 2004-01-18 Jason Merrill <jason@redhat.com>
2068 * except.c (build_throw): In a template, set
2069 current_function_returns_abnormally.
2071 2004-01-17 Fred Fish <fnf@intrinsity.com>
2074 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2075 except don't call array_type_nelts() with a VECTOR_TYPE.
2077 2004-01-16 Jan Hubicka <jh@suse.cz>
2079 * mangle.c (write_mangled_name): Remove inline modifier.
2081 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2084 * decl.c (compute_array_index_type): Fix grammar in comment.
2085 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2088 * call.c (name_as_c_string): Print conversion operator names
2092 * call.c (initialize_reference): Pass -1 for inner parameter to
2095 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2098 * parser.c (cp_parser_base_specifier): Check for an invalid
2099 keyword `typename' and emit an user-friendly error message.
2101 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2104 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2105 (handle_pragma_implementation): Likewise.
2107 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2110 * typeck.c (build_class_member_access_expr): Allow to access members
2111 of the currently open class.
2112 (finish_class_member_access_expr): Likewise.
2114 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2117 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2118 name by value, instead of computing them.
2119 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2120 arguments. Pass them to validate_nonmember_using_decl.
2121 * name-lookup.h (do_local_using_decl): Adjust.
2122 (do_toplevel_using_decl): Likewise.
2123 * parser.c (cp_parser_using_declaration): Likewise.
2124 * pt.c (tsubst_expr): Likewise.
2126 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2130 * name-lookup.c (qualified_lookup_using_namespace): Search
2131 strongly-associated namespaces first, and only then try other
2134 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2136 * Make-lang.in (c++.srcextra): Dummy entry.
2138 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2141 * parser.c (cp_parser_template_name): Don't try to parse a
2142 conversion-function-id, as it cannot be a template-name.
2143 (cp_parser_simple_type_specifier): Check for invalid template-ids
2144 even after a built-in type.
2146 2004-01-14 Jan Hubicka <jh@suse.cz>
2149 * pt.c (instantiate_decl): Do not increase function_depth.
2151 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2155 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2156 attributes and discard.
2157 * decl.c (xref_tag): Don't overwite existing attributes with
2160 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2163 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2164 is no destructor while looking up a BIT_NOT_EXPR.
2166 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2168 * cxxfilt.c: Remove unused file.
2170 2004-01-14 Jan Hubicka <jh@suse.cz>
2172 Partial fix to PR c++/12850
2173 * decl2.c (mark_used): Do not proactively instantiate templates
2174 when compiling in unit-at-a-time or not optimizing.
2175 * optimize.c (maybe_clone_body): Do not increase function depth.
2177 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2180 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2182 2004-01-12 Steven Bosscher <stevenb@suse.de>
2185 * parser.c (cp_parser_member_declaration): Any non-type is also
2186 not a class or a function.
2188 2004-01-12 Jason Merrill <jason@redhat.com>
2191 * class.c (build_base_path): Do not mark vtable references as
2193 (build_vtbl_ref_1): Likewise.
2195 2004-01-12 Richard Henderson <rth@redhat.com>
2198 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2199 (store_init_value): Use it.
2200 * decl.c (check_initializer): Expect full initialization code
2201 from store_init_value.
2202 * init.c (expand_aggr_init_1): Likewise.
2203 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2205 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2207 * class.c (layout_class_type): For non-POD class types, also copy
2208 the DECL_SIZE and DECL_MODE of fields to the base class type.
2210 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2213 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2214 calling regenerate_decl_from_template.
2216 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2219 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2220 decl-specifier occurring along with a class definition.
2222 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2224 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2225 clauses to comments describing declares_class_or_enum.
2226 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2229 2004-01-12 Jan Hubicka <jh@suse.cz>
2231 * pt.c (for_each_template_parm): Do not check for duplicates.
2232 (for_each_template_parm): Use walk_tree duplicate checking code.
2234 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2237 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2238 is error_mark_node, don't add any more decl_specs.
2239 (cp_parser_init_declarator): After committing to a declaration, if
2240 the decl_specifiers start with error_mark_node, issue an error and
2241 change the type to "int".
2243 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2246 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2248 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2252 * pt.c (tsubst): Substitution must fail if we are attempting to
2253 create an array with element type that is an abstract class type.
2254 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2255 before calling abstract_virtuals_error.
2257 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2259 * name-lookup.c (qualified_lookup_using_namespace): Consider
2260 strong using directives even if we've already found a binding.
2262 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2264 * cp-tree.h (cxx_expand_expr): Change prototype.
2265 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2267 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2270 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2271 looking into them recursively. They can be there because of the
2272 new __offsetof__ extension.
2274 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2276 * parser.c (cp_parser_save_member_function_body): Mark the
2279 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2282 * class.c (build_clone): Copy type attributes from the original
2283 function to the clone.
2286 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2287 references as constant.
2290 * parser.c (cp_parser_explicit_instantiation): Improve error
2292 (cp_parser_require): Improve indication of the error location.
2295 * parser.c (cp_parser_class_head): Reorder logic to check for
2296 invalid qualification.
2298 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2301 * name-lookup.c (lookup_using_namespace): Remove spacesp
2303 (unqualified_namespace_lookup): Likewise.
2304 (lookup_qualified_name): Adjust accordingly.
2305 (lookup_name_real): Likewise.
2306 (lookup_arg_dependent): Do not eliminate the namespace of the
2307 functions found by unqualified name lookup unless that is the
2310 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2312 * semantics.c (push_deferring_access_checks): Fix format.
2313 (resume_deferring_access_checks): Likewise.
2314 (stop_deferring_access_checks): Likewise.
2315 (pop_deferring_access_checks): Likewise.
2316 (get_deferred_access_checks): Likewise.
2317 (pop_to_parent_deferring_access_checks): Likewise.
2318 (perform_deferred_access_checks): Likewise.
2319 (perform_or_defer_access_check): Likewise.
2321 2004-01-04 Richard Henderson <rth@redhat.com>
2323 * call.c (build_over_call): Don't create a save_expr of an
2324 aggregate, but rather its address.
2326 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2329 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2330 an offsetof expression.
2332 * parser.c (cp_parser_parameter_declaration): Fix comment.
2335 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2336 (reference_binding): Set it when appropriate.
2337 (build_temp): New function, split out from ...
2338 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2339 (initialize_reference): Likewise.
2342 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2343 (cp_parser_new): Initialize it.
2344 (cp_parser_postfix_expression): Set it.
2345 (cp_parser_sizeof_operand): Likewise.
2346 (cp_parser_parameteR_declaration): Do not commit early to tenative
2347 parsers when in_type_id_in_expr_p is set.
2349 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2352 * parser.c (cp_parser_template_argument): Don't call
2353 make_unbound_class_template directly.
2354 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2355 UNBOUND_CLASS_TEMPLATE tree node.
2357 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2360 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2362 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2365 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2366 (DECL_FUNCTION_TEMPLATE_P): Use it.
2367 (DECL_CLASS_TEMPLATE_P): Likewise.
2368 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2369 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2370 (cp_parser_template_name): Likewise.
2371 (cp_parser_elaborated_type_specifier): Likewise.
2372 (cp_parser_namespace_name): Likewise.
2373 (cp_parser_class_name): Likewise.
2374 (cp_parser_lookup_name_simple): Likewise.
2376 See ChangeLog.3 for earlier changes.