1 2007-07-21 Rafael Avila de Espindola <espindola@google.com>
3 * parser.c (cp_token): Remove in_system_header.
4 (eof_token): Remove in_system_header.
5 (cp_lexer_get_preprocessor_token): Don't set in_system_header.
6 (cp_lexer_set_source_position_from_token): Don't set in_system_header.
7 (cp_parser_member_declaration): Use in_system_header_at.
8 * pt.c (lookup_template_class): Don't set DECL_IN_SYSTEM_HEADER.
9 (pop_tinst_level): Don't set in_system_header.
10 (instantiate_class_template): Don't set in_system_header.
11 (instantiate_decl): Don't set in_system_header.
12 (instantiate_pending_templates): Don't set in_system_header.
14 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
17 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
18 TYPE_NOTHROW_P, not TREE_NOTHROW.
19 (trait_expr_value): Likewise.
21 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
24 * call.c (convert_like_real): Don't take the error code path
25 when a rvalue or base conversion has the bad_p field set.
27 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
29 * rtti.c (emit_support_tinfos): Add char16_type_node and
31 * typeck2.c (digest_init): Support char16_t and char32_t.
33 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
35 * cvt.c (convert_to_void): Avoid C++ keywords.
36 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
38 * friend.c (is_friend): Likewise.
39 * init.c (perform_member_init): Likewise.
40 * mangle.c (write_template_prefix, write_template_template_param):
42 * name-lookup.c (do_namespace_alias, do_using_directive,
43 parse_using_directive, ambiguous_decl, arg_assoc): Likewise.
44 * parser.c (cp_parser_template_id, cp_parser_namespace_definition,
45 cp_parser_objc_typename, cp_parser_objc_method_keyword_params):
47 * pt.c (is_specialization_of_friend, lookup_template_class,
48 push_tinst_level, instantiate_class_template,
49 tsubst_copy_and_build): Likewise.
50 * tree.c (add_stmt_to_compound): Likewise.
51 * typeck.c (finish_class_member_access_expr): Likewise.
53 2008-07-17 Julian Brown <julian@codesourcery.com>
54 Mark Mitchell <mark@codesourcery.com>
56 * decl2.c (determine_visibility): Allow target to override
57 visibility of class data.
59 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
62 * semantics.c (trait_expr_value): Update __has_trivial_destructor
63 semantics to the current WP (N2691).
65 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
68 * name-lookup.c (lookup_extern_c_fun_binding_in_all_ns): New function.
69 (pushdecl_maybe_friend): Check if a redeclaration of extern C function
70 complies with exception specification constraints.
72 2008-07-14 Jason Merrill <jason@redhat.com>
74 * lex.c (init_reswords): Always set D_OBJC.
76 2008-07-11 Tom Tromey <tromey@redhat.com>
77 Ian Lance Taylor <iant@google.com>
79 * lex.c (struct resword, reswords): Don't define.
80 (D_EXT, D_ASM, D_OBJC, D_CXX0X): Don't define.
81 (init_reswords): Clarify mask code. Use c_common_reswords rather
84 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
87 * decl.c (grokdeclarator): Warn about initializing variables
88 of storage class 'extern' only after the type of the declarator
89 has been properly computed.
91 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
94 * cp-tree.h (struct cp_decl_specifier_seq): Add a location field. It
95 carries the location of the primary type.
96 * parser.c (cp_parser_check_type_definition): Update documentation.
97 (cp_parser_check_for_definition_in_return_type,
98 cp_parser_check_for_invalid_template_id,
99 cp_parser_set_decl_spec_type,
100 cp_parser_check_for_definition_in_return_type,
101 cp_parser_diagnose_invalid_type_name,
102 cp_parser_new_expression, cp_parser_explicit_instantiation,
103 cp_parser_type_specifier, cp_parser_simple_type_specifier,
104 cp_parser_omp_for_loop, cp_parser_pragma): Use location in error
107 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
111 * semantic.c (qualified_name_lookup_error, finish_id_expression):
112 Add a location_t parameter so that
113 error message can have a more accurate location.
114 * cp-tree.h: Updated prototype
115 * pt.c (tsubst_qualified_id): Use location in error messages.
116 * parser.c (cp_parser_postfix_expression,
117 cp_parser_objc_statement, cp_parser_trait_expr,
118 cp_parser_token_is_class_key,
119 cp_parser_uncommitted_to_tentative_parse_p,
120 cp_parser_check_for_invalid_template_id, cp_parser_is_string_literal,
121 cp_parser_error, cp_parser_name_lookup_error,
122 cp_parser_simulate_error, cp_parser_check_decl_spec,
123 cp_parser_check_decl_spec, cp_parser_non_integral_constant_expression,
124 cp_parser_diagnose_invalid_type_name,
125 cp_parser_parse_and_diagnose_invalid_type_name,
126 cp_parser_require_pragma_eol, cp_parser_make_typename_type,
127 cp_parser_string_literal, cp_parser_primary_expression,
128 cp_parser_primary_expression, cp_parser_unqualified_id,
129 cp_parser_nested_name_specifier_opt, cp_parser_postfix_expression,
130 cp_parser_postfix_dot_deref_expression, cp_parser_new_expression,
131 cp_parser_direct_new_declarator, cp_parser_builtin_offsetof,
132 cp_parser_label_for_labeled_statement, cp_parser_statement_seq_opt,
133 cp_parser_jump_statement, cp_parser_block_declaration,
134 cp_parser_simple_declaration, cp_parser_decl_specifier_seq,
135 cp_parser_function_specifier_opt, cp_parser_decltype,
136 cp_parser_mem_initializer_list, cp_parser_mem_initializer,
137 cp_parser_mem_initializer_id, cp_parser_template_parameter,
138 cp_parser_type_parameter, cp_parser_template_id,
139 cp_parser_template_name, cp_parser_template_argument): Likewise.
141 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
144 * pt.c (tsubst_function_type): Remove warning for type qualifiers
145 on function return type.
147 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
150 * pt.c (tsubst_function_type): Don't warn for type qualifiers
151 on function return type in case of system header.
153 2008-07-09 Raksit Ashok <raksit@google.com>
155 * parser.c (cp_parser_postfix_expression): New warning based on flag
156 warn_disallowed_functions.
158 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
161 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
162 functions declared with a storage class qualifier.
164 2008-07-03 Richard Guenther <rguenther@suse.de>
167 * typeck.c (cp_build_function_call): Move code to verify
168 builtin function arguments ...
169 * call.c (build_cxx_call): ... here.
171 2008-07-02 Jason Merrill <jason@redhat.com>
173 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
175 Implement WG21 N2672, Initializer List proposed wording
176 * cp-tree.h (enum cp_tree_index): Add CPTI_INIT_LIST_TYPE.
177 (struct lang_type_class): Add has_list_ctor bitfield.
178 (TYPE_HAS_LIST_CTOR): New macro.
179 (BRACE_ENCLOSED_INITIALIZER_P): Expect init_list_type_node.
180 (CONSTRUCTOR_IS_DIRECT_INIT): New macro.
181 (LOOKUP_NO_NARROWING): New macro.
182 (LOOKUP_NO_COPY_CTOR_CONVERSION): New macro.
183 * parser.c (cp_parse_braced_list): Split out from...
184 (cp_parser_initializer_clause): ...here.
185 (cp_parser_postfix_expression): Build up CONSTRUCTOR for compound
187 (cp_lexer_next_token_is_not_keyword): New fn.
188 (cp_parser_parenthesized_expression_list): Handle { }.
189 (cp_parser_new_expression, cp_parser_new_initializer): Likewise.
190 (cp_parser_assignment_expression, cp_parser_condition): Likewise.
191 (cp_parser_jump_statement, cp_parser_simple_declaration): Likewise.
192 (cp_parser_mem_initializer, cp_parser_init_declarator): Likewise.
193 (cp_parser_initializer, cp_parser_functional_cast): Likewise.
194 (cp_parser_omp_for_loop, cp_parser_cache_group): Likewise.
195 (cp_parser_save_member_function_body): Likewise.
196 * call.c (conversion_kind): Add ck_list, ck_aggr.
197 (struct conversion): Add check_narrowing bitfield, conversion list.
198 (build_list_conv): New fn.
199 (build_aggr_conv): New fn.
200 (implicit_conversion): Call them.
201 (standard_conversion): Set check_narrowing if appropriate.
202 (add_function_candidate): Handle LOOKUP_NO_COPY_CTOR_CONVERSION.
203 (build_user_type_conversion_1): When converting from an init list,
204 we allow additional conversions except when calling a copy ctor.
205 (convert_like_real): Calling an explicit ctor for an init list is
206 ill-formed. Handle ck_list and ck_addr. Check narrowing.
207 (build_new_method_call): If CONSTRUCTOR_IS_DIRECT_INIT is set and
208 class doesn't have a list ctor, break the {} into a TREE_LIST.
209 (compare_ics): ck_list is better than other UDCs.
210 (set_up_extended_ref_temp): Split out from initialize_reference.
211 (is_std_init_list): New fn.
212 (is_list_ctor): New fn.
213 * decl.c (cxx_init_decl_processing): Create init_list_type_node.
214 (reshape_init_array_1): Pass it to build_constructor.
215 (reshape_init_class): Ditto.
216 (initialize_artificial_var): Pass the appropriate type.
217 (build_aggr_init_full_exprs): Split out from...
218 (check_initializer): ...here. Handle new semantics.
219 (build_init_list_var_init): New subroutine of check_initializer.
220 (grokdeclarator): Converting constructors can have more than one parm.
221 (grok_special_member_properties): Set TYPE_HAS_LIST_CTOR.
222 * init.c (expand_default_init): Only do digest_init for aggregates.
223 * rtti.c (tinfo_base_init): Pass init_list_type_node to
224 build_constructor_from_list.
225 (generic_initializer, ptr_initializer): Ditto.
226 (ptm_initializer, class_initializer): Ditto.
227 (get_pseudo_ti_init): Ditto.
228 * error.c (dump_type): Handle init_list_type_node.
229 (maybe_warn_cpp0x): New fn.
230 (maybe_varn_variadic_templates): Call it.
231 * cvt.c (ocp_convert): Handle conversion from { }.
232 * tree.c (build_array_of_n_type): New fn.
233 * typeck2.c (store_init_value): Use init_list_type_node.
234 (digest_init): Likewise.
235 (check_narrowing): New fn.
236 * semantics.c: (finish_compound_literal): Take CONSTRUCTOR instead
237 of vector of constructor elts. Handle non-aggregate types. Make
238 constant literals static.
239 * pt.c: (tsubst_copy_and_build): Adjust.
241 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
243 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
245 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
246 (comp_ptr_ttypes_const): Likewise.
248 2008-07-01 Andrew Haley <aph@redhat.com>
250 * decl.c (finish_constructor_body): Don't set the return value of
251 the constructor if the constructor is that of a Java type.
253 2008-06-30 Jakub Jelinek <jakub@redhat.com>
256 * decl2.c (is_late_template_attribute): If the first attribute
257 argument is IDENTIFIER_NODE, don't consider it when checking
258 if arguments are value or type dependent.
260 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
263 * pt.c (do_type_instantiation): In c++0x mode do not warn for
266 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
268 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
270 2008-06-28 Jakub Jelinek <jakub@redhat.com>
273 * repo.c (repo_emit_p): Put const static data members initialized
274 by const expr into *.rpo file, just return 2 if IDENTIFIER_REPO_CHOSEN
277 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
280 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
283 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
286 * typeck.c (cp_build_function_call): Show example syntax in
289 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
291 * typeck.c (composite_pointer_type_r, cxx_sizeof_expr,
292 cxx_alignof_expr, check_template_keyword, cp_build_binary_op,
293 pointer_diff, cp_build_unary_op, build_x_compound_expr_from_list,
294 build_reinterpret_cast_1, cp_build_c_cast, check_return_expr): Change
295 pedwarn to permerror.
296 * init.c (perform_member_init, build_new_1, build_new): Likewise.
297 * decl.c (warn_extern_redeclared_static, duplicate_decls,
298 * identify_goto, check_previous_goto_1, check_goto, define_label,
299 check_tag_decl, start_decl, check_class_member_definition_namespace,
300 grokfndecl, grokdeclarator): Likewise.
301 * except.c (check_handlers): Likewise.
302 * typeck2.c (digest_init): Likewise.
303 * pt.c (check_specialization_namespace,
304 check_explicit_instantiation_namespace,
305 maybe_process_partial_specialization, check_explicit_specialization,
306 convert_template_argument, do_decl_instantiation,
307 do_type_instantiation, instantiate_decl): Likewise.
308 * semantics.c (finish_template_type_parm): Likewise.
309 * name-lookup.c (pushdecl_maybe_friend,
310 check_for_out_of_scope_variable): Likewise.
311 * decl2.c (finish_static_data_member_decl, build_anon_union_vars,
312 coerce_new_type): Likewise.
313 * parser.c (cp_parser_nested_name_specifier_opt,
314 cp_parser_mem_initializer, cp_parser_elaborated_type_specifier,
315 cp_parser_class_head, cp_parser_check_class_key): Likewise.
316 (cp_parser_parameter_declaration): Check flag_permissive instead of
317 flag_pedantic_errors.
318 * call.c (joust): Change pedwarn to warning.
319 * friend.c (make_friend_class): Likewise.
321 2008-06-16 Jan Hubicka <jh@suse.cz>
323 * method.c: Include cgraph.h.
324 (use_thunk): Use cgraph_add_new_function instead of calling backend
327 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
329 * parser.c: Fix comment typo.
331 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
334 * decl2.c (grokbitfield): Receive the list of attributes, pass it to
335 grokdeclarator and apply it to the created declaration.
336 * cp-tree.h (grokbitfield): Update prototype.
337 * parser.c (cp_parser_member_declaration): Don't apply the attributes
338 since they are now applied in grokbitfield. Adjusted the call to
340 (cp_parser_objc_class_ivars): Likewise.
342 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
345 * class.c (type_requires_array_cookie): Do not consider delete[]
346 operators with an ellipsis as second argument.
348 2008-06-09 Jakub Jelinek <jakub@redhat.com>
351 * semantics.c (stmt_expr_value_expr): Don't crash on empty
354 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
357 * pt.c (maybe_process_partial_specialization): Check the tree
358 returned by push_template_decl for error_mark_node.
359 * parser.c (cp_parser_class_head): Likewise, check the tree
360 returned by the latter.
362 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
365 * decl.c (grokdeclarator): In case of wrong return type return
366 immediately error_mark_node.
368 2008-06-06 Jakub Jelinek <jakub@redhat.com>
370 * cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
371 dependent_omp_for_p, begin_omp_task, finish_omp_task,
372 finish_omp_taskwait): New prototypes.
373 (cxx_omp_clause_default_ctor): Add outer argument.
374 (finish_omp_for): Add new clauses argument.
375 * cp-gimplify.c (cxx_omp_finish_clause): New function.
376 (cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
377 (cxx_omp_clause_default_ctor): Add outer argument.
378 (cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
379 * cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
380 * parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
381 Add par_clauses argument. If decl is present in parallel's
382 lastprivate clause, change that clause to shared and add
383 a lastprivate clause for decl to OMP_FOR_CLAUSES.
384 Fix wording of error messages. Adjust finish_omp_for caller.
385 Add clauses argument. Parse loops with random access iterators.
386 (cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
388 (cp_parser_omp_for, cp_parser_omp_parallel): Adjust
389 cp_parser_omp_for_loop callers.
390 (cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
392 (cp_parser_omp_clause_name): Handle collapse and untied
394 (cp_parser_omp_clause_schedule): Handle auto schedule.
395 (cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
396 and PRAGMA_OMP_CLAUSE_UNTIED.
397 (OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
398 (OMP_TASK_CLAUSE_MASK): Define.
399 (cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
400 (cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
401 (cp_parser_pragma): Handle PRAGMA_OMP_TASK and
403 * pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
404 OMP_CLAUSE_UNTIED. Handle OMP_CLAUSE_LASTPRIVATE_STMT.
405 (tsubst_omp_for_iterator): New function.
406 (dependent_omp_for_p): New function.
407 (tsubst_expr) <case OMP_FOR>: Use it. Handle collapsed OMP_FOR
408 loops. Adjust finish_omp_for caller. Handle loops with random
409 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR} changes.
410 (tsubst_expr): Handle OMP_TASK.
411 * semantics.c (cxx_omp_create_clause_info): New function.
412 (finish_omp_clauses): Call it. Handle OMP_CLAUSE_UNTIED and
414 (cxx_omp_predetermined_sharing): Removed.
415 * semantics.c (finish_omp_for): Allow pointer iterators. Use
416 handle_omp_for_class_iterator and dependent_omp_for_p. Handle
417 collapsed for loops. Adjust c_finish_omp_for caller. Add new
418 clauses argument. Fix check for type dependent cond or incr.
419 Set OMP_FOR_CLAUSES to clauses. Use cp_convert instead of
420 fold_convert to convert incr amount to difference_type. Only
421 fold if not in template. If decl is mentioned in lastprivate
422 clause, set OMP_CLAUSE_LASTPRIVATE_STMT. Handle loops with random
423 access iterators. Adjust for OMP_FOR_{INIT,COND,INCR}
425 (finish_omp_threadprivate): Allow static class members of the
427 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
428 finish_omp_taskwait): New functions.
430 * parser.c (cp_parser_binary_expression): Add prec argument.
431 (cp_parser_assignment_expression): Adjust caller.
432 * cp-tree.h (outer_curly_brace_block): New prototype.
433 * decl.c (outer_curly_brace_block): No longer static.
435 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
438 * pt.c (push_template_decl_real): Consistently return error_mark_node
441 2008-06-02 Tomas Bily <tbily@suse.cz>
443 * typeck.c (is_bitfield_expr_with_lowered_type): Use CASE_CONVERT.
444 (cp_build_unary_op): Likewise.
445 (cp_build_indirect_ref): Use CONVERT_EXPR_P.
446 (maybe_warn_about_returning_address_of_local): Likewise.
448 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
451 * pt.c (tsubst_initializer_list): Consistently check the tree
452 returned by tsubst_pack_expansion for error_mark_node.
454 2008-05-27 Michael Matz <matz@suse.de>
457 * call.c (build_new_op): Make warning conditional on
460 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
463 * call.c (convert_like_real): Convert bitfield to desired type
464 before creating temporary.
466 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
468 * Makefile.in: Adjusted dependencies on c-incpath.o.
470 2008-05-23 Jakub Jelinek <jakub@redhat.com>
473 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
474 fold_build_cleanup_point_expr on build_call_a results.
477 * semantics.c (omp_clause_info_fndecl): New function.
478 (finish_omp_clauses): Use it.
480 2008-05-21 Jakub Jelinek <jakub@redhat.com>
483 * cp-tree.h (check_array_initializer): New prototype.
484 * decl.c (check_array_initializer): New function.
485 (check_initializer): Call it.
486 * semantics.c (finish_compound_literal): Call it for ARRAY_TYPEs.
488 2008-05-21 Tom Tromey <tromey@redhat.com>
490 * mangle.c (save_partially_mangled_name): Remove.
491 (restore_partially_mangled_name): Likewise.
492 (write_encoding): Update.
493 (write_unqualified_name): Likewise.
494 (start_mangling): Always use name_obstack. Remove 'ident_p'
496 (get_identifier_nocopy): Remove.
497 (finish_mangling_internal): Rename from finish_mangling.
498 (finish_mangling): New function.
499 (finish_mangling_get_identifier): Likewise.
500 (partially_mangled_name, partially_mangled_name_len): Remove.
501 (mangle_decl_string): Change return type. Update.
502 (mangle_decl, mangle_type_string, mangle_special_for_type,
503 mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
504 mangle_ref_init_variable): Update.
506 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
509 * semantics.c (begin_class_definition): Extend checks on the first
512 2008-05-12 Tomas Bily <tbily@suse.cz>
514 * typeck2.c (digest_init): Use CONVERT_EXPR_P.
515 * call.c (build_over_call): Likewise.
516 * error.c (dump_expr): Use CASE_CONVERT.
517 * class.c (fixed_type_or_null): Likewise.
519 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
521 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
523 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
526 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
528 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
529 DECL_LOOPING_CONST_OR_PURE_P attributes.
530 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
533 2008-05-02 Simon Baldwin <simonb@google.com>
536 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
538 2008-05-01 Simon Baldwin <simonb@google.com>
540 * typeck.c (build_array_ref): Call warn_array_subscript_range.
542 2008-04-30 Jakub Jelinek <jakub@redhat.com>
545 * pt.c (more_specialized_fn): Stop the loop even if there are no
546 arguments before ellipsis.
548 2008-04-29 Jakub Jelinek <jakub@redhat.com>
551 * parser.c (cp_parser_lookup_name): Look through single function
555 * typeck.c (cp_build_modify_expr) <case PREINCREMENT_EXPR>: Don't build
556 COMPOUND_EXPR if the second argument would be error_mark_node.
558 2008-04-28 Jason Merrill <jason@redhat.com>
559 Liu Guanwei <liu_gw@163.com>
562 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
563 in default arguments.
565 2008-04-25 Jan Hubicka <jh@suse.cz>
567 * typeck.c (check_return_expr): Update.
568 * decl.c (start_preparsed_function): Update.
569 * method.c (use_thunk): Update.
571 2008-04-24 Jakub Jelinek <jakub@redhat.com>
574 * cp-tree.h (cp_reconstruct_complex_type): New prototype.
575 * cp-objcp-common.h (LANG_HOOKS_RECONSTRUCT_COMPLEX_TYPE): Define.
576 * decl2.c (is_late_template_attribute): Only make vector_size
577 late tmpl attribute if argument is type or value dependent.
578 (cp_reconstruct_complex_type): New function.
580 2008-04-24 Richard Guenther <rguenther@suse.de>
582 * typeck.c (cp_build_function_call): Call
583 check_builtin_function_arguments.
585 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
587 * typeck.c (get_member_function_from_ptrfunc): Don't set TREE_INVARIANT.
588 (build_ptrmemfunc1): Don't set TREE_INVARIANT.
589 * init.c (build_zero_init): Don't set TREE_INVARIANT.
590 * class.c (build_base_path): Don't set TREE_INVARIANT.
591 (build_vtbl_ref_1): Don't set TREE_INVARIANT.
592 (build_vtbl_initializer): Don't set TREE_INVARIANT.
593 * decl.c (build_enumerator): Don't set TREE_INVARIANT.
594 * rtti.c (tinfo_base_init): Don't set TREE_INVARIANT.
595 (generic_initializer): Don't set TREE_INVARIANT.
596 (ptr_initializer): Don't set TREE_INVARIANT.
597 (ptm_initializer): Don't set TREE_INVARIANT.
598 (class_initializer): Don't set TREE_INVARIANT.
599 * typeck2.c (process_init_constructor): Don't set TREE_INVARIANT.
600 * pt.c (push_inline_template_parms_recursive): Don't set TREE_INVARIANT.
601 (build_template_parm_index): Don't set TREE_INVARIANT.
602 (reduce_template_parm_level): Don't set TREE_INVARIANT.
603 (process_template_parm): Don't set TREE_INVARIANT.
605 2008-04-22 Jason Merrill <jason@redhat.com>
608 * semantics.c (finish_decltype_type): Check DECL_BIT_FIELD_TYPE
609 to see if DECL_BIT_FIELD_TYPE should be used, not some other flag.
610 * typeck.c (is_bitfield_expr_with_lowered_type): Likewise.
612 2008-04-22 Jakub Jelinek <jakub@redhat.com>
615 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
616 expression is errorneous.
618 2008-04-21 Jason Merrill <jason@redhat.com>
621 * tree.c (cp_tree_equal): Handle FIXED_CST.
624 * pt.c (template_template_parm_bindings_ok_p): Set
625 processing_template_decl while in this function.
627 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
629 * cvt.c (type_promotes_to): Support char16_t and char32_t.
630 * decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
631 char16_t and char32_t.
632 * lex.c (reswords): Add char16_t and char32_t (for c++0x).
633 * mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
634 extended builtin type "u8char{16,32}_t".
635 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
637 (cp_lexer_print_token): Support CPP_STRING{16,32}.
638 (cp_parser_is_string_literal): Idem.
639 (cp_parser_string_literal): Idem.
640 (cp_parser_primary_expression): Support CPP_CHAR{16,32} and
642 (cp_parser_simple_type_specifier): Support RID_CHAR{16,32}.
643 * tree.c (char_type_p): Support char16_t and char32_t as char types.
644 * typeck.c (string_conv_p): Support char16_t and char32_t.
646 2008-04-17 Jason Merrill <jason@redhat.com>
649 * call.c (build_user_type_conversion_1): Represent second step of
650 copy-init with an rvalue conversion.
651 (convert_like_real) [ck_user]: Don't implicitly add it here.
653 2008-04-15 Jakub Jelinek <jakub@redhat.com>
656 * decl.c (layout_var_decl): If extern or static var has variable
657 size, set TREE_TYPE (decl) to error_mark_node.
659 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
662 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
665 2008-04-09 Jason Merrill <jason@redhat.com>
668 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
669 not a pushed variable.
671 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
673 * call.c (build_op_delete_call): Fix quotation in warning message.
674 * decl.c (grokdeclarator): Quote keyword in error message.
675 * pt.c (check_for_bare_parameter_packs): Fix quotation in error
678 * parser.c (cp_parser_check_type_definition): Print error string
679 directly rather than using "%s".
680 (cp_parser_postfix_expression): Fix quotation.
681 (cp_parser_decltype): Likewise.
682 (cp_parser_sizeof_operand): Fix quotation. Simplify.
684 * parser.c (cp_parser_non_integral_constant_expression): Build error
685 message with CONCAT rather than using "%s".
686 (cp_parser_primary_expression): Fix quotation.
687 (cp_parser_postfix_expression): Likewise.
688 (cp_parser_postfix_dot_deref_expression): Likewise.
689 (cp_parser_unary_expression): Likewise.
690 (cp_parser_new_expression): Likewise.
691 (cp_parser_delete_expression): Likewise.
693 * parser.c (cp_parser_asm_specification_opt): Print CPP_CLOSE_PAREN
694 as `)', not as `('. Fix quotation.
695 (cp_parser_consume_semicolon_at_end_of_statement): Fix quotation.
696 (cp_parser_primary_expression): Likewise.
697 (cp_parser_nested_name_specifier_opt): Likewise.
698 (cp_parser_postfix_expression): Likewise.
699 (cp_parser_postfix_open_square_expression): Likewise.
700 (cp_parser_parenthesized_expression_list): Likewise.
701 (cp_parser_pseudo_destructor_name): Likewise.
702 (cp_parser_new_expression): Likewise.
703 (cp_parser_direct_new_declarator): Likewise.
704 (cp_parser_delete_expression): Likewise.
705 (cp_parser_cast_expression): Likewise.
706 (cp_parser_question_colon_clause): Likewise.
707 (cp_parser_builtin_offsetof): Likewise.
708 (cp_parser_trait_expr): Likewise.
709 (cp_parser_label_for_labeled_statement): Likewise.
710 (cp_parser_compound_statement): Likewise.
711 (cp_parser_selection_statement): Likewise.
712 (cp_parser_condition): Likewise.
713 (cp_parser_iteration_statement): Likewise.
714 (cp_parser_already_scoped_statement): Likewise.
715 (cp_parser_simple_declaration): Likewise.
716 (cp_parser_linkage_specification): Likewise.
717 (cp_parser_static_assert): Likewise.
718 (cp_parser_decltype): Likewise.
719 (cp_parser_conversion_function_id): Likewise.
720 (cp_parser_operator_function_id): Likewise.
721 (cp_parser_operator): Likewise.
722 (cp_parser_type_parameter): Likewise.
723 (cp_parser_template_id): Likewise.
724 (cp_parser_explicit_instantiation): Likewise.
725 (cp_parser_explicit_specialization): Likewise.
726 (cp_parser_enum_specifier): Likewise.
727 (cp_parser_namespace_definition): Likewise.
728 (cp_parser_namespace_alias_definition): Likewise.
729 (cp_parser_using_declaration): Likewise.
730 (cp_parser_using_directive): Likewise.
731 (cp_parser_asm_definition): Likewise.
732 (cp_parser_direct_declarator): Likewise.
733 (cp_parser_ptr_operator): Likewise.
734 (cp_parser_parameter_declaration_clause): Likewise.
735 (cp_parser_initializer_clause): Likewise.
736 (cp_parser_class_specifier): Likewise.
737 (cp_parser_member_specification_opt): Likewise.
738 (cp_parser_member_declaration): Likewise.
739 (cp_parser_pure_specifier): Likewise.
740 (cp_parser_constant_initializer): Likewise.
741 (cp_parser_base_clause): Likewise.
742 (cp_parser_exception_specification_opt): Likewise.
743 (cp_parser_try_block): Likewise.
744 (cp_parser_function_try_block): Likewise.
745 (cp_parser_handler): Likewise.
746 (cp_parser_throw_expression): Likewise.
747 (cp_parser_asm_operand_list): Likewise.
748 (cp_parser_attributes_opt): Likewise.
749 (cp_parser_label_declaration): Likewise.
750 (cp_parser_constructor_declarator_p): Likewise.
751 (cp_parser_template_declaration_after_export): Likewise.
752 (cp_parser_single_declaration): Likewise.
753 (cp_parser_objc_message_expression): Likewise.
754 (cp_parser_objc_message_args): Likewise.
755 (cp_parser_objc_encode_expression): Likewise.
756 (cp_parser_objc_defs_expression): Likewise.
757 (cp_parser_objc_protocol_expression): Likewise.
758 (cp_parser_objc_selector_expression): Likewise.
759 (cp_parser_objc_protocol_refs_opt): Likewise.
760 (cp_parser_objc_typename): Likewise.
761 (cp_parser_objc_method_keyword_params): Likewise.
762 (cp_parser_objc_superclass_or_category): Likewise.
763 (cp_parser_objc_try_catch_finally_statement): Likewise.
764 (cp_parser_objc_synchronized_statement): Likewise.
765 (cp_parser_objc_throw_statement): Likewise.
766 (cp_parser_omp_var_list_no_open): Likewise.
767 (cp_parser_omp_clause_default): Likewise.
768 (cp_parser_omp_clause_if): Likewise.
769 (cp_parser_omp_clause_num_threads): Likewise.
770 (cp_parser_omp_clause_reduction): Likewise.
771 (cp_parser_omp_clause_schedule): Likewise.
772 (cp_parser_omp_critical): Likewise.
773 (cp_parser_omp_for_loop): Likewise.
774 (cp_parser_omp_sections_scope): Likewise.
776 * parser.c (cp_parser_template_parameter_list): Simplify.
778 2008-04-07 James E. Wilson <wilson@tuliptree.org>
780 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
782 2008-04-07 Jason Merrill <jason@redhat.com>
785 * class.c (type_has_user_nondefault_constructor): A template
786 counts as a nondefault constructor.
788 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
790 * decl.c (cxx_push_function_context): Delete.
791 (cxx_pop_function_context): Delete.
792 (start_preparsed_function): Merge cxx_push_function_context (!f->decl
794 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_INIT,
795 LANG_HOOKS_FUNCTION_FINAL): Delete.
796 (LANG_HOOKS_FUNCTION_MISSING_NORETURN_OK_P): Rename to
797 LANG_HOOKS_MISSING_NORETURN_OK_P.
798 * cp-tree.h (cxx_push_function_context, cxx_pop_function_context):
800 * semantics.c (current_stmt_tree): Fix comment.
802 2008-04-03 Jakub Jelinek <jakub@redhat.com>
805 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
806 before calling fold_offsetof.
808 2008-04-03 Tom Tromey <tromey@redhat.com>
810 * Make-lang.in (c++_OBJS): New variable.
812 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
814 * optimize.c (clone_body): New, from tree-inline.c.
816 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
818 * method.c (synthesize_method): Use {push,pop}_function_context.
819 * name-lookup.c (push_to_top_level): Likewise.
820 * parser.c (cp_parser_late_parsing_for_member): Likewise.
822 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
825 * parser.c (cp_parser_decl_specifier_seq): Add location to error
828 2008-03-27 Tom Tromey <tromey@redhat.com>
830 * Make-lang.in: Revert automatic dependency patch.
832 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
835 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
836 (build_compound_expr): New, for compatibility with C
838 (cp_build_compound_expr): Renamed from build_compound_expr.
839 (build_c_cast): New, for compatibility with C build_c_cast.
840 (cp_build_c_cast): Renamed from build_c_cast.
841 * init.c (build_vec_delete_1): Fix calls to build_compound_expr.
842 * decl.c (cxx_maybe_build_cleanup): Ditto.
843 * cp-tree.h (build_compound_expr): Add C-compatibile prototype.
844 (cp_build_compound_expr): Renamed from build_compound_expr.
845 (build_c_cast): Add C-compatible prototype.
846 (cp_build_c_cast): Renamed from build_c_cast.
847 * typeck2.c (build_functional_cast): Use cp_build_c_cast.
848 * parser.c (cp_parser_cast_expression): Fix call to build_c_cast.
850 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
852 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Cope with
853 tsubst_pack_expansion returning a pack expansion, or a TREE_VEC
854 ending in a pack expansion, both of which can occur when
855 substituting into a nested template.
856 (tsubst_copy_and_build) <case SIZEOF_EXPR>: When we're
857 instantiating the sizeof...(X) form, make tsubst_copy do the work.
858 * parser.c (cp_parser_template_parameter): Deal with unnamed
859 non-type template parameter packs identified by pack expansions in
862 2008-03-26 Jakub Jelinek <jakub@redhat.com>
865 * pt.c (apply_late_template_attributes): Don't call tsubst on
866 first attribute argument if it is IDENTIFIER_NODE.
869 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
870 and LTGT_EXPR to pp_expression.
872 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
874 * pt.c (coerce_template_template_parm): Moved the body of the loop
875 of coerce_template_template_parms here, to make iteration over a
876 template argument pack simpler.
877 Also, allow matching of a template parameter pack in the template
878 template parameter to a template parameter in the template
880 (coerce_template_template_parms): Deal with variadic template
881 template parameters. Use coerce_template_template_parm.
882 (unify): Make sure we coerce the template template argument's
883 template arguments to the template template parameter's template
884 parameters, not the other way around.
886 2008-03-25 Tom Tromey <tromey@redhat.com>
888 * Make-lang.in: Remove .o targets.
889 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
891 (c++_OBJS): New variable.
892 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
894 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
896 * typeck.c (composite_pointer_type_r): Add SFINAE support.
897 (composite_pointer_type): Ditto.
898 (common_type): Fix call to composite_pointer_type.
899 (cxx_sizeof_nowarn): New; used to be a macro.
900 (cxx_sizeof_expr): Add SFINAE support.
901 (cxx_alignof_expr): Ditto.
902 (decay_conversion): Fix calls for SFINAE support.
903 (rationalize_conditional_expr): Add SFINAE support.
904 (build_class_member_access_expr): Ditto.
905 (finish_class_member_access_expr): Ditto.
906 (build_x_indirect_ref): Ditto.
907 (build_indirect_ref): Original version renamed to
908 cp_build_indirect_ref; new version provides a bridge from
910 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
912 (get_member_function_from_ptrfunc): Fix calls for SFINAE support.
913 (build_function_call): Original version renamed to
914 cp_build_function_call; new version provides a bridge from
916 (cp_build_function_call): Was build_function_call; added SFINAE
918 (convert_arguments): Add SFINAE support.
919 (build_x_binary_op): Ditto.
920 (build_binary_op): Original version renamed to cp_build_binary_op;
921 new version provides a bridge from c-common.
922 (cp_build_binary_op): Was build_binary_op; added SFINAE support.
923 (pointer_diff): Fix calls for SFINAE.
924 (build_x_unary_op): Add SFINAE support.
925 (condition_conversion): Fix calls for SFINAE.
926 (build_unary_op): Original version renamed to cp_build_unary_op;
927 new version provides a bridge from c-common.
928 (cp_build_unary_op): Was build_unary_op; added SFINAE support.
929 (unary_complex_lvalue): Fix calls for SFINAE.
930 (build_x_conditional_expr): Add SFINAE support.
931 (build_x_compound_expr_from_list): Fix calls for SFINAE.
932 (build_x_compound_expr): Add SFINAE support.
933 (convert_ptrmem): Fix calls for SFINAE.
934 (build_static_cast_1): Add SFINAE support.
935 (build_static_cast): Ditto.
936 (build_reinterpret_cast_1): Ditto.
937 (build_reinterpret_cast): Ditto.
938 (build_const_cast_1): Ditto.
939 (build_const_cast): Ditto.
940 (build_c_cast): Ditto.
941 (build_modify_expr): Original version renamed to
942 cp_build_modify_expr; new version provides a bridge from c-common.
943 (cp_build_modify_expr): Was build_modify_expr; added SFINAE
945 (build_x_modify_expr): Add SFINAE support.
946 (build_ptrmemfunc): Fix calls for SFINAE.
947 (convert_for_assignment): Add SFINAE support.
948 (convert_for_initialization): Ditto.
949 (check_return_expr): Fix calls for SFINAE.
950 (lvalue_or_else): Add SFINAE support.
951 * init.c (perform_member_init): Fix calls for SFINAE.
952 (emit_mem_initializers): Ditto.
953 (expand_virtual_init): Ditto.
954 (expand_cleanup_for_base): Ditto.
955 (build_aggr_init): Add SFINAE support.
956 (expand_default_init): Ditto.
957 (expand_aggr_init_1): Fix calls for SFINAE.
958 (build_offset_ref): Ditto.
959 (build_new_1): Add SFINAE support.
961 (build_vec_delete_1): Fix calls for SFINAE.
962 (get_temp_regvar): Ditto.
963 (build_vec_init): Add SFINAE support.
964 (build_dtor_call): Fix calls for SFINAE.
965 (build_delete): Ditto.
966 (push_base_cleanups): Ditto.
967 (build_vec_delete_1): Ditto.
968 * class.c (build_base_path): Fix calls for SFINAE.
969 (build_simple_base_path): Ditto.
970 (convert_to_base_statically): Ditto.
971 (build_vfn_ref): Ditto.
972 (resolve_address_of_overloaded_function): Ditto.
973 * decl.c (check_initializer): Fix calls for SFINAE.
974 (register_dtor_fn): Ditto.
975 (compute_array_index_type): Ditto.
976 (finish_enum): Ditto.
977 (start_preparsed_function): Ditto.
978 (cxx_maybe_build_cleanup): Ditto.
979 * call.c (convert_like): Add COMPLAIN argument.
980 (convert_like_with_context): Ditto.
981 (build_this): Fix calls for SFINAE.
982 (build_user_type_conversion): Ditto.
983 (resolve_args): Ditto.
984 (build_new_function_call): Add SFINAE support.
985 (build_operator_new_call): Fix calls for SFINAE.
986 (build_object_call): Add SFINAE support.
987 (build_conditional_expr): Ditto.
988 (build_new_op): Ditto.
989 (build_op_delete_call): Fix calls for SFINAE.
991 (convert_like_real): Add SFINAE support.
992 (build_x_va_arg): Fix calls for SFINAE.
993 (convert_default_arg): Ditto.
994 (build_over_call): Add SFINAE support.
995 (build_java_interface_fn_ref): Fix calls for SFINAE.
996 (build_special_member_call): Add SFINAE support.
997 (build_new_method_call): Ditto.
998 (perform_implicit_conversion): Ditto.
999 (perform_direct_initialization_if_possible): Ditto.
1000 (initialize_reference): Fix calls for SFINAE.
1001 * method.c (do_build_assign_ref): Fix calls for SFINAE.
1002 * rtti.c (build_headof): Fix calls for SFINAE.
1003 (get_tinfo_decl_dynamic): Ditto.
1004 (get_typeid): Ditto.
1005 (build_dynamic_cast_1): Add SFINAE support.
1006 (build_dynamic_cast): Ditto.
1007 (tinfo_base_init): Fix calls for SFINAE.
1008 * except.c (do_get_exception_ptr): Fix calls for SFINAE.
1009 (do_end_catch): Ditto.
1010 (initialize_handler_parm): Ditto.
1011 (expand_start_catch_block): Ditto.
1012 (do_allocate_exception): Ditto.
1013 (do_free_exception): Ditto.
1014 (build_throw): Ditto.
1015 * cvt.c (build_up_reference): Fix calls for SFINAE.
1016 (convert_to_reference): Ditto.
1017 (ocp_convert): Ditto.
1018 (convert_to_void): Add SFINAE support.
1019 * tree.c (build_dummy_object): Fix calls for SFINAE.
1020 (stabilize_expr): Ditto.
1021 * cp-tree.h (build_conditional_expr): Add tsubst_flags_t
1023 (build_new_method_call): Ditto.
1024 (build_special_member_call): Ditto.
1025 (build_new_op): Ditto.
1026 (perform_implicit_conversion): Ditto.
1027 (perform_direct_initialization_if_possible): Ditto.
1028 (convert_to_void): Ditto.
1029 (build_aggr_init): Ditto.
1031 (build_vec_init): Ditto.
1032 (build_dynamic_cast): Ditto.
1033 (finish_call_expr): Ditto
1034 (cxx_sizeof_or_alignof_expr): Add COMPLAIN parameter.
1035 (cxx_sizeof_nowarn): Remove macro; add function declaration.
1036 (build_class_member_access_expr): Add tsubst_flags_t parameter.
1037 (finish_class_member_access_expr): Ditto.
1038 (build_x_indirect_ref): Ditto.
1039 (cp_build_indirect_ref): New.
1040 (cp_build_function_call): Add tsubst_flags_t parameter.
1041 (build_x_unary_op): Ditto.
1042 (cp_build_unary_op): New.
1043 (build_x_conditional_expr): Add tsubst_flags_t parameter.
1044 (build_x_compound_expr): Ditto.
1045 (build_compound_expr): Ditto.
1046 (build_static_cast): Ditto.
1047 (build_reinterpret_cast): Ditto.
1048 (build_const_cast): Ditto.
1049 (build_c_cast): Ditto.
1050 (build_x_modify_expr): Ditto.
1051 (cp_build_modify_expr): New.
1052 (convert_for_initialization): Add tsubst_flags_t parameter.
1053 (cp_build_binary_op): Remove macro; add function declaration.
1054 (invalid_nonstatic_memfn_p): Add tsubst_flags_t parameter.
1055 (lvalue_or_else): Ditto.
1056 (build_functional_cast): Ditto.
1057 * typeck2.c (digest_init): Fix calls for SFINAE.
1058 (process_init_constructor_array): Ditto.
1059 (process_init_constructor_record): Ditto.
1060 (build_x_arrow): Ditto.
1061 (build_m_component_ref): Ditto.
1062 (build_functional_cast): Add SFINAE support.
1063 * pt.c (tsubst_copy_and_build): Add (more) SFINAE support.
1064 * semantics.c (simplify_loop_decl_cond): Fix calls for SFINAE.
1065 (finish_expr_stmt): Ditto.
1066 (finish_for_expr): Ditto.
1067 (finish_asm_stmt): Ditto.
1068 (finish_non_static_data_member): Ditto.
1069 (finish_qualified_id_expr): Ditto.
1070 (finish_call_expr): Add SFINAE support.
1071 (finish_increment_expr): Fix calls for SFINAE.
1072 (finish_unary_op_expr): Ditto.
1073 (simplify_aggr_init_expr): Ditto.
1074 (finish_omp_clauses): Ditto.
1075 (finish_omp_for): Ditto.
1076 (finish_omp_barrier): Ditto.
1077 (finish_omo_flush): Ditto.
1078 * decl2.c (grok_array_decl): Fix calls or SFINAE.
1079 (build_anon_union_vars): Ditto.
1080 (get_guard_cond): Ditto.
1082 (one_static_initialization_or_destruction): Ditto.
1083 (do_static_initialization_or_destruction): Ditto.
1084 (generate_ctor_or_dtor_function): Ditto.
1085 (build_offset_ref_call_from_tree): Ditto.
1086 * parser.c (cp_parser_postfix_expression): Fix calls for SFINAE.
1087 (cp_parser_postfix_dot_deref_expression): Ditto.
1088 (cp_parser_unary_expression): Ditto.
1089 (cp_parser_new_expression): Ditto.
1090 (cp_parser_cast_expression): Ditto.
1091 (cp_parser_binary_expression): Ditto.
1092 (cp_parser_question_colon_clause): Ditto.
1093 (cp_parser_assignment_expression): Ditto.
1094 (cp_parser_expression): Ditto.
1095 (cp_parser_builtin_offsetof): Ditto.
1096 (cp_parser_template_argument): Ditto.
1097 (cp_parser_functional_cast): Ditto.
1099 2008-03-24 Tom Tromey <tromey@redhat.com>
1101 * lex.c (handle_pragma_interface): Don't copy the filename.
1102 (handle_pragma_implementation): Copy filename using xstrdup.
1104 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1106 * cp-tree.h (IS_AGGR_TYPE): Rename to MAYBE_CLASS_TYPE_P.
1107 (SET_IS_AGGR_TYPE): Rename to SET_CLASS_TYPE_P.
1108 (IS_AGGR_TYPE_CODE): Rename to RECORD_OR_UNION_CODE_P.
1109 (PROMOTES_TO_AGGR_TYPE): Remove.
1110 (CLASS_TYPE_P, TYPE_NON_AGGREGATE_CLASS): Adjust.
1111 * typeck.c (unary_complex_lvalue, build_modify_expr,
1112 convert_for_initialization): Adjust.
1113 * init.c (is_aggr_type): Remove.
1114 (is_class_type): Add.
1115 (build_offset_ref, build_new_1, build_vec_delete_1, build_vec_init,
1116 build_delete): Adjust.
1117 * lex.c (make_aggr_type): Remove.
1118 (make_class_type): Add.
1119 (cxx_make_type): Adjust.
1120 * class.c (finish_struct_1, fixed_type_or_null, is_empty_class):
1122 * decl.c (build_typename_type, make_typename_type,
1123 make_unbound_class_template, cxx_init_decl_processing,
1124 check_tag_decl, groktypename, start_decl_1, layout_var_decl,
1125 check_initializer, cp_finish_decl, build_ptrmemfunc_type, grokparms,
1126 grok_op_properties, xref_tag, check_function_type): Adjust.
1127 * call.c (check_dtor_name, standard_conversion, implicit_conversion,
1128 add_builtin_candidate, add_builtin_candidates,
1129 build_user_type_conversion_1, convert_like_real, build_cxx_call,
1130 is_subseq, compare_ics): Adjust.
1131 * method.c (use_thunk): Adjust.
1132 * rtti.c (build_dynamic_cast_1, create_pseudo_type_info,
1133 create_tinfo_types): Adjust.
1134 * cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
1135 build_up_reference, convert_to_reference, convert_from_reference,
1136 ocp_convert, build_expr_type_conversion): Adjust.
1137 * tree.c (bind_template_template_parm, error_type): Adjust.
1138 * dump.c (cp_dump_tree): Adjust.
1139 * search.c (lookup_member): Adjust.
1140 * friend.c (make_friend_class, do_friend): Adjust.
1141 * typeck2.c (store_init_value, process_init_constructor_array,
1142 process_init_constructor_record, build_x_arrow, build_m_component_ref,
1143 build_functional_cast): Adjust.
1144 * pt.c (finish_member_template_decl, process_template_parm,
1145 lookup_template_class, tsubst_function_type, tsubst,
1146 tsubst_copy_and_build, get_template_base, bt_instantiate_type_proc):
1148 * semantics.c (begin_class_definition, finish_base_specifier,
1149 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1151 * name-lookup.c (constructor_name_p, push_overloaded_decl,
1152 do_class_using_decl, lookup_qualified_name,
1153 maybe_process_template_type_declaration): Adjust.
1154 * decl2.c (grok_array_decl, check_member_template,
1155 constrain_class_visibility): Adjust.
1156 * parser.c (cp_parser_class_name): Adjust.
1158 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1160 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1162 2008-03-17 Jason Merrill <jason@redhat.com>
1165 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1166 a temp directly to a reference as per DR391.
1168 2008-03-12 Richard Guenther <rguenther@suse.de>
1172 2008-02-04 Richard Guenther <rguenther@suse.de>
1175 * decl.c (record_builtin_java_type): Make jboolean a
1176 integer type again where its mode doesn't match that of bool.
1178 2008-01-25 Richard Guenther <rguenther@suse.de>
1181 * decl.c (record_builtin_java_type): Make __java_boolean
1183 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1184 after TYPE_MAIN_VARIANT check.
1186 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1189 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1193 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
1194 DECL_P in not a variable and appears more than once error messages.
1196 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1200 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1204 * typeck.c (structural_comptypes): Call cp_comptypes.
1205 (comptypes): New; called from the C/C++ common bits to perform
1207 (cp_comptypes): Renamed from comptypes, which is already used,
1208 with a different signature, by the C++ front end.
1209 (build_reinterpret_cast_1): Call cp_comptypes.
1210 (ptr_reasonably_similar): Ditto.
1211 * decl.c (decls_match): Ditto.
1212 * cvt.c (convert_to_reference): Ditto.
1213 * cp-tree.h (same_type_p): Ditto.
1214 (same_or_base_type_p): Ditto.
1215 (comptypes): Rename to cp_comptypes.
1216 * pt.c (canonical_type_parameter): Call cp_comptypes.
1218 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1220 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1221 test for equivalence between pointer and references.
1223 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1226 * class.c (finish_struct_anon): Use permerror instead of pedwarn.
1227 (check_field_decls): Likewise.
1228 (note_name_declared_in_class): Likewise.
1229 * call.c (build_new_op): Likewise.
1230 (convert_like_real): Likewise.
1231 (build_over_call): Likewise.
1232 * lex.c (unqualified_fn_lookup_error): Likewise.
1233 * parser.c (cp_parser_template_id): Likewise.
1234 * cvt.c (warn_ref_binding): Likewise.
1235 (convert_to_reference): Likewise.
1236 (ocp_convert): Likewise.
1237 (convert_to_void): Use error instead of pedwarn.
1238 * error.c (cp_cpp_error): Use pedantic_warning_kind.
1239 * decl.c (compute_array_index_type): Use constant_expression_error.
1241 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1243 * parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Note
1244 that auto is either a storage class or a simple type specifier,
1245 depending on the dialect.
1246 (cp_parser_decl_specifier_seq): Complain about `auto' as a storage
1247 specifier in C++98 mode, error in C++0x mode (since we don't
1248 support auto as a type specifier, yet).
1249 (cp_parser_storage_class_specifier_opt): Don't treat `auto' as a
1250 storage specifier in C++0x mode.
1251 (cp_parser_simple_type_specifier): Parse `auto' as a
1252 simple-type-specifier, but error because we don't support it yet.
1254 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1256 * parser.c (cp_parser_nonclass_name): New.
1257 (cp_parser_pseudo_destructor_name): Use it instead of
1258 cp_parser_type_name.
1259 (cp_parser_type_name): Move code to cp_parser_nonclass_name.
1261 2008-02-29 Tom Tromey <tromey@redhat.com>
1263 * parser.c (struct cp_token) <input_file_stack_index>: Remove.
1264 (cp_lexer_get_preprocessor_token): Update.
1265 (cp_lexer_set_source_position_from_token): Don't call
1266 restore_input_file_stack.
1267 * lex.c (cxx_init): Don't use push_srcloc or pop_srcloc.
1269 2008-02-28 Richard Guenther <rguenther@suse.de>
1272 2008-02-26 Richard Guenther <rguenther@suse.de>
1274 * decl.c (duplicate_decls): Remove decl from global mapping
1275 before ggc_freeing it.
1277 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1280 * rtti.c: Include c-pragma.h.
1281 (push_abi_namespace, pop_abi_namespace): New functions.
1282 (build_dynamic_cast_1, tinfo_base_init, get_pseudo_ti_index,
1283 create_tinfo_types, emit_support_tinfos): Use them.
1284 * Make-lang.in (cp/rtti.o): Depend on $(C_PRAGMA_H).
1286 2008-02-26 Jason Merrill <jason@redhat.com>
1289 * decl.c (grokdeclarator): Allow a typedef of an unnamed struct
1290 to name the struct for linkage purposes even if it has attributes.
1291 (start_decl): In that case, set ATTR_FLAG_TYPE_IN_PLACE.
1293 2008-02-26 Tom Tromey <tromey@redhat.com>
1295 * parser.c (eof_token): Remove old location code.
1296 (check_empty_body): Remove test of USE_MAPPED_LOCATION.
1297 * decl2.c (generate_ctor_or_dtor_function): Remove old location
1299 (cp_write_global_declarations): Likewise.
1300 * lex.c (cxx_init): Remove old location code.
1301 (handle_pragma_implementation): Remove test of
1302 USE_MAPPED_LOCATION.
1303 * pt.c (tsubst): Remove old location code.
1304 * error.c (cp_print_error_function): Remove test of
1305 USE_MAPPED_LOCATION.
1306 * decl.c (pop_label): Remove old location code.
1307 (finish_function): Likewise.
1309 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1312 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1314 2008-02-26 Richard Guenther <rguenther@suse.de>
1316 * decl.c (duplicate_decls): Remove decl from global mapping
1317 before ggc_freeing it.
1319 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1322 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1324 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1326 * typeck.c (build_class_member_access_expr): Add appropriate
1327 OPT_W* parameter to warning.
1328 (build_reinterpret_cast_1): Likewise.
1329 * name-lookup.c (push_overloaded_decl): Likewise.
1331 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1334 * error.c (dump_expr): Handle CONJ_EXPR.
1336 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1339 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1340 (dump_expr): Handle FIXED_CST.
1342 2008-02-24 Jason Merrill <jason@redhat.com>
1344 * parser.c (cp_parser_declaration): Handle "inline namespace".
1345 (cp_parser_namespace_definition): Likewise.
1348 * name-lookup.c (arg_assoc_namespace): Look down into inline
1351 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1353 * typeck.c (check_for_casting_away_constness): Use 1 single
1354 argument, the type of cast, to decide what diagnostics generate.
1355 (build_static_cast_1): Remove unused code. Update call to
1356 check_for_casting_away_constness.
1357 (build_reinterpret_cast_1): Update call to
1358 check_for_casting_away_constness.
1359 (build_const_cast_1): Likewise.
1361 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1363 * error.c (dump_expr): Don't deal directly with NEW_EXPR (and
1364 VEC_NEW_EXPR), forward to pp_expression.
1365 * cxx-pretty-print.c (pp_cxx_new_expression): Fix FIXME.
1367 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1370 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1372 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1375 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1376 template decls' function decl.
1378 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1382 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1385 * pt.c (determine_specialization): In case of function templates,
1386 when the type of DECL does not match FN there is no match.
1388 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1391 * typeck.c (build_binary_op): Warn about floating point
1392 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1394 2008-02-19 Jason Merrill <jason@redhat.com>
1397 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1398 while we look for possible bindings.
1400 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1403 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1407 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1408 vars. Afterwards ensure v is VAR_DECL.
1411 * parser.c (cp_parser_omp_for_loop): If DECL has REFERENCE_TYPE, don't
1412 call cp_finish_decl.
1413 * semantics.c (finish_omp_for): Fail if DECL doesn't have integral type
1416 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1421 * pt.c (finish_member_template_decl): If the type in a TYPE_DECL
1422 is error_mark_node, return an error early.
1423 (find_parameter_packs_r): Pass the pointer set along to recursive
1424 calls of cp_walk_subtrees; don't try to manage the pointer set
1426 (uses_parameter_packs): Pass the pointer set to cp_walk_tree.
1427 (make_pack_expansion): Ditto.
1428 (check_for_bare_parameter_packs): Ditto. Also, don't bother taking
1429 a second pass through the tree with find_parameter_packs_r; that
1430 second pass no longer does anything.
1431 (push_template_decl_real): If we have an erroneous declaration,
1432 set its type to error_mark_node before returning an error.
1434 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1437 * pt.c (tsubst_initializer_list): Deal with the use of
1438 VOID_TYPE_NODE to indicate value-initialization of the bases.
1440 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1441 Jason Merrill <jason@redhat.com>
1445 * class.c (type_has_user_nondefault_constructor): New fn.
1446 * cp-tree.h: Declare it.
1447 * init.c (emit_mem_initializers): Use it for -W warning about
1448 missing base initializer.
1450 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1453 * pt.c (determine_specialization): In case of function templates,
1454 when the type of DECL does not match FN there is no match.
1456 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1457 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1460 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1461 are not identifier :: ~, return before calling cp_parser_type_name.
1463 2008-02-13 Jason Merrill <jason@redhat.com>
1465 PR c++/34962, c++/34937, c++/34939
1466 * decl2.c (is_late_template_attribute): Always defer attributes
1467 vector_size and weak.
1470 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1471 of enumerators, too.
1473 2008-02-12 Jason Merrill <jason@redhat.com>
1476 * call.c (convert_like_real): Pass LOOKUP_NO_CONVERSION to build_temp
1477 if we're doing conversions to call a user-defined conversion function.
1479 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1482 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1485 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1488 * init.c (build_new_1): Don't create placement_expr before
1489 constructing alloc_call. Verify that the pointer is passed by
1490 value to operator new.
1492 2008-02-11 Jason Merrill <jason@redhat.com>
1495 * pt.c (tsubst): Don't look up a template typedef in an explicit
1498 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1501 * tree.c (cp_build_qualified_type_real): When building a
1502 cv-qualified array type, build it as a unique type with
1503 build_cplus_array_type_1 and then adopt the unqualified type's
1506 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1509 * decl.c (groktypename): Check grokdeclarator return.
1511 2008-02-10 Jason Merrill <jason@redhat.com>
1514 * decl2.c (cp_write_global_declarations): Don't write out static
1515 data members with DECL_IN_AGGR_P set.
1517 2008-02-08 Jason Merrill <jason@redhat.com>
1520 * tree.c (build_target_expr_with_type): Handle void initializer.
1521 (bot_manip): Remap slot before recursing.
1523 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1526 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1528 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1531 * tree.c: Include tree-flow.h.
1532 (build_target_expr): Check type compatibility.
1533 * Make-lang.in (cp/tree.o): Depend on $(TREE_FLOW_H).
1534 * call.c (convert_like_real): Convert bitfield to expected type.
1536 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1540 * typeck.c (structural_comptypes): Call cp_comptypes.
1541 (comptypes): New; called from the C/C++ common bits to perform
1543 (cp_comptypes): Renamed from comptypes, which is already used,
1544 with a different signature, by the C++ front end.
1545 (build_reinterpret_cast_1): Call cp_comptypes.
1546 (ptr_reasonably_similar): Ditto.
1547 * decl.c (decls_match): Ditto.
1548 * cvt.c (convert_to_reference): Ditto.
1549 * cp-tree.h (same_type_p): Ditto.
1550 (same_or_base_type_p): Ditto.
1551 (comptypes): Rename to cp_comptypes.
1552 * pt.c (canonical_type_parameter): Call cp_comptypes.
1554 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1557 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1558 value dependent expression.
1560 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1563 * decl2.c (save_template_attributes): When we're modifying the
1564 TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
1565 all of the other variants to add those same attributes. Otherwise,
1566 the main variant will be inconsistent with those other variants.
1568 2008-02-04 Richard Guenther <rguenther@suse.de>
1571 * decl.c (record_builtin_java_type): Make jboolean a
1572 integer type again where its mode doesn't match that of bool.
1574 2008-02-02 Jason Merrill <jason@redhat.com>
1575 Mark Mitchell <mark@codesourcery.com>
1578 * init.c (build_value_init_1): New function.
1579 (build_value_init): New function.
1580 * typeck2.c (build_functional_cast): Call it.
1581 * cp-gimplify.c (cp_gimplify_init_expr): Handle its output.
1583 * cp-tree.h (TYPE_HAS_USER_CONSTRUCTOR): Rename from
1584 TYPE_HAS_CONSTRUCTOR.
1585 * class.c (finish_struct_bits, maybe_warn_about_overly_private_class,
1586 add_implicitly_declared_members): Adjust.
1587 (check_field_decls): Adjust. Remove warnings about reference/const
1588 in class without constructor.
1589 (check_bases_and_members): Adjust. Give those warnings here instead.
1590 * decl.c (fixup_anonymous_aggr): Adjust.
1591 (check_initializer): Adjust, clarify logic slightly.
1592 (grok_special_member_properties): Adjust, only set if user-provided.
1593 * rtti.c (create_tinfo_types): Don't set.
1594 * cvt.c (ocp_convert): Remove exception for vtable_entry_type et al.
1595 Use same_type_ignoring_top_level_qualifiers_p.
1596 * pt.c (check_explicit_specialization): Adjust.
1597 (instantiate_class_template): Adjust.
1599 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1600 Jakub Jelinek <jakub@redhat.com>
1604 * typeck.c (structural_comptypes): Handle comparisons of
1605 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1607 * mangle.c (write_builtin_type): Map down to the canonical type,
1608 which will be one of the predefined type nodes.
1610 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1613 * cp-tree.h (struct full_lang_decl): Make tree_code bitfield 16
1614 bits to allow for expansion of the number of middle end tree
1617 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1628 * typeck.c (check_return_expr): Tweak call to
1629 check_for_bare_parameter_packs.
1630 * class.c (add_method): Be careful with error_mark_nodes.
1631 * cp-tree.h (check_for_bare_parameter_packs): Remove "*" from
1633 * pt.c (struct find_parameter_pack_data): Remove
1635 (find_parameter_packs_r): Don't use SET_PACKS_TO_ERROR.
1636 (uses_parameter_packs): Don't set SET_PACKS_TO_ERROR.
1637 (make_pack_expansion): Ditto.
1638 (check_for_bare_parameter_packs): Parameter is now a tree, not a
1640 (process_template_parm): Tweak call to
1641 check_for_bare_parameter_packs.
1642 (push_template_decl_real): Tweak calls to
1643 check_for_bare_parameter_packs. If bare parameter packs are found
1644 in the list of exceptions, clear out that list after giving an
1646 * semantics.c (finish_cond): Tweak call to
1647 check_for_bare_parameter_packs.
1648 (finish_expr_stmt): Ditto.
1649 (finish_for_expr): Ditto.
1650 (finish_switch_cond): Ditto.
1651 (finish_mem_initializers): Ditto.
1652 (finish_member_declaration): Ditto.
1653 (finish_static_assert): Check for bare parameter packs in the
1655 * decl2.c (cplus_decl_attributes): Check for bare parameter packs in the
1656 attributes of a declaration.
1657 * parser.c (cp_parser_using_declaration): Tweak call to
1658 check_for_bare_parameter_packs.
1659 (cp_parser_base_clause): Ditto.
1661 2008-01-28 Jason Merrill <jason@redhat.com>
1664 * class.c (build_base_path): Fix !want_pointer case.
1666 2008-01-27 Jason Merrill <jason@redhat.com>
1669 * class.c (build_base_path): Fix previous change.
1671 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1674 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1677 2008-01-26 Richard Guenther <rguenther@suse.de>
1680 * typeck.c (build_binary_op): Remove code to shorten compares.
1682 2008-01-25 Richard Guenther <rguenther@suse.de>
1685 * decl.c (record_builtin_java_type): Make __java_boolean
1687 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1688 after TYPE_MAIN_VARIANT check.
1690 2008-01-25 Jason Merrill <jason@redhat.com>
1693 * class.c (build_base_path): Don't mess with virtual access if
1695 * call.c (standard_conversion): Don't check whether source type
1698 * decl2.c (is_late_template_attribute): Don't defer attribute
1699 visibility just because the type is dependent.
1701 2008-01-25 Jason Merrill <jason@redhat.com>
1702 Mark Mitchell <mark@codesourcery.com>
1705 * call.c (standard_conversion): Allow conversion from integer/real
1707 (compare_ics): Such a conversion is worse than a normal arithmetic
1710 2008-01-25 Richard Guenther <rguenther@suse.de>
1713 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1716 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1719 * pt.c (push_template_decl_real): Return error_mark_node in case
1720 of template definition of non-template.
1722 2008-01-24 Jason Merrill <jason@redhat.com>
1725 * decl2.c (is_late_template_attribute): Defer any attribute with
1726 dependent args. Also defer type attributes if the type is dependent.
1728 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1729 Alexandre Oliva <aoliva@redhat.com>
1732 * call.c (reference_binding): For bitfields use the declared bitfield
1734 (add_builtin_candidates): Likewise.
1735 * class.c (layout_class_type): For bitfields copy over the
1736 original type quals.
1738 2008-01-22 Jason Merrill <jason@redhat.com>
1741 * decl.c (groktypename): Also ignore attributes on dependent
1742 possibly-class types.
1745 * friend.c (do_friend): Check for prior declaration of a friend
1746 function of a local class.
1747 * name-lookup.c (lookup_name_innermost_nonclass_level):
1749 * name-lookup.h: Declare it.
1751 2008-01-22 Tom Tromey <tromey@redhat.com>
1754 * init.c (build_new_1): Only disallow Java aggregates.
1756 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1759 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1760 if decl or init is error_mark_node.
1763 * error.c (dump_expr): Handle VECTOR_CST.
1765 2008-01-21 Jason Merrill <jason@redhat.com>
1768 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1771 * pt.c (retrieve_local_specialization): Robustify.
1772 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1775 * pt.c (tsubst): Only call retrieve_local_specialization if the
1776 original typedef was in a function template.
1779 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1781 2008-01-21 Richard Guenther <rguenther@suse.de>
1784 * error.c (cp_print_error_function): Deal with recursive
1787 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1790 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1792 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1796 * name-lookup.c (do_class_using_decl): Do not call constructor_name_p
1797 on non-IS_AGGR_TYPE scope.
1798 (constructor_name_p): Assert IS_AGGR_TYPE.
1800 2008-01-18 Ian Lance Taylor <iant@google.com>
1803 * decl.c (duplicate_decls): Copy DECL_IS_OPERATOR_NEW flag.
1804 (grok_op_properties): For NEW_EXPR and VEC_NEW_EXPR set
1805 DECL_IS_OPERATOR_NEW flag.
1807 2008-01-16 Richard Guenther <rguenther@suse.de>
1810 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1811 for conversions to type variants.
1813 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1815 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1816 declaration and code. Update copyright year.
1818 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1821 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1822 know we have a class type.
1824 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1827 * pt.c (coerce_template_parameter_pack): When substituting into
1828 the type of a non-type template parameter pack. use the
1829 deduced/substituted arguments.
1830 * parser.c (declarator_can_be_parameter_pack): A pointer-to-member
1831 can be a parameter pack with the ellipsis following it. When we
1832 have an erroneous declaration, allow it to be a parameter pack.
1833 (cp_parser_template_parameter): Complain about default
1834 arguments on non-type template parameter packs, and parse them
1835 using the new cp_parser_default_argument.
1836 (cp_parser_parameter_declaration): Complain about parameter packs
1837 with default arguments. Move parsing of default arguments into a
1838 new function, cp_parser_default_argument.
1839 (cp_parser_default_argument): New; extracted from
1840 cp_parser_parameter_declaration.
1842 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1848 * typeck.c (check_return_expr): If there are bare parameter packs
1849 in the return value, set it to error_mark_node.
1850 * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
1851 * pt.c (find_parameter_packs_r): Look at the type of
1852 IDENTIFIER_NODEs (e.g., for user-defined conversions).
1853 (check_for_bare_parameter_packs): Flip the result: now returns
1854 TRUE when there were bare parameter packs, FALSE otherwise.
1855 (push_template_decl_real): Deal with flipped result of
1856 check_for_bare_parameter_packs.
1857 * semantics.c (finish_cond): If there are bare parameter packs in
1858 the conditional, set it to error_mark_node.
1859 (finish_expr_stmt): If there are bare parameter packs in the
1860 expression, set it to error_mark_node.
1861 (finish_for_expr): Ditto.
1862 (finish_switch_cond): If there are bare parameter packs in
1863 the conditional, set it to error_mark_node.
1864 (finish_mem_initializers): If there are bare parameter packs in
1865 the member initializer, set it to error_mark_node.
1866 (finish_member_declaration): Check the attributes of the
1867 declaration for bare parameter packs, and remove the attributes if
1868 any have bare parameter packs.
1869 * parser.c (cp_parser_using_declaration): Check the using
1870 declaration for bare parameter packs.
1871 (cp_parser_base_clause): If there are bare parameter packs in a
1872 base specifier, don't add it to the chain.
1874 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1877 * error.c (dump_simple_decl): Display ellipsis for template
1878 non-type parameter packs.
1879 (dump_decl): Display ellipsis for template type parameter packs.
1880 (dump_template_decl): Display ellipsis for template template
1882 * pt.c (redeclare_class_template): When redeclaring a class
1883 template, check for collisions between template parameters and
1884 template parameter packs.
1886 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1889 * pt.c (process_partial_specialization): Don't mark template
1890 parameters that occur in non-deduced contexts.
1891 (struct pair_fn_data): Add include_nondeduced_p.
1892 (for_each_template_parm_r): Only visit non-deduced contexts if
1893 include_nondeduced_p is set.
1894 (for_each_template_parm): Added parameter include_nondeduced_p,
1895 which states whether template parameters found in non-deduced
1896 contexts should be visited.
1897 (uses_template_parms): Visit all template parameters, even those
1898 in non-deduced contexts.
1900 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1903 * pt.c (check_default_tmpl_args): Check for parameter packs that
1904 aren't at the end of a primary template.
1905 (push_template_decl_real): Remove check for parameter packs that
1906 aren't at the end of a primary template; that now happens in
1907 check_default_tmpl_args.
1908 * semantics.c (finish_template_template_parm): Use
1909 check_default_tmpl_args to check for errors in the template
1912 2008-01-12 Doug Kwan <dougkwan@google.com>
1914 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1915 instead of OPT_Wreturn_type in warning due to ignored return type
1917 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1918 instead of OPT_Wreturn_type in warning due to ignored return type
1921 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1924 * semantics.c (finish_omp_for): Don't call
1925 fold_build_cleanup_point_expr if processing_template_decl.
1927 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1928 Jakub Jelinek <jakub@redhat.com>
1931 * error.c (dump_template_argument): Deal with TREE_LIST.
1933 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1935 * parser.c (cp_parser_check_decl_spec): Don't warn about "long
1936 long" in C++0x mode; change the warning to note that "long long"
1937 is only unsupported in C++98 mode.
1939 2007-12-20 Jason Merrill <jason@redhat.com>
1942 * call.c (standard_conversion): Derived-to-base is considered a
1943 standard conversion.
1945 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1948 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1949 call cp_parser_statement rather than
1950 cp_parser_already_scoped_statement.
1952 2007-12-18 Jason Merrill <jason@redhat.com>
1955 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1957 (dependent_type_p_r): Handle the domain of an array.
1959 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1960 Jakub Jelinek <jakub@redhat.com>
1965 * pt.c (template_template_parm_bindings_ok_p): New; verifies
1966 bindings of template template parameters after all template
1967 arguments have been deduced.
1968 (coerce_template_parms): Don't complain when COMPLAIN doesn't
1970 (fn_type_unification): Use template_template_parm_bindings_ok_p.
1971 (unify): Deal with variadic, bound template template parameters.
1972 (get_class_bindings): Use template_template_parm_bindings_ok_p.
1974 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1977 * decl.c (grokdeclarator): Reject friend sfk_constructor
1980 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1983 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1986 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1989 * cp-lang.c (cp_classify_record): New.
1990 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1992 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1995 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1998 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1999 dynamic_cast in a template.
2001 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2004 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2005 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2007 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2010 * error.c (dump_type_prefix, dump_type_suffix): Handle
2011 TYPE_PACK_EXPANSION.
2014 * error.c (dump_expr): Handle ABS_EXPR.
2016 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2020 * repo.c (repo_emit_p): Return 2 for DECL_INTEGRAL_CONSTANT_VAR_P
2021 in class scope rather than DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.
2022 Return 2 also if DECL_EXPLICIT_INSTANTIATION.
2023 * decl2.c (import_export_decl): Don't make VAR_DECLs import_p when
2024 flag_use_repository and repo_emit_p returned 2.
2026 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2029 * tree.c (stabilize_call, stabilize_init): Do nothing if
2030 processing_template_decl.
2032 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2035 * semantics.c (finish_decltype_type): For SCOPE_REF issue an
2036 error instead of assertion failure.
2037 * parser.c (cp_parser_decltype): If closing paren is not found,
2038 return error_mark_node.
2040 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2043 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2045 (arg_assoc_type): We don't need to handle TYPE_ARGUMENT_PACK here,
2046 since arg_assoc_template_arg will deal with them (better).
2048 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2051 * pt.c (tsubst_exception_specification): Handle substitutions into
2052 member templates, where tsubst_pack_expansion returns a
2053 TYPE_PACK_EXPANSION.
2055 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2058 * pt.c (unify_pack_expansion): If we didn't deduce any actual
2059 bindings for the template parameter pack, don't try to keep the
2060 empty deduced arguments.
2061 (unify): If a parameter is a template-id whose template argument
2062 list contains a pack expansion that is not at the end, then we
2063 cannot unify against that template-id.
2065 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2068 * pt.c (current_template_args): Use error_operand_p.
2070 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2073 * error.c (dump_decl): Handle TREE_BINFO.
2075 2007-12-01 Ollie Wild <aaw@google.com>
2078 * typeck.c (build_binary_op): Add conversion of pointers to function
2079 members appearing as operands to the equality operators.
2081 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2084 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2086 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2089 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2091 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2096 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2098 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2101 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2103 PR tree-optimization/34181
2104 * method.c (use_thunk): Don't inline the call in the thunk.
2107 * tree.c (decl_linkage): Static data members and static member
2108 functions in anonymous ns classes are lk_external.
2110 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2113 * decl.c (start_preparsed_function): Pass
2114 processing_template_decl for the new allocate_struct_function
2117 2007-11-25 Richard Guenther <rguenther@suse.de>
2119 * decl.c (poplevel): Use BLOCK_CHAIN.
2121 2007-11-24 Ollie Wild <aaw@google.com>
2123 * typeck.c (delta_from_ptrmemfunc): New function.
2124 (get_member_function_from_ptrfunc): Call delta_from_ptrmemfunc.
2125 (build_binary_op): Call delta_from_ptrmemfunc.
2127 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2131 * decl.c (cp_finish_decl): Disallow variable or field
2132 definitions if extern "Java" aggregates.
2133 (grokparms): Disallow parameters with extern "Java"
2135 (check_function_type): Disallow function return values
2136 with extern "Java" aggregates.
2137 * init.c (build_new_1): Disallow placement new with
2138 extern "Java" aggregates.
2140 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2141 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2144 * call.c (convert_like_real): Build a zero constant when __null is
2145 converted to an integer type.
2147 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2150 * decl2.c (cp_write_global_declarations): Issue error about static
2151 data members in anonymous namespace which are declared and used,
2154 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2157 * parser.c (cp_parser_class_head): Reject function template ids.
2160 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2161 when processing_template_decl to build_array_type.
2164 * pt.c (more_specialized_fn): Don't segfault if one or
2165 both argument list end with ellipsis.
2167 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2170 * semantics.c (finish_call_expr): Set
2171 current_function_returns_abnormally if fn is noreturn FUNCTION_DECL
2172 or OVERLOAD with all noreturn functions.
2174 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2177 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2180 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2187 * pt.c (find_parameter_packs_r): If ppd->set_packs_to_error,
2188 set to error_mark_node the outermost POINTER_TYPE to the pack if
2189 it is seen in a POINTER_TYPE.
2190 (push_template_decl_real): If check_for_bare_parameter_packs
2191 fails for function return type, set the return type to
2192 integer_type_node. If check_for_bare_parameter_packs failed
2193 for non-function, return error_mark_node.
2196 * call.c (build_new_op): Call resolve_args before calling
2199 2007-11-11 Tom Tromey <tromey@redhat.com>
2202 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2204 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2207 * pt.c (redeclare_class_template): Update error message. Use a
2208 note to show the previous declaration.
2209 (tsubst_friend_class): Use the location of the friend template as
2210 the input location before calling redeclare_class_template.
2212 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2215 * semantics.c (finish_pseudo_destructor_expr): Handle
2216 object == error_mark_node.
2218 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2221 * pt.c (tsubst_copy_and_build) <case COMPONENT_REF>: If object_type
2222 is not scalar type, let finish_class_member_access_expr handle
2223 diagnostics. Pass BIT_NOT_EXPR argument to
2224 finish_pseudo_destructor_expr. Handle SCOPE_REF properly.
2226 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2229 * decl.c (cp_complete_array_type): If any of the initializer
2230 elements are pack expansions, don't compute the array size yet.
2232 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2235 * tree.c (decl_linkage): Fields have no linkage.
2237 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2239 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2241 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2246 * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
2247 Be careful with ERROR_MARK_NODEs.
2248 * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
2251 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2254 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2257 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2261 * tree.c (c_build_qualified_type): Define bridge to
2262 cp_build_qualified_type.
2264 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2275 * typeck.c (check_return_expr): Pass address of retval to
2276 check_for_bare_parameter_packs.
2277 * class.c (build_base_field): Tolerate bases that have no layout
2279 (end_of_base): Ditto.
2280 * tree.c (canonical_type_variant): Be careful with
2282 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2284 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2285 which states whether parameter packs should be replaced with
2287 (find_parameter_packs_r): Pass addresses to cp_walk_tree wherever
2288 possible. If set_packs_to_error is set true, replace the parameter
2289 pack with ERROR_MARK_NODE. Manage our own pointer sets.
2290 (uses_parameter_packs): Don't set parameter packs to
2292 (check_for_bare_parameter_packs): Now takes a pointer to a tree,
2293 which may be modified (if it is a parameter pack). Instructs
2294 find_parameter_packs_r to replace parameter packs with
2295 ERROR_MARK_NODE (so that they won't cause errors later on).
2296 (process_template_parm): Pass pointer to
2297 check_for_bare_parameter_packs.
2298 (process_partial_specialization): Replace pack expansions before
2299 the end of the template argument list with ERROR_MARK_NODE.
2300 (push_template_decl_real): Pass pointer to
2301 check_for_bare_parameter_packs. Replace parameter packs not at the
2302 end of the template parameter list with ERROR_MARK_NODE.
2303 (convert_template_argument): Be more careful about using DECL_NAME
2304 on only declarations.
2305 (unify): Can't unify against ERROR_MARK_NODE.
2306 * semantics.c (finish_cond): Pass pointer to
2307 check_for_bare_parameter_packs.
2308 (finish_expr_stmt): Ditto.
2309 (finish_for_expr): Ditto.
2310 (finish_switch_cond): Pass pointer to
2311 check_for_bare_parameter_packs, and call it before we put the
2312 condition into the statement.
2313 (finish_mem_initializers): Pass pointer to
2314 check_for_bare_parameter_packs.
2315 (finish_member_declaration): Ditto.
2316 * parser.c (cp_parser_base_clause): Ditto.
2318 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2321 * decl.c (cp_finish_decl): Call make_rtl_for_nonlocal_decl already
2322 with the final TREE_READONLY flag in place. processing_template_decl
2323 is known to be 0 in this part of function.
2326 * cp-tree.h: Update comment - TYPE_LANG_FLAG_0 is not
2327 OMP_ATOMIC_DEPENDENT_P in OMP_ATOMIC.
2328 * pt.c (tsubst_expr): Assert OMP_ATOMIC_DEPENDENT_P.
2329 * semantics.c (finish_omp_atomic): Revert most of the
2330 2007-02-05 changes, just keep the new representation of
2331 OMP_ATOMIC_DEPENDENT_P OMP_ATOMIC.
2333 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2336 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2339 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2344 * typeck.c (merge_types): Don't lose rvalue references when
2346 * call.c (build_over_call): Don't elide move constructors just
2347 because the copy constructor is trivial (!).
2348 (compare_ics): If comparing cv-qualifiers fails, we can still order
2349 based on binding lvalues vs. rvalues.
2351 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2354 * pt.c (unify_pack_expansion): bring handling of function call
2355 arguments into line with type_unification_real.
2357 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2359 * typeck.c (build_binary_op): Use pedwarn instead of error for
2362 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2365 * parser.c (cp_parser_unary_expression): For &&label call
2366 cp_parser_non_integral_constant_expression and return error_mark_node
2367 if it returned true.
2370 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2371 is neither FUNCTION_TYPE nor METHOD_TYPE.
2373 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2376 * parser.c (cp_parser_nested_name_specifier_opt): Use
2377 TYPE_MAIN_VARIANT (new_scope) as scope if new_scope is an incomplete
2378 typedef of currently open class.
2380 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2383 * error.c (dump_expr): Deal specially with statements.
2385 2007-11-01 Jason Merrill <jason@redhat.com>
2388 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2390 (lookup_template_class): Use it to get the outer template args
2391 for instantiating one.
2394 * pt.c (reduce_template_parm_level): tsubst the parameters
2395 of a template template parm.
2397 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2400 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2402 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2405 * parser.c (cp_parser_postfix_dot_deref_expression): If
2406 POSTFIX_EXPRESSION is type dependent, try to parse it as pseudo dtor
2407 first and if that succeeds and type is SCALAR_TYPE_P, create
2411 * rtti.c (enum_tinfo_kind): Fix TK_TYPE_INFO_TYPE comment.
2412 (typeid_ok_p): Use the same alias set for abi::__type_info_pseudo
2413 as for std::type_info.
2415 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2418 * cxx-pretty-print.c (pp_cxx_typeid_expression,
2419 pp_cxx_delete_expression): Change to static linkage.
2420 * cxx-pretty-print.h: Adjust declarations.
2421 * error.c (dump_expr, case EXPR_PACK_EXPANSION, TYPEID_EXPR,
2422 MEMBER_REF, DOTSTAR_EXPR, DELETE_EXPR, VEC_DELETE_EXPR,
2423 MODOP_EXPR): Forward to pp_expression.
2425 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2428 2007-10-31 Christian Bruel <christian.bruel@st.com>
2429 Mark Mitchell <mark@codesourcery.com>
2432 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2433 if retval is volatile.
2435 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2438 * decl2.c (build_offset_ref_call_from_tree): Call
2439 build_non_dependent_expr on object prior to building ADDR_EXPR from it
2440 if FN is DOTSTAR_EXPR.
2442 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2446 * pt.c (find_parameter_packs_r): Fix typo in comment.
2447 (convert_template_argument): Look at the pattern of a pack
2448 expansion to determine what kind of entity we're converting.
2449 (coerce_template_parameter_pack): When we have coerced a non-type
2450 template parameter pack, substitute into the type of that pack.
2451 (tsubst_pack_expansion): When our substitution of a parameter pack
2452 is a "trivial" substitution of itself, just substitute into the
2453 pack expansion rather than actually expanding.
2455 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2458 * class.c (check_bitfield_decl): Don't set field's type to error_mark_node
2459 for non-integral type bitfields. Return true if bitfield is correct, false
2460 error has been diagnosed.
2461 (check_field_decls): If check_bitfield_decl returned false, call also
2464 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2465 Mark Mitchell <mark@codesourcery.com>
2468 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2469 class member error out and return.
2471 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2473 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2474 to current_function_decl rather than 0.
2477 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2479 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2481 2007-10-27 Jason Merrill <jason@redhat.com>
2484 * call.c (convert_default_arg): Detect recursion.
2486 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2489 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2490 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2492 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2494 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2496 2007-10-26 Jason Merrill <jason@redhat.com>
2499 * pt.c (get_template_info): New fn.
2500 (template_class_depth): Use it.
2501 (push_template_decl_real): Check that the template args of the
2502 definition match the args of the previous declaration.
2504 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2507 * decl2.c (coerce_new_type): Do not allow a default argument for
2508 the first parameter.
2510 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2513 * parser.c (cp_parser_decltype): Return ERROR_MARK_NODE if we
2514 don't see the leading '('. Only lookup names if we get an
2517 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2520 * parser.c (cp_parser_parenthesized_expression_list): Set
2521 greater_than_is_operator_p to true in between the parens.
2523 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2526 * decl.c (grokdeclarator): In case of conflicting specifiers
2527 just return error_mark_node.
2529 2007-10-26 Ollie Wild <aaw@google.com>
2531 * expr.c (cxx_expand_expr): Removed.
2532 * cp-tree.h (exx_expand_expr): Removed.
2533 * cp-objcp-common.h (LANK_HOOKS_EXPAND_EXPR): Replace cxx_expand_expr
2536 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2539 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2541 2007-10-23 Jason Merrill <jason@redhat.com>
2543 PR c++/25950 (DR 391)
2544 * call.c (struct conversion): Remove check_copy_constructor_p.
2545 (reference_binding): Always bind a reference directly to a
2546 compatible class rvalue. Pass down LOOKUP_NO_TEMP_BIND during
2548 (check_constructor_callable): Remove.
2549 (convert_like_real): Don't call it.
2550 (initialize_reference): Don't call check_constructor_callable.
2551 (standard_conversion): Check LOOKUP_NO_CONVERSION instead of
2552 LOOKUP_CONSTRUCTOR_CALLABLE. Don't require a temporary for base
2553 conversions if LOOKUP_NO_TEMP_BIND.
2554 (implicit_conversion): Pass through LOOKUP_NO_TEMP_BIND.
2555 (build_user_type_conversion_1): Pass through LOOKUP_NO_TEMP_BIND for
2557 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2559 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2562 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2563 before checking if its type is integral.
2565 2007-10-22 Jason Merrill <jason@redhat.com>
2568 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2569 * pt.c (apply_late_template_attributes): Splice out dependent
2570 attributes from DECL_ATTRIBUTES.
2572 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2574 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2576 * typeck.c (build_binary_op) : Use appropriate warning option
2577 instead of unnamed warning.
2579 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2582 * pt.c (current_template_args): Do not change TREE_LIST elements
2583 with a TREE_VALUE of error_mark_node.
2585 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2587 * typeck.c (cp_apply_type_quals_to_decl): Expand documentation.
2588 * decl.c (start_decl): Tidy.
2589 (start_decl_1): Call cp_apply_type_quals_to_decl after completing
2591 (grokdeclarator): Clarify comment.
2593 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2596 * decl.c (grokfndecl): Return NULL after the "definition of
2597 implicitly-declared" error happened.
2599 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2602 * call.c (build_user_type_conversion_1): Do not consider conversion
2603 functions to convert a (possibly cv-qualified) object to the (possibly
2604 cv-qualified) same object type (or a reference to it), to a (possibly
2605 cv-qualified) base class of that type (or a reference to it).
2607 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2609 * pt.c (tsubst): Use template_parm_level_and_index.
2611 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2614 * parser.c (cp_parser_compound_statement): Handle label-declarations
2615 at the beginning of the compound statement.
2616 (cp_parser_block_declaration): Issue diagnostics about __label__
2617 not at the beginning of a block.
2619 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2622 * pt.c (coerce_template_parameter_pack): Do not pass error_mark_node
2623 to convert_template_argument.
2624 (coerce_template_parms): Return error_mark_node after fixed-length
2626 (tsubst_decl): Check for error_mark_node the return value of the
2627 first tsubst in 'case VAR_DECL'.
2629 2007-10-08 Ollie Wild <aaw@google.com>
2631 * typeck2.c (digest_init): Call cplus_expand_constant after
2632 convert_for_initialization.
2633 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2634 * expr.c (cplus_expand_constant): Updated function description.
2636 2007-10-04 Jason Merrill <jason@redhat.com>
2639 * call.c (initialize_reference): Handle local static reference
2642 2007-10-03 Jason Merrill <jason@redhat.com>
2645 * name-lookup.c (push_namespace_with_attrs): Fold back into...
2646 (push_namespace): Here.
2647 (handle_namespace_attrs): New fn for the attr code.
2648 (leave_scope): Don't pop_visibility.
2649 * name-lookup.h (struct cp_binding_level): Remove has_visibility.
2650 * parser.c (cp_parser_namespace_definition): Call
2651 handle_namespace_attrs and pop_visibility as appropriate.
2654 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2656 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2658 * decl.c (duplicate_decls): Preserve linkage flags for mere
2659 redeclarations of gnu_inline definitions.
2661 2007-10-03 Jason Merrill <jason@redhat.com>
2664 * decl.c (wrap_cleanups_r): New fn.
2665 (wrap_temporary_cleanups): New fn.
2666 (initialize_local_var): Call it.
2668 2007-09-29 Jason Merrill <jason@redhat.com>
2671 * decl.c (make_rtl_for_nonlocal_decl): It's ok for a member
2672 constant to not have DECL_EXTERNAL if it's file-local.
2674 2007-09-28 Ollie Wild <aaw@google.com>
2677 2007-09-27 Ollie Wild <aaw@google.com>
2679 * typeck2.c (digest_init): Call cplus_expand_constant after
2680 convert_for_initialization.
2681 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2682 * expr.c (cplus_expand_constant): Updated function description.
2684 2007-09-28 Jason Merrill <jason@redhat.com>
2687 * class.c (layout_empty_base): Take rli parameter, update
2688 rli->record_align if empty base has user-specified alignment.
2689 (build_base_field): Pass rli to it.
2691 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2694 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2696 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2699 * error.c (dump_expr): Deal with ARGUMENT_PACK_SELECT.
2700 (dump_type): Use dump_template_argument for TYPE_ARGUMENT_PACK.
2701 (dump_parameters): Just call dump_type for argument packs too.
2703 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2706 * tree.c (cp_build_qualified_type_real): Handle TYPE_PACK_EXPANSION
2707 qualification by creating qualified PACK_EXPANSION_PATTERN and
2708 then calling make_pack_expansion on it.
2710 2007-09-27 Ollie Wild <aaw@google.com>
2712 * typeck2.c (digest_init): Call cplus_expand_constant after
2713 convert_for_initialization.
2714 * cp-objcp-common.h (LANG_HOOKS_EXPAND_CONSTANT): Removed.
2715 * expr.c (cplus_expand_constant): Updated function description.
2717 2007-09-27 Jason Merrill <jason@redhat.com>
2720 * decl2.c (is_late_template_attribute): Don't crash on unknown
2723 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2726 * error.c (dump_expr): Deal with DELETE_EXPR and VEC_DELETE_EXPR.
2727 * cxx-pretty-print.c (pp_cxx_delete_expression): Add missing
2728 spaces in the formatting.
2729 * cxx-pretty-print.h (pp_cxx_delete_expression): Declare.
2731 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2733 * error.c (cxx_print_error_function): Add third argument, pass
2734 it over to lhd_print_error_function.
2735 (cp_print_error_function): If diagnostic->abstract_origin, print
2737 * cp-tree.h (struct diagnostic_info): New forward decl.
2738 (cxx_print_error_function): Add third argument.
2740 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2743 * name-lookup.c (pushtag): Do not create an implicit typedef before
2744 the associated type declaration is known to be valid.
2746 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2748 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2749 rather than pointers.
2751 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2754 * search.c (check_final_overrider): Fail if
2755 targetm.comp_type_attributes returns 0.
2757 2007-09-24 Jason Merrill <jason@redhat.com>
2760 * pt.c (resolve_typename_type): Don't look things up in the original
2761 template if it would mean losing template arguments.
2763 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2766 * cp-tree.h (cxx_type_hash_eq): New prototype.
2767 * cp-objcp-common.h (LANG_HOOKS_TYPE_HASH_EQ): Redefine.
2768 * tree.c (cxx_type_hash_eq): New function.
2770 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2773 * tree.c (cp_build_qualified_type_real): Build a canonical
2774 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2776 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2780 * tree.c (cplus_array_compare): Compare pointers, not types.
2781 (build_cplus_array_type_1): Store new array type into the hash
2782 table before building the canonical type; build the canonical type
2784 (cp_build_qualified_type_real): Put all of the array types with
2785 cv-qualified element types into the C++ array hash table, built as
2786 variants of the unqualified versions.
2788 2007-09-23 Jason Merrill <jason@redhat.com>
2791 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2792 for deprecation warnings.
2794 2007-09-22 Jason Merrill <jason@redhat.com>
2797 * call.c (build_over_call): Warn about deprecated virtuals.
2800 * cp-tree.h (ATTR_IS_DEPENDENT): New macro.
2801 (MAYBE_TAGGED_TYPE_P): Remove.
2802 * pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT
2803 instead of calling is_late_template_attribute again.
2804 (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag.
2805 (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL.
2806 Don't crash on typedefs from non-template classes.
2807 * decl2.c (grokfield): Don't sorry about attrs on template parms.
2808 (is_late_template_attribute): All attributes applied to template
2809 parms or typename types are dependent. Static.
2810 (splice_template_attributes): Pass decl through.
2811 (save_template_attributes): Likewise.
2813 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2816 * pt.c (tsubst_copy) <case SIZEOF_EXPR>: Handle error_mark_node
2817 returned from tsubst_pack_expansion.
2818 (tsubst_copy_and_build) <case SIZEOF_EXPR>: Likewise.
2819 (tsubst_copy_and_build) <case CONSTRUCTOR>: Likewise.
2821 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2824 * semantics.c (finish_id_expression): Use consistently
2825 context_for_name_lookup.
2826 * decl.c (fixup_anonymous_aggr): Fix error message for
2827 anonymous struct (vs union).
2829 2007-09-19 Jason Merrill <jason@redhat.com>
2832 * pt.c (tsubst): Handle typedefs by looking for the specialization.
2833 (retrieve_specialization): Only tagged types use
2834 DECL_TEMPLATE_INSTANTIATIONS.
2835 (instantiate_class_template): Push nested classes too.
2836 (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
2838 * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
2839 * init.c (is_aggr_type): Remove redundant tests.
2840 * class.c (push_nested_class): Use CLASS_TYPE_P.
2842 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2845 * init.c (build_zero_init): If, recursively, build_zero_init
2846 returns a NULL_TREE, do not append it to the VEC of constructors.
2848 2007-09-18 Jason Merrill <jason@redhat.com>
2851 * pt.c (apply_late_template_attributes): Set processing_template_decl.
2852 (tsubst_decl) [TYPE_DECL]: Preserve naming typedef, pass
2853 ATTR_FLAG_TYPE_IN_PLACE.
2854 (tsubst): Do unqualified lookup to find typedefs from current class.
2855 [ARRAY_TYPE]: Propagate alignment info.
2856 * decl2.c (is_late_template_attribute): Only defer handling of
2857 attribute aligned if the expression is dependent.
2858 (save_template_attributes): If we're deferring any attributes,
2859 make this a naming typedef.
2861 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2863 PR c++/33462 (again)
2864 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2865 va_arg instead of __builtin_va_arg.
2867 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2870 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Add.
2871 (pp_cxx_primary_expression): Use it.
2872 * cxx-pretty-print.h (pp_cxx_va_arg_expression): Declare.
2873 * error.c (dump_expr): Use it.
2875 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2878 * cxx-pretty-print.c (pp_cxx_postfix_expression): Split
2879 out case TYPEID_EXPR to...
2880 (pp_cxx_typeid_expression): ... here; use pp_cxx_left_paren
2881 and pp_cxx_right_paren.
2882 * cxx-pretty-print.h (pp_cxx_typeid_expression): Declare.
2883 * error.c (dump_expr): Use it.
2885 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2888 * cxx-pretty-print.c (pp_cxx_trait_expression): Add.
2889 (pp_cxx_primary_expression): Use it.
2890 * cxx-pretty-print.h (pp_cxx_trait_expression): Declare.
2891 * error.c (dump_expr): Use it.
2893 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2896 * init.c (build_new): Remove warning for zero-element
2899 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2902 * call.c (maybe_handle_implicit_object): Set this_p, clear
2903 rvaluedness_matches_p.
2904 (compare_ics): Do not compare rvaluedness matching when one of the
2905 operands is an implicit object.
2907 2007-09-14 Jason Merrill <jason@redhat.com>
2909 PR c++/17743, c++/19163
2910 * decl2.c (is_late_template_attribute): New fn.
2911 (splice_template_attributes, save_template_attributes): New fns.
2912 (cplus_decl_attributes): Call save_template_attributes.
2913 * pt.c (apply_late_template_attributes): New fn.
2914 (instantiate_class_template, tsubst_decl): Use it.
2915 * cp-tree.h: Declare is_late_template_attribute.
2917 2007-09-13 Tom Tromey <tromey@redhat.com>
2919 * parser.c (cp_lexer_new_main): Don't use
2920 c_lex_return_raw_strings.
2921 (cp_lexer_get_preprocessor_token): Update. Add special case when
2924 2007-09-11 Jan Hubicka <jh@suse.cz>
2926 * method.c (use_thunk): Use tree_rest_of_compilation
2927 * cp-objecp-common.h (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2928 (LANG_HOOKS_CALLGRAPH_EMIT_ASSOCIATED_THUNKS): Define.
2929 * cp-tree.h (expand_body): Kill.
2930 (emit_associated_thunks): Declare.
2931 * semantics.c (emit_associated_thunks): Export.
2932 (expand_body): Kill.
2934 2007-09-09 David Daney <ddaney@avtrex.com>
2937 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2938 to calculate cookie_ptr.
2940 2007-09-08 Jason Merrill <jason@redhat.com>
2943 * pt.c (most_specialized_class): Set processing_template_decl
2944 while tsubsting partial spec args.
2946 2007-09-06 Jason Merrill <jason@redhat.com>
2948 * decl2.c (get_guard): Copy visibility from the guarded variable.
2950 2007-09-06 Jan Hubicka <jh@suse.cz>
2952 * semantics.c (expand_body): Do not mark arguments of clones used.
2954 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2957 * decl.c (cp_finish_decl): When processing_template_decl,
2958 deal correctly with init as TREE_LIST.
2960 2007-09-06 Tom Tromey <tromey@redhat.com>
2962 * decl.c (finish_function): Put return's location on line zero of
2965 2007-09-05 Jason Merrill <jason@redhat.com>
2968 * except.c (prepare_eh_type): Use type_decays_to.
2971 * init.c (build_delete): Use build_headof to get the address of the
2972 complete object if we aren't using the deleting destructor.
2973 * rtti.c (build_headof): No longer static.
2974 * cp-tree.h: Declare it.
2976 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2978 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2979 decl if a prototype for XX is provided with throw().
2982 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2983 on __*_chk non-__builtin_* decls.
2985 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2988 * semantics.c (finish_id_expression): Use context_for_name_lookup
2989 insted of DECL_CONTEXT, to see through anonymous structs and unions.
2990 * class.c (finish_struct_anon): Deal correctly with anonymous
2991 structs (vs unions, as GNU extension) in error messages.
2993 2007-09-05 Jan Hubicka <jh@suse.cz>
2995 * sematics.c (expand_body): Remove unnecesary import_export_decl
2996 call, DECL_EXTERNAL checks and current_function_decl saving.
2998 2007-09-05 Paolo Carlini <pcarlini@suse.de>
3000 PR c++/29731 (again)
3001 * parser.c (cp_parser_primary_expression): Return error_mark_node
3002 when a statement-expression is found in a template-argument list.
3004 2007-09-04 Jason Merrill <jason@redhat.com>
3006 * except.c (initialize_handler_parm): Use
3007 fold_build_cleanup_point_expr.
3010 * call.c (reference_binding): Don't look for user-defined conversions
3014 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3015 the MUST_NOT_THROW_EXPR.
3017 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3019 * decl.c (cp_finish_decl): Call determine_visibility before
3020 make_rtl_for_nonlocal_decl.
3022 2007-09-04 Jason Merrill <jason@redhat.com>
3025 * pt.c (most_specialized_class): Substitute outer template
3026 arguments into the arguments of a member template partial
3028 (strip_innermost_template_args): New fn.
3030 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3032 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3034 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3036 * call.c (name_as_c_string): Supply a TYPE for CONST_CAST.
3037 * decl.c (cp_make_fname_decl): Likewise,
3038 * parser.c (cp_parser_string_literal): Likewise,
3039 * tree.c (pod_type_p, zero_init_p): Use CONST_CAST_TREE.
3040 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3043 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3046 * typeck.c (build_unary_op): Fix error message for
3047 Boolean expression as operand to operator--.
3049 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3051 * tree.c (pod_type_p, zero_init_p): Use strip_array_types.
3052 * typeck.c (cp_type_quals, cp_type_readonly, cp_has_mutable_p):
3055 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3058 * init.c (build_default_init): Make extern.
3059 * cp-tree.h (build_default_init): Declare here.
3060 * pt.c (tsubst_expr): When the instantiation of the initializer of
3061 a variable results in an empty list, default-initialize the
3063 (tsubst_copy_and_build): When the instantiation of the initializer
3064 in a new expression results in an empty initializer list,
3065 default-initialize it.
3067 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3069 * mangle.c (write_type): Change mangling of rvalue reference from
3072 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3074 * decl.c (duplicate_decls): Remove duplicated line.
3076 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3079 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3080 BOUND_TEMPLATE_TEMPLATE_PARM.
3082 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3085 * search.c (lookup_member): Check the name argument for
3088 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3091 * parser.c (cp_parser_trait_expr): Check rerurn value of
3094 2007-08-30 Ollie Wild <aaw@google.com>
3096 * cvt.c (cp_convert_to_pointer): Remove force parameter. Call
3097 convert_ptrmem for pointer to member conversions.
3098 (convert_to_pointer_force): Update cp_convert_to_pointer call.
3099 (ocp_convert): Update cp_convert_to_pointer call.
3100 * typeck.c (convert_ptrmem): Add conditional for null pointers to
3102 (build_static_cast_1): Check can_convert for conversions in either
3104 (get_delta_difference_1): New function.
3105 (get_delta_difference): Refactor to call get_delta_difference_1.
3107 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3109 * decl.c (start_preparsed_function): Set
3110 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3112 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3115 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3116 BOUND_TEMPLATE_TEMPLATE_PARM.
3118 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3122 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3123 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3125 2007-08-27 Jason Merrill <jason@redhat.com>
3128 * pt.c (build_non_dependent_expr, type_dependent_expression_p):
3129 Look inside STMT_EXPR.
3130 * semantics.c (stmt_expr_value_expr): New fn.
3131 * cp-tree.h: Declare it.
3134 * decl.c (groktypename): Ignore attributes applied to class type.
3136 2007-08-28 Richard Guenther <rguenther@suse.de>
3138 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3140 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3142 * error.c (dump_expr): Handle COMPLEX_CST.
3143 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3144 (pp_cxx_expression): Likewise.
3146 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3148 * decl.c (GNU_INLINE_P): New.
3149 (duplicate_decls): Handle gnu_inline. Merge attributes and
3150 some flags in overriding definitions.
3151 (redeclaration_error_message): Handle gnu_inline.
3152 (start_preparsed_function): Likewise.
3154 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3156 * call.c (sufficient_parms_p): Constify.
3157 * class.c (same_signature_p): Likewise.
3158 * cp-gimplify.c (is_invisiref_parm,
3159 cxx_omp_privatize_by_reference): Likewise.
3160 * cp-objcp-common.c (has_c_linkage): Likewise.
3161 * cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
3162 sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
3163 grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
3164 num_artificial_parms_for, comp_template_parms,
3165 template_parameter_pack_p, any_dependent_template_arguments_p,
3166 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3167 repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
3168 zero_init_p, member_p, cp_lvalue_kind,
3169 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3170 varargs_function_p, is_dummy_object, special_function_kind,
3171 string_conv_p, type_unknown_p, comp_except_specs, compparms,
3172 comp_cv_qualification, is_bitfield_expr_with_lowered_type,
3173 unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
3174 cp_has_mutable_p, at_least_as_qualified_p,
3175 invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
3176 * decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
3177 * except.c (nothrow_libfn_p): Likewise.
3178 * method.c (skip_artificial_parms_for, num_artificial_parms_for):
3180 * pt.c (comp_template_parms, template_parameter_pack_p,
3181 any_type_dependent_arguments_p, any_value_dependent_elements_p,
3182 any_dependent_template_arguments_p): Likewise.
3183 * repo.c (repo_export_class_p): Likewise.
3184 * semantics.c (anon_aggr_type_p): Likewise.
3185 * tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
3186 builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
3187 varargs_function_p, member_p, is_dummy_object, pod_type_p,
3188 zero_init_p, special_function_p): Likewise.
3189 * typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
3190 comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
3191 compparms, invalid_nonstatic_memfn_p,
3192 is_bitfield_expr_with_lowered_type, unlowered_expr_type,
3193 string_conv_p, ptr_reasonably_similar, cp_type_readonly,
3194 cp_has_mutable_p, lvalue_or_else): Likewise.
3196 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3198 * decl.c (cp_tree_node_structure): Kill TINST_LEVEL case.
3199 * cp-objcp-common.c (cp_tree_size): Ditto.
3200 * tree.c (cp_walk_subtrees): Ditto
3201 * cp-tree.def (TINST_LEVEL): Go away.
3202 * cp-tree.h (struct tinst_level_s): Rename to struct tinst_level,
3203 move together with other non-tree structs.
3204 (enum cp_tree_node_structure_enum): Nuke TS_CP_TINST_LEVEL.
3205 (union lang_tree_node): Eliminate tinst_level field.
3206 (TINST_DECL, TINST_LOCATION, TINST_IN_SYSTEM_HEADER_P): Annihilate.
3207 (current_instantiation, outermost_tinst_level): Return
3208 a "struct tinst_level *".
3210 * error.c (print_instantiation_partial_context): Change second
3211 parameter to a "struct tinst_level *". Replace accessor macros
3213 (print_instantiation_full_context): Likewise.
3214 * lex.c (in_main_input_context): Likewise.
3216 * pt.c (struct pending_templates): New.
3217 (pending_templates, last_pending_template): Use it as a type.
3218 (current_tinst_level): Change typo to "struct tinst_level *"
3219 (reopen_tinst_level): Accept "struct tinst_level *", return decl.
3220 (add_pending_template): Construct a "struct pending_template".
3221 Replace TINST_LEVEL accessor macros with field access.
3222 (push_tinst_level): Likewise, using GGC_NEW instead of make_node.
3223 (pop_tinst_level): Likewise.
3224 (instantiate_pending_templates): Likewise. Factor common code used
3225 when an instantiation has been done.
3226 (outermost_tinst_level): Replace tree_last with loop.
3227 (current_instantiation): Return a "struct tinst_level *".
3229 2007-08-24 Ollie Wild <aaw@google.com>
3231 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3232 * name-lookup.h (cp_binding_level): Remove vtables member.
3234 2007-08-24 Richard Guenther <rguenther@suse.de>
3236 * tree.c (cp_cannot_inline_tree_fn): Remove.
3237 * cp-tree.h (cp_cannot_inline_tree_fn): Likewise.
3238 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN):
3241 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3244 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3245 error_mark_node right away if build_expr_type_conversion
3249 * name-lookup.c (set_decl_namespace): lookup_qualified_name failure
3250 is error_mark_node rather than NULL_TREE.
3251 * pt.c (check_explicit_specialization): Likewise.
3254 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3255 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3257 2007-08-22 Jason Merrill <jason@redhat.com>
3260 * pt.c (outermost_tinst_level): New function.
3261 * lex.c (in_main_input_context): New function.
3262 * cp-tree.h: Declare it.
3263 * decl2.c (constrain_class_visibility): Use it to avoid warning
3264 about uses of the anonymous namespace in the main input file.
3266 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3268 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3270 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3273 * class.c (finish_struct_1): Warn when a class has virtual
3274 functions and accessible non-virtual destructor.
3276 2007-08-20 Richard Guenther <rguenther@suse.de>
3280 * call.c (build_new_method_call): Convert initializer to
3282 * init.c (build_aggr_init): Do not fiddle with types.
3283 (build_vec_delete_1): Use correct type for POINTER_PLUS_EXPR.
3284 * except.c (build_throw): Do not drop qualifiers for the
3286 * typeck.c (get_member_function_from_ptrfunc): Do not
3287 fiddle with types, instead convert.
3288 (build_ptrmemfunc1): Convert to the target type for
3290 (gfc_trans_allocate): Convert result to target type.
3291 * cp-objcp-common.c (cxx_get_alias_set): Pointers to
3292 pointer-to-member structures shall have alias set zero as well.
3294 2007-08-20 Richard Guenther <rguenther@suse.de>
3296 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3298 * cp-tree.h (cp_auto_var_in_fn_p): Remove.
3299 (nonstatic_local_decl_p): Likewise.
3300 * tree.c (cp_auto_var_in_fn_p): Remove.
3301 * decl.c (nonstatic_local_decl_p): Remove.
3303 2007-08-20 Richard Guenther <rguenther@suse.de>
3305 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3307 * tree.h (cp_walk_tree): New define to walk_tree_1 with
3308 cp_walk_subtrees lh parameter.
3309 (cp_walk_tree_without_duplicates): New define to
3310 walk_tree_without_duplicates_1 with cp_walk_subtrees lh parameter.
3311 * tree.c (count_trees): Call
3312 cp_walk_tree_without_duplicates.
3313 (verify_stmt_tree): Call cp_walk_tree.
3314 (break_out_target_exprs): Likewise.
3315 (WALK_SUBTREE): Likewise.
3316 * cp-gimplify.c (cp_genericize): Likewise.
3317 * cp-pt.c (find_parameter_packs_r): Likewise.
3318 (uses_parameter_packs): Likewise.
3319 (make_pack_expansion): Likewise.
3320 (check_for_bare_parameter_packs): Likewise.
3321 (for_each_template_parm): Likewise.
3322 * decl.c (check_default_argument): Call
3323 cp_walk_tree_without_duplicates.
3324 * except.c (build_throw): Likewise.
3325 * decl2.c (type_visibility): Likewise.
3326 * semantics.c (expand_or_defer_fn): Likewise.
3327 (finalize_nrv): Call cp_walk_tree.
3329 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3332 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3333 Initialize it with save_expr rather than get_temp_regvar.
3335 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3338 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3341 2007-08-17 Ollie Wild <aaw@google.com>
3344 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3345 declarations into appropriate slots for comparison. Fix type
3348 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3351 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3352 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3354 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3357 * parser.c (cp_parser_class_head): Improve error message.
3359 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3361 * pt.c (instantiate_decl): Set input_location
3362 for the function end.
3364 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3366 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3368 * cp-tree.h (local_variable_p, nonstatic_local_decl_p,
3369 class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
3370 cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
3371 cxx_warn_unused_global_decl, cp_expr_size): Likewise.
3372 * decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
3373 * tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
3374 * typeck.c (cp_type_quals): Likewise.
3375 * typeck2.c (cxx_incomplete_type_diagnostic,
3376 cxx_incomplete_type_error): Likewise.
3378 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3381 * pt.c (tsubst_friend_function): When check_classfn
3382 returns error_mark_node likewise return it.
3384 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3387 * typeck.c (check_return_expr): Don't NRV optimize vars in
3389 * decl.c (finish_function): Comment fix.
3391 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3394 * pt.c (push_template_decl_real): Depending on TYPE_P
3395 use either TYPE_CONTEXT or DECL_CONTEXT.
3397 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3399 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3400 constructors and destructors return this.
3402 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3405 * decl2.c (check_classfn): Return error_mark_node in case of error;
3406 in that case, do not call add_method.
3407 * decl.c (start_decl): Deal with check_classfn returning
3409 (grokfndecl): Likewise.
3410 * pt.c (tsubst_friend_function): Likewise.
3412 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3415 * typeck.c (build_binary_op): Disallow vector float types with
3416 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3418 2007-08-11 Ian Lance Taylor <iant@google.com>
3420 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3422 * cp-tree.h (cxx_get_alias_set): Update declaration.
3424 2007-08-10 Ollie Wild <aaw@google.com>
3426 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3428 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3430 (unqualified_namespace_lookup): Fix ambiguous_decl call.
3431 (lookup_using_namespace): Fix ambiguous_decl call.
3432 (qualified_lookup_using_namespace): Fix ambiguous_decl call.
3434 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3436 * call.c (name_as_c_string): Use CONST_CAST.
3437 * decl.c (build_decl): Likewise.
3438 * parser.c (cp_parser_string_literal): Likewise.
3440 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3443 * error.c (dump_expr): Consistently use the *_cxx_*
3444 variants of the pretty-print functions.
3446 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3449 * decl.c (check_special_function_return_type): Just error
3450 on return type specified for conversion operator.
3452 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3454 * typeck2.c (readonly_error): Handle general expressions.
3455 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3457 2007-08-06 Dan Hipschman <dsh@google.com>
3459 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3460 access function name.
3462 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3465 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3466 * g++spec.c (lang_specific_driver): Check them.
3468 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3471 * pt.c (inline_needs_template_parms): Fix comment; change return type
3474 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3477 2007-03-26 Dirk Mueller <dmueller@suse.de>
3479 * parser.c (cp_parser_member_declaration): Pedwarn
3480 about stray semicolons after member declarations.
3482 2007-08-02 Lee Millward <lee.millward@gmail.com>
3487 * parser.c (cp_parser_asm_definition): Detect and discard asm
3488 statements with invalid inputs or outputs.
3489 (cp_parser_asm_operand_list): Return error mark node if any
3490 of the operands are invalid. Adjust documentation.
3492 2007-08-02 Nick Clifton <nickc@redhat.com>
3494 * typeck.c: Change copyright header to refer to version 3 of the
3495 GNU General Public License and to point readers at the COPYING3
3496 file and the FSF's license web page.
3497 * optimize.c, lang-specs.h, init.c, class.c, repo.c, decl.c,
3498 config-lang.in, cp-tree.def, call.c, decl.h, ptree.c,
3499 Make-lang.in, method.c, rtti.c, cp-objcp-common.c, g++spec.c,
3500 cp-objcp-common.h, except.c, error.c, operators.def, cvt.c,
3501 tree.c, mangle.c, cp-tree.h, dump.c, search.c, friend.c, expr.c,
3502 cp-gimplify.c, cxx-pretty-print.c, cp-lang.c, typeck2.c, pt.c,
3503 cxx-pretty-print.h, semantics.c, name-lookup.c, lex.c, decl2.c,
3504 name-lookup.h, parser.c: Likewise.
3506 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3509 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3511 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3514 * semantics.c (finish_label_stmt): Reject the __label__
3515 extension outside function scopes.
3517 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3519 * parser.c (eof_token): Un-constify.
3520 (cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
3521 cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
3524 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3526 * pt.c, tree.c, typeck2.c: Fix comment typos.
3528 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3529 Mark Mitchell <mark@codesourcery.com>
3532 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3533 hidden due to friend declarations in local classes.
3535 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3537 * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
3538 * cp-tree.def (DECLTYPE_TYPE): New.
3539 * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
3540 (dump_type_prefix): Ditto.
3541 (dump_type_suffix): Ditto.
3542 * tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
3543 * mangle.c (write_type): Handle DECLTYPE_TYPE.
3544 * cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
3546 (DECLTYPE_TYPE_EXPR): New.
3547 (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
3548 (finish_declared_type): Declare.
3549 * cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
3550 DECLTYPE_TYPE nodes.
3551 (pp_cxx_type_id): Ditto.
3552 * pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
3553 (tsubst): Substitute into a DECLTYPE_TYPE node.
3554 (tsubst_copy): Ditto.
3555 (unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
3557 (dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
3558 * semantics.c (finish_typeof): TYPEOF_TYPE types need to use
3559 structural equality (because we can't hash the expressions).
3560 (finish_declared_type): New.
3561 * lex.c (reswords): Add "decltype" keyword.
3562 * parser.c cp_lexer_next_token_is_decl_specifier_keyword
3563 (cp_parser_postfix_expression): Add member_access_only_p to
3564 restrict postfix expression to member access expressions.
3565 (cp_parser_unary_expression): Update call to
3566 cp_parser_postfix_expression to reflect new parameter.
3567 (cp_parser_declared_type): New.
3568 (cp_parser_simple_type_specifier): Parse decltype types.
3570 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3573 * call.c (convert_for_arg_passing): Only widen bitfields to their
3574 declared types if necessary.
3576 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3578 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3581 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3583 * decl.c (typename_hash, typename_compare): Constify.
3584 * mangle.c (hash_type, compare_type): Likewise.
3585 * pt.c (eq_local_specializations, hash_local_specialization):
3587 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3588 list_hash): Likewise.
3589 * typeck2.c (pat_compare): Likewise.
3591 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3593 * method.c (implicitly_declare_fn): Increase alignment if member
3594 function pointer format requires it.
3596 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3599 * typeck.c (check_return_expr): Do not pass a null argument
3602 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3605 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3608 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3611 * typeck.c (convert_arguments): Only use default args if we have
3615 * typeck.c (structural_comptypes): No need to check
3616 resolve_typename_type return value here.
3617 * cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
3618 * pt.c (resolve_typename_type): Follow typename typedefs. Return
3619 original type rather than error_mark_node in case of failure.
3620 * parser.c (cp_parser_nested_name_specifier_opt): Adjust
3621 resolve_typename_type result check.
3622 (cp_parser_direct_declarator, cp_parser_head,
3623 cp_parser_constructor_declarator_p): Likewise.
3625 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3627 * pt.c (template_parms_variadic_p): Remove.
3628 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3630 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3633 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3634 argument to dump_aggr_init_expr_args instead of false.
3636 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3638 * typeck.c (comptypes): When USE_CANONICAL_TYPES, use the
3639 canonical types; otherwise, fall back to structural type
3640 comparisons. If ENABLE_CHECKING and USE_CANONICAL_TYPES, give an
3641 internal compiler error if the canonical types are wrong.
3643 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3646 * parser.c (cp_parser_make_indirect_declarator): When the
3647 the code argument is ERROR_MARK return cp_error_declarator.
3649 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3652 * decl.c (cxx_init_decl_processing): Don't set
3653 force_align_functions_log.
3654 (grokfndecl): Honour ptrmemfunc_vbit_in_pfn.
3655 * typeck.c (cxx_alignof_expr): When alignof is used on a plain
3656 FUNCTION_DECL, return its alignment.
3658 2007-07-09 Richard Guenther <rguenther@suse.de>
3660 * decl.c (start_preparsed_function): Do not promote return type.
3662 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3665 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3667 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3670 * pt.c (resolve_overloaded_unification): Robustify. Return a
3672 (type_unification_real): Adjust accordingly.
3674 2007-07-06 Richard Guenther <rguenther@suse.de>
3676 * init.c (build_new_1): Use the correct pointer type.
3677 * typeck2.c (build_m_component_ref): Likewise.
3679 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3682 * init.c (build_zero_init): Always build an initializer for
3684 * typeck2.c (build_functional_cast): Use build_zero_init.
3687 * init.c (build_new_1): Always pass the allocation function to
3688 build_op_delete_call.
3689 * call.c (build_op_delete_call): Handle operator delete with a
3690 variable-argument list. Do not issue an error when no matching
3691 deallocation function is available for a new operator.
3694 * cp-tree.h (any_value_dependent_elements_p): Declare it.
3695 * decl.c (value_dependent_init_p): New function.
3696 (cp_finish_decl): Use it.
3697 * pt.c (value_dependent_expression_p): Use
3698 any_value_dependent_elements_p.
3699 * parser.c (cp_parser_primary_expression): Add comment about
3700 treating dependent qualified names as integral
3701 constant-expressions.
3703 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3705 * decl.c (build_ptrmemfunc_type): Always use structural equality
3706 tests when comparing pointer-to-member-function types, because the
3707 handling of TYPE_GET_PTRMEMFUNC_TYPE currently defeats canonical
3710 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3712 * init.c (build_new): Tweak comment.
3714 2007-06-29 Dave Brolley <brolley@redhat.com>
3717 * parser.c (cp_parser_new_type_id): Don't reduce a named array
3718 type to its base type and number of elements here.
3719 * init.c (build_new): Call complete_type_or_else to ensure that the
3720 type is complete and to issue a diagnostic if it is not.
3721 (build_new_1): Don't call complete_type_or_else here.
3723 2007-07-03 Richard Guenther <rguenther@suse.de>
3726 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3729 2007-07-02 Simon Baldwin <simonb@google.com>
3731 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3732 for inner-style nested forward declarations that don't declare
3735 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3738 * semantics.c (finish_omp_clauses): Use %qD instead of %qE for
3739 DECL_P in not a variable and appears more than once error messages.
3741 2007-07-01 Ollie Wild <aaw@google.com>
3743 * name-lookup.c (ambiguous_decl): Fix case when new->value is hidden.
3744 (select_decl): Remove function.
3745 (unqualified_namespace_lookup): Populate binding by calling
3746 ambiguous_decl. Remove select_decl call.
3747 (lookup_qualified_name): Remove select_decl call.
3748 * decl.c (lookup_and_check_tag): Check for ambiguous references.
3749 * parser.c (cp_parser_elaborated_type_specifier): Skip redundant error
3750 generation when name lookup is ambiguous.
3752 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3755 * init.c (build_new_1): Use structural equality on the copy of the
3758 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3760 * decl2.c (determine_visibility): Implement
3761 flag_visibility_ms_compat effect on type info.
3762 * decl.c (cxx_init_decl_processing): Implement
3763 global effect of flag_visibility_ms_compat.
3765 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3767 * decl2.c (start_objects): Mark constructor-running function
3770 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3773 * decl.c (grokdeclarator): Reset friendp for member functions declared
3774 friend of their own class.
3776 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3778 * decl2.c (determine_visibility): Don't look for dllexport here.
3779 (determine_visibility_from_class): Tidy.
3781 2007-06-18 Simon Baldwin <simonb@google.com>
3784 * parser.c (cp_parser_single_declaration): Added check for storage
3785 class other than sc_none in parsed declaration, and a flag to indicate
3786 if the call is part of an explicit template specialization parse.
3787 * (cp_parser_explicit_specialization): Specialization check flag added
3788 to call to cp_parser_single_declaration(), set true.
3789 * (cp_parser_template_declaration_after_export): Specialization check
3790 flag added to call to cp_parser_single_declaration(), set false.
3791 * pt.c (check_explicit_specialization): Added code to copy visiblity
3792 and linkage from the templated function to the explicit specialization.
3794 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3796 * typeck.c (build_binary_op): For templates build the
3797 expression in pieces to avoid the assert in build2_stat.
3798 (get_member_function_from_ptrfunc):
3799 Change over to using POINTER_PLUS_EXPR and convert
3800 the second operand to sizetype.
3801 * typeck2.c (build_m_component_ref): Likewise.
3802 * init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
3803 instead of PLUS_EXPR for pointers.
3804 (build_new_1): Likewise.
3805 (build_vec_delete_1): Likewise.
3806 (build_vec_delete): Likewise.
3807 * class.c (build_base_path): Likewise.
3808 (build_base_path): Likewise.
3809 (convert_to_base_statically): Likewise.
3810 (fixed_type_or_null): Handle POINTER_PLUS_EXPR.
3811 (get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
3812 instead of PLUS_EXPR.
3813 (dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
3814 instead of PLUS_EXPR for pointers.
3815 * call.c (build_special_member_call): Likewise.
3816 * rtti.c (build_headof): Likewise.
3817 Use sizetype instead of ptrdiff_type_node.
3818 (tinfo_base_init): Create a POINTER_PLUS_EXPR
3819 instead of PLUS_EXPR for pointers.
3820 * except.c (expand_start_catch_block): Do a
3821 NEGATIVE and then a POINTER_PLUS_EXPR instead
3823 * cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
3824 PLUS_EXPR on pointer types over to use
3825 POINTER_PLUS_EXPR and remove the conversion
3826 to the pointer types.
3827 * method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
3828 adding to a pointer type. Use size_int instead of
3829 ssize_int. Convert the index to sizetype before
3830 adding it to the pointer.
3832 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3834 * cp-tree.h (DECL_VAR_MARKED_P): Remove.
3835 (DECL_ANON_UNION_VAR_P): New macro.
3836 * class.c (fixed_type_or_null): Tidy. Use a hash table, rather
3837 than DECL_VAR_MARKED_P, to keep track of which variables we have
3839 * decl.c (redeclaration_error_message): Complain about redeclaring
3840 anonymous union members at namespace scope.
3841 * decl2.c (build_anon_union_vars): Set DECL_ANON_UNION_VAR_P.
3843 2007-06-14 Geoff Keating <geoffk@apple.com>
3845 * decl2.c (determine_visibility): Ensure that functions with
3846 hidden types as parameters are hidden.
3849 * decl2.c (determine_visibility): Remove duplicate code for
3852 2007-06-12 Ian Lance Taylor <iant@google.com>
3855 * init.c (avoid_placement_new_aliasing): New static function.
3856 (build_new_1): Call it.
3858 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3860 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3861 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3863 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3866 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3867 on init, the non-decl cond operand and increment value.
3869 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3872 * decl.c (check_initializer): Report an error when a brace enclosed
3873 initializer is used for a non-aggregate type in C++98.
3874 (redeclaration_error_message): Rewrote flag_cpp0x in terms of
3876 (grokdeclarator): Likewise.
3877 (move_fn_p): Likewise.
3878 * typeck.c (check_return_expr): Likewise.
3879 * call.c (reference_binding): Likewise.
3880 * error.c (cp_cpp_error): Likewise.
3881 * pt.c (check_default_tmpl_args): Likewise.
3883 * lex.c (init_reswords): Likewise.
3884 * parser.c (p_parser_primary_expression): Likewise.
3885 (TOKEN_PRECEDENCE): Likewise.
3886 (cp_parser_init_declarator): Likewise.
3887 (cp_parser_ptr_operator): Likewise.
3888 (cp_parser_parameter_declaration): Likewise.
3889 (cp_parser_enclosed_template_argument_list): Likewise.
3890 (cp_parser_skip_to_end_of_template_parameter_list): Likewise.
3891 (cp_parser_next_token_ends_template_argument_p): Likewise.
3893 2007-06-04 Simon Baldwin <simonb@google.com>
3895 * decl.c (grokdeclarator): Readability change. Moved case labels
3896 into direct switch statement scope.
3898 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3900 * call.c (convert_like_real): Remove pointless code.
3902 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3904 * decl.c (get_atexit_fn_ptr_type): New function.
3905 (get_atexit_node): Use it.
3906 (start_cleanup_fn): Likewise.
3907 (register_dtor_fn): Use the object's destructor, instead of a
3908 separate cleanup function, where possible.
3909 * cp-tree.h (CPTI_ATEXIT_FN_PTR_TYPE): New enumerator.
3910 (atexit_fn_ptr_type_node): New macro.
3911 * decl2.c (build_cleanup): Use build_address.
3913 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3915 * typeck.c (build_binary_op): Include types in error.
3917 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3920 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3921 needs runtime initialization.
3923 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3926 * semantics.c (finish_trait_expr): Complete the types.
3928 2007-05-30 Russell Yanofsky <russ@yanofsky.org>
3929 Douglas Gregor <doug.gregor@gmail.com>
3930 Pedro Lamarao <pedro.lamarao@mndfck.org>
3931 Howard Hinnant <howard.hinnant@gmail.com>
3935 * typeck.c (comptypes): Don't consider rvalue and lvalue
3936 reference types to be equivalent.
3937 (check_return_expr): Move from certain lvalues when returning
3939 * decl.c (grokdeclarator): Implement reference collapsing.
3940 (copy_fn_p): Don't consider constructors taking rvalue references
3941 to be copy constructors.
3943 * call.c (conversion): New "rvaluedness_matches_p" member.
3944 (convert_class_to_reference): Require reference type as first
3945 parameter instead of base type.
3946 (reference_binding): Add logic to handle rvalue references.
3947 (implicit_conversion): Update inaccurate comment.
3948 (convert_like_real): Disable creation of temporaries that are
3949 impossible to initialize for types with move constructors.
3950 (build_over_call): Elide move constructors when possible.
3951 (maybe_handle_implicit_object): Set "rvaluedness_matches_p".
3952 (maybe_handle_ref_bind): Return conversion instead of type node.
3953 (compare_ics): Add logic to use "rvaluedness_matches_p" values to
3954 determine preferred conversion sequences.
3955 * cp-tree.h (TYPE_REF_IS_RVALUE): New.
3956 (LOOKUP_PREFER_RVALUE): New.
3957 (DECL_MOVE_CONSTRUCTOR_P): New.
3958 (struct cp_declarator): Add "reference" member for reference
3959 types, with new "rvalue_ref" flag.
3960 (cp_build_reference_type): Declare.
3961 (move_fn_p): Declare.
3962 * error.c (dump_type_prefix): Format rvalue reference types
3963 correctly in error messages.
3964 * except.c (build_throw): Move from certain lvalues when
3966 * mangle.c (write_type): Mangle rvalue references differently
3967 than regular references.
3968 * parser.c (make_reference_declarator): Add boolean parameter for
3970 (cp_parser_make_indirect_declarator): New.
3971 (cp_parser_new_declarator_opt): Call
3972 cp_parser_make_indirect_declarator.
3973 (cp_parser_conversion_declarator_opt): Ditto.
3974 (cp_parser_declarator): Ditto.
3975 (cp_parser_ptr_operator): Parse "&&" tokens into rvalue reference
3977 * pt.c (tsubst): Implement reference collapsing.
3978 (maybe_adjust_types_for_deduction): Implement special template
3979 parameter deduction rule for rvalue references.
3980 (type_unification_real): Update calls to
3981 maybe_adjust_types_for_deduction.
3982 (try_one_overload): Ditto.
3983 (unify_pack_expansion): Ditto.
3984 * tree.c (lvalue_p_1): Handle rvalue reference types.
3985 (cp_build_reference_type): New.
3987 2007-05-30 Jakub Jelinek <jakub@redhat.com>
3990 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3991 variables that need runtime initialization.
3993 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
3996 * typeck.c (build_unary_op <case PREINCREMENT_EXPR,
3997 case POSTINCREMENT_EXPR, case PREDECREMENT_EXPR,
3998 case POSTDECREMENT_EXPR>): Return the error_mark_node
3999 if either the real or imaginary parts would an
4002 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4003 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4006 * parser.c (cp_parser_skip_to_closing_brace): Return true if the next
4007 token is a closing brace, false if there are no tokens left.
4008 (cp_parser_namespace_alias_definition): Only consume the next token if
4009 it is a closing brace.
4011 * parser.c (cp_parser_class_specifier): Likewise.
4013 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4015 * semantics.c (finish_member_declaration): Fix a typo in the
4018 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4030 * error.c (dump_type): Dump TYPE_ARGUMENT_PACK nodes.
4031 * cp-tree.h (check_for_bare_parameter_packs): Returns bool.
4032 * pt.c (check_for_bare_parameter_packs): Return bool indicated
4033 whether everything was okay. Fix indentation.
4034 (push_template_decl_real): Check for bare parameter packs in
4035 function parameters; where errors occur, mark the parameter types
4036 with ERROR_MARK_NODEs to avert ICEs.
4037 (coerce_template_parameter_pack): New.
4038 (coerce_template_parms): Moved parameter pack coercion into
4039 coerce_template_parameter_pack, and permit it anywhere in the
4040 template parameter list (not just at the end). Parameter and
4041 argument indices can vary (somewhat) separately now, so add
4042 PARM_IDX and ARG_IDX.
4043 (fn_type_unification): Don't set an argument pack as incomplete if
4044 no argument pack was deduced.
4045 (type_unification_real): If a type parameter is a parameter pack
4046 and has not otherwise been deduced, it will be deduced to an empty
4048 (more_specialized_fn): Use the actual lengths of the argument
4049 lists when comparing against expansions.
4050 * semantics.c (finish_member_declaration): If a field's type has
4051 bare parameter packs, error and set its type to ERROR_MARK_NODE.
4053 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4056 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4058 2007-05-22 Ollie Wild <aaw@google.com>
4060 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4061 (unqualified_namespace_lookup): Adds check for hidden types.
4063 2007-05-22 Ollie Wild <aaw@google.com>
4065 * decl.c (duplicate_decls): Verify namespace names are unique.
4067 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4069 * decl.c (cxx_maybe_build_cleanup): Handle
4070 __attribute__((cleanup)).
4072 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4074 * cvt.c (cp_convert_and_check): Don't check warnings if the
4077 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4079 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4081 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4084 * rtti.c (get_tinfo_decl_dynamic, get_typeid): Try to complete the
4085 type only if is a class type (5.2.8/4).
4087 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4089 * cp-objcp-common.h (LANG_HOOKS_UNSIGNED_TYPE): Remove.
4090 * decl.c (grokdeclarator): Use unsigned_type_for instead of
4091 c_common_unsigned_type.
4093 2007-05-11 Silvius Rus <rus@google.com>
4095 * typeck.c (build_indirect_ref): Add call to
4096 strict_aliasing_warning.
4097 (build_reinterpret_cast_1): Condition call to
4098 strict_aliasing_warning.
4100 2007-05-11 Jan Hubicka <jh@suse.cz>
4102 * semantics.c (expand_or_defer_fn): Do not call c_record_cdtor_fn.
4103 * decl2.c (start_objects): ctors and dtors are no longer public.
4104 (cp_write_global_declarations): Do not call c_build_cdtor_fns.
4106 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4108 * typeck.c (build_unary_op): Remove code that used to
4109 handle non lvalue increments/decrements.
4111 2007-05-07 Mike Stump <mrs@apple.com>
4113 * parser.c (check_empty_body): Add.
4114 (cp_parser_iteration_statement): Add call to check_empty_body.
4116 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4119 * mangle.c (write_mangled_name): Mangle static variable names.
4120 (write_unqualified_name): Use local-source-name for
4121 namespace-scope static variables.
4123 2007-05-04 Dirk Mueller <dmueller@suse.de>
4125 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4128 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4131 * decl2.c (constrain_class_visibility):
4132 Use strip_pointer_or_array_types instead of strip_array_types.
4134 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4137 * decl.c (reshape_init_r): Don't reshape the first element if it
4138 is a pointer to member function.
4140 2007-04-27 Simon Baldwin <simonb@google.com>
4142 * decl.c (grokparms): Changed message format from %qD to %qE.
4144 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4146 * error.c (maybe_warn_variadic_templates): Variadic templates are
4147 now in C++0x, so only warn about them in C++98 mode.
4149 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4152 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4153 integeral types from vectors types.
4155 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4158 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4159 for type dependent OMP_CLAUSE_DECLs.
4161 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4164 * cp-tree.h (ARITHMETIC_TYPE): Include COMPLEX_TYPE.
4165 * typeck.c (type_after_usual_arithmetic_conversions): Adjust, as
4166 COMPLEX_TYPE is now an ARITHMETIC_TYPE.
4167 * init.c (build_zero_init): Adjust, as
4168 COMPLEX_TYPE is now a SCALAR_TYPE.
4169 * typeck2.c (digest_init): Allow brace-enclosed initializers for
4170 COMPLEX_TYPE, even though that is now a SCALAR_TYPE.
4172 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4174 * semantics.c (classtype_has_nothrow_copy_or_assign_p): Adjust
4175 per N2255; rename as classtype_has_nothrow_assign_or_copy_p.
4176 (trait_expr_value): Adjust.
4178 2007-04-23 Simon Baldwin <simonb@google.com>
4180 * decl.c (grokparms): Added new error for duplicate function
4181 parameters names in function prototypes, to match gcc behavior.
4183 2007-04-23 Jan Hubicka <jh@suse.cz>
4185 * decl2.c (finish_objects): Do not call target constructor/destructor
4188 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4190 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4191 instead of checking GIMPLE_STMT_P in chain_next.
4193 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4196 * call.c (convert_for_arg_passing): Convert bitfields to their
4199 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4202 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4204 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4207 * decl2.c (constrain_class_visibility):
4208 Do not warn about the use of anonymous namespace in the main input file.
4210 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4212 * cp-tree.h (current_template_parms): Fix typo in comment.
4214 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4216 * cp-tree.h, error.c: Fix comment typos.
4218 2007-04-13 Jason Merrill <jason@redhat.com>
4221 * call.c (reference_binding): Add c_cast_p parm. If true,
4222 add quals to TO as needed to make it reference-compatible.
4224 2007-04-11 Jan Hubicka <jh@suse.cz>
4226 * class.c (convert_to_base_statically): Fold produced tree; verify
4227 that we are not processing template_decl.
4229 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4232 * class.c (build_base_path): Ensure that the converted pointer has
4233 the same cv-qualification as the input.
4235 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4237 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4239 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4241 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4243 (LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P): Do not set it.
4244 * tree.c (cp_add_pending_fn_decls): Remove.
4245 * cp-tree.h (cp_add_pending_fn_decls): Remove prototype.
4247 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4249 Revert change removing staticp.
4251 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4253 * cp-objcp-common.c (cxx_staticp): Remove.
4254 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4255 * cp-tree.h (cxx_staticp):
4257 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4259 * class.c (check_for_override): Don't remove dllmport attribute
4262 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4265 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4266 type issue error and return early.
4268 2007-03-30 Jason Merrill <jason@redhat.com>
4271 * typeck.c (cp_type_readonly): New fn.
4272 * cp-tree.h: Declare it.
4273 * decl.c (start_decl): Set implicit DECL_THIS_STATIC here.
4274 (cp_finish_decl): Not here.
4276 2007-03-31 Richard Guenther <rguenther@suse.de>
4278 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4281 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4286 * parser.c (declarator_can_be_parameter_pack): New.
4287 (cp_parser_template_parameter): Only parse the `...' if the
4288 declarator can be a parameter pack.
4289 (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
4291 * pt.c (find_parameter_packs_r): Look into the bounds on integer
4292 types (they could be used as array bounds).
4293 (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
4294 (tsubst_pack_expansion): Handle failure to expand parameter
4297 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4300 * cp-tree.h (enum cp_trait_kind, struct tree_trait_expr,
4301 TRAIT_EXPR_TYPE1, TRAIT_EXPR_TYPE2, TRAIT_EXPR_KIND): Add.
4302 (enum cp_tree_node_structure_enum, union lang_tree_node): Update.
4303 (CLASS_TYPE_NON_UNION_P): Add.
4304 (struct lang_type_class): Add has_complex_dflt.
4305 (TYPE_HAS_COMPLEX_DFLT, TYPE_HAS_TRIVIAL_DFLT): Add.
4306 (locate_copy, locate_ctor, locate_dtor, finish_trait_expr): Declare.
4307 * cp-tree.def: Add TRAIT_EXPR.
4308 * cp-objcp-common.c (cp_tree_size): Add TRAIT_EXPR case.
4309 * lex.c (struct resword): Add __has_nothrow_assign,
4310 __has_nothrow_constructor, __has_nothrow_copy, __has_trivial_assign,
4311 __has_trivial_constructor, __has_trivial_copy,
4312 __has_trivial_destructor, __has_virtual_destructor, __is_abstract,
4313 __is_base_of, __is_class, __is_convertible_to, __is_empty, __is_enum,
4314 __is_pod, __is_polymorphic, __is_union.
4315 * parser.c (cp_parser_primary_expression): Deal with the new RIDs.
4316 (cp_parser_trait_expr): New.
4317 * semantics.c (finish_trait_expr, trait_expr_value
4318 classtype_has_nothrow_copy_or_assign_p): New.
4319 * method.c (locate_copy, locate_ctor, locate_dtor): Do not define
4321 * decl.c (cp_tree_node_structure): Add TRAIT_EXPR.
4322 * class.c (check_bases, check_field_decl, check_bases_and_members):
4323 Deal with TYPE_HAS_COMPLEX_DFLT (t) too.
4324 * pt.c (uses_template_parms, tsubst_copy_and_build,
4325 value_dependent_expression_p, type_dependent_expression_p): Deal with
4327 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4329 2007-03-29 Richard Guenther <rguenther@suse.de>
4331 * tree.c (cp_walk_subtrees): Do not set input_location.
4333 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4336 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4339 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4341 * parser.c (struct cp_parser): Update comment for
4342 greater_than_is_operator_p.
4343 (cp_parser_primary_expression): In C++0x mode, a cast operator can
4344 be terminated with a `>>' token when !GREATER_THAN_IS_OPERATOR_P.
4345 (TOKEN_PRECEDENCE): In C++0x mode, `>>' is treated like `>' when
4346 !GREATER_THAN_IS_OPERATOR_P.
4347 (cp_parser_binary_expression): When -Wc++0x-compat, warn about
4348 `>>' operators that will become two `>' tokens in C++0x.
4349 (cp_parser_parameter_declaration): Treat `>>' like `>' in C++0x
4350 mode, allowing it to terminate default arguments.
4351 (cp_parser_enclosed_template_argument_list): In C++0x mode, treat
4352 `>>' like two consecutive `>' tokens.
4353 (cp_parser_skip_to_end_of_template_parameter_list): Ditto.
4354 (cp_parser_next_token_ends_template_argument_p): In C++0x, `>>'
4355 ends a template argument.
4357 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4359 * decl.c (redeclaration_error_message): Complain when redeclaring
4360 a friend function with default template arguments (C++0x mode only).
4361 * cp-tree.h (check_default_tmpl_args): Declare.
4362 * pt.c (check_default_tmpl_args): In C++0x mode, permit default
4363 template arguments in function templates. Add support for checking
4364 the default template arguments of friend templates.
4365 (push_template_decl_real): Fix call to check_default_tmpl_args.
4366 (type_unification_real): If a template parameter has not been
4367 deduced but provides a default template argument, substitute into
4368 that default template argument.
4369 * parser.c (cp_parser_init_declarator): When declaring (but not
4370 defining!) a function template in C++0x mode, check for default
4373 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4376 * decl.c (grokdeclarator): Deal with cv-qualified function type
4377 typedefs in the same way for member and non-member functions.
4379 2007-03-26 Dirk Mueller <dmueller@suse.de>
4381 * parser.c (cp_parser_member_declaration): Pedwarn
4382 about stray semicolons after member declarations.
4384 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4387 * pt.c (instantiate_decl): Set in_system_header.
4389 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4391 * cp-tree.h (current_tempalte_parms): Improve documentation.
4392 * pt.c (current_template_args): Likewise.
4395 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4396 not consume tokens when failing.
4398 2007-03-22 Jim Wilson <wilson@specifix.com>
4399 Mark Mitchell <mark@codesourcery.com>
4402 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4403 consistent with FROM.
4405 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4407 * error.c (dump_expr): Handle dependent names that designate types.
4408 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4410 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4412 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4414 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4416 * cvt.c (cp_convert_and_check) : Define.
4417 * cp-tree.h (cp_convert_and_check): Declare.
4418 * call.c (convert_conversion_warnings): Rename to
4419 conversion_null_warnings. The warning for floating-point to
4420 integer is handled by convert_and_check in convert_like_real.
4421 (convert_like_real): convert_conversion_warnings was renamed as
4422 conversion_null_warnings.
4423 * typeck.c (build_binary_op): Use cp_convert_and_check to warn for
4424 overflow and changes of value during conversion.
4426 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4429 * parser.c (cp_parser_statement): If 'namespace' is found, this
4430 only can be a namespace alias definition, so parse it now.
4431 (cp_parser_namespace_alias_definition): if we find an open brace
4432 instead of '=', then this is actually a misplaced namespace
4435 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4438 * decl.c (cxx_init_decl_processing): Move command-line options
4439 processing to c-opts.c.
4441 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4443 * ptree.c (cxx_print_type): Use formatting markup for integers
4444 when printing template parameter index/level/orig level.
4445 (cxx_print_xnode): Ditto.
4446 * cp-tree.h (TEMPLATE_PARM_PARAMETER_PACK): Use TREE_LANG_FLAG_0.
4447 (struct template_parm_index_s): Remove the PARAMETER_PACK member.
4448 Make INDEX, LEVEL, and ORIG_LEVEL integers instead of
4450 (struct saved_scope): Make X_PROCESSING_TEMPLATE_DECL an int,
4451 rather than a HOST_WIDE_INT.
4452 Turn X_PROCESSING_EXPLICIT_INSTANTIATION, SKIP_EVALUATION, and
4453 NEED_POP_FUNCTION_CONTEXT into bool bitfields; reorder fields for
4455 (struct language_function): Make RETURNS_VALUE, RETURNS_NULL,
4456 RETURNS_ABNORMALLY, IN_FUNCTION_TRY_HANDLER, and
4457 IN_BASE_INITIALIZER bool bitfields.
4458 (struct cp_declarator): Make KIND a 4-bit field. Make
4459 PARAMETER_PACK_P a bool bitfield just after KIND.
4460 * pt.c (uses_parameter_packs): Destroy the pointer set.
4461 (make_pack_expansion): Ditto.
4462 (check_for_bare_parameter_packs): Ditto.
4463 * name-lookup.c (push_to_top_level): Make need_pop a bool value.
4465 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4468 * call.c (convert_default_arg): Instead of copying the node,
4471 2007-03-15 Dirk Mueller <dmueller@suse.de>
4474 * call.c (convert_conversion_warnings): New..
4475 (convert_like_real): .. factored out from here.
4476 (convert_conversion_warnings): Add warning about
4477 false being converted to NULL in argument passing.
4479 2007-03-14 Dirk Mueller <dmueller@suse.de>
4481 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4482 (finish_do_body): Warn about empty body in do/while statement.
4484 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4486 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4488 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4491 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4494 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4496 * repo.c (init_repo): Initialize random_seed saved options.
4497 (finish_repo): Adjust.
4499 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4502 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4505 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4507 * decl.c (compute_array_index_type): New warning flag warn_vla.
4509 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4512 * call.c (convert_default_arg): Copy non-constant arguments.
4514 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4517 * parser.c (cp_parser_postfix_expression): Disallow compound
4518 literals in constant expressions.
4521 * semantics.c (finish_typeof): Use unlowered_expr_type.
4523 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4526 * cp-tree.h (unlowered_expr_type): New function.
4527 * typeck.c (is_bitfield_expr_with_lowered_type): Handle
4528 COMPOUND_EXPR, MODIFY_EXPR, and SAVE_EXPR.
4529 (unlowered_expr_type): New function.
4530 (build_unary_op): Disallow predecrements of bool bitfields.
4531 * call.c (build_conditional_expr): Use unlowered_expr_type.
4532 * pt.c (type_unification_real): Likewise.
4534 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4537 * typeck.c (check_return_expr): Check for bare parameter packs.
4538 (comptypes): Compare template parameter packs and
4539 type pack expansions.
4540 * decl.c (grokdeclarator): Deal with the declaration of function
4542 (grokparms): Verify that the (optional) function parameter pack is
4543 at the end of the parameter list.
4544 (xref_basetypes): Handle pack expansions in the base class.
4545 (cp_tree_node_structure): Handle ARGUMENT_PACK_SELECT.
4546 * cp-tree.def (TYPE_ARGUMENT_PACK): New.
4547 (NONTYPE_ARGUMENT_PACK): New.
4548 (TYPE_PACK_EXPANSION): New.
4549 (EXPR_PACK_EXPANSION): New.
4550 (ARGUMENT_PACK_SELECT): New.
4551 * cp-objcp-common.c (cp_tree_size): Compute size of
4552 (NON)TYPE_ARGUMENT_PACK, (TYPE|EXPR)_PACK_EXPANSION, and
4553 ARGUMENT_PACK_SELECT.
4554 * error.c (dump_template_argument): Print template argument packs.
4555 (dump_template_argument_list): Ditto.
4556 (dump_template_parameter): Dump `...' for template type parameter
4558 (dump_type): Dump TYPE_PACK_EXPANSION nodes.
4559 (dump_parameters): Print function parameter packs.
4560 (dump_template_parms): Print template argument packs.
4561 (dump_expr): Dump EXPR_PACK_EXPANSION nodes.
4562 (maybe_warn_variadic_templates): New.
4563 * operators.def: Add ellipsis operator for EXPR_PACK_EXPANSION.
4564 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4565 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4567 * mangle.c (write_type): Mangle TYPE_PACK_EXPANSION.
4568 (write_template_arg): Write argument packs as separate arguments.
4569 * cp-tree.h (struct template_parm_index_s): Add flag that
4570 indicates that the template parameter is actually a parameter
4572 (struct tree_argument_pack_select): New.
4573 (enum cp_tree_node_structure_enum): Add TS_CP_ARGUMENT_PACK_SELECT.
4574 (union lang_tree_node): Add argument_pack_select.
4575 (FUNCTION_PARAMETER_PACK_P): New.
4576 (PACK_EXPANSION_P): New.
4577 (PACK_EXPANSION_PATTERN): New.
4578 (SET_PACK_EXPANSION_PATTERN): New.
4579 (PACK_EXPANSION_PARAMETER_PACKS): New.
4580 (ARGUMENT_PACK_P): New.
4581 (ARGUMENT_PACK_ARGS): New.
4582 (SET_ARGUMENT_PACK_ARGS): New.
4583 (ARGUMENT_PACK_INCOMPLETE_P): New.
4584 (ARGUMENT_PACK_EXPLICIT_ARGS): New.
4585 (TEMPLATE_PARM_PARAMETER_PACK): New.
4586 (TEMPLATE_TYPE_PARAMETER_PACK): New.
4587 (ARGUMENT_PACK_SELECT_FROM_PACK): New.
4588 (ARGUMENT_PACK_SELECT_INDEX): New.
4589 (ARGUMENT_PACK_SELECT_ARG): New.
4590 (struct cp_declarator): Add parameter_pack_p flag.
4591 (maybe_warn_variadic_templates): Declare.
4592 (process_template_parm): Add bool parameter IS_PARAMETER_PACK, to
4593 indicate a template parameter pack.
4594 (uses_parameter_packs): Declare.
4595 (template_parameter_pack_p): Declare.
4596 (template_parms_variadic_p): Declare.
4597 (make_pack_expansion): Declare.
4598 (check_for_bare_parameter_packs): Declare.
4599 * cxx-pretty-print.c (pp_cxx_unary_expression): Print
4600 sizeof... expressions.
4601 (pp_cxx_expression): Print pack expansions and non-type argument
4603 (pp_cxx_exception_specification): Print pack expansions.
4604 (pp_cxx_direct_declarator): Print ellipsis for parameter packs.
4605 (pp_cxx_ctor_initializer): Print pack expansions.
4606 (pp_cxx_type_id): Print pack expansions.
4607 (pp_cxx_template_argument_list): Print argument packs.
4608 (pp_cxx_template_parameter): Print ellipsis for template parameter
4610 * pt.c (comp_template_parms): Compare template parameter packs.
4611 (template_parameter_pack_p): New.
4612 (template_parms_variadic_p): New.
4613 (template_args_variadic_p): New.
4614 (make_ith_pack_parameter_name): New.
4615 (struct find_parameter_pack_data): New.
4616 (find_parameter_packs_r): New.
4617 (uses_parameter_packs): New.
4618 (make_pack_expansion): New.
4619 (check_for_bare_parameter_packs): New.
4620 (expand_template_argument_pack): New.
4621 (reduce_template_parm_level): Propagate parameter pack flag.
4622 (process_template_parm): Add is_parameter_pack parameter to state
4623 when the parameter is actually a parameter pack. Create template
4624 parameter packs when is_parameter_pack is true.
4625 (current_template_args): The argument for a template parameter
4626 pack is an argument pack containing a single pack expansion.
4627 (process_partial_specialization): When checking that non-type
4628 argument expressions do not involve template parameters, loop over
4629 the arguments in argument packs separately.
4630 (push_template_decl_real): Check that the type of the declaration
4631 does not have any bare parameter packs. Check that primary
4632 templates have no more than one parameter pack, and that it comes
4633 at the end of the template parameter list.
4634 (convert_template_argument): Handle coercions for pack expansion
4635 expressions by coercing the pattern then rebuilding the expansion.
4636 (coerce_template_parms): When coercing the arguments for a
4637 variadic template, pack "extra" arguments into an argument pack.
4638 (coerce_template_template_parms): Cannot coerce between parameter
4639 packs and non-pack parameters.
4640 (template_args_equal): Compare PACK_EXPANSION_P expressions.
4641 (comp_template_args): Expand all template arguments packs before
4642 comparing template argument lists.
4643 (mangle_class_name_for_template): Make argument packs as separate
4645 (for_each_template_parm_r): No need to handle BASELINK.
4646 (instantiate_class_template): Handle pack expansions in the base
4648 (tsubst_pack_expansion): New.
4649 (tsubst_template_args): Handle substitutions of argument packs and
4650 pack expansion into template argument lists.
4651 (tsubst_decl): Expand function parameter packs into separate
4652 function parameters.
4653 (tsubst_arg_types): Expand a type pack expansion into separate
4655 (tsubst_exception_specification): Handle pack expansions in
4656 exception specifiers.
4657 (tsubst): See through ARGUMENT_PACK_SELECT arguments when
4658 replacing a template parameter with its argument. If we encounter
4659 a substitution for an argument pack, just return the parameter
4661 (tsubst_copy): sizeof(X...) returns the number of elements in
4662 parameter pack X. See through ARGUMENT_PACK_SELECT when the
4663 PARM_DECL is a parameter pack.
4664 (tsubst_expr): Expression pack expansions and argument packs
4665 cannot show up here; they will all be handled through function
4666 calls, sizeof, and template argument lists.
4667 (tsubst_copy_and_build): sizeof(X...) returns the number of
4668 elements in parameter pack X. Handle pack expansions in TREE_LIST
4669 and CONSTRUCTOR nodes.
4670 (fn_type_unification): Handle "incomplete" explicit template
4671 argument lists that specify some of the arguments for a template
4673 (type_unification_real): Unify arguments against pack expansions.
4674 (template_parm_level_and_index): New, helper function.
4675 (unify_pack_expansion): New.
4676 (unify): Unify argument packs on an argument-by-argument basis,
4677 handling variadic argument packs as well.
4678 (more_specialized_fn): Handle unification of function parameter
4679 packs. All things being equal, prefer non-variadic function
4680 templates to variadic function templates.
4681 (more_specialized_class): Prefer the variadic class template
4682 partial specialization that binds fewer arguments to a parameter
4684 (regenerate_decl_from_template): Expand function parameter packs
4685 into separate parameters.
4686 (instantiate_decl): Ditto.
4687 (tsubst_initializer_list): Handle pack expansions for base-class
4689 (dependent_type_p_r): Determine dependent types in argument packs
4690 and pack expansions.
4691 (value_dependent_expression_p): Determine value-dependence of
4692 non-type argument packs.
4693 (dependent_template_arg_p): Handle argument packs.
4694 * semantics.c (finish_cond): Check for bare parameter packs.
4695 (finish_expr_stmt): Ditto.
4696 (finish_for_expr): Ditto.
4697 (finish_switch_cond): Ditto.
4698 (finish_mem_initializers): Ditto.
4699 * name-lookup.c (arg_assoc_type): Handle pack expansions and
4701 * decl2.c (cp_build_parm_decl): Mark function parameter packs.
4702 * parser.c (make_declarator): Declarator is not an expansion.
4703 (make_pointer_declarator): Transfer parameter pack flag to outer
4705 (make_reference_declarator): Ditto.
4706 (make_ptrmem_declarator): Ditto.
4707 (make_call_declarator): Ditto.
4708 (make_array_declarator): Ditto.
4709 (cp_parser_postfix_expression): Allow pack expansion expressions
4710 in the argument list for a call expression.
4711 (cp_parser_parenthesized_expression_list): Add new parameter
4712 ALLOW_EXPANSION_P. When true, parse the ellipsis to mean "expand
4713 into separate arguments."
4714 (cp_parser_new_placement): Allow pack expansion expressions.
4715 (cp_parser_new_initializer): Ditto.
4716 (cp_parser_mem_initializer_list): Allow ellipsis to create a
4717 base-class initializer expansion.
4718 (cp_parser_mem_initializer): Ditto.
4719 (cp_parser_template_parameter_list): Keep track of whether the
4720 template parameter is a template parameter pack.
4721 (cp_parser_template_parameter): Parse the ellipsis to indicate a
4722 template parameter pack.
4723 (cp_parser_type_parameter): Ditto.
4724 (cp_parser_template_argument_list): Parse the ellipsis to indicate
4726 (cp_parser_direct_declarator): Parse the ellipsis to indicate that
4727 this declarator is a parameter pack.
4728 (cp_parser_parameter_declaration): The ellipsis does not end the
4729 parameter declaration, because it might be a parameter pack. Parse
4730 the ellipsis to indicate a parameter pack.
4731 (cp_parser_initializer): Allow pack expansions.
4732 (cp_parser_initializer_list): Allow ellipsis to create an
4733 initializer expansion.
4734 (cp_parser_base_clause): Allow ellipsis to create a base specifier
4736 (cp_parser_type_id_list): Allow ellipsis to create an exception
4737 specifier expansion.
4738 (cp_parser_attribute_list): Don't allow pack expansions.
4739 (cp_parser_functional_cast): Allow pack expansions.
4740 (cp_parser_sizeof_operand): Allow ellipsis following "sizeof" to
4741 compute the length of a parameter pack.
4742 (cp_parser_next_token_ends_template_argument_p): An ellipsis can
4743 end a template argument.
4744 * tree.c (cp_walk_subtrees): Walk BASELINK, TYPE_ARGUMENT_PACK,
4745 NONTYPE_ARGUMENT_PACK, TYPE_PACK_EXPANSION, EXPR_PACK_EXPANSION,
4748 2007-03-09 Dirk Mueller <dmueller@suse.de>
4750 * call.c (build_new_op): Call warn_logical_operator.
4752 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4755 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4758 * pt.c (any_template_arguments_need_structural_equality_p):
4761 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4763 * decl.c (grokdeclarator): Disable warnings for anonymous
4766 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4768 * typeck2.c (readonly_error): Always emit a hard error.
4769 Remove last argument.
4770 * cp-tree.h (readonly_error): Adjust prototype.
4771 * semantics.c (finish_asm_stmt): Adjust call to readonly_error.
4772 * typeck.c (build_unary_op): Likewise.
4773 (build_modify_expr): Likewise.
4775 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4778 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4780 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4783 * parser.c (struct cp_parser): New IN_IF_STMT.
4784 (cp_parser_statement_seq_opt): Handle an unexpected 'else',
4785 returning if parsing the body of an 'if' statement or issuing an
4786 error and continuing.
4787 (cp_parser_selection_statement): Set IN_IF_STMT bit when parsing
4789 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4791 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4794 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4797 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4799 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4800 Objective-C++. Don't exit early if -shared-libgcc needs to be
4803 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4805 * typeck.c (common_base_type): Delete unused function.
4807 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4809 * Make-lang.in: Add dummy lang.install-pdf target.
4811 2007-03-01 Simon Baldwin <simonb@google.com>
4814 * decl.c (check_tag_decl): Added new warning for typedef ignored
4815 when it precedes an otherwise valid non-typedef declaration.
4817 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4819 * typeck.c (build_function_call): Store converted arguments
4820 in a stack-allocated array instead of building a list.
4821 (convert_arguments): Store arguments in the array passed in as an
4822 argument, and return the actual number of arguments.
4823 * call.c (build_call): Delete, and replace with...
4824 (build_call_n, build_call_a): New.
4825 (build_op_delete_call): Rewrite to avoid constructing argument lists.
4826 (build_over_call): Store converted arguments in a stack-allocated
4827 array instead of building a list.
4828 (build_cxx_call): Pass arguments in an array instead of as a list.
4829 (build_java_interface_fn_ref): Rewrite to avoid constructing
4831 * tree.h: Update declarations to reflect above changes.
4832 * method.c (use_thunk): Use a stack-allocated array to hold
4833 the arguments instead of a list.
4834 * rtti.c (throw_bad_cast): Update call to cxx_call.
4835 (throw_bad_typeid): Likewise.
4836 (build_dynamic_cast_1): Likewise.
4837 * init.c (build_builtin_delete_call): Use build_call_n.
4838 * decl.c (expand_static_init): Likewise.
4839 * except.c (cp_protect_cleanup_actions): Likewise.
4840 * cp-gimplify.c (genericize_eh_spec_block): Likewise.
4841 (gimplify_must_not_throw_expr): Likewise.
4842 (cxx_omp_apply_fn): Use build_call_a.
4844 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4846 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4847 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4849 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4851 * cp-tree.h (static_ctors): Remove.
4852 * cp-tree.h (static_dtors): Likewise.
4853 * cp-objcp-common.c (decl_shadowed_for_var_lookup): Adjust for
4854 refactoring of tree_map hierarchy.
4855 (decl_shadowed_for_var_insert): Likewise.
4856 * semantics.c (expand_body): Use c_expand_body.
4857 (expand_or_defer_fn): Don't update static_ctors or static_dtors.
4858 * decl2.c (static_ctors): Remove.
4859 (static_dtors): Likewise.
4860 (generate_ctor_or_dtor_function): Pass NULL_TREE to
4861 objc_generate_static_init_call. Do not call static_[cd]tors.
4862 (generate_ctor_and_dtor_functions_for_priority): Do not check for
4864 (cp_write_global_declarations): Likewise.
4866 2007-02-23 Richard Guenther <rguenther@suse.de>
4868 * class.c (note_name_declared_in_class): Make declaration
4869 changes meaning a pedwarn.
4871 2007-02-22 Michael Matz <matz@suse.de>
4874 * cp-tree.h (TFF_UNQUALIFIED_NAME): New formatting flag.
4875 * error.c (dump_aggr_type, dump_simple_decl, dump_decl,
4876 dump_function_decl): Guard emitting outer scopes by new flag.
4877 * cp-lang.c (cxx_dwarf_name): New function.
4878 (LANG_HOOKS_DWARF_NAME): Define to cxx_dwarf_name.
4879 * pt.c (classtype_mangled_name, mangle_class_name_for_template):
4881 (push_template_decl_real, lookup_template_class): Remove calls
4884 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4886 * call.c (build_new_method_call): Ensure that explicit calls of
4887 destructors have type "void".
4889 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4891 * typeck.c (build_binary_op): Replace -Wstring-literal-comparison
4892 and -Walways-true with -Waddress.
4893 * cvt.c (convert_to_void): Replace unconditional warning with
4896 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4898 * decl.c, tree.c: Fix comment typos.
4900 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4903 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4904 statement expression if we had an error mark node.
4906 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4907 Brooks Moses <brooks.moses@codesourcery.com>
4908 Lee Millward <lee.millward@codesourcery.com>
4910 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4911 Change class to tcc_vl_exp.
4913 * call.c (build_call): Use build_call_list instead
4915 (build_over_call): Likewise.
4916 (build_new_method_call): Use build_min_non_dep_call_list
4917 instead of build_min_non_dep.
4919 * error.c (dump_call_expr_args): New function.
4920 (dump_aggr_init_expr_args): New function.
4921 (dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
4922 Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
4924 * cvt.c (convert_to_void): Use build_call_array instead
4925 of build3; use new AGGR_INIT_EXPR accessor macros.
4927 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4928 instead of TREE_CODE_LENGTH.
4930 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4931 AGGR_INIT_EXPR accessor macros.
4933 * cp-gimplify.c (cp_gimplify_init_expr): Use
4934 AGGR_INIT_EXPR_SLOT to set the slot operand.
4936 * cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
4937 (AGGR_INIT_EXPR_SLOT): New macro.
4938 (AGGR_INIT_EXPR_ARG): New macro.
4939 (aggr_init_expr_nargs): New macro.
4940 (AGGR_INIT_EXPR_ARGP): New macro.
4941 (aggr_init_expr_arg_iterator): New.
4942 (init_aggr_init_expr_arg_iterator): New.
4943 (next_aggr_init_expr_arg): New.
4944 (first_aggr_init_expr_arg): New.
4945 (more_aggr_init_expr_args_p): New.
4946 (FOR_EACH_AGGR_INIT_EXPR_ARG): New.
4947 (stabilize_aggr_init): New declaration.
4948 (build_min_non_dep_call_list): Likewise.
4950 * tree.c (process_aggr_init_operands): New function.
4951 (build_aggr_init_array) New function.
4952 (build_cplus_new): Update to use new CALL_EXPR and
4953 AGGR_INIT_EXPR accessor macros. Replace use of build3 with
4954 build_aggr_init_array.
4955 (build_min_non_dep_call_list) New function.
4956 (build_min_nt): Assert input code parameter is not a variable
4957 length expression class.
4958 (build_min, build_min_non_dep): Likewise.
4959 (cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
4960 to check for equality instead of recursing. Handle tcc_vl_exp
4962 (stabilize_call): Update to only handle CALL_EXPRs, not
4963 AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
4964 (stabilize_aggr_init): New function.
4965 (stabilize_init): Use it.
4967 * cxx-pretty-print.c (pp_cxx_postfix_expression)
4968 <AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
4969 AGGR_INIT_EXPR accessor macros and argument iterators.
4971 * pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
4972 build_vl_exp. Iterate through the operands, recursively
4973 processing each one.
4974 (tsubst_copy_and_build) <CALL_EXPR>: Update to use new
4975 CALL_EXPR accessor macros.
4976 (value_dependent_expression_p) <default>: Handle tcc_vl_exp
4977 tree code classes. Use TREE_OPERAND_LENGTH instead of
4980 * semantics.c (finish_call_expr): Use build_nt_call_list
4981 instead of build_nt.
4982 (simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
4983 accessor macros. Use build_call_array to construct the
4984 CALL_EXPR node instead of build3
4986 * decl2.c (build_offset_ref_call_from_tree): Use
4987 build_nt_call_list and build_min_non_dep_call_list instead
4988 of build_min_nt and build_min_non_dep.
4990 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4991 Use build_nt_call_list instead of build_min_nt.
4993 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4996 * call.c (build_conditional_expr): Improve error message.
4998 2007-02-13 Dirk Mueller <dmueller@suse.de>
5000 * friend.c (do_friend): Annotate warning about friend
5001 declarations in templates with OPT_Wnon_template_friend.
5002 Convert informal message from warning() to inform().
5004 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5005 Mark Mitchell <mark@codesourcery.com>
5008 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5009 instantiations for variables.
5011 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5014 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5015 Check warn_unused_value just once.
5017 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5020 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5021 (fn_type_unificiation): Likewise.
5022 (get_bindings): Likewise.
5024 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5027 * decl.c (finish_function): Use DECL_REPLACEABLE.
5028 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5030 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5032 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5034 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5036 * decl.c (grokvardecl): Don't error if !have_tls.
5037 (grokdeclarator): Likewise.
5038 * parser.c (cp_parser_omp_threadprivate): Likewise.
5040 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5043 * cp-gimplify.c (cp_genericize_r): Don't dereference invisiref
5044 parameters and result decls in omp clauses.
5045 (cxx_omp_privatize_by_reference): Pass also invisiref PARM_DECLs
5048 2007-02-05 Dirk Mueller <dmueller@suse.de>
5051 * parser.c (cp_parser_class_specifier): Always initialize bases.
5053 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5055 * cp-tree.h (OMP_ATOMIC_CODE): Delete.
5056 (OMP_ATOMIC_DEPENDENT_P): Rewrite.
5057 * pt.c (tsubst_expr): Adjust for new format of dependent OMP_ATOMIC
5059 * semantics.c (finish_omp_atomic): Store a whole expression node
5060 in operand 1, and integer_zero_node in operand 0, for dependent
5061 OMP_ATOMIC. Rewrite to make flow easier to understand.
5063 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5065 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5067 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5069 * class.c, cp-tree.h, decl.c, decl2.c, g++spec.c, init.c,
5070 parser.c, pt.c, tree.c, typeck.c: Follow spelling conventions.
5072 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5074 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5075 keyword warning to -Wc++0x-compat.
5077 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5079 * decl.c (grokdeclarator): Update documentation.
5081 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5084 * decl.c (grokdeclarator): If __thread is used together with
5085 a storage class other than extern and static, clear thread_p
5086 after issuing diagnostics and fall through to checking the
5089 2007-01-30 Roger Sayle <roger@eyesopen.com>
5091 * error.c (dump_type_suffix): Avoid use of cp_build_binary_op when
5092 calculating the size of an array (to avoid recursive errors).
5094 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5097 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5099 * call.c (convert_like_real): Don't warn when converting to
5102 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5104 * decl.c (pop_label): Replace warning with call to
5105 warn_for_unused_label.
5107 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5110 * semantics.c (finish_pseudo_destructor_expr): Check the
5111 destrutor name by calling check_dtor_name.
5113 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5115 * lex.c (D_CPP0X): Rename.
5117 (reswords): D_CPP0X -> D_CXX0X.
5118 (init_reswords): Ditto.
5119 * parser.c (cp_lexer_get_preprocessor_token): Warn about the use
5120 of C++0x keywords as identifiers.
5122 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5125 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5128 2007-01-23 Ian Lance Taylor <iant@google.com>
5130 * typeck.c (convert_for_assignment): Only warn about a = b = c
5131 when converting to bool.
5133 2007-01-23 Roger Sayle <roger@eyesopen.com>
5135 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5137 * typeck.c (ignore_overflows): Remove the remaining uses of
5138 TREE_CONSTANT_OVERFLOW.
5140 2007-01-20 Jan Hubicka <jh@suse.cz>
5142 * decl2.c (start_objects, start_static_storage_duration_function):
5143 Do not make the functions uninlinable.
5145 2007-01-17 Ian Lance Taylor <iant@google.com>
5147 * class.c (add_method): Call VEC_reserve_exact rather than passing
5148 a negative size to VEC_reserve.
5150 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5153 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5155 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5158 * decl.c (make_typename_type): If the qualified name is not a
5159 type, issue an error.
5160 * parser.c (cp_parser_elaborated_type_specifier): Fix comment
5163 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5165 * rtti.c: Include target.h.
5166 (emit_support_tinfos): If ! targetm.cxx.library_rtti_comdat (),
5167 don't emit typeinfo for fundamental types as weak.
5168 * Make-lang.in (cp/rtti.o): Update and correct dependencies.
5170 2007-01-08 Richard Guenther <rguenther@suse.de>
5172 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5174 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5176 * call.c (standard_conversion): Pass flag to
5177 vector_types_convertible_p to disallow emission of note.
5178 * typeck.c (convert_for_assignment): Pass flag to
5179 vector_types_convertible_p to allow emission of note.
5180 (ptr_reasonably_similar): Pass flag to vector_types_convertible_p
5181 to disallow emission of note.
5183 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5186 * typeck.c (build_binary_op): Call overflow_warning if
5187 TREE_OVERFLOW_P is true for the result and not for any of the
5190 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5193 * class.c (add_method): Don't wait until template
5194 instantiation time to complain about duplicate methods.
5196 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5199 * semantics.c (finish_unary_op_expr): Warn only if result
5200 overflowed and operands did not.
5202 2007-01-05 Ian Lance Taylor <iant@google.com>
5204 * typeck.c (build_binary_op): Warn about comparing a non-weak
5207 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5209 * pt.c (tsubst): Propagate the need for structural equality checks
5210 when reducing the level of template parameters.
5212 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5214 * pt.c: Fix a comment typo.
5216 2007-01-02 Ian Lance Taylor <iant@google.com>
5218 * semantics.c (maybe_convert_cond): Optionally warn when using an
5219 assignment as a condition.
5220 * typeck.c (convert_for_assignment): Optionally warn about
5221 assigning the result of an assignment to a bool.
5223 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5225 * pt.c (canonical_template_parms): Correct typo in comment.
5227 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5229 * typeck.c (structural_comptypes): Renamed from "comptypes".
5230 (comptypes): Use canonical type information to perform fast type
5231 comparison. When VERIFY_CANONICAL_TYPES, verify that the
5232 canonical type comparison returns the same results as we would see
5233 from the current, structural check. Support COMPARE_STRUCTURAL
5234 when we need structural checks.
5235 * decl.c (typename_compare): Fix comment.
5236 (build_typename_type): TYPENAME_TYPE nodes require structural
5237 equality checks, because they resolve different based on the
5239 (make_unbound_class_template): UNBOUND_CLASS_TEMPLATE nodes
5240 require structural equality checks (for now).
5241 (build_ptrmemfunc_type): Build the canonical pointer to member
5243 (compute_array_index_type): Whenever we build a new index type
5244 to represent the size of an array in a template, we need to mark
5245 this index type as requiring structural equality. This goes for
5246 arrays with value-dependent sizes with the current ABI, or all
5248 * tree.c (cplus_array_hash): New.
5249 (struct cplus_array_info): New.
5250 (cplus_array_compare): New.
5251 (cplus_array_htab): New.
5252 (build_cplus_array_type_1): Use a hash table to cache the array
5253 types we build. Build the canonical array type for each array
5255 (cp_build_qualified_type_real): When building a cv-qualified array
5256 type, use the hash table of array types and build canonical array
5258 (bind_template_template_parm): BOUND_TEMPLATE_TEMPLATE_PARM nodes
5259 use structural equality (for now).
5260 * cp-tree.h (COMPARE_STRUCTURAL): New.
5261 * pt.c (canonical_template_parms): New.
5262 (canonical_type_parameter): New.
5263 (process_template_parm): Find the canonical type parameter.
5264 (lookup_template_class): When we have named the primary template
5265 type, set the canonical type for our template class to the primary
5266 template type. If any of the template arguments need structural
5267 equality checks, the template class needs structural equality
5269 (tsubst): When reducing the level of a template template
5270 parameter, we require structural equality tests for the resulting
5271 parameter because its template parameters have not had their types
5272 canonicalized. When reducing a template type parameter, find the
5273 canonical reduced type parameter.
5274 (any_template_arguments_need_structural_equality_p): New.