1 2006-12-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3 * decl.c (build_enumerator): Update error message to match C
6 2006-12-11 Jan Hubicka <jh@suse.cz>
8 * decl2.c (var_finalized_p): Update for renamed varpool functions.
10 2006-12-09 Zack Weinberg <zackw@panix.com>
12 * parser.c (yydebug, enum pragma_omp_clause): Delete.
14 2006-12-07 Mark Mitchell <mark@codesourcery.com>
17 * cp-tree.h (DECL_USE_TEMPLATE): Mention partial specializations.
18 (explicit_class_specialization_p): Declare.
19 * pt.c (explicit_class_specialization_p): New function.
20 * parser.c (cp_parser_init_declarator): Check correct number of
21 template parameters for in-class function definitions.
22 (cp_parser_check_declrator_template_parameters): Stop looking for
23 template classes when we find an explicit specialization.
25 2006-12-07 Lee Millward <lee.millward@codesourcery.com>
28 * cp_parser_elaborated_type_specifier: Check
29 the return value of check_elaborated_type_specifier.
31 2006-12-06 Mark Mitchell <mark@codesourcery.com>
34 * parser.c (cp_parser_init_declarator): Reject initialization of
37 2006-12-05 Mark Mitchell <mark@codesourcery.com>
40 * decl2.c (check_member_template): Move check for member
41 templates in local classes to ...
42 * parser.c (cp_parser_template_declaration_after_export):
46 * decl.c (check_array_designated_initializer): New function.
47 (maybe_deduce_size_from_array_init): Use it.
48 (reshape_init_array): Likewise.
50 2006-12-05 Aldy Hernandez <aldyh@redhat.com>
52 Merge from gimple-tuples-branch.
54 2006-10-05 Aldy Hernandez <aldyh@redhat.com>
56 * cp-gimplify.c (cp_gimplify_expr): Adjust for GIMPLE_MODIFY_STMT.
57 (cxx_omp_clause_apply_fn): Adjust for GIMPLE_MODIFY_STMT.
58 (cxx_omp_clause_copy_ctor): Same.
59 (cxx_omp_clause_assign_op): Same.
61 2006-09-28 Aldy Hernandez <aldyh@redhat.com>
63 * cp-tree.h (union lang_tree_node): Gimple statements do not
65 (TREE_INDIRECT_USING): Look in base.
67 2006-12-04 Jan Hubicka <jh@suse.cz>
69 * cp-objcp-common.c (cp_expr_size): Return NULL in the case
72 2006-12-04 Mark Mitchell <mark@codesourcery.com>
75 * pt.c (tsubst_decl): Disallow variables of function type.
78 * call.c (add_builtin_candidate): Do not permit NULL pointer
79 constants to be compared with template parameters.
81 2006-12-04 Eric Botcazou <ebotcazou@adacore.com>
83 * pt.c (for_each_template_parm_r) <INTEGER_TYPE>: New case.
84 Call for_each_template_parm on TYPE_MIN_VALUE and TYPE_MAX_VALUE.
86 2006-12-03 Richard Henderson <rth@redhat.com>
87 Andrew Pinski <pinskia@gmail.com>
90 * error.c (cp_printer) <'D'>: Handle DECL_DEBUG_EXPR.
92 2006-12-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
95 * decl.c (cp_tree_node_structure): Handle STATIC_ASSERT.
97 2006-12-02 Kazu Hirata <kazu@codesourcery.com>
99 * name-lookup.c: Follow spelling conventions.
101 2006-12-01 Geoffrey Keating <geoffk@apple.com>
103 * decl.c (poplevel): Check DECL_INITIAL invariant.
104 (duplicate_decls): Preserve DECL_INITIAL when eliminating
105 a new definition in favour of an old declaration.
106 (start_preparsed_function): Define and document value of
107 DECL_INITIAL before and after routine.
108 (finish_function): Check DECL_INITIAL invariant.
110 (cp_parser_function_definition_from_specifiers_and_declarator):
111 Skip duplicate function definitions.
113 2006-12-01 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
116 * typeck.c (type_after_usual_arithmetic_conversions):
117 Fix assertion for vector types.
118 (build_binary_op): Use temporary for inner type of vector types.
120 2006-12-01 Ryan Mansfield <rmansfield@qnx.com>
123 * typeck.c (build_binary_op): Fix pointer to member function
124 comparison for ptrmemfunc_vbit_in_delta targets.
126 2006-12-01 Dirk Mueller <dmueller@suse.de>
129 * decl.c (grokdeclarator): Warn for type qualifiers on return
130 type for non-dependent types.
131 * pt.c (tsubst_function_type): Warn for type qualifiers on
132 return type for dependent types.
134 2006-11-30 Geoffrey Keating <geoffk@apple.com>
136 * rtti.c (get_tinfo_decl): Handle return value from
137 pushdecl_top_level_and_finish.
139 2006-11-29 Lee Millward <lee.millward@codesourcery.com>
142 * parser.c (cp_parser_class_head): Move processing
143 of any base classes to...
144 (cp_parser_class_specifier) ...here. Take an extra
145 tree* parameter for any base classes. Only process
146 them if the opening brace was found.
148 2006-11-28 Jakub Jelinek <jakub@redhat.com>
151 * decl.c (grokfndecl): Check main's type after applying
152 attributes, not before.
154 2006-11-27 Mark Mitchell <mark@codesourcery.com>
156 * class.c (build_vcall_offset_vtbl_entries): Do not add vcall
157 entries for a primary construction virtual table.
159 2006-11-26 Mark Mitchell <mark@codesourcery.com>
162 * parser.c (cp_parser): Add in_function_body.
163 (cp_parser_new): Initialize it.
164 (cp_parser_primary_expression): Use parser->in_function_body
165 instead of at_function_scope_p.
166 (cp_parser_asm_definition): Likewise.
167 (cp_parser_direct_declarator): Likewise.
168 (cp_parser_class_specifier): Clear parser->in_function_body.
169 (cp_parser_constructor_declarator_p): Use parser->in_function_body
170 instead of at_function_scope_p.
171 (cp_parser_function_body_after_declarator): Set
172 parser->in_function_body.
174 2006-11-21 Douglas Gregor <doug.gregor@gmail.com>
176 * cp-tree.def (STATIC_ASSERT): New.
177 * cp-objcp-common.c (cp_tree_size): Handle STATIC_ASSERT.
178 * error.c (dump_decl): Handle STATIC_ASSERT.
179 * cp-tree.h (STATIC_ASSERT_CONDITION): New.
180 (STATIC_ASSERT_MESSAGE): New.
181 (STATIC_ASSERT_SOURCE_LOCATION): New.
182 (struct tree_static_assert): New.
183 (enum cp_tree_node_structure_enum): Add TS_CP_STATIC_ASSERT.
184 (union lang_tree_node): Add static_assertion.
185 (finish_static_assert): Declare.
186 * cxx-pretty-print.c (pp_cxx_statement): Handle STATIC_ASSERT.
187 (pp_cxx_declaration): Handle STATIC_ASSERT.
188 * pt.c (instantiate_class_template): Handle
189 STATIC_ASSERT members.
190 (tsubst_expr): Handle STATIC_ASSERT statements.
191 * semantics.c (finish_static_assert): New.
192 * lex.c (D_CPP0X): New.
193 (reswords): Add static_assert keyword.
194 (init_reswords): If not flag_cpp0x, mask out C++0x keywords.
195 * parser.c (cp_parser_block_declaration): Parse static
197 (cp_parser_static_assert): New.
198 (cp_parser_member_declaration): Parse static assertions.
200 2006-11-21 Jakub Jelinek <jakub@redhat.com>
203 * decl.c (cp_finish_decl): Check for value dependent brace enclosed
207 * cp-tree.h (WANT_VECTOR): Define.
208 (WANT_ARITH): Add WANT_VECTOR.
209 * cvt.c (build_expr_type_conversion): Handle vector types.
210 * typeck.c (build_unary_op): Add WANT_VECTOR to
211 build_expr_type_conversion flags.
213 2006-11-20 Simon Martin <simartin@users.sourceforge.net>
216 * cp-tree.h (enforce_access, perform_or_defer_access_check): Added an
217 extra argument that represents the declaration to use to print
218 potential error messages.
219 * init.c (build_offset_ref): Adjusted the call to
220 perform_or_defer_access_check.
221 * class.c (alter_access, resolve_address_of_overloaded_function):
223 * decl.c (make_typename_type, make_unbound_class_template): Likewise.
224 * search.c (lookup_member): Likewise.
225 * friend.c (add_friend): Likewise.
226 * parser.c (cp_parser_template_id,
227 cp_parser_pre_parsed_nested_name_specifier): Likewise.
228 * semantics.c (finish_non_static_data_member,
229 check_accessibility_of_qualified_id, finish_id_expression): Likewise.
230 (pop_to_parent_deferring_access_checks, perform_access_checks,
231 perform_or_defer_access_check): Adjusted the call to enforce_access.
232 * call.c (enforce_access): Use the new extra argument to build the
234 (build_op_delete_call): Adjusted the call to
235 perform_or_defer_access_check.
236 (build_over_call): Likewise.
238 2006-11-16 Dirk Mueller <dmueller@suse.de>
240 * name-lookup.c (begin_scope): Use GGC_CNEW instead of
243 2006-11-13 Roger Sayle <roger@eyesopen.com>
245 * rtti.c (get_pseudo_ti_init): Ensure that the offset field of the
246 base type info initializer has the correct type.
248 2006-11-13 Mark Mitchell <mark@codesourcery.com>
251 * pt.c (coerce_template_parms): Do not skip_evaluation while
252 substituting template arguments.
254 2006-11-11 Richard Guenther <rguenther@suse.de>
256 * typeck.c (build_unary_op): Remove handling of FIX_CEIL_EXPR,
257 FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
259 2006-11-03 Roger Sayle <roger@eyesopen.com>
261 * call.c (build_op_delete_call): Test user-visible type against
262 size_type_node, instead of against the internal type, sizetype.
263 * class.c (type_requires_array_cookie): Likewise.
264 * mangle.c (write_builtin_type) <INTEGER_TYPE>: Remove special
265 handling of TYPE_IS_SIZETYPE.
266 * typeck.c (type_after_usual_arithmetic_conversions): Remove
267 special case handling of TYPE_IS_SIZETYPE.
268 (comptypes): Likewise.
270 2006-11-01 Danny Smith <dannysmith@users.sourceforge.net>
272 * decl.c (get_atexit_node): Reference atexit, not __cxa_exit.
273 if targetm.cxx.use_atexit_for cxa_atexit.
274 (start_cleanup_fn): Likewise.
275 (register_dtor_fn): Likewise.
277 2006-09-25 Geoffrey Keating <geoffk@apple.com>
279 * decl2.c (cp_write_global_declarations): Rename from
281 * cp-lang.c (finish_file): Don't call cp_finish_file.
282 * cp-tree.h (cp_write_global_declarations): Rename from
284 * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Define to
285 cp_write_global_declarations.
287 2006-10-31 Geoffrey Keating <geoffk@apple.com>
289 * name-lookup.c (get_anonymous_namespace_name): New.
290 (push_namespace_with_attribs): Use get_anonymous_namespace_name.
291 * decl2.c (start_objects): Update for rename of
292 get_file_function_name_long.
294 2006-10-30 Dirk Mueller <dmueller@suse.de>
297 * decl.c (grokdeclarator): Duplicate diagnostic message
298 for easier translation.
299 * decl.c (grokdeclarator): Fix line-wrapping.
301 2006-10-30 Dirk Mueller <dmueller@suse.de>
304 * decl.c (grokfndecl): Use check_main_parameter_types.
306 2006-10-30 Dirk Mueller <dmueller@suse.de>
309 * decl.c (grokfndecl): Duplicate warning message for
312 2006-10-30 Dirk Mueller <dmueller@suse.de>
314 * typeck.c (build_unary_op): Fix indenting. Use G_().
316 2006-10-29 Dirk Mueller <dmueller@suse.de>
319 * typeck.c (build_unary_op): Duplicate warning message
320 for easier translation.
322 2006-10-29 Dirk Mueller <dmueller@suse.de>
325 * typeck.c (build_array_ref): Warn for char subscriptions
328 2006-10-29 Kazu Hirata <kazu@codesourcery.com>
330 * decl.c: Fix a comment typo.
332 2006-10-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
335 * typeck.c (build_unary_op): Use same_type_p when comparing to
338 2006-10-29 Dirk Mueller <dmueller@suse.de>
341 * typeck.c (build_binary_op): Duplicate warning message
342 for better translation.
344 2006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
346 * decl.c (builtin_function_1): Move common code to
347 add_builtin_function.
348 (builtin_function): Rename to cxx_builtin_function.
349 Change the signature.
350 * call.c: Include langhooks.h.
351 (build_java_interface_fn_ref): Replace calls to
352 builtin_function with add_builtin_function.
353 * Make-lang.in (cp/call.o): Depend on langhooks.h.
354 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION): Define as
355 cxx_builtin_function.
356 * cp-tree.h (builtin_function): Rename to cxx_builtin_function.
357 Change the signature.
359 2006-10-22 Nathan Sidwell <nathan@codesourcery.com>
362 * rtti.c (tinfo_base_init): The type info string is always global.
364 2006-10-20 Lee Millward <lee.millward@codesourcery.com>
365 Mark Mitchell <mark@codesourcery.com>
368 * decl2.c (grokbitfield): Detect invalid non-integral
369 types earlier when possible.
371 2006-10-18 Mark Shinwell <shinwell@codesourcery.com>
374 * typeck2.c (digest_init): Raise error upon attempts to
375 initialize arrays with variables.
377 2006-10-17 Lee Millward <lee.millward@codesourcery.com>
380 * cp-tree.h (xref_basetypes): Return bool instead of void.
381 * decl.c (xref_basetypes): Adjust definition. Return false
382 if the class bases are invalid.
383 * parser.c (cp_parser_class_head): Check the return value
386 2006-10-17 Mark Mitchell <mark@codesourcery.com>
389 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Add
393 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): New
395 (cp_parser_constructor_declarator_p): Use it.
396 (cp_parser_check_type_definition): Return a value indicating
397 whether or not the definition is valid.
398 (cp_parser_enum_specifier): Skip invalid enum definitions.
400 2006-10-17 Mark Mitchell <mark@codesourcery.com>
403 * typeck2.c (build_functional_cast): Don't zero-initialize
404 non-PODs; instead, call their constructors.
405 * method.c (synthesize_method): Always build mem-initializers, if
406 we're synthesizing the default constructor.
408 2006-10-17 Mark Mitchell <mark@codesourcery.com>
411 * decl.c (reshape_init_class): Move check for designated
413 * parser.c (cp_parser_initializer_list): ... here.
414 * pt.c (tsubst_copy_and_build): Use finish_compound_literal.
416 2006-10-16 Mark Mitchell <mark@codesourcery.com>
419 * typeck2.c (process_init_constructor_array): Reword comment.
420 * pt.c (tsubst_copy_and_built): Call reshape_init before calling
424 * parser.c (cp_parser_using_declaration): Stop parsing when
425 something goes wrong with an access declaration.
428 * typeck.c (cxx_sizeof_or_alignof_type): Complete non-dependent
429 types when their sizes are required. Refine test for VLAs.
432 * parser.c (cp_parser_template_argument): Don't consider "&var" a
433 possible constant-expression.
434 * pt.c (convert_nontype_argument): Refine handling of arguments of
437 2006-10-13 Mark Mitchell <mark@codesourcery.com>
440 * parser.c (function_declarator_p): New function.
441 (cp_parser_init_declarator): Use it.
442 (cp_parser_member_declaration): Likewise.
444 2006-10-12 Mark Mitchell <mark@codesourcery.com>
447 * rtti.c (get_tinfo_decl): Refuse to create type info objects for
448 variably modified types.
450 2006-10-12 Lee Millward <lee.millward@codesourcery.com>
453 * decl.c (start_decl): Return error_mark_node if a
454 function is initialized like a variable.
455 (check_var_type): If a variable of field is declared void,
456 set the type to error_mark_node.
457 (grokdeclarator): Check the return type of check_var_type.
458 * class.c (finish_struct_1): Robustify.
460 2006-10-11 Mark Mitchell <mark@codesourcery.com>
463 * decl.c (check_initializer): Issue errors about trying to
464 initialize arrays whose elements have variable size.
466 2006-10-11 Lee Millward <lee.millward@codesourcery.com>
469 * cp-tree (struct cp_decl_specifier_seq): Rename to
470 conflicting_specifiers_p
471 * parser.c (cp_parser_set_storage_class): Set
472 conflicting_specifiers_p for the input decl specifier
473 if a typedef specifier is present. Rename uses of
474 multiple_specifiers_p to conflicting_specifiers_p.
475 (cp_parser_decl_specifier_seq) <RID_TYPEDEF>: If a storage
476 class specifier has already been set for this declaration,
477 set conflicting_specifiers_p to true on the decl_specs.
478 * decl.c (grokdeclarator): Rename uses of
479 multiple_specifiers_p to conflicting_specifiers_p.
481 2006-10-10 Brooks Moses <bmoses@stanford.edu>
483 * Make-lang.in: Added "c++.pdf" target support.
485 2006-10-10 Richard Guenther <rguenther@suse.de>
487 PR rtl-optimization/29323
488 * decl.c (finish_function): Set TREE_NOTHROW only for
489 functions that bind local.
491 2006-10-09 Richard Henderson <rth@redhat.com>
495 2006-10-04 Richard Henderson <rth@redhat.com>
496 Jakub Jelinek <jakub@redhat.com>
498 * decl.c (grokvardecl): Don't error if !have_tls.
499 (grokdeclarator): Likewise.
500 * parser.c (cp_parser_omp_threadprivate): Likewise.
502 2006-10-03 Mark Mitchell <mark@codesourcery.com>
505 * friend.c (do_friend): Improve comments; add assertion.
506 * parser.c (cp_parser_nested_name_specifier_opt): Resolve
507 typenames for qualified names used in declarations, even when
508 caching qualified name lookup.
511 * decl2.c (grokfield): Don't handle access declarations here.
512 * parser.c (cp_parser_using_declaration): Handle access
514 (cp_parser_block_declaration): Adjust calls to
515 cp_parser_using_declaration.
516 (cp_parser_member_declaration): Likewise. Use
517 cp_parser_using_declaration to look for access_declarations.
519 2006-10-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
522 * init.c (build_new): Check for invalid init.
524 2006-10-02 Mark Mitchell <mark@codesourcery.com>
527 * typeck.c (cxx_sizeof_or_alignof_type): Tidy. In templates, do
528 not try to actually evaluate sizeof for a VLA type.
530 2006-10-01 Mark Mitchell <mark@codesourcery.com>
533 * pt.c (tsubst_baselink): Substituteinto the qualifying scope.
534 * semantics.c (baselink_for_fns): Build a baselink, even when
535 processing a template.
538 * parser.c (cp_parser_postfix_dot_deref_expression): Use
539 BASELINK_ACCESS_BINFO as the qualifying scope when calling
540 adjust_result_of_qualified_name_lookup.
542 2006-09-25 Lee Millward <lee.millward@codesourcery.com>
546 * cp-tree.h (redeclare_class_template): Adjust declaration
547 to return bool instead of void.
548 * pt.c (redeclare_class_template): Update definition.
549 Return false on error.
550 * decl.c (xref_tag): Return error_mark_node if
551 redeclare_class_template returned false.
554 * cp-tree.h (begin_specialization): Return bool
556 * pt.c (check_specialization_scope): Likwise.
557 Adjust comment. Return false if a specialization
558 isn't permitted in the current scope.
559 (begin_specialization): Use the return value of
560 check_specialization_scope.
561 * parser.c (cp_parser_explicit_specialization): If
562 begin_specialization returned false, skip the rest
563 of the specialization.
565 2006-09-21 Mark Mitchell <mark@codesourcery.com>
568 * typeck.c (build_unary_op): Don't form an ADDR_EXPR around a
571 2006-09-21 Lee Millward <lee.millward@codesourcery.com>
574 * decl.c (shadow_tag): Return error_mark_node
575 if maybe_process_partial_specialization failed.
578 * decl.c (grokdeclarator): Return error_mark_node on
579 declaration with two or more data types.
581 2006-09-20 Danny Smith <dannysmith@users.sourceforge.net>
584 * class.c (check_for_override): Remove dllimport from virtual
587 2006-09-18 Steven Bosscher <steven@gcc.gnu.org>
590 * parser.c (cp_parser_labeled_statement): Return nothing. Do
591 not take in_statement_expr and in_compound as arguments. Rename
592 to cp_parser_label_for_labeled_statement. Parse only the label,
594 (cp_parser_statement): Parse the statement of a labeled-statement
595 from here, using tail recursion.
597 2006-09-14 Andrew Pinski <pinskia@physics.uc.edu>
600 * init.c (build_zero_init): If we have an error mark node for
601 the array size, return.
603 2006-09-10 Mark Mitchell <mark@codesourcery.com>
606 * cp-objcp-common.c (cxx_staticp): New function.
607 * cp-objcp-common.h (LANG_HOOOKS_STATICP): Use it.
608 * cp-tree.h (cxx_staticp): New function.
610 2006-09-09 Jason Merrill <jason@redhat.com>
613 * cvt.c (convert_to_void): Strip COMPONENT_REF to functions.
615 2006-09-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
618 * parser.c (cp_parser_skip_until_found): Rename to
619 cp_parser_skip_to_end_of_template_parameter_list. Remove last two
620 parameters. Track levels of '< ... >'. Stop at '{', '}', or ';'.
621 Reorganize. Adjust comment.
622 (cp_parser_template_declaration_after_export): Adjust call.
623 (cp_parser_enclosed_template_argument_list): Likewise.
625 2006-09-07 Andrew Pinski <pinskia@physics.uc.edu>
628 * init.c (build_new_1): Build a distinct type copy
629 for the array type that was returned from
630 build_cplus_array_type.
632 2006-09-07 Jason Merrill <jason@redhat.com>
635 * cvt.c (convert_to_void): Enable previous change.
638 * method.c (use_thunk): Clear DECL_HAS_VALUE_EXPR_P on copied
641 2006-09-07 Simon Martin <simartin@users.sourceforge.net>
644 * pt.c (fold_non_dependent_expr): Make sure expr is not
645 dereferenced if it is NULL.
647 2006-09-06 Zak Kipling <zak@transversal.com>
650 * decl.c (make_rtl_for_nonlocal_decl),
651 (start_preparsed_function): Don't use lbasename on
652 input_filename when calling get_fileinfo.
653 * semantics.c (begin_class_definition): Likewise.
654 * lex.c (cxx_make_type): Likewise.
655 (handle_pragma_interface): Call get_fileinfo on input_filename,
656 not on the parameter to the directive.
658 2006-09-06 Mark Mitchell <mark@codesourcery.com>
661 * pt.c (tsubst): Use fold_non_dependent_expr to fold array
665 * pt.c (unify): Avoid unnecessary calls to fold_build2 for array
668 2006-09-06 Jason Merrill <jason@redhat.com>
671 * cvt.c (convert_to_void): Strip useless TARGET_EXPR.
672 * cp-tree.h (TARGET_EXPR_IMPLICIT_P): New macro.
673 * tree.c (build_cplus_new): Set it.
676 * cvt.c (convert_to_void): Replace a subexpression with no side
677 effects with void_zero_node.
678 * tree.c (is_overloaded_fn): Look through COMPONENT_REF.
679 (get_first_fn): Ditto.
680 * decl.c (grokdeclarator): No need to look through COMPONENT_REF.
682 2006-09-05 Jason Merrill <jason@redhat.com>
685 * parser.c (cp_parser_diagnose_invalid_type_name): Handle the case
686 where the name is a type used incorrectly.
689 * typeck.c (maybe_warn_about_returning_address_of_local): Look
690 through COMPONENT_REF and ARRAY_REF.
693 * name-lookup.c (do_class_using_decl): Try to find the base even
694 if bases_dependent_p.
695 * pt.c (type_dependent_expression_p): A USING_DECL is dependent.
698 * pt.c (tsubst_friend_function): Set DECL_INITIAL before pushdecl.
700 2006-09-04 Nathan Sidwell <nathan@codesourcery.com>
702 PR 23287 Revert my 2006-09-01 patch.
703 * parser.c: Reverted.
706 2006-09-02 Lee Millward <lee.millward@codesourcery.com>
712 * parser.c (cp_parser_template_parameter_list): Add
713 invalid template parameters to the parameter list as
716 2006-09-02 Jakub Jelinek <jakub@redhat.com>
719 * except.c (build_throw): Only set current_function_returns_abnormally
723 * repo.c (repo_file): Remove.
724 (open_repo_file, reopen_repo_file_for_write): Return fopened
725 FILE * instead of setting global repo_file variable.
726 (init_repo): Adjust caller.
727 (finish_repo): Likewise. Return instead of goto out before
728 reopen_repo_file_for_write has been called.
730 2006-09-01 Nathan Sidwell <nathan@codesourcery.com>
733 * semantics.c (finish_call_expr): Add assert.
734 * name-lookup.c (lookup_arg_dependent): Check we found an overload
738 * parser.c (cp_parser_id_expression): Add member_p
739 argument. Update all callers.
740 (cp_parser_unqualified_id): Likewise. Lookup a destructor name in
741 the object's scope, if valid.
742 (cp_parser_global_scope_opt): Add object_scope_valid_p. Update
744 (cp_parser_postfix_dot_deref_expression): Set object_scope.
745 * pt.c (tsubst_copy_and_build): Lookup dependent dtor name here.
747 2006-08-30 Jason Merrill <jason@redhat.com>
750 * class.c (check_field_decls): Don't unset TYPE_PACKED until all
751 the fields have been processed.
753 2006-08-29 Andrew Pinski <pinskia@physics.uc.edu>
756 * call.c (build_x_va_arg): Remove the reference type
757 from the type before creating the pointer type.
759 2006-08-29 J"orn Rennecke <joern.rennecke@st.com>
762 * except.c (expand_start_catch_block): Use correct types for bitwise
765 2006-08-28 Jason Merrill <jason@redhat.com>
768 * class.c (check_field_decls): Unset TYPE_PACKED (t) if one of the
769 fields can't be packed.
772 * cvt.c (convert_to_void): Don't automatically load from volatiles
773 of TREE_ADDRESSABLE type.
775 2006-08-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
778 * cp-tree.h (maybe_process_partial_specialization): Return
779 tree instead of void.
780 * parser.c (cp_parser_class_head): Use return value of
781 maybe_process_partial_specialization.
782 * pt.c (maybe_process_partial_specialization): Return error_mark_node
783 for broken specializations, TYPE otherwise. Check for template
786 2006-08-27 Mark Mitchell <mark@codesourcery.com>
789 * pt.c (register_specialization): Return error_mark_node for
790 specialization-after-instantiation.
791 * decl2.c (mark_used): Mark the main function used when one of its
794 2006-08-27 Lee Millward <lee.millward@codesourcery.com>
797 * class.c (check_field_decls): Don't issue error about
798 local classes containing static data members.
800 2006-08-26 Joseph S. Myers <joseph@codesourcery.com>
803 * parser.c (struct cp_token): Add input_file_stack_index.
805 (cp_lexer_get_preprocessor_token): Save input_file_stack_tick.
806 (cp_lexer_set_source_position_from_token): Restore input file
809 2006-08-26 Lee Millward <lee.millward@codesourcery.com>
814 * pt.c (process_template_parm): Store invalid template
815 parameters as a TREE_LIST with a TREE_VALUE of error_mark_node.
816 (push_inline_template_parms_recursive): Check for template
817 parameters having a TREE_VALUE of error_mark_node rather than
818 check the parameter itself.
819 (mangle_class_name_for_template): Likewise.
820 (comp_template_parms): When comparing the individual template
821 parameters, return 1 if either is error_mark_node.
822 (current_template_args): Robustify.
823 (redeclare_class_template): Likewise.
825 2006-08-26 Mark Mitchell <mark@codesourcery.com>
828 * class.c (resolve_address_of_overloaded_function): Add
829 access_path parameter. Perform access checks.
830 (instantiate_type): Adjust call to
831 resolve_address_of_overloaded_function. Remove unnecessary code.
832 * tree.c (is_overloaded_fn): Document. Return 2 when there are
833 acutally multiple functions.
834 (really_overloaded_fn): Use is_overloaded_fn.
835 * mangle.c (write_expression): Handle BASELINKs.
836 * cp-tree.h (really_overloaded_fn): Return bool.
837 (baselink_for_fns): Declare.
838 * search.c (lookup_member): Check access for single static
840 * pt.c (convert_nontype_argument_function): Handle BASELINKs.
841 (tsubst_copy_and_build): Generate BASELINKs for template-ids.
842 * semantics.c (finish_call_expr): Use baselink_for_fns.
843 (baselink_for_fns): New function.
844 (finish_id_expression): Use it.
845 * parser.c (cp_parser_template_argument): Don't strip BASELINKs.
848 * pt.c (tsubst): Issue errors about attempts to create VLAs at
849 template-instantiation time.
851 2006-08-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
854 * typeck2.c (cxx_incomplete_type_diagnostic): Handle template
855 template parameters. Improve error message for template type
859 * cp-tree.h (grok_op_properties): Return bool instead of void.
860 * decl.c (grokfndecl): Discard invalid operator declarations.
861 (copy_fn_p): Revert change for PR 27547.
862 (grok_op_properties): Return error status (true on success).
863 * pt.c (tsubst_decl): Discard invalid operator declarations.
865 2006-08-25 Mark Mitchell <mark@codesourcery.com>
868 * decl.c (grokdeclarator): Disallow declarations with qualified
869 names in local scopes.
871 2006-08-25 Nathan Sidwell <nathan@codesourcery.com>
874 * decl.c (make_typename_type): Only try and resolve it when
875 context is not dependent. Refactor.
876 * decl2.c (check_classfn): Push to class scope before looking for
879 2006-08-24 Danny Smith <dannysmith@users.sourceforge.net>
882 * g++spec.c (lang_specific_driver): Always check if we need to
883 swallow a space-separated arg to '-x'.
884 * lang-specs.h: Don't create ouput files for '-xc++-header'
887 2006-08-23 Jason Merrill <jason@redhat.com>
890 * pt.c (push_template_decl_real): A friend template with class
893 2006-08-23 Benjamin Smedberg <benjamin@smedbergs.us>
896 * rtti.c (build_dynamic_cast, build_dynamic_cast_1):
897 Move -fno-rtti check to be more specific.
899 2006-08-22 Jason Merrill <jason@redhat.com>
902 * call.c (build_over_call): Don't make a copy here if build_call
905 2006-08-22 Andrew Pinski <pinskia@physics.uc.edu>
908 * cp/init.c (build_zero_init): Handle VECTOR_TYPE and
911 2006-08-22 Simon Martin <simartin@users.sourceforge.net>
914 * parser.c (cp_parser_postfix_expression): Make sure that the
915 saved value for parser->type_definition_forbidden_message is
916 restored before returning to avoid an invalid free().
918 2006-08-22 Jason Merrill <jason@redhat.com>
921 * typeck.c (merge_types): If either of the types have the right
922 attributes, return that one.
924 * tree.c (cp_build_type_attribute_variant): Make sure we aren't
925 doing this to class types.
926 * typeck.c (original_type): Deal with type quals properly.
928 2006-08-21 Jason Merrill <jason@redhat.com>
931 * semantics.c (finish_stmt_expr_expr): Don't try to voidify here,
932 just leave the expression as it is.
933 (finish_stmt_expr): If the statement-expression has class type,
934 wrap it in a TARGET_EXPR.
935 * cp-gimplify.c (cp_gimplify_init_expr): Don't bother with
937 * except.c (build_throw): Give the CLEANUP_POINT_EXPR void type.
939 2006-08-21 Lee Millward <lee.millward@codesourcery.com>
942 * decl.c (duplicate_decls): Return early if either
943 newdecl or olddecl is error_mark_node.
946 * decl.c (grokdeclarator): Return early after
947 issuing diagnostic about an incomplete type.
950 * tree.c (decl_anon_ns_mem_p): Robustify.
951 * decl2.c (determine_visibility): Likewise.
953 2006-08-20 Mark Mitchell <mark@codesourcery.com>
956 * tree.c (cast_valid_in_integral_constant_expression_p): New
958 * cp-tree.h (tsubst_copy_and_build): Adjust prototype.
959 * pt.c (tsubst_expr): Add integral_constant_expression_p
961 (fold_non_dependent_expr): Adjust callers of
962 tsubst_{expr,copy_and_build}.
963 (tsubst_friend_function): Likewise.
964 (tsubst_template_arg): Likewise.
965 (tsubst_default_argument): Likewise.
966 (tsubst_decl): Likewise.
968 (tsubst_omp_clasuses): Likewise.
969 (regenerate_decl_fromp_template): Likewise.
970 (instantiate_decl): Likewise.
971 (tsubst_initializer_list): Likewise.
972 (tsubst_enum): Likewise.
973 (tsubst_expr): Use RECUR throughout.
974 (tsubst_copy_and_build): Change definition of RECUR. Do not allow
975 invalid casts in integral constant expressions.
976 * parser.c (cp_parser_postfix_expression): Use
977 cast_valid_in_integral_constant_expression_p.
978 (cp_parser_cast_expression): Likewise.
979 (cp_parser_functional_cast): Likewise.
982 * pt.c (tsubst_qualified_id): Do not strip references from
985 2006-08-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
988 * parser.c (cp_parser_diagnose_invalid_type_name): Handle BIT_NOT_EXPR.
990 (cp_parser_parse_and_diagnose_invalid_type_name): Tighten condition
991 for valid type-names.
992 (cp_parser_unqualified_id): Fix error handling for destructors.
995 * decl.c (xref_tag): Improve error message. Return early on error.
998 * pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Robustify.
1000 2006-08-17 Paolo Bonzini <bonzini@gnu.org>
1003 * semantics.c (finish_offsetof): Add new argument to fold_offsetof.
1005 2006-08-16 Andrew Pinski <pinskia@physics.uc.edu>
1008 * typeck.c (build_unary_op <case BIT_NOT_EXPR:>): Don't call
1009 perform_integral_promotions for non integral type.
1011 2006-08-16 Jason Merrill <jason@redhat.com>
1014 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Ignore quals from template
1015 if arg is a function.
1017 2006-08-16 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1020 * init.c (build_new): Return early on invalid placement.
1022 2006-08-15 Lee Millward <lee.millward@codesourcery.com>
1025 * pt.c (process_template_parm): Robustify.
1027 2006-08-14 Steve Ellcey <sje@cup.hp.com>
1031 * operators.def: Remove <?, ?>, <?=, and >?= operators.
1032 * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
1033 (cp_parser_warn_min_max): Remove.
1035 2006-08-11 Jason Merrill <jason@redhat.com>
1038 * parser.c (cp_parser_elaborated_type_specifier): Also ignore
1039 attributes applied to a TYPENAME_TYPE.
1041 2006-08-09 Lee Millward <lee.millward@codesourcery.com>
1044 * pt.c (coerce_template_parms): Copy across the
1045 invalid template arguments to the new template inner arguments.
1046 (retrieve_specialization): Robustify.
1049 * pt.c (coerce_template_template_parms): Robustify.
1052 * error.c (dump_template_parms): Robustify.
1055 * pt.c (redeclare_class_template): Robustify.
1058 * pt.c (type_unification_real): Robustify.
1060 2006-08-03 Lee Millward <lee.millward@codesourcery.com>
1063 * decl.c (start_decl): Return error_mark_node if a
1064 diagnostic was issed for an invalid typedef initialization.
1066 2006-08-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1069 * parser.c (cp_parser_unqualified_id): Check for invalid scopes
1070 when parsing destructor names.
1073 * decl.c (duplicate_decls): Call check_default_args here.
1074 (start_preparsed_function): Do not call check_default_args.
1075 * name-lookup.c (pushdecl_maybe_friend): Only call
1076 check_default_args if duplicate_decls got bypassed.
1078 2006-08-02 Richard Guenther <rguenther@suse.de>
1082 2006-07-05 Richard Guenther <rguenther@suse.de>
1083 Andrew Pinski <pinskia@gcc.gnu.org>
1086 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1087 top level qualifiers for pointer type comparisons.
1089 2006-08-02 Mark Mitchell <mark@codesourcery.com>
1092 * pt.c (tsubst_baselink): Substitute into BASELINK_OPTYPE.
1094 2006-07-31 Mark Mitchell <mark@codesourcery.com>
1097 * tree.c (stabilize_expr): Tweak documentation. Add assertion.
1098 (stabilize_call): Tweak documentation.
1099 (stabilize_init): Only call stabilize_call for calls.
1101 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1104 * decl2.c (check_classfn): Remove early return.
1105 * search.c (lookup_member): Return NULL with bad type.
1107 2006-08-01 Steve Ellcey <sje@cup.hp.com>
1110 * decl.c (check_initializer): Check for 1 initializer on scalar types.
1112 2006-08-01 Daniel Jacobowitz <dan@codesourcery.com>
1115 * pt.c (tsubst_copy_and_build): Mark used enum types.
1116 * semantics.c (finish_id_expression): Likewise.
1118 2006-07-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1121 * decl.c (grokdeclarator): Check whether "long" or "short" was
1122 specified for non-integral types.
1124 2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1126 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
1128 2006-07-28 Lee Millward <lee.millward@codesourcery.com>
1132 * pt.c (process_template_parm) Store invalid template
1133 parameters as error_mark_node in the paramater list.
1134 (push_inline_template_parms_recursive): Handle invalid
1135 template parameters.
1136 (comp_template_parms): Likewise.
1137 (check_default_tmpl_arg): Likewise.
1138 (coerce_template_template_parms): Likewise.
1139 (mangle_class_name_for_template): Likewise.
1140 (tsubst_template_parms): Likewise.
1141 * error.c (dump_template_argument_list): Likewise.
1143 2006-07-28 Kazu Hirata <kazu@codesourcery.com>
1145 * cp-tree.h: Fix a comment typo.
1147 2006-07-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1150 * decl.c (grokdeclarator): Return error_mark_node after invalid
1153 2006-07-23 Daniel Jacobowitz <dan@codesourcery.com>
1156 * decl.c (grokvardecl): Use FROB_CONTEXT.
1157 * pt.c (register_specialization): Likewise.
1159 2006-07-23 Mark Mitchell <mark@codesourcery.com>
1162 * cp-tree.h (LOOKUP_HIDDEN): New macro. Reformat comments.
1163 * name-lookup.c (unqualified_namespace_lookup): There is no way to
1164 have a hidden name in non-namespace scopes.
1165 * pt.c (tsubst_friend_class): Look for hidden names.
1166 * decl.c (lookup_and_check_tag): Fix typo in comment.
1168 * semantics.c (finish_compound_literal): Fix typo in comment.
1170 2006-07-21 Jason Merrill <jason@redhat.com>
1172 * decl2.c (determine_visibility): Don't propagate visibility from
1174 (constrain_class_visibility): Don't warn in system headers.
1175 Don't warn about pointer fields.
1177 2006-07-20 Mike Stump <mrs@apple.com>
1179 * decl2.c (determine_visibility_from_class): Don't use hidden
1180 visibility for explicit instantiations.
1182 2006-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1185 * pt.c (tsubst_expr): Only apply DECL_TEMPLATE_INSTANTIATED to
1186 valid decls. Cleanup.
1189 * semantics.c (check_template_template_default_arg): Simplify
1192 2006-07-20 Jason Merrill <jason@redhat.com>
1195 * decl.c (grokvardecl): Set DECL_THIS_STATIC on file-scope
1196 const variables with implicit internal linkage.
1197 * tree.c (decl_linkage): Only return lk_external if it's set.
1200 * decl2.c (constrain_visibility): Ignore the anonymous namespace
1201 for extern "C" decls.
1202 (VISIBILITY_STATIC): Rename to VISIBILITY_ANON.
1204 * decl2.c (constrain_visibility): Remove specified and reason
1205 parameters. Don't touch decls that already have explicit visibility.
1206 (determine_visibility): Do copy DECL_VISIBILITY_SPECIFIED from
1208 (determine_visibility_from_class): Reverse sense of
1209 DECL_VISIBILITY_SPECIFIED test for target-specific visibility rules.
1210 (constrain_class_visibility): Only complain about member visibility
1211 if the member type is another class. Don't change visibility of the
1214 2006-07-19 Mark Mitchell <mark@codesourcery.com>
1217 * decl.c (layout_var_decl): Don't call push_local_name here.
1218 (initialize_artificial_var): Assert artificiality.
1219 (cp_finish_decl): Call push_local_name here.
1221 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1224 * typeck.c (build_binary_op): Short-circuit pointer arithmetic in
1227 2006-07-18 Mark Mitchell <mark@codesourcery.com>
1230 * semantics.c (check_accessibility_of_qualified_id): Robustify.
1233 * pt.c (tsubst_decl): Handling substitutions into a static data
1234 member from within the scope of the tempalte itself.
1236 2006-07-18 Lee Millward <lee.millward@gmail.com>
1239 * method.c (locate_copy): Check for non_reference
1240 returning error_mark_node.
1243 * decl.c (duplicate_decls): Return error_mark_node
1244 on ambiguous declaration.
1246 2006-07-18 Steve Ellcey <sje@cup.hp.com>
1249 * search.c (adjust_result_of_qualified_name_lookup): Change
1250 assert to part of if statement.
1252 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1255 * decl.c (reshape_init_class): Return error_mark_node on error.
1257 2006-07-17 Steve Ellcey <sje@cup.hp.com>
1260 * decl2.c (check_classfn): Return NULL_TREE on error.
1262 2006-07-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1265 * name-lookup.c (pushdecl_maybe_friend): Return early on
1267 * except.c (expand_start_catch_block): Use error_mark_node instead
1268 of NULL_TREE for invalid decls.
1269 * parser.c (cp_parser_exception_declaration): Return error_mark_node
1270 on invalid catch parameter. Simplify.
1272 2006-07-16 Jakub Jelinek <jakub@redhat.com>
1275 * decl2.c (note_vague_linkage_var): Removed.
1276 (finish_static_data_member_decl): Add decl to pending_statics vector
1277 directly. Do it even for non-public decls.
1279 2006-07-15 Lee Millward <lee.millward@gmail.com>
1282 * decl2.c (acceptable_java_type): Robustify. Use
1283 proper Boolean return type instead of return 1.
1284 (check_java_method): Don't issue error about
1285 type not being an acceptable Java parameter if
1286 it's error_mark_node.
1289 * parser.c (cp_parser_elaborated_type_specifier):
1290 Return early if an invalid type was detected.
1292 2006-07-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1295 * parser.c (cp_parser_check_decl_spec): New function.
1296 (cp_parser_decl_specifier_seq): Factor out check for repeated
1297 decl-specifiers into cp_parser_check_decl_spec. Use it.
1298 (cp_parser_type_specifier_seq): Use it.
1301 * semantics.c (finish_offsetof): Use TREE_OPERAND for COMPONENT_REFs
1305 * decl2.c (cplus_decl_attributes): Check for invalid decls.
1307 2006-07-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1310 * decl.c (cp_finish_decl): Check asmspec_tree for error_mark_node.
1311 * decl2.c (grokfield): Likewise.
1313 2006-07-12 Geoffrey Keating <geoffk@apple.com>
1315 * decl2.c (determine_visibility): Don't change visibility of
1316 function locals because of -fvisibility-inlines-hidden.
1318 2006-07-12 Jason Merrill <jason@redhat.com>
1321 * semantics.c (note_decl_for_pch): Don't premangle templates.
1323 2006-07-12 Martin Michlmayr <tbm@cyrius.com>
1325 * typeck.c (string_conv_p): Remove spurious quotation mark in
1328 2006-07-07 Lee Millward <lee.millward@gmail.com>
1329 Andrew Pinski <pinskia@gmail.com>
1332 * decl.c (define_label): Return error_mark_node on error.
1333 * semantics.c (finish_label_stmt): Don't call
1334 add_stmt for invalid labels.
1336 2006-07-06 Jason Merrill <jason@redhat.com>
1339 * decl2.c (finish_static_data_member_decl): Don't assert
1342 2006-07-05 Jason Merrill <jason@redhat.com>
1346 * class.c (check_field_decls): Check TYPE_PACKED after
1347 stripping array types.
1348 (finish_struct_bits): Don't copy TYPE_SIZE here.
1351 * friend.c (is_friend): Fix DR 45 implementation.
1353 2006-07-05 Richard Guenther <rguenther@suse.de>
1354 Andrew Pinski <pinskia@gcc.gnu.org>
1357 * cp-objcp-common.c (cxx_types_compatible_p): Ignore
1358 top level qualifiers for pointer type comparisons.
1360 2006-07-01 Jason Merrill <jason@redhat.com>
1363 * method.c (make_thunk): Unset DECL_USE_TEMPLATE and
1366 2006-06-30 Jason Merrill <jason@redhat.com>
1369 * call.c (build_new_method_call): Force evaluation of the
1370 instance pointer, not the object.
1372 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
1374 * decl2.c: Fix a comment typo.
1376 2006-06-30 Jason Merrill <jason@redhat.com>
1379 * decl2.c (grokfield): Only try to treat the decl as an access
1380 declaration if the scope is a class.
1382 2006-06-29 Jason Merrill <jason@redhat.com>
1389 * decl2.c (determine_visibility): Overhaul.
1390 (determine_visibility_from_class): Likewise.
1391 (min_vis_r, type_visibility, constrain_visibility): New fns.
1392 (constrain_visibility_for_template): Likewise.
1393 (constrain_class_visibility): Likewise.
1394 * decl.c (cp_finish_decl): Call determine_visibility for function
1396 * name-lookup.c (pushtag): Call determine_visibility.
1397 * decl.c (duplicate_decls): Don't copy visibility from template to
1399 * pt.c (check_explicit_specialization): Likewise.
1400 (lookup_template_class, tsubst_decl): Call determine_visibility.
1401 * class.c (finish_struct_1): Call constrain_class_visibility.
1406 * parser.c (cp_parser_explicit_instantiation): Pass the attributes
1408 (cp_parser_type_specifier): Allow 'enum __attribute ((...)) E'.
1409 (cp_parser_enum_specifier): Likewise.
1410 (cp_parser_elaborated_type_specifier): Apply attributes if this
1411 declares only the class.
1412 (cp_parser_class_specifier): Apply leading attributes immediately.
1413 * semantics.c (begin_class_definition): Add attributes parameter,
1414 apply them to the type.
1418 * tree.c (decl_anon_ns_mem_p): New function.
1419 * cp-tree.h: Declare it.
1420 * decl2.c (determine_visibility): Make anonymous namespace
1422 (min_vis_r, constrain_visibility): Likewise.
1423 * rtti.c (create_pseudo_type_info): Set TREE_PUBLIC on
1425 * decl.c (cxx_init_decl_processing): Set TREE_PUBLIC on
1427 * name-lookup.c (push_namespace_with_attribs): Don't set TREE_PUBLIC
1428 on anonymous namespaces.
1430 2006-06-28 Jason Merrill <jason@redhat.com>
1433 * pt.c (convert_template_argument): Pass all template arguments
1434 on to coerce_template_template_parms.
1436 2006-06-25 Lee Millward <lee.millward@gmail.com>
1437 Mark Mitchell <mark@codesuorcery.com>
1440 * decl2.c (grokbitfied): Remove check for grokdeclarator
1441 returning NULL_TREE, instead check for error_mark_node
1442 to indicate failure.
1443 * decl.c (grokdeclarator): Adjust block comment.
1445 2006-06-25 Lee Millward <lee.millward@gmail.com>
1448 * mangle.c (mangle_conv_op_name_for_type): Check for
1450 * name-lookup.c (push_class_level_binding): Robustify.
1451 (do_class_using_decl): Return early if name is error_mark_node.
1453 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1456 * name-lookup.c (pushtag): Return if we have error_mark_node.
1458 2006-06-23 Steve Ellcey <sje@cup.hp.com>
1461 * typeck2.c (process_init_constructor_array): Set ce->value on errors.
1463 2006-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1466 * parser.c (cp_parser_attribute_list): Skip attributes with invalid
1467 arguments. Fix comment.
1470 * init.c (build_new_1): Handle error_mark_nodes returned by
1471 build_java_class_ref.
1472 (build_java_class_ref): Do not abort compilation, but return
1473 error_mark_node. Improve error message. Fix indentation.
1475 2006-06-23 Danny Smith <dannysmith@users.sourceforge.net>
1478 * decl.c (start_decl): Check that dllimports are not initialized.
1480 2006-06-22 Lee Millward <lee.millward@gmail.com>
1483 * typeck2.c (build_m_component_ref): Use error_operand_p.
1486 * decl.c (grokdeclarator): Return error_mark_node on
1487 invalid uses of the scope resolution operator.
1489 2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1492 * pt.c (determine_specialization): Check for invalid decls.
1495 * pt.c (unify) <case TEMPLATE_PARM_INDEX>: Check for invalid
1499 * rtti.c (get_tinfo_decl_dynamic): Robustify.
1501 2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1504 * init.c (push_base_cleanups): Skip members with invalid types.
1505 * typeck.c (build_class_member_access_expr): Robustify.
1507 2006-06-19 Mark Mitchell <mark@codesourcery.com>
1509 * pt.c (instantiate_template): Fix typo in comment.
1511 2006-06-19 Richard Guenther <rguenther@suse.de>
1513 * parser.c (CP_LEXER_BUFFER_SIZE): Adjust to assure near
1514 power-of-two token vector size.
1516 2006-06-16 Mark Mitchell <mark@codesourcery.com>
1519 * decl.c (cp_finsh_decl): Do not emit uninstantiated static data
1523 * call.c (standard_conversion): Strip cv-qualifiers from bitfield
1527 * decl.c (have_extern_spec): Remove.
1528 (start_decl): Do not check have_extern_spec.
1529 (start_function): Likewise.
1530 * cp-tree.h (have_extern_spec): Remove.
1531 * parser.c (cp_parser_linkage_specification): Don't set
1533 (cp_parser_init_declarator): Likewise.
1534 (cp_parser_parameter_declaration): Do not treat parameters as
1535 within the scope of an unbraced linkage specification.
1537 2006-06-15 Mark Mitchell <mark@codesourcery.com>
1540 * cp-tree.h (CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P): New
1542 * pt.c (unify): Use it.
1545 * call.c (build_conditional_expr): Robustify.
1548 * pt.c (instantiate_template): Set processing_template_decl to
1549 zero while performing substitutions.
1551 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1554 * parser.c (cp_parser_unqualified_id): Use constructor_name_p to
1555 identify destructors.
1556 (cp_parser_nested_name_specifier_opt): Remove invalid
1558 (cp_parser_template_id): Refine heuristic for determining whether
1559 we are entering a scope.
1562 * parser.c (cp_parser_declarator): Robustify.
1565 * pt.c (tsubst_expr): Use finish_omp_atomic.
1566 (value_dependent_expression_p): All CALL_EXPRs are dependent.
1567 * semantics.c (finish_omp_atomic): Rework to use standard
1568 paradigms for handling non-dependent expressions.
1570 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1572 * typeck.c (build_modify_expr): Tidy diagnostic message.
1574 2006-06-14 Mark Mitchell <mark@codesourcery.com>
1577 * typeck.c (build_modify_expr): Disallow array assignment.
1579 2006-06-14 Gabriel Dos Reis <gdr@integrable-solutions.net>
1581 * cp-tree.def: Fix typo.
1583 2006-06-13 Mark Mitchell <mark@codesourcery.com>
1586 * decl.c (decls_match): Allow an extern "C" variable declarations
1587 from different namespaces to match.
1588 (duplicate_decls): Disallow redeclaring a variable with a
1589 different linkage specification.
1591 2006-06-13 Jakub Jelinek <jakub@redhat.com>
1594 * cp-tree.h (cxx_int_tree_map): New struct.
1595 (struct language_function): Add extern_decl_map field.
1596 * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
1597 to cp_function_chain->extern_decl_map hash table instead of
1598 copying over DECL_UID.
1599 * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
1601 (cp_genericize_r): Remap DECL_EXTERN local decls using
1602 cp_function_chain->extern_decl_map hash table.
1603 * decl.c (finish_function): Clear extern_decl_map.
1605 2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1608 * semantics.c (finish_offsetof): Handle pseudo-destructors.
1611 * name-lookup.c (lookup_qualified_name): Always return error_mark_node
1615 * decl2.c (finish_anon_union): Return early if build_anon_union_vars
1618 2006-06-12 Roger Sayle <roger@eyesopen.com>
1621 * typeck2.c (build_functional_cast): Use cp_convert to construct
1622 non-aggregate initializers instead of the user-level build_c_cast.
1624 2006-06-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1627 * cp-tree.h (finish_offsetof): Add prototype.
1628 * semantics.c (finish_offsetof): New function.
1629 * parser.c (cp_parser_builtin_offsetof): Call it instead of
1631 * pt.c (tsubst_copy_and_build): Likewise.
1633 2006-06-06 Mark Mitchell <mark@codesourcery.com>
1636 * call.c (standard_conversion): Require that the derived type be
1637 complete when performing a derived-to-base conversion.
1639 2006-06-04 Mark Mitchell <mark@codesourcery.com>
1642 * decl.c (cp_finish_decl): Process initializers for static data
1643 members with non-dependent initializers, even in templates.
1646 * decl.c (maybe_deduce_size_from_array_init): If the declaration
1647 is erroneous, give it an erroneous type.
1648 (layout_var_decl): If the type is erroneous, give up.
1649 (check_initializer): Likewise.
1652 * cp-tree.h (TYPE_OBJ_P): New macro.
1653 (TYPE_PTROB_P): Use it.
1654 (TYPE_REF_OBJ_P): Likewise.
1655 * semantics.c (finish_compound_literal): Do not permit compound
1656 literals of non-object types.
1659 * typeck.c (original_type): Robustify.
1661 2006-06-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1664 * init.c (constant_value_1): Return decl instead of error_mark_node
1665 for invalid initializers.
1667 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1670 * rtti.c (build_dynamic_cast_1): Call c_common_truthvalue_conversion
1671 on operand of the COND_EXPR for the null pointer check.
1673 2006-06-01 Andrew Pinski <pinskia@physics.uc.edu>
1676 * typeck.c (build_unary_op): Mark the function as being used.
1678 2006-06-01 Alexandre Oliva <aoliva@redhat.com>
1681 * parser.c (cp_parser_initial_pragma): Read one more token for
1682 caller after reading PCH file in.
1684 2006-05-31 Mark Mitchell <mark@codesourcery.com>
1687 * call.c (perform_implicit_conversion): Do not actually perform
1688 conversions in templates.
1691 * call.c (resolve_args): Check for invalid uses of bound
1692 non-static member functions.
1693 * init.c (build_offset_ref): Return error_mark_node for errors.
1696 * decl.c (reshape_init): Robustify.
1697 (reshape_init_array_1): Likewise.
1699 2006-05-30 Mark Mitchell <mark@codesourcery.com>
1702 * parser.c (cp_parser_decl_specifier_seq): Issue errors about
1703 "friend" specifiers that do not appear in class scopes.
1706 * class.c (check_bitfield_decl): Ensure that all bitfields have
1709 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
1711 * pt.c (convert_nontype_argument): Fix a typo in an error
1714 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
1716 * decl.c, decl2.c, parser.c: Fix comment typos. Follow
1717 spelling conventions.
1719 2006-05-24 Mark Mitchell <mark@codesourcery.com>
1722 * decl.c (cp_make_fname_decl): Don't set DECL_INITIAL to
1723 error_mark_node to indicate an initialization is OK.
1724 (start_decl): Likewise. Adjust call to start_decl_1.
1725 (start_decl_1): Add initialized parameter. Simplify.
1726 * except.c (initialize_handler_parm): Adjust call to
1728 (expand_start_catch_block): Let cp_finish_decl initialize catch
1730 * cp-tree.h (start_decl_1): Adjust prototype.
1731 * pt.c (tsubst_expr): Don't set DECL_INITIAL to error_mark_node.
1732 (instantiate_decl): Let cp_finish_decl handle initialization.
1733 * semantics.c (finish_compound_literal): Create a temporary
1734 variable for the literal.
1735 * typeck.c (build_unary_op): Remove COMPOUND_LITERAL_P special
1737 * decl2.c (finish_static_data_member_decl): Don't set
1739 (grokfield): Do not try to initialize functions.
1741 2006-05-23 Mark Mitchell <mark@codesourcery.com>
1744 * pt.c (determine_specialization): Disallow partial
1745 specializations of templates.
1747 2006-05-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1750 * typeck.c (build_modify_expr): Test arguments for error_operand_p.
1752 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE.
1754 2006-05-21 Mark Mitchell <mark@codesourcery.com>
1757 * cp-tree.h (cp_save_expr): New function.
1758 * init.c (build_new): Correct logic for zero-element array
1759 warning. Use cp_save_expr.
1760 * tree.c (cp_save_expr): New function.
1762 2006-05-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1765 * decl.c (grokdeclarator): Return error_mark_node instead of NULL_TREE
1768 2006-05-19 Mike Stump <mrs@apple.com>
1770 * typeck.c (default_conversion): Remove static.
1772 2006-05-19 Mark Mitchell <mark@codesourcery.com>
1775 * cp-tree.h (begin_function_try_block): Change prototype.
1776 (finish_function_handler_sequence): Likewise.
1777 * parser.c (cp_parser_function_try_block): Adjust calls.
1778 * pt.c (tsubst_expr): Adjust calls.
1779 * semantics.c (begin_function_try_block): Create an artificial
1781 (finish_function_handler_sequence): Close it.
1783 2006-05-18 Mark Mitchell <mark@codesourcery.com>
1787 * typeck.c (decay_conversion): Convert bitfields to their declared
1788 types here. Improve documentation. Avoid use of cp_convert.
1789 (default_conversion): Make it static. Perform integral promotions
1790 before lvalue-to-rvalue, function-to-pointer, and array-to-pointer
1792 * init.c (build_init): Remove.
1793 (expand_default_init): Do not call rvalue.
1794 * call.c (null_ptr_cst_p): Robustify.
1795 (build_conditional_expr): Tidy.
1796 * except.c (build_throw): Do not perform lvalue-to-rvalue
1797 conversion on operand before initializing temporary.
1798 * tree.c (convert.h): Include it.
1799 (convert_bitfield_to_declared_type): Use convert_to_integer, not
1801 (rvalue): Don't convert bitfields to their declared type here.
1802 * cp-tree.h (build_init): Remove.
1803 (default_conversion): Likewise.
1804 * typeck2.c (build_m_component_ref): Do not perform
1805 lvalue-to-rvalue, function-to-pointer, or array-to-pointer
1806 conversions here. Correct error message.
1808 2006-05-17 Mark Mitchell <mark@codesourcery.com>
1811 * decl2.c (check_member_template): Remove checks for virtual
1813 * parser.c (cp_parser_function_specifier_opt): Complain about
1815 (cp_parser_pure_specifier): Likewise.
1818 * parser.c (cp_parser_set_storage_class): Check for
1819 invalid uses of storage classes on unbraced linkage
1821 (cp_parser_decl_specifier_seq): Pass keywords, not storage classes,
1822 to cp_parser_set_storage_class.
1824 2006-05-17 Jakub Jelinek <jakub@redhat.com>
1827 * semantics.c (finish_compound_literal): Only set TREE_HAS_CONSTRUCTOR
1831 * parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
1832 on combined parallel workshare constructs.
1833 * pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
1835 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
1838 * Make-lang.in (GXX_OBJS): Replace gcc.o with $(GCC_OBJS).
1840 2006-05-15 Mark Mitchell <mark@codesourcery.com>
1843 * cp-tree.h (perform_access_checks): New function.
1844 * semantics.c (perform_access_checks): New function.
1845 (perform_deferred_access_checks): Use it.
1846 * parser.c (cp_parser_simple_declaration): Adjust call to
1847 cp_parser_init_declarator.
1848 (cp_parser_type_parameter): Do not defer checks in default
1850 (cp_parser_explicit_specialization): Adjust call to
1851 cp_parser_single_declaration.
1852 (cp_parser_init_declarator): Perform template-parameter access
1854 (cp_parser_parameter_declaration): Do not defer checks for
1855 template parameter default arguments.
1856 (cp_parser_template_declaration_after_export): Gather access
1857 checks for template parameters, and pass them to
1858 cp_parser_single_declaration.
1859 (cp_parser_template_parameter_access_checks): New function.
1860 (cp_parser_single_declaration): Add checks parameter.
1863 * call.c (convert_like_real): Convert bitfields to their declared
1864 types when forming an rvalue.
1865 * tree.c (convert_bitfield_to_declared_type): New function.
1867 * cp-tree.h (convert_bitfield_to_declare_type): Declare it.
1869 2006-05-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1872 * pt.c (any_dependent_template_arguments_p): Return early on invalid
1876 * search.c (adjust_result_of_qualified_name_lookup): Skip on
1877 invalid context_class.
1880 * pt.c (do_decl_instantiation): Return early on invalid decl.
1883 * pt.c (push_template_decl_real): Return error_mark_node instead
1887 * pt.c (tsubst_friend_class): Return early on invalid friend
1890 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
1892 * Make-lang.in (cp/decl.o): Add dependency on $(TARGET_H).
1893 (cp/decl2.o): Likewise.
1894 (cp/typeck.o): Likewise.
1895 (cp/cvt.o): Likewise.
1896 (cp/parser.o): Likewise.
1897 (cp/call.o): Replace target.h with $(TARGET_H).
1899 2006-05-14 Alexandre Oliva <aoliva@redhat.com>
1901 * pt.c (build_non_dependent_expr): Leave ADDR_EXPR of
1902 COMPONENT_REF alone.
1904 2006-05-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1907 * decl.c (copy_fn_p): Return early on non-member functions.
1909 2006-05-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1912 * decl2.c (build_memfn_type): Skip invalid functions and class types.
1914 2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1917 * pt.c (convert_nontype_argument): Return early on invalid arguments.
1919 * pt.c (process_template_parm): Remove superfluous temporary.
1922 * pt.c (process_template_parm): Handle erroneous non-type parameters.
1925 * typeck.c (convert_for_initialization): Skip erroneous types.
1928 * typeck.c (convert_arguments): Return early on args with
1931 2006-05-03 Aldy Hernandez <aldyh@redhat.com>
1934 * typeck.c (build_static_cast_1): Save casted types in used types
1936 (build_reinterpret_cast_1): Same.
1937 * rtti.c (build_dynamic_cast_1): Same.
1939 2006-05-04 Jakub Jelinek <jakub@redhat.com>
1942 * parser.c (cp_parser_omp_for_loop): Only call
1943 cp_parser_abort_tentative_parse if cp_parser_parse_definitely was not
1946 2006-05-02 Mark Mitchell <mark@codesourcery.com>
1949 * decl.c (grokdeclarator): Robustify checks for defining members
1950 of incomplete types.
1953 * class.c (add_method): Call grok_special_member_properties.
1954 * decl.c (grokdeclarator): Don't call it here.
1955 (copy_fn_p): A TEMPLATE_DECL is never a copy constructor or
1956 assignment operator. Set TYPE_HAS_CONSTURCTOR if DECL is a
1958 (start_method): Don't call grok_special_member_properties.
1959 * method.c (implicitly_declare_fn): Likewise.
1960 * pt.c (instantiate_class_template): Likewise.
1961 * decl2.c (grokfield): Likewise.
1963 2006-05-02 Jakub Jelinek <jakub@redhat.com>
1966 * cp-gimplify.c (cxx_omp_privatize_by_reference): New function.
1967 * cp-tree.h (cxx_omp_privatize_by_reference): New prototype.
1968 * cp-objcp-common.h (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
1970 2006-04-30 Mark Mitchell <mark@codesourcery.com>
1973 * pt.c (tsubst_default_argument): Increment function_depth around
1974 call to tsubst_expr.
1975 * parser.c (cp_parser_parameter_declaration): Likewise.
1976 * decl2.c (mark_used): Tidy.
1978 2006-04-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1981 * decl.c (grok_op_properties): Skip operators with invalid args
1982 when checking for class-type or enum-type args.
1984 2006-04-29 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1987 * decl.c (copy_fn_p): Skip functions with invalid first arg.
1989 2006-04-27 Mark Mitchell <mark@codesourcery.com>
1992 * tree.c (rvalue): Convert bitfields to their declared types.
1995 * typeck2.c (cxx_incomplete_type_diagnostic): Handle
1998 2006-04-24 Mark Mitchell <mark@codesourcery.com>
2001 * typeck.c (decay_conversion): Don't adjust bitfield types.
2002 (perform_integral_promotions): Treat bitfield enums as enums, not
2003 as short integer types.
2004 * tree.c (rvalue): Convert bitfields to their correct types.
2006 2006-04-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2009 * class.c (layout_class_type): Skip fields with invalid types.
2011 2006-04-23 Mark Mitchell <mark@codesourcery.com>
2014 * cp-tree.h (build_this_parm): Declare.
2015 (grok_method_quals): Remove.
2016 (build_memfn_type): Declare.
2017 (build_artificial_parm): Declare.
2018 (do_friend): Remove quals parameter.
2019 * decl.c (build_this_parm): New function.
2020 (grokfndecl): Use it. Do not pass quals to grokclassfn.
2021 (grokdeclarator): Rename quals to memfn_quals. Avoid allocating
2022 unnecessary TYPE_DECLs. Correct qualification of member function
2024 * method.c (implicitly_declare_fn): Use build_this_parm.
2025 * friend.c (do_friend): Remove quals parameter.
2026 * decl2.c (grok_method_quals): Remove.
2027 (build_memfn_type): New function.
2028 (build_artificial_parm): Give it external linkage.
2029 (grokclassfn): Remove quals parameter. Do not build "this"
2033 * cp-tree.h (is_bitfield_expr_with_lowered_type): New function.
2034 * typeck.c (is_bitfield_expr_with_lowered_type): New function.
2035 (decay_conversion): Convert bitfield expressions to the correct
2037 (build_modify_expr): Remove spurious conversions.
2038 * class.c (layout_class_type): Modify the type of bitfields to
2039 indicate a limited range.
2040 * call.c (standard_conversion): Adjust the type of bitfield
2041 expressions used in an rvalue context.
2042 (build_conditional_expr): Likewise.
2044 2006-04-22 Kazu Hirata <kazu@codesourcery.com>
2046 * decl.c: Fix comment typos.
2048 2006-04-21 Eric Christopher <echristo@apple.com>
2050 * decl.c: Fix typo in function name.
2052 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2055 * parser.c (cp_parser_class_name): Check for invalid typenames.
2059 * pt.c (tsubst_friend_function): Return early if
2060 pushdecl_namespace_level fails.
2063 * typeck.c (convert_arguments): Return error_mark_node instead of
2065 * cp-tree.h (error_mark_list): Remove declaration.
2066 * decl.c (error_mark_list): Remove definition.
2067 (cxx_init_decl_processing): Do not initialize error_mark_list.
2070 * rtti.c (build_dynamic_cast_1): Check for invalid conversions
2071 before calling convert_to_reference.
2072 * cvt.c (convert_to_reference): Assert that reftype is a
2075 2006-04-19 Mark Mitchell <mark@codesourcery.com>
2078 * class.c (currently_open_class): Tidy.
2079 * decl.c (grokdeclarator): If we encounter an erroneous
2080 declarator, assume that we have already issued an error message
2081 and return. Return error_mark_node instead of NULL_TREE in more
2082 places. Issue errors about function definitions that do not have
2083 a function declarator. Check for complete types for all function
2085 * cp-tree.h (cp_error_declarator): Remove.
2086 (currently_open_class): Change return type.
2087 * parser.c (cp_parser_id_expression): Add optional_p parameter.
2088 (cp_parser_parse_diagnose_invalid_type_name): Adjust calls.
2089 (cp_parser_id_expression): Likewise.
2090 (cp_parser_unqualified_id): If the name is optional, return
2092 (cp_parser_postfix_dot_deref_expression): Adjust calls.
2093 (cp_parser_type_parameter): Likewise.
2094 (cp_parser_unqualified_id): Likewise.
2095 (cp_parser_direct_declarator): Likewise.
2096 (cp_parser_declarator_id): Add optional_p parameter.
2097 (cp_parser_function_definition_from_specifiers_and_declarator):
2098 Assume that start_function indicates failure only if it has issued
2100 (cp_parser_omp_var_list_no_open): Adjust calls.
2102 2006-04-17 Janis Johnson <janis187@us.ibm.com>
2104 PR c++/26114, c++/26115
2105 * typeck.c (cxx_mark_addressable): Restore check for extra_warnings.
2106 * class.c (check_field_decls): Ditto.
2108 2006-04-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2110 * init.c (build_offset_ref): Remove superfluous temporary.
2112 2006-04-16 Mark Mitchell <mark@codesourcery.com>
2115 * typeck.c (finish_class_member_access_expr): Robustify
2117 2006-04-15 Kazu Hirata <kazu@codesourcery.com>
2119 * Make-lang.in (cp/pt.o): Depend on vecprim.h.
2120 * pt.c: Include vecprim.h.
2121 (inline_parm_levels): Change the type to VEC(int,heap) *.
2122 (inline_parm_levels_used): Remove.
2123 (maybe_begin_member_template_processing,
2124 maybe_end_member_template_processing): Use VEC instead of
2127 * cp/call.c: Fix comment typos.
2129 2006-04-12 Mark Mitchell <mark@codesourcery.com>
2131 * parser.c (cp_parser_init_declarator): Initialize local variables
2134 2006-04-12 Roger Sayle <roger@eyesopen.com>
2136 * parser.c (cp_parser_init_declarator): Initialise
2137 is_parenthesized_init to false to avoid compiler warning.
2139 2006-04-11 Mark Mitchell <mark@codesourcery.com>
2141 * cp-tree.h (build_operator_new_call): Adjust prototype.
2142 (build_new_method_call): Likewise.
2143 (build_op_delete_call): Likewise.
2144 * init.c (build_raw_new_expr): New function.
2145 (build_new_1): Pass information as parameters, rather than
2146 bundling it into a NEW_EXPR.
2147 (build_new): Adjust accordingly.
2148 (build_vec_delete_1): Adjust for changes to build_op_delete_call.
2149 (build_delete): Likewise.
2150 * decl.c (finish_destructor_body): Likewise.
2151 * call.c (build_operator_new_call): Return the allocation function
2153 (build_op_delete_call): Take allocation function as parameter.
2154 (build_special_member_call): Adjust call to build_new_method_call.
2155 (build_new_method_call): Return function called.
2156 * pt.c (tsubst_copy_and_build): Adjust call to
2157 build_new_method_call.
2158 * semantics.c (finish_call_expr): Likewise.
2159 * parser.c (cp_parser_postfix_expression): Likewise.
2160 * typeck2.c (cxx_incomplete_type_diagnostic): Refer to
2161 "incomplete", not "undefined", types.
2164 * decl.c (grokdeclarator): Remove namespace-handling code for
2165 pointers-to-members.
2166 * parser.c (cp_parser_ptr_operator): Check for qualified names
2170 * parser.c (cp_parser_init_declarator): Adjust logic for deciding
2171 whether or not to look for a pure-specifier.
2172 (cp_parser_member_declaration): Likewise.
2174 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
2176 * decl2.c, pt.c, semantics.c: Fix comment typos.
2178 2006-04-06 Roger Sayle <roger@eyesopen.com>
2180 * call.c (null_ptr_cst_p): Add explicit TREE_CONSTANT_OVERFLOW check.
2182 2006-04-05 Jason Merrill <jason@redhat.com>
2184 * name-lookup.c (push_namespace_with_attribs): Temporarily disable
2185 default hidden visibility for anonymous namespace.
2187 2006-03-29 Roger Sayle <roger@eyesopen.com>
2190 * init.c (build_vec_delete_1): Convert BASE pointer's type to
2191 the base pointer type to avoid a type mismatch in the EQ_EXPR.
2193 2006-03-24 Carlos O'Donell <carlos@codesourcery.com>
2195 * search.c (maybe_suppress_debug_info): If
2196 flag_emit_class_debug_always then don't suppress.
2198 2006-03-22 Jason Merrill <jason@redhat.com>
2200 * name-lookup.c (push_namespace_with_attribs): Only apply hidden
2201 visibility to anonymous namespaces if HAVE_GAS_HIDDEN.
2203 2006-03-21 Jakub Jelinek <jakub@redhat.com>
2206 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle default arguments.
2208 2006-03-21 Jason Merrill <jason@redhat.com>
2211 * parser.c (cp_parser_declaration): Support attributes on
2212 anonymous namespaces.
2213 * name-lookup.c (push_namespace_with_attribs): Anonymous
2214 namespaces default to hidden visibility.
2216 2006-03-20 Jason Merrill <jason@redhat.com>
2218 PR c++/21764, c++/19238
2219 * decl.c (cp_finish_decl): Call determine_visibility later.
2220 (start_preparsed_function): Likewise.
2221 * cp-tree.h (CP_TYPE_CONTEXT, TYPE_NAMESPACE_SCOPE_P): New macros.
2222 (TYPE_CLASS_SCOPE_P, TYPE_FUNCTION_SCOPE_P): New macros.
2223 * name-lookup.h (struct cp_binding_level): Add has_visibility
2225 * name-lookup.c: Include c-pragma.h.
2226 (push_namespace_with_attribs): Split out from push_namespace.
2227 Push visibility if appropriate. Set TREE_PUBLIC on namespaces.
2228 (leave_scope): Pop visibility if appropriate.
2229 * decl2.c (determine_visibility_from_class): Split out from...
2230 (determine_visibility): ...here. Handle function scope and
2232 (import_export_decl): Move visibility handling to
2233 determine_visibility_from_class.
2234 * parser.c (cp_parser_declaration, cp_parser_namespace_name): Allow
2235 attributes on namespace declarations.
2237 2006-03-15 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2240 * decl.c (grokdeclarator): Do not accept long long double.
2241 Reorganize checks for invalid (combinations of) type modifiers.
2242 Quote modifiers in messages.
2244 2006-03-09 Jason Merrill <jason@redhat.com>
2246 PR c++/16387, c++/16389
2247 * typeck.c (cxx_alignof_expr, cxx_sizeof_expr): New functions.
2248 (cxx_sizeof_or_alignof_expr): Split out from here.
2250 2006-03-09 Diego Novillo <dnovillo@redhat.com>
2252 Merge from gomp-20050608-branch
2254 2006-02-02 Diego Novillo <dnovillo@redhat.com>
2256 * decl.c (pop_labels_1): Use appropriate pointer casting.
2257 (poplevel_named_label_1): Likewise.
2258 (named_label_entry_hash): Likewise.
2259 (named_label_entry_eq): Likewise.
2260 (check_goto): Likewise.
2261 (define_label): Likewise.
2263 2006-01-26 Diego Novillo <dnovillo@redhat.com>
2265 * cp-tree.h (CP_OMP_CLAUSE_INFO): Use TREE_TYPE instead
2267 * pt.c: Use OMP_CLAUSE_CODE and OMP_CLAUSE_OPERAND
2268 instead of TREE_CODE/TREE_OPERAND.
2269 * semantics.c: Likewise.
2270 * parser.c: Likewise.
2272 2005-11-10 Diego Novillo <dnovillo@redhat.com>
2274 * parser.c (cp_parser_omp_threadprivate): Emit diagnostic if
2275 target does not support TLS.
2277 2005-11-09 Jakub Jelinek <jakub@redhat.com>
2279 * decl.c (redeclaration_error_message): Don't error about
2280 DECL_THREAD_LOCAL_P mismatches if CP_DECL_THREADPRIVATE_P
2283 2005-11-08 Jakub Jelinek <jakub@redhat.com>
2286 * semantics.c (finish_omp_barrier, finish_omp_flush): New
2288 * parser.c (cp_parser_omp_barrier): Call finish_omp_barrier.
2289 (cp_parser_omp_flush): Call finish_omp_flush.
2290 * cp-tree.h (finish_omp_barrier, finish_omp_flush): New
2294 * pt.c (tsubst_expr): Handle OMP_MASTER and OMP_ORDERED.
2296 2005-11-03 Jakub Jelinek <jakub@redhat.com>
2298 * semantics.c (finish_omp_threadprivate): Error on class-scope
2301 2005-11-02 Jakub Jelinek <jakub@redhat.com>
2303 * parser.c (cp_parser_omp_all_clauses): If some clause
2304 type is not allowed, don't remove just one of the
2305 clauses, but all clauses added in that loop round.
2307 * semantics.c (finish_omp_clauses): Fix function
2308 comment. Don't handle non-const or mutable specially,
2309 as const and not mutable is predetermined shared and
2310 that leads to double error. Don't ICE if copyin var is
2314 * parser.c (cp_parser_pragma): Diagnose
2315 PRAGMA_OMP_SECTION outside of PRAGMA_OMP_SECTIONS
2318 * semantics.c (finish_omp_threadprivate): Error if V
2319 is automatic variable or has incomplete type.
2321 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2323 * parser.c (cp_parser_omp_all_clauses): Use
2324 OMP_CLAUSE_CHAIN instead of TREE_CHAIN.
2326 2005-11-01 Diego Novillo <dnovillo@redhat.com>
2328 * parser.c (cp_parser_omp_all_clauses): When emitting an
2329 error message, remove the invalid clause from the list.
2331 2005-10-31 Diego Novillo <dnovillo@redhat.com>
2333 * parser.c (cp_parser_omp_parallel): Do not allow 'nowait' in
2334 combined parallel+workshare directives.
2336 2005-10-31 Richard Henderson <rth@redhat.com>
2338 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DTOR):
2339 Use cxx_omp_clause_dtor.
2340 * cp-tree.h (CP_OMP_CLAUSE_INFO): New.
2341 (cxx_omp_clause_dtor): New.
2342 * cp-gimplify.c (cxx_omp_clause_apply_fn): New.
2343 (cxx_omp_clause_default_ctor): Use it.
2344 (cxx_omp_clause_copy_ctor, cxx_omp_clause_assign_op):
2346 (cxx_omp_clause_dtor): New.
2347 * semantics.c (finish_omp_clauses): Rewrite cdtor
2348 checking to fill in CP_OMP_CLAUSE_INFO. Don't
2349 specialcase LASTPRIVATE for removal.
2350 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
2351 cxx_omp_clause_assign_op): Move to cp-gimplify.c.
2353 2005-10-28 Jakub Jelinek <jakub@redhat.com>
2355 * semantics.c (finish_omp_threadprivate): If
2356 DECL_RTL_SET_P, call make_decl_rtl again so that
2357 encode_section_info can update SYMBOL_REF's flags.
2359 2005-10-26 Jakub Jelinek <jakub@redhat.com>
2361 * semantics.c (finish_omp_for): Don't segfault if COND
2362 or INCR is NULL. If not calling c_finish_omp_for
2363 right away and one of COND and INCR is NULL, issue
2364 error and don't expand anything.
2367 * cp-tree.h (finish_omp_for): Add PRE_BODY argument.
2368 * semantics.c (finish_omp_for): Likewise. Set
2369 OMP_FOR_PRE_BODY to PRE_BODY if deferring, add it
2370 into the current statement list if not processing
2371 template decl or pass it to c_finish_omp_for.
2373 * parser.c (cp_parser_omp_for_loop): Expand optional DECL_EXPRs
2374 into PRE_BODY statement list. Pass it to finish_omp_for.
2375 * pt.c (tsubst_expr) <case OMP_FOR>: tsubst_expr also
2376 OMP_FOR_PRE_BODY into PRE_BODY stmt list, pass it to
2377 finish_omp_for. Put all the statements into sk_omp
2380 2005-10-25 Jakub Jelinek <jakub@redhat.com>
2383 * parser.c (struct cp_parser): Rename in_iteration_statement
2384 field to in_statement.
2385 (IN_SWITCH_STMT, IN_ITERATION_STMT): Define.
2386 (IN_OMP_BLOCK, IN_OMP_FOR): Change values.
2387 (cp_parser_new, cp_parser_begin_omp_structured_block,
2388 cp_parser_end_omp_structured_block,
2389 cp_parser_omp_for_loop): Adjust for
2390 in_iteration_statement renaming.
2391 (cp_parser_selection_statement): Save
2392 parser->in_iteration, or it temporarily with
2393 IN_SWITCH_STMT for the
2394 cp_parser_implicitly_scoped_statement call.
2395 (cp_parser_iteration_statement): Adjust for
2396 in_iteration_statement renaming. Use
2397 IN_ITERATION_STMT rather than true.
2398 (cp_parser_jump_statement): Adjust for
2399 in_iteration_statement renaming and new values. Don't
2400 error on break in a switch statement within OMP_FOR or
2401 OpenMP structured block.
2404 * parser.c (cp_parser_cache_group): Don't stop if next
2405 token is CPP_PRAGMA_EOL and end is CPP_PRAGMA_EOL as
2406 well. If current token is CPP_PRAGMA, consume
2407 everything until CPP_PRAGMA_EOL inclusive.
2409 2005-10-24 Jakub Jelinek <jakub@redhat.com>
2412 * semantics.c (finish_omp_for): Handle MODOP_EXPR in
2413 addition to MODIFY_EXPR.
2415 2005-10-23 Richard Henderson <rth@redhat.com>
2417 * cp-gimplify.c (struct cp_gimplify_ctx): Remove.
2419 (begin_bc_block, finish_bc_block): Use it.
2420 (push_context, pop_context): Remove.
2421 (cp_genericize): Don't use them. Assert bc_label is null.
2422 * semantics.c (finish_omp_clauses): Create a fake data
2423 element of TYPE for probing ctors.
2425 2005-10-23 Richard Henderson <rth@redhat.com>
2427 * cp-objcp-common.h (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
2428 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
2429 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
2430 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
2431 * semantics.c (finish_omp_clauses): Look through
2432 arrays when looking up special member calls. Also
2433 remove FIRSTPRIVATE when LASTPRIVATE fails.
2434 (cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor): New.
2435 (cxx_omp_clause_assign_op): New.
2436 * cp-tree.h: Declare them.
2438 2005-10-21 Richard Henderson <rth@redhat.com>
2440 * decl.c (check_previous_goto_1): Return false if error.
2441 (check_switch_goto): Likewise.
2442 (finish_case_label): Don't emit the case label on error.
2443 * parser.c (struct cp_parser): Revert
2444 in_switch_statement_p changes.
2445 (cp_parser_labeled_statement,
2446 cp_parser_selection_statement): Likewise.
2447 (cp_parser_begin_omp_structured_block): Don't save...
2448 (cp_parser_end_omp_structured_block): or restore
2449 in_switch_statement_p.
2451 2005-10-21 Richard Henderson <rth@redhat.com>
2453 * semantics.c (finish_omp_threadprivate): Set
2454 decl_flags.u2sel when necessary.
2456 2005-10-21 Richard Henderson <rth@redhat.com>
2458 * decl.c (poplevel_named_label_1): Restore creation of the
2460 (decl_jump_unsafe): Check for error_mark_node types.
2461 (check_goto): Don't check cdtor_label. Don't use identify_goto.
2462 * semantics.c (finish_return_stmt): Do check_omp_return before
2463 converting to cdtor_label goto.
2465 2005-10-21 Richard Henderson <rth@redhat.com>
2468 * decl.c (check_omp_return): Return false on error.
2469 * cp-tree.h (check_omp_return): Update decl.
2470 * semantics.c (finish_return_stmt): Avoid adding
2473 2005-10-21 Richard Henderson <rth@redhat.com>
2475 * cp-tree.h (struct language_function): Remove
2477 Change x_named_labels to a hashtable.
2478 (check_omp_return): Declare.
2479 * decl.c (struct named_label_use_entry): Rename from
2480 named_label_use_list. Remove label_decl.
2481 (struct named_label_entry): Rename from
2482 named_label_list. Remove old_value and next. Change
2483 in_try_scope and in_catch_scope to bool. Add
2485 (pop_labels_1): New.
2486 (pop_labels): Use it.
2487 (pop_local_label, poplevel_named_label_1): New.
2488 (poplevel): Use them.
2489 (named_label_entry_hash, named_label_entry_eq): New.
2490 (make_label_decl): Create named_labels. Move label
2491 creation bits from lookup_label.
2492 (declare_local_label): Tidy.
2493 (identify_goto): Split out from ...
2494 (check_previous_goto_1): Add exited_omp argument.
2497 (use_label): Merge into...
2498 (check_goto): ... here. Handle omp scopes.
2499 (check_omp_return): New.
2500 (check_previous_gotos): Merge into...
2501 (define_label): ... here.
2502 (save_function_data): Remove x_named_label_uses reference.
2503 (finish_function): Likewise.
2504 * name-lookup.h (sk_omp): New.
2505 * name-lookup.c (begin_scope): Handle it.
2506 * parser.c (cp_parser_omp_for): Don't create extra
2509 (cp_parser_omp_sections): Likewise.
2510 * semantics.c (finish_return_stmt): Call check_omp_return.
2511 (begin_omp_structured_block): Use sk_omp.
2512 (finish_omp_structured_block): Use do_poplevel. Don't build a
2513 MUST_NOT_THROW expression here.
2514 (begin_omp_parallel, finish_omp_parallel): Don't create extra
2515 compound statements.
2517 2005-10-21 Diego Novillo <dnovillo@redhat.com>
2520 * cp/cp-tree.h (struct lang_decl_flags): Add field
2522 (CP_DECL_IS_THREADPRIVATE): Define.
2523 * cp/semantics.c (finish_omp_threadprivate): Set. Do
2524 not error out if CP_DECL_IS_THREADPRIVATE is set
2526 * cp/decl.c (duplicate_decls): Merge
2527 CP_DECL_THREADPRIVATE_P.
2529 2005-10-20 Richard Henderson <rth@redhat.com>
2531 * cp-gimplify.c (cp_gimplify_omp_for): New.
2532 (cp_gimplify_expr): Call it.
2533 * cp-tree.h (OMP_FOR_GIMPLIFYING_P): New.
2534 * parser.c (struct cp_parser): Rename
2535 in_iteration_statement_p to in_iteration_statement and
2536 change to unsigned char. Similarly with
2537 in_switch_statement. Update all users.
2538 (IN_OMP_BLOCK, IN_OMP_FOR): New.
2539 (cp_parser_labeled_statement): Diagnose case labels
2540 binding closer to an openmp block nested than the
2542 (cp_parser_jump_statement): Diagnose break and
2543 continue labels binding closer to an openmp block than
2544 an iteration or switch.
2545 (cp_parser_omp_for_loop): Mark in_iteration_statement
2547 (cp_parser_begin_omp_structured_block): New.
2548 (cp_parser_end_omp_structured_block): New.
2549 (cp_parser_omp_structured_block): Use them.
2550 (cp_parser_omp_for, cp_parser_omp_sections_scope): Likewise.
2551 (cp_parser_omp_parallel): Likewise.
2553 2005-10-20 Richard Henderson <rth@redhat.com>
2555 * semantics.c (begin_omp_structured_block): New.
2556 (finish_omp_structured_block): New.
2557 (begin_omp_parallel, finish_omp_parallel): Use them.
2558 * parser.c (cp_parser_omp_structured_block): Likewise.
2559 (cp_parser_omp_for): Likewise.
2560 (cp_parser_omp_sections_scope): Likewise.
2561 * cp-tree.h: Declare them.
2563 2005-10-20 Richard Henderson <rth@redhat.com>
2565 * parser.c (cp_parser_omp_master): Return the statement.
2566 (cp_parser_omp_ordered): Likewise.
2567 (cp_parser_omp_construct): Set the locus for them.
2569 2005-10-19 Richard Henderson <rth@redhat.com>
2571 * semantics.c (finish_omp_atomic): Revert to
2572 uses_template_parms.
2574 2005-10-19 Richard Henderson <rth@redhat.com>
2576 * semantics.c (finish_omp_clauses): Avoid
2577 DECL_THREAD_LOCAL_P on a PARM_DECL. Remove some
2578 stub asserts guaranteed to fail.
2580 2005-10-19 Richard Henderson <rth@redhat.com>
2582 * cp-tree.h (OMP_ATOMIC_DEPENDENT_P, OMP_ATOMIC_CODE): New.
2583 (finish_omp_clauses, finish_omp_for, finish_omp_atomic): New.
2584 * parser.c (cp_parser_omp_clause_copyin): Remove.
2585 (cp_parser_omp_all_clauses): Use cp_parser_omp_var_list instead.
2586 Call finish_omp_clauses.
2587 (cp_parser_omp_clause_if): Don't do error checking here.
2588 (cp_parser_omp_clause_num_threads): Likewise.
2589 (cp_parser_omp_clause_schedule): Likewise.
2590 (cp_parser_omp_atomic): Use finish_omp_atomic.
2591 (cp_parser_omp_for_loop): Don't discard DECL_EXPR.
2592 Don't decompose assignment statment here. Use
2595 * pt.c (tsubst_omp_clauses): New.
2596 (tsubst_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
2597 OMP_SINGLE, OMP_SECTION, OMP_CRITICAL, OMP_ATOMIC.
2598 * semantics.c (finish_omp_clauses): New.
2599 (begin_omp_parallel, finish_omp_parallel): Know Less about the
2600 internals of the stmt_list stack.
2601 (finish_omp_for, finish_omp_atomic): New.
2603 2005-10-18 Jakub Jelinek <jakub@redhat.com>
2605 * semantics.c (cxx_omp_predetermined_sharing): New function.
2606 * cp-tree.h (cxx_omp_predetermined_sharing): New prototype.
2608 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
2610 2005-10-18 Richard Henderson <rth@redhat.com>
2612 * parser.c (cp_parser_omp_single): Use make_node and accessors
2615 2005-10-17 Richard Henderson <rth@redhat.com>
2617 * parser.c (cp_parser_omp_for_loop): Handle declarations.
2619 2005-10-12 Richard Henderson <rth@redhat.com>
2621 * Make-lang.in (CXX_C_OBJS): Add c-omp.o.
2622 * cp-tree.h (begin_omp_parallel, finish_omp_parallel): Declare.
2623 (finish_omp_threadprivate): Declare.
2624 * parser.c (struct cp_lexer): Add in_pragma.
2625 (cp_lexer_consume_token): Don't consume a PRAGMA_EOL
2627 (cp_parser_skip_to_closing_parenthesis): Stop at PRAGMA_EOL.
2628 (cp_parser_skip_to_end_of_statement): Likewise.
2629 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
2630 (cp_parser_skip_to_closing_brace): Likewise.
2631 (cp_parser_skip_to_pragma_eol): Reset in_pragma.
2632 (cp_parser_require_pragma_eol): New.
2633 (cp_parser_statement): Add in_compound argument;
2635 Restart if a non-statement pragma seen outside a
2637 (cp_parser_statement_seq_opt): Stop at PRAGMA_EOL.
2638 (cp_parser_declaration_seq_opt): Likewise.
2639 (cp_parser_member_specification_opt): Likewise.
2640 (cp_parser_function_definition_after_decl): Likewise.
2641 (cp_parser_skip_until_found): Likewise.
2642 (cp_parser_cache_group): Likewise.
2643 (enum pragma_omp_clause, cp_parser_omp_clause_name,
2644 check_no_duplicate_clause,
2645 cp_parser_omp_var_list_no_open,
2646 cp_parser_omp_var_list, cp_parser_omp_clause_copyin,
2647 cp_parser_omp_clause_default, cp_parser_omp_clause_if,
2648 cp_parser_omp_clause_nowait,
2649 cp_parser_omp_clause_num_threads,
2650 cp_parser_omp_clause_ordered,
2651 cp_parser_omp_clause_reduction,
2652 cp_parser_omp_clause_schedule,
2653 cp_parser_omp_all_clauses,
2654 cp_parser_omp_structured_block, cp_parser_omp_atomic,
2655 cp_parser_omp_barrier, cp_parser_omp_critical,
2656 cp_parser_omp_flush, cp_parser_omp_for_loop,
2657 cp_parser_omp_for, cp_parser_omp_master,
2658 cp_parser_omp_ordered, cp_parser_omp_sections_scope,
2659 cp_parser_omp_sections, cp_parser_omp_parallel,
2660 cp_parser_omp_single, cp_parser_omp_threadprivate,
2661 cp_parser_omp_construct): New.
2662 (cp_parser_pragma): Handle OpenMP pragmas.
2663 * semantics.c (finish_omp_threadprivate): New.
2664 (begin_omp_parallel, finish_omp_parallel): New.
2666 2005-10-11 Richard Henderson <rth@redhat.com>
2668 * parser.c (struct cp_token): Add pragma_kind.
2669 (eof_token): Initialize it.
2670 (cp_lexer_handle_pragma): Remove.
2671 (cp_parser_initial_pragma): New.
2672 (cp_lexer_new_main): Use it.
2673 (cp_lexer_get_preprocessor_token): Initialize pragma_kind.
2674 (cp_lexer_print_token): Don't handle CPP_PRAGMA.
2675 (cp_parser_skip_to_pragma_eol): New.
2676 (cp_parser_error): Use it.
2679 2005-10-09 Richard Henderson <rth@redhat.com>
2681 * lex.c (parse_strconst_pragma): Update for c_lex name change.
2682 (handle_pragma_java_exceptions): Likewise.
2683 * parser.c (cp_lexer_new_main): Likewise.
2685 2005-10-06 Richard Henderson <rth@redhat.com>
2687 * parser.c (cp_lexer_new_main): Comment out defer_pragmas.
2688 (cp_lexer_handle_pragma): Comment out
2689 cpp_handle_deferred_pragma.
2691 2005-10-01 Richard Henderson <rth@redhat.com>
2693 * name-lookup.c (lookup_name): Remove prefer_type argument.
2694 (lookup_name_prefer_type): New function.
2695 * name-lookup.h (lookup_name_prefer_type): Declare it.
2696 * decl.c (lookup_and_check_tag): Use it.
2697 * pt.c (tsubst_friend_class): Likewise. Update for
2699 (lookup_template_class, tsubst_copy_and_build): Likewise.
2701 2006-03-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2704 * tree.c (bot_manip): Don't call mark_used.
2706 2006-03-02 Mike Stump <mrs@apple.com>
2708 * decl2.c (import_export_decl): Remove redundant call to
2709 targetm.cxx.key_method_may_be_inline ().
2711 2006-03-02 Richard Sandiford <richard@codesourcery.com>
2713 * decl.c (start_decl): Use have_global_bss_p when deciding
2714 whether to make the decl common.
2716 2006-03-01 Mike Stump <mrs@apple.com>
2719 * decl2.c (import_export_decl): Fix ABI breakage on darwin.
2721 2006-02-24 Geoffrey Keating <geoffk@apple.com>
2723 * except.c (expand_start_catch_block): Handle
2724 flag_use_cxa_get_exception_ptr.
2726 2006-02-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2729 * decl.c (grok_op_properties): Check for ellipsis in arguments of
2732 2006-02-20 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
2734 * Make-lang.in (C++): Remove.
2735 (.PHONY): Remove C++.
2737 2006-02-18 Mark Mitchell <mark@codesourcery.com>
2740 * cp-tree.h (cp_finish_decl): Adjust declaration.
2741 (grokbitfield): Likewise.
2742 (finish_static_data_member_decl): Likewise.
2743 * init.c (constant_value_1): Ensure processing_template_decl when
2744 folding non-dependent initializers for static data members of
2745 dependent types. Return error_mark_node for erroneous
2747 * class.c (get_vtable_decl): Use finish_decl, not cp_finish_decl.
2748 * decl.c (cp_make_fname_decl): Adjust call to cp_finish_decl.
2749 (cp_finish_decl): Add init_const_expr_p parameter. Set
2750 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2751 (finish_decl): Adjust call to cp_finish_decl.
2752 (compute_array_index_type): Robustify.
2753 (start_method): Use finish_decl, not cp_finish_decl.
2754 * rtti.c (emit_tinfo_decl): Likewise.
2755 * except.c (initialize_handler_parm): Adjust call to
2757 (expand_start_catch_block): Likewise.
2758 * cvt.c (build_up_reference): Adjust call to cp_finish_decl.
2759 * pt.c (instantiate_class_template): Adjust call to
2760 finish_static_data_member_decl.
2761 (tsubst_expr): Use finish_decl, not cp_finish_decl.
2762 (instantiate_decl): Adjust call to cp_finish_decl.
2763 * name-lookup.c (pushdecl_top_level_1): Use finish_decl, not
2765 * decl2.c (finish_static_data_member_decl): Add init_const_expr_p
2767 (grokfield): Likewise.
2768 * parser.c (cp_parser_condition): Check for constant initializers.
2769 (cp_parser_init_declarator): Adjust calls to grokfield and
2770 cp_finish_decl. Don't set
2771 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P here.
2772 (cp_parser_member_declaration): Likewise.
2773 (cp_parser_objc_class_ivars): Likewise.
2775 2006-02-14 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2777 * call.c (standard_conversion): Return NULL instead of 0.
2778 (build_user_type_conversion_1): Likewise.
2779 (tourney): Likewise.
2780 * decl.c (redeclaration_error_message): Likewise.
2781 * error.c (language_to_string): Likewise.
2783 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2785 * cp-tree.h (warn_hidden): Remove prototype.
2786 * class.c (warn_hidden): Make static.
2788 * cp-tree.h (build_type_conversion): Remove prototype.
2789 * cvt.c (build_type_conversion): Add prototype, make static.
2791 * cp-tree.h (push_tinst_level): Remove prototype.
2792 (pop_tinst_level): Likewise.
2793 * pt.c (push_tinst_level): Add prototype, make static.
2794 (pop_tinst_level): Likewise.
2796 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2798 * decl.c (grokdeclarator): Return NULL_TREE instead of 0.
2799 * typeck.c (unary_complex_lvalue): Likewise.
2801 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2803 * lex.c (parse_strconst_pragma): Return error_mark_node instead of
2804 "(tree)-1" to indicate failure. Simplify.
2805 (handle_pragma_interface): Test for error_mark_node instead of
2807 (handle_pragma_implementation): Likewise.
2809 2006-02-13 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2812 * parser.c (cp_parser_decl_specifier_seq): Check for duplicate
2813 decl-specifiers. Remove extra check for duplicate 'friend'.
2814 * decl.c (grokdeclarator): Remove check for duplicate
2815 decl-specifiers. Set longlong together with long_p.
2817 2006-02-12 Jason Merrill <jason@redhat.com>
2820 * except.c (build_throw): Add a CLEANUP_POINT_EXPR inside the
2821 TRY_CATCH_EXPR or MUST_NOT_THROW_EXPR.
2823 2006-02-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2825 * class.c (debug_class): Remove extern.
2826 (debug_thunks): Likewise.
2828 2006-02-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
2830 * typeck.c (string_conv_p): Don't test for flag_const_strings.
2832 2006-02-08 Jason Merrill <jason@redhat.com>
2835 * cp-gimplify.c (cp_gimplify_expr): Don't call
2836 cp_gimplify_init_expr for MODIFY_EXPRs.
2837 * typeck2.c (split_nonconstant_init_1): Use INIT_EXPR.
2839 2006-02-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
2842 * decl.c (grokdeclarator): Set dname also for destructor.
2845 * decl.c (grokdeclarator): Clear storage_class together with staticp.
2847 2006-02-07 Gabriel Dos Reis <gdr@integrable-solutions.net>
2849 * cp-tree.h (tf_warning_or_error): Renamed from tf_warn_or_error.
2850 (cp_build_qualified_type): Propogate renaming.
2851 * call.c (convert_like_real): Likewise.
2852 * cvt.c (cp_convert_to_pointer, convert_to_reference): Likewise.
2853 * decl.c (make_typename_type, grokdeclarator): Likewise.
2854 * pt.c (tsubst_friend_function, instantiate_class_template,
2855 tsubst_default_argument, instantiate_decl,
2856 tsubst_initializer_list, tsubst_enum): Likewise.
2857 * semantics.c (finish_template_type): Likewise.
2858 * typeck.c (build_ptrmemfunc, convert_for_assignment): Likewise.
2860 2006-02-07 Dirk Mueller <dmueller@suse.com>
2862 * typeck.c (build_binary_op): Annotate div-by-zero
2863 warnings to make -Wno-div-by-zero have an effect.
2865 2006-02-07 Mark Mitchell <mark@codesourcery.com>
2868 * pt.c (coerce_template_template_parms): Do not templates with
2869 excess default arguments to match template template parameters
2870 with fewer parameters.
2871 (coerce_template_parms): Add use_default_args parameter; use
2872 default arguments only when true.
2873 (lookup_template_class): Adjust call to coerce_template_parms.
2874 (fn_type_unification): Likewise.
2876 (get_bindings): Likewise.
2877 (dependent_type_p): Add assertions.
2879 2006-02-06 Roger Sayle <roger@eyesopen.com>
2881 * decl.c (grokdeclarator): Don't bother checking for CHAR_TYPE.
2882 * rtti.c (typeinfo_in_lib_p): Likewise.
2883 * cp-tree.h (INTEGRAL_CODE_P, CP_INTEGRAL_TYPE_P): Likewise.
2884 * name-lookup.c (arg_assoc_type): Likewise.
2886 2006-02-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2888 * cp-tree.h (tf_warn_or_error): New substituion flag.
2889 (cp_build_qualified_type): Use it.
2890 * call.c (convert_like_real): Likewise.
2891 * cvt.c (cp_convert_to_pointer): Likewise.
2892 (convert_to_reference): Likewise.
2893 * decl.c (make_typename_type): Likewise.
2894 (grokdeclarator): Likewise.
2895 * pt.c (tsubst_friend_function): Likewise.
2896 (tsubst_friend_class): Likewise.
2897 (instantiate_class_template): Likewise.
2898 (tsubst_default_argument): Likewise.
2899 (instantiate_decl): Likewise.
2900 (tsubst_initializer_list): Likewise.
2901 (tsubst_enum): Likewise.
2902 * semantics.c (finish_template_type): Likewise.
2903 * typeck.c (build_ptrmemfunc): Likewise.
2904 (convert_for_assignment): Likewise.
2906 2006-02-03 Lee Millward <lee.millward@gmail.com>
2908 * typeck.c (string_conv_p): Pass appropiate
2909 OPT_Wxxxx values when calling warning().
2910 (build_array_ref, cxx_mark_addressable): Likewise.
2911 (check_return_expr): Likewise.
2913 * init.c (perform_member_init): Likewise.
2914 (sort_mem_initializers, emit_mem_initializers): Likewise.
2916 * class.c (check_field_decls): Likewise.
2917 (warn_about_ambiguous_bases): Likewise.
2919 * decl.c (pop_label, poplevel): Likewise.
2920 (duplicate_decls, grok_op_properties): Likewise.
2921 (start_preparsed_function, finish_function): Likewise.
2923 * name-lookup.c (pushdecl_maybe_friend): Likewise.
2924 (pushdecl_maybe_friend): Likewise.
2926 * parser.c (cp_parser_warn_min_max): Likewise.
2927 (cp_parser_cast_expression): Likewise.
2929 * method.c (lazily_declare_fn): Likewise.
2930 * cvt.c (convert_to_void): Likewise.
2931 * mangle.c (finish_mangling): Likewise.
2932 * cp-gimplify.c (gimplify_expr_stmt): Likewise.
2934 2006-02-03 Mark Mitchell <mark@codesourcery.com>
2936 * name-lookup.c (do_class_using_decl): Use IDENTIFIER_TYPENAME_P,
2937 not IDENTIFIER_OPNAME_P.
2939 2006-01-31 Mark Mitchell <mark@codesourcery.com>
2942 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Revise
2944 * pt.c (determine_specialization): Use INNERMOST_TEMPLATE_PARMS,
2946 (instantiate_class_template): Simplify.
2947 (verify_class_unification): Remove.
2948 (unify): Document parameters. Use INNERMOST_TEMPLATE_ARGS to
2949 permit multiple levels of template arguments.
2950 (more_specialized_class): Simplify.
2951 (get_class_bindings): Pass full arguments to unify. Fold
2952 verify_class_unification into this function. Return full
2954 (most_specialized_class): Adjust for changes to
2955 get_class_bindings. Issue errors here for ambiguity. Return the
2956 fully deduced arguments for the most specialized class, in
2957 addition to the partial specialization.
2959 2006-01-31 Ben Elliston <bje@au.ibm.com>
2961 * mangle.c: Comment fix.
2963 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2965 * Make-lang.in (cp-warn): Include CXX_COMPAT_WARN.
2966 * repo.c (extract_string, afgets): Use cast when converting from
2969 2006-01-29 Gabriel Dos Reis <gdr@integrable-solutions.net>
2971 * call.c (alloc_conversion): Use cast when converting from void *.
2972 (alloc_conversions): Likewise.
2973 (add_candidate): Likewise.
2974 (print_z_candidates): Likewise.
2975 (add_warning): Likewise.
2976 * pt.c (retrieve_local_specialization): Likewise.
2977 (process_partial_specialization): Likewise.
2978 (mangle_class_name_for_template): Likewise.
2979 (tsubst_template_args): Likewise.
2980 * typeck2.c (pat_calc_hash): Likewise.
2981 (pat_compare): Likewise.
2982 (abstract_virtuals_error): Likewise.
2983 * class.c (method_name_cmp): Likewise.
2984 (resort_method_name_cmp): Likewise.
2985 (get_vfield_name): Likewise.
2986 * decl2.c (generate_ctor_and_dtor_functions_for_priority): Likewise.
2987 * lex.c (init_reswords): Likewise.
2988 * rtti.c (create_pseudo_type_info): Likewise.
2989 * search.c (dfs_lookup_base): Likewise.
2990 (dfs_dcast_hint_pre): Likewise.
2991 (dfs_dcast_hint_post): Likewise.
2992 * tree.c (hash_tree_cons): Likewise.
2993 * repo.c (extract_string): Likewise.
2995 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Likewise.
2996 * g++spec.c (lang_specific_driver): Likewise.
2998 2006-01-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3000 * call.c (joust): Pass option code to warning. Use inform for
3002 * class.c (check_bases): Likewise.
3003 (maybe_warn_about_overly_private_class): Likewise.
3004 (check_field_decls): Likewise.
3005 (layout_empty_base): Likewise.
3006 (layout_virtual_bases): Likewise.
3007 (layout_class_type): Likewise.
3009 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3012 * decl.c (start_preparsed_function): Call maybe_apply_pragma_weak
3014 (start_function): ... here.
3016 2006-01-28 Mark Mitchell <mark@codesourcery.com>
3019 * class.c (resolve_address_of_overloaded_function): Adjust use of
3020 return value from most_specialized_instantiation.
3021 * pt.c (determine_specialization): Avoid multiple calls to
3023 (most_specialized_instantiation): When a tie occurs, set the
3024 current presumed champion to the next template. Return the
3025 TREE_LIST node containing the template, rather than the template
3027 (most_specialized): Remove.
3028 * name-lookup.c (push_overloaded_decl): When duplicate_decls
3029 indicates a failed redeclaration, report that to callers.
3031 2006-01-26 Jason Merrill <jason@redhat.com>
3034 * name-lookup.c (parse_using_directive): Require strong using to
3035 name a nested namespace.
3037 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3040 * cp-tree.h (do_poplevel): Remove prototype.
3041 * semantics.c (do_poplevel): Add prototype. Make static.
3044 * cp-tree.h (default_conversion): Remove prototype.
3045 * typeck.c (default_conversion): Make static.
3047 2006-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3049 * cp-tree.h (get_primary_binfo): Remove prototype.
3050 (push_using_decl): Likewise.
3051 (current_template_args): Likewise.
3052 (more_specialized_class): Likewise.
3053 (mark_class_instantiated): Likewise.
3054 (default_conversion): Likewise.
3055 (pfn_from_ptrmemfunc): Likewise.
3056 * class.c (get_primary_binfo): Add prototype, make static, simplify.
3057 * name-lookup.c (push_using_decl): Make static.
3058 * pt.c (current_template_args): Likewise.
3059 (more_specialized_class): Likewise.
3060 (mark_class_instantiated): Likewise.
3061 * typeck.c (default_conversion): Make static.
3062 (pfn_from_ptrmemfunc): Add prototype, make static.
3064 2006-01-24 Dirk Mueller <dmueller@suse.de>
3066 * typeck.c (build_binary_op): Use OPT_Wfloat_equal in warning().
3068 2006-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3071 * parser.c (cp_parser_unqualified_id): Check that destructor name
3073 * call.c (check_dtor_name): Do not expect a BIT_NOT_EXPR.
3074 Adjust comment. Return early if possible.
3075 Use same_type_p to compare types.
3076 * typeck.c (lookup_destructor): Adjust call to check_dtor_name.
3078 2006-01-24 Mark Mitchell <mark@codesourcery.com>
3080 * semantics.c: Remove outdated comment.
3082 2006-01-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3084 * cp-tree.h (do_poplevel): Remove prototype.
3085 * semantics.c (do_poplevel): Add prototype. Make static.
3087 * cp-tree.h (original_type): Remove prototype.
3088 * typeck.c (original_type): Make static.
3090 * cp-tree.h (declare_global_var): Remove prototype.
3091 * decl.c (declare_global_var): Make static.
3093 * cp-tree.h (implicitly_declare_fn): Remove prototype.
3094 * method.c (implicitly_declare_fn): Make static.
3096 * cp-tree.h (fold_decl_constant_value): Remove prototype.
3097 * pt.c (fold_decl_constant_value): Make static.
3099 * cp-tree.h (build_x_delete): Remove prototype.
3100 * init.c (build_vec_delete_1): Call build_op_delete_call directly
3101 and not via build_x_delete.
3102 (build_x_delete): Remove.
3104 * cp-tree.h (get_vtt_name): Remove prototype.
3105 * class.c (get_vtt_name): Remove.
3106 (build_vtt): Call mangle_vtt_for_type instead of get_vtt_name.
3108 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3110 * rtti.c (build_dynamic_cast): Fix comment.
3112 2006-01-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
3115 * rtti.c (build_dynamic_cast): Reject dynamic_cast use if
3118 2006-01-21 Mark Mitchell <mark@codesourcery.com>
3121 * class.c (build_base_path): Generate a NOP_EXPR instead of a
3122 COMPONENT_REF if the base and derived classes are at the same
3126 * decl.c (begin_destructor_body): Robustify.
3129 * parser.c (cp_parser_direct_declarator): Robustify.
3131 2006-01-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3133 * parser.c (cp_lexer_next_token_is_keyword): Simplify.
3135 * parser.c (clear_decl_specs): Remove prototype.
3137 * parser.c (cp_parser_expression_fn): Remove.
3139 * call.c (add_builtin_candidates): Remove superfluous return.
3140 * name-lookup.c (do_toplevel_using_decl): Likewise.
3141 * parser.c (cp_parser_type_specifier_seq): Likewise.
3142 (cp_parser_save_default_args): Likewise.
3144 2006-01-20 Dirk Mueller <dmueller@suse.com>
3147 * semantics.c (finish_if_stmt): Call empty_body_warning.
3148 * parser.c (cp_parser_implicitly_scoped_statement):
3149 Mark empty statement with an empty stmt.
3151 2006-01-19 Mark Mitchell <mark@codesourcery.com>
3154 * name-lookup.c (do_class_using_decl): Don't try to look up base
3155 classes in templates with dependent base types.
3157 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3160 * pt.c (maybe_process_partial_specialization): Return early on
3163 2006-01-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3166 * decl.c (start_preparsed_function): Check default arguments
3168 * name-lookup.c (pushdecl_maybe_friend): Check default arguments
3169 of all functions and function templates.
3170 * parser.c (cp_parser_late_parsing_default_args): Check default
3172 * decl2.c (check_default_args): Set missing default arguments to
3175 2006-01-18 Mark Mitchell <mark@codesourcery.com>
3178 * cp-tree.h (push_class_stack): New function.
3179 (pop_class_stack): Likewise.
3180 * class.c (class_stack_node): Add hidden field.
3181 (pushclass): Clear it.
3182 (push_class_stack): New function.
3183 (pop_class_stack): Likewise.
3184 (currently_open_class): Ignore hidden classes.
3185 (currently_open_derived_class): Likewise.
3186 * name-lookup.c (push_to_top_level): Call push_class_stack.
3187 (pop_from_top_level): Call pop_class_stack.
3189 2006-01-18 Kazu Hirata <kazu@codesourcery.com>
3191 * tree.c (find_tree_t, find_tree): Remove.
3192 * cp-tree.h: Remove the prototype for find_tree.
3194 2006-01-18 Jakub Jelinek <jakub@redhat.com>
3196 * search.c (lookup_conversions_r): Fix a pasto.
3198 2006-01-17 Eric Christopher <echristo@apple.com>
3200 * call.c (convert_like_real): When issuing conversion
3201 warnings, depend on OPT_Wconversion.
3202 * cvt.c (build_expr_type_conversion): Ditto.
3204 2006-01-17 Kazu Hirata <kazu@codesourcery.com>
3206 * name-lookup.c (lookup_namespace_name): Remove.
3207 * name-lookup.h: Remove the prototype for
3208 lookup_namespace_name.
3210 2006-01-17 Jakub Jelinek <jakub@redhat.com>
3213 * decl.c (compute_array_index_type): After issuing not an integral
3214 constant-expression error, set size to 1 to avoid ICEs later on.
3216 2006-01-16 Ian Lance Taylor <ian@airs.com>
3218 * parser.c: Include "cgraph.h".
3219 (cp_parser_asm_definition): Call cgraph_add_asm_node rather than
3222 2006-01-16 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3224 * g++spec.c (lang_specific_spec_functions): Remove.
3226 2006-01-15 Gabriel Dos Reis <gdr@integrable-solutions.net>
3228 * decl.c (check_initializer): Fix thinko.
3230 2006-01-14 Mark Mitchell <mark@codesourcery.com>
3233 * parser.c (cp_parser_direct_declarator): Use cp_parser_error
3236 2006-01-13 Jason Merrill <jason@redhat.com>
3238 * pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.
3240 * name-lookup.c (set_decl_namespace): Use CP_DECL_CONTEXT.
3241 * pt.c (check_explicit_specialization): Likewise.
3243 2006-01-12 Jason Merrill <jason@redhat.com>
3246 * pt.c (check_explicit_specialization): Handle namespace
3248 * name-lookup.c (set_decl_namespace): Likewise.
3250 2006-01-12 Nathan Sidwell <nathan@codesourcery.com>
3253 * class.c (handle_using_decl): Pass correct scope to
3254 cp_emit_debug_info_for_using.
3256 2006-01-11 Nathan Sidwell <nathan@codesourcery.com>
3259 * tree.c (lvalue_p_1): Any part of a COMPONENT_REF affects
3262 2006-01-06 Gabriel Dos Reis <gdr@integrablesolutions.net>
3264 * parser.c (cp_parser_primary_expression): Document the grammar
3265 for the built-in offsetof, a GNU extension.
3267 2006-01-04 Zdenek Dvorak <dvorakz@suse.cz>
3270 * init.c (constant_value_1): Unshare use of DECL_INITIAL. Fix a typo
3273 2006-01-04 Chris Lattner <sabre@gnu.org>
3275 * typeck2.c: update copyright to 2006
3276 (split_nonconstant_init_1): Set TREE_CONSTANT to true.
3278 2006-01-04 Mark Mitchell <mark@codesourcery.com>
3281 * parser.c (cp_parser_nested_name_specifier_opt): Preserve access
3282 checks, even when parsing tentatively.
3284 2006-01-04 Richard Henderson <rth@redhat.com>
3286 Merge from gomp branch.
3287 * lex.c (handle_pragma_java_exceptions): Fix whitespace.
3288 * parser.c (struct cp_token): Add pragma_kind.
3289 (eof_token): Update to match.
3290 (struct cp_lexer): Add in_pragma; rearrange next for better packing.
3291 (cp_parser_initial_pragma): New.
3292 (cp_lexer_new_main): Use it. Don't bother clearing
3293 c_lex_return_raw_strings.
3294 (cp_lexer_get_preprocessor_token): Always initialize keyword
3295 and pragma_kind fields. Handle CPP_PRAGMA.
3296 (cp_lexer_consume_token): Don't allow CPP_PRAGMA_EOL when
3298 (cp_lexer_handle_pragma): Remove. Update callers to cp_parser_pragma.
3299 (cp_lexer_print_token) <CPP_PRAGMA>: Don't print as a string.
3300 (cp_parser_skip_to_pragma_eol): New.
3301 (cp_parser_error): Use it.
3302 (cp_parser_skip_to_closing_parenthesis): Stop at CPP_PRAGMA_EOL;
3303 rearrange with switch statement.
3304 (cp_parser_skip_to_end_of_statement): Likewise.
3305 (cp_parser_skip_to_end_of_block_or_statement): Likewise.
3306 (cp_parser_skip_to_closing_brace): Likewise.
3307 (cp_parser_skip_until_found): Likewise.
3308 (cp_parser_statement): Add in_compound argument; update callers.
3309 Use it to decide how to handle pragma parsing.
3310 (cp_parser_labeled_statement): Add in_compound argument; pass
3311 it on to cp_parser_statement.
3312 (cp_parser_statement_seq_opt): Stop at CPP_PRAGMA_EOL.
3313 (cp_parser_declaration_seq_opt): Likewise.
3314 (cp_parser_parameter_declaration): Likewise.
3315 (cp_parser_member_specification_opt): Likewise.
3316 (cp_parser_function_definition_after_decl): Likewise.
3317 (cp_parser_cache_group): Handle CPP_PRAGMA/CPP_PRAGMA_EOL pairs.
3318 (cp_parser_pragma): New.
3321 2006-01-04 Dirk Mueller <dmueller@suse.com>
3323 * decl.c (finish_constructor_body): create simple
3324 compound stmt instead of a if(1) { } construct.
3326 2006-01-03 Mark Mitchell <mark@codesourcery.com>
3329 * name-lookup.c (push_class_level_binding): When a derived class
3330 provides a type binding, eliminate any type binding from a base
3334 * repo.c (repo_emit_p): Always instantiate static data members
3335 initialized by constant expressions, so that there values are
3338 2006-01-02 Mark Mitchell <mark@codesourcery.com>
3341 * class.c (add_method): Set TYPE_HAS_CONVERSION for classes with a
3342 conversion operator.
3343 * decl.c (grokdeclarator): Do not set TYPE_HAS_CONVERSION here.
3346 * class.c (add_method): Never associate more than one destructor
3347 with a single class.
3350 * cp-tree.h (do_friend): Adjust prototype.
3351 * decl.c (grokfndecl): Make funcdef_flag a bool, not an int.
3352 (grokdeclarator): Likewise. Refine check for invalid
3353 declarations/definitions of member functions outside of their own
3355 * friend.c (do_friend): Make funcdef_flag a bool, not an int.
3358 * parser.c (cp_parser_mem_initializer_list): Check result of
3359 cp_parser_mem_initializer against error_mark_node, not NULL_TREE.
3360 (cp_parser_mem_initializer): Return error_mark_node for failure.
3363 * parser.c (cp_parser_template_parameter_list): Call
3364 begin_template_parm_list and end_template_parm_list here.
3365 (cp_parser_type_parameter): Not here.
3366 (cp_parser_template_declaration_after_export): Or here.
3367 (cp_parser_elaborated_type_specifier): Call
3368 cp_parser_check_template_parameters.
3370 * tree.c (build_target_expr_with_type): Use force_target_expr.
3372 * decl2.c (mark_used): Fix typo in comment.
3374 2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3376 * parser.c (cp_parser_using_declaration): Skip name-lookup on
3379 2005-12-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
3381 * cxx-pretty-print.c (pp_cxx_constant): New. Print
3382 string-literal in parens if input program says so.
3383 (pp_cxx_primary_expression): Hand off constant printing to
3385 (pp_cxx_pretty_printer_init): Set pp->c_base.constant.
3386 (pp_cxx_expression): Use pp_cxx_constant for literals.
3387 * error.c (dump_expr): Use pp_constant for literals.
3389 2005-12-29 Nathan Sidwell <nathan@codesourcery.com>
3391 * method.c (make_thunk): Don't set comdat_linkage here.
3392 (use_thunk): Make thunk one only here, if thunk target is
3395 2005-12-26 Mark Mitchell <mark@codesourcery.com>
3398 * decl.c (grokdeclarator): Remove dead code.
3399 * ptree.c (cxx_print_xnode): Handle BASELINK.
3400 * parser.c (make_id_declarator): Add sfk parameter.
3401 (cp_parser_direct_declarator): Do not pass TYPE_DECLs to
3403 (cp_parser_declarator_id): Simplify BASELINKs here.
3404 (cp_parser_member_declaration): Adjust calls to
3407 2005-12-26 Mark Mitchell <mark@codesourcery.com>
3409 PR c++/23171, c++/23172, c++/25417.
3410 * typeck.c (build_unary_op): Create temporary variables for
3411 compound literals whose addresses are taken.
3412 * init.c (expand_aggr_init_1): Use COMPOUND_LITERAL_P.
3413 * decl.c (reshape_init_vector): Likewise.
3414 (reshape_init): Give it external linkage.
3415 (check_initializer): Use COMPOUND_LITERAL_P.
3416 (initialize_artificial_var): Allow the initializer to be a
3418 * call.c (make_temporary_var_for_ref_to_temp): Use
3419 create_temporary_var.
3420 * cp-tree.h (COMPOUND_LITERAL_P): New macro.
3421 (rehape_init): Declare.
3422 * typeck2.c (digest_init): Use COMPOUND_LITERAL_P.
3423 * semantics.c (finish_compound_literal): Use reshape_init.
3425 2005-12-23 Mark Mitchell <mark@codesourcery.com>
3428 * pt.c (instantiate_template): Handle SFINAE.
3430 2005-12-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3432 * decl.c (grokdeclarator): Improve diagnostic for friend
3433 declarations of class members.
3435 2005-12-22 Mark Mitchell <mark@codesourcery.com>
3438 * tree.c (really_overloaded_fn): Tweak comment.
3439 * pt.c (tsubst_call_declarator_parms): Remove.
3440 (tsubst_copy): Call mark_used on the member referenced by an
3442 * semantics.c (finish_qualified_id_expr): Simplify.
3443 * decl2.c (mark_used): Accept BASELINKs.
3446 * typeck.c (build_unary_op): Pass DECLs not names to
3448 * init.c (build_offset_ref): Do not do name lookup. Do not call
3450 * call.c (build_call): Simplify and tidy.
3451 * semantics.c (finish_qualified_id_expr): Call mark_used.
3453 2005-12-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3456 * parser.c (cp_parser_pure_specifier): Check for PURE_ZERO to
3457 identify a single '0'.
3459 2005-12-20 Mark Mitchell <mark@codesourcery.com>
3462 * decl.c (use_eh_spec_block): New function.
3463 (store_parm_decls): Use it.
3464 (finish_function): Likewise.
3466 2005-12-19 Mark Mitchell <mark@codesourcery.com>
3469 * init.c (expand_member_init): Print messages about baseclasses
3470 using %T rather than %D.
3473 * class.c (add_method): Do not treat templates as identical unless
3474 their return types are the same.
3476 2005-12-12 Mark Mitchell <mark@codesourcery.com>
3479 * tree.c (build_qualified_name): Return error_mark_node for
3482 2005-12-10 Mark Mitchell <mark@codesourcery.com>
3485 * pt.c (tsubst_copy_and_build): Permit dependent types for the
3486 object in a class member access expression.
3488 2005-12-10 Terry Laurenzo <tlaurenzo@gmail.com>
3491 * mangle.c (write_bare_function_type): Mangle return type for
3492 methods of Java classes
3494 2005-12-08 Th�dore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3496 * call.c (build_conditional_expr): Print types in error messages.
3498 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3500 * expr.c (cxx_expand_expr): Call gcc_unreachable instead of abort.
3502 2005-12-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3504 * cp-gimplify.c (gimplify_cp_loop): Use fold_build3.
3506 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3508 * Make-lang.in (c++.all.build, c++.install-normal): Remove.
3510 2005-12-07 Rafael �ila de Esp�dola <rafael.espindola@gmail.com>
3512 * Make-lang.in: Remove all dependencies on s-gtype.
3514 2005-12-06 Aldy Hernandez <aldyh@redhat.com>
3517 * decl.c (reshape_init_array_1): Handle max_index of -1.
3519 2005-12-06 Roger Sayle <roger@eyesopen.com>
3521 * typeck.c (build_binary_op): Issue warning if either operand of a
3522 comparison operator is a string literal, except for testing equality
3523 or inequality against NULL.
3525 2005-12-06 Roger Sayle <roger@eyesopen.com>
3528 * decl.c (compute_array_index_type): Check that itype is an
3529 INTEGER_CST node before testing/clearing TREE_OVERFLOW.
3531 2005-12-05 Daniel Berlin <dberlin@dberlin.org>
3533 * ptree.c (cxx_print_decl): Update to check for decl_common
3536 2005-12-02 Mark Mitchell <mark@codesourcery.com>
3539 * decl.c (duplicate_decls): Don't rely on DECL_TEMPLATE_INFO after
3542 2005-12-02 Richard Guenther <rguenther@suse.de>
3544 * semantics.c (simplify_aggr_init_expr): Use buildN instead
3547 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3549 * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of
3551 (cp_parser_template_argument_list): Use XRESIZEVEC instead of
3553 * class.c (pushclass): Likewise.
3555 2005-12-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
3557 * decl2.c (get_priority_info): Use XNEW, not xmalloc.
3558 * decl.c (push_switch): Likewise.
3559 * lex.c (handle_pragma_implementation): Likewise.
3560 * cp-objcp-common.c (decl_shadowed_for_var_insert): Use GGC_NEW,
3562 (cxx_initialize_diagnostics): Use XNEW, not xmalloc.
3563 * class.c (init_class_processing): Use XNEWVEC, not xmalloc.
3564 * g++spec.c (lang_specific_driver): Likewise.
3565 * mangle.c (save_partially_mangled_name): Likewise.
3566 * parser.c (cp_lexer_new_main): Use GGC_NEWVEC, not ggc_alloc.
3567 (cp_parser_template_argument_list): Use XNEWVEC, nto xmalloc.
3568 (cp_parser_sizeof_operand): Likewise.
3569 * repo.c (open_repo_file, open_repo_file): Likewise.
3571 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3573 * parser.c (cp_parser_make_typename_type): Call make_typename_type
3574 with tf_none instead of magic value 0.
3575 (cp_parser_explicit_instantiation): Call do_type_instantiation
3576 with tf_error instead of magic value 1.
3577 (cp_parser_elaborated_type_specifier): Call make_typename_type
3578 with tf_error instead of magic value 1.
3579 (cp_parser_class_name): Likewise.
3580 (cp_parser_lookup_name): Likewise.
3582 2005-12-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
3584 * parser.c (cp_parser_declaration): Set token2.type to CPP_EOF,
3587 2005-11-30 Jason Merrill <jason@redhat.com>
3590 * cp-gimplify.c (cp_genericize_r): Don't dereference invisible reference
3593 2005-11-30 Ben Elliston <bje@au.ibm.com>
3595 * typeck.c (build_x_unary_op): Correct spelling in error message.
3597 2005-11-28 Nathan Sidwell <nathan@codesourcery.com>
3600 * class.c (check_field_decls): Only set DECL_PACKED on a field
3601 when its natural alignment is > BITS_PER_UNIT.
3603 2005-11-27 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3606 * cp-tree.h (DECL_MAIN_P): Remove duplicate definition.
3608 2005-11-26 Richard Henderson <rth@redhat.com>
3610 * lex.c: Update for pragma_lex rename.
3611 * parser.c: Likewise.
3613 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3616 * decl.c (grokparms): Do not allow typedef-names in a '(void)'
3619 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3621 * typeck2.c (process_init_constructor_union): Remove check for
3622 unnamed union members.
3624 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3626 * name-lookup.c (lookup_name_real): Merge two if's.
3628 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3630 * pt.c (instantiate_class_template): Clean-up.
3632 2005-11-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3634 * pt.c (template_class_depth_real): Remove. Move functionality to ...
3635 (template_class_depth): ... here, replacing count_specializations
3636 with 0. Adjust comment.
3638 2005-11-24 Richard Guenther <rguenther@suse.de>
3639 Dirk Mueller <dmueller@suse.de>
3642 * typeck.c (build_reinterpret_cast_1): Use
3643 strict_aliasing_warning.
3645 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3648 * pt.c (check_instantiated_args): Reword diagnostic message about
3649 template argument involving local types.
3651 2005-11-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
3654 * typeck.c (build_array_ref): Avoid code duplicate. Use common
3655 C/C++ diagnostic function warn_array_subscript_with_type_char.
3657 2005-11-21 Gabriel Dos Reis <gdr@integrable-solutions.net>
3660 * error.c (resolve_virtual_fun_from_obj_type_ref): New.
3661 (dump_expr): Use it in <case CALL_EXPR>.
3663 2005-11-21 Richard Henderson <rth@redhat.com>
3665 * cp-objcp-common.h, name-lookup.c, name-lookup.h: Revert 11-18 patch.
3667 * name-lookup.c (lookup_name): Remove prefer_type argument.
3668 (lookup_name_prefer_type): New.
3669 * decl.c (lookup_and_check_tag): Use them.
3670 * pt.c (tsubst_friend_class): Likewise.
3671 (lookup_template_class): Likewise.
3672 (tsubst_copy_and_build): Likewise.
3673 * name-lookup.h (lookup_name_prefer_type): New.
3674 (lookup_name): Remove declaration.
3676 2005-11-18 Mark Mitchell <mark@codesourcery.com>
3679 * decl.c (grokfndecl): Set up DECL_TEMPLATE_INFO before calling
3681 * name-lookup.c (set_decl_namespace):
3683 2005-11-18 Mike Stump <mrs@apple.com>
3685 * cp-objcp-common.h (LANG_HOOKS_LOOKUP_NAME): Add.
3686 * name-lookup.c (lookup_name_two): Remove.
3687 (lookup_name_one): Add.
3688 * name-lookup.h (lookup_name_two): Remove.
3689 (lookup_name_one): Add.
3691 2005-11-15 Jason Merrill <jason@redhat.com>
3694 * method.c (locate_copy): Also use skip_artificial_parms here.
3695 (synthesize_exception_spec): Use CLASS_TYPE_P rather than checking
3697 (locate_ctor): Abort if we fail to find a default constructor.
3699 2005-11-15 Mike Stump <mrs@apple.com>
3701 * name-lookup.c (lookup_name_two): Add.
3702 * name-lookup.h: Likewise.
3704 2005-11-15 Mark Mitchell <mark@codesourcery.com>
3707 * typeck.c (check_for_casting_away_constness): Use the diag_fn.
3708 (build_const_cast_1): Call it, for C-style casts.
3710 2005-11-14 Mark Mitchell <mark@codesourcery.com>
3713 * pt.c (check_explicit_specialization): Don't check for C linkage.
3714 (push_template_decl_real): Likewise.
3715 * parser.c (cp_parser_explicit_specialization): Check here.
3716 (cp_parser_template_declaration_after_export): And here.
3718 * parser.c (cp_lexer_get_preprocessor_token): Initialize keyword
3721 2005-11-14 Jason Merrill <jason@redhat.com>
3724 * method.c (locate_ctor): Skip all artificial parms, not just
3727 2005-11-14 Mark Mitchell <mark@codesourcery.com>
3729 * parser.c (eof_token): Add initializer for ambiguous_p.
3731 2005-11-13 Mark Mitchell <mark@codesourcery.com>
3734 * decl.c (check_redeclaration_exception_specification): New
3736 (duplicate_decls): Use it.
3737 * error.c (fndecl_to_string): Print the template parameter list.
3740 * cxx-pretty-print.c (pp_cxx_statement): Print qualifying scopes
3742 (pp_cxx_original_namespace_definition): Likewise.
3743 * name-lookup.c (ambiguous_decl): Don't issue error messages;
3744 instead return lists of ambiguous candidates.
3745 (select_decl): Handle ambiguous namespace lookups.
3746 * parser.c (cp_token): Add ambiguous_p.
3747 (cp_lexer_get_preprocessor_token): Set it.
3748 (cp_parser_diagnose_invalid_type_name): Avoid duplicate messages
3749 when a qualified name uses an invalid scope.
3750 (cp_parser_primary_expression): Print ambiguous candidates.
3751 (cp_parser_type_parameter): Adjust comment to reflect new
3752 parameter name for cp_parser_lookup_name.
3753 (cp_parser_template_argument): Likewise.
3754 (cp_parser_elaborated_type_specifier): Likewise.
3755 (cp_parser_namespace_name): Likewise.
3756 (cp_parser_class_name): Print ambiguous candidates.
3757 (cp_parser_lookup_name): Rename ambiguous_p parameter to
3758 ambiguous_decls. Use it to return a list of ambiguous candiates
3759 when a lookup is ambiguous.
3760 (cp_parser_lookup_name_simple): Adjust comment to reflect new
3761 parameter name for cp_parser_lookup_name.
3763 2005-11-12 Jakub Jelinek <jakub@redhat.com>
3766 * typeck.c (complete_type): Set TYPE_NEEDS_CONSTRUCTING
3767 and TYPE_HAS_NONTRIVIAL_DESTRUCTOR flags for all variants
3771 * pt.c (tsubst_copy_asm_operands): New function.
3772 (tsubst_expr) <case ASM_EXPR>: Use it.
3774 2005-11-08 Jakub Jelinek <jakub@redhat.com>
3777 * decl.c (redeclaration_error_message): Issue diagnostics about
3778 olddecl and newdecl disagreement on __thread property.
3779 (grokdeclarator): Set DECL_TLS_MODEL on class static variables.
3781 2005-11-08 Jason Merrill <jason@redhat.com>
3784 * method.c (use_thunk): Use build_cplus_new instead of
3787 2005-11-06 Jason Merrill <jason@redhat.com>
3788 James A. Morrison <phython@gcc.gnu.org>
3791 * decl2.c (cp_finish_file): Fix conditions for undefined warning.
3792 Set TREE_NO_WARNING instead of TREE_PUBLIC.
3793 * pt.c (instantiate_pending_templates): Set DECL_INITIAL to avoid
3794 a warning on a function we didn't instantiate because of excessive
3797 2005-11-06 Mark Mitchell <mark@codesourcery.com>
3799 * class.c (record_subobject_offsets): Don't record offsets past
3800 biggest empty class for non-empty base classes.
3801 (layout_class_type): Use TYPE_SIZE_UNIT, not TYPE_SIZE, when
3802 keeping track of the size of emptyclasses.
3805 * class.c (sizeof_biggest_empty_class): New variable.
3806 (record_subobject_offsets): Don't record offsets past biggest
3807 empty class for data members. Replace vbases_p parameter with
3808 is_data_member parameter.
3809 (build_base_field): Adjust call.
3810 (layout_class_type): Likewise. Maintain
3811 sizeof_biggest_empty_class.
3813 2005-11-05 Kazu Hirata <kazu@codesourcery.com>
3815 * decl2.c, init.c, typeck.c: Fix comment typos.
3817 2005-11-04 Richard Guenther <rguenther@suse.de>
3820 * init.c (build_vec_init): Build comparison of matching
3823 2005-11-03 Josh Conner <jconner@apple.com>
3826 pt.c (tsubst): Accept zero-length array if tf_error is set
3827 in complain flags. Change error message for negative-
3830 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
3832 * cp-tree.h (cp_cpp_error), error.c (cp_cpp_error): Take va_list*
3835 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
3838 * error.c (cp_cpp_error): New function.
3839 * cp-tree.h (cp_cpp_error): Declare.
3840 * parser.c (cp_lexer_new_main): Set CPP option client_diagnostic
3841 and error callback after lexing.
3843 2005-11-03 Mark Mitchell <mark@codesourcery.com>
3846 * pt.c (register_specialization): Update inline flags on clones.y
3848 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
3851 * decl.c (declare_local_label): Return 0 for variables
3852 with error_mark_node as their types.
3854 2005-11-02 Mark Mitchell <mark@codesourcery.com>
3857 * call.c (build_conditional_expr): Do bad conversions, if there's
3861 * parser.c (cp_parser_postfix_dot_deref_expression): Improve error
3862 message for use of overloaded functions on LHS of "." operator.
3865 * parser.c (cp_parser_postfix_expression): Use
3866 cp_parser_elaborated_type_specifier to handle typename-types in
3868 (cp_parser_enclosed_argument_list): Skip ahead to the end of the
3869 template argument list if the closing ">" is not found.
3872 * pt.c (instantiate_decl): Use cp_finish_decl, not
3873 finish_static_data_member_decl.
3875 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3877 * decl.c (grokfndecl): Remove the setting
3878 of the return type of the function type
3879 of main after erroring about must returning
3882 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3885 * decl.c (grokfndecl): Create a new function type
3886 after erroring out about main not returning int.
3888 2005-10-28 Josh Conner <jconner@apple.com>
3891 * parser.c (cp_parser_member_declaration): Detect and handle
3892 a template specialization.
3894 2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
3897 * decl.c (start_decl): Check that the decl is an
3898 error_mark_node before getting the type.
3899 Remove the check for the decl's type being an
3902 2005-10-21 Mark Mitchell <mark@codesourcery.com>
3905 * parser.c (cp_parser_init_declarator): Pass attributes to
3908 2005-10-20 Mark Mitchell <mark@codesourcery.com>
3911 * search.c (accessible_p): Check access in the outermost set of
3912 template parameters.
3914 2005-10-20 Richard Guenther <rguenther@suse.de>
3916 * decl.c (grokdeclarator): Fix ambiguous pedwarn message.
3918 2005-10-18 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3921 * decl.c (grokdeclarator): Reject unqualified destructors in
3922 friend declarations.
3924 2005-10-18 Mark Mitchell <mark@codesourcery.com>
3927 * pt.c (convert_template_argument): Use canonical type variants in
3928 template specializations.
3930 2005-10-18 Nathan Sidwell <nathan@codesourcery.com>
3933 * name-lookup.c (arg_assoc): Template args can be null in a
3937 * class.c (update_vtable_entry_for_fn): Don't process invalid
3938 covariant overriders.
3941 * cp-tree.h (add_method): Add return value.
3942 * class.c (add_method): Return success indicator.
3943 * semantics.c (finish_member_declaration): Don't add an invalid
3944 method to the method list.
3946 2005-10-17 Mark Mitchell <mark@codesourcery.com>
3949 * call.c (build_new_method_call): Do not show VTT parameters to
3952 2005-10-17 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
3955 * parser.c (cp_parser_statement): If the parser reached CPP_EOF,
3956 only complain about missing statement.
3958 2005-10-17 Nathan Sidwell <nathan@codesourcery.com>
3961 * cp-tree.h (BASELINK_QUALIFIED_P): New.
3962 * pt.c (tsubst_copy_and_build): <CALL_EXPR case>: Use it.
3963 * typeck.c (finish_class_member_access_expr): Set it.
3966 * decl.c (check_default_argument): Don't check
3967 processing_template_decl or uses_template_parms here.
3968 (grokparms): Only call check_default_argument when not processing
3970 * parser.c (cp_parser_late_parsing_default_arg): Call
3971 check_default_argument when not processing a template decl.
3973 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3976 * decl2.c (mark_used): Use uses_template_parms instead of
3978 * init.c (constant_value_1): Handle uninstantiated templates
3980 * pt.c (instantiate_decl): Add sanity check.
3982 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3985 * typeck.c (check_template_keyword): Fix thinko.
3987 2005-10-16 Andrew Pinski <pinskia@physics.uc.edu>
3990 * decl.c (pop_switch): Only call c_do_switch_warnings
3991 when not processing templates.
3993 2005-10-16 Mark Mitchell <mark@codesourcery.com>
3996 * cp-tree.h (QUALIFIED_NAME_IS_TEMPLATE): New macro.
3997 (check_template_keyword): New function.
3998 (finish_id_expression): Change prototoype.
3999 (finish_qualified_id_expr): Change prototype.
4000 (build_qualified_name): New function.
4001 (finish_class_member_access_expr): Change prototype.
4002 * init.c (build_offset_ref): Use build_qualified_name.
4003 * mangle.c (write_expression): Likewise.
4004 * parser.c (cp_parser_primary_expression): Remove qualifying_class
4005 parameter. Add address_p and template_arg_p. Use
4006 build_qualified_name.
4007 (cp_parser_id_expression): Default *template_p to
4008 template_keyword_p. Check for invalid uses of the template
4010 (cp_parser_postfix_expression): Eliminate special handling for
4011 qualified names. Adjust call to cp_parser_primary_expression.
4012 (cp_parser_postfix_dot_deref_expression): Adjust call to
4013 cp_parser_id_expression and finish_class_member_access_expr.
4014 (cp_parser_template_argument_list): Add comment.
4015 (cp_parser_template_argument): Adjust use of
4016 cp_parser_primary_expression. Remove call to
4017 finish_qualified_id_expr.
4018 (cp_parser_lookup_name): Use build_qualified_name.
4019 * pt.c (tsubst): Use build_qualified_name.
4020 (tsubst_qualified_id): Likewise. Adjust call to
4021 finish_qualified_id_expr.
4022 (tsubst_copy): Use build_qualified_name.
4023 (tsubst_copy_and_build): Adjusts call to finish_id_expression and
4024 finish_class_member_access_expr.
4025 * semantics.c (finish_non_static_data_member): Use
4026 build_qualified_name.
4027 (finish_qualified_id_expr): Add template_p and template_arg_p
4029 (finish_id_expression): Remove qualifiying_class parameter. Add
4030 template_p, done, address_p, and template_arg_p. Use
4031 build_qualified_name. Adjust calls to
4032 finish_class_member_acess_expr.
4033 * tree.c (build_qualified_name): New function.
4034 * typeck.c (check_template_keyword): New function.
4035 (finish_class_member_access_expr): Add template_p argument. Check
4036 for invalid uses of the template keyword.
4038 2005-10-15 Mark Mitchell <mark@codesourcery.com>
4041 * class.c (maybe_warn_about_overly_private_class): Lazy
4042 constructors are public.
4044 2005-10-14 Mark Mitchell <mark@codesourcery.com>
4047 * call.c (convert_like_real): Rely on convert_and_check to issue
4048 warnings about overflow and conversion to unsigned.
4049 * decl.c (finish_enum): Use the location of the enumerators, not
4050 the closing brace of the enumeration, when reporting warnings
4052 (build_enumerator): Use error_mark_node for erroneous values.
4053 * typeck2.c (digest_init): Remove reference to "signature pointer"
4056 2005-10-14 Nathan Sidwell <nathan@codesourcery.com>
4059 * optimize.c (update_cloned_parm): Add FIRST parameter. Use it.
4060 (maybe_clone_body): Track the first clone.
4062 2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
4065 * class.c (build_base_path): The vtable is always the first thing
4068 2005-10-13 Mark Mitchell <mark@codesourcery.com>
4071 * cp-tree.h (DECL_NONTRIVIALLY_INITIALIZED_P): New macro.
4072 * decl.c (duplicate_decls): Merge it into new declarations.
4073 (decl_jump_unsafe): Use it, rather than DECL_INITIAL.
4074 (cp_finish_decl): Set it, when appropriate.
4077 * call.c (build_new_method_call): Correct pretty-printing of
4079 * pt.c (tsubst_qualified_id): Recognize invalid uses of "~T" as an
4083 * decl.c (start_method): Return error_mark_node for errors.
4086 * pt.c (push_template_decl_real): Complain about attempts to
4087 declare template variables.
4090 * pt.c (tsubst_template_parms): Set processing_template_decl while
4091 processing the parameters.
4092 (tsubst_decl): Set processing_template_decl when substituting into
4096 * pt.c (most_specialized_instantiation): Robustify.
4099 * semantics.c (finish_id_expression): Issue errors about uses of
4100 local variables in containing functions even in templates.
4102 2005-10-12 Danny Smith <dannysmith@users.sourceforge.net>
4106 * class.c (finish_struct_1): Call
4107 targetm.cxx.adjust_class_at_definition.
4110 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
4113 * pt.c (build_non_dependent_expr): Don't wrap a COMPONENT_REF
4114 with already looked up member functions. Assert we're not
4115 returning a NON_DEPENDENT_EXPR with unknown type.
4116 * typeck.c (finish_class_member_access_expr): We can get
4117 non-template-id-expr baselinks. If the lookup finds a baselink,
4118 remember it even inside templates.
4121 * parser.c (cp_parser_functional_cast): Cope when TYPE is not a
4122 TYPE_DECL. Use dependent_type_p to check type.
4123 * pt.c (uses_template_parms_p): Use dependent_type_p for a
4125 (type_dependent_expression_p): Assert we've not been given a
4129 * decl.c (check_function_type): Correctly overwrite incomplete
4130 return type with void type.
4131 * typeck.c (check_return_expr): If the function's return type is
4132 void, don't try and convert a return expr.
4134 2005-10-12 David Edelsohn <edelsohn@gnu.org>
4137 * call.c (build_object_call): If BINFO is NULL, bypass
4138 lookup_fnfields and set fns to NULL_TREE.
4140 2005-10-12 Paolo Bonzini <bonzini@gnu.org>
4143 * error.c (dump_expr): Pass LABEL_DECL to dump_decl. Print
4144 an ADDR_EXPR of a LABEL_DECL as &&.
4146 2005-10-12 Nathan Sidwell <nathan@codesourcery.com>
4149 * class.c (walk_subobject_offsets): Don't walk error_mark_node.
4151 2005-10-11 Ian Lance Taylor <ian@airs.com>
4154 * cvt.c (convert_to_void): Don't warn about unused values when
4155 processing a template declaration.
4157 2005-10-11 Mark Mitchell <mark@codesourcery.com>
4160 * call.c (convert_like_real): Use decl_constant_value, not
4161 integral_constant_value.
4162 * init.c (constant_value_1): New function.
4163 (integral_constant_value): Use it.
4164 (decl_constant_value): Likewise.
4165 * typeck.c (decay_conversion): Use decl_constant_value, not
4166 integral_constant_value.
4169 * parser.c (cp_parser_elaborated_type_specifier): Don't treat
4170 class types as templates if the type is not appearing as part of a
4171 type definition or declaration.
4173 2005-10-10 Mark Mitchell <mark@codesourcery.com>
4176 * pt.c (instantiate_decl): Call finish_static_data_member_decl for
4177 static data members.
4179 2005-10-10 Giovanni Bajo <giovannibajo@gcc.gnu.org>
4180 Mark Mitchell <mark@codesourcery.com>
4183 * parser.c (cp_parser_template_argument_list): Do not treat
4184 contents of argument list as part of a constant expression.
4186 2005-10-10 Mark Mitchell <mark@codesourcery.com>
4189 * decl.c (grokdeclarator): Do not require template parameter lists
4190 for explicitly specialized class.
4191 * error.c (dump_aggr_type): Do not dump template arguments for
4192 non-primary specializations.
4193 (dump_function_name): Likewise.
4196 * pt.c (instantiate_decl): Instantiate the initializer of
4197 a static data member in the namespace containing the class
4198 containing the static data member.
4200 2005-10-08 James A. Morrison <phython@gcc.gnu.org>
4203 * parser.c (cp_parser_postfix_expression) <RID_TYPENAME>: Treat nontype
4204 scopes as nondependent.
4206 2005-10-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4208 * call.c (resolve_args): Remove redundant test.
4210 2005-10-05 Paolo Bonzini <bonzini@gnu.org>
4212 PR tree-optimization/21419
4213 PR tree-optimization/24146
4214 PR tree-optimization/24151
4216 * semantics.c (finish_asm_stmt): Call readonly_error if outputs are
4217 read-only. Set ASM_VOLATILE_P for asms without outputs.
4219 2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
4222 * call.c (joust): Adjust length count to more_specialized_fn.
4223 * pt.c (more_specialized_fn): Cope with non-static member vs
4226 2005-10-04 Andrew Pinski <pinskia@physics.uc.edu>
4229 * decl.c (make_rtl_for_nonlocal_decl): Use set_user_assembler_name
4230 instead of change_decl_assembler_name.
4232 2005-10-03 Alexandre Oliva <aoliva@redhat.com>
4234 * error.c (dump_type) <UNKNOWN_TYPE>: Print reworded message.
4236 2005-10-03 Mark Mitchell <mark@codesourcery.com>
4239 * repo.c: Include flags.h.
4240 (finish_repo): Add -frandom-seed to the arguments.
4242 2005-10-02 Mark Mitchell <mark@codesourcery.com>
4245 * parser.c (cp_parser_template_argument): Don't turn "T::f" into
4247 * pt.c (convert_nontype_argument): Remove ??? comment.
4250 * tree.c (lvalue_p_1): A VA_ARG_EXPR with class type is an lvalue,
4251 when class rvalues are lvalues.
4253 2005-09-28 Mark Mitchell <mark@codesourcery.com>
4256 * decl.c (grokdeclarator): Always pedwarn about overqualified
4259 2005-09-27 Mark Mitchell <mark@codesourcery.com>
4262 * name-lookup.c (maybe_process_template_type_declaration): Don't
4263 treat forward declarations of classes as templates just because
4264 we're processing_template_decl.
4265 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INFO for friend
4268 2005-09-26 Jason Merrill <jason@redhat.com>
4271 * cp-tree.h (FUNCTION_NEEDS_BODY_BLOCK): New macro.
4272 * name-lookup.c (pushdecl_maybe_friend): Check it.
4273 * decl.c (begin_function_body): Do nothing if it's false.
4274 (finish_function_body): Ditto.
4275 (outer_curly_brace_block): New fn.
4276 (finish_function): Use it.
4278 2005-09-26 Richard Guenther <rguenther@suse.de>
4281 * decl2.c (do_static_destruction): Remove.
4282 (finish_static_initialization_or_destruction): Likewise.
4283 (DECL_EFFECTIVE_INIT_PRIORITY): New macro.
4284 (NEEDS_GUARD_P): Likewise.
4285 (do_static_initialization): Rename to
4286 do_static_initialization_or_destruction. Process all
4287 initializers/destructors and handle common conditionalizing.
4288 (start_static_initialization_or_destruction): Rename to
4289 one_static_initialization_or_destruction. Handle only
4290 decl-specific conditionalizing.
4291 (cp_finish_file): Call do_static_initialization_or_destruction.
4293 2005-09-22 Jakub Jelinek <jakub@redhat.com>
4296 * class.c (find_final_overrider): Move diagnostic about no unique final
4298 (update_vtable_entry_for_fn): ... here.
4300 2005-09-21 Mark Mitchell <mark@codesourcery.com>
4303 * init.c (integral_constant_value): Use DECL_INTEGRAL_CONSTANT_VAR_P.
4305 2005-09-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4308 * call.c (resolve_args): Return error_mark_node on arguments
4309 whose TREE_TYPE is error_mark_node.
4311 2005-09-20 Jakub Jelinek <jakub@redhat.com>
4314 * rtti.c (get_pseudo_ti_init): Recompute ti pointer after
4315 get_tinfo_ptr calls.
4317 2005-09-16 Mark Mitchell <mark@codesourcery.com>
4320 * parser.c (cp_parser_enclosed_template_argument_list): Make sure
4321 skip_evaluation is false when processing template arguments.
4324 * pt.c (check_instantiated_args): Treat uses of anonymous types as
4325 causing type-deduction failure.
4327 2005-09-15 Jason Merrill <jason@redhat.com>
4330 * cp-tree.def (SIZEOF_EXPR, ALIGNOF_EXPR): Change code class to
4333 2005-09-15 Mark Mitchell <mark@codesourcery.com>
4336 * pt.c (tsubst_aggr_type): Make sure skip_evaluation is false when
4337 processing template arguments.
4339 * pt.c (check_explicit_instantiation_namespace): Fix typo.
4342 * decl.c (check_class_member_definition_namespace): New function.
4343 (grokfndecl): Use it.
4344 (grokvardecl): Likewise.
4345 (grokdecl): Improve documentation.
4346 * pt.c (check_explicit_instantiation_namespace): New function.
4347 (register_specialization): Call check_specialization_namespace
4348 when replacing an implicitly instantiated function.
4349 (check_explicit_specialization): Ensure that DECL_CONTEXT is set
4350 correctly for namespace-scope specializations.
4351 (do_decl_instantiation): Use
4352 check_explicit_instantiation_namespace.
4353 (do_type_instantiation): Likewise.
4355 2005-09-15 Nathan Sidwell <nathan@codesourcery.com>
4358 * error.c (dump_decl): <USING_DECL case> Use USING_DECL_SCOPE.
4360 2005-09-13 Bastian Blank <waldi@debian.org>
4363 * mangle.c (find_substitution): Do not use special substitutions
4364 for identifiers not in std::.
4366 2005-09-13 Mark Mitchell <mark@codesourcery.com>
4369 * typeck.c (cxx_mark_addressable): Only check DECL_HARD_REGISTER
4372 2005-09-13 Mark Mitchell <mark@codesourcery.com>
4375 * pt.c (tsubst_default_argument): Do treat default argument
4376 expressions as occurring in the context of the function called.
4378 2005-09-12 Mark Mitchell <mark@codesourcery.com>
4381 * parser.c (cp_parser_primary_expression): Recognize the closing
4382 ">" of a template-argument-list after a floating-point literal as
4383 the end of a cast expression.
4385 2005-09-12 Mark Mitchell <mark@codesourcery.com>
4388 * cvt.c (perform_qualification_conversions): Don't create
4389 unnecessary NOP_EXPRs.
4390 * pt.c (tsubst_template_arg): Use fold_non_dependent_expr.
4392 2005-09-12 Ian Lance Taylor <ian@airs.com>
4395 * cp-tree.h (struct lang_decl_flags): Add hidden_friend_p
4396 bitfield. Make dummy bitfield one bit smaller.
4397 (DECL_HIDDEN_FRIEND_P): Define.
4398 (pushdecl_maybe_friend): Declare.
4399 (pushdecl_top_level_maybe_friend): Declare.
4400 * decl.c (duplicate_decls): Add newdecl_is_friend parameter.
4401 Change prototype and all callers. Add assertion that a
4402 DECL_ARTIFICIAL FUNCTION_DECL is not DECL_HIDDEN_FRIEND_P. Set
4403 DECL_ANTICIPATED and DECL_HIDDEN_FRIEND_P in duplicated decl if
4405 * name-lookup.c (supplement_binding): Don't ignore a
4406 DECL_HIDDEN_FRIEND_P.
4407 (pushdecl_maybe_friend): Break out contents of pushdecl. Add
4408 is_friend parameter. Set DECL_ANTICIPATED and
4409 DECL_HIDDEN_FRIEND_P for a friend function.
4410 (pushdecl): Just call pushdecl_maybe_friend.
4411 (pushdecl_with_scope): Add is_friend parameter. Change prototype
4413 (pushdecl_namespace_level): Likewise.
4414 (push_overloaded_decl): Likewise. Check DECL_HIDDEN_FRIEND_P as
4415 well as DECL_ANTICIPATED when checking for a builtin.
4416 (do_nonmember_using_decl): Check DECL_HIDDEN_FRIEND_P as well as
4417 DECL_ANTICIPATED when checking for a builtin.
4418 (do_nonmember_using_decl): Likewise.
4419 (pushdecl_top_level_1): Add is_friend parameter. Change all
4421 (pushdecl_top_level_maybe_friend): New function.
4422 (remove_hidden_names): New function.
4423 (struct arg_lookup): Add args field.
4424 (friend_of_associated_class_p): New static function.
4425 (arg_assoc_namespace): Ignore hidden functions which are not
4426 friends of an associated class of some argument.
4427 (lookup_arg_dependent): Remove hidden functions from list passed
4428 in. Initialize k.args.
4429 * name-lookup.h (remove_hidden_names): Declare.
4430 * friend.c (do_friend): Call pushdecl_maybe_friend instead of
4432 * call.c (add_function_candidate): Change DECL_ANTICIPATED test to
4433 an assertion, with a check for DECL_HIDDEN_FRIEND_P.
4434 (build_new_function_call): Add koenig_p parameter. Change
4435 prototype and callers.
4436 * pt.c (register_specialization): Add is_friend parameter. Change
4438 (push_template_decl_real): Change is_friend parameter to bool.
4439 Change prototype and all callers.
4440 (tsubst_friend_class): Call pushdecl_top_level_maybe_friend
4441 instead of pushdecl_top_level.
4443 2005-09-11 Richard Henderson <rth@redhat.com>
4445 * decl2.c (build_anon_union_vars): Copy attributes from the base addr.
4446 * pt.c (tsubst_decl): Substitute in DECL_VALUE_EXPR.
4448 2005-09-09 Gabriel Dos Reis <gdr@integrable-solutions.net>
4450 * parser.c (cp_parser_translation_unit): Simplify. The while-block
4451 was actually executed at most once.
4453 2005-09-09 Richard Henderson <rth@redhat.com>
4456 * cp-tree.def (ALIAS_DECL): Remove.
4457 * cp-lang.c (cp_init_ts): Remove support for it.
4458 * error.c (dump_decl): Likewise.
4459 * name-lookup.c (pushdecl): Likewise.
4460 * semantics.c (finish_id_expression): Likewise.
4461 * decl2.c (build_anon_union_vars): Use a VAR_DECL with
4462 DECL_VALUE_EXPR instead.
4464 2005-09-09 Mark Mitchell <mark@codesourcery.com>
4467 * decl.c (start_preparsed_function): Do not pay attention to
4468 #pragma interface for implicitly-defined methods.
4469 * decl2.c (cp_finish_file): Do not complain about uses of inline
4470 functions that have bodies, even if we decided not to emit the
4471 body in this translation unit.
4472 * semantics.c (note_decl_for_pch): Do not mess with linkage.
4473 (expand_or_defer_fn): Make inline, non-template functions COMDAT
4476 2005-09-08 Richard Henderson <rth@redhat.com>
4479 * decl.c (wrapup_globals_for_namespace): Call
4480 emit_debug_global_declarations.
4481 * decl2.c (cp_finish_file): Likewise.
4483 2005-09-08 Mark Mitchell <mark@codesourcery.com>
4486 * decl2.c (mark_used): Instantiate static data members initialized
4487 by constants, even in a template.
4489 2005-09-08 Andrew Pinski <pinskia@physics.uc.edu>
4492 * parser.c (cp_parser_objc_selector_expression): Treat CPP_SCOPE as
4495 2005-09-07 Richard Guenther <rguenther@suse.de>
4497 * cp-gimplify.c (cp_gimplify_expr): Create empty CONSTRUCTOR
4498 for EMPTY_CLASS_EXPR.
4500 2005-09-06 Jakub Jelinek <jakub@redhat.com>
4503 * typeck.c (check_return_expr): Add no_warning argument. Set
4504 *no_warning to true if "return-statement with no value, in function
4505 returning" warning has been issued.
4506 * cp-tree.h (check_return_expr): Adjust prototype.
4507 * semantics.c (finish_return_stmt): Set TREE_NO_WARNING if
4508 check_return_expr set *no_warning to true.
4510 2005-09-06 Mark Mitchell <mark@codesourcery.com>
4512 * cp-tree.h (rvalue): New function.
4513 * call.c (build_conditional_expr): Use it.
4514 * init.c (build_new_1): Likewise.
4515 * rtti.c (build_dynamic_cast_1): Likewise.
4516 * tree.c (rvalue): New function.
4517 * typeck.c (build_unary_op): Use it.
4518 (build_static_cast_1): Likewise.
4521 * init.c (build_new_1): Make sure the entire array type is
4522 complete, not just its element types.
4524 2005-09-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4526 * decl.c (check_elaborated_type_specifier): Remove redundant check.
4528 2005-09-06 Jakub Jelinek <jakub@redhat.com>
4531 * typeck.c (ignore_overflows): New helper function.
4532 (build_static_cast_1): Use it.
4534 2005-09-06 Kazu Hirata <kazu@codesourcery.com>
4536 * cp-tree.h, decl.c, decl2.c, semantics.c: Fix comment typos.
4537 Follow spelling conventions.
4539 2005-09-05 Mark Mitchell <mark@codesourcery.com>
4542 * pt.c (tsubst_decl): Clear DECL_TEMPLATE_INSTANTIATED when
4545 2005-09-05 Mark Mitchell <mark@codesourcery.com>
4548 * semantics.c (finish_stmt_expr_expr): Add an explicit
4549 initialization to the last statement in the statement-expression.
4550 * (finish_stmt_expr): Adjust accordingly.
4552 2005-09-03 Mark Mitchell <mark@codesourcery.com>
4555 * decl2.c (mark_used): Always instantiate static data members
4556 initialized by constant expressions.
4557 * pt.c (instantiate_decl): Instantiate the initializers for static
4558 data members initialized by constant expressions.
4561 * semantics.c (expand_or_defer_fn): Do not call ggc_collect when
4562 finishing processing for a template function in a local class.
4564 2005-09-02 Mark Mitchell <mark@codesourcery.com>
4565 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
4566 around functions in local classes.
4568 2005-09-02 Mark Mitchell <mark@codesourcery.com>
4571 * parser.c (cp_parser_class_specifier): Push/pop GC contexts
4572 around functions in local classes.
4574 2005-08-31 Andrew Pinski <pinskia@physics.uc.edu>
4577 * decl2.c (cp_finish_file): If this is obj-c++ and we need a static
4578 init, call generate_ctor_or_dtor_function.
4580 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4583 * parser.c (cp_parser_lookup_name): Pass LOOKUP_COMPLAIN to
4584 lookup_name_real on final parse.
4586 2005-08-31 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4589 * semantics.c (qualified_name_lookup_error): Do not complain again
4592 2005-08-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4595 * parser.c (cp_parser_namespace_name): Move diagnostic for
4596 invalid namespace-name to here from ...
4597 * name-lookup.c (do_namespace_alias): ... here and ...
4598 (do_using_directive): ... here. Remove dead code.
4600 2005-08-28 Mark Mitchell <mark@codesourcery.com>
4603 * cp-tree.h (saved_scope): Add skip_evaluation.
4604 * decl.c (start_decl): Use DECL_INITIALIZED_IN_CLASS_P, not
4605 DECL_INITIAL, to determine whether or not a static data member was
4606 initialized in the class-specifier.
4607 (cp_finish_decl): Add comment.
4608 * init.c (integral_constant_value): Subtitute into the
4609 initializers for static data members in templates.
4610 * name-lookup.c (push_to_top_level): Save skip_evaluation.
4611 (pop_from_top_level): Restore it.
4612 * pt.c (instantiate_class_template): Do not substitute into the
4613 intializers of static data members when instantiating a class.
4614 (regenerate_decl_from_template): Simplify.
4615 (instantiate_decl): Tidy. Substitute into the initializer for a
4616 static data member even when the definition of the data member is
4619 2005-08-26 Mark Mitchell <mark@codesourcery.com>
4622 * pt.c (uses_template_parms): Handle IDENTIFIER_NODE.
4623 (type_dependent_expression_p): Allow BASELINKs whose associated
4624 functions are simply a FUNCTION_DECL.
4627 * cp-tree.h (build_vec_init): Adjust prototype.
4628 * init.c (perform_member_init): Adjust call to build_vec_init.
4629 (build_aggr_init): Likewise.
4630 (build_new_1): Do not call build_default_init for array types.
4631 (build_vec_init): Add explicit_default_init_p parameter. Perform
4632 default initialization of vector elements when set.
4633 * typeck.c (build_modify_expr): Adjust call to build_vec_init.
4635 2005-08-25 Nathan Sidwell <nathan@codesourcery.com>
4638 * typeck.c (build_x_unary_op): Make sure OFFSET_REF is not for a
4641 2005-08-24 Nathan Sidwell <nathan@codesourcery.com>
4644 * parser.c (cp_lexer_peek_nth_token): Relax assert.
4646 2005-08-23 Nathan Sidwell <nathan@codesourcery.com>
4649 * pt.c (tsubst_qualified_id): A SCOPE_REF can still remain.
4651 2005-08-22 James E Wilson <wilson@specifix.com>
4653 PR tree-optimization/23426
4654 * decl.c (grokdeclarator): Use TYPE_SIZE_UNIT not TYPE_SIZE for
4657 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4660 * pt.c (push_template_decl_real): Return error_mark_node if the
4661 number of template parameters does not match previous definition.
4663 2005-08-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4666 * decl.c (require_complete_types_for_parms): Mark incomplete types
4669 2005-08-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4671 * parser.c (cp_parser_nth_token_starts_template_argument_list_p):
4672 Fix typo in leading comment.
4674 2005-08-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4676 * name-lookup.c, ptree.c: Delete HOST_PTR_PRINTF.
4678 2005-08-15 Fariborz Jahanian <fjahanian@apple.com>
4680 * cp-tree.h (can_convert_arg, fn_type_unification): New argument.
4681 * call.c (add_template_candidate_real): Pass down 'flags' to
4682 fn_type_unification.
4683 (can_convert_arg): New 'flags' argument. Pass it to call to
4684 implicit_conversion instead of LOOKUP_NORMAL.
4685 (can_convert): Add LOOKUP_NORMAL to call to can_convert_arg.
4686 * class.c (resolve_address_of_overloaded_function): Ditto.
4687 (resolve_address_of_overloaded_function): Ditto.
4688 * decl.c (reshape_init, check_default_argument): Ditto.
4689 * typeck.c (build_ptrmemfunc): Ditto.
4690 * pt.c (type_unification_real): Add 'flags' argument.
4691 (fn_type_unification): Pass 'flags' to type_unification_real.
4692 (type_unification_real): Pass new 'flags' argument to call to
4695 2005-08-12 Giovanni Bajo <giovannibajo@libero.it>
4696 Nathan Sidwell <nathan@codesourcery.com>
4700 * pt.c (unify) <METHOD_TYPE>: Check this-pointer cv-qualifiers
4703 2005-08-12 Nathan Sidwell <nathan@codesourcery.com>
4706 Revert my 2005-07-08 patch
4707 * pt.c (type_unification_real): Remove is_method_argument and
4709 (fn_type_unification, unify): Adjust type_unification_real calls.
4711 2005-08-11 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4714 * decl2.c (grokfield): Check that method is not static before
4717 2005-08-11 Nathan Sidwell <nathan@codesourcery.com>
4720 * name-lookup.c (pushtag): Process the template type before
4721 altering the identifier lookup fields. Remove unreachable code
4722 creating an empty stub decl.
4724 2005-08-10 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4727 * decl.c (grokdeclarator): Reset storage_class after error.
4729 2005-08-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4732 * init.c (build_new_1): Check for empty candidate list.
4734 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4737 * pt.c (tsubst) <case METHOD_TYPE>: Check for error_mark_node
4738 before calling build_exception_variant.
4740 2005-08-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4743 * pt.c (tsubst_decl) <case TEMPLATE_DECL>: Return ERROR_MARK_NODE
4744 if substitution of template args did not succeed.
4746 2005-08-06 Michael Matz <matz@suse.de>
4748 * method.c (use_thunk): Call init_insn_lengths.
4750 2005-08-05 James A. Morrison <phython@gcc.gnu.org>
4753 * name-lookup.c (cp_emit_debug_info_for_using): Do nothing if
4754 sorrycount or errorcount are nonzero.
4756 2005-08-05 Mark Mitchell <mark@codesourcery.com>
4758 * name-lookup.c (pushtag): Remove accidental commit from:
4759 2004-12-21 Mark Mitchell <mark@codesourcery.com>
4761 * decl.c (grokdeclarator): Return error_mark_node, not
4762 void_type_node, to indicate errors.
4763 * parser.c (cp_parser_template_parameter_list): Robustify.
4764 (cp_parser_template_parameter): Likewise.
4766 2005-08-01 Kazu Hirata <kazu@codesourcery.com>
4768 * class.c, decl.c, name-lookup.c, pt.c, typeck.c, typeck2.c:
4771 2005-07-29 Kazu Hirata <kazu@codesourcery.com>
4773 * method.c: Fix a comment typo.
4775 2005-07-28 Mark Mitchell <mark@codesourcery.com>
4778 * call.c (add_builtin_candidate): Adjust for changes in
4779 representation of pointer-to-member types.
4781 2005-07-28 Mike Stump <mrs@apple.com>
4783 * pt.c (check_explicit_specialization): Add visibility logic.
4784 (lookup_template_class): Likewise.
4785 (instantiate_class_template): Likewise.
4787 2005-07-27 Devang Patel <dpatel@apple.com>
4789 * name-lookup.c (pushtag): Do no set DECL_IGNORED_P bit.
4791 2005-07-25 Ian Lance Taylor <ian@airs.com>
4793 * ptree.c (cxx_print_identifier): Print a leading space if the
4796 2005-07-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4798 * call.c (convert_for_arg_passing): Check function pointers when
4799 -Wmissing-format-attribute is activated.
4800 * typeck.c (convert_for_assignment): Likewise.
4802 2005-07-22 Manfred Hollstein <mh@suse.com>
4804 * parser.c (cp_parser_declaration): Fix unitialised warnings.
4806 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
4808 * class.c (build_base_path): Fix typo.
4810 2005-07-21 Andrew Pinski <pinskia@physics.uc.edu>
4813 * class.c (build_base_path): Convert BINFO_OFFSET to the correct type.
4815 2005-07-21 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4817 * call.c: Fix comment typo(s).
4818 * cxx-pretty-print.h: Likewise.
4819 * name-lookup.c: Likewise.
4820 * parser.c: Likewise.
4822 2005-07-20 Douglas Gregor <doug.gregor@gmail.com>
4825 * semantics.c (perform_koenig_lookup): For dependent calls, just
4826 return the set of functions we've found so far. Later, it will be
4827 augmented by those found through argument-dependent lookup.
4828 * name-lookup.c (lookup_arg_dependent): Implement DR 164 by removing
4829 the optimization that skips namespaces where the functions were
4832 2005-07-20 Giovanni Bajo <giovannibajo@libero.it>
4834 Make CONSTRUCTOR use VEC to store initializers.
4835 * call.c (convert_default_arg): Update call to digest_init.
4836 * class.c (dump_class_hierarchy, dump_array): Update to cope with
4837 VEC in CONSTRUCTOR_ELTS.
4838 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
4839 (finish_compound_literal, digest_init): Update declaration.
4840 * decl.c (struct reshape_iter): New data type.
4841 (reshape_init_array): Rename to...
4842 (reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
4843 (reshape_init): Rewrite from scratch. Split parts into...
4844 (reshape_init_array, reshape_init_vector, reshape_init_class,
4845 reshape_init_r): New functions.
4846 (check_initializer): Update call to reshape_init. Remove obsolete
4848 (initialize_artificial_var, cp_complete_array_type): Update to cope
4849 with VEC in CONSTRUCTOR_ELTS.
4850 * decl2.c (grokfield): Update calls to digest_init.
4851 (mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
4852 * error.c (dump_expr_init_vec): New function.
4853 (dump_expr): Use dump_expr_init_vec.
4854 * init.c (build_zero_init, build_vec_init): Update to cope with VEC
4855 in CONSTRUCTOR_ELTS.
4856 (expand_default_init): Update call to digest_init.
4857 * parser.c (cp_parser_postfix_expression): Use a VEC for the
4859 (cp_parser_initializer_list): Build a VEC of initializers.
4860 * pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
4861 in CONSTRUCTOR_ELTS.
4862 * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
4863 ptm_initializer, class_initializer, get_pseudo_ti_init): Use
4864 build_constructor_from_list instead of build_constructor.
4865 * semantics.c (finish_compound_literal): Update call to digest_init.
4866 * tree.c (stabilize_init): Update to cope with VEC in
4868 * typeck.c (build_ptrmemfunc1): Likewise.
4869 * typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
4871 (store_init_value): Use build_constructor_from_list and update call
4873 (digest_init): Rewrite.
4874 (process_init_constructor): Rewrite from scratch. Split into...
4875 (process_init_constructor_array, picflag_from_initializer,
4876 process_init_constructor_record, process_init_constructor_union):
4878 (PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
4880 (build_functional_cast): Use build_constructor_from_list instead of
4883 2005-07-18 Mark Mitchell <mark@codesourcery.com>
4886 * cp-tree.h (instantiate_decl): Change prototype.
4887 * decl2.c (mark_used): Adjust accordingly.
4888 * pt.c (do_decl_instantiation): Likewise.
4889 (instantiate_class_member): Likewise.
4890 (instantiate_decl): Rename undefined_ok as expl_inst_class_mem_p.
4891 Clear DECL_INTERFACE_KNOWN for an explicitly instantiated template
4892 that has no definition available.
4893 (instantiate_pending_templates): Adjust call to instantiate_decl.
4895 2005-07-17 Mark Mitchell <mark@codesourcery.com>
4898 * cp-tree.h (DECL_TEMPLATE_INFO): Improve documentation.
4899 * decl.c (duplicate_decls): Re-register template specializations
4900 for functions that have DECL_TEMLPLATE_INFO, even if they do not
4901 have DECL_TEMPLATE_INSTANTIATION set.
4903 2005-07-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4905 * call.c (diagnostic_fn_t): New.
4906 (build_temp, convert_like_real): Use diagnostic_fn_t.
4908 2005-07-15 Mark Mitchell <mark@codesourcery.com>
4911 * repo.c (repo_emit_p): Robustify.
4913 2005-07-14 Daniel Berlin <dberlin@dberlin.org>
4916 * tree.c (decl_linkage): Don't check DECL_COMDAT on CONST_DECL.
4918 2005-07-15 Mark Mitchell <mark@codesourcery.com>
4921 * call.c (implicit_conversion): Add c_cast_p parameter.
4922 (standard_conversion): Likewise. Allow conversions between
4923 differently-qualified pointer types when performing a C-style
4925 (add_function_candidate): Adjust callee.
4926 (build_builtin_candidate): Likewise.
4927 (build_user_type_conversion_1): Likewise.
4928 (conditional_conversion): Likewise.
4929 (can_convert_arg): Likewise.
4930 (can_convert_arg_bad): Likewise.
4931 (perform_implicit_conversion): Likewise.
4932 * cp-tree.h (comp_ptr_ttypes_const): Declare.
4933 * typeck.c (comp_ptr_ttypes_const): Give it external linkage.
4936 2005-07-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
4937 Nathan Sidwell <nathan@codesourcery.com>
4940 * pt.c (tsubst_template_parms): Check for invalid non-type
4943 2005-07-09 Andrew Pinski <pinskia@physics.uc.edu>
4945 * cp-lang.c (shadowed_var_for_decl, decl_shadowed_for_var_lookup,
4946 decl_shadowed_for_var_insert): Move over to cp-objcp-common.c.
4947 (cp_init_ts): Call init_shadowed_var_for_decl.
4948 Remove include of gt-cp-cp-lang.h.
4949 * cp-objcp-common.c (shadowed_var_for_decl,
4950 decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Moved from
4952 (init_shadowed_var_for_decl): New function to initialize
4953 shadowed_var_for_decl.
4954 Include gt-cp-cp-objcp-common.h.
4955 * Make-lang.in (gt-cp-lang.h): Remove.
4956 (gt-cp-cp-objcp-common.h): Add.
4957 (cp/cp-lang.o): Remove dependancy on gt-cp-lang.h.
4958 (cp/cp-objcp-common.o): Add dependancy on gt-cp-cp-objcp-common.h.
4959 * config-lang.in (gtfiles): Remove cp-lang.c and Add cp-objcp-common.c.
4960 * cp-tree (init_shadowed_var_for_decl): Add prototype.
4962 2005-07-08 Daniel Berlin <dberlin@dberlin.org>
4964 * Make-lang.in: Add gt-cp-lang.h.
4966 * class.c (create_vtable_ptr): Stop setting DECL_ASSEMBLER_NAME on
4968 * config-lang.in: Add cp-lang.c to gtfiles.
4969 * cp-lang.c: Include hashtab.h.
4970 (cp_init_ts): New function.
4971 (LANG_HOOK_INIT_TS): Use macro.
4972 (decl_shadowed_for_var_lookup): New function.
4973 (decl_shadowed_for_var_insert): Ditto.
4974 * cp-tree.h (THUNK_FUNCTION_CHECK): Use decl_common.
4975 (NON_THUNK_FUNCTION_CHECK): Ditto.
4976 (DECL_NAMESPACE_ASSOCIATIONS): Use decl_non_common.
4977 (DECL_INIT_PRIORITY): Ditto.
4978 (DECL_HAS_SHADOWED_FOR_VAR_P): Ditto.
4979 (DECL_SHADOWED_FOR_VAR): Use hashtable.
4980 (SET_DECL_SHADOWED_FOR_VAR): Ditto.
4981 * decl.c (duplicate_decls): Update for new/updated structures.
4982 (poplevel): Use SET_DECL_SHADOWED_FOR_VAR.
4983 * decl2.c (start_static_initialization_or_destruction): Deal with
4985 * pt.c (tsubst_decl): Check TS_DECL_WRTL before doing
4987 * tree.c (handle_init_priority_attribute): Handle priority.
4989 2005-07-08 Nathan Sidwell <nathan@codesourcery.com>
4992 * pt.c (type_unification_real): Add is_method argument. Use it
4993 for this pointer unification.
4994 (fn_type_unification): Adjust type_unification_real call.
4997 2005-07-07 Nathan Sidwell <nathan@codesourcery.com>
4999 * pt.c (type_unification_real): Remove allow_incomplete argument.
5000 Remove unreachable code.
5001 (fn_type_unification): Adjust call to type_unification_real.
5004 2005-07-05 Paolo Bonzini <bonzini@gnu.org>
5006 * Makefile.in (class.o, decl2.o): Adjust dependencies.
5007 * class.c: Include tree-dump.h.
5008 * decl2.c: Include tree-dump.h.
5010 2005-07-02 Gabriel Dos Reis <gdr@integrable-solutions.net>
5012 * dump.c: Use dump_string_field.
5014 2005-07-03 Joseph S. Myers <joseph@codesourcery.com>
5016 * cp-tree.h (GCC_DIAG_STYLE): #undef before defining. Change
5017 minimum GCC version for format checking to 4.1.
5019 2005-07-02 Kazu Hirata <kazu@codesourcery.com>
5021 * Make-lang.in (cc1plus-checksum.c): Use
5022 build/genchecksum$(build_exeext), not build/genchecksum$(exeext).
5024 2005-07-02 Joseph S. Myers <joseph@codesourcery.com>
5026 * name-lookup.c, parser.c: Use %q, %< and %> to quote in
5029 2005-07-02 Zack Weinberg <zack@codesourcery.com>
5030 Joseph S. Myers <joseph@codesourcery.com>
5032 * error.c (location_of): Add comment.
5033 (locate_error, cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
5034 * cp-tree.h (cp_error_at, cp_warning_at, cp_pedwarn_at): Remove.
5035 * call.c, class.c, decl.c, decl2.c, friend.c, init.c,
5036 name-lookup.c, parser.c, pt.c, search.c, semantics.c, typeck.c,
5037 typeck2.c: Use '+' flag instead of %J, cp_error_at, cp_warning_at
5038 or cp_pedwarn_at. Mark up some diagnostic strings with N_.
5040 2005-06-30 Daniel Berlin <dberlin@dberlin.org>
5042 * decl.c (require_complete_types_for_parms): Call relayout_decl
5043 instead of layout_decl.
5045 2005-06-30 Zack Weinberg <zack@codesourcery.com>
5046 Jakub Jelinek <jakub@redhat.com>
5048 * cp-lang.c: No need to include cxx-pretty-print.h.
5049 * error.c (cp_printer): Update signature. No need to process
5051 (print_instantiation_partial_context): Output last newline
5052 with pp_base_newline.
5053 * Make-lang.in: Update dependencies.
5055 2005-06-30 Steven Bosscher <stevenb@suse.de>
5057 * decl.c (start_decl): Replace DECL_THREAD_LOCAL with
5058 DECL_THREAD_LOCAL_P.
5059 (cp_finish_decl): Likewise.
5060 (grokvardecl): Set the default DECL_TLS_MODEL here.
5062 2005-06-28 Joseph S. Myers <joseph@codesourcery.com>
5064 * cvt.c (ocp_convert): Use invalid_conversion hook.
5065 * typeck.c (build_binary_op): Use invalid_binary_op hook.
5066 (build_unary_op): Use invalid_unary_op hook.
5068 2005-06-28 Paul Brook <paul@codesourcery.com>
5070 * Make-lang.in (cp/except.o): Depend on $(TARGET_H)
5071 * except.c: Include target.h.
5072 (init_exception_processing): Initialize unwind_resume_libfunc.
5073 * doc/tm.texi: Document TARGET_ASM_TTYPE
5075 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5077 * call.c (build_over_call): Pass in named argument list to
5078 `check_function_arguments'.
5079 * typeck.c (build_function_call): Likewise.
5081 2005-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5083 * cp-tree.h (lang_check_failed): Add noreturn attribute.
5085 2005-06-25 Kelley Cook <kcook@gcc.gnu.org>
5087 * all files: Update FSF address in copyright headers.
5089 2005-06-23 Jason Merrill <jason@redhat.com>
5092 * semantics.c (simplify_aggr_init_expr): Use
5093 CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.
5095 2005-06-23 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5097 * pt.c (register_specialization): Remove superfluous assertion.
5099 2005-06-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5101 * call.c (convert_like_real): Add format attribute.
5102 * typeck.c (check_for_casting_away_constness,
5103 build_static_cast_1): Likewise.
5104 * typeck2.c (readonly_error, cxx_incomplete_type_diagnostic):
5107 2005-06-17 Geoffrey Keating <geoffk@apple.com>
5110 * pt.c (type_unification_real): Apply template type deduction even
5111 to procedure parameters that are not dependent on a template
5114 2005-06-16 Nathan Sidwell <nathan@codesourcery.com>
5116 * rtti.c (get_tinfo_decl): Avoid caching tinfo_descs when it might
5118 (create_pseudo_type_info): First parameter is an int.
5120 2005-06-15 Nathan Sidwell <nathan@codesourcery.com>
5123 * error.c (dump_expr) <COMPONENT_REF case>: Check DECL_NAME is not
5126 * Make-lang.in: Reformat some long lines.
5127 (gt-cp-rtti.h): New target.
5128 (cp/rtti.o): Add dependency.
5129 * config-lang.in (gtfiles): Add cp/rtti.c.
5130 * cp-tree.h (CPTI_TI_DESC_TYPE, CPTI_BLTN_DESC_TYPE,
5131 CPTI_PTR_DESC_TYPE, CPTI_ARY_DESC_TYPE, CPTI_FUNC_DESC_TYPE,
5132 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE,
5133 CPTI_SI_CLASS_DESC_TYPE, CPTI_VMI_CLASS_DESC_TYPE,
5134 CPTI_PTM_DESC_TYPE, CPTI_BASE_DESC_TYPE): Remove.
5135 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5136 ary_desc_type_node, func_desc_type_node, enum_desc_type_node,
5137 class_desc_type_node, si_class_desc_type_node,
5138 vmi_class_desc_type_node, ptm_desc_type_node,
5139 base_desc_type_node): Remove.
5140 * decl.c: Adjust documentation of global trees.
5141 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL,
5142 TINFO_REAL_NAME): Remove.
5143 (struct tinfo_s): New.
5144 (enum tinfo_kind): New.
5146 (get_tinfo_decl): Adjust use of tinfo descriptor.
5147 (tinfo_base_init, generic_initializer, ptr_initializer,
5148 ptm_initializer, class_initializer): Likewise.
5149 (get_pseudo_ti_init): Take descriptor index. Adjust.
5150 (create_pseudo_type_info): Likewise.
5151 (get_pseudo_ti_desc): Return descriptor index. Adjust.
5152 (create_tinfo_types): Adjust use of create_pseudo_type_info.
5153 (emit_tinfo_decl): Adjust use of tinfo descriptor.
5155 2005-06-14 Roger Sayle <roger@eyesopen.com>
5157 * decl.c (grokdeclarator): Only check TREE_OVERFLOW on INTEGER_CST.
5159 2005-06-13 Geoffrey Keating <geoffk@apple.com>
5161 * Make-lang.in (c++.install-man): Doesn't really depend on installdirs.
5162 (rule for installing g++.1 manpage): Does depend on installdirs.
5164 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
5167 * decl.c (cp_finish_decl): Clear runtime runtime initialization if
5168 in-class decl's initializer is bad.
5171 * parser.c (struct cp_parser): Document that scope could be
5173 (cp_parser_diagnose_invalid_type_name): Cope with error_mark for
5175 (cp_parser_nested_name_specifier): Return NULL_TREE on error.
5176 (cp_parser_postfix_expression): Deal with null or error_mark
5178 (cp_parser_elaborated_type_specifier): Adjust
5179 cp_parser_nested_name_specifier call.
5181 * parser (cp_parser_skip_to_end_of_block_or_statement): Cleanup.
5183 2005-06-12 Roger Sayle <roger@eyesopen.com>
5186 * error.c (dump_expr): UNARY_PLUS_EXPR need not handle void types.
5187 Treat CONVERT_EXPR identically to NOP_EXPR.
5189 2005-06-10 Aldy Hernandez <aldyh@redhat.com>
5192 * cvt.c (build_expr_type_conversion): Same.
5193 * typeck.c (build_binary_op): Handle vectors.
5194 (common_type): Same.
5195 (type_after_usual_arithmetic_conversions): Same.
5197 2005-06-08 Nathan Sidwell <nathan@codesourcery.com>
5200 * cp-tree.def (USING_DECL): Update documentation.
5201 * cp-tree.h (DECL_DEPENDENT_P): New.
5202 (USING_DECL_DECLS, USING_DECL_SCOPE): New.
5203 * class.c (handle_using_decl): Move most of the processing to ...
5204 * name-lookup.c (do_class_using_decl): ... here. Make stricter.
5205 (push_using_decl): Use USING_DECL_SCOPE.
5206 (cp_emit_debug_info_for_using): Make extern.
5207 * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust.
5208 * name-lookup.h (cp_emit_debug_info_for_using): Declare.
5209 * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl
5211 (tsubst_expr): Use USING_DECL_SCOPE.
5212 * search.c (lookup_field_1): Use DECL_DEPENDENT_P.
5213 * semantics.c (finish_member_declaration): Likewise.
5215 2005-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5218 * pt.c (tsubst): Reject pointer-to-member of type void.
5221 * parser.c (cp_parser_label_declaration): Deal with invalid/missing
5224 2005-06-07 Nathan Sidwell <nathan@codesourcery.com>
5226 * cp-tree.def (DEFAULT_ARG): Adjust documentation.
5227 * cp-tree.h (DEFARG_INSTANTIATIONS): New.
5228 (struct tree_default_arg): Add instantiations member.
5229 * parser.c (cp_parser_late_parsing_default_args): Adjust to use a
5231 * pt.c (tsubst_arg_types): Likewise.
5233 * parser.c (cp_parser_late_parsing_default_args): Fix overeager
5234 assert in previous patch.
5236 2005-06-06 Jakub Jelinek <jakub@redhat.com>
5238 * error.c (locate_error): Use gmsgid instead of msgid for argument
5240 (cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
5242 2005-06-06 Nathan Sidwell <nathan@codesourcery.com>
5245 * cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
5246 * parser.c (cp_parser_late_parsing_default_args): Propagate parsed
5247 argument to any early instantiations.
5248 * pt.c (tsubst_arg_types): Chain early instantiation of default arg.
5251 * cp-tree.h (add_method): Add using_decl parameter.
5252 * class.c (add_method): Add using_decl parameter. Adjust error
5254 (handle_using_decl): Pass the using decl to add_method.
5255 (clone_function_decl): Adjust add_member calls.
5256 * decl2.c (check_classfn): Likewise.
5257 * method.c (lazily_declare_fn): Likewise.
5258 * semantics.c (finish_member_declaration): Likewise.
5260 * method.c (synthesize_method): Use inform, not warning.
5262 2005-06-06 Hans-Peter Nilsson <hp@axis.se>
5264 * config-lang.in (target_libs): Remove target-gperf.
5266 2005-06-05 Mark Mitchell <mark@codesourcery.com>
5269 * cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
5270 * parser.c (cp_parser_postfix_expression): Allow non-constant
5271 expressions as arguments to __builtin_constant_p.
5272 * tree.c (builtin_valid_in_constant_expr_p): Use
5273 DECL_IS_BUILTIN_CONSTANT_P.
5275 2005-06-03 Mark Mitchell <mark@codesourcery.com>
5278 * typeck.c (casts_away_constness_r): Do not drop cv-qualifiers on
5279 the pointed-to type for a pointer-to-member.
5282 * cp-tree.h (grok_op_properties): Remove friendp parameter.
5283 * decl.c (grokfndecl): Adjust call.
5284 (grok_op_properties): Determine the class of which the function is
5285 a member by looking at its DECL_CONTEXT, not current_class_type.
5286 * pt.c (tsubst_decl): Adjust call to grok_op_properties.
5288 2005-06-02 Nathan Sidwell <nathan@codesourcery.com>
5290 * method.c (synthesize_method): Add addtional arg to warning call.
5293 * Make-lang.in (method.o): Add diagnostic.h
5294 * decl.c (start_preparsed_function): Use decl's location for file
5296 * decl2.c (cp_finish_file): Set input_location before synthesizing
5298 (mark_used): When deferring a synthesized function, save current
5299 location. Do not set function's location when actually
5301 * method.c: #include diagnostic.h.
5302 (synthesize_method): Set the functions source location. Show
5303 needed location if errors are emitted.
5305 * decl.c (start_decl): Simplify specialization handling. Remove
5306 unneeded CLASSTYPE_TEMPLATE_INSTANTIATION check.
5307 * mangle.c (discriminator_for_local_entity): Use VEC_index.
5310 * decl.c (duplicate_decls): Copy all of DECL_USE_TEMPLATE.
5313 * name-lookup.c (pushtag): Push local class even in a template.
5315 2005-05-31 Nathan Sidwell <nathan@codesourcery.com>
5318 * init.c (integral_constant_value): Check the type of the
5319 initializer, not the decl.
5321 2005-05-30 Mark Mitchell <mark@codesourcery.com>
5324 * name-lookup.c (do_nonmember_using_decl): Ignore builtin
5325 functions, even when the used name is not a function.
5327 2005-05-30 Kazu Hirata <kazu@cs.umass.edu>
5329 * operators.def, optimize.c: Update copyright.
5331 2005-05-28 Mark Mitchell <mark@codesourcery.com>
5334 * call.c (standard_conversion): Permit conversions to complex
5335 types if conversion to the corresponding scalar type would be
5339 * method.c (implicitly_declare_fn): Clear processing_template_decl
5340 when generating implicit declaration.
5342 2005-05-27 Mark Mitchell <mark@codesourcery.com>
5345 * typeck.c (get_member_function_from_ptrfunc): Do not attempt
5346 conversions to base classes of incomplete types.
5348 2005-05-27 Ian Lance Taylor <ian@airs.com>
5350 * semantics.c (add_stmt): Add C++ frontend specific version.
5351 * cp-tree.h (STMT_IS_FULL_EXPR_P): Define.
5352 (stmts_are_full_exprs_p): Declare.
5354 2005-05-27 Roger Sayle <roger@eyesopen.com>
5355 Giovanni Bajo <giovannibajo@gcc.gnu.org>
5357 * cp-tree.def (UNARY_PLUS_EXPR): New C++ unary tree code.
5358 * parser.c (cp_parser_unary_expression): Use UNARY_PLUS_EXPR instead
5360 (cp_parser_unary_expression): Likewise.
5361 * typeck.c (build_unary_op): Likewise.
5362 * call.c (add_builtin_candidate, build_new_op): Likewise.
5363 * error.c (dump_expr): Likewise.
5364 * pt.c (tsubst_copy, tsubst_copy_and_build): Likewise.
5365 * decl.c (ambi_op_p, grok_op_properties): Likewise.
5366 * dump.c (dump_op): Likewise.
5367 * lex.c (init_operators): Likewise.
5368 * operators.def ("+"): Likewise.
5369 * cp-gimplify.c (cp_gimplify_expr): Handle UNARY_PLUS_EXPR like a
5370 conversion, if the result and argument types differ.
5371 * tree.c (fold_if_not_in_template): Fold UNARY_PLUS_EXPR much
5372 like a NOP_EXPR when !processing_template_decl.
5374 * cxx-pretty-print.c (pp_cxx_cast_expression): Prototype.
5375 (pp_cxx_unary_expression): Handle new UNARY_PLUS_EXPR tree code.
5377 2005-05-27 Nathan Sidwell <nathan@codesourcery.com>
5380 * typeck.c (get_delta_difference): Cope with incomplete but equal
5381 classes. Reorder if.
5384 * parser.c (cp_parser_late_parsing_for_member): Disable access
5385 checking for template functions.
5387 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5390 * pt.c (redeclare_class_template): Change error message according
5391 to coding conventions.
5393 2005-05-26 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5395 * call.c (build_op_delete_call): Fix quoting in error message.
5397 2005-05-25 Richard Henderson <rth@redhat.com>
5400 * cp-tree.h (make_alias_for): Declare.
5401 * decl2.c (build_java_method_aliases): New.
5402 (cp_finish_file): Call it.
5403 * method.c (make_alias_for): Split out from ...
5404 (make_alias_for_thunk): ... here.
5406 2005-05-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
5409 * semantics.c (finish_id_expression): Fix quoting in error message.
5411 2005-05-25 DJ Delorie <dj@redhat.com>
5413 * decl.c (duplicate_decls): Move warning control from if() to
5415 * name-lookup.c (parse_using_directive): Likewise.
5416 * parser.c (cp_parser_elaborated_type_specifier): Likewise.
5417 (cp_parser_init_declarator): Likewise.
5418 * tree.c (handle_com_interface_attribute): Likewise.
5420 2005-05-24 Ziemowit Laski <zlaski@apple.com>
5422 * class.c (layout_class_type): Do not issue C++ ABI warnings
5424 * decl.c (objc_mark_locals_volatile): Streamline by calling
5425 objc_volatilize_decl().
5426 * parser.c (cp_parser_objc_message_expression): Allow simple
5427 type specifiers (instead of merely type names) as message
5429 * pt.c (template_args_equal): Do not call objc_comptypes().
5430 * typeck.c (composite_pointer_type): If both pointers are
5431 ObjC-esque, arbitrarily choose the first; do not call
5433 (comptypes): Do not call objc_comptypes().
5434 (convert_for_assignment): Call objc_compare_types().
5435 (comp_ptr_ttypes_real): Call objc_type_quals_match() before
5436 concluding that types do not match.
5438 2005-05-24 Andrew Pinski <pinskia@physics.uc.edu>
5441 * optimize.c (update_cloned_parm): Copy the TYPE also from the
5444 2005-05-19 Jakub Jelinek <jakub@redhat.com>
5447 * decl.c (grokdeclarator): Fix "storage class specified for"
5450 2005-05-19 Kazu Hirata <kazu@cs.umass.edu>
5452 * parser.c: Fix comment typos.
5454 2005-05-18 Geoffrey Keating <geoffk@apple.com>
5456 * Make-lang.in (cc1plus-dummy): New.
5457 (cc1plus-checksum.c): New.
5458 (cc1plus-checksum.o): New.
5459 (cc1plus): Add cc1plus-checksum.o.
5461 2005-05-17 H.J. Lu <hongjiu.lu@intel.com>
5464 * decl2.c (determine_visibility): Don't set visibility to
5465 hidden if it has been set explicitly by user.
5467 2005-05-17 Ziemowit Laski <zlaski@apple.com>
5468 Mike Stump <mrs@apple.com>
5470 Yet more Objective-C++...
5472 * cp-objcp-common.h (cxx_get_alias_set): Move from
5474 (cxx_warn_unused_global_decl): Likewise.
5475 (cp_expr_size): Likewise.
5476 (cp_tree_size): Likewise.
5477 (cp_var_mod_type_p): Likewise.
5478 (cxx_initialize_diagnostics): Likewise.
5479 (cxx_types_compatible_p): Likewise.
5480 * cp-tree.h: to here.
5482 * lex.c (D_OBJC): Add.
5483 (init_reswords): Add.
5484 * Make-lang.in (cp/pt.o): Add cp/cp-objcp-common.h.
5485 * parser.c: Add c-common.h include.
5486 * pt.c: Add c-common.h and cp-objcp-common.h includes.
5487 (template_args_equal): Use objc_comptypes as well.
5488 (tsubst_copy_and_build): Use objcp_tsubst_copy_and_build as well.
5489 * semantics.c (do_poplevel): Remove static.
5491 * decl.c (objc_mark_locals_volatile): Don't change decls that are
5493 * decl2.c (generate_ctor_or_dtor_function): Add code to initialize
5494 Objective C++ early enough.
5495 * lex.c (struct resword reswords): Add Objective-C++ support.
5496 * parser.c (cp_lexer_get_preprocessor_token): Add Objective-C++.
5497 (cp_parser_objc_message_receiver): Add.
5498 (cp_parser_objc_message_args): Likewise.
5499 (cp_parser_objc_message_expression): Likewise.
5500 (cp_parser_objc_encode_expression): Likewise.
5501 (cp_parser_objc_defs_expression): Likewise.
5502 (cp_parser_objc_protocol_expression): Likewise.
5503 (cp_parser_objc_selector_expression): Likewise.
5504 (cp_parser_objc_expression): Likewise.
5505 (cp_parser_objc_visibility_spec): Likewise.
5506 (cp_parser_objc_method_type): Likewise.
5507 (cp_parser_objc_protocol_qualifiers): Likewise.
5508 (cp_parser_objc_typename): Likewise.
5509 (cp_parser_objc_selector_p): Likewise.
5510 (cp_parser_objc_selector): Likewise.
5511 (cp_parser_objc_method_keyword_params): Likewise.
5512 (cp_parser_objc_method_tail_params_opt): Likewise.
5513 (cp_parser_objc_interstitial_code): Likewise.
5514 (cp_parser_objc_method_signature): Likewise.
5515 (cp_parser_objc_method_prototype_list): Likewise.
5516 (cp_parser_objc_method_definition_list): Likewise.
5517 (cp_parser_objc_class_ivars): Likewise.
5518 (cp_parser_objc_identifier_list): Likewise.
5519 (cp_parser_objc_alias_declaration): Likewise.
5520 (cp_parser_objc_class_declaration): Likewise.
5521 (cp_parser_objc_protocol_declaration): Likewise.
5522 (cp_parser_objc_protocol_refs_opt): Likewise.
5523 (cp_parser_objc_superclass_or_category): Likewise.
5524 (cp_parser_objc_class_interface): Likewise.
5525 (cp_parser_objc_class_implementation): Likewise.
5526 (cp_parser_objc_end_implementation): Likewise.
5527 (cp_parser_objc_declaration): Likewise.
5528 (cp_parser_objc_try_catch_finally_statement): Likewise.
5529 (cp_parser_objc_synchronized_statement): Likewise.
5530 (cp_parser_objc_throw_statement): Likewise.
5531 (cp_parser_objc_statement): Likewise.
5532 (cp_parser_primary_expression): Add Objective-C++.
5533 (cp_parser_statement): Likewise.
5534 (cp_parser_declaration): Likewise.
5535 (cp_parser_simple_type_specifier): Likewise.
5536 (cp_parser_type_name): Likewise.
5537 (cp_parser_parameter_declaration_list): Likewise.
5538 (cp_parser_member_declaration) Likewise.
5539 * tree.c: Include debug.h.
5540 * typeck.c (composite_pointer_type): Add Objective-C++ support.
5541 (finish_class_member_access_expr): Likewise.
5542 (build_function_call): Allow objc to rewrite FUNCTION_DECLs.
5543 (build_modify_expr): Allow objc to generate write barriers.
5545 * Make-lang.in (cp/tree.o): Add debug.h.
5546 * tree.c (lvalue_p_1, case CONST_DECL): Add.
5548 2005-05-18 Jan Hubicka <jh@suse.cz>
5550 * method.c: Include tree-pass.h
5551 (use_thunk): Lower body before expanding.
5553 2005-05-17 Jakub Jelinek <jakub@redhat.com>
5556 * decl.c (maybe_deduce_size_from_array_init): Call
5557 cp_apply_type_quals_to_decl after completing array type.
5559 2005-05-16 Richard Henderson <rth@redhat.com>
5561 * decl.c (build_library_fn_1): Move setting TREE_NOTHROW ...
5562 (build_library_fn): ... here.
5564 2005-05-12 Ian Lance Taylor <ian@airs.com>
5566 * cp-tree.h (cp_stmt_codes): Don't define.
5567 (statement_code_p): Declare.
5568 (STATEMENT_CODE_P): Define.
5569 * lex.c (statement_code_p): Define.
5570 (cxx_init): Use actual codes in stmt_codes initializer, not
5571 cp_stmt_codes macro. Initialize statement_code_p directly, rather
5572 than using INIT_STATEMENT_CODES.
5574 2005-05-09 Mark Mitchell <mark@codesourcery.com>
5576 * typeck.c (build_unary_op): Do not resort to address arithmetic
5577 when taking the address of a COMPONENT_REF.
5579 2005-05-08 Kazu Hirata <kazu@cs.umass.edu>
5581 * class.c (vtbl_init_data_s): Change the type of fns to
5583 (build_vtbl_initializer, add_vcall_offset, add_vcall_offset):
5584 Use VEC instead of VARRAY.
5586 2005-05-07 Richard Sandiford <rsandifo@redhat.com>
5588 * mangle.c: Remove a reference to the MIPS -mint64 option.
5590 2005-05-07 Kazu Hirata <kazu@cs.umass.edu>
5592 * decl.c (wrapup_globals_for_namespace): Use VEC instead of
5594 * name-lookup.c (add_decl_to_level, begin_scope): Likewise.
5595 * name-lookup.h (cp_binding_level): Change the type of
5596 static_decls to VEC(tree,gc)*.
5598 * mangle.c (globals): Change the type of substitutions to
5600 (dump_substitution_candidates, add_substitution,
5601 find_substitution, finish_mangling, init_mangle): Use VEC
5604 2005-05-06 Kazu Hirata <kazu@cs.umass.edu>
5606 * decl2.c (spew_debug): Remove.
5608 * decl2.c (ssdf_decls, start_static_storage_duration_function,
5609 generate_ctor_or_dtor_function): Use VEC instead of VARRAY.
5611 * decl2.c (pending_statics, note_vague_linkage_var,
5612 cp_finish_file): Use VEC instead of VARRAY.
5613 (pending_statics_used): Remove.
5615 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
5617 * decl2.c (deferred_fns, note_vague_linkage_fn,
5618 cp_finish_file): Use VEC instead of VARRAY.
5620 2005-05-05 Mark Mitchell <mark@codesourcery.com>
5623 * pt.c (build_non_dependent_expr): Use is_overloaded_fn.
5625 2005-05-05 Kazu Hirata <kazu@cs.umass.edu>
5627 * pt.c: Fix a comment typo.
5629 2005-05-04 Kazu Hirata <kazu@cs.umass.edu>
5631 * cp-tree.h (language_function): Change the type of
5632 x_local_names to VEC.
5633 * decl.c (push_local_name): Adjust uses of local_names.
5635 2005-05-03 Kazu Hirata <kazu@cs.umass.edu>
5637 * friend.c, lex.c, mangle.c, repo.c: Update copyright.
5639 2005-05-02 Kazu Hirata <kazu@cs.umass.edu>
5641 * class.c (local_classes, init_class_processing): Use VEC
5643 * cp-tree.h (local_classes): Likewise.
5644 * mangle.c (discriminator_for_local_entity): Likewise.
5645 * name-lookup.c (pushtag): Likewise.
5647 * class.c (current_lang_depth, push_lang_context,
5648 pop_lang_context): Use VEC instead of VARRAY.
5649 * cp-tree.h (saved_scope): Use VEC for lang_base instead of
5651 * name-lookup.c (push_to_top_level): Use VEC instead of
5654 2005-05-02 Paolo Bonzini <bonzini@gnu.org>
5656 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin
5657 for BUILT_IN_MD built-ins.
5659 2005-05-02 Michael Matz <matz@suse.de>
5662 * cp-tree.h (cp_tree_index): Remove CPTI_NULL, to be defined in C
5664 (null_node): Remove.
5665 * lex.c (cxx_init): Move null_node initialisation to C common frontend.
5667 2005-04-25 Ian Lance Taylor <ian@airs.com>
5669 * cp-tree.def: Add EXPR_STMT.
5670 * cp-tree.h (cp_stmt_codes): Add EXPR_STMT.
5671 (EXPR_STMT_EXPR): Define.
5672 * cp-gimplify.c: Include "flags.h".
5673 (gimplify_expr_stmt): New static function.
5674 (cp_gimplify_expr): Handle EXPR_STMT.
5675 * cxx-pretty-print.c (pp_cxx_statement): Use pp_cxx_expression
5676 rather than pp_expression.
5677 (pp_cxx_statement): Handle EXPR_STMT.
5678 * dump.c (cp_dump_tree): Handle EXPR_STMT.
5679 * lex.c (cxx_init): Don't use c_common_stmt_codes in stmt_codes
5682 2005-04-25 Andrew Pinski <pinskia@physics.uc.edu>
5685 * rtti.c (ifnonnull): Cast the zero comparison operand
5686 to the correct type.
5688 2005-04-24 Jakub Jelinek <jakub@redhat.com>
5691 * class.c: Include cgraph.h.
5692 (cp_fold_obj_type_ref): Set node->local.vtable_method.
5693 * Make-lang.in (cgraph.o): Depend on $(CGRAPH_H).
5695 2005-04-12 Markus F.X.J. Oberhumer <markus@oberhumer.com>
5697 * mangle.c (write_builtin_type): Handle integer types which are
5698 not one of the shared integer type nodes and emit a "vendor
5699 extended builtin type" with an encoding in the form of "u5int96".
5701 2005-04-24 Ian Lance Taylor <ian@airs.com>
5703 * cp-tree.def (USING_STMT): Change class to tcc_statement.
5704 (TRY_BLOCK, EH_SPEC_BLOCK, HANDLER, CLEANUP_STMT): Likewise.
5705 (IF_STMT, FOR_STMT, WHILE_STMT, DO_STMT): Likewise.
5706 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
5708 2005-04-23 DJ Delorie <dj@redhat.com>
5710 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, friend.c,
5711 init.c, lex.c, mangle.c, method.c, name-lookup.c, parser.c,
5712 repo.c, rtti.c, tree.c, typeck.c, typeck2.c: Adjust warning()
5715 2005-04-22 Per Bothner <per@bothner.com>
5717 * decl.c (make_rtl_for_nonlocal_decl): Don't try get_fileinfo if
5718 input_filename is NULL, as it is for (say) __PRETTY_FUNCTION__.
5720 2005-04-22 Alexandre Oliva <aoliva@redhat.com>
5723 * name-lookup.c (push_overloaded_decl): Do not overload with
5724 non-duplicate anticipated built-in.
5726 2005-04-21 Kazu Hirata <kazu@cs.umass.edu>
5728 * cp-tree.h (THROW_NAME, AUTO_VTABLE_NAME, AUTO_TEMP_FORMAT,
5729 VTABLE_BASE, VTABLE_NAME_PREFIX, STATIC_NAME_FORMAT): Remove.
5731 2005-04-21 Nathan Sidwell <nathan@codesourcery.com>
5733 * cp-tree.h: Adjust for new VEC API.
5734 Define VEC(tree_pair_s,gc).
5735 (struct save_scope): Adjust.
5736 (struct lang_type_class): Adjust.
5737 (unemitted_tinfo_decls): Adjust.
5738 * class.c (add_method, resort_type_method_vec,
5739 finish_struct_methods, struct find_final_overrider_data,
5740 dfs_find_final_overrider_pre, find_final_overrider,
5741 get_vcall_index, warn_hidden, walk_subobject_offsets,
5742 check_methods, fixup_inline_methods, end_of_class,
5743 warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
5744 add_vcall_offset): Adjust.
5745 * decl.c (xref_basetypes, finish_method): Adjust.
5746 * decl2.c (check_classfn): Adjust.
5747 * init.c (sort_mem_initializers, push_base_cleanups): Adjust.
5748 * method.c (do_build_copy_constructor): Adjust.
5749 * name-lookup.c (new_class_binding, store_binding,
5750 store_bindings, store_class_bindings): Adjust.
5751 * name-lookup.h: Define VEC(cxx_saved_binding,gc),
5752 VEC(cp_class_binding,gc).
5753 (struct cp_binding_level): Adjust.
5754 * parser.c: Define VEC(cp_token_position,heap).
5755 (struct cp_lexer): Adjust.
5756 (cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
5757 cp_lexer_save_tokens): Adjust.
5758 * pt.c (retrieve_specialization,
5759 check_explicit_specialization): Adjust.
5760 * rtti.c (unemitted_tinfo_decls): Adjust.
5761 (init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
5762 get_pseudo_ti_desc): Adjust.
5763 * search.c (dfs_access_in_type, lookup_conversion_operator,
5764 lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
5765 dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
5766 * semantics.c: Define VEC(deferred_access,gc).
5767 (push_deferring_access_checks): Adjust.
5768 * typeck2.c (abstract_virtuals_error): Adjust.
5770 2005-04-20 Ian Lance Taylor <ian@airs.com>
5772 * cp-tree.def: Add STMT_EXPR.
5773 * cp-tree.h (STMT_EXPR_NO_SCOPE): Define.
5774 (STMT_EXPR_STMT): Define.
5775 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
5777 (pp_cxx_expression): Likewise.
5778 (pp_cxx_statement): Call pp_cxx_statement, not pp_statement.
5779 * dump.c (cp_dump_tree): Handle STMT_EXPR.
5781 2005-04-18 Kazu Hirata <kazu@cs.umass.edu>
5783 * decl.c (expand_static_init): Call build2 and build3 instead
5786 * cp-tree.h (VPTR_NAME, VPTR_NAME_P): Remove.
5788 2005-04-17 Ian Lance Taylor <ian@airs.com>
5790 * cp-tree.def: Add SIZEOF_EXPR, ARROW_EXPR and ALIGNOF_EXPR.
5791 * cxx-pretty-print.c (pp_cxx_postfix_expression): Handle
5793 (pp_cxx_unary_expression): Handle SIZEOF_EXPR and ALIGNOF_EXPR.
5794 (pp_cxx_expression): Handle ARROW_EXPR, SIZEOF_EXPR, and
5796 * typeck.c (cxx_sizeof_or_alignof_type): Update call to
5797 c_sizeof_or_alignof_type for change in parameter type.
5799 2005-04-16 Mark Mitchell <mark@codesourcery.com>
5802 * typeck.c (cxx_sizeof_or_alignof_type): Check whether the type to
5803 which sizeof/alignof is dependent, rather than just whether we are
5804 processing_template_decl.
5806 2005-04-17 Kazu Hirata <kazu@cs.umass.edu>
5808 * cp-tree.h (LOOKUP_GLOBAL): Remove.
5809 (LOOKUP_ONLYCONVERTING, DIRECT_BIND, LOOKUP_NO_CONVERSION,
5810 LOOKUP_DESTRUCTOR, LOOKUP_NO_TEMP_BIND, LOOKUP_PREFER_TYPES,
5811 LOOKUP_PREFER_NAMESPACES, LOOKUP_CONSTRUCTOR_CALLABLE): Adjust
5814 2005-04-15 Richard Henderson <rth@redhat.com>
5817 * semantics.c (finish_call_expr): Call resolve_overloaded_builtin.
5819 2005-04-15 Kazu Hirata <kazu@cs.umass.edu>
5821 * cp-tree.h (lang_type_class): Remove redefined. Move
5822 java_interface into where redefined was. Increment the width
5824 (TYPE_REDEFINED): Remove.
5826 2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
5828 * cp-tree.h (SET_TMPL_ARG, ENUM_TI_TEMPLATE, ENUM_TI_ARGS,
5829 CLASSTYPE_TEMPLATE_LEVEL): Remove.
5831 2005-04-11 Mark Mitchell <mark@codesourcery.com>
5833 * decl2.c (determine_visibility): Don't use export_class_data.
5834 (import_export_decl): Honor TARGET_CXX_CLASS_DATA_ALWAYS_WEAK and
5835 TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY.
5837 2005-04-09 Kazu Hirata <kazu@cs.umass.edu>
5839 * cp-tree.h (cxx_alignof): Remove.
5841 * cp-tree.h (DECL_ARRAY_DELETE_OPERATOR_P): Remove.
5843 * cp-tree.h (EXCEPTION_CLEANUP_NAME, B_SET, B_CLR, B_TST,
5844 CONV_STATIC_CAST): Remove.
5846 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Remove.
5848 * cp-tree.h (VF_BINFO_VALUE, VF_BASETYPE_VALUE): Remove.
5850 * cp-tree.h (cp_deprecated): Remove.
5852 2005-04-08 Ian Lance Taylor <ian@airs.com>
5854 * cp-tree.def: Define FOR_STMT, WHILE_STMT, DO_STMT, BREAK_STMT,
5855 CONTINUE_STMT, SWITCH_STMT.
5856 * cp-tree.h (cp_stmt_codes): Add FOR_STMT, WHILE_STMT, DO_STMT,
5857 BREAK_STMT, CONTINUE_STMT, SWITCH_STMT.
5858 (WHILE_COND, WHILE_BODY): Define.
5859 (DO_COND, DO_BODY): Define.
5860 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): Define.
5861 (SWITCH_STMT_COND, SWITCH_STMT_BODY, SWITCH_STMT_TYPE): Define.
5862 * cp-gimplify.c (enum bc_t): Define.
5863 (struct cp_gimplify_ctx, ctxp): Define.
5864 (push_context, pop_context): New static functions.
5865 (begin_bc_block, finish_bc_block): New static functions.
5866 (build_bc_goto): New static function.
5867 (gimplify_cp_loop, gimplify_for_stmt): New static functions.
5868 (gimplify_while_stmt, gimplify_do_stmt): Likewise.
5869 (gimplify_switch_stmt): Likewise.
5870 (cp_gimplify_expr): Handle FOR_STMT, WHILE_STMT, DO_STMT,
5871 SWITCH_STMT, CONTINUE_STMT, BREAK_STMT.
5872 (cp_genericize): Call push_context and pop_context.
5873 * semantics.c (finish_break_stmt): Just call build_stmt
5874 (BREAK_STMT) rather than build_break_stmt.
5875 (finish_continue_stmt): Corresponding change.
5876 * decl.c (pop_switch): Update call to c_do_switch_warnings for new
5878 * cxx-pretty-print.c (pp_cxx_statement): Handle SWITCH_STMT,
5879 WHILE_STMT, DO_STMT, FOR_STMT, BREAK_STMT, CONTINUE_STMT.
5880 * dump.c (cp_dump_tree): Likewise.
5882 2005-04-08 Mark Mitchell <mark@codesourcery.com>
5885 * parser.c (cp_parser_type_specifier_seq): Add is_condition
5887 (cp_parser_new_type_id): Pass it.
5888 (cp_parser_condition): Likewise.
5889 (cp_parser_conversion_type_id): Likewise.
5890 (cp_parser_type_id): Likewise.
5891 (cp_parser_type_specifier_seq): In a condition, do not allow
5892 invalid type-specifier combinations.
5893 (cp_parser_exception_declaration): Adjust call to
5894 cp_parser_type_specifier_seq.
5896 * cp-tree.def (TINST_LEVEL): Document TINST_IN_SYSTEM_HEADER_P.
5897 * cp-tree.h (struct tinst_level): Add in_system_header_p.
5898 (TINST_IN_SYSTEM_HEADER_P): New macro.
5899 (make_tinst_level): Remove.
5900 * pt.c (lookup_template_class): Preserve DECL_IN_SYSTEM_HEADER on
5901 the instantiated class.
5902 (push_tinst_level): Do not use make_tinst_level. Set
5903 TINST_IN_SYSTEM_HEADER_P.
5904 (pop_tinst_level): Likewise.
5905 (instantiate_class_template): Set in_system_header.
5906 (instantiate_pending_templates): Likewise.
5907 * tree.c (make_tinst_level): Remove.
5909 2005-04-06 Joseph S. Myers <joseph@codesourcery.com>
5911 * decl.c (start_decl): Apply pending #pragma weak regardless of
5914 2005-04-06 Mark Mitchell <mark@codesourcery.com>
5917 * pt.c (regenerate_decl_from_template): Copy attributes for
5918 parameters from the pattern to the instantiation.
5920 2005-04-05 Mark Mitchell <mark@codesourcery.com>
5923 * cp-tree.def (OFFSET_REF): Correct comments.
5924 * init.c (build_offset_ref): Remove misleading comment.
5925 * typeck.c (build_unary_op): Handle pointer-to-member creation
5926 here, rather than ...
5927 (unary_complex_lvalue): ... here.
5929 2005-04-06 Jason Merrill <jason@redhat.com>
5932 * tree.c (stabilize_init): Don't bother trying to stabilize
5933 something with no side-effects.
5935 2005-04-05 Mark Mitchell <mark@codesourcery.com>
5938 * decl.c (grokdeclarator): Correct attribute handling.
5940 2005-04-05 Mark Mitchell <mark@codesourcery.com>
5943 * decl2.c (import_export_decl): Use non-COMDAT external linkage
5944 for virtual tables, typeinfo, etc. that will be emitted in only
5945 one translation unit on systems without weak symbols.
5947 2005-04-04 Mark Mitchell <mark@codesourcery.com>
5950 * parser.c (cp_parser_template_name): Fix thinko.
5952 2005-04-04 Nathan Sidwell <nathan@codesourcery.com>
5955 * method.c (use_thunk): Protect covariant pointer return
5956 adjustments from NULL pointers.
5958 2005-04-04 Jan Hubicka <jh@suse.cz>
5960 * decl2.c (finish_objects): Revert my previous patch.
5961 (cp_finish_file): Likewise.
5963 2005-04-03 Kazu Hirata <kazu@cs.umass.edu>
5965 * pt.c: Fix comment typos.
5967 2005-04-03 Nathan Sidwell <nathan@codesourcery.com>
5970 * pt.c (more_specialized_fn): Member functions are unordered wrt
5971 non-members. Conversion operators are unordered wrt other
5974 2005-04-01 Nathan Sidwell <nathan@codesourcery.com>
5976 * call.c (add_template_candidates_real): Remove length parameter
5977 from fn_type_unification call.
5978 * class.c (resolve_address_of_overloaded_function): Likewise
5979 * cp-tree.h (fn_type_unification): Remove length parameter.
5980 * pt.c (get_bindings_overload): Remove.
5981 (get_bindings_real): Rename to ...
5982 (get_bindings): ... here. Remove length and strict
5983 parameters. Change return type flag to boolean. Remove original
5984 forwarding function.
5985 (determine_specialization): Adjust get_bindings call.
5986 (fn_type_unification): Remove length parameter. Adjust.
5987 (type_unification_real): Remove length parameter. Adjust.
5988 (resolve_overloaded_unification): Adjust get_bindings call.
5989 (try_one_overload): Simplify confusing cascaded if control flow.
5990 (unify): Remove length paramter from type_unification_real call.
5991 (most_specialized_instantiation): Adjust get_bindings calls.
5992 (most_specialized): Likewise.
5994 2005-03-31 Nathan Sidwell <nathan@codesourcery.com>
5996 PR c++/19203, implement DR 214
5997 * call.c (joust): Use more_specialized_fn.
5998 * cp-tree.h (DEDUCE_ORDER): Remove.
5999 (more_specialized): Replace with ...
6000 (more_specialized_fn): ... this.
6001 * pt.c (maybe_adjust_types_for_deduction): Remove DEDUCE_ORDER
6003 (type_unification_real): Remove DEDUCE_ORDER case.
6004 (more_specialized): Replace with ...
6005 (more_specialized_fn): ... this. Implement DR 214.
6006 (most_specialized_instantiation): Use get_bindings_real directly.
6008 2005-03-31 Gabriel Dos Reis <gdr@integrable-solutions.net>
6011 * call.c (build_new_op): Remove check for -Wsynth.
6013 2005-03-31 Jan Hubicka <jh@suse.cz>
6015 * decl2.c (finish_objects): Mark ctor as needed.
6016 (cp_finish_file): Output variables only in nonunit-at-a-time.
6018 2005-03-29 Richard Henderson <rth@redhat.com>
6021 * decl.c (cp_complete_array_type): Rename from complete_array_type.
6022 Use the new complete_array_type in c-common.c. Update all callers.
6023 * cp-tree.h (cp_complete_array_type): Update to match.
6025 2005-03-24 Geoffrey Keating <geoffk@apple.com>
6027 * typeck.c (build_static_cast_1): Allow scalar_cast between
6028 any integral, floating, or enumeration type.
6030 2005-03-24 Steven Bosscher <stevenb@suse.de>
6032 * typeck.c (comptypes): First determine if the types are compatible
6033 from a target-independent point of view. Check target attributes
6036 * class.c (build_base_path):
6037 (build_vbase_offset_vtbl_entries):
6038 (add_vcall_offset): Replace fold (buildN (...)) with fold_buildN.
6039 * error.c (dump_expr): Likewise.
6040 * init.c (build_zero_init, expand_cleanup_for_base,
6041 build_vec_delete_1): Likewise.
6042 * mangle.c (write_integer_cst): Likewise.
6043 * method.c (thunk_adjust): Likewise.
6044 * pt.c (convert_nontype_argument, tsubst, unify): Likewise.
6045 * tree.c (cxx_print_statistics, array_type_nelts_total): Likewise.
6046 * typeck.c (build_ptrmemfunc_access_expr,
6047 (get_member_function_from_ptrfunc): Likewise.
6049 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
6051 * cp-objcp-common.h (LANG_HOOKS_TRUTHVALUE_CONVERSION): Remove.
6053 2005-03-23 Joseph S. Myers <joseph@codesourcery.com>
6055 * cp-tree.h (perform_integral_promotions): Remove.
6056 (default_conversion): Add.
6058 2005-03-22 Mark Mitchell <mark@codesourcery.com>
6060 * parser.c (cp_parser_warn_min_max): New function.
6061 (cp_parser_binary_expression): Use it.
6062 (cp_parser_assignment_operator_opt): Likewise.
6063 (cp_parser_operator): Likewise.
6065 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6068 * decl.c (start_preparsed_function): Robustify.
6070 2005-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6073 * parser.c (cp_parser_class_head): Return NULL_TREE when
6074 encountering a redefinition.
6076 2005-03-22 Nathan Sidwell <nathan@codesourcery.com>
6080 * typeck.c (build_ptrmemfunc): Allow OFFSET_REF when processing a
6083 2005-03-21 Paolo Carlini <pcarlini@suse.de>
6087 * init.c (emit_mem_initializers): Don't crash on undefined
6090 2005-03-21 Paolo Carlini <pcarlini@suse.de>
6093 * semantics.c (finish_stmt_expr_expr): Return immediately
6094 if error_operand_p (expr).
6096 2005-03-21 Joseph S. Myers <joseph@codesourcery.com>
6098 * cp-tree.h (lvalue_or_else, lvalue_p): New.
6099 * typeck.c (lvalue_or_else): New. Call lvalue_error.
6101 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6104 * decl.c (decls_match): Compare context of VAR_DECL.
6106 2005-03-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6109 * parser.c (cp_parser_postfix_expression) <case RID_TYPENAME>:
6110 Check the return value of cp_parser_nested_name_specifier.
6112 2005-03-18 Dale Johannesen <dalej@apple.com>
6114 * cp/tree.c (cp_tree_equal): Handle SSA_NAME.
6116 2005-03-18 Paolo Carlini <pcarlini@suse.de>
6119 * parser.c (cp_parser_diagnose_invalid_type_name):
6120 Check TYPE_BINFO (current_class_type) before attempting
6121 to emit inform messages.
6123 2005-03-17 Paolo Carlini <pcarlini@suse.de>
6126 * cp-tree.h (grok_op_properties): Change return type to void.
6127 * decl.c (grok_op_properties): Return early - don't check the
6128 arity - in case of a static member or an operator that cannot
6129 be non-member; tidy a bit.
6131 2005-03-17 Nathan Sidwell <nathan@codesourcery.com>
6134 * pt.c (contains_dependent_cast_p): Remove.
6135 (fold_non_dependent_expr): Don't use it.
6136 (value_dependent_expression_p): Use a switch statement.
6137 reference_exprs can be dependent.
6139 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6143 * name-lookup.c (pushtag): Skip template parameter scope when
6144 scope is ts_global. Don't push tag into template parameter
6146 * pt.c (instantiate_class_template): Reorder friend class
6147 template substitution to handle non-dependent friend class
6148 that hasn't been previously declared.
6150 2005-03-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6152 Friend class name lookup 5/n
6154 * cp-tree.h (pushtag): Adjust declaration.
6155 * decl.c (lookup_and_check_tag): Call lookup_type_scope if
6157 (xref_tag): Adjust call to pushtag. Make hidden class visible.
6158 (start_enum): Adjust call to pushtag.
6159 * name-lookup.c (ambiguous_decl): Ignore hidden names.
6160 (qualify_lookup): Change return type to bool.
6161 (hidden_name_p): New function.
6162 (lookup_namespace_name, unqualified_namespace_lookup,
6163 lookup_name_real): Use it.
6164 (lookup_type_scope): Update comments.
6165 (maybe_process_template_type_declaration): Change parameter name
6166 from globalize to is_friend.
6167 (pushtag): Change globalize parameter of type int to tag_scope.
6168 Hide name if introduced by friend declaration.
6169 * name-lookup.h (hidden_name_p): Add declaration.
6170 * parser.c (cp_parser_lookup_name): Don't deal with hidden name
6172 * pt.c (push_template_decl_real): Make hidden class template
6174 (lookup_template_class, instantiate_class_template): Adjust call
6176 * semantics.c (begin_class_definition): Likewise.
6177 * rtti.c (init_rtti_processing, build_dynamic_cast_1,
6178 tinfo_base_init, emit_support_tinfos): Use ts_current instead of
6181 2005-03-13 Mark Mitchell <mark@codesourcery.com>
6184 * pt.c (determine_specialization): Reject non-specializations.
6186 2005-03-11 Per Bothner <per@bothner.com>
6188 * cp-tree.h (struct cp_declarator): New id_loc field.
6189 * cp/parser.c (cp_lexer_get_preprocessor_token): Set cp_token's
6190 location using c_lex_with_flags, instead of input_location.
6191 (cp_parser_direct_declarator): Set declarator's id_loc from
6194 2005-03-10 Jakub Jelinek <jakub@redhat.com>
6196 PR c++/18384, c++/18327
6197 * decl.c (reshape_init_array): Use UHWI type for max_index_cst
6198 and index. Convert max_index to size_type_node if it isn't
6199 host_integerp (, 1).
6201 2005-03-09 Mark Mitchell <mark@codesourcery.com>
6204 * pt.c (tsubst_decl): Apply array-to-pointer and
6205 function-to-pointer conversions to function arguments.
6206 (regenerate_decl_from_template): Likewise.
6208 2005-03-09 Paolo Carlini <pcarlini@suse.de>
6211 * decl.c (complete_array_type): In pedantic mode, return
6212 3 for an empty initializer list as the initializer for an
6213 array of unknown bound (8.5.1/4).
6214 (maybe_deduce_size_from_array_init): Fix final test to use
6217 2005-03-08 Nathan Sidwell <nathan@codesourcery.com>
6220 * pt.c (contains_dependent_cast_p): New.
6221 (fold_non_dependent_expr): Call it.
6223 2005-03-08 Mark Mitchell <mark@codesourcery.com>
6226 * cp-tree.h (target_type): Remove.
6227 * decl.c (layout_var_decl): Remove #if 0'd code.
6228 (cp_finish_decl): Remove dead code.
6229 * init.c (build_vec_init): When determining whether or not the
6230 element type has an asignment operator, look through all array
6232 * typeck.c (target_type): Remove.
6234 2005-03-07 Mark Mitchell <mark@codesourcery.com>
6236 * class.c (finish_struct_1): Do not warn about non-virtual
6237 destructors in Java classes.
6239 2005-03-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6242 * init.c (build_offset_ref): Don't build non-dependent SCOPE_REF.
6243 * pt.c (build_non_dependent_expr): Don't build NON_DEPENDENT_EXPR
6245 * typeck.c (build_x_unary_op): Don't build non-dependent SCOPE_REF.
6246 Also set PTRMEM_OK_P for NON_DEPENDENT_EXPR.
6247 (build_unary_op): Handle building ADDR_EXPR of OFFSET_REF inside
6250 2005-03-02 Alexandre Oliva <aoliva@redhat.com>
6252 * name-lookup.c (push_overloaded_decl): Don't error if the new
6253 decl matches the old one.
6254 * decl.c (redeclaration_error_message): Likewise.
6256 2005-03-01 Per Bothner <per@bothner.com>
6258 * decl.c (finish_function): Use SET_EXPR_LOCATION instead of
6259 unavailable annotate_with_file_line, if USE_MAPPED_LOCATION.
6261 2005-03-01 Nathan Sidwell <nathan@codesourcery.com>
6264 * class.c (update_vtable_entry_for_fn): Don't crash on invalid
6267 * cp-tree.g (THUNK_TARGET): Expand comment.
6268 * method.c (use_thunk): Make sure we also use the target, if that
6271 2005-02-27 Jakub Jelinek <jakub@redhat.com>
6274 * decl.c (cxx_comdat_group): Put thunks for
6275 TARGET_USE_LOCAL_THUNK_ALIAS_P (function) functions into the same
6276 comdat group as the thunk target.
6278 2005-02-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6280 * call.c, class.c, cp-tree.h, decl2.c, error.c, init.c, mangle.c,
6281 parser.c: Fix comment typo(s).
6283 2005-02-24 Jakub Jelinek <jakub@redhat.com>
6286 * decl.c (reshape_init): Don't warn about missing braces if STRING_CST
6287 initializes a char/wchar_t array.
6289 2005-02-23 Mark Mitchell <mark@codesourcery.com>
6292 * decl.c (grokvardecl): Set DECL_INTERFACE_KNOWN for declarations
6293 with internal linkage.
6295 2005-02-23 Alexandre Oliva <aoliva@redhat.com>
6297 * decl.c (grokvardecl): Don't exempt anonymous types from having
6298 linkage for variables that have linkage other than "C".
6300 2005-02-23 Kazu Hirata <kazu@cs.umass.edu>
6302 * cp-objcp-common.h, error.c: Update copyright.
6304 2005-02-22 Mark Mitchell <mark@codesourcery.com>
6307 * decl.c (start_decl_1): Don't clear TREE_READONLY.
6308 (cp_finish_decl): Likewise.
6309 (complete_vars): Call cp_apply_type_quals_to_decl.
6310 * typeck.c (cp_apply_type_quals): Avoid setting TREE_READONLY in
6311 cases where that's not valid.
6314 * init.c (integral_constant_value): Iterate if the value of a decl
6315 is itself a constant.
6318 * parser.c (cp_parser_class_head): Check for redefintions here.
6319 * semantics.c (begin_class_definition): Not here.
6322 * decl2.c (build_anon_union_vars): Add type parameter.
6323 (finish_anon_union): Pass it.
6326 * error.c (dump_expr): Do not print the body of a BIND_EXPR.
6327 Handle STATEMENT_LIST.
6330 * parser.c (cp_parser_direct_declarator): Always complain about
6331 non-constant array bounds when in a function scope.
6332 * semantics.c (finish_id_expression): Do not mark dependent names
6335 2005-02-21 Douglas Gregor <dgregor@cs.indiana.edu>
6339 * cp-tree.h (cp_apply_type_quals_to_decl): Declared.
6340 * decl.c (grokdeclarator): Pedwarn about qualifying a function
6342 Add qualifiers when declaring a typedef of a function type.
6343 Member function pointers pick up the qualifiers of the typedef
6344 used to declare them.
6345 Don't complain about creating cv-qualified function types.
6346 Complain about qualified function typedefs that are used to
6347 declare non-static member functions or free functions.
6348 Use cp_apply_type_quals_to_decl.
6349 (start_preparsed_function): Use cp_apply_type_quals_to_decl.
6350 (grokclassfn): Use cp_apply_type_quals_to_decl.
6351 * error.c (dump_type_suffix): Print qualifiers for function
6353 * pt.c (tsubst_decl): Use cp_apply_type_quals_to_decl.
6354 (tsubst): When substituting a function type into a member
6355 pointer type, pass along the qualifiers.
6356 (unify): Unify member pointers to member function pointers.
6357 * tree.c (cp_build_qualified_type_real): Function types may be
6358 qualified. This includes restrict qualifiers.
6359 * typeck.c (cp_apply_type_quals_to_decl): New function to replace
6360 use of c_apply_type_quals_to_decl. Drops qualifiers that are being
6361 added to function types.
6363 2005-02-20 Zack Weinberg <zack@codesourcery.com>
6366 * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to
6367 c_common_to_target_charset. Delete bogus comment.
6369 2005-02-18 Richard Henderson <rth@redhat.com>
6372 * except.c (do_get_exception_ptr): New.
6373 (expand_start_catch_block): Use it.
6375 2005-02-19 Jakub Jelinek <jakub@redhat.com>
6377 * decl.c (start_decl_1): Only check TYPE_NEEDS_CONSTRUCTING
6378 if type is not error_mark_node.
6380 2005-01-20 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6383 * decl2.c (grokfield): Do not apply attributes to template parameters
6384 as they are ignored by tsubst anyway.
6386 2005-02-18 Jakub Jelinek <jakub@redhat.com>
6389 * decl.c (start_decl_1): Clear TREE_READONLY flag if
6390 its type has TYPE_NEEDS_CONSTRUCTING.
6391 (complete_vars): Likewise.
6393 2005-02-17 Alexandre Oliva <aoliva@redhat.com>
6396 * class.c (finish_struct): Initialize TYPE_SIZE_UNIT of a
6397 template along with TYPE_SIZE.
6400 * semantics.c (perform_deferred_access_checks): Use
6401 get_deferred_access_checks to get the top of the stack.
6403 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
6406 * class.c (add_implicitly_declared_members, check_field_decl)
6407 (check_field_decls, check_bases): Remove arguments, tests and
6408 assignments of cant_have_default_ctor-related variables.
6410 2005-02-15 Alexandre Oliva <aoliva@redhat.com>
6412 * decl2.c (mark_used): Set the source location of the used decl to
6413 the current input location here...
6414 * method.c (synthesize_method): ... not here. Set input_location
6415 from the decl instead.
6417 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
6420 * parser.c (cp_parser_late_parsing_for_member): Use
6421 current_function_decl as scope to push to and from.
6424 * pt.c (check_explicit_specialization): Make sure namespace
6425 binding lookup found an overloaded function.
6426 (lookup_template_function): Just assert FNS is an overloaded
6430 * decl.c (grokdeclarator): Check for error mark node in ptrmem
6433 2005-02-14 Alexandre Oliva <aoliva@redhat.com>
6436 * decl.c (redeclaration_error_message): Report redefinition of
6437 pure virtual function.
6439 2005-02-14 Nathan Sidwell <nathan@codesourcery.com>
6442 * class.c (build_simple_base_path): Build the component_ref
6444 (update_vtable_entry_for_fn): Walk the covariant's binfo chain
6445 rather than using lookup_base.
6446 * search.c (dfs_walk_once): Add non-recursive assert check.
6447 * typeck.c (build_class_member_access_expr): It is possible for
6448 the member type to be both const and volatile.
6450 2005-02-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6454 * pt.c (maybe_check_template_type): Remove.
6455 * cp-tree.h (maybe_check_template_type): Remove prototype.
6456 * name-lookup.c (maybe_process_template_type_declaration): Don't
6457 use maybe_check_template_type.
6459 2005-02-11 Richard Henderson <rth@redhat.com>
6462 * pt.c (get_mostly_instantiated_function_type): Save and restore
6463 flag_access_control instead of push/pop_access_scope.
6465 2005-02-10 Mark Mitchell <mark@codesourcery.com>
6468 * decl.c (reshape_init): Issue warnings about missing braces.
6470 2005-02-11 Kazu Hirata <kazu@cs.umass.edu>
6472 * cp-tree.def, except.c, ptree.c: Update copyright.
6474 2005-02-09 Mark Mitchell <mark@codesourcery.com>
6477 * call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
6478 attempting name lookup.
6480 * parser.c (cp_parser_unqualified_id): Initialize type_decl.
6483 * call.c (initialize_reference): Robustify.
6486 * decl.c (grokdeclarator): Check for invalid use of destructor
6490 * parser.c (cp_parser_unqualified_id): Avoid creating destructor
6491 names with invalid types.
6494 * parser.c (cp_parser_direct_declarator): Allow type-dependent
6495 expressions as array bounds.
6498 * parser.c (cp_parser_attributes_list): Allow empty lists.
6500 2005-02-08 Mark Mitchell <mark@codesourcery.com>
6503 * class.c (add_method): Don't set TYPE_HAS_DESTRUCTOR.
6504 (check_bases): Give warnings about a base class with a
6505 non-virtual destructor, even if it is implicit.
6506 (finish_struct_bits): Don't copy TYPE_HAS_DESTRUCTOR.
6507 (maybe_warn_about_overly_private_class): Don't use
6508 TYPE_HAS_DESTRUCTOR.
6509 (finish_struct_methods): Don't set TYPE_HAS_DESTRUCTOR.
6510 (check_for_override): Give it external linkage.
6511 (add_implicitly_declared_members): Generate destructors lazily.
6512 (check_field_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
6513 TYPE_HAS_DESTRUCTOR.
6514 (check_bases_and_members): Call check_methods before
6516 (check_bases_and_members): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR, not
6517 TYPE_HAS_DESTRUCTOR.
6518 (finish_struct_1): Do not use TYPE_HAS_DESTRUCTOR.
6519 * cp-tree.def (PSEUDO_DTOR_EXPR): Document.
6520 * cp-tree.h (TYPE_HAS_DESTRUCTOR): Remove.
6521 (lang_type_class): Add lazy_destructor.
6522 (CLASSTYPE_LAZY_DESTRUCTOR): New macro.
6523 (CLASSTYPE_DESTRUCTORS): Robustify.
6524 (TYPE_HAS_DESTRUCTOR): Remove.
6525 (check_for_override): Declare.
6526 (build_vbase_delete): Remove.
6527 * cvt.c (convert_to_void): Issue errors about pseudo-destructor
6529 * decl.c (cxx_maybe_build_cleanup): Remove dead code.
6530 * except.c (dtor_nothrow): Lazily create destructors if necessary.
6531 (build_throw): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6532 * init.c (build_delete): Lazily create destructors, if necessary.
6533 (build_vbase_delete): Remove.
6534 * method.c (locate_dtor): Simplify.
6535 (implicitly_declare_fn): Add support for destructors.
6536 * parser.c (cp_parser_lookup_name): Lazily create destructors, if
6538 * pt.c (check_explicit_specialization): Don't use
6539 TYPE_HAS_DESTRUCTOR.
6540 (instantiate_class_template): Likewise.
6541 * ptree.c (cxx_print_type): Don't print TYPE_HAS_DESTRUCTOR.
6542 * rtti.c (emit_support_tinfos): Robustify.
6543 * search.c (lookup_fnfields_1): Lazily create destructors.
6544 * typeck.c (build_class_member_access_expr): Remove
6545 PSEUDO_DTOR_EXPR handling.
6546 (lookup_destructor): Likewise.
6548 2005-02-08 Kazu Hirata <kazu@cs.umass.edu>
6550 * cxx-pretty-print.c, cxx-pretty-print.h, decl.h: Update
6553 2005-02-07 Mark Mitchell <mark@codesourcery.com>
6555 * parser.c (cp_lexer_start_debugging): Avoid arithmetic operations
6556 on boolean variables.
6557 (cp_lexer_stop_debugging): Likewise.
6559 2005-02-03 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6562 * parser.c (cp_parser_pure_specifier): Emit a specific error
6563 message with an invalid pure specifier.
6564 * decl2.c (grok_function_init): Remove.
6565 (grokfield): An initializer for a method is a always a pure
6568 2005-02-02 Matt Austern <austern@apple.com>
6571 * cp-tree.h (builtin_valid_in_constant_expr_p): Declare.
6572 * parser.c (cp_parser_postfix_expression): Accept function call in
6573 constant expression if builtin_valid_in_constant_expr_p is true
6575 * pt.c (value_dependent_expression_p): Handle CALL_EXPRs properly.
6576 * semantics.c (finish_id_expression): Accept function call in constant
6577 expression if builtin_valid_in_constant_expr_p is true for that
6579 * tree.c (builtin_valid_in_constant_expr_p): New.
6581 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6584 * pt.c (check_instantiated_args): Improve error message.
6585 Fix logic when to print its second part.
6587 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6589 * cp-tree.h (complete_type_or_else): Remove macro.
6590 (complete_type_or_diagnostic): Rename to complete_type_or_else
6591 and remove last argument.
6592 * typeck.c (complete_type_or_diagnostic): Rename to
6593 complete_type_or_else and remove last argument.
6595 2005-02-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6597 * cp-tree.h (commonparms): Remove prototype.
6598 (convert_arguments): Likewise.
6599 (PFN_FROM_PTRMEMFUNC): Remove.
6600 * typeck.c (commonparms): Make static.
6601 (convert_arguments): Add prototype. Make static.
6602 (PFN_FROM_PTRMEMFUNC): Replace by pfn_from_ptrmemfunc.
6604 2005-01-31 Mark Mitchell <mark@codesourcery.com>
6606 * parser.c (cp_parser_primary_expression): Don't complain about
6607 floating-point literals in integral constant expressions when
6610 2005-02-01 Alexandre Oliva <aoliva@redhat.com>
6612 * parser.c (cp_parser_template_id): Revert comment patch too.
6617 * parser.c (cp_parser_template_id): Revert 2004-12-09's patch.
6618 Issue an error when creating the template id.
6619 * pt.c (fn_type_unification): Return early if the explicit
6620 template arg list is an error_mark_node.
6622 2005-01-31 Mark Mitchell <mark@codesourcery.com>
6624 * decl.c (build_enumerator): Do not issue duplicate error messages
6625 about invalid enumeration constants.
6626 * parser.c (cp_parser_non_integral_constant_expression): Always
6627 set parser->non_integral_constant_expression_p.
6628 (cp_parser_primary_expression): Add cast_p parameter. Issue
6629 errors about invalid uses of floating-point literals in
6631 (cp_parser_postfix_expression): Add cast_p parameter.
6632 (cp_parser_open_square_expression): Pass it.
6633 (cp_parser_parenthesized_expression_list): Add cast_p parameter.
6634 (cp_parser_unary_expression): Likewise.
6635 (cp_parser_new_placement): Pass it.
6636 (cp_parser_direct_new_declarator): Likewise.
6637 (cp_parser_new_initializer): Likewise.
6638 (cp_parser_cast_expression): Add cast_p parameter.
6639 (cp_parser_binary_expression): Likewise.
6640 (cp_parser_question_colon_clause): Likewise.
6641 (cp_parser_assignment_expression): Likewise.
6642 (cp_parser_expression): Likewise.
6643 (cp_parser_constant_expression): If an integral constant
6644 expression is invalid, return error_mark_node.
6645 (cp_parser_expression_statement): Pass cast_p.
6646 (cp_parser_condition): Likewise.
6647 (cp_parser_iteration_statement): Likewise.
6648 (cp_parser_jump_statement): Likewise.
6649 (cp_parser_mem_initializer): Likewise.
6650 (cp_parser_template_argument): Likewise.
6651 (cp_parser_parameter_declaration): Likewise.
6652 (cp_parser_initializer): Likewise.
6653 (cp_parser_throw_expression): Likewise.
6654 (cp_parser_attribute_list): Likewise.
6655 (cp_parser_simple_cast_expression): Likewise.
6656 (cp_parser_functional_cast): Likewise.
6657 (cp_parser_late_parsing_default_args): Likewise.
6658 (cp_parser_sizeof_operand): Save/restore
6659 non_integral_constant_expression_p.
6661 2005-01-31 Mike Stump <mrs@apple.com>
6663 * parser.c (cp_lexer_new_main): Get the first token, first, before
6666 2005-01-31 Mark Mitchell <mark@codesourcery.com>
6668 * decl.c (start_decl): Add missing parentheses.
6670 2005-01-30 Mark Mitchell <mark@codesourcery.com>
6673 * cp-tree.h (DECL_USE_TEMPLATE): Expand documentation.
6674 * decl.c (duplicate_decls): Do not discard
6675 DECL_IMPLICIT_INSTANTIATION when merging declarations.
6676 (start_decl): Do not SET_DECL_TEMPLATE_SPECIALIZATION for
6677 variables that do not have DECL_USE_TEMPLATE.
6680 * decl.c (grokdeclarator): Refactor code so that qualified names
6681 are never allowed as the declarator in a typedef.
6684 * name-lookup.c (do_nonmember_using_decl): Avoid overloading
6685 builtin declarations.
6688 * call.c (convert_like_real): Inline call to
6689 dubious_conversion_warnings here.
6690 * cp-tree.h (dubious_conversion_warnings): Remove.
6691 * semantics.c (finish_unary_op_expr): Copy INTEGER_CSTs before
6692 setting TREE_NEGATED_INT.
6693 * typeck.c (dubious_conversion_warnings): Remove.
6696 * name-lookup.c (pushdecl_namespace_level): Avoid accessing free'd
6699 2005-01-28 Mark Mitchell <mark@codesourcery.com>
6702 * parser.c (cp_parser_diagnose_invalid_type_name): Commit to
6706 * pt.c (redeclare_class_template): Robustify.
6708 2005-01-27 Steven Bosscher <stevenb@suse.de>
6710 * decl.c (finish_case_label): Use SWITCH_STMT accessor macros
6711 instead of SWITCH_EXPR ones.
6712 * pt.c (tsubst_expr): Likewise.
6713 * semantics.c (begin_switch_stmt, finish_switch_cond,
6714 finish_switch_stmt): Likewise.
6716 2005-01-26 J"orn Rennecke <joern.rennecke@st.com>
6719 * parser.c (cp_parser_initializer_clause): Initialize *non_constant_p.
6721 2005-01-25 Andrew Pinski <pinskia@physics.uc.edu>
6723 * class.c (abort_fndecl_addr): New variable.
6724 (build_vtbl_initializer): If we have a pure virtual function
6725 share the abort function's address.
6726 Include gt-cp-class.h at the end.
6727 * config-lang.in (gtfiles): Add cp/class.c.
6729 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6731 * cxx-pretty-print.c (pp_cxx_statement): Add prototype. Make static.
6732 (pp_cxx_function_definition): Make static.
6733 * cxx-pretty-print.h (pp_cxx_statement): Remove prototype.
6734 (pp_cxx_function_definition): Likewise.
6736 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6738 * name-lookup.c (print_binding_level): Make static.
6739 (constructor_name_full): Make static inline.
6740 (current_decl_namespace): Make static.
6741 * name-lookup.h (constructor_name_full): Remove prototype.
6742 (print_binding_level): Likewise.
6743 (current_decl_namespace): Likewise.
6745 2005-01-25 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6747 * decl.h (debug_bindings_indentation): Remove.
6749 2005-01-23 Kazu Hirata <kazu@cs.umass.edu>
6751 * typeck.c: Fix a comment typo.
6753 2005-01-21 Giovanni Bajo <giovannibajo@gcc.gnu.org>
6756 * pt.c (fold_decl_constant_value): Always call fold_non_dependent_expr
6758 (tsubst): Use fold_decl_constant_value in place of a bare call to
6759 integral_constant_value.
6761 2005-01-20 Kazu Hirata <kazu@cs.umass.edu>
6763 * typeck.c (more_qualified_p): Remove.
6764 * cp-tree.h: Remove the corresponding prototype.
6766 2005-01-19 Matt Austern <austern@apple.com>
6768 * typeck.c (comptypes): Handle return code from objc_comptypes
6771 2005-01-19 Kazu Hirata <kazu@cs.umass.edu>
6773 * cp-tree.h, name-lookup.h: Remove unused prototypes.
6775 2005-01-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6778 * semantics.c (finish_id_expression): Disable access checking for
6779 already lookuped FIELD_DECL.
6781 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
6783 * decl.c (delete_block): Remove.
6784 * cp-tree.h: Remove the corresponding prototype.
6786 * decl.c (vtable_decl_p, vtype_decl_p, walk_globals_data,
6787 walk_vtables_r, walk_vtables, walk_globals_r, walk_globals):
6789 * cp-tree.h: Remove the corresponding prototypes.
6791 * tree.c (count_functions, bound_pmf_p, cp_is_overload_p,
6792 cp_update_decl_after_saving, name_p): Remove.
6793 * cp-tree.h: Remove the corresponding prototypes.
6795 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
6798 * semantics.c (finish_asm_stmt): Strip nops off
6799 input memory operands.
6801 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
6803 * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
6804 typeck2.c: Update copyright.
6806 2005-01-16 Kazu Hirata <kazu@cs.umass.edu>
6808 * class.c (get_enclosing_class): Remove.
6809 * cp-tree.h: Remove the corresponding prototypes.
6811 * cvt.c (convert_lvalue): Remove.
6812 * cp-tree.h: Remove the corresponding prototype.
6814 * pt.c (tinst_for_decl): Remove.
6815 * cp-tree.h: Remove the corresponding prototypes.
6817 * tree.c (hash_chainon): Remove.
6818 * cp-tree.h: Remove the corresponding prototypes.
6820 2005-01-15 Jakub Jelinek <jakub@redhat.com>
6823 * typeck2.c (split_nonconstant_init_1) <case VECTOR_TYPE>: Put a copy
6824 of CONSTRUCTOR's node into MODIFY_EXPR, as the original is modified.
6826 2005-01-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6828 * Make-lang.in (cp-warn): Don't append $(WERROR).
6830 2005-01-10 Kazu Hirata <kazu@cs.umass.edu>
6832 * cp-tree.h: Fix a comment typo.
6834 2005-01-07 Nathan Sidwell <nathan@codesourcery.com>
6837 * pt.c (tsubst_qualified_id): Call convert_from_reference.
6839 2005-01-06 Mark Mitchell <mark@codesourcery.com>
6842 * class.c (add_implicitly_declared_members): Remove dead code.
6843 * decl.c (grokfndecl): Add sfk parameter. Use it do set
6845 (grokdeclarator): Adjust calls to grokfndecl.
6846 * method.c (implicitly_declare_fn): Improve documentation.
6847 * parser.c (cp_parser_direct_declarator): Do not consider a
6848 function to be a constructor if the containing class was
6849 originally anonymous.
6851 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6854 * search.c (lookup_field_1): Handle using declaration in
6855 class template partial specialization.
6857 2005-01-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6860 * pt.c (push_access_scope): Handle friend defined in class.
6861 (pop_access_scope): Likewise.
6863 2005-01-06 Nathan Sidwell <nathan@codesourcery.com>
6866 * pt.c (tsubst_copy) <ARRAY_REF case>: Handle separately.
6867 (tsubst_copy_and_build) <ARRAY_REF case>: Remove obsolete
6868 array-new handling code. Use build_x_binary_op.
6870 2005-01-05 Nathan Sidwell <nathan@codesourcery.com>
6873 * cp-tree.h (start_decl): Take pointer to pushed scope, not bool.
6874 * name-lookup.h (push_scope): Return pushed scope, not flag.
6875 * name-lookup.c (push_scope): Return scope that should be popped,
6877 * decl.c (start_decl): Adjust.
6878 (grokfndecl): Adjust scope push and pop.
6879 * decl2.c (check_classfn): Likewise.
6880 * parser.c (cp_parser_condition, cp_parser_conversion_function_id,
6881 cp_parser_init_declarator, cp_parser_direct_declarator,
6882 cp_parser_class_specifier, cp_parser_class_head,
6883 cp_parser_lookup_name,
6884 cp_parser_constructor_declarator_p): Likewise.
6885 * pt.c (instantiate_class_template,
6886 resolve_typename_type): Likewise.
6888 2005-01-03 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
6891 * parser.c (cp_parser_unqualified_id): Do not issue error message
6892 for typedef-name as destructor declarator when performing an
6893 uncommitted tentative parse.
6895 2005-01-01 Steven Bosscher <stevenb@suse.de>
6898 * decl.c (finish_function): Fix comment. Annotate the compiler
6899 generated return with the current file name and line 0.