re PR c++/65333 (error: incomplete type used in nested name specifier)
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2015-03-10  Jason Merrill  <jason@redhat.com>
2
3         PR c++/65333
4         DR 1558
5         * pt.c (dependent_type_p_r): Check both class and alias template args.
6
7 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
8
9         PR c/65120
10         * parser.c (cp_parser_binary_expression): Check for tcc_comparison
11         before preparing arguments to warn_logical_not_parentheses.
12         Use maybe_constant_value on rhs.
13
14 2015-03-09  Jason Merrill  <jason@redhat.com>
15
16         PR c++/65339
17         * call.c: Don't call maybe_resolve_dummy when calling a constructor.
18
19 2015-03-09  Jakub Jelinek  <jakub@redhat.com>
20
21         PR c/65120
22         * parser.c (cp_parser_binary_expression): Don't warn for
23         !!x == y or !b == y where b is bool.
24
25 2015-03-06  Aldy Hernandez  <aldyh@redhat.com>
26
27         * ptree.c (cxx_print_lambda_node): New.
28         (cxx_print_xnode): Handle LAMBDA_EXPR.
29
30 2015-03-03  Aldy Hernandez  <aldyh@redhat.com>
31
32         PR c++/65295
33         * constexpr.c (cxx_eval_constant_expression): Remove assert in
34         RESULT_DECL handling.
35
36 2015-02-26  Marek Polacek  <polacek@redhat.com>
37
38         PR c++/65202
39         * constexpr.c (cxx_eval_constant_expression): Don't evaluate
40         a RETURN_EXPR if its operand is null.
41
42 2015-02-25  Jason Merrill  <jason@redhat.com>
43
44         PR c++/65209
45         * decl2.c (constrain_visibility) [VISIBILITY_ANON]: Clear
46         DECL_COMDAT.
47         (constrain_visibility_for_template): Handle reference arguments.
48
49         PR debug/58315
50         * decl.c (start_preparsed_function): Use create_artificial_label
51         for cdtor_label.
52
53 2015-02-17  Paolo Carlini  <paolo.carlini@oracle.com>
54             Jakub Jelinek  <jakub@redhat.com>
55
56         PR c++/65075
57         * constexpr.c (check_constexpr_bind_expr_vars): Allow
58         implicit typedefs for lambda types.
59
60 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
61
62         PR c++/60894
63         * decl.c (lookup_and_check_tag): Use strip_using_decl.
64
65 2015-02-13  Jason Merrill  <jason@redhat.com>
66
67         PR c++/65054
68         * pt.c (template_args_equal): Look through conversions here.
69         * tree.c (cp_tree_equal): Not here.
70
71 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
72
73         PR c++/60211
74         * parser.c (cp_parser_pragma): Diagnose PRAGMA_IVDEP at
75         pragma_external context.
76
77 2015-02-13  Jason Merrill  <jason@redhat.com>
78
79         PR c++/65051
80         * call.c (reference_binding): Don't look for bad conversion
81         if TO is incomplete.
82
83 2015-02-13  Paolo Carlini  <paolo.carlini@oracle.com>
84
85         PR c++/64970
86         * decl.c (make_typename_type): Pass tsubst_flags_t argument
87         to lookup_template_class.
88
89 2015-02-13  Jakub Jelinek  <jakub@redhat.com>
90
91         PR ipa/65034
92         * decl.c (start_preparsed_function): Use void_type_node instead
93         of NULL_TREE as LABEL_DECL type.
94
95 2015-02-12  Jason Merrill  <jason@redhat.com>
96
97         PR c++/64898
98         * mangle.c (write_mangled_name): Fix test for variable template
99         instantiation.
100
101         * decl.c (begin_destructor_body): Condition clobber on
102         -flifetime-dse.
103
104 2015-02-12 Andrea Azzarone <azzaronea@gmail.com>
105
106         PR c++/64959
107         * parser.c (lookup_literal_operator): Return all candidates.
108         (cp_parser_userdef_char_literal): Simplify error handling.
109         (cp_parser_userdef_numeric_literal):  Pass tf_warning_or_error.
110         (cp_parser_userdef_string_literal): Pass tf_warning_or_error.
111         Also give higher priority to standard string UDL operator.
112
113 2015-02-12  Jakub Jelinek  <jakub@redhat.com>
114
115         PR debug/55541
116         * cp-tree.h (BLOCK_OUTER_CURLY_BRACE_P): Define.
117         * decl.c (poplevel): If functionbody, try not to create an extra
118         BLOCK for function body and use subblocks as that, if it is non-NULL
119         and doesn't have siblings.  Set BLOCK_OUTER_CURLY_BRACE_P flag.
120         (outer_curly_brace_block): Use BLOCK_OUTER_CURLY_BRACE_P flag.
121
122         PR sanitizer/64984
123         * except.c (check_noexcept_r): Return NULL for internal
124         calls.
125
126 2015-02-10  Jason Merrill  <jason@redhat.com>
127
128         PR c++/64994
129         * constexpr.c (cxx_eval_call_expression): Walk the clone list.
130
131 2015-02-10  Jan Hubicka  <hubicka@ucw.cz>
132
133         PR ipa/64982
134         * method.c (use_thunk): Do not check for stdarg thunks.
135
136 2015-02-06  Jason Merrill  <jason@redhat.com>
137
138         PR c++/64899
139         * init.c (build_vec_init): Handle default-initialized array with
140         constexpr default constructor.
141
142 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
143
144         PR c/64824
145         PR c/64868
146         * parser.c (cp_parser_omp_atomic): Handle RDIV_EXPR.
147
148 2015-02-03  Paolo Carlini  <paolo.carlini@oracle.com>
149
150         PR c++/64877
151         * typeck.c (cp_build_binary_op): Avoid spurious -Waddress warnings
152         for generated expressions.
153
154 2015-02-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
155
156         PR c++/64901
157         * decl.c (duplicate_decls): Also duplicate DECL_FINAL_P and
158         DECL_OVERRIDE_P.
159
160 2015-02-02  Jason Merrill  <jason@redhat.com>
161
162         * tree.c (handle_abi_tag_attribute): Diagnose invalid arguments.
163
164 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
165
166         * class.c, except.c, parser.c, pt.c: All callers of fatal_error
167         changed to pass input_location as first argument.
168
169 2015-01-29  Jakub Jelinek  <jakub@redhat.com>
170
171         PR c++/64717
172         * cp-ubsan.c (cp_ubsan_instrument_vptr): Don't wrap vptr
173         into SAVE_EXPR.
174
175 2015-01-29  Jason Merrill  <jason@redhat.com>
176
177         PR c++/49508
178         * semantics.c (finish_return_stmt): Suppress -Wreturn-type on
179         erroneous return statement.
180
181         PR c++/64521
182         * repo.c (repo_emit_p): It's OK for a clone to be extern at this
183         point.
184
185 2015-01-27  Caroline Tice  <cmtice@google.com>
186
187         Committing VTV Cywin/Ming patch for Patrick Wollgast
188         * vtable-class-hierarchy.cc (vtv_generate_init_routine): Add
189         check for not TARGET_PECOFF at the VTV_PREINIT_PRIORITY checks.
190
191 2015-01-27  Jason Merrill  <jason@redhat.com>
192
193         PR c++/58597
194         * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
195         current_function_decl.
196
197         PR c++/63889
198         * pt.c (finish_template_variable): Move from semantics.c.
199         Handle multiple template arg levels.  Handle coercion here.
200         (lookup_template_variable): Not here.
201
202 2015-01-23  Jason Merrill  <jason@redhat.com>
203
204         PR c++/64314
205         PR c++/57510
206         * typeck2.c (split_nonconstant_init_1): Remove a sub-CONSTRUCTOR
207         that has been completely split out.
208
209         PR c++/64701
210         * constexpr.c (cxx_eval_constant_expression): Don't crash on C++
211         statement codes.
212
213         PR c++/64727
214         * constexpr.c (cxx_eval_constant_expression): Allow for lvalue use
215         of CONST_DECL.
216
217 2015-01-21  Jason Merrill  <jason@redhat.com>
218
219         PR c++/64603
220         * constexpr.c (cxx_eval_constant_expression): Only shortcut
221         constant CONSTRUCTORs.
222
223         PR c++/64647
224         * constexpr.c (ensure_literal_type_for_constexpr_object): Don't
225         give a hard error in a template instantiation.
226
227 2015-01-21  Richard Biener  <rguenther@suse.de>
228
229         PR middle-end/64313
230         * decl.c (duplicate_decls): Call set_builtin_decl_declared_p
231         for builtins the user declared correctly.
232
233 2015-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
234
235         PR c++/58614
236         * pt.c (unify): When BRACE_ENCLOSED_INITIALIZER_P (arg), handle
237         TREE_TYPE (elt) == error_mark_node.
238
239 2015-01-15  Jan Hubicka  <hubicka@ucw.cz>
240
241         PR tree-optimization/62053
242         * tree.c (build_cplus_array_type): Layout type after variants are set.
243
244 2015-01-15  Jakub Jelinek  <jakub@redhat.com>
245
246         * cp-gimplify.c (cp_genericize_r): Call
247         cp_ubsan_maybe_instrument_member_call for member calls.
248         (cp_ubsan_check_member_access_r): New function.
249         (cp_genericize_tree): Call cp_ubsan_instrument_member_accesses.
250         * cp-tree.h (cp_ubsan_maybe_instrument_member_call,
251         cp_ubsan_instrument_member_accesses,
252         cp_ubsan_maybe_instrument_downcast,
253         cp_ubsan_maybe_instrument_cast_to_vbase): New prototypes.
254         * cp-ubsan.c: New file.
255         * Make-lang.in (CXX_AND_OBJCXX_OBJS): Add cp/cp-ubsan.o.
256         * constexpr.c (cxx_eval_call_expression): Return void_node
257         for IFN_UBSAN_VPTR.
258         (potential_constant_expression_1): Return true for
259         UBSAN_NULL, UBSAN_BOUNDS and UBSAN_VPTR internal calls.
260         * typeck.c (build_class_member_access_expr): Provide locus
261         for COMPONENT_REFs.
262         (build_static_cast_1): Instrument downcasts.
263         * class.c (build_base_path): For -fsanitize=vptr and !fixed_type_p
264         add ubsan instrumentation for virtual_access.
265         * call.c: Include internal-fn.h.
266         (set_flags_from_callee): Handle internal calls.
267
268 2015-01-15  Momchil Velikov  <momchil.velikov@gmail.com>
269
270         PR c++/59366
271         * name-lookup.c (pushdecl_maybe_friend_1): Hide friend functions
272         and function templates, declared only in the class.
273         * decl.c (duplicate_decls): Reveal hidden friend functions or
274         function templates, if they are redeclared outside the class.
275
276 2015-01-15  Jason Merrill  <jason@redhat.com>
277
278         PR c++/64356
279         * constexpr.c (cxx_eval_binary_expression): Fix pasto.
280
281         PR c++/63283
282         * constexpr.c (potential_constant_expression_1): Handle reference
283         args in templates.
284
285 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
286             James Norris  <jnorris@codesourcery.com>
287             Cesar Philippidis  <cesar@codesourcery.com>
288             Ilmir Usmanov  <i.usmanov@samsung.com>
289             Jakub Jelinek  <jakub@redhat.com>
290
291         * parser.c: Include "gomp-constants.h".
292         (cp_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
293         omp_clause_map_kind.  Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
294         Use OMP_CLAUSE_SET_MAP_KIND.
295         (cp_parser_omp_construct, cp_parser_pragma): Handle
296         PRAGMA_OACC_CACHE, PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA,
297         PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_PARALLEL,
298         PRAGMA_OACC_LOOP, PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
299         (cp_parser_omp_clause_name): Handle "async", "copy", "copyout",
300         "create", "delete", "deviceptr", "host", "num_gangs",
301         "num_workers", "present", "present_or_copy", "pcopy",
302         "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
303         "present_or_create", "pcreate", "vector_length", "wait".
304         (OACC_DATA_CLAUSE_MASK, OACC_ENTER_DATA_CLAUSE_MASK)
305         (OACC_EXIT_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
306         (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
307         (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
308         (cp_parser_omp_var_list_no_open): Handle OMP_CLAUSE__CACHE_.
309         (cp_parser_oacc_data_clause, cp_parser_oacc_data_clause_deviceptr)
310         (cp_parser_oacc_clause_vector_length, cp_parser_oacc_wait_list)
311         (cp_parser_oacc_clause_wait, cp_parser_omp_clause_num_gangs)
312         (cp_parser_omp_clause_num_workers, cp_parser_oacc_clause_async)
313         (cp_parser_oacc_all_clauses, cp_parser_oacc_cache)
314         (cp_parser_oacc_data, cp_parser_oacc_enter_exit_data)
315         (cp_parser_oacc_kernels, cp_parser_oacc_loop)
316         (cp_parser_oacc_parallel, cp_parser_oacc_update)
317         (cp_parser_oacc_wait): New functions.
318         * cp-tree.h (finish_oacc_data, finish_oacc_kernels)
319         (finish_oacc_parallel): New prototypes.
320         * semantics.c: Include "gomp-constants.h".
321         (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR.  Use
322         GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.  Use
323         OMP_CLAUSE_SET_MAP_KIND.
324         (finish_omp_clauses): Handle OMP_CLAUSE_ASYNC,
325         OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE__CACHE_.
326         Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
327         (finish_oacc_data, finish_oacc_kernels, finish_oacc_parallel): New
328         functions.
329
330 2015-01-14  Paolo Carlini  <paolo.carlini@oracle.com>
331
332         PR c++/58671
333         * decl2.c (var_defined_without_dynamic_init): Handle gracefully
334         self-initialization.
335
336 2015-01-13  Jason Merrill  <jason@redhat.com>
337
338         PR c++/64356
339         PR libstdc++/58777
340         * constexpr.c (cxx_eval_binary_expression): Don't VERIFY_CONSTANT
341         pointer expressions.
342         (cxx_eval_increment_expression): Likewise.
343
344         PR c++/64514
345         * pt.c (coerce_template_parameter_pack): Return NULL for a
346         zero-length fixed parameter pack with a pack expansion arg.
347
348         PR c++/64520
349         * pt.c (unify): Don't try to deduce to std::initializer_list<T...>.
350
351 2015-01-12  Jason Merrill  <jason@redhat.com>
352
353         PR c++/64547
354         * constexpr.c (cxx_eval_call_expression): A call to a void
355         function doesn't need to return a value.
356
357 2015-01-09  Michael Collison  <michael.collison@linaro.org>
358
359         * call.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
360         input.h, alias.h, symtab.h, options.h, fold-const.h,
361         wide-int.h, and inchash.h due to flattening of tree.h.
362         * class.c: Ditto.
363         * constexpr.c: Ditto.
364         * cp-array-notation.c: Ditto.
365         * cp-gimplify.c: Ditto.
366         * cp-lang.c: Ditto.
367         * cp-objcp-common.c: Ditto.
368         * cvt.c: Ditto.
369         * decl2.c: Ditto.
370         * decl.c: Ditto.
371         * dump.c: Ditto.
372         * error.c: Ditto.
373         * except.c: Ditto.
374         * expr.c: Ditto.
375         * friend.c: Ditto.
376         * init.c: Ditto.
377         * lambda.c: Ditto.
378         * lex.c: Ditto.
379         * mangle.c: Ditto.
380         * name-lookup.c: Ditto.
381         * optimize.c: Ditto.
382         * parser.c: Ditto.
383         * pt.c: Ditto.
384         * ptree.c: Ditto.
385         * repo.c: Ditto.
386         * rtti.c: Ditto.
387         * search.c: Ditto.
388         * semantics.c: Ditto.
389         * tree.c: Ditto.
390         * typeck2.c: Ditto.
391         * typeck.c: Ditto.
392
393 2015-01-08  Jason Merrill  <jason@redhat.com>
394
395         * cp-gimplify.c (cp_genericize): Use do_ubsan_in_current_function.
396         * decl.c (compute_array_index_type): Likewise.
397         * init.c (build_vec_init): Likewise.
398         * typeck.c (cp_build_binary_op): Likewise.
399
400 2015-01-08  Jason Merrill  <jason@redhat.com>
401
402         * init.c (build_vec_init): Call ubsan_instrument_bounds to check
403         whether an initializer-list is too big for a VLA.
404         (throw_bad_array_length): Remove.
405         * cp-tree.h: Remove prototype.
406
407 2015-01-08  Paolo Carlini  <paolo.carlini@oracle.com>
408
409         PR c++/60753
410         * decl.c (grokfndecl): Add bool parameter.
411         (grokdeclarator): Adjust calls.
412         (start_decl): Don't set DECL_DELETED_FN here.
413
414 2015-01-06  Jason Merrill  <jason@redhat.com>
415
416         * parser.c (cp_parser_nested_name_specifier_opt): Diagnose invalid
417         template-ids.
418
419         PR c++/64455
420         * pt.c (type_dependent_expression_p): Handle variable templates.
421         * constexpr.c (potential_constant_expression_1): Use it.
422
423         PR c++/64487
424         * semantics.c (finish_offsetof): Handle templates here.
425         * parser.c (cp_parser_builtin_offsetof): Not here.
426
427         PR c++/64496
428         * semantics.c (process_outer_var_ref): Diagnose lambda in local
429         class NSDMI.
430
431 2015-01-06  Ville Voutilainen  <ville.voutilainen@gmail.com>
432
433         PR c++/64489
434         * class.c (check_field_decls): Make copy assignment operators
435         complex only in c++98 mode.
436
437 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
438
439         PR c++/31397
440         * class.c (check_for_override): Warn when a virtual function is an
441         override not marked override.
442
443 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
444
445         * class.c (warn_hidden): Use auto_vec<tree> instead of tree_list to
446         hold base_fndecls.
447         (get_basefndecls): Adjust.
448
449 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
450
451         Update copyright years.
452
453 2015-01-05  Marek Polacek  <polacek@redhat.com>
454
455         PR c/64423
456         * typeck.c (cp_build_array_ref): Pass loc down to
457         warn_array_subscript_with_type_char.
458
459 \f
460 Copyright (C) 2015 Free Software Foundation, Inc.
461
462 Copying and distribution of this file, with or without modification,
463 are permitted in any medium without royalty provided the copyright
464 notice and this notice are preserved.