1 2008-10-13 Doug Evans <dje@google.com>
3 * cp-tree.h (DECL_MAIN_P): Fix parentheses around expression.
5 2008-10-10 Jakub Jelinek <jakub@redhat.com>
8 * cp-gimplify.c (cp_genericize_r): Fix up bitfield operands of
11 2008-10-09 Jakub Jelinek <jakub@redhat.com>
14 * semantics.c (finalize_nrv_r): Clear DECL_INITIAL instead of
15 setting it to error_mark_node.
17 2008-10-07 Steve Ellcey <sje@cup.hp.com>
19 * decl.c (start_cleanup_fn): Declare as inline.
21 2008-10-06 Jason Merrill <jason@redhat.com>
23 PR c++/37376, other mangling issues
24 * mangle.c (write_type): Update TYPE_PACK_EXPANSION mangling.
25 (write_member_name): Break out from...
26 (write_expression): ...here. Handle dependent COMPONENT_REF.
27 (write_template_arg): Wrap an argument pack in 'I'/'E'.
28 (write_builtin_type): Update char16/32_t mangling.
29 (write_nested_name, write_prefix): Don't forget template args
31 * operators.def: Add ARROW_EXPR, update COMPONENT_REF and
34 2008-10-06 Aldy Hernandez <aldyh@redhat.com>
36 * typeck.c (build_x_indirect_ref): Add location argument.
37 (cp_build_binary_op): Pass location to warn_for_div_by_zero.
38 (cp_build_unary_op): Add location argument.
39 (cp_build_modify_expr): Same.
40 * class.c (build_base_path): Pass location to build_indirect_ref.
41 * semantics.c (handle_omp_for_class_iterator): Pass elocus to
44 2008-10-05 Dodji Seketeli <dodji@redhat.com>
47 * cp-gimplify.c (cp_gimplify_expr): For each USING_STMT
48 make sure an IMPORTED_DECL node is added to the BLOCK_VARS list
49 of the innermost containing BLOCK.
51 2008-10-03 Paolo Carlini <paolo.carlini@oracle.com>
54 * error.c (dump_function_decl): Save the exceptions in case of
55 error about incompatible specifications in a specialization.
57 2008-10-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
59 * tree.c (lvalue_p_1): COMPOUND_LITERAL_EXPR is also an lvalue.
61 2008-09-30 H.J. Lu <hongjiu.lu@intel.com>
64 * parser.c (cp_parser_selection_statement): Fix uninitialized
67 2008-09-30 Simon Martin <simartin@users.sourceforge.net>
71 * decl.c (grokdeclarator): Set the type for typedefs to a
72 nested-name-specifier to error_mark_node.
74 2008-09-30 Paolo Bonzini <bonzini@gnu.org>
76 * parser.c (cp_parser_selection_statement): Implement here the
77 -Wempty-body warning for `if' and `else' statements.
78 * semantics.c (finish_if_stmt): Do not call empty_body_warning.
80 2008-09-25 Paolo Carlini <paolo.carlini@oracle.com>
83 * name-lookup.c (maybe_process_template_type_declaration): Check
84 return value of push_template_decl_real for error_mark_node.
86 2008-09-24 Aldy Hernandez <aldyh@redhat.com>
88 * semantics.c (finish_fname): Pass location to fname_decl.
90 2008-09-23 Jakub Jelinek <jakub@redhat.com>
93 * semantics.c (finish_omp_for): If processing_template_decl, just build
94 MODIFY_EXPR for init instead of calling cp_build_modify_expr.
96 2008-09-23 Aldy Hernandez <aldyh@redhat.com>
98 * typeck.c (build_array_ref): Pass location to cp_build_binary_op.
99 (get_member_function_from_ptrfunc): Same.
100 (build_x_binary_op): Same.
101 (build_binary_op): Same.
102 (cp_build_binary_op): New location argument.
103 (pointer_diff): Pass location to cp_build_binary_op.
104 (cp_truthvalue_conversion): Pass location to build_binary_op.
105 (convert_ptrmem): Pass location to cp_build_binary_op.
106 (cp_build_modify_expr): Same.
107 (build_ptrmemfunc): Same.
108 * init.c (expand_cleanup_for_base): Pass location to
109 c_common_truthvalue_conversion.
110 (build_new_1): Pass location to cp_build_binary_op.
111 (build_vec_delete_1): Pass location to *build_binary_op,
112 c_common_truthvalue_conversion.
113 (build_vec_init): Same.
114 (build_delete): Same.
115 * decl.c (compute_array_index_type): Same.
116 * call.c (build_new_op): Same.
117 * rtti.c (build_dynamic_cast_1): Same.
118 * cp-tree.h: Add argument to cp_build_binary_op.
119 * semantics.c (handle_omp_for_class_iterator): Pass location to
120 *build_binary_op, c_common_truthvalue_conversion.
121 * decl2.c (get_guard_cond): Same.
123 2008-09-17 Richard Guenther <rguenther@suse.de>
126 * rtti.c (build_dynamic_cast_1): Convert the COND_EXPR
127 result to the correct type.
129 2008-09-17 H.J. Lu <hongjiu.lu@intel.com>
132 * name-lookup.c (pushdecl_maybe_friend): Don't return the old
133 parameter for duplicate.
135 2008-09-17 Jason Merrill <jason@redhat.com>
138 * name-lookup.c (lookup_type_scope): Look through sk_function_parms.
140 2008-09-17 Jakub Jelinek <jakub@redhat.com>
143 * typeck.c (build_array_ref): Use protected_set_expr_location instead
144 of SET_EXPR_LOCATION when ret might not be an expression.
146 2008-09-17 Jan Hubicka <jh@suse.cz>
149 * cp/decl.c (start_method): Set DECL_NO_INLINE_WARNING_P.
151 2008-09-16 Jakub Jelinek <jakub@redhat.com>
154 * semantics.c (finish_compound_literal): Return error_mark_node if
158 * lex.c (init_reswords): Don't populate ridpointers for D_CONLY
161 2008-09-15 Aldy Hernandez <aldyh@redhat.com>
163 * decl.c (duplicate_decls): Call error_at.
164 (grokfndecl): New location argument. Use location if available.
165 (grokdeclarator): Pass declarator location to grokfndecl.
166 * cp-tree.h (struct cp_declarator): Update comment for id_loc.
167 * decl2.c (check_classfn): Use error_at.
168 * parser.c (cp_parser_init_declarator): Set function_start_locus
170 (cp_parser_member_declaration): Set id_loc for function declarators.
172 2008-09-09 Jan Hubicka <jh@suse.cz>
175 * pt.c (tsubst_decl): Do not copy DECL_STRUCT_FUNCTION pointer.
177 2008-09-09 Jakub Jelinek <jakub@redhat.com>
180 * tree.c (array_type_nelts_top): Add size_one_node instead of
183 2008-09-09 Jason Merrill <jason@redhat.com>
186 * pt.c (tsubst_copy) [PARM_DECL]: Don't abort if the parm has
189 2008-09-09 Jakub Jelinek <jakub@redhat.com>
192 * decl.c (build_enumerator): Handle previous value's DECL_INITIAL
193 being error_operand_p. Don't clear value if it was error_mark_node.
195 2008-09-09 Paolo Bonzini <bonzini@gnu.org>
197 * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove.
198 * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS.
199 * semantics.c (anon_aggr_type_p): Remove.
201 2008-09-06 Jason Merrill <jason@redhat.com>
204 * parser.c (cp_parser_parameter_declaration_list): Process the
205 PARM_DECLs as we go and push them. Return a TREE_LIST.
206 (cp_parser_parameter_declaration_clause): Return a TREE_LIST.
207 (cp_parser_direct_declarator): Create a binding level and
208 suppress deprecated warnings in the parameter list.
209 (make_call_declarator): PARMS is now a tree.
210 * cp-tree.h (struct cp_declarator): Function parms are now a tree.
211 * decl.h (enum deprecated_states, deprecated_state): Move here.
213 (type_is_deprecated): New fn.
214 (grokparms): PARMLIST is a tree now. Warn about parms that
215 use deprecated types.
216 * mangle.c (write_expression): Handle PARM_DECL, CALL_EXPR and
218 * pt.c (tsubst) [DECLTYPE_TYPE]: Set skip_evaluation.
219 (tsubst_copy) [PARM_DECL]: Handle a PARM_DECL used outside of a
221 * name-lookup.c (pushtag): Look through function parameter scopes.
222 (pushdecl_maybe_friend): Don't set DECL_CONTEXT on a PARM_DECL
223 when we're parsing a function declarator.
225 2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
228 * tree.c (cp_build_qualified_type_real): Deal with sharing of
229 TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
232 2008-09-04 Ian Lance Taylor <iant@google.com>
234 * parser.c (check_no_duplicate_clause): Change code parameter to
235 enum omp_clause_code.
237 2008-09-03 Jakub Jelinek <jakub@redhat.com>
240 * decl.c (cp_finish_decl): Only set
241 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P if decl is VAR_DECL.
244 * cp-tree.h (defer_mark_used_calls, deferred_mark_used_calls): New
246 * decl2.c (mark_used): If defer_mark_used_calls, push decl into
247 deferred_mark_used_calls vector and exit early.
248 * decl.c (defer_mark_used_calls, deferred_mark_used_calls): New
250 (finish_function): Set defer_mark_used_calls for the duration of the
251 function. Call mark_used on any queued decls.
253 2008-09-02 Jason Merrill <jason@redhat.com>
256 * call.c (build_over_call): Make =delete work with SFINAE.
257 * class.c (resolve_address_of_overloaded_function): Likewise.
259 * cp-tree.h (struct lang_decl_flags): Rename threadprivate_p to
260 threadprivate_or_deleted_p.
261 (CP_DECL_THREADPRIVATE_P): Adjust.
262 (DECL_DELETED_FN): Likewise.
263 (SD_UNINITIALIZED, SD_INITIALIZED, SD_DEFAULTED): New macros.
264 (SD_DELETED): New macro.
265 * parser.c (cp_parser_init_declarator): Use them.
266 * decl.c (start_decl): Use them.
268 * decl2.c (mark_used): Give =deleted error even in sizeof.
270 * typeck2.c (check_narrowing): Downgrade narrowing error to
273 2008-09-02 Aldy Hernandez <aldyh@redhat.com>
275 * typeck.c (build_array_ref): Use new location argument.
276 * class.c (build_vtbl_ref_1): Pass location to build_array_ref.
277 * call.c (build_new_op): Same.
278 * decl2.c (grok_array_decl): Same.
279 * cp-tree.h (build_array_ref): Add location argument to prototype.
281 2008-09-01 Aldy Hernandez <aldyh@redhat.com>
283 * typeck.c (build_x_indirect_ref): Add location argument.
284 * class.c (build_base_path): Pass location to build_indirect_ref.
285 * pt.c (tsubst_copy_and_build): Pass location to
286 finish_label_address_expr.
287 * parser.c (cp_parser_unary_expression): Same.
289 2008-08-31 Jason Merrill <jason@redhat.com>
291 Implement late-specified return type using 'auto'.
292 * cp-tree.h (struct cp_declarator): Add late_return_type field to
294 * parser.c (cp_parser_late_return_type_opt): New fn.
295 (cp_parser_direct_declarator): Use it.
296 (make_call_declarator): Put it in the declarator.
297 * decl.c (grokdeclarator): Splice in late-specified return type.
298 * pt.c (splice_late_return_type): New fn.
300 2008-08-29 Michael Meissner <gnu@the-meissners.org>
302 * decl.c (builtin_function_1): Take a bool argument to decide
303 whether to use pushdecl or pushdecl_top_level.
304 (duplicate_decls): Copy function specific target and optimization
305 options on duplicate declarations.
306 (cxx_builtin_function): Update builtin_function_1 call.
307 (cxx_builtin_function_ext_scope): New function, guarantee that the
308 declaration is done at global scope.
310 * cp-objcp-common.h (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): New
311 macro, define builtin function hook for delayed machine specific
314 * cp-tree.h (cxx_builtin_function_ext_scope): Add declaration.
316 2008-08-30 Jason Merrill <jason@redhat.com>
319 * pt.c (dependent_type_p): Don't abort on auto outside of a template.
321 2008-08-29 Jason Merrill <jason@redhat.com>
323 Implement C++0x 'auto' semantics.
324 * decl.c (start_decl_1): Don't complain about auto being incomplete.
325 (cp_finish_decl): Deduce auto.
326 * init.c (build_new): Handle 'new auto'.
327 * typeck2.c (cxx_incomplete_type_diagnostic): Give a different
328 message for auto than for normal template type parms.
329 * pt.c (type_dependent_expression_p): Handle { }.
330 (make_auto): New function.
331 (listify_autos): New function.
332 (do_auto_deduction): New function.
333 (is_auto): New function.
334 (type_uses_auto): New function.
335 * cp-tree.h: Declare them.
336 * parser.c (cp_parser_decl_specifier_seq): In C++0x mode, don't
337 treat auto as a declspec.
338 (cp_parser_simple_type_specifier): It's a type-specifier.
340 2008-08-29 Mark Mitchell <mark@codesourcery.com>
342 * mangle.c (write_type): Add target-specific manglings for
343 non-fundamental types to the substitution table.
346 2008-08-29 Jakub Jelinek <jakub@redhat.com>
350 * name-lookup.c (do_using_directive, cp_emit_debug_info_for_using):
351 Adjust debug_hooks->imported_module_or_decl callers.
353 2008-08-29 Jan Hubicka <jh@suse.cz>
355 * cp-gimplify.c (cp_gimplify_expr): Add PRED_CONTINUE heuristic.
357 2008-08-28 Paolo Carlini <paolo.carlini@oracle.com>
360 * decl.c (reshape_init_r): Check init for error_mark_node.
362 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
365 * semantics.c (maybe_convert_cond): Call verify_sequence_points.
366 (finish_return_stmt): Likewise.
367 (finish_switch_condition): Likewise.
369 2008-08-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
371 * cp-tree.h: Fix #error directive.
373 2008-08-26 Douglas Gregor <doug.gregor@gmail.com>
375 * typeck.c (type_after_usual_arithmetic_conversions): Don't do the
376 usual arithmetic conversions on scoped enumeration types.
377 (common_type): Ditto.
378 (default_conversion): Don't perform integral promotions on scoped
380 (build_array_ref): Scoped enumeration types can't be used as
382 * decl.c (start_enum): If building a C++0x scoped enumeration,
383 enter its scope. If provided with an underlying type, check that
384 underlying type and set up the enumeration type accordingly.
385 (finish_enum): Only compute an underlying type if the underlying
386 type isn't already fixed, and only convert the enumerator values
387 now if we've just computed the underlying type. Finish the scope
388 of C++0x scoped enumerations.
389 (build_enumerator): For enumerations with a fixed underlying type,
390 check the enumerator values when the enumerator is defined.
391 (lookup_enumerator): New.
392 * call.c (standard_conversion): Don't allow assignment from
393 integers to scoped enumeration types, even with -fpermissive.
394 Don't convert from scoped enumerations to bool or any arithmetic
396 (build_conditional_expr): Don't per the usual arithmetic
397 conversions for scoped enumeration types.
398 (convert_like_real): Check complain to see if we should
400 * error.c (class_key_or_enum_as_string): Print scoped enums.
401 * cp-tree.h (MAYBE_CLASS_TYPE_P): Check CLASS_TYPE_P, not
403 (INTEGRAL_OR_UNSCOPED_ENUMERATION_TYPE_P): New.
404 (SCOPED_ENUM_P): New.
405 (UNSCOPED_ENUM_P): New.
406 (SET_SCOPED_ENUM_P): New.
407 (ENUM_UNDERLYING_TYPE): New.
408 * pt.c (lookup_template_class): Update the instantiation of enum
409 types to deal with C++0x scoped enumerations and underlying
411 * name-lookup.c (begin_scope): Deal with scoped enumeration
413 (lookup_qualified_name): Deal with lookup into enumeration types.
414 * name-lookup.h (enum scope_kind): Add sk_scoped_enum.
415 * parser.c (cp_parser_class_or_namespace_name): Rename to...
416 (cp_parser_qualifying_entity): ... this. Also, in C++0x mode,
417 parse a type-name that can be an enumeration type.
418 (cp_parser_nested_name_specifier_opt): Update with C++0x grammar.
419 (cp_parser_elaborated_type_specifier): Parse the
420 optional `struct' or `class' following enum (in C++0x).
421 (cp_parser_enum_specifier): Parse C++0x scoped enumerations and
424 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
426 * typeck.c: Update all calls to pedwarn.
431 * name-lookup.c: Likewise.
432 * parser.c: Likewise.
434 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
437 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
440 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
442 * parser.c: Update all calls to inform.
443 * typeck.c: Likewise.
447 * method.c: Likewise.
448 * friend.c: Likewise.
449 * typeck2.c: Likewise.
451 * name-lookup.c: Likewise.
454 2008-08-19 Jakub Jelinek <jakub@redhat.com>
457 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
459 2008-08-18 Tomas Bily <tbily@suse.cz>
461 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
463 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
465 * typeck.c: Update all callers of permerror.
470 * except.c: Likewise.
472 * typeck2.c: Likewise.
474 * semantics.c: Likewise.
475 * name-lookup.c: Likewise.
478 * parser.c: Likewise.
480 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
483 * pt.c (check_template_shadow): Change to return a bool.
484 * name-lookup.c (push_class_level_binding): Early return if
485 check_template_shadow returns false.
486 * cp-tree.h (check_template_shadow): Adjust declaration.
488 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
491 * decl.c (grokdeclarator): In case of extern and initializer, return
492 error_mark_node after the error.
494 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
497 * decl.c (grokfndecl): Call check_main_parameters_type only if
500 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
503 * parser.c (cp_parser_class_head): Early return error_mark_node in
504 case of global qualification of class name or qualified name that
505 does not name a class.
507 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
510 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
512 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
515 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
516 Delete forward declarations. Check that toplev.h has not been
517 included before this file. Include toplev.h and diagnostic.h.
518 * error.c (cp_cpp_error): Use DK_PEDWARN.
519 (cxx_incomplete_type_diagnostic): Update declaration.
520 (cxx_incomplete_type_error): Use DK_ERROR.
521 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
522 as argument. Use emit_diagnostic.
523 (cxx_incomplete_type_error): Use DK_ERROR.
524 (add_exception_specifier): Use diagnostic_t instead of custom
526 * typeck.c (complete_type_or_else): Update call to
527 cxx_incomplete_type_diagnostic.
528 * init.c (build_delete): Likewise.
529 * call.c (diagnostic_fn_t): Remove unused typedef.
530 (build_temp): Pass a pointer to diagnostic_t.
531 (convert_like_real): Use emit_diagnostic.
532 (joust): Check return value of warning before giving informative
534 * friend.c (do_friend): Check return value of warning
535 before giving informative note.
536 * parser.c (cp_parser_template_id): Likewise.
538 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
541 * class.c (check_bases_and_members): Warn with -Wuninitialized
544 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
547 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
548 and make sure it is not a union.
550 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
552 * semantics.c (finish_decltype_type): Initialize type.
554 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
556 * semantics.c (finish_decltype_type): Handle calls to function
557 pointers and references to functions properly.
559 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
562 * parser.c (cp_parser_template_argument): Don't assume that '>>'
563 following a type-id is an error when in C++0x mode.
565 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
568 * decl.c (grokdeclarator): Use explicit location with permerror_at.
570 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
573 * typeck.c (cp_build_binary_op): Move code to c-common.c.
575 2008-08-05 Jason Merrill <jason@redhat.com>
578 * decl.c (build_ptrmemfunc_type): Don't require structural
579 comparison of PMF types.
580 * tree.c (cp_build_qualified_type_real): Don't clear
581 a valid TYPE_PTRMEMFUNC_TYPE.
582 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
585 2008-08-04 Jason Merrill <jason@redhat.com>
588 * typeck2.c (check_narrowing): Allow narrowing conversion
589 from an explicit floating-point constant.
592 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
595 2008-08-04 Simon Baldwin <simonb@google.com>
598 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
599 the declaration's id is followed by a semicolon.
601 2008-07-31 Jakub Jelinek <jakub@redhat.com>
604 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
605 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
607 2008-07-31 Jason Merrill <jason@redhat.com>
610 * init.c (build_new_1): Don't convert pointer to the data type
611 until we're actually going to treat it as that type.
614 * tree.c (build_aggr_init_expr): Split out...
615 (build_cplus_new): ...from here.
616 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
617 * init.c (build_new_1): new T() means value-initialization,
618 not default-initialization.
619 (build_vec_init): Likewise.
620 (build_value_init_1): Use build_aggr_init_expr.
622 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
625 * decl2.c (fix_temporary_vars_context_r): New function.
626 (one_static_initialization_or_destruction): Make sure temporary
627 variables part of the initialiser have their DECL_CONTEXT()
630 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
633 * typeck.c (build_binary_op): Encapsulate code into
636 2008-07-29 Jakub Jelinek <jakub@redhat.com>
639 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
640 TYPE_UID instead of pointers.
642 2008-07-29 Jan Hubicka <jh@suse.cz>
644 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
645 * decl.c (duplicate_decls): Likewise.
646 (grokfndecl): Likewise.
647 (start_method): Likewise.
648 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
650 * pt.c (register_specialization, regenerate_decl_from_template):
652 * decl2.c (grokfield): Likewise.
654 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
657 * decl.c (duplicate_decls): Merge USED flags.
659 2008-07-27 Jason Merrill <jason@redhat.com>
662 * decl.c (reshape_init_r): Allow C++0x initializer lists.
664 2008-07-28 Richard Guenther <rguenther@suse.de>
666 Merge from gimple-tuples-branch.
668 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
670 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
673 2008-07-18 Jakub Jelinek <jakub@redhat.com>
675 * decl.c (finish_function): Call gimple_body after cp_genericize.
677 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
679 * optimize.c: Include gimple.h instead of tree-gimple.h.
680 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
681 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
684 2008-07-16 Jakub Jelinek <jakub@redhat.com>
686 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
688 2008-07-14 Jakub Jelinek <jakub@redhat.com>
690 * cp-gimplify.c (cp_gimplify_expr): Update comment.
692 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
694 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
696 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
697 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
698 (cxx_omp_clause_copy_ctor): Same.
699 (cxx_omp_clause_assign_op): Same.
701 2008-05-28 Jakub Jelinek <jakub@redhat.com>
703 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
704 (cp_gimplify_expr): Adjust caller.
706 2008-05-11 Doug Kwan <dougkwan@google.com>
708 * init.c (build_vec_delete): Add type conversion for argument
709 0 of POINTER_PLUS_EXPR.
711 2008-04-29 Doug Kwan <dougkwan@google.com>
713 * decl2 (File): Include "gimple.h"
714 (cp_write_global_declarations): Use gimple_body instead of
716 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
718 2008-04-10 Diego Novillo <dnovillo@google.com>
720 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
722 * optimize.c (maybe_clone_body): Re-enable call to
724 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
725 code with call to gimple_unreachable.
726 (cp_genericize): Fix handling of clone bodies.
728 2008-04-04 Diego Novillo <dnovillo@google.com>
730 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
732 * optimize.c (maybe_clone_body): Re-enable.
734 2008-02-19 Diego Novillo <dnovillo@google.com>
735 Oleg Ryjkov <olegr@google.com>
737 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
739 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
740 argument to gimple_seq *. Update all users.
741 (gimplify_must_not_throw_expr): Likewise.
743 2008-02-04 Oleg Ryjkov <olegr@google.com>
745 * except.c: Include gimple.h
746 (cp_protect_cleanup_actions): Convert to tuples.
747 * Make-lang.in (cp/except.o): Add dependency on gimple.h
749 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
751 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
752 instead of annotating each block manually.
754 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
756 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
757 (gimplify_for_stmt): Same.
758 (gimplify_switch_stmt): Same.
759 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
761 [WHILE_STMT]: Return GS_OK.
763 [CONTINUE_STMT]: Same.
765 (cp_genericize): Set gimple_body() of cloned functions when needed.
767 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
769 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
770 (cp_gimplify_init_expr): Convert to tuples.
771 (gimplify_must_not_throw_expr): Make function return a
772 gimplify_status and convert to tuples.
774 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
776 * cp-gimplify.c (genericize_try_block): Enable and do not call
778 (genericize_catch_block): Same.
779 (genericize_eh_spec_block): Same.
780 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
781 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
783 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
785 * optimize.c (maybe_clone_body): Comment out call to clone_body.
786 * decl.c (finish_function): Use gimple_body instead of
788 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
789 * cp-gimplify.c (genericize_try_block): Comment out.
790 (genericize_catch_block): Same.
791 (genericize_eh_spec_block): Same.
792 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
793 (gimplify_for_stmt): Comment out.
794 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
795 (cp_gimplify_omp_for): Same.
796 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
797 Comment out call to gimplify_stmt and append_to_statement_list.
798 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
799 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
800 (cp_gimplify_expr): Same.
801 Comment out calls to genericize_*_block. Comment out call to
804 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
807 * class.c (type_has_user_provided_default_constructor): Handle
810 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
812 * decl.c (push_library_fn): Add a parameter for the exceptions that
813 the function may throw.
814 (push_void_library_fn, push_throw_library_fn, expand_static_init):
816 (build_library_fn): Change to static.
817 * cp-tree.h: Adjust declarations.
818 * except.c (declare_nothrow_library_fn): New.
819 (do_get_exception_ptr, do_begin_catch, do_free_exception,
820 do_allocate_exception): Use the latter, adjust the declarations
821 (ie, add empty exception-specification), consistently with the
822 actual implementation in libsupc++.
824 2008-07-25 Jan Hubicka <jh@suse.cz>
826 * typeck.c (inline_conversion): Remove.
827 (cp_build_function_call): Do not use inline_conversion.
828 * decl.c (duplicate_decls): Do not insist on inline being declared
830 (start_cleanup_fn): Do not assume that INLINE flags prevent function
831 from being output. We now remove static functions always.
832 (finish_function): Do return warning on all static functions.
833 * call.c (build_over_call): Do not use inline_conversion.
834 * cp-tree.h (possibly_inlined_p): Declare.
835 (inline_conversion): Remove.
836 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
837 * decl2.c (cp_write_global_declarations): Likewise.
838 (mark_used): Likewise.
839 (possibly_inlined_p): New functions.
841 2008-07-25 Jason Merrill <jason@redhat.com>
843 * class.c (type_has_user_provided_default_constructor): Handle
846 2008-07-23 Jan Hubicka <jh@suse.cz>
848 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
849 (grogfndecl): Drop flag_inline_trees code.
850 * pt.c (instantiate_decl): Drop flag_iline_trees code.
851 * lex.c (cxx_init): Do not set unit-at-a-time.
853 2008-07-23 Jason Merrill <jason@redhat.com>
855 * mangle.c (write_unqualified_name): Avoid infinite recursion when
856 trying to mangle a decl with no name.
858 Implement defaulted/deleted functions as per N2346
859 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
860 (DECL_DELETED_FN): New macro.
861 (DECL_DEFAULTED_FN): New macro.
862 * class.c (user_provided_p): New fn.
863 (defaultable_fn_p): New fn.
864 (type_has_user_provided_constructor): New fn.
865 (type_has_user_provided_default_constructor): New fn.
866 (check_methods): A defaulted fn is still trivial.
867 (check_bases_and_members): Likewise.
868 * decl.c (grok_special_member_properties): Likewise.
869 (duplicate_decls): Complain about redeclaring a function as deleted.
870 (start_decl): initialized==2 means deleted.
871 (cp_finish_decl): Handle deleted/defaulted semantics.
872 * decl2.c (grokfield): Likewise.
873 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
874 Complain about using a deleted fn.
875 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
876 (perform_member_init): Check for a user-provided default constructor
877 even if TYPE_NEEDS_CONSTRUCTING.
878 (build_new_1): Likewise.
879 * call.c (build_over_call): Don't call mark_used twice.
880 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
881 * search.c (check_final_overrider): Check for deleted mismatch.
882 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
883 (cp_parser_pure_specifier): Handle =default and =delete.
885 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
887 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
890 * typeck.c: All calls to pedwarn changed.
891 * decl.c: All calls to pedwarn changed.
892 * call.c: All calls to pedwarn changed.
893 * error.c: All calls to pedwarn changed.
894 * typeck2.c: All calls to pedwarn changed.
895 * pt.c: All calls to pedwarn changed.
896 * name-lookup.c: All calls to pedwarn changed.
897 * parser.c: All calls to pedwarn changed.
899 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
901 * call.c: Fix comment typos.
903 * cp-tree.h: Likewise.
904 * cxx-pretty-print.c: Likewise.
907 * name-lookup.c: Likewise.
908 * operators.def: Likewise.
909 * parser.c: Likewise.
912 * typeck.c: Likewise.
914 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
918 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
919 copy constructors and copy assignment operators proper.
921 2008-07-21 Rafael Ávila de Espíndola <espindola@google.com>
923 * parser.c (cp_token): Remove in_system_header.
924 (eof_token): Remove in_system_header.
925 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
926 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
927 (cp_parser_member_declaration): Use in_system_header_at.
928 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
929 (pop_tinst_level): Don't set in_system_header.
930 (instantiate_class_template): Don't set in_system_header.
931 (instantiate_decl): Don't set in_system_header.
932 (instantiate_pending_templates): Don't set in_system_header.
934 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
937 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
938 TYPE_NOTHROW_P, not TREE_NOTHROW.
939 (trait_expr_value): Likewise.
941 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
944 * call.c (convert_like_real): Don't take the error code path
945 when a rvalue or base conversion has the bad_p field set.
947 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
949 * rtti.c (emit_support_tinfos): Add char16_type_node and
951 * typeck2.c (digest_init): Support char16_t and char32_t.
953 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
955 * cvt.c (convert_to_void): Avoid C++ keywords.
956 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
958 * friend.c (is_friend): Likewise.
959 * init.c (perform_member_init): Likewise.
960 * mangle.c (write_template_prefix, write_template_template_param):
962 * name-lookup.c (do_namespace_alias, do_using_directive,
963 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
964 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
965 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
967 * pt.c (is_specialization_of_friend, lookup_template_class,
968 push_tinst_level, instantiate_class_template,
969 tsubst_copy_and_build): Likewise.
970 * tree.c (add_stmt_to_compound): Likewise.
971 * typeck.c (finish_class_member_access_expr): Likewise.
973 2008-07-17 Julian Brown <julian@codesourcery.com>
974 Mark Mitchell <mark@codesourcery.com>
976 * decl2.c (determine_visibility): Allow target to override
977 visibility of class data.
979 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
982 * semantics.c (trait_expr_value): Update __has_trivial_destructor
983 semantics to the current WP (N2691).
985 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
988 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
989 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
990 complies with exception specification constraints.
992 2008-07-14 Jason Merrill <jason@redhat.com>
994 * lex.c (init_reswords): Always set D_OBJC.
996 2008-07-11 Tom Tromey <tromey@redhat.com>
997 Ian Lance Taylor <iant@google.com>
999 * lex.c (struct resword, reswords): Don't define.
1000 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
1001 (init_reswords): Clarify mask code. Use c_common_reswords rather
1004 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1007 * decl.c (grokdeclarator): Warn about initializing variables
1008 of storage class 'extern' only after the type of the declarator
1009 has been properly computed.
1011 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1014 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
1015 carries the location of the primary type.
1016 * parser.c (cp_parser_check_type_definition): Update documentation.
1017 (cp_parser_check_for_definition_in_return_type,
1018 cp_parser_check_for_invalid_template_id,
1019 cp_parser_set_decl_spec_type,
1020 cp_parser_check_for_definition_in_return_type,
1021 cp_parser_diagnose_invalid_type_name,
1022 cp_parser_new_expression, cp_parser_explicit_instantiation,
1023 cp_parser_type_specifier, cp_parser_simple_type_specifier,
1024 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
1027 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
1031 * semantic.c (qualified_name_lookup_error, finish_id_expression):
1032 Add a location_t parameter so that
1033 error message can have a more accurate location.
1034 * cp-tree.h: Updated prototype
1035 * pt.c (tsubst_qualified_id): Use location in error messages.
1036 * parser.c (cp_parser_postfix_expression,
1037 cp_parser_objc_statement, cp_parser_trait_expr,
1038 cp_parser_token_is_class_key,
1039 cp_parser_uncommitted_to_tentative_parse_p,
1040 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
1041 cp_parser_error, cp_parser_name_lookup_error,
1042 cp_parser_simulate_error, cp_parser_check_decl_spec,
1043 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
1044 cp_parser_diagnose_invalid_type_name,
1045 cp_parser_parse_and_diagnose_invalid_type_name,
1046 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
1047 cp_parser_string_literal, cp_parser_primary_expression,
1048 cp_parser_primary_expression, cp_parser_unqualified_id,
1049 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
1050 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
1051 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
1052 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
1053 cp_parser_jump_statement, cp_parser_block_declaration,
1054 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
1055 cp_parser_function_specifier_opt, cp_parser_decltype,
1056 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
1057 cp_parser_mem_initializer_id, cp_parser_template_parameter,
1058 cp_parser_type_parameter, cp_parser_template_id,
1059 cp_parser_template_name, cp_parser_template_argument): Likewise.
1061 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1064 * pt.c (tsubst_function_type): Remove warning for type qualifiers
1065 on function return type.
1067 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
1070 * pt.c (tsubst_function_type): Don't warn for type qualifiers
1071 on function return type in case of system header.
1073 2008-07-09 Raksit Ashok <raksit@google.com>
1075 * parser.c (cp_parser_postfix_expression): New warning based on flag
1076 warn_disallowed_functions.
1078 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
1081 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
1082 functions declared with a storage class qualifier.
1084 2008-07-03 Richard Guenther <rguenther@suse.de>
1087 * typeck.c (cp_build_function_call): Move code to verify
1088 builtin function arguments ...
1089 * call.c (build_cxx_call): ... here.
1091 2008-07-02 Jason Merrill <jason@redhat.com>
1093 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
1095 Implement WG21 N2672, Initializer List proposed wording
1096 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
1097 (struct lang_type_class): Add has_list_ctor bitfield.
1098 (TYPE_HAS_LIST_CTOR): New macro.
1099 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
1100 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
1101 (LOOKUP_NO_NARROWING): New macro.
1102 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
1103 * parser.c (cp_parse_braced_list): Split out from...
1104 (cp_parser_initializer_clause): ...here.
1105 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
1107 (cp_lexer_next_token_is_not_keyword): New fn.
1108 (cp_parser_parenthesized_expression_list): Handle { }.
1109 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
1110 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
1111 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
1112 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
1113 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
1114 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
1115 (cp_parser_save_member_function_body): Likewise.
1116 * call.c (conversion_kind): Add ck_list, ck_aggr.
1117 (struct conversion): Add check_narrowing bitfield, conversion list.
1118 (build_list_conv): New fn.
1119 (build_aggr_conv): New fn.
1120 (implicit_conversion): Call them.
1121 (standard_conversion): Set check_narrowing if appropriate.
1122 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
1123 (build_user_type_conversion_1): When converting from an init list,
1124 we allow additional conversions except when calling a copy ctor.
1125 (convert_like_real): Calling an explicit ctor for an init list is
1126 ill-formed. Handle ck_list and ck_addr. Check narrowing.
1127 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
1128 class doesn't have a list ctor, break the {} into a TREE_LIST.
1129 (compare_ics): ck_list is better than other UDCs.
1130 (set_up_extended_ref_temp): Split out from initialize_reference.
1131 (is_std_init_list): New fn.
1132 (is_list_ctor): New fn.
1133 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
1134 (reshape_init_array_1): Pass it to build_constructor.
1135 (reshape_init_class): Ditto.
1136 (initialize_artificial_var): Pass the appropriate type.
1137 (build_aggr_init_full_exprs): Split out from...
1138 (check_initializer): ...here. Handle new semantics.
1139 (build_init_list_var_init): New subroutine of check_initializer.
1140 (grokdeclarator): Converting constructors can have more than one parm.
1141 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
1142 * init.c (expand_default_init): Only do digest_init for aggregates.
1143 * rtti.c (tinfo_base_init): Pass init_list_type_node to
1144 build_constructor_from_list.
1145 (generic_initializer, ptr_initializer): Ditto.
1146 (ptm_initializer, class_initializer): Ditto.
1147 (get_pseudo_ti_init): Ditto.
1148 * error.c (dump_type): Handle init_list_type_node.
1149 (maybe_warn_cpp0x): New fn.
1150 (maybe_varn_variadic_templates): Call it.
1151 * cvt.c (ocp_convert): Handle conversion from { }.
1152 * tree.c (build_array_of_n_type): New fn.
1153 * typeck2.c (store_init_value): Use init_list_type_node.
1154 (digest_init): Likewise.
1155 (check_narrowing): New fn.
1156 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
1157 of vector of constructor elts. Handle non-aggregate types. Make
1158 constant literals static.
1159 * pt.c: (tsubst_copy_and_build): Adjust.
1160 (unify): Handle { }.
1161 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
1163 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
1165 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
1166 (comp_ptr_ttypes_const): Likewise.
1168 2008-07-01 Andrew Haley <aph@redhat.com>
1170 * decl.c (finish_constructor_body): Don't set the return value of
1171 the constructor if the constructor is that of a Java type.
1173 2008-06-30 Jakub Jelinek <jakub@redhat.com>
1176 * decl2.c (is_late_template_attribute): If the first attribute
1177 argument is IDENTIFIER_NODE, don't consider it when checking
1178 if arguments are value or type dependent.
1180 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
1183 * pt.c (do_type_instantiation): In c++0x mode do not warn for
1186 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1188 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
1190 2008-06-28 Jakub Jelinek <jakub@redhat.com>
1193 * repo.c (repo_emit_p): Put const static data members initialized
1194 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
1197 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
1200 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
1203 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
1206 * typeck.c (cp_build_function_call): Show example syntax in
1209 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
1211 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
1212 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
1213 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
1214 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
1215 pedwarn to permerror.
1216 * init.c (perform_member_init, build_new_1, build_new): Likewise.
1217 * decl.c (warn_extern_redeclared_static, duplicate_decls,
1218 * identify_goto, check_previous_goto_1, check_goto, define_label,
1219 check_tag_decl, start_decl, check_class_member_definition_namespace,
1220 grokfndecl, grokdeclarator): Likewise.
1221 * except.c (check_handlers): Likewise.
1222 * typeck2.c (digest_init): Likewise.
1223 * pt.c (check_specialization_namespace,
1224 check_explicit_instantiation_namespace,
1225 maybe_process_partial_specialization, check_explicit_specialization,
1226 convert_template_argument, do_decl_instantiation,
1227 do_type_instantiation, instantiate_decl): Likewise.
1228 * semantics.c (finish_template_type_parm): Likewise.
1229 * name-lookup.c (pushdecl_maybe_friend,
1230 check_for_out_of_scope_variable): Likewise.
1231 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
1232 coerce_new_type): Likewise.
1233 * parser.c (cp_parser_nested_name_specifier_opt,
1234 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
1235 cp_parser_class_head, cp_parser_check_class_key): Likewise.
1236 (cp_parser_parameter_declaration): Check flag_permissive instead of
1237 flag_pedantic_errors.
1238 * call.c (joust): Change pedwarn to warning.
1239 * friend.c (make_friend_class): Likewise.
1241 2008-06-16 Jan Hubicka <jh@suse.cz>
1243 * method.c: Include cgraph.h.
1244 (use_thunk): Use cgraph_add_new_function instead of calling backend
1247 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1249 * parser.c: Fix comment typo.
1251 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1254 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
1255 grokdeclarator and apply it to the created declaration.
1256 * cp-tree.h (grokbitfield): Update prototype.
1257 * parser.c (cp_parser_member_declaration): Don't apply the attributes
1258 since they are now applied in grokbitfield. Adjusted the call to
1260 (cp_parser_objc_class_ivars): Likewise.
1262 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
1265 * class.c (type_requires_array_cookie): Do not consider delete[]
1266 operators with an ellipsis as second argument.
1268 2008-06-09 Jakub Jelinek <jakub@redhat.com>
1271 * semantics.c (stmt_expr_value_expr): Don't crash on empty
1274 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
1277 * pt.c (maybe_process_partial_specialization): Check the tree
1278 returned by push_template_decl for error_mark_node.
1279 * parser.c (cp_parser_class_head): Likewise, check the tree
1280 returned by the latter.
1282 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
1285 * decl.c (grokdeclarator): In case of wrong return type return
1286 immediately error_mark_node.
1288 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1290 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
1291 dependent_omp_for_p, begin_omp_task, finish_omp_task,
1292 finish_omp_taskwait): New prototypes.
1293 (cxx_omp_clause_default_ctor): Add outer argument.
1294 (finish_omp_for): Add new clauses argument.
1295 * cp-gimplify.c (cxx_omp_finish_clause): New function.
1296 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
1297 (cxx_omp_clause_default_ctor): Add outer argument.
1298 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
1299 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
1300 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
1301 Add par_clauses argument. If decl is present in parallel's
1302 lastprivate clause, change that clause to shared and add
1303 a lastprivate clause for decl to OMP_FOR_CLAUSES.
1304 Fix wording of error messages. Adjust finish_omp_for caller.
1305 Add clauses argument. Parse loops with random access iterators.
1306 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
1308 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
1309 cp_parser_omp_for_loop callers.
1310 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
1312 (cp_parser_omp_clause_name): Handle collapse and untied
1314 (cp_parser_omp_clause_schedule): Handle auto schedule.
1315 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
1316 and PRAGMA_OMP_CLAUSE_UNTIED.
1317 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
1318 (OMP_TASK_CLAUSE_MASK): Define.
1319 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
1320 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
1321 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
1322 PRAGMA_OMP_TASKWAIT.
1323 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
1324 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
1325 (tsubst_omp_for_iterator): New function.
1326 (dependent_omp_for_p): New function.
1327 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
1328 loops. Adjust finish_omp_for caller. Handle loops with random
1329 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
1330 (tsubst_expr): Handle OMP_TASK.
1331 * semantics.c (cxx_omp_create_clause_info): New function.
1332 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
1333 OMP_CLAUSE_COLLAPSE.
1334 (cxx_omp_predetermined_sharing): Removed.
1335 * semantics.c (finish_omp_for): Allow pointer iterators. Use
1336 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
1337 collapsed for loops. Adjust c_finish_omp_for caller. Add new
1338 clauses argument. Fix check for type dependent cond or incr.
1339 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
1340 fold_convert to convert incr amount to difference_type. Only
1341 fold if not in template. If decl is mentioned in lastprivate
1342 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
1343 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
1345 (finish_omp_threadprivate): Allow static class members of the
1347 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
1348 finish_omp_taskwait): New functions.
1350 * parser.c (cp_parser_binary_expression): Add prec argument.
1351 (cp_parser_assignment_expression): Adjust caller.
1352 * cp-tree.h (outer_curly_brace_block): New prototype.
1353 * decl.c (outer_curly_brace_block): No longer static.
1355 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
1358 * pt.c (push_template_decl_real): Consistently return error_mark_node
1361 2008-06-02 Tomas Bily <tbily@suse.cz>
1363 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
1364 (cp_build_unary_op): Likewise.
1365 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
1366 (maybe_warn_about_returning_address_of_local): Likewise.
1368 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
1371 * pt.c (tsubst_initializer_list): Consistently check the tree
1372 returned by tsubst_pack_expansion for error_mark_node.
1374 2008-05-27 Michael Matz <matz@suse.de>
1377 * call.c (build_new_op): Make warning conditional on
1380 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
1383 * call.c (convert_like_real): Convert bitfield to desired type
1384 before creating temporary.
1386 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
1388 * Makefile.in: Adjusted dependencies on c-incpath.o.
1390 2008-05-23 Jakub Jelinek <jakub@redhat.com>
1393 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
1394 fold_build_cleanup_point_expr on build_call_a results.
1397 * semantics.c (omp_clause_info_fndecl): New function.
1398 (finish_omp_clauses): Use it.
1400 2008-05-21 Jakub Jelinek <jakub@redhat.com>
1403 * cp-tree.h (check_array_initializer): New prototype.
1404 * decl.c (check_array_initializer): New function.
1405 (check_initializer): Call it.
1406 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
1408 2008-05-21 Tom Tromey <tromey@redhat.com>
1410 * mangle.c (save_partially_mangled_name): Remove.
1411 (restore_partially_mangled_name): Likewise.
1412 (write_encoding): Update.
1413 (write_unqualified_name): Likewise.
1414 (start_mangling): Always use name_obstack. Remove 'ident_p'
1416 (get_identifier_nocopy): Remove.
1417 (finish_mangling_internal): Rename from finish_mangling.
1418 (finish_mangling): New function.
1419 (finish_mangling_get_identifier): Likewise.
1420 (partially_mangled_name, partially_mangled_name_len): Remove.
1421 (mangle_decl_string): Change return type. Update.
1422 (mangle_decl, mangle_type_string, mangle_special_for_type,
1423 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
1424 mangle_ref_init_variable): Update.
1426 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
1429 * semantics.c (begin_class_definition): Extend checks on the first
1432 2008-05-12 Tomas Bily <tbily@suse.cz>
1434 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1435 * call.c (build_over_call): Likewise.
1436 * error.c (dump_expr): Use CASE_CONVERT.
1437 * class.c (fixed_type_or_null): Likewise.
1439 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1441 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1443 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1446 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1448 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1449 DECL_LOOPING_CONST_OR_PURE_P attributes.
1450 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1453 2008-05-02 Simon Baldwin <simonb@google.com>
1456 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1458 2008-05-01 Simon Baldwin <simonb@google.com>
1460 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1462 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1465 * pt.c (more_specialized_fn): Stop the loop even if there are no
1466 arguments before ellipsis.
1468 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1471 * parser.c (cp_parser_lookup_name): Look through single function
1475 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1476 COMPOUND_EXPR if the second argument would be error_mark_node.
1478 2008-04-28 Jason Merrill <jason@redhat.com>
1479 Liu Guanwei <liu_gw@163.com>
1482 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1483 in default arguments.
1485 2008-04-25 Jan Hubicka <jh@suse.cz>
1487 * typeck.c (check_return_expr): Update.
1488 * decl.c (start_preparsed_function): Update.
1489 * method.c (use_thunk): Update.
1491 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1494 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1495 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1496 * decl2.c (is_late_template_attribute): Only make vector_size
1497 late tmpl attribute if argument is type or value dependent.
1498 (cp_reconstruct_complex_type): New function.
1500 2008-04-24 Richard Guenther <rguenther@suse.de>
1502 * typeck.c (cp_build_function_call): Call
1503 check_builtin_function_arguments.
1505 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1507 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1508 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1509 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1510 * class.c (build_base_path): Don't set TREE_INVARIANT.
1511 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1512 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1513 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1514 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1515 (generic_initializer): Don't set TREE_INVARIANT.
1516 (ptr_initializer): Don't set TREE_INVARIANT.
1517 (ptm_initializer): Don't set TREE_INVARIANT.
1518 (class_initializer): Don't set TREE_INVARIANT.
1519 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1520 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1521 (build_template_parm_index): Don't set TREE_INVARIANT.
1522 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1523 (process_template_parm): Don't set TREE_INVARIANT.
1525 2008-04-22 Jason Merrill <jason@redhat.com>
1528 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1529 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1530 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1532 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1535 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1536 expression is errorneous.
1538 2008-04-21 Jason Merrill <jason@redhat.com>
1541 * tree.c (cp_tree_equal): Handle FIXED_CST.
1544 * pt.c (template_template_parm_bindings_ok_p): Set
1545 processing_template_decl while in this function.
1547 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1549 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1550 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1551 char16_t and char32_t.
1552 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1553 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1554 extended builtin type "u8char{16,32}_t".
1555 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1557 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1558 (cp_parser_is_string_literal): Idem.
1559 (cp_parser_string_literal): Idem.
1560 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1562 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1563 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1564 * typeck.c (string_conv_p): Support char16_t and char32_t.
1566 2008-04-17 Jason Merrill <jason@redhat.com>
1569 * call.c (build_user_type_conversion_1): Represent second step of
1570 copy-init with an rvalue conversion.
1571 (convert_like_real) [ck_user]: Don't implicitly add it here.
1573 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1576 * decl.c (layout_var_decl): If extern or static var has variable
1577 size, set TREE_TYPE (decl) to error_mark_node.
1579 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1582 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1585 2008-04-09 Jason Merrill <jason@redhat.com>
1588 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1589 not a pushed variable.
1591 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1593 * call.c (build_op_delete_call): Fix quotation in warning message.
1594 * decl.c (grokdeclarator): Quote keyword in error message.
1595 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1598 * parser.c (cp_parser_check_type_definition): Print error string
1599 directly rather than using "%s".
1600 (cp_parser_postfix_expression): Fix quotation.
1601 (cp_parser_decltype): Likewise.
1602 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1604 * parser.c (cp_parser_non_integral_constant_expression): Build error
1605 message with CONCAT rather than using "%s".
1606 (cp_parser_primary_expression): Fix quotation.
1607 (cp_parser_postfix_expression): Likewise.
1608 (cp_parser_postfix_dot_deref_expression): Likewise.
1609 (cp_parser_unary_expression): Likewise.
1610 (cp_parser_new_expression): Likewise.
1611 (cp_parser_delete_expression): Likewise.
1613 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1614 as `)', not as `('. Fix quotation.
1615 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1616 (cp_parser_primary_expression): Likewise.
1617 (cp_parser_nested_name_specifier_opt): Likewise.
1618 (cp_parser_postfix_expression): Likewise.
1619 (cp_parser_postfix_open_square_expression): Likewise.
1620 (cp_parser_parenthesized_expression_list): Likewise.
1621 (cp_parser_pseudo_destructor_name): Likewise.
1622 (cp_parser_new_expression): Likewise.
1623 (cp_parser_direct_new_declarator): Likewise.
1624 (cp_parser_delete_expression): Likewise.
1625 (cp_parser_cast_expression): Likewise.
1626 (cp_parser_question_colon_clause): Likewise.
1627 (cp_parser_builtin_offsetof): Likewise.
1628 (cp_parser_trait_expr): Likewise.
1629 (cp_parser_label_for_labeled_statement): Likewise.
1630 (cp_parser_compound_statement): Likewise.
1631 (cp_parser_selection_statement): Likewise.
1632 (cp_parser_condition): Likewise.
1633 (cp_parser_iteration_statement): Likewise.
1634 (cp_parser_already_scoped_statement): Likewise.
1635 (cp_parser_simple_declaration): Likewise.
1636 (cp_parser_linkage_specification): Likewise.
1637 (cp_parser_static_assert): Likewise.
1638 (cp_parser_decltype): Likewise.
1639 (cp_parser_conversion_function_id): Likewise.
1640 (cp_parser_operator_function_id): Likewise.
1641 (cp_parser_operator): Likewise.
1642 (cp_parser_type_parameter): Likewise.
1643 (cp_parser_template_id): Likewise.
1644 (cp_parser_explicit_instantiation): Likewise.
1645 (cp_parser_explicit_specialization): Likewise.
1646 (cp_parser_enum_specifier): Likewise.
1647 (cp_parser_namespace_definition): Likewise.
1648 (cp_parser_namespace_alias_definition): Likewise.
1649 (cp_parser_using_declaration): Likewise.
1650 (cp_parser_using_directive): Likewise.
1651 (cp_parser_asm_definition): Likewise.
1652 (cp_parser_direct_declarator): Likewise.
1653 (cp_parser_ptr_operator): Likewise.
1654 (cp_parser_parameter_declaration_clause): Likewise.
1655 (cp_parser_initializer_clause): Likewise.
1656 (cp_parser_class_specifier): Likewise.
1657 (cp_parser_member_specification_opt): Likewise.
1658 (cp_parser_member_declaration): Likewise.
1659 (cp_parser_pure_specifier): Likewise.
1660 (cp_parser_constant_initializer): Likewise.
1661 (cp_parser_base_clause): Likewise.
1662 (cp_parser_exception_specification_opt): Likewise.
1663 (cp_parser_try_block): Likewise.
1664 (cp_parser_function_try_block): Likewise.
1665 (cp_parser_handler): Likewise.
1666 (cp_parser_throw_expression): Likewise.
1667 (cp_parser_asm_operand_list): Likewise.
1668 (cp_parser_attributes_opt): Likewise.
1669 (cp_parser_label_declaration): Likewise.
1670 (cp_parser_constructor_declarator_p): Likewise.
1671 (cp_parser_template_declaration_after_export): Likewise.
1672 (cp_parser_single_declaration): Likewise.
1673 (cp_parser_objc_message_expression): Likewise.
1674 (cp_parser_objc_message_args): Likewise.
1675 (cp_parser_objc_encode_expression): Likewise.
1676 (cp_parser_objc_defs_expression): Likewise.
1677 (cp_parser_objc_protocol_expression): Likewise.
1678 (cp_parser_objc_selector_expression): Likewise.
1679 (cp_parser_objc_protocol_refs_opt): Likewise.
1680 (cp_parser_objc_typename): Likewise.
1681 (cp_parser_objc_method_keyword_params): Likewise.
1682 (cp_parser_objc_superclass_or_category): Likewise.
1683 (cp_parser_objc_try_catch_finally_statement): Likewise.
1684 (cp_parser_objc_synchronized_statement): Likewise.
1685 (cp_parser_objc_throw_statement): Likewise.
1686 (cp_parser_omp_var_list_no_open): Likewise.
1687 (cp_parser_omp_clause_default): Likewise.
1688 (cp_parser_omp_clause_if): Likewise.
1689 (cp_parser_omp_clause_num_threads): Likewise.
1690 (cp_parser_omp_clause_reduction): Likewise.
1691 (cp_parser_omp_clause_schedule): Likewise.
1692 (cp_parser_omp_critical): Likewise.
1693 (cp_parser_omp_for_loop): Likewise.
1694 (cp_parser_omp_sections_scope): Likewise.
1696 * parser.c (cp_parser_template_parameter_list): Simplify.
1698 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1700 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1702 2008-04-07 Jason Merrill <jason@redhat.com>
1705 * class.c (type_has_user_nondefault_constructor): A template
1706 counts as a nondefault constructor.
1708 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1710 * decl.c (cxx_push_function_context): Delete.
1711 (cxx_pop_function_context): Delete.
1712 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1714 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1715 LANG_HOOKS_FUNCTION_FINAL): Delete.
1716 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1717 LANG_HOOKS_MISSING_NORETURN_OK_P.
1718 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1720 * semantics.c (current_stmt_tree): Fix comment.
1722 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1725 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1726 before calling fold_offsetof.
1728 2008-04-03 Tom Tromey <tromey@redhat.com>
1730 * Make-lang.in (c++_OBJS): New variable.
1732 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1734 * optimize.c (clone_body): New, from tree-inline.c.
1736 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1738 * method.c (synthesize_method): Use {push,pop}_function_context.
1739 * name-lookup.c (push_to_top_level): Likewise.
1740 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1742 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1745 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1748 2008-03-27 Tom Tromey <tromey@redhat.com>
1750 * Make-lang.in: Revert automatic dependency patch.
1752 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1755 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1756 (build_compound_expr): New, for compatibility with C
1757 build_compound_expr.
1758 (cp_build_compound_expr): Renamed from build_compound_expr.
1759 (build_c_cast): New, for compatibility with C build_c_cast.
1760 (cp_build_c_cast): Renamed from build_c_cast.
1761 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1762 * decl.c (cxx_maybe_build_cleanup): Ditto.
1763 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1764 (cp_build_compound_expr): Renamed from build_compound_expr.
1765 (build_c_cast): Add C-compatible prototype.
1766 (cp_build_c_cast): Renamed from build_c_cast.
1767 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1768 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1770 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1772 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1773 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1774 ending in a pack expansion, both of which can occur when
1775 substituting into a nested template.
1776 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1777 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1778 * parser.c (cp_parser_template_parameter): Deal with unnamed
1779 non-type template parameter packs identified by pack expansions in
1782 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1785 * pt.c (apply_late_template_attributes): Don't call tsubst on
1786 first attribute argument if it is IDENTIFIER_NODE.
1789 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1790 and LTGT_EXPR to pp_expression.
1792 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1794 * pt.c (coerce_template_template_parm): Moved the body of the loop
1795 of coerce_template_template_parms here, to make iteration over a
1796 template argument pack simpler.
1797 Also, allow matching of a template parameter pack in the template
1798 template parameter to a template parameter in the template
1800 (coerce_template_template_parms): Deal with variadic template
1801 template parameters. Use coerce_template_template_parm.
1802 (unify): Make sure we coerce the template template argument's
1803 template arguments to the template template parameter's template
1804 parameters, not the other way around.
1806 2008-03-25 Tom Tromey <tromey@redhat.com>
1808 * Make-lang.in: Remove .o targets.
1809 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1811 (c++_OBJS): New variable.
1812 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1814 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1816 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1817 (composite_pointer_type): Ditto.
1818 (common_type): Fix call to composite_pointer_type.
1819 (cxx_sizeof_nowarn): New; used to be a macro.
1820 (cxx_sizeof_expr): Add SFINAE support.
1821 (cxx_alignof_expr): Ditto.
1822 (decay_conversion): Fix calls for SFINAE support.
1823 (rationalize_conditional_expr): Add SFINAE support.
1824 (build_class_member_access_expr): Ditto.
1825 (finish_class_member_access_expr): Ditto.
1826 (build_x_indirect_ref): Ditto.
1827 (build_indirect_ref): Original version renamed to
1828 cp_build_indirect_ref; new version provides a bridge from
1830 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1832 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1833 (build_function_call): Original version renamed to
1834 cp_build_function_call; new version provides a bridge from
1836 (cp_build_function_call): Was build_function_call; added SFINAE
1838 (convert_arguments): Add SFINAE support.
1839 (build_x_binary_op): Ditto.
1840 (build_binary_op): Original version renamed to cp_build_binary_op;
1841 new version provides a bridge from c-common.
1842 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1843 (pointer_diff): Fix calls for SFINAE.
1844 (build_x_unary_op): Add SFINAE support.
1845 (condition_conversion): Fix calls for SFINAE.
1846 (build_unary_op): Original version renamed to cp_build_unary_op;
1847 new version provides a bridge from c-common.
1848 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1849 (unary_complex_lvalue): Fix calls for SFINAE.
1850 (build_x_conditional_expr): Add SFINAE support.
1851 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1852 (build_x_compound_expr): Add SFINAE support.
1853 (convert_ptrmem): Fix calls for SFINAE.
1854 (build_static_cast_1): Add SFINAE support.
1855 (build_static_cast): Ditto.
1856 (build_reinterpret_cast_1): Ditto.
1857 (build_reinterpret_cast): Ditto.
1858 (build_const_cast_1): Ditto.
1859 (build_const_cast): Ditto.
1860 (build_c_cast): Ditto.
1861 (build_modify_expr): Original version renamed to
1862 cp_build_modify_expr; new version provides a bridge from c-common.
1863 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1865 (build_x_modify_expr): Add SFINAE support.
1866 (build_ptrmemfunc): Fix calls for SFINAE.
1867 (convert_for_assignment): Add SFINAE support.
1868 (convert_for_initialization): Ditto.
1869 (check_return_expr): Fix calls for SFINAE.
1870 (lvalue_or_else): Add SFINAE support.
1871 * init.c (perform_member_init): Fix calls for SFINAE.
1872 (emit_mem_initializers): Ditto.
1873 (expand_virtual_init): Ditto.
1874 (expand_cleanup_for_base): Ditto.
1875 (build_aggr_init): Add SFINAE support.
1876 (expand_default_init): Ditto.
1877 (expand_aggr_init_1): Fix calls for SFINAE.
1878 (build_offset_ref): Ditto.
1879 (build_new_1): Add SFINAE support.
1881 (build_vec_delete_1): Fix calls for SFINAE.
1882 (get_temp_regvar): Ditto.
1883 (build_vec_init): Add SFINAE support.
1884 (build_dtor_call): Fix calls for SFINAE.
1885 (build_delete): Ditto.
1886 (push_base_cleanups): Ditto.
1887 (build_vec_delete_1): Ditto.
1888 * class.c (build_base_path): Fix calls for SFINAE.
1889 (build_simple_base_path): Ditto.
1890 (convert_to_base_statically): Ditto.
1891 (build_vfn_ref): Ditto.
1892 (resolve_address_of_overloaded_function): Ditto.
1893 * decl.c (check_initializer): Fix calls for SFINAE.
1894 (register_dtor_fn): Ditto.
1895 (compute_array_index_type): Ditto.
1896 (finish_enum): Ditto.
1897 (start_preparsed_function): Ditto.
1898 (cxx_maybe_build_cleanup): Ditto.
1899 * call.c (convert_like): Add COMPLAIN argument.
1900 (convert_like_with_context): Ditto.
1901 (build_this): Fix calls for SFINAE.
1902 (build_user_type_conversion): Ditto.
1903 (resolve_args): Ditto.
1904 (build_new_function_call): Add SFINAE support.
1905 (build_operator_new_call): Fix calls for SFINAE.
1906 (build_object_call): Add SFINAE support.
1907 (build_conditional_expr): Ditto.
1908 (build_new_op): Ditto.
1909 (build_op_delete_call): Fix calls for SFINAE.
1910 (build_temp): Ditto.
1911 (convert_like_real): Add SFINAE support.
1912 (build_x_va_arg): Fix calls for SFINAE.
1913 (convert_default_arg): Ditto.
1914 (build_over_call): Add SFINAE support.
1915 (build_java_interface_fn_ref): Fix calls for SFINAE.
1916 (build_special_member_call): Add SFINAE support.
1917 (build_new_method_call): Ditto.
1918 (perform_implicit_conversion): Ditto.
1919 (perform_direct_initialization_if_possible): Ditto.
1920 (initialize_reference): Fix calls for SFINAE.
1921 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1922 * rtti.c (build_headof): Fix calls for SFINAE.
1923 (get_tinfo_decl_dynamic): Ditto.
1924 (get_typeid): Ditto.
1925 (build_dynamic_cast_1): Add SFINAE support.
1926 (build_dynamic_cast): Ditto.
1927 (tinfo_base_init): Fix calls for SFINAE.
1928 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1929 (do_end_catch): Ditto.
1930 (initialize_handler_parm): Ditto.
1931 (expand_start_catch_block): Ditto.
1932 (do_allocate_exception): Ditto.
1933 (do_free_exception): Ditto.
1934 (build_throw): Ditto.
1935 * cvt.c (build_up_reference): Fix calls for SFINAE.
1936 (convert_to_reference): Ditto.
1937 (ocp_convert): Ditto.
1938 (convert_to_void): Add SFINAE support.
1939 * tree.c (build_dummy_object): Fix calls for SFINAE.
1940 (stabilize_expr): Ditto.
1941 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1943 (build_new_method_call): Ditto.
1944 (build_special_member_call): Ditto.
1945 (build_new_op): Ditto.
1946 (perform_implicit_conversion): Ditto.
1947 (perform_direct_initialization_if_possible): Ditto.
1948 (convert_to_void): Ditto.
1949 (build_aggr_init): Ditto.
1951 (build_vec_init): Ditto.
1952 (build_dynamic_cast): Ditto.
1953 (finish_call_expr): Ditto
1954 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1955 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1956 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1957 (finish_class_member_access_expr): Ditto.
1958 (build_x_indirect_ref): Ditto.
1959 (cp_build_indirect_ref): New.
1960 (cp_build_function_call): Add tsubst_flags_t parameter.
1961 (build_x_unary_op): Ditto.
1962 (cp_build_unary_op): New.
1963 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1964 (build_x_compound_expr): Ditto.
1965 (build_compound_expr): Ditto.
1966 (build_static_cast): Ditto.
1967 (build_reinterpret_cast): Ditto.
1968 (build_const_cast): Ditto.
1969 (build_c_cast): Ditto.
1970 (build_x_modify_expr): Ditto.
1971 (cp_build_modify_expr): New.
1972 (convert_for_initialization): Add tsubst_flags_t parameter.
1973 (cp_build_binary_op): Remove macro; add function declaration.
1974 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1975 (lvalue_or_else): Ditto.
1976 (build_functional_cast): Ditto.
1977 * typeck2.c (digest_init): Fix calls for SFINAE.
1978 (process_init_constructor_array): Ditto.
1979 (process_init_constructor_record): Ditto.
1980 (build_x_arrow): Ditto.
1981 (build_m_component_ref): Ditto.
1982 (build_functional_cast): Add SFINAE support.
1983 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1984 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1985 (finish_expr_stmt): Ditto.
1986 (finish_for_expr): Ditto.
1987 (finish_asm_stmt): Ditto.
1988 (finish_non_static_data_member): Ditto.
1989 (finish_qualified_id_expr): Ditto.
1990 (finish_call_expr): Add SFINAE support.
1991 (finish_increment_expr): Fix calls for SFINAE.
1992 (finish_unary_op_expr): Ditto.
1993 (simplify_aggr_init_expr): Ditto.
1994 (finish_omp_clauses): Ditto.
1995 (finish_omp_for): Ditto.
1996 (finish_omp_barrier): Ditto.
1997 (finish_omo_flush): Ditto.
1998 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1999 (build_anon_union_vars): Ditto.
2000 (get_guard_cond): Ditto.
2002 (one_static_initialization_or_destruction): Ditto.
2003 (do_static_initialization_or_destruction): Ditto.
2004 (generate_ctor_or_dtor_function): Ditto.
2005 (build_offset_ref_call_from_tree): Ditto.
2006 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
2007 (cp_parser_postfix_dot_deref_expression): Ditto.
2008 (cp_parser_unary_expression): Ditto.
2009 (cp_parser_new_expression): Ditto.
2010 (cp_parser_cast_expression): Ditto.
2011 (cp_parser_binary_expression): Ditto.
2012 (cp_parser_question_colon_clause): Ditto.
2013 (cp_parser_assignment_expression): Ditto.
2014 (cp_parser_expression): Ditto.
2015 (cp_parser_builtin_offsetof): Ditto.
2016 (cp_parser_template_argument): Ditto.
2017 (cp_parser_functional_cast): Ditto.
2019 2008-03-24 Tom Tromey <tromey@redhat.com>
2021 * lex.c (handle_pragma_interface): Don't copy the filename.
2022 (handle_pragma_implementation): Copy filename using xstrdup.
2024 2008-03-21 Paolo Carlini <pcarlini@suse.de>
2026 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
2027 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
2028 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
2029 (PROMOTES_TO_AGGR_TYPE): Remove.
2030 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
2031 * typeck.c (unary_complex_lvalue, build_modify_expr,
2032 convert_for_initialization): Adjust.
2033 * init.c (is_aggr_type): Remove.
2034 (is_class_type): Add.
2035 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
2036 build_delete): Adjust.
2037 * lex.c (make_aggr_type): Remove.
2038 (make_class_type): Add.
2039 (cxx_make_type): Adjust.
2040 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
2042 * decl.c (build_typename_type, make_typename_type,
2043 make_unbound_class_template, cxx_init_decl_processing,
2044 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
2045 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
2046 grok_op_properties, xref_tag, check_function_type): Adjust.
2047 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
2048 add_builtin_candidate, add_builtin_candidates,
2049 build_user_type_conversion_1, convert_like_real, build_cxx_call,
2050 is_subseq, compare_ics): Adjust.
2051 * method.c (use_thunk): Adjust.
2052 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
2053 create_tinfo_types): Adjust.
2054 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
2055 build_up_reference, convert_to_reference, convert_from_reference,
2056 ocp_convert, build_expr_type_conversion): Adjust.
2057 * tree.c (bind_template_template_parm, error_type): Adjust.
2058 * dump.c (cp_dump_tree): Adjust.
2059 * search.c (lookup_member): Adjust.
2060 * friend.c (make_friend_class, do_friend): Adjust.
2061 * typeck2.c (store_init_value, process_init_constructor_array,
2062 process_init_constructor_record, build_x_arrow, build_m_component_ref,
2063 build_functional_cast): Adjust.
2064 * pt.c (finish_member_template_decl, process_template_parm,
2065 lookup_template_class, tsubst_function_type, tsubst,
2066 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
2068 * semantics.c (begin_class_definition, finish_base_specifier,
2069 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
2071 * name-lookup.c (constructor_name_p, push_overloaded_decl,
2072 do_class_using_decl, lookup_qualified_name,
2073 maybe_process_template_type_declaration): Adjust.
2074 * decl2.c (grok_array_decl, check_member_template,
2075 constrain_class_visibility): Adjust.
2076 * parser.c (cp_parser_class_name): Adjust.
2078 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2080 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2082 2008-03-17 Jason Merrill <jason@redhat.com>
2085 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
2086 a temp directly to a reference as per DR391.
2088 2008-03-12 Richard Guenther <rguenther@suse.de>
2092 2008-02-04 Richard Guenther <rguenther@suse.de>
2095 * decl.c (record_builtin_java_type): Make jboolean a
2096 integer type again where its mode doesn't match that of bool.
2098 2008-01-25 Richard Guenther <rguenther@suse.de>
2101 * decl.c (record_builtin_java_type): Make __java_boolean
2103 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2104 after TYPE_MAIN_VARIANT check.
2106 2008-03-10 Jakub Jelinek <jakub@redhat.com>
2109 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
2113 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
2114 DECL_P in not a variable and appears more than once error messages.
2116 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2120 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2124 * typeck.c (structural_comptypes): Call cp_comptypes.
2125 (comptypes): New; called from the C/C++ common bits to perform
2127 (cp_comptypes): Renamed from comptypes, which is already used,
2128 with a different signature, by the C++ front end.
2129 (build_reinterpret_cast_1): Call cp_comptypes.
2130 (ptr_reasonably_similar): Ditto.
2131 * decl.c (decls_match): Ditto.
2132 * cvt.c (convert_to_reference): Ditto.
2133 * cp-tree.h (same_type_p): Ditto.
2134 (same_or_base_type_p): Ditto.
2135 (comptypes): Rename to cp_comptypes.
2136 * pt.c (canonical_type_parameter): Call cp_comptypes.
2138 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
2140 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
2141 test for equivalence between pointer and references.
2143 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2146 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
2147 (check_field_decls): Likewise.
2148 (note_name_declared_in_class): Likewise.
2149 * call.c (build_new_op): Likewise.
2150 (convert_like_real): Likewise.
2151 (build_over_call): Likewise.
2152 * lex.c (unqualified_fn_lookup_error): Likewise.
2153 * parser.c (cp_parser_template_id): Likewise.
2154 * cvt.c (warn_ref_binding): Likewise.
2155 (convert_to_reference): Likewise.
2156 (ocp_convert): Likewise.
2157 (convert_to_void): Use error instead of pedwarn.
2158 * error.c (cp_cpp_error): Use pedantic_warning_kind.
2159 * decl.c (compute_array_index_type): Use constant_expression_error.
2161 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
2163 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
2164 that auto is either a storage class or a simple type specifier,
2165 depending on the dialect.
2166 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
2167 specifier in C++98 mode, error in C++0x mode (since we don't
2168 support auto as a type specifier, yet).
2169 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
2170 storage specifier in C++0x mode.
2171 (cp_parser_simple_type_specifier): Parse `auto' as a
2172 simple-type-specifier, but error because we don't support it yet.
2174 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2176 * parser.c (cp_parser_nonclass_name): New.
2177 (cp_parser_pseudo_destructor_name): Use it instead of
2178 cp_parser_type_name.
2179 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
2181 2008-02-29 Tom Tromey <tromey@redhat.com>
2183 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
2184 (cp_lexer_get_preprocessor_token): Update.
2185 (cp_lexer_set_source_position_from_token): Don't call
2186 restore_input_file_stack.
2187 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
2189 2008-02-28 Richard Guenther <rguenther@suse.de>
2192 2008-02-26 Richard Guenther <rguenther@suse.de>
2194 * decl.c (duplicate_decls): Remove decl from global mapping
2195 before ggc_freeing it.
2197 2008-02-27 Jakub Jelinek <jakub@redhat.com>
2200 * rtti.c: Include c-pragma.h.
2201 (push_abi_namespace, pop_abi_namespace): New functions.
2202 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
2203 create_tinfo_types, emit_support_tinfos): Use them.
2204 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
2206 2008-02-26 Jason Merrill <jason@redhat.com>
2209 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
2210 to name the struct for linkage purposes even if it has attributes.
2211 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
2213 2008-02-26 Tom Tromey <tromey@redhat.com>
2215 * parser.c (eof_token): Remove old location code.
2216 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
2217 * decl2.c (generate_ctor_or_dtor_function): Remove old location
2219 (cp_write_global_declarations): Likewise.
2220 * lex.c (cxx_init): Remove old location code.
2221 (handle_pragma_implementation): Remove test of
2222 USE_MAPPED_LOCATION.
2223 * pt.c (tsubst): Remove old location code.
2224 * error.c (cp_print_error_function): Remove test of
2225 USE_MAPPED_LOCATION.
2226 * decl.c (pop_label): Remove old location code.
2227 (finish_function): Likewise.
2229 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2232 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
2234 2008-02-26 Richard Guenther <rguenther@suse.de>
2236 * decl.c (duplicate_decls): Remove decl from global mapping
2237 before ggc_freeing it.
2239 2008-02-26 Paolo Carlini <pcarlini@suse.de>
2242 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
2244 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2246 * typeck.c (build_class_member_access_expr): Add appropriate
2247 OPT_W* parameter to warning.
2248 (build_reinterpret_cast_1): Likewise.
2249 * name-lookup.c (push_overloaded_decl): Likewise.
2251 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2254 * error.c (dump_expr): Handle CONJ_EXPR.
2256 2008-02-25 Paolo Carlini <pcarlini@suse.de>
2259 * error.c (dump_type): Handle FIXED_POINT_TYPE.
2260 (dump_expr): Handle FIXED_CST.
2262 2008-02-24 Jason Merrill <jason@redhat.com>
2264 * parser.c (cp_parser_declaration): Handle "inline namespace".
2265 (cp_parser_namespace_definition): Likewise.
2268 * name-lookup.c (arg_assoc_namespace): Look down into inline
2271 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2273 * typeck.c (check_for_casting_away_constness): Use 1 single
2274 argument, the type of cast, to decide what diagnostics generate.
2275 (build_static_cast_1): Remove unused code. Update call to
2276 check_for_casting_away_constness.
2277 (build_reinterpret_cast_1): Update call to
2278 check_for_casting_away_constness.
2279 (build_const_cast_1): Likewise.
2281 2008-02-24 Paolo Carlini <pcarlini@suse.de>
2283 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
2284 VEC_NEW_EXPR), forward to pp_expression.
2285 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
2287 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
2290 * friend.c (do_friend): Call cplus_decl_attributes earlier.
2292 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
2295 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
2296 template decls' function decl.
2298 2008-02-22 Paolo Carlini <pcarlini@suse.de>
2302 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2305 * pt.c (determine_specialization): In case of function templates,
2306 when the type of DECL does not match FN there is no match.
2308 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2311 * typeck.c (build_binary_op): Warn about floating point
2312 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
2314 2008-02-19 Jason Merrill <jason@redhat.com>
2317 * pt.c (resolve_overloaded_unification): Set processing_template_decl
2318 while we look for possible bindings.
2320 2008-02-19 Jakub Jelinek <jakub@redhat.com>
2323 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
2327 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
2328 vars. Afterwards ensure v is VAR_DECL.
2331 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
2332 call cp_finish_decl.
2333 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
2336 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
2341 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
2342 is error_mark_node, return an error early.
2343 (find_parameter_packs_r): Pass the pointer set along to recursive
2344 calls of cp_walk_subtrees; don't try to manage the pointer set
2346 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
2347 (make_pack_expansion): Ditto.
2348 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
2349 a second pass through the tree with find_parameter_packs_r; that
2350 second pass no longer does anything.
2351 (push_template_decl_real): If we have an erroneous declaration,
2352 set its type to error_mark_node before returning an error.
2354 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
2357 * pt.c (tsubst_initializer_list): Deal with the use of
2358 VOID_TYPE_NODE to indicate value-initialization of the bases.
2360 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2361 Jason Merrill <jason@redhat.com>
2365 * class.c (type_has_user_nondefault_constructor): New fn.
2366 * cp-tree.h: Declare it.
2367 * init.c (emit_mem_initializers): Use it for -W warning about
2368 missing base initializer.
2370 2008-02-14 Paolo Carlini <pcarlini@suse.de>
2373 * pt.c (determine_specialization): In case of function templates,
2374 when the type of DECL does not match FN there is no match.
2376 2008-02-13 Jakub Jelinek <jakub@redhat.com>
2377 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2380 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
2381 are not identifier :: ~, return before calling cp_parser_type_name.
2383 2008-02-13 Jason Merrill <jason@redhat.com>
2385 PR c++/34962, c++/34937, c++/34939
2386 * decl2.c (is_late_template_attribute): Always defer attributes
2387 vector_size and weak.
2390 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
2391 of enumerators, too.
2393 2008-02-12 Jason Merrill <jason@redhat.com>
2396 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
2397 if we're doing conversions to call a user-defined conversion function.
2399 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
2402 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
2405 2008-02-12 Jakub Jelinek <jakub@redhat.com>
2408 * init.c (build_new_1): Don't create placement_expr before
2409 constructing alloc_call. Verify that the pointer is passed by
2410 value to operator new.
2412 2008-02-11 Jason Merrill <jason@redhat.com>
2415 * pt.c (tsubst): Don't look up a template typedef in an explicit
2418 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
2421 * tree.c (cp_build_qualified_type_real): When building a
2422 cv-qualified array type, build it as a unique type with
2423 build_cplus_array_type_1 and then adopt the unqualified type's
2426 2008-02-11 Paolo Carlini <pcarlini@suse.de>
2429 * decl.c (groktypename): Check grokdeclarator return.
2431 2008-02-10 Jason Merrill <jason@redhat.com>
2434 * decl2.c (cp_write_global_declarations): Don't write out static
2435 data members with DECL_IN_AGGR_P set.
2437 2008-02-08 Jason Merrill <jason@redhat.com>
2440 * tree.c (build_target_expr_with_type): Handle void initializer.
2441 (bot_manip): Remap slot before recursing.
2443 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2446 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2448 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2451 * tree.c: Include tree-flow.h.
2452 (build_target_expr): Check type compatibility.
2453 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2454 * call.c (convert_like_real): Convert bitfield to expected type.
2456 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2460 * typeck.c (structural_comptypes): Call cp_comptypes.
2461 (comptypes): New; called from the C/C++ common bits to perform
2463 (cp_comptypes): Renamed from comptypes, which is already used,
2464 with a different signature, by the C++ front end.
2465 (build_reinterpret_cast_1): Call cp_comptypes.
2466 (ptr_reasonably_similar): Ditto.
2467 * decl.c (decls_match): Ditto.
2468 * cvt.c (convert_to_reference): Ditto.
2469 * cp-tree.h (same_type_p): Ditto.
2470 (same_or_base_type_p): Ditto.
2471 (comptypes): Rename to cp_comptypes.
2472 * pt.c (canonical_type_parameter): Call cp_comptypes.
2474 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2477 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2478 value dependent expression.
2480 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2483 * decl2.c (save_template_attributes): When we're modifying the
2484 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2485 all of the other variants to add those same attributes. Otherwise,
2486 the main variant will be inconsistent with those other variants.
2488 2008-02-04 Richard Guenther <rguenther@suse.de>
2491 * decl.c (record_builtin_java_type): Make jboolean a
2492 integer type again where its mode doesn't match that of bool.
2494 2008-02-02 Jason Merrill <jason@redhat.com>
2495 Mark Mitchell <mark@codesourcery.com>
2498 * init.c (build_value_init_1): New function.
2499 (build_value_init): New function.
2500 * typeck2.c (build_functional_cast): Call it.
2501 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2503 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2504 TYPE_HAS_CONSTRUCTOR.
2505 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2506 add_implicitly_declared_members): Adjust.
2507 (check_field_decls): Adjust. Remove warnings about reference/const
2508 in class without constructor.
2509 (check_bases_and_members): Adjust. Give those warnings here instead.
2510 * decl.c (fixup_anonymous_aggr): Adjust.
2511 (check_initializer): Adjust, clarify logic slightly.
2512 (grok_special_member_properties): Adjust, only set if user-provided.
2513 * rtti.c (create_tinfo_types): Don't set.
2514 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2515 Use same_type_ignoring_top_level_qualifiers_p.
2516 * pt.c (check_explicit_specialization): Adjust.
2517 (instantiate_class_template): Adjust.
2519 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2520 Jakub Jelinek <jakub@redhat.com>
2524 * typeck.c (structural_comptypes): Handle comparisons of
2525 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2527 * mangle.c (write_builtin_type): Map down to the canonical type,
2528 which will be one of the predefined type nodes.
2530 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2533 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2534 bits to allow for expansion of the number of middle end tree
2537 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2548 * typeck.c (check_return_expr): Tweak call to
2549 check_for_bare_parameter_packs.
2550 * class.c (add_method): Be careful with error_mark_nodes.
2551 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2553 * pt.c (struct find_parameter_pack_data): Remove
2555 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2556 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2557 (make_pack_expansion): Ditto.
2558 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2560 (process_template_parm): Tweak call to
2561 check_for_bare_parameter_packs.
2562 (push_template_decl_real): Tweak calls to
2563 check_for_bare_parameter_packs. If bare parameter packs are found
2564 in the list of exceptions, clear out that list after giving an
2566 * semantics.c (finish_cond): Tweak call to
2567 check_for_bare_parameter_packs.
2568 (finish_expr_stmt): Ditto.
2569 (finish_for_expr): Ditto.
2570 (finish_switch_cond): Ditto.
2571 (finish_mem_initializers): Ditto.
2572 (finish_member_declaration): Ditto.
2573 (finish_static_assert): Check for bare parameter packs in the
2575 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2576 attributes of a declaration.
2577 * parser.c (cp_parser_using_declaration): Tweak call to
2578 check_for_bare_parameter_packs.
2579 (cp_parser_base_clause): Ditto.
2581 2008-01-28 Jason Merrill <jason@redhat.com>
2584 * class.c (build_base_path): Fix !want_pointer case.
2586 2008-01-27 Jason Merrill <jason@redhat.com>
2589 * class.c (build_base_path): Fix previous change.
2591 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2594 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2597 2008-01-26 Richard Guenther <rguenther@suse.de>
2600 * typeck.c (build_binary_op): Remove code to shorten compares.
2602 2008-01-25 Richard Guenther <rguenther@suse.de>
2605 * decl.c (record_builtin_java_type): Make __java_boolean
2607 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2608 after TYPE_MAIN_VARIANT check.
2610 2008-01-25 Jason Merrill <jason@redhat.com>
2613 * class.c (build_base_path): Don't mess with virtual access if
2615 * call.c (standard_conversion): Don't check whether source type
2618 * decl2.c (is_late_template_attribute): Don't defer attribute
2619 visibility just because the type is dependent.
2621 2008-01-25 Jason Merrill <jason@redhat.com>
2622 Mark Mitchell <mark@codesourcery.com>
2625 * call.c (standard_conversion): Allow conversion from integer/real
2627 (compare_ics): Such a conversion is worse than a normal arithmetic
2630 2008-01-25 Richard Guenther <rguenther@suse.de>
2633 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2636 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2639 * pt.c (push_template_decl_real): Return error_mark_node in case
2640 of template definition of non-template.
2642 2008-01-24 Jason Merrill <jason@redhat.com>
2645 * decl2.c (is_late_template_attribute): Defer any attribute with
2646 dependent args. Also defer type attributes if the type is dependent.
2648 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2649 Alexandre Oliva <aoliva@redhat.com>
2652 * call.c (reference_binding): For bitfields use the declared bitfield
2654 (add_builtin_candidates): Likewise.
2655 * class.c (layout_class_type): For bitfields copy over the
2656 original type quals.
2658 2008-01-22 Jason Merrill <jason@redhat.com>
2661 * decl.c (groktypename): Also ignore attributes on dependent
2662 possibly-class types.
2665 * friend.c (do_friend): Check for prior declaration of a friend
2666 function of a local class.
2667 * name-lookup.c (lookup_name_innermost_nonclass_level):
2669 * name-lookup.h: Declare it.
2671 2008-01-22 Tom Tromey <tromey@redhat.com>
2674 * init.c (build_new_1): Only disallow Java aggregates.
2676 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2679 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2680 if decl or init is error_mark_node.
2683 * error.c (dump_expr): Handle VECTOR_CST.
2685 2008-01-21 Jason Merrill <jason@redhat.com>
2688 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2691 * pt.c (retrieve_local_specialization): Robustify.
2692 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2695 * pt.c (tsubst): Only call retrieve_local_specialization if the
2696 original typedef was in a function template.
2699 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2701 2008-01-21 Richard Guenther <rguenther@suse.de>
2704 * error.c (cp_print_error_function): Deal with recursive
2707 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2710 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2712 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2716 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2717 on non-IS_AGGR_TYPE scope.
2718 (constructor_name_p): Assert IS_AGGR_TYPE.
2720 2008-01-18 Ian Lance Taylor <iant@google.com>
2723 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2724 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2725 DECL_IS_OPERATOR_NEW flag.
2727 2008-01-16 Richard Guenther <rguenther@suse.de>
2730 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2731 for conversions to type variants.
2733 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2735 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2736 declaration and code. Update copyright year.
2738 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2741 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2742 know we have a class type.
2744 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2747 * pt.c (coerce_template_parameter_pack): When substituting into
2748 the type of a non-type template parameter pack. use the
2749 deduced/substituted arguments.
2750 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2751 can be a parameter pack with the ellipsis following it. When we
2752 have an erroneous declaration, allow it to be a parameter pack.
2753 (cp_parser_template_parameter): Complain about default
2754 arguments on non-type template parameter packs, and parse them
2755 using the new cp_parser_default_argument.
2756 (cp_parser_parameter_declaration): Complain about parameter packs
2757 with default arguments. Move parsing of default arguments into a
2758 new function, cp_parser_default_argument.
2759 (cp_parser_default_argument): New; extracted from
2760 cp_parser_parameter_declaration.
2762 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2768 * typeck.c (check_return_expr): If there are bare parameter packs
2769 in the return value, set it to error_mark_node.
2770 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2771 * pt.c (find_parameter_packs_r): Look at the type of
2772 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2773 (check_for_bare_parameter_packs): Flip the result: now returns
2774 TRUE when there were bare parameter packs, FALSE otherwise.
2775 (push_template_decl_real): Deal with flipped result of
2776 check_for_bare_parameter_packs.
2777 * semantics.c (finish_cond): If there are bare parameter packs in
2778 the conditional, set it to error_mark_node.
2779 (finish_expr_stmt): If there are bare parameter packs in the
2780 expression, set it to error_mark_node.
2781 (finish_for_expr): Ditto.
2782 (finish_switch_cond): If there are bare parameter packs in
2783 the conditional, set it to error_mark_node.
2784 (finish_mem_initializers): If there are bare parameter packs in
2785 the member initializer, set it to error_mark_node.
2786 (finish_member_declaration): Check the attributes of the
2787 declaration for bare parameter packs, and remove the attributes if
2788 any have bare parameter packs.
2789 * parser.c (cp_parser_using_declaration): Check the using
2790 declaration for bare parameter packs.
2791 (cp_parser_base_clause): If there are bare parameter packs in a
2792 base specifier, don't add it to the chain.
2794 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2797 * error.c (dump_simple_decl): Display ellipsis for template
2798 non-type parameter packs.
2799 (dump_decl): Display ellipsis for template type parameter packs.
2800 (dump_template_decl): Display ellipsis for template template
2802 * pt.c (redeclare_class_template): When redeclaring a class
2803 template, check for collisions between template parameters and
2804 template parameter packs.
2806 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2809 * pt.c (process_partial_specialization): Don't mark template
2810 parameters that occur in non-deduced contexts.
2811 (struct pair_fn_data): Add include_nondeduced_p.
2812 (for_each_template_parm_r): Only visit non-deduced contexts if
2813 include_nondeduced_p is set.
2814 (for_each_template_parm): Added parameter include_nondeduced_p,
2815 which states whether template parameters found in non-deduced
2816 contexts should be visited.
2817 (uses_template_parms): Visit all template parameters, even those
2818 in non-deduced contexts.
2820 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2823 * pt.c (check_default_tmpl_args): Check for parameter packs that
2824 aren't at the end of a primary template.
2825 (push_template_decl_real): Remove check for parameter packs that
2826 aren't at the end of a primary template; that now happens in
2827 check_default_tmpl_args.
2828 * semantics.c (finish_template_template_parm): Use
2829 check_default_tmpl_args to check for errors in the template
2832 2008-01-12 Doug Kwan <dougkwan@google.com>
2834 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2835 instead of OPT_Wreturn_type in warning due to ignored return type
2837 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2838 instead of OPT_Wreturn_type in warning due to ignored return type
2841 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2844 * semantics.c (finish_omp_for): Don't call
2845 fold_build_cleanup_point_expr if processing_template_decl.
2847 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2848 Jakub Jelinek <jakub@redhat.com>
2851 * error.c (dump_template_argument): Deal with TREE_LIST.
2853 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2855 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2856 long" in C++0x mode; change the warning to note that "long long"
2857 is only unsupported in C++98 mode.
2859 2007-12-20 Jason Merrill <jason@redhat.com>
2862 * call.c (standard_conversion): Derived-to-base is considered a
2863 standard conversion.
2865 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2868 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2869 call cp_parser_statement rather than
2870 cp_parser_already_scoped_statement.
2872 2007-12-18 Jason Merrill <jason@redhat.com>
2875 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2877 (dependent_type_p_r): Handle the domain of an array.
2879 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2880 Jakub Jelinek <jakub@redhat.com>
2885 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2886 bindings of template template parameters after all template
2887 arguments have been deduced.
2888 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2890 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2891 (unify): Deal with variadic, bound template template parameters.
2892 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2894 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2897 * decl.c (grokdeclarator): Reject friend sfk_constructor
2900 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2903 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2906 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2909 * cp-lang.c (cp_classify_record): New.
2910 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2912 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2915 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2918 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2919 dynamic_cast in a template.
2921 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2924 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2925 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2927 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2930 * error.c (dump_type_prefix, dump_type_suffix): Handle
2931 TYPE_PACK_EXPANSION.
2934 * error.c (dump_expr): Handle ABS_EXPR.
2936 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2940 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2941 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2942 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2943 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2944 flag_use_repository and repo_emit_p returned 2.
2946 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2949 * tree.c (stabilize_call, stabilize_init): Do nothing if
2950 processing_template_decl.
2952 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2955 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2956 error instead of assertion failure.
2957 * parser.c (cp_parser_decltype): If closing paren is not found,
2958 return error_mark_node.
2960 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2963 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2965 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2966 since arg_assoc_template_arg will deal with them (better).
2968 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2971 * pt.c (tsubst_exception_specification): Handle substitutions into
2972 member templates, where tsubst_pack_expansion returns a
2973 TYPE_PACK_EXPANSION.
2975 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2978 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2979 bindings for the template parameter pack, don't try to keep the
2980 empty deduced arguments.
2981 (unify): If a parameter is a template-id whose template argument
2982 list contains a pack expansion that is not at the end, then we
2983 cannot unify against that template-id.
2985 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2988 * pt.c (current_template_args): Use error_operand_p.
2990 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2993 * error.c (dump_decl): Handle TREE_BINFO.
2995 2007-12-01 Ollie Wild <aaw@google.com>
2998 * typeck.c (build_binary_op): Add conversion of pointers to function
2999 members appearing as operands to the equality operators.
3001 2007-11-30 Jakub Jelinek <jakub@redhat.com>
3004 * error.c (dump_expr): Handle OBJ_TYPE_REF.
3006 2007-11-29 Jakub Jelinek <jakub@redhat.com>
3009 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
3011 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
3016 * parser.c (cp_parser_decltype): Don't call finish_id_expression
3018 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
3021 2007-11-27 Jakub Jelinek <jakub@redhat.com>
3023 PR tree-optimization/34181
3024 * method.c (use_thunk): Don't inline the call in the thunk.
3027 * tree.c (decl_linkage): Static data members and static member
3028 functions in anonymous ns classes are lk_external.
3030 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
3033 * decl.c (start_preparsed_function): Pass
3034 processing_template_decl for the new allocate_struct_function
3037 2007-11-25 Richard Guenther <rguenther@suse.de>
3039 * decl.c (poplevel): Use BLOCK_CHAIN.
3041 2007-11-24 Ollie Wild <aaw@google.com>
3043 * typeck.c (delta_from_ptrmemfunc): New function.
3044 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
3045 (build_binary_op): Call delta_from_ptrmemfunc.
3047 2007-11-23 Jakub Jelinek <jakub@redhat.com>
3051 * decl.c (cp_finish_decl): Disallow variable or field
3052 definitions if extern "Java" aggregates.
3053 (grokparms): Disallow parameters with extern "Java"
3055 (check_function_type): Disallow function return values
3056 with extern "Java" aggregates.
3057 * init.c (build_new_1): Disallow placement new with
3058 extern "Java" aggregates.
3060 2007-11-23 Mark Mitchell <mark@codesourcery.com>
3061 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3064 * call.c (convert_like_real): Build a zero constant when __null is
3065 converted to an integer type.
3067 2007-11-22 Jakub Jelinek <jakub@redhat.com>
3070 * decl2.c (cp_write_global_declarations): Issue error about static
3071 data members in anonymous namespace which are declared and used,
3074 2007-11-20 Jakub Jelinek <jakub@redhat.com>
3077 * parser.c (cp_parser_class_head): Reject function template ids.
3080 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
3081 when processing_template_decl to build_array_type.
3084 * pt.c (more_specialized_fn): Don't segfault if one or
3085 both argument list end with ellipsis.
3087 2007-11-18 Jakub Jelinek <jakub@redhat.com>
3090 * semantics.c (finish_call_expr): Set
3091 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
3092 or OVERLOAD with all noreturn functions.
3094 2007-11-16 Jakub Jelinek <jakub@redhat.com>
3097 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
3100 2007-11-13 Jakub Jelinek <jakub@redhat.com>
3107 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
3108 set to error_mark_node the outermost POINTER_TYPE to the pack if
3109 it is seen in a POINTER_TYPE.
3110 (push_template_decl_real): If check_for_bare_parameter_packs
3111 fails for function return type, set the return type to
3112 integer_type_node. If check_for_bare_parameter_packs failed
3113 for non-function, return error_mark_node.
3116 * call.c (build_new_op): Call resolve_args before calling
3119 2007-11-11 Tom Tromey <tromey@redhat.com>
3122 * lex.c (handle_pragma_implementation): Use cpp_included_before.
3124 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3127 * pt.c (redeclare_class_template): Update error message. Use a
3128 note to show the previous declaration.
3129 (tsubst_friend_class): Use the location of the friend template as
3130 the input location before calling redeclare_class_template.
3132 2007-11-11 Jakub Jelinek <jakub@redhat.com>
3135 * semantics.c (finish_pseudo_destructor_expr): Handle
3136 object == error_mark_node.
3138 2007-11-10 Jakub Jelinek <jakub@redhat.com>
3141 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
3142 is not scalar type, let finish_class_member_access_expr handle
3143 diagnostics. Pass BIT_NOT_EXPR argument to
3144 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
3146 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
3149 * decl.c (cp_complete_array_type): If any of the initializer
3150 elements are pack expansions, don't compute the array size yet.
3152 2007-11-08 Andrew Pinski <pinskia@gmail.com>
3155 * tree.c (decl_linkage): Fields have no linkage.
3157 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
3159 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
3161 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
3166 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
3167 Be careful with ERROR_MARK_NODEs.
3168 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
3171 2007-11-07 Jakub Jelinek <jakub@redhat.com>
3174 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
3177 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3181 * tree.c (c_build_qualified_type): Define bridge to
3182 cp_build_qualified_type.
3184 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
3195 * typeck.c (check_return_expr): Pass address of retval to
3196 check_for_bare_parameter_packs.
3197 * class.c (build_base_field): Tolerate bases that have no layout
3199 (end_of_base): Ditto.
3200 * tree.c (canonical_type_variant): Be careful with
3202 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
3204 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
3205 which states whether parameter packs should be replaced with
3207 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
3208 possible. If set_packs_to_error is set true, replace the parameter
3209 pack with ERROR_MARK_NODE. Manage our own pointer sets.
3210 (uses_parameter_packs): Don't set parameter packs to
3212 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
3213 which may be modified (if it is a parameter pack). Instructs
3214 find_parameter_packs_r to replace parameter packs with
3215 ERROR_MARK_NODE (so that they won't cause errors later on).
3216 (process_template_parm): Pass pointer to
3217 check_for_bare_parameter_packs.
3218 (process_partial_specialization): Replace pack expansions before
3219 the end of the template argument list with ERROR_MARK_NODE.
3220 (push_template_decl_real): Pass pointer to
3221 check_for_bare_parameter_packs. Replace parameter packs not at the
3222 end of the template parameter list with ERROR_MARK_NODE.
3223 (convert_template_argument): Be more careful about using DECL_NAME
3224 on only declarations.
3225 (unify): Can't unify against ERROR_MARK_NODE.
3226 * semantics.c (finish_cond): Pass pointer to
3227 check_for_bare_parameter_packs.
3228 (finish_expr_stmt): Ditto.
3229 (finish_for_expr): Ditto.
3230 (finish_switch_cond): Pass pointer to
3231 check_for_bare_parameter_packs, and call it before we put the
3232 condition into the statement.
3233 (finish_mem_initializers): Pass pointer to
3234 check_for_bare_parameter_packs.
3235 (finish_member_declaration): Ditto.
3236 * parser.c (cp_parser_base_clause): Ditto.
3238 2007-11-06 Jakub Jelinek <jakub@redhat.com>
3241 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
3242 with the final TREE_READONLY flag in place. processing_template_decl
3243 is known to be 0 in this part of function.
3246 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
3247 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
3248 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
3249 * semantics.c (finish_omp_atomic): Revert most of the
3250 2007-02-05 changes, just keep the new representation of
3251 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
3253 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
3256 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
3259 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3264 * typeck.c (merge_types): Don't lose rvalue references when
3266 * call.c (build_over_call): Don't elide move constructors just
3267 because the copy constructor is trivial (!).
3268 (compare_ics): If comparing cv-qualifiers fails, we can still order
3269 based on binding lvalues vs. rvalues.
3271 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
3274 * pt.c (unify_pack_expansion): bring handling of function call
3275 arguments into line with type_unification_real.
3277 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3279 * typeck.c (build_binary_op): Use pedwarn instead of error for
3282 2007-11-05 Jakub Jelinek <jakub@redhat.com>
3285 * parser.c (cp_parser_unary_expression): For &&label call
3286 cp_parser_non_integral_constant_expression and return error_mark_node
3287 if it returned true.
3290 * decl.c (grokdeclarator): Don't call build_memfn_type if type
3291 is neither FUNCTION_TYPE nor METHOD_TYPE.
3293 2007-11-02 Jakub Jelinek <jakub@redhat.com>
3296 * parser.c (cp_parser_nested_name_specifier_opt): Use
3297 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
3298 typedef of currently open class.
3300 2007-11-02 Paolo Carlini <pcarlini@suse.de>
3303 * error.c (dump_expr): Deal specially with statements.
3305 2007-11-01 Jason Merrill <jason@redhat.com>
3308 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
3310 (lookup_template_class): Use it to get the outer template args
3311 for instantiating one.
3314 * pt.c (reduce_template_parm_level): tsubst the parameters
3315 of a template template parm.
3317 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
3320 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
3322 2007-11-01 Jakub Jelinek <jakub@redhat.com>
3325 * parser.c (cp_parser_postfix_dot_deref_expression): If
3326 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
3327 first and if that succeeds and type is SCALAR_TYPE_P, create
3331 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
3332 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
3333 as for std::type_info.
3335 2007-10-31 Paolo Carlini <pcarlini@suse.de>
3338 * cxx-pretty-print.c (pp_cxx_typeid_expression,
3339 pp_cxx_delete_expression): Change to static linkage.
3340 * cxx-pretty-print.h: Adjust declarations.
3341 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
3342 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
3343 MODOP_EXPR): Forward to pp_expression.
3345 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
3348 2007-10-31 Christian Bruel <christian.bruel@st.com>
3349 Mark Mitchell <mark@codesourcery.com>
3352 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
3353 if retval is volatile.
3355 2007-10-30 Jakub Jelinek <jakub@redhat.com>
3358 * decl2.c (build_offset_ref_call_from_tree): Call
3359 build_non_dependent_expr on object prior to building ADDR_EXPR from it
3360 if FN is DOTSTAR_EXPR.
3362 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
3366 * pt.c (find_parameter_packs_r): Fix typo in comment.
3367 (convert_template_argument): Look at the pattern of a pack
3368 expansion to determine what kind of entity we're converting.
3369 (coerce_template_parameter_pack): When we have coerced a non-type
3370 template parameter pack, substitute into the type of that pack.
3371 (tsubst_pack_expansion): When our substitution of a parameter pack
3372 is a "trivial" substitution of itself, just substitute into the
3373 pack expansion rather than actually expanding.
3375 2007-10-29 Jakub Jelinek <jakub@redhat.com>
3378 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
3379 for non-integral type bitfields. Return true if bitfield is correct, false
3380 error has been diagnosed.
3381 (check_field_decls): If check_bitfield_decl returned false, call also
3384 2007-10-28 Paolo Carlini <pcarlini@suse.de>
3385 Mark Mitchell <mark@codesourcery.com>
3388 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
3389 class member error out and return.
3391 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3393 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
3394 to current_function_decl rather than 0.
3397 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
3399 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
3401 2007-10-27 Jason Merrill <jason@redhat.com>
3404 * call.c (convert_default_arg): Detect recursion.
3406 2007-10-27 Jakub Jelinek <jakub@redhat.com>
3409 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
3410 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
3412 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
3414 * error.c (dump_expr): Handle OFFSETOF_EXPR.
3416 2007-10-26 Jason Merrill <jason@redhat.com>
3419 * pt.c (get_template_info): New fn.
3420 (template_class_depth): Use it.
3421 (push_template_decl_real): Check that the template args of the
3422 definition match the args of the previous declaration.
3424 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3427 * decl2.c (coerce_new_type): Do not allow a default argument for
3428 the first parameter.
3430 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3433 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3434 don't see the leading '('. Only lookup names if we get an
3437 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3440 * parser.c (cp_parser_parenthesized_expression_list): Set
3441 greater_than_is_operator_p to true in between the parens.
3443 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3446 * decl.c (grokdeclarator): In case of conflicting specifiers
3447 just return error_mark_node.
3449 2007-10-26 Ollie Wild <aaw@google.com>
3451 * expr.c (cxx_expand_expr): Removed.
3452 * cp-tree.h (exx_expand_expr): Removed.
3453 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3456 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3459 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3461 2007-10-23 Jason Merrill <jason@redhat.com>
3463 PR c++/25950 (DR 391)
3464 * call.c (struct conversion): Remove check_copy_constructor_p.
3465 (reference_binding): Always bind a reference directly to a
3466 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3468 (check_constructor_callable): Remove.
3469 (convert_like_real): Don't call it.
3470 (initialize_reference): Don't call check_constructor_callable.
3471 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3472 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3473 conversions if LOOKUP_NO_TEMP_BIND.
3474 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3475 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3477 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3479 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3482 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3483 before checking if its type is integral.
3485 2007-10-22 Jason Merrill <jason@redhat.com>
3488 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3489 * pt.c (apply_late_template_attributes): Splice out dependent
3490 attributes from DECL_ATTRIBUTES.
3492 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3494 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3496 * typeck.c (build_binary_op) : Use appropriate warning option
3497 instead of unnamed warning.
3499 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3502 * pt.c (current_template_args): Do not change TREE_LIST elements
3503 with a TREE_VALUE of error_mark_node.
3505 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3507 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3508 * decl.c (start_decl): Tidy.
3509 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3511 (grokdeclarator): Clarify comment.
3513 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3516 * decl.c (grokfndecl): Return NULL after the "definition of
3517 implicitly-declared" error happened.
3519 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3522 * call.c (build_user_type_conversion_1): Do not consider conversion
3523 functions to convert a (possibly cv-qualified) object to the (possibly
3524 cv-qualified) same object type (or a reference to it), to a (possibly
3525 cv-qualified) base class of that type (or a reference to it).
3527 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3529 * pt.c (tsubst): Use template_parm_level_and_index.
3531 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3534 * parser.c (cp_parser_compound_statement): Handle label-declarations
3535 at the beginning of the compound statement.
3536 (cp_parser_block_declaration): Issue diagnostics about __label__
3537 not at the beginning of a block.
3539 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3542 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3543 to convert_template_argument.
3544 (coerce_template_parms): Return error_mark_node after fixed-length
3546 (tsubst_decl): Check for error_mark_node the return value of the
3547 first tsubst in 'case VAR_DECL'.
3549 2007-10-08 Ollie Wild <aaw@google.com>
3551 * typeck2.c (digest_init): Call cplus_expand_constant after
3552 convert_for_initialization.
3553 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3554 * expr.c (cplus_expand_constant): Updated function description.
3556 2007-10-04 Jason Merrill <jason@redhat.com>
3559 * call.c (initialize_reference): Handle local static reference
3562 2007-10-03 Jason Merrill <jason@redhat.com>
3565 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3566 (push_namespace): Here.
3567 (handle_namespace_attrs): New fn for the attr code.
3568 (leave_scope): Don't pop_visibility.
3569 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3570 * parser.c (cp_parser_namespace_definition): Call
3571 handle_namespace_attrs and pop_visibility as appropriate.
3574 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3576 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3578 * decl.c (duplicate_decls): Preserve linkage flags for mere
3579 redeclarations of gnu_inline definitions.
3581 2007-10-03 Jason Merrill <jason@redhat.com>
3584 * decl.c (wrap_cleanups_r): New fn.
3585 (wrap_temporary_cleanups): New fn.
3586 (initialize_local_var): Call it.
3588 2007-09-29 Jason Merrill <jason@redhat.com>
3591 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3592 constant to not have DECL_EXTERNAL if it's file-local.
3594 2007-09-28 Ollie Wild <aaw@google.com>
3597 2007-09-27 Ollie Wild <aaw@google.com>
3599 * typeck2.c (digest_init): Call cplus_expand_constant after
3600 convert_for_initialization.
3601 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3602 * expr.c (cplus_expand_constant): Updated function description.
3604 2007-09-28 Jason Merrill <jason@redhat.com>
3607 * class.c (layout_empty_base): Take rli parameter, update
3608 rli->record_align if empty base has user-specified alignment.
3609 (build_base_field): Pass rli to it.
3611 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3614 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3616 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3619 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3620 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3621 (dump_parameters): Just call dump_type for argument packs too.
3623 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3626 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3627 qualification by creating qualified PACK_EXPANSION_PATTERN and
3628 then calling make_pack_expansion on it.
3630 2007-09-27 Ollie Wild <aaw@google.com>
3632 * typeck2.c (digest_init): Call cplus_expand_constant after
3633 convert_for_initialization.
3634 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3635 * expr.c (cplus_expand_constant): Updated function description.
3637 2007-09-27 Jason Merrill <jason@redhat.com>
3640 * decl2.c (is_late_template_attribute): Don't crash on unknown
3643 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3646 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3647 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3648 spaces in the formatting.
3649 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3651 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3653 * error.c (cxx_print_error_function): Add third argument, pass
3654 it over to lhd_print_error_function.
3655 (cp_print_error_function): If diagnostic->abstract_origin, print
3657 * cp-tree.h (struct diagnostic_info): New forward decl.
3658 (cxx_print_error_function): Add third argument.
3660 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3663 * name-lookup.c (pushtag): Do not create an implicit typedef before
3664 the associated type declaration is known to be valid.
3666 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3668 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3669 rather than pointers.
3671 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3674 * search.c (check_final_overrider): Fail if
3675 targetm.comp_type_attributes returns 0.
3677 2007-09-24 Jason Merrill <jason@redhat.com>
3680 * pt.c (resolve_typename_type): Don't look things up in the original
3681 template if it would mean losing template arguments.
3683 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3686 * cp-tree.h (cxx_type_hash_eq): New prototype.
3687 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3688 * tree.c (cxx_type_hash_eq): New function.
3690 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3693 * tree.c (cp_build_qualified_type_real): Build a canonical
3694 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3696 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3700 * tree.c (cplus_array_compare): Compare pointers, not types.
3701 (build_cplus_array_type_1): Store new array type into the hash
3702 table before building the canonical type; build the canonical type
3704 (cp_build_qualified_type_real): Put all of the array types with
3705 cv-qualified element types into the C++ array hash table, built as
3706 variants of the unqualified versions.
3708 2007-09-23 Jason Merrill <jason@redhat.com>
3711 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3712 for deprecation warnings.
3714 2007-09-22 Jason Merrill <jason@redhat.com>
3717 * call.c (build_over_call): Warn about deprecated virtuals.
3720 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3721 (MAYBE_TAGGED_TYPE_P): Remove.
3722 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3723 instead of calling is_late_template_attribute again.
3724 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3725 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3726 Don't crash on typedefs from non-template classes.
3727 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3728 (is_late_template_attribute): All attributes applied to template
3729 parms or typename types are dependent. Static.
3730 (splice_template_attributes): Pass decl through.
3731 (save_template_attributes): Likewise.
3733 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3736 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3737 returned from tsubst_pack_expansion.
3738 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3739 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3741 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3744 * semantics.c (finish_id_expression): Use consistently
3745 context_for_name_lookup.
3746 * decl.c (fixup_anonymous_aggr): Fix error message for
3747 anonymous struct (vs union).
3749 2007-09-19 Jason Merrill <jason@redhat.com>
3752 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3753 (retrieve_specialization): Only tagged types use
3754 DECL_TEMPLATE_INSTANTIATIONS.
3755 (instantiate_class_template): Push nested classes too.
3756 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3758 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3759 * init.c (is_aggr_type): Remove redundant tests.
3760 * class.c (push_nested_class): Use CLASS_TYPE_P.
3762 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3765 * init.c (build_zero_init): If, recursively, build_zero_init
3766 returns a NULL_TREE, do not append it to the VEC of constructors.
3768 2007-09-18 Jason Merrill <jason@redhat.com>
3771 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3772 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3773 ATTR_FLAG_TYPE_IN_PLACE.
3774 (tsubst): Do unqualified lookup to find typedefs from current class.
3775 [ARRAY_TYPE]: Propagate alignment info.
3776 * decl2.c (is_late_template_attribute): Only defer handling of
3777 attribute aligned if the expression is dependent.
3778 (save_template_attributes): If we're deferring any attributes,
3779 make this a naming typedef.
3781 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3783 PR c++/33462 (again)
3784 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3785 va_arg instead of __builtin_va_arg.
3787 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3790 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3791 (pp_cxx_primary_expression): Use it.
3792 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3793 * error.c (dump_expr): Use it.
3795 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3798 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3799 out case TYPEID_EXPR to...
3800 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3801 and pp_cxx_right_paren.
3802 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3803 * error.c (dump_expr): Use it.
3805 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3808 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3809 (pp_cxx_primary_expression): Use it.
3810 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3811 * error.c (dump_expr): Use it.
3813 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3816 * init.c (build_new): Remove warning for zero-element
3819 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3822 * call.c (maybe_handle_implicit_object): Set this_p, clear
3823 rvaluedness_matches_p.
3824 (compare_ics): Do not compare rvaluedness matching when one of the
3825 operands is an implicit object.
3827 2007-09-14 Jason Merrill <jason@redhat.com>
3829 PR c++/17743, c++/19163
3830 * decl2.c (is_late_template_attribute): New fn.
3831 (splice_template_attributes, save_template_attributes): New fns.
3832 (cplus_decl_attributes): Call save_template_attributes.
3833 * pt.c (apply_late_template_attributes): New fn.
3834 (instantiate_class_template, tsubst_decl): Use it.
3835 * cp-tree.h: Declare is_late_template_attribute.
3837 2007-09-13 Tom Tromey <tromey@redhat.com>
3839 * parser.c (cp_lexer_new_main): Don't use
3840 c_lex_return_raw_strings.
3841 (cp_lexer_get_preprocessor_token): Update. Add special case when
3844 2007-09-11 Jan Hubicka <jh@suse.cz>
3846 * method.c (use_thunk): Use tree_rest_of_compilation
3847 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3848 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3849 * cp-tree.h (expand_body): Kill.
3850 (emit_associated_thunks): Declare.
3851 * semantics.c (emit_associated_thunks): Export.
3852 (expand_body): Kill.
3854 2007-09-09 David Daney <ddaney@avtrex.com>
3857 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3858 to calculate cookie_ptr.
3860 2007-09-08 Jason Merrill <jason@redhat.com>
3863 * pt.c (most_specialized_class): Set processing_template_decl
3864 while tsubsting partial spec args.
3866 2007-09-06 Jason Merrill <jason@redhat.com>
3868 * decl2.c (get_guard): Copy visibility from the guarded variable.
3870 2007-09-06 Jan Hubicka <jh@suse.cz>
3872 * semantics.c (expand_body): Do not mark arguments of clones used.
3874 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3877 * decl.c (cp_finish_decl): When processing_template_decl,
3878 deal correctly with init as TREE_LIST.
3880 2007-09-06 Tom Tromey <tromey@redhat.com>
3882 * decl.c (finish_function): Put return's location on line zero of
3885 2007-09-05 Jason Merrill <jason@redhat.com>
3888 * except.c (prepare_eh_type): Use type_decays_to.
3891 * init.c (build_delete): Use build_headof to get the address of the
3892 complete object if we aren't using the deleting destructor.
3893 * rtti.c (build_headof): No longer static.
3894 * cp-tree.h: Declare it.
3896 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3898 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3899 decl if a prototype for XX is provided with throw().
3902 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3903 on __*_chk non-__builtin_* decls.
3905 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3908 * semantics.c (finish_id_expression): Use context_for_name_lookup
3909 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3910 * class.c (finish_struct_anon): Deal correctly with anonymous
3911 structs (vs unions, as GNU extension) in error messages.
3913 2007-09-05 Jan Hubicka <jh@suse.cz>
3915 * sematics.c (expand_body): Remove unnecesary import_export_decl
3916 call, DECL_EXTERNAL checks and current_function_decl saving.
3918 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3920 PR c++/29731 (again)
3921 * parser.c (cp_parser_primary_expression): Return error_mark_node
3922 when a statement-expression is found in a template-argument list.
3924 2007-09-04 Jason Merrill <jason@redhat.com>
3926 * except.c (initialize_handler_parm): Use
3927 fold_build_cleanup_point_expr.
3930 * call.c (reference_binding): Don't look for user-defined conversions
3934 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3935 the MUST_NOT_THROW_EXPR.
3937 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3939 * decl.c (cp_finish_decl): Call determine_visibility before
3940 make_rtl_for_nonlocal_decl.
3942 2007-09-04 Jason Merrill <jason@redhat.com>
3945 * pt.c (most_specialized_class): Substitute outer template
3946 arguments into the arguments of a member template partial
3948 (strip_innermost_template_args): New fn.
3950 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3952 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3954 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3956 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3957 * decl.c (cp_make_fname_decl): Likewise,
3958 * parser.c (cp_parser_string_literal): Likewise,
3959 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3960 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3963 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3966 * typeck.c (build_unary_op): Fix error message for
3967 Boolean expression as operand to operator--.
3969 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3971 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3972 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3975 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3978 * init.c (build_default_init): Make extern.
3979 * cp-tree.h (build_default_init): Declare here.
3980 * pt.c (tsubst_expr): When the instantiation of the initializer of
3981 a variable results in an empty list, default-initialize the
3983 (tsubst_copy_and_build): When the instantiation of the initializer
3984 in a new expression results in an empty initializer list,
3985 default-initialize it.
3987 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3989 * mangle.c (write_type): Change mangling of rvalue reference from
3992 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3994 * decl.c (duplicate_decls): Remove duplicated line.
3996 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3999 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
4000 BOUND_TEMPLATE_TEMPLATE_PARM.
4002 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4005 * search.c (lookup_member): Check the name argument for
4008 2007-08-31 Paolo Carlini <pcarlini@suse.de>
4011 * parser.c (cp_parser_trait_expr): Check rerurn value of
4014 2007-08-30 Ollie Wild <aaw@google.com>
4016 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
4017 convert_ptrmem for pointer to member conversions.
4018 (convert_to_pointer_force): Update cp_convert_to_pointer call.
4019 (ocp_convert): Update cp_convert_to_pointer call.
4020 * typeck.c (convert_ptrmem): Add conditional for null pointers to
4022 (build_static_cast_1): Check can_convert for conversions in either
4024 (get_delta_difference_1): New function.
4025 (get_delta_difference): Refactor to call get_delta_difference_1.
4027 2007-08-30 Jakub Jelinek <jakub@redhat.com>
4029 * decl.c (start_preparsed_function): Set
4030 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
4032 2007-08-28 Paolo Carlini <pcarlini@suse.de>
4035 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
4036 BOUND_TEMPLATE_TEMPLATE_PARM.
4038 2007-08-28 Jakub Jelinek <jakub@redhat.com>
4042 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
4043 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
4045 2007-08-27 Jason Merrill <jason@redhat.com>
4048 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
4049 Look inside STMT_EXPR.
4050 * semantics.c (stmt_expr_value_expr): New fn.
4051 * cp-tree.h: Declare it.
4054 * decl.c (groktypename): Ignore attributes applied to class type.
4056 2007-08-28 Richard Guenther <rguenther@suse.de>
4058 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
4060 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
4062 * error.c (dump_expr): Handle COMPLEX_CST.
4063 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
4064 (pp_cxx_expression): Likewise.
4066 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
4068 * decl.c (GNU_INLINE_P): New.
4069 (duplicate_decls): Handle gnu_inline. Merge attributes and
4070 some flags in overriding definitions.
4071 (redeclaration_error_message): Handle gnu_inline.
4072 (start_preparsed_function): Likewise.
4074 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4076 * call.c (sufficient_parms_p): Constify.
4077 * class.c (same_signature_p): Likewise.
4078 * cp-gimplify.c (is_invisiref_parm,
4079 cxx_omp_privatize_by_reference): Likewise.
4080 * cp-objcp-common.c (has_c_linkage): Likewise.
4081 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
4082 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
4083 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
4084 num_artificial_parms_for, comp_template_parms,
4085 template_parameter_pack_p, any_dependent_template_arguments_p,
4086 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4087 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
4088 zero_init_p, member_p, cp_lvalue_kind,
4089 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4090 varargs_function_p, is_dummy_object, special_function_kind,
4091 string_conv_p, type_unknown_p, comp_except_specs, compparms,
4092 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
4093 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
4094 cp_has_mutable_p, at_least_as_qualified_p,
4095 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
4096 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
4097 * except.c (nothrow_libfn_p): Likewise.
4098 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
4100 * pt.c (comp_template_parms, template_parameter_pack_p,
4101 any_type_dependent_arguments_p, any_value_dependent_elements_p,
4102 any_dependent_template_arguments_p): Likewise.
4103 * repo.c (repo_export_class_p): Likewise.
4104 * semantics.c (anon_aggr_type_p): Likewise.
4105 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
4106 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
4107 varargs_function_p, member_p, is_dummy_object, pod_type_p,
4108 zero_init_p, special_function_p): Likewise.
4109 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
4110 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
4111 compparms, invalid_nonstatic_memfn_p,
4112 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
4113 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
4114 cp_has_mutable_p, lvalue_or_else): Likewise.
4116 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
4118 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
4119 * cp-objcp-common.c (cp_tree_size): Ditto.
4120 * tree.c (cp_walk_subtrees): Ditto
4121 * cp-tree.def (TINST_LEVEL): Go away.
4122 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
4123 move together with other non-tree structs.
4124 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
4125 (union lang_tree_node): Eliminate tinst_level field.
4126 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
4127 (current_instantiation, outermost_tinst_level): Return
4128 a "struct tinst_level *".
4130 * error.c (print_instantiation_partial_context): Change second
4131 parameter to a "struct tinst_level *". Replace accessor macros
4133 (print_instantiation_full_context): Likewise.
4134 * lex.c (in_main_input_context): Likewise.
4136 * pt.c (struct pending_templates): New.
4137 (pending_templates, last_pending_template): Use it as a type.
4138 (current_tinst_level): Change typo to "struct tinst_level *"
4139 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
4140 (add_pending_template): Construct a "struct pending_template".
4141 Replace TINST_LEVEL accessor macros with field access.
4142 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
4143 (pop_tinst_level): Likewise.
4144 (instantiate_pending_templates): Likewise. Factor common code used
4145 when an instantiation has been done.
4146 (outermost_tinst_level): Replace tree_last with loop.
4147 (current_instantiation): Return a "struct tinst_level *".
4149 2007-08-24 Ollie Wild <aaw@google.com>
4151 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
4152 * name-lookup.h (cp_binding_level): Remove vtables member.
4154 2007-08-24 Richard Guenther <rguenther@suse.de>
4156 * tree.c (cp_cannot_inline_tree_fn): Remove.
4157 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
4158 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
4161 2007-08-24 Jakub Jelinek <jakub@redhat.com>
4164 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
4165 error_mark_node right away if build_expr_type_conversion
4169 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
4170 is error_mark_node rather than NULL_TREE.
4171 * pt.c (check_explicit_specialization): Likewise.
4174 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
4175 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
4177 2007-08-22 Jason Merrill <jason@redhat.com>
4180 * pt.c (outermost_tinst_level): New function.
4181 * lex.c (in_main_input_context): New function.
4182 * cp-tree.h: Declare it.
4183 * decl2.c (constrain_class_visibility): Use it to avoid warning
4184 about uses of the anonymous namespace in the main input file.
4186 2007-08-21 Jakub Jelinek <jakub@redhat.com>
4188 * init.c (build_new_1): Use get_target_expr instead of save_expr.
4190 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
4193 * class.c (finish_struct_1): Warn when a class has virtual
4194 functions and accessible non-virtual destructor.
4196 2007-08-20 Richard Guenther <rguenther@suse.de>
4200 * call.c (build_new_method_call): Convert initializer to
4202 * init.c (build_aggr_init): Do not fiddle with types.
4203 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
4204 * except.c (build_throw): Do not drop qualifiers for the
4206 * typeck.c (get_member_function_from_ptrfunc): Do not
4207 fiddle with types, instead convert.
4208 (build_ptrmemfunc1): Convert to the target type for
4210 (gfc_trans_allocate): Convert result to target type.
4211 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
4212 pointer-to-member structures shall have alias set zero as well.
4214 2007-08-20 Richard Guenther <rguenther@suse.de>
4216 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
4218 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
4219 (nonstatic_local_decl_p): Likewise.
4220 * tree.c (cp_auto_var_in_fn_p): Remove.
4221 * decl.c (nonstatic_local_decl_p): Remove.
4223 2007-08-20 Richard Guenther <rguenther@suse.de>
4225 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
4227 * tree.h (cp_walk_tree): New define to walk_tree_1 with
4228 cp_walk_subtrees lh parameter.
4229 (cp_walk_tree_without_duplicates): New define to
4230 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
4231 * tree.c (count_trees): Call
4232 cp_walk_tree_without_duplicates.
4233 (verify_stmt_tree): Call cp_walk_tree.
4234 (break_out_target_exprs): Likewise.
4235 (WALK_SUBTREE): Likewise.
4236 * cp-gimplify.c (cp_genericize): Likewise.
4237 * cp-pt.c (find_parameter_packs_r): Likewise.
4238 (uses_parameter_packs): Likewise.
4239 (make_pack_expansion): Likewise.
4240 (check_for_bare_parameter_packs): Likewise.
4241 (for_each_template_parm): Likewise.
4242 * decl.c (check_default_argument): Call
4243 cp_walk_tree_without_duplicates.
4244 * except.c (build_throw): Likewise.
4245 * decl2.c (type_visibility): Likewise.
4246 * semantics.c (expand_or_defer_fn): Likewise.
4247 (finalize_nrv): Call cp_walk_tree.
4249 2007-08-20 Jakub Jelinek <jakub@redhat.com>
4252 * init.c (build_new_1): Rename placement_var variable to placement_expr.
4253 Initialize it with save_expr rather than get_temp_regvar.
4255 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
4258 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
4261 2007-08-17 Ollie Wild <aaw@google.com>
4264 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
4265 declarations into appropriate slots for comparison. Fix type
4268 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4271 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
4272 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
4274 2007-08-17 Paolo Carlini <pcarlini@suse.de>
4277 * parser.c (cp_parser_class_head): Improve error message.
4279 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
4281 * pt.c (instantiate_decl): Set input_location
4282 for the function end.
4284 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4286 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
4288 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
4289 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
4290 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
4291 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
4292 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
4293 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
4294 * typeck.c (cp_type_quals): Likewise.
4295 * typeck2.c (cxx_incomplete_type_diagnostic,
4296 cxx_incomplete_type_error): Likewise.
4298 2007-08-16 Paolo Carlini <pcarlini@suse.de>
4301 * pt.c (tsubst_friend_function): When check_classfn
4302 returns error_mark_node likewise return it.
4304 2007-08-15 Jakub Jelinek <jakub@redhat.com>
4307 * typeck.c (check_return_expr): Don't NRV optimize vars in
4309 * decl.c (finish_function): Comment fix.
4311 2007-08-15 Paolo Carlini <pcarlini@suse.de>
4314 * pt.c (push_template_decl_real): Depending on TYPE_P
4315 use either TYPE_CONTEXT or DECL_CONTEXT.
4317 2007-08-14 Mark Mitchell <mark@codesourcery.com>
4319 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
4320 constructors and destructors return this.
4322 2007-08-14 Paolo Carlini <pcarlini@suse.de>
4325 * decl2.c (check_classfn): Return error_mark_node in case of error;
4326 in that case, do not call add_method.
4327 * decl.c (start_decl): Deal with check_classfn returning
4329 (grokfndecl): Likewise.
4330 * pt.c (tsubst_friend_function): Likewise.
4332 2007-08-14 Andrew Pinski <pinskia@gmail.com>
4335 * typeck.c (build_binary_op): Disallow vector float types with
4336 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
4338 2007-08-11 Ian Lance Taylor <iant@google.com>
4340 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
4342 * cp-tree.h (cxx_get_alias_set): Update declaration.
4344 2007-08-10 Ollie Wild <aaw@google.com>
4346 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
4348 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
4350 (unqualified_namespace_lookup): Fix ambiguous_decl call.
4351 (lookup_using_namespace): Fix ambiguous_decl call.
4352 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
4354 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4356 * call.c (name_as_c_string): Use CONST_CAST.
4357 * decl.c (build_decl): Likewise.
4358 * parser.c (cp_parser_string_literal): Likewise.
4360 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4363 * error.c (dump_expr): Consistently use the *_cxx_*
4364 variants of the pretty-print functions.
4366 2007-08-10 Paolo Carlini <pcarlini@suse.de>
4369 * decl.c (check_special_function_return_type): Just error
4370 on return type specified for conversion operator.
4372 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
4374 * typeck2.c (readonly_error): Handle general expressions.
4375 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
4377 2007-08-06 Dan Hipschman <dsh@google.com>
4379 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
4380 access function name.
4382 2007-08-04 Alfred Minarik <a.minarik@aon.at>
4385 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
4386 * g++spec.c (lang_specific_driver): Check them.
4388 2007-08-06 Paolo Carlini <pcarlini@suse.de>
4391 * pt.c (inline_needs_template_parms): Fix comment; change return type
4394 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
4397 2007-03-26 Dirk Mueller <dmueller@suse.de>
4399 * parser.c (cp_parser_member_declaration): Pedwarn
4400 about stray semicolons after member declarations.
4402 2007-08-02 Lee Millward <lee.millward@gmail.com>
4407 * parser.c (cp_parser_asm_definition): Detect and discard asm
4408 statements with invalid inputs or outputs.
4409 (cp_parser_asm_operand_list): Return error mark node if any
4410 of the operands are invalid. Adjust documentation.
4412 2007-08-02 Nick Clifton <nickc@redhat.com>
4414 * typeck.c: Change copyright header to refer to version 3 of the
4415 GNU General Public License and to point readers at the COPYING3
4416 file and the FSF's license web page.
4417 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
4418 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
4419 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
4420 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
4421 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
4422 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
4423 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
4424 name-lookup.h, parser.c: Likewise.
4426 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4429 * call.c (magic_varargs_p): Honor the "type generic" attribute.
4431 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4434 * semantics.c (finish_label_stmt): Reject the __label__
4435 extension outside function scopes.
4437 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4439 * parser.c (eof_token): Un-constify.
4440 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4441 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4444 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4446 * pt.c, tree.c, typeck2.c: Fix comment typos.
4448 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4449 Mark Mitchell <mark@codesourcery.com>
4452 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4453 hidden due to friend declarations in local classes.
4455 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4457 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4458 * cp-tree.def (DECLTYPE_TYPE): New.
4459 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4460 (dump_type_prefix): Ditto.
4461 (dump_type_suffix): Ditto.
4462 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4463 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4464 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4466 (DECLTYPE_TYPE_EXPR): New.
4467 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4468 (finish_declared_type): Declare.
4469 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4470 DECLTYPE_TYPE nodes.
4471 (pp_cxx_type_id): Ditto.
4472 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4473 (tsubst): Substitute into a DECLTYPE_TYPE node.
4474 (tsubst_copy): Ditto.
4475 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4477 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4478 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4479 structural equality (because we can't hash the expressions).
4480 (finish_declared_type): New.
4481 * lex.c (reswords): Add "decltype" keyword.
4482 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4483 (cp_parser_postfix_expression): Add member_access_only_p to
4484 restrict postfix expression to member access expressions.
4485 (cp_parser_unary_expression): Update call to
4486 cp_parser_postfix_expression to reflect new parameter.
4487 (cp_parser_declared_type): New.
4488 (cp_parser_simple_type_specifier): Parse decltype types.
4490 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4493 * call.c (convert_for_arg_passing): Only widen bitfields to their
4494 declared types if necessary.
4496 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4498 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4501 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4503 * decl.c (typename_hash, typename_compare): Constify.
4504 * mangle.c (hash_type, compare_type): Likewise.
4505 * pt.c (eq_local_specializations, hash_local_specialization):
4507 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4508 list_hash): Likewise.
4509 * typeck2.c (pat_compare): Likewise.
4511 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4513 * method.c (implicitly_declare_fn): Increase alignment if member
4514 function pointer format requires it.
4516 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4519 * typeck.c (check_return_expr): Do not pass a null argument
4522 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4525 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4528 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4531 * typeck.c (convert_arguments): Only use default args if we have
4535 * typeck.c (structural_comptypes): No need to check
4536 resolve_typename_type return value here.
4537 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4538 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4539 original type rather than error_mark_node in case of failure.
4540 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4541 resolve_typename_type result check.
4542 (cp_parser_direct_declarator, cp_parser_head,
4543 cp_parser_constructor_declarator_p): Likewise.
4545 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4547 * pt.c (template_parms_variadic_p): Remove.
4548 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4550 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4553 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4554 argument to dump_aggr_init_expr_args instead of false.
4556 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4558 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4559 canonical types; otherwise, fall back to structural type
4560 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4561 internal compiler error if the canonical types are wrong.
4563 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4566 * parser.c (cp_parser_make_indirect_declarator): When the
4567 the code argument is ERROR_MARK return cp_error_declarator.
4569 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4572 * decl.c (cxx_init_decl_processing): Don't set
4573 force_align_functions_log.
4574 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4575 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4576 FUNCTION_DECL, return its alignment.
4578 2007-07-09 Richard Guenther <rguenther@suse.de>
4580 * decl.c (start_preparsed_function): Do not promote return type.
4582 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4585 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4587 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4590 * pt.c (resolve_overloaded_unification): Robustify. Return a
4592 (type_unification_real): Adjust accordingly.
4594 2007-07-06 Richard Guenther <rguenther@suse.de>
4596 * init.c (build_new_1): Use the correct pointer type.
4597 * typeck2.c (build_m_component_ref): Likewise.
4599 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4602 * init.c (build_zero_init): Always build an initializer for
4604 * typeck2.c (build_functional_cast): Use build_zero_init.
4607 * init.c (build_new_1): Always pass the allocation function to
4608 build_op_delete_call.
4609 * call.c (build_op_delete_call): Handle operator delete with a
4610 variable-argument list. Do not issue an error when no matching
4611 deallocation function is available for a new operator.
4614 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4615 * decl.c (value_dependent_init_p): New function.
4616 (cp_finish_decl): Use it.
4617 * pt.c (value_dependent_expression_p): Use
4618 any_value_dependent_elements_p.
4619 * parser.c (cp_parser_primary_expression): Add comment about
4620 treating dependent qualified names as integral
4621 constant-expressions.
4623 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4625 * decl.c (build_ptrmemfunc_type): Always use structural equality
4626 tests when comparing pointer-to-member-function types, because the
4627 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4630 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4632 * init.c (build_new): Tweak comment.
4634 2007-06-29 Dave Brolley <brolley@redhat.com>
4637 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4638 type to its base type and number of elements here.
4639 * init.c (build_new): Call complete_type_or_else to ensure that the
4640 type is complete and to issue a diagnostic if it is not.
4641 (build_new_1): Don't call complete_type_or_else here.
4643 2007-07-03 Richard Guenther <rguenther@suse.de>
4646 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4649 2007-07-02 Simon Baldwin <simonb@google.com>
4651 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4652 for inner-style nested forward declarations that don't declare
4655 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4658 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4659 DECL_P in not a variable and appears more than once error messages.
4661 2007-07-01 Ollie Wild <aaw@google.com>
4663 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4664 (select_decl): Remove function.
4665 (unqualified_namespace_lookup): Populate binding by calling
4666 ambiguous_decl. Remove select_decl call.
4667 (lookup_qualified_name): Remove select_decl call.
4668 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4669 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4670 generation when name lookup is ambiguous.
4672 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4675 * init.c (build_new_1): Use structural equality on the copy of the
4678 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4680 * decl2.c (determine_visibility): Implement
4681 flag_visibility_ms_compat effect on type info.
4682 * decl.c (cxx_init_decl_processing): Implement
4683 global effect of flag_visibility_ms_compat.
4685 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4687 * decl2.c (start_objects): Mark constructor-running function
4690 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4693 * decl.c (grokdeclarator): Reset friendp for member functions declared
4694 friend of their own class.
4696 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4698 * decl2.c (determine_visibility): Don't look for dllexport here.
4699 (determine_visibility_from_class): Tidy.
4701 2007-06-18 Simon Baldwin <simonb@google.com>
4704 * parser.c (cp_parser_single_declaration): Added check for storage
4705 class other than sc_none in parsed declaration, and a flag to indicate
4706 if the call is part of an explicit template specialization parse.
4707 * (cp_parser_explicit_specialization): Specialization check flag added
4708 to call to cp_parser_single_declaration(), set true.
4709 * (cp_parser_template_declaration_after_export): Specialization check
4710 flag added to call to cp_parser_single_declaration(), set false.
4711 * pt.c (check_explicit_specialization): Added code to copy visiblity
4712 and linkage from the templated function to the explicit specialization.
4714 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4716 * typeck.c (build_binary_op): For templates build the
4717 expression in pieces to avoid the assert in build2_stat.
4718 (get_member_function_from_ptrfunc):
4719 Change over to using POINTER_PLUS_EXPR and convert
4720 the second operand to sizetype.
4721 * typeck2.c (build_m_component_ref): Likewise.
4722 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4723 instead of PLUS_EXPR for pointers.
4724 (build_new_1): Likewise.
4725 (build_vec_delete_1): Likewise.
4726 (build_vec_delete): Likewise.
4727 * class.c (build_base_path): Likewise.
4728 (build_base_path): Likewise.
4729 (convert_to_base_statically): Likewise.
4730 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4731 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4732 instead of PLUS_EXPR.
4733 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4734 instead of PLUS_EXPR for pointers.
4735 * call.c (build_special_member_call): Likewise.
4736 * rtti.c (build_headof): Likewise.
4737 Use sizetype instead of ptrdiff_type_node.
4738 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4739 instead of PLUS_EXPR for pointers.
4740 * except.c (expand_start_catch_block): Do a
4741 NEGATIVE and then a POINTER_PLUS_EXPR instead
4743 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4744 PLUS_EXPR on pointer types over to use
4745 POINTER_PLUS_EXPR and remove the conversion
4746 to the pointer types.
4747 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4748 adding to a pointer type. Use size_int instead of
4749 ssize_int. Convert the index to sizetype before
4750 adding it to the pointer.
4752 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4754 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4755 (DECL_ANON_UNION_VAR_P): New macro.
4756 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4757 than DECL_VAR_MARKED_P, to keep track of which variables we have
4759 * decl.c (redeclaration_error_message): Complain about redeclaring
4760 anonymous union members at namespace scope.
4761 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4763 2007-06-14 Geoff Keating <geoffk@apple.com>
4765 * decl2.c (determine_visibility): Ensure that functions with
4766 hidden types as parameters are hidden.
4769 * decl2.c (determine_visibility): Remove duplicate code for
4772 2007-06-12 Ian Lance Taylor <iant@google.com>
4775 * init.c (avoid_placement_new_aliasing): New static function.
4776 (build_new_1): Call it.
4778 2007-06-11 Rafael Ávila de Espíndola <espindola@google.com>
4780 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4781 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4783 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4786 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4787 on init, the non-decl cond operand and increment value.
4789 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4792 * decl.c (check_initializer): Report an error when a brace enclosed
4793 initializer is used for a non-aggregate type in C++98.
4794 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4796 (grokdeclarator): Likewise.
4797 (move_fn_p): Likewise.
4798 * typeck.c (check_return_expr): Likewise.
4799 * call.c (reference_binding): Likewise.
4800 * error.c (cp_cpp_error): Likewise.
4801 * pt.c (check_default_tmpl_args): Likewise.
4803 * lex.c (init_reswords): Likewise.
4804 * parser.c (p_parser_primary_expression): Likewise.
4805 (TOKEN_PRECEDENCE): Likewise.
4806 (cp_parser_init_declarator): Likewise.
4807 (cp_parser_ptr_operator): Likewise.
4808 (cp_parser_parameter_declaration): Likewise.
4809 (cp_parser_enclosed_template_argument_list): Likewise.
4810 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4811 (cp_parser_next_token_ends_template_argument_p): Likewise.
4813 2007-06-04 Simon Baldwin <simonb@google.com>
4815 * decl.c (grokdeclarator): Readability change. Moved case labels
4816 into direct switch statement scope.
4818 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4820 * call.c (convert_like_real): Remove pointless code.
4822 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4824 * decl.c (get_atexit_fn_ptr_type): New function.
4825 (get_atexit_node): Use it.
4826 (start_cleanup_fn): Likewise.
4827 (register_dtor_fn): Use the object's destructor, instead of a
4828 separate cleanup function, where possible.
4829 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4830 (atexit_fn_ptr_type_node): New macro.
4831 * decl2.c (build_cleanup): Use build_address.
4833 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4835 * typeck.c (build_binary_op): Include types in error.
4837 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4840 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4841 needs runtime initialization.
4843 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4846 * semantics.c (finish_trait_expr): Complete the types.
4848 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4849 Douglas Gregor <doug.gregor@gmail.com>
4850 Pedro Lamarao <pedro.lamarao@mndfck.org>
4851 Howard Hinnant <howard.hinnant@gmail.com>
4855 * typeck.c (comptypes): Don't consider rvalue and lvalue
4856 reference types to be equivalent.
4857 (check_return_expr): Move from certain lvalues when returning
4859 * decl.c (grokdeclarator): Implement reference collapsing.
4860 (copy_fn_p): Don't consider constructors taking rvalue references
4861 to be copy constructors.
4863 * call.c (conversion): New "rvaluedness_matches_p" member.
4864 (convert_class_to_reference): Require reference type as first
4865 parameter instead of base type.
4866 (reference_binding): Add logic to handle rvalue references.
4867 (implicit_conversion): Update inaccurate comment.
4868 (convert_like_real): Disable creation of temporaries that are
4869 impossible to initialize for types with move constructors.
4870 (build_over_call): Elide move constructors when possible.
4871 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4872 (maybe_handle_ref_bind): Return conversion instead of type node.
4873 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4874 determine preferred conversion sequences.
4875 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4876 (LOOKUP_PREFER_RVALUE): New.
4877 (DECL_MOVE_CONSTRUCTOR_P): New.
4878 (struct cp_declarator): Add "reference" member for reference
4879 types, with new "rvalue_ref" flag.
4880 (cp_build_reference_type): Declare.
4881 (move_fn_p): Declare.
4882 * error.c (dump_type_prefix): Format rvalue reference types
4883 correctly in error messages.
4884 * except.c (build_throw): Move from certain lvalues when
4886 * mangle.c (write_type): Mangle rvalue references differently
4887 than regular references.
4888 * parser.c (make_reference_declarator): Add boolean parameter for
4890 (cp_parser_make_indirect_declarator): New.
4891 (cp_parser_new_declarator_opt): Call
4892 cp_parser_make_indirect_declarator.
4893 (cp_parser_conversion_declarator_opt): Ditto.
4894 (cp_parser_declarator): Ditto.
4895 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4897 * pt.c (tsubst): Implement reference collapsing.
4898 (maybe_adjust_types_for_deduction): Implement special template
4899 parameter deduction rule for rvalue references.
4900 (type_unification_real): Update calls to
4901 maybe_adjust_types_for_deduction.
4902 (try_one_overload): Ditto.
4903 (unify_pack_expansion): Ditto.
4904 * tree.c (lvalue_p_1): Handle rvalue reference types.
4905 (cp_build_reference_type): New.
4907 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4910 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4911 variables that need runtime initialization.
4913 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4916 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4917 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4918 case POSTDECREMENT_EXPR>): Return the error_mark_node
4919 if either the real or imaginary parts would an
4922 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4923 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4926 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4927 token is a closing brace, false if there are no tokens left.
4928 (cp_parser_namespace_alias_definition): Only consume the next token if
4929 it is a closing brace.
4931 * parser.c (cp_parser_class_specifier): Likewise.
4933 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4935 * semantics.c (finish_member_declaration): Fix a typo in the
4938 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4950 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4951 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4952 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4953 whether everything was okay. Fix indentation.
4954 (push_template_decl_real): Check for bare parameter packs in
4955 function parameters; where errors occur, mark the parameter types
4956 with ERROR_MARK_NODEs to avert ICEs.
4957 (coerce_template_parameter_pack): New.
4958 (coerce_template_parms): Moved parameter pack coercion into
4959 coerce_template_parameter_pack, and permit it anywhere in the
4960 template parameter list (not just at the end). Parameter and
4961 argument indices can vary (somewhat) separately now, so add
4962 PARM_IDX and ARG_IDX.
4963 (fn_type_unification): Don't set an argument pack as incomplete if
4964 no argument pack was deduced.
4965 (type_unification_real): If a type parameter is a parameter pack
4966 and has not otherwise been deduced, it will be deduced to an empty
4968 (more_specialized_fn): Use the actual lengths of the argument
4969 lists when comparing against expansions.
4970 * semantics.c (finish_member_declaration): If a field's type has
4971 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4973 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4976 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4978 2007-05-22 Ollie Wild <aaw@google.com>
4980 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4981 (unqualified_namespace_lookup): Adds check for hidden types.
4983 2007-05-22 Ollie Wild <aaw@google.com>
4985 * decl.c (duplicate_decls): Verify namespace names are unique.
4987 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4989 * decl.c (cxx_maybe_build_cleanup): Handle
4990 __attribute__((cleanup)).
4992 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4994 * cvt.c (cp_convert_and_check): Don't check warnings if the
4997 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4999 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
5001 2007-05-14 Paolo Carlini <pcarlini@suse.de>
5004 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
5005 type only if is a class type (5.2.8/4).
5007 2007-05-14 Rafael Ávila de Espíndola <espindola@google.com>
5009 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
5010 * decl.c (grokdeclarator): Use unsigned_type_for instead of
5011 c_common_unsigned_type.
5013 2007-05-11 Silvius Rus <rus@google.com>
5015 * typeck.c (build_indirect_ref): Add call to
5016 strict_aliasing_warning.
5017 (build_reinterpret_cast_1): Condition call to
5018 strict_aliasing_warning.
5020 2007-05-11 Jan Hubicka <jh@suse.cz>
5022 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
5023 * decl2.c (start_objects): ctors and dtors are no longer public.
5024 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
5026 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
5028 * typeck.c (build_unary_op): Remove code that used to
5029 handle non lvalue increments/decrements.
5031 2007-05-07 Mike Stump <mrs@apple.com>
5033 * parser.c (check_empty_body): Add.
5034 (cp_parser_iteration_statement): Add call to check_empty_body.
5036 2007-05-05 Geoffrey Keating <geoffk@apple.com>
5039 * mangle.c (write_mangled_name): Mangle static variable names.
5040 (write_unqualified_name): Use local-source-name for
5041 namespace-scope static variables.
5043 2007-05-04 Dirk Mueller <dmueller@suse.de>
5045 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
5048 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
5051 * decl2.c (constrain_class_visibility):
5052 Use strip_pointer_or_array_types instead of strip_array_types.
5054 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
5057 * decl.c (reshape_init_r): Don't reshape the first element if it
5058 is a pointer to member function.
5060 2007-04-27 Simon Baldwin <simonb@google.com>
5062 * decl.c (grokparms): Changed message format from %qD to %qE.
5064 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
5066 * error.c (maybe_warn_variadic_templates): Variadic templates are
5067 now in C++0x, so only warn about them in C++98 mode.
5069 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
5072 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
5073 integeral types from vectors types.
5075 2007-04-26 Jakub Jelinek <jakub@redhat.com>
5078 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
5079 for type dependent OMP_CLAUSE_DECLs.
5081 2007-04-24 Mark Mitchell <mark@codesourcery.com>
5084 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
5085 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
5086 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
5087 * init.c (build_zero_init): Adjust, as
5088 COMPLEX_TYPE is now a SCALAR_TYPE.
5089 * typeck2.c (digest_init): Allow brace-enclosed initializers for
5090 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
5092 2007-04-25 Paolo Carlini <pcarlini@suse.de>
5094 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
5095 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
5096 (trait_expr_value): Adjust.
5098 2007-04-23 Simon Baldwin <simonb@google.com>
5100 * decl.c (grokparms): Added new error for duplicate function
5101 parameters names in function prototypes, to match gcc behavior.
5103 2007-04-23 Jan Hubicka <jh@suse.cz>
5105 * decl2.c (finish_objects): Do not call target constructor/destructor
5108 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
5110 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
5111 instead of checking GIMPLE_STMT_P in chain_next.
5113 2007-04-17 Mark Mitchell <mark@codesourcery.com>
5116 * call.c (convert_for_arg_passing): Convert bitfields to their
5119 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
5122 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
5124 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
5127 * decl2.c (constrain_class_visibility):
5128 Do not warn about the use of anonymous namespace in the main input file.
5130 2007-04-15 Mark Mitchell <mark@codesourcery.com>
5132 * cp-tree.h (current_template_parms): Fix typo in comment.
5134 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
5136 * cp-tree.h, error.c: Fix comment typos.
5138 2007-04-13 Jason Merrill <jason@redhat.com>
5141 * call.c (reference_binding): Add c_cast_p parm. If true,
5142 add quals to TO as needed to make it reference-compatible.
5144 2007-04-11 Jan Hubicka <jh@suse.cz>
5146 * class.c (convert_to_base_statically): Fold produced tree; verify
5147 that we are not processing template_decl.
5149 2007-04-09 Mark Mitchell <mark@codesourcery.com>
5152 * class.c (build_base_path): Ensure that the converted pointer has
5153 the same cv-qualification as the input.
5155 2007-04-09 Paolo Carlini <pcarlini@suse.de>
5157 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
5159 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
5161 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
5163 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
5164 * tree.c (cp_add_pending_fn_decls): Remove.
5165 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
5167 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
5169 Revert change removing staticp.
5171 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
5173 * cp-objcp-common.c (cxx_staticp): Remove.
5174 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
5175 * cp-tree.h (cxx_staticp):
5177 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
5179 * class.c (check_for_override): Don't remove dllmport attribute
5182 2007-04-03 Jakub Jelinek <jakub@redhat.com>
5185 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
5186 type issue error and return early.
5188 2007-03-30 Jason Merrill <jason@redhat.com>
5191 * typeck.c (cp_type_readonly): New fn.
5192 * cp-tree.h: Declare it.
5193 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
5194 (cp_finish_decl): Not here.
5196 2007-03-31 Richard Guenther <rguenther@suse.de>
5198 * optimize.c (maybe_clone_body): Replace splay-tree usage by
5201 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
5206 * parser.c (declarator_can_be_parameter_pack): New.
5207 (cp_parser_template_parameter): Only parse the `...' if the
5208 declarator can be a parameter pack.
5209 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
5211 * pt.c (find_parameter_packs_r): Look into the bounds on integer
5212 types (they could be used as array bounds).
5213 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
5214 (tsubst_pack_expansion): Handle failure to expand parameter
5217 2007-03-30 Paolo Carlini <pcarlini@suse.de>
5220 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
5221 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
5222 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
5223 (CLASS_TYPE_NON_UNION_P): Add.
5224 (struct lang_type_class): Add has_complex_dflt.
5225 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
5226 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
5227 * cp-tree.def: Add TRAIT_EXPR.
5228 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
5229 * lex.c (struct resword): Add __has_nothrow_assign,
5230 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
5231 __has_trivial_constructor, __has_trivial_copy,
5232 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
5233 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
5234 __is_pod, __is_polymorphic, __is_union.
5235 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
5236 (cp_parser_trait_expr): New.
5237 * semantics.c (finish_trait_expr, trait_expr_value
5238 classtype_has_nothrow_copy_or_assign_p): New.
5239 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
5241 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
5242 * class.c (check_bases, check_field_decl, check_bases_and_members):
5243 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
5244 * pt.c (uses_template_parms, tsubst_copy_and_build,
5245 value_dependent_expression_p, type_dependent_expression_p): Deal with
5247 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
5249 2007-03-29 Richard Guenther <rguenther@suse.de>
5251 * tree.c (cp_walk_subtrees): Do not set input_location.
5253 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
5256 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
5259 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5261 * parser.c (struct cp_parser): Update comment for
5262 greater_than_is_operator_p.
5263 (cp_parser_primary_expression): In C++0x mode, a cast operator can
5264 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
5265 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
5266 !GREATER_THAN_IS_OPERATOR_P.
5267 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
5268 `>>' operators that will become two `>' tokens in C++0x.
5269 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
5270 mode, allowing it to terminate default arguments.
5271 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
5272 `>>' like two consecutive `>' tokens.
5273 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
5274 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
5275 ends a template argument.
5277 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5279 * decl.c (redeclaration_error_message): Complain when redeclaring
5280 a friend function with default template arguments (C++0x mode only).
5281 * cp-tree.h (check_default_tmpl_args): Declare.
5282 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
5283 template arguments in function templates. Add support for checking
5284 the default template arguments of friend templates.
5285 (push_template_decl_real): Fix call to check_default_tmpl_args.
5286 (type_unification_real): If a template parameter has not been
5287 deduced but provides a default template argument, substitute into
5288 that default template argument.
5289 * parser.c (cp_parser_init_declarator): When declaring (but not
5290 defining!) a function template in C++0x mode, check for default
5293 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
5296 * decl.c (grokdeclarator): Deal with cv-qualified function type
5297 typedefs in the same way for member and non-member functions.
5299 2007-03-26 Dirk Mueller <dmueller@suse.de>
5301 * parser.c (cp_parser_member_declaration): Pedwarn
5302 about stray semicolons after member declarations.
5304 2007-03-26 Paolo Carlini <pcarlini@suse.de>
5307 * pt.c (instantiate_decl): Set in_system_header.
5309 2007-03-22 Mark Mitchell <mark@codesourcery.com>
5311 * cp-tree.h (current_tempalte_parms): Improve documentation.
5312 * pt.c (current_template_args): Likewise.
5315 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
5316 not consume tokens when failing.
5318 2007-03-22 Jim Wilson <wilson@specifix.com>
5319 Mark Mitchell <mark@codesourcery.com>
5322 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
5323 consistent with FROM.
5325 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5327 * error.c (dump_expr): Handle dependent names that designate types.
5328 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
5330 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
5332 * cp-tree.def, parser.c, pt.c: Fix comment typos.
5334 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5336 * cvt.c (cp_convert_and_check) : Define.
5337 * cp-tree.h (cp_convert_and_check): Declare.
5338 * call.c (convert_conversion_warnings): Rename to
5339 conversion_null_warnings. The warning for floating-point to
5340 integer is handled by convert_and_check in convert_like_real.
5341 (convert_like_real): convert_conversion_warnings was renamed as
5342 conversion_null_warnings.
5343 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
5344 overflow and changes of value during conversion.
5346 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5349 * parser.c (cp_parser_statement): If 'namespace' is found, this
5350 only can be a namespace alias definition, so parse it now.
5351 (cp_parser_namespace_alias_definition): if we find an open brace
5352 instead of '=', then this is actually a misplaced namespace
5355 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5358 * decl.c (cxx_init_decl_processing): Move command-line options
5359 processing to c-opts.c.
5361 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
5363 * ptree.c (cxx_print_type): Use formatting markup for integers
5364 when printing template parameter index/level/orig level.
5365 (cxx_print_xnode): Ditto.
5366 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
5367 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
5368 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
5370 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
5371 rather than a HOST_WIDE_INT.
5372 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
5373 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
5375 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
5376 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
5377 IN_BASE_INITIALIZER bool bitfields.
5378 (struct cp_declarator): Make KIND a 4-bit field. Make
5379 PARAMETER_PACK_P a bool bitfield just after KIND.
5380 * pt.c (uses_parameter_packs): Destroy the pointer set.
5381 (make_pack_expansion): Ditto.
5382 (check_for_bare_parameter_packs): Ditto.
5383 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
5385 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
5388 * call.c (convert_default_arg): Instead of copying the node,
5391 2007-03-15 Dirk Mueller <dmueller@suse.de>
5394 * call.c (convert_conversion_warnings): New..
5395 (convert_like_real): .. factored out from here.
5396 (convert_conversion_warnings): Add warning about
5397 false being converted to NULL in argument passing.
5399 2007-03-14 Dirk Mueller <dmueller@suse.de>
5401 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
5402 (finish_do_body): Warn about empty body in do/while statement.
5404 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5406 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
5408 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5411 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
5414 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
5416 * repo.c (init_repo): Initialize random_seed saved options.
5417 (finish_repo): Adjust.
5419 2007-03-13 Mark Mitchell <mark@codesourcery.com>
5422 * Make-lang.in (doc/g++.1): Use $< to specify the location from
5425 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
5427 * decl.c (compute_array_index_type): New warning flag warn_vla.
5429 2007-03-12 Mark Mitchell <mark@codesourcery.com>
5432 * call.c (convert_default_arg): Copy non-constant arguments.
5434 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5437 * parser.c (cp_parser_postfix_expression): Disallow compound
5438 literals in constant expressions.
5441 * semantics.c (finish_typeof): Use unlowered_expr_type.
5443 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5446 * cp-tree.h (unlowered_expr_type): New function.
5447 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5448 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5449 (unlowered_expr_type): New function.
5450 (build_unary_op): Disallow predecrements of bool bitfields.
5451 * call.c (build_conditional_expr): Use unlowered_expr_type.
5452 * pt.c (type_unification_real): Likewise.
5454 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5457 * typeck.c (check_return_expr): Check for bare parameter packs.
5458 (comptypes): Compare template parameter packs and
5459 type pack expansions.
5460 * decl.c (grokdeclarator): Deal with the declaration of function
5462 (grokparms): Verify that the (optional) function parameter pack is
5463 at the end of the parameter list.
5464 (xref_basetypes): Handle pack expansions in the base class.
5465 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5466 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5467 (NONTYPE_ARGUMENT_PACK): New.
5468 (TYPE_PACK_EXPANSION): New.
5469 (EXPR_PACK_EXPANSION): New.
5470 (ARGUMENT_PACK_SELECT): New.
5471 * cp-objcp-common.c (cp_tree_size): Compute size of
5472 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5473 ARGUMENT_PACK_SELECT.
5474 * error.c (dump_template_argument): Print template argument packs.
5475 (dump_template_argument_list): Ditto.
5476 (dump_template_parameter): Dump `...' for template type parameter
5478 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5479 (dump_parameters): Print function parameter packs.
5480 (dump_template_parms): Print template argument packs.
5481 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5482 (maybe_warn_variadic_templates): New.
5483 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5484 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5485 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5487 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5488 (write_template_arg): Write argument packs as separate arguments.
5489 * cp-tree.h (struct template_parm_index_s): Add flag that
5490 indicates that the template parameter is actually a parameter
5492 (struct tree_argument_pack_select): New.
5493 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5494 (union lang_tree_node): Add argument_pack_select.
5495 (FUNCTION_PARAMETER_PACK_P): New.
5496 (PACK_EXPANSION_P): New.
5497 (PACK_EXPANSION_PATTERN): New.
5498 (SET_PACK_EXPANSION_PATTERN): New.
5499 (PACK_EXPANSION_PARAMETER_PACKS): New.
5500 (ARGUMENT_PACK_P): New.
5501 (ARGUMENT_PACK_ARGS): New.
5502 (SET_ARGUMENT_PACK_ARGS): New.
5503 (ARGUMENT_PACK_INCOMPLETE_P): New.
5504 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5505 (TEMPLATE_PARM_PARAMETER_PACK): New.
5506 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5507 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5508 (ARGUMENT_PACK_SELECT_INDEX): New.
5509 (ARGUMENT_PACK_SELECT_ARG): New.
5510 (struct cp_declarator): Add parameter_pack_p flag.
5511 (maybe_warn_variadic_templates): Declare.
5512 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5513 indicate a template parameter pack.
5514 (uses_parameter_packs): Declare.
5515 (template_parameter_pack_p): Declare.
5516 (template_parms_variadic_p): Declare.
5517 (make_pack_expansion): Declare.
5518 (check_for_bare_parameter_packs): Declare.
5519 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5520 sizeof... expressions.
5521 (pp_cxx_expression): Print pack expansions and non-type argument
5523 (pp_cxx_exception_specification): Print pack expansions.
5524 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5525 (pp_cxx_ctor_initializer): Print pack expansions.
5526 (pp_cxx_type_id): Print pack expansions.
5527 (pp_cxx_template_argument_list): Print argument packs.
5528 (pp_cxx_template_parameter): Print ellipsis for template parameter
5530 * pt.c (comp_template_parms): Compare template parameter packs.
5531 (template_parameter_pack_p): New.
5532 (template_parms_variadic_p): New.
5533 (template_args_variadic_p): New.
5534 (make_ith_pack_parameter_name): New.
5535 (struct find_parameter_pack_data): New.
5536 (find_parameter_packs_r): New.
5537 (uses_parameter_packs): New.
5538 (make_pack_expansion): New.
5539 (check_for_bare_parameter_packs): New.
5540 (expand_template_argument_pack): New.
5541 (reduce_template_parm_level): Propagate parameter pack flag.
5542 (process_template_parm): Add is_parameter_pack parameter to state
5543 when the parameter is actually a parameter pack. Create template
5544 parameter packs when is_parameter_pack is true.
5545 (current_template_args): The argument for a template parameter
5546 pack is an argument pack containing a single pack expansion.
5547 (process_partial_specialization): When checking that non-type
5548 argument expressions do not involve template parameters, loop over
5549 the arguments in argument packs separately.
5550 (push_template_decl_real): Check that the type of the declaration
5551 does not have any bare parameter packs. Check that primary
5552 templates have no more than one parameter pack, and that it comes
5553 at the end of the template parameter list.
5554 (convert_template_argument): Handle coercions for pack expansion
5555 expressions by coercing the pattern then rebuilding the expansion.
5556 (coerce_template_parms): When coercing the arguments for a
5557 variadic template, pack "extra" arguments into an argument pack.
5558 (coerce_template_template_parms): Cannot coerce between parameter
5559 packs and non-pack parameters.
5560 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5561 (comp_template_args): Expand all template arguments packs before
5562 comparing template argument lists.
5563 (mangle_class_name_for_template): Make argument packs as separate
5565 (for_each_template_parm_r): No need to handle BASELINK.
5566 (instantiate_class_template): Handle pack expansions in the base
5568 (tsubst_pack_expansion): New.
5569 (tsubst_template_args): Handle substitutions of argument packs and
5570 pack expansion into template argument lists.
5571 (tsubst_decl): Expand function parameter packs into separate
5572 function parameters.
5573 (tsubst_arg_types): Expand a type pack expansion into separate
5575 (tsubst_exception_specification): Handle pack expansions in
5576 exception specifiers.
5577 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5578 replacing a template parameter with its argument. If we encounter
5579 a substitution for an argument pack, just return the parameter
5581 (tsubst_copy): sizeof(X...) returns the number of elements in
5582 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5583 PARM_DECL is a parameter pack.
5584 (tsubst_expr): Expression pack expansions and argument packs
5585 cannot show up here; they will all be handled through function
5586 calls, sizeof, and template argument lists.
5587 (tsubst_copy_and_build): sizeof(X...) returns the number of
5588 elements in parameter pack X. Handle pack expansions in TREE_LIST
5589 and CONSTRUCTOR nodes.
5590 (fn_type_unification): Handle "incomplete" explicit template
5591 argument lists that specify some of the arguments for a template
5593 (type_unification_real): Unify arguments against pack expansions.
5594 (template_parm_level_and_index): New, helper function.
5595 (unify_pack_expansion): New.
5596 (unify): Unify argument packs on an argument-by-argument basis,
5597 handling variadic argument packs as well.
5598 (more_specialized_fn): Handle unification of function parameter
5599 packs. All things being equal, prefer non-variadic function
5600 templates to variadic function templates.
5601 (more_specialized_class): Prefer the variadic class template
5602 partial specialization that binds fewer arguments to a parameter
5604 (regenerate_decl_from_template): Expand function parameter packs
5605 into separate parameters.
5606 (instantiate_decl): Ditto.
5607 (tsubst_initializer_list): Handle pack expansions for base-class
5609 (dependent_type_p_r): Determine dependent types in argument packs
5610 and pack expansions.
5611 (value_dependent_expression_p): Determine value-dependence of
5612 non-type argument packs.
5613 (dependent_template_arg_p): Handle argument packs.
5614 * semantics.c (finish_cond): Check for bare parameter packs.
5615 (finish_expr_stmt): Ditto.
5616 (finish_for_expr): Ditto.
5617 (finish_switch_cond): Ditto.
5618 (finish_mem_initializers): Ditto.
5619 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5621 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5622 * parser.c (make_declarator): Declarator is not an expansion.
5623 (make_pointer_declarator): Transfer parameter pack flag to outer
5625 (make_reference_declarator): Ditto.
5626 (make_ptrmem_declarator): Ditto.
5627 (make_call_declarator): Ditto.
5628 (make_array_declarator): Ditto.
5629 (cp_parser_postfix_expression): Allow pack expansion expressions
5630 in the argument list for a call expression.
5631 (cp_parser_parenthesized_expression_list): Add new parameter
5632 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5633 into separate arguments."
5634 (cp_parser_new_placement): Allow pack expansion expressions.
5635 (cp_parser_new_initializer): Ditto.
5636 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5637 base-class initializer expansion.
5638 (cp_parser_mem_initializer): Ditto.
5639 (cp_parser_template_parameter_list): Keep track of whether the
5640 template parameter is a template parameter pack.
5641 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5642 template parameter pack.
5643 (cp_parser_type_parameter): Ditto.
5644 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5646 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5647 this declarator is a parameter pack.
5648 (cp_parser_parameter_declaration): The ellipsis does not end the
5649 parameter declaration, because it might be a parameter pack. Parse
5650 the ellipsis to indicate a parameter pack.
5651 (cp_parser_initializer): Allow pack expansions.
5652 (cp_parser_initializer_list): Allow ellipsis to create an
5653 initializer expansion.
5654 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5656 (cp_parser_type_id_list): Allow ellipsis to create an exception
5657 specifier expansion.
5658 (cp_parser_attribute_list): Don't allow pack expansions.
5659 (cp_parser_functional_cast): Allow pack expansions.
5660 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5661 compute the length of a parameter pack.
5662 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5663 end a template argument.
5664 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5665 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5668 2007-03-09 Dirk Mueller <dmueller@suse.de>
5670 * call.c (build_new_op): Call warn_logical_operator.
5672 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5675 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5678 * pt.c (any_template_arguments_need_structural_equality_p):
5681 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5683 * decl.c (grokdeclarator): Disable warnings for anonymous
5686 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5688 * typeck2.c (readonly_error): Always emit a hard error.
5689 Remove last argument.
5690 * cp-tree.h (readonly_error): Adjust prototype.
5691 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5692 * typeck.c (build_unary_op): Likewise.
5693 (build_modify_expr): Likewise.
5695 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5698 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5700 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5703 * parser.c (struct cp_parser): New IN_IF_STMT.
5704 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5705 returning if parsing the body of an 'if' statement or issuing an
5706 error and continuing.
5707 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5709 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5711 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5714 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5717 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5719 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5720 Objective-C++. Don't exit early if -shared-libgcc needs to be
5723 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5725 * typeck.c (common_base_type): Delete unused function.
5727 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5729 * Make-lang.in: Add dummy lang.install-pdf target.
5731 2007-03-01 Simon Baldwin <simonb@google.com>
5734 * decl.c (check_tag_decl): Added new warning for typedef ignored
5735 when it precedes an otherwise valid non-typedef declaration.
5737 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5739 * typeck.c (build_function_call): Store converted arguments
5740 in a stack-allocated array instead of building a list.
5741 (convert_arguments): Store arguments in the array passed in as an
5742 argument, and return the actual number of arguments.
5743 * call.c (build_call): Delete, and replace with...
5744 (build_call_n, build_call_a): New.
5745 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5746 (build_over_call): Store converted arguments in a stack-allocated
5747 array instead of building a list.
5748 (build_cxx_call): Pass arguments in an array instead of as a list.
5749 (build_java_interface_fn_ref): Rewrite to avoid constructing
5751 * tree.h: Update declarations to reflect above changes.
5752 * method.c (use_thunk): Use a stack-allocated array to hold
5753 the arguments instead of a list.
5754 * rtti.c (throw_bad_cast): Update call to cxx_call.
5755 (throw_bad_typeid): Likewise.
5756 (build_dynamic_cast_1): Likewise.
5757 * init.c (build_builtin_delete_call): Use build_call_n.
5758 * decl.c (expand_static_init): Likewise.
5759 * except.c (cp_protect_cleanup_actions): Likewise.
5760 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5761 (gimplify_must_not_throw_expr): Likewise.
5762 (cxx_omp_apply_fn): Use build_call_a.
5764 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5766 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5767 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5769 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5771 * cp-tree.h (static_ctors): Remove.
5772 * cp-tree.h (static_dtors): Likewise.
5773 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5774 refactoring of tree_map hierarchy.
5775 (decl_shadowed_for_var_insert): Likewise.
5776 * semantics.c (expand_body): Use c_expand_body.
5777 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5778 * decl2.c (static_ctors): Remove.
5779 (static_dtors): Likewise.
5780 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5781 objc_generate_static_init_call. Do not call static_[cd]tors.
5782 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5784 (cp_write_global_declarations): Likewise.
5786 2007-02-23 Richard Guenther <rguenther@suse.de>
5788 * class.c (note_name_declared_in_class): Make declaration
5789 changes meaning a pedwarn.
5791 2007-02-22 Michael Matz <matz@suse.de>
5794 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5795 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5796 dump_function_decl): Guard emitting outer scopes by new flag.
5797 * cp-lang.c (cxx_dwarf_name): New function.
5798 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5799 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5801 (push_template_decl_real, lookup_template_class): Remove calls
5804 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5806 * call.c (build_new_method_call): Ensure that explicit calls of
5807 destructors have type "void".
5809 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5811 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5812 and -Walways-true with -Waddress.
5813 * cvt.c (convert_to_void): Replace unconditional warning with
5816 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5818 * decl.c, tree.c: Fix comment typos.
5820 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5823 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5824 statement expression if we had an error mark node.
5826 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5827 Brooks Moses <brooks.moses@codesourcery.com>
5828 Lee Millward <lee.millward@codesourcery.com>
5830 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5831 Change class to tcc_vl_exp.
5833 * call.c (build_call): Use build_call_list instead
5835 (build_over_call): Likewise.
5836 (build_new_method_call): Use build_min_non_dep_call_list
5837 instead of build_min_non_dep.
5839 * error.c (dump_call_expr_args): New function.
5840 (dump_aggr_init_expr_args): New function.
5841 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5842 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5844 * cvt.c (convert_to_void): Use build_call_array instead
5845 of build3; use new AGGR_INIT_EXPR accessor macros.
5847 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5848 instead of TREE_CODE_LENGTH.
5850 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5851 AGGR_INIT_EXPR accessor macros.
5853 * cp-gimplify.c (cp_gimplify_init_expr): Use
5854 AGGR_INIT_EXPR_SLOT to set the slot operand.
5856 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5857 (AGGR_INIT_EXPR_SLOT): New macro.
5858 (AGGR_INIT_EXPR_ARG): New macro.
5859 (aggr_init_expr_nargs): New macro.
5860 (AGGR_INIT_EXPR_ARGP): New macro.
5861 (aggr_init_expr_arg_iterator): New.
5862 (init_aggr_init_expr_arg_iterator): New.
5863 (next_aggr_init_expr_arg): New.
5864 (first_aggr_init_expr_arg): New.
5865 (more_aggr_init_expr_args_p): New.
5866 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5867 (stabilize_aggr_init): New declaration.
5868 (build_min_non_dep_call_list): Likewise.
5870 * tree.c (process_aggr_init_operands): New function.
5871 (build_aggr_init_array) New function.
5872 (build_cplus_new): Update to use new CALL_EXPR and
5873 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5874 build_aggr_init_array.
5875 (build_min_non_dep_call_list) New function.
5876 (build_min_nt): Assert input code parameter is not a variable
5877 length expression class.
5878 (build_min, build_min_non_dep): Likewise.
5879 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5880 to check for equality instead of recursing. Handle tcc_vl_exp
5882 (stabilize_call): Update to only handle CALL_EXPRs, not
5883 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5884 (stabilize_aggr_init): New function.
5885 (stabilize_init): Use it.
5887 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5888 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5889 AGGR_INIT_EXPR accessor macros and argument iterators.
5891 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5892 build_vl_exp. Iterate through the operands, recursively
5893 processing each one.
5894 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5895 CALL_EXPR accessor macros.
5896 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5897 tree code classes. Use TREE_OPERAND_LENGTH instead of
5900 * semantics.c (finish_call_expr): Use build_nt_call_list
5901 instead of build_nt.
5902 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5903 accessor macros. Use build_call_array to construct the
5904 CALL_EXPR node instead of build3
5906 * decl2.c (build_offset_ref_call_from_tree): Use
5907 build_nt_call_list and build_min_non_dep_call_list instead
5908 of build_min_nt and build_min_non_dep.
5910 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5911 Use build_nt_call_list instead of build_min_nt.
5913 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5916 * call.c (build_conditional_expr): Improve error message.
5918 2007-02-13 Dirk Mueller <dmueller@suse.de>
5920 * friend.c (do_friend): Annotate warning about friend
5921 declarations in templates with OPT_Wnon_template_friend.
5922 Convert informal message from warning() to inform().
5924 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5925 Mark Mitchell <mark@codesourcery.com>
5928 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5929 instantiations for variables.
5931 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5934 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5935 Check warn_unused_value just once.
5937 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5940 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5941 (fn_type_unificiation): Likewise.
5942 (get_bindings): Likewise.
5944 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5947 * decl.c (finish_function): Use DECL_REPLACEABLE.
5948 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5950 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5952 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5954 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5956 * decl.c (grokvardecl): Don't error if !have_tls.
5957 (grokdeclarator): Likewise.
5958 * parser.c (cp_parser_omp_threadprivate): Likewise.
5960 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5963 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5964 parameters and result decls in omp clauses.
5965 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5968 2007-02-05 Dirk Mueller <dmueller@suse.de>
5971 * parser.c (cp_parser_class_specifier): Always initialize bases.
5973 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5975 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5976 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5977 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5979 * semantics.c (finish_omp_atomic): Store a whole expression node
5980 in operand 1, and integer_zero_node in operand 0, for dependent
5981 OMP_ATOMIC. Rewrite to make flow easier to understand.
5983 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5985 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5987 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5989 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5990 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5992 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5994 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5995 keyword warning to -Wc++0x-compat.
5997 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5999 * decl.c (grokdeclarator): Update documentation.
6001 2007-02-02 Jakub Jelinek <jakub@redhat.com>
6004 * decl.c (grokdeclarator): If __thread is used together with
6005 a storage class other than extern and static, clear thread_p
6006 after issuing diagnostics and fall through to checking the
6009 2007-01-30 Roger Sayle <roger@eyesopen.com>
6011 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
6012 calculating the size of an array (to avoid recursive errors).
6014 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6017 * typeck.c (build_binary_op): Fix logic for warning. Move warning
6019 * call.c (convert_like_real): Don't warn when converting to
6022 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6024 * decl.c (pop_label): Replace warning with call to
6025 warn_for_unused_label.
6027 2007-01-28 Andrew Pinski <pinskia@gmail.com>
6030 * semantics.c (finish_pseudo_destructor_expr): Check the
6031 destrutor name by calling check_dtor_name.
6033 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
6035 * lex.c (D_CPP0X): Rename.
6037 (reswords): D_CPP0X -> D_CXX0X.
6038 (init_reswords): Ditto.
6039 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
6040 of C++0x keywords as identifiers.
6042 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
6045 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
6048 2007-01-23 Ian Lance Taylor <iant@google.com>
6050 * typeck.c (convert_for_assignment): Only warn about a = b = c
6051 when converting to bool.
6053 2007-01-23 Roger Sayle <roger@eyesopen.com>
6055 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
6057 * typeck.c (ignore_overflows): Remove the remaining uses of
6058 TREE_CONSTANT_OVERFLOW.
6060 2007-01-20 Jan Hubicka <jh@suse.cz>
6062 * decl2.c (start_objects, start_static_storage_duration_function):
6063 Do not make the functions uninlinable.
6065 2007-01-17 Ian Lance Taylor <iant@google.com>
6067 * class.c (add_method): Call VEC_reserve_exact rather than passing
6068 a negative size to VEC_reserve.
6070 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
6073 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
6075 2007-01-10 Mark Mitchell <mark@codesourcery.com>
6078 * decl.c (make_typename_type): If the qualified name is not a
6079 type, issue an error.
6080 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
6083 2007-01-08 Geoffrey Keating <geoffk@apple.com>
6085 * rtti.c: Include target.h.
6086 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
6087 don't emit typeinfo for fundamental types as weak.
6088 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
6090 2007-01-08 Richard Guenther <rguenther@suse.de>
6092 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
6094 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
6096 * call.c (standard_conversion): Pass flag to
6097 vector_types_convertible_p to disallow emission of note.
6098 * typeck.c (convert_for_assignment): Pass flag to
6099 vector_types_convertible_p to allow emission of note.
6100 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
6101 to disallow emission of note.
6103 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6106 * typeck.c (build_binary_op): Call overflow_warning if
6107 TREE_OVERFLOW_P is true for the result and not for any of the
6110 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
6113 * class.c (add_method): Don't wait until template
6114 instantiation time to complain about duplicate methods.
6116 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6119 * semantics.c (finish_unary_op_expr): Warn only if result
6120 overflowed and operands did not.
6122 2007-01-05 Ian Lance Taylor <iant@google.com>
6124 * typeck.c (build_binary_op): Warn about comparing a non-weak
6127 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
6129 * pt.c (tsubst): Propagate the need for structural equality checks
6130 when reducing the level of template parameters.
6132 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
6134 * pt.c: Fix a comment typo.
6136 2007-01-02 Ian Lance Taylor <iant@google.com>
6138 * semantics.c (maybe_convert_cond): Optionally warn when using an
6139 assignment as a condition.
6140 * typeck.c (convert_for_assignment): Optionally warn about
6141 assigning the result of an assignment to a bool.
6143 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6145 * pt.c (canonical_template_parms): Correct typo in comment.
6147 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
6149 * typeck.c (structural_comptypes): Renamed from "comptypes".
6150 (comptypes): Use canonical type information to perform fast type
6151 comparison. When VERIFY_CANONICAL_TYPES, verify that the
6152 canonical type comparison returns the same results as we would see
6153 from the current, structural check. Support COMPARE_STRUCTURAL
6154 when we need structural checks.
6155 * decl.c (typename_compare): Fix comment.
6156 (build_typename_type): TYPENAME_TYPE nodes require structural
6157 equality checks, because they resolve different based on the
6159 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
6160 require structural equality checks (for now).
6161 (build_ptrmemfunc_type): Build the canonical pointer to member
6163 (compute_array_index_type): Whenever we build a new index type
6164 to represent the size of an array in a template, we need to mark
6165 this index type as requiring structural equality. This goes for
6166 arrays with value-dependent sizes with the current ABI, or all
6168 * tree.c (cplus_array_hash): New.
6169 (struct cplus_array_info): New.
6170 (cplus_array_compare): New.
6171 (cplus_array_htab): New.
6172 (build_cplus_array_type_1): Use a hash table to cache the array
6173 types we build. Build the canonical array type for each array
6175 (cp_build_qualified_type_real): When building a cv-qualified array
6176 type, use the hash table of array types and build canonical array
6178 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
6179 use structural equality (for now).
6180 * cp-tree.h (COMPARE_STRUCTURAL): New.
6181 * pt.c (canonical_template_parms): New.
6182 (canonical_type_parameter): New.
6183 (process_template_parm): Find the canonical type parameter.
6184 (lookup_template_class): When we have named the primary template
6185 type, set the canonical type for our template class to the primary
6186 template type. If any of the template arguments need structural
6187 equality checks, the template class needs structural equality
6189 (tsubst): When reducing the level of a template template
6190 parameter, we require structural equality tests for the resulting
6191 parameter because its template parameters have not had their types
6192 canonicalized. When reducing a template type parameter, find the
6193 canonical reduced type parameter.
6194 (any_template_arguments_need_structural_equality_p): New.