7e603237cd2e20b2ecd7285c6b9ffb4b78538b63
[gcc.git] / gcc / cp / ChangeLog
1 2007-07-21 Rafael Avila de Espindola <espindola@google.com>
2
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.
13
14 2008-07-21 Paolo Carlini <paolo.carlini@oracle.com>
15
16 PR c++/36870
17 * semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
18 TYPE_NOTHROW_P, not TREE_NOTHROW.
19 (trait_expr_value): Likewise.
20
21 2008-07-18 Dodji Seketeli <dseketel@redhat.com>
22
23 PR c++/36407
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.
26
27 2008-07-18 Kris Van Hees <kris.van.hees@oracle.com>
28
29 * rtti.c (emit_support_tinfos): Add char16_type_node and
30 char32_type_node.
31 * typeck2.c (digest_init): Support char16_t and char32_t.
32
33 2008-07-18 Kavih R. Ghazi <ghazi@caip.rutgers.edu>
34
35 * cvt.c (convert_to_void): Avoid C++ keywords.
36 * decl.c (walk_namespaces_r, wrapup_globals_for_namespace):
37 Likewise.
38 * friend.c (is_friend): Likewise.
39 * init.c (perform_member_init): Likewise.
40 * mangle.c (write_template_prefix, write_template_template_param):
41 Likewise.
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):
46 Likewise.
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.
52
53 2008-07-17 Julian Brown <julian@codesourcery.com>
54 Mark Mitchell <mark@codesourcery.com>
55
56 * decl2.c (determine_visibility): Allow target to override
57 visibility of class data.
58
59 2008-07-17 Paolo Carlini <paolo.carlini@oracle.com>
60
61 PR c++/36855
62 * semantics.c (trait_expr_value): Update __has_trivial_destructor
63 semantics to the current WP (N2691).
64
65 2008-07-16 Dodji Seketeli <dseketel@redhat.com>
66
67 PR c++/13699
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.
71
72 2008-07-14 Jason Merrill <jason@redhat.com>
73
74 * lex.c (init_reswords): Always set D_OBJC.
75
76 2008-07-11 Tom Tromey <tromey@redhat.com>
77 Ian Lance Taylor <iant@google.com>
78
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
82 than reswords.
83
84 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
85
86 PR c++/13101
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.
90
91 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
92
93 PR c++/31754
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
105 messages.
106
107 2008-07-11 Dodji Seketeli <dseketel@redhat.com>
108
109 PR c++/31754
110 * pt.c, semantic.c:
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.
140
141 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
142
143 PR c++/36760
144 * pt.c (tsubst_function_type): Remove warning for type qualifiers
145 on function return type.
146
147 2008-07-09 Paolo Carlini <paolo.carlini@oracle.com>
148
149 PR c++/36760
150 * pt.c (tsubst_function_type): Don't warn for type qualifiers
151 on function return type in case of system header.
152
153 2008-07-09 Raksit Ashok <raksit@google.com>
154
155 * parser.c (cp_parser_postfix_expression): New warning based on flag
156 warn_disallowed_functions.
157
158 2008-07-08 Simon Martin <simartin@users.sourceforge.net>
159
160 PR c++/34963
161 * decl.c (grokdeclarator): Reset storage_class and staticp for friend
162 functions declared with a storage class qualifier.
163
164 2008-07-03 Richard Guenther <rguenther@suse.de>
165
166 PR c++/36128
167 * typeck.c (cp_build_function_call): Move code to verify
168 builtin function arguments ...
169 * call.c (build_cxx_call): ... here.
170
171 2008-07-02 Jason Merrill <jason@redhat.com>
172
173 * Make-lang.in (cp/typeck2.o): Add $(REAL_H) dependency.
174
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
186 literal here.
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.
240 (unify): Handle { }.
241 * name-lookup.c (arg_assoc_type): Handle init_list_type_node.
242
243 2008-07-01 Daniel Jacobowitz <dan@codesourcery.com>
244
245 * typeck.c (comp_ptr_ttypes_real): Use vector_targets_convertible_p.
246 (comp_ptr_ttypes_const): Likewise.
247
248 2008-07-01 Andrew Haley <aph@redhat.com>
249
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.
252
253 2008-06-30 Jakub Jelinek <jakub@redhat.com>
254
255 PR c++/36662
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.
259
260 2008-06-29 Paolo Carlini <paolo.carlini@oracle.com>
261
262 PR c++/36655
263 * pt.c (do_type_instantiation): In c++0x mode do not warn for
264 extern template.
265
266 2008-06-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
267
268 * Make-lang.in (cp-warn): Delete $(CXX_COMPAT_WARN).
269
270 2008-06-28 Jakub Jelinek <jakub@redhat.com>
271
272 PR c++/36364
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
275 for it is 0.
276
277 2008-06-27 Paolo Carlini <paolo.carlini@oracle.com>
278
279 PR c++/36655
280 * pt.c (do_decl_instantiation): In c++0x mode do not warn for
281 extern template.
282
283 2008-06-24 Jonathan Wakely <jwakely.gcc@gmail.com>
284
285 PR c++/23194
286 * typeck.c (cp_build_function_call): Show example syntax in
287 diagnostic.
288
289 2008-06-21 Jonathan Wakely <jwakely.gcc@gmail.com>
290
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.
320
321 2008-06-16 Jan Hubicka <jh@suse.cz>
322
323 * method.c: Include cgraph.h.
324 (use_thunk): Use cgraph_add_new_function instead of calling backend
325 directly.
326
327 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
328
329 * parser.c: Fix comment typo.
330
331 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
332
333 PR c++/35320
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
339 grokbitfield.
340 (cp_parser_objc_class_ivars): Likewise.
341
342 2008-06-14 Simon Martin <simartin@users.sourceforge.net>
343
344 PR c++/35317
345 * class.c (type_requires_array_cookie): Do not consider delete[]
346 operators with an ellipsis as second argument.
347
348 2008-06-09 Jakub Jelinek <jakub@redhat.com>
349
350 PR c++/36408
351 * semantics.c (stmt_expr_value_expr): Don't crash on empty
352 STATEMENT_LIST.
353
354 2008-06-08 Paolo Carlini <paolo.carlini@oracle.com>
355
356 PR c++/35242
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.
361
362 2008-06-07 Paolo Carlini <paolo.carlini@oracle.com>
363
364 PR c++/35327
365 * decl.c (grokdeclarator): In case of wrong return type return
366 immediately error_mark_node.
367
368 2008-06-06 Jakub Jelinek <jakub@redhat.com>
369
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
387 functions.
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
391 functions.
392 (cp_parser_omp_clause_name): Handle collapse and untied
393 clauses.
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
402 PRAGMA_OMP_TASKWAIT.
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
413 OMP_CLAUSE_COLLAPSE.
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}
424 changes.
425 (finish_omp_threadprivate): Allow static class members of the
426 current class.
427 (handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
428 finish_omp_taskwait): New functions.
429
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.
434
435 2008-06-02 Paolo Carlini <paolo.carlini@oracle.com>
436
437 PR c++/36404
438 * pt.c (push_template_decl_real): Consistently return error_mark_node
439 on error.
440
441 2008-06-02 Tomas Bily <tbily@suse.cz>
442
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.
447
448 2008-05-29 Paolo Carlini <paolo.carlini@oracle.com>
449
450 PR c++/35243
451 * pt.c (tsubst_initializer_list): Consistently check the tree
452 returned by tsubst_pack_expansion for error_mark_node.
453
454 2008-05-27 Michael Matz <matz@suse.de>
455
456 PR c++/27975
457 * call.c (build_new_op): Make warning conditional on
458 OPT_Wenum_compare.
459
460 2008-05-27 Alexandre Oliva <aoliva@redhat.com>
461
462 PR c++/35909
463 * call.c (convert_like_real): Convert bitfield to desired type
464 before creating temporary.
465
466 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
467
468 * Makefile.in: Adjusted dependencies on c-incpath.o.
469
470 2008-05-23 Jakub Jelinek <jakub@redhat.com>
471
472 PR c++/36237
473 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call
474 fold_build_cleanup_point_expr on build_call_a results.
475
476 PR c++/36308
477 * semantics.c (omp_clause_info_fndecl): New function.
478 (finish_omp_clauses): Use it.
479
480 2008-05-21 Jakub Jelinek <jakub@redhat.com>
481
482 PR c++/36023
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.
487
488 2008-05-21 Tom Tromey <tromey@redhat.com>
489
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'
495 argument.
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.
505
506 2008-05-12 Paolo Carlini <paolo.carlini@oracle.com>
507
508 PR c++/35331
509 * semantics.c (begin_class_definition): Extend checks on the first
510 argument.
511
512 2008-05-12 Tomas Bily <tbily@suse.cz>
513
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.
518
519 2008-05-11 Volker Reichelt <v.reichelt@netcologne.de>
520
521 * parser.c (cp_parser_omp_clause_reduction): Add missing "expected"
522 in error message.
523 (cp_parser_omp_clause_schedule): Remove superfluous "expected"
524 in error message.
525
526 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
527
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
531 DECL_PURE_P.
532
533 2008-05-02 Simon Baldwin <simonb@google.com>
534
535 PR bootstrap/36108
536 * typeck.c (build_array_ref): Remove warn_array_subscript_range.
537
538 2008-05-01 Simon Baldwin <simonb@google.com>
539
540 * typeck.c (build_array_ref): Call warn_array_subscript_range.
541
542 2008-04-30 Jakub Jelinek <jakub@redhat.com>
543
544 PR c++/35986
545 * pt.c (more_specialized_fn): Stop the loop even if there are no
546 arguments before ellipsis.
547
548 2008-04-29 Jakub Jelinek <jakub@redhat.com>
549
550 PR c++/35650
551 * parser.c (cp_parser_lookup_name): Look through single function
552 OVERLOAD.
553
554 PR c++/35987
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.
557
558 2008-04-28 Jason Merrill <jason@redhat.com>
559 Liu Guanwei <liu_gw@163.com>
560
561 PR c++/57
562 * parser.c (cp_parser_parameter_declaration): Handle < ambiguity
563 in default arguments.
564
565 2008-04-25 Jan Hubicka <jh@suse.cz>
566
567 * typeck.c (check_return_expr): Update.
568 * decl.c (start_preparsed_function): Update.
569 * method.c (use_thunk): Update.
570
571 2008-04-24 Jakub Jelinek <jakub@redhat.com>
572
573 PR c++/35758
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.
579
580 2008-04-24 Richard Guenther <rguenther@suse.de>
581
582 * typeck.c (cp_build_function_call): Call
583 check_builtin_function_arguments.
584
585 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
586
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.
604
605 2008-04-22 Jason Merrill <jason@redhat.com>
606
607 PR c++/35316
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.
611
612 2008-04-22 Jakub Jelinek <jakub@redhat.com>
613
614 PR c++/35747
615 * semantics.c (finish_stmt_expr): Call pop_stmt_list even if the stmt
616 expression is errorneous.
617
618 2008-04-21 Jason Merrill <jason@redhat.com>
619
620 PR c++/35325
621 * tree.c (cp_tree_equal): Handle FIXED_CST.
622
623 PR c++/35678
624 * pt.c (template_template_parm_bindings_ok_p): Set
625 processing_template_decl while in this function.
626
627 2008-04-18 Kris Van Hees <kris.van.hees@oracle.com>
628
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
636 RID_CHAR{16,32}.
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
641 CPP_STRING{16,32}.
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.
645
646 2008-04-17 Jason Merrill <jason@redhat.com>
647
648 PR c++/35773
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.
652
653 2008-04-15 Jakub Jelinek <jakub@redhat.com>
654
655 PR c/35751
656 * decl.c (layout_var_decl): If extern or static var has variable
657 size, set TREE_TYPE (decl) to error_mark_node.
658
659 2008-04-16 Danny Smith <dannysmith@users.sourceforge.net>
660
661 PR target/35921
662 * optimize.c (maybe_clone_body): Copy DECL_DLLIMPORT_P flag
663 to clone.
664
665 2008-04-09 Jason Merrill <jason@redhat.com>
666
667 PR c++/35708
668 * semantics.c (finish_compound_literal): Return a TARGET_EXPR,
669 not a pushed variable.
670
671 2008-04-09 Volker Reichelt <v.reichelt@netcologne.de>
672
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
676 message.
677
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.
683
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.
692
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.
775
776 * parser.c (cp_parser_template_parameter_list): Simplify.
777
778 2008-04-07 James E. Wilson <wilson@tuliptree.org>
779
780 * pt.c (tsubst_copy, case SIZEOF_EXPR): Initialize len.
781
782 2008-04-07 Jason Merrill <jason@redhat.com>
783
784 PR c++/35734
785 * class.c (type_has_user_nondefault_constructor): A template
786 counts as a nondefault constructor.
787
788 2008-04-04 Paolo Bonzini <bonzini@gnu.org>
789
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
793 code only).
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):
799 Delete prototype.
800 * semantics.c (current_stmt_tree): Fix comment.
801
802 2008-04-03 Jakub Jelinek <jakub@redhat.com>
803
804 PR c++/35741
805 * semantics.c (finish_offsetof): Undo effect of convert_from_reference
806 before calling fold_offsetof.
807
808 2008-04-03 Tom Tromey <tromey@redhat.com>
809
810 * Make-lang.in (c++_OBJS): New variable.
811
812 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
813
814 * optimize.c (clone_body): New, from tree-inline.c.
815
816 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
817
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.
821
822 2008-03-30 Volker Reichelt <v.reichelt@netcologne.de>
823
824 PR c++/35578
825 * parser.c (cp_parser_decl_specifier_seq): Add location to error
826 message.
827
828 2008-03-27 Tom Tromey <tromey@redhat.com>
829
830 * Make-lang.in: Revert automatic dependency patch.
831
832 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
833
834 PR obj-c++/35704
835 * typeck.c (build_x_compound_expr): Use cp_build_compound_expr.
836 (build_compound_expr): New, for compatibility with C
837 build_compound_expr.
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.
849
850 2008-03-27 Douglas Gregor <doug.gregor@gmail.com>
851
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
860 the parameter type.
861
862 2008-03-26 Jakub Jelinek <jakub@redhat.com>
863
864 PR c++/35546
865 * pt.c (apply_late_template_attributes): Don't call tsubst on
866 first attribute argument if it is IDENTIFIER_NODE.
867
868 PR c++/35332
869 * error.c (dump_expr): Pass {,UN}ORDERED_EXPR, UN{LT,LE,GT,GE,EQ}_EXPR
870 and LTGT_EXPR to pp_expression.
871
872 2008-03-26 Douglas Gregor <doug.gregor@gmail.com>
873
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
879 template argument.
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.
885
886 2008-03-25 Tom Tromey <tromey@redhat.com>
887
888 * Make-lang.in: Remove .o targets.
889 (cp/g++spec.o): Moved to cp/. Reduce to variable setting.
890 (GXX_OBJS): Update.
891 (c++_OBJS): New variable.
892 (CXX_TREE_H, CXX_PRETTY_PRINT_H): Remove.
893
894 2008-03-25 Douglas Gregor <doug.gregor@gmail.com>
895
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
909 c-common.
910 (cp_build_indirect_ref): Was build_indirect_ref; added SFINAE
911 support.
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
915 c-common.
916 (cp_build_function_call): Was build_function_call; added SFINAE
917 support.
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
944 support.
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.
960 (build_new): Ditto.
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.
990 (build_temp): Ditto.
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
1022 parameter.
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.
1030 (build_new): 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.
1081 (set_guard): 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.
1098
1099 2008-03-24 Tom Tromey <tromey@redhat.com>
1100
1101 * lex.c (handle_pragma_interface): Don't copy the filename.
1102 (handle_pragma_implementation): Copy filename using xstrdup.
1103
1104 2008-03-21 Paolo Carlini <pcarlini@suse.de>
1105
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):
1121 Adjust.
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):
1147 Adjust.
1148 * semantics.c (begin_class_definition, finish_base_specifier,
1149 finish_typeof, cxx_omp_predetermined_sharing, finish_decltype_type):
1150 Adjust.
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.
1157
1158 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
1159
1160 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
1161
1162 2008-03-17 Jason Merrill <jason@redhat.com>
1163
1164 PR c++/35548
1165 * call.c (reference_binding): Check LOOKUP_NO_TEMP_BIND when binding
1166 a temp directly to a reference as per DR391.
1167
1168 2008-03-12 Richard Guenther <rguenther@suse.de>
1169
1170 PR c++/35469
1171 Revert:
1172 2008-02-04 Richard Guenther <rguenther@suse.de>
1173
1174 PR java/35035
1175 * decl.c (record_builtin_java_type): Make jboolean a
1176 integer type again where its mode doesn't match that of bool.
1177
1178 2008-01-25 Richard Guenther <rguenther@suse.de>
1179
1180 PR c++/33887
1181 * decl.c (record_builtin_java_type): Make __java_boolean
1182 a variant of bool.
1183 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1184 after TYPE_MAIN_VARIANT check.
1185
1186 2008-03-10 Jakub Jelinek <jakub@redhat.com>
1187
1188 PR c++/35328
1189 * semantics.c (finish_omp_clauses): Look through NOP_EXPR even
1190 if errorcount.
1191
1192 PR c++/35337
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.
1195
1196 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1197
1198 Revert:
1199
1200 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1201
1202 PR c++/35049
1203 PR c++/35096
1204 * typeck.c (structural_comptypes): Call cp_comptypes.
1205 (comptypes): New; called from the C/C++ common bits to perform
1206 strict checks.
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.
1217
1218 2008-03-07 Paolo Bonzini <bonzini@gnu.org>
1219
1220 * cp-objcp-common.c (cxx_types_compatible_p): Remove obsolete
1221 test for equivalence between pointer and references.
1222
1223 2008-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1224
1225 PR 24924
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.
1240
1241 2008-03-01 Douglas Gregor <doug.gregor@gmail.com>
1242
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.
1253
1254 2008-02-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1255
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.
1260
1261 2008-02-29 Tom Tromey <tromey@redhat.com>
1262
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.
1268
1269 2008-02-28 Richard Guenther <rguenther@suse.de>
1270
1271 Revert:
1272 2008-02-26 Richard Guenther <rguenther@suse.de>
1273
1274 * decl.c (duplicate_decls): Remove decl from global mapping
1275 before ggc_freeing it.
1276
1277 2008-02-27 Jakub Jelinek <jakub@redhat.com>
1278
1279 PR c++/35368
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).
1285
1286 2008-02-26 Jason Merrill <jason@redhat.com>
1287
1288 PR c++/35315
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.
1292
1293 2008-02-26 Tom Tromey <tromey@redhat.com>
1294
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
1298 code.
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.
1308
1309 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1310
1311 PR 26264
1312 * call.c (magic_varargs_p): Remove BUILT_IN_STDARG_START.
1313
1314 2008-02-26 Richard Guenther <rguenther@suse.de>
1315
1316 * decl.c (duplicate_decls): Remove decl from global mapping
1317 before ggc_freeing it.
1318
1319 2008-02-26 Paolo Carlini <pcarlini@suse.de>
1320
1321 PR c++/35323
1322 * name-lookup.c (arg_assoc_type): Handle FIXED_POINT_TYPE.
1323
1324 2008-02-26 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1325
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.
1330
1331 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1332
1333 PR c++/35333
1334 * error.c (dump_expr): Handle CONJ_EXPR.
1335
1336 2008-02-25 Paolo Carlini <pcarlini@suse.de>
1337
1338 PR c++/35338
1339 * error.c (dump_type): Handle FIXED_POINT_TYPE.
1340 (dump_expr): Handle FIXED_CST.
1341
1342 2008-02-24 Jason Merrill <jason@redhat.com>
1343
1344 * parser.c (cp_parser_declaration): Handle "inline namespace".
1345 (cp_parser_namespace_definition): Likewise.
1346
1347 PR c++/33486
1348 * name-lookup.c (arg_assoc_namespace): Look down into inline
1349 namespaces, too.
1350
1351 2008-02-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1352
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.
1360
1361 2008-02-24 Paolo Carlini <pcarlini@suse.de>
1362
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.
1366
1367 2008-02-24 Danny Smith <dannysmith@users.sourceforge.net>
1368
1369 PR c++/34749
1370 * friend.c (do_friend): Call cplus_decl_attributes earlier.
1371
1372 2008-02-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
1373
1374 PR C++/34715
1375 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
1376 template decls' function decl.
1377
1378 2008-02-22 Paolo Carlini <pcarlini@suse.de>
1379
1380 PR c++/35282
1381 Revert:
1382 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1383
1384 PR c++/28743
1385 * pt.c (determine_specialization): In case of function templates,
1386 when the type of DECL does not match FN there is no match.
1387
1388 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1389
1390 PR c/19999
1391 * typeck.c (build_binary_op): Warn about floating point
1392 comparisons if FLOAT_TYPE_P, not only for REAL_TYPE.
1393
1394 2008-02-19 Jason Merrill <jason@redhat.com>
1395
1396 PR c++/34950
1397 * pt.c (resolve_overloaded_unification): Set processing_template_decl
1398 while we look for possible bindings.
1399
1400 2008-02-19 Jakub Jelinek <jakub@redhat.com>
1401
1402 PR c++/35028
1403 * cp-gimplify.c (cxx_omp_clause_apply_fn): Handle vararg copy ctors.
1404
1405 PR c++/34964
1406 PR c++/35244
1407 * semantics.c (finish_omp_threadprivate): Do nothing for error_operand_p
1408 vars. Afterwards ensure v is VAR_DECL.
1409
1410 PR c++/35078
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
1414 early.
1415
1416 2008-02-15 Douglas Gregor <doug.gregor@gmail.com>
1417
1418 PR c++/35023
1419 PR c++/35024
1420 PR c++/35026
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
1425 ourselves.
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.
1433
1434 2008-02-14 Douglas Gregor <doug.gregor@gmail.com>
1435
1436 PR c++/34050
1437 * pt.c (tsubst_initializer_list): Deal with the use of
1438 VOID_TYPE_NODE to indicate value-initialization of the bases.
1439
1440 2008-02-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1441 Jason Merrill <jason@redhat.com>
1442
1443 PR c++/5645
1444 PR c++/11159
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.
1449
1450 2008-02-14 Paolo Carlini <pcarlini@suse.de>
1451
1452 PR c++/28743
1453 * pt.c (determine_specialization): In case of function templates,
1454 when the type of DECL does not match FN there is no match.
1455
1456 2008-02-13 Jakub Jelinek <jakub@redhat.com>
1457 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1458
1459 PR c++/35138
1460 * parser.c (cp_parser_pseudo_destructor_name): If next tokens
1461 are not identifier :: ~, return before calling cp_parser_type_name.
1462
1463 2008-02-13 Jason Merrill <jason@redhat.com>
1464
1465 PR c++/34962, c++/34937, c++/34939
1466 * decl2.c (is_late_template_attribute): Always defer attributes
1467 vector_size and weak.
1468
1469 PR c++/34774
1470 * pt.c (value_dependent_expression_p): Look into DECL_INITIAL
1471 of enumerators, too.
1472
1473 2008-02-12 Jason Merrill <jason@redhat.com>
1474
1475 PR c++/34824
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.
1478
1479 2008-02-12 Steven Bosscher <steven@gcc.gnu.org>
1480
1481 PR c++/29048
1482 * semantics.c (finish_qualified_id_expr): Avoid duplicate access
1483 check here, too.
1484
1485 2008-02-12 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR c++/34862
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.
1491
1492 2008-02-11 Jason Merrill <jason@redhat.com>
1493
1494 PR c++/35097
1495 * pt.c (tsubst): Don't look up a template typedef in an explicit
1496 specialization.
1497
1498 2008-02-11 Douglas Gregor <doug.gregor@gmail.com>
1499
1500 PR c++/35113
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
1504 main variant.
1505
1506 2008-02-11 Paolo Carlini <pcarlini@suse.de>
1507
1508 PR c++/35077
1509 * decl.c (groktypename): Check grokdeclarator return.
1510
1511 2008-02-10 Jason Merrill <jason@redhat.com>
1512
1513 PR c++/34094
1514 * decl2.c (cp_write_global_declarations): Don't write out static
1515 data members with DECL_IN_AGGR_P set.
1516
1517 2008-02-08 Jason Merrill <jason@redhat.com>
1518
1519 PR c++/35116
1520 * tree.c (build_target_expr_with_type): Handle void initializer.
1521 (bot_manip): Remap slot before recursing.
1522
1523 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1524
1525 PR other/35107
1526 * Make-lang.in (cc1plus-dummy, cc1plus): Add $(GMPLIBS).
1527
1528 2008-02-06 Alexandre Oliva <aoliva@redhat.com>
1529
1530 PR c++/35056
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.
1535
1536 2008-02-06 Douglas Gregor <doug.gregor@gmail.com>
1537
1538 PR c++/35049
1539 PR c++/35096
1540 * typeck.c (structural_comptypes): Call cp_comptypes.
1541 (comptypes): New; called from the C/C++ common bits to perform
1542 strict checks.
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.
1553
1554 2008-02-05 Jakub Jelinek <jakub@redhat.com>
1555
1556 PR c++/33553
1557 * pt.c (tsubst) <case INTEGER_TYPE>: Don't issue error if max is
1558 value dependent expression.
1559
1560 2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
1561
1562 PR c++/35074
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.
1567
1568 2008-02-04 Richard Guenther <rguenther@suse.de>
1569
1570 PR java/35035
1571 * decl.c (record_builtin_java_type): Make jboolean a
1572 integer type again where its mode doesn't match that of bool.
1573
1574 2008-02-02 Jason Merrill <jason@redhat.com>
1575 Mark Mitchell <mark@codesourcery.com>
1576
1577 PR c++/33916
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.
1582
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.
1598
1599 2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
1600 Jakub Jelinek <jakub@redhat.com>
1601
1602 PR c++/34935
1603 PR c++/34936
1604 * typeck.c (structural_comptypes): Handle comparisons of
1605 VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
1606 REAL_TYPE nodes.
1607 * mangle.c (write_builtin_type): Map down to the canonical type,
1608 which will be one of the predefined type nodes.
1609
1610 2008-01-29 Michael Meissner <michael.meissner@amd.com>
1611
1612 PR 35004
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
1615 codes.
1616
1617 2008-01-29 Douglas Gregor <doug.gregor@gmail.com>
1618
1619 PR c++/34055
1620 PR c++/34103
1621 PR c++/34219
1622 PR c++/34606
1623 PR c++/34753
1624 PR c++/34754
1625 PR c++/34755
1626 PR c++/34919
1627 PR c++/34961
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
1632 signature.
1633 * pt.c (struct find_parameter_pack_data): Remove
1634 SET_PACKS_TO_ERROR.
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
1639 tree*.
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
1645 error.
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
1654 condition.
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.
1660
1661 2008-01-28 Jason Merrill <jason@redhat.com>
1662
1663 PR c++/35007
1664 * class.c (build_base_path): Fix !want_pointer case.
1665
1666 2008-01-27 Jason Merrill <jason@redhat.com>
1667
1668 PR c++/27177
1669 * class.c (build_base_path): Fix previous change.
1670
1671 2008-01-26 Jakub Jelinek <jakub@redhat.com>
1672
1673 PR c++/34965
1674 * error.c (dump_expr): Handle TRUTH_AND_EXPR, TRUTH_OR_EXPR
1675 and TRUTH_XOR_EXPR.
1676
1677 2008-01-26 Richard Guenther <rguenther@suse.de>
1678
1679 PR c++/34235
1680 * typeck.c (build_binary_op): Remove code to shorten compares.
1681
1682 2008-01-25 Richard Guenther <rguenther@suse.de>
1683
1684 PR c++/33887
1685 * decl.c (record_builtin_java_type): Make __java_boolean
1686 a variant of bool.
1687 * typeck.c (structural_comptypes): Move TYPE_FOR_JAVA check
1688 after TYPE_MAIN_VARIANT check.
1689
1690 2008-01-25 Jason Merrill <jason@redhat.com>
1691
1692 PR c++/27177
1693 * class.c (build_base_path): Don't mess with virtual access if
1694 skip_evaluation.
1695 * call.c (standard_conversion): Don't check whether source type
1696 is complete.
1697
1698 * decl2.c (is_late_template_attribute): Don't defer attribute
1699 visibility just because the type is dependent.
1700
1701 2008-01-25 Jason Merrill <jason@redhat.com>
1702 Mark Mitchell <mark@codesourcery.com>
1703
1704 PR c++/31780
1705 * call.c (standard_conversion): Allow conversion from integer/real
1706 to complex.
1707 (compare_ics): Such a conversion is worse than a normal arithmetic
1708 conversion.
1709
1710 2008-01-25 Richard Guenther <rguenther@suse.de>
1711
1712 PR c++/33887
1713 * cp-lang.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Define
1714 to true.
1715
1716 2008-01-24 Paolo Carlini <pcarlini@suse.de>
1717
1718 PR c++/34603
1719 * pt.c (push_template_decl_real): Return error_mark_node in case
1720 of template definition of non-template.
1721
1722 2008-01-24 Jason Merrill <jason@redhat.com>
1723
1724 PR c++/34913
1725 * decl2.c (is_late_template_attribute): Defer any attribute with
1726 dependent args. Also defer type attributes if the type is dependent.
1727
1728 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1729 Alexandre Oliva <aoliva@redhat.com>
1730
1731 PR c++/33984
1732 * call.c (reference_binding): For bitfields use the declared bitfield
1733 type.
1734 (add_builtin_candidates): Likewise.
1735 * class.c (layout_class_type): For bitfields copy over the
1736 original type quals.
1737
1738 2008-01-22 Jason Merrill <jason@redhat.com>
1739
1740 PR c++/28560
1741 * decl.c (groktypename): Also ignore attributes on dependent
1742 possibly-class types.
1743
1744 PR c++/34912
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):
1748 No longer static.
1749 * name-lookup.h: Declare it.
1750
1751 2008-01-22 Tom Tromey <tromey@redhat.com>
1752
1753 PR c++/34829:
1754 * init.c (build_new_1): Only disallow Java aggregates.
1755
1756 2008-01-22 Jakub Jelinek <jakub@redhat.com>
1757
1758 PR c++/34607
1759 * semantics.c (finish_omp_for): Don't call c_finish_omp_for
1760 if decl or init is error_mark_node.
1761
1762 PR c++/34918
1763 * error.c (dump_expr): Handle VECTOR_CST.
1764
1765 2008-01-21 Jason Merrill <jason@redhat.com>
1766
1767 PR c++/33959
1768 * pt.c (tsubst_aggr_type): Make sure our context is complete.
1769
1770 PR c++/34573
1771 * pt.c (retrieve_local_specialization): Robustify.
1772 (tsubst_pack_expansion, tsubst_decl): Remove redundant checks.
1773
1774 PR c++/34846
1775 * pt.c (tsubst): Only call retrieve_local_specialization if the
1776 original typedef was in a function template.
1777
1778 PR c++/34196
1779 * decl.c (wrap_cleanups_r): Set TRY_CATCH_IS_CLEANUP.
1780
1781 2008-01-21 Richard Guenther <rguenther@suse.de>
1782
1783 PR c++/34850
1784 * error.c (cp_print_error_function): Deal with recursive
1785 BLOCK trees.
1786
1787 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1788
1789 PR c++/34891
1790 * error.c (dump_expr): Deal with VIEW_CONVERT_EXPR.
1791
1792 2008-01-20 Paolo Carlini <pcarlini@suse.de>
1793
1794 PR c++/34776
1795 PR c++/34486
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.
1799
1800 2008-01-18 Ian Lance Taylor <iant@google.com>
1801
1802 PR c++/33407
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.
1806
1807 2008-01-16 Richard Guenther <rguenther@suse.de>
1808
1809 PR c++/33819
1810 * typeck.c (is_bitfield_expr_with_lowered_type): Recurse
1811 for conversions to type variants.
1812
1813 2008-01-15 Andreas Tobler <a.tobler@schweiz.org>
1814
1815 * parser.c (cp_parser_template_parameter): Fix C90 issue with mixing
1816 declaration and code. Update copyright year.
1817
1818 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1819
1820 PR c++/34399
1821 * friend.c (do_friend): Don't query TYPE_BEING_DEFINED unless we
1822 know we have a class type.
1823
1824 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1825
1826 PR c++/34751
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.
1841
1842 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1843
1844 PR c++/34051
1845 PR c++/34055
1846 PR c++/34102
1847 PR c++/34103
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.
1873
1874 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1875
1876 PR c++/34314
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
1881 parameter packs.
1882 * pt.c (redeclare_class_template): When redeclaring a class
1883 template, check for collisions between template parameters and
1884 template parameter packs.
1885
1886 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1887
1888 PR c++/33964
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.
1899
1900 2008-01-15 Douglas Gregor <doug.gregor@gmail.com>
1901
1902 PR c++/34052
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
1910 parameter list.
1911
1912 2008-01-12 Doug Kwan <dougkwan@google.com>
1913
1914 * decl.c: (grokdeclarator): Use OPT_Wignored_qualifiers
1915 instead of OPT_Wreturn_type in warning due to ignored return type
1916 qualifiers.
1917 * pt.c: (tsubst_function_type): Use OPT_Wignored_qualifiers
1918 instead of OPT_Wreturn_type in warning due to ignored return type
1919 qualifiers.
1920
1921 2008-01-08 Jakub Jelinek <jakub@redhat.com>
1922
1923 PR c++/33890
1924 * semantics.c (finish_omp_for): Don't call
1925 fold_build_cleanup_point_expr if processing_template_decl.
1926
1927 2008-01-04 Paolo Carlini <pcarlini@suse.de>
1928 Jakub Jelinek <jakub@redhat.com>
1929
1930 PR c++/34611
1931 * error.c (dump_template_argument): Deal with TREE_LIST.
1932
1933 2008-01-01 Douglas Gregor <doug.gregor@gmail.com>
1934
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.
1938
1939 2007-12-20 Jason Merrill <jason@redhat.com>
1940
1941 PR c++/34111
1942 * call.c (standard_conversion): Derived-to-base is considered a
1943 standard conversion.
1944
1945 2007-12-19 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR c++/34513
1948 * parser.c (cp_parser_omp_parallel): For non-combined parallel
1949 call cp_parser_statement rather than
1950 cp_parser_already_scoped_statement.
1951
1952 2007-12-18 Jason Merrill <jason@redhat.com>
1953
1954 PR c++/34206
1955 * pt.c (tsubst_aggr_type): Do nothing if the type already doesn't
1956 use template parms.
1957 (dependent_type_p_r): Handle the domain of an array.
1958
1959 2007-12-18 Douglas Gregor <doug.gregor@gmail.com>
1960 Jakub Jelinek <jakub@redhat.com>
1961
1962 PR c++/32565
1963 PR c++/33943
1964 PR c++/33965
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
1969 include tf_error.
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.
1973
1974 2007-12-18 Jakub Jelinek <jakub@redhat.com>
1975
1976 PR c++/34488
1977 * decl.c (grokdeclarator): Reject friend sfk_constructor
1978 FUNCTION_TYPE.
1979
1980 2007-12-17 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR c/34506
1983 * parser.c (cp_parser_omp_all_clauses): Accept optional comma
1984 in between clauses.
1985
1986 2007-12-15 Alexandre Oliva <aoliva@redhat.com>
1987
1988 PR debug/7081
1989 * cp-lang.c (cp_classify_record): New.
1990 (LANG_HOOKS_CLASSIFY_RECORD): Override.
1991
1992 2007-12-11 Jakub Jelinek <jakub@redhat.com>
1993
1994 PR c++/34238
1995 * decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.
1996
1997 PR c++/34364
1998 * rtti.c (build_dynamic_cast): Call convert_from_reference even for
1999 dynamic_cast in a template.
2000
2001 2007-12-10 Simon Martin <simartin@users.sourceforge.net>
2002
2003 PR c++/34059
2004 * typeck.c (build_class_member_access_expr): Compute MEMBER_SCOPE from
2005 MEMBER's BASELINK_ACCESS_BINFO instead of its BASELINK_BINFO.
2006
2007 2007-12-10 Jakub Jelinek <jakub@redhat.com>
2008
2009 PR c++/34395
2010 * error.c (dump_type_prefix, dump_type_suffix): Handle
2011 TYPE_PACK_EXPANSION.
2012
2013 PR c++/34394
2014 * error.c (dump_expr): Handle ABS_EXPR.
2015
2016 2007-12-09 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c++/34178
2019 PR c++/34340
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.
2025
2026 2007-12-06 Jakub Jelinek <jakub@redhat.com>
2027
2028 PR c++/34336
2029 * tree.c (stabilize_call, stabilize_init): Do nothing if
2030 processing_template_decl.
2031
2032 2007-12-05 Jakub Jelinek <jakub@redhat.com>
2033
2034 PR c++/34271
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.
2039
2040 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2041
2042 PR c++/34101
2043 * name-lookup.c (arg_assoc_template_arg): Recurse on argument
2044 packs.
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).
2047
2048 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2049
2050 PR c++/33509
2051 * pt.c (tsubst_exception_specification): Handle substitutions into
2052 member templates, where tsubst_pack_expansion returns a
2053 TYPE_PACK_EXPANSION.
2054
2055 2007-12-04 Douglas Gregor <doug.gregor@gmail.com>
2056
2057 PR c++/33091
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.
2064
2065 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2066
2067 PR c++/34061
2068 * pt.c (current_template_args): Use error_operand_p.
2069
2070 2007-12-02 Paolo Carlini <pcarlini@suse.de>
2071
2072 PR c++/34273
2073 * error.c (dump_decl): Handle TREE_BINFO.
2074
2075 2007-12-01 Ollie Wild <aaw@google.com>
2076
2077 PR c++/8171
2078 * typeck.c (build_binary_op): Add conversion of pointers to function
2079 members appearing as operands to the equality operators.
2080
2081 2007-11-30 Jakub Jelinek <jakub@redhat.com>
2082
2083 PR c++/34275
2084 * error.c (dump_expr): Handle OBJ_TYPE_REF.
2085
2086 2007-11-29 Jakub Jelinek <jakub@redhat.com>
2087
2088 PR c++/34270
2089 * tree.c (lvalue_p_1) <case COND_EXPR>: Handle x ?: y
2090 in templates.
2091 * typeck.c (is_bitfield_expr_with_lowered_type) <case COND_EXPR>:
2092 Likewise.
2093
2094 PR c++/34267
2095 PR c++/34268
2096 * parser.c (cp_parser_decltype): Don't call finish_id_expression
2097 on ~type.
2098 * semantics.c (finish_decltype_type): Issue error on types, TYPE_DECLs
2099 and ~type early.
2100
2101 2007-11-27 Jakub Jelinek <jakub@redhat.com>
2102
2103 PR tree-optimization/34181
2104 * method.c (use_thunk): Don't inline the call in the thunk.
2105
2106 PR c++/34213
2107 * tree.c (decl_linkage): Static data members and static member
2108 functions in anonymous ns classes are lk_external.
2109
2110 2007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
2111
2112 PR c++/34081
2113 * decl.c (start_preparsed_function): Pass
2114 processing_template_decl for the new allocate_struct_function
2115 parameter.
2116
2117 2007-11-25 Richard Guenther <rguenther@suse.de>
2118
2119 * decl.c (poplevel): Use BLOCK_CHAIN.
2120
2121 2007-11-24 Ollie Wild <aaw@google.com>
2122
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.
2126
2127 2007-11-23 Jakub Jelinek <jakub@redhat.com>
2128
2129 PR c++/30293
2130 PR c++/30294
2131 * decl.c (cp_finish_decl): Disallow variable or field
2132 definitions if extern "Java" aggregates.
2133 (grokparms): Disallow parameters with extern "Java"
2134 aggregates.
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.
2139
2140 2007-11-23 Mark Mitchell <mark@codesourcery.com>
2141 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2142
2143 PR c++/5310
2144 * call.c (convert_like_real): Build a zero constant when __null is
2145 converted to an integer type.
2146
2147 2007-11-22 Jakub Jelinek <jakub@redhat.com>
2148
2149 PR c++/34094
2150 * decl2.c (cp_write_global_declarations): Issue error about static
2151 data members in anonymous namespace which are declared and used,
2152 but not defined.
2153
2154 2007-11-20 Jakub Jelinek <jakub@redhat.com>
2155
2156 PR c++/34089
2157 * parser.c (cp_parser_class_head): Reject function template ids.
2158
2159 PR c++/28879
2160 * tree.c (build_cplus_array_type_1): Don't pass any VLA types
2161 when processing_template_decl to build_array_type.
2162
2163 PR c++/33962
2164 * pt.c (more_specialized_fn): Don't segfault if one or
2165 both argument list end with ellipsis.
2166
2167 2007-11-18 Jakub Jelinek <jakub@redhat.com>
2168
2169 PR c++/30988
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.
2173
2174 2007-11-16 Jakub Jelinek <jakub@redhat.com>
2175
2176 PR c++/34100
2177 * pt.c (apply_late_template_attributes): Do nothing if decl's type is
2178 error_mark_node.
2179
2180 2007-11-13 Jakub Jelinek <jakub@redhat.com>
2181
2182 PR c++/34054
2183 PR c++/34056
2184 PR c++/34057
2185 PR c++/34058
2186 PR c++/34060
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.
2194
2195 PR c++/29225
2196 * call.c (build_new_op): Call resolve_args before calling
2197 build_over_call.
2198
2199 2007-11-11 Tom Tromey <tromey@redhat.com>
2200
2201 PR c++/17577:
2202 * lex.c (handle_pragma_implementation): Use cpp_included_before.
2203
2204 2007-11-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2205
2206 PR c++/8570
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.
2211
2212 2007-11-11 Jakub Jelinek <jakub@redhat.com>
2213
2214 PR c++/34068
2215 * semantics.c (finish_pseudo_destructor_expr): Handle
2216 object == error_mark_node.
2217
2218 2007-11-10 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR c++/32241
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.
2225
2226 2007-11-09 Douglas Gregor <doug.gregor@gmail.com>
2227
2228 PR c++/33510
2229 * decl.c (cp_complete_array_type): If any of the initializer
2230 elements are pack expansions, don't compute the array size yet.
2231
2232 2007-11-08 Andrew Pinski <pinskia@gmail.com>
2233
2234 PR c++/30297:
2235 * tree.c (decl_linkage): Fields have no linkage.
2236
2237 2007-11-08 Daniel Jacobowitz <dan@codesourcery.com>
2238
2239 * class.c (build_ctor_vtbl_group): Lay out the new type and decl.
2240
2241 2007-11-07 Douglas Gregor <doug.gregor@gmail.com>
2242
2243 PR c++/33045
2244 PR c++/33837
2245 PR c++/33838
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
2249 argument.
2250
2251 2007-11-07 Jakub Jelinek <jakub@redhat.com>
2252
2253 PR c++/33501
2254 * call.c (build_over_call): Don't check TREE_ADDRESSABLE
2255 on incomplete type.
2256
2257 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2258
2259 PR c++/33977
2260 PR c++/33886
2261 * tree.c (c_build_qualified_type): Define bridge to
2262 cp_build_qualified_type.
2263
2264 2007-11-06 Douglas Gregor <doug.gregor@gmail.com>
2265
2266 PR c++/31439
2267 PR c++/32114
2268 PR c++/32115
2269 PR c++/32125
2270 PR c++/32126
2271 PR c++/32127
2272 PR c++/32128
2273 PR c++/32253
2274 PR c++/32566
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
2278 due to errors.
2279 (end_of_base): Ditto.
2280 * tree.c (canonical_type_variant): Be careful with
2281 ERROR_MARK_NODE.
2282 * cp-tree.h (check_for_bare_parameter_packs): Now accepts a
2283 tree*.
2284 * pt.c (find_parameter_pack_data): Add set_packs_to_error field,
2285 which states whether parameter packs should be replaced with
2286 ERROR_MARK_NODE.
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
2291 ERROR_MARK_NODE.
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.
2317
2318 2007-11-06 Jakub Jelinek <jakub@redhat.com>
2319
2320 PR target/33168
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.
2324
2325 PR c++/33894
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.
2332
2333 2007-11-05 H.J. Lu <hongjiu.lu@intel.com>
2334
2335 PR c++/33871
2336 * decl2.c (constrain_visibility): Clear DECL_ONE_ONLY if marked
2337 local.
2338
2339 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2340
2341 PR c++/33996
2342 PR c++/33235
2343 PR c++/33930
2344 * typeck.c (merge_types): Don't lose rvalue references when
2345 merging types.
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.
2350
2351 2007-11-05 Douglas Gregor <doug.gregor@gmail.com>
2352
2353 PR c++/33939
2354 * pt.c (unify_pack_expansion): bring handling of function call
2355 arguments into line with type_unification_real.
2356
2357 2007-11-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2358
2359 * typeck.c (build_binary_op): Use pedwarn instead of error for
2360 consistency.
2361
2362 2007-11-05 Jakub Jelinek <jakub@redhat.com>
2363
2364 PR c++/33836
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.
2368
2369 PR c++/33969
2370 * decl.c (grokdeclarator): Don't call build_memfn_type if type
2371 is neither FUNCTION_TYPE nor METHOD_TYPE.
2372
2373 2007-11-02 Jakub Jelinek <jakub@redhat.com>
2374
2375 PR c++/33516
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.
2379
2380 2007-11-02 Paolo Carlini <pcarlini@suse.de>
2381
2382 PR c++/33495
2383 * error.c (dump_expr): Deal specially with statements.
2384
2385 2007-11-01 Jason Merrill <jason@redhat.com>
2386
2387 PR c++/30897
2388 * pt.c (push_template_decl_real): Set DECL_CONTEXT on template
2389 template parms.
2390 (lookup_template_class): Use it to get the outer template args
2391 for instantiating one.
2392
2393 PR c++/29236
2394 * pt.c (reduce_template_parm_level): tsubst the parameters
2395 of a template template parm.
2396
2397 2007-11-01 Douglas Gregor <doug.gregor@gmail.com>
2398
2399 PR c++/33955
2400 * pt.c (find_parameter_packs_r): Handle TYPENAME_TYPE.
2401
2402 2007-11-01 Jakub Jelinek <jakub@redhat.com>
2403
2404 PR c++/32384
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
2408 PSEUDO_DTOR_EXPR.
2409
2410 PR c++/32260
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.
2414
2415 2007-10-31 Paolo Carlini <pcarlini@suse.de>
2416
2417 PR c++/33494
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.
2424
2425 * cxx-pretty-print.c (pp_cxx_expression, case NON_DEPENDENT_EXPR):
2426 Fix typo.
2427
2428 2007-10-31 Christian Bruel <christian.bruel@st.com>
2429 Mark Mitchell <mark@codesourcery.com>
2430
2431 PR c++/19531
2432 * typeck.c (check_return_expr): Don't set named_return_value_okay_p
2433 if retval is volatile.
2434
2435 2007-10-30 Jakub Jelinek <jakub@redhat.com>
2436
2437 PR c++/33616
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.
2441
2442 2007-10-30 Douglas Gregor <doug.gregor@gmail.com>
2443
2444 PR c++/31993
2445 PR c++/32252
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.
2454
2455 2007-10-29 Jakub Jelinek <jakub@redhat.com>
2456
2457 PR c++/33841
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
2462 check_field_decl.
2463
2464 2007-10-28 Paolo Carlini <pcarlini@suse.de>
2465 Mark Mitchell <mark@codesourcery.com>
2466
2467 PR c++/30659
2468 * pt.c (do_decl_instantiation): If the VAR_DECL is not a
2469 class member error out and return.
2470
2471 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2472
2473 * error.c (reinit_cxx_pp): Initialize cxx_pp->enclosing_scope
2474 to current_function_decl rather than 0.
2475
2476 PR c++/33844
2477 * cxx-pretty-print.c (pp_cxx_pm_expression) <case MEMBER_REF>: Print
2478 ->* rather than .*.
2479 * error.c (dump_expr): Handle MEMBER_REF and DOTSTAR_EXPR.
2480
2481 2007-10-27 Jason Merrill <jason@redhat.com>
2482
2483 PR c++/5247
2484 * call.c (convert_default_arg): Detect recursion.
2485
2486 2007-10-27 Jakub Jelinek <jakub@redhat.com>
2487
2488 PR c++/33842
2489 * cxx-pretty-print.h (pp_cxx_offsetof_expression): New prototype.
2490 * cxx-pretty-print.c (pp_cxx_primary_expression): Handle
2491 OFFSETOF_EXPR.
2492 (pp_cxx_offsetof_expression_1, pp_cxx_offsetof_expression): New
2493 functions.
2494 * error.c (dump_expr): Handle OFFSETOF_EXPR.
2495
2496 2007-10-26 Jason Merrill <jason@redhat.com>
2497
2498 PR c++/24791
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.
2503
2504 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2505
2506 PR c++/31988
2507 * decl2.c (coerce_new_type): Do not allow a default argument for
2508 the first parameter.
2509
2510 2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
2511
2512 PR c++/33839
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
2515 IDENTIFIER_NODE.
2516
2517 2007-10-26 Jakub Jelinek <jakub@redhat.com>
2518
2519 PR c++/33744
2520 * parser.c (cp_parser_parenthesized_expression_list): Set
2521 greater_than_is_operator_p to true in between the parens.
2522
2523 2007-10-26 Paolo Carlini <pcarlini@suse.de>
2524
2525 PR c++/31747
2526 * decl.c (grokdeclarator): In case of conflicting specifiers
2527 just return error_mark_node.
2528
2529 2007-10-26 Ollie Wild <aaw@google.com>
2530
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
2534 with c_expand_expr.
2535
2536 2007-10-25 Paolo Carlini <pcarlini@suse.de>
2537
2538 PR c++/33843
2539 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BIT_NOT_EXPR.
2540
2541 2007-10-23 Jason Merrill <jason@redhat.com>
2542
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
2547 temporary creation.
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
2556 second conversion.
2557 * cp-tree.h (LOOKUP_CONSTRUCTOR_CALLABLE): Remove.
2558
2559 2007-10-22 Jakub Jelinek <jakub@redhat.com>
2560
2561 PR c++/33372
2562 * semantics.c (finish_omp_clauses): Check !type_dependent_expression_p
2563 before checking if its type is integral.
2564
2565 2007-10-22 Jason Merrill <jason@redhat.com>
2566
2567 PR c++/33620
2568 * class.c (finish_struct_bits): Copy TYPE_ATTRIBUTES.
2569 * pt.c (apply_late_template_attributes): Splice out dependent
2570 attributes from DECL_ATTRIBUTES.
2571
2572 * decl.c (cxx_maybe_build_cleanup): Use build_address.
2573
2574 2007-10-17 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2575
2576 * typeck.c (build_binary_op) : Use appropriate warning option
2577 instead of unnamed warning.
2578
2579 2007-10-16 Paolo Carlini <pcarlini@suse.de>
2580
2581 PR c++/31446
2582 * pt.c (current_template_args): Do not change TREE_LIST elements
2583 with a TREE_VALUE of error_mark_node.
2584
2585 2007-10-16 Mark Mitchell <mark@codesourcery.com>
2586
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
2590 the type.
2591 (grokdeclarator): Clarify comment.
2592
2593 2007-10-14 Andrew Pinski <pinskia@gmail.com>
2594
2595 PR c++/30303
2596 * decl.c (grokfndecl): Return NULL after the "definition of
2597 implicitly-declared" error happened.
2598
2599 2007-10-12 Simon Martin <simartin@users.sourceforge.net>
2600
2601 PR c++/26698
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).
2606
2607 2007-10-12 Paolo Carlini <pcarlini@suse.de>
2608
2609 * pt.c (tsubst): Use template_parm_level_and_index.
2610
2611 2007-10-12 Jakub Jelinek <jakub@redhat.com>
2612
2613 PR c++/32121
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.
2618
2619 2007-10-11 Paolo Carlini <pcarlini@suse.de>
2620
2621 PR c++/33461
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
2625 error.
2626 (tsubst_decl): Check for error_mark_node the return value of the
2627 first tsubst in 'case VAR_DECL'.
2628
2629 2007-10-08 Ollie Wild <aaw@google.com>
2630
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.
2635
2636 2007-10-04 Jason Merrill <jason@redhat.com>
2637
2638 PR c++/20416
2639 * call.c (initialize_reference): Handle local static reference
2640 temps properly.
2641
2642 2007-10-03 Jason Merrill <jason@redhat.com>
2643
2644 PR c++/32470
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.
2652
2653 PR c++/11756
2654 * mangle.c (write_type) [TYPEOF_TYPE]: Just sorry.
2655
2656 2007-10-03 Alexandre Oliva <aoliva@redhat.com>
2657
2658 * decl.c (duplicate_decls): Preserve linkage flags for mere
2659 redeclarations of gnu_inline definitions.
2660
2661 2007-10-03 Jason Merrill <jason@redhat.com>
2662
2663 PR c++/15764
2664 * decl.c (wrap_cleanups_r): New fn.
2665 (wrap_temporary_cleanups): New fn.
2666 (initialize_local_var): Call it.
2667
2668 2007-09-29 Jason Merrill <jason@redhat.com>
2669
2670 PR c++/33094
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.
2673
2674 2007-09-28 Ollie Wild <aaw@google.com>
2675
2676 Revert
2677 2007-09-27 Ollie Wild <aaw@google.com>
2678
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.
2683
2684 2007-09-28 Jason Merrill <jason@redhat.com>
2685
2686 PR c++/10179
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.
2690
2691 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2692
2693 PR c++/33213
2694 * error.c (dump_decl): Deal with TYPE_PACK_EXPANSION.
2695
2696 2007-09-28 Paolo Carlini <pcarlini@suse.de>
2697
2698 PR c++/33118
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.
2702
2703 2007-09-28 Jakub Jelinek <jakub@redhat.com>
2704
2705 PR c++/31434
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.
2709
2710 2007-09-27 Ollie Wild <aaw@google.com>
2711
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.
2716
2717 2007-09-27 Jason Merrill <jason@redhat.com>
2718
2719 PR c++/33571
2720 * decl2.c (is_late_template_attribute): Don't crash on unknown
2721 attribute.
2722
2723 2007-09-27 Paolo Carlini <pcarlini@suse.de>
2724
2725 PR c++/33493
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.
2730
2731 2007-09-27 Jakub Jelinek <jakub@redhat.com>
2732
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
2736 virtual backtrace.
2737 * cp-tree.h (struct diagnostic_info): New forward decl.
2738 (cxx_print_error_function): Add third argument.
2739
2740 2007-09-25 Simon Martin <simartin@users.sourceforge.net>
2741
2742 PR c++/33207
2743 * name-lookup.c (pushtag): Do not create an implicit typedef before
2744 the associated type declaration is known to be valid.
2745
2746 2007-09-25 Jakub Jelinek <jakub@redhat.com>
2747
2748 * tree.c (cxx_printable_name): Compare FUNCTION_DECL uids
2749 rather than pointers.
2750
2751 2007-09-24 Danny Smith <dannysmith@user.sourceforge.net>
2752
2753 PR c++/14688
2754 * search.c (check_final_overrider): Fail if
2755 targetm.comp_type_attributes returns 0.
2756
2757 2007-09-24 Jason Merrill <jason@redhat.com>
2758
2759 PR c++/33239
2760 * pt.c (resolve_typename_type): Don't look things up in the original
2761 template if it would mean losing template arguments.
2762
2763 2007-09-24 Jakub Jelinek <jakub@redhat.com>
2764
2765 PR c++/33506
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.
2769
2770 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2771
2772 PR c++/33185
2773 * tree.c (cp_build_qualified_type_real): Build a canonical
2774 ARRAY_TYPE if the original ARRAY_TYPE was not a canonical type.
2775
2776 2007-09-24 Douglas Gregor <doug.gregor@gmail.com>
2777
2778 PR c++/33112
2779 PR c++/33185
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
2783 correctly.
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.
2787
2788 2007-09-23 Jason Merrill <jason@redhat.com>
2789
2790 PR c++/16370
2791 * decl.c (grokdeclarator): Look through implicit TYPE_DECLs
2792 for deprecation warnings.
2793
2794 2007-09-22 Jason Merrill <jason@redhat.com>
2795
2796 PR c++/15269
2797 * call.c (build_over_call): Warn about deprecated virtuals.
2798
2799 PR c++/19407
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.
2812
2813 2007-09-20 Jakub Jelinek <jakub@redhat.com>
2814
2815 PR c++/33496
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.
2820
2821 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2822
2823 PR c++/33460
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).
2828
2829 2007-09-19 Jason Merrill <jason@redhat.com>
2830
2831 PR c++/7586
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
2837 tagged types.
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.
2841
2842 2007-09-20 Paolo Carlini <pcarlini@suse.de>
2843
2844 PR c++/33459
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.
2847
2848 2007-09-18 Jason Merrill <jason@redhat.com>
2849
2850 PR c++/17743
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.
2860
2861 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2862
2863 PR c++/33462 (again)
2864 * cxx-pretty-print.c (pp_cxx_va_arg_expression): Print
2865 va_arg instead of __builtin_va_arg.
2866
2867 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2868
2869 PR c++/33462
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.
2874
2875 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2876
2877 PR c++/33463
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.
2884
2885 2007-09-18 Paolo Carlini <pcarlini@suse.de>
2886
2887 PR c++/33464
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.
2892
2893 2007-09-16 Paolo Carlini <pcarlini@suse.de>
2894
2895 PR c++/33124
2896 * init.c (build_new): Remove warning for zero-element
2897 allocations.
2898
2899 2007-09-16 Nathan Sidwell <nathan@codesourcery.com>
2900
2901 PR c++/32756
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.
2906
2907 2007-09-14 Jason Merrill <jason@redhat.com>
2908
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.
2916
2917 2007-09-13 Tom Tromey <tromey@redhat.com>
2918
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
2922 lexer is NULL.
2923
2924 2007-09-11 Jan Hubicka <jh@suse.cz>
2925
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.
2933
2934 2007-09-09 David Daney <ddaney@avtrex.com>
2935
2936 PR c++/33324
2937 * init.c (build_new_1): Use POINTER_PLUS_EXPR instead of MINUS_EXPR
2938 to calculate cookie_ptr.
2939
2940 2007-09-08 Jason Merrill <jason@redhat.com>
2941
2942 PR c++/33342
2943 * pt.c (most_specialized_class): Set processing_template_decl
2944 while tsubsting partial spec args.
2945
2946 2007-09-06 Jason Merrill <jason@redhat.com>
2947
2948 * decl2.c (get_guard): Copy visibility from the guarded variable.
2949
2950 2007-09-06 Jan Hubicka <jh@suse.cz>
2951
2952 * semantics.c (expand_body): Do not mark arguments of clones used.
2953
2954 2007-09-06 Paolo Carlini <pcarlini@suse.de>
2955
2956 PR c++/32674
2957 * decl.c (cp_finish_decl): When processing_template_decl,
2958 deal correctly with init as TREE_LIST.
2959
2960 2007-09-06 Tom Tromey <tromey@redhat.com>
2961
2962 * decl.c (finish_function): Put return's location on line zero of
2963 file.
2964
2965 2007-09-05 Jason Merrill <jason@redhat.com>
2966
2967 PR c++/15745
2968 * except.c (prepare_eh_type): Use type_decays_to.
2969
2970 PR c++/15097
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.
2975
2976 2007-09-06 Jakub Jelinek <jakub@redhat.com>
2977
2978 * decl.c (duplicate_decls): Set TREE_NOTHROW on __builtin_XX
2979 decl if a prototype for XX is provided with throw().
2980
2981 PR c++/33289
2982 * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
2983 on __*_chk non-__builtin_* decls.
2984
2985 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2986
2987 PR c++/30302
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.
2992
2993 2007-09-05 Jan Hubicka <jh@suse.cz>
2994
2995 * sematics.c (expand_body): Remove unnecesary import_export_decl
2996 call, DECL_EXTERNAL checks and current_function_decl saving.
2997
2998 2007-09-05 Paolo Carlini <pcarlini@suse.de>
2999
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.
3003
3004 2007-09-04 Jason Merrill <jason@redhat.com>
3005
3006 * except.c (initialize_handler_parm): Use
3007 fold_build_cleanup_point_expr.
3008
3009 PR c++/31419
3010 * call.c (reference_binding): Don't look for user-defined conversions
3011 to the same type.
3012
3013 PR c++/31411
3014 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside
3015 the MUST_NOT_THROW_EXPR.
3016
3017 2007-09-04 Richard Sandiford <richard@codesourcery.com>
3018
3019 * decl.c (cp_finish_decl): Call determine_visibility before
3020 make_rtl_for_nonlocal_decl.
3021
3022 2007-09-04 Jason Merrill <jason@redhat.com>
3023
3024 PR c++/14032
3025 * pt.c (most_specialized_class): Substitute outer template
3026 arguments into the arguments of a member template partial
3027 specialization.
3028 (strip_innermost_template_args): New fn.
3029
3030 2007-09-03 Daniel Jacobowitz <dan@codesourcery.com>
3031
3032 * Make-lang.in (g++spec.o): Remove SHLIB_MULTILIB.
3033
3034 2007-09-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3035
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):
3041 Likewise,
3042
3043 2007-09-02 Paolo Carlini <pcarlini@suse.de>
3044
3045 PR c++/33208
3046 * typeck.c (build_unary_op): Fix error message for
3047 Boolean expression as operand to operator--.
3048
3049 2007-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3050
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):
3053 Likewise.
3054
3055 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3056
3057 PR c++/32597
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
3062 variable.
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.
3066
3067 2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
3068
3069 * mangle.c (write_type): Change mangling of rvalue reference from
3070 `RR' to `O'.
3071
3072 2007-08-31 Jakub Jelinek <jakub@redhat.com>
3073
3074 * decl.c (duplicate_decls): Remove duplicated line.
3075
3076 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3077
3078 PR c++/33210
3079 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
3080 BOUND_TEMPLATE_TEMPLATE_PARM.
3081
3082 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3083
3084 PR c++/32113
3085 * search.c (lookup_member): Check the name argument for
3086 error_mark_node.
3087
3088 2007-08-31 Paolo Carlini <pcarlini@suse.de>
3089
3090 PR c++/33212
3091 * parser.c (cp_parser_trait_expr): Check rerurn value of
3092 cp_parser_type_id.
3093
3094 2007-08-30 Ollie Wild <aaw@google.com>
3095
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
3101 members.
3102 (build_static_cast_1): Check can_convert for conversions in either
3103 direction.
3104 (get_delta_difference_1): New function.
3105 (get_delta_difference): Refactor to call get_delta_difference_1.
3106
3107 2007-08-30 Jakub Jelinek <jakub@redhat.com>
3108
3109 * decl.c (start_preparsed_function): Set
3110 DECL_DISREGARD_INLINE_LIMITS for GNU_INLINE_P functions.
3111
3112 2007-08-28 Paolo Carlini <pcarlini@suse.de>
3113
3114 PR c++/33209
3115 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
3116 BOUND_TEMPLATE_TEMPLATE_PARM.
3117
3118 2007-08-28 Jakub Jelinek <jakub@redhat.com>
3119
3120 PR c++/32596
3121 PR c++/32400
3122 * pt.c (check_explicit_specialization): Set DECL_INTERFACE_KNOWN
3123 and DECL_NOT_REALLY_EXTERN if tmpl_func is not public.
3124
3125 2007-08-27 Jason Merrill <jason@redhat.com>
3126
3127 PR c++/29000
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.
3132
3133 PR c++/28558
3134 * decl.c (groktypename): Ignore attributes applied to class type.
3135
3136 2007-08-28 Richard Guenther <rguenther@suse.de>
3137
3138 * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS.
3139
3140 2007-08-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
3141
3142 * error.c (dump_expr): Handle COMPLEX_CST.
3143 * cxx-pretty-print.c (pp_cxx_primary_expression): Likewise.
3144 (pp_cxx_expression): Likewise.
3145
3146 2007-08-27 Alexandre Oliva <aoliva@redhat.com>
3147
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.
3153
3154 2007-08-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3155
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):
3179 Likewise.
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.
3195
3196 2007-08-25 Paolo Bonzini <bonzini@gnu.org>
3197
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 *".
3209
3210 * error.c (print_instantiation_partial_context): Change second
3211 parameter to a "struct tinst_level *". Replace accessor macros
3212 with field access.
3213 (print_instantiation_full_context): Likewise.
3214 * lex.c (in_main_input_context): Likewise.
3215
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 *".
3228
3229 2007-08-24 Ollie Wild <aaw@google.com>
3230
3231 * name-lookup.c (add_decl_to_level): Remove addition to vtables chain.
3232 * name-lookup.h (cp_binding_level): Remove vtables member.
3233
3234 2007-08-24 Richard Guenther <rguenther@suse.de>
3235
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):
3239 Remove define.
3240
3241 2007-08-24 Jakub Jelinek <jakub@redhat.com>
3242
3243 PR c++/32567
3244 * typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
3245 error_mark_node right away if build_expr_type_conversion
3246 returned it.
3247
3248 PR c++/32898
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.
3252
3253 PR c++/31941
3254 * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
3255 TARGET_VTABLE_USES_DESCRIPTORS targets properly.
3256
3257 2007-08-22 Jason Merrill <jason@redhat.com>
3258
3259 PR c++/29365
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.
3265
3266 2007-08-21 Jakub Jelinek <jakub@redhat.com>
3267
3268 * init.c (build_new_1): Use get_target_expr instead of save_expr.
3269
3270 2007-08-20 Pawel Sikora <pluto@pld-linux.org>
3271
3272 PR c++/7302
3273 * class.c (finish_struct_1): Warn when a class has virtual
3274 functions and accessible non-virtual destructor.
3275
3276 2007-08-20 Richard Guenther <rguenther@suse.de>
3277
3278 PR c++/22369
3279 PR c++/22451
3280 * call.c (build_new_method_call): Convert initializer to
3281 the basetype.
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
3285 pointer type.
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
3289 initialization.
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.
3293
3294 2007-08-20 Richard Guenther <rguenther@suse.de>
3295
3296 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_AUTO_VAR_IN_FN_P):
3297 Remove.
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.
3302
3303 2007-08-20 Richard Guenther <rguenther@suse.de>
3304
3305 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_WALK_SUBTREES):
3306 Remove define.
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.
3328
3329 2007-08-20 Jakub Jelinek <jakub@redhat.com>
3330
3331 PR c++/33025
3332 * init.c (build_new_1): Rename placement_var variable to placement_expr.
3333 Initialize it with save_expr rather than get_temp_regvar.
3334
3335 2007-08-17 Andrew Pinski <andrew_pinski@playstation.sony.com>
3336
3337 PR c++/28989
3338 * tree.c (lvalue_p_1 <case SAVE_EXPR>): SAVE_EXPRs are never
3339 lvalues.
3340
3341 2007-08-17 Ollie Wild <aaw@google.com>
3342
3343 PR c++/31749
3344 * name-lookup.c (do_nonmember_using_decl): Shift implicit type
3345 declarations into appropriate slots for comparison. Fix type
3346 comparison.
3347
3348 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3349
3350 PR c++/32112
3351 * error.c (dump_decl): Deal with UNBOUND_CLASS_TEMPLATE.
3352 * cxx-pretty-print.c (pp_cxx_unqualified_id): Likewise.
3353
3354 2007-08-17 Paolo Carlini <pcarlini@suse.de>
3355
3356 PR c++/32870
3357 * parser.c (cp_parser_class_head): Improve error message.
3358
3359 2007-08-16 Seongbae Park <seongbae.park@gmail.com>
3360
3361 * pt.c (instantiate_decl): Set input_location
3362 for the function end.
3363
3364 2007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3365
3366 * cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
3367 Constify.
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.
3377
3378 2007-08-16 Paolo Carlini <pcarlini@suse.de>
3379
3380 PR c++/31132
3381 * pt.c (tsubst_friend_function): When check_classfn
3382 returns error_mark_node likewise return it.
3383
3384 2007-08-15 Jakub Jelinek <jakub@redhat.com>
3385
3386 PR c++/32992
3387 * typeck.c (check_return_expr): Don't NRV optimize vars in
3388 anonymous unions.
3389 * decl.c (finish_function): Comment fix.
3390
3391 2007-08-15 Paolo Carlini <pcarlini@suse.de>
3392
3393 PR c++/33035
3394 * pt.c (push_template_decl_real): Depending on TYPE_P
3395 use either TYPE_CONTEXT or DECL_CONTEXT.
3396
3397 2007-08-14 Mark Mitchell <mark@codesourcery.com>
3398
3399 * semantics.c (finish_omp_clauses): Strip a NOP_EXPR if
3400 constructors and destructors return this.
3401
3402 2007-08-14 Paolo Carlini <pcarlini@suse.de>
3403
3404 PR c++/27211
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
3408 error_mark_node.
3409 (grokfndecl): Likewise.
3410 * pt.c (tsubst_friend_function): Likewise.
3411
3412 2007-08-14 Andrew Pinski <pinskia@gmail.com>
3413
3414 PR c++/30428
3415 * typeck.c (build_binary_op): Disallow vector float types with
3416 BIT_IOR_EXPR, BIT_AND_EXPR, and BIT_XOR_EXPR.
3417
3418 2007-08-11 Ian Lance Taylor <iant@google.com>
3419
3420 * cp-objcp-common.c (cxx_get_alias_set): Change return type to
3421 alias_set_type.
3422 * cp-tree.h (cxx_get_alias_set): Update declaration.
3423
3424 2007-08-10 Ollie Wild <aaw@google.com>
3425
3426 * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous
3427 type lookups.
3428 (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous
3429 function parameter.
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.
3433
3434 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3435
3436 * call.c (name_as_c_string): Use CONST_CAST.
3437 * decl.c (build_decl): Likewise.
3438 * parser.c (cp_parser_string_literal): Likewise.
3439
3440 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3441
3442 PR c++/17763
3443 * error.c (dump_expr): Consistently use the *_cxx_*
3444 variants of the pretty-print functions.
3445
3446 2007-08-10 Paolo Carlini <pcarlini@suse.de>
3447
3448 PR c++/22256
3449 * decl.c (check_special_function_return_type): Just error
3450 on return type specified for conversion operator.
3451
3452 2007-08-09 Daniel Berlin <dberlin@dberlin.org>
3453
3454 * typeck2.c (readonly_error): Handle general expressions.
3455 * error.c (dump_expr): Handle POINTER_PLUS_EXPR
3456
3457 2007-08-06 Dan Hipschman <dsh@google.com>
3458
3459 * method.c (use_thunk): Use DECL_NAME instead of DECL_RTL to
3460 access function name.
3461
3462 2007-08-04 Alfred Minarik <a.minarik@aon.at>
3463
3464 PR pch/13676
3465 * lang-specs.h: Add .hp, .hxx, .hpp, .h, .HPP, .tcc as c++ header.
3466 * g++spec.c (lang_specific_driver): Check them.
3467
3468 2007-08-06 Paolo Carlini <pcarlini@suse.de>
3469
3470 PR c++/19532
3471 * pt.c (inline_needs_template_parms): Fix comment; change return type
3472 to bool.
3473
3474 2007-08-05 Volker Reichelt <v.reichelt@netcologne.de>
3475
3476 Revert:
3477 2007-03-26 Dirk Mueller <dmueller@suse.de>
3478
3479 * parser.c (cp_parser_member_declaration): Pedwarn
3480 about stray semicolons after member declarations.
3481
3482 2007-08-02 Lee Millward <lee.millward@gmail.com>
3483
3484 PR c++/30849
3485 PR c++/30850
3486 PR c++/30851
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.
3491
3492 2007-08-02 Nick Clifton <nickc@redhat.com>
3493
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.
3505
3506 2007-08-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3507
3508 PR middle-end/32668
3509 * call.c (magic_varargs_p): Honor the "type generic" attribute.
3510
3511 2007-07-30 Paolo Carlini <pcarlini@suse.de>
3512
3513 PR c++/32108
3514 * semantics.c (finish_label_stmt): Reject the __label__
3515 extension outside function scopes.
3516
3517 2007-07-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3518
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
3522 casts.
3523
3524 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
3525
3526 * pt.c, tree.c, typeck2.c: Fix comment typos.
3527
3528 2007-07-28 Simon Martin <simartin@users.sourceforge.net>
3529 Mark Mitchell <mark@codesourcery.com>
3530
3531 PR c++/30917
3532 * name-lookup.c (lookup_name_real): Non namespace-scope bindings can be
3533 hidden due to friend declarations in local classes.
3534
3535 2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
3536
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
3545 types.
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
3556 nodes.
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.
3569
3570 2007-07-27 Mark Mitchell <mark@codesourcery.com>
3571
3572 PR c++/32346
3573 * call.c (convert_for_arg_passing): Only widen bitfields to their
3574 declared types if necessary.
3575
3576 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3577
3578 * parser.c (cp_parser_string_literal, cp_parser_sizeof_operand):
3579 Constify.
3580
3581 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3582
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):
3586 Likewise.
3587 * tree.c (cplus_array_hash, cplus_array_compare, list_hash_eq,
3588 list_hash): Likewise.
3589 * typeck2.c (pat_compare): Likewise.
3590
3591 2007-07-24 Nathan Sidwell <nathan@codesourcery.com>
3592
3593 * method.c (implicitly_declare_fn): Increase alignment if member
3594 function pointer format requires it.
3595
3596 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3597
3598 PR c++/29001
3599 * typeck.c (check_return_expr): Do not pass a null argument
3600 to null_ptr_cst_p.
3601
3602 2007-07-24 Paolo Carlini <pcarlini@suse.de>
3603
3604 PR c++/32561
3605 * decl.c (redeclaration_error_message): Call DECL_ANON_UNION_VAR_P
3606 only on VAR_DECL.
3607
3608 2007-07-22 Nathan Sidwell <nathan@codesourcery.com>
3609
3610 PR c++/32839
3611 * typeck.c (convert_arguments): Only use default args if we have
3612 a function decl.
3613
3614 PR c++/30818
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.
3624
3625 2007-07-12 Kazu Hirata <kazu@codesourcery.com>
3626
3627 * pt.c (template_parms_variadic_p): Remove.
3628 * cp-tree.h: Remove the prototype for template_parms_variadic_p.
3629
3630 2007-07-12 Jakub Jelinek <jakub@redhat.com>
3631
3632 PR c++/30854
3633 * error.c (dump_expr) <case AGGR_INIT_EXPR>: Pass true as last
3634 argument to dump_aggr_init_expr_args instead of false.
3635
3636 2007-07-11 Douglas Gregor <doug.gregor@gmail.com>
3637
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.
3642
3643 2007-07-11 Paolo Carlini <pcarlini@suse.de>
3644
3645 PR c++/32560
3646 * parser.c (cp_parser_make_indirect_declarator): When the
3647 the code argument is ERROR_MARK return cp_error_declarator.
3648
3649 2007-07-09 Geoffrey Keating <geoffk@apple.com>
3650
3651 PR 32617
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.
3657
3658 2007-07-09 Richard Guenther <rguenther@suse.de>
3659
3660 * decl.c (start_preparsed_function): Do not promote return type.
3661
3662 2007-07-08 Paolo Carlini <pcarlini@suse.de>
3663
3664 PR c++/30535
3665 * pt.c (unify): Never pass error_mark_node to template_decl_level.
3666
3667 2007-07-07 Mark Mitchell <mark@codesourcery.com>
3668
3669 PR c++/32232
3670 * pt.c (resolve_overloaded_unification): Robustify. Return a
3671 bool, not an int.
3672 (type_unification_real): Adjust accordingly.
3673
3674 2007-07-06 Richard Guenther <rguenther@suse.de>
3675
3676 * init.c (build_new_1): Use the correct pointer type.
3677 * typeck2.c (build_m_component_ref): Likewise.
3678
3679 2007-07-05 Mark Mitchell <mark@codesourcery.com>
3680
3681 PR c++/32245
3682 * init.c (build_zero_init): Always build an initializer for
3683 non-static storage.
3684 * typeck2.c (build_functional_cast): Use build_zero_init.
3685
3686 PR c++/32251
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.
3692
3693 PR c++/31992
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.
3702
3703 2007-07-04 Douglas Gregor <doug.gregor@gmail.com>
3704
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
3708 types.
3709
3710 2007-07-03 Mark Mitchell <mark@codesourcery.com>
3711
3712 * init.c (build_new): Tweak comment.
3713
3714 2007-06-29 Dave Brolley <brolley@redhat.com>
3715
3716 PR c++/31743
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.
3722
3723 2007-07-03 Richard Guenther <rguenther@suse.de>
3724
3725 PR c++/32609
3726 * class.c (fixed_type_or_null): Re-lookup the hashtable slot
3727 after recursing.
3728
3729 2007-07-02 Simon Baldwin <simonb@google.com>
3730
3731 * parser.c (cp_parser_elaborated_type_specifier): Added a warning
3732 for inner-style nested forward declarations that don't declare
3733 anything useful.
3734
3735 2007-07-02 Jakub Jelinek <jakub@redhat.com>
3736
3737 PR c++/31748
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.
3740
3741 2007-07-01 Ollie Wild <aaw@google.com>
3742
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.
3751
3752 2007-06-29 Douglas Gregor <doug.gregor@gmail.com>
3753
3754 PR c++/31724
3755 * init.c (build_new_1): Use structural equality on the copy of the
3756 array type.
3757
3758 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3759
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.
3764
3765 2007-06-28 Geoffrey Keating <geoffk@apple.com>
3766
3767 * decl2.c (start_objects): Mark constructor-running function
3768 as artificial.
3769
3770 2007-06-26 Simon Martin <simartin@users.sourceforge.net>
3771
3772 PR c++/32111
3773 * decl.c (grokdeclarator): Reset friendp for member functions declared
3774 friend of their own class.
3775
3776 2007-06-23 Mark Mitchell <mark@codesourcery.com>
3777
3778 * decl2.c (determine_visibility): Don't look for dllexport here.
3779 (determine_visibility_from_class): Tidy.
3780
3781 2007-06-18 Simon Baldwin <simonb@google.com>
3782
3783 PR c++/31923
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.
3793
3794 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
3795
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
3822 of a MINUS_EXPR.
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.
3831
3832 2007-06-15 Mark Mitchell <mark@codesourcery.com>
3833
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
3838 seen.
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.
3842
3843 2007-06-14 Geoff Keating <geoffk@apple.com>
3844
3845 * decl2.c (determine_visibility): Ensure that functions with
3846 hidden types as parameters are hidden.
3847
3848 PR 31093
3849 * decl2.c (determine_visibility): Remove duplicate code for
3850 handling type info.
3851
3852 2007-06-12 Ian Lance Taylor <iant@google.com>
3853
3854 PR libstdc++/29286
3855 * init.c (avoid_placement_new_aliasing): New static function.
3856 (build_new_1): Call it.
3857
3858 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
3859
3860 * cp-objcp-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
3861 (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
3862
3863 2007-06-08 Jakub Jelinek <jakub@redhat.com>
3864
3865 PR c++/32177
3866 * semantics.c (finish_omp_for): Call fold_build_cleanup_point_expr
3867 on init, the non-decl cond operand and increment value.
3868
3869 2007-06-07 Simon Martin <simartin@users.sourceforge.net>
3870
3871 PR c++/30759
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
3875 cxx_dialect.
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.
3882 (tsubst): 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.
3892
3893 2007-06-04 Simon Baldwin <simonb@google.com>
3894
3895 * decl.c (grokdeclarator): Readability change. Moved case labels
3896 into direct switch statement scope.
3897
3898 2007-06-04 Paolo Carlini <pcarlini@suse.de>
3899
3900 * call.c (convert_like_real): Remove pointless code.
3901
3902 2007-05-31 Mark Mitchell <mark@codesourcery.com>
3903
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.
3912
3913 2007-05-31 Daniel Berlin <dberlin@dberlin.org>
3914
3915 * typeck.c (build_binary_op): Include types in error.
3916
3917 2007-05-31 Jakub Jelinek <jakub@redhat.com>
3918
3919 PR c++/31806
3920 * decl.c (cp_finish_decl): Also clear was_readonly if a static var
3921 needs runtime initialization.
3922
3923 2007-05-31 Paolo Carlini <pcarlini@suse.de>
3924
3925 PR c++/32158
3926 * semantics.c (finish_trait_expr): Complete the types.
3927
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>
3932
3933 PR c++/7412
3934 PR c++/29939
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
3938 them.
3939 * decl.c (grokdeclarator): Implement reference collapsing.
3940 (copy_fn_p): Don't consider constructors taking rvalue references
3941 to be copy constructors.
3942 (move_fn_p): New.
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
3965 throwing.
3966 * mangle.c (write_type): Mangle rvalue references differently
3967 than regular references.
3968 * parser.c (make_reference_declarator): Add boolean parameter for
3969 rvalue references.
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
3976 declarators.
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.
3986
3987 2007-05-30 Jakub Jelinek <jakub@redhat.com>
3988
3989 PR c++/31809
3990 * decl.c (cp_finish_decl): Clear TREE_READONLY flag on TREE_STATIC
3991 variables that need runtime initialization.
3992
3993 2007-05-28 Andrew Pinski <Andrew_pinski@playstation.sony.com>
3994
3995 PR c++/31339
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
4000 error_mark_node.
4001
4002 2007-05-25 Simon Martin <simartin@users.sourceforge.net>
4003 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4004
4005 PR c++/31745
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.
4010
4011 * parser.c (cp_parser_class_specifier): Likewise.
4012
4013 2007-05-25 H.J. Lu <hongjiu.lu@intel.com>
4014
4015 * semantics.c (finish_member_declaration): Fix a typo in the
4016 last checkin.
4017
4018 2007-05-25 Douglas Gregor <doug.gregor@gmail.com>
4019
4020 PR c++/31431
4021 PR c++/31432
4022 PR c++/31434
4023 PR c++/31435
4024 PR c++/31437
4025 PR c++/31438
4026 PR c++/31442
4027 PR c++/31443
4028 PR c++/31444
4029 PR c++/31445
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
4047 parameter pack.
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.
4052
4053 2007-05-24 Danny Smith <dannysmith@users.sourceforge.net>
4054
4055 PR target/27067
4056 * mangle.c (mangle_decl): Call targetm.mangle_decl_assembler_name.
4057
4058 2007-05-22 Ollie Wild <aaw@google.com>
4059
4060 * name-lookup.c (ambiguous_decl): Adds check for hidden types.
4061 (unqualified_namespace_lookup): Adds check for hidden types.
4062
4063 2007-05-22 Ollie Wild <aaw@google.com>
4064
4065 * decl.c (duplicate_decls): Verify namespace names are unique.
4066
4067 2007-05-21 Mark Mitchell <mark@codesourcery.com>
4068
4069 * decl.c (cxx_maybe_build_cleanup): Handle
4070 __attribute__((cleanup)).
4071
4072 2007-05-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4073
4074 * cvt.c (cp_convert_and_check): Don't check warnings if the
4075 conversion failed.
4076
4077 2007-05-18 Geoffrey Keating <geoffk@apple.com>
4078
4079 * mangle.c (write_real_cst): Use 'unsigned long' for %lx.
4080
4081 2007-05-14 Paolo Carlini <pcarlini@suse.de>
4082
4083 PR c++/29928
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).
4086
4087 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
4088
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.
4092
4093 2007-05-11 Silvius Rus <rus@google.com>
4094
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.
4099
4100 2007-05-11 Jan Hubicka <jh@suse.cz>
4101
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.
4105
4106 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
4107
4108 * typeck.c (build_unary_op): Remove code that used to
4109 handle non lvalue increments/decrements.
4110
4111 2007-05-07 Mike Stump <mrs@apple.com>
4112
4113 * parser.c (check_empty_body): Add.
4114 (cp_parser_iteration_statement): Add call to check_empty_body.
4115
4116 2007-05-05 Geoffrey Keating <geoffk@apple.com>
4117
4118 PR 31775
4119 * mangle.c (write_mangled_name): Mangle static variable names.
4120 (write_unqualified_name): Use local-source-name for
4121 namespace-scope static variables.
4122
4123 2007-05-04 Dirk Mueller <dmueller@suse.de>
4124
4125 * cp-tree.h (DECL_MAIN_P): only if -ffreestanding is
4126 not in effect.
4127
4128 2007-05-02 Seongbae Park <seongbae.park@gmail.com>
4129
4130 PR c++/31663
4131 * decl2.c (constrain_class_visibility):
4132 Use strip_pointer_or_array_types instead of strip_array_types.
4133
4134 2007-04-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
4135
4136 PR C++/30221
4137 * decl.c (reshape_init_r): Don't reshape the first element if it
4138 is a pointer to member function.
4139
4140 2007-04-27 Simon Baldwin <simonb@google.com>
4141
4142 * decl.c (grokparms): Changed message format from %qD to %qE.
4143
4144 2007-04-27 Douglas Gregor <doug.gregor@gmail.com>
4145
4146 * error.c (maybe_warn_variadic_templates): Variadic templates are
4147 now in C++0x, so only warn about them in C++98 mode.
4148
4149 2007-04-26 Andrew Pinski <andrew_pinski@playstation.sony.com>
4150
4151 PR C++/30016
4152 * typeck.c (build_reinterpret_cast_1): Only allow conversion to
4153 integeral types from vectors types.
4154
4155 2007-04-26 Jakub Jelinek <jakub@redhat.com>
4156
4157 PR c++/31598
4158 * semantics.c (finish_omp_clauses): Don't create CP_OMP_CLAUSE_INFO
4159 for type dependent OMP_CLAUSE_DECLs.
4160
4161 2007-04-24 Mark Mitchell <mark@codesourcery.com>
4162
4163 PR c++/31338
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.
4171
4172 2007-04-25 Paolo Carlini <pcarlini@suse.de>
4173
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.
4177
4178 2007-04-23 Simon Baldwin <simonb@google.com>
4179
4180 * decl.c (grokparms): Added new error for duplicate function
4181 parameters names in function prototypes, to match gcc behavior.
4182
4183 2007-04-23 Jan Hubicka <jh@suse.cz>
4184
4185 * decl2.c (finish_objects): Do not call target constructor/destructor
4186 bits dirrectly.
4187
4188 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
4189
4190 * cp-tree.h (lang_tree_node): Use GENERIC_NEXT
4191 instead of checking GIMPLE_STMT_P in chain_next.
4192
4193 2007-04-17 Mark Mitchell <mark@codesourcery.com>
4194
4195 PR c++/31513
4196 * call.c (convert_for_arg_passing): Convert bitfields to their
4197 declared types.
4198
4199 2007-04-17 Simon Martin <simartin@users.sourceforge.net>
4200
4201 PR c++/31517
4202 * pt.c (value_dependent_expression_p): Handle MODOP_EXPRs.
4203
4204 2007-04-16 Seongbae Park <seongbae.park@gmail.com>
4205
4206 PR c++/29365
4207 * decl2.c (constrain_class_visibility):
4208 Do not warn about the use of anonymous namespace in the main input file.
4209
4210 2007-04-15 Mark Mitchell <mark@codesourcery.com>
4211
4212 * cp-tree.h (current_template_parms): Fix typo in comment.
4213
4214 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
4215
4216 * cp-tree.h, error.c: Fix comment typos.
4217
4218 2007-04-13 Jason Merrill <jason@redhat.com>
4219
4220 PR c++/31074
4221 * call.c (reference_binding): Add c_cast_p parm. If true,
4222 add quals to TO as needed to make it reference-compatible.
4223
4224 2007-04-11 Jan Hubicka <jh@suse.cz>
4225
4226 * class.c (convert_to_base_statically): Fold produced tree; verify
4227 that we are not processing template_decl.
4228
4229 2007-04-09 Mark Mitchell <mark@codesourcery.com>
4230
4231 PR c++/31449
4232 * class.c (build_base_path): Ensure that the converted pointer has
4233 the same cv-qualification as the input.
4234
4235 2007-04-09 Paolo Carlini <pcarlini@suse.de>
4236
4237 * tree.c (cp_tree_equal): Deal with TRAIT_EXPR.
4238
4239 2007-04-08 Steven Bosscher <steven@gcc.gnu.org>
4240
4241 * cp-objcp-common.h (LANG_HOOKS_TREE_INLINING_ADD_PENDING_FN_DECLS):
4242 Do not set it.
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.
4246
4247 2007-04-07 Daniel Berlin <dberlin@dberlin.org>
4248
4249 Revert change removing staticp.
4250
4251 2007-04-06 Daniel Berlin <dberlin@dberlin.org>
4252
4253 * cp-objcp-common.c (cxx_staticp): Remove.
4254 * cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
4255 * cp-tree.h (cxx_staticp):
4256
4257 2007-04-04 Danny Smith <dannysmith.users.sourceforge.net>
4258
4259 * class.c (check_for_override): Don't remove dllmport attribute
4260 of virtual methods.
4261
4262 2007-04-03 Jakub Jelinek <jakub@redhat.com>
4263
4264 PR c++/30847
4265 * typeck.c (build_modify_expr): For COND_EXPR on LHS, if RHS has void
4266 type issue error and return early.
4267
4268 2007-03-30 Jason Merrill <jason@redhat.com>
4269
4270 PR c++/31187
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.
4275
4276 2007-03-31 Richard Guenther <rguenther@suse.de>
4277
4278 * optimize.c (maybe_clone_body): Replace splay-tree usage by
4279 pointer-map.
4280
4281 2007-03-31 Douglas Gregor <doug.gregor@gmail.com>
4282
4283 PR c++/31138
4284 PR c++/31140
4285 PR c++/31141
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
4290 is NULL.
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
4295 packs.
4296
4297 2007-03-30 Paolo Carlini <pcarlini@suse.de>
4298
4299 PR c++/26099
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
4320 as static.
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
4326 TRAIT_EXPR.
4327 * tree.c (cp_walk_subtrees): Deal with TRAIT_EXPR.
4328
4329 2007-03-29 Richard Guenther <rguenther@suse.de>
4330
4331 * tree.c (cp_walk_subtrees): Do not set input_location.
4332
4333 2007-03-28 Simon Martin <simartin@users.sourceforge.net>
4334
4335 PR c++/29077
4336 * decl.c (grokfndecl): Properly setup decl if it is a constructor or a
4337 destructor.
4338
4339 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4340
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.
4356
4357 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4358
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
4371 template arguments.
4372
4373 2007-03-28 Douglas Gregor <doug.gregor@gmail.com>
4374
4375 PR c++/29993
4376 * decl.c (grokdeclarator): Deal with cv-qualified function type
4377 typedefs in the same way for member and non-member functions.
4378
4379 2007-03-26 Dirk Mueller <dmueller@suse.de>
4380
4381 * parser.c (cp_parser_member_declaration): Pedwarn
4382 about stray semicolons after member declarations.
4383
4384 2007-03-26 Paolo Carlini <pcarlini@suse.de>
4385
4386 PR c++/30500
4387 * pt.c (instantiate_decl): Set in_system_header.
4388
4389 2007-03-22 Mark Mitchell <mark@codesourcery.com>
4390
4391 * cp-tree.h (current_tempalte_parms): Improve documentation.
4392 * pt.c (current_template_args): Likewise.
4393
4394 PR c++/30863
4395 * parser.c (cp_parser_parse_and_diagnose_invalid_type_name): Do
4396 not consume tokens when failing.
4397
4398 2007-03-22 Jim Wilson <wilson@specifix.com>
4399 Mark Mitchell <mark@codesourcery.com>
4400
4401 PR c++/31273
4402 * call.c (standard_conversion): Use type_decays_to. Keep FCODE
4403 consistent with FROM.
4404
4405 2007-03-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
4406
4407 * error.c (dump_expr): Handle dependent names that designate types.
4408 * cxx-pretty-print.c (pp_cxx_unqualified_id): Handle TYPENAME_TYPE.
4409
4410 2007-03-17 Kazu Hirata <kazu@codesourcery.com>
4411
4412 * cp-tree.def, parser.c, pt.c: Fix comment typos.
4413
4414 2007-03-16 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4415
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.
4425
4426 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4427
4428 PR c++/30891
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
4433 definition.
4434
4435 2007-03-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4436
4437 PR c++/24924
4438 * decl.c (cxx_init_decl_processing): Move command-line options
4439 processing to c-opts.c.
4440
4441 2007-03-15 Douglas Gregor <doug.gregor@gmail.com>
4442
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
4449 HOST_WIDE_INTs.
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
4454 better bit-packing.
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.
4464
4465 2007-03-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
4466
4467 PR c++/31165
4468 * call.c (convert_default_arg): Instead of copying the node,
4469 unshare it.
4470
4471 2007-03-15 Dirk Mueller <dmueller@suse.de>
4472
4473 PR c++/30860
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.
4478
4479 2007-03-14 Dirk Mueller <dmueller@suse.de>
4480
4481 * semantics.c (c_finish_if_stmt): Call empty_if_body_warning.
4482 (finish_do_body): Warn about empty body in do/while statement.
4483
4484 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4485
4486 * class.c (warn_hidden): Add OPT_Woverloaded_virtual to warning.
4487
4488 2007-03-14 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4489
4490 PR c/21438
4491 * typeck.c (build_binary_op): Call warn_for_div_zero instead of
4492 warning.
4493
4494 2007-03-13 Alexandre Oliva <aoliva@redhat.com>
4495
4496 * repo.c (init_repo): Initialize random_seed saved options.
4497 (finish_repo): Adjust.
4498
4499 2007-03-13 Mark Mitchell <mark@codesourcery.com>
4500
4501 PR bootstrap/30899
4502 * Make-lang.in (doc/g++.1): Use $< to specify the location from
4503 which to copy.
4504
4505 2007-03-12 Seongbae Park <seongbae.park@gmail.com>
4506
4507 * decl.c (compute_array_index_type): New warning flag warn_vla.
4508
4509 2007-03-12 Mark Mitchell <mark@codesourcery.com>
4510
4511 PR c++/30108
4512 * call.c (convert_default_arg): Copy non-constant arguments.
4513
4514 2007-03-11 Mark Mitchell <mark@codesourcery.com>
4515
4516 PR c++/31038
4517 * parser.c (cp_parser_postfix_expression): Disallow compound
4518 literals in constant expressions.
4519
4520 PR c++/30328
4521 * semantics.c (finish_typeof): Use unlowered_expr_type.
4522
4523 2007-03-10 Mark Mitchell <mark@codesourcery.com>
4524
4525 PR c++/30274
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.
4533
4534 2007-03-09 Douglas Gregor <doug.gregor@gmail.com>
4535
4536 PR c++/20599
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
4541 parameter packs.
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
4557 packs.
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,
4566 CAST_EXPR.
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
4571 pack.
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
4602 packs.
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
4609 packs.
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
4644 template arguments.
4645 (for_each_template_parm_r): No need to handle BASELINK.
4646 (instantiate_class_template): Handle pack expansions in the base
4647 class list.
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
4654 argument types.
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
4660 itself.
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
4672 parameter pack.
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
4683 pack.
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
4688 initializers.
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
4700 argument packs.
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
4704 declarator.
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
4725 a pack expansion.
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
4735 expansion.
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,
4746 CAST_EXPR.
4747
4748 2007-03-09 Dirk Mueller <dmueller@suse.de>
4749
4750 * call.c (build_new_op): Call warn_logical_operator.
4751
4752 2007-03-08 Volker Reichelt <reichelt@netcologne.de>
4753
4754 PR c++/30852
4755 * semantics.c (finish_offsetof): Handle COMPOUND_EXPR.
4756
4757 PR c++/30534
4758 * pt.c (any_template_arguments_need_structural_equality_p):
4759 Robustify.
4760
4761 2007-03-08 Alexandre Oliva <aoliva@redhat.com>
4762
4763 * decl.c (grokdeclarator): Disable warnings for anonymous
4764 bitfields.
4765
4766 2007-03-05 Volker Reichelt <reichelt@netcologne.de>
4767
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.
4774
4775 2007-03-04 Simon Martin <simartin@users.sourceforge.net>
4776
4777 PR c++/30895
4778 * tree.c (cp_tree_equal): Properly handle COMPLEX_CST trees.
4779
4780 2007-03-03 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4781
4782 PR c++/15787
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
4788 body of 'if'.
4789 (cp_parser_jump_statement): Mask new IN_IF_STMT bit.
4790
4791 2007-03-02 Simon Martin <simartin@users.sourceforge.net>
4792
4793 PR c++/28253
4794 * class.c (update_vtable_entry_for_fn): Properly handle invalid overriders
4795 for thunks.
4796
4797 2007-03-02 Geoffrey Keating <geoffk@apple.com>
4798
4799 * g++spec.c (lang_specific_driver): Add -lstdc++ when compiling
4800 Objective-C++. Don't exit early if -shared-libgcc needs to be
4801 added.
4802
4803 2007-03-02 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4804
4805 * typeck.c (common_base_type): Delete unused function.
4806
4807 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
4808
4809 * Make-lang.in: Add dummy lang.install-pdf target.
4810
4811 2007-03-01 Simon Baldwin <simonb@google.com>
4812
4813 PR c++/23689
4814 * decl.c (check_tag_decl): Added new warning for typedef ignored
4815 when it precedes an otherwise valid non-typedef declaration.
4816
4817 2007-02-28 Sandra Loosemore <sandra@codesourcery.com>
4818
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
4830 argument lists.
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.
4843
4844 2007-02-26 Mark Mitchell <mark@codesourcery.com>
4845
4846 * semantics.c (expand_or_defer_fn): Call c_record_cdtor_fn.
4847 * decl2.c (cp_write_gloabl_declarations): Call c_build_cdtor_fns.
4848
4849 2007-02-25 Mark Mitchell <mark@codesourcery.com>
4850
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
4863 static_[cd]tors.
4864 (cp_write_global_declarations): Likewise.
4865
4866 2007-02-23 Richard Guenther <rguenther@suse.de>
4867
4868 * class.c (note_name_declared_in_class): Make declaration
4869 changes meaning a pedwarn.
4870
4871 2007-02-22 Michael Matz <matz@suse.de>
4872
4873 PR c++/29433
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):
4880 Remove functions.
4881 (push_template_decl_real, lookup_template_class): Remove calls
4882 to above functions.
4883
4884 2007-02-19 Mark Mitchell <mark@codesourcery.com>
4885
4886 * call.c (build_new_method_call): Ensure that explicit calls of
4887 destructors have type "void".
4888
4889 2007-02-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4890
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
4894 -Waddress.
4895
4896 2007-02-18 Kazu Hirata <kazu@codesourcery.com>
4897
4898 * decl.c, tree.c: Fix comment typos.
4899
4900 2007-02-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4901
4902 PR C++/30158
4903 * semantics.c (finish_stmt_expr_expr): Set TREE_TYPE of the
4904 statement expression if we had an error mark node.
4905
4906 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
4907 Brooks Moses <brooks.moses@codesourcery.com>
4908 Lee Millward <lee.millward@codesourcery.com>
4909
4910 * cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
4911 Change class to tcc_vl_exp.
4912
4913 * call.c (build_call): Use build_call_list instead
4914 of build3.
4915 (build_over_call): Likewise.
4916 (build_new_method_call): Use build_min_non_dep_call_list
4917 instead of build_min_non_dep.
4918
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.
4923
4924 * cvt.c (convert_to_void): Use build_call_array instead
4925 of build3; use new AGGR_INIT_EXPR accessor macros.
4926
4927 * mangle.c (write_expression): Use TREE_OPERAND_LENGTH
4928 instead of TREE_CODE_LENGTH.
4929
4930 * dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
4931 AGGR_INIT_EXPR accessor macros.
4932
4933 * cp-gimplify.c (cp_gimplify_init_expr): Use
4934 AGGR_INIT_EXPR_SLOT to set the slot operand.
4935
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.
4949
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
4961 tree code classes.
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.
4966
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.
4970
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
4978 TREE_CODE_LENGTH.
4979
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
4985
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.
4989
4990 * parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
4991 Use build_nt_call_list instead of build_min_nt.
4992
4993 2007-02-15 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4994
4995 PR c++/28943
4996 * call.c (build_conditional_expr): Improve error message.
4997
4998 2007-02-13 Dirk Mueller <dmueller@suse.de>
4999
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().
5003
5004 2007-02-12 Simon Martin <simartin@users.sourceforge.net>
5005 Mark Mitchell <mark@codesourcery.com>
5006
5007 PR c++/14622
5008 * pt.c (do_decl_instantiation): Detect type mismatches in explicit
5009 instantiations for variables.
5010
5011 2007-02-12 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5012
5013 PR middle-end/7651
5014 * cp-gimplify.c (gimplify_expr_stmt): Don't check extra_warnings.
5015 Check warn_unused_value just once.
5016
5017 2007-02-11 Mark Mitchell <mark@codesourcery.com>
5018
5019 PR c++/26988
5020 * pt.c (determine_specialization): Use skip_artificial_parms_for.
5021 (fn_type_unificiation): Likewise.
5022 (get_bindings): Likewise.
5023
5024 o2007-02-06 Mark Mitchell <mark@codesourcery.com>
5025
5026 PR target/29487
5027 * decl.c (finish_function): Use DECL_REPLACEABLE.
5028 * tree.c (cp_cannot_inline_tree_fn): Likewise.
5029
5030 2007-02-10 Gabriel Dos Reis <gdr@integrable-solutions.net>
5031
5032 * parser.c (cp_parser_primary_expression): Reformat overly long lines.
5033
5034 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
5035
5036 * decl.c (grokvardecl): Don't error if !have_tls.
5037 (grokdeclarator): Likewise.
5038 * parser.c (cp_parser_omp_threadprivate): Likewise.
5039
5040 2007-02-07 Jakub Jelinek <jakub@redhat.com>
5041
5042 PR c++/30703
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
5046 by reference.
5047
5048 2007-02-05 Dirk Mueller <dmueller@suse.de>
5049
5050 PR bootstrap/30510
5051 * parser.c (cp_parser_class_specifier): Always initialize bases.
5052
5053 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
5054
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
5058 expressions.
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.
5062
5063 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5064
5065 * decl.c (grokdeclarator): Use OPT_Wreturn_type instead of 0.
5066
5067 2007-02-04 Kazu Hirata <kazu@codesourcery.com>
5068
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.
5071
5072 2007-02-03 Douglas Gregor <doug.gregor@gmail.com>
5073
5074 * parser.c (cp_lexer_get_preprocessor_token): Attach the C++0x
5075 keyword warning to -Wc++0x-compat.
5076
5077 2007-02-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5078
5079 * decl.c (grokdeclarator): Update documentation.
5080
5081 2007-02-02 Jakub Jelinek <jakub@redhat.com>
5082
5083 PR c++/30536
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
5087 storage class.
5088
5089 2007-01-30 Roger Sayle <roger@eyesopen.com>
5090
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).
5093
5094 2007-01-30 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5095
5096 PR c++/24745
5097 * typeck.c (build_binary_op): Fix logic for warning. Move warning
5098 to -Wpointer-arith.
5099 * call.c (convert_like_real): Don't warn when converting to
5100 boolean type.
5101
5102 2007-01-29 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5103
5104 * decl.c (pop_label): Replace warning with call to
5105 warn_for_unused_label.
5106
5107 2007-01-28 Andrew Pinski <pinskia@gmail.com>
5108
5109 PR C++/28988
5110 * semantics.c (finish_pseudo_destructor_expr): Check the
5111 destrutor name by calling check_dtor_name.
5112
5113 2007-01-24 Douglas Gregor <dgregor@osl.iu.edu>
5114
5115 * lex.c (D_CPP0X): Rename.
5116 (D_CXX0X): To this.
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.
5121
5122 2007-01-23 Simon Martin <simartin@users.sourceforge.net>
5123
5124 PR c++/27492
5125 * decl.c (duplicate_decls): Don't reset DECL_INVALID_OVERRIDER_P for
5126 function decls.
5127
5128 2007-01-23 Ian Lance Taylor <iant@google.com>
5129
5130 * typeck.c (convert_for_assignment): Only warn about a = b = c
5131 when converting to bool.
5132
5133 2007-01-23 Roger Sayle <roger@eyesopen.com>
5134
5135 * call.c (null_ptr_cst_p): Replace use of TREE_CONSTANT_OVERFLOW with
5136 TREE_OVERFLOW.
5137 * typeck.c (ignore_overflows): Remove the remaining uses of
5138 TREE_CONSTANT_OVERFLOW.
5139
5140 2007-01-20 Jan Hubicka <jh@suse.cz>
5141
5142 * decl2.c (start_objects, start_static_storage_duration_function):
5143 Do not make the functions uninlinable.
5144
5145 2007-01-17 Ian Lance Taylor <iant@google.com>
5146
5147 * class.c (add_method): Call VEC_reserve_exact rather than passing
5148 a negative size to VEC_reserve.
5149
5150 2007-01-11 Simon Martin <simartin@users.sourceforge.net>
5151
5152 PR c++/29573
5153 * tree.c (cp_tree_equal): Properly handle MODOP_EXPR trees.
5154
5155 2007-01-10 Mark Mitchell <mark@codesourcery.com>
5156
5157 PR c++/28999
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
5161 formatting.
5162
5163 2007-01-08 Geoffrey Keating <geoffk@apple.com>
5164
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.
5169
5170 2007-01-08 Richard Guenther <rguenther@suse.de>
5171
5172 * cvt.c (cp_convert_to_pointer): Use build_int_cst_type.
5173
5174 2007-01-08 Mark Shinwell <shinwell@codesourcery.com>
5175
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.
5182
5183 2007-01-07 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5184
5185 PR c++/28986
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
5188 operands.
5189
5190 2007-01-06 Lee Millward <lee.millward@codesourcery.com>
5191
5192 PR c++/19439
5193 * class.c (add_method): Don't wait until template
5194 instantiation time to complain about duplicate methods.
5195
5196 2007-01-05 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
5197
5198 PR c/19978
5199 * semantics.c (finish_unary_op_expr): Warn only if result
5200 overflowed and operands did not.
5201
5202 2007-01-05 Ian Lance Taylor <iant@google.com>
5203
5204 * typeck.c (build_binary_op): Warn about comparing a non-weak
5205 address to NULL.
5206
5207 2007-01-05 Douglas Gregor <doug.gregor@gmail.com>
5208
5209 * pt.c (tsubst): Propagate the need for structural equality checks
5210 when reducing the level of template parameters.
5211
5212 2007-01-03 Kazu Hirata <kazu@codesourcery.com>
5213
5214 * pt.c: Fix a comment typo.
5215
5216 2007-01-02 Ian Lance Taylor <iant@google.com>
5217
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.
5222
5223 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5224
5225 * pt.c (canonical_template_parms): Correct typo in comment.
5226
5227 2007-01-02 Douglas Gregor <doug.gregor@gmail.com>
5228
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
5238 current class type.
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
5242 function type.
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
5247 arrays with ABI-1.
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
5254 type.
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
5257 types as necessary.
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
5268 checks.
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.
5275