aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog
blob: df07da5b85123b007ebfb4432f14f93d463d02a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
2009-03-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/33492
	* error.c (dump_expr): Don't try to print THROW_EXPRs in full.

2009-03-06  Alexandre Oliva  <aoliva@redhat.com>

	* decl.c (record_builtin_java_type): Use canonicalized integer
	types.

2009-03-04  Jason Merrill  <jason@redhat.com>

	PR c++/38908
	* class.c (is_really_empty_class): New fn.
	* cp-tree.h: Declare it.
	* cp-objcp-common.c (cp_expr_size): Use it.

	PR c++/13549
	* semantics.c (perform_koenig_lookup): Handle TEMPLATE_ID_EXPR.
	* parser.c (cp_parser_postfix_expression): Call it for 
	TEMPLATE_ID_EXPR.
	* tree.c (is_overloaded_fn): Look through TEMPLATE_ID_EXPR.
	(get_first_fn): Likewise.

	PR c++/9634
	PR c++/29469
	PR c++/29607
	Implement DR 224.
	* decl.c (make_typename_type): Do look inside currently open classes.
	* parser.c (cp_parser_lookup_name): Likewise.
	(cp_parser_template_name): Likewise.
	* pt.c (dependent_scope_p): New function.
	* cp-tree.h: Declare it.
	* class.c (currently_open_class): Return fast if T isn't a class.

2009-02-26  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/37789
	* parser.c (cp_parser_mem_initializer): Return error_mark_node
	if cp_parser_mem_initializer_id returns error_mark_node.

2009-02-24  Richard Guenther  <rguenther@suse.de>

	PR c++/39242
	* pt.c (instantiate_decl): Do not instantiate extern, non-inline
	declared functions.

2009-02-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/36411
	* pt.c (coerce_template_template_parms): Return 0 if parameter
	is error_mark_node.

2009-02-23  Jason Merrill  <jason@redhat.com>

	* pt.c (unify): Call maybe_adjust_types_for_deduction when
	deducing from an initializer list.

2009-02-20  Jason Merrill  <jason@redhat.com>

	PR c++/39225
	* decl.c (grokdeclarator): Handle ~identifier.

2009-02-19  Jakub Jelinek  <jakub@redhat.com>

	PR target/39175
	* decl2.c (determine_visibility): If visibility changed and
	DECL_RTL has been already set, call make_decl_rtl to update symbol
	flags.

2009-02-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39188
	* cp-tree.h (maybe_commonize_var): New.

	* decl.c (maybe_commonize_var): Make it extern.

	* decl2.c (finish_anon_union): Call maybe_commonize_var.

2009-02-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR c++/39219
	* parser.c (cp_parser_enum_specifier): Apply all attributes.

2009-02-18  Jason Merrill  <jason@redhat.com>

	* cfns.h: Tweak pathname for cfns.gperf.

2009-02-13  Jason Merrill  <jason@redhat.com>

	PR c++/39070
	* semantics.c (finish_call_expr): Change koenig_p parm to int.
	If -1, don't set KOENIG_LOOKUP_P but do keep hidden candidates.
	* cp-tree.h: Adjust prototype.
	* pt.c (tsubst_copy_and_build) [CALL_EXPR]: Pass -1.

2009-02-12  Jason Merrill  <jason@redhat.com>

	PR c++/38950
	* pt.c (unify)[TEMPLATE_PARM_INDEX]: Convert to the tsubsted type.

2009-02-11  Jason Merrill  <jason@redhat.com>

	PR c++/39153
	* decl2.c (cp_write_global_declarations): 
	Check DECL_DEFAULTED_FN, not DECL_ARTIFICIAL.

	PR c++/30111
	* init.c (build_value_init_noctor): Split out from...
	(build_value_init): ...here.
	(expand_aggr_init_1): Handle value-initialization.
	* cp-tree.h: Add declaration.
	* class.c (type_has_user_provided_constructor): 
	Handle non-class arguments.

2009-02-10  Jason Merrill  <jason@redhat.com>

	PR c++/38649
	* class.c (defaultable_fn_p): Handle ... properly.

	PR c++/36744
	* tree.c (lvalue_p_1): Condition rvalue ref handling on
	treat_class_rvalues_as_lvalues, too.

2009-02-10  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/34397
	* typeck.c (build_x_array_ref): New.
	* cp-tree.h: Declare it.
	* pt.c (tsubst_copy_and_build): Use it for case ARRAY_REF.

2009-02-09  Jason Merrill  <jason@redhat.com>

	PR c++/39109
	* semantics.c (simplify_aggr_init_expr): Do zero-initialization here.
	* init.c (build_value_init): Not here. Don't build a TARGET_EXPR.
	* tree.c (get_target_expr): Handle AGGR_INIT_EXPR.
	* cp-gimplify.c (cp_gimplify_init_expr): Remove special handling
	for build_value_init TARGET_EXPR.
	* cp-tree.h (AGGR_INIT_ZERO_FIRST): New macro.

