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