tm.texi (Misc): Document TARGET_INVALID_PARAMETER_TYPE...
[gcc.git] / gcc / cp / ChangeLog
1 2009-05-20 Sandra Loosemore <sandra@codesourcery.com>
2
3 * typeck.c (default_conversion): Check targetm.promoted_type.
4 * decl.c (grokdeclarator): Check targetm.invalid_return_type.
5 (grokparms): Check targetm.invalid_parameter_type.
6 * cvt.c (ocp_convert): Check targetm.convert_to_type.
7 (build_expr_type_conversion): Check targetm.promoted_type.
8
9 2009-05-19 Andrew Pinski <andrew_pinski@playstation.sony.com>
10
11 * typeck.c (build_binary_op): Allow % on integal vectors.
12
13 2009-05-18 Jason Merrill <jason@redhat.com>
14
15 Implement explicit conversions ops as specified in N2437.
16 * decl.c (grokdeclarator): Handle explicit conversion ops.
17 (check_initializer): Pass flags to store_init_value.
18 * decl2.c (maybe_emit_vtables): Likewise.
19 * init.c (expand_aggr_init_1): Likewise.
20 * call.c (convert_class_to_reference): Take flags parm,
21 check DECL_NONCONVERTING_P.
22 (build_user_type_conversion_1): Check DECL_NONCONVERTING_P.
23 (add_builtin_candidates): Simplify getting type of conversion.
24 (build_object_call): Likewise. Check DECL_NONCONVERTING_P.
25 (implicit_conversion): Pass through LOOKUP_ONLYCONVERTING.
26 (reference_binding): Take flags parm. Direct-initialize copy parm.
27 (add_function_candidate): Direct-initialize the copy parm.
28 (add_conv_candidate): Use LOOKUP_IMPLICIT, not LOOKUP_NORMAL.
29 (build_builtin_candidate): Add LOOKUP_ONLYCONVERTING.
30 (conditional_conversion): Likewise.
31 (convert_like_real): Only complain about DECL_NONCONVERTING_P
32 constructors.
33 (perform_implicit_conversion_flags): Add flags parm to
34 perform_implicit_conversion. Improve diagnostics.
35 * cp-tree.h (LOOKUP_IMPLICIT): New macro.
36 (LOOKUP_COPY_PARM): New bit macro.
37 * cvt.c (build_expr_type_conversion): Check DECL_NONCONVERTING_P.
38 * typeck.c (convert_for_assignment): Take flags parm, pass it to
39 perform_implicit_conversion_flags.
40 (cp_build_modify_expr): Pass flags to convert_for_assignment.
41 (convert_for_initialization): Likewise.
42 * typeck2.c (store_init_value): Take flags parm, pass to
43 digest_init_flags.
44 (digest_init_flags): Add flags parm to digest_init.
45 (digest_init_r): Take flags parm, pass to convert_for_initialization.
46 (process_init_constructor_array): Pass it.
47 (process_init_constructor_record): Likewise.
48 (process_init_constructor_union): Likewise.
49
50 2009-05-16 Jason Merrill <jason@redhat.com>
51
52 PR c++/40139
53 * pt.c (tsubst_qualified_id): Retain the type if we aren't dealing
54 with a dependent type. Actually look up the destructor.
55 * semantics.c (finish_id_expression): Fix logic.
56 (finish_qualified_id_expr): Don't try to use 'this' if we aren't in
57 a function.
58 * typeck.c (build_x_unary_op): Diagnose taking the address of a
59 constructor or destructor.
60 * tree.c (get_first_fn): Handle OFFSET_REF.
61
62 2009-05-17 Joseph Myers <joseph@codesourcery.com>
63
64 * tree.c (cxx_printable_name_internal): Allow consecutive
65 translated and untranslated cached copies of the name of the
66 current function.
67
68 2009-05-15 Ian Lance Taylor <iant@google.com>
69
70 * cp-tree.h (enum cp_lvalue_kind_flags): Rename from
71 cp_lvalue_kind. Change all uses.
72 (enum base_access_flags): Rename from enum base_access. Change
73 all uses.
74 * parser.c (enum cp_parser_flags): Remove enum tag.
75
76 2009-05-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
77
78 PR 16302
79 * call.c (build_new_op): Update calls to warn_logical_operator.
80
81 2009-05-14 Ian Lance Taylor <iant@google.com>
82
83 * class.c (layout_class_type): Change itk to unsigned int.
84 * decl.c (finish_enum): Change itk to unsigned int.
85 * parser.c (cp_parser_check_decl_spec): Change ds to int. Remove
86 casts.
87
88 2009-05-13 David Mandelin <dmandelin@mozilla.com>:
89
90 * decl.c (duplicate_decls): Preserve parameter attributes.
91
92 2009-05-10 Jan Hubicka <jh@suse.cz>
93
94 * decl2.c (cxx_callgraph_analyze_expr): Use
95 cgraph_mark_address_taken.
96
97 2009-05-10 Joseph Myers <joseph@codesourcery.com>
98
99 * call.c (name_as_c_string): Call type_as_string_translate.
100 Translate identifiers to locale character set.
101 * cp-tree.h (lang_decl_name): Update prototype.
102 (type_as_string_translate, decl_as_string_translate,
103 cxx_printable_name_translate): Declare.
104 * cxx-pretty-print.c (M_): Define.
105 (pp_cxx_unqualified_id, pp_cxx_canonical_template_parameter): Mark
106 English fragments for conditional translation with M_.
107 * decl.c (grokdeclarator): Translate identifiers to locale
108 character set for diagnostics.
109 * error.c (M_): Define.
110 (dump_template_bindings, dump_type, dump_aggr_type,
111 dump_type_prefix, dump_global_iord, dump_simple_decl, dump_decl,
112 dump_function_decl, dump_template_parms, dump_expr,
113 dump_binary_op, op_to_string, assop_to_string): Mark English
114 fragments for conditional translation with M_.
115 (type_as_string): Disable translation of identifiers.
116 (type_as_string_translate): New.
117 (expr_as_string): Disable translation of identifiers.
118 (decl_as_string): Disable translation of identifiers.
119 (decl_as_string_translate): New.
120 (lang_decl_name): Add parameter translate.
121 (args_to_string): Call type_as_string_translate.
122 (cp_print_error_function): Call cxx_printable_name_translate.
123 (print_instantiation_full_context,
124 print_instantiation_partial_context): Call
125 decl_as_string_translate.
126 * parser.c (cp_lexer_get_preprocessor_token): Use %qE for
127 identifier in diagnostic.
128 * tree.c (cxx_printable_name): Change to
129 cxx_printable_name_internal. Add parameter translate.
130 (cxx_printable_name, cxx_printable_name_translate): New wrappers
131 round cxx_printable_name_internal.
132
133 2009-05-08 H.J. Lu <hongjiu.lu@intel.com>
134
135 PR c/36892
136 * call.c (build_call_a): Updated warn_deprecated_use call.
137 (build_over_call): Likewise.
138 * decl.c (grokdeclarator): Likewise.
139 (grokparms): Likewise.
140 * semantics.c (finish_id_expression): Likewise.
141 * typeck.c (build_class_member_access_expr): Likewise.
142 (finish_class_member_access_expr): Likewise.
143
144 2009-05-06 Dodji Seketeli <dodji@redhat.com>
145
146 PR c++/17395
147 * pt.c (tsubst_copy) <case PARM_DECL>: We don't want to tsubst the
148 whole list of PARM_DECLs, just the current one.
149
150 2009-05-05 Shujing Zhao <pearly.zhao@oracle.com>
151
152 * cp-tree.h:
153 (opname_tab, assignop_tab, update_member_visibility, yyerror, yyhook,
154 mangle_compound_literal): Remove unused declarations.
155 (build_vfield_ref, cxx_print_statistics, clone_function_decl,
156 adjust_clone_args, maybe_push_cleanup_level, pushtag, make_anon_name,
157 pushdecl_top_level_maybe_friend, pushdecl_top_level_and_finish,
158 check_for_out_of_scope_variable, print_other_binding_stack,
159 maybe_push_decl, cxx_mark_addressable, force_target_expr,
160 build_target_expr_with_type, finish_case_label,
161 cxx_maybe_build_cleanup, begin_eh_spec_block, finish_eh_spec_block,
162 check_template_keyword, cxx_omp_predetermined_sharing,
163 cxx_omp_clause_default_ctor, cxx_omp_clause_copy_ctor,
164 cxx_omp_clause_assign_op, cxx_omp_clause_dtor, cxx_omp_finish_clause,
165 cxx_omp_privatize_by_reference): Rearrange the declarations line to
166 match the comment that indicates the .c file which the functions are
167 defined.
168 (cxx_print_xnode, cxx_print_decl, cxx_print_type,
169 cxx_print_identifier, cxx_print_error_function, pushdecl): Add comment.
170
171 2009-05-05 Nathan Sidwell <nathan@codesourcery.com>
172
173 * typeck.c (cp_build_compound_expr): Require RHS to have a known
174 type.
175 * class.c (resolve_address_of_overloaded_function): Use
176 OVL_CURRENT for error message.
177 (instantiate_type): Forbid COMPOUND_EXPRs and remove code dealing
178 with them. Do not copy the node.
179
180 2009-05-05 Jakub Jelinek <jakub@redhat.com>
181
182 PR c++/40013
183 * pt.c (tsubst): If magic NOP_EXPR with side-effects has no type,
184 set it from its operand's type after tsubst_expr.
185
186 2009-05-04 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
187
188 PR c++/28152
189 * parser.c (cp_lexer_get_preprocessor_token): Do not store the
190 canonical spelling for keywords.
191 (cp_parser_attribute_list): Use the canonical spelling for
192 keywords in attributes.
193
194 2009-05-01 Joseph Myers <joseph@codesourcery.com>
195
196 * cxx-pretty-print.c (is_destructor_name, pp_cxx_unqualified_id,
197 pp_cxx_template_keyword_if_needed, pp_cxx_postfix_expression,
198 pp_cxx_new_expression, pp_cxx_delete_expression,
199 pp_cxx_unary_expression, pp_cxx_assignment_operator,
200 pp_cxx_assignment_expression, pp_cxx_expression,
201 pp_cxx_function_specifier, pp_cxx_decl_specifier_seq,
202 pp_cxx_simple_type_specifier, pp_cxx_type_specifier_seq,
203 pp_cxx_exception_specification, pp_cxx_direct_declarator,
204 pp_cxx_ctor_initializer, pp_cxx_type_id, pp_cxx_statement,
205 pp_cxx_namespace_alias_definition, pp_cxx_template_parameter,
206 pp_cxx_canonical_template_parameter, pp_cxx_template_declaration,
207 pp_cxx_declaration, pp_cxx_typeid_expression,
208 pp_cxx_va_arg_expression, pp_cxx_offsetof_expression,
209 pp_cxx_trait_expression): Mostly use pp_string and
210 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
211 for non-identifiers. Mark English strings for translation.
212 * cxx-pretty-print.h (pp_cxx_ws_string): Define.
213 * error.c (dump_template_parameter, dump_template_bindings,
214 dump_type, dump_aggr_type, dump_type_prefix, dump_simple_decl,
215 dump_decl, dump_template_decl, dump_function_decl,
216 dump_parameters, dump_exception_spec, dump_template_parms,
217 dump_expr, dump_binary_op, dump_unary_op, op_to_string,
218 assop_to_string, args_to_string, cp_print_error_function,
219 print_instantiation_full_context,
220 print_instantiation_partial_context): Mostly use pp_string and
221 pp_cxx_ws_string in place of pp_identifier and pp_cxx_identifier
222 for non-identifiers. Mark English strings for translation.
223 (dump_global_iord): Mark strings for translation; use longer
224 strings instead of substituting single words.
225 (function_category): Return a format string marked for
226 translation, not a single word or phrase to substitute in a longer
227 phrase.
228
229 2009-04-28 Ben Elliston <bje@au.ibm.com>
230
231 PR c++/35652
232 Revert:
233
234 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
235
236 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
237
238 2009-04-27 Ian Lance Taylor <iant@google.com>
239
240 * semantics.c (finish_omp_clauses): Change type of c_kind to enum
241 omp_clause_code.
242
243 2009-04-27 Jakub Jelinek <jakub@redhat.com>
244
245 PR c++/39875
246 * cvt.c (convert_to_void) <case INDIRECT_REF>: Only warn about
247 -Wunused-value if implicit.
248
249 2009-04-24 Ian Lance Taylor <iant@google.com>
250
251 * call.c (build_temp): Change 0 to enum constant.
252 * cp-tree.h (cp_lvalue_kind): Typedef to int rather than enum
253 type.
254 * cp-gimplify.c (cp_gimplify_expr): Add cast to enum type.
255 * decl2.c (constrain_visibility): Likewise.
256 * parser.c (cp_lexer_get_preprocessor_token): Likewise.
257 (cp_parser_flags): Typedef to int rather than enum type.
258 (cp_parser_expression_stack_entry): Change prec field to enum
259 cp_parser_prec.
260
261 * typeck.c (build_modify_expr): Add lhs_origtype parameter.
262 Change all callers.
263
264 2009-04-22 Dodji Seketeli <dodji@redhat.com>
265
266 PR c++/39639
267 * parser.c (cp_parser_template_argument_list): Display an error
268 when an ellipsis is not preceded by a parameter pack. Also, warn
269 about variadic templates usage without -std=c++0x.
270
271 2009-04-21 Taras Glek <tglek@mozilla.com>
272
273 * cp-tree.h: Update GTY annotations to new syntax.
274 * decl.c: Likewise.
275 * mangle.c: Likewise.
276 * name-lookup.c: Likewise.
277 * name-lookup.h: Likewise.
278 * parser.c: Likewise.
279 * pt.c: Likewise.
280 * rtti.c: Likewise.
281 * semantics.c: Likewise.
282 * typeck2.c: Likewise.
283
284 2009-04-22 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
285
286 PR c++/14875
287 * parser.c (cp_parser_error): Pass token->flags to c_parse_error.
288
289 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
290
291 PR c++/35711
292 * typeck.c (check_for_casting_away_constness): We diagnose casting
293 away any qualifiers not just constness.
294 (casts_away_constness): Mention that it handles more than just
295 constness.
296
297 2009-04-21 Joseph Myers <joseph@codesourcery.com>
298
299 * ChangeLog, ChangeLog-1993, ChangeLog-1994, ChangeLog-1995,
300 ChangeLog-1996, ChangeLog-1997, ChangeLog-1998, ChangeLog-1999,
301 ChangeLog-2000, ChangeLog-2001, ChangeLog-2002, ChangeLog-2003,
302 ChangeLog-2004, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
303 ChangeLog-2008, ChangeLog.ptr, ChangeLog.tree-ssa, NEWS,
304 cfns.gperf: Add copyright and license notices.
305 * cfns.h: Regenerate.
306 * ChangeLog, ChangeLog-2004: Correct dates.
307
308 2009-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
309
310 PR 16202
311 * tree.c (lvalue_p_1): Use const_tree.
312 Use CONST_CAST_TREE to avoid warning.
313 (lvalue_p): Returns bool, receives const_tree.
314
315 2009-04-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
316
317 PR c++/13358
318 * parser.c (cp_parser_check_decl_spec): Drop redundant flags.
319 * error.c (pedwarn_cxx98): New.
320 * cp-tree.h (pedwarn_cxx98): Declare.
321
322 2009-04-20 Le-Chun Wu <lcwu@google.com>
323
324 PR c++/39803
325 * init.c (build_vec_init): Set TREE_NO_WARNING on the
326 compiler-generated INDIRECT_REF expression.
327
328 2009-04-20 Ian Lance Taylor <iant@google.com>
329
330 * typeck.c (build_function_call_vec): New function.
331 (cp_build_function_call): Only pass first parameter to
332 objc_rewrite_function_call.
333 (build_modify_expr): Add rhs_origtype parameter. Change all
334 callers.
335 * decl.c (finish_decl): Add origtype parameter. Change all
336 callers.
337 * semantics.c (finish_call_expr): Pass VEC to
338 resolve_overloaded_builtin.
339
340 2009-04-20 Ian Lance Taylor <iant@google.com>
341
342 * cp-tree.h (base_access): Change typedef to int.
343 * parser.c (cp_parser_omp_flush): Change 0 to OMP_CLAUSE_ERROR.
344 (cp_parser_omp_threadprivate): Likewise.
345 * pt.c (unify_pack_expansion): Add casts to enum type.
346
347 2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
348
349 PR c/32061
350 PR c++/36954
351 * call.c (build_new_op): Save the original codes of operands
352 before folding.
353
354 2009-04-18 Kazu Hirata <kazu@codesourcery.com>
355
356 * cp-tree.h: Remove the prototype for insert_block.
357 * decl.c (insert_block): Remove.
358
359 2009-04-16 Ian Lance Taylor <iant@google.com>
360
361 * cp-tree.h (enum tsubst_flags): Rename from enum tsubst_flags_t.
362 (tsubst_flags_t): Change typedef from enum type to int.
363
364 2009-04-16 Paolo Bonzini <bonzini@gnu.org>
365
366 * decl.c (check_initializer): Use TYPE_VECTOR_OPAQUE
367 instead of targetm.vector_opaque_p.
368
369 2009-04-15 Le-Chun Wu <lcwu@google.com>
370
371 PR c++/39551
372 * call.c (build_over_call): Set TREE_NO_WARNING on the
373 compiler-generated INDIRECT_REF expression.
374 * cvt.c (convert_to_void): Emit warning when stripping off
375 INDIRECT_REF.
376
377 2009-04-14 Diego Novillo <dnovillo@google.com>
378
379 * parser.c (cp_parser_type_specifier_seq): Move call to
380 invoke_plugin_callbacks ...
381 (cp_parser_type_specifier_seq): ... here.
382
383 2009-04-14 Le-Chun Wu <lcwu@google.com>
384
385 * Make-lang.in: Modify dependencies of files including plugin.h.
386 * decl.c (finish_function): Call invoke_plugin_callbacks.
387 * parser.c (cp_parser_type_specifier): Call invoke_plugin_callbacks.
388
389 2009-04-14 Jason Merrill <jason@redhat.com>
390
391 PR c++/39763
392 * name-lookup.c (pushdecl_maybe_friend): Avoid all warnings
393 about shadowing by tentative parms.
394
395 2009-04-13 Jason Merrill <jason@redhat.com>
396
397 PR c++/39480
398 * call.c (build_over_call): Don't call memcpy if the target is
399 the same as the source.
400
401 2009-04-13 Jason Merrill <jason@redhat.com>
402
403 PR c++/39750
404 * pt.c (uses_template_parms): Handle CONSTRUCTOR.
405
406 2009-04-12 Jason Merrill <jason@redhat.com>
407
408 PR c++/39742
409 * call.c (joust): Don't crash on variadic fn.
410
411 2009-04-10 Jason Merrill <jason@redhat.com>
412
413 PR c++/28301
414 * parser.c (cp_parser_skip_to_end_of_block_or_statement): Return
415 if we see a close brace without an open brace.
416
417 2009-04-10 H.J. Lu <hongjiu.lu@intel.com>
418
419 * parser.c (cp_parser_class_specifier): Remove the unused
420 has_trailing_semicolon.
421
422 2009-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
423
424 PR c++/20118
425 * parser.c (cp_parser_check_template_parameters): Take a
426 cp_declarator parameter.
427 (cp_parser_elaborated_type_specifier): Update to
428 cp_parser_check_template_parameters.
429 (cp_parser_class_head): Likewise.
430 (cp_parser_check_declarator_template_parameters): Likewise.
431 (cp_parser_check_template_parameters): Handle first the non-error
432 conditions. Give more accurate diagnostics if a declarator is
433 given.
434
435 2009-04-08 Jason Merrill <jason@redhat.com>
436
437 PR c++/25185
438 * error.c (dump_aggr_type): Chase template typedefs if
439 -fno-pretty-templates.
440
441 2009-04-08 Dodji Seketeli <dodji@redhat.com>
442
443 PR c++/39637
444 * parser.c (cp_parser_enumerator_definition): Make sure the
445 initializer of the enumerator doesn't contain any bare parameter pack.
446
447 2009-04-07 Jason Merrill <jason@redhat.com>
448
449 PR c++/34691
450 * name-lookup.c (merge_functions): Keep multiple extern "C" functions.
451 * call.c (joust): Complain about mismatched default arguments
452 in extern "C" functions.
453 * class.c (resolve_address_of_overloaded_function): Handle multiple
454 extern "C" functions.
455 * pt.c (resolve_overloaded_unification): Likewise.
456
457 2009-04-07 Jason Merrill <jason@redhat.com>
458
459 PR c++/25185
460 * error.c (dump_function_decl): Don't pretty-print templates
461 if -fno-pretty-templates.
462 (count_non_default_template_args): Print all args if
463 -fno-pretty-templates.
464
465 2009-04-06 Jason Merrill <jason@redhat.com>
466
467 PR c++/35146
468 * pt.c (fn_type_unification): For DEDUCE_EXACT check that
469 the deduced template arguments give us the parameter types
470 we're looking for.
471
472 2009-04-05 Giovanni Bajo <giovannibajo@libero.it>
473 Jason Merrill <jason@redhat.com>
474
475 PR c++/14912
476 * error.c (count_non_default_template_args): New fn.
477 (dump_template_parms): Call it.
478 (dump_template_argument_list): Call it. Add parms parm.
479 (dump_template_argument): Adjust call to dump_template_argument_list.
480 (dump_type, dump_decl): Likewise.
481 (dump_template_bindings): Refactor logic.
482
483 2009-04-03 Jason Merrill <jason@redhat.com>
484
485 PR c++/25185
486 * error.c (dump_template_bindings): Look through typedefs in
487 typename results.
488 (dump_type) [TYPENAME_TYPE]: Print the typedef name if any.
489 (find_typenames_r): Also collect typedefs.
490 * pt.c (unify): Strip typedefs.
491
492 PR c++/39608
493 * semantics.c (finish_id_expression): Don't assume a dependent
494 member of the current instantiation isn't a valid integral
495 constant expression. Check dependent_scope_p.
496 * pt.c (dependent_scope_p): Check TYPE_P.
497 (tsubst_copy): If args is null, just return.
498
499 2009-04-02 Jason Merrill <jason@redhat.com>
500
501 PR c++/25185
502 * error.c (find_typenames, find_typenames_r): New fns.
503 (dump_function_decl): Call find_typenames.
504 (dump_template_bindings): Print typenames as well.
505 * pt.c (tsubst): Non-static.
506 * cp-tree.h: Declare it.
507
508 2009-04-02 Dodji Seketeli <dodji@redhat.com>
509
510 PR c++/26693
511 * decl2.c (grokfield): when a typedef appears in a
512 class, create the typedef variant type node for it.
513 (save_template_attributes): Creating typedef variant type node
514 here is now useless.
515 * decl.c (grokdeclarator): If the typedef'ed struct/class was
516 anonymous, set the proper type name to all its type variants.
517 (xref_basetypes) : Fixup the variant types after setting
518 TYPE_BINFO on REF.
519 * name-lookup.c (pushdecl_maybe_friend): Reuse the
520 set_underlying_type function to install typedef variant types.
521 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
522 macro.
523 (append_type_to_template_for_access_check): New entry points.
524 * semantics.c (check_accessibility_of_qualified_id):
525 When a typedef that is a member of a class appears in a template,
526 add it to the template. It will be ...
527 * class.c (finish_struct_bits): Split type variant fixup into ...
528 (fixup_type_variants): A new entry point.
529 * pt.c (instantiate_class_template, instantiate_template ): ... access
530 checked at template instantiation time.
531 (resolve_type_name_type): The type name should be the name of the
532 main type variant.
533 (retrieve_specialization): Specializations of template typedefs aren't
534 to looked up in DECL_TEMPLATE_INSTANTIATIONS (tmpl).
535 (append_type_to_template_for_access_check): New entry point.
536 (tsubst_decl): For typedefs, build the variant type from the correct
537 original type.
538 (get_class_bindings): Fix function comment.
539 (perform_typedefs_access_check): New entry point.
540
541 2009-03-31 Jason Merrill <jason@redhat.com>
542
543 PR c++/34691
544 * name-lookup.c (pushdecl_maybe_friend): Diagnose mismatched
545 extern "C" declarations.
546
547 C++ DR 613
548 * semantics.c (finish_non_static_data_member): Allow such references
549 without an associated object in sizeof/decltype/alignof.
550
551 * ptree.c (cxx_print_decl): Pretty-print full name of
552 function/template.
553 (cxx_print_type): Pretty-print full name of class.
554
555 * decl.c (grokdeclarator): Reject pointer to qualified function
556 type.
557
558 PR c++/37806, core issue 547
559 * typeck.c (cp_apply_type_quals_to_decl): Don't apply any quals
560 to a typedef.
561 * tree.c (cp_build_qualified_type_real): Don't apply restrict to a
562 function type.
563 * decl.h (enum decl_context): Add TEMPLATE_TYPE_ARG.
564 * decl.c (groktypename): Add is_template_arg parameter.
565 (grokdeclarator): Allow function cv-quals on a template type arg.
566 * parser.c (cp_parser_new_type_id, cp_parser_type_id): Add
567 is_template_arg argument in calls to groktypename.
568 * cp-tree.h: Adjust prototype.
569 * error.c (dump_type_prefix, dump_type_suffix): Fix plain
570 FUNCTION_TYPE printing.
571
572 * mangle.c (write_expression): Mangle dependent name as
573 source-name.
574
575 PR c++/38030, 38850, 39070
576 * pt.c (type_dependent_expression_p_push): New fn.
577 (tsubst_copy_and_build) [CALL_EXPR]: Only do arg-dep lookup when the
578 substitution makes the call non-dependent. Preserve koenig_p.
579 * parser.c (cp_parser_postfix_expression): Only do arg-dep lookup
580 for non-dependent calls.
581 * semantics.c (finish_call_expr): Revert earlier changes.
582 * cp-tree.h: Revert change to finish_call_expr prototype.
583
584 2009-03-29 Joseph Myers <joseph@codesourcery.com>
585
586 PR preprocessor/34695
587 * cp-tree.h (cp_cpp_error): Remove.
588 * error.c (cp_cpp_error): Remove.
589 * parser.c (cp_lexer_new_main): Set done_lexing instead of
590 client_diagnostic and error callback.
591
592 2009-03-28 Paolo Bonzini <bonzini@gnu.org>
593
594 * cp/cp-objcp-common.h (LANG_HOOKS_STATICP): Remove.
595 * cp/cp-objcp-common.c (cxx_staticp): Remove.
596 * cp/cp-tree.h (cxx_staticp): Remove.
597
598 2009-03-28 Jakub Jelinek <jakub@redhat.com>
599
600 PR c++/39554
601 * parser.c (cp_parser_postfix_expression): Don't call
602 warning_if_disallowed_function_p.
603
604 2009-03-27 Jan Hubicka <jh@suse.cz>
605
606 * except.c (choose_personality_routine): Set terminate_node to abort
607 for java exceptions.
608
609 2009-03-27 Dodji Seketeli <dodji@redhat.com>
610 Jakub Jelinek <jakub@redhat.com>
611
612 PR debug/37959
613 * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
614 (cp_function_decl_explicit_p): New prototype.
615 * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
616
617 2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
618
619 PR c++/38638
620 * parser.c (cp_parser_elaborated_type_specifier): If we have a
621 typename tag and don't have either a TYPE_DECL or a
622 TEMPLATE_ID_EXPR, set the type to NULL.
623
624 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
625
626 PR c++/37647
627 * decl.c (grokdeclarator): Reject [con|de]stuctors in a non-class
628 scope.
629
630 2009-03-27 Simon Martin <simartin@users.sourceforge.net>
631
632 PR c++/29727
633 * decl.c (check_array_designated_initializer): Handle error_mark_node.
634
635 2009-03-27 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
636
637 PR c++/35652
638 * typeck.c (cp_pointer_sum): Adjust call to pointer_int_sum.
639
640 2009-03-26 Andrew Haley <aph@redhat.com>
641
642 PR C++/39380
643 * decl2.c (possibly_inlined_p): If java exceptions are in use
644 don't inline a decl unless it is explicitly marked inline.
645 * lex.c: (pragma_java_exceptions): New variable.
646 (handle_pragma_java_exceptions): Set pragma_java_exceptions.
647 * cp-tree.h (pragma_java_exceptions): Declare new variable.
648
649 2009-03-24 Jason Merrill <jason@redhat.com>
650
651 PR c++/28274
652 * name-lookup.c (pushdecl_maybe_friend): Check default args later.
653
654 2009-03-23 Jakub Jelinek <jakub@redhat.com>
655
656 PR c/39495
657 * semantics.c (handle_omp_for_class_iterator): Swap cond operands and
658 code if iter is the second operand.
659 * parser.c (cp_parser_binary_expression): Add no_toplevel_fold_p
660 argument. If it is set, don't build the toplevel expression with
661 build_x_binary_op, but build2.
662 (cp_parser_assignment_expression, cp_parser_omp_for_incr): Adjust
663 callers.
664 (cp_parser_omp_for_cond): Don't assume the first operand of the
665 comparison must be decl.
666
667 2009-03-23 Jason Merrill <jason@redhat.com>
668
669 PR c++/37729
670 * pt.c (make_fnparm_pack): Split out from...
671 (instantiate_decl): ...here.
672 (tsubst_pack_expansion): Handle being called in a late-specified
673 return type.
674
675 PR c++/39526
676 * name-lookup.c (pushdecl_maybe_friend): Don't warn about shadowing
677 a parm with a parm.
678
679 2009-03-20 Jason Merrill <jason@redhat.com>
680
681 PR c++/28879
682 * parser.c (cp_parser_direct_declarator): In a template, wrap
683 non-constant expression in NOP_EXPR with TREE_SIDE_EFFECTS set.
684 * pt.c (tsubst): Preserve it in a partial instantiation.
685 (dependent_type_p_r): Don't check value_dependent_expression_p.
686 * decl.c (compute_array_index_type): Don't check
687 value_dependent_expression_p if TREE_SIDE_EFFECTS.
688
689 C++ core issue 703
690 * typeck2.c (check_narrowing): Don't complain about loss of
691 precision when converting a floating-point constant.
692
693 2009-03-19 Jakub Jelinek <jakub@redhat.com>
694
695 PR c/39495
696 * parser.c (cp_parser_omp_for_cond): Don't check lhs if decl is NULL.
697 (cp_parser_omp_for_loop): Always use cp_parser_omp_for_cond.
698
699 2009-03-18 Jakub Jelinek <jakub@redhat.com>
700
701 * parser.c (struct cp_token): Reorder fields for 64-bit hosts.
702 (eof_token): Adjust.
703
704 2009-03-18 H.J. Lu <hongjiu.lu@intel.com>
705
706 PR c++/39425
707 * parser.c (cp_parser_explicit_specialization): Don't skip the
708 rest of the specialization when begin_specialization returns
709 false.
710
711 2009-03-17 Jason Merrill <jason@redhat.com>
712
713 * decl.c (grokfndecl): Set DECL_CONTEXT on parms.
714 (duplicate_decls): Adjust DECL_CONTEXT of newdecl's parms.
715 * pt.c (check_explicit_specialization): Likewise.
716 (tsubst_copy) [PARM_DECL]: Return a dummy parm if we don't have a
717 local specialization.
718 * tree.c (cp_tree_equal) [PARM_DECL]: Check type and index, not name.
719 * decl2.c (parm_index): New fn.
720 * semantics.c (finish_decltype_type): Don't use describable_type.
721 * mangle.c (write_expression): Likewise. Mangle ALIGNOF_EXPR.
722 Give a sorry for unsupported codes rather than crash. Mangle
723 conversions with other than 1 operand. New mangling for PARM_DECL.
724 * operators.def (ALIGNOF_EXPR): Mangle as "az".
725
726 2009-03-17 Jing Yu <jingyu@google.com>
727
728 PR middle-end/39378
729 * method.c (use_thunk): Change is_thunk from crtl to cfun.
730
731 2009-03-17 Paolo Carlini <paolo.carlini@oracle.com>
732
733 PR c++/39475
734 * semantics.c (check_trait_type): New.
735 (finish_trait_expr): Use it.
736
737 2009-03-17 Jakub Jelinek <jakub@redhat.com>
738
739 * name-lookup.c (cp_emit_debug_info_for_using): Emit USING_STMTs
740 instead of calling imported_module_or_decl debug hook if
741 building_stmt_tree ().
742 * cp-gimplify.c (cp_gimplify_expr): Don't assert the first operand
743 is a NAMESPACE_DECL.
744
745 PR debug/37890
746 * name-lookup.c (do_namespace_alias): Don't call global_decl debug
747 hook at function scope.
748
749 PR debug/39471
750 * cp-gimplify.c (cp_gimplify_expr): Don't set DECL_NAME
751 on IMPORTED_DECL.
752
753 2009-03-09 Jakub Jelinek <jakub@redhat.com>
754
755 PR c++/39371
756 * semantics.c (finish_switch_cond): Don't call get_unwidened.
757 * decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
758 instead of TREE_TYPE (cond).
759
760 2009-03-08 H.J. Lu <hongjiu.lu@intel.com>
761
762 PR c++/39060
763 * parser.c (cp_parser_late_parsing_default_args): Continue
764 the loop when cp_parser_assignment_expression returns
765 error_mark_node.
766
767 2009-03-07 Jason Merrill <jason@redhat.com>
768
769 PR c++/39367
770 * init.c (build_new_1): Don't use a VLA type.
771 (build_vec_init): Handle getting a pointer for BASE.
772
773 2009-03-06 H.J. Lu <hongjiu.lu@intel.com>
774
775 PR c++/37520
776 * cp-tree.h: Check NO_DOT_IN_LABEL before NO_DOLLAR_IN_LABEL
777 when mangling symbols.
778
779 2009-03-06 Paolo Carlini <paolo.carlini@oracle.com>
780
781 PR c++/33492
782 * error.c (dump_expr): Don't try to print THROW_EXPRs in full.
783
784 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
785
786 * decl.c (record_builtin_java_type): Use canonicalized integer
787 types.
788
789 2009-03-04 Jason Merrill <jason@redhat.com>
790
791 PR c++/38908
792 * class.c (is_really_empty_class): New fn.
793 * cp-tree.h: Declare it.
794 * cp-objcp-common.c (cp_expr_size): Use it.
795
796 PR c++/13549
797 * semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
798 * parser.c (cp_parser_postfix_expression): Call it for
799 TEMPLATE_ID_EXPR.
800 * tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
801 (get_first_fn): Likewise.
802
803 PR c++/9634
804 PR c++/29469
805 PR c++/29607
806 Implement DR 224.
807 * decl.c (make_typename_type): Do look inside currently open classes.
808 * parser.c (cp_parser_lookup_name): Likewise.
809 (cp_parser_template_name): Likewise.
810 * pt.c (dependent_scope_p): New function.
811 * cp-tree.h: Declare it.
812 * class.c (currently_open_class): Return fast if T isn't a class.
813
814 2009-02-26 H.J. Lu <hongjiu.lu@intel.com>
815
816 PR c++/37789
817 * parser.c (cp_parser_mem_initializer): Return error_mark_node
818 if cp_parser_mem_initializer_id returns error_mark_node.
819
820 2009-02-24 Richard Guenther <rguenther@suse.de>
821
822 PR c++/39242
823 * pt.c (instantiate_decl): Do not instantiate extern, non-inline
824 declared functions.
825
826 2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
827
828 PR c++/36411
829 * pt.c (coerce_template_template_parms): Return 0 if parameter
830 is error_mark_node.
831
832 2009-02-23 Jason Merrill <jason@redhat.com>
833
834 * pt.c (unify): Call maybe_adjust_types_for_deduction when
835 deducing from an initializer list.
836
837 2009-02-20 Jason Merrill <jason@redhat.com>
838
839 PR c++/39225
840 * decl.c (grokdeclarator): Handle ~identifier.
841
842 2009-02-19 Jakub Jelinek <jakub@redhat.com>
843
844 PR target/39175
845 * decl2.c (determine_visibility): If visibility changed and
846 DECL_RTL has been already set, call make_decl_rtl to update symbol
847 flags.
848
849 2009-02-19 H.J. Lu <hongjiu.lu@intel.com>
850
851 PR c++/39188
852 * cp-tree.h (maybe_commonize_var): New.
853
854 * decl.c (maybe_commonize_var): Make it extern.
855
856 * decl2.c (finish_anon_union): Call maybe_commonize_var.
857
858 2009-02-18 H.J. Lu <hongjiu.lu@intel.com>
859
860 PR c++/39219
861 * parser.c (cp_parser_enum_specifier): Apply all attributes.
862
863 2009-02-18 Jason Merrill <jason@redhat.com>
864
865 * cfns.h: Tweak pathname for cfns.gperf.
866
867 2009-02-13 Jason Merrill <jason@redhat.com>
868
869 PR c++/39070
870 * semantics.c (finish_call_expr): Change koenig_p parm to int.
871 If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
872 * cp-tree.h: Adjust prototype.
873 * pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.
874
875 2009-02-12 Jason Merrill <jason@redhat.com>
876
877 PR c++/38950
878 * pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.
879
880 2009-02-11 Jason Merrill <jason@redhat.com>
881
882 PR c++/39153
883 * decl2.c (cp_write_global_declarations):
884 Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.
885
886 PR c++/30111
887 * init.c (build_value_init_noctor): Split out from...
888 (build_value_init): ...here.
889 (expand_aggr_init_1): Handle value-initialization.
890 * cp-tree.h: Add declaration.
891 * class.c (type_has_user_provided_constructor):
892 Handle non-class arguments.
893
894 2009-02-10 Jason Merrill <jason@redhat.com>
895
896 PR c++/38649
897 * class.c (defaultable_fn_p): Handle ... properly.
898
899 PR c++/36744
900 * tree.c (lvalue_p_1): Condition rvalue ref handling on
901 treat_class_rvalues_as_lvalues, too.
902
903 2009-02-10 Paolo Carlini <paolo.carlini@oracle.com>
904
905 PR c++/34397
906 * typeck.c (build_x_array_ref): New.
907 * cp-tree.h: Declare it.
908 * pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.
909
910 2009-02-09 Jason Merrill <jason@redhat.com>
911
912 PR c++/39109
913 * semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
914 * init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
915 * tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
916 * cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
917 for build_value_init TARGET_EXPR.
918 * cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.
919
920 2009-02-06 Paolo Carlini <paolo.carlini@oracle.com>
921
922 PR c++/35147
923 PR c++/37737
924 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.
925
926 2009-02-04 Jakub Jelinek <jakub@redhat.com>
927
928 PR c++/39095
929 * operators.def: Use COMPONENT_REF code for ->/pt operator again,
930 remove ./dt operator.
931 * mangle.c (write_expression): Handle COMPONENT_REF after handling
932 ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
933 write_string ("dt") instead of using operators.def.
934
935 2009-02-03 Jason Merrill <jason@redhat.com>
936
937 * typeck.c (cp_build_unary_op): Only complain about taking address
938 of main if pedantic.
939
940 2009-02-03 Jakub Jelinek <jakub@redhat.com>
941
942 PR inline-asm/39059
943 * parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
944
945 PR c++/39056
946 * typeck2.c (digest_init_r): Don't call process_init_constructor
947 for COMPLEX_TYPE.
948
949 2009-02-03 Paolo Bonzini <bonzini@gnu.org>
950
951 PR c++/36897
952 * pt.c (convert_nontype_argument_function): Expect expr to be an
953 ADDR_EXPR.
954
955 PR c++/37314
956 * typeck.c (merge_types): Call resolve_typename_type if only
957 one type is a typename.
958
959 2009-02-02 Jason Merrill <jason@redhat.com>
960
961 PR c++/39054
962 * parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node
963 in BIT_NOT_EXPR.
964
965 2009-02-01 Paolo Carlini <paolo.carlini@oracle.com>
966
967 PR c++/39053
968 * parser.c (cp_parser_pure_specifier): If there are no tokens left
969 do not call cp_lexer_consume_token.
970
971 2009-01-30 Jakub Jelinek <jakub@redhat.com>
972
973 PR c++/39028
974 * parser.c (cp_parser_already_scoped_statement): Handle __label__
975 declarations.
976
977 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
978
979 PR c++/33465
980 * error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
981
982 2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
983
984 PR c++/38655
985 * error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.
986
987 2009-01-29 Paolo Carlini <paolo.carlini@oracle.com>
988
989 * typeck.c (invalid_nonstatic_memfn_p): Use
990 DECL_NONSTATIC_MEMBER_FUNCTION_P.
991
992 2009-01-27 Paolo Carlini <paolo.carlini@oracle.com>
993
994 PR c++/37554
995 * call.c (build_over_call): If convert_for_arg_passing returns
996 error_mark_node unconditionally return it.
997
998 2009-01-22 Adam Nemet <anemet@caviumnetworks.com>
999
1000 * class.c (check_field_decls): Also inherit packed for bitfields
1001 regardless of their type.
1002
1003 2009-01-22 Dodji Seketeli <dodji@redhat.com>
1004
1005 PR c++/38930
1006 * decl2.c (grokfield): Reverting changes of PR c++/26693
1007 (save_template_attributes): Likewise.
1008 * decl.c (grokdeclarator): Likewise.
1009 * name-lookup.c (pushdecl_maybe_friend): Likewise.
1010 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
1011 (append_type_to_template_for_access_check): Likewise.
1012 * semantics.c (check_accessibility_of_qualified_id): Likewise.
1013 * pt.c (instantiate_class_template, instantiate_template ): Likewise.
1014 (tsubst): Likewise.
1015 (resolve_type_name_type): Likewise.
1016 (append_type_to_template_for_access_check): Likewise.
1017
1018 2009-01-21 Dodji Seketeli <dodji@redhat.com>
1019
1020 PR c++/26693
1021 * decl2.c (grokfield): when a typedef appears in a
1022 class, create the typedef variant type node for it.
1023 (save_template_attributes): Creating typedef variant type node
1024 here is now useless.
1025 * decl.c (grokdeclarator): If the typedef'ed struct/class was
1026 anonymous, set the proper type name to all its type variants.
1027 * name-lookup.c (pushdecl_maybe_friend): Reuse the
1028 set_underlying_type function to install typedef variant types.
1029 * cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
1030 macro.
1031 (append_type_to_template_for_access_check): New entry points.
1032 * semantics.c (check_accessibility_of_qualified_id):
1033 When a typedef that is a member of a class appears in a template,
1034 add it to the template. It will be ...
1035 * pt.c (instantiate_class_template, instantiate_template ): ... access
1036 checked at template instantiation time.
1037 (tsubst): Handle the case of being called with NULL args.
1038 (resolve_type_name_type): The type name should be the name of the
1039 main type variant.
1040 (append_type_to_template_for_access_check): New entry point.
1041
1042 2009-01-19 Jason Merrill <jason@redhat.com>
1043
1044 PR c++/23287
1045 * parser.c (cp_parser_unqualified_id): In a template,
1046 accept ~identifier.
1047 * typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.
1048
1049 2009-01-16 Jason Merrill <jason@redhat.com>
1050
1051 PR c++/38877
1052 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
1053 * init.c (build_new): Don't call describable_type unless we
1054 have an auto.
1055
1056 PR c++/29470
1057 * pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.
1058
1059 PR c++/38579
1060 * search.c (protected_accessible_p): N doesn't vary.
1061
1062 2009-01-15 Jason Merrill <jason@redhat.com>
1063
1064 PR c++/38850
1065 * pt.c (tsubst_copy_and_build): Tell finish_call_expr to
1066 accept hidden friends.
1067
1068 2009-01-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1069
1070 PR C++/29388
1071 * decl.c (grokdeclarator): Check for a non namespace/class context.
1072
1073 2009-01-15 Jason Merrill <jason@redhat.com>
1074
1075 PR c++/36334
1076 PR c++/37646
1077 * tree.c (lvalue_p_1): Handle BASELINK. A COMPONENT_REF to
1078 a function isn't necessarily an lvalue. Take tree, not const_tree.
1079 (lvalue_p, real_lvalue_p): Take tree, not const_tree.
1080 * typeck.c (lvalue_or_else): Likewise.
1081 * cp-tree.h: Adjust prototypes.
1082
1083 2009-01-15 Steve Ellcey <sje@cup.hp.com>
1084
1085 PR c++/38357
1086 * pt.c (tsubst): Check for NULL args.
1087
1088 2009-01-15 Dodji Seketeli <dodji@redhat.com>
1089
1090 PR c++/38636
1091 * name-lookup.c (pushtag): Don't create members to types that are not
1092 being created.
1093
1094 2009-01-14 Nick Clifton <nickc@redhat.com>
1095
1096 PR c++/37862
1097 * parser.c: Pass cp_id_kind computed in
1098 cp_parser_postfix_dot_deref_expression to
1099 cp_parser_primary_expression.
1100
1101 2009-01-13 Jakub Jelinek <jakub@redhat.com>
1102
1103 PR c++/38795
1104 * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
1105 STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
1106 as CAST_EXPR.
1107
1108 2009-01-12 Jason Merrill <jason@redhat.com>
1109 Steve Ellcey <sje@cup.hp.com>
1110
1111 PR c++/35109
1112 * name-lookup.c (lookup_name_real): Keep looking past a hidden
1113 binding.
1114
1115 2009-01-12 Dodji Seketeli <dodji@redhat.com>
1116
1117 PR c++/36019
1118 * pt.c (parameter_of_template_p): New function.
1119 * cp-tree.h: Declare it.
1120 * name-lookup.c (binding_to_template_parms_of_scope_p): New
1121 function.
1122 (outer_binding): Take template parameters in account when looking for
1123 a name binding.
1124
1125 2009-01-12 Jason Merrill <jason@redhat.com>
1126
1127 PR c++/31488
1128 * tree.c (pod_type_p): Return 1 for structs created by the back end.
1129
1130 2009-01-12 Jakub Jelinek <jakub@redhat.com>
1131
1132 PR c/32041
1133 * parser.c (cp_parser_builtin_offsetof): Allow `->' in
1134 offsetof member-designator, handle it as `[0].'.
1135
1136 PR c++/38794
1137 * decl.c (start_function): If grokdeclarator hasn't returned
1138 FUNCTION_DECL nor error_mark_node, issue diagnostics.
1139
1140 2009-01-11 Jakub Jelinek <jakub@redhat.com>
1141
1142 PR c++/36254
1143 * cp-gimplify.c (genericize_if_stmt): Renamed from ...
1144 (gimplify_if_stmt): ... this.
1145 (cp_gimplify_expr): Don't handle IF_STMT here.
1146 (cp_genericize_r): Call genericize_if_stmt for IF_STMT.
1147
1148 2009-01-10 Andrew Pinski <pinskia@gmail.com>
1149
1150 PR c++/38648
1151 * typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.
1152
1153 PR c++/36695
1154 * typeck2.c (build_functional_cast): Check for reference type and NULL
1155 PARMS.
1156
1157 2009-01-09 Steve Ellcey <sje@cup.hp.com>
1158
1159 * typeck.c (cp_build_unary_op): Check for ERROR_MARK.
1160
1161 2009-01-09 Jakub Jelinek <jakub@redhat.com>
1162
1163 PR c++/35335
1164 * error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.
1165
1166 2009-01-09 John F. Carr <jfc@mit.edu>
1167
1168 PR c++/37877
1169 * parser.c (cp_parser_class_specifier): Clear
1170 parser->in_unbraced_linkage_specification_p while parsing class
1171 specifiers.
1172
1173 2009-01-07 Jakub Jelinek <jakub@redhat.com>
1174
1175 PR c++/38725
1176 * semantics.c (finish_goto_stmt): Convert destination to
1177 void *.
1178
1179 2009-01-06 Jason Merrill <jason@redhat.com>
1180
1181 PR c++/35297
1182 PR c++/35477
1183 PR c++/35784
1184 PR c++/36846
1185 PR c++/38276
1186 * pt.c (check_default_tmpl_args): Don't complain about
1187 out-of-order parameter packs in the enclosing class
1188 or parameter packs after default args.
1189 (coerce_template_parms): If we have more than one
1190 parameter pack, don't flatten argument packs.
1191 (template_args_equal): Handle argument packs.
1192 (comp_template_args): Don't flatten argument packs.
1193 (check_instantiated_arg): Split out from...
1194 (check_instantiated_args): Here. Handle arg packs.
1195 (convert_template_argument): Just check that nontype argument
1196 packs have the right type.
1197
1198 2009-01-05 Dodji Seketeli <dodji@redhat.com>
1199
1200 PR c++/38472
1201 * typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.
1202
1203 2009-01-05 Jason Merrill <jason@redhat.com>
1204
1205 PR c++/38698
1206 * typeck2.c (process_init_constructor_union): Handle union with
1207 no fields.
1208
1209 * mangle.c (write_expression): Remove mangling for zero-operand
1210 casts.
1211
1212 PR c++/38701
1213 * decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
1214 defaulting.
1215
1216 PR c++/38702
1217 * class.c (defaultable_fn_p): Only operator== can be a copy
1218 assignment operator.
1219
1220 2009-01-02 Jason Merrill <jason@redhat.com>
1221
1222 PR c++/38698
1223 * typeck2.c (process_init_constructor_union): Handle excess
1224 initializers.
1225 (process_init_constructor_record): Likewise.
1226
1227 PR c++/38684
1228 * typeck2.c (digest_init_r): Don't use process_init_constructor
1229 for non-aggregate classes.
1230
1231 \f
1232 Copyright (C) 2009 Free Software Foundation, Inc.
1233
1234 Copying and distribution of this file, with or without modification,
1235 are permitted in any medium without royalty provided the copyright
1236 notice and this notice are preserved.