2009-02-06  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/35147
	PR c++/37737
	* cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH.

2009-02-04  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39095
	* operators.def: Use COMPONENT_REF code for ->/pt operator again,
	remove ./dt operator.
	* mangle.c (write_expression): Handle COMPONENT_REF after handling
	ADDR_EXPR, for COMPONENT_REF without ARROW_EXPR inside of it
	write_string ("dt") instead of using operators.def.

2009-02-03  Jason Merrill  <jason@redhat.com>

	* typeck.c (cp_build_unary_op): Only complain about taking address
	of main if pedantic.

2009-02-03  Jakub Jelinek  <jakub@redhat.com>

	PR inline-asm/39059
	* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.

	PR c++/39056
	* typeck2.c (digest_init_r): Don't call process_init_constructor
	for COMPLEX_TYPE.

2009-02-03  Paolo Bonzini  <bonzini@gnu.org>

	PR c++/36897
	* pt.c (convert_nontype_argument_function): Expect expr to be an
	ADDR_EXPR.

	PR c++/37314
	* typeck.c (merge_types): Call resolve_typename_type if only
	one type is a typename.

2009-02-02  Jason Merrill  <jason@redhat.com>

	PR c++/39054
	* parser.c (cp_parser_unqualified_id): Don't wrap error_mark_node 
	in BIT_NOT_EXPR.

2009-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/39053
        * parser.c (cp_parser_pure_specifier): If there are no tokens left
        do not call cp_lexer_consume_token.

2009-01-30  Jakub Jelinek  <jakub@redhat.com>

	PR c++/39028
	* parser.c (cp_parser_already_scoped_statement): Handle __label__
	declarations.

2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/33465
	* error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.

2009-01-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/38655
	* error.c (dump_type_prefix, dump_type_suffix): Handle FIXED_POINT_TYPE.

2009-01-29  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (invalid_nonstatic_memfn_p): Use
	DECL_NONSTATIC_MEMBER_FUNCTION_P.

2009-01-27  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/37554
	* call.c (build_over_call): If convert_for_arg_passing returns
	error_mark_node unconditionally return it.

2009-01-22  Adam Nemet  <anemet@caviumnetworks.com>

	* class.c (check_field_decls): Also inherit packed for bitfields
	regardless of their type.

2009-01-22  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38930
	* decl2.c (grokfield): Reverting changes of PR c++/26693
	(save_template_attributes): Likewise.
	* decl.c (grokdeclarator): Likewise.
	* name-lookup.c (pushdecl_maybe_friend): Likewise.
	* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): Likewise.
	(append_type_to_template_for_access_check): Likewise.
	* semantics.c (check_accessibility_of_qualified_id): Likewise.
	* pt.c (instantiate_class_template, instantiate_template ): Likewise.
	(tsubst): Likewise.
	(resolve_type_name_type): Likewise.
	(append_type_to_template_for_access_check): Likewise.

2009-01-21  Dodji Seketeli  <dodji@redhat.com>

	PR c++/26693
	* decl2.c (grokfield): when a typedef appears in a
	class, create the typedef variant type node for it.
	(save_template_attributes): Creating typedef variant type node
	 here is now useless.
	* decl.c (grokdeclarator): If the typedef'ed struct/class was
	anonymous, set the proper type name to all its type variants.
	* name-lookup.c (pushdecl_maybe_friend): Reuse the
	set_underlying_type function to install typedef variant types.
	* cp-tree.h (MEMBER_TYPES_NEEDING_ACCESS_CHECK): New template accessor
	macro.
	(append_type_to_template_for_access_check): New entry points.
	* semantics.c (check_accessibility_of_qualified_id):
	When a typedef that is a member of a class appears in a template,
	add it to the template. It will be ...
	* pt.c (instantiate_class_template, instantiate_template ): ... access
	checked at template instantiation time.
	(tsubst): Handle the case of being called with NULL args.
	(resolve_type_name_type): The type name should be the name of the
	main type variant.
	(append_type_to_template_for_access_check): New entry point.

2009-01-19  Jason Merrill  <jason@redhat.com>

	PR c++/23287
	* parser.c (cp_parser_unqualified_id): In a template,
	accept ~identifier.
	* typeck.c (lookup_destructor): Handle IDENTIFIER_NODE.

2009-01-16  Jason Merrill  <jason@redhat.com>

	PR c++/38877
	* tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF.
	* init.c (build_new): Don't call describable_type unless we
	have an auto.

	PR c++/29470
	* pt.c (tsubst_decl) [USING_DECL]: Propagate access flags.

	PR c++/38579
	* search.c (protected_accessible_p): N doesn't vary.

2009-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/38850
	* pt.c (tsubst_copy_and_build): Tell finish_call_expr to
	accept hidden friends.

2009-01-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>

	PR C++/29388
	* decl.c (grokdeclarator): Check for a non namespace/class context.

