re PR c++/45983 (ICE: tree code 'template_parm_index' is not supported in gimple...
[gcc.git] / gcc / cp / ChangeLog
1 2010-10-15 Jason Merrill <jason@redhat.com>
2
3 PR c++/45983
4 * tree.c (cp_build_qualified_type_real): Don't reuse a variant
5 with a different typedef variant of the element type.
6
7 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8
9 merge from FSF apple 'trunk' branch.
10 2006 Fariborz Jahanian <fjahanian@apple.com>
11
12 Radars 4436866, 4505126, 4506903, 4517826
13 * typeck.c (finish_class_member_access_expr): Handle CLASS.property
14 syntax.
15 (cp_build_modify_expr): Likewise.
16 * parser.c (cp_parser_objc_method_prototype_list): Handle @property.
17 (cp_parser_objc_method_definition_list): Likewise.
18 (cp_parser_objc_property_decl): New.
19 (cp_parser_objc_property_attrlist): New.
20 (cp_parser_objc_at_property): New.
21
22 2010-10-14 Richard Guenther <rguenther@suse.de>
23
24 PR lto/44561
25 * cp-tree.h (NULLPTR_TYPE_P): Adjust.
26 * decl.c (cxx_init_decl_processing): Build a NULLPTR_TYPE node,
27 use build_int_cst.
28 * error.c (dump_type): Handle NULLPTR_TYPE.
29 (dump_type_prefix): Likewise.
30 (dump_type_suffix): Likewise.
31 * mangle.c (write_type): Likewise.
32 * name-lookup.c (arg_assoc_type): Likewise.
33 * rtti.c (typeinfo_in_lib_p): Likewise.
34 * pt.c (tsubst): Likewise.
35
36 2010-10-13 Jason Merrill <jason@redhat.com>
37
38 PR c++/45984
39 * class.c (fixup_attribute_variants): New fn.
40 * cp-tree.h: Declare it.
41 * pt.c (instantiate_class_template): Call it.
42 * semantics.c (begin_class_definition): Call it.
43
44 2010-10-13 Richard Henderson <rth@redhat.com>
45
46 * cp-lang.c (cp_eh_personality): Update call to
47 build_personality_function.
48 * except.c (choose_personality_routine): Update function comment.
49
50 2010-10-13 Richard Guenther <rguenther@suse.de>
51
52 * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and
53 clear DECL_CHAIN of NAMESPACE_DECLs.
54
55 2010-10-11 Martin Jambor <mjambor@suse.cz>
56
57 PR c++/45562
58 * cp-tree.h (current_class_ref): Check that cp_function_chain is
59 non-NULL.
60 * call.c (build_cxx_call): Likewise.
61
62 2010-10-10 Jason Merrill <jason@redhat.com>
63
64 * pt.c (tsubst_default_argument): Handle DEFAULT_ARG.
65 (tsubst_default_arguments): Only do this once for cloned fns.
66 (tsubst): Use typedef_variant_p. Handle LANG_TYPE. Don't
67 handle expressions.
68 (tsubst_expr): Avoid calling tsubst_expr for non-expressions.
69 (tsubst_copy_and_build): Likewise.
70 (tsubst_initializer_list): Likewise.
71 (tsubst_copy): Change default to gcc_unreachable. Handle
72 OVERLOAD and PTRMEM_CST.
73
74 2010-10-10 Jason Merrill <jason@redhat.com>
75
76 PR lto/45959
77 PR lto/45960
78 * pt.c (tsubst_copy) [INTEGER_CST]: Instantiate the type.
79
80 2010-10-07 Andi Kleen <ak@linux.intel.com>
81
82 * Make-lang.in (c++_OBJS): Remove dummy-checksum.o.
83 (cc1plus-dummy): Remove.
84 (cc1plus-checksum): Change to run checksum over object files
85 and options only.
86
87 2010-10-08 Joseph Myers <joseph@codesourcery.com>
88
89 * cp-objcp-common.h (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
90
91 2010-10-07 Nicola Pero <nicola.pero@meta-innovation.com>
92
93 * cp-tree.def: Changed type of AT_ENCODE_EXPR from tcc_unary to
94 tcc_expression.
95 * cxx-pretty-print.c (pp_cxx_unary_expression): Added case for
96 AT_ENCODE_EXPR.
97 * error.c (dump_expr): Added case for AT_ENCODE_EXPR.
98 * pt.c (tsubst_copy): Added case for AT_ENCODE_EXPR.
99 (value_dependent_expression_p): Added case for AT_ENCODE_EXPR.
100 (type_dependent_expression_p): Added case for AT_ENCODE_EXPR.
101 * parser.c (cp_parser_objc_encode_expression): Updated comment.
102
103 2010-10-07 Nicola Pero <nicola@nicola.brainstorm.co.uk>
104
105 Merge from apple/trunk branch on FSF servers.
106
107 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
108
109 Radar 4508851
110 * parser.c (cp_parser_objc_interstitial_code): Recognize
111 and parse RID_NAMESPACE keyword.
112
113 2010-10-07 Iain Sandoe <iains@gcc.gnu.org>
114
115 * parser.c (cp_parser_objc_method_tail_params_opt): Peek new token after
116 finding ellipsis, before checking for attributes.
117
118 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
119
120 Merge from apple/trunk branch on FSF servers.
121 * cp-tree.def: Added AT_ENCODE_EXPR here instead of to the no
122 longer existing gcc/c-common.def.
123
124 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
125
126 Radar 4278774
127 * pt.c (tsubst_copy_and_build): Instantiate @endcode(T).
128 * parser.c (cp_parser_objc_encode_expression): Build a templatized
129 parse tree for @encode(T).
130
131 2005-12-14 Fariborz Jahanian <fjahanian@apple.com>
132
133 Radar 4278774
134 * c-common.def: Add new expression code AT_ENCODE_EXPR.
135
136 2010-10-06 Eric Botcazou <ebotcazou@adacore.com>
137
138 PR c++/45908
139 * typeck.c (cp_build_addr_expr_1): Add check for incomplete types in
140 code folding offsetof-like computations.
141
142 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
143
144 PR objc++/31125
145 * parser.c (cp_parser_objc_class_interface): If no identifier
146 follows an @interface token, stop parsing the interface after
147 printing an error.
148 (cp_parser_objc_class_implementation): If no identifier follows an
149 @implementation token, stop parsing the implementation after
150 printing an error.
151
152 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
153
154 PR objc++/23707
155 * parser.c (cp_parser_objc_method_keyword_params): If the required
156 colon is not found while parsing parameters, stop parsing them.
157
158 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
159
160 PR objc++/31126
161 * parser.c (cp_parser_objc_class_ivars): Do not eat the EOF or
162 @end after detecting it. Print an error if @end is found without
163 a '}'.
164 (cp_parser_objc_method_prototype_list): Do not eat the EOF after
165 detecting it. Fixed reading the next token when continuing
166 because of an error in a method signature. Print an error if EOF
167 is found without an '@end'.
168 (cp_parser_objc_method_definition_list): Same change.
169
170 2010-10-05 Nicola Pero <nicola.pero@meta-innovation.com>
171
172 Merge from apple/trunk branch on FSF servers:
173
174 2005-10-17 Fariborz Jahanian <fjahanian@apple.com>
175
176 Radar 4290840
177 * parser.c (cp_parser_objc_method_keyword_params): Check for valid
178 method parameters and issue error.
179 (cp_parser_objc_method_definition_list): Check for invalid tokens
180 which cannot start a function definition.
181
182 2005-10-14 Fariborz Jahanian <fjahanian@apple.com>
183
184 Radar 4294425
185 * parser.c (cp_parser_objc_message_args): Check for missing message
186 arguments and syntax error.
187
188 2005-10-13 Fariborz Jahanian <fjahanian@apple.com>
189
190 Radar 4261146
191 * parser.c (cp_parser_objc_class_ivars): Check for @end/eof while
192 looking for '}'.
193
194 2005-08-15 Ziemowit Laski <zlaski@apple.com>
195
196 Radar 4093475
197 * parser.c (cp_parser_objc_interstitial_code): Catch stray
198 '{' and '}' tokens and issue appropriate errors.
199
200 2005-08-02 Ziemowit Laski <zlaski@apple.com>
201
202 Radar 4185810
203 (cp_parser_statement_seq_opt): In addition to '}' and
204 end-of-file, a statement sequence may also be terminated
205 by a stray '@end'.
206
207 2010-10-05 Joseph Myers <joseph@codesourcery.com>
208
209 * cp-tree.h (cxx_print_error_function,
210 cxx_initialize_diagnostics): Declare using diagnostic_context
211 typedef.
212
213 2010-10-04 Andi Kleen <ak@linux.intel.com>
214
215 * Make-lang.in (g++, cc1plus): Add + to build rule.
216
217 2010-10-04 Jason Merrill <jason@redhat.com>
218
219 * tree.c (decl_storage_duration): New.
220 * cp-tree.h: Declare it.
221 (duration_kind): Return values.
222
223 2010-10-03 Jason Merrill <jason@redhat.com>
224
225 * typeck.c (require_complete_type_sfinae): Add complain parm to...
226 (require_complete_type): ...this function.
227 (cp_build_array_ref, convert_arguments): Use it.
228 (convert_for_initialization, cp_build_modify_expr): Likewise.
229 * cp-tree.h: Declare it.
230 * call.c (build_over_call): Use it.
231
232 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
233
234 merge from FSF 'apple/trunk' branch.
235 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
236
237 Radar 4386773
238 * cp/parser.c (cp_parser_objc_interstitial_code): For
239 @optional/@required set the optional/required flag.
240
241 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
242
243 * parser.c (cp_lexer_get_preprocessor_token): Tidied up comments
244 and indentation when finding an Objective-C++ CPP_AT_NAME token.
245
246 2010-09-29 Richard Guenther <rguenther@suse.de>
247
248 * cp-tree.h (CP_DECL_CONTEXT): Check DECL_FILE_SCOPE_P.
249 (CP_TYPE_CONTEXT): Similar.
250 (FROB_CONTEXT): Frob global_namespace to the global
251 TRANSLATION_UNIT_DECL.
252 * decl.c (cxx_init_decl_processing): Build a TRANSLATION_UNIT_DECL,
253 set DECL_CONTEXT of global_namespace to it.
254 (start_decl): Use CP_DECL_CONTEXT and test TYPE_P
255 instead of zeroing context.
256 (cp_finish_decl): Use DECL_FILE_SCOPE_P.
257 (grokfndecl): Likewise.
258 (start_preparsed_function): Likewise.
259 * name-lookup.c (maybe_push_decl): Use DECL_NAMESPACE_SCOPE_P.
260 (namespace_binding): Use SCOPE_FILE_SCOPE_P.
261 * pt.c (template_class_depth): Use CP_TYPE_CONTEXT.
262 (is_specialization_of_friend): Use CP_DECL_CONTEXT.
263 (push_template_decl_real): Likewise.
264 (tsubst_friend_class): Likewise. Adjust context comparisons.
265 (instantiate_class_template): Use CP_TYPE_CONTEXT.
266 (tsubst): Do not substitute into TRANSLATION_UNIT_DECL.
267 * cxx-pretty-print.c (pp_cxx_nested_name_specifier): Use
268 SCOPE_FILE_SCOPE_P.
269
270 2010-09-29 Yao Qi <yao@codesourcery.com>
271
272 * decl.c (get_atexit_node): Fix typo.
273
274 2010-09-28 Jason Merrill <jason@redhat.com>
275
276 * tree.c (lvalue_kind): Rename from lvalue_p_1, make nonstatic.
277 (real_lvalue_p): Take const_tree.
278 * cp-tree.h: Adjust.
279 * typeck.c (lvalue_or_else): Make temporary arg a permerror.
280 (cp_build_addr_expr_1): Likewise.
281
282 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
283
284 Partially merged from apple/trunk branch on FSF servers:
285 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
286 Radar 3803157 (method attributes)
287
288 * parser.c (cp_parser_objc_method_keyword_params): Handle attributes.
289 (cp_parser_objc_method_tail_params_opt): Likewise.
290 (cp_parser_objc_method_signature): Likewise.
291 (cp_parser_objc_method_maybe_bad_prefix_attributes): New.
292 (cp_parser_objc_method_prototype_list): Handle attributes.
293 (cp_parser_objc_method_definition_list): Likewise.
294
295 2010-09-28 Richard Henderson <rth@redhat.com>
296
297 * cp-lang.c: Include "target.h".
298 (cp_eh_personality): Use targetm.except_unwind_info.
299 * Make-lang.in (cp-lang.o): Update deps.
300
301 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
302
303 * parser.c (cp_parser_objc_valid_prefix_attributes): New.
304 (cp_parser_declaration): Parse prefix attributes for ObjC++.
305 (cp_parser_objc_protocol_declaration): Handle attributes.
306 (cp_parser_objc_class_interface): Likewise.
307 (cp_parser_objc_declaration): Likewise.
308
309 2010-09-27 Jason Merrill <jason@redhat.com>
310
311 Require lvalues as specified by the standard.
312 * typeck.c (lvalue_or_else): Use real_lvalue_p.
313 (cp_build_addr_expr_1): Split out of cp_build_unary_op.
314 (cp_build_addr_expr, cp_build_addr_expr_strict): Interfaces.
315 (decay_conversion, get_member_function_from_ptrfunc): Adjust.
316 (build_x_unary_op, build_reinterpret_cast_1): Adjust.
317 (build_const_cast_1): Adjust.
318 * cp-tree.h: Declare new fns.
319 * call.c (build_this, convert_like_real, build_over_call): Adjust.
320 (initialize_reference): Adjust.
321 * class.c (build_base_path, convert_to_base_statically): Adjust.
322 (build_vfn_ref, resolve_address_of_overloaded_function): Adjust.
323 * cvt.c (build_up_reference, convert_to_reference): Adjust.
324 * decl.c (register_dtor_fn): Adjust.
325 * decl2.c (build_offset_ref_call_from_tree): Adjust.
326 * except.c (initialize_handler_parm): Adjust.
327 * init.c (build_offset_ref, build_delete, build_vec_delete): Adjust.
328 * rtti.c (build_dynamic_cast_1, tinfo_base_init): Adjust.
329 * tree.c (stabilize_expr): Adjust.
330
331 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
332
333 Merge from apple/trunk branch on FSF servers:
334
335 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
336
337 Radar 4229905
338 * typeck.c (composite_pointer_type): Call objc_have_common_type
339 when comparing two objective-c pointer types.
340
341 2005-07-18 Ziemowit Laski <zlaski@apple.com>
342
343 Radar 4175534
344 * call.c (standard_conversion): Do not issue warnings when
345 comparing ObjC pointer types.
346
347 2005-06-22 Ziemowit Laski <zlaski@apple.com>
348
349 Radar 4154928
350 * call.c (standard_conversion): Allow for a pointer conversion
351 between any two ObjC pointer types.
352 * typeck.c (composite_pointer_type): Determine common type
353 for two ObjC pointer types.
354
355 2010-09-24 Jan Hubicka <jh@suse.cz>
356
357 * decl.c (finish_function): Use decl_replaceable_p
358 * method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
359
360 2010-09-24 Jason Merrill <jason@redhat.com>
361
362 * decl.c (compute_array_index_type): Remember type dependence of
363 array bound.
364 * pt.c (dependent_type_p_r): Don't recompute it here.
365
366 * error.c (dump_expr) [CASE_CONVERT]: Print conversion between
367 reference and pointer to the same type as "*" or "&".
368
369 2010-09-24 Nicola Pero <nicola.pero@meta-innovation.com>
370
371 * typeck.c (warn_args_num): Use warning 'too many arguments to
372 method [methodname]' for an Objective-C method instead of the less
373 satisfactory 'too many arguments to function' (with no method
374 name).
375
376 2010-09-21 Jason Merrill <jason@redhat.com>
377
378 * mangle.c (write_expression) [SCOPE_REF]: Only do -fabi-version=1
379 special handling if we know the member.
380
381 2010-09-18 Jason Merrill <jason@redhat.com>
382
383 * call.c (compare_ics): Do lvalue/rvalue reference binding
384 comparison for ck_list, too.
385
386 2010-09-15 Jason Merrill <jason@redhat.com>
387
388 * semantics.c (finish_id_expression): Diagnose use of function
389 parms in evaluated context outside function body.
390
391 * decl2.c (grokbitfield): Diagnose non-integral width.
392
393 * call.c (convert_like_real): Use the underlying type of the
394 reference for the temporary.
395
396 2010-09-15 Jakub Jelinek <jakub@redhat.com>
397
398 PR c++/45635
399 * class.c (build_vtbl_initializer): Use fn instead of init's operand
400 as first argument to FDESC_EXPR.
401
402 2010-09-15 Paolo Carlini <paolo.carlini@oracle.com>
403
404 PR c++/45665
405 * decl.c (grokdeclarator): Check build_memfn_type return value
406 for error_mark_node.
407
408 2010-09-13 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
409
410 * semantics.c (finish_for_stmt): Always test flag_new_for_scope.
411 (begin_range_for_stmt): Likewise.
412
413 2010-09-11 Rodrigo Rivas <rodrigorivascosta@gmail.com>
414
415 Implement range-based for-statements.
416 * cp-tree.def (RANGE_FOR_STMT): New.
417 * cp-tree.h (RANGE_FOR_DECL, RANGE_FOR_EXPR, RANGE_FOR_BODY): New.
418 (cp_convert_range_for): Declare.
419 * pt.c (tsubst_expr): Add RANGE_FOR_STMT.
420 (tsubst_copy_and_build): perform_koenig_lookup takes extra argument.
421 * semantics.c (begin_range_for_stmt): New.
422 (finish_range_for_decl): New.
423 (finish_for_stmt): Accept also RANGE_FOR_STMT.
424 (perform_koenig_lookup): Add extra argument include_std.
425 * parser.c (cp_parser_c_for): New with code from
426 cp_parser_iteration_statement().
427 (cp_parser_range_for): New.
428 (cp_convert_range_for): New.
429 (cp_parser_iteration_statement): Add range-for support.
430 (cp_parser_condition): Adjust comment.
431 (cp_parser_postfix_expression): perform_koenig_lookup takes extra
432 argument.
433 * dump.c (cp_dump_tree): Add RANGE_FOR_STMT.
434 * cxx-pretty-print.c: Likewise.
435 * lex.c (cxx_init): Likewise.
436 * name-lookup.c (lookup_function_nonclass): Add extra argument
437 include_std.
438 (lookup_arg_dependent): Likewise.
439 * name-lookup.h: Likewise.
440
441 2010-09-10 Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
442
443 PR c++/43824
444 * error.c (maybe_warn_cpp0x): Add new warning
445 CPP0X_INLINE_NAMESPACES.
446 * parser.c (cp_parser_namespace_definition): Likewise.
447 * cp-tree.h (cpp0x_warn_str): Likewise.
448
449 2010-09-10 Richard Guenther <rguenther@suse.de>
450
451 * decl.c (reshape_init_vector): For VECTOR_TYPEs, use
452 TYPE_VECTOR_SUBPARTS instead of TYPE_DEBUG_REPRESENTATION_TYPE.
453
454 2010-09-10 Jan Hubicka <jh@suse.cz>
455
456 PR tree-optimization/45605
457 * cp/class.c (build_vtbl_initializer): Avoid wrong type conversion in
458 ADDR_EXPR.
459
460 2010-09-08 Jakub Jelinek <jakub@redhat.com>
461
462 PR c++/45588
463 * pt.c (tsubst) <case INTEGER_TYPE>: Call mark_rvalue_use
464 before calling fold_decl_constant_value.
465
466 2010-09-07 Arnaud Charlet <charlet@adacore.com>
467
468 * cp-tree.h (build_enumerator): Add new location_t parameter.
469 (build_lang_decl_loc): New function.
470 * decl.c (build_enumerator): New parameter loc. Use it when calling
471 build_decl. Replace build_lang_decl with build_lang_decl_loc.
472 * pt.c (tsubst_enum): Adjust call to build_enumerator.
473 * parser.c (cp_parser_enumerator_definition): Ditto.
474 * lex.c (build_lang_decl_loc): New function.
475
476 2010-09-06 Dodji Seketeli <dodji@redhat.com>
477
478 PR c++/45200
479 PR c++/45293
480 PR c++/45558
481 * tree.c (strip_typedefs): Strip typedefs from the context of
482 TYPENAME_TYPEs.
483
484 2010-09-06 Mark Mitchell <mark@codesourcery.com>
485
486 * typeck.c (cp_build_binary_op): Call do_warn_double_promotion.
487 * call.c (build_conditional_expr): Likewise.
488 (convert_arg_to_ellipsis): Likewise.
489
490 2010-09-06 Arnaud Charlet <charlet@adacore.com>
491
492 * parser.c (make_pointer_declarator, make_reference_declarator,
493 make_call_declarator, make_array_declarator): Set declarator->id_loc.
494 (cp_parser_init_declarator): Adjust location of decl if appropriate.
495
496 2010-09-06 Jason Merrill <jason@redhat.com>
497
498 * call.c (implicit_conversion): Fix value-init of enums.
499 (convert_like_real): Likewise.
500
501 * decl.c (cp_finish_decl): Don't change init for auto deduction.
502
503 * pt.c (fold_non_dependent_expr_sfinae): Split out from...
504 (fold_non_dependent_expr): ...here.
505 (convert_nontype_argument): Use it. Take complain parm.
506 Use perform_implicit_conversion instead of ocp_convert.
507 Allow cv-qual changes.
508 (convert_template_argument): Pass complain down.
509 (tsubst_template_arg): Suppress constant expression warnings.
510 Don't fold here.
511
512 * method.c (synthesized_method_walk): In constructors, also check
513 subobject destructors.
514
515 * semantics.c (finish_compound_literal): Always build a
516 TARGET_EXPR.
517
518 2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
519
520 PR c++/45043
521 * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
522
523 2010-08-30 Jakub Jelinek <jakub@redhat.com>
524
525 PR middle-end/45423
526 * parser.c (cp_parser_omp_atomic): Handle boolean
527 {PRE,POST}_INCREMENT.
528
529 2010-08-29 Jason Merrill <jason@redhat.com>
530
531 PR c++/44991
532 * parser.c (cp_parser_parameter_declaration): Pop parameter decls
533 after tentative parsing.
534
535 2010-08-22 Joseph Myers <joseph@codesourcery.com>
536
537 * Make-lang.in (g++spec.o): Update dependencies.
538 * g++spec.c: Include opts.h
539 (MATH_LIBRARY, LIBSTDCXX): Remove initial "-l".
540 (lang_specific_driver): Use cl_decoded_option structures.
541
542 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
543
544 * call.c: Use FOR_EACH_VEC_ELT.
545 * class.c: Likewise.
546 * decl.c: Likewise.
547 * decl2.c: Likewise.
548 * error.c: Likewise.
549 * except.c: Likewise.
550 * mangle.c: Likewise.
551 * method.c: Likewise.
552 * name-lookup.c: Likewise.
553 * parser.c: Likewise.
554 * pt.c: Likewise.
555 * repo.c: Likewise.
556 * semantics.c: Likewise.
557 * typeck2.c: Likewise.
558
559 2010-08-19 Jason Merrill <jason@redhat.com>
560
561 * call.c (reference_related_p): Check for error_mark_node.
562 (add_function_candidate): Check it instead of
563 same_type_ignoring_top_level_qualifiers_p.
564
565 PR c++/45315
566 * init.c (build_new_1): Don't use build_value_init in a template.
567 (build_value_init): Make sure we don't.
568
569 PR c++/45307
570 * cp-gimplify.c (cp_gimplify_expr): Also remove assignment
571 of empty class CONSTRUCTOR.
572
573 * except.c (pending_noexcept, pending_noexcept_checks): New.
574 (perform_deferred_noexcept_checks): New.
575 (maybe_noexcept_warning): Split from...
576 (finish_noexcept_expr): ...here. Adjust.
577 * decl2.c (cp_write_global_declarations): Call
578 perform_deferred_noexcept_checks.
579 * cp-tree.h: And declare it.
580
581 2010-08-18 Nathan Froyd <froydnj@codesourcery.com>
582
583 PR c++/45049
584 * name-lookup.c (push_overloaded_decl): Change DECL_CHAIN to
585 TREE_CHAIN.
586
587 2010-08-17 Kai Tietz <kai.tietz@onevision.com>
588
589 * class.c (note_name_declared_in_class): Make in 'extern "C"' blocks,
590 or if -fms-extensions is enabled check, check permissive.
591
592 2010-08-09 Jason Merrill <jason@redhat.com>
593
594 PR c++/45236
595 * pt.c (lookup_template_class): Don't re-coerce outer parms.
596
597 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
598
599 * call.c (add_builtin_candidates): Use VECs for local variable
600 `types'. Adjust remainder of function accordingly.
601
602 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
603
604 * name-lookup.c (is_associated_namespace): Convert local variables
605 to be VECs instead of TREE_LISTs.
606
607 2010-08-09 Nathan Froyd <froydnj@codesourcery.com>
608
609 * tree.c (varargs_function_p): Use stdarg_p.
610
611 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
612
613 * parser.c (cp_default_arg_entry): Declare. Declare a VEC of it.
614 (cp_unparsed_functions_entry): Declare. Declare a VEC of it.
615 (cp_parser) [unparsed_functions_queues]: Rename to unparsed_queues.
616 Change type to a VEC.
617 (unparsed_funs_with_default_args): Define.
618 (unparsed_funs_with_definitions): Define.
619 (push_unparsed_function_queues): New function.
620 (cp_parser_new): Call it.
621 (pop_unparsed_function_queues): New function.
622 (cp_parser_class_specifier): Adjust processing of unparsed functions.
623 (cp_parser_template_declaration_after_export): Use VEC_safe_push.
624 (cp_parser_save_member_function_body): Likewise.
625 (cp_parser_late_parsing_for_member): Call push_unparsed_function_queues
626 and pop_unparsed_function_queues.
627 (cp_parser_late_parsing_default_args): Likewise.
628 (cp_parser_save_default_args): Use VEC_safe_push.
629
630 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
631
632 * name-lookup.h (cp_label_binding): Declare. Declare a VEC type
633 containing it.
634 (cp_binding_level): Convert shadowed_labels and dead_vars_from_for
635 fields to VECs.
636 * decl.c (poplevel): Adjust for type changes.
637 (declare_local_label): Likewise.
638
639 2010-08-06 Jason Merrill <jason@redhat.com>
640
641 * typeck.c (complete_type_or_maybe_complain): Split out from...
642 (complete_type_or_else): Here.
643 (build_class_member_access_expr): Call it.
644 (finish_class_member_access_expr): Likewise.
645 * call.c (build_special_member_call): Likewise.
646 * cvt.c (build_expr_type_conversion): Likewise.
647 * init.c (build_new): Likewise.
648 * typeck2.c (build_functional_cast): Likewise.
649 * cp-tree.h: Declare it.
650
651 * init.c (build_value_init): Add complain parm.
652 (build_value_init_noctor): Likewise.
653 (perform_member_init): Pass it.
654 (expand_aggr_init_1): Likewise.
655 (build_new_1): Likewise.
656 (build_vec_init): Likewise.
657 * pt.c (tsubst_expr): Likewise.
658 * typeck2.c (build_functional_cast): Likewise.
659 * cp-tree.h: Adjust.
660 * tree.c (build_target_expr_with_type): Handle error_mark_node.
661
662 * typeck.c (decay_conversion): Any expression with type nullptr_t
663 decays to nullptr.
664
665 2010-07-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
666
667 PR c++/45112
668 * decl.c (duplicate_decls): Merge DECL_USER_ALIGN and DECL_PACKED.
669
670 2010-07-27 Jason Merrill <jason@redhat.com>
671
672 * pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
673 from build_value_init.
674 * init.c (build_value_init_noctor): Give error for unknown array
675 bound.
676
677 2010-07-27 Joseph Myers <joseph@codesourcery.com>
678
679 * cp-objcp-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
680
681 2010-07-27 Joseph Myers <joseph@codesourcery.com>
682
683 * cp-objcp-common.c (cxx_initialize_diagnostics): First call
684 c_common_initialize_diagnostics.
685 * cp-objcp-common.h (LANG_HOOKS_OPTION_LANG_MASK,
686 LANG_HOOKS_COMPLAIN_WRONG_LANG_P): Define.
687
688 2010-07-21 Jason Merrill <jason@redhat.com>
689
690 * tree.c (cp_tree_equal): Fix CONSTRUCTOR handling.
691
692 * parser.c (cp_parser_init_declarator): Pass LOOKUP_NORMAL
693 to cp_finish_decl.
694
695 2010-07-20 Jeffrey Yasskin <jyasskin@google.com>
696
697 PR c++/44641
698 * pt.c (instantiate_class_template): Propagate the template's
699 location to its instance.
700
701 2010-07-20 Jason Merrill <jason@redhat.com>
702
703 PR c++/44967
704 * pt.c (tsubst_copy_and_build): Rework last change.
705
706 PR c++/44967
707 * pt.c (tsubst_copy_and_build): Handle partial substitution of
708 CALL_EXPR.
709
710 2010-07-19 Jason Merrill <jason@redhat.com>
711
712 PR c++/44996
713 * semantics.c (finish_decltype_type): Correct decltype
714 of parenthesized rvalue reference variable.
715
716 PR c++/44969
717 * tree.c (cp_tree_equal): Compare type of *CAST_EXPR.
718 * pt.c (iterative_hash_template_arg): Hash type of *CAST_EXPR.
719
720 2010-07-19 Paolo Carlini <paolo.carlini@oracle.com>
721
722 PR c++/44969
723 * typeck.c (build_x_compound_expr_from_list): Add tsubst_flags_t
724 parameter.
725 * cp-tree.h: Adjust declaration.
726 * init.c (perform_member_init): Adjust caller.
727 * decl.c (grok_reference_init, cp_finish_decl): Likewise.
728 * typeck2.c (store_init_value): Likewise.
729 (build_functional_cast): Pass complain argument to
730 build_x_compound_expr_from_list.
731
732 2010-07-16 Jason Merrill <jason@redhat.com>
733
734 PR c++/32505
735 * pt.c (process_partial_specialization): Diagnose partial
736 specialization after instantiation.
737 (most_specialized_class): Add complain parm.
738
739 * ptree.c (cxx_print_xnode): Handle TEMPLATE_INFO.
740
741 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
742
743 * init.c (build_new_1): Use cp_build_function_call_nary instead of
744 cp_build_function_call.
745
746 2010-07-15 Jason Merrill <jason@redhat.com>
747
748 PR c++/44909
749 * call.c (add_function_candidate): If we're working on an implicit
750 declaration, don't consider candidates that won't match.
751 * typeck.c (same_type_ignoring_top_level_qualifiers_p): Now a fn.
752 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): Adjust.
753
754 Revert:
755 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
756 (TYPE_HAS_USER_OPEQ): New.
757 * decl.c (grok_special_member_properties): Set it.
758 * class.c (add_implicitly_declared_members): Don't lazily declare
759 constructors/operator= if a base or member has a user-declared one.
760 (check_bases_and_members, check_bases): Adjust.
761 (check_field_decls, check_field_decl): Adjust.
762
763 2010-07-15 Anatoly Sokolov <aesok@post.ru>
764
765 * decl.c (integer_three_node): Remove.
766 (cxx_init_decl_processing): Do not initialize the integer_three_node.
767 * cp-tree.h (integer_three_node): Remove.
768
769 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
770
771 * cp-tree.h: Carefully replace TREE_CHAIN with DECL_CHAIN.
772 * call.c: Likewise.
773 * class.c: Likewise.
774 * cp-gimplify.c: Likewise.
775 * decl.c: Likewise.
776 * decl2.c: Likewise.
777 * init.c: Likewise.
778 * mangle.c: Likewise.
779 * name-lookup.c: Likewise.
780 * optimize.c: Likewise.
781 * parser.c: Likewise.
782 * pt.c: Likewise.
783 * rtti.c: Likewise.
784 * search.c: Likewise.
785 * semantics.c: Likewise.
786 * typeck.c: Likewise.
787 * typeck2.c: Likewise.
788
789 2010-07-14 Jason Merrill <jason@redhat.com>
790
791 * init.c (sort_mem_initializers): Rename "field_type" to "ctx".
792 (build_field_list): Cache field type.
793
794 Implement C++0x unrestricted unions (N2544)
795 * class.c (check_field_decl): Loosen union handling in C++0x.
796 * method.c (walk_field_subobs): Split out from...
797 (synthesized_method_walk): ...here. Set msg before loops.
798 (process_subob_fn): Check for triviality in union members.
799 * init.c (sort_mem_initializers): Splice out uninitialized
800 anonymous unions and union members.
801 (push_base_cleanups): Don't automatically destroy anonymous unions
802 and union members.
803
804 2010-07-13 Jason Merrill <jason@redhat.com>
805
806 PR c++/44909
807 * cp-tree.h (struct lang_type_class): Add has_user_opeq.
808 (TYPE_HAS_USER_OPEQ): New.
809 * decl.c (grok_special_member_properties): Set it.
810 * class.c (add_implicitly_declared_members): Don't lazily declare
811 constructors/operator= if a base or member has a user-declared one.
812 (check_bases_and_members, check_bases): Adjust.
813 (check_field_decls, check_field_decl): Adjust.
814 * method.c (synthesized_method_walk): Initialize check_vdtor.
815
816 PR c++/44540
817 * mangle.c (write_type): Canonicalize.
818 (canonicalize_for_substitution): Retain cv-quals on FUNCTION_TYPE.
819 (write_CV_qualifiers_for_type): Ignore them in abi>=5.
820
821 2010-07-13 Paolo Carlini <paolo.carlini@oracle.com>
822
823 PR c++/44908
824 * call.c (convert_like_real): Adjust convert_ptrmem call, pass
825 complain argument.
826 * typeck.c (get_delta_difference): Update prototype, add a
827 tsubst_flags_t parameter; update get_delta_difference_1 calls and
828 add checks for error_mark_node.
829 (get_delta_difference_1): Update prototype, add a tsubst_flags_t
830 parameter; update lookup_base call.
831 (build_ptrmemfunc): Update prototype, add a tsubst_flags_t
832 parameter; update get_delta_difference call and add check for
833 error_mark_node.
834 (convert_ptrmem): Update prototype, add a tsubst_flags_t
835 parameter; update get_delta_difference call and add check for
836 error_mark_node; update build_ptrmemfunc call.
837 (build_static_cast_1): Adjust convert_ptrmem call.
838 (expand_ptrmemfunc_cst): Adjust get_delta_difference call.
839 (cp_build_unary_op): Adjust build_ptrmemfunc call.
840 * cvt.c (cp_convert_to_pointer, convert_force): Adjust convert_ptrmem
841 and build_ptrmemfunc calls.
842 * cp-tree.h: Update build_ptrmemfunc and convert_ptrmem prototypes.
843
844 2010-07-12 Paolo Carlini <paolo.carlini@oracle.com>
845
846 PR c++/44907
847 * call.c (build_temp): Add tsubst_flags_t complain parameter;
848 adjust build_special_member_call call, pass complain.
849 (convert_like_real): Adjust build_temp call, pass complain.
850
851 2010-07-09 Jason Merrill <jason@redhat.com>
852
853 PR c++/43120
854 * cp-tree.h (BV_LOST_PRIMARY): New macro.
855 * class.c (update_vtable_entry_for_fn): Fix covariant thunk logic.
856 Set BV_LOST_PRIMARY.
857 (build_vtbl_initializer): Check BV_LOST_PRIMARY.
858
859 2010-07-08 Jason Merrill <jason@redhat.com>
860
861 PR c++/43120
862 * class.c (update_vtable_entry_for_fn): Fix handling of dummy
863 virtual bases for covariant thunks.
864
865 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
866
867 * cp-tree.h: Do not include toplev.h.
868
869 2010-07-06 Jason Merrill <jason@redhat.com>
870
871 PR c++/44703
872 * call.c (is_std_init_list): Look through typedefs.
873
874 PR c++/44778
875 * init.c (build_offset_ref): If scope isn't dependent,
876 don't exit early. Look at TYPE_MAIN_VARIANT.
877 * pt.c (tsubst_copy) [OFFSET_REF]: Do substitution.
878
879 * error.c (dump_function_decl): Don't crash on null DECL_NAME.
880
881 2010-07-06 Shujing Zhao <pearly.zhao@oracle.com>
882
883 * cp-tree.h (impl_conv_void): New type.
884 (convert_to_void): Adjust prototype.
885 * cvt.c (convert_to_void): Use impl_conv_void, emit and adjust the
886 diagnostic for easy translation. Change caller.
887 * typeck.c: Update call to convert_to_void.
888 * semantics.c: Likewise.
889 * init.c: Likewise.
890
891 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
892
893 * decl.c (cp_finish_decl): Call add_local_decl.
894 * optimize.c (clone_body): Adjust for new type of cfun->local_decls.
895
896 2010-07-05 Paolo Carlini <paolo.carlini@oracle.com>
897
898 * pt.c (tsubst): Early declare code = TREE_CODE (t) and use it
899 throughout.
900
901 2010-07-05 Shujing Zhao <pearly.zhao@oracle.com>
902
903 PR c++/22138
904 * parser.c (cp_parser_primary_expression): Error if local template is
905 declared.
906
907 2010-07-02 Le-Chun Wu <lcwu@google.com>
908
909 PR/44128
910 * name-lookup.c (pushdecl_maybe_friend): Warn when a local decl
911 (variable or type) shadows another type.
912
913 2010-07-02 Jakub Jelinek <jakub@redhat.com>
914
915 PR c++/44780
916 * typeck.c (convert_for_assignment): When converting a convertible
917 vector type or objc++ types, call mark_rvalue_use.
918 * typeck2.c (build_m_component_ref): Use return values from
919 mark_rvalue_use or mark_lvalue_use.
920 * class.c (build_base_path): Likewise.
921 * call.c (build_conditional_expr): Likewise.
922
923 2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
924
925 PR c++/44039
926 * pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
927 returns NULL_TREE.
928
929 2010-07-01 Richard Guenther <rguenther@suse.de>
930
931 * cp-gimplify.c (cp_gimplify_expr): Open-code the rhs
932 predicate we are looking for, allow non-gimplified
933 INDIRECT_REFs.
934
935 2010-06-30 Paolo Carlini <paolo.carlini@oracle.com>
936
937 PR c++/44628
938 * typeck.c (cp_build_unary_op): Early return error_mark_node when
939 arg is NULL_TREE too.
940 * call.c (convert_class_to_reference): Return error_mark_node when
941 expr is NULL_TREE.
942
943 2010-06-30 Michael Matz <matz@suse.de>
944
945 * repo.c (finish_repo): Fix typo.
946
947 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
948
949 * parser.c (cp_parser_omp_for_loop): Use a VEC for for_block.
950
951 2010-06-30 Nathan Froyd <froydnj@codesourcery.com>
952
953 * repo.c (pending_repo): Change type to a VEC.
954 (finish_repo): Adjust for new type of pending_repo.
955 (repo_emit_p): Likewise.
956
957 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
958
959 * tree.c: Include gimple.h. Do not include tree-flow.h
960 * decl.c: Do not include tree-flow.h
961 * Make-lang.in: Adjust dependencies.
962
963 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
964
965 * decl.c (incomplete_var): Declare. Declare VECs containing them.
966 (incomplete_vars): Adjust comment. Change type to a VEC.
967 (maybe_register_incomplete_var): Adjust for new type.
968 (complete_vars): Adjust iteration over incomplete_vars.
969
970 2010-06-29 Nathan Froyd <froydnj@codesourcery.com>
971
972 * decl.c (struct named_label_entry): Change type of bad_decls field
973 to a VEC.
974 (poplevel_named_label_1): Adjust for new type of bad_decls.
975 (check_goto): Likewise.
976
977 2010-06-29 Jason Merrill <jason@redhat.com>
978
979 Enable implicitly declared move constructor/operator= (N3053).
980 * class.c (add_implicitly_declared_members): A class with no
981 explicitly declared copy or move constructor gets both declared
982 implicitly, and similarly for operator=.
983 (check_bases): A type with no copy ctor does not inhibit
984 a const copy ctor in a derived class. It does mean the derived
985 one is non-trivial.
986 (check_field_decl): Likewise.
987 (check_bases_and_members): A nonexistent copy ctor/op= is non-trivial.
988 * tree.c (type_has_nontrivial_copy_init): Adjust semantics.
989 (trivially_copyable_p): Likewise.
990 * call.c (convert_like_real): Use type_has_nontrivial_copy_init.
991 * class.c (finish_struct_bits): Likewise.
992 * tree.c (build_target_expr_with_type): Likewise.
993 * typeck2.c (store_init_value): Likewise.
994
995 Enable implicitly deleted functions (N2346)
996 * class.c (check_bases_and_members): Adjust lambda flags.
997 * method.c (implicitly_declare_fn): Set DECL_DELETED_FN if appropriate.
998
999 * decl2.c (mark_used): Adjust error for use of deleted function.
1000
1001 Machinery to support implicit delete/move.
1002 * cp-tree.h: (struct lang_type_class): Add lazy_move_assign,
1003 has_complex_move_ctor, has_complex_move_assign bitfields.
1004 (CLASSTYPE_LAZY_MOVE_ASSIGN): New.
1005 (TYPE_HAS_COMPLEX_MOVE_ASSIGN): New.
1006 (TYPE_HAS_COMPLEX_MOVE_CTOR): New.
1007 (enum special_function_kind): Add sfk_move_assignment.
1008 (LOOKUP_SPECULATIVE): New.
1009 * call.c (build_over_call): Return early if it's set.
1010 (build_over_call): Use trivial_fn_p.
1011 * class.c (check_bases): If the base has no default constructor,
1012 the derived one is non-trivial. Handle move ctor/op=.
1013 (check_field_decl): Likewise.
1014 (check_bases_and_members): Handle move ctor/op=.
1015 (add_implicitly_declared_members): Handle CLASSTYPE_LAZY_MOVE_ASSIGN.
1016 (type_has_move_constructor, type_has_move_assign): New.
1017 * decl.c (grok_special_member_properties): Handle move ctor/op=.
1018 * method.c (type_has_trivial_fn, type_set_nontrivial_flag): New.
1019 (trivial_fn_p): New.
1020 (do_build_copy_constructor): Use it.
1021 (do_build_assign_ref): Likewise. Handle move assignment.
1022 (build_stub_type, build_stub_object, locate_fn_flags): New.
1023 (locate_ctor): Use locate_fn_flags.
1024 (locate_copy, locate_dtor): Remove.
1025 (get_dtor, get_default_ctor, get_copy_ctor, get_copy_assign): New.
1026 (process_subob_fn, synthesized_method_walk): New.
1027 (maybe_explain_implicit_delete): New.
1028 (implicitly_declare_fn): Use synthesized_method_walk,
1029 type_has_trivial_fn, and type_set_nontrivial_flag.
1030 (defaulted_late_check): Set DECL_DELETED_FN.
1031 (defaultable_fn_check): Handle sfk_move_assignment.
1032 (lazily_declare_fn): Clear CLASSTYPE_LAZY_* early. Don't declare
1033 implicitly deleted move ctor/op=.
1034 * search.c (lookup_fnfields_1): Handle sfk_move_assignment.
1035 (lookup_fnfields_slot): New.
1036 * semantics.c (omp_clause_info_fndecl): Remove.
1037 (cxx_omp_create_clause_info): Use get_default_ctor, get_copy_ctor,
1038 get_copy_assign, trivial_fn_p.
1039 (trait_expr_value): Adjust call to locate_ctor.
1040 * tree.c (special_function_p): Handle sfk_move_assignment.
1041
1042 * class.c (type_has_virtual_destructor): New.
1043 * cp-tree.h: Declare it.
1044 * semantics.c (trait_expr_value): Use it.
1045
1046 * call.c (build_over_call): Only give warnings with tf_warning.
1047
1048 * name-lookup.c (pop_scope): Handle NULL_TREE.
1049
1050 * cp-tree.h (TYPE_HAS_ASSIGN_REF): Rename to TYPE_HAS_COPY_ASSIGN.
1051 (TYPE_HAS_CONST_ASSIGN_REF): Rename to TYPE_HAS_CONST_COPY_ASSIGN.
1052 (TYPE_HAS_INIT_REF): Rename to TYPE_HAS_COPY_CTOR.
1053 (TYPE_HAS_CONST_INIT_REF): Rename to TYPE_HAS_CONST_COPY_CTOR.
1054 (TYPE_HAS_COMPLEX_ASSIGN_REF): Rename to TYPE_HAS_COMPLEX_COPY_ASSIGN.
1055 (TYPE_HAS_COMPLEX_INIT_REF): Rename to TYPE_HAS_COMPLEX_COPY_CTOR.
1056 (TYPE_HAS_TRIVIAL_ASSIGN_REF): Rename to TYPE_HAS_TRIVIAL_COPY_ASSIGN.
1057 (TYPE_HAS_TRIVIAL_INIT_REF): Rename to TYPE_HAS_TRIVIAL_COPY_CTOR.
1058 (CLASSTYPE_LAZY_ASSIGNMENT_OP): Rename to CLASSTYPE_LAZY_COPY_ASSIGN.
1059 (sfk_assignment_operator): Rename to sfk_copy_assignment.
1060 * decl.c, call.c, class.c, init.c, method.c, pt.c, ptree.c: Adjust.
1061 * search.c, semantics.c, tree.c: Adjust.
1062
1063 * pt.c (dependent_scope_ref_p): Remove.
1064 (value_dependent_expression_p): Don't call it.
1065 (type_dependent_expression_p): Here either.
1066 * init.c (build_offset_ref): Set TREE_TYPE on a qualified-id
1067 if the scope isn't dependent.
1068
1069 * pt.c (convert_nontype_argument): Use mark_lvalue_use if we want
1070 a reference.
1071
1072 PR c++/44587
1073 * pt.c (has_value_dependent_address): New.
1074 (value_dependent_expression_p): Check it.
1075 (convert_nontype_argument): Likewise. Call decay_conversion before
1076 folding if we want a pointer.
1077 * semantics.c (finish_id_expression): Don't add SCOPE_REF if the
1078 scope is the current instantiation.
1079
1080 2010-06-28 Jakub Jelinek <jakub@redhat.com>
1081
1082 PR c++/44682
1083 * class.c (build_base_path): If want_pointer, call mark_rvalue_use
1084 on expr.
1085
1086 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
1087
1088 * init.c: Do not include except.h.
1089 * decl.c: Likewise.
1090 * expr.c: Likewise.
1091 * cp-lang.c: Likewise.
1092 * pt.c: Likewise.
1093 * semantics.c: Likewise.
1094 * decl2.c: Likewise.
1095 * except.c: Likewise.
1096 (init_exception_processing): Do not set the removed
1097 lang_protect_cleanup_actions here.
1098 (cp_protect_cleanup_actions): Make non-static and remove prototype.
1099 (doing_eh): New, moved from except.c but removed the do_warning flag.
1100 (expand_start_catch_block): Update doing_eh call.
1101 (expand_end_catch_block): Likewise.
1102 (build_throw): Likewise.
1103 * cp-tree.h: Prototype cp_protect_cleanup_actions.
1104 * cp-objcp-common.h: Set LANG_HOOKS_EH_PROTECT_CLEANUP_ACTIONS to
1105 cp_protect_cleanup_actions.
1106 * Make-lang.in: Update dependencies.
1107
1108 2010-06-26 Jason Merrill <jason@redhat.com>
1109
1110 * call.c (add_function_candidate): Set LOOKUP_COPY_PARM for any
1111 constructor called with a single argument that takes a reference
1112 to the constructor's class.
1113 (BAD_CONVERSION_RANK): New.
1114 (compare_ics): Use it to compare bad ICSes.
1115
1116 2010-06-25 Joseph Myers <joseph@codesourcery.com>
1117
1118 * lang-specs.h: Remove +e handling.
1119
1120 2010-06-24 Andi Kleen <ak@linux.intel.com>
1121
1122 * parser.c: (cp_parser_question_colon_clause):
1123 Switch to use cp_lexer_peek_token.
1124 Call warn_for_omitted_condop. Call pedwarn for omitted
1125 middle operand.
1126
1127 2010-06-22 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR c++/44619
1130 * typeck2.c (build_m_component_ref): Call mark_lvalue_use on
1131 datum and mark_rvalue_use on component.
1132
1133 PR c++/44627
1134 * error.c (dump_expr): Don't look at CALL_EXPR_ARG (t, 0) if
1135 the CALL_EXPR has no arguments.
1136
1137 2010-06-21 Jason Merrill <jason@redhat.com>
1138
1139 * typeck.c (comp_except_specs): Fix ce_derived with noexcept.
1140
1141 * semantics.c (check_trait_type): Check COMPLETE_TYPE_P for array
1142 element type.
1143
1144 2010-06-17 Nathan Froyd <froydnj@codesourcery.com>
1145
1146 * name-lookup.c (struct arg_lookup): Convert namespaces and
1147 classes fields to VEC.
1148 (arg_assoc_namespace): Adjust for new type of namespaces.
1149 (arg_assoc_class): Adjust for new type of classes.
1150 (lookup_arg_dependent): Use make_tree_vector and
1151 release_tree_vector.
1152 * typeck2.c (build_x_arrow): Use vec_member.
1153
1154 2010-06-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
1155
1156 PR c++/44486
1157 * error.c (dump_decl): Better wording for anonymous namespace.
1158
1159 2010-06-16 Nathan Froyd <froydnj@codesourcery.com>
1160
1161 * class.c (build_vtbl_initializer): Adjust computation of new_position
1162 and which entry to add padding for.
1163
1164 2010-06-16 Jason Merrill <jason@redhat.com>
1165
1166 * except.c (check_noexcept_r): Return the problematic function.
1167 (finish_noexcept_expr): Give -Wnoexcept warning. Add complain parm.
1168 * pt.c (tsubst_copy_and_build): Pass it.
1169 * parser.c (cp_parser_unary_expression): Likewise.
1170 * cp-tree.h: Adjust prototype.
1171
1172 * method.c (defaulted_late_check): Give the defaulted method
1173 the same exception specification as the implicit declaration.
1174
1175 2010-06-15 Jason Merrill <jason@redhat.com>
1176
1177 * class.c (add_implicitly_declared_members): Implicit assignment
1178 operators can also be virtual overriders.
1179 * method.c (lazily_declare_fn): Likewise.
1180
1181 * call.c (convert_like_real): Give "initializing argument of"
1182 information for ambiguous conversion. Give source position
1183 of function.
1184
1185 * call.c (print_z_candidates): Do print viable deleted candidates.
1186 (joust): Don't choose a deleted function just because its worst
1187 conversion is better than another candidate's worst.
1188
1189 * call.c (convert_like_real): Don't complain about
1190 list-value-initialization from an explicit constructor.
1191
1192 * decl.c (duplicate_decls): Use DECL_IS_BUILTIN rather than test
1193 DECL_SOURCE_LOCATION directly.
1194
1195 * class.c (type_has_user_provided_default_constructor): Use
1196 sufficient_parms_p.
1197
1198 * call.c (is_subseq): Handle ck_aggr, ck_list.
1199 (compare_ics): Treat an aggregate or ambiguous conversion to the
1200 same type as involving the same function.
1201
1202 2010-06-13 Shujing Zhao <pearly.zhao@oracle.com>
1203
1204 * typeck.c (convert_for_assignment): Fix comment. Change message
1205 format from %d to %qP.
1206 (convert_for_initialization): Fix comment.
1207
1208 2010-06-11 Shujing Zhao <pearly.zhao@oracle.com>
1209
1210 * cp-tree.h (expr_list_kind): New type.
1211 (impl_conv_rhs): New type.
1212 (build_x_compound_expr_from_list, convert_for_initialization): Adjust
1213 prototype.
1214 (typeck.c (convert_arguments): Use impl_conv_rhs and emit the
1215 diagnostics for easy translation. Change caller.
1216 (convert_for_initialization): Use impl_conv_rhs and change caller.
1217 (build_x_compound_expr_from_list): Use expr_list_kind and emit the
1218 diagnostics for easy translation. Change caller.
1219 * decl.c (bad_spec_place): New enum.
1220 (bad_specifiers): Use it and emit the diagnostics for easy
1221 translation. Change caller.
1222 * pt.c (coerce_template_parms): Put the diagnostics in full sentence.
1223
1224 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1225
1226 * cp-tree.h (struct saved_scope): Change decl_ns_list field type
1227 to a VEC.
1228 * decl2.c (cp_write_global_declarations): Adjust for new type of
1229 decl_namespace_list.
1230 * name-lookup.c (current_decl_namespace): Likewise.
1231 (push_decl_namespace): Likewise.
1232 (pop_decl_namespace): Likewise.
1233
1234 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1235
1236 * call.c (build_java_interface_fn_ref): Call build_function_type_list
1237 instead of build_function_type.
1238 * decl.c (cxx_init_decl_processing): Likewise.
1239 (declare_global_var): Likewise.
1240 (get_atexit_node): Likewise.
1241 (expand_static_init): Likewise.
1242 * decl2.c (start_objects): Likewise.
1243 (start_static_storage_duration_function): Likewise.
1244 * except.c (init_exception_processing): Likewise.
1245 (build_exc_ptr): Likewise.
1246 (build_throw): Likewise.
1247 * rtti.c (throw_bad_cast): Likewise.
1248 (throw_bad_typeid): Likewise.
1249 (build_dynamic_cast_1): Likewise.
1250
1251 2010-06-09 Nathan Froyd <froydnj@codesourcery.com>
1252
1253 * call.c (build_call_n): Call XALLOCAVEC instead of alloca.
1254 (build_op_delete_call): Likewise.
1255 (build_over_call): Likewise.
1256 * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise.
1257 * pt.c (process_partial_specialization): Likewise.
1258 (tsubst_template_args): Likewise.
1259 * semantics.c (finish_asm_stmt): Likewise.
1260
1261 2010-06-08 Nathan Sidwell <nathan@codesourcery.com>
1262
1263 * decl.c (record_key_method_defined): New, broken out of ...
1264 (finish_function): ... here. Call it.
1265 (start_decl): Treat aliases as definitions.
1266
1267 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1268
1269 * typeck2.c (abstract_virtuals_error): Use typed GC allocation.
1270
1271 * pt.c (maybe_process_partial_specialization): Likewise.
1272 (register_specialization): Likewise.
1273 (add_pending_template): Likewise.
1274 (lookup_template_class): Likewise.
1275 (push_tinst_level): Likewise.
1276
1277 * parser.c (cp_lexer_new_main): Likewise.
1278 (cp_lexer_new_from_tokens): Likewise.
1279 (cp_token_cache_new): Likewise.
1280 (cp_parser_context_new): Likewise.
1281 (cp_parser_new): Likewise.
1282 (cp_parser_nested_name_specifier_opt): Likewise.
1283 (cp_parser_template_id): Likewise.
1284
1285 * name-lookup.c (binding_entry_make): Likewise.
1286 (binding_table_construct): Likewise.
1287 (binding_table_new): Likewise.
1288 (cxx_binding_make): Likewise.
1289 (pushdecl_maybe_friend): Likewise.
1290 (begin_scope): Likewise.
1291 (push_to_top_level): Likewise.
1292
1293 * lex.c (init_reswords): Likewise.
1294 (retrofit_lang_decl): Likewise.
1295 (cxx_dup_lang_specific_decl): Likewise.
1296 (copy_lang_type): Likewise.
1297 (cxx_make_type): Likewise.
1298
1299 * decl.c (make_label_decl): Likewise.
1300 (check_goto): Likewise.
1301 (start_preparsed_function): Likewise.
1302 (save_function_data): Likewise.
1303
1304 * cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1305
1306 * cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
1307
1308 * class.c (finish_struct_1): Likewise.
1309
1310 * cp-tree.h (struct lang_type): Add variable_size GTY option.
1311 (struct lang_decl): Likewise.
1312
1313 * parser.c (cp_parser_new): Update comment to not reference
1314 ggc_alloc.
1315
1316 2010-06-07 Jason Merrill <jason@redhat.com>
1317
1318 PR c++/44366
1319 * error.c (dump_parameters): Mask out TFF_SCOPE.
1320 (dump_simple_decl): Don't print the scope of a PARM_DECL.
1321 (dump_scope): Remove no-op mask.
1322
1323 PR c++/44401
1324 * parser.c (cp_parser_lookup_name): Fix naming the constructor.
1325
1326 * cp-tree.h (COMPLETE_OR_OPEN_TYPE_P): New macro.
1327 * init.c (build_offset_ref): Use it.
1328 * pt.c (maybe_process_partial_specialization): Use it.
1329 (instantiate_class_template): Use it.
1330 * search.c (lookup_base): Use it.
1331
1332 2010-06-07 Jakub Jelinek <jakub@redhat.com>
1333
1334 PR c++/44444
1335 * expr.c (mark_exp_read): Handle INDIRECT_REF.
1336 * cvt.c (convert_to_void): Handle INDIRECT_REF like
1337 handled_component_p.
1338
1339 PR c++/44443
1340 * decl.c (initialize_local_var): If TREE_USED is set on the type,
1341 set also DECL_READ_P on the decl.
1342
1343 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1344
1345 PR c++/44188
1346 * cp-tree.h (typedef_variant_p): Move this declaration to
1347 gcc/tree.h.
1348 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1349 * decl.c (grokdeclarator): Do not rename debug info of an
1350 anonymous tagged type named by a typedef.
1351
1352 2010-06-05 Fabien Chêne <fabien@gcc.gnu.org>
1353
1354 PR c++/44086
1355 * class.c (check_field_decls): Move the call to
1356 check_bitfield_decl before trying to set the
1357 CLASSTYPE_READONLY_FIELDS_NEED_INIT flag.
1358
1359 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
1360
1361 * typeck.c: Update include path for moved files.
1362 * decl.c: Likewise.
1363 * rtti.c: Likewise.
1364 * cp-gimplify.c: Likewise.
1365 * cp-lang.c: Likewise.
1366 * pt.c: Likewise.
1367 * semantics.c: Likewise.
1368 * cxx-pretty-print.h: Likewise.
1369 * decl2.c: Likewise.
1370 * parser.c: Likewise.
1371 * cp-objcp-common.c: Likewise.
1372 * cp-tree.h: Likewise.
1373 * name-lookup.c: Likewise.
1374 * lex.c: Likewise.
1375 * name-lookup.h: Likewise.
1376 * config-lang.in: Update paths in gtfiles for files in c-family/.
1377 * Make-lang.in: Likewise.
1378
1379 2010-06-04 Magnus Fromreide <magfr@lysator.liu.se>
1380
1381 * cvt.c (cp_convert_to_pointer): Use null_ptr_cst_p.
1382 * typeck.c (build_ptrmemfunc): Likewise.
1383
1384 2010-06-04 Jason Merrill <jason@redhat.com>
1385
1386 * typeck2.c (merge_exception_specifiers): Adjust merging of
1387 throw() and noexcept(true).
1388
1389 * pt.c (value_dependent_expression_p) [NOEXCEPT_EXPR]: Avoid
1390 using an uninitialized variable.
1391
1392 * cxx-pretty-print.c (pp_cxx_unary_expression): Handle NOEXCEPT_EXPR.
1393 (pp_cxx_expression): Likewise.
1394
1395 Implement noexcept-specification (15.4)
1396 * parser.c (cp_parser_exception_specification_opt): Parse it.
1397 Give -Wdeprecated warning about throw() specs.
1398 * pt.c (tsubst_exception_specification): Handle it.
1399 * error.c (dump_exception_spec): Handle it.
1400 (dump_expr): Handle NOEXCEPT_EXPR.
1401 * cxx-pretty-print.c (pp_cxx_exception_specification): Likewise.
1402 * typeck.c (comp_except_specs): Handle compatibility rules.
1403 Change exact parm to take an enum.
1404 * typeck2.c (merge_exception_specifiers): Handle noexcept.
1405 * except.c (nothrow_spec_p, type_noexcept_p): New fns.
1406 (type_throw_all_p, build_noexcept_spec): New fns.
1407 * cp-tree.h (TYPE_NOTHROW_P, TYPE_NOEXCEPT_P): Use them.
1408 (comp_except_specs): Define ce_derived, ce_normal, ce_exact enums.
1409 (cp_tree_index): Add CPTI_NOEXCEPT_TRUE_SPEC, CPTI_NOEXCEPT_FALSE_SPEC.
1410 (noexcept_true_spec, noexcept_false_spec): New macros.
1411 * name-lookup.c (pushdecl_maybe_friend): Adjust.
1412 * search.c (check_final_overrider): Adjust.
1413 * decl.c (check_redeclaration_exception_specification): Adjust.
1414 (use_eh_spec_block): Use type_throw_all_p.
1415 (cxx_init_decl_processing): Set noexcept_false_spec,noexcept_true_spec.
1416 Give operator new a noexcept-specification in C++0x mode.
1417 * tree.c (build_exception_variant, cxx_type_hash_eq): Adjust.
1418 (cp_build_type_attribute_variant): Don't test TYPE_RAISES_EXCEPTIONS.
1419
1420 Implement noexcept operator (5.3.7)
1421 * cp-tree.def (NOEXCEPT_EXPR): New.
1422 * except.c (check_noexcept_r, finish_noexcept_expr): New.
1423 * cp-tree.h: Declare finish_noexcept_expr.
1424 * parser.c (cp_parser_unary_expression): Parse noexcept-expression.
1425 * pt.c (tsubst_copy_and_build): And tsubst it.
1426 (type_dependent_expression_p): Handle it.
1427 (value_dependent_expression_p): Handle it.
1428
1429 * call.c (build_conditional_expr): Never fold in unevaluated context.
1430 * tree.c (build_aggr_init_expr): Propagate TREE_NOTHROW.
1431 * semantics.c (simplify_aggr_init_expr): Likewise.
1432 * typeck.c (merge_types): Call merge_exception_specifiers.
1433 * decl.c (duplicate_decls): Check DECL_SOURCE_LOCATION rather than
1434 DECL_ANTICIPATED for preferring new type.
1435
1436 2010-06-04 Joseph Myers <joseph@codesourcery.com>
1437
1438 * g++spec.c (lang_specific_driver): Use GCC-specific formats in
1439 diagnostics.
1440
1441 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1442
1443 PR c++/44412
1444 * typeck.c (build_class_member_access_expr): Call mark_exp_read
1445 on object for static data members.
1446
1447 2010-06-04 Jakub Jelinek <jakub@redhat.com>
1448 Jason Merrill <jason@redhat.com>
1449
1450 PR c++/44362
1451 * call.c (build_conditional_expr): If both arg2 and arg3 are lvalues
1452 with the same type, call mark_lvalue_use on both.
1453
1454 2010-06-03 Nathan Froyd <froydnj@codesourcery.com>
1455
1456 * class.c (struct vtbl_init_data_s): Remove last_init field.
1457 (struct secondary_vptr_vtt_init_data_s): Change type of inits field
1458 to a VEC.
1459 (finish_vtbls): Use a VEC rather than a TREE_LIST for the accumulated
1460 initializers.
1461 (build_vtt): Likewise.
1462 (initialize_vtable): Take a VEC instead of a tree.
1463 (build_vtt_inits): Change return type to void. Take a VEC **
1464 instead of a tree *; accumulate results into said VEC.
1465 (build_ctor_vtbl_group): Use a VEC rather than a TREE_LIST for the
1466 accumulated initializers. Pass the vtable to accumulate_vtbl_inits.
1467 (accumulate_vtbl_inits): Add extra vtable tree parameter; take a VEC
1468 instead of a tree.
1469 (dfs_accumulate_vtbl_inits): Likewise. Change return type to void.
1470 (build_vtbl_initializer): Add VEC parameter; accumulate initializers
1471 into it.
1472 (dfs_build_secondary_vptr_vtt_inits): Use CONSTRUCTOR_APPEND_ELT
1473 rather than tree_cons.
1474 (build_vbase_offset_vtbl_entries): Likewise.
1475 (add_vcall_offset): Likewise.
1476 (build_rtti_vtbl_entries): Likewise.
1477 * cp-tree.h (initialize_artificial_var): Take a VEC instead of a tree.
1478 * decl.c (initialize_artificial_var): Use build_constructor instead
1479 of build_constructor_from_list.
1480
1481 2010-06-03 H.J. Lu <hongjiu.lu@intel.com>
1482
1483 PR c++/44294
1484 * class.c (layout_class_type): Check MAX_FIXED_MODE_SIZE on
1485 bit-field.
1486
1487 2010-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
1488
1489 * parser.c (cp_parser_mem_initializer_list): Change error text.
1490
1491 2010-06-02 Jakub Jelinek <jakub@redhat.com>
1492
1493 * cp-objcp-common.c (shadowed_var_for_decl): Change into
1494 tree_decl_map hashtab from tree_map.
1495 (decl_shadowed_for_var_lookup, decl_shadowed_for_var_insert): Adjust.
1496 (init_shadowed_var_for_decl): Adjust initialization.
1497
1498 PR c++/44361
1499 * cvt.c (convert_to_void): If implicit is NULL, call mark_rvalue_use
1500 instead of calling mark_exp_read only when not an assignment.
1501
1502 PR debug/44367
1503 * semantics.c (finalize_nrv): Don't copy DECL_ARTIFICIAL, DECL_IGNORED_P,
1504 DECL_SOURCE_LOCATION and DECL_ABSTRACT_ORIGIN from var to result.
1505 Set DECL_VALUE_EXPR on var.
1506
1507 2010-06-02 Jason Merrill <jason@redhat.com>
1508
1509 * error.c (dump_type): Improve typedef handling.
1510
1511 PR c++/9726
1512 PR c++/23594
1513 PR c++/44333
1514 * name-lookup.c (same_entity_p): New.
1515 (ambiguous_decl): Multiple declarations of the same entity
1516 are not ambiguous.
1517
1518 2010-06-01 Jason Merrill <jason@redhat.com>
1519
1520 DR 990
1521 * call.c (add_list_candidates): Prefer the default constructor.
1522 (build_aggr_conv): Treat missing initializers like { }.
1523 * typeck2.c (process_init_constructor_record): Likewise.
1524 * init.c (expand_default_init): Use digest_init for
1525 direct aggregate initialization, too.
1526
1527 * call.c (add_list_candidates): Split out...
1528 (build_user_type_conversion_1): ...from here.
1529 (build_new_method_call): And here.
1530 (implicit_conversion): Propagate LOOKUP_NO_NARROWING.
1531
1532 PR c++/44358
1533 * call.c (build_list_conv): Set list-initialization flags properly.
1534
1535 2010-06-01 Nathan Froyd <froydnj@codesourcery.com>
1536
1537 * typeck2.c (build_x_arrow): Make types_memoized a VEC.
1538
1539 2010-06-01 Arnaud Charlet <charlet@adacore.com>
1540 Matthew Gingell <gingell@adacore.com>
1541
1542 * Make-lang.in (CXX_C_OBJS): Add c-ada-spec.o.
1543 * decl2.c: Include langhooks.h and c-ada-spec.h.
1544 (cpp_check, collect_source_refs, collect_ada_namespace,
1545 collect_all_refs): New functions.
1546 (cp_write_global_declarations): Add handling of -fdump-ada-spec.
1547 * lang-specs.h: Ditto.
1548
1549 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1550
1551 * cp-tree.h (cp_build_function_call_nary): Declare.
1552 * typeck.c (cp_build_function_call_nary): Define.
1553 * decl.c (register_dtor_fn): Use it instead of
1554 cp_build_function_call.
1555 (cxx_maybe_build_cleanup): Likewise.
1556 * decl2.c (generate_ctor_or_dtor_function): Likewise.
1557 * except.c (do_get_exception_ptr): Likewise.
1558 (do_begin_catch): Likewise.
1559 (do_allocate_exception): Likewise.
1560 (do_free_exception): Likewise.
1561 (build_throw): Likewise. Use cp_build_function_call_vec instead
1562 of cp_build_function_call.
1563 (do_end_catch): Likewise.
1564
1565 2010-05-29 Nathan Froyd <froydnj@codesourcery.com>
1566
1567 * cp-tree.h (struct cp_decl_specifier_seq): Move type_location field up.
1568 (struct cp_declarator): Move id_loc field up.
1569
1570 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1571
1572 * cp-tree.h (ATTRIBUTE_GCC_CXXDIAG): Remove. Require that
1573 this file is included before c-common.h. Define GCC_DIAG_STYLE
1574 before including diagnostic-core.h and toplev.h.
1575 (pedwarn_cxx98): Use ATTRIBUTE_GCC_DIAG.
1576 * pt.c: Include cp-tree.h before c-common.h.
1577
1578 2010-05-29 Steven Bosscher <steven@gcc.gnu.org>
1579
1580 * tree.c (c_register_addr_space): Add stub.
1581
1582 2010-05-28 Joseph Myers <joseph@codesourcery.com>
1583
1584 * g++spec.c (lang_specific_driver): Use fatal_error instead of
1585 fatal.
1586
1587 2010-05-28 Dodji Seketeli <dodji@redhat.com>
1588
1589 Revert fix of PR c++/44188
1590 * cp-tree.h (typedef_variant_p): Revert moving this declaration to
1591 gcc/tree.h.
1592 * tree.c (typedef_variant_p): Revert moving this definition to
1593 gcc/tree.c.
1594 * decl.c (grokdeclarator): Revert naming typedef handling.
1595
1596 2010-05-27 Joseph Myers <joseph@codesourcery.com>
1597
1598 * call.c: Include diagnostic-core.h instead of diagnostic.h.
1599 * cp-lang.c: Don't include diagnostic.h
1600 * name-lookup.c: Include diagnostic-core.h instead of
1601 diagnostic.h.
1602 (cp_emit_debug_info_for_using): Use seen_error.
1603 * optimize.c: Include diagnostic-core.h instead of diagnostic.h.
1604 * parser.c: Include diagnostic-core.h instead of diagnostic.h.
1605 * pt.c (iterative_hash_template_arg): Use seen_error.
1606 * repo.c: Include diagnostic-core.h instead of diagnostic.h.
1607 * typeck2.c: Include diagnostic-core.h instead of diagnostic.h.
1608 * Make-lang.in (cp/cp-lang.o, cp/typeck2.o, cp/call.o, cp/repo.o,
1609 cp/optimize.o, cp/parser.o, cp/name-lookup.o): Update
1610 dependencies.
1611
1612 2010-05-25 Dodji Seketeli <dodji@redhat.com>
1613
1614 PR c++/44188
1615 * cp-tree.h (typedef_variant_p): Move this declaration to
1616 gcc/tree.h.
1617 * tree.c (typedef_variant_p): Move this definition to gcc/tree.c.
1618 * decl.c (grokdeclarator): Do not rename debug info of an
1619 anonymous tagged type named by a typedef.
1620
1621 2010-05-27 Jason Merrill <jason@redhat.com>
1622
1623 PR c++/43555
1624 * decl.c (grokdeclarator) [cdk_pointer et al]: Force evaluation of
1625 anonymous VLA size.
1626
1627 2010-05-27 Kai Tietz <kai.tietz@onevision.com>
1628
1629 PR bootstrap/44287
1630 * rtti.c (emit_support_tinfos): Check for NULL_TREE.
1631 * class.c (layout_class_type): Likewise.
1632 * decl.c (finish_enum): Likewise.
1633 * mangle.c (write_builitin_type): Likewise.
1634
1635 2010-05-26 Kai Tietz <kai.tietz@onevision.com>
1636
1637 * cp-tree.h (cp_decl_specifier_seq): Add new bifield
1638 explicit_int128_p.
1639 * decl.c (grokdeclarator): Handle __int128.
1640 * parser.c (cp_lexer_next_token_is_decl_specifier_ke): Likewise.
1641 (cp_parser_simple_type_specifier): Likewise.
1642 * rtti.c (emit_support_tinfos): Add int128 nodes for rtti.
1643 * typeck.c (cp_common_type): Handle __int128.
1644 * mangle.c (integer_type_codes): Add itk_int128 and
1645 itk_unsigned_int128.
1646
1647 2010-05-26 Jason Merrill <jason@redhat.com>
1648
1649 PR c++/43382
1650 * pt.c (tsubst_pack_expansion): Don't get confused by recursive
1651 unification.
1652
1653 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1654
1655 * cp-lang.c: Do not include expr.h.
1656
1657 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
1658
1659 * decl.c: Do not include rtl.h
1660 * semantics.c: Likewise.
1661
1662 2010-05-25 Steven Bosscher <steven@gcc.gnu.org>
1663
1664 * cp-tree.h: Do not include splay-tree.h.
1665 (struct prtmem_cst): Remove unused field and false comment.
1666 * typeck.c: Do not include rtl.h, expr.h, and tm_p.h.
1667 * optimize.c: Do not inclde rtl.h, insn-config.h, and integrate.h.
1668 * init.c: Do not include rtl.h and expr.h.
1669 * class.c: Do not include rtl.h. Include splay-tree.h.
1670 (build_clone): Use plain NULL instead of NULL_RTX.
1671 * decl.c: Do not include expr.h. Explain why rtl.h has to be
1672 included. Include splay-tree.h.
1673 * method.c: Do not include rtl.h and expr.h.
1674 (use_thunk): Use plain NULL instead of NULL_RTX.
1675 * except.c: Do not include rtl.h, expr.h, and libfuncs.h.
1676 * tree.c: Do not include rtl.h, insn-config.h, integrate.h,
1677 and target.h. Include splay-tree.h.
1678 * expr.c: Do not include rtl.h and expr.h.
1679 * pt.c: Do not include obstack.h and rtl.h.
1680 (tsubst_friend_function): Use plain NULL instead of NULL_RTX.
1681 (tsubst_decl): Likewise.
1682 (instantiate_decl): Likewise.
1683 * semantics.c: Do not include exprt.h and debug.h. Explain why
1684 rtl.h has to be included.
1685 * decl2.c: Do not include rtl.h and expr.h. Include splay-tree.h.
1686 * call.c: Do not include rtl.h and expr.h.
1687 * search.c: Do not include obstack.h and rtl.h.
1688 * friend.c: Do not include rtl.h and expr.h.
1689 * Make-lang.in: Update dependencies.
1690
1691 2010-05-25 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c++/18249
1694 * parser.c (non_integral_constant): Add NIC_NONE.
1695 (required_token): Add RT_NONE.
1696 (cp_parser_unary_expression): Initialize non_constant_p
1697 to NIC_NONE.
1698 (cp_parser_asm_definition): Initialize missing to RT_NONE.
1699 (cp_parser_primary_expression, cp_parser_postfix_expression,
1700 cp_parser_cast_expression, cp_parser_binary_expression,
1701 cp_parser_functional_cast): Fix formatting.
1702
1703 2010-05-25 Shujing Zhao <pearly.zhao@oracle.com>
1704
1705 PR c++/18249
1706 * parser.c: Remove inclusion of dyn-string.h.
1707 (non_integral_constant): New enum.
1708 (name_lookup_error): New enum.
1709 (required_token): New enum.
1710 (cp_parser_required_error): New function.
1711 (cp_parser_require): Change the type of variable token_desc to
1712 required_token and use cp_parser_required_error.
1713 (cp_parser_require_keyword): Likewise.
1714 (cp_parser_error): Use gmsgid as parameter.
1715 (cp_parser_name_lookup_error): Change the type of variable desired to
1716 name_lookup_error and put the diagnostic in the full sentences. Change
1717 caller.
1718 (cp_parser_non_integral_constant_expression): Change the type of the
1719 variable thing to non_integral_constant and put the diagnostics in
1720 full sentences. Change caller.
1721
1722 2010-05-24 Eric Botcazou <ebotcazou@adacore.com>
1723
1724 PR middle-end/44100
1725 * typeck.c (cp_build_unary_op): Fold offsetof-like computations.
1726
1727 2010-05-24 Joseph Myers <joseph@codesourcery.com>
1728
1729 * error.c (cp_diagnostic_starter): Update call to
1730 diagnostic_build_prefix.
1731 (cp_print_error_function,
1732 print_instantiation_partial_context_line): Check show_column flag
1733 in context.
1734
1735 2010-05-24 Jason Merrill <jason@redhat.com>
1736
1737 PR c++/41510
1738 * decl.c (check_initializer): Don't wrap an init-list in a
1739 TREE_LIST.
1740 * init.c (build_aggr_init): Don't assume copy-initialization if
1741 init has CONSTRUCTOR_IS_DIRECT_INIT.
1742 * call.c (build_new_method_call): Sanity check.
1743
1744 2010-05-24 Nathan Froyd <froydnj@codesourcery.com>
1745
1746 * rtti.c (tinfo_base_init): Use build_constructor instead of
1747 build_constructor_from_list. Don't cons a tree node for
1748 returning.
1749 (generic_initializer): Use build_constructor_single instead of
1750 build_constructor_from_list.
1751 (ptr_initializer): Use build_constructor instead of
1752 build_constructor_from_list
1753 (ptm_initializer): Likewise.
1754 (class_initializer): Likewise. Take varargs instead of TRAIL.
1755 (get_pseudo_ti_init): Adjust calls to class_initializer. Use
1756 build_constructor instead of build_constructor_from_list.
1757
1758 2010-05-22 Steven Bosscher <steven@gcc.gnu.org>
1759
1760 * semantics.c: Include bitmap.h.
1761 * Make-lang.in: Update dependencies.
1762
1763 2010-05-22 Jan Hubicka <jh@suse.cz>
1764
1765 * decl2.c (maybe_emit_vtables): Produce same comdat group when outputting
1766 comdat vtables.
1767 (cxx_callgraph_analyze_expr): Remove code marking vtables needed.
1768
1769 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1770
1771 * cxx-pretty-print.c: Correct merge error.
1772
1773 2010-05-21 Joseph Myers <joseph@codesourcery.com>
1774
1775 * error.c: Include tree-diagnostic.h and tree-pretty-print.h.
1776 (cp_print_error_function): Use diagnostic_abstract_origin macro.
1777 (cp_printer): Handle %K here using percent_K_format.
1778 * cxx-pretty-print.c: Include tree-pretty-print.h.
1779 * Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
1780 dependencies.
1781
1782 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
1783
1784 * error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
1785 Clean up redundant includes.
1786
1787 2010-05-20 Paolo Carlini <paolo.carlini@oracle.com>
1788
1789 PR c++/30298
1790 * decl.c (xref_basetypes): Return false in case of ill-formed
1791 redefinition.
1792
1793 2010-05-19 Jason Merrill <jason@redhat.com>
1794
1795 * call.c (reference_binding): Use cp_build_qualified_type_real
1796 and cp_type_quals consistently.
1797 (add_function_candidate): Likewise.
1798 (build_conditional_expr): Likewise.
1799 (convert_like_real): Likewise.
1800 (type_passed_as): Likewise.
1801 * class.c (add_method): Likewise.
1802 (same_signature_p): Likewise.
1803 (layout_class_type): Likewise.
1804 * decl.c (cxx_init_decl_processing): Likewise.
1805 (cp_fname_init): Likewise.
1806 (grokdeclarator): Likewise.
1807 * decl2.c (cp_reconstruct_complex_type): Likewise.
1808 * init.c (build_new_1): Likewise.
1809 * method.c (do_build_copy_constructor): Likewise.
1810 (implicitly_declare_fn): Likewise.
1811 * pt.c (tsubst_aggr_type): Likewise.
1812 (tsubst): Likewise.
1813 * rtti.c (init_rtti_processing): Likewise.
1814 (build_headof): Likewise.
1815 (build_dynamic_cast_1): Likewise.
1816 (tinfo_base_init): Likewise.
1817 (emit_support_tinfos): Likewise.
1818 * semantics.c (capture_decltype): Likewise.
1819 * tree.c (cv_unqualified): Likewise.
1820 * typeck.c (composite_pointer_type): Likewise.
1821 (string_conv_p): Likewise.
1822
1823 * mangle.c (write_CV_qualifiers_for_type): Tweak.
1824
1825 * call.c (initialize_reference): Use CP_TYPE_CONST_P.
1826 * decl.c (start_decl): Likewise.
1827 * semantics.c (finish_compound_literal): Likewise.
1828 * typeck.c (check_return_expr): Use CP_TYPE_VOLATILE_P.
1829 (cp_type_readonly): Remove.
1830 * cp-tree.h: Remove declaration.
1831
1832 * typeck.c (merge_types): Preserve memfn quals.
1833
1834 * decl.c (grokdeclarator): Don't check quals on fn type.
1835 * typeck.c (cp_apply_type_quals_to_decl): Likewise.
1836 * tree.c (cp_build_qualified_type_real): Simplify qualifier checking.
1837
1838 PR c++/44193
1839 * typeck.c (type_memfn_quals): New fn.
1840 (apply_memfn_quals): New fn.
1841 (cp_type_quals): Return TYPE_UNQUALIFIED for FUNCTION_TYPE.
1842 (cp_type_readonly): Use cp_type_quals.
1843 * cp-tree.h: Add declarations.
1844 * tree.c (cp_build_qualified_type_real): Don't set, but do
1845 preserve, quals on FUNCTION_TYPE.
1846 (strip_typedefs): Use apply_memfn_quals and type_memfn_quals.
1847 * decl.c (build_ptrmem_type): Likewise.
1848 (grokdeclarator): Likewise.
1849 (static_fn_type): Likewise.
1850 * decl2.c (change_return_type): Likewise.
1851 (cp_reconstruct_complex_type): Likewise.
1852 * pt.c (tsubst_function_type): Likewise.
1853 (unify): Likewise.
1854 (tsubst): Likewise. Drop special FUNCTION_TYPE substitution code.
1855
1856 2010-05-18 Nathan Froyd <froydnj@codesourcery.com>
1857
1858 * tree.c (build_min_non_dep_call_vec): Update comment.
1859
1860 2010-05-17 Jason Merrill <jason@redhat.com>
1861
1862 * call.c (struct z_candidate): Add explicit_targs field.
1863 (add_template_candidate_real): Set it.
1864 (build_over_call): Use it to control init-list warning.
1865
1866 PR c++/44157
1867 * call.c (build_over_call): Limit init-list deduction warning to
1868 cases where the argument is actually an init-list.
1869
1870 PR c++/44158
1871 * call.c (build_over_call): Don't do bitwise copy for move ctor.
1872
1873 2010-05-17 Dodji Seketeli <dodji@redhat.com>
1874 Jason Merrill <jason@redhat.com>
1875
1876 PR c++/44108
1877 * decl.c (compute_array_index_type): Call mark_rvalue_use.
1878
1879 2010-05-15 Jason Merrill <jason@redhat.com>
1880
1881 * cp-tree.h (TYPE_NOEXCEPT_P): New macro.
1882 * except.c (begin_eh_spec_block): Use MUST_NOT_THROW_EXPR if
1883 TYPE_NOEXCEPT_P.
1884 (finish_eh_spec_block): Adjust.
1885
1886 2010-05-15 Jakub Jelinek <jakub@redhat.com>
1887
1888 PR c++/44148
1889 * pt.c (tsubst): Unshare template argument.
1890
1891 2010-05-15 Steven Bosscher <steven@gcc.gnu.org>
1892
1893 * decl.c: Include tree-iterator.h, as fixup for tree-inline.h changes.
1894 * Make-lang.in: Fix dependencies accordingly.
1895
1896 2010-05-14 Jason Merrill <jason@redhat.com>
1897
1898 C++ DR 475
1899 * except.c (build_throw): Simplify, adjust for DR 475.
1900
1901 PR c++/44127
1902 * except.c (dtor_nothrow): Return nonzero for type with
1903 trivial destructor.
1904
1905 PR c++/44127
1906 * cp-gimplify.c (gimplify_must_not_throw_expr): Use
1907 gimple_build_eh_must_not_throw.
1908
1909 2010-05-14 Martin Jambor <mjambor@suse.cz>
1910
1911 * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): Remove both its undef
1912 and define.
1913
1914 2010-05-14 Jonathan Wakely <jwakely.gcc@gmail.com>
1915
1916 * call.c (build_new_method_call): Change warning text.
1917 * typeck2.c (build_functional_cast): Change error text.
1918
1919 2010-05-14 Shujing Zhao <pearly.zhao@oracle.com>
1920
1921 PR c++/30566
1922 * name-lookup.c (pushdecl_maybe_friend): Avoid the warnings about
1923 shadowing the outer parameter or variables by the declaration of
1924 nested function in nested structure or class. Warn the shadowing by
1925 the declaration of nested lambda expression.
1926
1927 2010-05-13 Jason Merrill <jason@redhat.com>
1928
1929 * typeck.c (cp_build_array_ref): Factor out from...
1930 (build_array_ref): ...here. Drop complain parm.
1931 (build_new_op): Adjust.
1932 * class.c (build_vtbl_ref_1): Adjust.
1933 * decl2.c (grok_array_decl): Adjust.
1934 * cp-tree.h: Adjust prototypes.
1935
1936 2010-05-13 Jan Hubicka <jh@suse.cz>
1937
1938 * decl.c (cp_finish_decl): Do not worry about used attribute.
1939
1940 2010-05-12 Jason Merrill <jason@redhat.com>
1941
1942 * typeck.c (build_array_ref): Take complain parm.
1943 * cp-tree.h: Add it to prototype.
1944 * call.c (build_new_op): Pass it.
1945 * class.c (build_vtbl_ref): Pass it.
1946 * decl2.c (grok_array_decl): Pass it.
1947
1948 PR bootstrap/44048
1949 PR target/44099
1950 * cp-tree.def (NULLPTR_TYPE): Remove.
1951 * cp-tree.h (NULLPTR_TYPE_P): New.
1952 (SCALAR_TYPE_P): Use it.
1953 (nullptr_type_node): New.
1954 (cp_tree_index): Add CPTI_NULLPTR_TYPE.
1955 * decl.c (cxx_init_decl_processing): Call record_builtin_type on
1956 nullptr_type_node.
1957 * cvt.c (ocp_convert): Use NULLPTR_TYPE_P instead of NULLPTR_TYPE.
1958 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
1959 * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise.
1960 * mangle.c (write_type): Likewise.
1961 * name-lookup.c (arg_assoc_type): Likewise.
1962 * typeck.c (build_reinterpret_cast_1): Likewise.
1963 * rtti.c (typeinfo_in_lib_p): Likewise.
1964 (emit_support_tinfos): Remove local nullptr_type_node.
1965
1966 * cp-tree.h (UNKNOWN_TYPE): Remove.
1967 * decl.c (cxx_init_decl_processing): Use LANG_TYPE instead.
1968 * error.c (dumy_type, dump_type_prefix, dump_type_suffix): Likewise.
1969 * typeck2.c (cxx_incomplete_type_diagnostic): Likewise.
1970 * class.c (instantiate_type): Check unknown_type_node rather than
1971 UNKNOWN_TYPE.
1972 * name-lookup.c (maybe_push_decl): Likewise.
1973 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1974 (get_typeid): Likewise.
1975 * semantics.c (finish_offsetof): Likewise.
1976
1977 PR c++/20669
1978 * call.c (add_template_candidate_real): If deduction fails, still
1979 add the template as a non-viable candidate.
1980 (equal_functions): Handle template candidates.
1981 (print_z_candidate): Likewise.
1982 (print_z_candidates): Likewise.
1983 (build_new_function_call): Likewise.
1984
1985 * cp-tree.h (LOOKUP_LIST_ONLY): New.
1986 * call.c (add_candidates): Enforce it.
1987 (build_new_method_call): Try non-list ctor if no viable list ctor.
1988 (build_user_type_conversion_1): Likewise.
1989
1990 * call.c (add_candidates): Distinguish between type(x) and
1991 x.operator type().
1992 (convert_class_to_reference): Set LOOKUP_NO_CONVERSION.
1993 (build_new_method_call): Give better error for conversion op.
1994
1995 * call.c (add_candidates): Add first_arg and return_type parms.
1996 Add special constructor/conversion op handling.
1997 (convert_class_to_reference): Use it.
1998 (build_user_type_conversion_1): Likewise.
1999 (build_op_call): Likewise.
2000 (build_new_method_call): Likewise.
2001 (build_new_op): Adjust.
2002 (perform_overload_resolution): Adjust.
2003
2004 2010-05-11 Paolo Carlini <paolo.carlini@oracle.com>
2005
2006 PR c++/34272
2007 PR c++/43630
2008 PR c++/34491
2009 * pt.c (process_partial_specialization): Return error_mark_node
2010 in case of unused template parameters in partial specialization.
2011
2012 2010-05-11 Jakub Jelinek <jakub@redhat.com>
2013
2014 PR c++/44062
2015 * semantics.c (finish_expr_stmt): Don't call mark_exp_read here...
2016 * cvt.c (convert_to_void): ... but here. If expr is a COMPOUND_EXPR,
2017 look at its second operand.
2018
2019 2010-05-10 Jason Merrill <jason@redhat.com>
2020
2021 PR c++/44017
2022 * semantics.c (baselink_for_fns): Revert earlier change.
2023
2024 PR c++/44045
2025 * typeck.c (cp_build_modify_expr): Complain about assignment to
2026 array from init list.
2027
2028 2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
2029
2030 PR c++/43719
2031 * decl.c (check_initializer): strip array type before checking for
2032 uninitialized const or ref members.
2033
2034 2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
2035
2036 PR c++/43951
2037 * init.c (diagnose_uninitialized_cst_or_ref_member_1): Returns the
2038 error count. Emit errors only if compain is true.
2039 (build_new_1): Do not return error_mark_node if
2040 diagnose_uninitialized_cst_or_ref_member_1 does not diagnose any
2041 errors. Delay the check for user-provided constructor.
2042 (perform_member_init): Adjust.
2043 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Change the
2044 prototype.
2045
2046 2010-05-06 Magnus Fromreide <magfr@lysator.liu.se>
2047 Jason Merrill <jason@redhat.com>
2048
2049 Add support for C++0x nullptr.
2050 * cp-tree.def: Add NULLPTR_TYPE.
2051 * cp-tree.h: Add nullptr_node.
2052 (cp_tree_index): Add CPTI_NULLPTR.
2053 (SCALAR_TYPE_P): Add NULLPTR_TYPE.
2054 * call.c (null_ptr_cst_p): Handle nullptr.
2055 (standard_conversion): Likewise.
2056 (convert_arg_to_ellipsis): Likewise.
2057 * mangle.c (write_type): Likewise.
2058 * name-lookup.c (arg_assoc_type): Likewise.
2059 * parser.c (cp_parser_primary_expression): Likewise.
2060 * typeck.c (cp_build_binary_op): Likewise.
2061 (build_reinterpret_cast_1): Likewise.
2062 * error.c (dump_type): Likewise.
2063 (dump_type_prefix, dump_type_suffix): Likewise.
2064 * decl.c (cxx_init_decl_processing): Likewise.
2065 * cxx-pretty-print.c (pp_cxx_constant): Likewise.
2066 * cvt.c (ocp_convert): Likewise.
2067 * rtti.c (typeinfo_in_lib_p, emit_support_tinfos): Put
2068 nullptr_t tinfo in libsupc++.
2069
2070 2010-05-06 Jason Merrill <jason@redhat.com>
2071
2072 * semantics.c (simplify_aggr_init_expr): Use INIT_EXPR.
2073
2074 2010-04-22 Jakub Jelinek <jakub@redhat.com>
2075 Dodji Seketeli <dodji@redhat.com>
2076
2077 PR c/18624
2078 * cp-tree.h (mark_exp_read, rvalue_use, lvalue_use, type_use):
2079 Declare ...
2080 * expr.c (mark_exp_read, rvalue_use, lvalue_use, type_use): ... new fns.
2081 * typeck.c (cxx_sizeof_expr, cxx_alignof_expr): Call type_use.
2082 (decay_conversion, perform_integral_promotions): Call rvalue_use.
2083 (cp_build_unary_op): Call lvalue_use.
2084 * decl.c (unused_but_set_errorcount): New variable.
2085 (poplevel): Issue -Wunused-but-set-variable diagnostics.
2086 (duplicate_decls): Merge DECL_READ_P flags.
2087 (start_cleanup_fn): Set DECL_READ_P flag.
2088 (finish_function): Issue -Wunused-but-set-parameter diagnostics.
2089 * tree.c (rvalue): Call rvalue_use.
2090 * pt.c (convert_nontype_argument): Likewise.
2091 * semantics.c (finish_expr_stmt, finish_asm_stmt, finish_typeof,
2092 finish_decltype_type): Likewise.
2093 * call.c (convert_like_real) <ck_identity, ck_user>: Call rvalue use.
2094 (build_x_va_arg, build_new_method_call, build_over_call): Call lvalue_use
2095 or rvalue_use depending on the expr.
2096 * init.c (build_new, build_delete): Likewise.
2097 * rtti.c (build_typeid, build_dynamic_cast_1): Likewise.
2098
2099 2010-05-05 Jason Merrill <jason@redhat.com>
2100
2101 PR c++/43787
2102 * cp-gimplify.c (cp_gimplify_expr): Remove copies of empty classes.
2103 * call.c (build_over_call): Don't try to avoid INIT_EXPR copies here.
2104
2105 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2106
2107 PR c++/43028
2108 * pt.c (unify): Check each elt for error_mark_node.
2109
2110 2010-05-04 Jason Merrill <jason@redhat.com>
2111
2112 PR c++/38064
2113 * typeck.c (cp_build_binary_op): Allow enums for <> as well.
2114
2115 2010-05-04 Paolo Carlini <paolo.carlini@oracle.com>
2116
2117 PR c++/43705
2118 * call.c (build_new_method_call): Return error_mark_node if fns is
2119 NULL_TREE.
2120
2121 2010-05-03 Dodji Seketeli <dodji@redhat.com>
2122
2123 PR c++/43953
2124 * pt.c (most_specialized_class): Pretend we are processing
2125 a template decl during the call to coerce_template_parms.
2126
2127 2010-05-03 Jason Merrill <jason@redhat.com>
2128
2129 PR c++/42810
2130 PR c++/43680
2131 * decl.c (finish_enum): Use the TYPE_MIN_VALUE and TYPE_MAX_VALUE
2132 from the selected underlying type unless -fstrict-enums. Set
2133 ENUM_UNDERLYING_TYPE to have the restricted range.
2134 * cvt.c (type_promotes_to): Use ENUM_UNDERLYING_TYPE.
2135 * class.c (check_bitfield_decl): Likewise.
2136
2137 2010-05-01 H.J. Lu <hongjiu.lu@intel.com>
2138
2139 PR c++/43951
2140 * init.c (build_new_1): Revert the accidental checkin in
2141 revision 158918.
2142
2143 2010-04-30 Jason Merrill <jason@redhat.com>
2144
2145 PR c++/43868
2146 * cxx-pretty-print.c (pp_cxx_decl_specifier_seq): Move pmf handling...
2147 (pp_cxx_type_specifier_seq): ...here.
2148
2149 2010-04-30 Steven Bosscher <steven@gcc.gnu.org>
2150
2151 * optimize.c, parser.c, mangle.c, cp-tree.h: Do not include varray.h.
2152 * Make-lang.in: Don't include varray.h dependency in CXX_TREE_H.
2153
2154 2010-04-30 Shujing Zhao <pearly.zhao@oracle.com>
2155
2156 PR c++/43779
2157 * typeck.c (warn_args_num): New function.
2158 (convert_arguments): Use warn_args_num to print the diagnostic
2159 messages.
2160
2161 2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
2162
2163 PR c++/43890
2164 * init.c (diagnose_uninitialized_cst_or_ref_member): check for
2165 user-provided constructor while recursing.
2166
2167 2010-04-28 Manuel López-Ibáñez <manu@gcc.gnu.org>
2168
2169 PR c++/9335
2170 * error.c (print_instantiation_partial_context_line): Handle
2171 recursive instantiation.
2172 (print_instantiation_partial_context): Likewise.
2173
2174 2010-04-27 Jason Merrill <jason@redhat.com>
2175
2176 * init.c (perform_member_init): Check CLASS_TYPE_P.
2177
2178 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2179
2180 PR c++/29043
2181 * init.c (perform_member_init): check for uninitialized const or
2182 reference members, including array types.
2183
2184 2010-04-24 Jason Merrill <jason@redhat.com>
2185
2186 * tree.c (get_fns): Split out from get_first_fn.
2187 * cp-tree.h: Declare it.
2188 * search.c (shared_member_p): Use it.
2189 * semantics.c (finish_qualified_id_expr): Simplify.
2190 (finish_id_expression): Simplify.
2191
2192 * semantics.c (finish_non_static_data_member): Call maybe_dummy_object
2193 whenever object is NULL_TREE. Don't do 'this' capture here.
2194 (finish_qualified_id_expr): Pass NULL_TREE.
2195 (finish_id_expression): Likewise.
2196 (lambda_expr_this_capture): Likewise.
2197
2198 * semantics.c (finish_qualified_id_expr): Use maybe_dummy_object
2199 rather than checking current_class_ref directly.
2200 (finish_call_expr): Likewise.
2201
2202 PR c++/43856
2203 * name-lookup.c (qualify_lookup): Disqualify lambda op().
2204 * class.c (current_nonlambda_class_type): New fn.
2205 * semantics.c (nonlambda_method_basetype): New.
2206 * cp-tree.h: Declare them.
2207 * tree.c (maybe_dummy_object): Handle implicit 'this' capture.
2208
2209 * semantics.c (baselink_for_fns): Correct BASELINK_BINFO.
2210
2211 PR c++/43875
2212 * semantics.c (lambda_return_type): Complain about
2213 braced-init-list.
2214
2215 PR c++/43790
2216 * tree.c (cv_unqualified): Handle error_mark_node.
2217
2218 PR c++/41468
2219 * call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
2220 if we don't want errors.
2221
2222 PR c++/41468
2223 * class.c (convert_to_base): Add complain parameter. Pass
2224 ba_quiet to lookup_base if we don't want errors.
2225 (build_vfield_ref): Pass complain to convert_to_base.
2226 * call.c (convert_like_real): Likewise.
2227 (initialize_reference): Likewise.
2228 (perform_direct_initialization_if_possible): Pass complain to
2229 convert_like_real.
2230 * cp-tree.h: Adjust.
2231
2232 2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
2233 Jason Merrill <jason@redhat.com>
2234
2235 PR c++/42844
2236 * decl.c (check_for_uninitialized_const_var): Handle classes that need
2237 constructing, too.
2238 (check_initializer): Call it for classes that need constructing, too.
2239 * class.c (in_class_defaulted_default_constructor): New.
2240 * cp-tree.h: Declare it.
2241
2242 2010-04-20 Jason Merrill <jason@redhat.com>
2243
2244 PR c++/9335
2245 * init.c (constant_value_1): Treat error_mark_node as a constant
2246 if DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P is set.
2247 * cvt.c (ocp_convert): Handle getting error_mark_node from
2248 integral_constant_value.
2249 * decl.c (compute_array_index_type): Likewise.
2250
2251 2010-04-20 Dodji Seketeli <dodji@redhat.com>
2252
2253 PR c++/43800
2254 PR c++/43704
2255 * typeck.c (incompatible_dependent_types_p): If one of the
2256 compared types if not a typedef then honour their main variant
2257 equivalence.
2258
2259 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2260
2261 * cp-tree.h (TYPE_REF_IS_RVALUE): Remove.
2262
2263 2010-04-19 Dodji Seketeli <dodji@redhat.com>
2264
2265 PR c++/43704
2266 * typeck.c (structural_comptypes): Test dependent typedefs
2267 incompatibility before testing for their main variant based
2268 equivalence.
2269
2270 2010-04-19 Jakub Jelinek <jakub@redhat.com>
2271
2272 * cp-tree.h (SCOPED_ENUM_P, UNSCOPED_ENUM_P, SET_SCOPED_ENUM_P): Use
2273 ENUM_IS_SCOPED bit instead of TYPE_LANG_FLAG_5.
2274
2275 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
2276
2277 * decl.c (cxx_init_decl_processing): Remove second argument in call to
2278 build_common_tree_nodes.
2279
2280 2010-04-14 Jason Merrill <jason@redhat.com>
2281
2282 PR c++/36625
2283 * parser.c (cp_parser_parenthesized_expression_list): Change
2284 is_attribute_list parm to int to indicate whether or not to
2285 handle initial identifier specially.
2286 (cp_parser_attribute_list): Use attribute_takes_identifier_p.
2287
2288 2010-04-13 Jason Merrill <jason@redhat.com>
2289
2290 * call.c (type_decays_to): Check MAYBE_CLASS_TYPE_P instead of
2291 CLASS_TYPE_P.
2292 * parser.c (cp_parser_lambda_expression): Complain about lambda in
2293 unevaluated context.
2294 * pt.c (iterative_hash_template_arg): Don't crash on lambda.
2295
2296 2010-04-12 Jason Merrill <jason@redhat.com>
2297
2298 PR c++/43641
2299 * semantics.c (maybe_add_lambda_conv_op): Use build_call_a and tweak
2300 return value directly.
2301
2302 * call.c (type_decays_to): Call cv_unqualified for non-class type.
2303
2304 2010-04-12 Fabien Chene <fabien.chene@gmail.com>
2305
2306 PR c++/25811
2307 * cp-tree.h (diagnose_uninitialized_cst_or_ref_member): Declare.
2308 * init.c (build_new_1): Check for uninitialized const members and
2309 uninitialized reference members, when using new without
2310 new-initializer. Call diagnose_uninitialized_cst_or_ref_member.
2311 (diagnose_uninitialized_cst_or_ref_member): Define, call
2312 diagnose_uninitialized_cst_or_ref_member_1.
2313 (diagnose_uninitialized_cst_or_ref_member_1): New function.
2314
2315 2010-04-12 Richard Guenther <rguenther@suse.de>
2316
2317 PR c++/43611
2318 * semantics.c (expand_or_defer_fn_1): Do not keep extern
2319 template inline functions.
2320
2321 2010-04-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2322
2323 PR c++/28584
2324 * typeck.c (cp_build_c_cast): Warn for casting integer to larger
2325 pointer type.
2326
2327 2010-04-07 Jason Merrill <jason@redhat.com>
2328
2329 PR c++/43016
2330 * decl.c (start_preparsed_function): Do defer nested functions.
2331
2332 PR c++/11094, DR 408
2333 * cp-tree.h (VAR_HAD_UNKNOWN_BOUND, SET_VAR_HAD_UNKNOWN_BOUND): New.
2334 * decl2.c (finish_static_data_member_decl): Set it.
2335 * decl.c (duplicate_decls): Propagate it.
2336 * pt.c (tsubst_decl): Don't substitute the domain of an array
2337 VAR_DECL if it's set.
2338 (regenerate_decl_from_template): Substitute it here.
2339 (type_dependent_expression_p): Return true if it's set.
2340 * semantics.c (finish_decltype_type): Instantiate such a variable.
2341 * typeck.c (cxx_sizeof_expr): Likewise.
2342 (strip_array_domain): New.
2343
2344 PR c++/43145
2345 * name-lookup.c (current_decl_namespace): Non-static.
2346 (pop_nested_namespace): Sanity check.
2347 * cp-tree.h: Declare current_decl_namespace.
2348 * decl.c (grokvardecl): Use it instead of current_namespace.
2349 (grokfndecl): Likewise.
2350
2351 PR c++/38392
2352 * pt.c (tsubst_friend_function): Instatiate a friend that has already
2353 been used.
2354
2355 * pt.c (print_template_statistics): New.
2356 * cp-tree.h: Declare it.
2357 * tree.c (cxx_print_statistics): Call it.
2358
2359 PR c++/41970
2360 * decl.c (grokvardecl): Tweak warning message.
2361 (grokfndecl): Likewise.
2362
2363 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2364
2365 PR c++/42697
2366 *pt.c (tsubst_decl): Get the arguments of a specialization from
2367 the specialization template, not from the most general template.
2368
2369 2010-04-07 Dodji Seketeli <dodji@redhat.com>
2370
2371 PR c++/40239
2372 * typeck2.c (process_init_constructor_record):
2373 value-initialize members that are are not explicitely
2374 initialized.
2375
2376 2010-04-07 Jie Zhang <jie@codesourcery.com>
2377
2378 PR c++/42556
2379 * typeck2.c (split_nonconstant_init_1): Drop empty CONSTRUCTOR
2380 when all of its elements are non-constant and have been split out.
2381
2382 2010-04-06 Taras Glek <taras@mozilla.com>
2383 Jason Merrill <jason@redhat.com>
2384
2385 * parser.c (cp_parser_class_specifier): Set class location to that
2386 of IDENTIFIER_NODE instead of '{' when possible.
2387 * semantics.c (begin_class_definition): Do not overide locations
2388 with less precise ones.
2389
2390 2010-04-06 Jason Merrill <jason@redhat.com>
2391
2392 PR c++/43648
2393 * name-lookup.c (constructor_name_p): Allow X::~X even for typedefs.
2394
2395 PR c++/43621
2396 * pt.c (maybe_update_decl_type): Check the return value from
2397 push_scope.
2398
2399 2010-04-01 Jason Merrill <jason@redhat.com>
2400
2401 * decl.c (next_initializable_field): No longer static.
2402 * cp-tree.h: Declare it.
2403 * call.c (build_aggr_conv): Fail if there are more initializers
2404 than initializable fields.
2405
2406 * semantics.c (maybe_add_lambda_conv_op): Use null_pointer_node
2407 instead of void_zero_node.
2408
2409 2010-03-31 Dodji Seketeli <dodji@redhat.com>
2410
2411 PR c++/43558
2412 * cp-tree.h (TEMPLATE_TYPE_PARM_SIBLING_PARMS): New accessor macro.
2413 * pt.c (end_template_parm_list): Store sibling template parms of
2414 each TEMPLATE_TYPE_PARMs into its TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2415 (push_template_decl_real): Don't store the containing template decl
2416 into the DECL_CONTEXT of TEMPLATE_TYPE_PARMs anymore.
2417 * typeck.c (get_template_parms_of_dependent_type): Get sibling parms
2418 of a TEMPLATE_TYPE_PARM from TEMPLATE_TYPE_PARM_SIBLING_PARMS.
2419 Simplify the logic.
2420
2421 2010-03-30 Jason Merrill <jason@redhat.com>
2422
2423 PR c++/43076
2424 * pt.c (push_template_decl_real): Deal better with running out of
2425 scopes before running out of template parms.
2426
2427 PR c++/41185
2428 PR c++/41786
2429 * parser.c (cp_parser_direct_declarator): Don't allow VLAs in
2430 function parameter context. Don't print an error if parsing
2431 tentatively.
2432
2433 PR c++/43559
2434 * pt.c (more_specialized_fn): Don't control cv-qualifier check
2435 with same_type_p.
2436
2437 2010-03-26 Jason Merrill <jason@redhat.com>
2438
2439 PR c++/43509
2440 * parser.c (cp_parser_qualifying_entity): Do accept enum names in
2441 c++0x mode, but not other type-names.
2442
2443 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2444
2445 PR c++/43327
2446 * pt.c (add_to_template_args): Support NULL ARGS;
2447 (most_specialized_class): call coerce_template_parms on
2448 template arguments passed to get_class_bindings. Use
2449 add_to_template_args.
2450 (unify): Handle VAR_DECLs.
2451
2452 2010-03-26 Dodji Seketeli <dodji@redhat.com>
2453
2454 * cp-tree.h (get_template_parms_at_level): Change unsigned parm
2455 into int.
2456 * pt.c (get_template_parms_at_level): Adjust.
2457
2458 2010-03-25 Dodji Seketeli <dodji@redhat.com>
2459
2460 PR c++/43206
2461 * cp-tree.h (get_template_parms_at_level): Declare ...
2462 * pt.c (get_template_parms_at_level): ... new function.
2463 * typeck.c (get_template_parms_of_dependent_type): If a template
2464 type parm's DECL_CONTEXT isn't yet set, get its siblings from
2465 current_template_parms. Use get_template_parms_at_level. Remove
2466 useless test.
2467 (incompatible_dependent_types_p): If we get empty parms from just one
2468 of the template type parms we are comparing then the template parms are
2469 incompatible.
2470
2471 2010-03-24 Jason Merrill <jason@redhat.com>
2472
2473 PR c++/43502
2474 * parser.c (make_declarator): Initialize id_loc.
2475 (cp_parser_lambda_declarator_opt): And set it.
2476
2477 2010-03-23 Jason Merrill <jason@redhat.com>
2478
2479 Make lambda conversion op and op() non-static.
2480 * semantics.c (maybe_add_lambda_conv_op): Make non-static.
2481 Also add the thunk function returned by the conversion op.
2482 Mark the conversion deleted if the op() is variadic.
2483 * decl2.c (mark_used): Give helpful message about deleted conversion.
2484 * parser.c (cp_parser_lambda_declarator_opt): Don't make op() static.
2485 * semantics.c (finish_this_expr): Adjust.
2486 * mangle.c (write_closure_type_name): Adjust.
2487 * decl.c (grok_op_properties): Don't allow it.
2488 * call.c (build_user_type_conversion_1): No static conversion ops.
2489 (build_op_call): Or op().
2490
2491 * decl2.c (change_return_type): Fix 'this' quals.
2492
2493 2010-03-22 Jason Merrill <jason@redhat.com>
2494
2495 PR c++/43333
2496 * tree.c (pod_type_p): Use old meaning in C++98 mode.
2497
2498 PR c++/43281
2499 * pt.c (contains_auto_r): New fn.
2500 (do_auto_deduction): Use it.
2501 (tsubst): Don't look at TREE_TYPE of a TEMPLATE_TYPE_PARM.
2502
2503 2010-03-20 Simon Martin <simartin@users.sourceforge.net>
2504
2505 PR c++/43081:
2506 * decl2.c (grokfield): Handle invalid initializers for member
2507 functions.
2508
2509 2010-03-20 Dodji Seketeli <dodji@redhat.com>
2510
2511 PR c++/43375
2512 * method.c (make_alias_for): Avoid crashing when DECL_LANG_SPECIFIC
2513 is NULL.
2514 * decl2.c (vague_linkage_p): Likewise.
2515
2516 2010-03-18 Paolo Carlini <paolo.carlini@oracle.com>
2517
2518 PR c++/43418
2519 * parser.c (cp_parser_for_init_statement): Use NULL_TREE, not
2520 false, in the cp_parser_expression_statement call.
2521
2522 2010-03-05 Jason Merrill <jason@redhat.com>
2523
2524 * mangle.c (mangle_decl): Give name collision error even without
2525 ASM_OUTPUT_DEF.
2526
2527 2010-03-04 Marco Poletti <poletti.marco@gmail.com>
2528
2529 * pt.c (process_partial_specialization): Use error_n instead of
2530 error.
2531
2532 2010-03-03 Jason Merrill <jason@redhat.com>
2533
2534 PR c++/12909
2535 * mangle.c (mangle_decl): Handle VAR_DECL, too.
2536
2537 2010-03-03 Jason Merrill <jason@redhat.com>
2538
2539 PR c++/12909
2540 * mangle.c: Include cgraph.h.
2541 (mangle_decl): If the mangled name will change in a later
2542 ABI version, make the later mangled name an alias.
2543 * method.c (make_alias_for): Copy DECL_ARGUMENTS.
2544 * Make-lang.in (mangle.o): Depend on cgraph.h.
2545 * method.c (make_alias_for): Handle VAR_DECL, too.
2546 * decl2.c (vague_linkage_p): Rename from vague_linkage_fn_p.
2547 * tree.c (no_linkage_check): Adjust.
2548 * decl.c (maybe_commonize_var): Adjust.
2549 * cp-tree.h: Adjust.
2550
2551 2010-03-01 Marco Poletti <poletti.marco@gmail.com>
2552
2553 * pt.c (redeclare_class_template): Use error_n and inform_n.
2554
2555 2010-02-27 Mark Mitchell <mark@codesourcery.com>
2556
2557 PR c++/42748
2558 * cp-tree.h (push_tinst_level): Declare.
2559 (pop_tinst_level): Likewise.
2560 * pt.c (push_tinst_level): Give it external linkage.
2561 (pop_tinst_level): Likewise.
2562 * mangle.c (mangle_decl_string): Set the source location to that
2563 of the decl while mangling.
2564
2565 2010-02-27 Simon Martin <simartin@users.sourceforge.net>
2566
2567 PR c++/42054
2568 * pt.c (redeclare_class_template): Return false if there are erroneous
2569 template parameters.
2570
2571 2010-02-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
2572
2573 * pt.c (push_tinst_level): Replace -ftemplate-depth- with
2574 -ftemplate-depth=.
2575
2576 2010-02-24 Jason Merrill <jason@redhat.com>
2577
2578 PR c++/12909
2579 * mangle.c (write_type): Give -Wabi warning for old vector mangling.
2580
2581 * class.c (layout_class_type): Don't give -Wabi warning for a bug
2582 in a previous ABI version.
2583
2584 2010-02-23 Jason Merrill <jason@redhat.com>
2585
2586 PR c++/43143
2587 * typeck2.c (digest_init_r): Accept value init of array.
2588
2589 2010-02-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2590
2591 PR c++/43126
2592 * typeck.c (convert_arguments): Update error message.
2593
2594 2010-02-22 Mike Stump <mikestump@comcast.net>
2595
2596 PR c++/43125
2597 * decl.c (duplicate_decls): Merge DECL_PRESERVE_P.
2598
2599 2010-02-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
2600
2601 PR c++/23510
2602 * error.c (print_instantiation_partial_context_line): New.
2603 (print_instantiation_partial_context): Print at most 12 contexts,
2604 skip the rest with a message.
2605
2606 2010-02-21 Dodji Seketeli <dodji@redhat.com>
2607
2608 PR c++/42824
2609 * pt.c (lookup_template_class): Better support of specialization
2610 of member of class template implicit instantiation.
2611
2612 2010-02-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
2613
2614 PR c++/35669
2615 * call.c (conversion_null_warnings): Replace -Wconversion with
2616 -Wconversion-null.
2617 * cvt.c (build_expr_type_conversion): Likewise.
2618
2619 2010-02-18 Jason Merrill <jason@redhat.com>
2620
2621 PR c++/42837
2622 * class.c (create_vtable_ptr): Set DECL_PACKED if type is packed.
2623
2624 PR c++/43108
2625 * typeck.c (cp_build_binary_op): Adapt mixed complex/non handling from
2626 C build_binary_op.
2627 * cp-tree.h (WANT_VECTOR_OR_COMPLEX): Rename from WANT_VECTOR.
2628 * cvt.c (build_expr_type_conversion): Allow COMPLEX_TYPE.
2629
2630 PR c++/43070
2631 * semantics.c (finish_goto_stmt): Don't call decay_conversion.
2632
2633 PR c++/26261
2634 PR c++/43101
2635 * pt.c (tsubst_qualified_id): Do normal lookup in non-dependent scope.
2636 (maybe_update_decl_type): New fn.
2637 * parser.c (cp_parser_init_declarator): Use it.
2638
2639 PR c++/43109
2640 * semantics.c (begin_class_definition): Don't crash on unnamed ns.
2641
2642 2010-02-17 Jason Merrill <jason@redhat.com>
2643
2644 PR c++/43075
2645 * call.c (build_over_call): Don't create zero-sized assignments.
2646 * cp-gimplify.c (cp_genericize_r): Don't remove them here.
2647 * cp-objcp-common.c (cp_expr_size): Remove.
2648 * cp-tree.h: Remove prototype.
2649
2650 PR c++/43069
2651 * name-lookup.c (set_decl_namespace): Don't copy DECL_CONTEXT if the
2652 decl we looked up doesn't match.
2653
2654 PR c++/43093
2655 * cp-gimplify.c (cp_gimplify_expr) [INIT_EXPR]: Return if we don't
2656 have an INIT_EXPR anymore.
2657
2658 PR c++/43079
2659 * pt.c (convert_nontype_argument): Change assert to test.
2660
2661 2010-02-16 Jason Merrill <jason@redhat.com>
2662
2663 * cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
2664
2665 PR c++/43031
2666 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use
2667 VIEW_CONVERT_EXPR for conversions between structural equality types
2668 that the back end can't tell are the same.
2669
2670 PR c++/43036
2671 * tree.c (build_cplus_array_type): Set TYPE_MAIN_VARIANT to strip
2672 cv-quals from element here.
2673 (cp_build_qualified_type_real): Not here. Preserve typedef name.
2674
2675 2010-02-14 Jason Merrill <jason@redhat.com>
2676
2677 PR c++/41997
2678 * semantics.c (finish_compound_literal): Use
2679 cp_apply_type_quals_to_decl when creating a static variable.
2680
2681 2010-02-12 Jason Merrill <jason@redhat.com>
2682
2683 PR c++/43024
2684 * name-lookup.h (current_binding_level): Check for null
2685 cp_function_chain.
2686
2687 2010-02-12 Jason Merrill <jason@redhat.com>
2688
2689 PR c++/43054
2690 * tree.c (cp_tree_equal): Correct CALL_EXPR logic.
2691
2692 2010-02-12 Jakub Jelinek <jakub@redhat.com>
2693
2694 PR c++/43033
2695 * name-lookup.c (pushdecl_maybe_friend): Check default args of t
2696 instead of x.
2697
2698 2010-02-10 Jason Merrill <jason@redhat.com>
2699
2700 PR c++/41896
2701 * semantics.c (outer_lambda_capture_p): Revert.
2702 (add_capture): Only finish_member_declaration if
2703 we're in the lambda class.
2704 (register_capture_members): New.
2705 * cp-tree.h: Declare it.
2706 * parser.c (cp_parser_lambda_expression): Call it.
2707
2708 2010-02-10 Jason Merrill <jason@redhat.com>
2709
2710 PR c++/41896
2711 * semantics.c (outer_lambda_capture_p): Use current_function_decl
2712 instead of current_class_type.
2713
2714 2010-02-10 Jason Merrill <jason@redhat.com>
2715
2716 PR c++/42983, core issue 906
2717 * method.c (defaultable_fn_check): Check virtualness.
2718
2719 2010-02-10 Jason Merrill <jason@redhat.com>
2720
2721 PR c++/43016
2722 * semantics.c (maybe_add_lambda_conv_op): Set DECL_INTERFACE_KNOWN.
2723
2724 2010-02-10 Shujing Zhao <pearly.zhao@oracle.com>
2725
2726 * Make-lang.in (cp/cvt.o, cp/parser.o, cp/search.o): Depend on intl.h.
2727 * cvt.c (warn_ref_binding): Wrap the messages into G_() for easy
2728 translation.
2729 * parser.c (cp_parser_postfix_expression, cp_parser_new_type_id)
2730 (cp_parser_cast_expression, cp_parser_condition, cp_parser_decltype)
2731 (cp_parser_parameter_declaration)
2732 (cp_parser_exception_specification_opt)
2733 (cp_parser_exception_declaration): Likewise.
2734 * pt.c (check_default_tmpl_args): Likewise.
2735 * search.c (lookup_field_r): Likewise.
2736
2737 2010-02-09 Jason Merrill <jason@redhat.com>
2738
2739 PR c++/42399
2740 * pt.c (tsubst_copy_and_build): Propagate LAMBDA_EXPR_LOCATION.
2741
2742 2010-02-09 Jason Merrill <jason@redhat.com>
2743
2744 PR c++/42370
2745 * decl2.c (change_return_type): New fn.
2746 * semantics.c (apply_lambda_return_type): Use it.
2747 * cp-tree.h: Declare it.
2748
2749 2010-02-05 Richard Guenther <rguenther@suse.de>
2750
2751 * Make-lang.in (cp/cp-lang.o): Depend on gt-cp-cp-lang.h.
2752 * cp-lang.c: Include gt-cp-cp-lang.h.
2753 * config-lang.in (gtfiles): Add cp/cp-lang.c.
2754
2755 2010-02-05 Dodji Seketeli <dodji@redhat.com>
2756
2757 PR c++/42915
2758 * typeck.c (get_template_parms_of_dependent_type): Try getting
2759 the template parameters fromt the type itself first.
2760
2761 2010-02-03 Jason Merrill <jason@redhat.com>
2762
2763 PR c++/4926
2764 PR c++/38600
2765 * mangle.c (write_unqualified_id): Split out from write_expression.
2766 (write_unqualified_name): Call it.
2767 (write_member_name): Likewise.
2768 (write_expression): Support TEMPLATE_ID_EXPR.
2769 Disambiguate operator names.
2770
2771 PR c++/12909
2772 * mangle.c (write_type) [VECTOR_TYPE]: Change mangling with
2773 -fabi-version=4.
2774
2775 2010-02-02 Jason Merrill <jason@redhat.com>
2776
2777 PR c++/41090
2778 * decl.c (cp_finish_decl): Add local statics to cfun->local_decls.
2779 * optimize.c (clone_body): Remap their initializers when making base
2780 variants.
2781 (maybe_clone_body): Complain if multiple clones aren't safe.
2782
2783 2010-01-29 Dodji Seketeli <dodji@redhat.com>
2784
2785 PR c++/42758
2786 PR c++/42634
2787 PR c++/42336
2788 PR c++/42797
2789 PR c++/42880
2790 * cp-tree.h (NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2791 SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT,
2792 GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT): New accessor macros.
2793 * pt.c (coerce_template_parms, type_unification_real,
2794 expand_template_argument_pack, coerce_template_parameter_pack):
2795 Set the non default template args count.
2796 (current_template_args): Always set non defaulted
2797 template args count when compiled with --enable-checking
2798 (tsubst_template_args, type_unification_real): Propagate the non
2799 defaulted template args count.
2800 * error.c (get_non_default_template_args_count): Renamed
2801 count_non_default_template_args into this. Don't calculate the
2802 non default template argument count anymore. Use the new
2803 accessor macros above to get it.
2804 (dump_template_argument_list, dump_type, dump_decl,
2805 dump_template_parms): Adjust.
2806 * parser.c (cp_parser_template_argument_list): Always set defaulted
2807 template args count when compiled with --enable-checking.
2808
2809 2010-01-29 Shujing Zhao <pearly.zhao@oracle.com>
2810
2811 * decl.c (redeclaration_error_message): Wrap the return messages into
2812 G_() for easy translation.
2813
2814 2010-01-28 Jason Merrill <jason@redhat.com>
2815
2816 PR c++/42880
2817 * semantics.c (begin_class_definition): Don't use type_as_string.
2818
2819 2010-01-28 Dodji Seketeli <dodji@redhat.com>
2820
2821 PR c++/42713
2822 PR c++/42820
2823 * typeck.c (get_template_parms_of_dependent_type): Factorized
2824 this out of incompatible_template_type_parms_p
2825 (incompatible_dependent_types_p): Renamed
2826 incompatible_template_type_parms_p into this. Make it detect
2827 two incompatible dependent typedefs too.
2828 (structural_comptypes): Use incompatible_dependent_types_p.
2829 * pt.c (get_template_info):
2830 Handle BOUND_TEMPLATE_TEMPLATE_PARAM.
2831
2832 2010-01-20 Janis Johnson <janis187@us.ibm.com>
2833 Jason Merrill <jason@redhat.com>
2834
2835 * mangle.c (write_type): Mangle transparent record as member type.
2836 * semantics.c (begin_class_definition): Recognize decimal classes
2837 and set TYPE_TRANSPARENT_AGGR.
2838
2839 2010-01-20 Jason Merrill <jason@redhat.com>
2840
2841 PR c++/42338
2842 * mangle.c (write_expression): Handle tree codes that have extra
2843 arguments in the middle-end.
2844
2845 2010-01-20 Paolo Carlini <paolo.carlini@oracle.com>
2846
2847 PR c++/42038
2848 * except.c (expand_start_catch_block): Deal correctly with
2849 do_begin_catch returning error_mark_node.
2850
2851 2010-01-20 Jason Merrill <jason@redhat.com>
2852
2853 PR c++/41788
2854 * class.c (layout_class_type): Set packed_maybe_necessary for packed
2855 non-PODs.
2856
2857 PR c++/41920
2858 * semantics.c (build_lambda_object): Call mark_used on captured
2859 variables.
2860
2861 PR c++/40750
2862 * decl.c (grokdeclarator): Clear type_quals for a member function
2863 declared using a typedef. Don't complain about adding cv-quals
2864 to a function typedef in C++0x mode.
2865
2866 2010-01-20 Jakub Jelinek <jakub@redhat.com>
2867
2868 * decl.c (create_array_type_for_decl): Remove set but not used
2869 variable error_msg. Remove break stmts after return stmts.
2870
2871 2010-01-19 Dodji Seketeli <dodji@redhat.com>
2872
2873 * error.c (dump_template_parms, count_non_default_template_args):
2874 Revert fix of PR c++/42634.
2875
2876 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2877
2878 PR c++/42634
2879 * error.c (dump_template_parms): Use innermost template
2880 arguments before calling count_non_default_template_args.
2881 (count_non_default_template_args): We are being called with
2882 template innermost arguments now. There is no need to ensure
2883 that again.
2884
2885 2010-01-18 Dodji Seketeli <dodji@redhat.com>
2886
2887 PR c++/42766
2888 * cvt.c (build_expr_type_conversion): Look through OVERLOAD.
2889
2890 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2891
2892 PR c++/42697
2893 *pt.c (tsubst_decl): Revert commit for PR c++/42697.
2894
2895 2010-01-17 Dodji Seketeli <dodji@redhat.com>
2896
2897 PR c++/42697
2898 *pt.c (tsubst_decl): Get the arguments of a specialization from
2899 the specialization template, not from the most general template.
2900
2901 2010-01-16 Jason Merrill <jason@redhat.com>
2902
2903 PR c++/42761
2904 * semantics.c (finish_decltype_type): Within a template, treat
2905 unresolved CALL_EXPR as dependent.
2906
2907 2010-01-15 Dodji Seketeli <dodji@redhat.com>
2908
2909 * error.c (dump_template_parms,count_non_default_template_args):
2910 Revert changes of PR c++/42634.
2911
2912 2010-01-14 Jakub Jelinek <jakub@redhat.com>
2913
2914 PR middle-end/42674
2915 * decl.c (finish_function): Don't emit -Wreturn-type warnings in
2916 functions with noreturn attribute.
2917
2918 2010-01-14 Jason Merrill <jason@redhat.com>
2919
2920 PR c++/42701
2921 * call.c (build_new_method_call): Don't free the vec here.
2922
2923 PR c++/42655
2924 * call.c (convert_like_real): Do full decay_conversion for ck_rvalue.
2925
2926 2010-01-13 Dodji Seketeli <dodji@redhat.com>
2927
2928 PR c++/42634
2929 * error.c (dump_template_parms): Use innermost template
2930 arguments before calling count_non_default_template_args.
2931 (count_non_default_template_args): We are being called with
2932 template innermost arguments now. There is no need to ensure
2933 that again.
2934
2935 2010-01-07 Dodji Seketeli <dodji@redhat.com>
2936
2937 c++/40155
2938 * pt.c (unify_pack_expansion): In non-deduced contexts, re-use template
2939 arguments that were previously deduced.
2940
2941 2010-01-05 Jason Merrill <jason@redhat.com>
2942
2943 * pt.c (unify_pack_expansion): Handle deduction from init-list.
2944 * call.c (build_over_call): Don't complain about it.
2945
2946 2010-01-04 Jason Merrill <jason@redhat.com>
2947
2948 PR c++/42555
2949 * pt.c (tsubst_decl): Don't apply type attributes in place.
2950
2951 PR c++/42567
2952 * semantics.c (describable_type): Remove decltype comment and
2953 semantics.
2954
2955
2956 \f
2957 Copyright (C) 2010 Free Software Foundation, Inc.
2958
2959 Copying and distribution of this file, with or without modification,
2960 are permitted in any medium without royalty provided the copyright
2961 notice and this notice are preserved.
2962