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