1 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4 * parser.c (cp_parser_omp_for_loop): Handle parenthesized
7 2008-08-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9 * parser.c: Update all calls to inform.
16 * typeck2.c: Likewise.
18 * name-lookup.c: Likewise.
21 2008-08-19 Jakub Jelinek <jakub@redhat.com>
24 * error.c (cp_print_error_function): Deal with recursive BLOCK trees.
26 2008-08-18 Tomas Bily <tbily@suse.cz>
28 * tree.c (cp_tree_equal): Use CONVERT_EXPR_CODE_P.
30 2008-08-18 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
32 * typeck.c: Update all callers of permerror.
39 * typeck2.c: Likewise.
41 * semantics.c: Likewise.
42 * name-lookup.c: Likewise.
47 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
50 * pt.c (check_template_shadow): Change to return a bool.
51 * name-lookup.c (push_class_level_binding): Early return if
52 check_template_shadow returns false.
53 * cp-tree.h (check_template_shadow): Adjust declaration.
55 2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
58 * decl.c (grokdeclarator): In case of extern and initializer, return
59 error_mark_node after the error.
61 2008-08-13 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
64 * decl.c (grokfndecl): Call check_main_parameters_type only if
67 2008-08-12 Paolo Carlini <paolo.carlini@oracle.com>
70 * parser.c (cp_parser_class_head): Early return error_mark_node in
71 case of global qualification of class name or qualified name that
72 does not name a class.
74 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
77 * cvt.c (ocp_convert): Warn for out-of-range conversions to enum.
79 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
82 * cp-tree.h (struct diagnostic_context, struct diagnostic_info):
83 Delete forward declarations. Check that toplev.h has not been
84 included before this file. Include toplev.h and diagnostic.h.
85 * error.c (cp_cpp_error): Use DK_PEDWARN.
86 (cxx_incomplete_type_diagnostic): Update declaration.
87 (cxx_incomplete_type_error): Use DK_ERROR.
88 * typeck2.c (cxx_incomplete_type_diagnostic): Take a diagnostic_t
89 as argument. Use emit_diagnostic.
90 (cxx_incomplete_type_error): Use DK_ERROR.
91 (add_exception_specifier): Use diagnostic_t instead of custom
93 * typeck.c (complete_type_or_else): Update call to
94 cxx_incomplete_type_diagnostic.
95 * init.c (build_delete): Likewise.
96 * call.c (diagnostic_fn_t): Remove unused typedef.
97 (build_temp): Pass a pointer to diagnostic_t.
98 (convert_like_real): Use emit_diagnostic.
99 (joust): Check return value of warning before giving informative
101 * friend.c (do_friend): Check return value of warning
102 before giving informative note.
103 * parser.c (cp_parser_template_id): Likewise.
105 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
108 * class.c (check_bases_and_members): Warn with -Wuninitialized
111 2008-08-08 Volker Reichelt <v.reichelt@netcologne.de>
114 * decl.c (xref_basetypes): Check base for MAYBE_CLASS_TYPE_P,
115 and make sure it is not a union.
117 2008-08-07 H.J. Lu <hongjiu.lu@intel.com>
119 * semantics.c (finish_decltype_type): Initialize type.
121 2008-08-07 Douglas Gregor <doug.gregor@gmail.com>
123 * semantics.c (finish_decltype_type): Handle calls to function
124 pointers and references to functions properly.
126 2008-08-06 Douglas Gregor <doug.gregor@gmail.com>
129 * parser.c (cp_parser_template_argument): Don't assume that '>>'
130 following a type-id is an error when in C++0x mode.
132 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
135 * decl.c (grokdeclarator): Use explicit location with permerror_at.
137 2008-08-06 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
140 * typeck.c (cp_build_binary_op): Move code to c-common.c.
142 2008-08-05 Jason Merrill <jason@redhat.com>
145 * decl.c (build_ptrmemfunc_type): Don't require structural
146 comparison of PMF types.
147 * tree.c (cp_build_qualified_type_real): Don't clear
148 a valid TYPE_PTRMEMFUNC_TYPE.
149 * typeck.c (cp_build_unary_op): Still do build_ptrmemfunc in
152 2008-08-04 Jason Merrill <jason@redhat.com>
155 * typeck2.c (check_narrowing): Allow narrowing conversion
156 from an explicit floating-point constant.
159 * pt.c (tsubst_decl): Leave DECL_INITIAL set on deleted
162 2008-08-04 Simon Baldwin <simonb@google.com>
165 * parser.c (cp_parser_elaborated_type_specifier): Warn only when
166 the declaration's id is followed by a semicolon.
168 2008-07-31 Jakub Jelinek <jakub@redhat.com>
171 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
172 complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.
174 2008-07-31 Jason Merrill <jason@redhat.com>
177 * init.c (build_new_1): Don't convert pointer to the data type
178 until we're actually going to treat it as that type.
181 * tree.c (build_aggr_init_expr): Split out...
182 (build_cplus_new): ...from here.
183 (stabilize_init): Don't mess with AGGR_INIT_EXPR either.
184 * init.c (build_new_1): new T() means value-initialization,
185 not default-initialization.
186 (build_vec_init): Likewise.
187 (build_value_init_1): Use build_aggr_init_expr.
189 2008-07-30 Dodji Seketeli <dseketel@redhat.com>
192 * decl2.c (fix_temporary_vars_context_r): New function.
193 (one_static_initialization_or_destruction): Make sure temporary
194 variables part of the initialiser have their DECL_CONTEXT()
197 2008-07-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
200 * typeck.c (build_binary_op): Encapsulate code into
203 2008-07-29 Jakub Jelinek <jakub@redhat.com>
206 * tree.c (cplus_array_hash, build_cplus_array_type_1): Hash on
207 TYPE_UID instead of pointers.
209 2008-07-29 Jan Hubicka <jh@suse.cz>
211 * optimize.c (maybe_clone_body): Remove DECL_INLINE.
212 * decl.c (duplicate_decls): Likewise.
213 (grokfndecl): Likewise.
214 (start_method): Likewise.
215 * method.c (make_thunk, make_alias_for, implicitly_declare_fn):
217 * pt.c (register_specialization, regenerate_decl_from_template):
219 * decl2.c (grokfield): Likewise.
221 2008-07-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
224 * decl.c (duplicate_decls): Merge USED flags.
226 2008-07-27 Jason Merrill <jason@redhat.com>
229 * decl.c (reshape_init_r): Allow C++0x initializer lists.
231 2008-07-28 Richard Guenther <rguenther@suse.de>
233 Merge from gimple-tuples-branch.
235 2008-07-22 Aldy Hernandez <aldyh@redhat.com>
237 * cp-gimplify.c (gimplify_if_stmt): Set location on newly created
240 2008-07-18 Jakub Jelinek <jakub@redhat.com>
242 * decl.c (finish_function): Call gimple_body after cp_genericize.
244 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
246 * optimize.c: Include gimple.h instead of tree-gimple.h.
247 * Make-lang.in (cp-gimplify.o): Depend on tree-iterator.h.
248 * cp-gimplify.c: Rename tree-gimple.h to gimple.h. Include
251 2008-07-16 Jakub Jelinek <jakub@redhat.com>
253 * optimize.c (maybe_clone_body): Clear DECL_SAVED_TREE for the clone.
255 2008-07-14 Jakub Jelinek <jakub@redhat.com>
257 * cp-gimplify.c (cp_gimplify_expr): Update comment.
259 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
261 * cp-tree.h (union lang_tree_node): Rename GENERIC_NEXT to
263 * cp-gimplify.c (cxx_omp_clause_apply_fn): Rename
264 GIMPLE_MODIFY_STMT to MODIFY_EXPR.
265 (cxx_omp_clause_copy_ctor): Same.
266 (cxx_omp_clause_assign_op): Same.
268 2008-05-28 Jakub Jelinek <jakub@redhat.com>
270 * cp-gimplify.c (cp_gimplify_omp_for): Add pre_p argument. Tuplify.
271 (cp_gimplify_expr): Adjust caller.
273 2008-05-11 Doug Kwan <dougkwan@google.com>
275 * init.c (build_vec_delete): Add type conversion for argument
276 0 of POINTER_PLUS_EXPR.
278 2008-04-29 Doug Kwan <dougkwan@google.com>
280 * decl2 (File): Include "gimple.h"
281 (cp_write_global_declarations): Use gimple_body instead of
283 * Make-lang.in (cp/decl2.o): Add $(GIMPLE_H)
285 2008-04-10 Diego Novillo <dnovillo@google.com>
287 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00913.html
289 * optimize.c (maybe_clone_body): Re-enable call to
291 * cp-gimplify.c (cp_gimplify_omp_for): Mark disabled
292 code with call to gimple_unreachable.
293 (cp_genericize): Fix handling of clone bodies.
295 2008-04-04 Diego Novillo <dnovillo@google.com>
297 http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00413.html
299 * optimize.c (maybe_clone_body): Re-enable.
301 2008-02-19 Diego Novillo <dnovillo@google.com>
302 Oleg Ryjkov <olegr@google.com>
304 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
306 * cp-gimplify.c (gimplify_for_stmt): Change gimple_seq
307 argument to gimple_seq *. Update all users.
308 (gimplify_must_not_throw_expr): Likewise.
310 2008-02-04 Oleg Ryjkov <olegr@google.com>
312 * except.c: Include gimple.h
313 (cp_protect_cleanup_actions): Convert to tuples.
314 * Make-lang.in (cp/except.o): Add dependency on gimple.h
316 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
318 * cp-gimplify.c (gimplify_cp_loop): Call tree_annotate_all_with_locus
319 instead of annotating each block manually.
321 2007-10-30 Aldy Hernandez <aldyh@redhat.com>
323 * cp-gimplify.c (gimplify_cp_loop): Tuplify.
324 (gimplify_for_stmt): Same.
325 (gimplify_switch_stmt): Same.
326 (cp_gimplify_expr): [FOR_STMT]: Do not call gimplify_for_stmt. Return
328 [WHILE_STMT]: Return GS_OK.
330 [CONTINUE_STMT]: Same.
332 (cp_genericize): Set gimple_body() of cloned functions when needed.
334 2007-10-29 Aldy Hernandez <aldy@quesejoda.com>
336 * cp-gimplify.c: Move build_gimple_eh_filter_tree here.
337 (cp_gimplify_init_expr): Convert to tuples.
338 (gimplify_must_not_throw_expr): Make function return a
339 gimplify_status and convert to tuples.
341 2007-10-18 Aldy Hernandez <aldy@quesejoda.com>
343 * cp-gimplify.c (genericize_try_block): Enable and do not call
345 (genericize_catch_block): Same.
346 (genericize_eh_spec_block): Same.
347 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
348 (cp_gimplify_expr): Enable TRY_BLOCK, HANDLER, and EH_SPEC_BLOCK.
350 2007-10-16 Aldy Hernandez <aldy@quesejoda.com>
352 * optimize.c (maybe_clone_body): Comment out call to clone_body.
353 * decl.c (finish_function): Use gimple_body instead of
355 * cp-tree.h (cp_gimplify_expr): Last 2 arguments are sequences.
356 * cp-gimplify.c (genericize_try_block): Comment out.
357 (genericize_catch_block): Same.
358 (genericize_eh_spec_block): Same.
359 (gimplify_cp_loop): Comment out calls to gimplify_stmt.
360 (gimplify_for_stmt): Comment out.
361 (gimplify_switch_stmt): Comment out call to gimplify_stmt.
362 (cp_gimplify_omp_for): Same.
363 (gimplify_must_not_throw_expr): Argument pre_p is a sequence.
364 Comment out call to gimplify_stmt and append_to_statement_list.
365 Rename gimple_build_eh_filter_tree to build_gimple_eh_filter_tree.
366 (cp_gimplify_init_expr): Arguments pre_p and post_p are sequences.
367 (cp_gimplify_expr): Same.
368 Comment out calls to genericize_*_block. Comment out call to
371 2008-07-27 H.J. Lu <hongjiu.lu@intel.com>
374 * class.c (type_has_user_provided_default_constructor): Handle
377 2008-07-27 Paolo Carlini <paolo.carlini@oracle.com>
379 * decl.c (push_library_fn): Add a parameter for the exceptions that
380 the function may throw.
381 (push_void_library_fn, push_throw_library_fn, expand_static_init):
383 (build_library_fn): Change to static.
384 * cp-tree.h: Adjust declarations.
385 * except.c (declare_nothrow_library_fn): New.
386 (do_get_exception_ptr, do_begin_catch, do_free_exception,
387 do_allocate_exception): Use the latter, adjust the declarations
388 (ie, add empty exception-specification), consistently with the
389 actual implementation in libsupc++.
391 2008-07-25 Jan Hubicka <jh@suse.cz>
393 * typeck.c (inline_conversion): Remove.
394 (cp_build_function_call): Do not use inline_conversion.
395 * decl.c (duplicate_decls): Do not insist on inline being declared
397 (start_cleanup_fn): Do not assume that INLINE flags prevent function
398 from being output. We now remove static functions always.
399 (finish_function): Do return warning on all static functions.
400 * call.c (build_over_call): Do not use inline_conversion.
401 * cp-tree.h (possibly_inlined_p): Declare.
402 (inline_conversion): Remove.
403 * pt.c (instantiate_decl): Use possibly_inlined_p predicate.
404 * decl2.c (cp_write_global_declarations): Likewise.
405 (mark_used): Likewise.
406 (possibly_inlined_p): New functions.
408 2008-07-25 Jason Merrill <jason@redhat.com>
410 * class.c (type_has_user_provided_default_constructor): Handle
413 2008-07-23 Jan Hubicka <jh@suse.cz>
415 * decl.c (duplicate_decls): Update comment and unit-at-a-time.
416 (grogfndecl): Drop flag_inline_trees code.
417 * pt.c (instantiate_decl): Drop flag_iline_trees code.
418 * lex.c (cxx_init): Do not set unit-at-a-time.
420 2008-07-23 Jason Merrill <jason@redhat.com>
422 * mangle.c (write_unqualified_name): Avoid infinite recursion when
423 trying to mangle a decl with no name.
425 Implement defaulted/deleted functions as per N2346
426 * cp-tree.h (struct lang_decl_flags): Add defaulted_p bitfield.
427 (DECL_DELETED_FN): New macro.
428 (DECL_DEFAULTED_FN): New macro.
429 * class.c (user_provided_p): New fn.
430 (defaultable_fn_p): New fn.
431 (type_has_user_provided_constructor): New fn.
432 (type_has_user_provided_default_constructor): New fn.
433 (check_methods): A defaulted fn is still trivial.
434 (check_bases_and_members): Likewise.
435 * decl.c (grok_special_member_properties): Likewise.
436 (duplicate_decls): Complain about redeclaring a function as deleted.
437 (start_decl): initialized==2 means deleted.
438 (cp_finish_decl): Handle deleted/defaulted semantics.
439 * decl2.c (grokfield): Likewise.
440 (mark_used): Check DECL_DEFAULTED_FN instead of DECL_ARTIFICIAL.
441 Complain about using a deleted fn.
442 * init.c (build_value_init_1): Use type_has_user_provided_constructor.
443 (perform_member_init): Check for a user-provided default constructor
444 even if TYPE_NEEDS_CONSTRUCTING.
445 (build_new_1): Likewise.
446 * call.c (build_over_call): Don't call mark_used twice.
447 * method.c (implicitly_declare_fn): Set DECL_DEFAULTED_FN.
448 * search.c (check_final_overrider): Check for deleted mismatch.
449 * parser.c (cp_parser_init_declarator): Tell start_decl about =delete.
450 (cp_parser_pure_specifier): Handle =default and =delete.
452 * error.c (maybe_warn_cpp0x): Suggest -std=gnu++0x as well.
454 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
457 * typeck.c: All calls to pedwarn changed.
458 * decl.c: All calls to pedwarn changed.
459 * call.c: All calls to pedwarn changed.
460 * error.c: All calls to pedwarn changed.
461 * typeck2.c: All calls to pedwarn changed.
462 * pt.c: All calls to pedwarn changed.
463 * name-lookup.c: All calls to pedwarn changed.
464 * parser.c: All calls to pedwarn changed.
466 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
468 * call.c: Fix comment typos.
470 * cp-tree.h: Likewise.
471 * cxx-pretty-print.c: Likewise.
474 * name-lookup.c: Likewise.
475 * operators.def: Likewise.
476 * parser.c: Likewise.
479 * typeck.c: Likewise.
481 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
485 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Only check
486 copy constructors and copy assignment operators proper.
488 2008-07-21 Rafael Avila de Espindola <espindola@google.com>
490 * parser.c (cp_token): Remove in_system_header.
491 (eof_token): Remove in_system_header.
492 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
493 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
494 (cp_parser_member_declaration): Use in_system_header_at.
495 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
496 (pop_tinst_level): Don't set in_system_header.
497 (instantiate_class_template): Don't set in_system_header.
498 (instantiate_decl): Don't set in_system_header.
499 (instantiate_pending_templates): Don't set in_system_header.
501 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
504 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
505 TYPE_NOTHROW_P, not TREE_NOTHROW.
506 (trait_expr_value): Likewise.
508 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
511 * call.c (convert_like_real): Don't take the error code path
512 when a rvalue or base conversion has the bad_p field set.
514 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
516 * rtti.c (emit_support_tinfos): Add char16_type_node and
518 * typeck2.c (digest_init): Support char16_t and char32_t.
520 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
522 * cvt.c (convert_to_void): Avoid C++ keywords.
523 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
525 * friend.c (is_friend): Likewise.
526 * init.c (perform_member_init): Likewise.
527 * mangle.c (write_template_prefix, write_template_template_param):
529 * name-lookup.c (do_namespace_alias, do_using_directive,
530 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
531 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
532 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
534 * pt.c (is_specialization_of_friend, lookup_template_class,
535 push_tinst_level, instantiate_class_template,
536 tsubst_copy_and_build): Likewise.
537 * tree.c (add_stmt_to_compound): Likewise.
538 * typeck.c (finish_class_member_access_expr): Likewise.
540 2008-07-17 Julian Brown <julian@codesourcery.com>
541 Mark Mitchell <mark@codesourcery.com>
543 * decl2.c (determine_visibility): Allow target to override
544 visibility of class data.
546 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
549 * semantics.c (trait_expr_value): Update __has_trivial_destructor
550 semantics to the current WP (N2691).
552 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
555 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
556 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
557 complies with exception specification constraints.
559 2008-07-14 Jason Merrill <jason@redhat.com>
561 * lex.c (init_reswords): Always set D_OBJC.
563 2008-07-11 Tom Tromey <tromey@redhat.com>
564 Ian Lance Taylor <iant@google.com>
566 * lex.c (struct resword, reswords): Don't define.
567 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
568 (init_reswords): Clarify mask code. Use c_common_reswords rather
571 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
574 * decl.c (grokdeclarator): Warn about initializing variables
575 of storage class 'extern' only after the type of the declarator
576 has been properly computed.
578 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
581 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
582 carries the location of the primary type.
583 * parser.c (cp_parser_check_type_definition): Update documentation.
584 (cp_parser_check_for_definition_in_return_type,
585 cp_parser_check_for_invalid_template_id,
586 cp_parser_set_decl_spec_type,
587 cp_parser_check_for_definition_in_return_type,
588 cp_parser_diagnose_invalid_type_name,
589 cp_parser_new_expression, cp_parser_explicit_instantiation,
590 cp_parser_type_specifier, cp_parser_simple_type_specifier,
591 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
594 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
598 * semantic.c (qualified_name_lookup_error, finish_id_expression):
599 Add a location_t parameter so that
600 error message can have a more accurate location.
601 * cp-tree.h: Updated prototype
602 * pt.c (tsubst_qualified_id): Use location in error messages.
603 * parser.c (cp_parser_postfix_expression,
604 cp_parser_objc_statement, cp_parser_trait_expr,
605 cp_parser_token_is_class_key,
606 cp_parser_uncommitted_to_tentative_parse_p,
607 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
608 cp_parser_error, cp_parser_name_lookup_error,
609 cp_parser_simulate_error, cp_parser_check_decl_spec,
610 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
611 cp_parser_diagnose_invalid_type_name,
612 cp_parser_parse_and_diagnose_invalid_type_name,
613 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
614 cp_parser_string_literal, cp_parser_primary_expression,
615 cp_parser_primary_expression, cp_parser_unqualified_id,
616 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
617 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
618 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
619 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
620 cp_parser_jump_statement, cp_parser_block_declaration,
621 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
622 cp_parser_function_specifier_opt, cp_parser_decltype,
623 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
624 cp_parser_mem_initializer_id, cp_parser_template_parameter,
625 cp_parser_type_parameter, cp_parser_template_id,
626 cp_parser_template_name, cp_parser_template_argument): Likewise.
628 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
631 * pt.c (tsubst_function_type): Remove warning for type qualifiers
632 on function return type.
634 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
637 * pt.c (tsubst_function_type): Don't warn for type qualifiers
638 on function return type in case of system header.
640 2008-07-09 Raksit Ashok <raksit@google.com>
642 * parser.c (cp_parser_postfix_expression): New warning based on flag
643 warn_disallowed_functions.
645 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
648 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
649 functions declared with a storage class qualifier.
651 2008-07-03 Richard Guenther <rguenther@suse.de>
654 * typeck.c (cp_build_function_call): Move code to verify
655 builtin function arguments ...
656 * call.c (build_cxx_call): ... here.
658 2008-07-02 Jason Merrill <jason@redhat.com>
660 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
662 Implement WG21 N2672, Initializer List proposed wording
663 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
664 (struct lang_type_class): Add has_list_ctor bitfield.
665 (TYPE_HAS_LIST_CTOR): New macro.
666 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
667 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
668 (LOOKUP_NO_NARROWING): New macro.
669 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
670 * parser.c (cp_parse_braced_list): Split out from...
671 (cp_parser_initializer_clause): ...here.
672 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
674 (cp_lexer_next_token_is_not_keyword): New fn.
675 (cp_parser_parenthesized_expression_list): Handle { }.
676 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
677 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
678 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
679 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
680 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
681 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
682 (cp_parser_save_member_function_body): Likewise.
683 * call.c (conversion_kind): Add ck_list, ck_aggr.
684 (struct conversion): Add check_narrowing bitfield, conversion list.
685 (build_list_conv): New fn.
686 (build_aggr_conv): New fn.
687 (implicit_conversion): Call them.
688 (standard_conversion): Set check_narrowing if appropriate.
689 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
690 (build_user_type_conversion_1): When converting from an init list,
691 we allow additional conversions except when calling a copy ctor.
692 (convert_like_real): Calling an explicit ctor for an init list is
693 ill-formed. Handle ck_list and ck_addr. Check narrowing.
694 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
695 class doesn't have a list ctor, break the {} into a TREE_LIST.
696 (compare_ics): ck_list is better than other UDCs.
697 (set_up_extended_ref_temp): Split out from initialize_reference.
698 (is_std_init_list): New fn.
699 (is_list_ctor): New fn.
700 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
701 (reshape_init_array_1): Pass it to build_constructor.
702 (reshape_init_class): Ditto.
703 (initialize_artificial_var): Pass the appropriate type.
704 (build_aggr_init_full_exprs): Split out from...
705 (check_initializer): ...here. Handle new semantics.
706 (build_init_list_var_init): New subroutine of check_initializer.
707 (grokdeclarator): Converting constructors can have more than one parm.
708 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
709 * init.c (expand_default_init): Only do digest_init for aggregates.
710 * rtti.c (tinfo_base_init): Pass init_list_type_node to
711 build_constructor_from_list.
712 (generic_initializer, ptr_initializer): Ditto.
713 (ptm_initializer, class_initializer): Ditto.
714 (get_pseudo_ti_init): Ditto.
715 * error.c (dump_type): Handle init_list_type_node.
716 (maybe_warn_cpp0x): New fn.
717 (maybe_varn_variadic_templates): Call it.
718 * cvt.c (ocp_convert): Handle conversion from { }.
719 * tree.c (build_array_of_n_type): New fn.
720 * typeck2.c (store_init_value): Use init_list_type_node.
721 (digest_init): Likewise.
722 (check_narrowing): New fn.
723 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
724 of vector of constructor elts. Handle non-aggregate types. Make
725 constant literals static.
726 * pt.c: (tsubst_copy_and_build): Adjust.
728 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
730 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
732 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
733 (comp_ptr_ttypes_const): Likewise.
735 2008-07-01 Andrew Haley <aph@redhat.com>
737 * decl.c (finish_constructor_body): Don't set the return value of
738 the constructor if the constructor is that of a Java type.
740 2008-06-30 Jakub Jelinek <jakub@redhat.com>
743 * decl2.c (is_late_template_attribute): If the first attribute
744 argument is IDENTIFIER_NODE, don't consider it when checking
745 if arguments are value or type dependent.
747 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
750 * pt.c (do_type_instantiation): In c++0x mode do not warn for
753 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
755 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
757 2008-06-28 Jakub Jelinek <jakub@redhat.com>
760 * repo.c (repo_emit_p): Put const static data members initialized
761 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
764 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
767 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
770 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
773 * typeck.c (cp_build_function_call): Show example syntax in
776 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
778 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
779 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
780 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
781 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
782 pedwarn to permerror.
783 * init.c (perform_member_init, build_new_1, build_new): Likewise.
784 * decl.c (warn_extern_redeclared_static, duplicate_decls,
785 * identify_goto, check_previous_goto_1, check_goto, define_label,
786 check_tag_decl, start_decl, check_class_member_definition_namespace,
787 grokfndecl, grokdeclarator): Likewise.
788 * except.c (check_handlers): Likewise.
789 * typeck2.c (digest_init): Likewise.
790 * pt.c (check_specialization_namespace,
791 check_explicit_instantiation_namespace,
792 maybe_process_partial_specialization, check_explicit_specialization,
793 convert_template_argument, do_decl_instantiation,
794 do_type_instantiation, instantiate_decl): Likewise.
795 * semantics.c (finish_template_type_parm): Likewise.
796 * name-lookup.c (pushdecl_maybe_friend,
797 check_for_out_of_scope_variable): Likewise.
798 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
799 coerce_new_type): Likewise.
800 * parser.c (cp_parser_nested_name_specifier_opt,
801 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
802 cp_parser_class_head, cp_parser_check_class_key): Likewise.
803 (cp_parser_parameter_declaration): Check flag_permissive instead of
804 flag_pedantic_errors.
805 * call.c (joust): Change pedwarn to warning.
806 * friend.c (make_friend_class): Likewise.
808 2008-06-16 Jan Hubicka <jh@suse.cz>
810 * method.c: Include cgraph.h.
811 (use_thunk): Use cgraph_add_new_function instead of calling backend
814 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
816 * parser.c: Fix comment typo.
818 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
821 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
822 grokdeclarator and apply it to the created declaration.
823 * cp-tree.h (grokbitfield): Update prototype.
824 * parser.c (cp_parser_member_declaration): Don't apply the attributes
825 since they are now applied in grokbitfield. Adjusted the call to
827 (cp_parser_objc_class_ivars): Likewise.
829 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
832 * class.c (type_requires_array_cookie): Do not consider delete[]
833 operators with an ellipsis as second argument.
835 2008-06-09 Jakub Jelinek <jakub@redhat.com>
838 * semantics.c (stmt_expr_value_expr): Don't crash on empty
841 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
844 * pt.c (maybe_process_partial_specialization): Check the tree
845 returned by push_template_decl for error_mark_node.
846 * parser.c (cp_parser_class_head): Likewise, check the tree
847 returned by the latter.
849 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
852 * decl.c (grokdeclarator): In case of wrong return type return
853 immediately error_mark_node.
855 2008-06-06 Jakub Jelinek <jakub@redhat.com>
857 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
858 dependent_omp_for_p, begin_omp_task, finish_omp_task,
859 finish_omp_taskwait): New prototypes.
860 (cxx_omp_clause_default_ctor): Add outer argument.
861 (finish_omp_for): Add new clauses argument.
862 * cp-gimplify.c (cxx_omp_finish_clause): New function.
863 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
864 (cxx_omp_clause_default_ctor): Add outer argument.
865 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
866 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
867 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
868 Add par_clauses argument. If decl is present in parallel's
869 lastprivate clause, change that clause to shared and add
870 a lastprivate clause for decl to OMP_FOR_CLAUSES.
871 Fix wording of error messages. Adjust finish_omp_for caller.
872 Add clauses argument. Parse loops with random access iterators.
873 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
875 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
876 cp_parser_omp_for_loop callers.
877 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
879 (cp_parser_omp_clause_name): Handle collapse and untied
881 (cp_parser_omp_clause_schedule): Handle auto schedule.
882 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
883 and PRAGMA_OMP_CLAUSE_UNTIED.
884 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
885 (OMP_TASK_CLAUSE_MASK): Define.
886 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
887 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
888 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
890 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
891 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
892 (tsubst_omp_for_iterator): New function.
893 (dependent_omp_for_p): New function.
894 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
895 loops. Adjust finish_omp_for caller. Handle loops with random
896 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
897 (tsubst_expr): Handle OMP_TASK.
898 * semantics.c (cxx_omp_create_clause_info): New function.
899 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
901 (cxx_omp_predetermined_sharing): Removed.
902 * semantics.c (finish_omp_for): Allow pointer iterators. Use
903 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
904 collapsed for loops. Adjust c_finish_omp_for caller. Add new
905 clauses argument. Fix check for type dependent cond or incr.
906 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
907 fold_convert to convert incr amount to difference_type. Only
908 fold if not in template. If decl is mentioned in lastprivate
909 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
910 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
912 (finish_omp_threadprivate): Allow static class members of the
914 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
915 finish_omp_taskwait): New functions.
917 * parser.c (cp_parser_binary_expression): Add prec argument.
918 (cp_parser_assignment_expression): Adjust caller.
919 * cp-tree.h (outer_curly_brace_block): New prototype.
920 * decl.c (outer_curly_brace_block): No longer static.
922 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
925 * pt.c (push_template_decl_real): Consistently return error_mark_node
928 2008-06-02 Tomas Bily <tbily@suse.cz>
930 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
931 (cp_build_unary_op): Likewise.
932 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
933 (maybe_warn_about_returning_address_of_local): Likewise.
935 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
938 * pt.c (tsubst_initializer_list): Consistently check the tree
939 returned by tsubst_pack_expansion for error_mark_node.
941 2008-05-27 Michael Matz <matz@suse.de>
944 * call.c (build_new_op): Make warning conditional on
947 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
950 * call.c (convert_like_real): Convert bitfield to desired type
951 before creating temporary.
953 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
955 * Makefile.in: Adjusted dependencies on c-incpath.o.
957 2008-05-23 Jakub Jelinek <jakub@redhat.com>
960 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
961 fold_build_cleanup_point_expr on build_call_a results.
964 * semantics.c (omp_clause_info_fndecl): New function.
965 (finish_omp_clauses): Use it.
967 2008-05-21 Jakub Jelinek <jakub@redhat.com>
970 * cp-tree.h (check_array_initializer): New prototype.
971 * decl.c (check_array_initializer): New function.
972 (check_initializer): Call it.
973 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
975 2008-05-21 Tom Tromey <tromey@redhat.com>
977 * mangle.c (save_partially_mangled_name): Remove.
978 (restore_partially_mangled_name): Likewise.
979 (write_encoding): Update.
980 (write_unqualified_name): Likewise.
981 (start_mangling): Always use name_obstack. Remove 'ident_p'
983 (get_identifier_nocopy): Remove.
984 (finish_mangling_internal): Rename from finish_mangling.
985 (finish_mangling): New function.
986 (finish_mangling_get_identifier): Likewise.
987 (partially_mangled_name, partially_mangled_name_len): Remove.
988 (mangle_decl_string): Change return type. Update.
989 (mangle_decl, mangle_type_string, mangle_special_for_type,
990 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
991 mangle_ref_init_variable): Update.
993 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
996 * semantics.c (begin_class_definition): Extend checks on the first
999 2008-05-12 Tomas Bily <tbily@suse.cz>
1001 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
1002 * call.c (build_over_call): Likewise.
1003 * error.c (dump_expr): Use CASE_CONVERT.
1004 * class.c (fixed_type_or_null): Likewise.
1006 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
1008 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
1010 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
1013 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1015 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
1016 DECL_LOOPING_CONST_OR_PURE_P attributes.
1017 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
1020 2008-05-02 Simon Baldwin <simonb@google.com>
1023 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
1025 2008-05-01 Simon Baldwin <simonb@google.com>
1027 * typeck.c (build_array_ref): Call warn_array_subscript_range.
1029 2008-04-30 Jakub Jelinek <jakub@redhat.com>
1032 * pt.c (more_specialized_fn): Stop the loop even if there are no
1033 arguments before ellipsis.
1035 2008-04-29 Jakub Jelinek <jakub@redhat.com>
1038 * parser.c (cp_parser_lookup_name): Look through single function
1042 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
1043 COMPOUND_EXPR if the second argument would be error_mark_node.
1045 2008-04-28 Jason Merrill <jason@redhat.com>
1046 Liu Guanwei <liu_gw@163.com>
1049 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
1050 in default arguments.
1052 2008-04-25 Jan Hubicka <jh@suse.cz>
1054 * typeck.c (check_return_expr): Update.
1055 * decl.c (start_preparsed_function): Update.
1056 * method.c (use_thunk): Update.
1058 2008-04-24 Jakub Jelinek <jakub@redhat.com>
1061 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
1062 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
1063 * decl2.c (is_late_template_attribute): Only make vector_size
1064 late tmpl attribute if argument is type or value dependent.
1065 (cp_reconstruct_complex_type): New function.
1067 2008-04-24 Richard Guenther <rguenther@suse.de>
1069 * typeck.c (cp_build_function_call): Call
1070 check_builtin_function_arguments.
1072 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1074 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
1075 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
1076 * init.c (build_zero_init): Don't set TREE_INVARIANT.
1077 * class.c (build_base_path): Don't set TREE_INVARIANT.
1078 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
1079 (build_vtbl_initializer): Don't set TREE_INVARIANT.
1080 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
1081 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
1082 (generic_initializer): Don't set TREE_INVARIANT.
1083 (ptr_initializer): Don't set TREE_INVARIANT.
1084 (ptm_initializer): Don't set TREE_INVARIANT.
1085 (class_initializer): Don't set TREE_INVARIANT.
1086 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
1087 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
1088 (build_template_parm_index): Don't set TREE_INVARIANT.
1089 (reduce_template_parm_level): Don't set TREE_INVARIANT.
1090 (process_template_parm): Don't set TREE_INVARIANT.
1092 2008-04-22 Jason Merrill <jason@redhat.com>
1095 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
1096 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
1097 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
1099 2008-04-22 Jakub Jelinek <jakub@redhat.com>
1102 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
1103 expression is errorneous.
1105 2008-04-21 Jason Merrill <jason@redhat.com>
1108 * tree.c (cp_tree_equal): Handle FIXED_CST.
1111 * pt.c (template_template_parm_bindings_ok_p): Set
1112 processing_template_decl while in this function.
1114 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
1116 * cvt.c (type_promotes_to): Support char16_t and char32_t.
1117 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
1118 char16_t and char32_t.
1119 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
1120 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
1121 extended builtin type "u8char{16,32}_t".
1122 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
1124 (cp_lexer_print_token): Support CPP_STRING{16,32}.
1125 (cp_parser_is_string_literal): Idem.
1126 (cp_parser_string_literal): Idem.
1127 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
1129 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
1130 * tree.c (char_type_p): Support char16_t and char32_t as char types.
1131 * typeck.c (string_conv_p): Support char16_t and char32_t.
1133 2008-04-17 Jason Merrill <jason@redhat.com>
1136 * call.c (build_user_type_conversion_1): Represent second step of
1137 copy-init with an rvalue conversion.
1138 (convert_like_real) [ck_user]: Don't implicitly add it here.
1140 2008-04-15 Jakub Jelinek <jakub@redhat.com>
1143 * decl.c (layout_var_decl): If extern or static var has variable
1144 size, set TREE_TYPE (decl) to error_mark_node.
1146 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
1149 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
1152 2008-04-09 Jason Merrill <jason@redhat.com>
1155 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
1156 not a pushed variable.
1158 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
1160 * call.c (build_op_delete_call): Fix quotation in warning message.
1161 * decl.c (grokdeclarator): Quote keyword in error message.
1162 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
1165 * parser.c (cp_parser_check_type_definition): Print error string
1166 directly rather than using "%s".
1167 (cp_parser_postfix_expression): Fix quotation.
1168 (cp_parser_decltype): Likewise.
1169 (cp_parser_sizeof_operand): Fix quotation. Simplify.
1171 * parser.c (cp_parser_non_integral_constant_expression): Build error
1172 message with CONCAT rather than using "%s".
1173 (cp_parser_primary_expression): Fix quotation.
1174 (cp_parser_postfix_expression): Likewise.
1175 (cp_parser_postfix_dot_deref_expression): Likewise.
1176 (cp_parser_unary_expression): Likewise.
1177 (cp_parser_new_expression): Likewise.
1178 (cp_parser_delete_expression): Likewise.
1180 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
1181 as `)', not as `('. Fix quotation.
1182 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
1183 (cp_parser_primary_expression): Likewise.
1184 (cp_parser_nested_name_specifier_opt): Likewise.
1185 (cp_parser_postfix_expression): Likewise.
1186 (cp_parser_postfix_open_square_expression): Likewise.
1187 (cp_parser_parenthesized_expression_list): Likewise.
1188 (cp_parser_pseudo_destructor_name): Likewise.
1189 (cp_parser_new_expression): Likewise.
1190 (cp_parser_direct_new_declarator): Likewise.
1191 (cp_parser_delete_expression): Likewise.
1192 (cp_parser_cast_expression): Likewise.
1193 (cp_parser_question_colon_clause): Likewise.
1194 (cp_parser_builtin_offsetof): Likewise.
1195 (cp_parser_trait_expr): Likewise.
1196 (cp_parser_label_for_labeled_statement): Likewise.
1197 (cp_parser_compound_statement): Likewise.
1198 (cp_parser_selection_statement): Likewise.
1199 (cp_parser_condition): Likewise.
1200 (cp_parser_iteration_statement): Likewise.
1201 (cp_parser_already_scoped_statement): Likewise.
1202 (cp_parser_simple_declaration): Likewise.
1203 (cp_parser_linkage_specification): Likewise.
1204 (cp_parser_static_assert): Likewise.
1205 (cp_parser_decltype): Likewise.
1206 (cp_parser_conversion_function_id): Likewise.
1207 (cp_parser_operator_function_id): Likewise.
1208 (cp_parser_operator): Likewise.
1209 (cp_parser_type_parameter): Likewise.
1210 (cp_parser_template_id): Likewise.
1211 (cp_parser_explicit_instantiation): Likewise.
1212 (cp_parser_explicit_specialization): Likewise.
1213 (cp_parser_enum_specifier): Likewise.
1214 (cp_parser_namespace_definition): Likewise.
1215 (cp_parser_namespace_alias_definition): Likewise.
1216 (cp_parser_using_declaration): Likewise.
1217 (cp_parser_using_directive): Likewise.
1218 (cp_parser_asm_definition): Likewise.
1219 (cp_parser_direct_declarator): Likewise.
1220 (cp_parser_ptr_operator): Likewise.
1221 (cp_parser_parameter_declaration_clause): Likewise.
1222 (cp_parser_initializer_clause): Likewise.
1223 (cp_parser_class_specifier): Likewise.
1224 (cp_parser_member_specification_opt): Likewise.
1225 (cp_parser_member_declaration): Likewise.
1226 (cp_parser_pure_specifier): Likewise.
1227 (cp_parser_constant_initializer): Likewise.
1228 (cp_parser_base_clause): Likewise.
1229 (cp_parser_exception_specification_opt): Likewise.
1230 (cp_parser_try_block): Likewise.
1231 (cp_parser_function_try_block): Likewise.
1232 (cp_parser_handler): Likewise.
1233 (cp_parser_throw_expression): Likewise.
1234 (cp_parser_asm_operand_list): Likewise.
1235 (cp_parser_attributes_opt): Likewise.
1236 (cp_parser_label_declaration): Likewise.
1237 (cp_parser_constructor_declarator_p): Likewise.
1238 (cp_parser_template_declaration_after_export): Likewise.
1239 (cp_parser_single_declaration): Likewise.
1240 (cp_parser_objc_message_expression): Likewise.
1241 (cp_parser_objc_message_args): Likewise.
1242 (cp_parser_objc_encode_expression): Likewise.
1243 (cp_parser_objc_defs_expression): Likewise.
1244 (cp_parser_objc_protocol_expression): Likewise.
1245 (cp_parser_objc_selector_expression): Likewise.
1246 (cp_parser_objc_protocol_refs_opt): Likewise.
1247 (cp_parser_objc_typename): Likewise.
1248 (cp_parser_objc_method_keyword_params): Likewise.
1249 (cp_parser_objc_superclass_or_category): Likewise.
1250 (cp_parser_objc_try_catch_finally_statement): Likewise.
1251 (cp_parser_objc_synchronized_statement): Likewise.
1252 (cp_parser_objc_throw_statement): Likewise.
1253 (cp_parser_omp_var_list_no_open): Likewise.
1254 (cp_parser_omp_clause_default): Likewise.
1255 (cp_parser_omp_clause_if): Likewise.
1256 (cp_parser_omp_clause_num_threads): Likewise.
1257 (cp_parser_omp_clause_reduction): Likewise.
1258 (cp_parser_omp_clause_schedule): Likewise.
1259 (cp_parser_omp_critical): Likewise.
1260 (cp_parser_omp_for_loop): Likewise.
1261 (cp_parser_omp_sections_scope): Likewise.
1263 * parser.c (cp_parser_template_parameter_list): Simplify.
1265 2008-04-07 James E. Wilson <wilson@tuliptree.org>
1267 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
1269 2008-04-07 Jason Merrill <jason@redhat.com>
1272 * class.c (type_has_user_nondefault_constructor): A template
1273 counts as a nondefault constructor.
1275 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
1277 * decl.c (cxx_push_function_context): Delete.
1278 (cxx_pop_function_context): Delete.
1279 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
1281 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
1282 LANG_HOOKS_FUNCTION_FINAL): Delete.
1283 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
1284 LANG_HOOKS_MISSING_NORETURN_OK_P.
1285 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
1287 * semantics.c (current_stmt_tree): Fix comment.
1289 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1292 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
1293 before calling fold_offsetof.
1295 2008-04-03 Tom Tromey <tromey@redhat.com>
1297 * Make-lang.in (c++_OBJS): New variable.
1299 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1301 * optimize.c (clone_body): New, from tree-inline.c.
1303 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1305 * method.c (synthesize_method): Use {push,pop}_function_context.
1306 * name-lookup.c (push_to_top_level): Likewise.
1307 * parser.c (cp_parser_late_parsing_for_member): Likewise.
1309 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
1312 * parser.c (cp_parser_decl_specifier_seq): Add location to error
1315 2008-03-27 Tom Tromey <tromey@redhat.com>
1317 * Make-lang.in: Revert automatic dependency patch.
1319 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1322 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
1323 (build_compound_expr): New, for compatibility with C
1324 build_compound_expr.
1325 (cp_build_compound_expr): Renamed from build_compound_expr.
1326 (build_c_cast): New, for compatibility with C build_c_cast.
1327 (cp_build_c_cast): Renamed from build_c_cast.
1328 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
1329 * decl.c (cxx_maybe_build_cleanup): Ditto.
1330 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
1331 (cp_build_compound_expr): Renamed from build_compound_expr.
1332 (build_c_cast): Add C-compatible prototype.
1333 (cp_build_c_cast): Renamed from build_c_cast.
1334 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
1335 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
1337 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
1339 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
1340 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
1341 ending in a pack expansion, both of which can occur when
1342 substituting into a nested template.
1343 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
1344 instantiating the sizeof...(X) form, make tsubst_copy do the work.
1345 * parser.c (cp_parser_template_parameter): Deal with unnamed
1346 non-type template parameter packs identified by pack expansions in
1349 2008-03-26 Jakub Jelinek <jakub@redhat.com>
1352 * pt.c (apply_late_template_attributes): Don't call tsubst on
1353 first attribute argument if it is IDENTIFIER_NODE.
1356 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
1357 and LTGT_EXPR to pp_expression.
1359 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
1361 * pt.c (coerce_template_template_parm): Moved the body of the loop
1362 of coerce_template_template_parms here, to make iteration over a
1363 template argument pack simpler.
1364 Also, allow matching of a template parameter pack in the template
1365 template parameter to a template parameter in the template
1367 (coerce_template_template_parms): Deal with variadic template
1368 template parameters. Use coerce_template_template_parm.
1369 (unify): Make sure we coerce the template template argument's
1370 template arguments to the template template parameter's template
1371 parameters, not the other way around.
1373 2008-03-25 Tom Tromey <tromey@redhat.com>
1375 * Make-lang.in: Remove .o targets.
1376 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
1378 (c++_OBJS): New variable.
1379 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
1381 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
1383 * typeck.c (composite_pointer_type_r): Add SFINAE support.
1384 (composite_pointer_type): Ditto.
1385 (common_type): Fix call to composite_pointer_type.
1386 (cxx_sizeof_nowarn): New; used to be a macro.
1387 (cxx_sizeof_expr): Add SFINAE support.
1388 (cxx_alignof_expr): Ditto.
1389 (decay_conversion): Fix calls for SFINAE support.
1390 (rationalize_conditional_expr): Add SFINAE support.
1391 (build_class_member_access_expr): Ditto.
1392 (finish_class_member_access_expr): Ditto.
1393 (build_x_indirect_ref): Ditto.
1394 (build_indirect_ref): Original version renamed to
1395 cp_build_indirect_ref; new version provides a bridge from
1397 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
1399 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
1400 (build_function_call): Original version renamed to
1401 cp_build_function_call; new version provides a bridge from
1403 (cp_build_function_call): Was build_function_call; added SFINAE
1405 (convert_arguments): Add SFINAE support.
1406 (build_x_binary_op): Ditto.
1407 (build_binary_op): Original version renamed to cp_build_binary_op;
1408 new version provides a bridge from c-common.
1409 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
1410 (pointer_diff): Fix calls for SFINAE.
1411 (build_x_unary_op): Add SFINAE support.
1412 (condition_conversion): Fix calls for SFINAE.
1413 (build_unary_op): Original version renamed to cp_build_unary_op;
1414 new version provides a bridge from c-common.
1415 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
1416 (unary_complex_lvalue): Fix calls for SFINAE.
1417 (build_x_conditional_expr): Add SFINAE support.
1418 (build_x_compound_expr_from_list): Fix calls for SFINAE.
1419 (build_x_compound_expr): Add SFINAE support.
1420 (convert_ptrmem): Fix calls for SFINAE.
1421 (build_static_cast_1): Add SFINAE support.
1422 (build_static_cast): Ditto.
1423 (build_reinterpret_cast_1): Ditto.
1424 (build_reinterpret_cast): Ditto.
1425 (build_const_cast_1): Ditto.
1426 (build_const_cast): Ditto.
1427 (build_c_cast): Ditto.
1428 (build_modify_expr): Original version renamed to
1429 cp_build_modify_expr; new version provides a bridge from c-common.
1430 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
1432 (build_x_modify_expr): Add SFINAE support.
1433 (build_ptrmemfunc): Fix calls for SFINAE.
1434 (convert_for_assignment): Add SFINAE support.
1435 (convert_for_initialization): Ditto.
1436 (check_return_expr): Fix calls for SFINAE.
1437 (lvalue_or_else): Add SFINAE support.
1438 * init.c (perform_member_init): Fix calls for SFINAE.
1439 (emit_mem_initializers): Ditto.
1440 (expand_virtual_init): Ditto.
1441 (expand_cleanup_for_base): Ditto.
1442 (build_aggr_init): Add SFINAE support.
1443 (expand_default_init): Ditto.
1444 (expand_aggr_init_1): Fix calls for SFINAE.
1445 (build_offset_ref): Ditto.
1446 (build_new_1): Add SFINAE support.
1448 (build_vec_delete_1): Fix calls for SFINAE.
1449 (get_temp_regvar): Ditto.
1450 (build_vec_init): Add SFINAE support.
1451 (build_dtor_call): Fix calls for SFINAE.
1452 (build_delete): Ditto.
1453 (push_base_cleanups): Ditto.
1454 (build_vec_delete_1): Ditto.
1455 * class.c (build_base_path): Fix calls for SFINAE.
1456 (build_simple_base_path): Ditto.
1457 (convert_to_base_statically): Ditto.
1458 (build_vfn_ref): Ditto.
1459 (resolve_address_of_overloaded_function): Ditto.
1460 * decl.c (check_initializer): Fix calls for SFINAE.
1461 (register_dtor_fn): Ditto.
1462 (compute_array_index_type): Ditto.
1463 (finish_enum): Ditto.
1464 (start_preparsed_function): Ditto.
1465 (cxx_maybe_build_cleanup): Ditto.
1466 * call.c (convert_like): Add COMPLAIN argument.
1467 (convert_like_with_context): Ditto.
1468 (build_this): Fix calls for SFINAE.
1469 (build_user_type_conversion): Ditto.
1470 (resolve_args): Ditto.
1471 (build_new_function_call): Add SFINAE support.
1472 (build_operator_new_call): Fix calls for SFINAE.
1473 (build_object_call): Add SFINAE support.
1474 (build_conditional_expr): Ditto.
1475 (build_new_op): Ditto.
1476 (build_op_delete_call): Fix calls for SFINAE.
1477 (build_temp): Ditto.
1478 (convert_like_real): Add SFINAE support.
1479 (build_x_va_arg): Fix calls for SFINAE.
1480 (convert_default_arg): Ditto.
1481 (build_over_call): Add SFINAE support.
1482 (build_java_interface_fn_ref): Fix calls for SFINAE.
1483 (build_special_member_call): Add SFINAE support.
1484 (build_new_method_call): Ditto.
1485 (perform_implicit_conversion): Ditto.
1486 (perform_direct_initialization_if_possible): Ditto.
1487 (initialize_reference): Fix calls for SFINAE.
1488 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1489 * rtti.c (build_headof): Fix calls for SFINAE.
1490 (get_tinfo_decl_dynamic): Ditto.
1491 (get_typeid): Ditto.
1492 (build_dynamic_cast_1): Add SFINAE support.
1493 (build_dynamic_cast): Ditto.
1494 (tinfo_base_init): Fix calls for SFINAE.
1495 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1496 (do_end_catch): Ditto.
1497 (initialize_handler_parm): Ditto.
1498 (expand_start_catch_block): Ditto.
1499 (do_allocate_exception): Ditto.
1500 (do_free_exception): Ditto.
1501 (build_throw): Ditto.
1502 * cvt.c (build_up_reference): Fix calls for SFINAE.
1503 (convert_to_reference): Ditto.
1504 (ocp_convert): Ditto.
1505 (convert_to_void): Add SFINAE support.
1506 * tree.c (build_dummy_object): Fix calls for SFINAE.
1507 (stabilize_expr): Ditto.
1508 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1510 (build_new_method_call): Ditto.
1511 (build_special_member_call): Ditto.
1512 (build_new_op): Ditto.
1513 (perform_implicit_conversion): Ditto.
1514 (perform_direct_initialization_if_possible): Ditto.
1515 (convert_to_void): Ditto.
1516 (build_aggr_init): Ditto.
1518 (build_vec_init): Ditto.
1519 (build_dynamic_cast): Ditto.
1520 (finish_call_expr): Ditto
1521 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1522 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1523 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1524 (finish_class_member_access_expr): Ditto.
1525 (build_x_indirect_ref): Ditto.
1526 (cp_build_indirect_ref): New.
1527 (cp_build_function_call): Add tsubst_flags_t parameter.
1528 (build_x_unary_op): Ditto.
1529 (cp_build_unary_op): New.
1530 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1531 (build_x_compound_expr): Ditto.
1532 (build_compound_expr): Ditto.
1533 (build_static_cast): Ditto.
1534 (build_reinterpret_cast): Ditto.
1535 (build_const_cast): Ditto.
1536 (build_c_cast): Ditto.
1537 (build_x_modify_expr): Ditto.
1538 (cp_build_modify_expr): New.
1539 (convert_for_initialization): Add tsubst_flags_t parameter.
1540 (cp_build_binary_op): Remove macro; add function declaration.
1541 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1542 (lvalue_or_else): Ditto.
1543 (build_functional_cast): Ditto.
1544 * typeck2.c (digest_init): Fix calls for SFINAE.
1545 (process_init_constructor_array): Ditto.
1546 (process_init_constructor_record): Ditto.
1547 (build_x_arrow): Ditto.
1548 (build_m_component_ref): Ditto.
1549 (build_functional_cast): Add SFINAE support.
1550 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1551 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1552 (finish_expr_stmt): Ditto.
1553 (finish_for_expr): Ditto.
1554 (finish_asm_stmt): Ditto.
1555 (finish_non_static_data_member): Ditto.
1556 (finish_qualified_id_expr): Ditto.
1557 (finish_call_expr): Add SFINAE support.
1558 (finish_increment_expr): Fix calls for SFINAE.
1559 (finish_unary_op_expr): Ditto.
1560 (simplify_aggr_init_expr): Ditto.
1561 (finish_omp_clauses): Ditto.
1562 (finish_omp_for): Ditto.
1563 (finish_omp_barrier): Ditto.
1564 (finish_omo_flush): Ditto.
1565 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1566 (build_anon_union_vars): Ditto.
1567 (get_guard_cond): Ditto.
1569 (one_static_initialization_or_destruction): Ditto.
1570 (do_static_initialization_or_destruction): Ditto.
1571 (generate_ctor_or_dtor_function): Ditto.
1572 (build_offset_ref_call_from_tree): Ditto.
1573 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1574 (cp_parser_postfix_dot_deref_expression): Ditto.
1575 (cp_parser_unary_expression): Ditto.
1576 (cp_parser_new_expression): Ditto.
1577 (cp_parser_cast_expression): Ditto.
1578 (cp_parser_binary_expression): Ditto.
1579 (cp_parser_question_colon_clause): Ditto.
1580 (cp_parser_assignment_expression): Ditto.
1581 (cp_parser_expression): Ditto.
1582 (cp_parser_builtin_offsetof): Ditto.
1583 (cp_parser_template_argument): Ditto.
1584 (cp_parser_functional_cast): Ditto.
1586 2008-03-24 Tom Tromey <tromey@redhat.com>
1588 * lex.c (handle_pragma_interface): Don't copy the filename.
1589 (handle_pragma_implementation): Copy filename using xstrdup.
1591 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1593 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1594 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1595 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1596 (PROMOTES_TO_AGGR_TYPE): Remove.
1597 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1598 * typeck.c (unary_complex_lvalue, build_modify_expr,
1599 convert_for_initialization): Adjust.
1600 * init.c (is_aggr_type): Remove.
1601 (is_class_type): Add.
1602 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1603 build_delete): Adjust.
1604 * lex.c (make_aggr_type): Remove.
1605 (make_class_type): Add.
1606 (cxx_make_type): Adjust.
1607 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1609 * decl.c (build_typename_type, make_typename_type,
1610 make_unbound_class_template, cxx_init_decl_processing,
1611 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1612 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1613 grok_op_properties, xref_tag, check_function_type): Adjust.
1614 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1615 add_builtin_candidate, add_builtin_candidates,
1616 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1617 is_subseq, compare_ics): Adjust.
1618 * method.c (use_thunk): Adjust.
1619 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1620 create_tinfo_types): Adjust.
1621 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1622 build_up_reference, convert_to_reference, convert_from_reference,
1623 ocp_convert, build_expr_type_conversion): Adjust.
1624 * tree.c (bind_template_template_parm, error_type): Adjust.
1625 * dump.c (cp_dump_tree): Adjust.
1626 * search.c (lookup_member): Adjust.
1627 * friend.c (make_friend_class, do_friend): Adjust.
1628 * typeck2.c (store_init_value, process_init_constructor_array,
1629 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1630 build_functional_cast): Adjust.
1631 * pt.c (finish_member_template_decl, process_template_parm,
1632 lookup_template_class, tsubst_function_type, tsubst,
1633 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1635 * semantics.c (begin_class_definition, finish_base_specifier,
1636 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1638 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1639 do_class_using_decl, lookup_qualified_name,
1640 maybe_process_template_type_declaration): Adjust.
1641 * decl2.c (grok_array_decl, check_member_template,
1642 constrain_class_visibility): Adjust.
1643 * parser.c (cp_parser_class_name): Adjust.
1645 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1647 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1649 2008-03-17 Jason Merrill <jason@redhat.com>
1652 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1653 a temp directly to a reference as per DR391.
1655 2008-03-12 Richard Guenther <rguenther@suse.de>
1659 2008-02-04 Richard Guenther <rguenther@suse.de>
1662 * decl.c (record_builtin_java_type): Make jboolean a
1663 integer type again where its mode doesn't match that of bool.
1665 2008-01-25 Richard Guenther <rguenther@suse.de>
1668 * decl.c (record_builtin_java_type): Make __java_boolean
1670 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1671 after TYPE_MAIN_VARIANT check.
1673 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1676 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1680 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1681 DECL_P in not a variable and appears more than once error messages.
1683 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1687 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1691 * typeck.c (structural_comptypes): Call cp_comptypes.
1692 (comptypes): New; called from the C/C++ common bits to perform
1694 (cp_comptypes): Renamed from comptypes, which is already used,
1695 with a different signature, by the C++ front end.
1696 (build_reinterpret_cast_1): Call cp_comptypes.
1697 (ptr_reasonably_similar): Ditto.
1698 * decl.c (decls_match): Ditto.
1699 * cvt.c (convert_to_reference): Ditto.
1700 * cp-tree.h (same_type_p): Ditto.
1701 (same_or_base_type_p): Ditto.
1702 (comptypes): Rename to cp_comptypes.
1703 * pt.c (canonical_type_parameter): Call cp_comptypes.
1705 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1707 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1708 test for equivalence between pointer and references.
1710 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1713 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1714 (check_field_decls): Likewise.
1715 (note_name_declared_in_class): Likewise.
1716 * call.c (build_new_op): Likewise.
1717 (convert_like_real): Likewise.
1718 (build_over_call): Likewise.
1719 * lex.c (unqualified_fn_lookup_error): Likewise.
1720 * parser.c (cp_parser_template_id): Likewise.
1721 * cvt.c (warn_ref_binding): Likewise.
1722 (convert_to_reference): Likewise.
1723 (ocp_convert): Likewise.
1724 (convert_to_void): Use error instead of pedwarn.
1725 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1726 * decl.c (compute_array_index_type): Use constant_expression_error.
1728 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1730 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1731 that auto is either a storage class or a simple type specifier,
1732 depending on the dialect.
1733 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1734 specifier in C++98 mode, error in C++0x mode (since we don't
1735 support auto as a type specifier, yet).
1736 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1737 storage specifier in C++0x mode.
1738 (cp_parser_simple_type_specifier): Parse `auto' as a
1739 simple-type-specifier, but error because we don't support it yet.
1741 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1743 * parser.c (cp_parser_nonclass_name): New.
1744 (cp_parser_pseudo_destructor_name): Use it instead of
1745 cp_parser_type_name.
1746 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1748 2008-02-29 Tom Tromey <tromey@redhat.com>
1750 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1751 (cp_lexer_get_preprocessor_token): Update.
1752 (cp_lexer_set_source_position_from_token): Don't call
1753 restore_input_file_stack.
1754 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1756 2008-02-28 Richard Guenther <rguenther@suse.de>
1759 2008-02-26 Richard Guenther <rguenther@suse.de>
1761 * decl.c (duplicate_decls): Remove decl from global mapping
1762 before ggc_freeing it.
1764 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1767 * rtti.c: Include c-pragma.h.
1768 (push_abi_namespace, pop_abi_namespace): New functions.
1769 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1770 create_tinfo_types, emit_support_tinfos): Use them.
1771 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1773 2008-02-26 Jason Merrill <jason@redhat.com>
1776 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1777 to name the struct for linkage purposes even if it has attributes.
1778 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1780 2008-02-26 Tom Tromey <tromey@redhat.com>
1782 * parser.c (eof_token): Remove old location code.
1783 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1784 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1786 (cp_write_global_declarations): Likewise.
1787 * lex.c (cxx_init): Remove old location code.
1788 (handle_pragma_implementation): Remove test of
1789 USE_MAPPED_LOCATION.
1790 * pt.c (tsubst): Remove old location code.
1791 * error.c (cp_print_error_function): Remove test of
1792 USE_MAPPED_LOCATION.
1793 * decl.c (pop_label): Remove old location code.
1794 (finish_function): Likewise.
1796 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1799 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1801 2008-02-26 Richard Guenther <rguenther@suse.de>
1803 * decl.c (duplicate_decls): Remove decl from global mapping
1804 before ggc_freeing it.
1806 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1809 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1811 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1813 * typeck.c (build_class_member_access_expr): Add appropriate
1814 OPT_W* parameter to warning.
1815 (build_reinterpret_cast_1): Likewise.
1816 * name-lookup.c (push_overloaded_decl): Likewise.
1818 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1821 * error.c (dump_expr): Handle CONJ_EXPR.
1823 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1826 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1827 (dump_expr): Handle FIXED_CST.
1829 2008-02-24 Jason Merrill <jason@redhat.com>
1831 * parser.c (cp_parser_declaration): Handle "inline namespace".
1832 (cp_parser_namespace_definition): Likewise.
1835 * name-lookup.c (arg_assoc_namespace): Look down into inline
1838 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1840 * typeck.c (check_for_casting_away_constness): Use 1 single
1841 argument, the type of cast, to decide what diagnostics generate.
1842 (build_static_cast_1): Remove unused code. Update call to
1843 check_for_casting_away_constness.
1844 (build_reinterpret_cast_1): Update call to
1845 check_for_casting_away_constness.
1846 (build_const_cast_1): Likewise.
1848 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1850 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1851 VEC_NEW_EXPR), forward to pp_expression.
1852 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1854 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1857 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1859 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1862 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1863 template decls' function decl.
1865 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1869 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1872 * pt.c (determine_specialization): In case of function templates,
1873 when the type of DECL does not match FN there is no match.
1875 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1878 * typeck.c (build_binary_op): Warn about floating point
1879 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1881 2008-02-19 Jason Merrill <jason@redhat.com>
1884 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1885 while we look for possible bindings.
1887 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1890 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1894 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1895 vars. Afterwards ensure v is VAR_DECL.
1898 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1899 call cp_finish_decl.
1900 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1903 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1908 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1909 is error_mark_node, return an error early.
1910 (find_parameter_packs_r): Pass the pointer set along to recursive
1911 calls of cp_walk_subtrees; don't try to manage the pointer set
1913 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1914 (make_pack_expansion): Ditto.
1915 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1916 a second pass through the tree with find_parameter_packs_r; that
1917 second pass no longer does anything.
1918 (push_template_decl_real): If we have an erroneous declaration,
1919 set its type to error_mark_node before returning an error.
1921 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1924 * pt.c (tsubst_initializer_list): Deal with the use of
1925 VOID_TYPE_NODE to indicate value-initialization of the bases.
1927 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1928 Jason Merrill <jason@redhat.com>
1932 * class.c (type_has_user_nondefault_constructor): New fn.
1933 * cp-tree.h: Declare it.
1934 * init.c (emit_mem_initializers): Use it for -W warning about
1935 missing base initializer.
1937 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1940 * pt.c (determine_specialization): In case of function templates,
1941 when the type of DECL does not match FN there is no match.
1943 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1944 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1947 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1948 are not identifier :: ~, return before calling cp_parser_type_name.
1950 2008-02-13 Jason Merrill <jason@redhat.com>
1952 PR c++/34962, c++/34937, c++/34939
1953 * decl2.c (is_late_template_attribute): Always defer attributes
1954 vector_size and weak.
1957 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1958 of enumerators, too.
1960 2008-02-12 Jason Merrill <jason@redhat.com>
1963 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1964 if we're doing conversions to call a user-defined conversion function.
1966 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1969 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1972 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1975 * init.c (build_new_1): Don't create placement_expr before
1976 constructing alloc_call. Verify that the pointer is passed by
1977 value to operator new.
1979 2008-02-11 Jason Merrill <jason@redhat.com>
1982 * pt.c (tsubst): Don't look up a template typedef in an explicit
1985 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1988 * tree.c (cp_build_qualified_type_real): When building a
1989 cv-qualified array type, build it as a unique type with
1990 build_cplus_array_type_1 and then adopt the unqualified type's
1993 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1996 * decl.c (groktypename): Check grokdeclarator return.
1998 2008-02-10 Jason Merrill <jason@redhat.com>
2001 * decl2.c (cp_write_global_declarations): Don't write out static
2002 data members with DECL_IN_AGGR_P set.
2004 2008-02-08 Jason Merrill <jason@redhat.com>
2007 * tree.c (build_target_expr_with_type): Handle void initializer.
2008 (bot_manip): Remap slot before recursing.
2010 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2013 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
2015 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
2018 * tree.c: Include tree-flow.h.
2019 (build_target_expr): Check type compatibility.
2020 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
2021 * call.c (convert_like_real): Convert bitfield to expected type.
2023 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
2027 * typeck.c (structural_comptypes): Call cp_comptypes.
2028 (comptypes): New; called from the C/C++ common bits to perform
2030 (cp_comptypes): Renamed from comptypes, which is already used,
2031 with a different signature, by the C++ front end.
2032 (build_reinterpret_cast_1): Call cp_comptypes.
2033 (ptr_reasonably_similar): Ditto.
2034 * decl.c (decls_match): Ditto.
2035 * cvt.c (convert_to_reference): Ditto.
2036 * cp-tree.h (same_type_p): Ditto.
2037 (same_or_base_type_p): Ditto.
2038 (comptypes): Rename to cp_comptypes.
2039 * pt.c (canonical_type_parameter): Call cp_comptypes.
2041 2008-02-05 Jakub Jelinek <jakub@redhat.com>
2044 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
2045 value dependent expression.
2047 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
2050 * decl2.c (save_template_attributes): When we're modifying the
2051 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
2052 all of the other variants to add those same attributes. Otherwise,
2053 the main variant will be inconsistent with those other variants.
2055 2008-02-04 Richard Guenther <rguenther@suse.de>
2058 * decl.c (record_builtin_java_type): Make jboolean a
2059 integer type again where its mode doesn't match that of bool.
2061 2008-02-02 Jason Merrill <jason@redhat.com>
2062 Mark Mitchell <mark@codesourcery.com>
2065 * init.c (build_value_init_1): New function.
2066 (build_value_init): New function.
2067 * typeck2.c (build_functional_cast): Call it.
2068 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
2070 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
2071 TYPE_HAS_CONSTRUCTOR.
2072 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
2073 add_implicitly_declared_members): Adjust.
2074 (check_field_decls): Adjust. Remove warnings about reference/const
2075 in class without constructor.
2076 (check_bases_and_members): Adjust. Give those warnings here instead.
2077 * decl.c (fixup_anonymous_aggr): Adjust.
2078 (check_initializer): Adjust, clarify logic slightly.
2079 (grok_special_member_properties): Adjust, only set if user-provided.
2080 * rtti.c (create_tinfo_types): Don't set.
2081 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
2082 Use same_type_ignoring_top_level_qualifiers_p.
2083 * pt.c (check_explicit_specialization): Adjust.
2084 (instantiate_class_template): Adjust.
2086 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
2087 Jakub Jelinek <jakub@redhat.com>
2091 * typeck.c (structural_comptypes): Handle comparisons of
2092 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
2094 * mangle.c (write_builtin_type): Map down to the canonical type,
2095 which will be one of the predefined type nodes.
2097 2008-01-29 Michael Meissner <michael.meissner@amd.com>
2100 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
2101 bits to allow for expansion of the number of middle end tree
2104 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
2115 * typeck.c (check_return_expr): Tweak call to
2116 check_for_bare_parameter_packs.
2117 * class.c (add_method): Be careful with error_mark_nodes.
2118 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
2120 * pt.c (struct find_parameter_pack_data): Remove
2122 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
2123 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
2124 (make_pack_expansion): Ditto.
2125 (check_for_bare_parameter_packs): Parameter is now a tree, not a
2127 (process_template_parm): Tweak call to
2128 check_for_bare_parameter_packs.
2129 (push_template_decl_real): Tweak calls to
2130 check_for_bare_parameter_packs. If bare parameter packs are found
2131 in the list of exceptions, clear out that list after giving an
2133 * semantics.c (finish_cond): Tweak call to
2134 check_for_bare_parameter_packs.
2135 (finish_expr_stmt): Ditto.
2136 (finish_for_expr): Ditto.
2137 (finish_switch_cond): Ditto.
2138 (finish_mem_initializers): Ditto.
2139 (finish_member_declaration): Ditto.
2140 (finish_static_assert): Check for bare parameter packs in the
2142 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
2143 attributes of a declaration.
2144 * parser.c (cp_parser_using_declaration): Tweak call to
2145 check_for_bare_parameter_packs.
2146 (cp_parser_base_clause): Ditto.
2148 2008-01-28 Jason Merrill <jason@redhat.com>
2151 * class.c (build_base_path): Fix !want_pointer case.
2153 2008-01-27 Jason Merrill <jason@redhat.com>
2156 * class.c (build_base_path): Fix previous change.
2158 2008-01-26 Jakub Jelinek <jakub@redhat.com>
2161 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
2164 2008-01-26 Richard Guenther <rguenther@suse.de>
2167 * typeck.c (build_binary_op): Remove code to shorten compares.
2169 2008-01-25 Richard Guenther <rguenther@suse.de>
2172 * decl.c (record_builtin_java_type): Make __java_boolean
2174 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
2175 after TYPE_MAIN_VARIANT check.
2177 2008-01-25 Jason Merrill <jason@redhat.com>
2180 * class.c (build_base_path): Don't mess with virtual access if
2182 * call.c (standard_conversion): Don't check whether source type
2185 * decl2.c (is_late_template_attribute): Don't defer attribute
2186 visibility just because the type is dependent.
2188 2008-01-25 Jason Merrill <jason@redhat.com>
2189 Mark Mitchell <mark@codesourcery.com>
2192 * call.c (standard_conversion): Allow conversion from integer/real
2194 (compare_ics): Such a conversion is worse than a normal arithmetic
2197 2008-01-25 Richard Guenther <rguenther@suse.de>
2200 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
2203 2008-01-24 Paolo Carlini <pcarlini@suse.de>
2206 * pt.c (push_template_decl_real): Return error_mark_node in case
2207 of template definition of non-template.
2209 2008-01-24 Jason Merrill <jason@redhat.com>
2212 * decl2.c (is_late_template_attribute): Defer any attribute with
2213 dependent args. Also defer type attributes if the type is dependent.
2215 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2216 Alexandre Oliva <aoliva@redhat.com>
2219 * call.c (reference_binding): For bitfields use the declared bitfield
2221 (add_builtin_candidates): Likewise.
2222 * class.c (layout_class_type): For bitfields copy over the
2223 original type quals.
2225 2008-01-22 Jason Merrill <jason@redhat.com>
2228 * decl.c (groktypename): Also ignore attributes on dependent
2229 possibly-class types.
2232 * friend.c (do_friend): Check for prior declaration of a friend
2233 function of a local class.
2234 * name-lookup.c (lookup_name_innermost_nonclass_level):
2236 * name-lookup.h: Declare it.
2238 2008-01-22 Tom Tromey <tromey@redhat.com>
2241 * init.c (build_new_1): Only disallow Java aggregates.
2243 2008-01-22 Jakub Jelinek <jakub@redhat.com>
2246 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
2247 if decl or init is error_mark_node.
2250 * error.c (dump_expr): Handle VECTOR_CST.
2252 2008-01-21 Jason Merrill <jason@redhat.com>
2255 * pt.c (tsubst_aggr_type): Make sure our context is complete.
2258 * pt.c (retrieve_local_specialization): Robustify.
2259 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
2262 * pt.c (tsubst): Only call retrieve_local_specialization if the
2263 original typedef was in a function template.
2266 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
2268 2008-01-21 Richard Guenther <rguenther@suse.de>
2271 * error.c (cp_print_error_function): Deal with recursive
2274 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2277 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
2279 2008-01-20 Paolo Carlini <pcarlini@suse.de>
2283 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
2284 on non-IS_AGGR_TYPE scope.
2285 (constructor_name_p): Assert IS_AGGR_TYPE.
2287 2008-01-18 Ian Lance Taylor <iant@google.com>
2290 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
2291 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
2292 DECL_IS_OPERATOR_NEW flag.
2294 2008-01-16 Richard Guenther <rguenther@suse.de>
2297 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
2298 for conversions to type variants.
2300 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
2302 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
2303 declaration and code. Update copyright year.
2305 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2308 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
2309 know we have a class type.
2311 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2314 * pt.c (coerce_template_parameter_pack): When substituting into
2315 the type of a non-type template parameter pack. use the
2316 deduced/substituted arguments.
2317 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
2318 can be a parameter pack with the ellipsis following it. When we
2319 have an erroneous declaration, allow it to be a parameter pack.
2320 (cp_parser_template_parameter): Complain about default
2321 arguments on non-type template parameter packs, and parse them
2322 using the new cp_parser_default_argument.
2323 (cp_parser_parameter_declaration): Complain about parameter packs
2324 with default arguments. Move parsing of default arguments into a
2325 new function, cp_parser_default_argument.
2326 (cp_parser_default_argument): New; extracted from
2327 cp_parser_parameter_declaration.
2329 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2335 * typeck.c (check_return_expr): If there are bare parameter packs
2336 in the return value, set it to error_mark_node.
2337 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
2338 * pt.c (find_parameter_packs_r): Look at the type of
2339 IDENTIFIER_NODEs (e.g., for user-defined conversions).
2340 (check_for_bare_parameter_packs): Flip the result: now returns
2341 TRUE when there were bare parameter packs, FALSE otherwise.
2342 (push_template_decl_real): Deal with flipped result of
2343 check_for_bare_parameter_packs.
2344 * semantics.c (finish_cond): If there are bare parameter packs in
2345 the conditional, set it to error_mark_node.
2346 (finish_expr_stmt): If there are bare parameter packs in the
2347 expression, set it to error_mark_node.
2348 (finish_for_expr): Ditto.
2349 (finish_switch_cond): If there are bare parameter packs in
2350 the conditional, set it to error_mark_node.
2351 (finish_mem_initializers): If there are bare parameter packs in
2352 the member initializer, set it to error_mark_node.
2353 (finish_member_declaration): Check the attributes of the
2354 declaration for bare parameter packs, and remove the attributes if
2355 any have bare parameter packs.
2356 * parser.c (cp_parser_using_declaration): Check the using
2357 declaration for bare parameter packs.
2358 (cp_parser_base_clause): If there are bare parameter packs in a
2359 base specifier, don't add it to the chain.
2361 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2364 * error.c (dump_simple_decl): Display ellipsis for template
2365 non-type parameter packs.
2366 (dump_decl): Display ellipsis for template type parameter packs.
2367 (dump_template_decl): Display ellipsis for template template
2369 * pt.c (redeclare_class_template): When redeclaring a class
2370 template, check for collisions between template parameters and
2371 template parameter packs.
2373 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2376 * pt.c (process_partial_specialization): Don't mark template
2377 parameters that occur in non-deduced contexts.
2378 (struct pair_fn_data): Add include_nondeduced_p.
2379 (for_each_template_parm_r): Only visit non-deduced contexts if
2380 include_nondeduced_p is set.
2381 (for_each_template_parm): Added parameter include_nondeduced_p,
2382 which states whether template parameters found in non-deduced
2383 contexts should be visited.
2384 (uses_template_parms): Visit all template parameters, even those
2385 in non-deduced contexts.
2387 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
2390 * pt.c (check_default_tmpl_args): Check for parameter packs that
2391 aren't at the end of a primary template.
2392 (push_template_decl_real): Remove check for parameter packs that
2393 aren't at the end of a primary template; that now happens in
2394 check_default_tmpl_args.
2395 * semantics.c (finish_template_template_parm): Use
2396 check_default_tmpl_args to check for errors in the template
2399 2008-01-12 Doug Kwan <dougkwan@google.com>
2401 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
2402 instead of OPT_Wreturn_type in warning due to ignored return type
2404 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
2405 instead of OPT_Wreturn_type in warning due to ignored return type
2408 2008-01-08 Jakub Jelinek <jakub@redhat.com>
2411 * semantics.c (finish_omp_for): Don't call
2412 fold_build_cleanup_point_expr if processing_template_decl.
2414 2008-01-04 Paolo Carlini <pcarlini@suse.de>
2415 Jakub Jelinek <jakub@redhat.com>
2418 * error.c (dump_template_argument): Deal with TREE_LIST.
2420 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
2422 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
2423 long" in C++0x mode; change the warning to note that "long long"
2424 is only unsupported in C++98 mode.
2426 2007-12-20 Jason Merrill <jason@redhat.com>
2429 * call.c (standard_conversion): Derived-to-base is considered a
2430 standard conversion.
2432 2007-12-19 Jakub Jelinek <jakub@redhat.com>
2435 * parser.c (cp_parser_omp_parallel): For non-combined parallel
2436 call cp_parser_statement rather than
2437 cp_parser_already_scoped_statement.
2439 2007-12-18 Jason Merrill <jason@redhat.com>
2442 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
2444 (dependent_type_p_r): Handle the domain of an array.
2446 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
2447 Jakub Jelinek <jakub@redhat.com>
2452 * pt.c (template_template_parm_bindings_ok_p): New; verifies
2453 bindings of template template parameters after all template
2454 arguments have been deduced.
2455 (coerce_template_parms): Don't complain when COMPLAIN doesn't
2457 (fn_type_unification): Use template_template_parm_bindings_ok_p.
2458 (unify): Deal with variadic, bound template template parameters.
2459 (get_class_bindings): Use template_template_parm_bindings_ok_p.
2461 2007-12-18 Jakub Jelinek <jakub@redhat.com>
2464 * decl.c (grokdeclarator): Reject friend sfk_constructor
2467 2007-12-17 Jakub Jelinek <jakub@redhat.com>
2470 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
2473 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
2476 * cp-lang.c (cp_classify_record): New.
2477 (LANG_HOOKS_CLASSIFY_RECORD): Override.
2479 2007-12-11 Jakub Jelinek <jakub@redhat.com>
2482 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
2485 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
2486 dynamic_cast in a template.
2488 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2491 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2492 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2494 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2497 * error.c (dump_type_prefix, dump_type_suffix): Handle
2498 TYPE_PACK_EXPANSION.
2501 * error.c (dump_expr): Handle ABS_EXPR.
2503 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2507 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2508 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2509 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2510 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2511 flag_use_repository and repo_emit_p returned 2.
2513 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2516 * tree.c (stabilize_call, stabilize_init): Do nothing if
2517 processing_template_decl.
2519 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2522 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2523 error instead of assertion failure.
2524 * parser.c (cp_parser_decltype): If closing paren is not found,
2525 return error_mark_node.
2527 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2530 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2532 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2533 since arg_assoc_template_arg will deal with them (better).
2535 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2538 * pt.c (tsubst_exception_specification): Handle substitutions into
2539 member templates, where tsubst_pack_expansion returns a
2540 TYPE_PACK_EXPANSION.
2542 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2545 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2546 bindings for the template parameter pack, don't try to keep the
2547 empty deduced arguments.
2548 (unify): If a parameter is a template-id whose template argument
2549 list contains a pack expansion that is not at the end, then we
2550 cannot unify against that template-id.
2552 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2555 * pt.c (current_template_args): Use error_operand_p.
2557 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2560 * error.c (dump_decl): Handle TREE_BINFO.
2562 2007-12-01 Ollie Wild <aaw@google.com>
2565 * typeck.c (build_binary_op): Add conversion of pointers to function
2566 members appearing as operands to the equality operators.
2568 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2571 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2573 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2576 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2578 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2583 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2585 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2588 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2590 PR tree-optimization/34181
2591 * method.c (use_thunk): Don't inline the call in the thunk.
2594 * tree.c (decl_linkage): Static data members and static member
2595 functions in anonymous ns classes are lk_external.
2597 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2600 * decl.c (start_preparsed_function): Pass
2601 processing_template_decl for the new allocate_struct_function
2604 2007-11-25 Richard Guenther <rguenther@suse.de>
2606 * decl.c (poplevel): Use BLOCK_CHAIN.
2608 2007-11-24 Ollie Wild <aaw@google.com>
2610 * typeck.c (delta_from_ptrmemfunc): New function.
2611 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2612 (build_binary_op): Call delta_from_ptrmemfunc.
2614 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2618 * decl.c (cp_finish_decl): Disallow variable or field
2619 definitions if extern "Java" aggregates.
2620 (grokparms): Disallow parameters with extern "Java"
2622 (check_function_type): Disallow function return values
2623 with extern "Java" aggregates.
2624 * init.c (build_new_1): Disallow placement new with
2625 extern "Java" aggregates.
2627 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2628 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2631 * call.c (convert_like_real): Build a zero constant when __null is
2632 converted to an integer type.
2634 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2637 * decl2.c (cp_write_global_declarations): Issue error about static
2638 data members in anonymous namespace which are declared and used,
2641 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2644 * parser.c (cp_parser_class_head): Reject function template ids.
2647 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2648 when processing_template_decl to build_array_type.
2651 * pt.c (more_specialized_fn): Don't segfault if one or
2652 both argument list end with ellipsis.
2654 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2657 * semantics.c (finish_call_expr): Set
2658 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2659 or OVERLOAD with all noreturn functions.
2661 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2664 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2667 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2674 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2675 set to error_mark_node the outermost POINTER_TYPE to the pack if
2676 it is seen in a POINTER_TYPE.
2677 (push_template_decl_real): If check_for_bare_parameter_packs
2678 fails for function return type, set the return type to
2679 integer_type_node. If check_for_bare_parameter_packs failed
2680 for non-function, return error_mark_node.
2683 * call.c (build_new_op): Call resolve_args before calling
2686 2007-11-11 Tom Tromey <tromey@redhat.com>
2689 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2691 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2694 * pt.c (redeclare_class_template): Update error message. Use a
2695 note to show the previous declaration.
2696 (tsubst_friend_class): Use the location of the friend template as
2697 the input location before calling redeclare_class_template.
2699 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2702 * semantics.c (finish_pseudo_destructor_expr): Handle
2703 object == error_mark_node.
2705 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2708 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2709 is not scalar type, let finish_class_member_access_expr handle
2710 diagnostics. Pass BIT_NOT_EXPR argument to
2711 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2713 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2716 * decl.c (cp_complete_array_type): If any of the initializer
2717 elements are pack expansions, don't compute the array size yet.
2719 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2722 * tree.c (decl_linkage): Fields have no linkage.
2724 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2726 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2728 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2733 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2734 Be careful with ERROR_MARK_NODEs.
2735 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2738 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2741 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2744 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2748 * tree.c (c_build_qualified_type): Define bridge to
2749 cp_build_qualified_type.
2751 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2762 * typeck.c (check_return_expr): Pass address of retval to
2763 check_for_bare_parameter_packs.
2764 * class.c (build_base_field): Tolerate bases that have no layout
2766 (end_of_base): Ditto.
2767 * tree.c (canonical_type_variant): Be careful with
2769 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2771 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2772 which states whether parameter packs should be replaced with
2774 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2775 possible. If set_packs_to_error is set true, replace the parameter
2776 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2777 (uses_parameter_packs): Don't set parameter packs to
2779 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2780 which may be modified (if it is a parameter pack). Instructs
2781 find_parameter_packs_r to replace parameter packs with
2782 ERROR_MARK_NODE (so that they won't cause errors later on).
2783 (process_template_parm): Pass pointer to
2784 check_for_bare_parameter_packs.
2785 (process_partial_specialization): Replace pack expansions before
2786 the end of the template argument list with ERROR_MARK_NODE.
2787 (push_template_decl_real): Pass pointer to
2788 check_for_bare_parameter_packs. Replace parameter packs not at the
2789 end of the template parameter list with ERROR_MARK_NODE.
2790 (convert_template_argument): Be more careful about using DECL_NAME
2791 on only declarations.
2792 (unify): Can't unify against ERROR_MARK_NODE.
2793 * semantics.c (finish_cond): Pass pointer to
2794 check_for_bare_parameter_packs.
2795 (finish_expr_stmt): Ditto.
2796 (finish_for_expr): Ditto.
2797 (finish_switch_cond): Pass pointer to
2798 check_for_bare_parameter_packs, and call it before we put the
2799 condition into the statement.
2800 (finish_mem_initializers): Pass pointer to
2801 check_for_bare_parameter_packs.
2802 (finish_member_declaration): Ditto.
2803 * parser.c (cp_parser_base_clause): Ditto.
2805 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2808 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2809 with the final TREE_READONLY flag in place. processing_template_decl
2810 is known to be 0 in this part of function.
2813 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2814 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2815 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2816 * semantics.c (finish_omp_atomic): Revert most of the
2817 2007-02-05 changes, just keep the new representation of
2818 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2820 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2823 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2826 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2831 * typeck.c (merge_types): Don't lose rvalue references when
2833 * call.c (build_over_call): Don't elide move constructors just
2834 because the copy constructor is trivial (!).
2835 (compare_ics): If comparing cv-qualifiers fails, we can still order
2836 based on binding lvalues vs. rvalues.
2838 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2841 * pt.c (unify_pack_expansion): bring handling of function call
2842 arguments into line with type_unification_real.
2844 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2846 * typeck.c (build_binary_op): Use pedwarn instead of error for
2849 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2852 * parser.c (cp_parser_unary_expression): For &&label call
2853 cp_parser_non_integral_constant_expression and return error_mark_node
2854 if it returned true.
2857 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2858 is neither FUNCTION_TYPE nor METHOD_TYPE.
2860 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2863 * parser.c (cp_parser_nested_name_specifier_opt): Use
2864 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2865 typedef of currently open class.
2867 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2870 * error.c (dump_expr): Deal specially with statements.
2872 2007-11-01 Jason Merrill <jason@redhat.com>
2875 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2877 (lookup_template_class): Use it to get the outer template args
2878 for instantiating one.
2881 * pt.c (reduce_template_parm_level): tsubst the parameters
2882 of a template template parm.
2884 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2887 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2889 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2892 * parser.c (cp_parser_postfix_dot_deref_expression): If
2893 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2894 first and if that succeeds and type is SCALAR_TYPE_P, create
2898 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2899 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2900 as for std::type_info.
2902 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2905 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2906 pp_cxx_delete_expression): Change to static linkage.
2907 * cxx-pretty-print.h: Adjust declarations.
2908 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2909 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2910 MODOP_EXPR): Forward to pp_expression.
2912 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2915 2007-10-31 Christian Bruel <christian.bruel@st.com>
2916 Mark Mitchell <mark@codesourcery.com>
2919 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2920 if retval is volatile.
2922 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2925 * decl2.c (build_offset_ref_call_from_tree): Call
2926 build_non_dependent_expr on object prior to building ADDR_EXPR from it
2927 if FN is DOTSTAR_EXPR.
2929 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2933 * pt.c (find_parameter_packs_r): Fix typo in comment.
2934 (convert_template_argument): Look at the pattern of a pack
2935 expansion to determine what kind of entity we're converting.
2936 (coerce_template_parameter_pack): When we have coerced a non-type
2937 template parameter pack, substitute into the type of that pack.
2938 (tsubst_pack_expansion): When our substitution of a parameter pack
2939 is a "trivial" substitution of itself, just substitute into the
2940 pack expansion rather than actually expanding.
2942 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2945 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2946 for non-integral type bitfields. Return true if bitfield is correct, false
2947 error has been diagnosed.
2948 (check_field_decls): If check_bitfield_decl returned false, call also
2951 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2952 Mark Mitchell <mark@codesourcery.com>
2955 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2956 class member error out and return.
2958 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2960 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2961 to current_function_decl rather than 0.
2964 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2966 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2968 2007-10-27 Jason Merrill <jason@redhat.com>
2971 * call.c (convert_default_arg): Detect recursion.
2973 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2976 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2977 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2979 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2981 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2983 2007-10-26 Jason Merrill <jason@redhat.com>
2986 * pt.c (get_template_info): New fn.
2987 (template_class_depth): Use it.
2988 (push_template_decl_real): Check that the template args of the
2989 definition match the args of the previous declaration.
2991 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2994 * decl2.c (coerce_new_type): Do not allow a default argument for
2995 the first parameter.
2997 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
3000 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
3001 don't see the leading '('. Only lookup names if we get an
3004 2007-10-26 Jakub Jelinek <jakub@redhat.com>
3007 * parser.c (cp_parser_parenthesized_expression_list): Set
3008 greater_than_is_operator_p to true in between the parens.
3010 2007-10-26 Paolo Carlini <pcarlini@suse.de>
3013 * decl.c (grokdeclarator): In case of conflicting specifiers
3014 just return error_mark_node.
3016 2007-10-26 Ollie Wild <aaw@google.com>
3018 * expr.c (cxx_expand_expr): Removed.
3019 * cp-tree.h (exx_expand_expr): Removed.
3020 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
3023 2007-10-25 Paolo Carlini <pcarlini@suse.de>
3026 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
3028 2007-10-23 Jason Merrill <jason@redhat.com>
3030 PR c++/25950 (DR 391)
3031 * call.c (struct conversion): Remove check_copy_constructor_p.
3032 (reference_binding): Always bind a reference directly to a
3033 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
3035 (check_constructor_callable): Remove.
3036 (convert_like_real): Don't call it.
3037 (initialize_reference): Don't call check_constructor_callable.
3038 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
3039 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
3040 conversions if LOOKUP_NO_TEMP_BIND.
3041 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
3042 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
3044 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
3046 2007-10-22 Jakub Jelinek <jakub@redhat.com>
3049 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
3050 before checking if its type is integral.
3052 2007-10-22 Jason Merrill <jason@redhat.com>
3055 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
3056 * pt.c (apply_late_template_attributes): Splice out dependent
3057 attributes from DECL_ATTRIBUTES.
3059 * decl.c (cxx_maybe_build_cleanup): Use build_address.
3061 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3063 * typeck.c (build_binary_op) : Use appropriate warning option
3064 instead of unnamed warning.
3066 2007-10-16 Paolo Carlini <pcarlini@suse.de>
3069 * pt.c (current_template_args): Do not change TREE_LIST elements
3070 with a TREE_VALUE of error_mark_node.
3072 2007-10-16 Mark Mitchell <mark@codesourcery.com>
3074 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
3075 * decl.c (start_decl): Tidy.
3076 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
3078 (grokdeclarator): Clarify comment.
3080 2007-10-14 Andrew Pinski <pinskia@gmail.com>
3083 * decl.c (grokfndecl): Return NULL after the "definition of
3084 implicitly-declared" error happened.
3086 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
3089 * call.c (build_user_type_conversion_1): Do not consider conversion
3090 functions to convert a (possibly cv-qualified) object to the (possibly
3091 cv-qualified) same object type (or a reference to it), to a (possibly
3092 cv-qualified) base class of that type (or a reference to it).
3094 2007-10-12 Paolo Carlini <pcarlini@suse.de>
3096 * pt.c (tsubst): Use template_parm_level_and_index.
3098 2007-10-12 Jakub Jelinek <jakub@redhat.com>
3101 * parser.c (cp_parser_compound_statement): Handle label-declarations
3102 at the beginning of the compound statement.
3103 (cp_parser_block_declaration): Issue diagnostics about __label__
3104 not at the beginning of a block.
3106 2007-10-11 Paolo Carlini <pcarlini@suse.de>
3109 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
3110 to convert_template_argument.
3111 (coerce_template_parms): Return error_mark_node after fixed-length
3113 (tsubst_decl): Check for error_mark_node the return value of the
3114 first tsubst in 'case VAR_DECL'.
3116 2007-10-08 Ollie Wild <aaw@google.com>
3118 * typeck2.c (digest_init): Call cplus_expand_constant after
3119 convert_for_initialization.
3120 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3121 * expr.c (cplus_expand_constant): Updated function description.
3123 2007-10-04 Jason Merrill <jason@redhat.com>
3126 * call.c (initialize_reference): Handle local static reference
3129 2007-10-03 Jason Merrill <jason@redhat.com>
3132 * name-lookup.c (push_namespace_with_attrs): Fold back into...
3133 (push_namespace): Here.
3134 (handle_namespace_attrs): New fn for the attr code.
3135 (leave_scope): Don't pop_visibility.
3136 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
3137 * parser.c (cp_parser_namespace_definition): Call
3138 handle_namespace_attrs and pop_visibility as appropriate.
3141 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
3143 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
3145 * decl.c (duplicate_decls): Preserve linkage flags for mere
3146 redeclarations of gnu_inline definitions.
3148 2007-10-03 Jason Merrill <jason@redhat.com>
3151 * decl.c (wrap_cleanups_r): New fn.
3152 (wrap_temporary_cleanups): New fn.
3153 (initialize_local_var): Call it.
3155 2007-09-29 Jason Merrill <jason@redhat.com>
3158 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
3159 constant to not have DECL_EXTERNAL if it's file-local.
3161 2007-09-28 Ollie Wild <aaw@google.com>
3164 2007-09-27 Ollie Wild <aaw@google.com>
3166 * typeck2.c (digest_init): Call cplus_expand_constant after
3167 convert_for_initialization.
3168 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3169 * expr.c (cplus_expand_constant): Updated function description.
3171 2007-09-28 Jason Merrill <jason@redhat.com>
3174 * class.c (layout_empty_base): Take rli parameter, update
3175 rli->record_align if empty base has user-specified alignment.
3176 (build_base_field): Pass rli to it.
3178 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3181 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
3183 2007-09-28 Paolo Carlini <pcarlini@suse.de>
3186 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
3187 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
3188 (dump_parameters): Just call dump_type for argument packs too.
3190 2007-09-28 Jakub Jelinek <jakub@redhat.com>
3193 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
3194 qualification by creating qualified PACK_EXPANSION_PATTERN and
3195 then calling make_pack_expansion on it.
3197 2007-09-27 Ollie Wild <aaw@google.com>
3199 * typeck2.c (digest_init): Call cplus_expand_constant after
3200 convert_for_initialization.
3201 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
3202 * expr.c (cplus_expand_constant): Updated function description.
3204 2007-09-27 Jason Merrill <jason@redhat.com>
3207 * decl2.c (is_late_template_attribute): Don't crash on unknown
3210 2007-09-27 Paolo Carlini <pcarlini@suse.de>
3213 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
3214 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
3215 spaces in the formatting.
3216 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
3218 2007-09-27 Jakub Jelinek <jakub@redhat.com>
3220 * error.c (cxx_print_error_function): Add third argument, pass
3221 it over to lhd_print_error_function.
3222 (cp_print_error_function): If diagnostic->abstract_origin, print
3224 * cp-tree.h (struct diagnostic_info): New forward decl.
3225 (cxx_print_error_function): Add third argument.
3227 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
3230 * name-lookup.c (pushtag): Do not create an implicit typedef before
3231 the associated type declaration is known to be valid.
3233 2007-09-25 Jakub Jelinek <jakub@redhat.com>
3235 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
3236 rather than pointers.
3238 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
3241 * search.c (check_final_overrider): Fail if
3242 targetm.comp_type_attributes returns 0.
3244 2007-09-24 Jason Merrill <jason@redhat.com>
3247 * pt.c (resolve_typename_type): Don't look things up in the original
3248 template if it would mean losing template arguments.
3250 2007-09-24 Jakub Jelinek <jakub@redhat.com>
3253 * cp-tree.h (cxx_type_hash_eq): New prototype.
3254 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
3255 * tree.c (cxx_type_hash_eq): New function.
3257 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3260 * tree.c (cp_build_qualified_type_real): Build a canonical
3261 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
3263 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
3267 * tree.c (cplus_array_compare): Compare pointers, not types.
3268 (build_cplus_array_type_1): Store new array type into the hash
3269 table before building the canonical type; build the canonical type
3271 (cp_build_qualified_type_real): Put all of the array types with
3272 cv-qualified element types into the C++ array hash table, built as
3273 variants of the unqualified versions.
3275 2007-09-23 Jason Merrill <jason@redhat.com>
3278 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
3279 for deprecation warnings.
3281 2007-09-22 Jason Merrill <jason@redhat.com>
3284 * call.c (build_over_call): Warn about deprecated virtuals.
3287 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
3288 (MAYBE_TAGGED_TYPE_P): Remove.
3289 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
3290 instead of calling is_late_template_attribute again.
3291 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
3292 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
3293 Don't crash on typedefs from non-template classes.
3294 * decl2.c (grokfield): Don't sorry about attrs on template parms.
3295 (is_late_template_attribute): All attributes applied to template
3296 parms or typename types are dependent. Static.
3297 (splice_template_attributes): Pass decl through.
3298 (save_template_attributes): Likewise.
3300 2007-09-20 Jakub Jelinek <jakub@redhat.com>
3303 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
3304 returned from tsubst_pack_expansion.
3305 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
3306 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
3308 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3311 * semantics.c (finish_id_expression): Use consistently
3312 context_for_name_lookup.
3313 * decl.c (fixup_anonymous_aggr): Fix error message for
3314 anonymous struct (vs union).
3316 2007-09-19 Jason Merrill <jason@redhat.com>
3319 * pt.c (tsubst): Handle typedefs by looking for the specialization.
3320 (retrieve_specialization): Only tagged types use
3321 DECL_TEMPLATE_INSTANTIATIONS.
3322 (instantiate_class_template): Push nested classes too.
3323 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
3325 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
3326 * init.c (is_aggr_type): Remove redundant tests.
3327 * class.c (push_nested_class): Use CLASS_TYPE_P.
3329 2007-09-20 Paolo Carlini <pcarlini@suse.de>
3332 * init.c (build_zero_init): If, recursively, build_zero_init
3333 returns a NULL_TREE, do not append it to the VEC of constructors.
3335 2007-09-18 Jason Merrill <jason@redhat.com>
3338 * pt.c (apply_late_template_attributes): Set processing_template_decl.
3339 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
3340 ATTR_FLAG_TYPE_IN_PLACE.
3341 (tsubst): Do unqualified lookup to find typedefs from current class.
3342 [ARRAY_TYPE]: Propagate alignment info.
3343 * decl2.c (is_late_template_attribute): Only defer handling of
3344 attribute aligned if the expression is dependent.
3345 (save_template_attributes): If we're deferring any attributes,
3346 make this a naming typedef.
3348 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3350 PR c++/33462 (again)
3351 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
3352 va_arg instead of __builtin_va_arg.
3354 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3357 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
3358 (pp_cxx_primary_expression): Use it.
3359 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
3360 * error.c (dump_expr): Use it.
3362 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3365 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
3366 out case TYPEID_EXPR to...
3367 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
3368 and pp_cxx_right_paren.
3369 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
3370 * error.c (dump_expr): Use it.
3372 2007-09-18 Paolo Carlini <pcarlini@suse.de>
3375 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
3376 (pp_cxx_primary_expression): Use it.
3377 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
3378 * error.c (dump_expr): Use it.
3380 2007-09-16 Paolo Carlini <pcarlini@suse.de>
3383 * init.c (build_new): Remove warning for zero-element
3386 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
3389 * call.c (maybe_handle_implicit_object): Set this_p, clear
3390 rvaluedness_matches_p.
3391 (compare_ics): Do not compare rvaluedness matching when one of the
3392 operands is an implicit object.
3394 2007-09-14 Jason Merrill <jason@redhat.com>
3396 PR c++/17743, c++/19163
3397 * decl2.c (is_late_template_attribute): New fn.
3398 (splice_template_attributes, save_template_attributes): New fns.
3399 (cplus_decl_attributes): Call save_template_attributes.
3400 * pt.c (apply_late_template_attributes): New fn.
3401 (instantiate_class_template, tsubst_decl): Use it.
3402 * cp-tree.h: Declare is_late_template_attribute.
3404 2007-09-13 Tom Tromey <tromey@redhat.com>
3406 * parser.c (cp_lexer_new_main): Don't use
3407 c_lex_return_raw_strings.
3408 (cp_lexer_get_preprocessor_token): Update. Add special case when
3411 2007-09-11 Jan Hubicka <jh@suse.cz>
3413 * method.c (use_thunk): Use tree_rest_of_compilation
3414 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
3415 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
3416 * cp-tree.h (expand_body): Kill.
3417 (emit_associated_thunks): Declare.
3418 * semantics.c (emit_associated_thunks): Export.
3419 (expand_body): Kill.
3421 2007-09-09 David Daney <ddaney@avtrex.com>
3424 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
3425 to calculate cookie_ptr.
3427 2007-09-08 Jason Merrill <jason@redhat.com>
3430 * pt.c (most_specialized_class): Set processing_template_decl
3431 while tsubsting partial spec args.
3433 2007-09-06 Jason Merrill <jason@redhat.com>
3435 * decl2.c (get_guard): Copy visibility from the guarded variable.
3437 2007-09-06 Jan Hubicka <jh@suse.cz>
3439 * semantics.c (expand_body): Do not mark arguments of clones used.
3441 2007-09-06 Paolo Carlini <pcarlini@suse.de>
3444 * decl.c (cp_finish_decl): When processing_template_decl,
3445 deal correctly with init as TREE_LIST.
3447 2007-09-06 Tom Tromey <tromey@redhat.com>
3449 * decl.c (finish_function): Put return's location on line zero of
3452 2007-09-05 Jason Merrill <jason@redhat.com>
3455 * except.c (prepare_eh_type): Use type_decays_to.
3458 * init.c (build_delete): Use build_headof to get the address of the
3459 complete object if we aren't using the deleting destructor.
3460 * rtti.c (build_headof): No longer static.
3461 * cp-tree.h: Declare it.
3463 2007-09-06 Jakub Jelinek <jakub@redhat.com>
3465 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
3466 decl if a prototype for XX is provided with throw().
3469 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
3470 on __*_chk non-__builtin_* decls.
3472 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3475 * semantics.c (finish_id_expression): Use context_for_name_lookup
3476 insted of DECL_CONTEXT, to see through anonymous structs and unions.
3477 * class.c (finish_struct_anon): Deal correctly with anonymous
3478 structs (vs unions, as GNU extension) in error messages.
3480 2007-09-05 Jan Hubicka <jh@suse.cz>
3482 * sematics.c (expand_body): Remove unnecesary import_export_decl
3483 call, DECL_EXTERNAL checks and current_function_decl saving.
3485 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3487 PR c++/29731 (again)
3488 * parser.c (cp_parser_primary_expression): Return error_mark_node
3489 when a statement-expression is found in a template-argument list.
3491 2007-09-04 Jason Merrill <jason@redhat.com>
3493 * except.c (initialize_handler_parm): Use
3494 fold_build_cleanup_point_expr.
3497 * call.c (reference_binding): Don't look for user-defined conversions
3501 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3502 the MUST_NOT_THROW_EXPR.
3504 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3506 * decl.c (cp_finish_decl): Call determine_visibility before
3507 make_rtl_for_nonlocal_decl.
3509 2007-09-04 Jason Merrill <jason@redhat.com>
3512 * pt.c (most_specialized_class): Substitute outer template
3513 arguments into the arguments of a member template partial
3515 (strip_innermost_template_args): New fn.
3517 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3519 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3521 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3523 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3524 * decl.c (cp_make_fname_decl): Likewise,
3525 * parser.c (cp_parser_string_literal): Likewise,
3526 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3527 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3530 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3533 * typeck.c (build_unary_op): Fix error message for
3534 Boolean expression as operand to operator--.
3536 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3538 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3539 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3542 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3545 * init.c (build_default_init): Make extern.
3546 * cp-tree.h (build_default_init): Declare here.
3547 * pt.c (tsubst_expr): When the instantiation of the initializer of
3548 a variable results in an empty list, default-initialize the
3550 (tsubst_copy_and_build): When the instantiation of the initializer
3551 in a new expression results in an empty initializer list,
3552 default-initialize it.
3554 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3556 * mangle.c (write_type): Change mangling of rvalue reference from
3559 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3561 * decl.c (duplicate_decls): Remove duplicated line.
3563 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3566 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3567 BOUND_TEMPLATE_TEMPLATE_PARM.
3569 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3572 * search.c (lookup_member): Check the name argument for
3575 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3578 * parser.c (cp_parser_trait_expr): Check rerurn value of
3581 2007-08-30 Ollie Wild <aaw@google.com>
3583 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3584 convert_ptrmem for pointer to member conversions.
3585 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3586 (ocp_convert): Update cp_convert_to_pointer call.
3587 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3589 (build_static_cast_1): Check can_convert for conversions in either
3591 (get_delta_difference_1): New function.
3592 (get_delta_difference): Refactor to call get_delta_difference_1.
3594 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3596 * decl.c (start_preparsed_function): Set
3597 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3599 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3602 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3603 BOUND_TEMPLATE_TEMPLATE_PARM.
3605 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3609 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3610 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3612 2007-08-27 Jason Merrill <jason@redhat.com>
3615 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3616 Look inside STMT_EXPR.
3617 * semantics.c (stmt_expr_value_expr): New fn.
3618 * cp-tree.h: Declare it.
3621 * decl.c (groktypename): Ignore attributes applied to class type.
3623 2007-08-28 Richard Guenther <rguenther@suse.de>
3625 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3627 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3629 * error.c (dump_expr): Handle COMPLEX_CST.
3630 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3631 (pp_cxx_expression): Likewise.
3633 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3635 * decl.c (GNU_INLINE_P): New.
3636 (duplicate_decls): Handle gnu_inline. Merge attributes and
3637 some flags in overriding definitions.
3638 (redeclaration_error_message): Handle gnu_inline.
3639 (start_preparsed_function): Likewise.
3641 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3643 * call.c (sufficient_parms_p): Constify.
3644 * class.c (same_signature_p): Likewise.
3645 * cp-gimplify.c (is_invisiref_parm,
3646 cxx_omp_privatize_by_reference): Likewise.
3647 * cp-objcp-common.c (has_c_linkage): Likewise.
3648 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3649 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3650 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3651 num_artificial_parms_for, comp_template_parms,
3652 template_parameter_pack_p, any_dependent_template_arguments_p,
3653 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3654 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3655 zero_init_p, member_p, cp_lvalue_kind,
3656 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3657 varargs_function_p, is_dummy_object, special_function_kind,
3658 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3659 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3660 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3661 cp_has_mutable_p, at_least_as_qualified_p,
3662 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3663 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3664 * except.c (nothrow_libfn_p): Likewise.
3665 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3667 * pt.c (comp_template_parms, template_parameter_pack_p,
3668 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3669 any_dependent_template_arguments_p): Likewise.
3670 * repo.c (repo_export_class_p): Likewise.
3671 * semantics.c (anon_aggr_type_p): Likewise.
3672 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3673 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3674 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3675 zero_init_p, special_function_p): Likewise.
3676 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3677 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3678 compparms, invalid_nonstatic_memfn_p,
3679 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3680 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3681 cp_has_mutable_p, lvalue_or_else): Likewise.
3683 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3685 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3686 * cp-objcp-common.c (cp_tree_size): Ditto.
3687 * tree.c (cp_walk_subtrees): Ditto
3688 * cp-tree.def (TINST_LEVEL): Go away.
3689 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3690 move together with other non-tree structs.
3691 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3692 (union lang_tree_node): Eliminate tinst_level field.
3693 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3694 (current_instantiation, outermost_tinst_level): Return
3695 a "struct tinst_level *".
3697 * error.c (print_instantiation_partial_context): Change second
3698 parameter to a "struct tinst_level *". Replace accessor macros
3700 (print_instantiation_full_context): Likewise.
3701 * lex.c (in_main_input_context): Likewise.
3703 * pt.c (struct pending_templates): New.
3704 (pending_templates, last_pending_template): Use it as a type.
3705 (current_tinst_level): Change typo to "struct tinst_level *"
3706 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3707 (add_pending_template): Construct a "struct pending_template".
3708 Replace TINST_LEVEL accessor macros with field access.
3709 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3710 (pop_tinst_level): Likewise.
3711 (instantiate_pending_templates): Likewise. Factor common code used
3712 when an instantiation has been done.
3713 (outermost_tinst_level): Replace tree_last with loop.
3714 (current_instantiation): Return a "struct tinst_level *".
3716 2007-08-24 Ollie Wild <aaw@google.com>
3718 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3719 * name-lookup.h (cp_binding_level): Remove vtables member.
3721 2007-08-24 Richard Guenther <rguenther@suse.de>
3723 * tree.c (cp_cannot_inline_tree_fn): Remove.
3724 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3725 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3728 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3731 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3732 error_mark_node right away if build_expr_type_conversion
3736 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3737 is error_mark_node rather than NULL_TREE.
3738 * pt.c (check_explicit_specialization): Likewise.
3741 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3742 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3744 2007-08-22 Jason Merrill <jason@redhat.com>
3747 * pt.c (outermost_tinst_level): New function.
3748 * lex.c (in_main_input_context): New function.
3749 * cp-tree.h: Declare it.
3750 * decl2.c (constrain_class_visibility): Use it to avoid warning
3751 about uses of the anonymous namespace in the main input file.
3753 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3755 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3757 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3760 * class.c (finish_struct_1): Warn when a class has virtual
3761 functions and accessible non-virtual destructor.
3763 2007-08-20 Richard Guenther <rguenther@suse.de>
3767 * call.c (build_new_method_call): Convert initializer to
3769 * init.c (build_aggr_init): Do not fiddle with types.
3770 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3771 * except.c (build_throw): Do not drop qualifiers for the
3773 * typeck.c (get_member_function_from_ptrfunc): Do not
3774 fiddle with types, instead convert.
3775 (build_ptrmemfunc1): Convert to the target type for
3777 (gfc_trans_allocate): Convert result to target type.
3778 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3779 pointer-to-member structures shall have alias set zero as well.
3781 2007-08-20 Richard Guenther <rguenther@suse.de>
3783 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3785 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3786 (nonstatic_local_decl_p): Likewise.
3787 * tree.c (cp_auto_var_in_fn_p): Remove.
3788 * decl.c (nonstatic_local_decl_p): Remove.
3790 2007-08-20 Richard Guenther <rguenther@suse.de>
3792 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3794 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3795 cp_walk_subtrees lh parameter.
3796 (cp_walk_tree_without_duplicates): New define to
3797 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3798 * tree.c (count_trees): Call
3799 cp_walk_tree_without_duplicates.
3800 (verify_stmt_tree): Call cp_walk_tree.
3801 (break_out_target_exprs): Likewise.
3802 (WALK_SUBTREE): Likewise.
3803 * cp-gimplify.c (cp_genericize): Likewise.
3804 * cp-pt.c (find_parameter_packs_r): Likewise.
3805 (uses_parameter_packs): Likewise.
3806 (make_pack_expansion): Likewise.
3807 (check_for_bare_parameter_packs): Likewise.
3808 (for_each_template_parm): Likewise.
3809 * decl.c (check_default_argument): Call
3810 cp_walk_tree_without_duplicates.
3811 * except.c (build_throw): Likewise.
3812 * decl2.c (type_visibility): Likewise.
3813 * semantics.c (expand_or_defer_fn): Likewise.
3814 (finalize_nrv): Call cp_walk_tree.
3816 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3819 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3820 Initialize it with save_expr rather than get_temp_regvar.
3822 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3825 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3828 2007-08-17 Ollie Wild <aaw@google.com>
3831 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3832 declarations into appropriate slots for comparison. Fix type
3835 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3838 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3839 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3841 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3844 * parser.c (cp_parser_class_head): Improve error message.
3846 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3848 * pt.c (instantiate_decl): Set input_location
3849 for the function end.
3851 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3853 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3855 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3856 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3857 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3858 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3859 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3860 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3861 * typeck.c (cp_type_quals): Likewise.
3862 * typeck2.c (cxx_incomplete_type_diagnostic,
3863 cxx_incomplete_type_error): Likewise.
3865 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3868 * pt.c (tsubst_friend_function): When check_classfn
3869 returns error_mark_node likewise return it.
3871 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3874 * typeck.c (check_return_expr): Don't NRV optimize vars in
3876 * decl.c (finish_function): Comment fix.
3878 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3881 * pt.c (push_template_decl_real): Depending on TYPE_P
3882 use either TYPE_CONTEXT or DECL_CONTEXT.
3884 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3886 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3887 constructors and destructors return this.
3889 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3892 * decl2.c (check_classfn): Return error_mark_node in case of error;
3893 in that case, do not call add_method.
3894 * decl.c (start_decl): Deal with check_classfn returning
3896 (grokfndecl): Likewise.
3897 * pt.c (tsubst_friend_function): Likewise.
3899 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3902 * typeck.c (build_binary_op): Disallow vector float types with
3903 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3905 2007-08-11 Ian Lance Taylor <iant@google.com>
3907 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3909 * cp-tree.h (cxx_get_alias_set): Update declaration.
3911 2007-08-10 Ollie Wild <aaw@google.com>
3913 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3915 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3917 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3918 (lookup_using_namespace): Fix ambiguous_decl call.
3919 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3921 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3923 * call.c (name_as_c_string): Use CONST_CAST.
3924 * decl.c (build_decl): Likewise.
3925 * parser.c (cp_parser_string_literal): Likewise.
3927 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3930 * error.c (dump_expr): Consistently use the *_cxx_*
3931 variants of the pretty-print functions.
3933 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3936 * decl.c (check_special_function_return_type): Just error
3937 on return type specified for conversion operator.
3939 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3941 * typeck2.c (readonly_error): Handle general expressions.
3942 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3944 2007-08-06 Dan Hipschman <dsh@google.com>
3946 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3947 access function name.
3949 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3952 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3953 * g++spec.c (lang_specific_driver): Check them.
3955 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3958 * pt.c (inline_needs_template_parms): Fix comment; change return type
3961 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3964 2007-03-26 Dirk Mueller <dmueller@suse.de>
3966 * parser.c (cp_parser_member_declaration): Pedwarn
3967 about stray semicolons after member declarations.
3969 2007-08-02 Lee Millward <lee.millward@gmail.com>
3974 * parser.c (cp_parser_asm_definition): Detect and discard asm
3975 statements with invalid inputs or outputs.
3976 (cp_parser_asm_operand_list): Return error mark node if any
3977 of the operands are invalid. Adjust documentation.
3979 2007-08-02 Nick Clifton <nickc@redhat.com>
3981 * typeck.c: Change copyright header to refer to version 3 of the
3982 GNU General Public License and to point readers at the COPYING3
3983 file and the FSF's license web page.
3984 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3985 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3986 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3987 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3988 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3989 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3990 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3991 name-lookup.h, parser.c: Likewise.
3993 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3996 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3998 2007-07-30 Paolo Carlini <pcarlini@suse.de>
4001 * semantics.c (finish_label_stmt): Reject the __label__
4002 extension outside function scopes.
4004 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4006 * parser.c (eof_token): Un-constify.
4007 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
4008 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
4011 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
4013 * pt.c, tree.c, typeck2.c: Fix comment typos.
4015 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
4016 Mark Mitchell <mark@codesourcery.com>
4019 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
4020 hidden due to friend declarations in local classes.
4022 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
4024 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
4025 * cp-tree.def (DECLTYPE_TYPE): New.
4026 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
4027 (dump_type_prefix): Ditto.
4028 (dump_type_suffix): Ditto.
4029 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
4030 * mangle.c (write_type): Handle DECLTYPE_TYPE.
4031 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
4033 (DECLTYPE_TYPE_EXPR): New.
4034 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
4035 (finish_declared_type): Declare.
4036 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
4037 DECLTYPE_TYPE nodes.
4038 (pp_cxx_type_id): Ditto.
4039 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
4040 (tsubst): Substitute into a DECLTYPE_TYPE node.
4041 (tsubst_copy): Ditto.
4042 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
4044 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
4045 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
4046 structural equality (because we can't hash the expressions).
4047 (finish_declared_type): New.
4048 * lex.c (reswords): Add "decltype" keyword.
4049 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
4050 (cp_parser_postfix_expression): Add member_access_only_p to
4051 restrict postfix expression to member access expressions.
4052 (cp_parser_unary_expression): Update call to
4053 cp_parser_postfix_expression to reflect new parameter.
4054 (cp_parser_declared_type): New.
4055 (cp_parser_simple_type_specifier): Parse decltype types.
4057 2007-07-27 Mark Mitchell <mark@codesourcery.com>
4060 * call.c (convert_for_arg_passing): Only widen bitfields to their
4061 declared types if necessary.
4063 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4065 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
4068 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4070 * decl.c (typename_hash, typename_compare): Constify.
4071 * mangle.c (hash_type, compare_type): Likewise.
4072 * pt.c (eq_local_specializations, hash_local_specialization):
4074 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
4075 list_hash): Likewise.
4076 * typeck2.c (pat_compare): Likewise.
4078 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
4080 * method.c (implicitly_declare_fn): Increase alignment if member
4081 function pointer format requires it.
4083 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4086 * typeck.c (check_return_expr): Do not pass a null argument
4089 2007-07-24 Paolo Carlini <pcarlini@suse.de>
4092 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
4095 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
4098 * typeck.c (convert_arguments): Only use default args if we have
4102 * typeck.c (structural_comptypes): No need to check
4103 resolve_typename_type return value here.
4104 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
4105 * pt.c (resolve_typename_type): Follow typename typedefs. Return
4106 original type rather than error_mark_node in case of failure.
4107 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
4108 resolve_typename_type result check.
4109 (cp_parser_direct_declarator, cp_parser_head,
4110 cp_parser_constructor_declarator_p): Likewise.
4112 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
4114 * pt.c (template_parms_variadic_p): Remove.
4115 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
4117 2007-07-12 Jakub Jelinek <jakub@redhat.com>
4120 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
4121 argument to dump_aggr_init_expr_args instead of false.
4123 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
4125 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
4126 canonical types; otherwise, fall back to structural type
4127 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
4128 internal compiler error if the canonical types are wrong.
4130 2007-07-11 Paolo Carlini <pcarlini@suse.de>
4133 * parser.c (cp_parser_make_indirect_declarator): When the
4134 the code argument is ERROR_MARK return cp_error_declarator.
4136 2007-07-09 Geoffrey Keating <geoffk@apple.com>
4139 * decl.c (cxx_init_decl_processing): Don't set
4140 force_align_functions_log.
4141 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
4142 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
4143 FUNCTION_DECL, return its alignment.
4145 2007-07-09 Richard Guenther <rguenther@suse.de>
4147 * decl.c (start_preparsed_function): Do not promote return type.
4149 2007-07-08 Paolo Carlini <pcarlini@suse.de>
4152 * pt.c (unify): Never pass error_mark_node to template_decl_level.
4154 2007-07-07 Mark Mitchell <mark@codesourcery.com>
4157 * pt.c (resolve_overloaded_unification): Robustify. Return a
4159 (type_unification_real): Adjust accordingly.
4161 2007-07-06 Richard Guenther <rguenther@suse.de>
4163 * init.c (build_new_1): Use the correct pointer type.
4164 * typeck2.c (build_m_component_ref): Likewise.
4166 2007-07-05 Mark Mitchell <mark@codesourcery.com>
4169 * init.c (build_zero_init): Always build an initializer for
4171 * typeck2.c (build_functional_cast): Use build_zero_init.
4174 * init.c (build_new_1): Always pass the allocation function to
4175 build_op_delete_call.
4176 * call.c (build_op_delete_call): Handle operator delete with a
4177 variable-argument list. Do not issue an error when no matching
4178 deallocation function is available for a new operator.
4181 * cp-tree.h (any_value_dependent_elements_p): Declare it.
4182 * decl.c (value_dependent_init_p): New function.
4183 (cp_finish_decl): Use it.
4184 * pt.c (value_dependent_expression_p): Use
4185 any_value_dependent_elements_p.
4186 * parser.c (cp_parser_primary_expression): Add comment about
4187 treating dependent qualified names as integral
4188 constant-expressions.
4190 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
4192 * decl.c (build_ptrmemfunc_type): Always use structural equality
4193 tests when comparing pointer-to-member-function types, because the
4194 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
4197 2007-07-03 Mark Mitchell <mark@codesourcery.com>
4199 * init.c (build_new): Tweak comment.
4201 2007-06-29 Dave Brolley <brolley@redhat.com>
4204 * parser.c (cp_parser_new_type_id): Don't reduce a named array
4205 type to its base type and number of elements here.
4206 * init.c (build_new): Call complete_type_or_else to ensure that the
4207 type is complete and to issue a diagnostic if it is not.
4208 (build_new_1): Don't call complete_type_or_else here.
4210 2007-07-03 Richard Guenther <rguenther@suse.de>
4213 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
4216 2007-07-02 Simon Baldwin <simonb@google.com>
4218 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
4219 for inner-style nested forward declarations that don't declare
4222 2007-07-02 Jakub Jelinek <jakub@redhat.com>
4225 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
4226 DECL_P in not a variable and appears more than once error messages.
4228 2007-07-01 Ollie Wild <aaw@google.com>
4230 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
4231 (select_decl): Remove function.
4232 (unqualified_namespace_lookup): Populate binding by calling
4233 ambiguous_decl. Remove select_decl call.
4234 (lookup_qualified_name): Remove select_decl call.
4235 * decl.c (lookup_and_check_tag): Check for ambiguous references.
4236 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
4237 generation when name lookup is ambiguous.
4239 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
4242 * init.c (build_new_1): Use structural equality on the copy of the
4245 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4247 * decl2.c (determine_visibility): Implement
4248 flag_visibility_ms_compat effect on type info.
4249 * decl.c (cxx_init_decl_processing): Implement
4250 global effect of flag_visibility_ms_compat.
4252 2007-06-28 Geoffrey Keating <geoffk@apple.com>
4254 * decl2.c (start_objects): Mark constructor-running function
4257 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
4260 * decl.c (grokdeclarator): Reset friendp for member functions declared
4261 friend of their own class.
4263 2007-06-23 Mark Mitchell <mark@codesourcery.com>
4265 * decl2.c (determine_visibility): Don't look for dllexport here.
4266 (determine_visibility_from_class): Tidy.
4268 2007-06-18 Simon Baldwin <simonb@google.com>
4271 * parser.c (cp_parser_single_declaration): Added check for storage
4272 class other than sc_none in parsed declaration, and a flag to indicate
4273 if the call is part of an explicit template specialization parse.
4274 * (cp_parser_explicit_specialization): Specialization check flag added
4275 to call to cp_parser_single_declaration(), set true.
4276 * (cp_parser_template_declaration_after_export): Specialization check
4277 flag added to call to cp_parser_single_declaration(), set false.
4278 * pt.c (check_explicit_specialization): Added code to copy visiblity
4279 and linkage from the templated function to the explicit specialization.
4281 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4283 * typeck.c (build_binary_op): For templates build the
4284 expression in pieces to avoid the assert in build2_stat.
4285 (get_member_function_from_ptrfunc):
4286 Change over to using POINTER_PLUS_EXPR and convert
4287 the second operand to sizetype.
4288 * typeck2.c (build_m_component_ref): Likewise.
4289 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
4290 instead of PLUS_EXPR for pointers.
4291 (build_new_1): Likewise.
4292 (build_vec_delete_1): Likewise.
4293 (build_vec_delete): Likewise.
4294 * class.c (build_base_path): Likewise.
4295 (build_base_path): Likewise.
4296 (convert_to_base_statically): Likewise.
4297 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
4298 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
4299 instead of PLUS_EXPR.
4300 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
4301 instead of PLUS_EXPR for pointers.
4302 * call.c (build_special_member_call): Likewise.
4303 * rtti.c (build_headof): Likewise.
4304 Use sizetype instead of ptrdiff_type_node.
4305 (tinfo_base_init): Create a POINTER_PLUS_EXPR
4306 instead of PLUS_EXPR for pointers.
4307 * except.c (expand_start_catch_block): Do a
4308 NEGATIVE and then a POINTER_PLUS_EXPR instead
4310 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
4311 PLUS_EXPR on pointer types over to use
4312 POINTER_PLUS_EXPR and remove the conversion
4313 to the pointer types.
4314 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
4315 adding to a pointer type. Use size_int instead of
4316 ssize_int. Convert the index to sizetype before
4317 adding it to the pointer.
4319 2007-06-15 Mark Mitchell <mark@codesourcery.com>
4321 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
4322 (DECL_ANON_UNION_VAR_P): New macro.
4323 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
4324 than DECL_VAR_MARKED_P, to keep track of which variables we have
4326 * decl.c (redeclaration_error_message): Complain about redeclaring
4327 anonymous union members at namespace scope.
4328 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
4330 2007-06-14 Geoff Keating <geoffk@apple.com>
4332 * decl2.c (determine_visibility): Ensure that functions with
4333 hidden types as parameters are hidden.
4336 * decl2.c (determine_visibility): Remove duplicate code for
4339 2007-06-12 Ian Lance Taylor <iant@google.com>
4342 * init.c (avoid_placement_new_aliasing): New static function.
4343 (build_new_1): Call it.
4345 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
4347 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
4348 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
4350 2007-06-08 Jakub Jelinek <jakub@redhat.com>
4353 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
4354 on init, the non-decl cond operand and increment value.
4356 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
4359 * decl.c (check_initializer): Report an error when a brace enclosed
4360 initializer is used for a non-aggregate type in C++98.
4361 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
4363 (grokdeclarator): Likewise.
4364 (move_fn_p): Likewise.
4365 * typeck.c (check_return_expr): Likewise.
4366 * call.c (reference_binding): Likewise.
4367 * error.c (cp_cpp_error): Likewise.
4368 * pt.c (check_default_tmpl_args): Likewise.
4370 * lex.c (init_reswords): Likewise.
4371 * parser.c (p_parser_primary_expression): Likewise.
4372 (TOKEN_PRECEDENCE): Likewise.
4373 (cp_parser_init_declarator): Likewise.
4374 (cp_parser_ptr_operator): Likewise.
4375 (cp_parser_parameter_declaration): Likewise.
4376 (cp_parser_enclosed_template_argument_list): Likewise.
4377 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
4378 (cp_parser_next_token_ends_template_argument_p): Likewise.
4380 2007-06-04 Simon Baldwin <simonb@google.com>
4382 * decl.c (grokdeclarator): Readability change. Moved case labels
4383 into direct switch statement scope.
4385 2007-06-04 Paolo Carlini <pcarlini@suse.de>
4387 * call.c (convert_like_real): Remove pointless code.
4389 2007-05-31 Mark Mitchell <mark@codesourcery.com>
4391 * decl.c (get_atexit_fn_ptr_type): New function.
4392 (get_atexit_node): Use it.
4393 (start_cleanup_fn): Likewise.
4394 (register_dtor_fn): Use the object's destructor, instead of a
4395 separate cleanup function, where possible.
4396 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
4397 (atexit_fn_ptr_type_node): New macro.
4398 * decl2.c (build_cleanup): Use build_address.
4400 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
4402 * typeck.c (build_binary_op): Include types in error.
4404 2007-05-31 Jakub Jelinek <jakub@redhat.com>
4407 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
4408 needs runtime initialization.
4410 2007-05-31 Paolo Carlini <pcarlini@suse.de>
4413 * semantics.c (finish_trait_expr): Complete the types.
4415 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
4416 Douglas Gregor <doug.gregor@gmail.com>
4417 Pedro Lamarao <pedro.lamarao@mndfck.org>
4418 Howard Hinnant <howard.hinnant@gmail.com>
4422 * typeck.c (comptypes): Don't consider rvalue and lvalue
4423 reference types to be equivalent.
4424 (check_return_expr): Move from certain lvalues when returning
4426 * decl.c (grokdeclarator): Implement reference collapsing.
4427 (copy_fn_p): Don't consider constructors taking rvalue references
4428 to be copy constructors.
4430 * call.c (conversion): New "rvaluedness_matches_p" member.
4431 (convert_class_to_reference): Require reference type as first
4432 parameter instead of base type.
4433 (reference_binding): Add logic to handle rvalue references.
4434 (implicit_conversion): Update inaccurate comment.
4435 (convert_like_real): Disable creation of temporaries that are
4436 impossible to initialize for types with move constructors.
4437 (build_over_call): Elide move constructors when possible.
4438 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
4439 (maybe_handle_ref_bind): Return conversion instead of type node.
4440 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
4441 determine preferred conversion sequences.
4442 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
4443 (LOOKUP_PREFER_RVALUE): New.
4444 (DECL_MOVE_CONSTRUCTOR_P): New.
4445 (struct cp_declarator): Add "reference" member for reference
4446 types, with new "rvalue_ref" flag.
4447 (cp_build_reference_type): Declare.
4448 (move_fn_p): Declare.
4449 * error.c (dump_type_prefix): Format rvalue reference types
4450 correctly in error messages.
4451 * except.c (build_throw): Move from certain lvalues when
4453 * mangle.c (write_type): Mangle rvalue references differently
4454 than regular references.
4455 * parser.c (make_reference_declarator): Add boolean parameter for
4457 (cp_parser_make_indirect_declarator): New.
4458 (cp_parser_new_declarator_opt): Call
4459 cp_parser_make_indirect_declarator.
4460 (cp_parser_conversion_declarator_opt): Ditto.
4461 (cp_parser_declarator): Ditto.
4462 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
4464 * pt.c (tsubst): Implement reference collapsing.
4465 (maybe_adjust_types_for_deduction): Implement special template
4466 parameter deduction rule for rvalue references.
4467 (type_unification_real): Update calls to
4468 maybe_adjust_types_for_deduction.
4469 (try_one_overload): Ditto.
4470 (unify_pack_expansion): Ditto.
4471 * tree.c (lvalue_p_1): Handle rvalue reference types.
4472 (cp_build_reference_type): New.
4474 2007-05-30 Jakub Jelinek <jakub@redhat.com>
4477 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
4478 variables that need runtime initialization.
4480 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
4483 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
4484 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
4485 case POSTDECREMENT_EXPR>): Return the error_mark_node
4486 if either the real or imaginary parts would an
4489 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4490 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4493 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4494 token is a closing brace, false if there are no tokens left.
4495 (cp_parser_namespace_alias_definition): Only consume the next token if
4496 it is a closing brace.
4498 * parser.c (cp_parser_class_specifier): Likewise.
4500 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4502 * semantics.c (finish_member_declaration): Fix a typo in the
4505 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4517 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4518 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4519 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4520 whether everything was okay. Fix indentation.
4521 (push_template_decl_real): Check for bare parameter packs in
4522 function parameters; where errors occur, mark the parameter types
4523 with ERROR_MARK_NODEs to avert ICEs.
4524 (coerce_template_parameter_pack): New.
4525 (coerce_template_parms): Moved parameter pack coercion into
4526 coerce_template_parameter_pack, and permit it anywhere in the
4527 template parameter list (not just at the end). Parameter and
4528 argument indices can vary (somewhat) separately now, so add
4529 PARM_IDX and ARG_IDX.
4530 (fn_type_unification): Don't set an argument pack as incomplete if
4531 no argument pack was deduced.
4532 (type_unification_real): If a type parameter is a parameter pack
4533 and has not otherwise been deduced, it will be deduced to an empty
4535 (more_specialized_fn): Use the actual lengths of the argument
4536 lists when comparing against expansions.
4537 * semantics.c (finish_member_declaration): If a field's type has
4538 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4540 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4543 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4545 2007-05-22 Ollie Wild <aaw@google.com>
4547 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4548 (unqualified_namespace_lookup): Adds check for hidden types.
4550 2007-05-22 Ollie Wild <aaw@google.com>
4552 * decl.c (duplicate_decls): Verify namespace names are unique.
4554 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4556 * decl.c (cxx_maybe_build_cleanup): Handle
4557 __attribute__((cleanup)).
4559 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4561 * cvt.c (cp_convert_and_check): Don't check warnings if the
4564 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4566 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4568 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4571 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4572 type only if is a class type (5.2.8/4).
4574 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4576 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4577 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4578 c_common_unsigned_type.
4580 2007-05-11 Silvius Rus <rus@google.com>
4582 * typeck.c (build_indirect_ref): Add call to
4583 strict_aliasing_warning.
4584 (build_reinterpret_cast_1): Condition call to
4585 strict_aliasing_warning.
4587 2007-05-11 Jan Hubicka <jh@suse.cz>
4589 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4590 * decl2.c (start_objects): ctors and dtors are no longer public.
4591 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4593 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4595 * typeck.c (build_unary_op): Remove code that used to
4596 handle non lvalue increments/decrements.
4598 2007-05-07 Mike Stump <mrs@apple.com>
4600 * parser.c (check_empty_body): Add.
4601 (cp_parser_iteration_statement): Add call to check_empty_body.
4603 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4606 * mangle.c (write_mangled_name): Mangle static variable names.
4607 (write_unqualified_name): Use local-source-name for
4608 namespace-scope static variables.
4610 2007-05-04 Dirk Mueller <dmueller@suse.de>
4612 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4615 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4618 * decl2.c (constrain_class_visibility):
4619 Use strip_pointer_or_array_types instead of strip_array_types.
4621 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4624 * decl.c (reshape_init_r): Don't reshape the first element if it
4625 is a pointer to member function.
4627 2007-04-27 Simon Baldwin <simonb@google.com>
4629 * decl.c (grokparms): Changed message format from %qD to %qE.
4631 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4633 * error.c (maybe_warn_variadic_templates): Variadic templates are
4634 now in C++0x, so only warn about them in C++98 mode.
4636 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4639 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4640 integeral types from vectors types.
4642 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4645 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4646 for type dependent OMP_CLAUSE_DECLs.
4648 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4651 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4652 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4653 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4654 * init.c (build_zero_init): Adjust, as
4655 COMPLEX_TYPE is now a SCALAR_TYPE.
4656 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4657 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4659 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4661 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4662 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4663 (trait_expr_value): Adjust.
4665 2007-04-23 Simon Baldwin <simonb@google.com>
4667 * decl.c (grokparms): Added new error for duplicate function
4668 parameters names in function prototypes, to match gcc behavior.
4670 2007-04-23 Jan Hubicka <jh@suse.cz>
4672 * decl2.c (finish_objects): Do not call target constructor/destructor
4675 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4677 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4678 instead of checking GIMPLE_STMT_P in chain_next.
4680 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4683 * call.c (convert_for_arg_passing): Convert bitfields to their
4686 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4689 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4691 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4694 * decl2.c (constrain_class_visibility):
4695 Do not warn about the use of anonymous namespace in the main input file.
4697 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4699 * cp-tree.h (current_template_parms): Fix typo in comment.
4701 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4703 * cp-tree.h, error.c: Fix comment typos.
4705 2007-04-13 Jason Merrill <jason@redhat.com>
4708 * call.c (reference_binding): Add c_cast_p parm. If true,
4709 add quals to TO as needed to make it reference-compatible.
4711 2007-04-11 Jan Hubicka <jh@suse.cz>
4713 * class.c (convert_to_base_statically): Fold produced tree; verify
4714 that we are not processing template_decl.
4716 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4719 * class.c (build_base_path): Ensure that the converted pointer has
4720 the same cv-qualification as the input.
4722 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4724 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4726 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4728 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4730 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4731 * tree.c (cp_add_pending_fn_decls): Remove.
4732 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4734 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4736 Revert change removing staticp.
4738 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4740 * cp-objcp-common.c (cxx_staticp): Remove.
4741 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4742 * cp-tree.h (cxx_staticp):
4744 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4746 * class.c (check_for_override): Don't remove dllmport attribute
4749 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4752 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4753 type issue error and return early.
4755 2007-03-30 Jason Merrill <jason@redhat.com>
4758 * typeck.c (cp_type_readonly): New fn.
4759 * cp-tree.h: Declare it.
4760 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4761 (cp_finish_decl): Not here.
4763 2007-03-31 Richard Guenther <rguenther@suse.de>
4765 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4768 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4773 * parser.c (declarator_can_be_parameter_pack): New.
4774 (cp_parser_template_parameter): Only parse the `...' if the
4775 declarator can be a parameter pack.
4776 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4778 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4779 types (they could be used as array bounds).
4780 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4781 (tsubst_pack_expansion): Handle failure to expand parameter
4784 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4787 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4788 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4789 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4790 (CLASS_TYPE_NON_UNION_P): Add.
4791 (struct lang_type_class): Add has_complex_dflt.
4792 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4793 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4794 * cp-tree.def: Add TRAIT_EXPR.
4795 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4796 * lex.c (struct resword): Add __has_nothrow_assign,
4797 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4798 __has_trivial_constructor, __has_trivial_copy,
4799 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4800 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4801 __is_pod, __is_polymorphic, __is_union.
4802 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4803 (cp_parser_trait_expr): New.
4804 * semantics.c (finish_trait_expr, trait_expr_value
4805 classtype_has_nothrow_copy_or_assign_p): New.
4806 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4808 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4809 * class.c (check_bases, check_field_decl, check_bases_and_members):
4810 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4811 * pt.c (uses_template_parms, tsubst_copy_and_build,
4812 value_dependent_expression_p, type_dependent_expression_p): Deal with
4814 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4816 2007-03-29 Richard Guenther <rguenther@suse.de>
4818 * tree.c (cp_walk_subtrees): Do not set input_location.
4820 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4823 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4826 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4828 * parser.c (struct cp_parser): Update comment for
4829 greater_than_is_operator_p.
4830 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4831 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4832 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4833 !GREATER_THAN_IS_OPERATOR_P.
4834 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4835 `>>' operators that will become two `>' tokens in C++0x.
4836 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4837 mode, allowing it to terminate default arguments.
4838 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4839 `>>' like two consecutive `>' tokens.
4840 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4841 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4842 ends a template argument.
4844 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4846 * decl.c (redeclaration_error_message): Complain when redeclaring
4847 a friend function with default template arguments (C++0x mode only).
4848 * cp-tree.h (check_default_tmpl_args): Declare.
4849 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4850 template arguments in function templates. Add support for checking
4851 the default template arguments of friend templates.
4852 (push_template_decl_real): Fix call to check_default_tmpl_args.
4853 (type_unification_real): If a template parameter has not been
4854 deduced but provides a default template argument, substitute into
4855 that default template argument.
4856 * parser.c (cp_parser_init_declarator): When declaring (but not
4857 defining!) a function template in C++0x mode, check for default
4860 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4863 * decl.c (grokdeclarator): Deal with cv-qualified function type
4864 typedefs in the same way for member and non-member functions.
4866 2007-03-26 Dirk Mueller <dmueller@suse.de>
4868 * parser.c (cp_parser_member_declaration): Pedwarn
4869 about stray semicolons after member declarations.
4871 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4874 * pt.c (instantiate_decl): Set in_system_header.
4876 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4878 * cp-tree.h (current_tempalte_parms): Improve documentation.
4879 * pt.c (current_template_args): Likewise.
4882 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4883 not consume tokens when failing.
4885 2007-03-22 Jim Wilson <wilson@specifix.com>
4886 Mark Mitchell <mark@codesourcery.com>
4889 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4890 consistent with FROM.
4892 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4894 * error.c (dump_expr): Handle dependent names that designate types.
4895 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4897 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4899 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4901 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4903 * cvt.c (cp_convert_and_check) : Define.
4904 * cp-tree.h (cp_convert_and_check): Declare.
4905 * call.c (convert_conversion_warnings): Rename to
4906 conversion_null_warnings. The warning for floating-point to
4907 integer is handled by convert_and_check in convert_like_real.
4908 (convert_like_real): convert_conversion_warnings was renamed as
4909 conversion_null_warnings.
4910 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4911 overflow and changes of value during conversion.
4913 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4916 * parser.c (cp_parser_statement): If 'namespace' is found, this
4917 only can be a namespace alias definition, so parse it now.
4918 (cp_parser_namespace_alias_definition): if we find an open brace
4919 instead of '=', then this is actually a misplaced namespace
4922 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4925 * decl.c (cxx_init_decl_processing): Move command-line options
4926 processing to c-opts.c.
4928 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4930 * ptree.c (cxx_print_type): Use formatting markup for integers
4931 when printing template parameter index/level/orig level.
4932 (cxx_print_xnode): Ditto.
4933 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4934 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4935 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4937 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4938 rather than a HOST_WIDE_INT.
4939 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4940 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4942 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4943 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4944 IN_BASE_INITIALIZER bool bitfields.
4945 (struct cp_declarator): Make KIND a 4-bit field. Make
4946 PARAMETER_PACK_P a bool bitfield just after KIND.
4947 * pt.c (uses_parameter_packs): Destroy the pointer set.
4948 (make_pack_expansion): Ditto.
4949 (check_for_bare_parameter_packs): Ditto.
4950 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4952 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4955 * call.c (convert_default_arg): Instead of copying the node,
4958 2007-03-15 Dirk Mueller <dmueller@suse.de>
4961 * call.c (convert_conversion_warnings): New..
4962 (convert_like_real): .. factored out from here.
4963 (convert_conversion_warnings): Add warning about
4964 false being converted to NULL in argument passing.
4966 2007-03-14 Dirk Mueller <dmueller@suse.de>
4968 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4969 (finish_do_body): Warn about empty body in do/while statement.
4971 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4973 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4975 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4978 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4981 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4983 * repo.c (init_repo): Initialize random_seed saved options.
4984 (finish_repo): Adjust.
4986 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4989 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4992 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4994 * decl.c (compute_array_index_type): New warning flag warn_vla.
4996 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4999 * call.c (convert_default_arg): Copy non-constant arguments.
5001 2007-03-11 Mark Mitchell <mark@codesourcery.com>
5004 * parser.c (cp_parser_postfix_expression): Disallow compound
5005 literals in constant expressions.
5008 * semantics.c (finish_typeof): Use unlowered_expr_type.
5010 2007-03-10 Mark Mitchell <mark@codesourcery.com>
5013 * cp-tree.h (unlowered_expr_type): New function.
5014 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
5015 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
5016 (unlowered_expr_type): New function.
5017 (build_unary_op): Disallow predecrements of bool bitfields.
5018 * call.c (build_conditional_expr): Use unlowered_expr_type.
5019 * pt.c (type_unification_real): Likewise.
5021 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
5024 * typeck.c (check_return_expr): Check for bare parameter packs.
5025 (comptypes): Compare template parameter packs and
5026 type pack expansions.
5027 * decl.c (grokdeclarator): Deal with the declaration of function
5029 (grokparms): Verify that the (optional) function parameter pack is
5030 at the end of the parameter list.
5031 (xref_basetypes): Handle pack expansions in the base class.
5032 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
5033 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
5034 (NONTYPE_ARGUMENT_PACK): New.
5035 (TYPE_PACK_EXPANSION): New.
5036 (EXPR_PACK_EXPANSION): New.
5037 (ARGUMENT_PACK_SELECT): New.
5038 * cp-objcp-common.c (cp_tree_size): Compute size of
5039 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
5040 ARGUMENT_PACK_SELECT.
5041 * error.c (dump_template_argument): Print template argument packs.
5042 (dump_template_argument_list): Ditto.
5043 (dump_template_parameter): Dump `...' for template type parameter
5045 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
5046 (dump_parameters): Print function parameter packs.
5047 (dump_template_parms): Print template argument packs.
5048 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
5049 (maybe_warn_variadic_templates): New.
5050 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
5051 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5052 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5054 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
5055 (write_template_arg): Write argument packs as separate arguments.
5056 * cp-tree.h (struct template_parm_index_s): Add flag that
5057 indicates that the template parameter is actually a parameter
5059 (struct tree_argument_pack_select): New.
5060 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
5061 (union lang_tree_node): Add argument_pack_select.
5062 (FUNCTION_PARAMETER_PACK_P): New.
5063 (PACK_EXPANSION_P): New.
5064 (PACK_EXPANSION_PATTERN): New.
5065 (SET_PACK_EXPANSION_PATTERN): New.
5066 (PACK_EXPANSION_PARAMETER_PACKS): New.
5067 (ARGUMENT_PACK_P): New.
5068 (ARGUMENT_PACK_ARGS): New.
5069 (SET_ARGUMENT_PACK_ARGS): New.
5070 (ARGUMENT_PACK_INCOMPLETE_P): New.
5071 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
5072 (TEMPLATE_PARM_PARAMETER_PACK): New.
5073 (TEMPLATE_TYPE_PARAMETER_PACK): New.
5074 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
5075 (ARGUMENT_PACK_SELECT_INDEX): New.
5076 (ARGUMENT_PACK_SELECT_ARG): New.
5077 (struct cp_declarator): Add parameter_pack_p flag.
5078 (maybe_warn_variadic_templates): Declare.
5079 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
5080 indicate a template parameter pack.
5081 (uses_parameter_packs): Declare.
5082 (template_parameter_pack_p): Declare.
5083 (template_parms_variadic_p): Declare.
5084 (make_pack_expansion): Declare.
5085 (check_for_bare_parameter_packs): Declare.
5086 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
5087 sizeof... expressions.
5088 (pp_cxx_expression): Print pack expansions and non-type argument
5090 (pp_cxx_exception_specification): Print pack expansions.
5091 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
5092 (pp_cxx_ctor_initializer): Print pack expansions.
5093 (pp_cxx_type_id): Print pack expansions.
5094 (pp_cxx_template_argument_list): Print argument packs.
5095 (pp_cxx_template_parameter): Print ellipsis for template parameter
5097 * pt.c (comp_template_parms): Compare template parameter packs.
5098 (template_parameter_pack_p): New.
5099 (template_parms_variadic_p): New.
5100 (template_args_variadic_p): New.
5101 (make_ith_pack_parameter_name): New.
5102 (struct find_parameter_pack_data): New.
5103 (find_parameter_packs_r): New.
5104 (uses_parameter_packs): New.
5105 (make_pack_expansion): New.
5106 (check_for_bare_parameter_packs): New.
5107 (expand_template_argument_pack): New.
5108 (reduce_template_parm_level): Propagate parameter pack flag.
5109 (process_template_parm): Add is_parameter_pack parameter to state
5110 when the parameter is actually a parameter pack. Create template
5111 parameter packs when is_parameter_pack is true.
5112 (current_template_args): The argument for a template parameter
5113 pack is an argument pack containing a single pack expansion.
5114 (process_partial_specialization): When checking that non-type
5115 argument expressions do not involve template parameters, loop over
5116 the arguments in argument packs separately.
5117 (push_template_decl_real): Check that the type of the declaration
5118 does not have any bare parameter packs. Check that primary
5119 templates have no more than one parameter pack, and that it comes
5120 at the end of the template parameter list.
5121 (convert_template_argument): Handle coercions for pack expansion
5122 expressions by coercing the pattern then rebuilding the expansion.
5123 (coerce_template_parms): When coercing the arguments for a
5124 variadic template, pack "extra" arguments into an argument pack.
5125 (coerce_template_template_parms): Cannot coerce between parameter
5126 packs and non-pack parameters.
5127 (template_args_equal): Compare PACK_EXPANSION_P expressions.
5128 (comp_template_args): Expand all template arguments packs before
5129 comparing template argument lists.
5130 (mangle_class_name_for_template): Make argument packs as separate
5132 (for_each_template_parm_r): No need to handle BASELINK.
5133 (instantiate_class_template): Handle pack expansions in the base
5135 (tsubst_pack_expansion): New.
5136 (tsubst_template_args): Handle substitutions of argument packs and
5137 pack expansion into template argument lists.
5138 (tsubst_decl): Expand function parameter packs into separate
5139 function parameters.
5140 (tsubst_arg_types): Expand a type pack expansion into separate
5142 (tsubst_exception_specification): Handle pack expansions in
5143 exception specifiers.
5144 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
5145 replacing a template parameter with its argument. If we encounter
5146 a substitution for an argument pack, just return the parameter
5148 (tsubst_copy): sizeof(X...) returns the number of elements in
5149 parameter pack X. See through ARGUMENT_PACK_SELECT when the
5150 PARM_DECL is a parameter pack.
5151 (tsubst_expr): Expression pack expansions and argument packs
5152 cannot show up here; they will all be handled through function
5153 calls, sizeof, and template argument lists.
5154 (tsubst_copy_and_build): sizeof(X...) returns the number of
5155 elements in parameter pack X. Handle pack expansions in TREE_LIST
5156 and CONSTRUCTOR nodes.
5157 (fn_type_unification): Handle "incomplete" explicit template
5158 argument lists that specify some of the arguments for a template
5160 (type_unification_real): Unify arguments against pack expansions.
5161 (template_parm_level_and_index): New, helper function.
5162 (unify_pack_expansion): New.
5163 (unify): Unify argument packs on an argument-by-argument basis,
5164 handling variadic argument packs as well.
5165 (more_specialized_fn): Handle unification of function parameter
5166 packs. All things being equal, prefer non-variadic function
5167 templates to variadic function templates.
5168 (more_specialized_class): Prefer the variadic class template
5169 partial specialization that binds fewer arguments to a parameter
5171 (regenerate_decl_from_template): Expand function parameter packs
5172 into separate parameters.
5173 (instantiate_decl): Ditto.
5174 (tsubst_initializer_list): Handle pack expansions for base-class
5176 (dependent_type_p_r): Determine dependent types in argument packs
5177 and pack expansions.
5178 (value_dependent_expression_p): Determine value-dependence of
5179 non-type argument packs.
5180 (dependent_template_arg_p): Handle argument packs.
5181 * semantics.c (finish_cond): Check for bare parameter packs.
5182 (finish_expr_stmt): Ditto.
5183 (finish_for_expr): Ditto.
5184 (finish_switch_cond): Ditto.
5185 (finish_mem_initializers): Ditto.
5186 * name-lookup.c (arg_assoc_type): Handle pack expansions and
5188 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
5189 * parser.c (make_declarator): Declarator is not an expansion.
5190 (make_pointer_declarator): Transfer parameter pack flag to outer
5192 (make_reference_declarator): Ditto.
5193 (make_ptrmem_declarator): Ditto.
5194 (make_call_declarator): Ditto.
5195 (make_array_declarator): Ditto.
5196 (cp_parser_postfix_expression): Allow pack expansion expressions
5197 in the argument list for a call expression.
5198 (cp_parser_parenthesized_expression_list): Add new parameter
5199 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
5200 into separate arguments."
5201 (cp_parser_new_placement): Allow pack expansion expressions.
5202 (cp_parser_new_initializer): Ditto.
5203 (cp_parser_mem_initializer_list): Allow ellipsis to create a
5204 base-class initializer expansion.
5205 (cp_parser_mem_initializer): Ditto.
5206 (cp_parser_template_parameter_list): Keep track of whether the
5207 template parameter is a template parameter pack.
5208 (cp_parser_template_parameter): Parse the ellipsis to indicate a
5209 template parameter pack.
5210 (cp_parser_type_parameter): Ditto.
5211 (cp_parser_template_argument_list): Parse the ellipsis to indicate
5213 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
5214 this declarator is a parameter pack.
5215 (cp_parser_parameter_declaration): The ellipsis does not end the
5216 parameter declaration, because it might be a parameter pack. Parse
5217 the ellipsis to indicate a parameter pack.
5218 (cp_parser_initializer): Allow pack expansions.
5219 (cp_parser_initializer_list): Allow ellipsis to create an
5220 initializer expansion.
5221 (cp_parser_base_clause): Allow ellipsis to create a base specifier
5223 (cp_parser_type_id_list): Allow ellipsis to create an exception
5224 specifier expansion.
5225 (cp_parser_attribute_list): Don't allow pack expansions.
5226 (cp_parser_functional_cast): Allow pack expansions.
5227 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
5228 compute the length of a parameter pack.
5229 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
5230 end a template argument.
5231 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
5232 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
5235 2007-03-09 Dirk Mueller <dmueller@suse.de>
5237 * call.c (build_new_op): Call warn_logical_operator.
5239 2007-03-08 Volker Reichelt <v.reichelt@netcologne.de>
5242 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
5245 * pt.c (any_template_arguments_need_structural_equality_p):
5248 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
5250 * decl.c (grokdeclarator): Disable warnings for anonymous
5253 2007-03-05 Volker Reichelt <v.reichelt@netcologne.de>
5255 * typeck2.c (readonly_error): Always emit a hard error.
5256 Remove last argument.
5257 * cp-tree.h (readonly_error): Adjust prototype.
5258 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
5259 * typeck.c (build_unary_op): Likewise.
5260 (build_modify_expr): Likewise.
5262 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
5265 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
5267 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5270 * parser.c (struct cp_parser): New IN_IF_STMT.
5271 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
5272 returning if parsing the body of an 'if' statement or issuing an
5273 error and continuing.
5274 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
5276 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
5278 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
5281 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
5284 2007-03-02 Geoffrey Keating <geoffk@apple.com>
5286 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
5287 Objective-C++. Don't exit early if -shared-libgcc needs to be
5290 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5292 * typeck.c (common_base_type): Delete unused function.
5294 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
5296 * Make-lang.in: Add dummy lang.install-pdf target.
5298 2007-03-01 Simon Baldwin <simonb@google.com>
5301 * decl.c (check_tag_decl): Added new warning for typedef ignored
5302 when it precedes an otherwise valid non-typedef declaration.
5304 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
5306 * typeck.c (build_function_call): Store converted arguments
5307 in a stack-allocated array instead of building a list.
5308 (convert_arguments): Store arguments in the array passed in as an
5309 argument, and return the actual number of arguments.
5310 * call.c (build_call): Delete, and replace with...
5311 (build_call_n, build_call_a): New.
5312 (build_op_delete_call): Rewrite to avoid constructing argument lists.
5313 (build_over_call): Store converted arguments in a stack-allocated
5314 array instead of building a list.
5315 (build_cxx_call): Pass arguments in an array instead of as a list.
5316 (build_java_interface_fn_ref): Rewrite to avoid constructing
5318 * tree.h: Update declarations to reflect above changes.
5319 * method.c (use_thunk): Use a stack-allocated array to hold
5320 the arguments instead of a list.
5321 * rtti.c (throw_bad_cast): Update call to cxx_call.
5322 (throw_bad_typeid): Likewise.
5323 (build_dynamic_cast_1): Likewise.
5324 * init.c (build_builtin_delete_call): Use build_call_n.
5325 * decl.c (expand_static_init): Likewise.
5326 * except.c (cp_protect_cleanup_actions): Likewise.
5327 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
5328 (gimplify_must_not_throw_expr): Likewise.
5329 (cxx_omp_apply_fn): Use build_call_a.
5331 2007-02-26 Mark Mitchell <mark@codesourcery.com>
5333 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
5334 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
5336 2007-02-25 Mark Mitchell <mark@codesourcery.com>
5338 * cp-tree.h (static_ctors): Remove.
5339 * cp-tree.h (static_dtors): Likewise.
5340 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
5341 refactoring of tree_map hierarchy.
5342 (decl_shadowed_for_var_insert): Likewise.
5343 * semantics.c (expand_body): Use c_expand_body.
5344 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
5345 * decl2.c (static_ctors): Remove.
5346 (static_dtors): Likewise.
5347 (generate_ctor_or_dtor_function): Pass NULL_TREE to
5348 objc_generate_static_init_call. Do not call static_[cd]tors.
5349 (generate_ctor_and_dtor_functions_for_priority): Do not check for
5351 (cp_write_global_declarations): Likewise.
5353 2007-02-23 Richard Guenther <rguenther@suse.de>
5355 * class.c (note_name_declared_in_class): Make declaration
5356 changes meaning a pedwarn.
5358 2007-02-22 Michael Matz <matz@suse.de>
5361 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
5362 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
5363 dump_function_decl): Guard emitting outer scopes by new flag.
5364 * cp-lang.c (cxx_dwarf_name): New function.
5365 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
5366 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
5368 (push_template_decl_real, lookup_template_class): Remove calls
5371 2007-02-19 Mark Mitchell <mark@codesourcery.com>
5373 * call.c (build_new_method_call): Ensure that explicit calls of
5374 destructors have type "void".
5376 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5378 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
5379 and -Walways-true with -Waddress.
5380 * cvt.c (convert_to_void): Replace unconditional warning with
5383 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
5385 * decl.c, tree.c: Fix comment typos.
5387 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
5390 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
5391 statement expression if we had an error mark node.
5393 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
5394 Brooks Moses <brooks.moses@codesourcery.com>
5395 Lee Millward <lee.millward@codesourcery.com>
5397 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
5398 Change class to tcc_vl_exp.
5400 * call.c (build_call): Use build_call_list instead
5402 (build_over_call): Likewise.
5403 (build_new_method_call): Use build_min_non_dep_call_list
5404 instead of build_min_non_dep.
5406 * error.c (dump_call_expr_args): New function.
5407 (dump_aggr_init_expr_args): New function.
5408 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
5409 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
5411 * cvt.c (convert_to_void): Use build_call_array instead
5412 of build3; use new AGGR_INIT_EXPR accessor macros.
5414 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
5415 instead of TREE_CODE_LENGTH.
5417 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
5418 AGGR_INIT_EXPR accessor macros.
5420 * cp-gimplify.c (cp_gimplify_init_expr): Use
5421 AGGR_INIT_EXPR_SLOT to set the slot operand.
5423 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
5424 (AGGR_INIT_EXPR_SLOT): New macro.
5425 (AGGR_INIT_EXPR_ARG): New macro.
5426 (aggr_init_expr_nargs): New macro.
5427 (AGGR_INIT_EXPR_ARGP): New macro.
5428 (aggr_init_expr_arg_iterator): New.
5429 (init_aggr_init_expr_arg_iterator): New.
5430 (next_aggr_init_expr_arg): New.
5431 (first_aggr_init_expr_arg): New.
5432 (more_aggr_init_expr_args_p): New.
5433 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
5434 (stabilize_aggr_init): New declaration.
5435 (build_min_non_dep_call_list): Likewise.
5437 * tree.c (process_aggr_init_operands): New function.
5438 (build_aggr_init_array) New function.
5439 (build_cplus_new): Update to use new CALL_EXPR and
5440 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
5441 build_aggr_init_array.
5442 (build_min_non_dep_call_list) New function.
5443 (build_min_nt): Assert input code parameter is not a variable
5444 length expression class.
5445 (build_min, build_min_non_dep): Likewise.
5446 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
5447 to check for equality instead of recursing. Handle tcc_vl_exp
5449 (stabilize_call): Update to only handle CALL_EXPRs, not
5450 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
5451 (stabilize_aggr_init): New function.
5452 (stabilize_init): Use it.
5454 * cxx-pretty-print.c (pp_cxx_postfix_expression)
5455 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
5456 AGGR_INIT_EXPR accessor macros and argument iterators.
5458 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
5459 build_vl_exp. Iterate through the operands, recursively
5460 processing each one.
5461 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
5462 CALL_EXPR accessor macros.
5463 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
5464 tree code classes. Use TREE_OPERAND_LENGTH instead of
5467 * semantics.c (finish_call_expr): Use build_nt_call_list
5468 instead of build_nt.
5469 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
5470 accessor macros. Use build_call_array to construct the
5471 CALL_EXPR node instead of build3
5473 * decl2.c (build_offset_ref_call_from_tree): Use
5474 build_nt_call_list and build_min_non_dep_call_list instead
5475 of build_min_nt and build_min_non_dep.
5477 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
5478 Use build_nt_call_list instead of build_min_nt.
5480 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5483 * call.c (build_conditional_expr): Improve error message.
5485 2007-02-13 Dirk Mueller <dmueller@suse.de>
5487 * friend.c (do_friend): Annotate warning about friend
5488 declarations in templates with OPT_Wnon_template_friend.
5489 Convert informal message from warning() to inform().
5491 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5492 Mark Mitchell <mark@codesourcery.com>
5495 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5496 instantiations for variables.
5498 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5501 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5502 Check warn_unused_value just once.
5504 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5507 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5508 (fn_type_unificiation): Likewise.
5509 (get_bindings): Likewise.
5511 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5514 * decl.c (finish_function): Use DECL_REPLACEABLE.
5515 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5517 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5519 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5521 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5523 * decl.c (grokvardecl): Don't error if !have_tls.
5524 (grokdeclarator): Likewise.
5525 * parser.c (cp_parser_omp_threadprivate): Likewise.
5527 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5530 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5531 parameters and result decls in omp clauses.
5532 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5535 2007-02-05 Dirk Mueller <dmueller@suse.de>
5538 * parser.c (cp_parser_class_specifier): Always initialize bases.
5540 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5542 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5543 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5544 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5546 * semantics.c (finish_omp_atomic): Store a whole expression node
5547 in operand 1, and integer_zero_node in operand 0, for dependent
5548 OMP_ATOMIC. Rewrite to make flow easier to understand.
5550 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5552 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5554 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5556 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5557 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5559 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5561 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5562 keyword warning to -Wc++0x-compat.
5564 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5566 * decl.c (grokdeclarator): Update documentation.
5568 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5571 * decl.c (grokdeclarator): If __thread is used together with
5572 a storage class other than extern and static, clear thread_p
5573 after issuing diagnostics and fall through to checking the
5576 2007-01-30 Roger Sayle <roger@eyesopen.com>
5578 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5579 calculating the size of an array (to avoid recursive errors).
5581 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5584 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5586 * call.c (convert_like_real): Don't warn when converting to
5589 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5591 * decl.c (pop_label): Replace warning with call to
5592 warn_for_unused_label.
5594 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5597 * semantics.c (finish_pseudo_destructor_expr): Check the
5598 destrutor name by calling check_dtor_name.
5600 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5602 * lex.c (D_CPP0X): Rename.
5604 (reswords): D_CPP0X -> D_CXX0X.
5605 (init_reswords): Ditto.
5606 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5607 of C++0x keywords as identifiers.
5609 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5612 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5615 2007-01-23 Ian Lance Taylor <iant@google.com>
5617 * typeck.c (convert_for_assignment): Only warn about a = b = c
5618 when converting to bool.
5620 2007-01-23 Roger Sayle <roger@eyesopen.com>
5622 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5624 * typeck.c (ignore_overflows): Remove the remaining uses of
5625 TREE_CONSTANT_OVERFLOW.
5627 2007-01-20 Jan Hubicka <jh@suse.cz>
5629 * decl2.c (start_objects, start_static_storage_duration_function):
5630 Do not make the functions uninlinable.
5632 2007-01-17 Ian Lance Taylor <iant@google.com>
5634 * class.c (add_method): Call VEC_reserve_exact rather than passing
5635 a negative size to VEC_reserve.
5637 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5640 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5642 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5645 * decl.c (make_typename_type): If the qualified name is not a
5646 type, issue an error.
5647 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5650 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5652 * rtti.c: Include target.h.
5653 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5654 don't emit typeinfo for fundamental types as weak.
5655 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5657 2007-01-08 Richard Guenther <rguenther@suse.de>
5659 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5661 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5663 * call.c (standard_conversion): Pass flag to
5664 vector_types_convertible_p to disallow emission of note.
5665 * typeck.c (convert_for_assignment): Pass flag to
5666 vector_types_convertible_p to allow emission of note.
5667 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5668 to disallow emission of note.
5670 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5673 * typeck.c (build_binary_op): Call overflow_warning if
5674 TREE_OVERFLOW_P is true for the result and not for any of the
5677 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5680 * class.c (add_method): Don't wait until template
5681 instantiation time to complain about duplicate methods.
5683 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5686 * semantics.c (finish_unary_op_expr): Warn only if result
5687 overflowed and operands did not.
5689 2007-01-05 Ian Lance Taylor <iant@google.com>
5691 * typeck.c (build_binary_op): Warn about comparing a non-weak
5694 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5696 * pt.c (tsubst): Propagate the need for structural equality checks
5697 when reducing the level of template parameters.
5699 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5701 * pt.c: Fix a comment typo.
5703 2007-01-02 Ian Lance Taylor <iant@google.com>
5705 * semantics.c (maybe_convert_cond): Optionally warn when using an
5706 assignment as a condition.
5707 * typeck.c (convert_for_assignment): Optionally warn about
5708 assigning the result of an assignment to a bool.
5710 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5712 * pt.c (canonical_template_parms): Correct typo in comment.
5714 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5716 * typeck.c (structural_comptypes): Renamed from "comptypes".
5717 (comptypes): Use canonical type information to perform fast type
5718 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5719 canonical type comparison returns the same results as we would see
5720 from the current, structural check. Support COMPARE_STRUCTURAL
5721 when we need structural checks.
5722 * decl.c (typename_compare): Fix comment.
5723 (build_typename_type): TYPENAME_TYPE nodes require structural
5724 equality checks, because they resolve different based on the
5726 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5727 require structural equality checks (for now).
5728 (build_ptrmemfunc_type): Build the canonical pointer to member
5730 (compute_array_index_type): Whenever we build a new index type
5731 to represent the size of an array in a template, we need to mark
5732 this index type as requiring structural equality. This goes for
5733 arrays with value-dependent sizes with the current ABI, or all
5735 * tree.c (cplus_array_hash): New.
5736 (struct cplus_array_info): New.
5737 (cplus_array_compare): New.
5738 (cplus_array_htab): New.
5739 (build_cplus_array_type_1): Use a hash table to cache the array
5740 types we build. Build the canonical array type for each array
5742 (cp_build_qualified_type_real): When building a cv-qualified array
5743 type, use the hash table of array types and build canonical array
5745 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5746 use structural equality (for now).
5747 * cp-tree.h (COMPARE_STRUCTURAL): New.
5748 * pt.c (canonical_template_parms): New.
5749 (canonical_type_parameter): New.
5750 (process_template_parm): Find the canonical type parameter.
5751 (lookup_template_class): When we have named the primary template
5752 type, set the canonical type for our template class to the primary
5753 template type. If any of the template arguments need structural
5754 equality checks, the template class needs structural equality
5756 (tsubst): When reducing the level of a template template
5757 parameter, we require structural equality tests for the resulting
5758 parameter because its template parameters have not had their types
5759 canonicalized. When reducing a template type parameter, find the
5760 canonical reduced type parameter.
5761 (any_template_arguments_need_structural_equality_p): New.