2009-01-15  Jason Merrill  <jason@redhat.com>

	PR c++/36334
	PR c++/37646
	* tree.c (lvalue_p_1): Handle BASELINK.  A COMPONENT_REF to
	a function isn't necessarily an lvalue. Take tree, not const_tree.
	(lvalue_p, real_lvalue_p): Take tree, not const_tree.
	* typeck.c (lvalue_or_else): Likewise.
	* cp-tree.h: Adjust prototypes.

2009-01-15  Steve Ellcey  <sje@cup.hp.com>

	PR c++/38357
	* pt.c (tsubst): Check for NULL args.

2009-01-15  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38636
	* name-lookup.c (pushtag): Don't create members to types that are not
	being created.

2009-01-14  Nick Clifton  <nickc@redhat.com>

	PR c++/37862
	* parser.c: Pass cp_id_kind computed in
	cp_parser_postfix_dot_deref_expression to
	cp_parser_primary_expression.

2009-01-13  Jakub Jelinek  <jakub@redhat.com>

	PR c++/38795
	* tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
	STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
	as CAST_EXPR.

2009-01-12  Jason Merrill  <jason@redhat.com>
	    Steve Ellcey  <sje@cup.hp.com>

	PR c++/35109
	* name-lookup.c (lookup_name_real): Keep looking past a hidden 
	binding.

2009-01-12  Dodji Seketeli  <dodji@redhat.com>

	PR c++/36019
	* pt.c (parameter_of_template_p): New function.
	* cp-tree.h: Declare it.
	* name-lookup.c (binding_to_template_parms_of_scope_p): New
	function.
	(outer_binding): Take template parameters in account when looking for
	a name binding.

2009-01-12  Jason Merrill  <jason@redhat.com>

	PR c++/31488
	* tree.c (pod_type_p): Return 1 for structs created by the back end.

2009-01-12  Jakub Jelinek  <jakub@redhat.com>

	PR c/32041
	* parser.c (cp_parser_builtin_offsetof): Allow `->' in
	offsetof member-designator, handle it as `[0].'.

	PR c++/38794
	* decl.c (start_function): If grokdeclarator hasn't returned
	FUNCTION_DECL nor error_mark_node, issue diagnostics.

2009-01-11  Jakub Jelinek  <jakub@redhat.com>

	PR c++/36254
	* cp-gimplify.c (genericize_if_stmt): Renamed from ...
	(gimplify_if_stmt): ... this.
	(cp_gimplify_expr): Don't handle IF_STMT here.
	(cp_genericize_r): Call genericize_if_stmt for IF_STMT.

2009-01-10  Andrew Pinski  <pinskia@gmail.com>

	PR c++/38648
	* typeck.c (cp_build_modify_expr): Check for NULL current_function_decl.

	PR c++/36695
	* typeck2.c (build_functional_cast): Check for reference type and NULL
	PARMS.

2009-01-09  Steve Ellcey  <sje@cup.hp.com>

	* typeck.c (cp_build_unary_op): Check for ERROR_MARK.

2009-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/35335
	* error.c (dump_expr): Handle EXPR_STMT like BIND_EXPR.

2009-01-09  John F. Carr  <jfc@mit.edu>

	PR c++/37877
	* parser.c (cp_parser_class_specifier): Clear
	parser->in_unbraced_linkage_specification_p while parsing class
	specifiers.

2009-01-07  Jakub Jelinek  <jakub@redhat.com>

	PR c++/38725
	* semantics.c (finish_goto_stmt): Convert destination to
	void *.

2009-01-06  Jason Merrill  <jason@redhat.com>

	PR c++/35297
	PR c++/35477
	PR c++/35784
	PR c++/36846
	PR c++/38276
	* pt.c (check_default_tmpl_args): Don't complain about
	out-of-order parameter packs in the enclosing class
	or parameter packs after default args.
	(coerce_template_parms): If we have more than one
	parameter pack, don't flatten argument packs.
	(template_args_equal): Handle argument packs.
	(comp_template_args): Don't flatten argument packs.
	(check_instantiated_arg): Split out from...
	(check_instantiated_args): Here.  Handle arg packs.
	(convert_template_argument): Just check that nontype argument
	packs have the right type.

2009-01-05  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38472
	* typeck.c (type_after_usual_arithmetic_conversions): Fix a typo.

2009-01-05  Jason Merrill  <jason@redhat.com>

	PR c++/38698
	* typeck2.c (process_init_constructor_union): Handle union with
	no fields.

	* mangle.c (write_expression): Remove mangling for zero-operand
	casts.

	PR c++/38701
	* decl.c (cp_finish_decl): Clear DECL_INITIAL for invalid
	defaulting.

	PR c++/38702
	* class.c (defaultable_fn_p): Only operator== can be a copy
	assignment operator.

2009-01-02  Jason Merrill  <jason@redhat.com>

	PR c++/38698
	* typeck2.c (process_init_constructor_union): Handle excess
	initializers.
	(process_init_constructor_record): Likewise.

	PR c++/38684
	* typeck2.c (digest_init_r): Don't use process_init_constructor
	for non-aggregate classes.