1 2008-11-28 Jason Merrill <jason@redhat.com>
4 * init.c (perform_member_init): Fix value-initialization.
5 (build_value_init_1): Add assert to catch cases that will break
7 (build_default_init): Remove.
8 * cp-tree.h: Remove its prototype.
9 * pt.c (tsubst_expr) [DECL_EXPR]: Use build_value_init for
13 * parser.c (cp_parser_class_name): Only call
14 maybe_note_name_used_in_class if we actually found a class name.
16 2008-11-25 Jason Merrill <jason@redhat.com>
19 * decl2.c (check_classfn): Error rather than abort on parameter
22 2008-11-20 Jason Merrill <jason@redhat.com>
25 * parser.c (cp_parser_class_name): Call maybe_note_name_used_in_class.
28 * call.c (build_over_call): Take the address of the function even
30 (build_new_method_call): Remember the type of the called function
33 2008-11-19 Dodji Seketeli <dodji@redhat.com>
36 * pt.c (coerce_template_template_parm): Use the more robust
37 uses_template_parms instead of dependent_type_p.
39 2008-11-19 Dodji Seketeli <dodji@redhat.com>
42 * pt.c (lookup_template_class): Check pointers before dereferencing
44 * error.c (dump_template_decl): Likewise.
46 2008-11-19 Jason Merrill <jason@redhat.com>
49 * decl2.c (grokfield): Pass ATTR_FLAG_TYPE_IN_PLACE for a typedef
50 that names a class for linkage purposes.
53 * parser.c (cp_parser_pseudo_destructor_name): A pseudo-destructor
54 name is not a declaration.
57 * pt.c (instantiate_decl): Don't require a definition of
58 a template that is explicitly instantiated 'extern'.
60 2008-11-18 Jason Merrill <jason@redhat.com>
61 Jakub Jelinek <jakub@redhat.com>
64 * parser.c (cp_parser_type_id): Complain about auto.
65 * decl.c (grokdeclarator): Complain about parameters and
66 conversion functions declared with auto.
68 * call.c (standard_conversion): Use CLASS_TYPE_P instead of
70 * cp-tree.h (TYPE_NON_AGGREGATE_CLASS): Likewise.
72 2008-11-17 Jakub Jelinek <jakub@redhat.com>
75 * init.c (constant_value_1): Handle TREE_LIST init.
77 2008-11-15 Jakub Jelinek <jakub@redhat.com>
80 * typeck.c (cp_build_unary_op): Don't call get_unwidened. Use
81 argtype instead of result_type.
83 2008-11-14 Jason Merrill <jason@redhat.com>
86 * semantics.c (finish_call_expr): Don't repeat arg-dep lookup
87 for a non-dependent call.
90 * call.c (build_aggr_conv): Increment i.
92 2008-11-13 Jason Merrill <jason@redhat.com>
95 * typeck2.c (process_init_constructor_record): Update bitfield
97 (check_narrowing): Update bitfield handling, print source type.
99 2008-11-12 Jakub Jelinek <jakub@redhat.com>
103 2007-05-07 Mike Stump <mrs@apple.com>
104 * parser.c (check_empty_body): Add.
105 (cp_parser_iteration_statement): Add call to check_empty_body.
107 2008-11-12 Jason Merrill <jason@redhat.com>
110 * typeck.c (cp_build_modify_expr): Update bitfield handling.
112 2008-11-12 Jakub Jelinek <jakub@redhat.com>
115 * parser.c (cp_parser_simple_declaration): Don't commit
116 to tentative parse if parse errors were seen.
119 * error.c (dump_expr): Handle COMPLEX_EXPR.
121 2008-11-10 Jakub Jelinek <jakub@redhat.com>
124 * parser.c (cp_parser_enum_specifier): After parsing :,
125 parse definitely. Don't return early if type specifier
128 2008-11-06 David Edelsohn <edelsohn@gnu.org>
131 * g++spec.c (LIBSTDCXX_STATIC): New.
132 (lang_spec_driver): Use LIBSTDCXX_STATIC when not
135 2008-11-05 Fabien Chene <fabien.chene@gmail.com>
138 * cp-tree.h: Fix DECL_NONSTATIC_MEMBER_P to handle member template
141 2008-11-05 Richard Guenther <rguenther@suse.de>
144 * decl.c (start_preparsed_function): Use the correct type for
145 building the RESULT_DECL.
147 2008-10-31 Jakub Jelinek <jakub@redhat.com>
150 * decl.c (grokdeclarator): Diagnose auto function decl without
151 late return type and late return type function decl where type
155 * decl.c (cp_finish_decl): Diagnose type_uses_auto type with
158 2008-10-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
161 * class.c (check_bitfield_decl): Rename min_precision to
162 tree_int_cst_min_precision.
163 * decl.c (finish_enum): Likewise.
165 2008-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
168 * parser.c (cp_parser_token_starts_cast_expression): New.
169 (cp_parser_cast_expression): Peek the next token to decide whether
170 this could be a parenthesized constructor or is definitely an
173 2008-10-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
176 * typeck.c (build_x_binary_op): Update call to
177 warn_about_parentheses.
178 * parser.c (cp_parser_binary_expression): Add note about passing
179 the correct code for unary expressions.
181 2008-10-24 Jakub Jelinek <jakub@redhat.com>
183 * Make-lang.in (check-c++-subtargets): New alias for
184 check-g++-subtargets.
185 (lang_checks_parallelized): Add check-g++.
186 (check_g++_parallelize): New variable.
188 2008-10-21 Richard Guenther <rguenther@suse.de>
190 * semantics.c (simplify_aggr_init_exprs_r): Remove.
191 (expand_or_defer_fn): Do not walk the function body to
192 simplify aggr_init_exprs.
194 2008-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
197 * typeck.c (cp_common_type): New. The same as
198 type_after_usual_arithmetic_conversions but without promotions.
199 (type_after_usual_arithmetic_conversions): Do the promotions and
201 (common_type): Make it behave like the C version of this
202 function. Do not handle pointer types.
203 (common_pointer_type): Move handling of pointer types from
205 (cp_build_binary_op): Use common_pointer_type instead of
206 common_type in call to pointer_diff.
207 Use cp_common_type instead of common_type.
208 * cp-tree.h (common_pointer_type): Declare.
210 2008-10-14 Jakub Jelinek <jakub@redhat.com>
213 * cp-gimplify.c (cp_genericize_r): Only fold_convert COND_EXPR
214 arguments if they don't already have COND_EXPR's type.
216 2008-10-14 Paolo Carlini <paolo.carlini@oracle.com>
219 * pt.c (push_template_decl_real): Check that current_template_parms
221 (process_partial_specialization): Assert current_template_parms not
224 2008-10-13 Doug Evans <dje@google.com>
226 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
228 2008-10-10 Jakub Jelinek <jakub@redhat.com>
231 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
234 2008-10-09 Jakub Jelinek <jakub@redhat.com>
237 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
238 setting it to error_mark_node.
240 2008-10-07 Steve Ellcey <sje@cup.hp.com>
242 * decl.c (start_cleanup_fn): Declare as inline.
244 2008-10-06 Jason Merrill <jason@redhat.com>
246 PR c++/37376, other mangling issues
247 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
248 (write_member_name): Break out from...
249 (write_expression): ...here. Handle dependent COMPONENT_REF.
250 (write_template_arg): Wrap an argument pack in 'I'/'E'.
251 (write_builtin_type): Update char16/32_t mangling.
252 (write_nested_name, write_prefix): Don't forget template args
254 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
257 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
259 * typeck.c (build_x_indirect_ref): Add location argument.
260 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
261 (cp_build_unary_op): Add location argument.
262 (cp_build_modify_expr): Same.
263 * class.c (build_base_path): Pass location to build_indirect_ref.
264 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
267 2008-10-05 Dodji Seketeli <dodji@redhat.com>
270 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
271 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
272 of the innermost containing BLOCK.
274 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
277 * error.c (dump_function_decl): Save the exceptions in case of
278 error about incompatible specifications in a specialization.
280 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
282 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
284 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
287 * parser.c (cp_parser_selection_statement): Fix uninitialized
290 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
294 * decl.c (grokdeclarator): Set the type for typedefs to a
295 nested-name-specifier to error_mark_node.
297 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
299 * parser.c (cp_parser_selection_statement): Implement here the
300 -Wempty-body warning for `if' and `else' statements.
301 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
303 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
306 * name-lookup.c (maybe_process_template_type_declaration): Check
307 return value of push_template_decl_real for error_mark_node.
309 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
311 * semantics.c (finish_fname): Pass location to fname_decl.
313 2008-09-23 Jakub Jelinek <jakub@redhat.com>
316 * semantics.c (finish_omp_for): If processing_template_decl, just build
317 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
319 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
321 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
322 (get_member_function_from_ptrfunc): Same.
323 (build_x_binary_op): Same.
324 (build_binary_op): Same.
325 (cp_build_binary_op): New location argument.
326 (pointer_diff): Pass location to cp_build_binary_op.
327 (cp_truthvalue_conversion): Pass location to build_binary_op.
328 (convert_ptrmem): Pass location to cp_build_binary_op.
329 (cp_build_modify_expr): Same.
330 (build_ptrmemfunc): Same.
331 * init.c (expand_cleanup_for_base): Pass location to
332 c_common_truthvalue_conversion.
333 (build_new_1): Pass location to cp_build_binary_op.
334 (build_vec_delete_1): Pass location to *build_binary_op,
335 c_common_truthvalue_conversion.
336 (build_vec_init): Same.
337 (build_delete): Same.
338 * decl.c (compute_array_index_type): Same.
339 * call.c (build_new_op): Same.
340 * rtti.c (build_dynamic_cast_1): Same.
341 * cp-tree.h: Add argument to cp_build_binary_op.
342 * semantics.c (handle_omp_for_class_iterator): Pass location to
343 *build_binary_op, c_common_truthvalue_conversion.
344 * decl2.c (get_guard_cond): Same.
346 2008-09-17 Richard Guenther <rguenther@suse.de>
349 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
350 result to the correct type.
352 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
355 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
356 parameter for duplicate.
358 2008-09-17 Jason Merrill <jason@redhat.com>
361 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
363 2008-09-17 Jakub Jelinek <jakub@redhat.com>
366 * typeck.c (build_array_ref): Use protected_set_expr_location instead
367 of SET_EXPR_LOCATION when ret might not be an expression.
369 2008-09-17 Jan Hubicka <jh@suse.cz>
372 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
374 2008-09-16 Jakub Jelinek <jakub@redhat.com>
377 * semantics.c (finish_compound_literal): Return error_mark_node if
381 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
384 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
386 * decl.c (duplicate_decls): Call error_at.
387 (grokfndecl): New location argument. Use location if available.
388 (grokdeclarator): Pass declarator location to grokfndecl.
389 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
390 * decl2.c (check_classfn): Use error_at.
391 * parser.c (cp_parser_init_declarator): Set function_start_locus
393 (cp_parser_member_declaration): Set id_loc for function declarators.
395 2008-09-09 Jan Hubicka <jh@suse.cz>
398 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
400 2008-09-09 Jakub Jelinek <jakub@redhat.com>
403 * tree.c (array_type_nelts_top): Add size_one_node instead of
406 2008-09-09 Jason Merrill <jason@redhat.com>
409 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
412 2008-09-09 Jakub Jelinek <jakub@redhat.com>
415 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
416 being error_operand_p. Don't clear value if it was error_mark_node.
418 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
420 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
421 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
422 * semantics.c (anon_aggr_type_p): Remove.
424 2008-09-06 Jason Merrill <jason@redhat.com>
427 * parser.c (cp_parser_parameter_declaration_list): Process the
428 PARM_DECLs as we go and push them. Return a TREE_LIST.
429 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
430 (cp_parser_direct_declarator): Create a binding level and
431 suppress deprecated warnings in the parameter list.
432 (make_call_declarator): PARMS is now a tree.
433 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
434 * decl.h (enum deprecated_states, deprecated_state): Move here.
436 (type_is_deprecated): New fn.
437 (grokparms): PARMLIST is a tree now. Warn about parms that
438 use deprecated types.
439 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
441 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
442 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
444 * name-lookup.c (pushtag): Look through function parameter scopes.
445 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
446 when we're parsing a function declarator.
448 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
451 * tree.c (cp_build_qualified_type_real): Deal with sharing of
452 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
455 2008-09-04 Ian Lance Taylor <iant@google.com>
457 * parser.c (check_no_duplicate_clause): Change code parameter to
458 enum omp_clause_code.
460 2008-09-03 Jakub Jelinek <jakub@redhat.com>
463 * decl.c (cp_finish_decl): Only set
464 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
467 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
469 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
470 deferred_mark_used_calls vector and exit early.
471 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
473 (finish_function): Set defer_mark_used_calls for the duration of the
474 function. Call mark_used on any queued decls.
476 2008-09-02 Jason Merrill <jason@redhat.com>
479 * call.c (build_over_call): Make =delete work with SFINAE.
480 * class.c (resolve_address_of_overloaded_function): Likewise.
482 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
483 threadprivate_or_deleted_p.
484 (CP_DECL_THREADPRIVATE_P): Adjust.
485 (DECL_DELETED_FN): Likewise.
486 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
487 (SD_DELETED): New macro.
488 * parser.c (cp_parser_init_declarator): Use them.
489 * decl.c (start_decl): Use them.
491 * decl2.c (mark_used): Give =deleted error even in sizeof.
493 * typeck2.c (check_narrowing): Downgrade narrowing error to
496 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
498 * typeck.c (build_array_ref): Use new location argument.
499 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
500 * call.c (build_new_op): Same.
501 * decl2.c (grok_array_decl): Same.
502 * cp-tree.h (build_array_ref): Add location argument to prototype.
504 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
506 * typeck.c (build_x_indirect_ref): Add location argument.
507 * class.c (build_base_path): Pass location to build_indirect_ref.
508 * pt.c (tsubst_copy_and_build): Pass location to
509 finish_label_address_expr.
510 * parser.c (cp_parser_unary_expression): Same.
512 2008-08-31 Jason Merrill <jason@redhat.com>
514 Implement late-specified return type using 'auto'.
515 * cp-tree.h (struct cp_declarator): Add late_return_type field to
517 * parser.c (cp_parser_late_return_type_opt): New fn.
518 (cp_parser_direct_declarator): Use it.
519 (make_call_declarator): Put it in the declarator.
520 * decl.c (grokdeclarator): Splice in late-specified return type.
521 * pt.c (splice_late_return_type): New fn.
523 2008-08-29 Michael Meissner <gnu@the-meissners.org>
525 * decl.c (builtin_function_1): Take a bool argument to decide
526 whether to use pushdecl or pushdecl_top_level.
527 (duplicate_decls): Copy function specific target and optimization
528 options on duplicate declarations.
529 (cxx_builtin_function): Update builtin_function_1 call.
530 (cxx_builtin_function_ext_scope): New function, guarantee that the
531 declaration is done at global scope.
533 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
534 macro, define builtin function hook for delayed machine specific
537 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
539 2008-08-30 Jason Merrill <jason@redhat.com>
542 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
544 2008-08-29 Jason Merrill <jason@redhat.com>
546 Implement C++0x 'auto' semantics.
547 * decl.c (start_decl_1): Don't complain about auto being incomplete.
548 (cp_finish_decl): Deduce auto.
549 * init.c (build_new): Handle 'new auto'.
550 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
551 message for auto than for normal template type parms.
552 * pt.c (type_dependent_expression_p): Handle { }.
553 (make_auto): New function.
554 (listify_autos): New function.
555 (do_auto_deduction): New function.
556 (is_auto): New function.
557 (type_uses_auto): New function.
558 * cp-tree.h: Declare them.
559 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
560 treat auto as a declspec.
561 (cp_parser_simple_type_specifier): It's a type-specifier.
563 2008-08-29 Mark Mitchell <mark@codesourcery.com>
565 * mangle.c (write_type): Add target-specific manglings for
566 non-fundamental types to the substitution table.
569 2008-08-29 Jakub Jelinek <jakub@redhat.com>
573 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
574 Adjust debug_hooks->imported_module_or_decl callers.
576 2008-08-29 Jan Hubicka <jh@suse.cz>
578 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
580 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
583 * decl.c (reshape_init_r): Check init for error_mark_node.
585 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
588 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
589 (finish_return_stmt): Likewise.
590 (finish_switch_condition): Likewise.
592 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
594 * cp-tree.h: Fix #error directive.
596 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
598 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
599 usual arithmetic conversions on scoped enumeration types.
600 (common_type): Ditto.
601 (default_conversion): Don't perform integral promotions on scoped
603 (build_array_ref): Scoped enumeration types can't be used as
605 * decl.c (start_enum): If building a C++0x scoped enumeration,
606 enter its scope. If provided with an underlying type, check that
607 underlying type and set up the enumeration type accordingly.
608 (finish_enum): Only compute an underlying type if the underlying
609 type isn't already fixed, and only convert the enumerator values
610 now if we've just computed the underlying type. Finish the scope
611 of C++0x scoped enumerations.
612 (build_enumerator): For enumerations with a fixed underlying type,
613 check the enumerator values when the enumerator is defined.
614 (lookup_enumerator): New.
615 * call.c (standard_conversion): Don't allow assignment from
616 integers to scoped enumeration types, even with -fpermissive.
617 Don't convert from scoped enumerations to bool or any arithmetic
619 (build_conditional_expr): Don't per the usual arithmetic
620 conversions for scoped enumeration types.
621 (convert_like_real): Check complain to see if we should
623 * error.c (class_key_or_enum_as_string): Print scoped enums.
624 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
626 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
627 (SCOPED_ENUM_P): New.
628 (UNSCOPED_ENUM_P): New.
629 (SET_SCOPED_ENUM_P): New.
630 (ENUM_UNDERLYING_TYPE): New.
631 * pt.c (lookup_template_class): Update the instantiation of enum
632 types to deal with C++0x scoped enumerations and underlying
634 * name-lookup.c (begin_scope): Deal with scoped enumeration
636 (lookup_qualified_name): Deal with lookup into enumeration types.
637 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
638 * parser.c (cp_parser_class_or_namespace_name): Rename to...
639 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
640 parse a type-name that can be an enumeration type.
641 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
642 (cp_parser_elaborated_type_specifier): Parse the
643 optional `struct' or `class' following enum (in C++0x).
644 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
647 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
649 * typeck.c: Update all calls to pedwarn.
654 * name-lookup.c: Likewise.
655 * parser.c: Likewise.
657 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
660 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
663 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
665 * parser.c: Update all calls to inform.
666 * typeck.c: Likewise.
670 * method.c: Likewise.
671 * friend.c: Likewise.
672 * typeck2.c: Likewise.
674 * name-lookup.c: Likewise.
677 2008-08-19 Jakub Jelinek <jakub@redhat.com>
680 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
682 2008-08-18 Tomas Bily <tbily@suse.cz>
684 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
686 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
688 * typeck.c: Update all callers of permerror.
693 * except.c: Likewise.
695 * typeck2.c: Likewise.
697 * semantics.c: Likewise.
698 * name-lookup.c: Likewise.
701 * parser.c: Likewise.
703 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
706 * pt.c (check_template_shadow): Change to return a bool.
707 * name-lookup.c (push_class_level_binding): Early return if
708 check_template_shadow returns false.
709 * cp-tree.h (check_template_shadow): Adjust declaration.
711 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
714 * decl.c (grokdeclarator): In case of extern and initializer, return
715 error_mark_node after the error.
717 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
720 * decl.c (grokfndecl): Call check_main_parameters_type only if
723 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
726 * parser.c (cp_parser_class_head): Early return error_mark_node in
727 case of global qualification of class name or qualified name that
728 does not name a class.
730 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
733 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
735 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
738 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
739 Delete forward declarations. Check that toplev.h has not been
740 included before this file. Include toplev.h and diagnostic.h.
741 * error.c (cp_cpp_error): Use DK_PEDWARN.
742 (cxx_incomplete_type_diagnostic): Update declaration.
743 (cxx_incomplete_type_error): Use DK_ERROR.
744 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
745 as argument. Use emit_diagnostic.
746 (cxx_incomplete_type_error): Use DK_ERROR.
747 (add_exception_specifier): Use diagnostic_t instead of custom
749 * typeck.c (complete_type_or_else): Update call to
750 cxx_incomplete_type_diagnostic.
751 * init.c (build_delete): Likewise.
752 * call.c (diagnostic_fn_t): Remove unused typedef.
753 (build_temp): Pass a pointer to diagnostic_t.
754 (convert_like_real): Use emit_diagnostic.
755 (joust): Check return value of warning before giving informative
757 * friend.c (do_friend): Check return value of warning
758 before giving informative note.
759 * parser.c (cp_parser_template_id): Likewise.
761 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
764 * class.c (check_bases_and_members): Warn with -Wuninitialized
767 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
770 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
771 and make sure it is not a union.
773 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
775 * semantics.c (finish_decltype_type): Initialize type.
777 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
779 * semantics.c (finish_decltype_type): Handle calls to function
780 pointers and references to functions properly.
782 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
785 * parser.c (cp_parser_template_argument): Don't assume that '>>'
786 following a type-id is an error when in C++0x mode.
788 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
791 * decl.c (grokdeclarator): Use explicit location with permerror_at.
793 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
796 * typeck.c (cp_build_binary_op): Move code to c-common.c.
798 2008-08-05 Jason Merrill <jason@redhat.com>
801 * decl.c (build_ptrmemfunc_type): Don't require structural
802 comparison of PMF types.
803 * tree.c (cp_build_qualified_type_real): Don't clear
804 a valid TYPE_PTRMEMFUNC_TYPE.
805 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
808 2008-08-04 Jason Merrill <jason@redhat.com>
811 * typeck2.c (check_narrowing): Allow narrowing conversion
812 from an explicit floating-point constant.
815 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
818 2008-08-04 Simon Baldwin <simonb@google.com>
821 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
822 the declaration's id is followed by a semicolon.
824 2008-07-31 Jakub Jelinek <jakub@redhat.com>
827 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
828 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
830 2008-07-31 Jason Merrill <jason@redhat.com>
833 * init.c (build_new_1): Don't convert pointer to the data type
834 until we're actually going to treat it as that type.
837 * tree.c (build_aggr_init_expr): Split out...
838 (build_cplus_new): ...from here.
839 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
840 * init.c (build_new_1): new T() means value-initialization,
841 not default-initialization.
842 (build_vec_init): Likewise.
843 (build_value_init_1): Use build_aggr_init_expr.
845 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
848 * decl2.c (fix_temporary_vars_context_r): New function.
849 (one_static_initialization_or_destruction): Make sure temporary
850 variables part of the initialiser have their DECL_CONTEXT()
853 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
856 * typeck.c (build_binary_op): Encapsulate code into
859 2008-07-29 Jakub Jelinek <jakub@redhat.com>
862 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
863 TYPE_UID instead of pointers.
865 2008-07-29 Jan Hubicka <jh@suse.cz>
867 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
868 * decl.c (duplicate_decls): Likewise.
869 (grokfndecl): Likewise.
870 (start_method): Likewise.
871 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
873 * pt.c (register_specialization, regenerate_decl_from_template):
875 * decl2.c (grokfield): Likewise.
877 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
880 * decl.c (duplicate_decls): Merge USED flags.
882 2008-07-27 Jason Merrill <jason@redhat.com>
885 * decl.c (reshape_init_r): Allow C++0x initializer lists.
887 2008-07-28 Richard Guenther <rguenther@suse.de>
889 Merge from gimple-tuples-branch.
891 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
893 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
896 2008-07-18 Jakub Jelinek <jakub@redhat.com>
898 * decl.c (finish_function): Call gimple_body after cp_genericize.
900 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
902 * optimize.c: Include gimple.h instead of tree-gimple.h.
903 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
904 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
907 2008-07-16 Jakub Jelinek <jakub@redhat.com>
909 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
911 2008-07-14 Jakub Jelinek <jakub@redhat.com>
913 * cp-gimplify.c (cp_gimplify_expr): Update comment.
915 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
917 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
919 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
920 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
921 (cxx_omp_clause_copy_ctor): Same.
922 (cxx_omp_clause_assign_op): Same.
924 2008-05-28 Jakub Jelinek <jakub@redhat.com>
926 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
927 (cp_gimplify_expr): Adjust caller.
929 2008-05-11 Doug Kwan <dougkwan@google.com>
931 * init.c (build_vec_delete): Add type conversion for argument
932 0 of POINTER_PLUS_EXPR.
934 2008-04-29 Doug Kwan <dougkwan@google.com>
936 * decl2 (File): Include "gimple.h"
937 (cp_write_global_declarations): Use gimple_body instead of
939 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
941 2008-04-10 Diego Novillo <dnovillo@google.com>
943 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
945 * optimize.c (maybe_clone_body): Re-enable call to
947 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
948 code with call to gimple_unreachable.
949 (cp_genericize): Fix handling of clone bodies.
951 2008-04-04 Diego Novillo <dnovillo@google.com>
953 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
955 * optimize.c (maybe_clone_body): Re-enable.
957 2008-02-19 Diego Novillo <dnovillo@google.com>
958 Oleg Ryjkov <olegr@google.com>
960 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
962 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
963 argument to gimple_seq *. Update all users.
964 (gimplify_must_not_throw_expr): Likewise.
966 2008-02-04 Oleg Ryjkov <olegr@google.com>
968 * except.c: Include gimple.h
969 (cp_protect_cleanup_actions): Convert to tuples.
970 * Make-lang.in (cp/except.o): Add dependency on gimple.h
972 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
974 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
975 instead of annotating each block manually.
977 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
979 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
980 (gimplify_for_stmt): Same.
981 (gimplify_switch_stmt): Same.
982 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
984 [WHILE_STMT]: Return GS_OK.
986 [CONTINUE_STMT]: Same.
988 (cp_genericize): Set gimple_body() of cloned functions when needed.
990 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
992 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
993 (cp_gimplify_init_expr): Convert to tuples.
994 (gimplify_must_not_throw_expr): Make function return a
995 gimplify_status and convert to tuples.
997 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
999 * cp-gimplify.c (genericize_try_block): Enable and do not call
1001 (genericize_catch_block): Same.
1002 (genericize_eh_spec_block): Same.
1003 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1004 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
1006 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
1008 * optimize.c (maybe_clone_body): Comment out call to clone_body.
1009 * decl.c (finish_function): Use gimple_body instead of
1011 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
1012 * cp-gimplify.c (genericize_try_block): Comment out.
1013 (genericize_catch_block): Same.
1014 (genericize_eh_spec_block): Same.
1015 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
1016 (gimplify_for_stmt): Comment out.
1017 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
1018 (cp_gimplify_omp_for): Same.
1019 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
1020 Comment out call to gimplify_stmt and append_to_statement_list.
1021 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
1022 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
1023 (cp_gimplify_expr): Same.
1024 Comment out calls to genericize_*_block. Comment out call to
1027 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
1030 * class.c (type_has_user_provided_default_constructor): Handle
1033 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
1035 * decl.c (push_library_fn): Add a parameter for the exceptions that
1036 the function may throw.
1037 (push_void_library_fn, push_throw_library_fn, expand_static_init):
1039 (build_library_fn): Change to static.
1040 * cp-tree.h: Adjust declarations.
1041 * except.c (declare_nothrow_library_fn): New.
1042 (do_get_exception_ptr, do_begin_catch, do_free_exception,
1043 do_allocate_exception): Use the latter, adjust the declarations
1044 (ie, add empty exception-specification), consistently with the
1045 actual implementation in libsupc++.
1047 2008-07-25 Jan Hubicka <jh@suse.cz>
1049 * typeck.c (inline_conversion): Remove.
1050 (cp_build_function_call): Do not use inline_conversion.
1051 * decl.c (duplicate_decls): Do not insist on inline being declared
1053 (start_cleanup_fn): Do not assume that INLINE flags prevent function
1054 from being output. We now remove static functions always.
1055 (finish_function): Do return warning on all static functions.
1056 * call.c (build_over_call): Do not use inline_conversion.
1057 * cp-tree.h (possibly_inlined_p): Declare.
1058 (inline_conversion): Remove.
1059 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
1060 * decl2.c (cp_write_global_declarations): Likewise.
1061 (mark_used): Likewise.
1062 (possibly_inlined_p): New functions.
1064 2008-07-25 Jason Merrill <jason@redhat.com>
1066 * class.c (type_has_user_provided_default_constructor): Handle
1069 2008-07-23 Jan Hubicka <jh@suse.cz>
1071 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
1072 (grogfndecl): Drop flag_inline_trees code.
1073 * pt.c (instantiate_decl): Drop flag_iline_trees code.
1074 * lex.c (cxx_init): Do not set unit-at-a-time.
1076 2008-07-23 Jason Merrill <jason@redhat.com>
1078 * mangle.c (write_unqualified_name): Avoid infinite recursion when
1079 trying to mangle a decl with no name.
1081 Implement defaulted/deleted functions as per N2346
1082 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
1083 (DECL_DELETED_FN): New macro.
1084 (DECL_DEFAULTED_FN): New macro.
1085 * class.c (user_provided_p): New fn.
1086 (defaultable_fn_p): New fn.
1087 (type_has_user_provided_constructor): New fn.
1088 (type_has_user_provided_default_constructor): New fn.
1089 (check_methods): A defaulted fn is still trivial.
1090 (check_bases_and_members): Likewise.
1091 * decl.c (grok_special_member_properties): Likewise.
1092 (duplicate_decls): Complain about redeclaring a function as deleted.
1093 (start_decl): initialized==2 means deleted.
1094 (cp_finish_decl): Handle deleted/defaulted semantics.
1095 * decl2.c (grokfield): Likewise.
1096 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
1097 Complain about using a deleted fn.
1098 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
1099 (perform_member_init): Check for a user-provided default constructor
1100 even if TYPE_NEEDS_CONSTRUCTING.
1101 (build_new_1): Likewise.
1102 * call.c (build_over_call): Don't call mark_used twice.
1103 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
1104 * search.c (check_final_overrider): Check for deleted mismatch.
1105 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
1106 (cp_parser_pure_specifier): Handle =default and =delete.
1108 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
1110 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1113 * typeck.c: All calls to pedwarn changed.
1114 * decl.c: All calls to pedwarn changed.
1115 * call.c: All calls to pedwarn changed.
1116 * error.c: All calls to pedwarn changed.
1117 * typeck2.c: All calls to pedwarn changed.
1118 * pt.c: All calls to pedwarn changed.
1119 * name-lookup.c: All calls to pedwarn changed.
1120 * parser.c: All calls to pedwarn changed.
1122 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1124 * call.c: Fix comment typos.
1125 * class.c: Likewise.
1126 * cp-tree.h: Likewise.
1127 * cxx-pretty-print.c: Likewise.
1130 * name-lookup.c: Likewise.
1131 * operators.def: Likewise.
1132 * parser.c: Likewise.
1135 * typeck.c: Likewise.
1137 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1141 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
1142 copy constructors and copy assignment operators proper.
1144 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
1146 * parser.c (cp_token): Remove in_system_header.
1147 (eof_token): Remove in_system_header.
1148 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
1149 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
1150 (cp_parser_member_declaration): Use in_system_header_at.
1151 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
1152 (pop_tinst_level): Don't set in_system_header.
1153 (instantiate_class_template): Don't set in_system_header.
1154 (instantiate_decl): Don't set in_system_header.
1155 (instantiate_pending_templates): Don't set in_system_header.
1157 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
1160 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
1161 TYPE_NOTHROW_P, not TREE_NOTHROW.
1162 (trait_expr_value): Likewise.
1164 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
1167 * call.c (convert_like_real): Don't take the error code path
1168 when a rvalue or base conversion has the bad_p field set.
1170 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
1172 * rtti.c (emit_support_tinfos): Add char16_type_node and
1174 * typeck2.c (digest_init): Support char16_t and char32_t.
1176 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
1178 * cvt.c (convert_to_void): Avoid C++ keywords.
1179 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
1181 * friend.c (is_friend): Likewise.
1182 * init.c (perform_member_init): Likewise.
1183 * mangle.c (write_template_prefix, write_template_template_param):
1185 * name-lookup.c (do_namespace_alias, do_using_directive,
1186 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
1187 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
1188 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
1190 * pt.c (is_specialization_of_friend, lookup_template_class,
1191 push_tinst_level, instantiate_class_template,
1192 tsubst_copy_and_build): Likewise.
1193 * tree.c (add_stmt_to_compound): Likewise.
1194 * typeck.c (finish_class_member_access_expr): Likewise.
1196 2008-07-17 Julian Brown <julian@codesourcery.com>
1197 Mark Mitchell <mark@codesourcery.com>
1199 * decl2.c (determine_visibility): Allow target to override
1200 visibility of class data.
1202 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
1205 * semantics.c (trait_expr_value): Update __has_trivial_destructor
1206 semantics to the current WP (N2691).
1208 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
1211 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
1212 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
1213 complies with exception specification constraints.
1215 2008-07-14 Jason Merrill <jason@redhat.com>
1217 * lex.c (init_reswords): Always set D_OBJC.
1219 2008-07-11 Tom Tromey <tromey@redhat.com>
1220 Ian Lance Taylor <iant@google.com>
1222 * lex.c (struct resword, reswords): Don't define.
1223 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1224 (init_reswords): Clarify mask code. Use c_common_reswords rather
1227 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1230 * decl.c (grokdeclarator): Warn about initializing variables
1231 of storage class 'extern' only after the type of the declarator
1232 has been properly computed.
1234 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1237 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1238 carries the location of the primary type.
1239 * parser.c (cp_parser_check_type_definition): Update documentation.
1240 (cp_parser_check_for_definition_in_return_type,
1241 cp_parser_check_for_invalid_template_id,
1242 cp_parser_set_decl_spec_type,
1243 cp_parser_check_for_definition_in_return_type,
1244 cp_parser_diagnose_invalid_type_name,
1245 cp_parser_new_expression, cp_parser_explicit_instantiation,
1246 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1247 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1250 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1254 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1255 Add a location_t parameter so that
1256 error message can have a more accurate location.
1257 * cp-tree.h: Updated prototype
1258 * pt.c (tsubst_qualified_id): Use location in error messages.
1259 * parser.c (cp_parser_postfix_expression,
1260 cp_parser_objc_statement, cp_parser_trait_expr,
1261 cp_parser_token_is_class_key,
1262 cp_parser_uncommitted_to_tentative_parse_p,
1263 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1264 cp_parser_error, cp_parser_name_lookup_error,
1265 cp_parser_simulate_error, cp_parser_check_decl_spec,
1266 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1267 cp_parser_diagnose_invalid_type_name,
1268 cp_parser_parse_and_diagnose_invalid_type_name,
1269 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1270 cp_parser_string_literal, cp_parser_primary_expression,
1271 cp_parser_primary_expression, cp_parser_unqualified_id,
1272 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1273 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1274 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1275 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1276 cp_parser_jump_statement, cp_parser_block_declaration,
1277 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1278 cp_parser_function_specifier_opt, cp_parser_decltype,
1279 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1280 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1281 cp_parser_type_parameter, cp_parser_template_id,
1282 cp_parser_template_name, cp_parser_template_argument): Likewise.
1284 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1287 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1288 on function return type.
1290 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1293 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1294 on function return type in case of system header.
1296 2008-07-09 Raksit Ashok <raksit@google.com>
1298 * parser.c (cp_parser_postfix_expression): New warning based on flag
1299 warn_disallowed_functions.
1301 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1304 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1305 functions declared with a storage class qualifier.
1307 2008-07-03 Richard Guenther <rguenther@suse.de>
1310 * typeck.c (cp_build_function_call): Move code to verify
1311 builtin function arguments ...
1312 * call.c (build_cxx_call): ... here.
1314 2008-07-02 Jason Merrill <jason@redhat.com>
1316 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1318 Implement WG21 N2672, Initializer List proposed wording
1319 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1320 (struct lang_type_class): Add has_list_ctor bitfield.
1321 (TYPE_HAS_LIST_CTOR): New macro.
1322 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1323 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1324 (LOOKUP_NO_NARROWING): New macro.
1325 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1326 * parser.c (cp_parse_braced_list): Split out from...
1327 (cp_parser_initializer_clause): ...here.
1328 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1330 (cp_lexer_next_token_is_not_keyword): New fn.
1331 (cp_parser_parenthesized_expression_list): Handle { }.
1332 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1333 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1334 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1335 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1336 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1337 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1338 (cp_parser_save_member_function_body): Likewise.
1339 * call.c (conversion_kind): Add ck_list, ck_aggr.
1340 (struct conversion): Add check_narrowing bitfield, conversion list.
1341 (build_list_conv): New fn.
1342 (build_aggr_conv): New fn.
1343 (implicit_conversion): Call them.
1344 (standard_conversion): Set check_narrowing if appropriate.
1345 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1346 (build_user_type_conversion_1): When converting from an init list,
1347 we allow additional conversions except when calling a copy ctor.
1348 (convert_like_real): Calling an explicit ctor for an init list is
1349 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1350 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1351 class doesn't have a list ctor, break the {} into a TREE_LIST.
1352 (compare_ics): ck_list is better than other UDCs.
1353 (set_up_extended_ref_temp): Split out from initialize_reference.
1354 (is_std_init_list): New fn.
1355 (is_list_ctor): New fn.
1356 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1357 (reshape_init_array_1): Pass it to build_constructor.
1358 (reshape_init_class): Ditto.
1359 (initialize_artificial_var): Pass the appropriate type.
1360 (build_aggr_init_full_exprs): Split out from...
1361 (check_initializer): ...here. Handle new semantics.
1362 (build_init_list_var_init): New subroutine of check_initializer.
1363 (grokdeclarator): Converting constructors can have more than one parm.
1364 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1365 * init.c (expand_default_init): Only do digest_init for aggregates.
1366 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1367 build_constructor_from_list.
1368 (generic_initializer, ptr_initializer): Ditto.
1369 (ptm_initializer, class_initializer): Ditto.
1370 (get_pseudo_ti_init): Ditto.
1371 * error.c (dump_type): Handle init_list_type_node.
1372 (maybe_warn_cpp0x): New fn.
1373 (maybe_varn_variadic_templates): Call it.
1374 * cvt.c (ocp_convert): Handle conversion from { }.
1375 * tree.c (build_array_of_n_type): New fn.
1376 * typeck2.c (store_init_value): Use init_list_type_node.
1377 (digest_init): Likewise.
1378 (check_narrowing): New fn.
1379 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1380 of vector of constructor elts. Handle non-aggregate types. Make
1381 constant literals static.
1382 * pt.c: (tsubst_copy_and_build): Adjust.
1383 (unify): Handle { }.
1384 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1386 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1388 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1389 (comp_ptr_ttypes_const): Likewise.
1391 2008-07-01 Andrew Haley <aph@redhat.com>
1393 * decl.c (finish_constructor_body): Don't set the return value of
1394 the constructor if the constructor is that of a Java type.
1396 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1399 * decl2.c (is_late_template_attribute): If the first attribute
1400 argument is IDENTIFIER_NODE, don't consider it when checking
1401 if arguments are value or type dependent.
1403 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1406 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1409 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1411 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1413 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1416 * repo.c (repo_emit_p): Put const static data members initialized
1417 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1420 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1423 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1426 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1429 * typeck.c (cp_build_function_call): Show example syntax in
1432 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1434 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1435 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1436 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1437 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1438 pedwarn to permerror.
1439 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1440 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1441 * identify_goto, check_previous_goto_1, check_goto, define_label,
1442 check_tag_decl, start_decl, check_class_member_definition_namespace,
1443 grokfndecl, grokdeclarator): Likewise.
1444 * except.c (check_handlers): Likewise.
1445 * typeck2.c (digest_init): Likewise.
1446 * pt.c (check_specialization_namespace,
1447 check_explicit_instantiation_namespace,
1448 maybe_process_partial_specialization, check_explicit_specialization,
1449 convert_template_argument, do_decl_instantiation,
1450 do_type_instantiation, instantiate_decl): Likewise.
1451 * semantics.c (finish_template_type_parm): Likewise.
1452 * name-lookup.c (pushdecl_maybe_friend,
1453 check_for_out_of_scope_variable): Likewise.
1454 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1455 coerce_new_type): Likewise.
1456 * parser.c (cp_parser_nested_name_specifier_opt,
1457 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1458 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1459 (cp_parser_parameter_declaration): Check flag_permissive instead of
1460 flag_pedantic_errors.
1461 * call.c (joust): Change pedwarn to warning.
1462 * friend.c (make_friend_class): Likewise.
1464 2008-06-16 Jan Hubicka <jh@suse.cz>
1466 * method.c: Include cgraph.h.
1467 (use_thunk): Use cgraph_add_new_function instead of calling backend
1470 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1472 * parser.c: Fix comment typo.
1474 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1477 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1478 grokdeclarator and apply it to the created declaration.
1479 * cp-tree.h (grokbitfield): Update prototype.
1480 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1481 since they are now applied in grokbitfield. Adjusted the call to
1483 (cp_parser_objc_class_ivars): Likewise.
1485 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1488 * class.c (type_requires_array_cookie): Do not consider delete[]
1489 operators with an ellipsis as second argument.
1491 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1494 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1497 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1500 * pt.c (maybe_process_partial_specialization): Check the tree
1501 returned by push_template_decl for error_mark_node.
1502 * parser.c (cp_parser_class_head): Likewise, check the tree
1503 returned by the latter.
1505 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1508 * decl.c (grokdeclarator): In case of wrong return type return
1509 immediately error_mark_node.
1511 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1513 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1514 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1515 finish_omp_taskwait): New prototypes.
1516 (cxx_omp_clause_default_ctor): Add outer argument.
1517 (finish_omp_for): Add new clauses argument.
1518 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1519 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1520 (cxx_omp_clause_default_ctor): Add outer argument.
1521 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1522 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1523 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1524 Add par_clauses argument. If decl is present in parallel's
1525 lastprivate clause, change that clause to shared and add
1526 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1527 Fix wording of error messages. Adjust finish_omp_for caller.
1528 Add clauses argument. Parse loops with random access iterators.
1529 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1531 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1532 cp_parser_omp_for_loop callers.
1533 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1535 (cp_parser_omp_clause_name): Handle collapse and untied
1537 (cp_parser_omp_clause_schedule): Handle auto schedule.
1538 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1539 and PRAGMA_OMP_CLAUSE_UNTIED.
1540 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1541 (OMP_TASK_CLAUSE_MASK): Define.
1542 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1543 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1544 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1545 PRAGMA_OMP_TASKWAIT.
1546 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1547 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1548 (tsubst_omp_for_iterator): New function.
1549 (dependent_omp_for_p): New function.
1550 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1551 loops. Adjust finish_omp_for caller. Handle loops with random
1552 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1553 (tsubst_expr): Handle OMP_TASK.
1554 * semantics.c (cxx_omp_create_clause_info): New function.
1555 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1556 OMP_CLAUSE_COLLAPSE.
1557 (cxx_omp_predetermined_sharing): Removed.
1558 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1559 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1560 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1561 clauses argument. Fix check for type dependent cond or incr.
1562 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1563 fold_convert to convert incr amount to difference_type. Only
1564 fold if not in template. If decl is mentioned in lastprivate
1565 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1566 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1568 (finish_omp_threadprivate): Allow static class members of the
1570 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1571 finish_omp_taskwait): New functions.
1573 * parser.c (cp_parser_binary_expression): Add prec argument.
1574 (cp_parser_assignment_expression): Adjust caller.
1575 * cp-tree.h (outer_curly_brace_block): New prototype.
1576 * decl.c (outer_curly_brace_block): No longer static.
1578 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1581 * pt.c (push_template_decl_real): Consistently return error_mark_node
1584 2008-06-02 Tomas Bily <tbily@suse.cz>
1586 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1587 (cp_build_unary_op): Likewise.
1588 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1589 (maybe_warn_about_returning_address_of_local): Likewise.
1591 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1594 * pt.c (tsubst_initializer_list): Consistently check the tree
1595 returned by tsubst_pack_expansion for error_mark_node.
1597 2008-05-27 Michael Matz <matz@suse.de>
1600 * call.c (build_new_op): Make warning conditional on
1603 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1606 * call.c (convert_like_real): Convert bitfield to desired type
1607 before creating temporary.
1609 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1611 * Makefile.in: Adjusted dependencies on c-incpath.o.
1613 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1616 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1617 fold_build_cleanup_point_expr on build_call_a results.
1620 * semantics.c (omp_clause_info_fndecl): New function.
1621 (finish_omp_clauses): Use it.
1623 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1626 * cp-tree.h (check_array_initializer): New prototype.
1627 * decl.c (check_array_initializer): New function.
1628 (check_initializer): Call it.
1629 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1631 2008-05-21 Tom Tromey <tromey@redhat.com>
1633 * mangle.c (save_partially_mangled_name): Remove.
1634 (restore_partially_mangled_name): Likewise.
1635 (write_encoding): Update.
1636 (write_unqualified_name): Likewise.
1637 (start_mangling): Always use name_obstack. Remove 'ident_p'
1639 (get_identifier_nocopy): Remove.
1640 (finish_mangling_internal): Rename from finish_mangling.
1641 (finish_mangling): New function.
1642 (finish_mangling_get_identifier): Likewise.
1643 (partially_mangled_name, partially_mangled_name_len): Remove.
1644 (mangle_decl_string): Change return type. Update.
1645 (mangle_decl, mangle_type_string, mangle_special_for_type,
1646 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1647 mangle_ref_init_variable): Update.
1649 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1652 * semantics.c (begin_class_definition): Extend checks on the first
1655 2008-05-12 Tomas Bily <tbily@suse.cz>
1657 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1658 * call.c (build_over_call): Likewise.
1659 * error.c (dump_expr): Use CASE_CONVERT.
1660 * class.c (fixed_type_or_null): Likewise.
1662 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1664 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1666 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1669 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1671 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1672 DECL_LOOPING_CONST_OR_PURE_P attributes.
1673 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1676 2008-05-02 Simon Baldwin <simonb@google.com>
1679 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1681 2008-05-01 Simon Baldwin <simonb@google.com>
1683 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1685 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1688 * pt.c (more_specialized_fn): Stop the loop even if there are no
1689 arguments before ellipsis.
1691 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1694 * parser.c (cp_parser_lookup_name): Look through single function
1698 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1699 COMPOUND_EXPR if the second argument would be error_mark_node.
1701 2008-04-28 Jason Merrill <jason@redhat.com>
1702 Liu Guanwei <liu_gw@163.com>
1705 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1706 in default arguments.
1708 2008-04-25 Jan Hubicka <jh@suse.cz>
1710 * typeck.c (check_return_expr): Update.
1711 * decl.c (start_preparsed_function): Update.
1712 * method.c (use_thunk): Update.
1714 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1717 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1718 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1719 * decl2.c (is_late_template_attribute): Only make vector_size
1720 late tmpl attribute if argument is type or value dependent.
1721 (cp_reconstruct_complex_type): New function.
1723 2008-04-24 Richard Guenther <rguenther@suse.de>
1725 * typeck.c (cp_build_function_call): Call
1726 check_builtin_function_arguments.
1728 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1730 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1731 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1732 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1733 * class.c (build_base_path): Don't set TREE_INVARIANT.
1734 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1735 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1736 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1737 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1738 (generic_initializer): Don't set TREE_INVARIANT.
1739 (ptr_initializer): Don't set TREE_INVARIANT.
1740 (ptm_initializer): Don't set TREE_INVARIANT.
1741 (class_initializer): Don't set TREE_INVARIANT.
1742 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1743 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1744 (build_template_parm_index): Don't set TREE_INVARIANT.
1745 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1746 (process_template_parm): Don't set TREE_INVARIANT.
1748 2008-04-22 Jason Merrill <jason@redhat.com>
1751 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1752 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1753 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1755 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1758 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1759 expression is errorneous.
1761 2008-04-21 Jason Merrill <jason@redhat.com>
1764 * tree.c (cp_tree_equal): Handle FIXED_CST.
1767 * pt.c (template_template_parm_bindings_ok_p): Set
1768 processing_template_decl while in this function.
1770 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1772 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1773 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1774 char16_t and char32_t.
1775 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1776 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1777 extended builtin type "u8char{16,32}_t".
1778 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1780 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1781 (cp_parser_is_string_literal): Idem.
1782 (cp_parser_string_literal): Idem.
1783 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1785 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1786 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1787 * typeck.c (string_conv_p): Support char16_t and char32_t.
1789 2008-04-17 Jason Merrill <jason@redhat.com>
1792 * call.c (build_user_type_conversion_1): Represent second step of
1793 copy-init with an rvalue conversion.
1794 (convert_like_real) [ck_user]: Don't implicitly add it here.
1796 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1799 * decl.c (layout_var_decl): If extern or static var has variable
1800 size, set TREE_TYPE (decl) to error_mark_node.
1802 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1805 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1808 2008-04-09 Jason Merrill <jason@redhat.com>
1811 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1812 not a pushed variable.
1814 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1816 * call.c (build_op_delete_call): Fix quotation in warning message.
1817 * decl.c (grokdeclarator): Quote keyword in error message.
1818 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1821 * parser.c (cp_parser_check_type_definition): Print error string
1822 directly rather than using "%s".
1823 (cp_parser_postfix_expression): Fix quotation.
1824 (cp_parser_decltype): Likewise.
1825 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1827 * parser.c (cp_parser_non_integral_constant_expression): Build error
1828 message with CONCAT rather than using "%s".
1829 (cp_parser_primary_expression): Fix quotation.
1830 (cp_parser_postfix_expression): Likewise.
1831 (cp_parser_postfix_dot_deref_expression): Likewise.
1832 (cp_parser_unary_expression): Likewise.
1833 (cp_parser_new_expression): Likewise.
1834 (cp_parser_delete_expression): Likewise.
1836 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1837 as `)', not as `('. Fix quotation.
1838 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1839 (cp_parser_primary_expression): Likewise.
1840 (cp_parser_nested_name_specifier_opt): Likewise.
1841 (cp_parser_postfix_expression): Likewise.
1842 (cp_parser_postfix_open_square_expression): Likewise.
1843 (cp_parser_parenthesized_expression_list): Likewise.
1844 (cp_parser_pseudo_destructor_name): Likewise.
1845 (cp_parser_new_expression): Likewise.
1846 (cp_parser_direct_new_declarator): Likewise.
1847 (cp_parser_delete_expression): Likewise.
1848 (cp_parser_cast_expression): Likewise.
1849 (cp_parser_question_colon_clause): Likewise.
1850 (cp_parser_builtin_offsetof): Likewise.
1851 (cp_parser_trait_expr): Likewise.
1852 (cp_parser_label_for_labeled_statement): Likewise.
1853 (cp_parser_compound_statement): Likewise.
1854 (cp_parser_selection_statement): Likewise.
1855 (cp_parser_condition): Likewise.
1856 (cp_parser_iteration_statement): Likewise.
1857 (cp_parser_already_scoped_statement): Likewise.
1858 (cp_parser_simple_declaration): Likewise.
1859 (cp_parser_linkage_specification): Likewise.
1860 (cp_parser_static_assert): Likewise.
1861 (cp_parser_decltype): Likewise.
1862 (cp_parser_conversion_function_id): Likewise.
1863 (cp_parser_operator_function_id): Likewise.
1864 (cp_parser_operator): Likewise.
1865 (cp_parser_type_parameter): Likewise.
1866 (cp_parser_template_id): Likewise.
1867 (cp_parser_explicit_instantiation): Likewise.
1868 (cp_parser_explicit_specialization): Likewise.
1869 (cp_parser_enum_specifier): Likewise.
1870 (cp_parser_namespace_definition): Likewise.
1871 (cp_parser_namespace_alias_definition): Likewise.
1872 (cp_parser_using_declaration): Likewise.
1873 (cp_parser_using_directive): Likewise.
1874 (cp_parser_asm_definition): Likewise.
1875 (cp_parser_direct_declarator): Likewise.
1876 (cp_parser_ptr_operator): Likewise.
1877 (cp_parser_parameter_declaration_clause): Likewise.
1878 (cp_parser_initializer_clause): Likewise.
1879 (cp_parser_class_specifier): Likewise.
1880 (cp_parser_member_specification_opt): Likewise.
1881 (cp_parser_member_declaration): Likewise.
1882 (cp_parser_pure_specifier): Likewise.
1883 (cp_parser_constant_initializer): Likewise.
1884 (cp_parser_base_clause): Likewise.
1885 (cp_parser_exception_specification_opt): Likewise.
1886 (cp_parser_try_block): Likewise.
1887 (cp_parser_function_try_block): Likewise.
1888 (cp_parser_handler): Likewise.
1889 (cp_parser_throw_expression): Likewise.
1890 (cp_parser_asm_operand_list): Likewise.
1891 (cp_parser_attributes_opt): Likewise.
1892 (cp_parser_label_declaration): Likewise.
1893 (cp_parser_constructor_declarator_p): Likewise.
1894 (cp_parser_template_declaration_after_export): Likewise.
1895 (cp_parser_single_declaration): Likewise.
1896 (cp_parser_objc_message_expression): Likewise.
1897 (cp_parser_objc_message_args): Likewise.
1898 (cp_parser_objc_encode_expression): Likewise.
1899 (cp_parser_objc_defs_expression): Likewise.
1900 (cp_parser_objc_protocol_expression): Likewise.
1901 (cp_parser_objc_selector_expression): Likewise.
1902 (cp_parser_objc_protocol_refs_opt): Likewise.
1903 (cp_parser_objc_typename): Likewise.
1904 (cp_parser_objc_method_keyword_params): Likewise.
1905 (cp_parser_objc_superclass_or_category): Likewise.
1906 (cp_parser_objc_try_catch_finally_statement): Likewise.
1907 (cp_parser_objc_synchronized_statement): Likewise.
1908 (cp_parser_objc_throw_statement): Likewise.
1909 (cp_parser_omp_var_list_no_open): Likewise.
1910 (cp_parser_omp_clause_default): Likewise.
1911 (cp_parser_omp_clause_if): Likewise.
1912 (cp_parser_omp_clause_num_threads): Likewise.
1913 (cp_parser_omp_clause_reduction): Likewise.
1914 (cp_parser_omp_clause_schedule): Likewise.
1915 (cp_parser_omp_critical): Likewise.
1916 (cp_parser_omp_for_loop): Likewise.
1917 (cp_parser_omp_sections_scope): Likewise.
1919 * parser.c (cp_parser_template_parameter_list): Simplify.
1921 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1923 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1925 2008-04-07 Jason Merrill <jason@redhat.com>
1928 * class.c (type_has_user_nondefault_constructor): A template
1929 counts as a nondefault constructor.
1931 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1933 * decl.c (cxx_push_function_context): Delete.
1934 (cxx_pop_function_context): Delete.
1935 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1937 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1938 LANG_HOOKS_FUNCTION_FINAL): Delete.
1939 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1940 LANG_HOOKS_MISSING_NORETURN_OK_P.
1941 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1943 * semantics.c (current_stmt_tree): Fix comment.
1945 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1948 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1949 before calling fold_offsetof.
1951 2008-04-03 Tom Tromey <tromey@redhat.com>
1953 * Make-lang.in (c++_OBJS): New variable.
1955 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1957 * optimize.c (clone_body): New, from tree-inline.c.
1959 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1961 * method.c (synthesize_method): Use {push,pop}_function_context.
1962 * name-lookup.c (push_to_top_level): Likewise.
1963 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1965 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1968 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1971 2008-03-27 Tom Tromey <tromey@redhat.com>
1973 * Make-lang.in: Revert automatic dependency patch.
1975 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1978 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1979 (build_compound_expr): New, for compatibility with C
1980 build_compound_expr.
1981 (cp_build_compound_expr): Renamed from build_compound_expr.
1982 (build_c_cast): New, for compatibility with C build_c_cast.
1983 (cp_build_c_cast): Renamed from build_c_cast.
1984 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1985 * decl.c (cxx_maybe_build_cleanup): Ditto.
1986 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1987 (cp_build_compound_expr): Renamed from build_compound_expr.
1988 (build_c_cast): Add C-compatible prototype.
1989 (cp_build_c_cast): Renamed from build_c_cast.
1990 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1991 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1993 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1995 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1996 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1997 ending in a pack expansion, both of which can occur when
1998 substituting into a nested template.
1999 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
2000 instantiating the sizeof...(X) form, make tsubst_copy do the work.
2001 * parser.c (cp_parser_template_parameter): Deal with unnamed
2002 non-type template parameter packs identified by pack expansions in
2005 2008-03-26 Jakub Jelinek <jakub@redhat.com>
2008 * pt.c (apply_late_template_attributes): Don't call tsubst on
2009 first attribute argument if it is IDENTIFIER_NODE.
2012 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
2013 and LTGT_EXPR to pp_expression.
2015 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
2017 * pt.c (coerce_template_template_parm): Moved the body of the loop
2018 of coerce_template_template_parms here, to make iteration over a
2019 template argument pack simpler.
2020 Also, allow matching of a template parameter pack in the template
2021 template parameter to a template parameter in the template
2023 (coerce_template_template_parms): Deal with variadic template
2024 template parameters. Use coerce_template_template_parm.
2025 (unify): Make sure we coerce the template template argument's
2026 template arguments to the template template parameter's template
2027 parameters, not the other way around.
2029 2008-03-25 Tom Tromey <tromey@redhat.com>
2031 * Make-lang.in: Remove .o targets.
2032 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
2034 (c++_OBJS): New variable.
2035 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
2037 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
2039 * typeck.c (composite_pointer_type_r): Add SFINAE support.
2040 (composite_pointer_type): Ditto.
2041 (common_type): Fix call to composite_pointer_type.
2042 (cxx_sizeof_nowarn): New; used to be a macro.
2043 (cxx_sizeof_expr): Add SFINAE support.
2044 (cxx_alignof_expr): Ditto.
2045 (decay_conversion): Fix calls for SFINAE support.
2046 (rationalize_conditional_expr): Add SFINAE support.
2047 (build_class_member_access_expr): Ditto.
2048 (finish_class_member_access_expr): Ditto.
2049 (build_x_indirect_ref): Ditto.
2050 (build_indirect_ref): Original version renamed to
2051 cp_build_indirect_ref; new version provides a bridge from
2053 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
2055 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
2056 (build_function_call): Original version renamed to
2057 cp_build_function_call; new version provides a bridge from
2059 (cp_build_function_call): Was build_function_call; added SFINAE
2061 (convert_arguments): Add SFINAE support.
2062 (build_x_binary_op): Ditto.
2063 (build_binary_op): Original version renamed to cp_build_binary_op;
2064 new version provides a bridge from c-common.
2065 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
2066 (pointer_diff): Fix calls for SFINAE.
2067 (build_x_unary_op): Add SFINAE support.
2068 (condition_conversion): Fix calls for SFINAE.
2069 (build_unary_op): Original version renamed to cp_build_unary_op;
2070 new version provides a bridge from c-common.
2071 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
2072 (unary_complex_lvalue): Fix calls for SFINAE.
2073 (build_x_conditional_expr): Add SFINAE support.
2074 (build_x_compound_expr_from_list): Fix calls for SFINAE.
2075 (build_x_compound_expr): Add SFINAE support.
2076 (convert_ptrmem): Fix calls for SFINAE.
2077 (build_static_cast_1): Add SFINAE support.
2078 (build_static_cast): Ditto.
2079 (build_reinterpret_cast_1): Ditto.
2080 (build_reinterpret_cast): Ditto.
2081 (build_const_cast_1): Ditto.
2082 (build_const_cast): Ditto.
2083 (build_c_cast): Ditto.
2084 (build_modify_expr): Original version renamed to
2085 cp_build_modify_expr; new version provides a bridge from c-common.
2086 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
2088 (build_x_modify_expr): Add SFINAE support.
2089 (build_ptrmemfunc): Fix calls for SFINAE.
2090 (convert_for_assignment): Add SFINAE support.
2091 (convert_for_initialization): Ditto.
2092 (check_return_expr): Fix calls for SFINAE.
2093 (lvalue_or_else): Add SFINAE support.
2094 * init.c (perform_member_init): Fix calls for SFINAE.
2095 (emit_mem_initializers): Ditto.
2096 (expand_virtual_init): Ditto.
2097 (expand_cleanup_for_base): Ditto.
2098 (build_aggr_init): Add SFINAE support.
2099 (expand_default_init): Ditto.
2100 (expand_aggr_init_1): Fix calls for SFINAE.
2101 (build_offset_ref): Ditto.
2102 (build_new_1): Add SFINAE support.
2104 (build_vec_delete_1): Fix calls for SFINAE.
2105 (get_temp_regvar): Ditto.
2106 (build_vec_init): Add SFINAE support.
2107 (build_dtor_call): Fix calls for SFINAE.
2108 (build_delete): Ditto.
2109 (push_base_cleanups): Ditto.
2110 (build_vec_delete_1): Ditto.
2111 * class.c (build_base_path): Fix calls for SFINAE.
2112 (build_simple_base_path): Ditto.
2113 (convert_to_base_statically): Ditto.
2114 (build_vfn_ref): Ditto.
2115 (resolve_address_of_overloaded_function): Ditto.
2116 * decl.c (check_initializer): Fix calls for SFINAE.
2117 (register_dtor_fn): Ditto.
2118 (compute_array_index_type): Ditto.
2119 (finish_enum): Ditto.
2120 (start_preparsed_function): Ditto.
2121 (cxx_maybe_build_cleanup): Ditto.
2122 * call.c (convert_like): Add COMPLAIN argument.
2123 (convert_like_with_context): Ditto.
2124 (build_this): Fix calls for SFINAE.
2125 (build_user_type_conversion): Ditto.
2126 (resolve_args): Ditto.
2127 (build_new_function_call): Add SFINAE support.
2128 (build_operator_new_call): Fix calls for SFINAE.
2129 (build_object_call): Add SFINAE support.
2130 (build_conditional_expr): Ditto.
2131 (build_new_op): Ditto.
2132 (build_op_delete_call): Fix calls for SFINAE.
2133 (build_temp): Ditto.
2134 (convert_like_real): Add SFINAE support.
2135 (build_x_va_arg): Fix calls for SFINAE.
2136 (convert_default_arg): Ditto.
2137 (build_over_call): Add SFINAE support.
2138 (build_java_interface_fn_ref): Fix calls for SFINAE.
2139 (build_special_member_call): Add SFINAE support.
2140 (build_new_method_call): Ditto.
2141 (perform_implicit_conversion): Ditto.
2142 (perform_direct_initialization_if_possible): Ditto.
2143 (initialize_reference): Fix calls for SFINAE.
2144 * method.c (do_build_assign_ref): Fix calls for SFINAE.
2145 * rtti.c (build_headof): Fix calls for SFINAE.
2146 (get_tinfo_decl_dynamic): Ditto.
2147 (get_typeid): Ditto.
2148 (build_dynamic_cast_1): Add SFINAE support.
2149 (build_dynamic_cast): Ditto.
2150 (tinfo_base_init): Fix calls for SFINAE.
2151 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
2152 (do_end_catch): Ditto.
2153 (initialize_handler_parm): Ditto.
2154 (expand_start_catch_block): Ditto.
2155 (do_allocate_exception): Ditto.
2156 (do_free_exception): Ditto.
2157 (build_throw): Ditto.
2158 * cvt.c (build_up_reference): Fix calls for SFINAE.
2159 (convert_to_reference): Ditto.
2160 (ocp_convert): Ditto.
2161 (convert_to_void): Add SFINAE support.
2162 * tree.c (build_dummy_object): Fix calls for SFINAE.
2163 (stabilize_expr): Ditto.
2164 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
2166 (build_new_method_call): Ditto.
2167 (build_special_member_call): Ditto.
2168 (build_new_op): Ditto.
2169 (perform_implicit_conversion): Ditto.
2170 (perform_direct_initialization_if_possible): Ditto.
2171 (convert_to_void): Ditto.
2172 (build_aggr_init): Ditto.
2174 (build_vec_init): Ditto.
2175 (build_dynamic_cast): Ditto.
2176 (finish_call_expr): Ditto
2177 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
2178 (cxx_sizeof_nowarn): Remove macro; add function declaration.
2179 (build_class_member_access_expr): Add tsubst_flags_t parameter.
2180 (finish_class_member_access_expr): Ditto.
2181 (build_x_indirect_ref): Ditto.
2182 (cp_build_indirect_ref): New.
2183 (cp_build_function_call): Add tsubst_flags_t parameter.
2184 (build_x_unary_op): Ditto.
2185 (cp_build_unary_op): New.
2186 (build_x_conditional_expr): Add tsubst_flags_t parameter.
2187 (build_x_compound_expr): Ditto.
2188 (build_compound_expr): Ditto.
2189 (build_static_cast): Ditto.
2190 (build_reinterpret_cast): Ditto.
2191 (build_const_cast): Ditto.
2192 (build_c_cast): Ditto.
2193 (build_x_modify_expr): Ditto.
2194 (cp_build_modify_expr): New.
2195 (convert_for_initialization): Add tsubst_flags_t parameter.
2196 (cp_build_binary_op): Remove macro; add function declaration.
2197 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
2198 (lvalue_or_else): Ditto.
2199 (build_functional_cast): Ditto.
2200 * typeck2.c (digest_init): Fix calls for SFINAE.
2201 (process_init_constructor_array): Ditto.
2202 (process_init_constructor_record): Ditto.
2203 (build_x_arrow): Ditto.
2204 (build_m_component_ref): Ditto.
2205 (build_functional_cast): Add SFINAE support.
2206 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
2207 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
2208 (finish_expr_stmt): Ditto.
2209 (finish_for_expr): Ditto.
2210 (finish_asm_stmt): Ditto.
2211 (finish_non_static_data_member): Ditto.
2212 (finish_qualified_id_expr): Ditto.
2213 (finish_call_expr): Add SFINAE support.
2214 (finish_increment_expr): Fix calls for SFINAE.
2215 (finish_unary_op_expr): Ditto.
2216 (simplify_aggr_init_expr): Ditto.
2217 (finish_omp_clauses): Ditto.
2218 (finish_omp_for): Ditto.
2219 (finish_omp_barrier): Ditto.
2220 (finish_omo_flush): Ditto.
2221 * decl2.c (grok_array_decl): Fix calls or SFINAE.
2222 (build_anon_union_vars): Ditto.
2223 (get_guard_cond): Ditto.
2225 (one_static_initialization_or_destruction): Ditto.
2226 (do_static_initialization_or_destruction): Ditto.
2227 (generate_ctor_or_dtor_function): Ditto.
2228 (build_offset_ref_call_from_tree): Ditto.
2229 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2230 (cp_parser_postfix_dot_deref_expression): Ditto.
2231 (cp_parser_unary_expression): Ditto.
2232 (cp_parser_new_expression): Ditto.
2233 (cp_parser_cast_expression): Ditto.
2234 (cp_parser_binary_expression): Ditto.
2235 (cp_parser_question_colon_clause): Ditto.
2236 (cp_parser_assignment_expression): Ditto.
2237 (cp_parser_expression): Ditto.
2238 (cp_parser_builtin_offsetof): Ditto.
2239 (cp_parser_template_argument): Ditto.
2240 (cp_parser_functional_cast): Ditto.
2242 2008-03-24 Tom Tromey <tromey@redhat.com>
2244 * lex.c (handle_pragma_interface): Don't copy the filename.
2245 (handle_pragma_implementation): Copy filename using xstrdup.
2247 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2249 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2250 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2251 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2252 (PROMOTES_TO_AGGR_TYPE): Remove.
2253 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2254 * typeck.c (unary_complex_lvalue, build_modify_expr,
2255 convert_for_initialization): Adjust.
2256 * init.c (is_aggr_type): Remove.
2257 (is_class_type): Add.
2258 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2259 build_delete): Adjust.
2260 * lex.c (make_aggr_type): Remove.
2261 (make_class_type): Add.
2262 (cxx_make_type): Adjust.
2263 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2265 * decl.c (build_typename_type, make_typename_type,
2266 make_unbound_class_template, cxx_init_decl_processing,
2267 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2268 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2269 grok_op_properties, xref_tag, check_function_type): Adjust.
2270 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2271 add_builtin_candidate, add_builtin_candidates,
2272 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2273 is_subseq, compare_ics): Adjust.
2274 * method.c (use_thunk): Adjust.
2275 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2276 create_tinfo_types): Adjust.
2277 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2278 build_up_reference, convert_to_reference, convert_from_reference,
2279 ocp_convert, build_expr_type_conversion): Adjust.
2280 * tree.c (bind_template_template_parm, error_type): Adjust.
2281 * dump.c (cp_dump_tree): Adjust.
2282 * search.c (lookup_member): Adjust.
2283 * friend.c (make_friend_class, do_friend): Adjust.
2284 * typeck2.c (store_init_value, process_init_constructor_array,
2285 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2286 build_functional_cast): Adjust.
2287 * pt.c (finish_member_template_decl, process_template_parm,
2288 lookup_template_class, tsubst_function_type, tsubst,
2289 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2291 * semantics.c (begin_class_definition, finish_base_specifier,
2292 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2294 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2295 do_class_using_decl, lookup_qualified_name,
2296 maybe_process_template_type_declaration): Adjust.
2297 * decl2.c (grok_array_decl, check_member_template,
2298 constrain_class_visibility): Adjust.
2299 * parser.c (cp_parser_class_name): Adjust.
2301 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2303 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2305 2008-03-17 Jason Merrill <jason@redhat.com>
2308 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2309 a temp directly to a reference as per DR391.
2311 2008-03-12 Richard Guenther <rguenther@suse.de>
2315 2008-02-04 Richard Guenther <rguenther@suse.de>
2318 * decl.c (record_builtin_java_type): Make jboolean a
2319 integer type again where its mode doesn't match that of bool.
2321 2008-01-25 Richard Guenther <rguenther@suse.de>
2324 * decl.c (record_builtin_java_type): Make __java_boolean
2326 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2327 after TYPE_MAIN_VARIANT check.
2329 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2332 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2336 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2337 DECL_P in not a variable and appears more than once error messages.
2339 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2343 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2347 * typeck.c (structural_comptypes): Call cp_comptypes.
2348 (comptypes): New; called from the C/C++ common bits to perform
2350 (cp_comptypes): Renamed from comptypes, which is already used,
2351 with a different signature, by the C++ front end.
2352 (build_reinterpret_cast_1): Call cp_comptypes.
2353 (ptr_reasonably_similar): Ditto.
2354 * decl.c (decls_match): Ditto.
2355 * cvt.c (convert_to_reference): Ditto.
2356 * cp-tree.h (same_type_p): Ditto.
2357 (same_or_base_type_p): Ditto.
2358 (comptypes): Rename to cp_comptypes.
2359 * pt.c (canonical_type_parameter): Call cp_comptypes.
2361 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2363 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2364 test for equivalence between pointer and references.
2366 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2369 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2370 (check_field_decls): Likewise.
2371 (note_name_declared_in_class): Likewise.
2372 * call.c (build_new_op): Likewise.
2373 (convert_like_real): Likewise.
2374 (build_over_call): Likewise.
2375 * lex.c (unqualified_fn_lookup_error): Likewise.
2376 * parser.c (cp_parser_template_id): Likewise.
2377 * cvt.c (warn_ref_binding): Likewise.
2378 (convert_to_reference): Likewise.
2379 (ocp_convert): Likewise.
2380 (convert_to_void): Use error instead of pedwarn.
2381 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2382 * decl.c (compute_array_index_type): Use constant_expression_error.
2384 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2386 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2387 that auto is either a storage class or a simple type specifier,
2388 depending on the dialect.
2389 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2390 specifier in C++98 mode, error in C++0x mode (since we don't
2391 support auto as a type specifier, yet).
2392 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2393 storage specifier in C++0x mode.
2394 (cp_parser_simple_type_specifier): Parse `auto' as a
2395 simple-type-specifier, but error because we don't support it yet.
2397 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2399 * parser.c (cp_parser_nonclass_name): New.
2400 (cp_parser_pseudo_destructor_name): Use it instead of
2401 cp_parser_type_name.
2402 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2404 2008-02-29 Tom Tromey <tromey@redhat.com>
2406 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2407 (cp_lexer_get_preprocessor_token): Update.
2408 (cp_lexer_set_source_position_from_token): Don't call
2409 restore_input_file_stack.
2410 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2412 2008-02-28 Richard Guenther <rguenther@suse.de>
2415 2008-02-26 Richard Guenther <rguenther@suse.de>
2417 * decl.c (duplicate_decls): Remove decl from global mapping
2418 before ggc_freeing it.
2420 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2423 * rtti.c: Include c-pragma.h.
2424 (push_abi_namespace, pop_abi_namespace): New functions.
2425 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2426 create_tinfo_types, emit_support_tinfos): Use them.
2427 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2429 2008-02-26 Jason Merrill <jason@redhat.com>
2432 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2433 to name the struct for linkage purposes even if it has attributes.
2434 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2436 2008-02-26 Tom Tromey <tromey@redhat.com>
2438 * parser.c (eof_token): Remove old location code.
2439 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2440 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2442 (cp_write_global_declarations): Likewise.
2443 * lex.c (cxx_init): Remove old location code.
2444 (handle_pragma_implementation): Remove test of
2445 USE_MAPPED_LOCATION.
2446 * pt.c (tsubst): Remove old location code.
2447 * error.c (cp_print_error_function): Remove test of
2448 USE_MAPPED_LOCATION.
2449 * decl.c (pop_label): Remove old location code.
2450 (finish_function): Likewise.
2452 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2455 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2457 2008-02-26 Richard Guenther <rguenther@suse.de>
2459 * decl.c (duplicate_decls): Remove decl from global mapping
2460 before ggc_freeing it.
2462 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2465 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2467 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2469 * typeck.c (build_class_member_access_expr): Add appropriate
2470 OPT_W* parameter to warning.
2471 (build_reinterpret_cast_1): Likewise.
2472 * name-lookup.c (push_overloaded_decl): Likewise.
2474 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2477 * error.c (dump_expr): Handle CONJ_EXPR.
2479 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2482 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2483 (dump_expr): Handle FIXED_CST.
2485 2008-02-24 Jason Merrill <jason@redhat.com>
2487 * parser.c (cp_parser_declaration): Handle "inline namespace".
2488 (cp_parser_namespace_definition): Likewise.
2491 * name-lookup.c (arg_assoc_namespace): Look down into inline
2494 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2496 * typeck.c (check_for_casting_away_constness): Use 1 single
2497 argument, the type of cast, to decide what diagnostics generate.
2498 (build_static_cast_1): Remove unused code. Update call to
2499 check_for_casting_away_constness.
2500 (build_reinterpret_cast_1): Update call to
2501 check_for_casting_away_constness.
2502 (build_const_cast_1): Likewise.
2504 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2506 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2507 VEC_NEW_EXPR), forward to pp_expression.
2508 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2510 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2513 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2515 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2518 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2519 template decls' function decl.
2521 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2525 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2528 * pt.c (determine_specialization): In case of function templates,
2529 when the type of DECL does not match FN there is no match.
2531 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2534 * typeck.c (build_binary_op): Warn about floating point
2535 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2537 2008-02-19 Jason Merrill <jason@redhat.com>
2540 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2541 while we look for possible bindings.
2543 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2546 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2550 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2551 vars. Afterwards ensure v is VAR_DECL.
2554 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2555 call cp_finish_decl.
2556 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2559 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2564 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2565 is error_mark_node, return an error early.
2566 (find_parameter_packs_r): Pass the pointer set along to recursive
2567 calls of cp_walk_subtrees; don't try to manage the pointer set
2569 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2570 (make_pack_expansion): Ditto.
2571 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2572 a second pass through the tree with find_parameter_packs_r; that
2573 second pass no longer does anything.
2574 (push_template_decl_real): If we have an erroneous declaration,
2575 set its type to error_mark_node before returning an error.
2577 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2580 * pt.c (tsubst_initializer_list): Deal with the use of
2581 VOID_TYPE_NODE to indicate value-initialization of the bases.
2583 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2584 Jason Merrill <jason@redhat.com>
2588 * class.c (type_has_user_nondefault_constructor): New fn.
2589 * cp-tree.h: Declare it.
2590 * init.c (emit_mem_initializers): Use it for -W warning about
2591 missing base initializer.
2593 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2596 * pt.c (determine_specialization): In case of function templates,
2597 when the type of DECL does not match FN there is no match.
2599 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2600 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2603 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2604 are not identifier :: ~, return before calling cp_parser_type_name.
2606 2008-02-13 Jason Merrill <jason@redhat.com>
2608 PR c++/34962, c++/34937, c++/34939
2609 * decl2.c (is_late_template_attribute): Always defer attributes
2610 vector_size and weak.
2613 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2614 of enumerators, too.
2616 2008-02-12 Jason Merrill <jason@redhat.com>
2619 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2620 if we're doing conversions to call a user-defined conversion function.
2622 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2625 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2628 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2631 * init.c (build_new_1): Don't create placement_expr before
2632 constructing alloc_call. Verify that the pointer is passed by
2633 value to operator new.
2635 2008-02-11 Jason Merrill <jason@redhat.com>
2638 * pt.c (tsubst): Don't look up a template typedef in an explicit
2641 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2644 * tree.c (cp_build_qualified_type_real): When building a
2645 cv-qualified array type, build it as a unique type with
2646 build_cplus_array_type_1 and then adopt the unqualified type's
2649 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2652 * decl.c (groktypename): Check grokdeclarator return.
2654 2008-02-10 Jason Merrill <jason@redhat.com>
2657 * decl2.c (cp_write_global_declarations): Don't write out static
2658 data members with DECL_IN_AGGR_P set.
2660 2008-02-08 Jason Merrill <jason@redhat.com>
2663 * tree.c (build_target_expr_with_type): Handle void initializer.
2664 (bot_manip): Remap slot before recursing.
2666 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2669 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2671 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2674 * tree.c: Include tree-flow.h.
2675 (build_target_expr): Check type compatibility.
2676 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2677 * call.c (convert_like_real): Convert bitfield to expected type.
2679 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2683 * typeck.c (structural_comptypes): Call cp_comptypes.
2684 (comptypes): New; called from the C/C++ common bits to perform
2686 (cp_comptypes): Renamed from comptypes, which is already used,
2687 with a different signature, by the C++ front end.
2688 (build_reinterpret_cast_1): Call cp_comptypes.
2689 (ptr_reasonably_similar): Ditto.
2690 * decl.c (decls_match): Ditto.
2691 * cvt.c (convert_to_reference): Ditto.
2692 * cp-tree.h (same_type_p): Ditto.
2693 (same_or_base_type_p): Ditto.
2694 (comptypes): Rename to cp_comptypes.
2695 * pt.c (canonical_type_parameter): Call cp_comptypes.
2697 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2700 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2701 value dependent expression.
2703 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2706 * decl2.c (save_template_attributes): When we're modifying the
2707 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2708 all of the other variants to add those same attributes. Otherwise,
2709 the main variant will be inconsistent with those other variants.
2711 2008-02-04 Richard Guenther <rguenther@suse.de>
2714 * decl.c (record_builtin_java_type): Make jboolean a
2715 integer type again where its mode doesn't match that of bool.
2717 2008-02-02 Jason Merrill <jason@redhat.com>
2718 Mark Mitchell <mark@codesourcery.com>
2721 * init.c (build_value_init_1): New function.
2722 (build_value_init): New function.
2723 * typeck2.c (build_functional_cast): Call it.
2724 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2726 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2727 TYPE_HAS_CONSTRUCTOR.
2728 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2729 add_implicitly_declared_members): Adjust.
2730 (check_field_decls): Adjust. Remove warnings about reference/const
2731 in class without constructor.
2732 (check_bases_and_members): Adjust. Give those warnings here instead.
2733 * decl.c (fixup_anonymous_aggr): Adjust.
2734 (check_initializer): Adjust, clarify logic slightly.
2735 (grok_special_member_properties): Adjust, only set if user-provided.
2736 * rtti.c (create_tinfo_types): Don't set.
2737 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2738 Use same_type_ignoring_top_level_qualifiers_p.
2739 * pt.c (check_explicit_specialization): Adjust.
2740 (instantiate_class_template): Adjust.
2742 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2743 Jakub Jelinek <jakub@redhat.com>
2747 * typeck.c (structural_comptypes): Handle comparisons of
2748 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2750 * mangle.c (write_builtin_type): Map down to the canonical type,
2751 which will be one of the predefined type nodes.
2753 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2756 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2757 bits to allow for expansion of the number of middle end tree
2760 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2771 * typeck.c (check_return_expr): Tweak call to
2772 check_for_bare_parameter_packs.
2773 * class.c (add_method): Be careful with error_mark_nodes.
2774 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2776 * pt.c (struct find_parameter_pack_data): Remove
2778 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2779 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2780 (make_pack_expansion): Ditto.
2781 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2783 (process_template_parm): Tweak call to
2784 check_for_bare_parameter_packs.
2785 (push_template_decl_real): Tweak calls to
2786 check_for_bare_parameter_packs. If bare parameter packs are found
2787 in the list of exceptions, clear out that list after giving an
2789 * semantics.c (finish_cond): Tweak call to
2790 check_for_bare_parameter_packs.
2791 (finish_expr_stmt): Ditto.
2792 (finish_for_expr): Ditto.
2793 (finish_switch_cond): Ditto.
2794 (finish_mem_initializers): Ditto.
2795 (finish_member_declaration): Ditto.
2796 (finish_static_assert): Check for bare parameter packs in the
2798 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2799 attributes of a declaration.
2800 * parser.c (cp_parser_using_declaration): Tweak call to
2801 check_for_bare_parameter_packs.
2802 (cp_parser_base_clause): Ditto.
2804 2008-01-28 Jason Merrill <jason@redhat.com>
2807 * class.c (build_base_path): Fix !want_pointer case.
2809 2008-01-27 Jason Merrill <jason@redhat.com>
2812 * class.c (build_base_path): Fix previous change.
2814 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2817 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2820 2008-01-26 Richard Guenther <rguenther@suse.de>
2823 * typeck.c (build_binary_op): Remove code to shorten compares.
2825 2008-01-25 Richard Guenther <rguenther@suse.de>
2828 * decl.c (record_builtin_java_type): Make __java_boolean
2830 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2831 after TYPE_MAIN_VARIANT check.
2833 2008-01-25 Jason Merrill <jason@redhat.com>
2836 * class.c (build_base_path): Don't mess with virtual access if
2838 * call.c (standard_conversion): Don't check whether source type
2841 * decl2.c (is_late_template_attribute): Don't defer attribute
2842 visibility just because the type is dependent.
2844 2008-01-25 Jason Merrill <jason@redhat.com>
2845 Mark Mitchell <mark@codesourcery.com>
2848 * call.c (standard_conversion): Allow conversion from integer/real
2850 (compare_ics): Such a conversion is worse than a normal arithmetic
2853 2008-01-25 Richard Guenther <rguenther@suse.de>
2856 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2859 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2862 * pt.c (push_template_decl_real): Return error_mark_node in case
2863 of template definition of non-template.
2865 2008-01-24 Jason Merrill <jason@redhat.com>
2868 * decl2.c (is_late_template_attribute): Defer any attribute with
2869 dependent args. Also defer type attributes if the type is dependent.
2871 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2872 Alexandre Oliva <aoliva@redhat.com>
2875 * call.c (reference_binding): For bitfields use the declared bitfield
2877 (add_builtin_candidates): Likewise.
2878 * class.c (layout_class_type): For bitfields copy over the
2879 original type quals.
2881 2008-01-22 Jason Merrill <jason@redhat.com>
2884 * decl.c (groktypename): Also ignore attributes on dependent
2885 possibly-class types.
2888 * friend.c (do_friend): Check for prior declaration of a friend
2889 function of a local class.
2890 * name-lookup.c (lookup_name_innermost_nonclass_level):
2892 * name-lookup.h: Declare it.
2894 2008-01-22 Tom Tromey <tromey@redhat.com>
2897 * init.c (build_new_1): Only disallow Java aggregates.
2899 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2902 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2903 if decl or init is error_mark_node.
2906 * error.c (dump_expr): Handle VECTOR_CST.
2908 2008-01-21 Jason Merrill <jason@redhat.com>
2911 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2914 * pt.c (retrieve_local_specialization): Robustify.
2915 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2918 * pt.c (tsubst): Only call retrieve_local_specialization if the
2919 original typedef was in a function template.
2922 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2924 2008-01-21 Richard Guenther <rguenther@suse.de>
2927 * error.c (cp_print_error_function): Deal with recursive
2930 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2933 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2935 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2939 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2940 on non-IS_AGGR_TYPE scope.
2941 (constructor_name_p): Assert IS_AGGR_TYPE.
2943 2008-01-18 Ian Lance Taylor <iant@google.com>
2946 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2947 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2948 DECL_IS_OPERATOR_NEW flag.
2950 2008-01-16 Richard Guenther <rguenther@suse.de>
2953 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2954 for conversions to type variants.
2956 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2958 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2959 declaration and code. Update copyright year.
2961 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2964 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2965 know we have a class type.
2967 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2970 * pt.c (coerce_template_parameter_pack): When substituting into
2971 the type of a non-type template parameter pack. use the
2972 deduced/substituted arguments.
2973 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2974 can be a parameter pack with the ellipsis following it. When we
2975 have an erroneous declaration, allow it to be a parameter pack.
2976 (cp_parser_template_parameter): Complain about default
2977 arguments on non-type template parameter packs, and parse them
2978 using the new cp_parser_default_argument.
2979 (cp_parser_parameter_declaration): Complain about parameter packs
2980 with default arguments. Move parsing of default arguments into a
2981 new function, cp_parser_default_argument.
2982 (cp_parser_default_argument): New; extracted from
2983 cp_parser_parameter_declaration.
2985 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2991 * typeck.c (check_return_expr): If there are bare parameter packs
2992 in the return value, set it to error_mark_node.
2993 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2994 * pt.c (find_parameter_packs_r): Look at the type of
2995 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2996 (check_for_bare_parameter_packs): Flip the result: now returns
2997 TRUE when there were bare parameter packs, FALSE otherwise.
2998 (push_template_decl_real): Deal with flipped result of
2999 check_for_bare_parameter_packs.
3000 * semantics.c (finish_cond): If there are bare parameter packs in
3001 the conditional, set it to error_mark_node.
3002 (finish_expr_stmt): If there are bare parameter packs in the
3003 expression, set it to error_mark_node.
3004 (finish_for_expr): Ditto.
3005 (finish_switch_cond): If there are bare parameter packs in
3006 the conditional, set it to error_mark_node.
3007 (finish_mem_initializers): If there are bare parameter packs in
3008 the member initializer, set it to error_mark_node.
3009 (finish_member_declaration): Check the attributes of the
3010 declaration for bare parameter packs, and remove the attributes if
3011 any have bare parameter packs.
3012 * parser.c (cp_parser_using_declaration): Check the using
3013 declaration for bare parameter packs.
3014 (cp_parser_base_clause): If there are bare parameter packs in a
3015 base specifier, don't add it to the chain.
3017 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3020 * error.c (dump_simple_decl): Display ellipsis for template
3021 non-type parameter packs.
3022 (dump_decl): Display ellipsis for template type parameter packs.
3023 (dump_template_decl): Display ellipsis for template template
3025 * pt.c (redeclare_class_template): When redeclaring a class
3026 template, check for collisions between template parameters and
3027 template parameter packs.
3029 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3032 * pt.c (process_partial_specialization): Don't mark template
3033 parameters that occur in non-deduced contexts.
3034 (struct pair_fn_data): Add include_nondeduced_p.
3035 (for_each_template_parm_r): Only visit non-deduced contexts if
3036 include_nondeduced_p is set.
3037 (for_each_template_parm): Added parameter include_nondeduced_p,
3038 which states whether template parameters found in non-deduced
3039 contexts should be visited.
3040 (uses_template_parms): Visit all template parameters, even those
3041 in non-deduced contexts.
3043 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
3046 * pt.c (check_default_tmpl_args): Check for parameter packs that
3047 aren't at the end of a primary template.
3048 (push_template_decl_real): Remove check for parameter packs that
3049 aren't at the end of a primary template; that now happens in
3050 check_default_tmpl_args.
3051 * semantics.c (finish_template_template_parm): Use
3052 check_default_tmpl_args to check for errors in the template
3055 2008-01-12 Doug Kwan <dougkwan@google.com>
3057 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
3058 instead of OPT_Wreturn_type in warning due to ignored return type
3060 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
3061 instead of OPT_Wreturn_type in warning due to ignored return type
3064 2008-01-08 Jakub Jelinek <jakub@redhat.com>
3067 * semantics.c (finish_omp_for): Don't call
3068 fold_build_cleanup_point_expr if processing_template_decl.
3070 2008-01-04 Paolo Carlini <pcarlini@suse.de>
3071 Jakub Jelinek <jakub@redhat.com>
3074 * error.c (dump_template_argument): Deal with TREE_LIST.
3076 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
3078 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
3079 long" in C++0x mode; change the warning to note that "long long"
3080 is only unsupported in C++98 mode.
3082 2007-12-20 Jason Merrill <jason@redhat.com>
3085 * call.c (standard_conversion): Derived-to-base is considered a
3086 standard conversion.
3088 2007-12-19 Jakub Jelinek <jakub@redhat.com>
3091 * parser.c (cp_parser_omp_parallel): For non-combined parallel
3092 call cp_parser_statement rather than
3093 cp_parser_already_scoped_statement.
3095 2007-12-18 Jason Merrill <jason@redhat.com>
3098 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
3100 (dependent_type_p_r): Handle the domain of an array.
3102 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
3103 Jakub Jelinek <jakub@redhat.com>
3108 * pt.c (template_template_parm_bindings_ok_p): New; verifies
3109 bindings of template template parameters after all template
3110 arguments have been deduced.
3111 (coerce_template_parms): Don't complain when COMPLAIN doesn't
3113 (fn_type_unification): Use template_template_parm_bindings_ok_p.
3114 (unify): Deal with variadic, bound template template parameters.
3115 (get_class_bindings): Use template_template_parm_bindings_ok_p.
3117 2007-12-18 Jakub Jelinek <jakub@redhat.com>
3120 * decl.c (grokdeclarator): Reject friend sfk_constructor
3123 2007-12-17 Jakub Jelinek <jakub@redhat.com>
3126 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
3129 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
3132 * cp-lang.c (cp_classify_record): New.
3133 (LANG_HOOKS_CLASSIFY_RECORD): Override.
3135 2007-12-11 Jakub Jelinek <jakub@redhat.com>
3138 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
3141 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
3142 dynamic_cast in a template.
3144 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
3147 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
3148 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
3150 2007-12-10 Jakub Jelinek <jakub@redhat.com>
3153 * error.c (dump_type_prefix, dump_type_suffix): Handle
3154 TYPE_PACK_EXPANSION.
3157 * error.c (dump_expr): Handle ABS_EXPR.
3159 2007-12-09 Jakub Jelinek <jakub@redhat.com>
3163 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
3164 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
3165 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
3166 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
3167 flag_use_repository and repo_emit_p returned 2.
3169 2007-12-06 Jakub Jelinek <jakub@redhat.com>
3172 * tree.c (stabilize_call, stabilize_init): Do nothing if
3173 processing_template_decl.
3175 2007-12-05 Jakub Jelinek <jakub@redhat.com>
3178 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
3179 error instead of assertion failure.
3180 * parser.c (cp_parser_decltype): If closing paren is not found,
3181 return error_mark_node.
3183 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3186 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
3188 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
3189 since arg_assoc_template_arg will deal with them (better).
3191 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3194 * pt.c (tsubst_exception_specification): Handle substitutions into
3195 member templates, where tsubst_pack_expansion returns a
3196 TYPE_PACK_EXPANSION.
3198 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
3201 * pt.c (unify_pack_expansion): If we didn't deduce any actual
3202 bindings for the template parameter pack, don't try to keep the
3203 empty deduced arguments.
3204 (unify): If a parameter is a template-id whose template argument
3205 list contains a pack expansion that is not at the end, then we
3206 cannot unify against that template-id.
3208 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3211 * pt.c (current_template_args): Use error_operand_p.
3213 2007-12-02 Paolo Carlini <pcarlini@suse.de>
3216 * error.c (dump_decl): Handle TREE_BINFO.
3218 2007-12-01 Ollie Wild <aaw@google.com>
3221 * typeck.c (build_binary_op): Add conversion of pointers to function
3222 members appearing as operands to the equality operators.
3224 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3227 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3229 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3232 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3234 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3239 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3241 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3244 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3246 PR tree-optimization/34181
3247 * method.c (use_thunk): Don't inline the call in the thunk.
3250 * tree.c (decl_linkage): Static data members and static member
3251 functions in anonymous ns classes are lk_external.
3253 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3256 * decl.c (start_preparsed_function): Pass
3257 processing_template_decl for the new allocate_struct_function
3260 2007-11-25 Richard Guenther <rguenther@suse.de>
3262 * decl.c (poplevel): Use BLOCK_CHAIN.
3264 2007-11-24 Ollie Wild <aaw@google.com>
3266 * typeck.c (delta_from_ptrmemfunc): New function.
3267 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3268 (build_binary_op): Call delta_from_ptrmemfunc.
3270 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3274 * decl.c (cp_finish_decl): Disallow variable or field
3275 definitions if extern "Java" aggregates.
3276 (grokparms): Disallow parameters with extern "Java"
3278 (check_function_type): Disallow function return values
3279 with extern "Java" aggregates.
3280 * init.c (build_new_1): Disallow placement new with
3281 extern "Java" aggregates.
3283 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3284 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3287 * call.c (convert_like_real): Build a zero constant when __null is
3288 converted to an integer type.
3290 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3293 * decl2.c (cp_write_global_declarations): Issue error about static
3294 data members in anonymous namespace which are declared and used,
3297 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3300 * parser.c (cp_parser_class_head): Reject function template ids.
3303 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3304 when processing_template_decl to build_array_type.
3307 * pt.c (more_specialized_fn): Don't segfault if one or
3308 both argument list end with ellipsis.
3310 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3313 * semantics.c (finish_call_expr): Set
3314 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3315 or OVERLOAD with all noreturn functions.
3317 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3320 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3323 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3330 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3331 set to error_mark_node the outermost POINTER_TYPE to the pack if
3332 it is seen in a POINTER_TYPE.
3333 (push_template_decl_real): If check_for_bare_parameter_packs
3334 fails for function return type, set the return type to
3335 integer_type_node. If check_for_bare_parameter_packs failed
3336 for non-function, return error_mark_node.
3339 * call.c (build_new_op): Call resolve_args before calling
3342 2007-11-11 Tom Tromey <tromey@redhat.com>
3345 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3347 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3350 * pt.c (redeclare_class_template): Update error message. Use a
3351 note to show the previous declaration.
3352 (tsubst_friend_class): Use the location of the friend template as
3353 the input location before calling redeclare_class_template.
3355 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3358 * semantics.c (finish_pseudo_destructor_expr): Handle
3359 object == error_mark_node.
3361 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3364 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3365 is not scalar type, let finish_class_member_access_expr handle
3366 diagnostics. Pass BIT_NOT_EXPR argument to
3367 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3369 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3372 * decl.c (cp_complete_array_type): If any of the initializer
3373 elements are pack expansions, don't compute the array size yet.
3375 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3378 * tree.c (decl_linkage): Fields have no linkage.
3380 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3382 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3384 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3389 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3390 Be careful with ERROR_MARK_NODEs.
3391 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3394 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3397 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3400 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3404 * tree.c (c_build_qualified_type): Define bridge to
3405 cp_build_qualified_type.
3407 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3418 * typeck.c (check_return_expr): Pass address of retval to
3419 check_for_bare_parameter_packs.
3420 * class.c (build_base_field): Tolerate bases that have no layout
3422 (end_of_base): Ditto.
3423 * tree.c (canonical_type_variant): Be careful with
3425 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3427 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3428 which states whether parameter packs should be replaced with
3430 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3431 possible. If set_packs_to_error is set true, replace the parameter
3432 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3433 (uses_parameter_packs): Don't set parameter packs to
3435 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3436 which may be modified (if it is a parameter pack). Instructs
3437 find_parameter_packs_r to replace parameter packs with
3438 ERROR_MARK_NODE (so that they won't cause errors later on).
3439 (process_template_parm): Pass pointer to
3440 check_for_bare_parameter_packs.
3441 (process_partial_specialization): Replace pack expansions before
3442 the end of the template argument list with ERROR_MARK_NODE.
3443 (push_template_decl_real): Pass pointer to
3444 check_for_bare_parameter_packs. Replace parameter packs not at the
3445 end of the template parameter list with ERROR_MARK_NODE.
3446 (convert_template_argument): Be more careful about using DECL_NAME
3447 on only declarations.
3448 (unify): Can't unify against ERROR_MARK_NODE.
3449 * semantics.c (finish_cond): Pass pointer to
3450 check_for_bare_parameter_packs.
3451 (finish_expr_stmt): Ditto.
3452 (finish_for_expr): Ditto.
3453 (finish_switch_cond): Pass pointer to
3454 check_for_bare_parameter_packs, and call it before we put the
3455 condition into the statement.
3456 (finish_mem_initializers): Pass pointer to
3457 check_for_bare_parameter_packs.
3458 (finish_member_declaration): Ditto.
3459 * parser.c (cp_parser_base_clause): Ditto.
3461 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3464 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3465 with the final TREE_READONLY flag in place. processing_template_decl
3466 is known to be 0 in this part of function.
3469 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3470 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3471 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3472 * semantics.c (finish_omp_atomic): Revert most of the
3473 2007-02-05 changes, just keep the new representation of
3474 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3476 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3479 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3482 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3487 * typeck.c (merge_types): Don't lose rvalue references when
3489 * call.c (build_over_call): Don't elide move constructors just
3490 because the copy constructor is trivial (!).
3491 (compare_ics): If comparing cv-qualifiers fails, we can still order
3492 based on binding lvalues vs. rvalues.
3494 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3497 * pt.c (unify_pack_expansion): bring handling of function call
3498 arguments into line with type_unification_real.
3500 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3502 * typeck.c (build_binary_op): Use pedwarn instead of error for
3505 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3508 * parser.c (cp_parser_unary_expression): For &&label call
3509 cp_parser_non_integral_constant_expression and return error_mark_node
3510 if it returned true.
3513 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3514 is neither FUNCTION_TYPE nor METHOD_TYPE.
3516 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3519 * parser.c (cp_parser_nested_name_specifier_opt): Use
3520 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3521 typedef of currently open class.
3523 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3526 * error.c (dump_expr): Deal specially with statements.
3528 2007-11-01 Jason Merrill <jason@redhat.com>
3531 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3533 (lookup_template_class): Use it to get the outer template args
3534 for instantiating one.
3537 * pt.c (reduce_template_parm_level): tsubst the parameters
3538 of a template template parm.
3540 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3543 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3545 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3548 * parser.c (cp_parser_postfix_dot_deref_expression): If
3549 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3550 first and if that succeeds and type is SCALAR_TYPE_P, create
3554 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3555 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3556 as for std::type_info.
3558 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3561 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3562 pp_cxx_delete_expression): Change to static linkage.
3563 * cxx-pretty-print.h: Adjust declarations.
3564 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3565 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3566 MODOP_EXPR): Forward to pp_expression.
3568 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3571 2007-10-31 Christian Bruel <christian.bruel@st.com>
3572 Mark Mitchell <mark@codesourcery.com>
3575 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3576 if retval is volatile.
3578 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3581 * decl2.c (build_offset_ref_call_from_tree): Call
3582 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3583 if FN is DOTSTAR_EXPR.
3585 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3589 * pt.c (find_parameter_packs_r): Fix typo in comment.
3590 (convert_template_argument): Look at the pattern of a pack
3591 expansion to determine what kind of entity we're converting.
3592 (coerce_template_parameter_pack): When we have coerced a non-type
3593 template parameter pack, substitute into the type of that pack.
3594 (tsubst_pack_expansion): When our substitution of a parameter pack
3595 is a "trivial" substitution of itself, just substitute into the
3596 pack expansion rather than actually expanding.
3598 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3601 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3602 for non-integral type bitfields. Return true if bitfield is correct, false
3603 error has been diagnosed.
3604 (check_field_decls): If check_bitfield_decl returned false, call also
3607 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3608 Mark Mitchell <mark@codesourcery.com>
3611 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3612 class member error out and return.
3614 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3616 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3617 to current_function_decl rather than 0.
3620 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3622 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3624 2007-10-27 Jason Merrill <jason@redhat.com>
3627 * call.c (convert_default_arg): Detect recursion.
3629 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3632 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3633 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3635 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3637 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3639 2007-10-26 Jason Merrill <jason@redhat.com>
3642 * pt.c (get_template_info): New fn.
3643 (template_class_depth): Use it.
3644 (push_template_decl_real): Check that the template args of the
3645 definition match the args of the previous declaration.
3647 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3650 * decl2.c (coerce_new_type): Do not allow a default argument for
3651 the first parameter.
3653 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3656 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3657 don't see the leading '('. Only lookup names if we get an
3660 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3663 * parser.c (cp_parser_parenthesized_expression_list): Set
3664 greater_than_is_operator_p to true in between the parens.
3666 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3669 * decl.c (grokdeclarator): In case of conflicting specifiers
3670 just return error_mark_node.
3672 2007-10-26 Ollie Wild <aaw@google.com>
3674 * expr.c (cxx_expand_expr): Removed.
3675 * cp-tree.h (exx_expand_expr): Removed.
3676 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3679 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3682 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3684 2007-10-23 Jason Merrill <jason@redhat.com>
3686 PR c++/25950 (DR 391)
3687 * call.c (struct conversion): Remove check_copy_constructor_p.
3688 (reference_binding): Always bind a reference directly to a
3689 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3691 (check_constructor_callable): Remove.
3692 (convert_like_real): Don't call it.
3693 (initialize_reference): Don't call check_constructor_callable.
3694 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3695 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3696 conversions if LOOKUP_NO_TEMP_BIND.
3697 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3698 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3700 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3702 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3705 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3706 before checking if its type is integral.
3708 2007-10-22 Jason Merrill <jason@redhat.com>
3711 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3712 * pt.c (apply_late_template_attributes): Splice out dependent
3713 attributes from DECL_ATTRIBUTES.
3715 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3717 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3719 * typeck.c (build_binary_op) : Use appropriate warning option
3720 instead of unnamed warning.
3722 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3725 * pt.c (current_template_args): Do not change TREE_LIST elements
3726 with a TREE_VALUE of error_mark_node.
3728 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3730 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3731 * decl.c (start_decl): Tidy.
3732 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3734 (grokdeclarator): Clarify comment.
3736 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3739 * decl.c (grokfndecl): Return NULL after the "definition of
3740 implicitly-declared" error happened.
3742 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3745 * call.c (build_user_type_conversion_1): Do not consider conversion
3746 functions to convert a (possibly cv-qualified) object to the (possibly
3747 cv-qualified) same object type (or a reference to it), to a (possibly
3748 cv-qualified) base class of that type (or a reference to it).
3750 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3752 * pt.c (tsubst): Use template_parm_level_and_index.
3754 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3757 * parser.c (cp_parser_compound_statement): Handle label-declarations
3758 at the beginning of the compound statement.
3759 (cp_parser_block_declaration): Issue diagnostics about __label__
3760 not at the beginning of a block.
3762 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3765 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3766 to convert_template_argument.
3767 (coerce_template_parms): Return error_mark_node after fixed-length
3769 (tsubst_decl): Check for error_mark_node the return value of the
3770 first tsubst in 'case VAR_DECL'.
3772 2007-10-08 Ollie Wild <aaw@google.com>
3774 * typeck2.c (digest_init): Call cplus_expand_constant after
3775 convert_for_initialization.
3776 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3777 * expr.c (cplus_expand_constant): Updated function description.
3779 2007-10-04 Jason Merrill <jason@redhat.com>
3782 * call.c (initialize_reference): Handle local static reference
3785 2007-10-03 Jason Merrill <jason@redhat.com>
3788 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3789 (push_namespace): Here.
3790 (handle_namespace_attrs): New fn for the attr code.
3791 (leave_scope): Don't pop_visibility.
3792 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3793 * parser.c (cp_parser_namespace_definition): Call
3794 handle_namespace_attrs and pop_visibility as appropriate.
3797 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3799 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3801 * decl.c (duplicate_decls): Preserve linkage flags for mere
3802 redeclarations of gnu_inline definitions.
3804 2007-10-03 Jason Merrill <jason@redhat.com>
3807 * decl.c (wrap_cleanups_r): New fn.
3808 (wrap_temporary_cleanups): New fn.
3809 (initialize_local_var): Call it.
3811 2007-09-29 Jason Merrill <jason@redhat.com>
3814 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3815 constant to not have DECL_EXTERNAL if it's file-local.
3817 2007-09-28 Ollie Wild <aaw@google.com>
3820 2007-09-27 Ollie Wild <aaw@google.com>
3822 * typeck2.c (digest_init): Call cplus_expand_constant after
3823 convert_for_initialization.
3824 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3825 * expr.c (cplus_expand_constant): Updated function description.
3827 2007-09-28 Jason Merrill <jason@redhat.com>
3830 * class.c (layout_empty_base): Take rli parameter, update
3831 rli->record_align if empty base has user-specified alignment.
3832 (build_base_field): Pass rli to it.
3834 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3837 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3839 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3842 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3843 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3844 (dump_parameters): Just call dump_type for argument packs too.
3846 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3849 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3850 qualification by creating qualified PACK_EXPANSION_PATTERN and
3851 then calling make_pack_expansion on it.
3853 2007-09-27 Ollie Wild <aaw@google.com>
3855 * typeck2.c (digest_init): Call cplus_expand_constant after
3856 convert_for_initialization.
3857 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3858 * expr.c (cplus_expand_constant): Updated function description.
3860 2007-09-27 Jason Merrill <jason@redhat.com>
3863 * decl2.c (is_late_template_attribute): Don't crash on unknown
3866 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3869 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3870 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3871 spaces in the formatting.
3872 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3874 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3876 * error.c (cxx_print_error_function): Add third argument, pass
3877 it over to lhd_print_error_function.
3878 (cp_print_error_function): If diagnostic->abstract_origin, print
3880 * cp-tree.h (struct diagnostic_info): New forward decl.
3881 (cxx_print_error_function): Add third argument.
3883 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3886 * name-lookup.c (pushtag): Do not create an implicit typedef before
3887 the associated type declaration is known to be valid.
3889 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3891 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3892 rather than pointers.
3894 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3897 * search.c (check_final_overrider): Fail if
3898 targetm.comp_type_attributes returns 0.
3900 2007-09-24 Jason Merrill <jason@redhat.com>
3903 * pt.c (resolve_typename_type): Don't look things up in the original
3904 template if it would mean losing template arguments.
3906 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3909 * cp-tree.h (cxx_type_hash_eq): New prototype.
3910 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3911 * tree.c (cxx_type_hash_eq): New function.
3913 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3916 * tree.c (cp_build_qualified_type_real): Build a canonical
3917 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3919 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3923 * tree.c (cplus_array_compare): Compare pointers, not types.
3924 (build_cplus_array_type_1): Store new array type into the hash
3925 table before building the canonical type; build the canonical type
3927 (cp_build_qualified_type_real): Put all of the array types with
3928 cv-qualified element types into the C++ array hash table, built as
3929 variants of the unqualified versions.
3931 2007-09-23 Jason Merrill <jason@redhat.com>
3934 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3935 for deprecation warnings.
3937 2007-09-22 Jason Merrill <jason@redhat.com>
3940 * call.c (build_over_call): Warn about deprecated virtuals.
3943 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3944 (MAYBE_TAGGED_TYPE_P): Remove.
3945 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3946 instead of calling is_late_template_attribute again.
3947 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3948 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3949 Don't crash on typedefs from non-template classes.
3950 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3951 (is_late_template_attribute): All attributes applied to template
3952 parms or typename types are dependent. Static.
3953 (splice_template_attributes): Pass decl through.
3954 (save_template_attributes): Likewise.
3956 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3959 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3960 returned from tsubst_pack_expansion.
3961 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3962 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3964 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3967 * semantics.c (finish_id_expression): Use consistently
3968 context_for_name_lookup.
3969 * decl.c (fixup_anonymous_aggr): Fix error message for
3970 anonymous struct (vs union).
3972 2007-09-19 Jason Merrill <jason@redhat.com>
3975 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3976 (retrieve_specialization): Only tagged types use
3977 DECL_TEMPLATE_INSTANTIATIONS.
3978 (instantiate_class_template): Push nested classes too.
3979 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3981 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3982 * init.c (is_aggr_type): Remove redundant tests.
3983 * class.c (push_nested_class): Use CLASS_TYPE_P.
3985 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3988 * init.c (build_zero_init): If, recursively, build_zero_init
3989 returns a NULL_TREE, do not append it to the VEC of constructors.
3991 2007-09-18 Jason Merrill <jason@redhat.com>
3994 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3995 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3996 ATTR_FLAG_TYPE_IN_PLACE.
3997 (tsubst): Do unqualified lookup to find typedefs from current class.
3998 [ARRAY_TYPE]: Propagate alignment info.
3999 * decl2.c (is_late_template_attribute): Only defer handling of
4000 attribute aligned if the expression is dependent.
4001 (save_template_attributes): If we're deferring any attributes,
4002 make this a naming typedef.
4004 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4006 PR c++/33462 (again)
4007 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
4008 va_arg instead of __builtin_va_arg.
4010 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4013 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
4014 (pp_cxx_primary_expression): Use it.
4015 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
4016 * error.c (dump_expr): Use it.
4018 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4021 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
4022 out case TYPEID_EXPR to...
4023 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
4024 and pp_cxx_right_paren.
4025 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
4026 * error.c (dump_expr): Use it.
4028 2007-09-18 Paolo Carlini <pcarlini@suse.de>
4031 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
4032 (pp_cxx_primary_expression): Use it.
4033 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
4034 * error.c (dump_expr): Use it.
4036 2007-09-16 Paolo Carlini <pcarlini@suse.de>
4039 * init.c (build_new): Remove warning for zero-element
4042 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
4045 * call.c (maybe_handle_implicit_object): Set this_p, clear
4046 rvaluedness_matches_p.
4047 (compare_ics): Do not compare rvaluedness matching when one of the
4048 operands is an implicit object.
4050 2007-09-14 Jason Merrill <jason@redhat.com>
4052 PR c++/17743, c++/19163
4053 * decl2.c (is_late_template_attribute): New fn.
4054 (splice_template_attributes, save_template_attributes): New fns.
4055 (cplus_decl_attributes): Call save_template_attributes.
4056 * pt.c (apply_late_template_attributes): New fn.
4057 (instantiate_class_template, tsubst_decl): Use it.
4058 * cp-tree.h: Declare is_late_template_attribute.
4060 2007-09-13 Tom Tromey <tromey@redhat.com>
4062 * parser.c (cp_lexer_new_main): Don't use
4063 c_lex_return_raw_strings.
4064 (cp_lexer_get_preprocessor_token): Update. Add special case when
4067 2007-09-11 Jan Hubicka <jh@suse.cz>
4069 * method.c (use_thunk): Use tree_rest_of_compilation
4070 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
4071 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
4072 * cp-tree.h (expand_body): Kill.
4073 (emit_associated_thunks): Declare.
4074 * semantics.c (emit_associated_thunks): Export.
4075 (expand_body): Kill.
4077 2007-09-09 David Daney <ddaney@avtrex.com>
4080 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
4081 to calculate cookie_ptr.
4083 2007-09-08 Jason Merrill <jason@redhat.com>
4086 * pt.c (most_specialized_class): Set processing_template_decl
4087 while tsubsting partial spec args.
4089 2007-09-06 Jason Merrill <jason@redhat.com>
4091 * decl2.c (get_guard): Copy visibility from the guarded variable.
4093 2007-09-06 Jan Hubicka <jh@suse.cz>
4095 * semantics.c (expand_body): Do not mark arguments of clones used.
4097 2007-09-06 Paolo Carlini <pcarlini@suse.de>
4100 * decl.c (cp_finish_decl): When processing_template_decl,
4101 deal correctly with init as TREE_LIST.
4103 2007-09-06 Tom Tromey <tromey@redhat.com>
4105 * decl.c (finish_function): Put return's location on line zero of
4108 2007-09-05 Jason Merrill <jason@redhat.com>
4111 * except.c (prepare_eh_type): Use type_decays_to.
4114 * init.c (build_delete): Use build_headof to get the address of the
4115 complete object if we aren't using the deleting destructor.
4116 * rtti.c (build_headof): No longer static.
4117 * cp-tree.h: Declare it.
4119 2007-09-06 Jakub Jelinek <jakub@redhat.com>
4121 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
4122 decl if a prototype for XX is provided with throw().
4125 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
4126 on __*_chk non-__builtin_* decls.
4128 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4131 * semantics.c (finish_id_expression): Use context_for_name_lookup
4132 insted of DECL_CONTEXT, to see through anonymous structs and unions.
4133 * class.c (finish_struct_anon): Deal correctly with anonymous
4134 structs (vs unions, as GNU extension) in error messages.
4136 2007-09-05 Jan Hubicka <jh@suse.cz>
4138 * sematics.c (expand_body): Remove unnecesary import_export_decl
4139 call, DECL_EXTERNAL checks and current_function_decl saving.
4141 2007-09-05 Paolo Carlini <pcarlini@suse.de>
4143 PR c++/29731 (again)
4144 * parser.c (cp_parser_primary_expression): Return error_mark_node
4145 when a statement-expression is found in a template-argument list.
4147 2007-09-04 Jason Merrill <jason@redhat.com>
4149 * except.c (initialize_handler_parm): Use
4150 fold_build_cleanup_point_expr.
4153 * call.c (reference_binding): Don't look for user-defined conversions
4157 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
4158 the MUST_NOT_THROW_EXPR.
4160 2007-09-04 Richard Sandiford <richard@codesourcery.com>
4162 * decl.c (cp_finish_decl): Call determine_visibility before
4163 make_rtl_for_nonlocal_decl.
4165 2007-09-04 Jason Merrill <jason@redhat.com>
4168 * pt.c (most_specialized_class): Substitute outer template
4169 arguments into the arguments of a member template partial
4171 (strip_innermost_template_args): New fn.
4173 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
4175 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
4177 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4179 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
4180 * decl.c (cp_make_fname_decl): Likewise,
4181 * parser.c (cp_parser_string_literal): Likewise,
4182 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
4183 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4186 2007-09-02 Paolo Carlini <pcarlini@suse.de>
4189 * typeck.c (build_unary_op): Fix error message for
4190 Boolean expression as operand to operator--.
4192 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4194 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
4195 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
4198 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4201 * init.c (build_default_init): Make extern.
4202 * cp-tree.h (build_default_init): Declare here.
4203 * pt.c (tsubst_expr): When the instantiation of the initializer of
4204 a variable results in an empty list, default-initialize the
4206 (tsubst_copy_and_build): When the instantiation of the initializer
4207 in a new expression results in an empty initializer list,
4208 default-initialize it.
4210 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
4212 * mangle.c (write_type): Change mangling of rvalue reference from
4215 2007-08-31 Jakub Jelinek <jakub@redhat.com>
4217 * decl.c (duplicate_decls): Remove duplicated line.
4219 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4222 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4223 BOUND_TEMPLATE_TEMPLATE_PARM.
4225 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4228 * search.c (lookup_member): Check the name argument for
4231 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4234 * parser.c (cp_parser_trait_expr): Check rerurn value of
4237 2007-08-30 Ollie Wild <aaw@google.com>
4239 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4240 convert_ptrmem for pointer to member conversions.
4241 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4242 (ocp_convert): Update cp_convert_to_pointer call.
4243 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4245 (build_static_cast_1): Check can_convert for conversions in either
4247 (get_delta_difference_1): New function.
4248 (get_delta_difference): Refactor to call get_delta_difference_1.
4250 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4252 * decl.c (start_preparsed_function): Set
4253 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4255 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4258 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4259 BOUND_TEMPLATE_TEMPLATE_PARM.
4261 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4265 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4266 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4268 2007-08-27 Jason Merrill <jason@redhat.com>
4271 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4272 Look inside STMT_EXPR.
4273 * semantics.c (stmt_expr_value_expr): New fn.
4274 * cp-tree.h: Declare it.
4277 * decl.c (groktypename): Ignore attributes applied to class type.
4279 2007-08-28 Richard Guenther <rguenther@suse.de>
4281 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4283 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4285 * error.c (dump_expr): Handle COMPLEX_CST.
4286 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4287 (pp_cxx_expression): Likewise.
4289 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4291 * decl.c (GNU_INLINE_P): New.
4292 (duplicate_decls): Handle gnu_inline. Merge attributes and
4293 some flags in overriding definitions.
4294 (redeclaration_error_message): Handle gnu_inline.
4295 (start_preparsed_function): Likewise.
4297 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4299 * call.c (sufficient_parms_p): Constify.
4300 * class.c (same_signature_p): Likewise.
4301 * cp-gimplify.c (is_invisiref_parm,
4302 cxx_omp_privatize_by_reference): Likewise.
4303 * cp-objcp-common.c (has_c_linkage): Likewise.
4304 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4305 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4306 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4307 num_artificial_parms_for, comp_template_parms,
4308 template_parameter_pack_p, any_dependent_template_arguments_p,
4309 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4310 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4311 zero_init_p, member_p, cp_lvalue_kind,
4312 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4313 varargs_function_p, is_dummy_object, special_function_kind,
4314 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4315 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4316 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4317 cp_has_mutable_p, at_least_as_qualified_p,
4318 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4319 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4320 * except.c (nothrow_libfn_p): Likewise.
4321 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4323 * pt.c (comp_template_parms, template_parameter_pack_p,
4324 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4325 any_dependent_template_arguments_p): Likewise.
4326 * repo.c (repo_export_class_p): Likewise.
4327 * semantics.c (anon_aggr_type_p): Likewise.
4328 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4329 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4330 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4331 zero_init_p, special_function_p): Likewise.
4332 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4333 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4334 compparms, invalid_nonstatic_memfn_p,
4335 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4336 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4337 cp_has_mutable_p, lvalue_or_else): Likewise.
4339 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4341 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4342 * cp-objcp-common.c (cp_tree_size): Ditto.
4343 * tree.c (cp_walk_subtrees): Ditto
4344 * cp-tree.def (TINST_LEVEL): Go away.
4345 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4346 move together with other non-tree structs.
4347 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4348 (union lang_tree_node): Eliminate tinst_level field.
4349 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4350 (current_instantiation, outermost_tinst_level): Return
4351 a "struct tinst_level *".
4353 * error.c (print_instantiation_partial_context): Change second
4354 parameter to a "struct tinst_level *". Replace accessor macros
4356 (print_instantiation_full_context): Likewise.
4357 * lex.c (in_main_input_context): Likewise.
4359 * pt.c (struct pending_templates): New.
4360 (pending_templates, last_pending_template): Use it as a type.
4361 (current_tinst_level): Change typo to "struct tinst_level *"
4362 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4363 (add_pending_template): Construct a "struct pending_template".
4364 Replace TINST_LEVEL accessor macros with field access.
4365 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4366 (pop_tinst_level): Likewise.
4367 (instantiate_pending_templates): Likewise. Factor common code used
4368 when an instantiation has been done.
4369 (outermost_tinst_level): Replace tree_last with loop.
4370 (current_instantiation): Return a "struct tinst_level *".
4372 2007-08-24 Ollie Wild <aaw@google.com>
4374 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4375 * name-lookup.h (cp_binding_level): Remove vtables member.
4377 2007-08-24 Richard Guenther <rguenther@suse.de>
4379 * tree.c (cp_cannot_inline_tree_fn): Remove.
4380 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4381 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4384 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4387 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4388 error_mark_node right away if build_expr_type_conversion
4392 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4393 is error_mark_node rather than NULL_TREE.
4394 * pt.c (check_explicit_specialization): Likewise.
4397 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4398 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4400 2007-08-22 Jason Merrill <jason@redhat.com>
4403 * pt.c (outermost_tinst_level): New function.
4404 * lex.c (in_main_input_context): New function.
4405 * cp-tree.h: Declare it.
4406 * decl2.c (constrain_class_visibility): Use it to avoid warning
4407 about uses of the anonymous namespace in the main input file.
4409 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4411 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4413 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4416 * class.c (finish_struct_1): Warn when a class has virtual
4417 functions and accessible non-virtual destructor.
4419 2007-08-20 Richard Guenther <rguenther@suse.de>
4423 * call.c (build_new_method_call): Convert initializer to
4425 * init.c (build_aggr_init): Do not fiddle with types.
4426 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4427 * except.c (build_throw): Do not drop qualifiers for the
4429 * typeck.c (get_member_function_from_ptrfunc): Do not
4430 fiddle with types, instead convert.
4431 (build_ptrmemfunc1): Convert to the target type for
4433 (gfc_trans_allocate): Convert result to target type.
4434 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4435 pointer-to-member structures shall have alias set zero as well.
4437 2007-08-20 Richard Guenther <rguenther@suse.de>
4439 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4441 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4442 (nonstatic_local_decl_p): Likewise.
4443 * tree.c (cp_auto_var_in_fn_p): Remove.
4444 * decl.c (nonstatic_local_decl_p): Remove.
4446 2007-08-20 Richard Guenther <rguenther@suse.de>
4448 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4450 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4451 cp_walk_subtrees lh parameter.
4452 (cp_walk_tree_without_duplicates): New define to
4453 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4454 * tree.c (count_trees): Call
4455 cp_walk_tree_without_duplicates.
4456 (verify_stmt_tree): Call cp_walk_tree.
4457 (break_out_target_exprs): Likewise.
4458 (WALK_SUBTREE): Likewise.
4459 * cp-gimplify.c (cp_genericize): Likewise.
4460 * cp-pt.c (find_parameter_packs_r): Likewise.
4461 (uses_parameter_packs): Likewise.
4462 (make_pack_expansion): Likewise.
4463 (check_for_bare_parameter_packs): Likewise.
4464 (for_each_template_parm): Likewise.
4465 * decl.c (check_default_argument): Call
4466 cp_walk_tree_without_duplicates.
4467 * except.c (build_throw): Likewise.
4468 * decl2.c (type_visibility): Likewise.
4469 * semantics.c (expand_or_defer_fn): Likewise.
4470 (finalize_nrv): Call cp_walk_tree.
4472 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4475 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4476 Initialize it with save_expr rather than get_temp_regvar.
4478 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4481 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4484 2007-08-17 Ollie Wild <aaw@google.com>
4487 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4488 declarations into appropriate slots for comparison. Fix type
4491 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4494 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4495 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4497 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4500 * parser.c (cp_parser_class_head): Improve error message.
4502 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4504 * pt.c (instantiate_decl): Set input_location
4505 for the function end.
4507 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4509 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4511 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4512 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4513 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4514 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4515 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4516 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4517 * typeck.c (cp_type_quals): Likewise.
4518 * typeck2.c (cxx_incomplete_type_diagnostic,
4519 cxx_incomplete_type_error): Likewise.
4521 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4524 * pt.c (tsubst_friend_function): When check_classfn
4525 returns error_mark_node likewise return it.
4527 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4530 * typeck.c (check_return_expr): Don't NRV optimize vars in
4532 * decl.c (finish_function): Comment fix.
4534 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4537 * pt.c (push_template_decl_real): Depending on TYPE_P
4538 use either TYPE_CONTEXT or DECL_CONTEXT.
4540 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4542 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4543 constructors and destructors return this.
4545 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4548 * decl2.c (check_classfn): Return error_mark_node in case of error;
4549 in that case, do not call add_method.
4550 * decl.c (start_decl): Deal with check_classfn returning
4552 (grokfndecl): Likewise.
4553 * pt.c (tsubst_friend_function): Likewise.
4555 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4558 * typeck.c (build_binary_op): Disallow vector float types with
4559 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4561 2007-08-11 Ian Lance Taylor <iant@google.com>
4563 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4565 * cp-tree.h (cxx_get_alias_set): Update declaration.
4567 2007-08-10 Ollie Wild <aaw@google.com>
4569 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4571 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4573 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4574 (lookup_using_namespace): Fix ambiguous_decl call.
4575 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4577 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4579 * call.c (name_as_c_string): Use CONST_CAST.
4580 * decl.c (build_decl): Likewise.
4581 * parser.c (cp_parser_string_literal): Likewise.
4583 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4586 * error.c (dump_expr): Consistently use the *_cxx_*
4587 variants of the pretty-print functions.
4589 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4592 * decl.c (check_special_function_return_type): Just error
4593 on return type specified for conversion operator.
4595 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4597 * typeck2.c (readonly_error): Handle general expressions.
4598 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4600 2007-08-06 Dan Hipschman <dsh@google.com>
4602 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4603 access function name.
4605 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4608 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4609 * g++spec.c (lang_specific_driver): Check them.
4611 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4614 * pt.c (inline_needs_template_parms): Fix comment; change return type
4617 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4620 2007-03-26 Dirk Mueller <dmueller@suse.de>
4622 * parser.c (cp_parser_member_declaration): Pedwarn
4623 about stray semicolons after member declarations.
4625 2007-08-02 Lee Millward <lee.millward@gmail.com>
4630 * parser.c (cp_parser_asm_definition): Detect and discard asm
4631 statements with invalid inputs or outputs.
4632 (cp_parser_asm_operand_list): Return error mark node if any
4633 of the operands are invalid. Adjust documentation.
4635 2007-08-02 Nick Clifton <nickc@redhat.com>
4637 * typeck.c: Change copyright header to refer to version 3 of the
4638 GNU General Public License and to point readers at the COPYING3
4639 file and the FSF's license web page.
4640 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4641 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4642 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4643 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4644 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4645 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4646 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4647 name-lookup.h, parser.c: Likewise.
4649 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4652 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4654 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4657 * semantics.c (finish_label_stmt): Reject the __label__
4658 extension outside function scopes.
4660 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4662 * parser.c (eof_token): Un-constify.
4663 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4664 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4667 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4669 * pt.c, tree.c, typeck2.c: Fix comment typos.
4671 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4672 Mark Mitchell <mark@codesourcery.com>
4675 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4676 hidden due to friend declarations in local classes.
4678 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4680 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4681 * cp-tree.def (DECLTYPE_TYPE): New.
4682 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4683 (dump_type_prefix): Ditto.
4684 (dump_type_suffix): Ditto.
4685 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4686 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4687 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4689 (DECLTYPE_TYPE_EXPR): New.
4690 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4691 (finish_declared_type): Declare.
4692 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4693 DECLTYPE_TYPE nodes.
4694 (pp_cxx_type_id): Ditto.
4695 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4696 (tsubst): Substitute into a DECLTYPE_TYPE node.
4697 (tsubst_copy): Ditto.
4698 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4700 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4701 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4702 structural equality (because we can't hash the expressions).
4703 (finish_declared_type): New.
4704 * lex.c (reswords): Add "decltype" keyword.
4705 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4706 (cp_parser_postfix_expression): Add member_access_only_p to
4707 restrict postfix expression to member access expressions.
4708 (cp_parser_unary_expression): Update call to
4709 cp_parser_postfix_expression to reflect new parameter.
4710 (cp_parser_declared_type): New.
4711 (cp_parser_simple_type_specifier): Parse decltype types.
4713 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4716 * call.c (convert_for_arg_passing): Only widen bitfields to their
4717 declared types if necessary.
4719 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4721 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4724 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4726 * decl.c (typename_hash, typename_compare): Constify.
4727 * mangle.c (hash_type, compare_type): Likewise.
4728 * pt.c (eq_local_specializations, hash_local_specialization):
4730 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4731 list_hash): Likewise.
4732 * typeck2.c (pat_compare): Likewise.
4734 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4736 * method.c (implicitly_declare_fn): Increase alignment if member
4737 function pointer format requires it.
4739 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4742 * typeck.c (check_return_expr): Do not pass a null argument
4745 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4748 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4751 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4754 * typeck.c (convert_arguments): Only use default args if we have
4758 * typeck.c (structural_comptypes): No need to check
4759 resolve_typename_type return value here.
4760 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4761 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4762 original type rather than error_mark_node in case of failure.
4763 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4764 resolve_typename_type result check.
4765 (cp_parser_direct_declarator, cp_parser_head,
4766 cp_parser_constructor_declarator_p): Likewise.
4768 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4770 * pt.c (template_parms_variadic_p): Remove.
4771 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4773 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4776 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4777 argument to dump_aggr_init_expr_args instead of false.
4779 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4781 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4782 canonical types; otherwise, fall back to structural type
4783 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4784 internal compiler error if the canonical types are wrong.
4786 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4789 * parser.c (cp_parser_make_indirect_declarator): When the
4790 the code argument is ERROR_MARK return cp_error_declarator.
4792 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4795 * decl.c (cxx_init_decl_processing): Don't set
4796 force_align_functions_log.
4797 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4798 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4799 FUNCTION_DECL, return its alignment.
4801 2007-07-09 Richard Guenther <rguenther@suse.de>
4803 * decl.c (start_preparsed_function): Do not promote return type.
4805 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4808 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4810 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4813 * pt.c (resolve_overloaded_unification): Robustify. Return a
4815 (type_unification_real): Adjust accordingly.
4817 2007-07-06 Richard Guenther <rguenther@suse.de>
4819 * init.c (build_new_1): Use the correct pointer type.
4820 * typeck2.c (build_m_component_ref): Likewise.
4822 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4825 * init.c (build_zero_init): Always build an initializer for
4827 * typeck2.c (build_functional_cast): Use build_zero_init.
4830 * init.c (build_new_1): Always pass the allocation function to
4831 build_op_delete_call.
4832 * call.c (build_op_delete_call): Handle operator delete with a
4833 variable-argument list. Do not issue an error when no matching
4834 deallocation function is available for a new operator.
4837 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4838 * decl.c (value_dependent_init_p): New function.
4839 (cp_finish_decl): Use it.
4840 * pt.c (value_dependent_expression_p): Use
4841 any_value_dependent_elements_p.
4842 * parser.c (cp_parser_primary_expression): Add comment about
4843 treating dependent qualified names as integral
4844 constant-expressions.
4846 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4848 * decl.c (build_ptrmemfunc_type): Always use structural equality
4849 tests when comparing pointer-to-member-function types, because the
4850 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4853 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4855 * init.c (build_new): Tweak comment.
4857 2007-06-29 Dave Brolley <brolley@redhat.com>
4860 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4861 type to its base type and number of elements here.
4862 * init.c (build_new): Call complete_type_or_else to ensure that the
4863 type is complete and to issue a diagnostic if it is not.
4864 (build_new_1): Don't call complete_type_or_else here.
4866 2007-07-03 Richard Guenther <rguenther@suse.de>
4869 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4872 2007-07-02 Simon Baldwin <simonb@google.com>
4874 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4875 for inner-style nested forward declarations that don't declare
4878 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4881 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4882 DECL_P in not a variable and appears more than once error messages.
4884 2007-07-01 Ollie Wild <aaw@google.com>
4886 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4887 (select_decl): Remove function.
4888 (unqualified_namespace_lookup): Populate binding by calling
4889 ambiguous_decl. Remove select_decl call.
4890 (lookup_qualified_name): Remove select_decl call.
4891 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4892 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4893 generation when name lookup is ambiguous.
4895 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4898 * init.c (build_new_1): Use structural equality on the copy of the
4901 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4903 * decl2.c (determine_visibility): Implement
4904 flag_visibility_ms_compat effect on type info.
4905 * decl.c (cxx_init_decl_processing): Implement
4906 global effect of flag_visibility_ms_compat.
4908 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4910 * decl2.c (start_objects): Mark constructor-running function
4913 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4916 * decl.c (grokdeclarator): Reset friendp for member functions declared
4917 friend of their own class.
4919 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4921 * decl2.c (determine_visibility): Don't look for dllexport here.
4922 (determine_visibility_from_class): Tidy.
4924 2007-06-18 Simon Baldwin <simonb@google.com>
4927 * parser.c (cp_parser_single_declaration): Added check for storage
4928 class other than sc_none in parsed declaration, and a flag to indicate
4929 if the call is part of an explicit template specialization parse.
4930 * (cp_parser_explicit_specialization): Specialization check flag added
4931 to call to cp_parser_single_declaration(), set true.
4932 * (cp_parser_template_declaration_after_export): Specialization check
4933 flag added to call to cp_parser_single_declaration(), set false.
4934 * pt.c (check_explicit_specialization): Added code to copy visiblity
4935 and linkage from the templated function to the explicit specialization.
4937 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4939 * typeck.c (build_binary_op): For templates build the
4940 expression in pieces to avoid the assert in build2_stat.
4941 (get_member_function_from_ptrfunc):
4942 Change over to using POINTER_PLUS_EXPR and convert
4943 the second operand to sizetype.
4944 * typeck2.c (build_m_component_ref): Likewise.
4945 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4946 instead of PLUS_EXPR for pointers.
4947 (build_new_1): Likewise.
4948 (build_vec_delete_1): Likewise.
4949 (build_vec_delete): Likewise.
4950 * class.c (build_base_path): Likewise.
4951 (build_base_path): Likewise.
4952 (convert_to_base_statically): Likewise.
4953 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4954 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4955 instead of PLUS_EXPR.
4956 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4957 instead of PLUS_EXPR for pointers.
4958 * call.c (build_special_member_call): Likewise.
4959 * rtti.c (build_headof): Likewise.
4960 Use sizetype instead of ptrdiff_type_node.
4961 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4962 instead of PLUS_EXPR for pointers.
4963 * except.c (expand_start_catch_block): Do a
4964 NEGATIVE and then a POINTER_PLUS_EXPR instead
4966 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4967 PLUS_EXPR on pointer types over to use
4968 POINTER_PLUS_EXPR and remove the conversion
4969 to the pointer types.
4970 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4971 adding to a pointer type. Use size_int instead of
4972 ssize_int. Convert the index to sizetype before
4973 adding it to the pointer.
4975 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4977 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4978 (DECL_ANON_UNION_VAR_P): New macro.
4979 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4980 than DECL_VAR_MARKED_P, to keep track of which variables we have
4982 * decl.c (redeclaration_error_message): Complain about redeclaring
4983 anonymous union members at namespace scope.
4984 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4986 2007-06-14 Geoff Keating <geoffk@apple.com>
4988 * decl2.c (determine_visibility): Ensure that functions with
4989 hidden types as parameters are hidden.
4992 * decl2.c (determine_visibility): Remove duplicate code for
4995 2007-06-12 Ian Lance Taylor <iant@google.com>
4998 * init.c (avoid_placement_new_aliasing): New static function.
4999 (build_new_1): Call it.
5001 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
5003 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
5004 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
5006 2007-06-08 Jakub Jelinek <jakub@redhat.com>
5009 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
5010 on init, the non-decl cond operand and increment value.
5012 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
5015 * decl.c (check_initializer): Report an error when a brace enclosed
5016 initializer is used for a non-aggregate type in C++98.
5017 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
5019 (grokdeclarator): Likewise.
5020 (move_fn_p): Likewise.
5021 * typeck.c (check_return_expr): Likewise.
5022 * call.c (reference_binding): Likewise.
5023 * error.c (cp_cpp_error): Likewise.
5024 * pt.c (check_default_tmpl_args): Likewise.
5026 * lex.c (init_reswords): Likewise.
5027 * parser.c (p_parser_primary_expression): Likewise.
5028 (TOKEN_PRECEDENCE): Likewise.
5029 (cp_parser_init_declarator): Likewise.
5030 (cp_parser_ptr_operator): Likewise.
5031 (cp_parser_parameter_declaration): Likewise.
5032 (cp_parser_enclosed_template_argument_list): Likewise.
5033 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
5034 (cp_parser_next_token_ends_template_argument_p): Likewise.
5036 2007-06-04 Simon Baldwin <simonb@google.com>
5038 * decl.c (grokdeclarator): Readability change. Moved case labels
5039 into direct switch statement scope.
5041 2007-06-04 Paolo Carlini <pcarlini@suse.de>
5043 * call.c (convert_like_real): Remove pointless code.
5045 2007-05-31 Mark Mitchell <mark@codesourcery.com>
5047 * decl.c (get_atexit_fn_ptr_type): New function.
5048 (get_atexit_node): Use it.
5049 (start_cleanup_fn): Likewise.
5050 (register_dtor_fn): Use the object's destructor, instead of a
5051 separate cleanup function, where possible.
5052 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
5053 (atexit_fn_ptr_type_node): New macro.
5054 * decl2.c (build_cleanup): Use build_address.
5056 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
5058 * typeck.c (build_binary_op): Include types in error.
5060 2007-05-31 Jakub Jelinek <jakub@redhat.com>
5063 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
5064 needs runtime initialization.
5066 2007-05-31 Paolo Carlini <pcarlini@suse.de>
5069 * semantics.c (finish_trait_expr): Complete the types.
5071 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
5072 Douglas Gregor <doug.gregor@gmail.com>
5073 Pedro Lamarao <pedro.lamarao@mndfck.org>
5074 Howard Hinnant <howard.hinnant@gmail.com>
5078 * typeck.c (comptypes): Don't consider rvalue and lvalue
5079 reference types to be equivalent.
5080 (check_return_expr): Move from certain lvalues when returning
5082 * decl.c (grokdeclarator): Implement reference collapsing.
5083 (copy_fn_p): Don't consider constructors taking rvalue references
5084 to be copy constructors.
5086 * call.c (conversion): New "rvaluedness_matches_p" member.
5087 (convert_class_to_reference): Require reference type as first
5088 parameter instead of base type.
5089 (reference_binding): Add logic to handle rvalue references.
5090 (implicit_conversion): Update inaccurate comment.
5091 (convert_like_real): Disable creation of temporaries that are
5092 impossible to initialize for types with move constructors.
5093 (build_over_call): Elide move constructors when possible.
5094 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
5095 (maybe_handle_ref_bind): Return conversion instead of type node.
5096 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
5097 determine preferred conversion sequences.
5098 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
5099 (LOOKUP_PREFER_RVALUE): New.
5100 (DECL_MOVE_CONSTRUCTOR_P): New.
5101 (struct cp_declarator): Add "reference" member for reference
5102 types, with new "rvalue_ref" flag.
5103 (cp_build_reference_type): Declare.
5104 (move_fn_p): Declare.
5105 * error.c (dump_type_prefix): Format rvalue reference types
5106 correctly in error messages.
5107 * except.c (build_throw): Move from certain lvalues when
5109 * mangle.c (write_type): Mangle rvalue references differently
5110 than regular references.
5111 * parser.c (make_reference_declarator): Add boolean parameter for
5113 (cp_parser_make_indirect_declarator): New.
5114 (cp_parser_new_declarator_opt): Call
5115 cp_parser_make_indirect_declarator.
5116 (cp_parser_conversion_declarator_opt): Ditto.
5117 (cp_parser_declarator): Ditto.
5118 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
5120 * pt.c (tsubst): Implement reference collapsing.
5121 (maybe_adjust_types_for_deduction): Implement special template
5122 parameter deduction rule for rvalue references.
5123 (type_unification_real): Update calls to
5124 maybe_adjust_types_for_deduction.
5125 (try_one_overload): Ditto.
5126 (unify_pack_expansion): Ditto.
5127 * tree.c (lvalue_p_1): Handle rvalue reference types.
5128 (cp_build_reference_type): New.
5130 2007-05-30 Jakub Jelinek <jakub@redhat.com>
5133 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
5134 variables that need runtime initialization.
5136 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
5139 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
5140 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
5141 case POSTDECREMENT_EXPR>): Return the error_mark_node
5142 if either the real or imaginary parts would an
5145 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
5146 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5149 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
5150 token is a closing brace, false if there are no tokens left.
5151 (cp_parser_namespace_alias_definition): Only consume the next token if
5152 it is a closing brace.
5154 * parser.c (cp_parser_class_specifier): Likewise.
5156 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
5158 * semantics.c (finish_member_declaration): Fix a typo in the
5161 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
5173 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
5174 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
5175 * pt.c (check_for_bare_parameter_packs): Return bool indicated
5176 whether everything was okay. Fix indentation.
5177 (push_template_decl_real): Check for bare parameter packs in
5178 function parameters; where errors occur, mark the parameter types
5179 with ERROR_MARK_NODEs to avert ICEs.
5180 (coerce_template_parameter_pack): New.
5181 (coerce_template_parms): Moved parameter pack coercion into
5182 coerce_template_parameter_pack, and permit it anywhere in the
5183 template parameter list (not just at the end). Parameter and
5184 argument indices can vary (somewhat) separately now, so add
5185 PARM_IDX and ARG_IDX.
5186 (fn_type_unification): Don't set an argument pack as incomplete if
5187 no argument pack was deduced.
5188 (type_unification_real): If a type parameter is a parameter pack
5189 and has not otherwise been deduced, it will be deduced to an empty
5191 (more_specialized_fn): Use the actual lengths of the argument
5192 lists when comparing against expansions.
5193 * semantics.c (finish_member_declaration): If a field's type has
5194 bare parameter packs, error and set its type to ERROR_MARK_NODE.
5196 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
5199 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
5201 2007-05-22 Ollie Wild <aaw@google.com>
5203 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
5204 (unqualified_namespace_lookup): Adds check for hidden types.
5206 2007-05-22 Ollie Wild <aaw@google.com>
5208 * decl.c (duplicate_decls): Verify namespace names are unique.
5210 2007-05-21 Mark Mitchell <mark@codesourcery.com>
5212 * decl.c (cxx_maybe_build_cleanup): Handle
5213 __attribute__((cleanup)).
5215 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5217 * cvt.c (cp_convert_and_check): Don't check warnings if the
5220 2007-05-18 Geoffrey Keating <geoffk@apple.com>
5222 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5224 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5227 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5228 type only if is a class type (5.2.8/4).
5230 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5232 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5233 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5234 c_common_unsigned_type.
5236 2007-05-11 Silvius Rus <rus@google.com>
5238 * typeck.c (build_indirect_ref): Add call to
5239 strict_aliasing_warning.
5240 (build_reinterpret_cast_1): Condition call to
5241 strict_aliasing_warning.
5243 2007-05-11 Jan Hubicka <jh@suse.cz>
5245 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5246 * decl2.c (start_objects): ctors and dtors are no longer public.
5247 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5249 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5251 * typeck.c (build_unary_op): Remove code that used to
5252 handle non lvalue increments/decrements.
5254 2007-05-07 Mike Stump <mrs@apple.com>
5256 * parser.c (check_empty_body): Add.
5257 (cp_parser_iteration_statement): Add call to check_empty_body.
5259 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5262 * mangle.c (write_mangled_name): Mangle static variable names.
5263 (write_unqualified_name): Use local-source-name for
5264 namespace-scope static variables.
5266 2007-05-04 Dirk Mueller <dmueller@suse.de>
5268 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5271 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5274 * decl2.c (constrain_class_visibility):
5275 Use strip_pointer_or_array_types instead of strip_array_types.
5277 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5280 * decl.c (reshape_init_r): Don't reshape the first element if it
5281 is a pointer to member function.
5283 2007-04-27 Simon Baldwin <simonb@google.com>
5285 * decl.c (grokparms): Changed message format from %qD to %qE.
5287 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5289 * error.c (maybe_warn_variadic_templates): Variadic templates are
5290 now in C++0x, so only warn about them in C++98 mode.
5292 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5295 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5296 integeral types from vectors types.
5298 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5301 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5302 for type dependent OMP_CLAUSE_DECLs.
5304 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5307 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5308 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5309 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5310 * init.c (build_zero_init): Adjust, as
5311 COMPLEX_TYPE is now a SCALAR_TYPE.
5312 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5313 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5315 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5317 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5318 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5319 (trait_expr_value): Adjust.
5321 2007-04-23 Simon Baldwin <simonb@google.com>
5323 * decl.c (grokparms): Added new error for duplicate function
5324 parameters names in function prototypes, to match gcc behavior.
5326 2007-04-23 Jan Hubicka <jh@suse.cz>
5328 * decl2.c (finish_objects): Do not call target constructor/destructor
5331 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5333 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5334 instead of checking GIMPLE_STMT_P in chain_next.
5336 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5339 * call.c (convert_for_arg_passing): Convert bitfields to their
5342 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5345 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5347 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5350 * decl2.c (constrain_class_visibility):
5351 Do not warn about the use of anonymous namespace in the main input file.
5353 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5355 * cp-tree.h (current_template_parms): Fix typo in comment.
5357 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5359 * cp-tree.h, error.c: Fix comment typos.
5361 2007-04-13 Jason Merrill <jason@redhat.com>
5364 * call.c (reference_binding): Add c_cast_p parm. If true,
5365 add quals to TO as needed to make it reference-compatible.
5367 2007-04-11 Jan Hubicka <jh@suse.cz>
5369 * class.c (convert_to_base_statically): Fold produced tree; verify
5370 that we are not processing template_decl.
5372 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5375 * class.c (build_base_path): Ensure that the converted pointer has
5376 the same cv-qualification as the input.
5378 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5380 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5382 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5384 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5386 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5387 * tree.c (cp_add_pending_fn_decls): Remove.
5388 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5390 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5392 Revert change removing staticp.
5394 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5396 * cp-objcp-common.c (cxx_staticp): Remove.
5397 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5398 * cp-tree.h (cxx_staticp):
5400 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5402 * class.c (check_for_override): Don't remove dllmport attribute
5405 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5408 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5409 type issue error and return early.
5411 2007-03-30 Jason Merrill <jason@redhat.com>
5414 * typeck.c (cp_type_readonly): New fn.
5415 * cp-tree.h: Declare it.
5416 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5417 (cp_finish_decl): Not here.
5419 2007-03-31 Richard Guenther <rguenther@suse.de>
5421 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5424 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5429 * parser.c (declarator_can_be_parameter_pack): New.
5430 (cp_parser_template_parameter): Only parse the `...' if the
5431 declarator can be a parameter pack.
5432 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5434 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5435 types (they could be used as array bounds).
5436 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5437 (tsubst_pack_expansion): Handle failure to expand parameter
5440 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5443 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5444 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5445 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5446 (CLASS_TYPE_NON_UNION_P): Add.
5447 (struct lang_type_class): Add has_complex_dflt.
5448 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5449 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5450 * cp-tree.def: Add TRAIT_EXPR.
5451 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5452 * lex.c (struct resword): Add __has_nothrow_assign,
5453 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5454 __has_trivial_constructor, __has_trivial_copy,
5455 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5456 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5457 __is_pod, __is_polymorphic, __is_union.
5458 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5459 (cp_parser_trait_expr): New.
5460 * semantics.c (finish_trait_expr, trait_expr_value
5461 classtype_has_nothrow_copy_or_assign_p): New.
5462 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5464 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5465 * class.c (check_bases, check_field_decl, check_bases_and_members):
5466 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5467 * pt.c (uses_template_parms, tsubst_copy_and_build,
5468 value_dependent_expression_p, type_dependent_expression_p): Deal with
5470 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5472 2007-03-29 Richard Guenther <rguenther@suse.de>
5474 * tree.c (cp_walk_subtrees): Do not set input_location.
5476 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5479 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5482 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5484 * parser.c (struct cp_parser): Update comment for
5485 greater_than_is_operator_p.
5486 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5487 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5488 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5489 !GREATER_THAN_IS_OPERATOR_P.
5490 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5491 `>>' operators that will become two `>' tokens in C++0x.
5492 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5493 mode, allowing it to terminate default arguments.
5494 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5495 `>>' like two consecutive `>' tokens.
5496 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5497 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5498 ends a template argument.
5500 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5502 * decl.c (redeclaration_error_message): Complain when redeclaring
5503 a friend function with default template arguments (C++0x mode only).
5504 * cp-tree.h (check_default_tmpl_args): Declare.
5505 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5506 template arguments in function templates. Add support for checking
5507 the default template arguments of friend templates.
5508 (push_template_decl_real): Fix call to check_default_tmpl_args.
5509 (type_unification_real): If a template parameter has not been
5510 deduced but provides a default template argument, substitute into
5511 that default template argument.
5512 * parser.c (cp_parser_init_declarator): When declaring (but not
5513 defining!) a function template in C++0x mode, check for default
5516 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5519 * decl.c (grokdeclarator): Deal with cv-qualified function type
5520 typedefs in the same way for member and non-member functions.
5522 2007-03-26 Dirk Mueller <dmueller@suse.de>
5524 * parser.c (cp_parser_member_declaration): Pedwarn
5525 about stray semicolons after member declarations.
5527 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5530 * pt.c (instantiate_decl): Set in_system_header.
5532 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5534 * cp-tree.h (current_tempalte_parms): Improve documentation.
5535 * pt.c (current_template_args): Likewise.
5538 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5539 not consume tokens when failing.
5541 2007-03-22 Jim Wilson <wilson@specifix.com>
5542 Mark Mitchell <mark@codesourcery.com>
5545 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5546 consistent with FROM.
5548 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5550 * error.c (dump_expr): Handle dependent names that designate types.
5551 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5553 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5555 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5557 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5559 * cvt.c (cp_convert_and_check) : Define.
5560 * cp-tree.h (cp_convert_and_check): Declare.
5561 * call.c (convert_conversion_warnings): Rename to
5562 conversion_null_warnings. The warning for floating-point to
5563 integer is handled by convert_and_check in convert_like_real.
5564 (convert_like_real): convert_conversion_warnings was renamed as
5565 conversion_null_warnings.
5566 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5567 overflow and changes of value during conversion.
5569 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5572 * parser.c (cp_parser_statement): If 'namespace' is found, this
5573 only can be a namespace alias definition, so parse it now.
5574 (cp_parser_namespace_alias_definition): if we find an open brace
5575 instead of '=', then this is actually a misplaced namespace
5578 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5581 * decl.c (cxx_init_decl_processing): Move command-line options
5582 processing to c-opts.c.
5584 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5586 * ptree.c (cxx_print_type): Use formatting markup for integers
5587 when printing template parameter index/level/orig level.
5588 (cxx_print_xnode): Ditto.
5589 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5590 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5591 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5593 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5594 rather than a HOST_WIDE_INT.
5595 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5596 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5598 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5599 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5600 IN_BASE_INITIALIZER bool bitfields.
5601 (struct cp_declarator): Make KIND a 4-bit field. Make
5602 PARAMETER_PACK_P a bool bitfield just after KIND.
5603 * pt.c (uses_parameter_packs): Destroy the pointer set.
5604 (make_pack_expansion): Ditto.
5605 (check_for_bare_parameter_packs): Ditto.
5606 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5608 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5611 * call.c (convert_default_arg): Instead of copying the node,
5614 2007-03-15 Dirk Mueller <dmueller@suse.de>
5617 * call.c (convert_conversion_warnings): New..
5618 (convert_like_real): .. factored out from here.
5619 (convert_conversion_warnings): Add warning about
5620 false being converted to NULL in argument passing.
5622 2007-03-14 Dirk Mueller <dmueller@suse.de>
5624 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5625 (finish_do_body): Warn about empty body in do/while statement.
5627 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5629 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5631 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5634 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5637 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5639 * repo.c (init_repo): Initialize random_seed saved options.
5640 (finish_repo): Adjust.
5642 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5645 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5648 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5650 * decl.c (compute_array_index_type): New warning flag warn_vla.
5652 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5655 * call.c (convert_default_arg): Copy non-constant arguments.
5657 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5660 * parser.c (cp_parser_postfix_expression): Disallow compound
5661 literals in constant expressions.
5664 * semantics.c (finish_typeof): Use unlowered_expr_type.
5666 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5669 * cp-tree.h (unlowered_expr_type): New function.
5670 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5671 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5672 (unlowered_expr_type): New function.
5673 (build_unary_op): Disallow predecrements of bool bitfields.
5674 * call.c (build_conditional_expr): Use unlowered_expr_type.
5675 * pt.c (type_unification_real): Likewise.
5677 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5680 * typeck.c (check_return_expr): Check for bare parameter packs.
5681 (comptypes): Compare template parameter packs and
5682 type pack expansions.
5683 * decl.c (grokdeclarator): Deal with the declaration of function
5685 (grokparms): Verify that the (optional) function parameter pack is
5686 at the end of the parameter list.
5687 (xref_basetypes): Handle pack expansions in the base class.
5688 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5689 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5690 (NONTYPE_ARGUMENT_PACK): New.
5691 (TYPE_PACK_EXPANSION): New.
5692 (EXPR_PACK_EXPANSION): New.
5693 (ARGUMENT_PACK_SELECT): New.
5694 * cp-objcp-common.c (cp_tree_size): Compute size of
5695 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5696 ARGUMENT_PACK_SELECT.
5697 * error.c (dump_template_argument): Print template argument packs.
5698 (dump_template_argument_list): Ditto.
5699 (dump_template_parameter): Dump `...' for template type parameter
5701 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5702 (dump_parameters): Print function parameter packs.
5703 (dump_template_parms): Print template argument packs.
5704 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5705 (maybe_warn_variadic_templates): New.
5706 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5707 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5708 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5710 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5711 (write_template_arg): Write argument packs as separate arguments.
5712 * cp-tree.h (struct template_parm_index_s): Add flag that
5713 indicates that the template parameter is actually a parameter
5715 (struct tree_argument_pack_select): New.
5716 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5717 (union lang_tree_node): Add argument_pack_select.
5718 (FUNCTION_PARAMETER_PACK_P): New.
5719 (PACK_EXPANSION_P): New.
5720 (PACK_EXPANSION_PATTERN): New.
5721 (SET_PACK_EXPANSION_PATTERN): New.
5722 (PACK_EXPANSION_PARAMETER_PACKS): New.
5723 (ARGUMENT_PACK_P): New.
5724 (ARGUMENT_PACK_ARGS): New.
5725 (SET_ARGUMENT_PACK_ARGS): New.
5726 (ARGUMENT_PACK_INCOMPLETE_P): New.
5727 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5728 (TEMPLATE_PARM_PARAMETER_PACK): New.
5729 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5730 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5731 (ARGUMENT_PACK_SELECT_INDEX): New.
5732 (ARGUMENT_PACK_SELECT_ARG): New.
5733 (struct cp_declarator): Add parameter_pack_p flag.
5734 (maybe_warn_variadic_templates): Declare.
5735 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5736 indicate a template parameter pack.
5737 (uses_parameter_packs): Declare.
5738 (template_parameter_pack_p): Declare.
5739 (template_parms_variadic_p): Declare.
5740 (make_pack_expansion): Declare.
5741 (check_for_bare_parameter_packs): Declare.
5742 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5743 sizeof... expressions.
5744 (pp_cxx_expression): Print pack expansions and non-type argument
5746 (pp_cxx_exception_specification): Print pack expansions.
5747 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5748 (pp_cxx_ctor_initializer): Print pack expansions.
5749 (pp_cxx_type_id): Print pack expansions.
5750 (pp_cxx_template_argument_list): Print argument packs.
5751 (pp_cxx_template_parameter): Print ellipsis for template parameter
5753 * pt.c (comp_template_parms): Compare template parameter packs.
5754 (template_parameter_pack_p): New.
5755 (template_parms_variadic_p): New.
5756 (template_args_variadic_p): New.
5757 (make_ith_pack_parameter_name): New.
5758 (struct find_parameter_pack_data): New.
5759 (find_parameter_packs_r): New.
5760 (uses_parameter_packs): New.
5761 (make_pack_expansion): New.
5762 (check_for_bare_parameter_packs): New.
5763 (expand_template_argument_pack): New.
5764 (reduce_template_parm_level): Propagate parameter pack flag.
5765 (process_template_parm): Add is_parameter_pack parameter to state
5766 when the parameter is actually a parameter pack. Create template
5767 parameter packs when is_parameter_pack is true.
5768 (current_template_args): The argument for a template parameter
5769 pack is an argument pack containing a single pack expansion.
5770 (process_partial_specialization): When checking that non-type
5771 argument expressions do not involve template parameters, loop over
5772 the arguments in argument packs separately.
5773 (push_template_decl_real): Check that the type of the declaration
5774 does not have any bare parameter packs. Check that primary
5775 templates have no more than one parameter pack, and that it comes
5776 at the end of the template parameter list.
5777 (convert_template_argument): Handle coercions for pack expansion
5778 expressions by coercing the pattern then rebuilding the expansion.
5779 (coerce_template_parms): When coercing the arguments for a
5780 variadic template, pack "extra" arguments into an argument pack.
5781 (coerce_template_template_parms): Cannot coerce between parameter
5782 packs and non-pack parameters.
5783 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5784 (comp_template_args): Expand all template arguments packs before
5785 comparing template argument lists.
5786 (mangle_class_name_for_template): Make argument packs as separate
5788 (for_each_template_parm_r): No need to handle BASELINK.
5789 (instantiate_class_template): Handle pack expansions in the base
5791 (tsubst_pack_expansion): New.
5792 (tsubst_template_args): Handle substitutions of argument packs and
5793 pack expansion into template argument lists.
5794 (tsubst_decl): Expand function parameter packs into separate
5795 function parameters.
5796 (tsubst_arg_types): Expand a type pack expansion into separate
5798 (tsubst_exception_specification): Handle pack expansions in
5799 exception specifiers.
5800 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5801 replacing a template parameter with its argument. If we encounter
5802 a substitution for an argument pack, just return the parameter
5804 (tsubst_copy): sizeof(X...) returns the number of elements in
5805 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5806 PARM_DECL is a parameter pack.
5807 (tsubst_expr): Expression pack expansions and argument packs
5808 cannot show up here; they will all be handled through function
5809 calls, sizeof, and template argument lists.
5810 (tsubst_copy_and_build): sizeof(X...) returns the number of
5811 elements in parameter pack X. Handle pack expansions in TREE_LIST
5812 and CONSTRUCTOR nodes.
5813 (fn_type_unification): Handle "incomplete" explicit template
5814 argument lists that specify some of the arguments for a template
5816 (type_unification_real): Unify arguments against pack expansions.
5817 (template_parm_level_and_index): New, helper function.
5818 (unify_pack_expansion): New.
5819 (unify): Unify argument packs on an argument-by-argument basis,
5820 handling variadic argument packs as well.
5821 (more_specialized_fn): Handle unification of function parameter
5822 packs. All things being equal, prefer non-variadic function
5823 templates to variadic function templates.
5824 (more_specialized_class): Prefer the variadic class template
5825 partial specialization that binds fewer arguments to a parameter
5827 (regenerate_decl_from_template): Expand function parameter packs
5828 into separate parameters.
5829 (instantiate_decl): Ditto.
5830 (tsubst_initializer_list): Handle pack expansions for base-class
5832 (dependent_type_p_r): Determine dependent types in argument packs
5833 and pack expansions.
5834 (value_dependent_expression_p): Determine value-dependence of
5835 non-type argument packs.
5836 (dependent_template_arg_p): Handle argument packs.
5837 * semantics.c (finish_cond): Check for bare parameter packs.
5838 (finish_expr_stmt): Ditto.
5839 (finish_for_expr): Ditto.
5840 (finish_switch_cond): Ditto.
5841 (finish_mem_initializers): Ditto.
5842 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5844 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5845 * parser.c (make_declarator): Declarator is not an expansion.
5846 (make_pointer_declarator): Transfer parameter pack flag to outer
5848 (make_reference_declarator): Ditto.
5849 (make_ptrmem_declarator): Ditto.
5850 (make_call_declarator): Ditto.
5851 (make_array_declarator): Ditto.
5852 (cp_parser_postfix_expression): Allow pack expansion expressions
5853 in the argument list for a call expression.
5854 (cp_parser_parenthesized_expression_list): Add new parameter
5855 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5856 into separate arguments."
5857 (cp_parser_new_placement): Allow pack expansion expressions.
5858 (cp_parser_new_initializer): Ditto.
5859 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5860 base-class initializer expansion.
5861 (cp_parser_mem_initializer): Ditto.
5862 (cp_parser_template_parameter_list): Keep track of whether the
5863 template parameter is a template parameter pack.
5864 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5865 template parameter pack.
5866 (cp_parser_type_parameter): Ditto.
5867 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5869 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5870 this declarator is a parameter pack.
5871 (cp_parser_parameter_declaration): The ellipsis does not end the
5872 parameter declaration, because it might be a parameter pack. Parse
5873 the ellipsis to indicate a parameter pack.
5874 (cp_parser_initializer): Allow pack expansions.
5875 (cp_parser_initializer_list): Allow ellipsis to create an
5876 initializer expansion.
5877 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5879 (cp_parser_type_id_list): Allow ellipsis to create an exception
5880 specifier expansion.
5881 (cp_parser_attribute_list): Don't allow pack expansions.
5882 (cp_parser_functional_cast): Allow pack expansions.
5883 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5884 compute the length of a parameter pack.
5885 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5886 end a template argument.
5887 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5888 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5891 2007-03-09 Dirk Mueller <dmueller@suse.de>
5893 * call.c (build_new_op): Call warn_logical_operator.
5895 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5898 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5901 * pt.c (any_template_arguments_need_structural_equality_p):
5904 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5906 * decl.c (grokdeclarator): Disable warnings for anonymous
5909 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5911 * typeck2.c (readonly_error): Always emit a hard error.
5912 Remove last argument.
5913 * cp-tree.h (readonly_error): Adjust prototype.
5914 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5915 * typeck.c (build_unary_op): Likewise.
5916 (build_modify_expr): Likewise.
5918 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5921 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5923 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5926 * parser.c (struct cp_parser): New IN_IF_STMT.
5927 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5928 returning if parsing the body of an 'if' statement or issuing an
5929 error and continuing.
5930 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5932 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5934 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5937 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5940 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5942 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5943 Objective-C++. Don't exit early if -shared-libgcc needs to be
5946 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5948 * typeck.c (common_base_type): Delete unused function.
5950 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5952 * Make-lang.in: Add dummy lang.install-pdf target.
5954 2007-03-01 Simon Baldwin <simonb@google.com>
5957 * decl.c (check_tag_decl): Added new warning for typedef ignored
5958 when it precedes an otherwise valid non-typedef declaration.
5960 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5962 * typeck.c (build_function_call): Store converted arguments
5963 in a stack-allocated array instead of building a list.
5964 (convert_arguments): Store arguments in the array passed in as an
5965 argument, and return the actual number of arguments.
5966 * call.c (build_call): Delete, and replace with...
5967 (build_call_n, build_call_a): New.
5968 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5969 (build_over_call): Store converted arguments in a stack-allocated
5970 array instead of building a list.
5971 (build_cxx_call): Pass arguments in an array instead of as a list.
5972 (build_java_interface_fn_ref): Rewrite to avoid constructing
5974 * tree.h: Update declarations to reflect above changes.
5975 * method.c (use_thunk): Use a stack-allocated array to hold
5976 the arguments instead of a list.
5977 * rtti.c (throw_bad_cast): Update call to cxx_call.
5978 (throw_bad_typeid): Likewise.
5979 (build_dynamic_cast_1): Likewise.
5980 * init.c (build_builtin_delete_call): Use build_call_n.
5981 * decl.c (expand_static_init): Likewise.
5982 * except.c (cp_protect_cleanup_actions): Likewise.
5983 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5984 (gimplify_must_not_throw_expr): Likewise.
5985 (cxx_omp_apply_fn): Use build_call_a.
5987 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5989 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5990 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5992 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5994 * cp-tree.h (static_ctors): Remove.
5995 * cp-tree.h (static_dtors): Likewise.
5996 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5997 refactoring of tree_map hierarchy.
5998 (decl_shadowed_for_var_insert): Likewise.
5999 * semantics.c (expand_body): Use c_expand_body.
6000 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
6001 * decl2.c (static_ctors): Remove.
6002 (static_dtors): Likewise.
6003 (generate_ctor_or_dtor_function): Pass NULL_TREE to
6004 objc_generate_static_init_call. Do not call static_[cd]tors.
6005 (generate_ctor_and_dtor_functions_for_priority): Do not check for
6007 (cp_write_global_declarations): Likewise.
6009 2007-02-23 Richard Guenther <rguenther@suse.de>
6011 * class.c (note_name_declared_in_class): Make declaration
6012 changes meaning a pedwarn.
6014 2007-02-22 Michael Matz <matz@suse.de>
6017 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
6018 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
6019 dump_function_decl): Guard emitting outer scopes by new flag.
6020 * cp-lang.c (cxx_dwarf_name): New function.
6021 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
6022 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
6024 (push_template_decl_real, lookup_template_class): Remove calls
6027 2007-02-19 Mark Mitchell <mark@codesourcery.com>
6029 * call.c (build_new_method_call): Ensure that explicit calls of
6030 destructors have type "void".
6032 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6034 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
6035 and -Walways-true with -Waddress.
6036 * cvt.c (convert_to_void): Replace unconditional warning with
6039 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
6041 * decl.c, tree.c: Fix comment typos.
6043 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
6046 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
6047 statement expression if we had an error mark node.
6049 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
6050 Brooks Moses <brooks.moses@codesourcery.com>
6051 Lee Millward <lee.millward@codesourcery.com>
6053 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
6054 Change class to tcc_vl_exp.
6056 * call.c (build_call): Use build_call_list instead
6058 (build_over_call): Likewise.
6059 (build_new_method_call): Use build_min_non_dep_call_list
6060 instead of build_min_non_dep.
6062 * error.c (dump_call_expr_args): New function.
6063 (dump_aggr_init_expr_args): New function.
6064 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
6065 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
6067 * cvt.c (convert_to_void): Use build_call_array instead
6068 of build3; use new AGGR_INIT_EXPR accessor macros.
6070 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
6071 instead of TREE_CODE_LENGTH.
6073 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
6074 AGGR_INIT_EXPR accessor macros.
6076 * cp-gimplify.c (cp_gimplify_init_expr): Use
6077 AGGR_INIT_EXPR_SLOT to set the slot operand.
6079 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
6080 (AGGR_INIT_EXPR_SLOT): New macro.
6081 (AGGR_INIT_EXPR_ARG): New macro.
6082 (aggr_init_expr_nargs): New macro.
6083 (AGGR_INIT_EXPR_ARGP): New macro.
6084 (aggr_init_expr_arg_iterator): New.
6085 (init_aggr_init_expr_arg_iterator): New.
6086 (next_aggr_init_expr_arg): New.
6087 (first_aggr_init_expr_arg): New.
6088 (more_aggr_init_expr_args_p): New.
6089 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
6090 (stabilize_aggr_init): New declaration.
6091 (build_min_non_dep_call_list): Likewise.
6093 * tree.c (process_aggr_init_operands): New function.
6094 (build_aggr_init_array) New function.
6095 (build_cplus_new): Update to use new CALL_EXPR and
6096 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
6097 build_aggr_init_array.
6098 (build_min_non_dep_call_list) New function.
6099 (build_min_nt): Assert input code parameter is not a variable
6100 length expression class.
6101 (build_min, build_min_non_dep): Likewise.
6102 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
6103 to check for equality instead of recursing. Handle tcc_vl_exp
6105 (stabilize_call): Update to only handle CALL_EXPRs, not
6106 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
6107 (stabilize_aggr_init): New function.
6108 (stabilize_init): Use it.
6110 * cxx-pretty-print.c (pp_cxx_postfix_expression)
6111 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
6112 AGGR_INIT_EXPR accessor macros and argument iterators.
6114 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
6115 build_vl_exp. Iterate through the operands, recursively
6116 processing each one.
6117 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
6118 CALL_EXPR accessor macros.
6119 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
6120 tree code classes. Use TREE_OPERAND_LENGTH instead of
6123 * semantics.c (finish_call_expr): Use build_nt_call_list
6124 instead of build_nt.
6125 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
6126 accessor macros. Use build_call_array to construct the
6127 CALL_EXPR node instead of build3
6129 * decl2.c (build_offset_ref_call_from_tree): Use
6130 build_nt_call_list and build_min_non_dep_call_list instead
6131 of build_min_nt and build_min_non_dep.
6133 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
6134 Use build_nt_call_list instead of build_min_nt.
6136 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6139 * call.c (build_conditional_expr): Improve error message.
6141 2007-02-13 Dirk Mueller <dmueller@suse.de>
6143 * friend.c (do_friend): Annotate warning about friend
6144 declarations in templates with OPT_Wnon_template_friend.
6145 Convert informal message from warning() to inform().
6147 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
6148 Mark Mitchell <mark@codesourcery.com>
6151 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
6152 instantiations for variables.
6154 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6157 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
6158 Check warn_unused_value just once.
6160 2007-02-11 Mark Mitchell <mark@codesourcery.com>
6163 * pt.c (determine_specialization): Use skip_artificial_parms_for.
6164 (fn_type_unificiation): Likewise.
6165 (get_bindings): Likewise.
6167 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
6170 * decl.c (finish_function): Use DECL_REPLACEABLE.
6171 * tree.c (cp_cannot_inline_tree_fn): Likewise.
6173 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
6175 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
6177 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
6179 * decl.c (grokvardecl): Don't error if !have_tls.
6180 (grokdeclarator): Likewise.
6181 * parser.c (cp_parser_omp_threadprivate): Likewise.
6183 2007-02-07 Jakub Jelinek <jakub@redhat.com>
6186 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
6187 parameters and result decls in omp clauses.
6188 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
6191 2007-02-05 Dirk Mueller <dmueller@suse.de>
6194 * parser.c (cp_parser_class_specifier): Always initialize bases.
6196 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
6198 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
6199 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
6200 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
6202 * semantics.c (finish_omp_atomic): Store a whole expression node
6203 in operand 1, and integer_zero_node in operand 0, for dependent
6204 OMP_ATOMIC. Rewrite to make flow easier to understand.
6206 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6208 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
6210 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
6212 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
6213 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
6215 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
6217 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
6218 keyword warning to -Wc++0x-compat.
6220 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6222 * decl.c (grokdeclarator): Update documentation.
6224 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6227 * decl.c (grokdeclarator): If __thread is used together with
6228 a storage class other than extern and static, clear thread_p
6229 after issuing diagnostics and fall through to checking the
6232 2007-01-30 Roger Sayle <roger@eyesopen.com>
6234 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6235 calculating the size of an array (to avoid recursive errors).
6237 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6240 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6242 * call.c (convert_like_real): Don't warn when converting to
6245 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6247 * decl.c (pop_label): Replace warning with call to
6248 warn_for_unused_label.
6250 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6253 * semantics.c (finish_pseudo_destructor_expr): Check the
6254 destrutor name by calling check_dtor_name.
6256 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6258 * lex.c (D_CPP0X): Rename.
6260 (reswords): D_CPP0X -> D_CXX0X.
6261 (init_reswords): Ditto.
6262 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6263 of C++0x keywords as identifiers.
6265 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6268 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6271 2007-01-23 Ian Lance Taylor <iant@google.com>
6273 * typeck.c (convert_for_assignment): Only warn about a = b = c
6274 when converting to bool.
6276 2007-01-23 Roger Sayle <roger@eyesopen.com>
6278 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6280 * typeck.c (ignore_overflows): Remove the remaining uses of
6281 TREE_CONSTANT_OVERFLOW.
6283 2007-01-20 Jan Hubicka <jh@suse.cz>
6285 * decl2.c (start_objects, start_static_storage_duration_function):
6286 Do not make the functions uninlinable.
6288 2007-01-17 Ian Lance Taylor <iant@google.com>
6290 * class.c (add_method): Call VEC_reserve_exact rather than passing
6291 a negative size to VEC_reserve.
6293 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6296 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6298 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6301 * decl.c (make_typename_type): If the qualified name is not a
6302 type, issue an error.
6303 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6306 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6308 * rtti.c: Include target.h.
6309 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6310 don't emit typeinfo for fundamental types as weak.
6311 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6313 2007-01-08 Richard Guenther <rguenther@suse.de>
6315 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6317 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6319 * call.c (standard_conversion): Pass flag to
6320 vector_types_convertible_p to disallow emission of note.
6321 * typeck.c (convert_for_assignment): Pass flag to
6322 vector_types_convertible_p to allow emission of note.
6323 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6324 to disallow emission of note.
6326 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6329 * typeck.c (build_binary_op): Call overflow_warning if
6330 TREE_OVERFLOW_P is true for the result and not for any of the
6333 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6336 * class.c (add_method): Don't wait until template
6337 instantiation time to complain about duplicate methods.
6339 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6342 * semantics.c (finish_unary_op_expr): Warn only if result
6343 overflowed and operands did not.
6345 2007-01-05 Ian Lance Taylor <iant@google.com>
6347 * typeck.c (build_binary_op): Warn about comparing a non-weak
6350 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6352 * pt.c (tsubst): Propagate the need for structural equality checks
6353 when reducing the level of template parameters.
6355 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6357 * pt.c: Fix a comment typo.
6359 2007-01-02 Ian Lance Taylor <iant@google.com>
6361 * semantics.c (maybe_convert_cond): Optionally warn when using an
6362 assignment as a condition.
6363 * typeck.c (convert_for_assignment): Optionally warn about
6364 assigning the result of an assignment to a bool.
6366 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6368 * pt.c (canonical_template_parms): Correct typo in comment.
6370 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6372 * typeck.c (structural_comptypes): Renamed from "comptypes".
6373 (comptypes): Use canonical type information to perform fast type
6374 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6375 canonical type comparison returns the same results as we would see
6376 from the current, structural check. Support COMPARE_STRUCTURAL
6377 when we need structural checks.
6378 * decl.c (typename_compare): Fix comment.
6379 (build_typename_type): TYPENAME_TYPE nodes require structural
6380 equality checks, because they resolve different based on the
6382 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6383 require structural equality checks (for now).
6384 (build_ptrmemfunc_type): Build the canonical pointer to member
6386 (compute_array_index_type): Whenever we build a new index type
6387 to represent the size of an array in a template, we need to mark
6388 this index type as requiring structural equality. This goes for
6389 arrays with value-dependent sizes with the current ABI, or all
6391 * tree.c (cplus_array_hash): New.
6392 (struct cplus_array_info): New.
6393 (cplus_array_compare): New.
6394 (cplus_array_htab): New.
6395 (build_cplus_array_type_1): Use a hash table to cache the array
6396 types we build. Build the canonical array type for each array
6398 (cp_build_qualified_type_real): When building a cv-qualified array
6399 type, use the hash table of array types and build canonical array
6401 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6402 use structural equality (for now).
6403 * cp-tree.h (COMPARE_STRUCTURAL): New.
6404 * pt.c (canonical_template_parms): New.
6405 (canonical_type_parameter): New.
6406 (process_template_parm): Find the canonical type parameter.
6407 (lookup_template_class): When we have named the primary template
6408 type, set the canonical type for our template class to the primary
6409 template type. If any of the template arguments need structural
6410 equality checks, the template class needs structural equality
6412 (tsubst): When reducing the level of a template template
6413 parameter, we require structural equality tests for the resulting
6414 parameter because its template parameters have not had their types
6415 canonicalized. When reducing a template type parameter, find the
6416 canonical reduced type parameter.
6417 (any_template_arguments_need_structural_equality_p): New.