1 2004-06-25 Paul Brook <paul@codesourcery.com>
3 * decl2.c (get_guard): Call targetm.cxx.guard_type.
4 (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
6 2004-06-24 Mark Mitchell <mark@codesourcery.com>
8 * decl.c (grokdeclarator): Restore error messages about __thread.
9 * parser.c (cp_parser_decl_specifier_seq): Likewise.
11 2004-06-24 Jason Merrill <jason@redhat.com>
14 * decl.c (grokparms): Give the PARM_DECL reference type if the
15 parameter is passed by invisible reference.
17 2004-06-24 Andreas Schwab <schwab@suse.de>
19 * cp-tree.h (enum cp_storage_class): Remove trailing comma.
21 2004-06-23 Mark Mitchell <mark@codesourcery.com>
23 * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
24 (cp/decl.o): Likewise.
25 (cp/decl2.o): Likewise.
27 (cp/semantics.o): Likewise.
28 * config-lang.in (gtfiles): Do not reference cp/lex.h.
29 * class.c: Do not include lex.h.
30 (add_implicitly_declared_members): Do not use
31 adding_implicit_members.
32 (check_bases_and_members): Do not talk about grok_x_components.
33 * cp/cp-tree.h (adding_implicit_members): Remove.
34 (cp_storage_class): New type.
35 (cp_decl_spec): Likewise.
36 (cp_decl_specifier_seq): Likewise.
37 (cp_parameter_declarator): Use it for the decl_specifiers field.
38 (check_tag_decl): Adjust prototype.
39 (shadow_tag): Likewise.
40 (groktypename): Likewise.
41 (start_decl): Likewise.
42 (start_function): Likewise.
43 (start_method): Likewise.
44 (grok_x_components): Remove.
45 (grokfield): Adjust prototype.
46 (grokbitfield): Likewise.
47 (finish_member_class_template): Remove.
48 * decl.c: Do not include lex.h.
49 (adding_implicit_members): Do not define.
50 (check_tag_decl): Do not use trees to represent decl-specifiers.
51 (shadow_tag): Likewise.
52 (groktypename): Likewise.
53 (start_decl): Likewise.
54 (grokvardecl): Likewise.
55 (grokdeclarator): Likewise.
56 (grokparms): Likewise.
57 (start_function): Likewise.
58 (start_method): Likewise.
59 * decl.h (grokdeclarator): Adjust prototype.
60 * decl2.c: Do not include lex.h.
61 (grok_x_components): Remove.
62 (grokfield): Do not use trees to represent decl-specifiers.
63 (grokbitfield): Likewise.
64 * lex.c: Do not include lex.h.
66 * parser.c: Include target.h.
67 (clear_decl_specs): New function.
68 (cp_parser_translation_unit): Do not use trees to represent
70 (cp_parser_postfix_expression): Likewise.
71 (cp_parser_new_type_id): Likewise.
72 (cp_parser_condition): Likewise.
73 (cp_parser_simple_declaration): Likewise.
74 (cp_parser_decl_specifier_seq): Likewise.
75 (cp_parser_function_specifier_opt): Likewise.
76 (cp_parser_conversion_type_id): Likewise.
77 (cp_parser_template_parameter): Likewise.
78 (cp_parser_explicit_instantiation): Likewise.
79 (cp_parser_type_specifier): Likewise.
80 (cp_parser_simple_type_specifier): Likewise.
81 (cp_parser_init_declarator): Likewise.
82 (cp_parser_type_id): Likewise.
83 (cp_parser_type_specifier_seq): Likewise.
84 (cp_parser_parameter_declaration): Likewise.
85 (cp_parser_member_declaration): Likewise.
86 (cp_parser_exception_declaration): Likewise.
87 (cp_parser_function_definition_from_specifiers_and_declarator):
89 (cp_parser_single_declaration): Likewise.
90 (cp_parser_save_member_function_body): Likewise.
91 (cp_parser_friend_p): Likewise.
92 (cp_parser_set_storage_class): New function.
93 (cp_parser_set_decl_spec_type): Likewise.
94 * pt.c: Do not include lex.h.
95 * semantics.c: Likewise.
96 (finish_member_class_template): Remove.
98 2004-06-23 Roger Sayle <roger@eyesopen.com>
100 * call.c (build_cxx_call): Don't call expand_tree_builtin. No
101 longer take both "args" and "convert_args" as arguments.
102 (build_op_delete_call): Update call to build_cxx_call.
103 (build_over_call): Likewise, update call to build_cxx_call.
104 * cp-tree.h (build_cxx_call): Update funtion prototype.
105 * typeck.c (build_function_call): Don't call expand_tree_builtin.
106 * rtti.c (throw_bad_cast): Update call to build_cxx_call.
107 (throw_bad_typeid): Likewise.
108 (build_dynamic_cast_1): Likewise.
110 2004-06-22 Richard Henderson <rth@redhat.com>
112 * class.c (build_vfn_ref): Take a pointer not object. Build
114 (cp_fold_obj_type_ref): New.
115 * call.c (build_over_call): Update build_vfn_ref call.
116 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
117 * cp-tree.h (cp_fold_obj_type_ref): Declare.
119 2004-06-21 Jason Merrill <jason@redhat.com>
122 * cp-gimplify.c (cp_gimplify_init_expr): Look through
125 2004-06-21 Mark Mitchell <mark@codesourcery.com>
127 * cp-tree.def (NEW_EXPR): Add a fourth slot.
128 * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
129 (TREE_PARMLIST): Likewise.
130 (CALL_DECLARATOR_PARMS): Likewise.
131 (CALL_DECLARATOR_QUALS): Likewise.
132 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
133 (cp_declarator_kind): New type.
134 (cp_parameter_declarator): Likewise.
135 (cp_declarator): Likewise.
136 (cp_error_declarator): Likewise.
137 (no_parameters): Likewise.
138 (groktypename): Change prototype.
139 (start_decl): Likewise.
140 (start_handler_parms): Likewise.
141 (get_scope_of_declarator): Likewise.
142 (start_function): Likewise.
143 (start_preparsed_function): New function.
144 (start_function): Change prototype.
145 (start_method): Likewise.
146 (grokfield): Likewise.
147 (grokbitfield): Likewise.
148 (build_new): Likewise.
149 (make_pointer_declarator): Remove.
150 (make_reference_declarator): Likewise.
151 (make_call_declarator): Likewise.
152 (set_quals_and_spec): Likewise.
153 (process_template_parm): Change prototype.
154 (begin_function_definition): Remove.
155 (finish_parmlist): Remove.
156 * decl.c (groktypename): Do not use trees to represent
158 (start_decl): Likewise.
159 (start_handler_parms): Remove.
160 (get_scope_of_declarator): Reimplement.
161 (grokdeclarator): Do not use trees to represent declarators.
162 (grokparms): Likewise.
163 (start_function): Likewise.
164 (start_method): Likewise.
165 (build_void_list_mode): Do not use TREE_PARMLIST.
166 * decl.h (grokdeclarator): Change prototype.
167 * decl2.c (grok_method_quals): Robustify.
168 (grok_x_components): Do not use trees to represent declarators.
169 (grokfield): Likewise.
170 (grokbitfield): Likewise.
171 (start_objects): Build FUNCTION_DECLs, not declarators.
172 (start_static_storage_duration_function): Likewise.
173 * init.c (build_new): Simplify.
174 * lex.c (make_pointer_declarator): Remove.
175 (make_reference_declarator): Likewise.
176 (make_call_declarator): Likewise.
177 (set_quals_and_spec): Likewise.
178 * method.c (use_thunk): Use start_preparsed_function.
179 (synthesize_method): Likewise.
180 (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
181 * optimize.c (maybe_clone_body): Use start_preparsed_function.
182 * parser.c (cp_error_declarator): New variable.
183 (declarator_obstack): Likewise.
184 (alloc_declarator): New function.
185 (make_declarator): Likewise.
186 (make_id_declarator): Likewise.
187 (make_pointer_declarator): Likewise.
188 (make_reference_declarator): Likewise.
189 (make_ptrmem_declarator): Likewise.
190 (make_call_declarator): Likewise.
191 (make_array_declarator): Likewise.
192 (no_parameters): New variable.
193 (make_parameter_declarator): Likewise.
194 (cp_parser_check_for_definition_in_return_type): Do not use trees
195 to represent declarators.
196 (cp_parser_translation_unit): Likewise.
197 (cp_parser_new_expression): Likewise.
198 (cp_parser_new_type_id): Likewise.
199 (cp_parser_new_declarator_opt): Likewise.
200 (cp_parser_direct_new_declarator): Likewise.
201 (cp_parser_condition): Likewise.
202 (cp_parser_declaration_statement): Likewise.
203 (cp_parser_declaration): Likewise.
204 (cp_parser_conversion_type_id): Likewise.
205 (cp_parser_conversion_declarator_opt): Likewise.
206 (cp_parser_template_parameter_list): Likewise.
207 (cp_parser_template_parameter): Likewise.
208 (cp_parser_explicit_instantiation): Likewise.
209 (cp_parser_init_declarator): Likewise.
210 (cp_parser_declarator): Likewise.
211 (cp_parser_direct_declarator): Likewise.
212 (cp_parser_type_id): Likewise.
213 (cp_parser_parameter_declaration_clause): Likewise.
214 (cp_parser_parameter_declaration_list): Likewise.
215 (cp_parser_parameter_declaration): Likewise.
216 (cp_parser_member_declaration): Likewise.
217 (cp_parser_exception_declaration): Likewise.
218 (cp_parser_check_declarator_template_parameters): Likewise.
219 (cp_parser_function_definition_from_specifiers_and_declarator):
221 (cp_parser_save_member_function_body): Likewise.
222 * pt.c (process_template_parm): Add is_non_type parameter.
223 (convert_template_argument): Adjust call to groktypename.
224 (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
225 (tsubst): Do not expect declarators.
226 (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
228 (instantiate_decl): Use start_preparsed_function.
229 * semantics.c (begin_function_definition): Remove.
230 (finish_parmlist): Remove.
231 * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
234 2004-06-21 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
236 * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
237 (build_new_method_call): Likewise.
238 * decl.c (local_variable_p_walkfn): Don't walk into types.
239 * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
240 (build_anon_union_vars): Add new operand for COMPONENT_REF.
241 * init.c (buld_new): Add new operand for ARRAY_REF.
242 * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
243 (do_build_assign_ref): Likewise.
244 * parser.c (cp_parser_direct_new_declarator): Add new operands
246 (cp_parser_direct_declarator): Likewise.
247 * pt.c (tsubst): Likewise.
248 (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
250 * semantics.c (finish_non_static_data_member): Add new operand
252 * typeck.c (build_class_member_access_expr): Likewise.
253 (build_class_member_access_expr, finish_class_member_access_expr):
255 (build_ptrmemfunc_access_expr): Likewise.
256 (build_array_ref): Add new operands for ARRAY_REF.
257 * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
258 * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
260 2004-06-21 Richard Henderson <rth@redhat.com>
262 * dump.c (cp_dump_tree): Don't use dump_next_stmt.
263 * parser.c (cp_parser_jump_statement): Update commentary.
264 * pt.c (tsubst_expr): Use RETURN_EXPR.
265 * semantics.c (finish_return_stmt): Likewise.
266 (finalize_nrv_r): Likewise.
267 * typeck.c, typeck2.c: Update file start commentary.
269 2004-06-21 Richard Henderson <rth@redhat.com>
271 * semantics.c (finish_expr_stmt): Call verify_sequence_points.
273 2004-06-20 Richard Henderson <rth@redhat.com>
275 * cp-tree.h (add_decl_stmt): Declare.
276 * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
277 * semantics.c (maybe_cleanup_point_expr): New.
278 (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
279 finish_for_expr, finish_switch_cond): Use it.
280 (finalize_nrv_r): Don't build an EXPR_STMT. Don't frob TREE_CHAIN.
282 2004-06-20 Richard Henderson <rth@redhat.com>
284 * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
285 * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
286 (cp_gimplify_expr): Call it.
287 (gimplify_cleanup_stmt): Move from c-gimplify.c.
288 (cp_genericize): New.
289 * decl.c (finish_function): Call it.
290 * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
291 (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
292 (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
293 (cp_genericize): Declare.
294 * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
295 * dump.c (cp_dump_tree): Likewise.
296 * semantics.c (push_cleanup): Move from c-semantics.c.
298 2004-06-20 Zack Weinberg <zack@codesourcery.com>
300 * cp-lang.c (has_c_linkage): Implement.
302 * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
303 * decl.c (duplicate_decls): Use COPY_DECL_RTL.
304 (builtin_function_1): Don't call make_decl_rtl.
305 (build_cp_library_fn): Don't call set_mangled_name_for_decl.
306 (grokvardecl): Don't call mangle_decl.
307 * except.c (nothrow_libfn_p): Look at DECL_NAME, not
309 * method.c (set_mangled_name_for_decl): Delete.
310 * name-lookup.c (pushdecl): When a local extern shadows a
311 file-scope declaration of the same object, give both DECLs the
313 * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
314 on DECL_ASSEMBLER_NAME.
316 2004-06-19 Richard Henderson <rth@redhat.com>
318 * cp-gimplify.c: Remove unnecessary prototypes.
319 (cp_gimplify_stmt): Merge into ...
320 (cp_gimplify_expr): ... here. Move to end of file. Handle
321 stmts_are_full_exprs_p frobbing.
322 * cp-tree.h (cp_gimplify_stmt): Remove.
323 * pt.c (tsubst_expr): Merge prep_stmt and unify.
324 * tree.c (init_tree): Don't set lang_gimplify_stmt.
326 2004-06-18 Richard Henderson <rth@redhat.com>
329 * semantics.c (begin_cond): New.
330 (finish_cond): Rewrite to handle template DECL_STMTs specially.
331 Assume that non-template decls go land before the conditional.
332 (simplify_loop_decl_cond): Likewise.
333 (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
334 finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
335 begin_switch_stmt, finish_switch_cond): Update to match.
337 2004-06-17 Jason Merrill <jason@redhat.com>
340 * semantics.c (simplify_aggr_init_expr): Don't return the slot.
341 (finish_stmt_expr_expr): Update type after conversions.
342 (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
343 Handle void initializer.
344 * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
346 2004-06-17 Geoffrey Keating <geoffk@apple.com>
348 * class.c (build_clone): Don't call defer_fn, let mark_used do it.
349 * cp-tree.h (defer_fn): Delete.
350 * decl2.c (defer_fn): Delete.
351 (finish_file): Simplify deferred_fns loops; check that
352 only used inline functions get into deferred_fns.
353 (mark_used): Inline previous contents of defer_fn.
355 2004-06-16 Richard Henderson <rth@redhat.com>
357 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
358 (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
359 * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
360 of CTOR_INITIALIZER ...
361 (pp_cxx_statement): ... here.
362 * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
363 (finish_function): Use alloc_stmt_list to zap entire function.
364 * parser.c (cp_parser_compound_statement): Update commentary.
365 * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
366 * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
367 (finish_stmt_expr): Don't look through COMPOUND_STMT.
369 2004-06-16 Geoffrey Keating <geoffk@apple.com>
371 * pt.c (mark_decl_instantiated): Don't call defer_fn.
373 2004-06-16 Richard Henderson <rth@redhat.com>
375 * parser.c (cp_parser_labeled_statement): Update commentary.
376 * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
377 * tree.c (mark_local_for_remap_r): Likewise.
379 2004-06-16 Richard Henderson <rth@redhat.com>
381 * parser.c (cp_parser_asm_definition): Update commentary.
382 * pt.c (tsubst_expr): Use ASM_EXPR.
383 * semantics.c (finish_asm_stmt): Likewise.
385 2004-06-16 Richard Henderson <rth@redhat.com>
387 * decl.c (finish_destructor_body): Use LABEL_EXPR.
388 * parser.c (cp_parser_statement): Update commentary.
389 * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
390 * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
391 * tree.c (mark_local_for_remap_r): Likewise.
393 2004-06-16 Richard Henderson <rth@redhat.com>
396 * semantics.c (begin_for_stmt, begin_for_stmt): Do put the init
397 statement in FOR_INIT_STMT for templates.
399 2004-06-15 Richard Henderson <rth@redhat.com>
401 * call.c (initialize_reference): Don't build CLEANUP_STMT here.
402 * cp-gimplify.c (cp_gimplify_stmt): Remove next_p argument.
403 (genericize_try_block): Use gimplify_stmt.
404 (genericize_catch_block, genericize_eh_spec_block): Likewise.
405 (cp_gimplify_init_expr): Remove STMT_EXPR special case.
406 (gimplify_must_not_throw_expr): Update voidify_wrapper_expr call.
407 * cp-lang.c (LANG_HOOKS_TREE_INLINING_TREE_CHAIN_MATTERS_P): Remove.
408 (cp_tree_chain_matters_p): Remove.
409 * cp-tree.h (COMPOUND_STMT_TRY_BLOCK): New.
410 (COMPOUND_STMT_BODY_BLOCK): New.
411 (STATEMENT_LIST_NO_SCOPE, STATEMENT_LIST_TRY_BLOCK): New.
412 (EXPR_STMT_STMT_EXPR_RESULT): New.
413 (building_stmt_tree): Check cur_stmt_list.
414 (tf_stmt_expr_cmpd, tf_stmt_expr_body): Remove.
415 (BCS_NO_SCOPE, BCS_TRY_BLOCK, BCS_FN_BODY): New.
416 * decl.c (poplevel): Use pop_stmt_list for minding cleanups.
417 (cp_finish_decl): Use push_cleanup.
418 (start_function, finish_function): Use statement lists.
419 (finish_stmt): Do nothing.
420 * except.c (begin_eh_spec_block): Use statement lists.
421 (check_handlers_1, check_handlers): Likewise.
422 * init.c (construct_virtual_base): Don't add extra compound stmts.
423 (build_vec_init): Likewise.
424 * name-lookup.c (maybe_push_cleanup_level): Use statement lists.
425 * name-lookup.h (struct cp_binding_level): Add statement_list.
426 * parser.c (cp_parser_statement): Take the STMT_EXPR node, not a bool.
427 (cp_parser_labeled_statement, cp_parser_expression_statement,
428 cp_parser_statement_seq_opt): Likewise.
429 (cp_parser_compound_statement): Likewise. Take bool for try block.
430 (cp_parser_selection_statement): Tidy if processing.
431 (cp_parser_already_scoped_statement): Rewrite to do what it says.
432 * pt.c (tsubst_copy): Move STMT_EXPR to tsubst_expr.
433 (tsubst_expr): Rewrite STMT_EXPR processing. Handle STATEMENT_LIST.
434 Mind COMPOUND_STMT_TRY_BLOCK, EXPR_STMT_STMT_EXPR_RESULT.
435 * semantics.c (do_poplevel, do_pushlevel): Use statement lists.
436 (finish_cond): New, rewritten from FINISH_COND.
437 (simplify_loop_decl_cond): New.
438 (finish_expr_stmt): Avoid nested EXPR_STMTs.
439 (begin_if_stmt, finish_if_stmt_cond, finish_then_clause,
440 begin_else_clause, finish_else_clause, finish_if_stmt,
441 begin_while_stmt, finish_while_stmt_cond, finish_while_stmt,
442 begin_do_stmt, finish_do_body, begin_for_stmt, finish_for_init_stmt,
443 finish_for_cond, finish_for_stmt, begin_switch_stmt,
444 finish_switch_cond, finish_switch_stmt, begin_try_block,
445 finish_try_block, finish_cleanup_try_block, finish_function_try_block,
446 finish_handler_sequence, finish_function_handler_sequence,
447 begin_handler, finish_handler_parms, finish_handler,
448 begin_stmt_expr, finish_stmt_expr_expr, finish_stmt_expr): Rewrite
449 using statement lists.
450 (begin_compound_stmt): Replace has_no_scope argument with flags.
451 Update all callers. Use statement lists.
452 (finish_compound_stmt): Likewise.
453 (finish_decl_cleanup, finish_eh_cleanup): Use push_cleanup.
454 (current_scope_stmt_stack): Remove.
455 (simplify_aggr_init_expr): Don't muck with TREE_CHAIN.
456 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init):
457 Rewrite with statement lists.
459 2004-06-15 Alexandre Oliva <aoliva@redhat.com>
461 * parser.c: Change all assignments of c_lex_string_translate
462 to true and false to 1 and 0.
463 (cp_lexer_read_token): Convert type of the translated string.
464 (cp_parser_skip_to_closing_parentheses): Preserve original
465 value of c_lex_string_translate, and set it to -1 while
467 (cp_parser_cache_group): Likewise.
468 (cp_parser_cache_group_1): Renamed.
469 (cp_parser_asm_operand_list): Remove redundant setting of
470 c_lex_string_translate.
471 (cp_parser_primary_expression) [CPP_STRING, CPP_WSTRING]:
472 Handle chained strings.
474 2004-06-12 Andrew Pinski <apinski@apple.com>
478 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
480 * cp-tree.h: Fix typo.
482 * cp-tree.h: Include cgraph.h
483 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
484 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
486 2004-06-12 Jason Merrill <jason@redhat.com>
488 PR tree-optimization/14107
489 * decl.c (finish_function): Warn about no return in all functions.
491 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
493 * cp-tree.h (struct language_function): Remove cannot_inline.
494 * decl.c (save_function_data): cannot_inline is no more.
495 (cxx_push_function_context): Likewise.
496 * decl2.c (start_objects, start_static_storage_duration_function):
497 Reset DECL_INLINE, set DECL_UNINLINABLE.
499 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
502 * search.c (lookup_field): Propagate the ambiguity list.
503 (lookup_fnfields): Likewise.
505 2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
508 * parser.c (cp_parser_template_name): Ctors/dtors never need a
509 template keyword to disambiguate.
511 2004-06-14 Mark Mitchell <mark@codesourcery.com>
514 * decl.c (grokdeclarator): Ignore pointer-to-members when
515 computing template depth.
518 * name-lookup.c (pushtag): Do not try to put class declarations in
519 explicit specialization scopes.
521 2004-06-11 Andrew Pinski <pinskia@physics.uc.edu>
523 * decl.c (grokdeclarator): Do not depend on C99's _Bool's behavior.
525 2004-06-11 Mark Mitchell <mark@codesourcery.com>
528 * name-lookup.c (unqualified_namespace_lookup): Do not ignore type
529 bindings for undeclared built-ins.
531 2004-06-11 Giovanni Bajo <giovannibajo@gcc.gnu.org>
533 * typeck2.c (abstract_virtual_errors): Reword diagnostics, make them
534 appear at the correct location.
536 2004-06-10 Jason Merrill <jason@redhat.com>
540 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
541 * init.c (build_offset_ref): Build SCOPE_REF with non-null
542 TREE_TYPE for non-dependent names.
543 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
544 unknown_type_node as its TREE_TYPE.
545 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
546 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
547 (dump_expr) <SCOPE_REF case>: Likewise.
549 2004-06-10 Mark Mitchell <mark@codesourcery.com>
552 * parser.c (cp_parser_direct_declarator): Robustify.
555 * pt.c (tsubst_copy): Use decl_constant_value on enumeration
556 constants in non-dependent contexts.
560 * typeck.c (build_static_cast): Wrap casts in NON_LVALUE_EXPR when
563 2004-06-10 Jakub Jelinek <jakub@redhat.com>
566 * decl.c (duplicate_decls): Handle fileptr_type_node arguments
569 2004-06-09 Mark Mitchell <mark@codesourcery.com>
573 2004-06-07 Mark Mitchell <mark@codesourcery.com>
574 * lex.c (handle_pragma_interface): Deprecate.
575 (handle_pragma_implementation): Likewise.
577 2004-06-09 Andrew Pinski <pinskia@physics.uc.edu>
579 * g++spec.c (lang_specific_driver): Remove check for -lm
580 and -lmath when check it see if it was the math library.
582 2004-06-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
585 * parser.c (cp_parser_direct_declarator): Reject constructor named
586 as qualified template-id.
588 2004-06-07 Mark Mitchell <mark@codesourcery.com>
591 * lex.c (handle_pragma_interface): Deprecate.
592 (handle_pragma_implementation): Likewise.
594 2004-06-07 Mark Mitchell <mark@codesourcery.com>
597 * parser.c (cp_parser_iteration_statement): Fix typo in error
601 * pt.c (tsubst_default_argument): Do not defer access checks
602 while substituting into the default argument.
605 * pt.c (tsubst_copy): Do not try to substitute for an enumeration
606 constant in a non-dependent context.
609 * except.c (build_throw): Ensure that temp_expr has been
612 2004-06-06 Roger Sayle <roger@eyesopen.com>
614 * cp/cp-tree.h (lvalue_or_else): Add function prototype.
616 2004-06-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
619 * parser.c (cp_parser_mem_initializer_id): Gracefully reject
620 'typename', and accept 'template'.
622 2004-06-03 Andrew Pinski <pinskia@physics.uc.edu>
623 Jan Hubicka <jh@suse.cz>
626 * method.c (use_think): Do not mark thunk as referenced.
628 2004-06-03 Matt Austern <austern@apple.com>
631 * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
632 is nonzero, and if we see a noninline definition of a key method,
633 make the vtables nonweak.
635 2004-06-02 Matt Austern <austern@apple.com>
637 * cp-tree.h (instantiate_decl): new boolean parameter,
638 undefined_ok. Current behavior is equivalent to its being 0.
639 * decl2.c (mark_used): Add new argument when calling instantiate_decl
640 * pt.c (mark_decl_instantiated): Unconditionally make
641 instantiations explicit unconditionally
642 (do_decl_instantiation): Don't call SET_DECL_EXPLICIT_INSTANTIATION,
643 since mark_decl_instantiated now does it.
644 (instantiate_class_member): New. Instantiate a member of an
645 explicitly instantiated class template.
646 (do_type_instantiation): Explicitly instantiate members of an
647 explicitly instantiated class template.
648 (instantiate_decl): if undefined_ok is nonzero, and if we're
649 trying to explicitly instantiated a template with no definition,
650 change it to an implicit instantiation.
651 (instantiate_pending_templates): Add new argument to instantiate_decl.
652 * tree.c (cp_cannot_inline_tree_fn): Likewise.
654 2004-06-02 Andrew Pinski <pinskia@physics.uc.edu>
656 * cp-tree.h: Fix typo.
658 * cp-tree.h: Include cgraph.h
659 (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
660 TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
662 2004-06-01 Jason Merrill <jason@redhat.com>
665 * call.c (call_builtin_trap): Remove type parm.
666 (convert_arg_to_ellipsis): Change a non-POD argument to integer type.
667 (build_x_va_arg): Dereference a null pointer for a non-POD argument.
669 2004-06-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
672 * init.c (build_offset_ref): Build SCOPE_REF with non-null
673 TREE_TYPE for non-dependent names.
674 * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
675 unknown_type_node as its TREE_TYPE.
676 * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
677 * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
678 (dump_expr) <SCOPE_REF case>: Likewise.
680 2004-06-01 Richard Henderson <rth@redhat.com>
681 Andrew Pinski <pinskia@physics.uc.edu>
683 * lex.c (reswords): Rename "__offsetof" to "__builtin_offsetof".
684 * parser.c (struct cp_parser): Remove in_offsetof.
685 (cp_parser_new): Don't set it.
686 (cp_parser_unary_expression): Don't check it.
687 (cp_parser_postfix_open_square_expression): Split out from ...
688 (cp_parser_postfix_expression): ... here.
689 (cp_parser_postfix_dot_deref_expression): Likewise.
690 (cp_parser_builtin_offsetof): New.
691 (cp_parser_primary_expression): Use it.
693 2004-06-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
696 * parser.c (cp_parser_postfix_expression): Allow subscript
697 operator in offsetof.
699 2004-05-31 Mark Mitchell <mark@codesourcery.com>
702 * friend.c (add_friend): Do not try to perform access checks for
703 functions from dependent classes.
705 2004-05-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
707 * cxx-pretty-print.c (pp_cxx_colon_colon): Expor.
708 (pp_cxx_begin_template_argument_list): Turn into a function.
709 (pp_cxx_end_template_argument_list): Likewise.
710 (pp_cxx_separate_with): Define.
711 (pp_cxx_unqualified_id): Tidy.
712 (pp_cxx_primary_expression): Likewise.
713 (pp_cxx_postfix_expression): Likewise.
714 (pp_cxx_expression): Likewise.
715 (pp_cxx_simple_type_specifier): Likewise.
716 (pp_cxx_type_specifier_seq): Likewise.
717 (pp_cxx_parameter_declaration_clause): Likewise.
718 (pp_cxx_exception_specification): Likewise.
719 (pp_cxx_direct_declarator): Likewise.
720 (pp_cxx_type_id): Likewise.
721 * cxx-pretty-print.h (pp_cxx_whitespace): Export from
723 (pp_cxx_left_paren): Likewise.
724 (pp_cxx_right_paren): Likewise.
725 (pp_cxx_left_brace): Likewise.
726 (pp_cxx_right_brace): Likewise.
727 (pp_cxx_left_bracket): Likewise.
728 (pp_cxx_right_bracket): Likewise.
729 (pp_cxx_dot): Likewise.
730 (pp_cxx_identifier): Likewise.
731 (pp_cxx_tree_identifier): Likewise.
732 (pp_cxx_ampersand): New macro.
733 (pp_cxx_star): Likewise.
734 (pp_cxx_arrow): Likewise.
735 (pp_cxx_semicolon): Likewise.
736 (pp_cxx_complement): Likewise.
737 (pp_cxx_begin_template_argument_list): Declaree.
738 (pp_cxx_end_template_argument_list): Likewise.
739 (pp_cxx_colon_colon): likewise.
741 2004-05-31 Eric Botcazou <ebotcazou@libertysurf.fr>
743 * parser.c (cp_parser_simple_type_specifier): Explicitly test
746 2004-05-31 Kazu Hirata <kazu@cs.umass.edu>
748 * call.c, class.c, cp-tree.def, decl2.c, name-lookup.c, pt.c,
749 typeck.c: Fix comment formatting.
751 2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
753 * cp-lang.c (cp_expand_decl): Remove.
754 (LANG_HOOKS_EXPAND_DECL): Use c_expand_decl.
756 2004-05-30 Andreas Jaeger <aj@suse.de>
758 * lang-specs.h: Add missing initializers for .ii.
760 2004-05-28 Aldy Hernandez <aldyh@redhat.com>
762 * decl.c (cp_make_fname_decl): Free return value from
765 2004-05-28 Mark Mitchell <mark@codesourcery.com>
768 * decl2.c (delete_sanity): Set TREE_SIDE_EFFECTS on a DELETE_EXPR,
770 * init.c (build_new): Likewise.
773 * name-lookup.c (arg_assoc): Robustify.
776 * typeck.c (unary_complex_lvalue): Use context_for_name_lookup
777 when determining the scope to use for a pointer to member.
778 (lookup_anon_field): Give it external linkage.
779 * cp-tree.h (lookup_anon_field): Declare it.
780 * expr.c (cplus_expand_constant): Use it.
782 2004-05-28 Mark Mitchell <mark@codesourcery.com>
785 * parser.c (cp_parser_simple_type_specifier): Call
786 maybe_note_name_used_in_class.
788 2004-05-28 Tom Marshall <tmarshall@real.com>
791 * class.c (finish_struct_1): Warn only if the dtor is non-private or
792 the class has friends.
794 2004-05-27 Adam Nemet <anemet@lnxw.com>
797 * decl.c (complete_array_type): Set TYPE_NEEDS_CONSTRUCTING and
798 TYPE_HAS_NONTRIVIAL_DESTRUCTOR based on the underlying type.
800 2004-05-24 Geoffrey Keating <geoffk@apple.com>
802 * method.c (implicitly_declare_fn): Don't call defer_fn; abort
803 if it might be needed.
804 * pt.c (mark_decl_instantiated): Only call defer_fn if
805 the function actually needs processing in finish_file.
806 * decl2.c (finish_file): Add check that elements in
807 deferred_fns_used are really needed there. Remove unnecessary
808 test of DECL_SAVED_TREE.
810 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
812 * Make-lang.in: No need to specify $(LIBCPP).
814 2004-05-23 Mark Mitchell <mark@codesourcery.com>
817 * parser.c (cp_parser_class_head): Robustify.
820 * parser.c (cp_parser_decl_specifier_seq): Correct error in
822 (cp_parser_constructor_declarator_p): Treat attributes
826 * typeck.c (build_unary_op): Do not attempt to resolve casts to
827 base classes in templates.
829 2004-05-23 Mark Mitchell <mark@codesourcery.com>
832 * pt.c (instantiate_template): Robustify.
834 2004-05-23 Mark Mitchell <mark@codesourcery.com>
837 * decl.c (xref_tag): Issue errors about redeclaring template
838 classes as non-template classes.
840 2004-05-23 Mark Mitchell <mark@codesourcery.com>
843 * name-lookup.c (supplement_binding): Allow redefinitions of
847 * parser.c (cp_parser_template_argument): Robustify.
849 2004-05-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
851 * class.c (alter_access): Use %E format specifier to print an
852 identifier node. Avoid looking at the IDENTIFIER_POINTER.
853 (push_lang_context): Likewise.
854 * decl.c (lookup_label): Likewise.
855 (grokdeclarator): Likewise.
856 * parser.c (cp_parser_check_for_invalid_template_id): Likewise.
857 * pt.c (do_type_instantiation): Likewise.
858 * tree.c (handle_java_interface_attribute): Likewise.
859 (handle_com_interface_attribute): Likewise.
860 (handle_init_priority_attribute): Likewise.
862 2004-05-22 Mark Mitchell <mark@codesourcery.com>
866 * pt.c (build_non_dependent_expr): Expand the set of tree nodes
867 recognized as overloaded functions.
869 2004-05-22 Mark Mitchell <mark@codesourcery.com>
872 * class.c (layout_nonempty_base_or_field): Do not try to avoid
873 layout conflicts for unions.
876 * typeck.c (build_x_unary_op): Instantiate template class
877 specializations before looking for "operator &".
880 * typeck.c (complete_type): Layout non-dependent array types, even
884 * typeck.c (build_unary_op): Do not optimize "&x[y]" when in a
887 2004-05-22 Roger Sayle <roger@eyesopen.com>
889 * name-lookup.c (check_for_out_of_scope_variable): Avoid ICE by
890 returning when TREE_TYPE is error_mark_node.
891 * typeck.c (require_complete_type): Return error_mark_node if
892 value's type is an error_mark_node.
894 2004-05-20 Andrew Pinski <pinskia@physics.uc.edu>
896 * optimize.c (calls_setjmp_r): Remove.
897 (calls_setjmp_p): Remove.
898 * cp-tree.c (calls_setjmp_p): Remove.
899 * decl.c (finish_function): Do not call calls_setjmp_p.
901 2004-05-18 Zack Weinberg <zack@codesourcery.com>
903 * decl.c (cp_finish_decl): Use mark_decl_referenced.
904 * decl2.c (maybe_make_one_only): Likewise.
905 * method.c (use_thunk): Likewise.
907 2004-05-18 Jason Merrill <jason@redhat.com>
909 * class.c (build_base_path): Tidy a bit.
911 2004-05-14 Geoffrey Keating <geoffk@apple.com>
913 * name-lookup.c (struct scope_binding): New.
914 (EMPTY_SCOPE_BINDING): New.
915 (lookup_using_namespace): Take a scope_binding instead of a
917 (qualified_lookup_using_namespace): Likewise.
918 (cxx_binding_clear): Delete.
919 (do_nonmember_using_decl): Use a scope_binding instead of a
921 (lookup_tag): Don't call select_decl.
922 (ambiguous_decl): Don't return anything (and change callers to match).
923 Take a scope_binding as the second parameter.
924 (lookup_namespace_name): Use a scope_binding instead of a
926 (unqualified_namespace_lookup): Likewise.
927 (lookup_qualified_name): Likewise.
928 (select_decl): Take a scope_binding instead of a cxx_binding.
929 Use macros rather than hand-coding tests for type-ness.
931 2004-05-13 Diego Novillo <dnovillo@redhat.com>
933 * cp-gimplify.c: Rename from cp-simplify.c.
934 * Make-lang.in, optimize.c: Update.
936 2004-05-13 Diego Novillo <dnovillo@redhat.com>
938 Merge from tree-ssa-20020619-branch. See
939 ChangeLog.tree-ssa for details.
941 * Make-lang.in, call.c, class.c, cp-lang.c, cp-tree.def,
942 cp-tree.h, cvt.c, decl.c, decl2.c, error.c, except.c,
943 expr.c, init.c, name-lookup.h, optimize.c, parser.c,
944 pt.c, rtti.c, semantics.c, tree.c, typeck.c, typeck2.c:
946 * cp-mudflap.c: New file.
947 * cp-simplify.c:: New file.
949 2004-05-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
952 * decl2.c (check_classfn): For member templates, compare also the
953 template parameters to match the declaration.
954 * cp-tree.h: Adjust declaration of check_classfn.
955 * decl.c (start_decl, grokfndecl): Adjust callers of check_classfn.
956 * friend.c (do_friend): Likewise.
957 * pt.c (tsubst_friend_function): Likewise.
959 2004-05-01 Zack Weinberg <zack@codesourcery.com>
961 * decl.c (reshape_init): Do not apply TYPE_DOMAIN to a VECTOR_TYPE.
962 Instead, dig into the representation type to find the array bound.
964 2004-04-30 Jason Merrill <jason@redhat.com>
966 Refer to base members using COMPONENT_REFs where possible.
967 * class.c (build_simple_base_path): New fn.
968 (build_base_path): Use it for non-virtual base references.
969 (layout_class_type): Change base fields to their real type
970 after layout is done.
971 * cp-tree.h (IS_FAKE_BASE_TYPE): New macro.
972 * cp-lang.c (cxx_get_alias_set): Use it.
974 2004-04-30 Kazu Hirata <kazu@cs.umass.edu>
976 * class.c, cp-tree.h, decl.c, decl2.c, pt.c, rtti.c: Fix
979 2004-04-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
982 * parser.c (cp_parser_postfix_expression): typeid operator cannot be
983 used in integral constant expressions.
985 2004-04-22 Mark Mitchell <mark@codesourcery.com>
987 * init.c (build_aggr_init): Fix accidental use of C99 construct in
990 * class.c (initialize_array): Don't set TREE_HAS_CONSTRUCTOR on
992 * cp-tree.h (BRACE_ENCLOSED_INITIALIZER_P): New macro.
993 * decl.c (reshape_init): Use it.
994 * init.c (perform_member_init): Remove redundant condition.
995 (build_aggr_init): Adjust to handle brace-enclosed initializers
997 (expand_default_init): Use BRACE_ENCLOSED_INITIALIZER_P.
999 * parser.c (cp_parser_initializer_clause): Do not set
1000 TREE_HAS_CONSTRUCTOR on the initializer.
1001 * rtti.c (tinfo_base_init): Likewise.
1002 (generic_initializer): Likewise.
1003 (ptr_initializer): Likewise.
1004 (ptm_initializer): Likewise.
1005 (class_initializer): Likewise.
1006 (get_pseudo_ti_init): Likewise.
1007 * typeck2.c (digest_init): Use BRACE_ENCLOSED_INITIALIZER_P.
1009 2004-04-22 Alan Modra <amodra@bigpond.net.au>
1011 * name-lookup.c (anonymous_namespace_name): Make static.
1013 2004-04-19 Roger Sayle <roger@eyesopen.com>
1016 * class.c (build_base_path): Call fold whilst building the NULL
1017 pointer check expression trees.
1019 2004-04-15 Bryce McKinlay <mckinlay@redhat.com>
1021 * init.c (build_new_1): Don't use type size argument for Java
1022 _Jv_AllocObject call.
1024 2004-04-09 Danny Smith <dannysmith@users.sourceforge.net>
1026 * method.c (make_alias_for_thunk): Remove preprocessor guard on
1027 declaration and definition.
1029 2004-04-08 Danny Smith <dannysmith@users.sourceforge.net>
1032 * method.c (use_thunk): Test TARGET_USE_LOCAL_THUNK_ALIAS_P rather
1033 than ASM_OUTPUT_DEF.
1035 2004-04-08 Jakub Jelinek <jakub@redhat.com>
1037 * decl2.c (mark_used): Don't segfault if cfun != NULL but
1038 current_function_decl == NULL.
1040 2004-04-05 Nathan Sidwell <nathan@codesourcery.com>
1043 * pt.c (check_cv_quals_for_unify): Ignore bogus CV quals at outer
1046 2004-04-05 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1048 * init.c (decl_constant_value): Don't look at DECL_INITIAL
1050 * tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
1051 or TREE_SIDE_EFFECTS of a type.
1053 2004-04-02 Nathan Sidwell <nathan@codesourcery.com>
1056 * pt.c (check_cv_quals_for_unify): Correct logic for disallowed
1057 cv-qualifier unification.
1058 * tree.c (cp_build_qualified_type_real): Renable DR295 logic.
1060 2004-04-02 Jan Hubicka <jh@suse.cz>
1062 * cp-lang. (LANG_HOOKS_UPDATE_DECL_AFTER_SAVING): Define.
1063 * cp-tree.h (cp_update_decl_after_saving): Declare.
1064 * tree.c (cp_update_decl_after_saving): Define.
1066 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1069 * typeck.c (get_delta_difference): Call fold before returning the
1072 2004-04-01 Richard Henderson <rth@redhat.com>
1075 * decl.c (cp_finish_decl): Preserve TREE_READONLY more often.
1076 * typeck2.c (split_nonconstant_init): Clear TREE_READONLY.
1078 2004-04-01 Mark Mitchell <mark@codesourcery.com>
1081 * name-lookup.c (maybe_push_cleanup_level): Robustify.
1083 2004-04-01 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1085 * class.c (VTT_TOP_LEVEL_P): Use unsigned_flag directly.
1087 2004-03-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1089 * call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
1090 * class.c (check_bitfield_decl): Likewise.
1091 * cvt.c (type_promotes_to): Likewise.
1092 * decl.c (finish_enum): Likewise.
1093 * mangle.c (write_builtin_type): Likewise.
1094 * semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
1095 * typeck.c (type_after_usual_arithmetic_conversions): Likewise.
1096 (build_binary_op): Likewise.
1098 2004-03-31 Jan Hubicka <jh@suse.cz>
1100 * tree.h (optimize_function): Kill prototype.
1101 * optimize.c (dump_function, optimize_function, dump_finction): Kill.
1102 * semantics.c (expand_body): Kill.
1104 2004-03-30 Mark Mitchell <mark@codesourcery.com>
1107 * decl.c (start_decl_1): Do not decide whether or not to create a
1108 new cleanup level until after the type has been completed.
1111 * pt.c (tsubst_default_argument): Clear current_function_decl.
1113 2004-03-30 Zack Weinberg <zack@codesourcery.com>
1115 * name-lookup.c, parser.c: Use new shorter form of GTY markers.
1117 2004-03-29 Zack Weinberg <zack@codesourcery.com>
1119 * error.c (dump_function_name): If T's DECL_LANG_SPECIFIC
1120 is null, just print the literal name and return.
1122 2004-03-25 Kazu Hirata <kazu@cs.umass.edu>
1124 * cxx-pretty-print.c: Fix comment typos.
1126 2004-03-24 Kazu Hirata <kazu@cs.umass.edu>
1128 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h, friend.c:
1131 2004-03-23 Ziemowit Laski <zlaski@apple.com>
1133 * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
1134 * mangle.c (write_type): Add call to 'mangle_fundamental_type'
1137 2004-03-23 Zack Weinberg <zack@codesourcery.com>
1139 PR 12267, 12391, 12560, 13129, 14114, 14133
1140 * cp-lang.c (c_reset_state): Delete.
1141 (push_file_scope, pop_file_scope): New stubs.
1142 * parser.c (c_parse_file): Call sorry() here if called more than once.
1144 2004-03-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1146 * typeck.c (build_c_cast): Only look at TREE_CONSTANT_OVERFLOW
1149 2004-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1151 * cxx-pretty-print.c (pp_cxx_parameter_declaration_clause): Declare.
1153 2004-03-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
1155 * error.c (enum pad): Remove.
1156 (dump_qualifiers): Likewise.
1157 (dump_type): Replace dump_qualifiers with pp_cxx_cv_qualifier_seq.
1158 (dump_aggr_type): Likewise.
1159 (dump_type_suffix): Likewise.
1160 (dump_simple_decl): Likewise.
1161 (dump_function_decl): Likewise.
1162 (cv_to_string): Likewise.
1163 (dump_type_prefix): Likewise. Adjust return void.
1164 * cxx-pretty-print.c (pp_cxx_cv_qualifier_seq): Move to
1166 (pp_cxx_template_keyword_if_needed): Document.
1167 (pp_cxx_qualified_id): Document case FUNCTION_DECL. Tidy.
1168 (pp_cxx_expression): Handle NON_DEPENDENT_EXPR and
1169 MUST_NOT_THROW_EXPR.
1171 2004-03-21 Mark Mitchell <mark@codesourcery.com>
1174 * decl.c (cp_finish_decl): Compute the size of arrays declared in
1175 templates, if their type is non-dependent.
1177 2004-03-19 Mark Mitchell <mark@codesourcery.com>
1179 * call.c (build_op_delete_call): Do not forget the placement
1180 arguments when iterating through mutiple delete operators.
1182 * cp-tree.h (svaed_scope): Remove last_parms.
1183 (NEW_DELETE_OPNAME_P): New macro.
1184 (last_function_parms): Remove.
1185 (do_friend): Adjust prototype.
1186 * decl.c (grokparms): Return the PARM_DECLs directly, rather than
1187 using last_function_parms.
1188 (grokfndecl): Take the PARM_DECLs as an argument, rather than
1189 using last_function_parms.
1190 (grokdeclarator): Adjust accordingly. Do not form METHOD_TYPEs
1191 for class-specific operator new and operator delete.
1192 (grok_op_properties): Do not look for allocation functions with
1194 (start_function): Use DECL_ARGUMENTS instead of
1195 last_function_parms.
1196 * decl.h (last_function_parms): Do not declare.
1197 * decl2.c (grokclassfn): Do not use last_function_parms.
1198 * friend.c (do_friend): Remove parmdecls parameter.
1199 * name-lookup.c (push_to_top_level): Do not save last_function_parms.
1200 (pop_from_top_level): Do not restore it.
1201 * pt.c (check_explicit_specialization): Do not adjust
1202 last_function_parms.
1204 * name-lookup.c (do_local_using_decl): Create a local binding for
1205 types brought in via using declarations.
1207 * name-lookup.c (lookup_arg_dependent): Handle block-scope
1208 function declarations correctly.
1210 * semantics.c (finish_id_expression): Correct handling of
1211 conversion operators to dependent types.
1213 * typeck.c (lookup_destructor): Allow the use of destructors from
1216 2004-03-19 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1218 * cxx-pretty-print.c (pp_cxx_unqualified_id): Use
1219 TEMPLATE_TYPE_PARM_INDEX instead of TYPE_FIELDS.
1220 * search.c (dfs_unuse_fields): Add two more TREE_CODES that mean
1221 the field is named TEMPLATE_TYPE_PARM_INDEX.
1223 2004-03-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1226 * parser.c (cp_parser_functional_cast): A cast to anything
1227 but integral or enumaration type is not an integral constant
1229 * pt.c (value_dependent_expression_p): Handle cast expressions
1230 without operands (such as "int()").
1232 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1234 * semantics.c (finish_pseudo_destructor_expr): Allow differing
1235 cv-qualification between the type named by the
1236 pseudo-destructor-name and the object-type.
1238 * search.c (accessible_base_p): Handle non-proper bases.
1240 * name-lookup.c (do_nonmember_using_decl): If a using declaration
1241 refers to a single overloaded function, set the type of the
1243 * tree.c (lvalue_type): Simplify.
1244 * typeck.c (type_unknown_p): Do not assume all OVERLOADs have an
1246 (build_unary_op): Handle OVERLOADs with known types.
1248 * decl.c (duplicate_decls): Do not destroy DECL_ARGUMENTS for
1251 * parser.c (cp_parser_postfix_expression): Handle the use of
1252 "typename" in non-dependent contexts. Convert appropriately when
1253 when using a qualified name after "->" or ".".
1255 * call.c (conditional_conversion): Honor the requirement that some
1256 conversions refer to the original object.
1258 2004-03-18 Mark Mitchell <mark@codesourcery.com>
1260 * call.c (build_conditional_expr): Do not call force_rvalue for
1261 operands of void_type when the conditional expression itself has
1263 * name-lookup.c (pushdecl): Don't consider a declaration of a
1264 function named "main" to be an overload of a type named "main".
1265 * parser.c (cp_parser_template_name): Perform name lookup when the
1266 template name is proceeded by "template" if the qualifying scope
1268 * typeck.c (composite_pointer_type_r): Correctly handle
1269 pointer-to-member types.
1270 (build_const_cast): Likewise.
1272 2004-03-18 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1274 * cp-tree.def (TEMPLATE_TYPE_PARM, TYPEOF_TYPE): Update comments.
1275 * cp-tree.h (NEW_EXPR_USE_GLOBAL, DELETE_EXPR_USE_GLOBAL): Add check.
1276 (DELETE_EXPR_USE_VEC, COMPOUND_EXPR_OVERLOADED): Likewise.
1277 (KOENIG_LOOKUP_P, PTRMEM_OK_P, TEMPLATE_TYPE_PARM_INDEX): Likewise.
1278 (TYPENAME_TYPE_FULLNAME): Add check and use type.values.
1279 (TYPEOF_TYPE_EXPR): New macro.
1280 * class.c (finish_struct_bits): Use TYPE_VFIELD and TYPE_METHODS.
1281 * error.c (dump_type): Use TYPEOF_TYPE_EXPR.
1282 * pt.c (tsubst): Likewise.
1283 * semantics.c (finish_typeof): Likewise.
1284 * search.c (dfs_unuse_fields): Handle TYPENAME_TYPE, TYPEOF_TYPE,
1285 and TEMPLATE_TYPE_PARM.
1286 * typeck.c (comptypes): Use TYPE_ORIG_SIZE_TYPE, not TYPE_DOMAIN.
1287 (build_array_ref): Use TYPE_DOMAIN, not TYPE_VALUES.
1289 2004-03-16 Mark Mitchell <mark@codesourcery.com>
1292 * cp-tree.h (build_new_op): Change prototype.
1293 (build_x_binary_op): Likewise.
1294 * call.c (build_new_op): Add overloaded_p parameter.
1295 * decl2.c (grok_array_decl): Adjust call to build_new_op.
1296 * parser.c (cp_parser_binary_expression): Note that uses of
1297 overloaded operators prevents an expression from being considered
1298 an integral constant.
1299 * pt.c (tsubst_copy_and_build): Adjust calls to build_new_op and/or
1301 * semantics.c (finish_call_expr): Likewise.
1302 * typeck.c (rationalize_conditional_expr): Likewise.
1303 (build_x_indirect_ref): Likewise.
1304 (build_x_binary_op): Likewise.
1305 (build_x_unary_op): Likewise.
1306 (build_x_compound_expr): Likewise.
1307 (build_modify_expr): Likewise.
1308 * typeck2.c (build_x_arrow): Likewise.
1310 2004-03-15 Kazu Hirata <kazu@cs.umass.edu>
1312 * cp-lang.c, ptree.c: Update copyright.
1314 2004-03-13 Mark Mitchell <mark@codesourcery.com>
1317 * parser.c (cp_parser_non_integral_constant_expression): Encode
1318 more of the idiom that surrounded calls to this function within
1320 (cp_parser_primary_expression): Adjust accordingly.
1321 (cp_parser_postfix_expression): Likewise.
1322 (cp_parser_unary_expression): Likewise.
1323 (cp_parser_cast_expression): Likewise.
1324 (cp_parser_assignment_expression): Likewise.
1325 (cp_parser_expression): Likewise.
1326 (cp_parser_new_expression): Note that new-expressions are not
1327 allowed in integral constant expressions.
1328 (cp_parser_delete_expression): Likewise.
1330 2004-03-12 Matt Austern <austern@apple.com>
1332 * decl2.c (maybe_make_one_only): Look at
1333 TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether
1334 to make an explicit instantiation weak.
1335 * method.c (use_thunk): Make sure we call comdat_linkage
1337 * pt.c (do_type_instantiation): On systems where weak symbols
1338 don't go in a static archive's TOC, explicit instantiation of a
1339 class must imply *explicit* instantiation of its memeber.
1341 2004-03-11 Kazu Hirata <kazu@cs.umass.edu>
1343 * call.c, cp-tree.h, pt.c: Fix comment typos.
1345 2004-03-10 Mark Mitchell <mark@codesourcery.com>
1348 * decl.c (xref_tag): Disregard non-type declarations when
1349 looking up a tagged type.
1351 2004-03-09 Nathan Sidwell <nathan@codesourcery.com>
1354 * call.c (convert_like_real): Build a const qualified temporary,
1355 when testing ctor access.
1357 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1359 * call.c (initialize_reference): Fix typo.
1361 2004-03-09 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1364 * pt.c (determine_specialization): For member templates, match also
1368 * parser.c (cp_parser_initializer_clause): Fold initializer if it is
1370 * pt.c (tsubst_copy_and_build): Handle NOP_EXPRs.
1372 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1375 * call.c (initialize_reference): Handle initializers that are
1376 class-member access expressions applies to rvalues.
1378 2004-03-09 Mark Mitchell <mark@codesourcery.com>
1381 * name-lookup.c (supplement_binding): Ignore functions that are
1382 marked DECL_ANTICIPATED.
1384 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1387 * class.c (check_field_decls): Complain about non-static data
1388 members of reference type in unions. Propagate
1389 CLASSTYPE_REF_FIELDS_NEED_INIT and
1390 CLASSTYPE_READONLY_FIELDS_NEED_INIT from the types of non-static
1392 * init.c (perform_member_init): Complain about mbmers with const
1393 type that are not explicitly initialized.
1395 2004-03-08 Mark Mitchell <mark@codesourcery.com>
1397 * class.c (check_methods): Don't use IDENTIFIER_ERROR_LOCUS.
1398 * cp-tree.h (DECL_INVALID_OVERRIDER_P): New macro.
1399 (lang_identifier): Remove implicit_decl and error_locus.
1400 (IDENTIFIER_IMPLICIT_DECL): Remove.
1401 (SET_IDENTIFIER_IMPLICTI_DECL): Likewise.
1402 (IDENTIFIER_ERROR_LOCUS): Likewise.
1403 (SET_IDENTIFIER_ERROR_LOCUS): Likewise.
1404 (TYPE_ASSEMBLER_NAME_STRING): Likewise.
1405 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1406 (implicitly_declare): Remove.
1407 * decl.c (warn_extern_redeclared_static): Remove check of
1408 IDENTIFIER_IMPLICIT_DECL.
1409 (duplicate_decls): Don't check IDENTIFIER_ERROR_LOCUS.
1410 (implicitly_declare): Remove.
1411 (grok_ctor_properties): Don't set IDENTIFIER_ERROR_LOCUS.
1412 (start_function): Don't check IDENTIFIER_IMPLICIT_DECL.
1413 (start_method): Don't check IDENTIFIER_ERROR_LOCUS.
1414 * lex.c (unqualified_name_lookup_error): Create a dummy VAR_DECL
1415 in the innermost scope, rather than at namespace scope.
1416 * name-lookup.c (push_local_binding): Give it external linkage.
1417 (pushdecl): Remove dead code.
1418 * name-lookup.h (push_local_binding): Declare it.
1419 * ptree.c (cxx_print_identifier): Don't print
1420 IDENTIFIER_IMPLICIT_DECL or IDENTIFIER_ERROR_LOCUS.
1421 * search.c (check_final_overrider): Use DECL_INVALID_OVERRIDER_P,
1422 not IDENTIFIER_ERROR_LOCUS.
1423 * typeck.c (build_function_call): Remove dead code.
1425 2004-03-08 Jason Merrill <jason@redhat.com>
1428 * decl.c (xref_tag): Remove attribute handling.
1429 * cp-tree.h: Adjust prototype.
1430 * decl.c, parser.c, rtti.c: Adjust callers.
1431 * parser.c (cp_parser_class_head): Pass back attributes in the
1433 (cp_parser_class_specifier): Adjust.
1435 2004-03-08 Matt Austern <austern@apple.com>
1438 * name-lookup.c (add_decl_to_level): Add extern variables, as well
1439 as static, to static_decls array.
1441 2004-03-05 Jason Merrill <jason@redhat.com>
1443 * tree.c (list_hash_pieces): s/TYPE_HASH/TREE_HASH/.
1445 2004-03-04 Geoffrey Keating <geoffk@apple.com>
1447 * decl.c (grokfndecl): Update old incorrect comment.
1448 (grokvardecl): Diagnose C++ variables of type with no linkage.
1450 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1453 * pt.c (build_non_dependent_expr): Do not create a
1454 NON_DEPENDENT_EXPR for a THROW_EXPR.
1456 2004-03-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
1459 * error.c (dump_expr): Handle THROW_EXPR.
1461 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1464 * parser.c (cp_parser_postfix_expression): Do not perform Koenig
1465 lookup if ordinary name-lookup finds a non-function.
1466 * pt.c (tsubst_copy_and_build): Likewise.
1469 * parser.c (cp_parser_late_parsing_default_args): Check that there
1470 are no extra tokens after the end of the default-argument
1473 2004-03-01 Mark Mitchell <mark@codesourcery.com>
1476 * lex.c (retrofit_lang_decl): Treat entities with no linkage as
1477 having C++ linkage for name-mangling purposes.
1480 * parser.c (cp_parser_direct_declarator): Recognize constructor
1481 declarators that use a template-id to name the class being
1485 * pt.c (tsubst_qualified_id): Handle dependent qualifying scopes.
1486 (tsubst_expr): Do not call tsubst_copy, even when
1487 processing_template_decl.
1489 2004-03-01 Jeff Law <law@redhat.com>
1491 * init.c (build_vec_delete_1): Convert 2nd argument to NE_EXPR to
1494 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1497 * name-lookup.h (push_scope): Change prototype.
1498 * name-lookup.c (push_scope): Do not reenter the current class
1500 * decl.c (grokfndecl): Check return code from push_scope before
1502 * decl2.c (check_classfn): Likewise.
1503 * parser.c (cp_parser_conversion_function_id): Likewise.
1504 (cp_parser_init_declarator): Likewise.
1505 (cp_parser_direct_declarator): Likewise.
1506 (cp_parser_class_specifier): Likewise.
1507 (cp_parser_class_head): Likewise.
1508 (cp_parser_lookup_name): Likewise.
1509 (cp_parser_constructor_declarator_p): Likewise.
1510 * pt.c (instantiate_class_template): Likewise.
1511 (resolve_typename_type): Likewise.
1513 2004-02-29 Mark Mitchell <mark@codesourcery.com>
1516 * typeck.c (build_modify_expr): Remove more of the cast-as-lvalue
1520 * class.c (update_vtable_entry_for_fn): Do not go through
1521 covariance machinery if the type returned by an overrider is the
1522 same as the original.
1524 2004-02-29 Kazu Hirata <kazu@cs.umass.edu>
1526 * call.c: Fix a comment typo.
1528 2004-02-27 Ziemowit Laski <zlaski@apple.com>
1530 * tree.c (pod_type_p): Treat VECTOR_TYPEs as PODs.
1532 2004-02-26 Mark Mitchell <mark@codesourcery.com>
1535 * parser.c (cp_parser_parameter_declaration_list): Commit
1536 to fewer tentative parses.
1538 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1541 * pt.c (dependent_type_p_r): A template template parameter is a
1544 2004-02-26 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1547 * mangle.c (write_template_arg_literal): Don't rely on identity for
1550 2004-02-24 Jason Merrill <jason@redhat.com>
1552 * tree.c (build_exception_variant): Use check_qualified_type.
1554 2004-02-23 Zack Weinberg <zack@codesourcery.com>
1555 Kazu Hirata <kazu@cs.umass.edu>
1557 * decl.c (cxx_init_decl_processing): Don't check
1558 flag_writable_strings.
1560 2004-02-23 Andrew Pinski <pinskia@physics.uc.edu>
1563 * typeck.c (maybe_warn_about_returning_address_of_location):
1564 Change check for VAR_DECL to use DECL_P instead.
1566 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1569 * cvt.c (build_expr_type_conversion): Type must be complete before
1570 looking up for conversions.
1572 2004-02-23 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1575 * name-lookup.c (arg_assoc_class): Don't look into template
1576 arguments if it is not a primary template.
1578 2004-02-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1581 * method.c (use_thunk): Always clone function argument tree.
1583 2004-02-20 Mark Mitchell <mark@codesourcery.com>
1586 * pt.c (tsubst_copy): Call mark_used for a PARM_DECL.
1589 * semantics.c (begin_class_definition): Set TYPE_PACKED correctly
1590 for all type variants.
1592 2004-02-19 Mark Mitchell <mark@codesourcery.com>
1595 * decl.c (duplicate_decls): Return error_mark_node for invalid
1597 * name-lookup.c (push_namespace): Ignore the return value from
1599 * pt.c (push_template_decl_real): Robustify.
1602 * name-lookup.c (push_class_level_binding): Do not complain about
1603 adding a binding for a member whose name is the same as the
1604 enclosing class if the member is located in a base class of the
1607 2004-02-19 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1610 * parser.c (cp_parser_new_expression): Parse an ill-formed
1611 direct-new-declarator after a parenthesized type-id to emit good
1614 2004-02-18 Kazu Hirata <kazu@cs.umass.edu>
1616 * cp-tree.def, cvt.c: Update copyright.
1618 2004-02-17 Mark Mitchell <mark@codesourcery.com>
1621 * cp-tree.h (abi_version_at_least): Remove.
1622 * mangle.c: Include flags.h.
1624 2004-02-15 Mark Mitchell <mark@codesourcery.com>
1627 * call.c (build_conditional_expr): Handle conversions between
1628 class types which result in differently cv-qualified type
1632 * class.c (delete_duplicate_fields_1): Remove.
1633 (delete_duplicate_fields): Likewise.
1634 (finish_struct_anon): Remove check for members with the same name
1635 as their enclosing class.
1636 (check_field_decls): Do not call duplicate_fields.
1637 * decl.c (grokdeclarator): Remove check for static data members
1638 with the same name as their enclosing class.
1639 * name-lookup.c (push_class_level_binding): Check for members with
1640 the same name as their enclosing class.
1642 2004-02-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
1645 * error.c (dump_decl): Handle TEMPLATE_TYPE_PARM.
1647 2004-02-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1650 * pt.c (push_template_decl_real): Make sure DECL_TI_ARGS of DECL
1651 has full set of arguments.
1653 2004-02-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1656 * error.c (dump_decl) <ALIAS_DECL>: Dump as simple declarations.
1658 2004-02-13 Mark Mitchell <mark@codesourcery.com>
1661 * cp-tree.h (delete_sanity): Change prototype.
1662 * decl2.c (delete_sanity): Make doing_vec a bool, not an int.
1663 Remove dead code. Adjust code to warn about deleting an array.
1664 * typekc.c (decay_conversion): Use build_address and build_nop.
1667 * search.c (accessible_p): Do not check access in thunks.
1670 * call.c (build_conditional_expr): Call force_rvalue on the
1671 non-void operand in the case that one result is a throw-expression
1672 and the other is not.
1674 2004-02-13 Ian Lance Taylor <ian@wasabisystems.com>
1677 * parser.c (cp_parser_pseudo_destructor_name): Check for errors on
1678 the type name and look ahead for ::~, and bail out early with a
1679 better error message if the parse is going to fail.
1681 2004-02-12 Mark Mitchell <mark@codesourcery.com>
1683 * call.c (conversion_kind): New type.
1684 (conversion_rank): Likewise.
1685 (conversion): Likewise.
1686 (CONVERSION_RANK): New macro.
1687 (conversion_obstack): New variable.
1688 (obstack_initialized): Likewise.
1689 (z_candidate): Change type of convs and second_conv.
1690 (candidate_warning): New type.
1691 (IDENTITY_RANK): Remove.
1692 (EXACT_RANK): Likewise.
1693 (PROMO_RANK): Likewise.
1694 (STD_RANK): Likewise.
1695 (PBOOL_RANK): Likewise.
1696 (USER_RANK): Likewise.
1697 (ELLIPSIS_RANK): Likewise.
1698 (BAD_RANK): Likewise.
1699 (ICS_RANK): Likewise.
1700 (ICS_STD_RANK): Likewise.
1701 (ICS_USER_FLAG): Likewise.
1702 (ICS_ELLIPSIS_FLAG): Likewise.
1703 (ICS_THIS_FLAG): Likewise.
1704 (ICS_BAD_FLAG): Likewise.
1705 (NEED_TEMPORARY_P): Likewise.
1706 (CHECK_COPY_CONSTRUCTOR_P): Likewise.
1707 (USER_CONV_CAND): Likewise.
1708 (USER_CONV_FN): Likewise.
1709 (conversion_obstack_alloc): New function.
1710 (alloc_conversion): Likewise.
1711 (validate_conversion_obstack): Likewise.
1712 (alloc_conversions): Likewise.
1713 (build_conv): Adjust to deal with new conversion data structures.
1714 (build_identity_conv): New function.
1715 (build_ambiguous_conv): Likewise.
1716 (standard_conversion): Adjust to deal with new conversion data
1718 (convert_class_to_reference): Likewise.
1719 (direct_reference_binding): Likewise.
1720 (reference_binding): Likewise.
1721 (implicit_conversion): Likewise.
1722 (add_candidate): Likewise.
1723 (add_function_candidate): Likewise.
1724 (add_conv_candidate): Likewise.
1725 (build_builtin_candidate): Likewise.
1726 (print_z_candidate): Likewise.
1727 (merge_conversion_sequences): Likewise.
1728 (build_user_type_conversion_1): Likewise.
1729 (build_user_type_conversion): Likewise.
1730 (build_new_function_call): Likewise.
1731 (build_object_call): Likewise.
1732 (conditional_conversion): Likewise.
1733 (build_conditional_expr): Likewise.
1734 (build_new_op): Likewise.
1735 (build_op_delete_call): Likewise.
1736 (convert_like_real): Likewise.
1737 (build_over_call): Likewise.
1738 (build_new_method_call): Likewise.
1739 (is_subseq): Likewise.
1740 (maybe_handle_implicit_object): Likewise.
1741 (maybe_handle_ref_bind): Likewise.
1742 (compare_ics): Likewise.
1743 (source_type): Likewise.
1744 (add_warning): Likewise.
1746 (can_convert_arg): Likewise.
1747 (can_convert_arg_bad): Likewise.
1748 (perform_implicit_conversion): Likewise.
1749 (perform_direct_initialization_if_possible): Likewise.
1750 (initialize_reference): Likewise.
1751 * cp-lang.c (cp_tree_size): Do not handle WRAPPER.
1752 * cp-tree.def (WRAPPER): Likewise.
1753 (IDENTITY_CONV): Remove.
1754 (LVALUE_CONV): Likewise.
1755 (QUAL_CONV): Likewise.
1756 (STD_CONV): Likewise.
1757 (PTR_CONV): Likewise.
1758 (PMEM_CONV): Likewise.
1759 (BASE_CONV): Likewise.
1760 (REF_BIND): Likewise.
1761 (USER_CONV): Likewise.
1762 (AMBIG_CONV): Likewise.
1763 (RVALUE_CONV): Likewise.
1764 * cp-tree.h (tree_wrapper): Remove.
1765 (WRAPPER_ZC): Remove.
1766 (lang_tree_node): Remove wrapper.
1767 (LOOKUP_SPECULATIVELY): Remove.
1768 (build_op_delete_call): Adjust prototype.
1769 (validate_conversion_obstack): Declare.
1770 (build_zc_wrapper): Remove.
1771 * cvt.c (convert_to_reference): Remove dead code.
1772 (ocp_convert): Likewise.
1773 * decl.c (redeclaration_error_message): Correct handling of
1775 (finish_destructor_body): Do not use LOOKUP_SPECULATIVELY.
1776 (cp_tree_node_structure): Remove WRAPPER case.
1777 * decl2.c (finish_file): Call validate_conversion_obstack.
1778 * init.c (build_new_1): Remove use of LOOKUP_SPECULATIVELY.
1779 (build_op_delete_call): Likewise.
1780 (build_x_delete): Likewise.
1781 (build_delete): Adjust call to build_op_delete_call.
1782 * pt.c (tsubst_friend_declaration): Adjust code to determine
1783 whether or not a friend template is a definition.
1784 (tsubst_decl): Clear DECL_INITIAL for new FUNCTION_DECLs.
1785 * tree.c (build_zc_wrapper): Remove.
1787 2004-02-12 Zack Weinberg <zack@codesourcery.com>
1789 * cp-lang.c: Don't define LANG_HOOKS_BUILTIN_TYPE_DECLS.
1790 * cp-tree.h: Don't declare cxx_builtin_type_decls.
1791 * decl.c (builtin_type_decls, cxx_builtin_type_decls): Delete.
1792 (record_builtin_type): Call debug_hooks->type_decl on the TYPE_DECL.
1794 2004-02-10 Mark Mitchell <mark@codesourcery.com>
1796 * typeck.c (lookup_destructor): Fix typo in error message.
1798 2004-02-09 Kazu Hirata <kazu@cs.umass.edu>
1800 * call.c, parser.c, tree.c: Fix comment typos.
1802 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1805 * optimize.c (maybe_clone_body): Don't update DECL_ESTIMATED_INSNS.
1806 * decl.c (duplicate_decls, start_function): Likewise.
1808 2004-02-07 Zack Weinberg <zack@codesourcery.com>
1810 * name-lookup.c (pushdecl): Issue shadow warnings directly.
1811 * parser.c (free_parser_stacks): Delete.
1813 2004-02-07 Kazu Hirata <kazu@cs.umass.edu>
1815 * rtti.c: Update copyright.
1817 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1820 * decl.c (require_complete_types_for_parms): Do not insert
1821 error_mark_node in the parameter list.
1823 2004-02-06 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1826 * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
1827 error when terminator can not be found.
1829 2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
1831 Make-lang.in (po-generated): Delete.
1833 2004-02-05 Kazu Hirata <kazu@cs.umass.edu>
1835 * call.c (type_passed_as): Replace PROMOTE_PROTOTYPES with
1836 targetm.calls.promote_prototypes.
1838 2004-02-05 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1842 2004-01-15 Geoffrey Keating <geoffk@apple.com>
1844 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
1845 (handle_pragma_implementation): Likewise.
1847 2004-02-05 Mark Mitchell <mark@codesourcery.com>
1850 * typeck.c (lookup_destructor): Tweak error message.
1852 2004-02-05 Jan Hubicka <jh@suse.cz>
1854 * tree.c (cp_cannot_inline_tree_fn): Allow inlining of comdat
1857 2004-02-05 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1860 * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
1861 code, only emits the diagnostic now. Added lookup of the identifier
1862 and support for qualified ids.
1863 (cp_parser_parse_and_diagnose_invalid_type_name): New function.
1864 Parse an (invalid) type name as id-expression within a declarator.
1865 (cp_parser_simple_declaration): Use it.
1866 (cp_parser_member_declaration): Likewise.
1867 (cp_parser_make_typename_type): New function. Handle errors through
1868 cp_parser_diagnose_invalid_typename.
1869 (cp_parser_elaborated_type_specifier): Use it.
1871 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1874 * call.c (convert_like_real): Use "converting" rather than
1875 "argument" as the descriptive keyword to
1876 dubious_conversion_warnings.
1877 * typeck.c (convert_for_assignment): Do not call
1878 dubious_conversion_warnings.
1880 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1883 * init.c (build_delete): Emit a more informative error message in
1884 case of an incomplete type, and on the correct source line.
1886 2004-02-04 Kazu Hirata <kazu@cs.umass.edu>
1888 * error.c, search.c: Update copyright.
1890 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1893 * rtti.c (tinfo_base_init): Use import_export_tinfo to decide the
1894 linkage for the typeinfo name string.
1896 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1899 * cp-tree.h (fold_non_dependent_expr): New function.
1900 * parser.c (cp_parser_fold_non_dependent_expr): Remove.
1901 (cp_parser_template_argument): Use fold_non_dependent_expr.
1902 (cp_parser_direct_declarator): Likewise.
1903 * pt.c (fold_non_dependent_expr): New function.
1904 (convert_nontype_argument): Use it.
1905 (tsubst_qualified_id): Simplify.
1906 (tsubst_copy_and_build): Likewise.
1908 2004-02-04 Mark Mitchell <mark@codesourcery.com>
1910 * decl.c (cxx_push_function_context): Do not set
1911 current_function_is_thunk.
1912 * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
1915 2004-02-04 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1918 * pt.c (more_specialized_class): Increase processing_template_decl
1919 while partial ordering.
1921 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1924 * decl.c (start_function): Do not call pushdecl for any
1925 instantiation or specialization of a primary template.
1927 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1930 * parser.c (cp_parser_class_name): Robustify.
1933 * parser.c (cp_parser_cache_group): Do not consume the EOF token.
1936 * semantics.c (finish_id_expression): Do not return an
1937 IDENTIFIER_NODE when lookup finds a PARM_DECL.
1939 2004-02-03 Mark Mitchell <mark@codesourcery.com>
1942 * pt.c (build_non_dependent_expr): Do not build
1943 NON_DEPENDENT_EXPRs for FUNCTION_DECLs or TEMPLATE_DECLs.
1946 * semantics.c (finish_id_expression): Do not return an
1947 IDENTIFIER_NODE when lookup finds a VAR_DECL.
1950 * parser.c (cp_parser_simple_declaration): When skipping to the
1951 end of the statement swallow the terminating semicolon.
1953 2004-02-02 Mark Mitchell <mark@codesourcery.com>
1956 * init.c (build_offset_ref): Improve error recovery for invalid
1957 uses of non-static member functions.
1960 * cp-tree.h (cp_build_type_attribute_variant): New function.
1961 * class.c (build_clone): Use cp_build_type_attribute_variant.
1962 * decl.c (duplicate_decls): Likewise.
1963 * pt.c (copy_default_args_to_explicit_spec): Likewise.
1964 (tsubst_function_type): Likewise.
1965 * tree.c (build_exception_variant): Check attributes before
1966 concluding that two types are the same.
1967 (cp_build_type-attribute_variant): New method.
1968 * typeck.c (merge_types): Use cp_build_type_attribute_variant.
1971 * call.c (convert_class_to_reference): Keep better track of
1972 pedantically invalid user-defined conversions.
1974 2004-02-01 Giovanni Bajo <giovannibajo@gcc.gnu.org>
1977 * pt.c (tsubst_qualified_id): Improved error message when a type
1978 is expected but not found.
1980 2004-01-31 Kazu Hirata <kazu@cs.umass.edu>
1982 * class.c: Fix comment typos.
1984 * error.c: Likewise.
1985 * parser.c: Likewise.
1987 * search.c: Likewise.
1988 * typeck.c: Likewise.
1990 2004-01-30 Richard Henderson <rth@redhat.com>
1993 * method.c (use_thunk): Don't force_target_expr for void thunks.
1994 * tree.c (build_target_expr_with_type): Assert non-void type.
1995 (force_target_expr): Likewise.
1997 2004-01-30 Michael Matz <matz@suse.de>
1999 * parser.c (cp_parser_labeled_statement): Accept case ranges.
2001 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2005 * decl.c (grokdeclarator): Check immediatly type completeness for
2006 non-dependent types.
2008 2004-01-30 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2011 * call.c (convert_arg_to_ellipsis): Don't emit a warning if within
2012 a sizeof expression.block
2014 2004-01-29 Mark Mitchell <mark@codesourcery.com>
2017 * mangle.c (write_encoding): Correct encoding of member template
2020 2004-01-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2022 * parser.c (cp_parser_template_id): Parse tentatively `[:' after a
2023 template name as it was `<::' (digraph typo).
2024 (cp_parser_nth_token_starts_template_argument_list_p): New function.
2025 (cp_parser_id_expression): Use it.
2026 (cp_parser_nested_name_specifier_opt): Likewise.
2027 (cp_parser_template_name): Likewise.
2028 (cp_parser_class_name): Likewise.
2029 (cp_lexer_get_preprocessor_token): Use c_lex_with_flags.
2031 2004-01-28 Mark Mitchell <mark@codesourcery.com>
2034 * typeck.c (merge_types): Do not merge attributes into
2038 * parser.c (cp_parser_direct_declarator): Do not prevent
2039 backtracking inside a parenthesized declarator.
2040 (cp_parser_parameter_declaration): Fix typo in comment.
2042 2004-01-28 Jan Hubicka <jh@suse.cz>
2044 * semantics.c (expand_body) Do emit_associated_thunks before
2047 2004-01-27 Devang Patel <dpatel@apple.com>
2049 * name-lookup.c: Include "debug.h"
2050 (do_namespace_alias): Invoke debug_hooks to emit debug info
2051 for namespace alias.
2052 (do_local_using_decl): Invoke debug_hooks to emit debug info
2054 (do_class_using_decl): Same.
2055 (do_toplevel_using_decl): Same.
2056 (do_using_directive): Same.
2057 (cp_emit_debug_info_for_using): New function.
2058 * Make-lang.in (cp/parser.o): Depend on debug.h
2059 (cp/name-lookup.o): Same.
2061 2004-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2063 * cp-tree.h (language_function, lang_type_header): Use
2065 * name-lookup.h (cp_binding_level): Likewise.
2067 2004-01-26 Mark Mitchell <mark@codesourcery.com>
2070 * semantics.c (finish_for_expr): Check for unresolved overloaded
2073 * class.c (add_method): Just check processing_template_decl to
2074 determine whether or not we are within a template.
2075 * decl2.c (maybe_retrofit_in_chrg): Likewise.
2076 * init.c (decl_constant_value): Check the type of the declaration,
2078 * name-lookup.c (maybe_push_to_top_level): Rename to ...
2079 (push_to_top_level): ... this.
2080 * name-lookup.h (maybe_push_to_top_level): Do not declare it.
2081 * pt.c (push_template_decl_real): Reorder condition for speed.
2082 (convert_template_argument): Use dependency-checking functions in
2083 place of uses_template_parms.
2084 (lookup_template_class): Avoid calling uses_template_parms more
2086 (uses_template_parms): Reimplement, using dependency-checking
2088 (instantiate_class_template): Use push_to_top_level, not
2089 maybe_push_to_top_level.
2090 (type_unification_real): Simplify.
2091 (type_dependent_expression_p): Handle OFFSET_REFs and
2093 (any_dependent_template_arguments_p): Handle multiple levels of
2095 * semantics.c (expand_or_defer_fn): Do not check
2096 uses_template_parms for template instantiations.
2097 * typeck.c (comptypes): Avoid calling cp_type_quals.
2099 2004-01-25 Mark Mitchell <mark@codesourcery.com>
2102 * call.c (build_over_call): Do not convert arguments when
2103 processing a template.
2104 * pt.c (build_non_dependent_expr): Do not build a
2105 NON_DEPENDENT_EXPR for arithmetic constants.
2107 2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2110 * parser.c (cp_parser_type_parameter): When cp_parser_id_expression
2111 returns a TYPE_DECL. no further lookup is required.
2112 * semantics.c (check_template_template_default_arg): A TYPE_DECL
2113 is invalid. Rework to give better diagnostics.
2115 2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2118 * pt.c (instantiate_class_template): Add an error_mark_node
2120 (tsubst_decl) <TEMPLATE_DECL case>: Likewise.
2122 2004-01-23 Andrew Pinski <pinskia@physics.uc.edu>
2125 * decl.c (finish_function): Move the call to
2126 finish_fname_decls below the call to
2127 finish_eh_spec_block.
2129 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2131 * optimize.c, typeck2.c: Update copyright.
2133 2004-01-21 Kazu Hirata <kazu@cs.umass.edu>
2135 * Make-lang.in, call.c, class.c, decl2.c, except.c, expr.c,
2136 init.c, mangle.c, typeck.c: Update copyright.
2138 2004-01-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
2140 * parser.c (cp_parser_class_specifier): Prevent garbage collection.
2142 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2144 * Make-lang.in: Replace $(docdir) with doc.
2145 (c++.info, c++.srcinfo): Dummy entry.
2146 (c++.man, c++.srcman): New rules.
2147 (c++.install-man): Revamp rule.
2149 2004-01-20 Kelley Cook <kcook@gcc.gnu.org>
2151 * Make-lang.in (CXX_INSTALL_NAME, GXX_INSTALL_NAME,
2152 CXX_TARGET_INSTALL_NAME, GXX_TARGET_INSTALL_NAME): Define via a
2153 immediate $(shell) instead of deferred backquote.
2155 2004-01-19 Mark Mitchell <mark@codesourcery.com>
2158 * parser.c (cp_parser_postfix_expression): When encountering
2159 incomplete type on left-hand side of "->" or ".", treat the entire
2160 expression as erroneous.
2163 * call.c (build_field_call): Remove.
2164 (n_build_method_call): Likewise.
2165 (build_method_call): Likewise.
2166 (build_new_method_call): Do not call build_field_call.
2167 * class.c (n_build_method_call): Remove.
2168 (print_class_statistics): Do not print it.
2169 * cp-tree.h (build_method_call): Remove declaration.
2170 (finish_object_call_expr): Likewise.
2171 (build_new_1): Do not use build_method_call.
2172 * parser.c (cp_parser_postfix_expression): Use finish_call_expr
2173 when the function appearing on the right-hand-side of "." or "->"
2174 is not actually a function.
2175 * pt.c (tsubst_copy_and_build): Likewise.
2176 * semantics.c (finish_object_call_expr): Remove.
2178 2004-01-18 Mark Mitchell <mark@codesourcery.com>
2181 * pt.c (tsubst): Use finish_typeof.
2183 2004-01-18 Jason Merrill <jason@redhat.com>
2186 * except.c (build_throw): In a template, set
2187 current_function_returns_abnormally.
2189 2004-01-17 Fred Fish <fnf@intrinsity.com>
2192 * decl.c (reshape_init): Handle VECTOR_TYPE like ARRAY_TYPE,
2193 except don't call array_type_nelts() with a VECTOR_TYPE.
2195 2004-01-16 Jan Hubicka <jh@suse.cz>
2197 * mangle.c (write_mangled_name): Remove inline modifier.
2199 2004-01-16 Mark Mitchell <mark@codesourcery.com>
2202 * decl.c (compute_array_index_type): Fix grammar in comment.
2203 * init.c (build_zero_init): Handle zero-sized arrays correctly.
2206 * call.c (name_as_c_string): Print conversion operator names
2210 * call.c (initialize_reference): Pass -1 for inner parameter to
2213 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2216 * parser.c (cp_parser_base_specifier): Check for an invalid
2217 keyword `typename' and emit an user-friendly error message.
2219 2004-01-15 Geoffrey Keating <geoffk@apple.com>
2222 * cp/lex.c (handle_pragma_interface): Duplicate string from tree.
2223 (handle_pragma_implementation): Likewise.
2225 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2228 * typeck.c (build_class_member_access_expr): Allow to access members
2229 of the currently open class.
2230 (finish_class_member_access_expr): Likewise.
2232 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2235 * name-lookup.c (validate_nonmember_using_decl): Take scope and
2236 name by value, instead of computing them.
2237 (do_local_using_decl, do_toplevel_using_decl): Add scope and name
2238 arguments. Pass them to validate_nonmember_using_decl.
2239 * name-lookup.h (do_local_using_decl): Adjust.
2240 (do_toplevel_using_decl): Likewise.
2241 * parser.c (cp_parser_using_declaration): Likewise.
2242 * pt.c (tsubst_expr): Likewise.
2244 2004-01-15 Alexandre Oliva <aoliva@redhat.com>
2248 * name-lookup.c (qualified_lookup_using_namespace): Search
2249 strongly-associated namespaces first, and only then try other
2252 2004-01-15 Kelley Cook <kcook@gcc.gnu.org>
2254 * Make-lang.in (c++.srcextra): Dummy entry.
2256 2004-01-15 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2259 * parser.c (cp_parser_template_name): Don't try to parse a
2260 conversion-function-id, as it cannot be a template-name.
2261 (cp_parser_simple_type_specifier): Check for invalid template-ids
2262 even after a built-in type.
2264 2004-01-14 Jan Hubicka <jh@suse.cz>
2267 * pt.c (instantiate_decl): Do not increase function_depth.
2269 2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
2273 * parser.c (cp_parser_elaborated_type_specifier): Warn about
2274 attributes and discard.
2275 * decl.c (xref_tag): Don't overwite existing attributes with
2278 2004-01-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2281 * parser.c (cp_parser_lookup_name): Return error_mark_node if there
2282 is no destructor while looking up a BIT_NOT_EXPR.
2284 2004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
2286 * cxxfilt.c: Remove unused file.
2288 2004-01-14 Jan Hubicka <jh@suse.cz>
2290 Partial fix to PR c++/12850
2291 * decl2.c (mark_used): Do not proactively instantiate templates
2292 when compiling in unit-at-a-time or not optimizing.
2293 * optimize.c (maybe_clone_body): Do not increase function depth.
2295 2004-01-13 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2298 * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
2300 2004-01-12 Steven Bosscher <stevenb@suse.de>
2303 * parser.c (cp_parser_member_declaration): Any non-type is also
2304 not a class or a function.
2306 2004-01-12 Jason Merrill <jason@redhat.com>
2309 * class.c (build_base_path): Do not mark vtable references as
2311 (build_vtbl_ref_1): Likewise.
2313 2004-01-12 Richard Henderson <rth@redhat.com>
2316 * typeck2.c (split_nonconstant_init_1, split_nonconstant_init): New.
2317 (store_init_value): Use it.
2318 * decl.c (check_initializer): Expect full initialization code
2319 from store_init_value.
2320 * init.c (expand_aggr_init_1): Likewise.
2321 * decl2.c (maybe_emit_vtables): Abort if runtime init needed.
2323 2004-01-12 Mark Mitchell <mark@codesourcery.com>
2325 * class.c (layout_class_type): For non-POD class types, also copy
2326 the DECL_SIZE and DECL_MODE of fields to the base class type.
2328 2004-01-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2331 * pt.c (instantiate_decl): Set DECL_TEMPLATE_INSTANTIATED before
2332 calling regenerate_decl_from_template.
2334 2004-01-12 Scott Brumbaugh <scottb.lists@verizon.net>
2337 * parser.c (cp_parser_decl_specifier_seq): Add check for a friend
2338 decl-specifier occurring along with a class definition.
2340 2004-01-12 Ian Lance Taylor <ian@wasabisystems.com>
2342 * parser.c (cp_parser_decl_specifier_seq): Add parenthetical
2343 clauses to comments describing declares_class_or_enum.
2344 (cp_parser_type_specifier): Set *declares_class_or_enum to 0, not
2347 2004-01-12 Jan Hubicka <jh@suse.cz>
2349 * pt.c (for_each_template_parm): Do not check for duplicates.
2350 (for_each_template_parm): Use walk_tree duplicate checking code.
2352 2004-01-11 Ian Lance Taylor <ian@wasabisystems.com>
2355 * parser.c (cp_parser_decl_specifier_seq): If the first decl_spec
2356 is error_mark_node, don't add any more decl_specs.
2357 (cp_parser_init_declarator): After committing to a declaration, if
2358 the decl_specifiers start with error_mark_node, issue an error and
2359 change the type to "int".
2361 2004-01-09 Nathanael Nerode <neroden@gcc.gnu.org>
2364 * Make-lang.in: Copy gcc.1 to g++.1 rather than using .so.
2366 2004-01-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2370 * pt.c (tsubst): Substitution must fail if we are attempting to
2371 create an array with element type that is an abstract class type.
2372 * decl.c (cp_finish_decl): Strip pointers and array types recursively
2373 before calling abstract_virtuals_error.
2375 2004-01-09 Alexandre Oliva <aoliva@redhat.com>
2377 * name-lookup.c (qualified_lookup_using_namespace): Consider
2378 strong using directives even if we've already found a binding.
2380 2004-01-09 Mark Mitchell <mark@codesourcery.com>
2382 * cp-tree.h (cxx_expand_expr): Change prototype.
2383 * expr.c (cxx_expand_expr): Add alt_rtl parameter.
2385 2004-01-08 Giovanni Bajo <giovannibajo@gcc.gnu.org>
2388 * pt.c (value_dependent_expression_p): Handle COMPONENT_REFs by
2389 looking into them recursively. They can be there because of the
2390 new __offsetof__ extension.
2392 2004-01-07 Zack Weinberg <zack@codesourcery.com>
2394 * parser.c (cp_parser_save_member_function_body): Mark the
2397 2004-01-05 Mark Mitchell <mark@codesourcery.com>
2400 * class.c (build_clone): Copy type attributes from the original
2401 function to the clone.
2404 * class.c (build_vtbl_ref_1): Do not unconditionally mark vtable
2405 references as constant.
2408 * parser.c (cp_parser_explicit_instantiation): Improve error
2410 (cp_parser_require): Improve indication of the error location.
2413 * parser.c (cp_parser_class_head): Reorder logic to check for
2414 invalid qualification.
2416 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2419 * name-lookup.c (lookup_using_namespace): Remove spacesp
2421 (unqualified_namespace_lookup): Likewise.
2422 (lookup_qualified_name): Adjust accordingly.
2423 (lookup_name_real): Likewise.
2424 (lookup_arg_dependent): Do not eliminate the namespace of the
2425 functions found by unqualified name lookup unless that is the
2428 2004-01-04 Andrew Pinski <pinskia@physics.uc.edu>
2430 * semantics.c (push_deferring_access_checks): Fix format.
2431 (resume_deferring_access_checks): Likewise.
2432 (stop_deferring_access_checks): Likewise.
2433 (pop_deferring_access_checks): Likewise.
2434 (get_deferred_access_checks): Likewise.
2435 (pop_to_parent_deferring_access_checks): Likewise.
2436 (perform_deferred_access_checks): Likewise.
2437 (perform_or_defer_access_check): Likewise.
2439 2004-01-04 Richard Henderson <rth@redhat.com>
2441 * call.c (build_over_call): Don't create a save_expr of an
2442 aggregate, but rather its address.
2444 2004-01-04 Mark Mitchell <mark@codesourcery.com>
2447 * parser.c (cp_parser_postfix_expression): Allow "." to appear in
2448 an offsetof expression.
2450 * parser.c (cp_parser_parameter_declaration): Fix comment.
2453 * call.c (CHECK_COPY_CONSTRUCTOR_P): New macro.
2454 (reference_binding): Set it when appropriate.
2455 (build_temp): New function, split out from ...
2456 (convert_like_real): ... here. Honor CHECK_COPY_CONSTRUCTOR_P.
2457 (initialize_reference): Likewise.
2460 * parser.c (cp_parser): Add in_type_id_in_expr_p.
2461 (cp_parser_new): Initialize it.
2462 (cp_parser_postfix_expression): Set it.
2463 (cp_parser_sizeof_operand): Likewise.
2464 (cp_parser_parameteR_declaration): Do not commit early to tenative
2465 parsers when in_type_id_in_expr_p is set.
2467 2004-01-03 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2470 * parser.c (cp_parser_template_argument): Don't call
2471 make_unbound_class_template directly.
2472 (cp_parser_lookup_name): Don't extract TEMPLATE_DECL from
2473 UNBOUND_CLASS_TEMPLATE tree node.
2475 2004-01-02 Richard Sandiford <rsandifo@redhat.com>
2478 * method.c (use_thunk): Pass the CALL_EXPR through force_target_expr.
2480 2004-01-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2483 * cp-tree.h (DECL_UNBOUND_CLASS_TEMPLATE_P): New macro.
2484 (DECL_FUNCTION_TEMPLATE_P): Use it.
2485 (DECL_CLASS_TEMPLATE_P): Likewise.
2486 * parser.c (cp_parser_lookup_name): Add is_template parameter.
2487 (cp_parser_type_parameter): Adjust call to cp_parser_lookup_name.
2488 (cp_parser_template_name): Likewise.
2489 (cp_parser_elaborated_type_specifier): Likewise.
2490 (cp_parser_namespace_name): Likewise.
2491 (cp_parser_class_name): Likewise.
2492 (cp_parser_lookup_name_simple): Likewise.
2494 See ChangeLog.3 for earlier changes.