Daily bump.
[official-gcc.git] / gcc / c-family / ChangeLog
bloba6484f45f75f3dc254ba42039a8d00f2bd1692d0
1 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
3         PR tree-optimization/102571
4         * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
5         padding, but the non-padding bits are contiguous set of bytes
6         by adjusting the memcmp call arguments instead of emitting
7         __builtin_clear_padding and then comparing all the type's bytes.
9 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
11         PR c++/102612
12         * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
13         __cpp_constexpr to 202110L rather than 201907L.
15 2021-10-04  Marek Polacek  <polacek@redhat.com>
17         PR c++/97573
18         * c-common.h (do_warn_array_compare): Declare.
19         * c-warn.c (do_warn_array_compare): New.
20         * c.opt (Warray-compare): New option.
22 2021-10-02  Iain Sandoe  <iain@sandoe.co.uk>
24         * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
25         NULL, this is not needed.
27 2021-10-01  Martin Sebor  <msebor@redhat.com>
29         PR c/102103
30         * c-common.c (decl_with_nonnull_addr_p): Handle members.
31         Check and perform warning suppression.
32         (c_common_truthvalue_conversion): Enhance warning suppression.
34 2021-10-01  Martin Liska  <mliska@suse.cz>
36         PR target/102552
37         * c-common.c (parse_optimize_options): decoded_options[0] is
38           used for program name, so merged_decoded_options should also
39           respect that.
41 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
42             Richard Biener  <rguenther@suse.de>
44         PR sanitizer/102515
45         * c-ubsan.c (ubsan_instrument_division): Check the right
46         flag_sanitize_recover bit, depending on which sanitization
47         is done.  Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
48         rather than SANITIZE_DIVIDE.  If both SANITIZE_SI_OVERFLOW
49         and SANITIZE_DIVIDE is enabled, neither check is known
50         to be false and flag_sanitize_recover bits for those two
51         aren't the same, emit both __ubsan_handle_divrem_overflow
52         and __ubsan_handle_divrem_overflow_abort calls.
54 2021-10-01  Martin Liska  <mliska@suse.cz>
56         * c-common.c (parse_optimize_options): Combine optimize
57         options with what was provided on the command line.
59 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
61         * c-omp.c (c_omp_split_clauses): Also copy
62         OMP_CLAUSE_ORDER_REPRODUCIBLE.
64 2021-09-27  Martin Liska  <mliska@suse.cz>
66         * c-opts.c (c_common_init_options_struct): Set also
67           x_flag_default_complex_method.
69 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
71         * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
73 2021-09-20  Matthias Kretz  <m.kretz@gsi.de>
75         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
76         undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
77         __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
78         __ROUNDING_MATH__ according to the new optimization flags.
80 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
82         * c-omp.c (c_omp_split_clauses): Split order clause also to
83         distribute construct.  Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
85 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
87         * c-omp.c (c_finish_omp_atomic): Avoid creating
88         TARGET_EXPR if test is true, use create_tmp_var_raw instead of
89         create_tmp_var and add a zero initializer to TARGET_EXPRs that
90         had NULL initializer.  When omitting operands after v = x,
91         use type of v rather than type of x.  Fix type of vtmp
92         TARGET_EXPR.
94 2021-09-13  Jason Merrill  <jason@redhat.com>
96         * c.opt: Add -Winterference-size.
97         * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
98         and __GCC_CONSTRUCTIVE_SIZE.
100 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
102         * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
103         * c-omp.c: Include gimple-fold.h.
104         (c_finish_omp_atomic): Add r and weak arguments.  Add support for
105         OpenMP 5.1 atomics.
107 2021-09-09  qing zhao  <qing.zhao@oracle.com>
109         * c-attribs.c (handle_uninitialized_attribute): New function.
110         (c_common_attribute_table): Add "uninitialized" attribute.
112 2021-09-08  liuhongt  <hongtao.liu@intel.com>
114         * c-common.c (excess_precision_mode_join): Update below comments.
115         (c_ts18661_flt_eval_method): Set excess_precision_type to
116         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
117         * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
118         (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
119         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
121 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
123         * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
125 2021-09-03  Eric Botcazou  <ebotcazou@adacore.com>
127         * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
128         and -gnatwu warning for the package specification.
130 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
132         * c-attribs.c (handle_unavailable_attribute): New.
134 2021-08-30  Jason Merrill  <jason@redhat.com>
136         * c.opt: Add -Wmissing-requires.
138 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
140         PR other/93067
141         * c-opts.c (c_common_input_charset_cb): New function.
142         (c_common_post_options): Call new function
143         diagnostic_initialize_input_context().
145 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
147         * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
148         (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
149         "di" and "u", respecitively; fill with BADLEN to match
150         size of 'types'.
151         (get_init_dynamic_hwi): Split off from ...
152         (init_dynamic_diag_info): ... here. Call it.
153         (init_dynamic_gfc_info): Call it.
155 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
157         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
158         * c-pragma.c (omp_pragmas): Add error directive.
159         * c-omp.c (omp_directives): Uncomment error directive entry.
161 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
163         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
164         * c-pragma.c (omp_pragmas): Add nothing directive.
165         * c-omp.c (omp_directives): Uncomment nothing directive entry.
167 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
169         PR c++/101539
170         * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
171         * c-common.c (c_common_reswords): Add __is_layout_compatible.
173 2021-08-17  Matt Jacobson  <mhjacobson@me.com>
175         * c-opts.c (c_common_post_options): Default to
176         flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
178 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
180         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
181         * c-pragma.c (omp_pragmas): Add scope construct.
182         * c-omp.c (omp_directives): Uncomment scope directive entry.
184 2021-08-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
186         * c-cppbuiltin.c (c_cpp_builtins): Define
187         __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
189 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
191         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
192         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
193         * c-pragma.c (omp_pragmas_simd): Add masked construct.
194         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
195         enumerator.
196         (c_finish_omp_masked): Declare.
197         * c-omp.c (c_finish_omp_masked): New function.
198         (c_omp_split_clauses): Handle combined masked constructs.
200 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
202         PR c++/101539
203         * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
204         * c-common.c (c_common_reswords): Add
205         __is_pointer_interconvertible_base_of.
207 2021-07-29  Richard Biener  <rguenther@suse.de>
209         PR c/101512
210         * c-common.c (c_common_mark_addressable_vec): Look through
211         C_MAYBE_CONST_EXPR even if not at the toplevel.
213 2021-07-27  Martin Sebor  <msebor@redhat.com>
215         PR c/101585
216         * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
218 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
220         * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
221         on attr_id.  Return 1 for omp::directive or omp::sequence in C++11
222         and later.
224 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
226         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
227         PRAGMA_OMP__LAST_ enumerators.
229 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
230             Joseph Myers  <joseph@codesourcery.com>
231             Cesar Philippidis  <cesar@codesourcery.com>
233         * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
235 2021-07-20  Martin Sebor  <msebor@redhat.com>
237         * c-common.c (c_build_shufflevector): Adjust by-value argument to
238         by-const-reference.
239         * c-common.h (c_build_shufflevector): Same.
241 2021-07-16  Andrew Pinski  <apinski@marvell.com>
243         PR c/101453
244         * c-common.c (parse_optimize_options): Use the correct
245         size for buffer.
247 2021-07-15  Martin Sebor  <msebor@redhat.com>
249         PR c/101289
250         PR c/97548
251         * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
253 2021-07-14  Jason Merrill  <jason@redhat.com>
255         * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
257 2021-07-06  Martin Sebor  <msebor@redhat.com>
259         * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
260          (gcc_cdiag_char_table): Same.
261          (gcc_cxxdiag_char_table): Same.
263 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
265         * c-common.h (enum c_omp_directive_kind): New enum.
266         (struct c_omp_directive): New type.
267         (c_omp_categorize_directive): Declare.
268         * c-omp.c (omp_directives): New variable.
269         (c_omp_categorize_directive): New function.
271 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
273         * c-ada-spec.c (packed_layout): New global variable.
274         (dump_ada_declaration): Set it upon seeing a packed record type.
275         Do not put the "aliased" keyword if it is set.
276         (dump_ada_structure): Add Pack aspect if it is set and clear it.
278 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
280         * c-ada-spec.c (check_name): Rename into...
281         (check_type_name_conflict): ...this.  Minor tweak.
282         (dump_ada_function_declaration): Adjust to above renaming.
283         (dump_ada_array_domains): Fix oversight.
284         (dump_ada_declaration): Call check_type_name_conflict for variables.
286 2021-06-25  Martin Sebor  <msebor@redhat.com>
288         * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
289         (c_common_truthvalue_conversion): Replace direct uses of
290         TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
291         copy_no_warning.
292         (check_function_arguments_recurse): Same.
293         * c-gimplify.c (c_gimplify_expr): Same.
294         * c-warn.c (overflow_warning): Same.
295         (warn_logical_operator): Same.
296         (warn_if_unused_value): Same.
297         (do_warn_unused_parameter): Same.
299 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
301         * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
302         C_ORT_OMP_TARGET.
303         * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
304         combined target constructs also add map (always, tofrom:) clause.
306 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
308         * c-attribs.c (common_handle_aligned_attribute): Remove short
309         circuit and dead code.
311 2021-06-14  Jonathan Wakely  <jwakely@redhat.com>
313         PR c++/101052
314         * known-headers.cc (get_stdlib_header_for_name): Add known
315         headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
316         exit, and getenv.
318 2021-06-12  Jason Merrill  <jason@redhat.com>
320         * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
322 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
324         PR c++/100974
325         * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
326         -std=c++2b for P1938R3 consteval if support.
328 2021-06-09  Jason Merrill  <jason@redhat.com>
330         PR c++/100879
331         * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
332         warning.
334 2021-06-07  Martin Liska  <mliska@suse.cz>
336         * c-target.def: Split long lines and replace them
337         with '\n\'.
339 2021-06-04  Martin Sebor  <msebor@redhat.com>
341         PR c/100783
342         * c-attribs.c (positional_argument): Bail on erroneous types.
344 2021-06-04  Martin Sebor  <msebor@redhat.com>
346         * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
347         for element presence.
349 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
351         * c-ada-spec.c (dump_ada_macros): Minor tweaks.
352         (dump_ada_decl_name): Likewise.
353         (dump_anonymous_type_name): Remove parent parameter and adjust.
354         (dump_sloc): Minor tweak.
355         (dump_ada_array_type): Remove type parameter and adjust.
356         (dump_ada_enum_type): Remove parent parameter and adjust.
357         (dump_ada_node): Adjust calls to above functions.
358         (dumped_anonymous_types): New global variable.
359         (dump_nested_types_1): Rename into...
360         (dump_nested_types): ...this.
361         (dump_nested_type): Remove parent and dumped_types parameters.
362         <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
363         Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
364         (dump_ada_specs): Initialize and free dumped_anonymous_types.
366 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
368         * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
369         (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
371 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
373         * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
374         (htable_t): New typedef.
375         (overloaded_names): Use it.
376         (add_name): New function.
377         (init_overloaded_names): Use add_name to populate the table and add
378         special cases for sigaction and stat.
379         (overloaded_name_p): Rename into...
380         (overloading_index): ...this.  Do not initialize overloaded_names table
381         here.  Return the index or zero.
382         (dump_ada_declaration): Minor tweaks.  Do not skip overloaded functions
383         but add an overloading suffix instead.
384         (dump_ada_specs): Initialize overloaded_names tables here.
386 2021-06-01  Martin Liska  <mliska@suse.cz>
388         PR other/100759
389         * c-attribs.c (handle_optimize_attribute): Limit sanity check
390         to a situation where we are not in processing of an optimize
391         pragma.
392         * c-pragma.c (handle_pragma_pop_options): Restore target
393         options.
395 2021-05-31  Indu Bhagat  <indu.bhagat@oracle.com>
397         PR testsuite/100749
398         * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
400 2021-05-31  Richard Biener  <rguenther@suse.de>
402         PR c++/88601
403         * c-common.c: Include tree-vector-builder.h and
404         vec-perm-indices.h.
405         (c_common_reswords): Add __builtin_shufflevector.
406         (c_build_shufflevector): New funtion.
407         * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
408         (c_build_shufflevector): Declare.
410 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
412         PR middle-end/99928
413         * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
414         target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
416 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
418         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
420 2021-05-25  Martin Liska  <mliska@suse.cz>
422         PR tree-optimization/92860
423         PR target/99592
424         * c-attribs.c (handle_optimize_attribute): Save target node
425         before calling parse_optimize_options and save it in case
426         it changes.
427         * c-pragma.c (handle_pragma_target): Similarly for pragma.
428         (handle_pragma_pop_options): Likewise here.
430 2021-05-25  Martin Liska  <mliska@suse.cz>
432         * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
434 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
436         PR middle-end/99928
437         * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
438         combined with simd and not with taskloop or for.
440 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
442         PR middle-end/99928
443         * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
444         on firstprivate clause copy going to target construct, and for
445         target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
447 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
449         * c.opt (Wc++11-extensions, Wc++14-extensions)
450         (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
451         options.
453 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
455         * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
457 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
459         * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
460         * c-pch.c (struct c_pch_validity): Use type uint32_t.
461         (pch_init): Renamed member.
462         (c_common_valid_pch): Adjust access to debug_type_names.
464 2021-05-19  Martin Sebor  <msebor@redhat.com>
466         PR c/100619
467         * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
468         bounds.
470 2021-05-18  Richard Biener  <rguenther@suse.de>
472         PR c/100547
473         * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
474         Reword existing nunit diagnostic.
476 2021-05-17  Joern Rennecke  <joern.rennecke@embecosm.com>
478         * c-common.c (braced_list_to_string): Return CTOR unchanged
479         if host and target character sizes don't match.
481 2021-05-14  Martin Liska  <mliska@suse.cz>
483         * c.opt: Add Warning keyword for 2 options.
485 2021-05-13  Martin Liska  <mliska@suse.cz>
487         PR middle-end/100504
488         * c-attribs.c (handle_target_clones_attribute): Expect a string
489         argument to target_clone argument.
491 2021-05-11  Joseph Myers  <joseph@codesourcery.com>
493         * c-lex.c (interpret_float): Handle digit separators for C2X.
495 2021-05-10  Martin Liska  <mliska@suse.cz>
497         * c-ada-spec.c (print_destructor): Use startswith
498         function instead of strncmp.
499         (dump_ada_declaration): Likewise.
500         * c-common.c (disable_builtin_function): Likewise.
501         (def_builtin_1): Likewise.
502         * c-format.c (check_tokens): Likewise.
503         (check_plain): Likewise.
504         (convert_format_name_to_system_name): Likewise.
506 2021-04-28  Patrick McGehearty  <patrick.mcgehearty@oracle.com>
508         * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
509         complex divide
511 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
512             Nathan Sidwell  <nathan@codesourcery.com>
513             Tom de Vries  <vries@codesourcery.com>
514             Julian Brown  <julian@codesourcery.com>
515             Kwok Cheung Yeung  <kcy@codesourcery.com>
517         * c.opt (Wopenacc-parallelism): New.
519 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
521         * c.opt (fopenacc-kernels=): Remove.
523 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
525         * c-warn.c (do_warn_double_promotion): Fix comment typo,
526         occured -> occurred.
527         (check_alignment_of_packed_member): Fix a comment typo,
528         memeber -> member.
529         (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
530         and onless -> unless.
531         (warn_parm_array_mismatch): Fix comment typos, declaratation
532         -> declaration and woud -> would.  Fix up comment indentation.
534 2021-04-08  Martin Sebor  <msebor@redhat.com>
536         PR middle-end/99883
537         * c.opt (Wmismatched-new-delete): Correct spelling.
539 2021-04-05  Eric Botcazou  <ebotcazou@adacore.com>
541         * c-ada-spec.c (is_simple_enum): Minor tweaks.
542         (dump_ada_enum_type): Add TYPE and PARENT parameters.  For non-simple
543         enumeral types use again the type name for the enumeration constants.
544         (dump_ada_node): Adjust call to dump_ada_enum_type.
545         (dump_nested_type): Likewise.
547 2021-04-01  Jason Merrill  <jason@redhat.com>
549         PR c++/98481
550         * c-opts.c (c_common_post_options): Bump latest_abi_version.
552 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
554         PR c++/99565
555         * c-warn.c (do_warn_duplicated_branches): Pass also
556         OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
558 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
560         PR debug/99230
561         * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
563 2021-03-05  Eric Botcazou  <ebotcazou@adacore.com>
565         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
566         after entering the separate class package, if any.
568 2021-03-04  Richard Biener  <rguenther@suse.de>
570         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
571         Handle ERROR_MARK.
573 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
575         PR c/99325
576         * c-ppoutput.c (print): Change src_line type from int to unsigned.
577         (token_streamer::stream) Likewise.
578         (maybe_print_line_1): Likewise.  Don't strcmp src_file if src_loc is
579         UNKNOWN_LOCATION.
581 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
583         PR c/99324
584         * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
585         instead of mark_addressable.  Fix a comment typo -
586         neutrallly -> neutrally.
588 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
590         PR c/99304
591         * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
592         message - refernced -> referenced.  Remove superfluous space before
593         closing paren of function calls.
595 2021-02-25  Nathan Sidwell  <nathan@acm.org>
597         PR c++/99166
598         * c.opt (-flang-info-module-cmi): Renamed option.
600 2021-02-19  Nathan Sidwell  <nathan@acm.org>
602         * c.opt (flang-info-module-read, flang-info-module-read=): New.
604 2021-02-18  H.J. Lu  <hjl.tools@gmail.com>
606         PR target/99113
607         * c-attribs.c (c_common_attribute_table): Add the "retain"
608         attribute.
609         (handle_retain_attribute): New function.
611 2021-02-16  Marek Polacek  <polacek@redhat.com>
613         PR c++/99062
614         * c-attribs.c (handle_assume_aligned_attribute): Check that the
615         alignment argument is non-negative.  Tweak a warning message.
617 2021-02-12  Martin Sebor  <msebor@redhat.com>
619         PR c/99055
620         * c-warn.c (warn_parm_array_mismatch): Free strings returned from
621         print_generic_expr_to_str.
623 2021-02-10  Richard Biener  <rguenther@suse.de>
625         * c-common.c (parse_optimize_options): Free decoded_options.
627 2021-02-04  emsr  <3dw4rd@verizon.net>
629         * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
631 2021-02-03  Ed Smith-Rowland  <3dw4rd@verizon.net>
633         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
634         * c-lex.c (interpret_integer): Set node type for size literal.
636 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
638         * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
639         draft from description.
640         (-std=c++2b): Fix a pasto, 2020 -> 2023.
642 2021-01-26  Paul Fee  <paul.f.fee@gmail.com>
644         * c-common.h (cxx_dialect): Add cxx23 as a dialect.
645         * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
646         and -std=gnu++2b
647         * c-opts.c (set_std_cxx23): New.
648         (c_common_handle_option): Set options when -std=c++23 is enabled.
649         (c_common_post_options): Adjust comments.
650         (set_std_cxx20): Likewise.
652 2021-01-25  Martin Sebor  <msebor@redhat.com>
654         PR c++/98646
655         * c-common.c (check_nonnull_arg): Adjust warning text.
657 2021-01-17  Martin Sebor  <msebor@redhat.com>
659         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
660         assume SSA_NAME_IDENTIFIER evaluates to nonzero.
662 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
664         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
665         Redefine PRAGMA_OACC_CLAUSE_DETACH.
667 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
669         PR tree-optimization/98597
670         * c-pretty-print.c: Include options.h.
671         (c_fold_indirect_ref_for_warn): New function.
672         (print_mem_ref): Use it.  If it returns something that has compatible
673         type and is TBAA compatible with zero offset, print it and return,
674         otherwise print it using offsetof syntax or array ref syntax.  Fix up
675         printing if MEM_REFs first operand is ADDR_EXPR, or when the first
676         argument has pointer to array type.  Print pointers using the standard
677         formatting.
679 2021-01-12  Martin Sebor  <msebor@redhat.com>
681         PR c/98597
682         PR c/98592
683         * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
684         has pointer type.  Remove redundant code.  Avoid calling
685         gimple_canonical_types_compatible_p.
687 2021-01-07  Martin Sebor  <msebor@redhat.com>
689         PR middle-end/98578
690         * c-pretty-print.c (print_mem_ref): Strip array from access type.
691         Avoid assuming acces type's size is constant.  Correct condition
692         guarding the printing of a parenthesis.
694 2021-01-06  Martin Sebor  <msebor@redhat.com>
696         PR c++/95768
697         * c-pretty-print.c (c_pretty_printer::primary_expression): For
698         SSA_NAMEs print VLA names and GIMPLE defining statements.
699         (print_mem_ref): New function.
700         (c_pretty_printer::unary_expression): Call it.
702 2021-01-06  Richard Biener  <rguenther@suse.de>
704         PR tree-optimization/95582
705         * c-attribs.c (c_common_attribute_table): Add entry for
706         signed_bool_precision.
707         (handle_signed_bool_precision_attribute): New.
709 2020-12-24  Iain Sandoe  <iain@sandoe.co.uk>
711         * c.opt: Add -stdlib= option and enumerations for
712         libstdc++ and libc++.
714 2020-12-16  Martin Liska  <mliska@suse.cz>
716         * c.opt: Remove usage of Report.
718 2020-12-14  Martin Sebor  <msebor@redhat.com>
720         PR middle-end/98166
721         PR c++/57111
722         PR middle-end/98160
723         * c-attribs.c (maybe_add_noinline): New function.
724         (handle_malloc_attribute): Call it.  Use ATTR_FLAG_INTERNAL.
725         Implicitly add attribute noinline to functions not declared inline
726         and warn on those.
728 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
730         * c-pragma.c (omp_pragmas): Add 'allocate'.
731         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
733 2020-12-08  Jakub Jelinek  <jakub@redhat.com>
735         PR c++/98187
736         * c-pragma.c (omp_pragmas): Remove "master".
737         (omp_pragmas_simd): Add "master".
739 2020-12-07  Marek Polacek  <polacek@redhat.com>
741         PR c++/98126
742         * c-common.c (verify_tree_lim_r): New function.
743         (verify_sequence_points): Use it.  Use nullptr instead of 0.
745 2020-12-03  Martin Sebor  <msebor@redhat.com>
747         PR c++/90629
748         PR middle-end/94527
749         * c-attribs.c (handle_dealloc_attribute): New function.
750         (handle_malloc_attribute): Handle argument forms of attribute.
751         * c.opt (-Wmismatched-dealloc): New option.
752         (-Wmismatched-new-delete): New option.
754 2020-12-03  Jakub Jelinek  <jakub@redhat.com>
756         PR libstdc++/93121
757         * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
758         * c-common.c (c_common_reswords): Add __builtin_bit_cast.
760 2020-12-01  JeanHeyd Meneide  <phdofthehouse@gmail.com>
762         * c-cppbuiltin.c (c_cpp_builtins): Add predefined
763         {__GNUC_EXECUTION_CHARSET_NAME} and
764         _WIDE_EXECUTION_CHARSET_NAME} macros.
766 2020-12-01  Nathan Sidwell  <nathan@acm.org>
768         * c-common.c (module, import, export): New internal tokens (with
769         trailing space).
770         * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
771         them.
772         (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
773         * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
775 2020-12-01  Nathan Sidwell  <nathan@acm.org>
777         * c-opts.c (c_common_init_options): Ask for module dependencies.
778         (c_common_handle_option): Handle -Mmodules -Mno-modules.
779         * c-pch.c (c_common_valid_pch): ... does not play with C++
780         modules.
781         * c.opt (Mmodules, Mno-modules): New preprocessor dependency
782         options.
783         (fmodules-ts, fmodule-header, fmodule-implicit-inline)
784         (fmodule-only, fmodule-mapper, fmodule-lazy)
785         (fmodule-version-ignore, Winvalid-imported-macros)
786         (flang-info-include-translate, flang-info-include-translate-not):
787         New options
789 2020-11-28  Eric Botcazou  <ebotcazou@adacore.com>
791         * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
792         (dump_ada_structure): Also deal with convention, unchecked union and
793         bit-field for nested types.  In the latter case, print an Alignment
794         aspect along with the Pack aspect.
796 2020-11-25  Martin Sebor  <msebor@redhat.com>
798         PR bootstrap/94982
799         * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
800         -Wformat-diag.
802 2020-11-24  Martin Sebor  <msebor@redhat.com>
804         * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
806 2020-11-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
808         * c-attribs.c (handle_special_var_sec_attribute): New.
809         (handle_noinit_attribute): Remove.
810         (attr_noinit_exclusions): Rename to...
811         (attr_section_exclusions): ...this, and add "persistent" attribute
812         exclusion.
813         (c_common_attribute_table): Add "persistent" attribute.
815 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
817         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
818         Treat opaque types like other types.
819         (c_pretty_printer::direct_abstract_declarator): Opaque types are
820         supported types.
822 2020-11-20  Martin Sebor  <msebor@redhat.com>
824         * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
825         with fewer arguments.
827 2020-11-20  Martin Sebor  <msebor@redhat.com>
829         PR middle-end/97879
830         * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
831         Error out on invalid modes.
833 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
835         PR libstdc++/88101
836         * c-common.c (check_builtin_function_arguments): Handle
837         BUILT_IN_CLEAR_PADDING.
839 2020-11-18  Nathan Sidwell  <nathan@acm.org>
841         * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
843 2020-11-17  Nathan Sidwell  <nathan@acm.org>
845         * c-common.h (enum c_tree_index): Reorder to place lazy fields
846         after newly-added CTI_MODULE_HWM.
848 2020-11-17  Joseph Myers  <joseph@codesourcery.com>
850         * c-cppbuiltin.c (builtin_define_float_constants): Define
851         "*_IS_IEC_60559__" macros.
853 2020-11-17  Nathan Sidwell  <nathan@acm.org>
855         * c-lex.c: #include "langhooks.h".
856         (cb_undef): Maybe call preprocess_undef lang hook.
857         * c-opts.c (c_common_post_options): Maybe call preprocess_options
858         lang hook.
859         (push_command_line_include): Maybe call preprocess_main_file lang
860         hook.
861         (cb_file_change): Likewise.
862         * c-ppoutput.c: #include "langhooks.h.
863         (scan_translation_unit): Maybe call preprocess_token lang hook.
864         (class do_streamer): New, derive from token_streamer.
865         (directives_only_cb): Data pointer is do_streamer, call
866         preprocess_token lang hook.
867         (scan_translation_unit_directives_only): Use do_streamer.
868         (print_line_1): Move src_line recording to after string output.
869         (cb_undef): Maybe call preprocess_undef lang hook.
871 2020-11-17  Nathan Sidwell  <nathan@acm.org>
873         * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
874         code duplicating that functionality.
876 2020-11-17  Jakub Jelinek  <jakub@redhat.com>
878         PR c/90628
879         * c-common.c (check_builtin_function_arguments)
880         <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
881         to _Atomic.  For the TYPE_READONLY case, adjust message to be usable
882         for more builtins and argument positions.
884 2020-11-16  Iain Sandoe  <iain@sandoe.co.uk>
886         PR objc/97854
887         * stub-objc.c: Include c-common.h to declare enum rid.
889 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
891         PR c++/63287
892         * c-cppbuiltin.c: Include configargs.h.
893         (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
894         defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
895         "single".
897 2020-11-13  Gergö Barany  <gergo@codesourcery.com>
898             Thomas Schwinge  <thomas@codesourcery.com>
900         * c.opt (fopenacc-kernels): Add.
902 2020-11-13  Jason Merrill  <jason@redhat.com>
904         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
906 2020-11-13  Piotr H. Dabrowski  <phd@phd.re>
908         PR c++/91318
909         * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
911 2020-11-13  Martin Liska  <mliska@suse.cz>
913         * c-attribs.c (build_attr_access_from_parms): Format properly.
915 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
917         PR objc/90707
918         * c-common.c (c_common_reswords): null_unspecified, nullable,
919         nonnull, null_resettable: New keywords.
920         * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
921         RID_NONNULL, RID_NULL_RESETTABLE: New.
922         (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
923         ranges accepted for property attributes.
924         * c-attribs.c (handle_objc_nullability_attribute): New.
925         * c-objc.h (enum objc_property_attribute_group): Add
926         OBJC_PROPATTR_GROUP_NULLABLE.
927         (enum objc_property_attribute_kind):Add
928         OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
929         OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
931 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
933         PR objc/77404
934         * c-attribs.c (handle_objc_root_class_attribute): New
935         * c-objc.h (objc_start_class_interface): Add a location
936         value for the position of the class name.
937         * c.opt: Add Wobjc-root-class.
938         * stub-objc.c (objc_start_class_interface): Add a location
939         value for the position of the class name.
941 2020-11-12  Joseph Myers  <joseph@codesourcery.com>
943         * c-lex.c (c_common_has_attribute): Take argument std_syntax.
944         Allow scope for C.  Handle standard attributes for C.  Do not
945         accept unscoped attributes if std_syntax and not handled as
946         standard attributes.
947         * c-common.h (c_common_has_attribute): Update prototype.
949 2020-11-12  Nicholas Guriev  <guriev-ns@ya.ru>
951         PR pch/86674
952         * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
953         reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
955 2020-11-11  Patrick Palka  <ppalka@redhat.com>
957         PR c++/88115
958         * c-opts.c (c_common_post_options): Update latest_abi_version.
960 2020-11-10  Jakub Jelinek  <jakub@redhat.com>
962         PR c/97748
963         * c-common.h (warn_if_unused_value): Add quiet argument defaulted
964         to false.
965         * c-warn.c (warn_if_unused_value): Likewise.  Pass it down
966         recursively and just return true instead of warning if it is true.
967         Handle COMPLEX_EXPR.
969 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
971         * c-common.h (c_omp_adjust_map_clauses): New declaration.
972         * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
973         (c_omp_adjust_map_clauses): New function.
975 2020-11-09  Marek Polacek  <polacek@redhat.com>
977         DR 1914
978         * c-common.c (attribute_fallthrough_p): Tweak the warning
979         message.
981 2020-11-09  Patrick Palka  <ppalka@redhat.com>
983         * c-pragma.c (handle_pragma_diagnostic): Split the
984         unknown-option -Wpragmas diagnostic into a warning and a
985         subsequent note containing a spelling suggestion.  Avoid
986         computing the suggestion if -Wpragmas warnings are being
987         suppressed.
989 2020-11-09  Patrick Palka  <ppalka@redhat.com>
991         PR testsuite/97117
992         * c-indentation.c (get_visual_column): Remove location_t
993         parameter.  Move the column-tracking diagnostic code from here
994         to ...
995         (should_warn_for_misleading_indentation): ... here, before the
996         early exit for when the loci are not all distinct.  Don't pass a
997         location_t argument to get_visual_column.
998         (assert_get_visual_column_succeeds): Don't pass a location_t
999         argument to get_visual_column.
1000         (assert_get_visual_column_fails): Likewise.
1002 2020-11-08  Iain Sandoe  <iain@sandoe.co.uk>
1004         * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1005         of keywords accepted in @property attribute contexts.
1006         * c-objc.h (enum objc_property_attribute_group): Add
1007         OBJC_PROPATTR_GROUP_CLASS.
1008         (enum objc_property_attribute_kind): Add
1009         OBJC_PROPERTY_ATTR_CLASS.
1011 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
1013         * c-common.c (c_common_reswords): Add 'atomic' property
1014         attribute.
1015         * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1016         property attributes.
1018 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
1020         * c-attribs.c (handle_nsobject_attribute): New.
1021         * c.opt: Add WNSObject-attribute.
1023 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
1025         * c-objc.h (enum objc_property_attribute_group): New
1026         (enum objc_property_attribute_kind): New.
1027         (OBJC_PROPATTR_GROUP_MASK): New.
1028         (struct property_attribute_info): Small class encapsulating
1029         parser output from property attributes.
1030         (objc_prop_attr_kind_for_rid): New
1031         (objc_add_property_declaration): Simplify interface.
1032         * stub-objc.c (enum rid): Dummy type.
1033         (objc_add_property_declaration): Simplify interface.
1034         (objc_prop_attr_kind_for_rid): New.
1036 2020-11-06  Nathan Sidwell  <nathan@acm.org>
1038         * c-ada-spec.c (collect_ada_nodes): Rename
1039         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1040         (collect_ada_node): Likewise.
1041         (dump_forward_type): Likewise.
1042         * c-common.c (set_underlying_type): Rename
1043         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1044         (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1046 2020-11-06  Jakub Jelinek  <jakub@redhat.com>
1048         * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1050 2020-11-05  Marek Polacek  <polacek@redhat.com>
1052         PR c++/97675
1053         * c.opt (Wexceptions): New option.
1055 2020-11-05  Marek Polacek  <polacek@redhat.com>
1057         PR c++/25814
1058         * c.opt (Wvexing-parse): New option.
1060 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
1062         PR c++/97670
1063         * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1064         underlying decl to clear in the allocate_head bitmap.
1066 2020-11-04  Iain Sandoe  <iain@sandoe.co.uk>
1068         * c-objc.h (objc_non_constant_expr_p): New.
1069         * stub-objc.c (objc_non_constant_expr_p): New.
1071 2020-11-03  Nathan Sidwell  <nathan@acm.org>
1073         * c.opt (MQ,MT): Reword description to be make-agnostic.
1075 2020-11-02  Nathan Sidwell  <nathan@acm.org>
1077         * c-opts.c (c_common_post_options): Move var decl to its
1078         initialization point.
1080 2020-11-01  Iain Sandoe  <iain@sandoe.co.uk>
1082         * c-lex.c (c_lex_with_flags): When combining '@' with a
1083         keyword for Objective-C, combine the location ranges too.
1085 2020-10-30  Qing Zhao  <qing.zhao@oracle.com>
1086             H.J.Lu  <hjl.tools@gmail.com>
1088         * c-attribs.c (c_common_attribute_table): Add new attribute
1089         zero_call_used_regs.
1090         (handle_zero_call_used_regs_attribute): New function.
1092 2020-10-28  Marek Polacek  <polacek@redhat.com>
1094         PR c++/97573
1095         * c-opts.c (c_common_post_options): In C++20, turn on
1096         -Wdeprecated-enum-enum-conversion and
1097         -Wdeprecated-enum-float-conversion.
1098         * c.opt (Wdeprecated-enum-enum-conversion,
1099         Wdeprecated-enum-float-conversion): New options.
1100         (Wenum-conversion): Allow for C++ too.
1102 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
1104         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1105         * c-omp.c: Include bitmap.h.
1106         (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1108 2020-10-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
1110         * c-common.c (__is_nothrow_assignable): New.
1111         (__is_nothrow_constructible): Likewise.
1112         * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1113         (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1115 2020-10-23  Jan Hubicka  <hubicka@ucw.cz>
1117         * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1119 2020-10-23  Marek Polacek  <polacek@redhat.com>
1121         PR c++/91741
1122         * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1123         (c_common_init_ts): Likewise.
1124         * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1125         * c-common.h (maybe_warn_sizeof_array_div): Declare.
1126         * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1127         (maybe_warn_sizeof_array_div): New function.
1128         * c.opt (Wsizeof-array-div): New option.
1130 2020-10-23  Martin Sebor  <msebor@redhat.com>
1132         PR c/97463
1133         * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1135 2020-10-22  Martin Liska  <mliska@suse.cz>
1137         PR c/94722
1138         * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1139         (handle_stack_protect_attribute): Add error message for a
1140         no_stack_protector function.
1142 2020-10-22  Martin Liska  <mliska@suse.cz>
1144         * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1146 2020-10-22  Jan Hubicka  <hubicka@ucw.cz>
1148         * c-gimplify.c: Include tree-nested.h
1149         (c_genericize): Update for new nested function info.
1151 2020-10-14  Martin Sebor  <msebor@redhat.com>
1153         PR c/97413
1154         * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1155         bounds in an extra list.
1157 2020-10-05  Richard Biener  <rguenther@suse.de>
1158             Jakub Jelinek  <jakub@redhat.com>
1160         PR c++/97197
1161         * c-pretty-print.c: Include langhooks.h.
1162         (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1163         expression.
1164         (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1165         unary_expression.
1166         (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1168 2020-09-30  Martin Sebor  <msebor@redhat.com>
1170         PR middle-end/97189
1171         * c-attribs.c (append_access_attr): Use the function declaration
1172         location for a warning about an attribute access argument.
1174 2020-09-29  Marek Polacek  <polacek@redhat.com>
1176         PR c++/94695
1177         * c.opt (Wrange-loop-construct): New option.
1179 2020-09-23  Martin Sebor  <msebor@redhat.com>
1181         PR c/97131
1182         * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1184 2020-09-23  Marek Polacek  <polacek@redhat.com>
1186         PR c/97125
1187         * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1188         after loops and other structured control constructs have been lowered.
1190 2020-09-22  Jakub Jelinek  <jakub@redhat.com>
1192         * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1193         warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1195 2020-09-21  Marek Polacek  <polacek@redhat.com>
1197         * c.opt (Wctad-maybe-unsupported): New option.
1199 2020-09-19  Martin Sebor  <msebor@redhat.com>
1201         PR c/50584
1202         * c-common.h (warn_parm_array_mismatch): Declare new function.
1203         (has_attribute): Move declaration of an existing function.
1204         (build_attr_access_from_parms): Declare new function.
1205         * c-warn.c (parm_array_as_string): Define new function.
1206         (plus_one):  Define new function.
1207         (warn_parm_ptrarray_mismatch): Define new function.
1208         (warn_parm_array_mismatch):  Define new function.
1209         (vla_bound_parm_decl): New function.
1210         * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1211         * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1212         qualifiers here...
1213         (c_pretty_printer::direct_abstract_declarator): ...but instead print
1214         them in brackets here.  Also print [static].  Strip extraneous
1215         expressions from VLA bounds.
1217 2020-09-19  Martin Sebor  <msebor@redhat.com>
1219         PR c/50584
1220         * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1221         (handle_argspec_attribute): New function.
1222         (get_argument, get_argument_type): New functions.
1223         (append_access_attrs): Add overload.  Handle internal attribute
1224         representation in addition to external.
1225         (handle_access_attribute): Handle internal attribute representation
1226         in addition to external.
1227         (build_attr_access_from_parms): New function.
1229 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
1231         * c-gimplify.c (genericize_c_loop): Rewrite to match
1232         c_finish_loop in c-typeck.c.
1234 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
1236         * c-common.c (c_block_may_fallthrough): New, split from
1237         cxx_block_may_fallthrough in the cp front end.
1238         (c_common_init_ts): Move handling of loop and switch-related
1239         statements here from the cp front end.
1240         * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1241         cp front end.
1242         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1243         * c-common.h (c_block_may_fallthru): Declare.
1244         (bc_state_t): Move here from cp front end.
1245         (save_bc_state, restore_bc_state): Declare.
1246         (c_genericize_control_stmt): Declare.
1247         (WHILE_COND, WHILE_BODY): Likewise.
1248         (DO_COND, DO_BODY): Likewise.
1249         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1250         (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1251         (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1252         (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1253         (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1254         * c-dump.c (dump_stmt): Copy from cp front end.
1255         (c_dump_tree): Move code to handle structured loop and switch
1256         tree nodes here from cp front end.
1257         * c-gimplify.c: Adjust includes.
1258         (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1259         cp front end.
1260         (save_bc_state, restore_bc_state): New functions using old code
1261         from cp front end.
1262         (get_bc_label, expr_loc_or_loc): Move from cp front end.
1263         (genericize_c_loop): Move from cp front end.
1264         (genericize_for_stmt, genericize_while_stmt): Likewise.
1265         (genericize_do_stmt, genericize_switch_stmt): Likewise.
1266         (genericize_continue_stmt, genericize_break_stmt): Likewise.
1267         (genericize_omp_for_stmt): Likewise.
1268         (c_genericize_control_stmt): New function using code split from
1269         cp front end.
1270         (c_genericize_control_r): New.
1271         (c_genericize): Call walk_tree with c_genericize_control_r.
1272         * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1273         structured loop and switch tree nodes here from cp front end.
1275 2020-09-17  Patrick Palka  <ppalka@redhat.com>
1277         PR c/80076
1278         * c-indentation.c (should_warn_for_misleading_indentation): Move
1279         declarations of local variables closer to their first use.
1280         Handle virtual token locations by resolving them to their
1281         respective macro expansion points.  If all three tokens are
1282         produced from the same macro expansion, then instead use their
1283         loci within the macro definition.
1285 2020-09-16  Martin Sebor  <msebor@redhat.com>
1287         PR c/78666
1288         PR c/96126
1289         * c-attribs.c (validate_attr_args): New function.
1290         (validate_attr_arg): Same.
1291         (handle_section_attribute): Call it.  Introduce a local variable.
1292         (handle_alloc_size_attribute):  Same.
1293         (handle_alloc_align_attribute): Same.
1295 2020-09-14  Jakub Jelinek  <jakub@redhat.com>
1297         * c-attribs.c (handle_optimize_attribute): Adjust
1298         cl_optimization_save, cl_optimization_restore and
1299         build_optimization_node callers.
1300         * c-pragma.c (handle_pragma_optimize): Adjust
1301         build_optimization_node caller.
1302         (handle_pragma_push_options): Adjust
1303         build_optimization_node and build_target_option_node callers.
1304         (handle_pragma_pop_options, handle_pragma_reset_options):
1305         Adjust cl_optimization_restore callers.
1307 2020-08-28  Martin Sebor  <msebor@redhat.com>
1309         * c.opt (Wstringop-overread): New option.
1311 2020-08-11  Jakub Jelinek  <jakub@redhat.com>
1313         PR c/96545
1314         * c-common.c (get_atomic_generic_size): Require that first argument's
1315         type points to a complete type and use tree_fits_uhwi_p instead of
1316         just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1318 2020-07-31  Martin Sebor  <msebor@redhat.com>
1320         PR c++/96003
1321         * c-common.c (check_function_arguments_recurse): Return early when
1322         no-warning bit is set.
1324 2020-07-31  Richard Biener  <rguenther@suse.de>
1326         PR debug/96383
1327         * c-common.h (c_common_finalize_early_debug): Declare.
1328         * c-common.c: Include debug.h.
1329         (c_common_finalize_early_debug): finalize_early_debug langhook
1330         implementation generating debug for extern declarations.
1332 2020-07-27  Nathan Sidwell  <nathan@acm.org>
1334         * c-common.c (try_to_locate_new_include_insertion_point): Use
1335         strcmp, not pointer equality.
1337 2020-07-25  Martin Sebor  <msebor@redhat.com>
1339         PR c++/96310
1340         * c-common.c (check_nonnull_arg): Print note only when warning was
1341         issued.
1343 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
1345         * c-omp.c (c_finish_omp_critical): Check for no name but
1346         nonzero hint provided.
1348 2020-07-20  Jason Merrill  <jason@redhat.com>
1350         * c-cppbuiltin.c (c_cpp_builtins): Update
1351         __cpp_nontype_template_args for C++20.
1353 2020-07-20  Martin Sebor  <msebor@redhat.com>
1355         PR c/96249
1356         * c.opt: Remove stray text.
1358 2020-07-14  Lewis Hyatt  <lhyatt@gmail.com>
1360         PR other/86904
1361         * c-indentation.c (should_warn_for_misleading_indentation): Get
1362         global tabstop from the new source.
1363         * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1364         is now a common option.
1365         * c.opt: Likewise.
1367 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1369         * c.opt (Wscalar-storage-order): Add explicit variable.
1371 2020-07-07  Nathan Sidwell  <nathan@acm.org>
1373         * c-opts.c (c_common_post_options): Add 'injecting' arg to
1374         cpp_read_main_file.
1375         (c_finish_options): Add linemap_line_start calls for builtin and cmd
1376         maps.  Force token position to line_table's highest line.
1377         * c-ppoutput.c (print_line_1): Refactor, print line zero.
1378         (cb_define): Always increment source line.
1380 2020-07-06  Martin Sebor  <msebor@redhat.com>
1382         PR c++/95984
1383         * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1384         to stub lambda objects with null this pointer.
1385         (check_nonnull_arg): Handle C++ nullptr.
1387 2020-07-02  Jason Merrill  <jason@redhat.com>
1388             Jakub Jelinek  <jakub@redhat.com>
1390         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1392 2020-06-30  Jakub Jelinek  <jakub@redhat.com>
1394         PR c++/95963
1395         * c-common.c (check_function_arguments_recurse): Don't crash on
1396         calls to internal functions.
1398 2020-06-28  Martin Sebor  <msebor@redhat.com>
1400         PR c++/86568
1401         * c-common.c (struct nonnull_arg_ctx): Add members.
1402         (check_function_nonnull): Use nonnull_arg_ctx as argument.  Handle
1403         C++ member functions specially.  Consider the this pointer implicitly
1404         nonnull.
1405         (check_nonnull_arg): Use location of argument when available.
1406         (check_function_arguments): Use nonnull_arg_ctx as argument.
1408 2020-06-27  Jakub Jelinek  <jakub@redhat.com>
1410         PR middle-end/95903
1411         * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1412         !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1413         smaller precision intop operands separately.
1415 2020-06-26  Marek Polacek  <polacek@redhat.com>
1417         * c-opts.c (c_common_init_options): Default to gnu++17.
1419 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
1421         PR c/95378
1422         * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1423         pointer arguments.
1425 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
1427         * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1428         * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1429         idx members.
1430         (c_omp_is_loop_iterator): New function.
1431         (c_omp_check_loop_iv_r): Use it.  Add support for silent scanning
1432         if outer loop iterator is present.  Perform duplicate checking through
1433         hash_set in the function rather than expecting caller to do that.
1434         Pass NULL instead of d->ppset to walk_tree_1.
1435         (c_omp_check_nonrect_loop_iv): New function.
1436         (c_omp_check_loop_iv): Use it.  Fill in new members, allow
1437         non-rectangular loop forms, diagnose multiple associated loops with
1438         the same iterator.  Pass NULL instead of &pset to walk_tree_1.
1439         (c_omp_check_loop_iv_exprs): Likewise.
1441 2020-06-10  Martin Liska  <mliska@suse.cz>
1443         PR tree-optimization/92860
1444         * c-attribs.c (handle_optimize_attribute):
1445         Save global options and compare it after parsing of function
1446         attribute.
1447         * c-pragma.c (opt_stack::saved_global_options): New field.
1448         (handle_pragma_push_options): Save global_options.
1449         (handle_pragma_pop_options): Compare them after pop.
1451 2020-06-09  Jakub Jelinek  <jakub@redhat.com>
1453         PR c/95580
1454         * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1455         case when MEM_REF's first argument has type pointer to incomplete type.
1457 2020-06-05  Jason Merrill  <jason@redhat.com>
1459         * c-pretty-print.c (pp_c_additive_expression): Handle negative
1460         operand to POINTER_PLUS_EXPR.
1462 2020-06-04  Martin Sebor  <msebor@redhat.com>
1464         PR middle-end/10138
1465         PR middle-end/95136
1466         * c-attribs.c (append_access_attrs): Handle attr_access::none.
1467         (handle_access_attribute): Same.
1469 2020-06-03  Mark Wielaard  <mark@klomp.org>
1471         * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1472         New function.
1473         * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1474         New function declaration.
1476 2020-06-03  Mark Wielaard  <mark@klomp.org>
1478         * known-headers.cc (get_string_macro_hint): New function.
1479         (get_stdlib_header_for_name): Use get_string_macro_hint.
1480         (get_c_stdlib_header_for_string_macro_name): New function.
1481         * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1482         New function declaration.
1484 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
1486         * c-common.h (c_omp_predetermined_mapping): Declare.
1487         * c-omp.c (c_omp_predetermined_mapping): New.
1489 2020-05-22  Mark Wielaard  <mark@klomp.org>
1491         * known-headers.cc (get_stdlib_header_for_name): Add a new
1492         stdlib_hint array for stdbool and stdint.
1494 2020-05-22  Mark Wielaard  <mark@klomp.org>
1496         * known-headers.cc (get_stdlib_header_for_name): Return
1497         "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1498         flag_isoc99.
1500 2020-05-20  Nathan Sidwell  <nathan@acm.org>
1502         * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1504         * c-common.c (try_to_locate_new_include_insertion_point): Use
1505         strcmp to compare filenames.
1506         * c-lex.c (init_c_lex): Move declaration to initialization.
1507         * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1508         deferred count loop.
1510 2020-05-15  Jason Merrill  <jason@redhat.com>
1512         * c-opts.c (set_std_cxx20): Set flag_coroutines.
1514 2020-05-13  Jason Merrill  <jason@redhat.com>
1516         * c.opt (std=c++20): Make c++2a the alias.
1517         (std=gnu++20): Likewise.
1518         * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1519         * c-opts.c: Adjust.
1520         * c-cppbuiltin.c: Adjust.
1521         * c-ubsan.c: Adjust.
1522         * c-warn.c: Adjust.
1524 2020-05-12  Eric Botcazou  <ebotcazou@adacore.com>
1526         * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1528 2020-05-08  Nathan Sidwell  <nathan@acm.org>
1530         Reimplement directives only processing.
1531         * c-ppoutput.c (token_streamer): Ne.
1532         (directives_only_cb): New.  Swallow ...
1533         (print_lines_directives_only): ... this.
1534         (scan_translation_unit_directives_only): Reimplment using the
1535         published interface.
1537 2020-05-07  Marek Polacek  <polacek@redhat.com>
1539         * c-format.c (badwords): Add "nonstatic".
1541 202-05-07  Jakub Jelinek  <jakub@redhat.com>
1543         PR c/94968
1544         * c-common.c (speculation_safe_value_resolve_params): Return false if
1545         error_operand_p (val2).
1546         (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1547         Remove extraneous semicolon.
1549 2020-05-06  qing zhao  <qing.zhao@oracle.com>
1551         PR c/94230
1552         * c-indentation.c (get_visual_column): Add a hint to use the new
1553         -flarge-source-files option.
1555 2020-05-05  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
1557         * c-attribs.c (handle_vector_size_attribute): Add attribute
1558         nonnull for argument args in order to silence warning of
1559         uninitialized variable usage.  Since this is local to the
1560         compilation unit and thus cannot be checked at call sides by the
1561         compiler, added an assert statement in order to verify this.
1563 2020-05-01  H.J. Lu  <hongjiu.lu@intel.com>
1565         PR target/93492
1566         * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1567         value to USHRT_MAX (65535).
1569 2020-04-29  Jakub Jelinek  <jakub@redhat.com>
1571         * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1573 2020-04-27  Jakub Jelinek  <jakub@redhat.com>
1575         PR c/94755
1576         * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1577         fncode == BUILT_IN_NONE before initialization of first_param.
1579 2020-04-23  Marek Polacek  <polacek@redhat.com>
1581         PR c++/94733
1582         * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1583         TREE_PURPOSE.
1585 2020-04-14  Patrick Palka  <ppalka@redhat.com>
1587         PR c++/85278
1588         * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1589         ampersand if it's an rvalue reference type.
1591 2020-04-13  Martin Sebor  <msebor@redhat.com>
1593         PR c/92326
1594         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1595         printing array bound for flexible array members.
1597 2020-04-13  Iain Sandoe  <iain@sandoe.co.uk>
1599         * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1600         define, per n4861.
1602 2020-04-02  Richard Biener  <rguenther@suse.de>
1604         PR c/94392
1605         * c-opts.c (c_common_post_options): Enable -ffinite-loops
1606         for -O2 and C++11 or newer.
1608 2020-03-28  Patrick Palka  <ppalka@redhat.com>
1610         * c.opt: Add -fconcepts-diagnostics-depth.
1612 2020-03-27  Martin Sebor  <msebor@redhat.com>
1614         PR c++/94346
1615         * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1616         to decl_attributes.  Make handling of different kinds of entities
1617         more robust.
1619 2020-03-27  Martin Sebor  <msebor@redhat.com>
1621         PR c++/94098
1622         * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1623         here.
1625 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
1627         PR c++/91993
1628         * c-warn.c (warnings_for_convert_and_check): For expr and/or
1629         result being COMPOUND_EXPRs, skip to ultimate rhs.
1631 2020-03-20  Richard Sandiford  <richard.sandiford@arm.com>
1633         PR middle-end/94072
1634         * c-common.c (c_common_type_for_mode): Before using a registered
1635         built-in type, check that the vectorness of the type matches
1636         the vectorness of the mode.
1638 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
1640         * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1641         issue in a diagnostic message.
1643 2020-03-15  Lewis Hyatt  <lhyatt@gmail.com>
1645         * c.opt: Avoid redundancy in the help text.
1647 2020-03-02  Marek Polacek  <polacek@redhat.com>
1649         PR c++/93958 - add missing -std=gnu++20.
1650         * c.opt: Add -std=gnu++20.
1652 2020-03-01  Martin Sebor  <msebor@redhat.com>
1654         PR c++/92721
1655         * c-attribs.c (append_access_attrs): Correctly handle attribute.
1656         (handle_access_attribute): Same.
1658 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
1660         PR c/93858
1661         * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1662         "did you mean" hint in diagnostics.
1664 2020-02-15  Jason Merrill  <jason@redhat.com>
1666         * c.opt: Add -std=c++20.
1668 2020-02-14  Eric Botcazou  <ebotcazou@adacore.com>
1670         * c-ada-spec.c: Include bitmap.h.
1671         (dump_ada_double_name): Rename into...
1672         (dump_anonymous_type_name): ...this.  Always use the TYPE_UID.
1673         (dump_ada_array_type): Adjust to above renaming.  Robustify.
1674         (dump_nested_types_1): New function copied from...  Add dumped_types
1675         parameter and pass it down to dump_nested_type.
1676         (dump_nested_types): ...this.  Remove parent parameter.  Just call
1677         dump_nested_types_1 on an automatic bitmap.
1678         (dump_nested_type): Add dumped_types parameter.
1679         <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1680         Adjust recursive calls and adjust to above renaming.
1681         (dump_ada_declaration): Adjust call to dump_nested_types.
1682         Tidy up and adjust to above renaming.
1683         (dump_ada_specs): Initialize and release bitmap obstack.
1685 2020-02-10  Martin Sebor  <msebor@redhat.com>
1687         PR c/93640
1688         * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1690 2020-02-10  Jakub Jelinek  <jakub@redhat.com>
1692         PR other/93641
1693         * c-format.c (check_plain): Fix up last argument of strncasecmp.
1694         Remove useless extra test.
1696 2020-02-03  Julian Brown  <julian@codesourcery.com>
1697             Tobias Burnus  <tobias@codesourcery.com>
1699         * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1701 2020-01-29  Jason Merrill  <jason@redhat.com>
1703         PR c++/89357
1704         * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1706 2020-01-23  Jason Merrill  <jason@redhat.com>
1708         * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1710 2020-01-23  Martin Sebor  <msebor@redhat.com>
1712         PR c/84919
1713         * c-common.c (check_function_arguments): Avoid overlap checking
1714         of sprintf functions.
1716 2020-01-22  Jason Merrill  <jason@redhat.com>
1718         PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1719         PR c++/40752
1720         * c-warn.c (conversion_warning): Check operands only after checking
1721         the whole expression.  Don't check second operand of + for sign.
1723 2020-01-21  Jason Merrill  <jason@redhat.com>
1724             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1726         PR c++/40752 - useless -Wconversion with short +=.
1727         * c.opt (-Warith-conversion): New.
1728         * c-warn.c (conversion_warning): Recurse for operands of
1729         operators.  Only warn about the whole expression with
1730         -Warith-conversion.
1732 2020-01-21  Jason Merrill  <jason@redhat.com>
1734         * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1735         * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1737 2020-01-20  Nathan Sidwell  <nathan@acm.org>
1739         PR preprocessor/80005
1740         * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1742 2020-01-18  Iain Sandoe  <iain@sandoe.co.uk>
1744         * c-common.c (co_await, co_yield, co_return): New.
1745         * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1746         RID_CO_RETURN): New enumeration values.
1747         (D_CXX_COROUTINES): Bit to identify coroutines are active.
1748         (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1749         * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1750         * c.opt (fcoroutines): New command-line switch.
1752 2020-01-10  David Malcolm  <dmalcolm@redhat.com>
1754         * c-format.c (local_event_ptr_node): New.
1755         (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1756         (init_dynamic_diag_info): Initialize local_event_ptr_node.
1757         * c-format.h (T_EVENT_PTR): New define.
1759 2020-01-10  Martin Sebor  <msebor@redhat.com>
1761         PR c/93132
1762         * c-attribs.c (append_access_attrs): Validate against the translated
1763         access string rather than the human-readable representation.
1765 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
1767         Update copyright years.
1769 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
1771         * c-ada-spec.h (decl_sloc): Delete.
1772         * c-ada-spec.c (decl_sloc): Make static.
1774 2019-12-19  Julian Brown  <julian@codesourcery.com>
1776         * c-common.h (c_omp_map_clause_name): Add prototype.
1777         * c-omp.c (c_omp_map_clause_name): New function.
1778         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1779         PRAGMA_OACC_CLAUSE_DETACH.
1781 2019-12-19  Julian Brown  <julian@codesourcery.com>
1782             Maciej W. Rozycki  <macro@codesourcery.com>
1783             Tobias Burnus  <tobias@codesourcery.com>
1784             Thomas Schwinge  <thomas@codesourcery.com>
1786         * c-pragma.h (pragma_omp_clause): Add
1787         PRAGMA_OACC_CLAUSE_NO_CREATE.
1789 2019-12-17  Martin Sebor  <msebor@redhat.com>
1791         PR c++/61339
1792         * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1794 2019-12-11  David Malcolm  <dmalcolm@redhat.com>
1796         * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1797         implementation.
1798         * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1800 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
1802         * c-format.c (range_label_for_format_type_mismatch::get_text):
1803         Replace label_text ctor called with true with label_text::take.
1805 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
1807         * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1808         initial newline from expected outputs.
1809         * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1810         call to diagnostic_show_locus.
1812 2019-12-06  Jakub Jelinek  <jakub@redhat.com>
1814         * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1815         now.
1817 2019-12-05  Marek Polacek  <polacek@redhat.com>
1818             Jakub Jelinek  <jakub@redhat.com>
1820         PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1821         * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1823 2019-12-05  Marek Polacek  <polacek@redhat.com>
1825         PR c++/92271 - make __is_same alias for __is_same_as.
1826         * c-common.c: Add __is_same, an alias for __is_same_as.
1828 2019-12-03  Marek Polacek  <polacek@redhat.com>
1830         PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1831         * c-cppbuiltin.c (c_cpp_builtins): Predefine
1832         __cpp_aggregate_paren_init=201902 for -std=c++2a.
1834 2019-11-30  Jan Hubicka  <hubicka@ucw.cz>
1836         * c-attribs.c (handle_symver_attribute): New function
1837         (c_common_attributes): Add symver.
1839 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
1841         * c-common.c (pointer_int_sum): Use verify_type_context to check
1842         whether the target allows pointer arithmetic for the types involved.
1843         (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1844         to check whether the target allows sizeof and alignof operations
1845         for the types involved.
1847 2019-11-27  Jason Merrill  <jason@redhat.com>
1849         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1851 2019-11-26  Jakub Jelinek  <jakub@redhat.com>
1853         PR c++/61414
1854         * c-attribs.c (handle_mode_attribute): Add mode attribute to
1855         ENUMERAL_TYPEs.
1857 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
1859         PR c/91985
1860         * c-common.c (c_common_type_for_mode): Handle decimal
1861         floating-point types being NULL_TREE.
1862         * c-format.c (get_format_for_type_1): Handle specified types being
1863         NULL_TREE.
1864         * c-lex.c (interpret_float): Give an error for decimal
1865         floating-point constants when decimal floating-point not
1866         supported.
1868 2019-11-23  Jakub Jelinek  <jakub@redhat.com>
1870         PR middle-end/83859
1871         * c-attribs.c (append_access_attrs): Avoid buffer overflow.  Avoid
1872         memory leak.  Use XNEWVEC macro.  Use auto_diagnostic_group to
1873         group warning with inform together.
1874         (handle_access_attribute): Formatting fix.
1876 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
1878         PR c/90677
1879         * c-common.h (identifier_global_tag): Declare.
1880         * c-format.c (get_pointer_to_named_type): Renamed to ...
1881         (get_named_type): ... this.  Use identifier_global_tag instead of
1882         identifier_global_value, handle the return value being a TYPE_P.
1883         (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1884         to call get_named_type instead.  Formatting fixes.
1886         Implement P1902R1, Missing feature-test macros 2017-2019.
1887         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1888         and __cpp_generic_lambdas for -std=c++2a.  Define
1889         __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1890         __cpp_consteval for -std=c++2a.  Remove a FIXME comment about
1891         __cpp_concepts for -std=c++2a.
1893 2019-11-22  Martin Sebor  <msebor@redhat.com>
1895         PR middle-end/83859
1896         * c-attribs.c (handle_access_attribute): New function.
1897         (c_common_attribute_table): Add new attribute.
1898         (get_argument_type): New function.
1899         (append_access_attrs): New function.
1900         (get_nonnull_operand): Rename...
1901         (get_attribute_operand): ...to this.
1902         * c-common.c (get_nonnull_operand): Rename...
1903         (get_attribute_operand): ...to this.
1905 2019-11-21  Joseph Myers  <joseph@codesourcery.com>
1907         * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1908         of warning.
1910 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
1912         * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1913         warning for standard attributes mixed with fallthrough attributes.
1915 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1917         * c-attribs.c (handle_fallthrough_attribute): Remove static.
1918         * c-common.h (handle_fallthrough_attribute): Declare.
1920 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
1922         * c-attribs.c (handle_deprecated_attribute): Remove static.
1923         * c-common.h (handle_deprecated_attribute): Declare.
1925 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
1927         * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1928         char for C.
1930 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
1932         * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1933         valid vendors.
1935         * c-omp.c (c_omp_check_context_selector): Handle name lists
1936         containing string literals.  Don't diagnose atomic_default_mem_order
1937         with multiple props.
1939 2019-11-13  Joseph Myers  <joseph@codesourcery.com>
1941         * c-cppbuiltin.c (builtin_define_float_constants): Also define
1942         NORM_MAX constants.  Update call to get_max_float.
1943         (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1944         constants.
1946 2019-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1948         * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1949         (dump_forward_type): Do not generate a declaration for function types.
1950         (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1951         of the component type if it is declared in another file.
1953 2019-11-12  Martin Liska  <mliska@suse.cz>
1955         * c-opts.c (c_common_post_options):
1956         Use SET_OPTION_IF_UNSET.
1958 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
1959             Frederik Harwath  <frederik@codesourcery.com>
1961         gcc/c-family/
1962         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1963         constant.
1964         * c-pragma.c (oacc_pragmas): Add "serial" entry.
1966 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
1968         * c-common.h (gnu_vector_type_p): New function.
1969         * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1970         vectors to satisfy gnu_vector_type_p.
1971         (c_build_vec_convert): Likewise __builtin_convertvector.
1972         (convert_vector_to_array_for_subscript): Likewise when applying
1973         implicit vector to array conversion.
1974         (scalar_to_vector): Likewise when converting vector-scalar
1975         operations to vector-vector operations.
1977 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
1979         * c.opt (Wold-style-definition): Initialize to -1.
1980         * c-opts.c (c_common_post_options): Set warn_old_style_definition
1981         to flag_isoc2x if not set explicitly.
1983 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
1985         * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1987 2019-11-05  Jason Merrill  <jason@redhat.com>
1989         * c-opts.c (c_common_post_options): -fconcepts-ts implies
1990         -fconcepts.
1992 2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>
1994         * c-opts.c (c_common_post_options): Update
1995         latest_abi_version.
1997 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
1999         * c-common.h (c_omp_get_context_selector): Remove.
2000         * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2001         and renamed to omp_get_context_selector.
2003         * c-omp.c (c_omp_mark_declare_variant): Use
2004         omp_context_selector_set_compare.
2006         PR c++/88335 - Implement P1073R3: Immediate functions
2007         * c-common.h (enum rid): Add RID_CONSTEVAL.
2008         * c-common.c (c_common_reswords): Add consteval.
2010 2019-11-01  Martin Sebor  <msebor@redhat.com>
2012         PR middle-end/91679
2013         PR middle-end/91647
2014         PR middle-end/91463
2015         PR middle-end/92312
2016         * c-pretty-print.c (direct_abstract_declarator): Print
2017         bound in zero-length arrays.
2018         * c.opt (-Wzero-length-bounds): New option.
2020 2019-10-30  Nathan Sidwell  <nathan@acm.org>
2022         * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2023         macros.
2025 2019-10-28  Martin Sebor  <msebor@redhat.com>
2027         PR c/66970
2028         * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2029         even when only preprocessing.
2030         * c-common.h (names_builtin_p): Declare new function.
2031         * c-lex.c (init_c_lex): Set has_builtin.
2032         (c_common_has_builtin): Define a new function.
2033         * c-ppoutput.c (init_pp_output): Set has_builtin.
2035 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
2037         * c-common.h (c_omp_context_selector_matches): Remove.
2038         * c-omp.c (c_omp_context_selector_matches): Remove.
2039         * c-attribs.c (c_common_attribute_table): Add
2040         "omp declare target {host,nohost,block}" attributes.
2042 2019-10-17  JeanHeyd Meneide  <phdofthehouse@gmail.com>
2044         * c-lex.c (c_common_has_attribute): Update nodiscard value.
2046 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
2048         * c-common.h (user_facing_original_type_p): Declare.
2049         * c-common.c: Include c-spellcheck.h.
2050         (user_facing_original_type_p): New function.
2052 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
2054         * c-common.h (c_omp_mark_declare_variant,
2055         c_omp_context_selector_matches): Declare.
2056         * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2057         and hsa-common.h.
2058         (c_omp_get_context_selector): Support second argument NULL.
2059         (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2060         functions.
2061         * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2062         attribute, add "omp declare variant base" and
2063         "omp declare variant variant" attributes.
2065 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
2067         * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2068         CppReason(CPP_W_C11_C2X_COMPAT).
2070 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
2072         * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2073         _Decimal64 and _Decimal128.
2075 2019-10-10  Joseph Myers  <joseph@codesourcery.com>
2077         * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2078         types if DFP not supported.
2080 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
2082         * c-common.h (c_omp_check_context_selector,
2083         c_omp_get_context_selector): Declare.
2084         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2085         in diagnostic message.
2086         (c_omp_check_context_selector, c_omp_get_context_selector): New
2087         functions.
2088         * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2089         attribute.
2090         (handle_omp_declare_variant_attribute): New function.
2092 2019-10-09  Martin Sebor  <msebor@redhat.com>
2094         PR tree-optimization/90879
2095         * c.opt (-Wstring-compare): New option.
2097 2019-10-08  Andrew Sutton  <asutton@lock3software.com>
2098             Jason Merrill  <jason@redhat.com>
2100         Update the concepts implementation to conform to the C++20
2101         specification, improve compile times, and generally clean up
2102         the implementation.
2104         * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2105         concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2106         * c.opt: Add -Wconcepts-ts.
2107         * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2108         with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2109         (set_std_cxx2a): Enable concepts by default.
2111 2019-10-08  Joseph Myers  <joseph@codesourcery.com>
2113         * c-opts.c (c_common_post_options): Set
2114         -fno-fp-int-builtin-inexact for C2X.
2116 2019-10-05  Jakub Jelinek  <jakub@redhat.com>
2118         PR c++/91369 - Implement P0784R7: constexpr new
2119         * c-cppbuiltin.c (c_cpp_builtins): Predefine
2120         __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2122 2019-10-04  Joseph Myers  <joseph@codesourcery.com>
2124         PR c/82752
2125         * c-format.c (C_STD_VER): Handle C2x.
2126         (C_STD_NAME): Likewise.
2127         (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2128         (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2129         modifier allowed and 'p' flag.
2130         * c-format.h (enum format_std_version): Add STD_C2X.
2131         (struct format_char_info): Mention 'p' in comment on flags2.
2133 2019-10-01  David Malcolm  <dmalcolm@redhat.com>
2135         * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2136         calling diagnostic_show_locus, rather than destroying it afterwards.
2138 2019-10-01  Jakub Jelinek  <jakub@redhat.com>
2140         PR c++/91925
2141         * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2142         with NULL DECL_FIELD_OFFSET.
2144 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
2146         * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2147         has a type name, use it in preference to the __vector syntax.
2149 2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>
2151         * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2152         two spaces between a comma and "...".
2154 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
2156         PR c++/88203
2157         * c-common.h (c_omp_predefined_variable): Declare.
2158         * c-omp.c (c_omp_predefined_variable): New function.
2159         (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2160         for predefined variables.
2162 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
2164         * c-common.h (build_function_call_vec): Take the original
2165         function decl as an optional final parameter.
2166         (check_builtin_function_arguments): Take the original function decl.
2167         * c-common.c (check_builtin_function_arguments): Likewise.
2168         Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2169         Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2171 2019-09-15  Jason Merrill  <jason@redhat.com>
2173         * c-warn.c (warn_logical_operator): Strip location wrappers.  Don't
2174         fold_for_warn in "|| mask" warning.
2176 2019-09-10  Martin Liska  <mliska@suse.cz>
2178         * c.opt: Use newly added WarnRemoved.
2180 2019-09-09  Martin Liska  <mliska@suse.cz>
2182         * c.opt: Update comment of removed
2183         options that are preserved only for backward
2184         compatibility.
2186 2019-09-06  Martin Liska  <mliska@suse.cz>
2188         PR c++/91125
2189         * c-common.c: Remove definition of flag_use_repository.
2190         * c-common.h: Likewise.
2191         * c-opts.c (c_common_handle_option):
2192         Do not handle OPT_frepo option.
2193         * c.opt: Mark the option with Deprecated.
2195 2019-09-04  Marek Polacek  <polacek@redhat.com>
2197         * c.opt (fdeduce-init-list): Ignored.
2199 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2201         PR c/78736
2202         * c.opt (Wenum-conversion): New option.
2204 2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2206         * c-attribs.c (handle_section_attribute): Call the
2207         handle_generic_attribute target hook after performing target
2208         independent processing.
2209         (handle_noinit_attribute): Likewise.
2211 2019-09-03  Ian Lance Taylor  <iant@golang.org>
2213         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2214         when using -fgo-dump-spec.
2216 2019-09-02  Martin Liska  <mliska@suse.cz>
2218         PR c++/91155
2219         * c-common.c (fname_as_string): Use cxx_printable_name for
2220         __PRETTY_FUNCTION__ same as was used before r265711.
2222 2019-08-28  Marek Polacek  <polacek@redhat.com>
2224         Implement P1152R4: Deprecating some uses of volatile.
2225         PR c++/91361
2226         * c-opts.c (c_common_post_options): Enable -Wvolatile by
2227         default for C++2a, unless -Wno-deprecated.
2228         * c.opt (Wvolatile): New warning.
2230 2019-08-28  Marek Polacek  <polacek@redhat.com>
2232         PR c++/91360 - Implement C++20 P1143R2: constinit.
2233         * c-common.c (c_common_reswords): Add constinit and __constinit.
2234         (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2235         * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2236         RID_LAST_CXX20.
2237         (D_CXX20): Define.
2238         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2239         * c-format.c (cxx_keywords): Add "constinit".
2240         * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2242 2019-08-27  Jakub Jelinek  <jakub@redhat.com>
2244         PR c++/91415
2245         * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2246         COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2247         like COMPOUND_EXPR rather than normal expression.
2249 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
2251         PR pch/61250
2252         * c-lex.c (c_lex_with_flags):  Don't call
2253         c_common_no_more_pch () from here.
2255 2019-08-23  Jakub Jelinek  <jakub@redhat.com>
2257         PR middle-end/91283
2258         * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2259         instead of flag_excess_precision_cmdline.
2260         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2261         * c-opts.c (c_common_post_options): Likewise.
2263 2019-08-22  Martin Sebor  <msebor@redhat.com>
2265         PR middle-end/91490
2266         * c-common.c (braced_list_to_string): Add argument and overload.
2267         Handle flexible length arrays and unions.
2269 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
2271         * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2272         function declarations where arguments are missing.  Rename variables.
2274 2019-08-15  Richard Biener  <rguenther@suse.de>
2276         * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2277         enabled, define __SIZETYPE__.
2279 2019-08-14  Christophe Lyon  <christophe.lyon@linaro.org>
2281         * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2282         exclusion with "section" attribute.
2283         (attr_noinit_exclusions): New table.
2284         (handle_noinit_attribute): New function.
2286 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
2288         PR middle-end/91421
2289         * c-common.c (resolve_overloaded_builtin): Use
2290         copy_decl_built_in_function.
2292 2019-08-13  Martin Sebor  <msebor@redhat.com>
2294         PR c/80619
2295         * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2296         (asm_fprintf_length_spec): Same.
2297         * c-format.h (format_lengths): Add FMT_LEN_w.
2299 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
2301         * c-pragma.h (enum pragma_omp_clause): Add
2302         PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2304 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
2306         * c-pragma.h (enum pragma_omp_clause): Add
2307         PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.  Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2308         equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2309         enumeration value.
2311 2019-08-05  Marek Polacek  <polacek@redhat.com>
2313         PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2314         * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2315         default for C++2a, unless -Wno-deprecated.
2316         * c.opt (Wcomma-subscript): New warning.
2318 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
2320         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2321         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2322         * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2323         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2324         * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2325         constructs with the loop construct.
2327 2019-07-13  Jakub Jelinek  <jakub@redhat.com>
2329         PR c/91149
2330         * c-omp.c (c_omp_split_clauses): Fix a pasto in
2331         OMP_CLAUSE_REDUCTION_TASK handling.
2333 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
2335         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2336         * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2338 2019-07-09  Martin Sebor  <msebor@redhat.com>
2340         PR c++/61339
2341         * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2342         and others to class.
2343         * c-pretty-print.h: Same.
2345 2019-07-09  Martin Sebor  <msebor@redhat.com>
2347         PR c++/61339
2348         * c-format.c (check_argument_type): Change class-key from class to
2349         struct and vice versa to match convention and avoid -Wclass-is-pod
2350         and -Wstruct-no-pod.
2351         * c-pretty-print.h: Same.
2353 2019-07-03  Martin Liska  <mliska@suse.cz>
2355         * c-common.c (try_to_locate_new_include_insertion_point): Remove
2356         dead assignemts.
2358 2019-07-03  Jakub Jelinek  <jakub@redhat.com>
2360         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2361         clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2362         with OMP_PARALLEL.
2364 2019-07-02  qing zhao  <qing.zhao@oracle.com>
2366         PR preprocessor/90581
2367         * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2368         * c.opt: Add new option -fmax-include-depth.
2370 2019-06-26  Jason Merrill  <jason@redhat.com>
2372         PR c++/55442 - memory-hog with highly recursive constexpr.
2373         * c.opt (fconstexpr-loop-limit): New.
2375 2019-06-25  Jakub Jelinek  <jakub@redhat.com>
2377         PR sanitizer/90954
2378         * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2379         to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2381 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2383         * c-common.c (c_common_nodes_and_builtins): Define
2384         alternate "__intN__" name for "__intN" types.
2386 2019-06-24  Jan Hubicka  <jh@suse.cz>
2388         * c-common.c (braced_lists_to_strings): Check that
2389         type is array or integer prior checking string flag.
2391 2019-06-21  Matthew Beliveau  <mbelivea@redhat.com>
2393         PR c++/90875 - added -Wswitch-outside-range option
2394         * c.opt (Wswitch-outside-range): Added new option.
2395         * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2397 2019-06-21  Marek Polacek  <polacek@redhat.com>
2399         PR c++/90953 - ICE with -Wmissing-format-attribute.
2400         * c-common.c (check_function_arguments_recurse): Use
2401         get_attribute_name.
2402         (check_missing_format_attribute): Likewise.
2404 2019-06-19  Marek Polacek  <polacek@redhat.com>
2406         PR c++/60364 - noreturn after first decl not diagnosed.
2407         * c-attribs.c (handle_noreturn_attribute): No longer static.
2408         * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2409         Declare.
2410         * c-format.c (check_function_format): Use get_attribute_name.
2412 2019-06-19  Martin Sebor  <msebor@redhat.com>
2414         PR translation/90156
2415         * c-format.c (function_format_info::format_type): Adjust type.
2416         (function_format_info::is_raw): New member.
2417         (decode_format_type): Adjust signature.  Handle "raw" diag attributes.
2418         (decode_format_attr): Adjust call to decode_format_type.
2419         Avoid a redundant call to convert_format_name_to_system_name.
2420         Avoid abbreviating the word "arguments" in a diagnostic.
2421         (format_warning_substr): New function.
2422         (avoid_dollar_number): Quote dollar sign in a diagnostic.
2423         (finish_dollar_format_checking): Same.
2424         (check_format_info): Same.
2425         (struct baltoks_t): New.
2426         (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2427         (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2428         functions.
2429         (check_format_info_main): Call check_plain.  Use baltoks_t.  Call
2430         maybe_diag_unbalanced_tokens.
2431         (handle_format_attribute): Spell out the word "arguments" in
2432         a diagnostic.
2434 2019-06-11  Matthew Beliveau  <mbelivea@redhat.com>
2436         PR c++/90449 - add -Winaccessible-base option.
2437         * c.opt (Winaccessible-base): New option.
2439 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
2441         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2442         * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2443         * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2444         combined/composite constructs where it is not allowed.  Copy over
2445         OMP_CLAUSE_REDUCTION_INSCAN.
2447 2019-06-05  Martin Sebor  <msebor@redhat.com>
2449         * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2450         (handle_alias_ifunc_attribute): Same.
2451         (handle_copy_attribute): Same.
2452         (handle_weakref_attribute): Same.
2453         (handle_nonnull_attribute): Same.
2454         * c-warn.c (warn_for_sign_compare): Same.
2455         (warn_for_restrict): Same.
2456         * c.opt: Same.
2458 2019-06-05  Martin Sebor  <msebor@redhat.com>
2460         * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2461         * c.opt (-Wformat-diag): Remove a spurious period.
2463 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
2465         PR c/90628
2466         * c-common.c (check_builtin_function_arguments)
2467         <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2468         as last argument.
2470 2019-05-23  Eric Botcazou  <ebotcazou@adacore.com>
2472         * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2474 2019-05-22  Martin Liska  <mliska@suse.cz>
2476         PR lto/90500
2477         * c-attribs.c (handle_copy_attribute): Do not copy
2478         target_clones attribute.
2480 2019-05-21  Eric Botcazou  <ebotcazou@adacore.com>
2482         * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2483         * c-ada-spec.c (print_assignment_operator): New function.
2484         (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2485         assignment operators declared as methods and filter out the others.
2487 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
2489         PR c/89433
2490         * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2491         "omp declare target".
2493 2019-05-16  Martin Sebor  <msebor@redhat.com>
2495         * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2496         keywords, operators, and types in diagnostics.
2497         (handle_scalar_storage_order_attribute): Same.
2498         (handle_mode_attribute): Same.
2499         (handle_visibility_attribute): Same.
2500         (handle_assume_aligned_attribute): Same.
2501         (handle_no_split_stack_attribute): Same.
2502         * c-common.c (shorten_compare): Same.
2503         (c_common_truthvalue_conversion): Same.
2504         (cb_get_source_date_epoch): Same.
2505         * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2506         in diagnostics.
2507         (interpret_float): Same.
2508         * c-omp.c (c_finish_omp_for): Same.
2509         * c-opts.c (c_common_post_options): Same.
2510         * c-pch.c (c_common_pch_pragma): Same.
2511         * c-pragma.c (pop_alignment): Same.
2512         (handle_pragma_pack): Same.
2513         (apply_pragma_weak): Same.
2514         (handle_pragma_weak): Same.
2515         (handle_pragma_scalar_storage_order): Same.
2516         (handle_pragma_redefine_extname): Same.
2517         (add_to_renaming_pragma_list): Same.
2518         (maybe_apply_renaming_pragma): Same.
2519         (push_visibility): Same.
2520         (handle_pragma_visibility): Same.
2521         (handle_pragma_optimize): Same.
2522         (handle_pragma_message): Same.
2523         * c-warn.c (warn_for_omitted_condop): Same.
2524         (lvalue_error): Same.
2526 2019-05-15  Richard Biener  <rguenther@suse.de>
2528         PR c/90474
2529         * c-common.c (c_common_mark_addressable_vec): Also mark
2530         a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2531         c_mark_addressable.
2533 2019-05-06  Nathan Sidwell  <nathan@acm.org>
2535         * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2537 2019-04-30  Nathan Sidwell  <nathan@acm.org>
2539         * c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.
2541 2019-04-30  Martin Liska  <mliska@suse.cz>
2543         * c-pragma.c (handle_pragma_diagnostic): Provide hints
2544         for unknown options.
2546 2019-04-26  Richard Sandiford  <richard.sandiford@arm.com>
2548         * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2549         the pointer target rather than the pointer itself.
2551 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
2553         PR c/89888
2554         * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2555         arguments.
2556         (c_do_switch_warnings): Remove outside_range_p argument.
2557         * c-common.c (check_case_bounds): Removed.
2558         (c_add_case_label): Remove orig_type and outside_range_p arguments.
2559         Don't call check_case_bounds.  Fold low_value as well as high_value.
2560         * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2561         Check for case labels outside of range of original type here and
2562         adjust them.
2564 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
2566         PR translation/90041
2567         * c.opt (-fhandle-exceptions): Use %< and %> around option names
2568         in the Warn diagnostics.
2570         PR c/89946
2571         * c-attribs.c (handle_patchable_function_entry_attribute): Add
2572         function comment.  Warn if arguments of the attribute are not positive
2573         integer constants.
2575 2019-04-09  Eric Botcazou  <ebotcazou@adacore.com>
2577         * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2578         (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2580 2019-04-07  Eric Botcazou  <ebotcazou@adacore.com>
2582         * c-ada-spec.c (is_float128): New predicate extracted from...
2583         (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2584         <REAL_TYPE>: ...here.  Call it.
2586 2019-04-05  David Malcolm  <dmalcolm@redhat.com>
2588         PR c/89985
2589         * c-warn.c (check_address_or_pointer_of_packed_member): Add
2590         auto_diagnostic_group.  Guard inform calls by result of
2591         warning_at call.
2593 2019-04-05  Marek Polacek  <polacek@redhat.com>
2595         PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
2596         * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2597         of RHS.
2599 2019-04-03  Jason Merrill  <jason@redhat.com>
2601         PR c++/86586 - -fcompare-debug=-Wsign-compare.
2602         * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2604 2019-04-01  Martin Sebor  <msebor@redhat.com>
2606         PR c/89685
2607         * c-attribs.c (handle_copy_attribute): Handle references and
2608         non-constant expressions.
2610 2019-03-22  Jakub Jelinek  <jakub@redhat.com>
2612         PR c++/87481
2613         * c.opt (-fconstexpr-ops-limit=): New option.
2615 2019-03-21  Jakub Jelinek  <jakub@redhat.com>
2617         * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2618         template param.
2620 2019-03-19  Martin Sebor  <msebor@redhat.com>
2622         PR tree-optimization/89688
2623         * c-common.c (braced_list_to_string): Make static.
2624         (braced_lists_to_strings): Define new function.
2625         * c-common.h (braced_list_to_string): Remove.
2626         (braced_lists_to_strings): Declare.
2628 2019-03-12  Martin Liska  <mliska@suse.cz>
2630         * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2632 2019-03-11  Martin Liska  <mliska@suse.cz>
2634         * c-opts.c (c_common_post_options): Wrap apostrophes
2635         in gcc internal format with %'.
2637 2019-03-11  Martin Liska  <mliska@suse.cz>
2639         * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2640         in a string format message and fix GNU coding style.
2641         * c-common.c (vector_types_convertible_p): Likewise.
2642         (c_build_vec_perm_expr): Likewise.
2643         * c-indentation.c (get_visual_column): Likewise.
2644         * c-opts.c (c_common_handle_option): Likewise.
2645         (c_common_post_options): Likewise.
2646         (sanitize_cpp_opts): Likewise.
2647         * c-pch.c (c_common_pch_pragma): Likewise.
2648         * c-pragma.c (handle_pragma_pack): Likewise.
2650 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
2652         PR tree-optimization/89550
2653         * c-common.c (c_common_truthvalue_conversion): Only set
2654         TREE_NO_WARNING if warning_at returned true.
2655         * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2657 2019-02-25  Sandra Loosemore  <sandra@codesourcery.com>
2658             Martin Sebor  <msebor@gmail.com>
2660         * c.opt (Wmissing-attributes): Clean up doc string.
2662 2019-02-25  Jakub Jelinek  <jakub@redhat.com>
2664         PR c/89495
2665         * c-format.c (maybe_read_dollar_number): Compute nargnum in
2666         HOST_WIDE_INT type to avoid overflows and change overflow_flag
2667         checking.
2669 2019-02-22  Richard Biener  <rguenther@suse.de>
2671         * c-pch.c (no_checksum): Remove.
2672         (pch_init): Remove assertion that executable_checksum is not
2673         all zero.
2674         (c_common_valid_pch): Likewise.
2676 2019-02-18  Martin Sebor  <msebor@redhat.com>
2678         PR middle-end/89294
2679         * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2681 2019-02-16  David Malcolm  <dmalcolm@redhat.com>
2683         PR c++/88680
2684         * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2685         implementing -Wtype-limits.
2687 2019-02-11  Martin Sebor  <msebor@redhat.com>
2689         PR c++/87996
2690         * c-common.c (invalid_array_size_error): New function.
2691         (valid_array_size_p): Call it.  Handle size as well as type.
2692         * c-common.h (valid_constant_size_p): New function.
2693         (enum cst_size_error): New type.
2695 2019-01-31  David Malcolm  <dmalcolm@redhat.com>
2697         PR c/89122
2698         * known-headers.cc (get_stdlib_header_for_name): Add
2699         {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2701 2019-01-31  Jakub Jelinek  <jakub@redhat.com>
2703         PR libstdc++/88170
2704         * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2705         a C cast in pp_c_flag_gnu_v3 mode.
2707 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
2709         PR c/86125
2710         * c-common.c (c_common_nodes_and_builtins): Build type variants for
2711         builtin_structptr_types types even for C.
2713 2019-01-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2715         * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2716         when rhs is of array type correctly.  Fix handling of nested structures.
2717         Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2718         (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2719         type casts within nested compound expressions.
2721 2019-01-22  Jakub Jelinek  <jakub@redhat.com>
2723         PR middle-end/88968
2724         * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2725         variable after using BIT_FIELD_REF.
2727 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
2729         PR c/51628
2730         PR c/88664
2731         * c-common.h (warn_for_address_or_pointer_of_packed_member):
2732         Remove the boolean argument.
2733         * c-warn.c (check_address_of_packed_member): Renamed to ...
2734         (check_address_or_pointer_of_packed_member): This.  Also
2735         warn pointer conversion.
2736         (check_and_warn_address_of_packed_member): Renamed to ...
2737         (check_and_warn_address_or_pointer_of_packed_member): This.
2738         Also warn pointer conversion.
2739         (warn_for_address_or_pointer_of_packed_member): Remove the
2740         boolean argument.  Don't check pointer conversion here.
2742 2019-01-15  Richard Sandiford  <richard.sandiford@arm.com>
2744         PR inline-asm/52813
2745         * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2747 2019-01-14  Jakub Jelinek  <jakub@redhat.com>
2749         * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2750         and __cpp_nontype_template_parameter_auto.  Add a comment that
2751         __cpp_template_auto is deprecated.
2753 2019-01-14  Tom Honermann  <tom@honermann.net>
2755         Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2756         * c-common.c (c_common_reswords): Add char8_t.
2757         (fix_string_type): Use char8_t for the type of u8 string literals.
2758         (c_common_get_alias_set): char8_t doesn't alias.
2759         (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2760         C++.
2761         (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2762         (keyword_begins_type_specifier): Add RID_CHAR8.
2763         * c-common.h (rid): Add RID_CHAR8.
2764         (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2765         Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2766         Define char8_type_node and char8_array_type_node.
2767         * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2768         __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2769         (c_cpp_builtins): Predefine __cpp_char8_t.
2770         * c-lex.c (lex_string): Use char8_array_type_node as the type of
2771         CPP_UTF8STRING.
2772         (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2773         * c-opts.c: If not otherwise specified, enable -fchar8_t when
2774         targeting C++2a.
2775         * c.opt: Add the -fchar8_t command line option.
2777 2019-01-14  Martin Sebor  <msebor@redhat.com>
2779         PR target/88638
2780         * c-attribs.c (positional_argument): Call valid_format_string_type_p
2781         and issue errors if it fails.
2782         * c-common.h (valid_format_string_type_p): Declare.
2783         * c-format.c (valid_stringptr_type_p): Rename...
2784         (valid_format_string_type_p): ...to this and make extern.
2785         (handle_format_arg_attribute): Adjust to new name.
2786         (check_format_string): Same.
2788 2019-01-13  H.J. Lu  <hongjiu.lu@intel.com>
2790         * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2791         Replace "may may" with "may" in warning message.
2793 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
2795         PR c++/85052
2796         * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2797         (c_build_vec_convert): Declare.
2798         * c-common.c (c_build_vec_convert): New function.
2800 2019-01-04  Martin Sebor  <msebor@redhat.com>
2802         PR c/88546
2803         * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2804         Handle C++ empty throw specification and C11 _Noreturn.
2805         (has_attribute): Also handle C11 _Noreturn.
2807 2019-01-04  Martin Sebor  <msebor@redhat.com>
2809         PR c/88363
2810         * c-attribs.c (positional_argument): Also accept enumerated types.
2812 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
2814         Update copyright years.
2816 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
2818         PR c/51628
2819         * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2820         * c-warn.c (check_alignment_of_packed_member): New function.
2821         (check_address_of_packed_member): Likewise.
2822         (check_and_warn_address_of_packed_member): Likewise.
2823         (warn_for_address_or_pointer_of_packed_member): Likewise.
2824         * c.opt: Add -Wno-address-of-packed-member.
2826 2018-12-20  David Malcolm  <dmalcolm@redhat.com>
2828         PR c++/87504
2829         * c-warn.c (get_outermost_macro_expansion): New function.
2830         (spelled_the_same_p): Use it to unwind the macro expansions, and
2831         compare the outermost macro in each nested expansion, rather than
2832         the innermost.
2834 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
2836         PR c++/87504
2837         * c-common.h (warn_tautological_cmp): Convert 1st param from
2838         location_t to const op_location_t &.
2839         * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2840         when testing for INTEGER_CST.
2841         (warn_tautological_bitwise_comparison): Convert 1st param from
2842         location_t to const op_location_t &; use it to build a
2843         binary_op_rich_location, and use this.
2844         (spelled_the_same_p): New function.
2845         (warn_tautological_cmp): Convert 1st param from location_t to
2846         const op_location_t &.  Warn for macro expansions if
2847         spelled_the_same_p.  Use binary_op_rich_location.
2849 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
2851         PR c++/43064
2852         PR c++/43486
2853         * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2854         (verify_tree): Handle location wrappers.
2855         (c_common_truthvalue_conversion): Strip any location wrapper.
2856         Handle CONST_DECL.
2857         (fold_offsetof): Strip any location wrapper.
2858         (complete_array_type): Likewise for initial_value.
2859         (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2860         index before checking for INTEGER_CST.
2861         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2862         print parentheses around location wrappers.
2863         * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2864         before checking for INTEGER_CST.
2865         (warn_tautological_bitwise_comparison): Call
2866         tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2867         before checking for INTEGER_CST.
2868         (readonly_error): Strip any location wrapper.
2869         (warn_array_subscript_with_type_char): Strip location wrappers
2870         before checking for INTEGER_CST.  Use the location of the index if
2871         available.
2873 2018-12-06  Jason Merrill  <jason@redhat.com>
2875         PR c++/88136 - -Wdeprecated-copy false positives
2876         * c.opt (Wdeprecated-copy-dtor): New.
2877         (Wdeprecated-copy): Move to -Wextra.
2879 2018-11-29  Martin Sebor  <msebor@redhat.com>
2881         PR c/88172
2882         PR testsuite/88208
2883         * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2884         alignments to values less than the target requires.
2885         (has_attribute): For attribute aligned consider both the attribute
2886         and the alignment bits.
2887         * c-common.c (c_init_attributes): Optionally issue a warning for
2888         zero alignment.
2890 2018-11-28  Martin Sebor  <msebor@redhat.com>
2892         PR c/88065
2893         PR c/87297
2894         * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2895         or destination is an error.
2897 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
2899         PR c++/88215
2900         * c-ubsan.c: Include langhooks.h.
2901         (ubsan_instrument_division): Change gcc_assert that main variants
2902         of op0 and op1 types are equal to gcc_checking_assert that the
2903         main variants are compatible types.
2905 2018-11-27  Eric Botcazou  <ebotcazou@adacore.com>
2907         * c-ada-spec.c: Include stringpool.h.
2908         (has_static_fields): Return false for incomplete types.
2909         (is_tagged_type): Likewise.
2910         (has_nontrivial_methods): Likewise.
2911         (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2912         (struct overloaded_name_hash): New structure.
2913         (struct overloaded_name_hasher): Likewise.
2914         (overloaded_names): New global variable.
2915         (init_overloaded_names): New static function.
2916         (overloaded_name_p): New predicate.
2917         (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2918         on the TYPE_STUB_DECL of the original type of a typedef, if any.
2919         <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2920         Remove always-true condition and dump forward types.
2921         (dump_ada_specs): Delete overloaded_names.
2923 2018-11-20  Martin Sebor  <msebor@redhat.com>
2925         * c-attribs.c (type_for_vector_size): New function.
2926         (type_valid_for_vector_size): Same.
2927         (handle_vector_size_attribute): Move code to the functions above
2928         and call them.
2929         (validate_attribute, has_attribute): New functions.
2930         * c-common.h (has_attribute): Declare.
2931         (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2932         * c-common.c (c_common_resword): Same.
2934 2018-11-16  Jason Merrill  <jason@redhat.com>
2936         * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2937         * c-attribs.c (attr_cold_hot_exclusions): Make public.
2939 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
2941         PR middle-end/87854
2942         * c-common.c (fix_string_type): Reject string literals larger than
2943         TYPE_MAX_VALUE (ssizetype) bytes.
2945 2018-11-15  Martin Sebor  <msebor@redhat.com>
2947         PR c++/87541
2948         PR c++/87542
2949         * c-attribs.c (positional_argument): New function.
2950         (handle_alloc_size_attribute): Use it and simplify.
2951         (handle_alloc_align_attribute): Same.
2952         (handle_assume_aligned_attribute): Same.
2953         (handle_nonnull_attribute): Same.
2954         * c-common.c (check_function_arguments): Pass fntype to
2955         check_function_format.
2956         * c-common.h (check_function_format): Add an argument.
2957         (PosArgFlags, positional_argument): Declare new type and function.
2958         * c-format.c (decode_format_attr): Add arguments.
2959         (check_format_string, get_constant): Same.
2960         (convert_format_name_to_system_name): Adjust.
2962 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
2964         PR other/19165
2965         * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2967 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
2969         P1236R1 - Signed integers are two's complement
2970         * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2971         * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2972         with in-range second operand well defined for -std=c++2a.
2974         PR other/88007
2975         * c-common.c (parse_optimize_options): Allocate option string from
2976         opts_obstack rather than as GC memory.  Move the allocation after
2977         warning for invalid option.
2979 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
2981         * c-common.c (c_get_substring_location): Update for renaming of
2982         get_source_location_for_substring to get_location_within_string.
2983         * c-lex.c: Replace "source_location" with "location_t".
2984         * c-opts.c: Likewise.
2985         * c-ppoutput.c: Likewise.
2987 2018-11-13  Martin Sebor  <msebor@redhat.com>
2989         PR middle-end/81824
2990         * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2991         (handle_tls_model_attribute): Improve diagnostics.
2993 2018-11-12  Jason Merrill  <jason@redhat.com>
2995         * c-cppbuiltin.c (c_cpp_builtins): Define
2996         __cpp_impl_destroying_delete.
2998         * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2999         __cpp_conditional_explicit.
3001 2018-11-09  Martin Sebor  <msebor@redhat.com>
3003         PR middle-end/81824
3004         * c-attribs.c (handle_copy_attribute): New function.
3006 2018-11-09  Martin Sebor  <msebor@redhat.com>
3008         PR c/87795
3009         * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3011 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3013         * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3014         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3015         enum omp_memory_order MEMORY_ORDER.
3016         (c_finish_omp_flush): Add MO argument.
3017         (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3018         (c_finish_omp_for): Add FINAL_P argument.
3019         * c-omp.c: Include memmodel.h.
3020         (c_finish_omp_taskgroup): Add CLAUSES argument.  Set
3021         OMP_TASKGROUP_CLAUSES to it.
3022         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3023         enum omp_memory_order MEMORY_ORDER.  Set OMP_ATOMIC_MEMORY_ORDER
3024         instead of OMP_ATOMIC_SEQ_CST.
3025         (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3026         (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3027         __atomic_thread_fence call with the given value.
3028         (check_omp_for_incr_expr): Formatting fixes.
3029         (c_finish_omp_for): Add FINAL_P argument.  Allow NE_EXPR
3030         even in OpenMP loops, diagnose if NE_EXPR and incr expression
3031         is not constant expression 1 or -1.  Transform NE_EXPR loops
3032         with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3033         (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3034         loops too.
3035         (c_omp_split_clauses): Add support for combined
3036         #pragma omp parallel master and
3037         #pragma omp {,parallel }master taskloop{, simd} constructs.
3038         Handle OMP_CLAUSE_IN_REDUCTION.  Handle OMP_CLAUSE_REDUCTION_TASK.
3039         Handle OMP_CLAUSE_NONTEMPORAL.  Handle splitting OMP_CLAUSE_IF
3040         also to OMP_SIMD.  Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3041         (c_omp_predetermined_sharing): Don't return
3042         OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3043         * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3044         PRAGMA_OMP_REQUIRES.
3045         * c-pragma.h (enum pragma_kind): Likewise.
3046         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3047         and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3049 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3051         * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3053 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3055         * c-format.c (local_cgraph_node_ptr_node): New variable.
3056         (gcc_dump_printf_char_table): Add entry for %C.
3057         (get_pointer_to_named_type): New function, taken from the handling
3058         code for "gimple *" from...
3059         (init_dynamic_diag_info): ...here.  Add handling for
3060         "cgraph_node *".
3061         * c-format.h (T_CGRAPH_NODE): New.
3063 2018-10-19  Jason Merrill  <jason@redhat.com>
3065         * c-cppbuiltin.c (c_cpp_builtins): Add
3066         __cpp_nontype_template_parameter_class.
3068 2018-10-31  Nathan Sidwell  <nathan@acm.org>
3070         * c-opts.c (c_finish_options): Force command line macro
3071         location.  Refactor to avoid repeating main debug hook.
3072         (push_command_line_include): Clarify comment.
3074         * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3076 2018-10-30  Martin Sebor  <msebor@redhat.com>
3078         PR middle-end/87041
3079         * c-format.c (check_format_types): Avoid diagnosing null pointer
3080         arguments to printf-family of functions.
3082 2018-10-30  Marek Polacek  <polacek@redhat.com>
3084         Implement P0892R2, explicit(bool).
3085         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3087 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3089         * name-hint.h (name_hint::take_deferred): New member function.
3091 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3093         PR c++/56856
3094         * c-common.c (check_function_sentinel): Call fold_for_warn on the
3095         argument.
3096         (check_function_restrict): Rename param "argarray" to
3097         "unfolded_argarray", and make a copy named "argarray", calling
3098         fold_for_warn on each argument.
3099         (check_function_arguments): Add note about responsibility for
3100         folding the arguments.
3102 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3104         * c-common.c (flag_isoc2x): New variable.
3105         * c-common.h (clk_c): Update comment to reference C2X.
3106         (flag_isoc99, flag_isoc11): Update comments to reference future
3107         standard versions in general.
3108         (flag_isoc2x): Declare.
3109         * c-opts.c (set_std_c2x): New function.
3110         (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3111         (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3112         flag_isoc2x to 0.
3113         * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3115 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3117         * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3118         (std=iso9899:2018): Document C17 as published in 2018.
3120 2018-10-12  Christophe Lyon  <christophe.lyon@linaro.org>
3122         PR c++/87364
3123         * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3125 2018-10-11  Will Wray  <wjwray@gmail.com>
3127         PR c++/87364
3128         * c-pretty-print.h (pp_c_type_cast): Prototype.
3129         (pp_c_integer_constant): Likewise.
3130         * c-pretty-print.c (pp_c_type_cast): No longer static.
3131         (pp_c_integer_constant): Likewise.
3132         (pp_c_enumeration_constant): Fix loop termination when finding
3133         name of constant.  No longer returns a value.  Call
3134         pp_c_integer_constant.
3135         (c_pretty_printer::constant): Update for changes to
3136         pp_c_enumeration_constant.
3138 2018-10-11  Jakub Jelinek  <jakub@redhat.com>
3140         * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3141         for no_unique_address.
3143 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
3145         * c-common.c (c_option_controlling_cpp_error): Rename to...
3146         (c_option_controlling_cpp_diagnostic): ...this, and convert
3147         "reason" from int to enum.
3148         (c_cpp_error): Rename to...
3149         (c_cpp_diagnostic): ...this, converting level and reason to enums.
3150         * c-common.h (c_cpp_error): Rename to...
3151         (c_cpp_diagnostic): ...this, converting level and reason to enums.
3152         * c-opts.c (c_common_init_options): Update for renaming.
3154 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
3156         PR c/87286
3157         * c-common.c (vector_types_compatible_elements_p): Use
3158         INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3160 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
3162         * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3163         to generate constructor destructor priority warning.
3164         * c.opt (-Wprio-ctor-dtor): New option.
3166 2018-10-01  Jason Merrill  <jason@redhat.com>
3168         * c-lex.c (c_common_has_attribute): Add no_unique_address.
3170 2018-10-01  Eric Botcazou  <ebotcazou@adacore.com>
3172         * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3173         (dump_ada_node): Add const keyword.
3175 2018-09-25  Martin Liska  <mliska@suse.cz>
3177         * c-common.c (c_common_truthvalue_conversion):
3178         Remove Pascal from documentation.
3180 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3182         * c-ada-spec.c: Include diagnostic.h.
3183         (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3185 2018-09-19  Marek Polacek  <polacek@redhat.com>
3187         * c.opt (Wclass-conversion): New.
3189 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3191         * c-format.c (range_label_for_format_type_mismatch::get_text):
3192         Update for new param.
3194 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3196         * c-format.c (format_warning_at_char): Update for introduction of
3197         format_string_diagnostic_t.
3198         (format_type_warning): Likewise.
3200 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3202         PR c/63886
3203         * c.opt (Wabsolute-value): New.
3205 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3207         * c-common.c (complete_flexible_array_elts): New helper function.
3208         * c-common.h (complete_flexible_array_elts): Declare.
3210 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3212         * c-common.c (braced_list_to_string): Remove eval parameter.
3213         Add some more checks.  Always create zero-terminated STRING_CST.
3214         * c-common.h (braced_list_to_string): Adjust prototype.
3216 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3218         PR 87091
3219         * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3220         to a tri-state.
3221         (maybe_suggest_missing_token_insertion): Likewise.
3222         (maybe_add_include_fixit): Add param "override_location".  If set,
3223         and source-printing is enabled, then override the rich_location's
3224         primary location with that of the insertion point for the fix-it
3225         hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3226         * c-common.h (extern void maybe_add_include_fixit): Add bool
3227         param.
3228         * c-format.c (selftest::test_type_mismatch_range_labels): Update
3229         for conversion of show_caret_p to a tri-state.
3230         * c-warn.c (warn_for_restrict): Likewise.
3231         * known-headers.cc
3232         (suggest_missing_header::~suggest_missing_header): Update call to
3233         maybe_add_include_fixit to suggest overriding the location, as it
3234         is for a note.
3236 2018-08-27  Martin Liska  <mliska@suse.cz>
3238         * c-common.c (check_function_restrict): Use new function
3239         fndecl_built_in_p and remove check for FUNCTION_DECL if
3240         possible.
3241         (check_builtin_function_arguments): Likewise.
3242         (reject_gcc_builtin): Likewise.
3243         * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3245 2018-08-26  Marek Polacek  <polacek@redhat.com>
3247         PR c++/87029, Implement -Wredundant-move.
3248         * c.opt (Wredundant-move): New option.
3250 2018-08-21  Marek Polacek  <polacek@redhat.com>
3252         PR c++/86981, Implement -Wpessimizing-move.
3253         * c.opt (Wpessimizing-move): New option.
3255 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
3257         PR other/84889
3258         * c-attribs.c (common_handle_aligned_attribute): Add
3259         auto_diagnostic_group instance.
3260         * c-indentation.c (warn_for_misleading_indentation): Likewise.
3261         * c-opts.c (c_common_post_options): Likewise.
3262         * c-warn.c (warn_logical_not_parentheses): Likewise.
3263         (warn_duplicated_cond_add_or_warn): Likewise.
3264         (warn_for_multistatement_macros): Likewise.
3266 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3268         * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3269         access.
3271 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3273         * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3274         field.
3275         (laxy_hex_fp_value_count): Make unsigned.
3276         (lazy_hex_fp_value): Provided with macro & lazy number.  Directly
3277         manipulate the macro.
3278         (builtin_defin_with_hex_fp_value): Adjust callback name, use
3279         cpp_define_lazily.
3281 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
3283         * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3284         (gcc_dump_printf_length_specs): New.
3285         (gcc_dump_printf_flag_pairs): New.
3286         (gcc_dump_printf_flag_specs): New.
3287         (gcc_dump_printf_char_table): New.
3288         (format_types_orig): Add entry for "gcc_dump_printf".
3289         (init_dynamic_diag_info): Set up length_char_specs and
3290         conversion_specs for gcc_dump_printf_format_type.
3291         (handle_format_attribute): Handle gcc_dump_printf_format_type.
3293 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3295         * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3297         * c-ada-spec.c: Don't #include "cpp-id-data.h"
3298         * c-cppbuiltin.c: Likewise.
3300 2018-08-17  Martin Liska  <mliska@suse.cz>
3302         * c.opt: Remove Warn, Init and Report for options with
3303         Ignore/Deprecated flag. Warning is done automatically for
3304         Deprecated flags.
3306 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3308         PR c++/70693
3309         * c-common.c (selftest::c_family_tests): Call
3310         selftest::c_indentation_c_tests.
3311         * c-common.h (selftest::c_indentation_c_tests): New decl.
3312         * c-indentation.c: Include "selftest.h".
3313         (next_tab_stop): Add "tab_width" param, rather than accessing
3314         cpp_opts.
3315         (get_visual_column): Likewise.  Clarify comment.  Bulletproof
3316         against reading past the end of the line.
3317         (get_first_nws_vis_column): Add "tab_width" param.
3318         (detect_intervening_unindent): Likewise.
3319         (should_warn_for_misleading_indentation): Read tab width from
3320         cpp_opts and pass around.
3321         (selftest::test_next_tab_stop): New test.
3322         (selftest::assert_get_visual_column_succeeds): New function.
3323         (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3324         (selftest::assert_get_visual_column_fails): New function.
3325         (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3326         (selftest::test_get_visual_column): New test.
3327         (selftest::c_indentation_c_tests): New function.
3329 2018-08-16  Nathan Sidwell  <nathan@acm.org>
3331         * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3332         (store_ada_macro): Likewise.
3333         * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3334         * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3336 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
3338         * c-format.c: Include "selftest-diagnostic.h" and
3339         "gcc-rich-location.h".
3340         (format_warning_at_char): Pass NULL for new label params of
3341         format_warning_va.
3342         (class indirection_suffix): New class.
3343         (class range_label_for_format_type_mismatch): New class.
3344         (format_type_warning): Move logic for generating "*" suffix to
3345         class indirection_suffix.  Create "fmt_label" and "param_label"
3346         to show their types, and pass them to the
3347         format_warning_at_substring calls.
3348         (selftest::test_type_mismatch_range_labels): New test.
3349         (selftest::c_format_c_tests): Call it.
3351 2018-08-13  Martin Sebor  <msebor@redhat.com>
3353         PR tree-optimization/71625
3354         * c-common.c (braced_list_to_string): New function.
3355         * c-common.h (braced_list_to_string): Declare it.
3357 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3359         * c-common.c (try_to_locate_new_include_inertion_point): Use
3360         linemap_included_from_linemap.
3361         * c-lex.c (fe_file_change): Use linemap_included_from.
3362         * c-ppoutput.c (pp_file_change): Likewise.
3364 2018-08-01  Martin Sebor  <msebor@redhat.com>
3366         PR tree-optimization/86650
3367         * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3368         (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3369         (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3370         * c-format.h (T89_G): Update to be "gimple *" rather than
3371         "gcall *".
3372         (local_gcall_ptr_node): Rename...
3373         (local_gimple_ptr_node): ...to this.
3375 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3377         * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3378         table entries for gcc_diag_char_table, and the 'Z' entry from
3379         gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3380         &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3381         (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3382         adding missing "Z" for this table.  Remove erroneous "G" and "K"
3383         entries.
3384         (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
3385         (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3386         (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
3388 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3390         * c-common.c (speculation_safe_resolve_call): New function.
3391         (speculation_safe_resolve_params): New function.
3392         (speculation_safe_resolve_return): New function.
3393         (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3394         * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3395         __HAVE_SPECULATION_SAFE_VALUE.
3397 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3399         * c-common.c (c_cpp_error): Remove redundant "line_table"
3400         parameter from call to rich_location::set_range.
3401         (maybe_suggest_missing_token_insertion): Likewise.
3403 2018-07-20  Martin Sebor  <msebor@redhat.com>
3405         PR middle-end/82063
3406         * c.opt (-Warray-bounds): Remove redundant -Wall.
3408 2018-07-20  Martin Sebor  <msebor@redhat.com>
3410         PR middle-end/82063
3411         * c-common.h (c_common_handle_option): Change function argument
3412         to HOST_WIDE_INT.
3413         * c-opts.c (c_common_init_options): Same.
3414         (c_common_handle_option): Same.  Remove special handling of
3415         OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3416         * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3417         options to take a HOST_WIDE_INT argument and accept a byte-size
3418         suffix.  Initialize.
3419         (-Wvla-larger-than): Same.
3420         (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3421         (-Wno-vla-larger-than): Same.
3423 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3425         * c-attribs.c (c_common_attribute_table): Add
3426         "omp declare target implicit" attribute.
3428 2018-07-12  Richard Biener  <rguenther@suse.de>
3430         PR c/86453
3431         * c-attribs.c (handle_packed_attribute): Do not build a variant
3432         type with TYPE_PACKED, instead ignore the attribute if we may
3433         not apply to the original type.
3435 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3437         PR c++/86443
3438         * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3439         to contain TREE_LIST for both the original class iterator and the
3440         "last" helper var.
3442 2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>
3444         * c-ada-spec.c (to_ada_name): Remove index parameter.
3445         (pp_ada_tree_identifier): Likewise.
3446         (dump_ada_macros): Adjust call to to_ada_name.
3447         (struct overloaded_name_hash): Delete.
3448         (struct overloaded_name_hasher): Likewise.
3449         (overloaded_names): Likewise.
3450         (compute_overloading_index): Likewise.
3451         (dump_ada_decl_name): Do not call compute_overloading_index and
3452         adjust calls to pp_ada_tree_identifier.
3453         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3454         (dump_ada_import): Add spc parameter and switch to aspect syntax.
3455         (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3456         (dump_ada_enum_type): Remove type and display_convention parameters.
3457         Adjust calls to pp_ada_tree_identifier.
3458         (dump_ada_node): Likewise and for dump_ada_structure.
3459         (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3460         and tidy up.
3461         <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3462         syntax.
3463         (print_constructor): Adjust call to pp_ada_tree_identifier.
3464         (print_destructor): Likewise.
3465         (dump_ada_declaration): Switch to aspect syntax.
3466         (dump_ada_structure): Likewise and tidy up.  Replace display_convention
3467         parameter with nested parameter.
3468         (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3469         (dump_ada_specs): Do not delete overloaded_names table.
3471 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3473         PR target/86324
3474         * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3475         target hook.
3477 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3479         * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3480         NO_IMPLICIT_EXTERN_C.
3482 2018-06-28  Martin Liska  <mliska@suse.cz>
3484         * cppspec.c: Include opt-suggestions.h.
3486 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
3487             Thomas Schwinge  <thomas@codesourcery.com>
3488             Cesar Philippidis  <cesar@codesourcery.com>
3490         * c-pragma.h (enum pragma_omp_clause): Add
3491         PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3492         PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3494 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3496         PR c++/86210
3497         * c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
3498         comment.
3500 2018-06-18  Martin Sebor  <msebor@redhat.com>
3502         PR middle-end/85602
3503         * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3504         nonstring.
3506 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3508         * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3510 2018-06-13  Jason Merrill  <jason@redhat.com>
3512         * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3513         (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3514         handling.
3516         PR c++/86094 - wrong code with defaulted move ctor.
3517         * c-opts.c (c_common_post_options): Bump the current ABI version to
3518         13.  Set warn_abi_version and flag_abi_compat_version to the current
3519         version rather than 0.  Fix defaulting flag_abi_compat_version from
3520         warn_abi_version.
3522 2018-06-12  Martin Sebor  <msebor@redhat.com>
3524         PR c/85931
3525         * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3526         sizeof source and destination yields the same value.
3528 2018-06-12  Martin Liska  <mliska@suse.cz>
3530         * c.opt: Make MPX-related options as Deprecated.
3532 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3534         * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3535         rather than 0.
3537 2018-06-08  Martin Liska  <mliska@suse.cz>
3539         * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3540         for MPX (macros, related functions, fields in cgraph_node, ...).
3541         (handle_bnd_legacy): Likewise.
3542         (handle_bnd_instrument): Likewise.
3543         * c.opt: Likewise.
3545 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
3547         PR c++/86068
3548         * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3549         __cpp_transactional_memory to 201500 instead of 210500.
3551 2018-06-06  Jason Merrill  <jason@redhat.com>
3553         PR c++/85710 - ICE with -Wmemset-elt-size.
3554         * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3556 2018-06-01  Jason Merrill  <jason@redhat.com>
3558         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3559         201703.
3561 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3563         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3564         declaration for a typedef independently of whether the declaration of
3565         the subtype is generated.
3567 2018-05-31  Martin Sebor  <msebor@redhat.com>
3569         PR c/82063
3570         * c.opt (-Wno-alloc-size-larger-than): New option.
3572 2018-04-22  David Pagan  <dave.pagan@oracle.com>
3574         PR c/55976
3575         * c-opts.c (c_common_post_options): Set default for warn_return_type
3576         for C++/C++ with ObjC extensions only. For C, makes it possible to
3577         differentiate between default (no option), -Wreturn-type, and
3578         -Wno-return-type.
3580 2018-05-29  Jason Merrill  <jason@redhat.com>
3582         * c.opt (Winit-list-lifetime): New flag.
3584 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3586         * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3587         splay_tree_delete_pointers.
3589 2018-05-26  Jakub Jelinek  <jakub@redhat.com>
3591         PR bootstrap/85921
3592         * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3593         noinline variable to workaround broken kernel headers.
3595 2018-05-18  Jason Merrill  <jason@redhat.com>
3597         * c.opt (Wdeprecated-copy): New flag.
3599 2018-05-17  Martin Liska  <mliska@suse.cz>
3601         * c-warn.c (overflow_warning): Do not use
3602         space in between 'G_' and '('.
3604 2018-05-09  Jason Merrill  <jason@redhat.com>
3606         * c-common.c (valid_array_size_p): Add complain parameter.
3607         * c-common.h: ...which defaults to true.
3609 2018-05-11  Jakub Jelinek  <jakub@redhat.com>
3611         PR c/85696
3612         * c-omp.c (c_omp_predetermined_sharing): Return
3613         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3615 2018-05-11  Martin Liska  <mliska@suse.cz>
3617         PR sanitizer/85556
3618         * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3619         TREE_LIST values.
3621 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
3623         PR c++/85662
3624         * c-common.h (fold_offsetof_1): Removed.
3625         (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3626         CTX argument defaulted to ERROR_MARK.
3627         * c-common.c (fold_offsetof_1): Renamed to ...
3628         (fold_offsetof): ... this.  Remove wrapper function.  Add TYPE
3629         argument, convert the pointer constant to TYPE and use size_binop
3630         with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3631         a pointer type.  Adjust recursive calls.
3633 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
3635         PR c++/85400
3636         * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3638 2018-05-07  Nathan Sidwell  <nathan@acm.org>
3640         * c.opt (ffor-scope): Remove functionality, issue warning.
3642 2018-05-03  Nathan Sidwell  <nathan@acm.org>
3644         * c.opt (ffriend-injection): Remove functionality, issue warning.
3646 2018-05-01  David Malcolm  <dmalcolm@redhat.com>
3648         PR c/84258
3649         * c-format.c (struct format_check_results): Add field
3650         "number_non_char".
3651         (check_format_info): Initialize it, and warn if encountered.
3652         (check_format_arg): Distinguish between wide char and
3653         everything else when detecting arrays of non-char.
3655 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3657         * c-format.c (get_corrected_substring): Update for
3658         location_get_source_line returning a char_span.  Use a char_span
3659         when handling the prefix of the correction.
3660         * c-indentation.c (get_visual_column): Update for
3661         location_get_source_line returning a char_span.
3662         (get_first_nws_vis_column): Likewise.
3664 2018-03-29  David Malcolm  <dmalcolm@redhat.com>
3666         PR c++/84269
3667         * known-headers.cc (get_stdlib_header_for_name): Add various names
3668         from <assert.h>, <string.h>, and <memory.h>; add more names from
3669         <stdio.h>.
3671 2018-03-27  Jakub Jelinek  <jakub@redhat.com>
3673         PR c++/85061
3674         * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3675         get_base_address of the second operand is a VAR_P, rather than the
3676         operand itself, and use gcc_checking_assert instead of gcc_assert.
3678 2018-03-23  Marek Polacek  <polacek@redhat.com>
3680         PR c++/85045
3681         * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3682         <case RDIV_EXPR>: Tweak condition.
3684 2018-03-20  Eric Botcazou  <ebotcazou@adacore.com>
3686         * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3688 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
3690         PR c/84909
3691         * c-warn.c (conversion_warning): Replace "to to" with "to" in
3692         diagnostics.
3694         PR c/84910
3695         * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3696         diagnostics.
3698 2018-03-16  Richard Biener  <rguenther@suse.de>
3700         PR c/84873
3701         * c-gimplify.c (c_gimplify_expr): Revert previous change.  Instead
3702         unshare the possibly folded expression.
3704 2018-03-15  Richard Biener  <rguenther@suse.de>
3706         PR c/84873
3707         * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3709 2018-03-13  Martin Sebor  <msebor@redhat.com>
3711         PR tree-optimization/84725
3712         * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3713         with all three narrow character types, including their qualified forms.
3715 2018-03-12  Martin Sebor  <msebor@redhat.com>
3717         PR tree-optimization/83456
3718         * c-common.c (check_function_restrict): Return bool.
3719         Restore checking of bounded built-in functions.
3720         (check_function_arguments): Also return the result
3721         of warn_for_restrict.
3722         * c-common.c (check_function_restrict): Return bool.
3723         * c-warn.c (warn_for_restrict): Return bool.
3725 2018-03-02  Marek Polacek  <polacek@redhat.com>
3727         PR c++/84171
3728         * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3729         is erroneous.
3731 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
3733         * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3734         function".
3736 2018-03-01  Marek Polacek  <polacek@redhat.com>
3738         PR c++/84639
3739         * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3740         alignment in computation.
3742 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3744         * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3745         <REAL_TYPE>: Deal specifically with _Float128/__float128.
3747 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3749         * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3750         (is_char_array): Take a type instead of a declaration.
3751         (dump_ada_array_type): Likewise.
3752         (is_simple_enum): Minor tweak.
3753         (dump_ada_enum_type): New function extracted from...
3754         (dump_ada_node) <ENUMERAL_TYPE>: ...here.  Invoke it.
3755         <INTEGER_TYPE>: Remove unreachable code.
3756         <RECORD_TYPE>: Likewise.  Minor tweaks.
3757         (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3758         <ENUMERAL_TYPE>: New case.
3759         <RECORD_TYPE>: Factor out common code.
3760         (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3761         Minor tweaks.  Deal with enumeral types.
3762         (dump_ada_structure): Minor tweaks.
3764 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3766         * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3767         address for incomplete structures.
3768         (dump_forward_type): Do not bail out for incomplete structures.
3769         (dump_ada_declaration): Do not special-case incomplete structures
3770         for subtypes.  Dump them as null records for types.
3772 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3774         * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3775         (is_char_array): Fix formatting.
3776         (dump_template_types): Likewise.
3777         (dump_generic_ada_node): Rename into...
3778         (dump_ada_node): ...this.
3779         <POINTER_TYPE>: Remove superfluous space.  Use generic address for
3780         incomplete structures and not for empty structures.  Do not use it
3781         when forward declarations are needed.
3782         (dump_forward_type): New function.
3783         (dump_nested_types): Remove FORWARD parameter.  Do not consider
3784         TREE_VISITED and do not generate a forward declaration.  Only dump
3785         original nested types for nested declaration.
3786         (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3787         <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3788         <RECORD_TYPE>: Do not consider TREE_VISITED.
3789         (dump_ada_declaration): Use booleans and fix formatting throughout.
3790         <TYPE_DECL>: Skip incomplete structures and not empty structures.
3791         Call dump_forward_type instead of dump_nested_types for a typedef.
3792         Remove superfluous check and adjust call to dump_nested_types.
3793         <POINTER_TYPE>: Call dump_forward_type and fall through.
3794         (dump_ada_struct_decl): Rename into...
3795         (dump_ada_structure): ...this.  Do not special-case empty structures.
3797 2018-02-27  Martin Sebor  <msebor@redhat.com>
3799         PR c++/83871
3800         * c.opt (-Wmissing-attributes): New option.
3802 2018-02-21  Martin Liska  <mliska@suse.cz>
3804         * c.opt (Wcatch-value=): Add IntegerRange.
3806 2018-02-15  Jason Merrill  <jason@redhat.com>
3808         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3810 2018-02-09  Nathan Sidwell  <nathan@acm.org>
3812         PR c/84293
3813         * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3814         arg.
3815         * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3816         arg.  Adjust.
3818 2018-02-09  Martin Sebor  <msebor@redhat.com>
3820         PR lto/84212
3821         * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3822         (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3823         (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3824         (-Wstrict-overflow, -Wsuggest-attribute): Same.
3825         (-Wuninitialized): Same.
3827 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
3829         * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3830         keyword for components.
3832 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
3834         * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3836 2018-02-02  Julia Koval  <julia.koval@intel.com>
3838         * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3840 2018-01-29  Marek Polacek  <polacek@redhat.com>
3842         PR c/83966
3843         * c-format.c (check_function_format): Check current_function_decl.
3845 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
3847         * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3848         argument.
3849         (LAZY_HEX_FP_VALUES_CNT): Define.
3850         (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3851         values rather than just 12.
3852         (builtin_define_with_hex_fp_value): Likewise.
3854 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
3856         PR other/70268
3857         * c.opt (-fmacro-prefix-map): New option.
3858         * c-opts.c (c_common_handle_option): Handle it.
3859         * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3860         * c-ppoutput.c (init_pp_output): Likewise.
3862 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
3864         PR c++/83814
3865         * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3867 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
3869         * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3870         Skip 'f' and 'F' characters if it is true.
3871         (store_ada_macro): Minor tweak.
3872         (dump_ada_macros) <CPP_COMMENT>: Likewise.
3873         <CPP_WSTRING>: Likewise.
3874         <CPP_STRING>: Output '&' in the buffer if not the first string.
3875         <CPP_NUMBER>: Adjust calls to dump_number.
3877 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
3879         PR c++/43486
3880         * c-common.c: Include "selftest.h".
3881         (get_atomic_generic_size): Perform the test for integral type
3882         before the range test for any integer constant, fixing indentation
3883         of braces.  Call fold_for_warn before testing for an INTEGER_CST.
3884         (reject_gcc_builtin): Strip any location wrapper from EXPR.
3885         (selftest::test_fold_for_warn): New function.
3886         (selftest::c_common_c_tests): New function.
3887         (selftest::c_family_tests): Call it, and
3888         selftest::c_pretty_print_c_tests.
3889         * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3890         * c-format.c (check_format_arg): Convert VAR_P check to a
3891         fold_for_warn.
3892         * c-pretty-print.c: Include "selftest.h".
3893         (pp_c_cast_expression): Don't print casts for location wrappers.
3894         (selftest::assert_c_pretty_printer_output): New function.
3895         (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3896         (selftest::test_location_wrappers): New function.
3897         (selftest::c_pretty_print_c_tests): New function.
3898         * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
3901             Alan Hayward  <alan.hayward@arm.com>
3902             David Sherwood  <david.sherwood@arm.com>
3904         * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3906 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
3907             Alan Hayward  <alan.hayward@arm.com>
3908             David Sherwood  <david.sherwood@arm.com>
3910         * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3911         as polynomial.
3913 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
3914             Alan Hayward  <alan.hayward@arm.com>
3915             David Sherwood  <david.sherwood@arm.com>
3917         * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3918         (convert_vector_to_array_for_subscript): Handle polynomial
3919         TYPE_VECTOR_SUBPARTS.
3920         (c_common_type_for_mode): Check valid_vector_subparts_p.
3921         * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3922         VECTOR_CST_NELTS.
3924 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
3926         Update copyright years.
3928 2017-12-22  Mike Stump  <mikestump@comcast.net>
3929             Eric Botcazou  <ebotcazou@adacore.com>
3931         * c-pragma.c (init_pragma): Register pragma GCC unroll.
3932         * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3934 2017-12-22  Alexandre Oliva  <aoliva@redhat.com>
3936         PR debug/83527
3937         PR debug/83419
3938         * c-semantics.c (only_debug_stmts_after_p): New.
3939         (pop_stmt_list): Clear side effects in debug-only stmt list.
3940         Check for single nondebug stmt followed by debug stmts only.
3942 2017-12-21  Alexandre Oliva  <aoliva@redhat.com>
3944         PR debug/83419
3945         * c-semantics.c (pop_stmt_list): Propagate side effects from
3946         single nondebug stmt to container list.
3948 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
3950         * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3951         conditions with typical order conditions.
3953 2017-12-18  Marek Polacek  <polacek@redhat.com>
3955         * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3956         not in effect.
3958 2017-12-17  Martin Sebor  <msebor@redhat.com>
3960         * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3961         an error for attribute warn_if_not_aligned.
3963 2017-12-16  Martin Sebor  <msebor@redhat.com>
3965         PR tree-optimization/78918
3966         * c-common.c (check_function_restrict): Avoid checking built-ins.
3967         * c.opt (-Wrestrict): Include in -Wall.
3969 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
3971         * c-attribs.c (c_common_attribute_table,
3972         c_common_format_attribute_table): Swap affects_type_identity
3973         and handler fields, adjust comments.
3975 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3977         * c.opt (Wcast-function-type): New warning option.
3978         * c-lex.c (get_fileinfo): Avoid warning.
3979         * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3981 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
3983         PR middle_end/79538
3984         * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3985         Adjust the size of buf1 and buf2, add a new buf to avoid
3986         format-overflow warning.
3988 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
3990         * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3991         subsequent statement list.
3993 2017-12-07  Martin Sebor  <msebor@redhat.com>
3995         PR c/81544
3996         PR c/81566
3997         * c-attribs.c (attr_aligned_exclusions): New array.
3998         (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3999         (attr_common_exclusions, attr_const_pure_exclusions): Same.
4000         (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4001         (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4002         (attr_warn_unused_result_exclusions): Same.
4003         (handle_hot_attribute, handle_cold_attribute): Simplify.
4004         (handle_const_attribute): Warn on function returning void.
4005         (handle_pure_attribute): Same.
4006         (handle_aligned_attribute): Diagnose conflicting attribute
4007         specifications.
4008         * c-warn.c (diagnose_mismatched_attributes): Simplify.
4010 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4012         PR c/83236
4013         * c-common.c (selftest::c_family_tests): Call
4014         selftest::c_spellcheck_cc_tests.
4015         * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4016         * c-spellcheck.cc: Include "selftest.h".
4017         (name_reserved_for_implementation_p): New function.
4018         (should_suggest_as_macro_p): New function.
4019         (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4020         should_suggest_as_macro_p and call it.
4021         (selftest::test_name_reserved_for_implementation_p): New function.
4022         (selftest::c_spellcheck_cc_tests): New function.
4023         * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4025 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4027         * c-spellcheck.cc: New file, taken from macro-handling code in
4028         spellcheck-tree.c.
4029         * c-spellcheck.h: New file, taken from macro-handling code in
4030         spellcheck-tree.h.
4032 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
4034         * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4035         attribute.
4036         (handle_simd_attribute): Don't check for "cilk simd function"
4037         attribute.  Reindent, formatting changes.
4039 2017-11-30  Julia Koval  <julia.koval@intel.com>
4041         * c-common.h (inv_list): Remove.
4043 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4045         PR sanitizer/81275
4046         * c-common.c (c_switch_covers_all_cases_p_1,
4047         c_switch_covers_all_cases_p): New functions.
4048         * c-common.h (c_switch_covers_all_cases_p): Declare.
4050 2017-11-28  Julia Koval  <julia.koval@intel.com>
4051             Sebastian Peryt  <sebastian.peryt@intel.com>
4053         * array-notation-common.c: Delete.
4054         * c-cilkplus.c: Ditto.
4055         * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4056         * c-common.def (ARRAY_NOTATION_REF): Remove.
4057         * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4058         build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4059         c_validate_cilk_plus_loop, cilkplus_an_parts,
4060         cilk_ignorable_spawn_rhs_op,
4061         cilk_recognize_spawn): Remove.
4062         * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4063         * c-omp.c: Remove CILK_SIMD check.
4064         * c-pragma.c: Ditto.
4065         * c-pragma.h: Remove CILK related pragmas.
4066         * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4067         ARRAY_NOTATION_REF condition.
4068         (c_pretty_printer::expression): Ditto.
4069         * c.opt (fcilkplus): Remove.
4070         * cilk.c: Delete.
4072 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
4074         * c-pretty-print.c (pp_c_additive_expression,
4075         c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4077 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
4079         * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4081         PR c++/83059
4082         * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4083         instead of tree_to_uhwi, formatting fix.
4085 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4087         PR c/81404
4088         * known-headers.cc: New file, based on material from c/c-decl.c.
4089         (suggest_missing_header): Copied as-is.
4090         (get_stdlib_header_for_name): New, based on get_c_name_hint but
4091         heavily edited to add C++ support.  Add some knowledge about
4092         <limits.h>, <stdint.h>, and <wchar.h>.
4093         * known-headers.h: Likewise.
4095 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4097         * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4098         (lookup_name_fuzzy): Likewise.  Convert return type from
4099         const char * to name_hint.  Add location_t param.
4100         * name-hint.h: New header.
4102 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
4104         PR c/66618
4105         PR c/69960
4106         * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4108 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
4110         * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4111         expected publication date of C17.
4112         (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4114 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
4116         PR c/81156
4117         * c-common.c (c_common_reswords): Add __builtin_tgmath.
4118         * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4120 2017-11-10  Martin Sebor  <msebor@redhat.com>
4122         PR c/81117
4123         * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4124         * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4125         * c.opt (-Wstringop-truncation): New option.
4127 2017-11-06  Martin Liska  <mliska@suse.cz>
4129         PR middle-end/82404
4130         * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4131         FE.
4132         * c.opt: Set default value of warn_return_type.
4134 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
4136         * c-common.c (binary_op_error): Update for renaming of
4137         error_at_rich_loc.
4138         (c_parse_error): Likewise.
4139         * c-warn.c (warn_logical_not_parentheses): Likewise for
4140         renaming of inform_at_rich_loc.
4141         (warn_for_restrict): Likewise for renaming of
4142         warning_at_rich_loc_n.
4144 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
4146         * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4147         * c-opts.c (set_std_c17): New function.
4148         (c_common_init_options): Use gnu17 as default C version.
4149         (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4151 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4153         * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4154         (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4155         _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4156         __FP_FAST_FMA<N>X.
4158 2017-10-23  Marek Polacek  <polacek@redhat.com>
4160         PR c/82681
4161         * c-warn.c (warnings_for_convert_and_check): Fix typos.
4163 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
4165         * c-common.c (check_builtin_function_arguments): Also check arguments
4166         of __builtin_alloca_with_align_and_max.
4168 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
4170         * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4171         rather than NULL to format_warning_va.
4172         (check_format_types): Likewise when calling format_type_warning.
4173         Remove code to extract source_ranges and source_range * in favor
4174         of just a location_t.
4175         (format_type_warning): Convert source_range * param to a
4176         location_t.
4178 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
4180         * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4181         [LR]SHIFT_EXPR.
4183 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
4185         * c-common.c (enum missing_token_insertion_kind): New enum.
4186         (get_missing_token_insertion_kind): New function.
4187         (maybe_suggest_missing_token_insertion): New function.
4188         * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4190 2017-10-11  Nathan Sidwell  <nathan@acm.org>
4192         * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4193         (c_common_handle_option): Update incpath_kind names.
4195 2017-10-11  Martin Liska  <mliska@suse.cz>
4197         PR sanitizer/82490
4198         * c-attribs.c (handle_no_sanitize_attribute): Report directly
4199         Wattributes warning.
4201 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
4203         * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4204         operating on trees as wide_ints.
4205         * c-common.c (pointer_int_sum): Likewise.
4206         * c-pretty-print.c (pp_c_integer_constant): Likewise.
4207         * c-warn.c (match_case_to_enum_1): Likewise.
4208         (c_do_switch_warnings): Likewise.
4209         (maybe_warn_shift_overflow): Likewise.
4211 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
4213         PR c/82437
4214         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4215         instead of wide_int::from.
4217 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
4219         PR c/82437
4220         * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4221         using to_widest use wide_int with the larger of the two precisions.
4223 2017-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4225         * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4226         functions.
4228 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
4230         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4231         when combining the original unconverted comparison operands.
4233 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
4235         * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4236         attribute.
4238 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
4240         * c-ada-spec.c (to_ada_name): Add index parameter.
4241         (pp_ada_tree_identifier): Likewise.
4242         (dump_ada_macros): Adjust call to to_ada_name.
4243         (struct overloaded_name_hash): New type.
4244         (struct overloaded_name_hasher): Likewise.
4245         (overloaded_names): New hash table.
4246         (compute_overloading_index): New function.
4247         (dump_ada_decl_name): Call it and pass the result to
4248         pp_ada_tree_identifier.
4249         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4250         (dump_ada_function_declaration): Likewise.
4251         (dump_generic_ada_node): Likewise.
4252         (print_constructor): Likewise.
4253         (print_destructor): Likewise.
4254         (dump_ada_specs): Delete overloaded_names table.
4256 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
4258         * c-ada-spec.c (max_ada_macros): Move around.
4259         (store_ada_macro_index): Likewise.
4260         (source_file): Rename into...
4261         (macro_source_file): ...this.
4262         (count_ada_macro): Move around.
4263         (store_ada_macro): Likewise.
4264         (compare_macro): Likewise.
4265         (print_ada_macros): Merge in...
4266         (dump_ada_macros): ...this.
4267         (source_file_base): Rename into...
4268         (current_source_file): ...this.
4269         (print_comment): Move around.
4270         (dump_ada_nodes): Call dump_ada_declaration directly.
4271         (struct with): Change type of limited field to bool.
4272         (append_withs): Change type of limited_access parameter to bool.
4273         (pp_ada_tree_identifie): Likewise.
4274         (dump_ada_decl_nam): Likewise.
4275         (dump_generic_ada_node): Likewise.  Do not print the return type.
4276         (to_ada_name): Change type of space_found parameter to bool.
4277         (dump_ada_function_declaration): Return void and change type of
4278         parameters to bool.  Also print the return type for a function.
4279         (print_ada_methods): Rename into...
4280         (dump_ada_methods): ...this.
4281         (print_ada_declaration): Rename into ...
4282         (dump_ada_declaration): ...this.  Do not print the return type.
4283         (print_ada_struct_decl): Rename into...
4284         (dump_ada_struct_decl): ...this.
4286 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
4288         * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4289         rather than DECL_INITIAL.
4290         (common_handle_aligned_attribute): Likewise.
4292 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
4294         * c.opt (gen-decls): Add RejectNegative.
4296 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
4297             Jakub Jelinek  <jakub@redhat.com>
4299         Add support for -std=c++2a.
4300         * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4301         * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4302         * c-opts.c (set_std_cxx2a): New.
4303         (c_common_handle_option): Set options when -std=c++2a is enabled.
4304         (c_common_post_options): Adjust comments.
4305         (set_std_cxx14, set_std_cxx17): Likewise.
4307 2017-09-15  Eric Botcazou  <ebotcazou@adacore.com>
4309         * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4310         message for non-uniform endianness and issue a warning in C++.
4312 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
4314         * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4315         (Wc++17-compat): Change from undocumented alias to option.
4316         (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4317         change C++1z to C++17 in description.
4318         (std=c++1z, std=gnu++1z): Change from option to undocumented
4319         deprecated alias.
4320         (std=c++17, std=gnu++17): Change from undocumented alias to option.
4321         Adjust description.
4322         * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4323         * c-opts.c (set_std_cxx1z): Rename to ...
4324         (set_std_cxx17): ... this.
4325         (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4326         and OPT_std_gnu__1z to OPT_std_gnu__17.  Adjust set_std_cxx1z
4327         caller.
4328         (c_common_post_options): Use cxx17 instead of cxx1z.  Adjust
4329         comments.
4331 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
4333         * c-attribs.c (common_handle_aligned_attribute): Don't warn
4334         function alignment if warn_if_not_aligned_p is true.
4336 2017-09-12  Nathan Sidwell  <nathan@acm.org>
4338         * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4339         resort_sorted_fields): Move to c/c-decl.c.
4340         * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4341         (struct sorted_fields_type): Move to c/c-lang.h.
4343 2017-09-09  Jonathan Wakely  <jwakely@redhat.com>
4345         PR c++/81852
4346         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4348 2017-09-04  Marek Polacek  <polacek@redhat.com>
4350         PR c/81783
4351         * c-warn.c (warn_tautological_bitwise_comparison): New function.
4352         (warn_tautological_cmp): Call it.
4354 2017-09-01  Boris Kolpackov  <boris@codesynthesis.com>
4356         * c-opts.c (c_common_finish): Write dependency information even if
4357         there are errors.
4359 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
4361         PR c/81887
4362         * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4363         (omp_pragmas_simd): ... here.
4364         * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4365         create new clauses list containing just simd clause.
4367 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4368             Alan Hayward  <alan.hayward@arm.com>
4369             David Sherwood  <david.sherwood@arm.com>
4371         * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4372         into scalar_mode_supported_p call.
4373         (handle_mode_attribute): Update call to scalar_mode_supported_p.
4375 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4376             Alan Hayward  <alan.hayward@arm.com>
4377             David Sherwood  <david.sherwood@arm.com>
4379         * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4380         for the mode iterator.
4382 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4383             Alan Hayward  <alan.hayward@arm.com>
4384             David Sherwood  <david.sherwood@arm.com>
4386         * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4387         * c-common.c (c_build_vec_perm_expr): Likewise.
4389 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4390             Alan Hayward  <alan.hayward@arm.com>
4391             David Sherwood  <david.sherwood@arm.com>
4393         * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4395 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4396             Alan Hayward  <alan.hayward@arm.com>
4397             David Sherwood  <david.sherwood@arm.com>
4399         * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4400         before calling targetm.addr_space.valid_pointer_mode.
4402 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4403             Alan Hayward  <alan.hayward@arm.com>
4404             David Sherwood  <david.sherwood@arm.com>
4406         * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4408 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4409             Alan Hayward  <alan.hayward@arm.com>
4410             David Sherwood  <david.sherwood@arm.com>
4412         * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4413         iterators.
4414         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4416 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4417             Alan Hayward  <alan.hayward@arm.com>
4418             David Sherwood  <david.sherwood@arm.com>
4420         * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4421         case statements.
4423 2017-08-29  Martin Liska  <mliska@suse.cz>
4425         PR other/39851
4426         * c-common.c (parse_optimize_options): Add argument to function
4427         call.
4428         * c-pragma.c (handle_pragma_diagnostic): Likewise.
4430 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
4432         * c-lex.c (interpret_float): Use token location
4433         when building an EXCESS_PRECISION_EXPR.
4435 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
4437         * c-common.c (check_function_arguments): Add "arglogs" param; pass
4438         it to check_function_format.
4439         * c-common.h (check_function_arguments): Add vec<location_t> *
4440         param.
4441         (check_function_format): Likewise.
4442         * c-format.c (struct format_check_context): Add field "arglocs".
4443         (check_function_format): Add param "arglocs"; pass it to
4444         check_format_info.
4445         (check_format_info): Add param "arglocs"; use it to initialize
4446         new field of format_ctx.
4447         (check_format_arg): Pass format_ctx->arglocs to new param of
4448         check_format_info_main.
4449         (class argument_parser): New field "arglocs".
4450         (argument_parser::argument_parser): Add "arglocs_" param and use
4451         it to initialize new field.
4452         (argument_parser::check_argument_type): Pass new arglocs field to
4453         check_format_types.
4454         (check_format_info_main): Add param "arglocs", and use it when
4455         constructing arg_parser.
4456         (check_format_types): Add param "arglocs"; use it if non-NULL when
4457         !EXPR_HAS_LOCATION (cur_param) to get at location information.
4459 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
4461         PR c/53037
4462         * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4463         (c_common_attribute_table): Add warn_if_not_aligned.
4464         (handle_aligned_attribute): Renamed to ...
4465         (common_handle_aligned_attribute): Remove argument, name, and add
4466         argument, warn_if_not_aligned.  Handle warn_if_not_aligned.
4467         (handle_aligned_attribute): New.
4468         * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4470 2017-08-14  Martin Sebor  <msebor@redhat.com>
4472         PR c/81117
4473         * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4474         (handle_nonstring_attribute): New function.
4476 2017-08-14  Martin Sebor  <msebor@redhat.com>
4478         PR c/81117
4479         * c-format.h (T89_G): New macro.
4480         * c-format.c (local_gcall_ptr_node): New variable.
4481         (init_dynamic_diag_info): Initialize it.
4483 2017-08-11  Martin Liska  <mliska@suse.cz>
4485         * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4486         TARGET_SUPPORTS_ALIASES.
4488 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
4490         * c-common.c (c_parse_error): Add rich_location * param, using it
4491         rather implicitly using input_location.
4492         * c-common.h (c_parse_error): Add rich_location * param.
4494 2017-08-09  Marek Polacek  <polacek@redhat.com>
4496         * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4497         (c_common_truthvalue_conversion): Likewise.
4498         * c-omp.c (c_finish_omp_atomic): Likewise.
4499         * c-common.h (build_binary_op): Update declaration.
4501 2017-08-08  Martin Liska  <mliska@suse.cz>
4503         * c-ada-spec.c: Include header files.
4504         * c-ubsan.c: Likewise.
4505         * c-warn.c: Likewise.
4507 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
4509         PR c/69389
4510         * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4512 2017-08-07  Eric Botcazou  <ebotcazou@adacore.com>
4514         * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4515         (print_ada_methods): Likewise.
4516         (print_ada_declaration): Likewise.
4518 2017-08-07  Martin Liska  <mliska@suse.cz>
4520         * array-notation-common.c: Add new includes.
4521         * c-format.c( handle_format_attribute): Canonicalize a format
4522         function name.
4523         * c-lex.c (c_common_has_attribute): Canonicalize name of an
4524         attribute.
4525         * c-pretty-print.c: Add new include.
4527 2017-08-05  Eric Botcazou  <ebotcazou@adacore.com>
4529         * c-ada-spec.c (has_static_fields): Look only into variables.
4530         (print_constructor): Add TYPE parameter and use it for the name.
4531         (print_destructor): Likewise.
4532         (print_ada_declaration): Adjust to new constructor/destructor names.
4533         Adjust calls to print_constructor and print_destructor.
4534         (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4535         Look only into variables in the final loop.
4537 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4539         * c-ada-spec.c (has_static_fields): Look only into fields.
4540         (dump_generic_ada_node): Small tweak.
4541         (dump_nested_types): Look only into fields.
4542         (print_ada_declaration): Look only into methods.  Small tweak.
4543         (print_ada_struct_decl): Look only into fields.  Use DECL_VIRTUAL_P.
4545 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4547         * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4548         (dump_ada_function_declaration): Likewise.
4549         (dump_generic_ada_node): Likewise.
4550         (print_ada_declaration): Add support for const-qualified variables.
4552 2017-07-31  Martin Liska  <mliska@suse.cz>
4554         PR sanitize/81530
4555         * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4556         Guard condition with flag_sanitize_p also with current_function_decl
4557         non-null equality.
4558         (ubsan_maybe_instrument_reference_or_call): Likewise.
4560 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
4562         * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4564 2017-07-29  Eric Botcazou  <ebotcazou@adacore.com>
4566         * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4567         for enumeral types.
4568         (print_ada_declaration): Add missing guard for record types.
4570 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
4572         PR c/45784
4573         * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4574         rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4575         new COMPOUND_EXPRs around the rhs of the comparison.
4577 2017-07-27  Marek Polacek  <polacek@redhat.com>
4579         PR c/81417
4580         * c-warn.c (warn_for_sign_compare): Tweak the warning message.  Print
4581         the types.
4583 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
4585         * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4586         (handle_noipa_attribute): New function.
4588 2017-07-07  Torsten Duwe  <duwe@suse.de>
4590         * c-attribs.c (c_common_attribute_table): Add entry for
4591         "patchable_function_entry".
4593 2017-07-20  Nathan Sidwell  <nathan@acm.org>
4595         Remove TYPE_METHODS.
4596         * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4597         dump_ada_template, print_ada_methods,
4598         print_ada_declaration): Member fns are on TYPE_FIELDS.
4600 2017-07-18  Nathan Sidwell  <nathan@acm.org>
4602         * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4604 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
4606         * c-common.c (try_to_locate_new_include_insertion_point): New
4607         function.
4608         (per_file_includes_t): New typedef.
4609         (added_includes_t): New typedef.
4610         (added_includes): New variable.
4611         (maybe_add_include_fixit): New function.
4612         * c-common.h (maybe_add_include_fixit): New decl.
4614 2017-07-10  Martin Sebor  <msebor@redhat.com>
4616         PR other/81345
4617         * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4619 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
4621         * c-common.c (selftest::c_family_tests): New.
4622         * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4623         (selftest::c_family_tests): New decl.
4625 2017-07-04  Marek Polacek  <polacek@redhat.com>
4627         PR c/81231
4628         * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4629         types.
4631 2017-07-04  Marek Polacek  <polacek@redhat.com>
4633         * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4635 2017-06-28  Martin Liska  <mliska@suse.cz>
4637         PR ipa/81128
4638         * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4639         to a function declaration.
4641 2017-06-28  Martin Liska  <mliska@suse.cz>
4643         PR driver/79659
4644         * c.opt: Add IntegerRange to various options.
4646 2017-06-26  Marek Polacek  <polacek@redhat.com>
4648         PR c/80116
4649         * c-common.h (warn_for_multistatement_macros): Declare.
4650         * c-warn.c: Include "c-family/c-indentation.h".
4651         (warn_for_multistatement_macros): New function.
4652         * c.opt (Wmultistatement-macros): New option.
4653         * c-indentation.c (guard_tinfo_to_string): No longer static.
4654         Change the parameter type to "enum rid".  Handle RID_SWITCH.
4655         * c-indentation.h (guard_tinfo_to_string): Declare.
4657 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
4659         * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4661 2017-06-15  Martin Sebor  <msebor@redhat.com>
4663         PR c++/80560
4664         * c.opt (-Wclass-memaccess): New option.
4666 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
4668         * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4670 2017-06-13  Marek Polacek  <polacek@redhat.com>
4672         PR objc/80949
4673         * c-warn.c (do_warn_duplicated_branches): Return if any of the
4674         branches is null.
4676 2017-06-13  Martin Liska  <mliska@suse.cz>
4678         PR sanitize/78204
4679         * c-attribs.c (add_no_sanitize_value): New function.
4680         (handle_no_sanitize_attribute): Likewise.
4681         (handle_no_sanitize_address_attribute): Use the function.
4682         (handle_no_sanitize_thread_attribute): New function.
4683         (handle_no_address_safety_analysis_attribute): Use
4684         add_no_sanitize_value.
4685         (handle_no_sanitize_undefined_attribute): Likewise.
4686         * c-common.h: Declare new functions.
4687         * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4688         (ubsan_instrument_shift): Likewise.
4689         (ubsan_instrument_bounds): Likewise.
4690         (ubsan_maybe_instrument_array_ref): Likewise.
4691         (ubsan_maybe_instrument_reference_or_call): Likewise.
4693 2017-06-11  Jason Merrill  <jason@redhat.com>
4695         * c-ada-spec.c, c-pragma.c: Use id_equal.
4697 2017-06-04  Marek Polacek  <polacek@redhat.com>
4699         PR c/80919
4700         * c-format.c (matching_type_p): Return false if any of the types
4701         requires structural equality.
4703 2017-06-02  Martin Sebor  <msebor@redhat.com>
4705         PR c/80892
4706         * c-warn.c (conversion_warning): Use -Wconversion for integer
4707         conversion and -Wfloat-conversion for floating one.
4709 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4711         * c.opt (Wsizeof-pointer-div): New warning option.
4713 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
4715         * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4716         (Wcatch-value=1): Enable by -Wall.
4718 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
4720         * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4721         format_chars.
4722         * c.opt (fdiagnostics-show-template-tree): New option.
4723         (felide-type): New option.
4725 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
4727         * c.opt (Wcatch-value=): New C++ warning flag.
4729 2017-05-24  Nathan Sidwell  <nathan@acm.org>
4731         * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4732         const casts to avoid warning.
4734 2017-05-24  Martin Sebor  <msebor@redhat.com>
4736         PR c/80731
4737         * c-common.h (unsafe_conversion_p): Add a function argument.
4738         * c-common.c (unsafe_conversion_p): Same.
4739         Add type names and values to diagnostics.
4740         (scalar_to_vector): Adjust.
4741         * c-warn.c (constant_expression_error): Add a function argument.
4742         Add type names and values to diagnostics.
4743         (conversion_warning): Add a function argument.
4744         Add type names and values to diagnostics.
4745         (warnings_for_convert_and_check): Same.
4747 2017-05-19  Jason Merrill  <jason@redhat.com>
4749         * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4750         enumerators.
4752 2017-05-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4754         * c-format.c (locus): Move out of function scope,
4755         add GTY attribute.
4757 2017-05-19  Nathan Sidwell  <nathan@acm.org>
4759         * c-opts.c (class_dump_file, class_dump_flags): Delete.
4760         (c_common_parse_file): Remove class dump handling.
4761         (get_dump_info): Likewise.
4763 2017-05-19  Richard Biener  <rguenther@suse.de>
4765         PR c++/80593
4766         * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4767         to alias-set zero memory.
4769 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4771         * c-format.c (local_tree_type_node): Add GTY attribute.
4773 2017-05-18  Marek Polacek  <polacek@redhat.com>
4775         * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4776         (c_common_fixed_point_type_for_size): Likewise.
4777         (c_common_type_for_mode): Likewise.
4778         (shorten_compare): Likewise.
4779         (c_promoting_integer_type_p): Use false/true instead of 0/1.
4780         * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4782 2017-05-18  Marek Polacek  <polacek@redhat.com>
4784         * c-common.c (self_promoting_args_p): Change the return type to bool.
4785         Use false/true instead of 0/1.
4786         * c-common.h (self_promoting_args_p): Update.
4788 2017-05-17  Marek Polacek  <polacek@redhat.com>
4790         * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4791         * c-warn.c: Likewise.
4793 2017-05-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
4795         Implement new C++ intrinsics __is_assignable and __is_constructible.
4796         * c-common.c (__is_assignable, __is_constructible): New.
4797         * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4799 2017-05-17  Martin Liska  <mliska@suse.cz>
4801         * c-common.h: Introduce dump_flags_t type and
4802         use it instead of int type.
4803         * c-gimplify.c (c_genericize): Likewise.
4804         * c-opts.c: Likewise.
4806 2017-05-17  Marek Polacek  <polacek@redhat.com>
4808         * c-common.c (c_save_expr): Remove.
4809         (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4810         * c-common.h (c_save_expr): Remove declaration.
4812 2017-05-09  Volker Reichelt  <v.reichelt@netcologne.de>
4814         PR c/35441
4815         * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4816         MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4817         (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4818         (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4819         RDIV_EXPR.
4820         (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4822 2017-05-09  Marek Polacek  <polacek@redhat.com>
4824         PR c/80525
4825         * c-warn.c (unwrap_c_maybe_const): New.
4826         (warn_logical_operator): Call it.
4828 2017-05-09  Nathan Sidwell  <nathan@acm.org>
4830         * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4831         * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4833 2017-05-08  Martin Sebor  <msebor@redhat.com>
4835         PR translation/80280
4836         * c-format.h (struct format_flag_spec): Add new member.
4837         (T89_T): New macro.
4838         * c-format.c (local_tree_type_node): New global.
4839         (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4840         (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4841         (strfmon_flag_specs): Likewise.
4842         (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4843         with distinct quoting properties.
4844         (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4845         (flag_chars_t::validate): Add argument and handle bad quoting.
4846         (check_format_info_main): Handle quoting problems.
4847         (init_dynamic_diag_info): Simplify.
4849 2017-05-08  Jason Merrill  <jason@redhat.com>
4851         * c-opts.c (c_common_post_options): Update defaults for
4852         flag_abi_version and flag_abi_compat_version.
4854 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
4856         * c-common.c (c_cpp_error): Replace report_diagnostic
4857         with diagnostic_report_diagnostic.
4859 2017-05-04  Martin Sebor  <msebor@redhat.com>
4861         PR translation/80280
4862         * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4863         (handle_weakref_attribute): Same.
4865 2017-05-03  Nathan Sidwell  <nathan@acm.org>
4867         Canonicalize canonical type hashing
4868         * c-common.c (complete_array_type): Use type_hash_canon.
4870 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
4872         PR c++/80038
4873         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4874         prototype.
4875         (cilk_install_body_pedigree_operations): Likewise.
4876         * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4877         detatched.
4878         (cilk_gimplify_call_params_in_spawned_fn): Remove.
4879         (cilk_install_body_pedigree_operations): Likewise.
4880         (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4881         unwrapping.
4883 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
4885         PR c++/80534
4886         * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4887         flag on non-aggregate element types.
4889 2017-04-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4891         * c-common.c (c_type_hasher, type_hash_table): Remove.
4892         (c_common_get_alias_set): Remove unreachable code.
4893         * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4895 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
4897         * c.opt (Wextra-semi): New C++ warning flag.
4899 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
4901         PR middle-end/80423
4902         * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4904 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
4906         PR middle-end/79788
4907         PR middle-end/80375
4908         * c-common.c (c_common_type_for_mode): Don't handle
4909         widest_*_literal_type_node here.
4910         c_common_signed_or_unsigned_type): Likewise.
4911         (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4912         to *intTI_type_node or *intDI_type_node depending on whether
4913         TImode is supported by the target or not.
4915 2017-04-10  Martin Liska  <mliska@suse.cz>
4917         PR sanitizer/80350
4918         * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4919         doing an UBSAN check.
4921 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
4923         * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4925 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
4927         PR c++/79572
4928         * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4929         tree *.
4930         * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise.  Handle
4931         not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4932         REFERENCE_TYPE.
4934 2017-03-31  David Malcolm  <dmalcolm@redhat.com>
4936         PR documentation/78732
4937         * c.opt (Wendif-labels): Fix description to refer to
4938         #else rather than #elif.
4940 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
4942         PR libstdc++/80251
4943         * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4944         * c-common.c (c_common_reswords): Add __is_aggregate trait.
4946 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
4948         PR middle-end/80162
4949         * c-common.c (c_common_mark_addressable_vec): Don't set
4950         TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4952 2017-03-21  Martin Sebor  <msebor@redhat.com>
4954         PR c++/79548
4955         * c-common.c (set_underlying_type): Mark type used only when
4956         original del is declared unused.
4958 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
4960         PR translation/79848
4961         * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4962         "%qs".
4964 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
4966         PR c/79921
4967         * c-indentation.c (warn_for_misleading_indentation): Remove parens
4968         from inform's message, so that xgettext can locate it.
4970 2017-03-09  Marek Polacek  <polacek@redhat.com>
4972         PR c++/79962
4973         PR c++/79984
4974         * c-attribs.c (handle_nonnull_attribute): Save the result of default
4975         conversion to the attribute list.
4977 2017-03-09  Martin Liska  <mliska@suse.cz>
4979         * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4981 2017-03-03  Jason Merrill  <jason@redhat.com>
4983         * c.opt (Wnoexcept-type): New.
4985 2017-03-02  Richard Biener  <rguenther@suse.de>
4987         PR c/79756
4988         * c-common.c (c_common_mark_addressable_vec): Look through
4989         C_MAYBE_CONST_EXPR.
4991 2017-02-28  Martin Liska  <mliska@suse.cz>
4993         * c.opt: Replace space with tabular for options of <number>
4994         type.
4996 2017-02-28  Martin Liska  <mliska@suse.cz>
4998         * c.opt: Fix --help=option -Q for options which are of
4999         an enum type.
5001 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
5003         PR c++/79588
5004         * c-common.c (check_function_restrict): New function.
5005         (check_function_arguments): Add FNDECL argument.  Call
5006         check_function_restrict if -Wrestrict.
5007         * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5008         and NARGS.  Use auto_vec for ARG_POSITIONS, simplify.
5009         * c-common.h (check_function_arguments): Add FNDECL argument.
5010         (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5012 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
5014         * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5015         treatment of parameters with pointer-to-tagged type and tidy up.
5016         (print_ada_methods): Remove the special treatment of C++ static member
5017         functions.
5019 2017-02-22  Martin Liska  <mliska@suse.cz>
5021         * c.opt: Replace inequality signs with square brackets
5022         for -Wnornalized.
5024 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
5026         PR c++/79641
5027         * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5028         preserve quals.
5030 2017-02-17  Joseph Myers  <joseph@codesourcery.com>
5032         * c-cppbuiltin.c (builtin_define_float_constants): Define
5033         __DECIMAL_DIG__ to the value for long double.
5035 2017-02-15  Marek Polacek  <polacek@redhat.com>
5037         PR c/79515
5038         * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5039         conversion has occured.
5041 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
5043         * c-common.c (c_common_reswords): Add "__RTL".
5044         * c-common.h (enum rid): Add RID_RTL.
5046 2017-01-20  Marek Polacek  <polacek@redhat.com>
5048         PR c/64279
5049         * c-common.h (do_warn_duplicated_branches_r): Declare.
5050         * c-gimplify.c (c_genericize): Walk the function tree calling
5051         do_warn_duplicated_branches_r.
5052         * c-warn.c (expr_from_macro_expansion_r): New.
5053         (do_warn_duplicated_branches): New.
5054         (do_warn_duplicated_branches_r): New.
5055         * c.opt (Wduplicated-branches): New option.
5057 2017-01-17  David Malcolm  <dmalcolm@redhat.com>
5059         PR c++/71497
5060         * c-indentation.c (warn_for_misleading_indentation): Use the past
5061         subjunctive in the note.
5063 2017-01-17  Aldy Hernandez  <aldyh@redhat.com>
5065         PR c/79116
5066         * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5067         start type to integer_type.
5069 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
5071         PR driver/49726
5072         * c.opt (gen-decls): Add Driver flag.
5074 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5076         Revert:
5077         2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5079         PR c++/71737
5080         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5082 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5084         PR c++/71737
5085         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5087 2017-01-12  Martin Sebor  <msebor@redhat.com>
5089         (-Wformat-overflow): ...to this.
5091 2017-01-11  Martin Sebor  <msebor@redhat.com>
5093         PR c/78768
5094         * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5095         Also enable for LTO.
5097 2017-01-10  Jason Merrill  <jason@redhat.com>
5099         Implement P0195R2, C++17 variadic using.
5100         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5102 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
5104         PR translation/79019
5105         PR translation/79020
5106         * c.opt (Wnormalized=): Fix typo in description.
5108 2017-01-08  Martin Sebor  <msebor@redhat.com>
5110         PR middle-end/77708
5111         * c.opt (-Wformat-truncation): New option.
5113 2017-01-06  Alexandre Oliva  <aoliva@redhat.com>
5115         * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5116         value to unsigned short to fit in 4 hex digits without
5117         warnings.
5119 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
5121         * c.opt (fsso-struct): Add 'native' value.
5123 2017-01-05  Martin Liska  <mliska@suse.cz>
5125         PR pch/78970
5126         * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5127         header.
5129 2017-01-04  Marek Polacek  <polacek@redhat.com>
5131         PR c++/64767
5132         * c.opt (Wpointer-compare): New option.
5134 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
5136         PR driver/78957
5137         * c.opt (fsso-struct=): Add RejectNegative.
5139 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
5141         Update copyright years.
5143 2016-12-29  Martin Liska  <mliska@suse.cz>
5145         PR c/78933
5146         * c.opt (strong-eval-order): Add RejectNegative keyword.
5148 2016-12-22  Jason Merrill  <jason@redhat.com>
5150         Implement P0522R0, matching of template template arguments.
5151         * c-cppbuiltin.c (c_cpp_builtins): Define
5152         __cpp_template_template_args.
5154 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
5156         PR bootstrap/78817
5157         * c-common.c (struct nonnull_arg_ctx): New type.
5158         (check_function_nonnull): Return bool instead of void.  Use
5159         nonnull_arg_ctx as context rather than just location_t.
5160         (check_nonnull_arg): Adjust for the new context type, set
5161         warned_p to true if a warning has been diagnosed.
5162         (check_function_arguments): Return bool instead of void.
5163         * c-common.h (check_function_arguments): Adjust prototype.
5165 2016-12-21  Jason Merrill  <jason@redhat.com>
5167         * c.opt (-fnew-ttp-matching): New flag.
5168         * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5170 2016-12-14  Martin Jambor  <mjambor@suse.cz>
5172         * c-omp.c: Include omp-general.h instead of omp-low.h.
5173         (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5174         name.
5176 2016-12-14  Martin Sebor  <msebor@redhat.com>
5178         PR c/17308
5179         * c-common.c (check_nonnull_arg): Disable when optimization
5180         is enabled.
5182 2016-12-12  Marek Polacek  <polacek@redhat.com>
5184         PR c++/78647
5185         * c-common.c (attribute_fallthrough_p): Return false for
5186         error_mark_node.
5188 2016-12-08  Martin Sebor  <msebor@redhat.com>
5190         PR c/78284
5191         * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5193 2016-12-08  Martin Sebor  <msebor@redhat.com>
5195         PR c/78165
5196         * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5197         suffix.
5199 2016-12-07  Martin Sebor  <msebor@redhat.com>
5201         PR c/53562
5202         PR middle-end/77784
5203         PR middle-end/78149
5204         PR middle-end/78138
5205         * c.opt (-Wstringop-overflow): New option.
5207 2016-12-02  Maxim Ostapenko  <m.ostapenko@samsung.com>
5209         * c-attribs.c (asan odr indicator): New attribute.
5210         (handle_asan_odr_indicator_attribute): New function.
5212 2016-11-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5214         * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5215         ptrdiff_type_node;
5217 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
5219         * c-common.c (excess_precision_mode_join): New.
5220         (c_ts18661_flt_eval_method): New.
5221         (c_c11_flt_eval_method): Likewise.
5222         (c_flt_eval_method): Likewise.
5223         * c-common.h (excess_precision_mode_join): New.
5224         (c_flt_eval_method): Likewise.
5225         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5226         (cpp_iec_559_value): Call it.
5227         (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5228         call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5229         __FLT_EVAL_METHOD_TS_18661_3__.
5231 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
5233         * c-opts.c (c_common_post_options): Add logic to handle the default
5234         case for -fpermitted-flt-eval-methods.
5236 2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
5238         * c.opt (Wexpansion-to-defined): New.
5240 2016-11-23  Jakub Jelinek  <jakub@redhat.com>
5242         PR target/78451
5243         * c-pragma.c (handle_pragma_target): Don't replace
5244         current_target_pragma, but chainon the new args to the current one.
5246 2016-11-22  Nathan Sidwell  <nathan@acm.org>
5248         * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5249         indentation and formatting.
5251 2016-11-21  Martin Sebor  <msebor@redhat.com>
5253         * c.opt (-fprintf-return-value): Enable by default.
5255 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5257         PR c++/71973
5258         * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5259         * c-common.c (c_common_nodes_and_builtins): Initialize
5260         const_tm_ptr_type_node.
5262 2016-11-16  Marek Polacek  <polacek@redhat.com>
5264         PR c/78285
5265         * c-common.c (c_add_case_label): Turn error_at calls into inform.
5267 2016-11-14  Jakub Jelinek  <jakub@redhat.com>
5269         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5271 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
5272             Richard Biener  <rguenther@suse.de>
5274         * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5275         * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5276         * c.opt (fgimple): New option.
5278 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5280         PR c/35503
5281         * c-common.h (warn_for_restrict): Declare.
5282         * c-warn.c: Include gcc-rich-location.h.
5283         (warn_for_restrict): New function.
5284         * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5285         (gcc_cdiag_char_table): Likewise.
5286         (gcc_cxxdiag_char_table): Likewise.
5287         * c.opt (Wrestrict): New option.
5289 2016-11-13  Eric Botcazou  <ebotcazou@adacore.com>
5291         * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5292         for nested types only if the type is a record or union and dump SLOC.
5294 2016-11-09  Jason Merrill  <jason@redhat.com>
5296         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5298 2016-11-09  Jakub Jelinek  <jakub@redhat.com>
5300         * c-ubsan.c (ubsan_instrument_shift): Handle split
5301         -fsanitize=shift-base and -fsanitize=shift-exponent.
5303 2016-11-07  Jason Merrill  <jason@redhat.com>
5305         * c.opt (Wc++1z-compat): New.
5306         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5308 2016-11-07  Martin Liska  <mliska@suse.cz>
5310         * c-warn.c (warn_for_unused_label): Save all labels used
5311         in goto or in &label.
5313 2016-11-03  Jason Merrill  <jason@redhat.com>
5315         * c-cppbuiltin.c (c_cpp_builtins): Correct
5316         __cpp_inheriting_constructors.
5318 2016-11-01  Jason Merrill  <jason@redhat.com>
5320         * c-cppbuiltin.c (c_cpp_builtins): Update
5321         __cpp_inheriting_constructors.
5323         * c.opt (-fnew-inheriting-ctors): New.
5324         * c-opts.c: Default to on for ABI 11+.
5326 2016-10-31  Jakub Jelinek  <jakub@redhat.com>
5328         PR c++/77948
5329         * c.opt (fext-numeric-literals): Add Var and Init.
5330         * c-opts.c (c_common_handle_option): Don't clear
5331         cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5332         (c_common_post_options): Clear it here if not set
5333         explicitly.
5335 2016-10-28  Aldy Hernandez  <aldyh@redhat.com>
5337         PR debug/77773
5338         * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5339         if NULL.
5341 2016-10-25  Jakub Jelinek  <jakub@redhat.com>
5343         * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5344         * c-common.c (c_common_reswords): Add __builtin_launder.
5346 2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5348         * c-common.c (c_common_truthvalue_conversion): Warn for
5349         multiplications in boolean context.  Fix the quoting of '<<' and '<'
5350         in the shift warning.
5352 2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5354         * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5356 2016-10-20  Jason Merrill  <jason@redhat.com>
5358         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5360 2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5362         * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5363         integer shift ops in boolean context.
5365 2016-10-18  Aldy Hernandez  <aldyh@redhat.com>
5367         * c.opt (Walloca): New.
5368         (Walloca-larger-than=): New.
5369         (Wvla-larger-than=): New.
5371 2016-10-17  Marek Polacek  <polacek@redhat.com>
5373         * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5374         Return immediately when finding a match.
5375         (warn_tautological_cmp): Remove a boolean variable that is no longer
5376         needed.
5378 2016-10-17  Marek Polacek  <polacek@redhat.com>
5380         * c-attribs.c: New file.
5381         * c-common.c: Move attributes handling to c-attribs.c.
5382         (get_nonnull_operand): No longer static.
5383         * c-common.h: Move the declarations from c-attribs.c to its own section.
5385 2016-10-14  Jason Merrill  <jason@redhat.com>
5387         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5388         and __cpp_deduction_guides.
5390 2016-10-13  Jason Merrill  <jason@redhat.com>
5392         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5394 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5396         * c-cppbuiltin.c: Include memmodel.h.
5397         * c-opts.c: Likewise.
5398         * c-pragma.c: Likewise.
5399         * c-warn.c: Likewise.
5401 2016-10-12  Jakub Jelinek  <jakub@redhat.com>
5403         * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5404         (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5405         * c-opts.c (sanitize_cpp_opts): Initialize
5406         cpp_opts->cpp_warn_implicit_fallthrough.
5408 2016-10-11  Marek Polacek  <polacek@redhat.com>
5410         * c-common.c (warning_candidate_p): Change the return type to bool
5411         and return true/false instead of 1/0.
5412         (vector_mode_valid_p): Likewise.
5414 2016-10-11  Marek Polacek  <polacek@redhat.com>
5416         * c-common.c (fold_for_warn): No longer static.
5417         (bool_promoted_to_int_p): Likewise.
5418         (c_common_get_narrower): Likewise.
5419         (constant_expression_warning): Move to c-warn.c.
5420         (constant_expression_error): Likewise.
5421         (overflow_warning): Likewise.
5422         (warn_logical_operator): Likewise.
5423         (find_array_ref_with_const_idx_r): Likewise.
5424         (warn_tautological_cmp): Likewise.
5425         (expr_has_boolean_operands_p): Likewise.
5426         (warn_logical_not_parentheses): Likewise.
5427         (warn_if_unused_value): Likewise.
5428         (strict_aliasing_warning): Likewise.
5429         (sizeof_pointer_memaccess_warning): Likewise.
5430         (check_main_parameter_types): Likewise.
5431         (conversion_warning): Likewise.
5432         (warnings_for_convert_and_check): Likewise.
5433         (match_case_to_enum_1): Likewise.
5434         (match_case_to_enum): Likewise.
5435         (c_do_switch_warnings): Likewise.
5436         (warn_for_omitted_condop): Likewise.
5437         (readonly_error): Likewise.
5438         (lvalue_error): Likewise.
5439         (invalid_indirection_error): Likewise.
5440         (warn_array_subscript_with_type_char): Likewise.
5441         (warn_about_parentheses): Likewise.
5442         (warn_for_unused_label): Likewise.
5443         (warn_for_div_by_zero): Likewise.
5444         (warn_for_memset): Likewise.
5445         (warn_for_sign_compare): Likewise.
5446         (do_warn_double_promotion): Likewise.
5447         (do_warn_unused_parameter): Likewise.
5448         (record_locally_defined_typedef): Likewise.
5449         (maybe_record_typedef_use): Likewise.
5450         (maybe_warn_unused_local_typedefs): Likewise.
5451         (maybe_warn_bool_compare): Likewise.
5452         (maybe_warn_shift_overflow): Likewise.
5453         (warn_duplicated_cond_add_or_warn): Likewise.
5454         (diagnose_mismatched_attributes): Likewise.
5455         * c-common.h: Move the declarations from c-warn.c to its own section.
5456         * c-warn.c: New file.
5458 2016-10-08  Jason Merrill  <jason@redhat.com>
5460         * c-common.c (c_common_truthvalue_conversion): Don't distribute
5461         into COND_EXPR in C++.
5463 2016-10-08  Jakub Jelinek  <jakub@redhat.com>
5465         * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5466         token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5467         CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5469 2016-10-07  Jakub Jelinek  <jakub@redhat.com>
5471         Implement LWG2296 helper intrinsic
5472         * c-common.h (enum rid): Add RID_ADDRESSOF.
5473         * c-common.c (c_common_reswords): Add __builtin_addressof.
5475 2016-10-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5477         PR c++/77700
5478         * c-common.c (c_common_truthvalue_conversion): Warn also for
5479         suspicious enum values in boolean context.
5481 2016-10-06  Jakub Jelinek  <jakub@redhat.com>
5483         Implement P0258R2 - helper for C++17
5484         std::has_unique_object_representations trait
5485         * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5486         * c-common.c (c_common_reswords): Add
5487         __has_unique_object_representations.
5489 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
5491         PR sanitizer/66343
5492         * c-ubsan.c (ubsan_instrument_return): Don't call
5493         initialize_sanitizer_builtins here.
5495 2016-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5497         * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5498         conditional expression in boolean context when only one arm is
5499         non-boolean.
5501 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
5503         PR sanitizer/77823
5504         * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5505         is not integral.
5507         * c-common.c (c_common_reswords): Update comment for C++11.
5509 2016-10-04  Jason Merrill  <jason@redhat.com>
5511         * c-common.c (make_tree_vector_from_ctor): New.
5512         * c-common.h: Declare it.
5514 2016-10-04  Jakub Jelinek  <jakub@redhat.com>
5516         * c-cppbuiltin.c (c_cpp_builtins): Don't define
5517         __LIBGCC_JCR_SECTION_NAME__.
5519 2016-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5521         * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5522         left shift in boolean context.
5524 2016-09-29  Jakub Jelinek  <jakub@redhat.com>
5526         Implement P0001R1 - C++17 removal of register storage class specifier
5527         * c.opt (Wregister): New warning.
5528         * c-opts.c (c_common_post_options): Enable -Wregister by
5529         default for C++17.
5531 2016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
5533         * c-opts.c (c_common_post_options): Remove special case for
5534         TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5535         in C++.
5537 2016-09-27  Jakub Jelinek  <jakub@redhat.com>
5539         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5540         -std=c++1z.
5542         * c-ada-spec.c (print_ada_declaration): Remove break after return.
5544 2016-09-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5546         * c-common.c: Include memmodel.h.
5548 2016-09-26  Marek Polacek  <polacek@redhat.com>
5550         * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5552 2016-09-26  Marek Polacek  <polacek@redhat.com>
5554         PR c/7652
5555         * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5556         (handle_fallthrough_attribute): New function.
5557         (attribute_fallthrough_p): New function.
5558         * c-common.h (attribute_fallthrough_p): Declare.
5560 2016-09-24  Marek Polacek  <polacek@redhat.com>
5562         PR c/77490
5563         * c.opt (Wbool-operation): New.
5565 2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5567         * c-common.c (c_common_truthvalue_conversion): Inhibit
5568         Wint-in-bool-context warning with from_macro_definition_at.
5569         Mention the expression will always evaluate to true.
5571 2016-09-21  Martin Sebor  <msebor@redhat.com>
5573         PR bootstrap/77676
5574         * c.opt (fprintf-return-value): Temporarily initialize to zero
5575         to unblock bootstrap failures.
5577 2016-09-21  Jakub Jelinek  <jakub@redhat.com>
5579         PR c++/77651
5580         * c.opt (Waligned-new=): Add RejectNegative.
5581         (faligned-new=): Likewise.  Spelling fix - change
5582         aligned_new_threshhold to aligned_new_threshold.
5583         * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5584         to aligned_new_threshold.
5586 2016-09-20  Martin Sebor  <msebor@redhat.com>
5588         PR middle-end/49905
5589         * c.opt: Add -Wformat-length and -fprintf-return-value.
5591 2016-09-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5593         PR c++/77434
5594         * c.opt (Wint-in-bool-context): New warning.
5595         * c-common.c (c_common_truthvalue_conversion): Warn on integer
5596         constants in boolean context.
5598 2016-09-19  Joseph Myers  <joseph@codesourcery.com>
5600         * c-common.c (max_align_t_align): Also consider alignment of
5601         float128_type_node.
5603 2016-09-15  Jason Merrill  <jason@redhat.com>
5605         * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5606         DECL_EXTERNAL.
5608 2016-09-14  Jason Merrill  <jason@redhat.com>
5610         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5611         limit FIELD_DECL, either.
5613 2016-09-14  Marek Polacek  <polacek@redhat.com>
5615         * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5616         * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5617         * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5619 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
5621         * c-common.c (warn_logical_not_parentheses): Replace
5622         rich_location::add_fixit_insert calls with add_fixit_insert_before
5623         and add_fixit_insert_after, eliminating the "next_loc" calculation.
5625 2016-09-13  Jason Merrill  <jason@redhat.com>
5626             Tom de Vries  <tom@codesourcery.com>
5628         PR c++/77427
5629         * c-common.c (set_underlying_type): Don't treat array as builtin type.
5631 2016-09-13  Jason Merrill  <jason@redhat.com>
5633         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5634         limit types at all.
5636 2016-09-12  Jason Merrill  <jason@redhat.com>
5638         * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5639         bit/byte confusion, allow large alignment for types.
5641 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5643         PR c++/77496
5644         * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5646 2016-09-12  David Malcolm  <dmalcolm@redhat.com>
5648         PR c/72858
5649         * c-format.c (argument_parser::check_argument_type): Add params
5650         "type_start" and "conversion_char".  Use the former to generate
5651         offset_to_type_start and pass it and conversion_char to
5652         check_format_types.
5653         (check_format_info_main): Capture the start of the type
5654         information as "type_start", and pass it an format_char
5655         to arg_parser.check_argument_type.
5656         (check_format_types): Provide an example in the leading comment.
5657         Add params "offset_to_type_start" and "conversion_char"; pass
5658         them to format_type_warning calls.
5659         (test_get_modifier_for_format_len): Likewise.
5660         (matching_type_p): New function.
5661         (get_format_for_type): Add param "conversion_char" and move
5662         implementation into...
5663         (get_format_for_type_1): ...new function, called twice.
5664         Use new function matching_type_p rather than checking for
5665         TYPE_CANONICAL equality.
5666         (get_corrected_substring): New function.
5667         (format_type_warning): Provide an example in the leading comment.
5668         Add params "offset_to_type_start" and "conversion_char".  Replace
5669         call to get_format_for_type with call to get_corrected_substring
5670         and move rejection of hints for widths/precisions there.
5671         (assert_format_for_type_streq): Add param "conversion_char".
5672         (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5673         (test_get_format_for_type_printf): Add conversion chars to the
5674         tests, adding coverage for various combinations of integer
5675         vs double conversions, and for preserving octal and hexadecimal
5676         conversions.
5677         (test_get_format_for_type_scanf): Add conversion chars to the
5678         tests.
5680 2016-09-10  Tom de Vries  <tom@codesourcery.com>
5682         PR C/71602
5683         * c-common.c (build_va_arg): Handle more strict
5684         targetm.canonical_va_list_type.  Replace first argument type error with
5685         assert.
5687 2016-09-09  Martin Sebor  <msebor@redhat.com>
5689         PR c/77520
5690         PR c/77521
5691         * c-format.c (argument_parser::find_format_char_info): Use %qc
5692         format directive unconditionally.
5694 2016-09-09  Jason Merrill  <jason@redhat.com>
5696         Implement C++17 new of over-aligned types.
5697         * c.opt: Add -faligned-new and -Waligned-new.
5698         * c-common.c (max_align_t_align): Split out from...
5699         (cxx_fundamental_alignment_p): ...here.
5700         * c-common.h: Declare it.
5701         * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5703 2016-09-09  Joseph Myers  <joseph@codesourcery.com>
5705         * c-cppbuiltin.c (builtin_define_type_width): New function.
5706         (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5707         macros.
5709 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
5711         * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5712         a POINTER_TYPE.
5713         (substring_loc::get_location): Move to substring-locations.c,
5714         keeping implementation as...
5715         (c_get_substring_location): New function, from the above, reworked
5716         to use accessors rather than member lookup.
5717         * c-common.h (class substring_loc): Move to substring-locations.h,
5718         replacing with a forward decl.
5719         (c_get_substring_location): New decl.
5720         * c-format.c: Include "substring-locations.h".
5721         (format_warning_va): Move to substring-locations.c.
5722         (format_warning_at_substring): Likewise.
5724 2016-09-06  Martin Sebor  <msebor@redhat.com>
5726         PR c/77336
5727         * c-format.c (check_function_format): Avoid issuing warnings for
5728         functions unless they call format functions with non-constant
5729         format strings.
5731 2016-09-06  Richard Biener  <rguenther@suse.de>
5733         PR c/77450
5734         * c-common.c (c_common_mark_addressable_vec): Handle
5735         COMPOUND_LITERAL_EXPR.
5737 2016-09-05  Marek Polacek  <polacek@redhat.com>
5739         PR c/77423
5740         * c-common.c (bool_promoted_to_int_p): New function.
5741         (expr_has_boolean_operands_p): New function.
5742         (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5743         (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5745 2016-09-04  Tom de Vries  <tom@codesourcery.com>
5747         revert:
5748         2016-08-29  Tom de Vries  <tom@codesourcery.com>
5750         * c-common.c (build_va_arg): Replace first argument type error
5751         with assert.
5753 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
5755         PR c/65467
5756         * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5757         (c_finish_omp_for): Reject _Atomic qualified iterators.
5759 2016-09-01  Martin Sebor  <msebor@redhat.com>
5761         * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5762         size to guarantee it fits the output of the formatted function
5763         regardless of its arguments.
5765 2016-09-01  Marek Polacek  <polacek@redhat.com>
5767         PR c/7652
5768         * c-common.c (resolve_overloaded_builtin): Fix formatting.  Add
5769         FALLTHRU comments.
5771 2016-08-29  Marek Polacek  <polacek@redhat.com>
5773         PR c/77292
5774         * c-common.c (warn_logical_not_parentheses): Don't warn for
5775         a comparison or a logical operator.
5777 2016-08-29  Tom de Vries  <tom@codesourcery.com>
5779         * c-common.c (build_va_arg): Fix type comparison assert.
5781 2016-08-29  Tom de Vries  <tom@codesourcery.com>
5783         * c-common.c (build_va_arg): Replace first argument type error
5784         with assert.
5786 2016-08-29  Tom de Vries  <tom@codesourcery.com>
5788         PR c/77398
5789         * c-common.c (build_va_arg): Add first argument error.  Build va_arg
5790         with error_mark_node as va_list instead of with illegal va_list.
5792 2016-08-25  Marek Polacek  <polacek@redhat.com>
5793             David Malcolm  <dmalcolm@redhat.com>
5795         * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5796         * c-common.h (warn_logical_not_parentheses): Update declaration.
5798 2016-08-22  Marek Polacek  <polacek@redhat.com>
5800         PR c++/77321
5801         * c-common.c (warn_for_memset): Check type for null.
5803 2016-08-22  Joseph Myers  <joseph@codesourcery.com>
5805         * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
5806         _FloatNx types for suffixes for built-in functions.
5808 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
5810         PR c/32187
5811         * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5812         (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5813         (RID_FLOAT128X): New enum rid values.
5814         (CASE_RID_FLOATN_NX): New macro.
5815         * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5816         keywords.
5817         (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5818         corresponding complex types.
5819         (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5820         _FloatNx and corresponding complex types.
5821         (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5822         * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5823         and _FloatNx types for the widest type for determining
5824         DECIMAL_DIG.  Define __LDBL_DECIMAL_DIG__ as well as
5825         __DECIMAL_DIG__ for long double.  Handle FMA_SUFFIX being NULL.
5826         (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5827         and _FloatNx types.
5828         * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5829         constants.
5830         * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5831         _FloatNx types.
5833 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
5835         * c-opts.c (c_diagnostic_finalizer): Update for change to
5836         diagnostic_show_locus.
5838 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
5840         * c-common.c: Include "spellcheck.h".
5841         (cb_get_suggestion): New function.
5842         * c-common.h (cb_get_suggestion): New decl.
5843         * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5844         cb_get_suggestion.
5846 2016-08-18  Marek Polacek  <polacek@redhat.com>
5848         PR c/71514
5849         * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5850         and pointer-to-VLA.
5852 2016-08-16  David Malcolm  <dmalcolm@redhat.com>
5854         PR c/72857
5855         * c-common.c (substring_loc::get_range): Rename to...
5856         (substring_loc::get_location): ...this, converting param from a
5857         source_range * to a location_t *.  Call
5858         get_source_location_for_substring rather than
5859         get_source_range_for_substring, and pass in m_caret_idx.
5860         * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5861         (substring_loc::get_range): Replace with...
5862         (substring_loc::get_location): ...this.
5863         (substring_loc::set_caret_index): New method.
5864         (substring_loc): Add field m_caret_idx.
5865         * c-format.c (format_warning_va): Update for above changes.
5866         Rename local "substring_loc" to "fmt_substring_loc" to avoid
5867         clashing with type name.
5868         (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5869         (check_argument_type): Likewise.
5870         (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5871         Use a copy when emitting warnings, setting the caret index from TYPE.
5873 2016-08-16  Eric Botcazou  <ebotcazou@adacore.com>
5874             Arnaud Charlet  <charlet@adacore.com>
5876         * c-ada-spec.c (dump_number): New function.
5877         (handle_escape_character): Likewise.
5878         (print_ada_macros): Add handling of constant integers and strings.
5880 2016-08-12  Marek Polacek  <polacek@redhat.com>
5882         PR c/7652
5883         * c-common.c (scalar_to_vector): Adjust fall through comment.
5884         * c-opts.c (c_common_handle_option): Likewise.
5885         * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5886         * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5887         fall through comment.
5888         * cilk.c (extract_free_variables): Add FALLTHRU.
5890 2016-08-10  Jason Merrill  <jason@redhat.com>
5892         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5894 2016-08-09  Jason Merrill  <jason@redhat.com>
5896         * c-common.c (c_common_attribute_table): vector_size affects type
5897         identity.
5899 2016-08-09  Marek Polacek  <polacek@redhat.com>
5901         PR c/7652
5902         * c-ada-spec.c (dump_generic_ada_node): Add return.
5904 2016-08-09  Jason Merrill  <jason@redhat.com>
5906         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5907         C++17 constexpr lambdas.
5909 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
5911         PR c/64955
5912         * c-common.h (selftest::c_format_c_tests): New declaration.
5913         (selftest::run_c_tests): New declaration.
5914         * c-format.c: Include "selftest.h.
5915         (format_warning_va): Add param "corrected_substring" and use
5916         it to add a replacement fix-it hint.
5917         (format_warning_at_substring): Likewise.
5918         (format_warning_at_char): Update for new param of
5919         format_warning_va.
5920         (argument_parser::check_argument_type): Pass "fki" to
5921         check_format_types.
5922         (check_format_types): Add param "fki" and pass it to
5923         format_type_warning.
5924         (deref_n_times): New function.
5925         (get_modifier_for_format_len): New function.
5926         (selftest::test_get_modifier_for_format_len): New function.
5927         (get_format_for_type): New function.
5928         (format_type_warning): Add param "fki" and use it to attempt
5929         to provide hints for argument types when calling
5930         format_warning_at_substring.
5931         (selftest::get_info): New function.
5932         (selftest::assert_format_for_type_streq): New function.
5933         (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5934         (selftest::test_get_format_for_type_printf): New function.
5935         (selftest::test_get_format_for_type_scanf): New function.
5936         (selftest::c_format_c_tests): New function.
5938 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
5940         PR c/52952
5941         * c-format.c: Include "diagnostic.h".
5942         (location_column_from_byte_offset): Delete.
5943         (location_from_offset): Delete.
5944         (format_warning_va): New function.
5945         (format_warning_at_substring): New function.
5946         (format_warning_at_char): New function.
5947         (check_format_arg): Capture location of format_tree and pass to
5948         check_format_info_main.
5949         (argument_parser): Add fields "start_of_this_format" and
5950         "format_string_cst".
5951         (flag_chars_t::validate): Add param "format_string_cst".  Convert
5952         warning_at call using location_from_offset to call to
5953         format_warning_at_char.
5954         (argument_parser::argument_parser): Add param "format_string_cst_"
5955         and use use it to initialize field "format_string_cst".
5956         Initialize new field "start_of_this_format".
5957         (argument_parser::read_format_flags): Convert warning_at call
5958         using location_from_offset to a call to format_warning_at_char.
5959         (argument_parser::read_any_format_left_precision): Likewise.
5960         (argument_parser::read_any_format_precision): Likewise.
5961         (argument_parser::read_any_other_modifier): Likewise.
5962         (argument_parser::find_format_char_info): Likewise, in three places.
5963         (argument_parser::parse_any_scan_set): Likewise, in one place.
5964         (argument_parser::handle_conversions): Likewise, in two places.
5965         (argument_parser::check_argument_type): Add param "fmt_param_loc"
5966         and use it to make a substring_loc.  Pass the latter to
5967         check_format_types.
5968         (check_format_info_main): Add params "fmt_param_loc" and
5969         "format_string_cst".  Convert warning_at calls using
5970         location_from_offset to calls to format_warning_at_char.  Pass the
5971         new params to the arg_parser ctor.  Pass "format_string_cst" to
5972         flag_chars.validate.  Pass "fmt_param_loc" to
5973         arg_parser.check_argument_type.
5974         (check_format_types): Convert first param from a location_t
5975         to a const substring_loc & and rename to "fmt_loc".  Attempt
5976         to extract the range of the relevant parameter and pass it
5977         to format_type_warning.
5978         (format_type_warning): Convert first param from a location_t
5979         to a const substring_loc & and rename to "fmt_loc".  Add
5980         params "param_range" and "type".  Replace calls to warning_at
5981         with calls to format_warning_at_substring.
5983 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
5985         * c-format.c (class flag_chars_t): New class.
5986         (struct length_modifier): New struct.
5987         (class argument_parser): New class.
5988         (flag_chars_t::flag_chars_t): New ctor.
5989         (flag_chars_t::has_char_p): New method.
5990         (flag_chars_t::add_char): New method.
5991         (flag_chars_t::validate): New method.
5992         (flag_chars_t::get_alloc_flag): New method.
5993         (flag_chars_t::assignment_suppression_p): New method.
5994         (argument_parser::argument_parser): New ctor.
5995         (argument_parser::read_any_dollar): New method.
5996         (argument_parser::read_format_flags): New method.
5997         (argument_parser::read_any_format_width): New method.
5998         (argument_parser::read_any_format_left_precision): New method.
5999         (argument_parser::read_any_format_precision): New method.
6000         (argument_parser::handle_alloc_chars): New method.
6001         (argument_parser::read_any_length_modifier): New method.
6002         (argument_parser::read_any_other_modifier): New method.
6003         (argument_parser::find_format_char_info): New method.
6004         (argument_parser::validate_flag_pairs): New method.
6005         (argument_parser::give_y2k_warnings): New method.
6006         (argument_parser::parse_any_scan_set): New method.
6007         (argument_parser::handle_conversions): New method.
6008         (argument_parser::check_argument_type): New method.
6009         (check_format_info_main): Introduce classes argument_parser
6010         and flag_chars_t, moving the code within the loop into methods
6011         of these classes.  Make various locals "const".
6013 2016-08-05  David Malcolm  <dmalcolm@redhat.com>
6015         * c-common.c: Include "substring-locations.h".
6016         (get_cpp_ttype_from_string_type): New function.
6017         (g_string_concat_db): New global.
6018         (substring_loc::get_range): New method.
6019         * c-common.h (g_string_concat_db): New declaration.
6020         (class substring_loc): New class.
6021         * c-lex.c (lex_string): When concatenating strings, capture the
6022         locations of all tokens using a new obstack, and record the
6023         concatenation locations within g_string_concat_db.
6024         * c-opts.c (c_common_init_options): Construct g_string_concat_db
6025         on the ggc-heap.
6027 2016-07-29  Marek Polacek  <polacek@redhat.com>
6029         PR c/71926
6030         * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6031         parentheses warning.
6033         PR c/71574
6034         * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6036 2016-07-28  Martin Liska  <mliska@suse.cz>
6038         PR gcov-profile/68025
6039         * c-common.c (handle_no_profile_instrument_function_attribute):
6041 2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6043         * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6044         BITS_PER_UNIT_LOG.
6046 2016-07-25  Jason Merrill  <jason@redhat.com>
6048         PR c++/65970
6049         * c.opt (fconstexpr-loop-limit): New.
6051 2016-07-22  Martin Sebor  <msebor@redhat.com>
6053         PR c++/71675
6054         * c-common.c (resolve_overloaded_builtin): Avoid converting
6055         __atomic_compare_exchange_n return type to that of what its
6056         first argument points to.
6058 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
6060         * c-common.c: Use HOST_WIDE_INT_M1U instead of
6061         ~(unsigned HOST_WIDE_INT) 0.
6063 2016-07-22  Martin Liska  <mliska@suse.cz>
6065         PR gcov-profile/69028
6066         PR gcov-profile/62047
6067         * cilk.c (create_cilk_helper_decl): Set location of a new decl
6068         to the current_function_decl.
6070 2016-07-21  Jason Merrill  <jason@redhat.com>
6072         PR c++/65168
6073         * c-common.c (c_common_truthvalue_conversion): Check
6074         c_inhibit_evaluation_warnings for warning about address of
6075         reference.
6077 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6079         * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6080         const char *.
6082 2016-07-15  Jason Merrill  <jason@redhat.com>
6084         * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6086 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
6088         PR c/71858
6089         * c-common.h (enum lookup_name_fuzzy_kind): Add
6090         FUZZY_LOOKUP_FUNCTION_NAME.
6092 2016-07-08  Jason Merrill  <jason@redhat.com>
6094         P0145: Refining Expression Order for C++.
6095         * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6096         * c-opts.c: Adjust.
6098 2016-07-05  Markus Trippelsdorf  <markus@trippelsdorf.de>
6100         PR c++/71214
6101         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6103 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
6105         * c-pragma.h (enum pragma_kind): Rename
6106         PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE.  Adjust all
6107         users.
6109 2016-06-29  Richard Biener  <rguenther@suse.de>
6111         PR middle-end/71002
6112         * c-common.c (c_common_get_alias_set): Remove union type punning case.
6114 2016-06-24  Jason Merrill  <jason@redhat.com>
6116         P0145R2: Refining Expression Order for C++.
6117         * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6118         MODIFY_EXPR.
6120 2016-06-24  Jakub Jelinek  <jakub@redhat.com>
6122         * c-common.c (check_builtin_function_arguments): Require last
6123         argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6124         Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6125         if the last argument is pointer to enumerated or boolean type.
6127 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
6129         PR c/70339
6130         * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6131         (lookup_name_fuzzy): New prototype.
6133 2016-06-21  John David Anglin  <danglin@gcc.gnu.org>
6135         * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6137 2016-06-14  Jason Merrill  <jason@redhat.com>
6139         P0145R2: Refining Expression Order for C++.
6140         * c.opt (fargs-in-order): New.
6141         * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6143 2016-06-13  Jakub Jelinek  <jakub@redhat.com>
6145         PR sanitizer/71498
6146         * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6147         all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6149         PR preprocessor/71183
6150         * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6151         to cb_get_source_date_epoch.
6153 2016-06-10  Jakub Jelinek  <jakub@redhat.com>
6155         PR c/68657
6156         * c.opt (Wpsabi): Add Warning flag.
6158 2016-06-10  Martin Sebor  <msebor@redhat.com>
6160         PR c/71392
6161         * c-common.c (handle_nonnull_attribute): Accept
6162         the nonnull attribute in type-generic builtins.
6164 2016-06-09  Martin Sebor  <msebor@redhat.com>
6166         PR c/70883
6167         * c-common.c (builtin_function_validate_nargs): Make text of error
6168         message consistent with others like it.
6170 2016-06-08  Martin Sebor  <msebor@redhat.com>
6171             Jakub Jelinek  <jakub@redhat.com>
6173         PR c++/70507
6174         PR c/68120
6175         * c-common.c (check_builtin_function_arguments): Handle
6176         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6178 2016-06-08  Richard Biener  <rguenther@suse.de>
6180         * c-common.c (parse_optimize_options): Improve diagnostic messages.
6182 2016-06-07  Richard Biener  <rguenther@suse.de>
6184         PR c/61564
6185         * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6186         options and warn about others.
6188 2016-06-01  Eduard Sanou  <dhole@openmailbox.org>
6190         * c-common.c (get_source_date_epoch): Rename to
6191         cb_get_source_date_epoch.
6192         * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6193         message when the parsing fails.  Use error_at instead of fatal_error.
6194         * c-common.h (get_source_date_epoch): Rename to
6195         cb_get_source_date_epoch.
6196         * c-common.h (cb_get_source_date_epoch): Prototype.
6197         * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6198         * c-common.h (c_omp_region_type): Remove trailing comma.
6199         * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6200         * c-lex.c (c_lex_with_flags): Remove initialization of
6201         pfile->source_date_epoch.
6203 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
6205         PR c++/71349
6206         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6207         C_OMP_CLAUSE_SPLIT_TARGET.  Put OMP_CLAUSE_NOWAIT to
6208         C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6209         instead of C_OMP_CLAUSE_SPLIT_FOR.
6211 2016-05-24  Richard Biener  <rguenther@suse.de>
6213         PR middle-end/70434
6214         PR c/69504
6215         * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6216         (convert_vector_to_array_for_subscript): ... this.
6217         * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6218         VIEW_CONVERT_EXPR to an array type.  Rename to ...
6219         (convert_vector_to_array_for_subscript): ... this.
6221 2016-05-12  Marek Polacek  <polacek@redhat.com>
6223         PR c/70756
6224         * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6225         size_in_bytes and pass LOC to it.
6227 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
6229         PR c/43651
6230         * c.opt (Wduplicate-decl-specifier): New option.
6232 2016-05-11  Marek Polacek  <polacek@redhat.com>
6234         PR c++/71024
6235         * c-common.c (diagnose_mismatched_attributes): New function.
6236         * c-common.h (diagnose_mismatched_attributes): Declare.
6238 2016-05-04  Marek Polacek  <polacek@redhat.com>
6240         * c.opt (Wdangling-else): New option.
6242 2016-05-03  Marek Polacek  <polacek@redhat.com>
6244         PR c/70859
6245         * c-common.c (builtin_function_validate_nargs): Add location
6246         parameter.  Use it.
6247         (check_builtin_function_arguments): Add location and arguments
6248         parameters.  Use them.
6249         * c-common.h (check_builtin_function_arguments): Update declaration.
6251 2016-05-03  Richard Biener  <rguenther@suse.de>
6253         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6254         allow call args to gimplify to SSA names.
6256 2016-05-03  Marek Polacek  <polacek@redhat.com>
6258         * c-common.h (enum c_omp_region_type): Remove stray comma.
6260 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
6262         * c-common.h (enum c_omp_region_type): Define.
6264 2016-05-02  Richard Sandiford  <richard.sandiford@arm.com>
6266         * c-common.c (shorten_compare): Use wi::to_wide.
6268 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
6270         PR middle-end/70626
6271         * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6272         * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6273         reduction clauses in acc parallel loops.
6275 2016-04-29  Marek Polacek  <polacek@redhat.com>
6277         PR c/70852
6278         * c-common.c (warn_for_memset): Check domain before accessing it.
6280 2016-04-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
6282         PR/69089
6283         * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6284         "aligned" attribute.
6286 2016-04-28  Jason Merrill  <jason@redhat.com>
6288         * c-lex.c (c_common_has_attribute): Handle nodiscard.
6290 2016-04-28  Eduard Sanou  <dhole@openmailbox.org>
6291             Matthias Klose  <doko@debian.org>
6293         * c-common.c (get_source_date_epoch): New function, gets the environment
6294         variable SOURCE_DATE_EPOCH and parses it as long long with error
6295         handling.
6296         * c-common.h (get_source_date_epoch): Prototype.
6297         * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6299 2015-04-27  Ryan Burn  <contact@rnburn.com>
6301         PR c++/69024
6302         PR c++/68997
6303         * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6304         (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6305         external linkage.
6306         (cilk_detect_and_unwrap): Corresponding changes.
6307         (extract_free_variables): Don't extract free variables from
6308         AGGR_INIT_EXPR slot.
6309         * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6310         (cilk_recognize_spawn): Likewise.
6312 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
6314         * c.opt (Wmemset-elt-size): New option.
6315         * c-common.c (warn_for_memset): New function.
6316         * c-common.h (warn_for_memset): Declare.
6318 2016-04-25  Jason Merrill  <jason@redhat.com>
6320         * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6321         No longer static.
6322         * c-common.h: Declare it.
6323         * c-lex.c (c_common_has_attribute): Add maybe_unused.
6325 2016-04-22  Jason Merrill  <jason@redhat.com>
6327         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6329 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
6331         PR c++/69363
6332         * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6333         * c-common.h (c_finish_cilk_clauses): Remove declaration.
6335 2016-04-18  Michael Matz  <matz@suse.de>
6337         * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6338         and SET_DECL_ALIGN.
6340 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6342         * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6343         (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6344         to incomplete types.
6345         (dump_nested_type): Remove redundant tests and tidy up.
6346         (print_ada_declaration): Also set TREE_VISITED on the declaration of
6347         a type which is the typedef of an original type.
6349 2016-04-15  Marek Polacek  <polacek@redhat.com>
6351         PR c/70651
6352         * c-common.c (build_va_arg): Change two asserts into errors and return
6353         error_mark_node.
6355 2016-04-13  Marek Polacek  <polacek@redhat.com>
6357         PR c++/70639
6358         * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6359         for switch statements, too.
6361 2016-03-28  Jason Merrill  <jason@redhat.com>
6363         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6365 2016-03-23  Marek Polacek  <polacek@redhat.com>
6367         PR c++/69884
6368         * c.opt (Wignored-attributes): New option.
6370 2016-03-22  David Malcolm  <dmalcolm@redhat.com>
6372         PR c/69993
6373         * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6374         diagnostic text, reversing the order of the warning and note so
6375         that they appear in source order.
6377 2016-03-17  Marek Polacek  <polacek@redhat.com>
6379         PR c/69407
6380         * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6381         operations.
6383 2016-03-14  Jason Merrill  <jason@redhat.com>
6385         * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6387         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6389 2016-03-09  Richard Biener  <rguenther@suse.de>
6391         PR c/70143
6392         * c-common.c (strict_aliasing_warning): Add back
6393         alias_sets_conflict_p check.
6395 2016-03-08  Jason Merrill  <jason@redhat.com>
6397         * c-opts.c (set_std_cxx1z): Don't enable concepts.
6399 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
6401         PR c/68187
6402         * c-indentation.c (get_visual_column): Move code to determine next
6403         tab stop to...
6404         (next_tab_stop): ...this new function.
6405         (line_contains_hash_if): Delete function.
6406         (detect_preprocessor_logic): Delete function.
6407         (get_first_nws_vis_column): New function.
6408         (detect_intervening_unindent): New function.
6409         (should_warn_for_misleading_indentation): Replace call to
6410         detect_preprocessor_logic with a call to
6411         detect_intervening_unindent.
6413 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
6415         PR c/68187
6416         * c-indentation.c (should_warn_for_misleading_indentation): When
6417         suppressing warnings about cases where the guard and body are on
6418         the same column, only use the first non-whitespace column in place
6419         of the guard token column when dealing with "else" clauses.
6420         When rejecting aligned BODY and NEXT, loosen the requirement
6421         from equality with the first non-whitespace of guard to simply
6422         that they not be indented relative to it.
6424 2016-03-04  Richard Biener  <rguenther@suse.de>
6426         PR c++/70054
6427         * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6428         instead of alias_sets_conflict_p.
6430 2016-03-01  Marek Polacek  <polacek@redhat.com>
6432         PR c++/69795
6433         * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6434         any DECL.
6436 2016-02-22  Martin Sebor  <msebor@redhat.com>
6438         PR middle-end/69780
6439         * c-common.c (check_builtin_function_arguments): Validate and
6440         reject invalid arguments to __builtin_alloca_with_align.
6442 2016-02-20  Mark Wielaard  <mjw@redhat.com>
6444         PR c/28901
6445         * c.opt (Wunused-const-variable): Turn into Alias for...
6446         (Wunused-const-variable=): New option.
6448 2016-02-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6450         PR c++/69865
6451         * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6452         here...
6453         (c_common_init_options): ...to here.
6454         (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6456 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
6458         PR c++/69826
6459         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6460         (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6461         flag_preprocess_only.
6463 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
6465         PR c/69835
6466         * c.opt (Wnonnull-compare): Enable for -Wall.
6468 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
6470         PR c++/69797
6471         * c-common.c (sync_resolve_size): Diagnose too few arguments
6472         even when params is non-NULL empty vector.
6474 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
6476         PR target/60410
6477         * c.opt (fshort-double): Remove.
6479 2016-02-05  Martin Sebor  <msebor@redhat.com>
6481         PR c++/69662
6482         * c.opt (Warning options): Update -Wplacement-new to take
6483         an optional argument.
6485 2016-02-01  Jakub Jelinek  <jakub@redhat.com>
6487         PR preprocessor/69543
6488         PR c/69558
6489         * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6490         instead of loc to control_warning_option.
6492 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
6494         * c.opt (fopenacc-dim=): New option.
6496 2016-01-27  Ryan Burn  <contact@rnburn.com>
6498         PR cilkplus/69267
6499         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6500         gimplify_arg. Removed superfluous post_p argument.
6501         * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6502         superfluous post_p argument.
6503         * c-gimplify.c (c_gimplify_expr): Likewise.
6505 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
6507         PR other/69006
6508         * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6509         pp_newline_and_flush with pp_flush.
6511 2016-01-20  Martin Sebor  <msebor@redhat.com>
6513         PR c/69405
6514         * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6515         an incompatible argument when the argument isn't a valid tree node.
6517 2016-01-18  Jason Merrill  <jason@redhat.com>
6519         PR c++/68767
6520         * c-common.c (check_function_arguments_recurse): Fold the whole
6521         COND_EXPR, not just the condition.
6523 2016-01-18  Tom de Vries  <tom@codesourcery.com>
6525         * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6526         classify as loop clause.
6528 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
6530         PR bootstrap/68271
6531         * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6532         C++ FE no longer has limit on number of pragmas.
6534 2015-01-14  Ryan Burn  <contact@rnburn.com>
6536         PR c++/69048
6537         * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
6538         to add missing cleanup point.
6540 2016-01-14  David Malcolm  <dmalcolm@redhat.com>
6542         PR c++/68819
6543         * c-indentation.c (get_visual_column): Add location_t param.
6544         Handle the column number being zero by effectively disabling the
6545         warning, with an "inform".
6546         (should_warn_for_misleading_indentation): Add location_t argument
6547         for all uses of get_visual_column.
6549 2016-01-10  Patrick Palka  <ppalka@gcc.gnu.org>
6551         PR c++/69029
6552         * c-indentation.c (should_warn_for_misleading_indentation):
6553         Don't warn about do-while statements.
6555 2016-01-07  Martin Sebor  <msebor@redhat.com>
6557         PR c/68966
6558         * c-common.c (sync_resolve_size): Reject first argument when it's
6559         a pointer to _Bool.
6561 2016-01-05  David Malcolm  <dmalcolm@redhat.com>
6563         PR c/69122
6564         * c-indentation.c (get_visual_column): Remove default argument.
6565         (should_warn_for_misleading_indentation): For the multiline case,
6566         update call to get_visual_column for next_stmt_exploc so that it
6567         captures the location of the first non-whitespace character in the
6568         relevant line.  Don't issue warnings if there is non-whitespace
6569         before the next statement.
6571 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
6573         Update copyright years.
6575 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
6577         * c-common.c (binary_op_error): Convert first param from
6578         location_t to rich_location * and use it when emitting an error.
6579         * c-common.h (binary_op_error): Convert first param from
6580         location_t to rich_location *.
6582 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6584         * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6585         * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6587 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
6589         * c-common.c (c_common_attribute_table): Handle "omp declare target
6590         link" attribute.
6592 2015-12-14  Jakub Jelinek  <jakub@redhat.com>
6594         PR c/68833
6595         * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6597 2014-12-12  Tobias Burnus  <burnus@net-b.de>
6599         PR fortran/68815
6600         * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6601         specifiers (%d, %i,%u and %c).
6603 2015-12-10  David Malcolm  <dmalcolm@redhat.com>
6605         * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6607 2015-12-08  Jakub Jelinek  <jakub@redhat.com>
6609         PR c/48088
6610         PR c/68657
6611         * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6612         * c-pragma.c (handle_pragma_diagnostic): Adjust
6613         control_warning_option caller.
6615 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
6617         * c-common.c (c_cpp_error): Update for change to
6618         rich_location::set_range.
6620 2015-12-04  Paolo Bonzini  <bonzini@gnu.org>
6622         * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6623         shifting 1 out of the sign bit.
6625 2015-12-04  Kirill Yukhin  <kirill.yukhin@intel.com>
6627         * c-common.c (c_common_attribute_table[]): Update max arguments
6628         count for "simd" attribute.
6629         (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6631 2015-12-03  Jakub Jelinek  <jakub@redhat.com>
6633         PR preprocessor/57580
6634         * c-ppoutput.c (print): Change printed field to bool.
6635         Move src_file last for smaller padding.
6636         (init_pp_output): Set print.printed to false instead of 0.
6637         (scan_translation_unit): Fix up formatting.  Set print.printed
6638         to true after printing something other than newline.
6639         (scan_translation_unit_trad): Set print.printed to true instead of 1.
6640         (maybe_print_line_1): Set print.printed to false instead of 0.
6641         (print_line_1): Likewise.
6642         (do_line_change): Set print.printed to true instead of 1.
6643         (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6644         dump_macro): Set print.printed to false after printing newline.
6646 2015-12-02  Jason Merrill  <jason@redhat.com>
6648         * c-common.c (fold_for_warn): New.
6649         (warn_logical_operator, warn_tautological_cmp)
6650         (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6652         * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6653         (c_fully_fold_internal, decl_constant_value_for_optimization):
6654         Move to c/c-fold.c.
6655         * c-common.h: Don't declare decl_constant_value_for_optimization.
6657 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
6659         PR c/68162
6660         * c-common.h (c_build_qualified_type): Add extra default
6661         arguments.
6663 2015-12-01  Julian Brown  <julian@codesourcery.com>
6664             Cesar Philippidis  <cesar@codesourcery.com>
6665             James Norris  <James_Norris@mentor.com>
6667         * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6668         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6669         (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6671 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
6673         * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6674         (decl_sloc_common): Delete and move bulk of processing to...
6675         (decl_sloc): ...here.
6676         (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6677         (dump_ada_double_name): Remove S parameter and compute the suffix.
6678         (dump_ada_array_type): Add PARENT parameter.  Simplify computation of
6679         element type and deal with an anonymous one.
6680         (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6681         (dump_generic_ada_node): Tweak.  Adjust call to dump_ada_array_type
6682         and remove reference to QUAL_UNION_TYPE.
6683         (dump_nested_types): Make 2 passes on the fields and move bulk to...
6684         (dump_nested_type): ...here.  New function extracted from above.
6685         Generate a full declaration for anonymous element type of arrays.
6686         (print_ada_declaration): Really skip anonymous declarations.  Remove
6687         references to QUAL_UNION_TYPE.  Adjust call to dump_ada_array_type.
6688         Clean up processing of declarations of array types and objects.
6689         (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6690         Remove obsolete code and tidy up.
6692 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
6694         PR c/67581
6695         * c-common.c (handle_transparent_union_attribute): Update
6696         also type variants.
6698 2015-11-27  Martin Liska  <mliska@suse.cz>
6700         PR c++/68312
6701         * array-notation-common.c (cilkplus_extract_an_triplets):
6702         Release vector of vectors.
6703         * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6705 2015-11-26  Eric Botcazou  <ebotcazou@adacore.com>
6707         PR c++/68527
6708         * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6709         (print_ada_struct_decl): Likewise.
6711 2015-11-23  Igor Zamyatin  <igor.zamyatin@intel.com>
6713         PR c++/68001
6714         * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6715         * cilk.c (recognize_spawn): Determine location in a more precise
6716         way.
6718 2015-11-19  Jason Merrill  <jason@redhat.com>
6720         * c-common.c (shorten_compare): But look through macros from
6721         system headers.
6723 2015-11-18  Jason Merrill  <jason@redhat.com>
6725         * c-common.c (shorten_compare): Don't -Wtype-limits if the
6726         non-constant operand comes from a macro.
6728 2015-11-17  Jason Merrill  <jason@redhat.com>
6730         PR bootstrap/68346
6731         * c-common.c (warn_tautological_cmp): Fold before checking for
6732         constants.
6734 2015-11-16  Marek Polacek  <polacek@redhat.com>
6736         PR c++/68362
6737         * c-common.c (check_case_bounds): Fold low and high cases.
6739 2015-11-16  Marek Polacek  <polacek@redhat.com>
6741         * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6742         * c-common.c (c_common_get_alias_set): Likewise.
6743         (handle_visibility_attribute): Likewise.
6745 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
6747         * c-common.c (handle_simd_attribute): New.
6748         (struct attribute_spec): Add entry for "simd".
6749         (handle_simd_attribute): New.
6751 2015-11-13  Kai Tietz  <ktietz70@googlemail.com>
6753         * c-lex.c (interpret_float): Use fold_convert.
6755 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
6757         * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6758         and store it on the result.
6759         * c-opts.c (c_common_init_options): Set
6760         global_dc->colorize_source_p.
6762 2015-11-12  James Norris  <jnorris@codesourcery.com>
6763             Joseph Myers  <joseph@codesourcery.com>
6765         * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6766         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6767         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6768         PRAGMA_OACC_CLAUSE_LINK.
6770 2015-11-11  Marek Polacek  <polacek@redhat.com>
6772         PR c/68107
6773         PR c++/68266
6774         * c-common.c (valid_array_size_p): New function.
6775         * c-common.h (valid_array_size_p): Declare.
6777 2015-11-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
6779         PR bootstrap/68271
6780         * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6782 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
6784         * array-notation-common.c: Remove unused header files.
6785         * c-ada-spec.c: Likewise.
6786         * c-cilkplus.c: Likewise.
6787         * c-common.c: Likewise.
6788         * c-cppbuiltin.c: Likewise.
6789         * c-dump.c: Likewise.
6790         * c-format.c: Likewise.
6791         * c-gimplify.c: Likewise.
6792         * c-indentation.c: Likewise.
6793         * c-lex.c: Likewise.
6794         * c-omp.c: Likewise.
6795         * c-opts.c: Likewise.
6796         * c-pch.c: Likewise.
6797         * c-ppoutput.c: Likewise.
6798         * c-pragma.c: Likewise.
6799         * c-pretty-print.c: Likewise.
6800         * c-semantics.c: Likewise.
6801         * c-ubsan.c: Likewise.
6802         * cilk.c: Likewise.
6803         * stub-objc.c: Likewise.
6805 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
6806             Cesar Philippidis  <cesar@codesourcery.com>
6807             James Norris  <jnorris@codesourcery.com>
6808             Julian Brown  <julian@codesourcery.com>
6809             Nathan Sidwell  <nathan@codesourcery.com>
6811         * c-pragma.c (oacc_pragmas): Add "routine".
6812         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6814 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
6816         * c-common.c (c_common_attributes): Add scalar_storage_order.
6817         (handle_scalar_storage_order_attribute): New function.
6818         * c-pragma.c (global_sso): New variable.
6819         (maybe_apply_pragma_scalar_storage_order): New function.
6820         (handle_pragma_scalar_storage_order): Likewise.
6821         (init_pragma): Register scalar_storage_order.
6822         * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6823         * c.opt (Wscalar-storage-order): New warning.
6824         (fsso-struct=): New option.
6826 2015-11-08  Martin Sebor  <msebor@redhat.com>
6828         * c.opt (Wplacement-new): Add a period to the end of a sentence.
6830 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
6832         * c-common.c: Don't undef DEF_BUILTIN.
6834 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
6836         * c-common.c (c_cpp_error): Convert parameter from location_t to
6837         rich_location *.  Eliminate the "column_override" parameter and
6838         the call to diagnostic_override_column.
6839         Update the "done_lexing" clause to set range 0
6840         on the rich_location, rather than overwriting a location_t.
6841         * c-common.h (c_cpp_error): Convert parameter from location_t to
6842         rich_location *.  Eliminate the "column_override" parameter.
6844 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
6845             Thomas Schwinge  <thomas@codesourcery.com>
6846             James Norris  <jnorris@codesourcery.com>
6848         * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6849         AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses.  Associate REDUCTION
6850         clauses with parallel and kernels and loops.
6851         * c-pragma.h (enum pragma_omp_clause): Add entries for
6852         PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6853         * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6854         NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6855         INDEPENDENT,SEQ}.
6856         (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6858 2015-11-05  Martin Sebor  <msebor@redhat.com>
6860         PR c++/67942
6861         * c.opt (-Wplacement-new): New option.
6863 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
6865         * c-common.h (c_finish_omp_atomic): Add TEST argument.
6866         (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6867         * c-omp.c (c_finish_omp_atomic): Add TEST argument.  Don't call
6868         save_expr or create_tmp_var* if TEST is true.
6869         (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6870         Don't call add_stmt here.
6871         (struct c_omp_check_loop_iv_data): New type.
6872         (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6873         c_omp_check_loop_iv_exprs): New functions.
6874         (c_omp_split_clauses): Adjust for lastprivate being allowed on
6875         distribute.
6876         (c_omp_declare_simd_clauses_to_numbers): Change
6877         OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6878         (c_omp_declare_simd_clauses_to_decls): Similarly change those
6879         from numbers to PARM_DECLs.
6881 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
6883         * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6884         flag_checking.
6886 2015-11-03  Bernd Schmidt  <bschmidt@redhat.com>
6888         PR c++-common/67882
6889         * c-common.h (fold_offsetof_1): Add argument.
6890         * c-common.c (fold_offsetof_1): Diagnose more invalid
6891         offsetof expressions that reference elements past the end of
6892         an array.
6894 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
6895             Chung-Lin Tang  <cltang@codesourcery.com>
6897         * c-pragma.c (oacc_pragmas): Add "atomic".
6898         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6900 2015-10-30  Evgeny Stupachenko  <evstupac@gmail.com>
6902         * c-common.c (handle_target_clones_attribute): New.
6903         (c_common_attribute_table): Add handle_target_clones_attribute.
6904         (handle_always_inline_attribute): Add check on target_clones attribute.
6905         (handle_target_attribute): Ditto.
6907 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
6909         * array-notation-common.c: Reorder #include's and remove duplicates.
6910         * c-ada-spec.c: Likewise.
6911         * c-cilkplus.c: Likewise.
6912         * c-common.c: Likewise.
6913         * c-cppbuiltin.c: Likewise.
6914         * c-dump.c: Likewise.
6915         * c-format.c: Likewise.
6916         * c-gimplify.c: Likewise.
6917         * c-indentation.c: Likewise.
6918         * c-lex.c: Likewise.
6919         * c-omp.c: Likewise.
6920         * c-opts.c: Likewise.
6921         * c-pch.c: Likewise.
6922         * c-ppoutput.c: Likewise.
6923         * c-pragma.c: Likewise.
6924         * c-pretty-print.c: Likewise.
6925         * c-semantics.c: Likewise.
6926         * c-ubsan.c: Likewise.
6927         * cilk.c: Likewise.
6928         * stub-objc.c: Likewise.
6930 2015-10-28  Jason Merrill  <jason@redhat.com>
6932         * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6934 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
6935             James Norris  <jnorris@codesourcery.com>
6936             Cesar Philippidis  <cesar@codesourcery.com>
6938         PR c/64765
6939         PR c/64880
6940         * c-common.h (c_oacc_split_loop_clauses): Declare function.
6941         * c-omp.c (c_oacc_split_loop_clauses): New function.
6943 2015-10-21  Martin Sebor  <msebor@redhat.com>
6945         PR driver/68043
6946         * c.opt: End each sentence that describes an option with a period.
6948 2015-10-20  Marek Polacek  <polacek@redhat.com>
6950         * array-notation-common.c (is_cilkplus_vector_p): Define.
6951         * c-common.h (is_cilkplus_vector_p): Declare.
6953 2015-10-20  Marek Polacek  <polacek@redhat.com>
6955         * c.opt (std=gnu++11): Do not describe as experimental.
6956         (std=gnu++14): Likewise.
6958 2015-10-19  Jason Merrill  <jason@redhat.com>
6960         * c-cppbuiltin.c (c_cpp_builtins): Define
6961         __cpp_nontype_template_args.
6963 2015-10-19  Jason Merrill  <jason@redhat.com>
6965         * c-cppbuiltin.c (c_cpp_builtins): Define
6966         __cpp_enumerator_attributes, __cpp_fold_expressions,
6967         __cpp_unicode_characters.
6969 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
6970             Aldy Hernandez  <aldyh@redhat.com>
6972         * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6973         DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6974         (c_define_builtins): Likewise.
6975         * c-common.h (enum c_omp_clause_split): Add
6976         C_OMP_CLAUSE_SPLIT_TASKLOOP.
6977         (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6978         (c_finish_omp_for): Add ORIG_DECLV argument.
6979         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6980         201511 instead of 201307.
6981         * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6982         OMP_CRITICAL_CLAUSES to it.
6983         (c_finish_omp_ordered): Add CLAUSES argument, set
6984         OMP_ORDERED_CLAUSES to it.
6985         (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6986         to it if OMP_FOR.  Clear DECL_INITIAL on the IVs.
6987         (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6988         constructs and new OpenMP 4.5 clauses.  Clear
6989         OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD.  Add
6990         verification code.
6991         * c-pragma.c (omp_pragmas_simd): Add taskloop.
6992         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6993         (enum pragma_omp_clause): Add
6994         PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6995         and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6997 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
6999         * c-lex.c (interpret_float): Use real_equal instead of
7000         REAL_VALUES_EQUAL.
7002 2015-10-04  Jason Merrill  <jason@redhat.com>
7004         Implement N4514, C++ Extensions for Transactional Memory.
7005         * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7006         (c_common_attribute_table): Add transaction_safe_dynamic.
7007         transaction_safe now affects type identity.
7008         (handle_tm_attribute): Handle transaction_safe_dynamic.
7009         * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7010         RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7011         (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7012         (D_TRANSMEM): New.
7013         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7014         * c-pretty-print.c (pp_c_attributes_display): Don't print
7015         transaction_safe in C++.
7017 2015-10-02  Marek Polacek  <polacek@redhat.com>
7019         * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7021 2015-10-02  Marek Polacek  <polacek@redhat.com>
7023         PR c/64249
7024         * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7025         * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7026         * c.opt (Wduplicated-cond): New option.
7028 2015-10-01  Joseph Myers  <joseph@codesourcery.com>
7030         * c.opt (std=c11): Do not describe as experimental.
7031         (std=gnu11): Likewise.
7032         (std=iso9899:2011): Likewise.
7034 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
7036         * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7037         (DEF_FUNCTION_TYPE_VAR_11): Delete.
7039 2015-09-25  Marek Polacek  <polacek@redhat.com>
7041         * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7042         (ubsan_instrument_shift): Likewise.
7044 2015-09-25  Marek Polacek  <polacek@redhat.com>
7046         PR sanitizer/64906
7047         * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7049 2015-09-24  Patrick Palka  <ppalka@gcc.gnu.org>
7051         * c-indentation.c (should_warn_for_misleading_indentation):
7052         Compare next_stmt_vis_column with guard_line_first_nws instead
7053         of with guard_line_vis_column.
7055 2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7057         PR c/49654
7058         PR c/49655
7059         * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7060         options and options not valid for the current language.
7062 2015-09-22  Patrick Palka  <ppalka@gcc.gnu.org>
7064         * c-indentation.c (should_warn_for_misleading_indentation):
7065         Float out and consolidate the calls to get_visual_column that
7066         are passed guard_exploc as an argument.  Compare
7067         next_stmt_vis_column with guard_line_first_nws instead of with
7068         body_line_first_nws.
7070 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
7072         * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7073         Wnamespaces): New C++ warnings.
7075 2015-09-22  Jason Merrill  <jason@redhat.com>
7077         * c-common.h (abi_compat_version_crosses): New.
7078         (warn_abi_version): Declare.
7079         * c-common.c: Define it.
7080         * c-opts.c (c_common_post_options): Handle it.
7081         flag_abi_compat_version defaults to 8.
7083 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
7085         Complete the implementation of N4230, Nested namespace definition.
7086         * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7087         __cpp_nested_namespace_definitions.
7089 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7091         * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7093 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7095         * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7096         when warning.
7097         * c-pragma.h (pragma_lex): Add optional loc argument.
7099 2015-09-16  Mikhail Maltsev  <maltsevm@gmail.com>
7101         * c-format.c (check_format_arg): Adjust to use common block size in all
7102         object pools.
7104 2015-09-15  David Malcolm  <dmalcolm@redhat.com>
7106         * c-format.c (location_from_offset): Update for change in
7107         signature of location_get_source_line.
7108         * c-indentation.c (get_visual_column): Likewise.
7109         (line_contains_hash_if): Likewise.
7111 2015-09-14  Marek Polacek  <polacek@redhat.com>
7113         * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7114         setting various warnings.
7116 2015-09-14  Marek Polacek  <polacek@redhat.com>
7118         * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7119         a negative value.
7121 2015-09-11  Mark Wielaard  <mjw@redhat.com>
7123         PR c/28901
7124         * c.opt (Wunused-variable): Option from common.opt.
7125         (Wunused-const-variable): New option.
7127 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
7129         PR c++/53184
7130         * c.opt ([Wsubobject-linkage]): Add.
7132 2015-09-03  Martin Sebor  <msebor@redhat.com>
7134         PR c/66516
7135         * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7136         functions.
7137         * c-common.c (reject_gcc_builtin): Define.
7139 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7141         PR middle-end/60586
7142         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7143         prototype.
7144         * c-gimplify.c (c_gimplify_expr): Added a call to the function
7145         cilk_gimplify_call_params_in_spawned_fn.
7146         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7147         (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7148         unwrapping.
7150 2015-08-25  Marek Polacek  <polacek@redhat.com>
7152         PR middle-end/67330
7153         * c-common.c (handle_weak_attribute): Don't check whether the
7154         visibility can be changed here.
7156 2015-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7158         * c-lex.c (c_lex_with_flags): Use explicit locations.
7160 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
7162         * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7163         c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7165 2015-08-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7167         PR middle-end/36757
7168         * c-common.c (check_builtin_function_arguments): Add check
7169         for BUILT_IN_SIGNBIT argument.
7171 2015-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
7173         PR c++/67160
7174         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7175         in c++1z mode.
7177 2015-08-17  Marek Polacek  <polacek@redhat.com>
7179         * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7180         with whitespaces before qualifier names.
7182 2015-08-12  Marek Polacek  <polacek@redhat.com>
7184         PR c++/55095
7185         * c-common.c (maybe_warn_shift_overflow): Properly handle
7186         left-shifting 1 into the sign bit.
7188 2015-08-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7190         * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7192 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
7193             Braden Obrzut  <admin@maniacsvault.net>
7194             Jason Merrill  <jason@redhat.com>
7196         Add C++ Concepts TS support.
7197         * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7198         * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7199         (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7200         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7201         * c-opts.c (set_std_cxx1z): Set flag_concepts.
7202         * c.opt (fconcepts): New.
7204 2015-08-02  Martin Sebor  <msebor@redhat.com>
7206         * c.opt (-Wframe-address): New warning option.
7208 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7210         * c-indentation.c (should_warn_for_misleading_indentation):
7211         Improve heuristics.
7213 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7215         * c-indentation.c (get_visual_column): Add parameter first_nws,
7216         use it.  Update comment documenting the function.
7217         (is_first_nonwhitespace_on_line): Remove.
7218         (should_warn_for_misleading_indentation): Replace usage of
7219         of is_first_nonwhitespace_on_line with get_visual_column.
7221 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7223         * c-indentation.h (struct token_indent_info): Define.
7224         (get_token_indent_info): Define.
7225         (warn_for_misleading_information): Declare.
7226         * c-common.h (warn_for_misleading_information): Remove.
7227         * c-identation.c (warn_for_misleading_indentation):
7228         Change declaration to take three token_indent_infos.  Adjust
7229         accordingly.
7230         * c-identation.c (should_warn_for_misleading_indentation):
7231         Likewise.  Bail out early if the body is a compound statement.
7232         (guard_tinfo_to_string): Define.
7234 2015-07-30  Jason Merrill  <jason@redhat.com>
7236         * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7237         '*' for reference decay.
7239 2015-07-30  Marek Polacek  <polacek@redhat.com>
7241         * c-common.c (warn_tautological_cmp): Bail for float types.
7243 2015-07-27  Marek Polacek  <polacek@redhat.com>
7245         PR bootstrap/67030
7246         * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7248 2015-07-27  Marek Polacek  <polacek@redhat.com>
7250         PR c++/66555
7251         PR c/54979
7252         * c-common.c (find_array_ref_with_const_idx_r): New function.
7253         (warn_tautological_cmp): New function.
7254         * c-common.h (warn_tautological_cmp): Declare.
7255         * c.opt (Wtautological-compare): New option.
7257 2015-07-23  Marek Polacek  <polacek@redhat.com>
7259         * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7260         (ubsan_instrument_shift): Likewise.
7262 2015-07-23  Marek Polacek  <polacek@redhat.com>
7264         PR sanitizer/66908
7265         * c-ubsan.c: Include gimplify.h.
7266         (ubsan_instrument_division): Unshare OP0 and OP1.
7267         (ubsan_instrument_shift): Likewise.
7269 2015-07-20  Marek Polacek  <polacek@redhat.com>
7270             Richard Sandiford  <richard.sandiford@arm.com>
7272         PR c++/55095
7273         * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7274         Use EXPR_LOC_OR_LOC.
7275         (maybe_warn_shift_overflow): New function.
7276         * c-common.h (maybe_warn_shift_overflow): Declare.
7277         * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7278         * c.opt (Wshift-overflow): New option.
7280 2015-07-16  Martin Liska  <mliska@suse.cz>
7282         * c-format.c (static void check_format_info_main): Use
7283         object_allocator instead of pool_allocator.
7284         (check_format_arg): Likewise.
7285         (check_format_info_main): Likewise.
7287 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
7289         * c-opts.c: Remove multiline #include comment.
7291 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
7293         * c-common.c: Fix double word typos.
7295 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
7297         * c-ada-spec.h (cpp_operation): Revert latest change.
7298         * c-ada-spec.c (print_ada_declaration): Likewise.  Skip implicit
7299         constructors and destructors.
7301 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
7303         * c-common.h: Adjust includes for flags.h changes.
7304         * stub-objc.c: Likewise.
7306 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
7308         * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7309         * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7311 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
7313         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7314         are to be removed, return NULL rather than original clauses list.
7316 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
7318         * array-notation-common.c: Adjust includes.
7319         * c-ada-spec.c: Likewise.
7320         * c-cilkplus.c: Likewise.
7321         * c-common.h: Likewise.
7322         * c-cppbuiltin.c: Likewise.
7323         * c-dump.c: Likewise.
7324         * c-format.c: Likewise.
7325         * c-gimplify.c: Likewise.
7326         * c-indentation.c: Likewise.
7327         * c-lex.c: Likewise.
7328         * c-omp.c: Likewise.
7329         * c-opts.c: Likewise.
7330         * c-pch.c: Likewise.
7331         * c-ppoutput.c: Likewise.
7332         * c-pragma.c: Likewise.
7333         * c-pretty-print.c: Likewise.
7334         * c-semantics.c: Likewise.
7335         * c-ubsan.c: Likewise.
7336         * cilk.c: Likewise.
7337         * stub-objc.c: Likewise.
7339 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7341         * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7342         * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7344 2015-07-01  Jason Merrill  <jason@redhat.com>
7346         * c-common.h (D_CXX11): Rename from D_CXX0X.
7347         (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7348         * c-common.c: Adjust.
7350         * c-opts.c (c_common_post_options): Default to C++14.
7352         * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7354 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
7356         Implement N4197 - Adding u8 character literals
7357         * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7358         CPP_CHAR.
7359         * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7360         CPP_UTF8CHAR_USERDEF tokens.
7361         * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7362         and CPP_UTF8CHAR tokens.
7363         (lex_charconst): Treat CPP_UTF8CHAR token.
7365 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7367         PR fortran/66605
7368         * c-common.c (do_warn_unused_parameter): Move here.
7369         * c-common.h (do_warn_unused_parameter): Declare.
7371 2015-06-29  Marek Polacek  <polacek@redhat.com>
7373         PR c/66322
7374         * c-common.c (check_case_bounds): Add bool * parameter.  Set
7375         OUTSIDE_RANGE_P.
7376         (c_add_case_label): Add bool * parameter.  Pass it down to
7377         check_case_bounds.
7378         (c_do_switch_warnings): Add bool parameters.  Implement -Wswitch-bool
7379         warning here.
7380         * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7381         declarations.
7383 2015-06-27  Marek Polacek  <polacek@redhat.com>
7385         * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7386         or VECTOR_INTEGER_TYPE_P throughout.
7387         * c-gimplify.c: Likewise.
7389 2015-06-26  Marek Polacek  <polacek@redhat.com>
7391         * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7392         * c-common.c (c_fully_fold_internal): Likewise.
7393         (c_alignof_expr): Likewise.
7394         * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7395         * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7396         * cilk.c (create_parm_list): Likewise.
7398 2015-06-26  Marek Polacek  <polacek@redhat.com>
7400         * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7402 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7404         * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7405         * c-gimplify.c: Likewise.
7406         * c-pragma.c: Likewise.
7407         * c-ubsan.c: Likewise.
7408         * cilk.c: Likewise.
7410 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
7412         * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7413         ggc_hasher.
7415 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7417         * cilk.c: Move calls.h after tm.h in the include chain.
7419 2015-06-25  Marek Polacek  <polacek@redhat.com>
7421         * array-notation-common.c: Use VAR_P throughout.
7422         * c-ada-spec.c: Likewise.
7423         * c-common.c: Likewise.
7424         * c-format.c: Likewise.
7425         * c-gimplify.c: Likewise.
7426         * c-omp.c: Likewise.
7427         * c-pragma.c: Likewise.
7428         * c-pretty-print.c: Likewise.
7429         * cilk.c: Likewise.
7431 2015-06-25  Marek Polacek  <polacek@redhat.com>
7433         * cilk.c (extract_free_variables): Use is_global_var.
7435 2015-06-23  Richard Sandiford  <richard.sandiford@arm.com>
7437         * c-common.c: Don't include target-def.h.
7439 2015-06-23  Marek Polacek  <polacek@redhat.com>
7441         * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7442         when comparing INTEGER_CSTs.
7444 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
7446         * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7447         * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7448         (dump_ada_template): Skip partially specialized types.
7450 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
7452         * c-common.c (scalar_to_vector): Use std::swap instead of manually
7453         swapping.
7455 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
7457         * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7458         * c-ada-spec.c: Likewise.
7459         * c-cilkplus.c: Likewise.
7460         * c-common.c: Likewise.
7461         * c-common.h: Likewise.
7462         * c-cppbuiltin.c: Likewise.
7463         * c-dump.c: Likewise.
7464         * c-format.c: Likewise.
7465         * c-gimplify.c: Likewise.
7466         * c-indentation.c: Likewise.
7467         * c-lex.c: Likewise.
7468         * c-omp.c: Likewise.
7469         * c-opts.c: Likewise.
7470         * c-pch.c: Likewise.
7471         * c-ppoutput.c: Likewise.
7472         * c-pragma.c: Likewise.
7473         * c-pretty-print.c: Likewise.
7474         * c-semantics.c: Likewise.
7475         * c-ubsan.c: Likewise.
7476         * cilk.c: Likewise.
7477         * stub-objc.c: Likewise.
7479 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
7481         PR c++/65168
7482         * c-common.c (c_common_truthvalue_conversion): Warn when
7483         converting an address of a reference to a truth value.
7485 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
7487         * array-notation-common.c : Adjust include files.
7488         * c-ada-spec.c : Likewise.
7489         * c-cilkplus.c : Likewise.
7490         * c-common.c : Likewise.
7491         * c-common.h : Likewise.
7492         * c-cppbuiltin.c : Likewise.
7493         * c-dump.c : Likewise.
7494         * c-format.c : Likewise.
7495         * c-gimplify.c : Likewise.
7496         * c-indentation.c : Likewise.
7497         * c-lex.c : Likewise.
7498         * c-omp.c : Likewise.
7499         * c-opts.c : Likewise.
7500         * c-pch.c : Likewise.
7501         * c-ppoutput.c : Likewise.
7502         * c-pragma.c : Likewise.
7503         * c-pretty-print.c : Likewise.
7504         * c-semantics.c : Likewise.
7505         * c-ubsan.c : Likewise.
7506         * cilk.c : Likewise.
7507         * stub-objc.c : Likewise.
7509 2015-06-08  Marek Polacek  <polacek@redhat.com>
7511         PR c/66415
7512         * c-format.c (location_from_offset): Return LOC if LINE is null.
7514 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
7516         * c-common.h (c_parse_final_cleanups): New prototype.
7517         * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7519 2015-06-04  Sriraman Tallam  <tmsriram@google.com>
7521         * c-common.c (noplt): New attribute.
7522         (handle_noplt_attribute): New handler.
7524 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
7526         * array-notation-common.c: Adjust includes for restructured coretypes.h.
7527         * c-ada-spec.c: Likewise.
7528         * c-cilkplus.c: Likewise.
7529         * c-common.c: Likewise.
7530         * c-common.h: Likewise.
7531         * c-cppbuiltin.c: Likewise.
7532         * c-dump.c: Likewise.
7533         * c-format.c: Likewise.
7534         * c-gimplify.c: Likewise.
7535         * c-indentation.c: Likewise.
7536         * c-lex.c: Likewise.
7537         * c-omp.c: Likewise.
7538         * c-opts.c: Likewise.
7539         * c-pch.c: Likewise.
7540         * c-ppoutput.c: Likewise.
7541         * c-pragma.c: Likewise.
7542         * c-pretty-print.c: Likewise.
7543         * c-semantics.c: Likewise.
7544         * c-ubsan.c: Likewise.
7545         * cilk.c: Likewise.
7546         * stub-objc.c: Likewise.
7548 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
7550         PR c/66220:
7551         * c-indentation.c (should_warn_for_misleading_indentation): Use
7552         expand_location rather than expand_location_to_spelling_point.
7553         Don't warn if the guarding statement is more indented than the
7554         next/body stmts.
7556 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
7558         * c-indentation.c (warn_for_misleading_indentation): Bail out
7559         immediately if -Wmisleading-indentation isn't enabled.
7561 2015-06-01  Martin Liska  <mliska@suse.cz>
7563         * c-format.c (check_format_arg):Use new type-based pool allocator.
7564         (check_format_info_main) Likewise.
7566 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
7568         * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7569         (has_nontrivial_methods): Likewise.
7571 2015-05-25  Marek Polacek  <polacek@redhat.com>
7573         * c-ubsan.c (ubsan_instrument_shift): Use type0.
7575 2015-05-22  Marek Polacek  <polacek@redhat.com>
7577         PR c/47043
7578         * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7580 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7582         * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7583         STACK_GROWS_DOWNWARD.
7585 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7587         * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7588         STACK_GROWS_DOWNWARD rather than if it is defined.
7590 2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7592         PR c/52952
7593         * c-format.c (location_column_from_byte_offset): New.
7594         (location_from_offset): New.
7595         (struct format_wanted_type): Add offset_loc field.
7596         (check_format_info): Move handling of location for extra arguments
7597         closer to the point of warning.
7598         (check_format_info_main): Pass the result of location_from_offset
7599         to warning_at.
7600         (format_type_warning): Pass the result of location_from_offset
7601         to warning_at.
7603 2015-05-20  Marek Polacek  <polacek@redhat.com>
7605         * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7607 2015-05-20  Marek Polacek  <polacek@redhat.com>
7609         * c-ada-spec.c (dump_sloc): Use DECL_P.
7611 2015-05-20  Marek Polacek  <polacek@redhat.com>
7613         * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7614         * c-common.c: Likewise.
7616 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
7618         * c-common.h (fe_file_change): Strengthen param from
7619         const line_map * to const line_map_ordinary *.
7620         (pp_file_change): Likewise.
7621         * c-lex.c (fe_file_change): Likewise.
7622         (cb_define): Use linemap_check_ordinary when invoking
7623         SOURCE_LINE.
7624         (cb_undef): Likewise.
7625         * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7626         invoking cb_file_change.
7627         (c_finish_options): Likewise.
7628         (push_command_line_include): Likewise.
7629         (cb_file_change): Strengthen param "new_map" from
7630         const line_map * to const line_map_ordinary *.
7631         * c-ppoutput.c (cb_define): Likewise for local "map".
7632         (pp_file_change): Likewise for param "map" and local "from".
7634 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
7636         * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7638 2015-05-18  Tom de Vries  <tom@codesourcery.com>
7640         * c-common.c (build_va_arg_1): New function.
7641         (build_va_arg): Add address operator to va_list operand if necessary.
7643 2015-05-15  Mikhail Maltsev  <maltsevm@gmail.com>
7645         PR c/48956
7646         * c-common.c (int_safely_convertible_to_real_p): Define.
7647         (unsafe_conversion_p): Check conversions involving complex types.
7648         (conversion_warning): Add new warning message for conversions which
7649         discard imaginary component.
7650         * c-common.h: (enum conversion_safety): Add new enumerator for such
7651         conversions.
7653 2015-05-14  Marek Polacek  <polacek@redhat.com>
7655         PR c/66066
7656         PR c/66127
7657         * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7658         (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7659         C_MAYBE_CONST_EXPR_INT_OPERANDS set.  Add FOR_INT_CONST argument and
7660         use it.  If FOR_INT_CONST, require that all evaluated operands be
7661         INTEGER_CSTs.
7663 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
7665         * c-common.h (warn_for_misleading_indentation): New prototype.
7666         * c-indentation.c: New file.
7667         * c.opt (Wmisleading-indentation): New option.
7669 2015-05-12  Tom de Vries  <tom@codesourcery.com>
7671         PR tree-optimization/66010
7672         * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7674 2015-05-09  Jason Merrill  <jason@redhat.com>
7676         * c-opts.c (c_common_post_options): Also clear
7677         cpp_opts->cpp_warn_cxx11_compat.
7679         * c-common.h (enum cxx_dialect): Add cxx_unset.
7680         * c-common.c (cxx_dialect): Initialize to cxx_unset.
7681         * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7683         * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7684         (std=gnu++0x): Mark as Undocumented.
7685         (std=gnu++1y): Add deprecated message.
7687 2015-05-08  Jason Merrill  <jason@redhat.com>
7689         * c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
7690         * c-opts.c: Adjust.
7692         * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7694 2015-05-08  Marek Polacek  <polacek@redhat.com>
7696         PR c/64918
7697         * c.opt (Woverride-init-side-effects): New option.
7699 2015-05-07  Marek Polacek  <polacek@redhat.com>
7701         PR c/65179
7702         * c-common.c (c_fully_fold_internal): Warn when left shifting a
7703         negative value.
7704         * c.opt (Wshift-negative-value): New option.
7705         * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7706         when -Wextra and C99/C++11 mode.
7708 2015-05-07  Marek Polacek  <polacek@redhat.com>
7709             Martin Uecker  <uecker@eecs.berkeley.edu>
7711         * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7712         flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7714 2015-05-05  Jason Merrill  <jason@redhat.com>
7716         * c.opt (Wterminate): New.
7718 2015-04-30  Marek Polacek  <polacek@redhat.com>
7720         * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7721         require that the non-constant be of a boolean type.
7723 2015-04-29  Josh Triplett  <josh@joshtriplett.org>
7725         * c-common.c (handle_section_attribute): Refactor to reduce
7726         nesting and distinguish between error cases.
7728 2015-04-29  Marek Polacek  <polacek@redhat.com>
7730         PR c/64610
7731         * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7732         with 0/1.
7734 2015-04-29  Jakub Jelinek  <jakub@redhat.com>
7736         * c-common.h (omp_clause_mask): Unconditionally define as a class.
7737         Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7738         HOST_BITS_PER_WIDE_INT.
7740 2015-04-28  Tom de Vries  <tom@codesourcery.com>
7742         PR tree-optimization/65887
7743         * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7745 2015-04-28  Eric Botcazou  <ebotcazou@adacore.com>
7746             Pierre-Marie de Rodat  <derodat@adacore.com>
7748         * c-ada-spec.c (in_function): Delete.
7749         (dump_generic_ada_node): Do not change in_function and remove the
7750         redundant code dealing with it.
7751         (print_ada_declaration): Do not change in_function.  Use INDENT_INCR.
7752         (print_ada_methods): Output the static member functions in a nested
7753         package after the regular methods as well as associated renamings.
7755 2015-04-24  Marek Polacek  <polacek@redhat.com>
7757         PR c/65830
7758         * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7759         and OPT_Wshift_count_overflow.
7761         PR c/63357
7762         * c-common.c (warn_logical_operator): Warn if the operands have the
7763         same expressions.
7765 2015-04-24  Marek Polacek  <polacek@redhat.com>
7767         PR c/61534
7768         * c-common.c (warn_logical_operator): Bail if either operand comes
7769         from a macro expansion.
7771 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
7773         PR target/55143
7774         * c-common.c (c_default_pointer_mode): Add definition.
7775         * c-common.h (c_default_pointer_mode): Add declaration.
7777 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
7779         * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7780         on record_builtin_type argument.
7782 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
7784         PR c/65120
7785         * c-common.c (warn_logical_not_parentheses): Don't warn for
7786         !x == 0 or !x != 0.
7788 2015-03-07  Marek Polacek  <polacek@redhat.com>
7790         PR sanitizer/65280
7791         * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7792         before trying to figure out whether we have a flexible array member.
7794 2015-03-06  Eric Botcazou  <ebotcazou@adacore.com>
7795             Jonathan Wakely  <jwakely.gcc@gmail.com>
7797         * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7799 2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
7801         PR ada/65319
7802         * c-ada-spec.c (print_destructor): Remove obsolete code.
7804 2015-03-01  Eric Botcazou  <ebotcazou@adacore.com>
7806         * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7807         (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7808         DECL_TEMPLATE_RESULT emulations.
7809         (dump_ada_template)): Add guard for TYPE_METHODS.
7811 2015-02-27  Marek Polacek  <polacek@redhat.com>
7813         PR c/65040
7814         * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7816 2015-02-27  Kai Tietz  <ktietz@redhat.com>
7818         PR c/35330
7819         * c-pragma.c (handle_pragma_weak): Do not try to create
7820         weak/alias of declarations not being function, or variable
7821         declarations.
7823 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
7825         PR libgomp/64625
7826         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7827         Remove macros.
7828         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7830 2015-02-16  Marek Polacek  <polacek@redhat.com>
7832         PR c/65066
7833         * c-format.c (check_format_types): Handle null param.
7835 2015-02-13  Marek Polacek  <polacek@redhat.com>
7837         PR c/65040
7838         * c-format.c (check_format_types): Don't warn about different
7839         signedness if the original value is in the range of WANTED_TYPE.
7841 2015-02-12  Jason Merrill  <jason@redhat.com>
7843         PR c++/64956
7844         * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7845         to the current highest version.
7846         * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7848 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
7850         PR c/64824
7851         PR c/64868
7852         * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7853         instead of RDIV_EXPR.  Use build_binary_op instead of
7854         build2_loc.
7856 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
7858         * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7859         to pass input_location as first argument.
7861 2015-01-23  Tom de Vries  <tom@codesourcery.com>
7863         PR libgomp/64672
7864         * c.opt (fopenacc): Mark as LTO option.
7866 2015-01-23  Tom de Vries  <tom@codesourcery.com>
7868         PR libgomp/64707
7869         * c.opt (fopenmp): Mark as LTO option.
7871 2015-01-21  Jakub Jelinek  <jakub@redhat.com>
7873         PR c/63307
7874         * cilk.c (fill_decls_vec): Only put decls into vector v.
7875         (compare_decls): Fix up formatting.
7877 2015-01-21  Igor Zamyatin  <igor.zamyatin@intel.com>
7879         PR c/63307
7880         * cilk.c: Include vec.h.
7881         (struct cilk_decls): New structure.
7882         (wrapper_parm_cb): Split this function to...
7883         (fill_decls_vec): ...this...
7884         (create_parm_list): ...and this.
7885         (compare_decls): New function.
7886         (for_local_cb): Remove.
7887         (wrapper_local_cb): Ditto.
7888         (build_wrapper_type): For now first traverse and fill vector of
7889         declarations then sort it and then deal with sorted vector.
7890         (cilk_outline): Ditto.
7891         (declare_one_free_variable): Ditto.
7893 2015-01-21  Jason Merrill  <jason@redhat.com>
7895         PR c++/64629
7896         * c-format.c (check_format_arg): Call decl_constant_value.
7898 2015-01-19  Martin Liska  <mliska@suse.cz>
7900         * c-common.c (handle_noicf_attribute): New function.
7902 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
7903             Bernd Schmidt  <bernds@codesourcery.com>
7904             James Norris  <jnorris@codesourcery.com>
7905             Cesar Philippidis  <cesar@codesourcery.com>
7906             Ilmir Usmanov  <i.usmanov@samsung.com>
7907             Jakub Jelinek  <jakub@redhat.com>
7909         * c.opt (fopenacc): New option.
7910         * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7911         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7912         New macros.
7913         * c-common.h (c_finish_oacc_wait): New prototype.
7914         * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7915         (c_finish_oacc_wait): New function.
7916         * c-pragma.c (oacc_pragmas): New variable.
7917         (c_pp_lookup_pragma, init_pragma): Handle it.
7918         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7919         PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7920         PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7921         PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7922         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7923         PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7924         PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7925         PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7926         PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7927         PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7928         PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7929         PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7930         PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7931         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7932         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7933         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7934         PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7935         PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7936         PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7937         PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7938         PRAGMA_OACC_CLAUSE_WORKER.
7940 2015-01-14  Marcos Diaz  <marcos.diaz@tallertechnologies.com>
7942         * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7943         for the new option fstack-protector_explicit.
7944         * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7945         (handle_stack_protect_attribute): New function.
7947 2015-01-13  Martin Uecker  <uecker@eecs.berkeley.edu>
7949         * c.opt: New option -Warray-bounds=.
7951 2015-01-09  Michael Collison  <michael.collison@linaro.org>
7953         * array-notation-common.c: Include hash-set.h, machmode.h,
7954         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7955         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7956         * c-ada-spec.c: Ditto.
7957         * c-cilkplus.c: Ditto.
7958         * c-common.c: Include input.h due to flattening of tree.h.
7959         Define macro GCC_C_COMMON_C.
7960         * c-common.h: Flatten tree.h header files into c-common.h.
7961         Remove include of tree-core.h.
7962         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7963         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7964         fold-const.h, wide-int.h, and inchash.h due to
7965         flattening of tree.h.
7966         * c-dump.c: Ditto.
7967         * c-format.c: Flatten tree.h header files into c-common.h.
7968         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7969         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7970         fold-const.h, wide-int.h, and inchash.h due to
7971         flattening of tree.h.
7972         * c-dump.c: Include hash-set.h, machmode.h,
7973         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7974         fold-const.h, wide-int.h, and inchash.h due to
7975         flattening of tree.h.
7976         * c-format.c: Include hash-set.h, machmode.h,
7977         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7978         fold-const.h, wide-int.h, inchash.h and real.h due to
7979         flattening of tree.h.
7980         * c-gimplify.c: Include hash-set.h, machmode.h,
7981         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7982         fold-const.h, wide-int.h, and inchash.h due to
7983         flattening of tree.h.
7984         * cilk.c: Ditto.
7985         * c-lex.c: Ditto.
7986         * c-omp.c: Ditto.
7987         * c-opts.c: Ditto.
7988         * c-pch.c: Ditto.
7989         * c-ppoutput.c: Ditto.
7990         * c-pragma.c: Ditto.
7991         * c-pretty-print.c: Ditto.
7992         * c-semantics.c: Ditto.
7993         * c-ubsan.c: Ditto.
7994         * stub-objc.c: Ditto.
7996 2015-01-08  Jason Merrill  <jason@redhat.com>
7998         * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7999         do_ubsan_in_current_function.
8000         (ubsan_maybe_instrument_reference_or_call): Likewise.
8001         * c-ubsan.h: Declare it.
8003 2015-01-08  Mike Stump  <mikestump@comcast.net>
8005         * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8007 2015-01-07  Marek Polacek  <polacek@redhat.com>
8009         PR c/64440
8010         * c-common.c (c_fully_fold_internal): Warn for division and modulo
8011         if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8013 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
8015         PR c++/31397
8016         * c.opt (Wsuggest-override): New option.
8018 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
8020         Update copyright years.
8022 2015-01-05  Marek Polacek  <polacek@redhat.com>
8024         PR c/64423
8025         * c-common.c (warn_array_subscript_with_type_char): Add location_t
8026         parameter.  Use it.
8027         * c-common.h (warn_array_subscript_with_type_char): Update
8028         declaration.
8030 2014-12-20  Edward Smith-Rowland  <3dw4rd@verizon.net>
8032         * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8033         Control macro with flag_sized_deallocation.
8035 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
8037         * c.opt (Wdiscarded-array-qualifiers): New option.
8039 2014-12-19  Jakub Jelinek  <jakub@redhat.com>
8041         PR preprocessor/63831
8042         * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8043         and __has_cpp_attribute here.
8044         * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8045         c_common_has_attribute.
8046         * c-common.h (c_common_has_attribute): New prototype.
8047         * c-lex.c (init_c_lex): Set cb->has_attribute to
8048         c_common_has_attribute instead of cb_has_attribute.
8049         (get_token_no_padding): New function.
8050         (cb_has_attribute): Renamed to ...
8051         (c_common_has_attribute): ... this.  No longer static.  Use
8052         get_token_no_padding, require ()s, don't build TREE_LIST
8053         unnecessarily, fix up formatting, adjust diagnostics, call
8054         init_attributes.
8056 2014-12-15  Jason Merrill  <jason@redhat.com>
8058         * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8059         (-Wsized-deallocation): New.
8060         * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8061         to on in C++14 and up.
8063 2014-12-11  Jason Merrill  <jason@redhat.com>
8065         * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8067         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8068         we aren't complaining about VLAs.
8070 2014-12-06  Marek Polacek  <polacek@redhat.com>
8072         PR tree-optimization/64183
8073         * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8074         shift-expression if it is integer_type_node.  Use types_compatible_p.
8076 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
8078         * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8079         last argument from create_tmp_var_raw and create_tmp_var calls.
8080         * cilk.c (gimplify_cilk_spawn): Likewise.
8081         * c-omp.c (c_finish_omp_atomic): Likewise.
8083 2014-11-28  Marek Polacek  <polacek@redhat.com>
8085         * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8086         instead of unsigned_type_node.
8088 2014-11-28  Marek Polacek  <polacek@redhat.com>
8090         PR c/63862
8091         * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8092         to op1_utype.
8093         * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8094         expression to unsigned_type_node.
8096 2014-11-20  Mark Wielaard  <mjw@redhat.com>
8098         PR debug/38757
8099         * c-opts.c (set_std_c89): Set lang_hooks.name.
8100         (set_std_c99): Likewise.
8101         (set_std_c11): Likewise.
8102         (set_std_cxx98): Likewise.
8103         (set_std_cxx11): Likewise.
8104         (set_std_cxx14): Likewise.
8105         (set_std_cxx1z): Likewise.
8107 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
8109         PR target/63764
8110         * c-common.h (convert_vector_to_pointer_for_subscript): Change
8111         return type to bool.
8112         * c-common.c: Include gimple-expr.h.
8113         (convert_vector_to_pointer_for_subscript): Change return type to
8114         bool.  If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8115         and copy it into a TARGET_EXPR and use that instead of *vecp
8116         directly.
8118 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
8120         Merger of git branch "gimple-classes-v2-option-3".
8121         * ChangeLog.gimple-classes: New.
8122         * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8123         from being just a vec<gimple> to a vec<gbind *>.
8125 2014-11-18  Jakub Jelinek  <jakub@redhat.com>
8127         PR sanitizer/63813
8128         * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8129         argument to ptype, set type to TREE_TYPE (ptype).  Don't call
8130         get_pointer_alignment for non-pointers.  Use ptype, or if it is
8131         reference type, corresponding pointer type, as type of kind
8132         argument.
8133         (ubsan_maybe_instrument_reference,
8134         ubsan_maybe_instrument_member_call): Adjust callers.
8136 2014-11-15  Marek Polacek  <polacek@redhat.com>
8138         PR middle-end/63884
8139         * array-notation-common.c (is_sec_implicit_index_fn): Return false
8140         for NULL fndecl.
8141         (extract_array_notation_exprs): Return for NULL node.
8143 2014-11-12  Joseph Myers  <joseph@codesourcery.com>
8145         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8146         undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8148 2014-11-12  Jakub Jelinek  <jakub@redhat.com>
8150         PR c/59708
8151         * c-common.c (check_builtin_function_arguments): Handle
8152         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8154 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8156         PR c/60804
8157         * c-common.h (check_no_cilk): Declare.
8158         * cilk.c (get_error_location): New function.
8159         (check_no_cilk): Dito.
8161 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8163         * cilk.c (recognize_spawn): Use expression location
8164         for error message.
8166 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
8168         * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8170 2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
8172         * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8173         (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8174         (__cpp_range_based_for, __cpp_initializer_lists,
8175         __cpp_delegating_constructors, __cpp_nsdmi,
8176         __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8177         for C++11; (__cpp_attribute_deprecated): Remove in favor of
8178         __has_cpp_attribute.
8179         * c-lex.c (cb_has_attribute): New callback CPP function;
8180         (init_c_lex): Set has_attribute callback.
8182 2014-11-04  Richard Biener  <rguenther@suse.de>
8184         * c-common.c (shorten_compare): Do not shorten mixed
8185         DFP and non-DFP compares.
8187 2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
8189         * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8190         * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8191         Commentary and rearrangement of tests.
8192         * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8193         Commentary and rearrangement of tests.
8194         * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8195         * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8197 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
8199         * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8200         enum from machine_mode.
8202 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
8204         * c-common.c: Adjust include files.
8205         * c-gimplify.c: Ditto.
8206         * cilk.c: Ditto.
8207         * c-pragma.c: Ditto.
8208         * c-ubsan.c: Ditto.
8210 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
8212         * c-gimplify.c: Adjust include files.
8214 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8216         PR c++/53061
8217         * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8218         c_common_initialize_diagnostics.
8219         * c-common.h: Likewise.
8221 2014-10-24  Marek Polacek  <polacek@redhat.com>
8223         PR c/56980
8224         * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8225         print "struct"/"union"/"enum" for typedefed names.
8227 2014-10-23  Marek Polacek  <polacek@redhat.com>
8229         * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8230         in unsigned type.
8232 2014-10-22  Jakub Jelinek  <jakub@redhat.com>
8233             Yury Gribov  <y.gribov@samsung.com>
8235         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8236         ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8237         instead of flag_sanitize_recover as bool flag.
8239 2014-10-21  Kirill Yukhin  <kirill.yukhin@intel.com>
8241         * cilk.c: Revert previous change.
8243 2014-10-20  Igor Zamyatin  <igor.zamyatin@intel.com>
8245         PR c/63307
8246         * cilk.c: Include vec.h.
8247         (struct cilk_decls): New structure.
8248         (wrapper_parm_cb): Split this function to...
8249         (fill_decls_vec): ...this...
8250         (create_parm_list): ...and this.
8251         (compare_decls): New function.
8252         (for_local_cb): Remove.
8253         (wrapper_local_cb): Ditto.
8254         (build_wrapper_type): For now first traverse and fill vector of
8255         declarations then sort it and then deal with sorted vector.
8256         (cilk_outline): Ditto.
8257         (declare_one_free_variable): Ditto.
8259 2014-10-17  Marek Polacek  <polacek@redhat.com>
8261         * c-opts.c (c_common_post_options): Set warn_implicit_int.
8262         * c.opt (Wimplicit-int): Initialize to -1.
8264 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
8266         * c-pragma.c: Adjust include files.
8267         * c-semantics.c: Likewise.
8269 2014-10-16  DJ Delorie  <dj@redhat.com>
8271         * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8272         multiples of bytes.
8274 2014-10-14  Jason Merrill  <jason@redhat.com>
8276         PR c++/63455
8277         * c-common.h (CPP_PREPARSED_EXPR): New.
8278         (N_CP_TTYPES): Adjust.
8280 2014-10-15  Marek Polacek  <polacek@redhat.com>
8282         * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8284 2014-10-14  DJ Delorie  <dj@redhat.com>
8286         * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8287         types, not just __int128.
8288         * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8289         types, not just __int128.
8290         (cpp_atomic_builtins): Round pointer sizes up.
8291         (type_suffix): Use type precision, not specific types.
8292         * c-common.c (c_common_reswords): Remove __int128 special case.
8293         (c_common_type_for_size): Check for all __intN types, not just
8294         __int128.
8295         (c_common_type_for_mode): Likewise.
8296         (c_common_signed_or_unsigned_type): Likewise.
8297         (c_build_bitfield_integer_type): Likewise.
8298         (c_common_nodes_and_builtins): Likewise.
8299         (keyword_begins_type_specifier): Likewise.
8300         * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8301         __intN variants.
8303 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
8305         * c-common.c: Use hash_table instead of hashtab.
8307 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
8309         * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8310         C++11 section.
8312 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
8314         PR c++/54427
8315         PR c++/57198
8316         PR c++/58845
8317         * c-common.c (warn_logical_operator): Punt for vectors.
8319 2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
8321         Implement SD-6: SG10 Feature Test Recommendations
8322         * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8323         macros and the __has_header macro.
8325 2014-09-30  Jason Merrill  <jason@redhat.com>
8327         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8328         RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8329         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8331         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8332         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8334         * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8335         * c-common.c (c_common_reswords): Remove __is_convertible_to.
8337 2014-09-24  Marek Polacek  <polacek@redhat.com>
8339         PR c/61405
8340         PR c/53874
8341         * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8343 2014-09-23  Andi Kleen  <ak@linux.intel.com>
8345         * c-common.c (handle_no_reorder_attribute): New function.
8346         (c_common_attribute_table): Add no_reorder attribute.
8348 2014-09-22  Joseph Myers  <joseph@codesourcery.com>
8350         * c-cppbuiltin.c (c_cpp_builtins): Define
8351         __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8352         modes.
8354 2014-09-18  Joseph Myers  <joseph@codesourcery.com>
8356         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8357         for supported floating-point modes.
8359 2014-09-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8361         * c.opt (Wpsabi): Use LangEnabledBy.
8362         * c-opts.c (c_common_handle_option): Do not handle here.
8364 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
8366         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8367         macros for floating-point modes.
8369 2014-09-11  Marc Glisse  <marc.glisse@inria.fr>
8371         PR target/58757
8372         * c-cppbuiltin.c (builtin_define_float_constants): Correct
8373         __*_DENORM_MIN__ without denormals.
8375 2014-09-10  Jakub Jelinek  <jakub@redhat.com>
8377         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8378         ubsan_instrument_vla, ubsan_instrument_return): Adjust
8379         ubsan_create_data callers.
8380         (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8381         index is constant or BIT_AND_EXPR with constant mask and is
8382         small enough for the bound.
8383         * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8384         ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8386 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8388         * c.opt: Add CppReason to various flags.
8389         (Wdate-time): Re-sort.
8390         * c-common.c: Include c-common.h earlier.
8391         (struct reason_option_codes_t): Delete.
8392         (c_option_controlling_cpp_error): Prefix global type and struct
8393         with cpp_.
8395 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8397         * c.opt (Wnormalized): New.
8398         (Wnormalized=): Use Enum and Reject Negative.
8399         * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8401 2014-09-08  Joseph Myers  <joseph@codesourcery.com>
8403         * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8404         digits of floating-point modes if -fbuilding-libgcc.
8406 2014-09-05  Joseph Myers  <joseph@codesourcery.com>
8408         * c-cppbuiltin.c (c_cpp_builtins): Also define
8409         __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8410         __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8411         __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8412         __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8413         __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8414         __LIBGCC_STACK_GROWS_DOWNWARD__,
8415         __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8416         __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8417         __LIBGCC_DWARF_FRAME_REGISTERS__,
8418         __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8419         __LIBGCC_STACK_POINTER_REGNUM__ and
8420         __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8421         (builtin_define_with_value): Handle backslash-escaping in string
8422         macro values.
8424 2014-09-05  Richard Biener  <rguenther@suse.de>
8426         PR middle-end/63148
8427         * c-format.c (check_format_arg): Properly handle
8428         effectively signed POINTER_PLUS_EXPR offset.
8430 2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8432         * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8433         Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8434         (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8435         and Init.
8436         * c-opts.c (c_common_handle_option): Do not handle here.
8437         (sanitize_cpp_opts): Likewise.
8438         * c-common.c (struct reason_option_codes_t): Handle
8439         CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8441 2014-09-03  Marek Polacek  <polacek@redhat.com>
8443         * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8445 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
8446             Balaji V. Iyer  <balaji.v.iyer@intel.com>
8447             Igor Zamyatin  <igor.zamyatin@intel.com>
8449         * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8450         * c-common.c (c_common_reswords): Added _Cilk_for.
8451         * c-common.h (enum rid): Added RID_CILK_FOR.
8452         (cilk_for_number_of_iterations): Add declaration.
8453         * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8454         CILK_FOR.
8455         * c-pragma.c (init_pragma): Register "grainsize" pragma.
8456         * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8458 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8460         * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8461         Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8462         Wundef): Use CPP, Var and Init.
8463         * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8465 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8467         * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8468         * c-opts.c (c_common_handle_option): Do not handle here.
8470 2014-08-25  Jason Merrill  <jason@redhat.com>
8472         * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8473         -std=c++14 and -std=gnu++14, rather than the reverse.
8474         * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8475         OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8476         * c-common.h (cxx_dialect): Remove cxx1y.
8478 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
8480         * c-common.h (enum cxx_dialect): Add cxx14.
8481         * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8482         * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8483         cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8485 2014-08-22  Jason Merrill  <jason@redhat.com>
8487         * c.opt (std=gnu++17): Fix alias.
8489 2014-08-22  Marek Polacek  <polacek@redhat.com>
8491         PR c++/62199
8492         * c-common.c (warn_logical_not_parentheses): Don't check LHS.  Don't
8493         check for vector types.  Drop LHS argument.
8494         * c-common.h (warn_logical_not_parentheses): Adjust.
8496 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8498         * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8499         (Wmultichar): Likewise.
8500         (Wdate-time): Use C-family languages instead of Common. Use CPP
8501         and Var.
8502         * c-opts.c (c_common_handle_option): Do not handle the above
8503         options here.
8504         (sanitize_cpp_opts): Likewise.
8506 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8508         PR fortran/44054
8509         * c-opts.c: Include tree-diagnostics.h.
8510         (c_diagnostic_finalizer): New.
8511         (c_common_initialize_diagnostics): Use it.
8513 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8515         PR preprocessor/51303
8516         * c-common.c (struct reason_option_codes_t option_codes):
8517         Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8519 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8521         PR c/60975
8522         PR c/53063
8523         * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8524         * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8525         (c_common_post_options): Call init_global_opts_from_cpp.
8526         (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8528 2014-08-19  Marek Polacek  <polacek@redhat.com>
8530         PR c++/62153
8531         * c-common.c (maybe_warn_bool_compare): New function.
8532         * c-common.h (maybe_warn_bool_compare): Declare.
8533         * c.opt (Wbool-compare): New option.
8535 2014-08-19  Marek Polacek  <polacek@redhat.com>
8537         * c.opt (Wc99-c11-compat): New option.
8539 2014-08-19  Marek Polacek  <polacek@redhat.com>
8541         * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8542         to warn_c90_c99_compat.
8543         * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8544         to -1.
8546 2014-08-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8547             Steven Bosscher  <steven@gcc.gnu.org>
8549         PR c/52952
8550         * c-format.c: Add extra_arg_loc and format_string_loc to struct
8551         format_check_results.
8552         (check_function_format): Use true and add comment for boolean
8553         argument.
8554         (finish_dollar_format_checking): Use explicit location when warning.
8555         (check_format_info): Likewise.
8556         (check_format_arg): Set extra_arg_loc and format_string_loc.
8557         (check_format_info_main): Use explicit location when warning.
8558         (check_format_types): Pass explicit location.
8559         (format_type_warning): Likewise.
8561 2014-08-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8563         PR fortran/44054
8564         * c-format.c: Handle Fortran flags.
8566 2014-08-12  Igor Zamyatin  <igor.zamyatin@intel.com>
8568         PR other/61962
8569         * array-notation-common.c (find_rank): Added handling for other
8570         types of references.
8572 2014-08-10  Marek Polacek  <polacek@redhat.com>
8574         PR c/51849
8575         * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8576         * c.opt (Wc90-c99-compat): Add option.
8578 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
8580         * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8582 2014-08-03  Marek Polacek  <polacek@redhat.com>
8584         * c-common.c (check_case_value): Add location_t parameter.  Use it.
8585         (c_add_case_label): Pass loc to check_case_value.
8587 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8589         * cilk.c: Use hash_map instead of pointer_map.
8591 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8593         * c-gimplify.c: Use hash_set instead of pointer_set.
8595 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
8597         PR middle-end/61455
8598         * array-notation-common.c (extract_array_notation_exprs): Handling
8599         of DECL_EXPR added.
8601 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
8603         * c-common.h (min_align_of_type): Removed prototype.
8604         * c-common.c (min_align_of_type): Removed.
8605         * c-ubsan.h (ubsan_maybe_instrument_reference,
8606         ubsan_maybe_instrument_member_call): New prototypes.
8607         * c-ubsan.c: Include stor-layout.h and builtins.h.
8608         (ubsan_maybe_instrument_reference_or_call,
8609         ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8610         functions.
8612 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
8614         PR c++/60517
8615         * c.opt (-Wreturn-local-addr): Move to common.opt.
8617 2014-07-30  Jason Merrill  <jason@redhat.com>
8619         PR c++/61659
8620         PR c++/61687
8621         Revert:
8622         * c.opt (-fuse-all-virtuals): New.
8624 2014-07-30  Tom Tromey  <tromey@redhat.com>
8626         PR c/59855
8627         * c.opt (Wdesignated-init): New option.
8628         * c-common.c (c_common_attribute_table): Add "designated_init".
8629         (handle_designated_init): New function.
8631 2014-07-24  Marek Polacek  <polacek@redhat.com>
8633         PR c/57653
8634         * c-opts.c (c_finish_options): If -imacros is in effect, return.
8636 2014-07-16  Dodji Seketeli  <dodji@redhat.com>
8638         PR preprocessor/60723 - missing system-ness marks for macro tokens
8639         * c-ppoutput.c (struct print::prev_was_system_token): New data
8640         member.
8641         (init_pp_output): Initialize it.
8642         (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8643         (do_line_change): Return a flag saying if a line marker was
8644         emitted or not.
8645         (scan_translation_unit): Detect if the system-ness of the token we
8646         are about to emit is different from the one of the previously
8647         emitted token.  If so, emit a line marker.  Avoid emitting useless
8648         adjacent line markers.  Avoid emitting line markers for tokens
8649         originating from the expansion of built-in macros.
8650         (scan_translation_unit_directives_only): Adjust.
8652 2014-07-15  Marek Polacek  <polacek@redhat.com>
8654         * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8655         TYPE_MAX_VALUE is NULL.
8657 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
8659         PR middle-end/61294
8660         * c.opt (Wmemset-transposed-args): New warning.
8662 2014-07-10  Jason Merrill  <jason@redhat.com>
8664         PR c++/61659
8665         PR c++/61687
8666         * c.opt (-fuse-all-virtuals): New.
8668 2014-07-09  Richard Biener  <rguenther@suse.de>
8670         PR c-family/61741
8671         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8672         using unsigned arithmetic if overflow does not wrap instead of
8673         if overflow is undefined.
8675 2014-07-06  Marek Polacek  <polacek@redhat.com>
8677         PR c/6940
8678         * c.opt (Wsizeof-array-argument): New option.
8680 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
8682         * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
8683         comments->count <= 1, as comments->entries might be NULL.
8685 2014-07-01  Marek Polacek  <polacek@redhat.com>
8687         * c.opt (Wint-conversion): New option.
8689 2014-07-01  Marek Polacek  <polacek@redhat.com>
8691         PR c/58286
8692         * c.opt (Wincompatible-pointer-types): New option.
8694 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
8696         PR c++/51400
8697         * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8698         Do not discard TYPE_QUALS of type.
8700 2014-06-26  Jason Merrill  <jason@redhat.com>
8702         * c-common.h (enum cxx_dialect): Add cxx1z.
8703         * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8704         * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8706 2014-06-26  Teresa Johnson  <tejohnson@google.com>
8708         * c-common.h (get_dump_info): Declare.
8709         * c-gimplify.c (c_genericize): Use saved dump files.
8710         * c-opts.c (c_common_parse_file): Begin and end dumps
8711         once around parsing invocation.
8712         (get_dump_info): New function.
8714 2014-06-23  Marek Polacek  <polacek@redhat.com>
8715             Andrew MacLeod  <amacleod@redhat.com>
8717         PR c/61553
8718         * c-common.c (get_atomic_generic_size): Don't segfault if the
8719         type doesn't have a size.
8721 2014-06-20  Marek Polacek  <polacek@redhat.com>
8723         * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8724         (ubsan_walk_array_refs_r): New function.
8725         (c_genericize): Instrument array bounds.
8726         * c-ubsan.c: Include "internal-fn.h".
8727         (ubsan_instrument_division): Mark instrumented arrays as having
8728         side effects.  Adjust ubsan_type_descriptor call.
8729         (ubsan_instrument_shift): Likewise.
8730         (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8731         (ubsan_instrument_bounds): New function.
8732         (ubsan_array_ref_instrumented_p): New function.
8733         (ubsan_maybe_instrument_array_ref): New function.
8734         * c-ubsan.h (ubsan_instrument_bounds): Declare.
8735         (ubsan_array_ref_instrumented_p): Declare.
8736         (ubsan_maybe_instrument_array_ref): Declare.
8738 2014-06-20  Hale Wang  <hale.wang@arm.com>
8740         PR lto/61123
8741         * c.opt (fshort-enums): Add to LTO.
8742         * c.opt (fshort-wchar): Likewise.
8744 2014-06-16  Marek Polacek  <polacek@redhat.com>
8746         PR c/60439
8747         * c.opt (Wswitch-bool): Add Var.
8749 2014-06-12  Jakub Jelinek  <jakub@redhat.com>
8751         PR middle-end/61486
8752         * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8753         #pragma omp target teams or
8754         #pragma omp {,target }teams distribute simd.
8756 2014-06-12  Jason Merrill  <jason@redhat.com>
8758         * c.opt (Wabi=, fabi-compat-version): New.
8759         * c-opts.c (c_common_handle_option): Handle -Wabi=.
8760         (c_common_post_options): Handle flag_abi_compat_version default.
8761         Disallow -fabi-compat-version=1.
8762         * c-common.h (abi_version_crosses): New.
8764 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
8766         * c-common.c (handle_section_attribute): Update handling for
8767         section names that are no longer trees.
8769 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
8771         PR fortran/60928
8772         * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8773         (omp_pragmas): ... back here.
8775 2014-06-05  Marek Polacek  <polacek@redhat.com>
8777         PR c/49706
8778         * c-common.c (warn_logical_not_parentheses): New function.
8779         * c-common.h (warn_logical_not_parentheses): Declare.
8780         * c.opt (Wlogical-not-parentheses): New option.
8782 2014-06-04  Marek Polacek  <polacek@redhat.com>
8784         PR c/30020
8785         * c-common.c (check_case_bounds): Add location parameter.
8786         Use it.
8787         (c_add_case_label): Pass loc to check_case_bounds.
8789 2014-06-03  Marek Polacek  <polacek@redhat.com>
8791         PR c/60439
8792         * c.opt (Wswitch-bool): New option.
8794 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
8796         * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8797         Remove prototypes.
8798         (record_types_used_by_current_var_decl): Move prototype to where
8799         it belongs.
8801         * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8802         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8803         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8805 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
8807         * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8808         * c-common.c (c_common_nodes_and_builtins): Don't initialize
8809         void_zero_node.
8810         * c-pretty-print.c (pp_c_void_constant): New function.
8811         (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8812         (c_pretty_printer::expression): Handle VOID_CST.
8813         * cilk.c (extract_free_variables): Likewise.
8814         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8815         (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8817 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
8819         * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8820         * c-pragma.c (push_alignment): Adjust.
8821         (handle_pragma_push_options): Likewise.
8823 2014-05-09  Marek Polacek  <polacek@redhat.com>
8825         PR c/50459
8826         * c-common.c (check_user_alignment): Return -1 if alignment is error
8827         node.
8828         (handle_aligned_attribute): Don't call default_conversion on
8829         FUNCTION_DECLs.
8830         (handle_vector_size_attribute): Likewise.
8831         (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8832         (handle_sentinel_attribute): Call default_conversion and allow even
8833         integral types as an argument.
8835 2014-05-08  Marek Polacek  <polacek@redhat.com>
8837         PR c/61053
8838         * c-common.c (min_align_of_type): New function factored out from...
8839         (c_sizeof_or_alignof_type): ...here.
8840         * c-common.h (min_align_of_type): Declare.
8842 2014-05-08  Marek Polacek  <polacek@redhat.com>
8844         PR c/61077
8845         * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8846         parameter type of main.
8848 2014-05-07  DJ Delorie  <dj@redhat.com>
8850         * c-cppbuiltin.c (print_bits_of_hex): New.
8851         (builtin_define_type_minmax): Print values using hex so as not to
8852         require a pre-computed list of string values.
8854 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
8855             Mike Stump  <mikestump@comcast.net>
8856             Richard Sandiford  <rdsandiford@googlemail.com>
8858         * c-ada-spec.c: Include wide-int.h.
8859         (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8860         (dump_generic_ada_node): Use wide-int interfaces.
8861         * c-common.c: Include wide-int-print.h.
8862         (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8863         (pointer_int_sum): Use wide-int interfaces.
8864         (c_common_nodes_and_builtins): Use make_int_cst.
8865         (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8866         (handle_alloc_size_attribute): Use wide-int interfaces.
8867         (get_nonnull_operand): Likewise.
8868         * c-format.c (get_constant): Use tree_fits_uhwi_p.
8869         * c-lex.c: Include wide-int.h.
8870         (narrowest_unsigned_type): Take a widest_int rather than two
8871         HOST_WIDE_INTs.
8872         (narrowest_signed_type): Likewise.
8873         (interpret_integer): Update accordingly.  Use wide-int interfaces.
8874         (lex_charconst): Use wide-int interfaces.
8875         * c-pretty-print.c: Include wide-int.h.
8876         (pp_c_integer_constant): Use wide-int interfaces.
8877         * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8878         INT_CST_LT_UNSIGNED.
8880 2014-05-06  Richard Biener  <rguenther@suse.de>
8882         * c-opts.c (c_common_post_options): For -freestanding,
8883         -fno-hosted and -fno-builtin disable pattern recognition
8884         if not enabled explicitely.
8886 2014-05-02  Marek Polacek  <polacek@redhat.com>
8888         * c.opt (Wsizeof-pointer-memaccess): Describe option.
8890 2014-05-01  Marek Polacek  <polacek@redhat.com>
8892         PR c/43245
8893         * c.opt (Wdiscarded-qualifiers): Add.
8895 2014-04-30  Marek Polacek  <polacek@redhat.com>
8897         * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs.  Perform
8898         INT_MIN / -1 sanitization only for integer types.
8900 2014-04-25  Marek Polacek  <polacek@redhat.com>
8902         PR c/18079
8903         * c-common.c (handle_noinline_attribute): Warn if the attribute
8904         conflicts with always_inline attribute.
8905         (handle_always_inline_attribute): Warn if the attribute conflicts
8906         with noinline attribute.
8908 2014-04-25  Marek Polacek  <polacek@redhat.com>
8910         PR c/60156
8911         * c-common.c (check_main_parameter_types): Warn about variadic main.
8913 2014-04-24  Mike Stump  <mikestump@comcast.net>
8915         * c.opt (Wshadow-ivar): Default to on.
8917 2014-04-24  Dimitris Papavasiliou  <dpapavas@gmail.com>
8919         * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8921 2014-04-23  Marek Polacek  <polacek@redhat.com>
8923         * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8925 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
8927         PR sanitizer/60275
8928         * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8929         if flag_sanitize_undefined_trap_on_error.
8930         (ubsan_instrument_division, ubsan_instrument_shift,
8931         ubsan_instrument_vla): Likewise.  Use __ubsan_handle_*_abort ()
8932         if !flag_sanitize_recover.
8934 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
8936         PR libstdc++/43622
8937         * c-common.c (registered_builtin_types): Make non-static.
8938         * c-common.h (registered_builtin_types): Declare.
8940 2014-04-14  Richard Biener  <rguenther@suse.de>
8941             Marc Glisse  <marc.glisse@inria.fr>
8943         PR c/60819
8944         * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8945         apply may-alias the scalar pointer type when applicable.
8947 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
8949         PR middle-end/60467
8950         * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8951         as possible argument for Cilk_spawn.
8953 2014-04-11  Tobias Burnus  <burnus@net-b.de>
8955         PR c/60194
8956         * c.opt (Wformat-signedness): Add
8957         * c-format.c(check_format_types): Use it.
8959 2014-04-11  Jason Merrill  <jason@redhat.com>
8961         PR c++/57926
8962         * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8963         default_conversion for an array argument.
8965 2014-04-08  Marek Polacek  <polacek@redhat.com>
8967         PR sanitizer/60745
8968         * c-ubsan.c: Include asan.h.
8969         (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8971 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
8973         * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8975 2014-04-02  Marek Polacek  <polacek@redhat.com>
8977         * c-common.h (c_expand_expr): Remove declaration.
8979 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
8981         PR c++/60689
8982         * c-common.c (add_atomic_size_parameter): When creating new
8983         params vector, push the size argument first.
8985 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
8987         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8988         ubsan_instrument_vla, ubsan_instrument_return): Adjust
8989         ubsan_create_data callers.
8991 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
8993         PR debug/60603
8994         * c-opts.c (c_finish_options): Restore cb_file_change call to
8995         <built-in>.
8997 2014-03-13  Jakub Jelinek  <jakub@redhat.com>
8999         PR middle-end/36282
9000         * c-pragma.c (apply_pragma_weak): Only look at
9001         TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9002         DECL_ASSEMBLER_NAME_SET_P (decl).
9003         (maybe_apply_pending_pragma_weaks): Exit early if
9004         vec_safe_is_empty (pending_weaks) rather than only when
9005         !pending_weaks.
9006         (maybe_apply_pragma_weak): Likewise.  If !DECL_ASSEMBLER_NAME_SET_P,
9007         set assembler name back to NULL afterwards.
9009 2014-03-11  Jason Merrill  <jason@redhat.com>
9011         * c.opt: Add -std=gnu++14.
9013 2014-03-11  Ian Bolton  <ian.bolton@arm.com>
9015         * c-opts.c (c_common_post_options): Don't override
9016         -ffp-contract=fast if unsafe-math-optimizations is on.
9018 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
9020         * c.opt: Enable LTO FE for fshort-double.
9022 2014-03-07  Jason Merrill  <jason@redhat.com>
9024         * c.opt: Add -std=c++14.
9026 2014-03-06  Marek Polacek  <polacek@redhat.com>
9028         PR c/60197
9029         * cilk.c (contains_cilk_spawn_stmt): New function.
9030         (contains_cilk_spawn_stmt_walker): Likewise.
9031         (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9032         * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9034 2014-03-03  Jakub Jelinek  <jakub@redhat.com>
9036         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9037         (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9038         even when flag_preprocess_only.
9040 2014-02-26  Jason Merrill  <jason@redhat.com>
9042         PR c++/59231
9043         PR c++/11586
9044         * c-common.c (shorten_compare): Don't check
9045         c_inhibit_evaluation_warnings.
9047 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
9049         PR c/37743
9050         * c-common.c (c_common_nodes_and_builtins): When initializing
9051         c_uint{16,32,64}_type_node, also set corresponding
9052         uint{16,32,64}_type_node to the same value.
9054         PR c++/60267
9055         * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9056         for PRAGMA_IVDEP if flag_preprocess_only.
9058 2014-02-12  Jakub Jelinek  <jakub@redhat.com>
9060         PR c/60101
9061         * c-common.c (merge_tlist): If copy is true, call new_tlist,
9062         if false, add ADD itself, rather than vice versa.
9063         (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9064         copy.  For SAVE_EXPR, only call merge_tlist once.
9066 2014-02-08  Jakub Jelinek  <jakub@redhat.com>
9068         PR middle-end/60092
9069         * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9070         and tree_to_uhwi.
9071         (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9072         functions.
9073         (c_common_attribute_table): Add alloc_align and assume_aligned
9074         attributes.
9076 2014-02-06  Marek Polacek  <polacek@redhat.com>
9078         PR c/60087
9079         * c-common.c (warn_for_sign_compare): Call warning_at with location
9080         instead of warning.
9082 2014-02-05  Marek Polacek  <polacek@redhat.com>
9084         PR c/53123
9085         * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9086         statement.
9088 2014-02-04  Marek Polacek  <polacek@redhat.com>
9090         PR c/60036
9091         * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9092         SAVE_EXPR.
9094 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
9096         PR c++/53017
9097         PR c++/59211
9098         * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9099         handle_vector_size_attribute, handle_nonnull_attribute): Call
9100         default_conversion on the attribute argument.
9101         (handle_nonnull_attribute): Increment the argument number.
9103 2014-01-31  Marek Polacek  <polacek@redhat.com>
9105         PR c/59963
9106         * c-common.c (add_atomic_size_parameter): Pass vNULL to
9107         build_function_call_vec.
9108         (resolve_overloaded_builtin): Likewise.
9109         * c-common.h (build_function_call_vec): Adjust declaration.
9111 2014-01-30  Marek Polacek  <polacek@redhat.com>
9113         PR c/59940
9114         * c-common.h (unsafe_conversion_p): Adjust declaration.
9115         (warnings_for_convert_and_check): Likewise.
9116         (convert_and_check): Likewise.
9117         * c-common.c (unsafe_conversion_p): Add location parameter.  Call
9118         expansion_point_location_if_in_system_header on it.
9119         (warnings_for_convert_and_check): Add location parameter.  Call
9120         expansion_point_location_if_in_system_header on it.  Use it.
9121         (convert_and_check): Add location parameter.  Use it.
9122         (conversion_warning): Likewise.
9123         (c_add_case_label): Adjust convert_and_check calls.
9124         (scalar_to_vector): Adjust unsafe_conversion_p calls.
9126 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9128         * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9129         flag_cilkplus.
9130         * c-pragma.c (init_pragma): Likewise.
9131         * c.opt: Likewise.
9133 2014-01-23  Marek Polacek  <polacek@redhat.com>
9135         PR c/59846
9136         * c-common.c (shorten_compare): Add location_t parameter.
9137         * c-common.h (shorten_binary_op): Adjust declaration.
9139 2014-01-23  Marek Polacek  <polacek@redhat.com>
9141         PR c/58346
9142         * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9143         * c-common.h: Declare it.
9145 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
9147         * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9148         * c-ada-spec.c (dump_ads): Likewise.
9149         (cpp_check): Likewise.
9150         (dump_ada_specs): Likewise.
9152 2014-01-15  Laurent Alfonsi  <laurent.alfonsi@st.com>
9154         PR c++/49718
9155         * c-common.c (handle_no_instrument_function_attribute): Allow
9156         no_instrument_function attribute in class member
9157         definition/declaration.
9159 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
9161         PR c/58943
9162         * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9163         build_modify_expr with non-NOP_EXPR opcode.  Handle return from it
9164         being COMPOUND_EXPR.
9165         (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9166         operand a SAVE_EXPR and second MODIFY_EXPR.
9168 2014-01-09  Jakub Jelinek  <jakub@redhat.com>
9170         PR target/58115
9171         * c-pch.c (c_common_write_pch): Call
9172         prepare_target_option_nodes_for_pch.
9174 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9176         Update copyright years
9178 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9180         * array-notation-common.c, c-cilkplus.c: Use the standard form for
9181         the copyright notice.
9183 2013-12-28  Eric Botcazou  <ebotcazou@adacore.com>
9185         * c-ada-spec.c (print_constructor): New function.
9186         (print_destructor): Retrieve the origin of the destructor.
9187         (print_ada_declaration): Revamp handling of constructors/destructors.
9189 2013-12-23  Stuart Hastings  <stuart@apple.com>
9190             Bill Maddox  <maddox@google.com>
9191             Jason Merrill  <jason@redhat.com>
9193         * c.opt: Add -fdeclone-ctor-dtor.
9194         * c-opts.c (c_common_post_options): Default to on iff -Os.
9196 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9198         * c-common.c (c_common_attribute_table): Added "cilk simd function"
9199         attribute.
9200         * c-pragma.h (enum pragma_cilk_clause): Remove.
9201         (enum pragma_omp_clause): Added the following fields:
9202         PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9203         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9204         PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9205         PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9206         PRAGMA_CILK_CLAUSE_UNIFORM.
9209 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9211         * cilk.c (cilk_outline): Made this function non-static.
9212         (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9213         (create_cilk_wrapper): Added a new parameter: a function pointer.
9214         (c_install_body_w_frame_cleanup): Remove
9215         (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9216         * c-common.h (cilk_outline): New prototype.
9217         (gimplify_cilk_spawn): Removed two parameters.
9218         (cilk_install_body_with_frame_cleanup): New prototype.
9219         * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9220         CILK_SPAWN_STMT case.
9222 2013-12-11  Bernd Schmidt  <bernds@codesourcery.com>
9224         * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9226         * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9227         (int_array_type_node): Remove.
9228         * c-common.c (c_common_nodes_and_builtins): Don't build it.
9230 2013-12-05  Marek Polacek  <polacek@redhat.com>
9232         PR c/52023
9233         * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9234         [ADJUST_FIELD_ALIGN].
9236 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
9238         PR c/52023
9239         * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9240         and check field alignment if set.
9241         * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9242         (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9244 2013-12-04  Jakub Jelinek  <jakub@redhat.com>
9245             Marek Polacek  <polacek@redhat.com>
9247         * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9248         sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9250 2013-11-29   H.J. Lu  <hongjiu.lu@intel.com>
9252         PR c/59309
9253         * cilk.c (gimplify_cilk_spawn): Properly handle function without
9254         arguments.
9256 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
9258         PR c/59280
9259         * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9260         goto invalid.  If it is error_mark_node, don't issue further
9261         diagnostics.
9263 2013-11-28  Sergey Ostanevich  <sergos.gnu@gmail.com>
9265         * c.opt (Wopenmp-simd): New.
9267 2013-11-22  Jakub Jelinek  <jakub@redhat.com>
9269         * c-ubsan.h (ubsan_instrument_return): New prototype.
9270         * c-ubsan.c (ubsan_instrument_return): New function.
9272 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
9274         * c-common.c: Add required include files from gimple.h.
9275         * c-gimplify.c: Likewise.
9276         * cilk.c: Likewise.
9278 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
9280         * c-common.c (unsafe_conversion_p): Remove use of
9281         EXPR_LOC_OR_HERE macro.
9282         (conversion_warning): Likewise.
9283         (warnings_for_convert_and_check): Likewise.
9284         (warn_for_collisions_1): Likewise.
9285         (shorten_compare): Likewise, and remove use of in_system_header
9286         macro, using the location from the former.
9287         * c-lex.c (dump_one_header): Remove use of input_filename macro.
9288         (cb_def_pragma): Remove use of in_system_header macro.
9289         (lex_string): Likewise.
9290         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9292 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
9293             Mike Stump  <mikestump@comcast.net>
9294             Richard Sandiford  <rdsandiford@googlemail.com>
9296         * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9297         instead of TREE_INT_CST_LOW, in cases where there is a protecting
9298         tree_fits_shwi_p or tree_fits_uhwi_p.
9299         (dump_generic_ada_node): Likewise.
9300         * c-format.c (check_format_arg): Likewise.
9301         * c-pretty-print.c (pp_c_integer_constant): Likewise.
9303 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
9305         * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9307 2013-11-19  Joshua J Cogliati  <jrincayc@yahoo.com>
9309         PR c/53001
9310         * c-common.c (unsafe_conversion_p): Make this function
9311         return an enumeration with more detail.
9312         (conversion_warning): Use the new return type of
9313         unsafe_conversion_p to separately warn either about conversions
9314         that lower floating point number precision or about the other
9315         kinds of conversions.
9316         * c-common.h (enum conversion_safety): New enumeration.
9317         (unsafe_conversion_p): switching return type to
9318         conversion_safety enumeration.
9319         * c.opt: Adding new warning -Wfloat-conversion and
9320         enabling it with -Wconversion.
9322 2013-11-19  Basile Starynkevitch  <basile@starynkevitch.net>
9324         * c-opts.c: Include plugin.h.
9325         (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9327 2013-11-19  Marek Polacek  <polacek@redhat.com>
9329         * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9330         call.
9331         (ubsan_instrument_shift): Likewise.
9332         (ubsan_instrument_vla): Likewise.
9334 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9336         * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9337         cast to unsigned type.
9339 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9341         * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9342         tree_low_cst.
9343         (complete_array_type): Update comment to refer to tree_to_[su]hwi
9344         rather than tree_low_cst.
9346 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9348         * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9349         tree_to_uhwi throughout.
9351 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9353         * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9354         tree_low_cst (..., 0) with tree_to_shwi throughout.
9356 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9358         * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9359         host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9361 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9363         * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9364         host_integerp (..., 0) with tree_fits_shwi_p throughout.
9366 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
9368         * c-cilkplus.c: New file.
9369         * c-common.c (readonly_error): Add location argument.
9370         * c-common.h (readonly_error): Same.
9371         (c_finish_cilk_clauses): Protoize.
9372         (c_check_cilk_loop): Same.
9373         c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9374         Do not fail on error_mark_node.
9375         Abstract increment canonicalization to here...
9376         (c_omp_for_incr_canonicalize_ptr): New.
9377         c-pragma.c (init_pragma): Register "simd" pragma.
9378         c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9379         (enum pragma_cilk_clause): New.
9381 2013-11-15  Richard Sandiford  <rdsandiford@googlemail.com>
9383         * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9384         wchar_type and host_integerp checks.
9386 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
9388         * c-common.c: Likewise.
9389         * c-gimplify.c: Likewise.
9390         * cilk.c: Likewise.
9392 2013-11-14  Diego Novillo  <dnovillo@google.com>
9394         * c-common.c: Include fold-const.h.
9395         Include stor-layout.h.
9396         Include calls.h.
9397         Include stringpool.h.
9398         Include attribs.h.
9399         Include varasm.h.
9400         Include trans-mem.h.
9401         * c-cppbuiltin.c: Include stor-layout.h.
9402         Include stringpool.h.
9403         * c-format.c: Include stringpool.h.
9404         * c-lex.c: Include stringpool.h.
9405         Include stor-layout.h.
9406         * c-pragma.c: Include stringpool.h.
9407         Include attribs.h.
9408         Include varasm.h.
9409         Include gcc-symtab.h.
9410         * c-pretty-print.c: Include stor-layout.h.
9411         Include attribs.h.
9412         * cilk.c: Include stringpool.h.
9413         Include calls.h.
9415 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
9417         * c-common.h (enum rid): Add RID_AUTO_TYPE.
9418         * c-common.c (c_common_reswords): Add __auto_type.
9419         (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9421 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
9423         * c-common.c: Include gimplify.h.
9424         * c-gimplify.c: Likewise.
9425         * cilk.c: Likewise.
9426         * c-omp.c: Include gimple-expr.h instead of gimple.h.
9427         * c-ubsan.c: Don't include gimple.h.
9429 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
9431         * c-common.c (c_common_reswords): Add _Thread_local.
9433 2013-11-09  Joseph Myers  <joseph@codesourcery.com>
9435         * c-common.c (atomic_size_supported_p): New function.
9436         (resolve_overloaded_atomic_exchange)
9437         (resolve_overloaded_atomic_compare_exchange)
9438         (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9439         Use it instead of comparing size with a local list of sizes.
9441 2013-11-07  Andrew MacLeod  <amacleod@redhat.com>
9442             Joseph Myers  <joseph@codesourcery.com>
9444         * c-common.h (enum rid): Add RID_ATOMIC.
9445         * c-common.c (c_common_reswords): Add _Atomic.
9446         (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9447         (keyword_is_type_qualifier): Accept RID_ATOMIC.
9448         * c-format.c (check_format_types): Check for extra _Atomic
9449         qualifiers in format argument.
9450         * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9451         (pp_c_type_qualifier_list): Mention _Atomic in comment.
9453 2013-11-06  Tobias Burnus  <burnus@net-b.de>
9455         * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9457 2013-11-06  Joseph Myers  <joseph@codesourcery.com>
9459         * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9460         standards modes.
9461         * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9462         to mean lack of IEEE 754 support.
9464 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9466         * c.opt (-Wdate-time): New option
9467         * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9469 2013-11-05  Joseph Myers  <joseph@codesourcery.com>
9471         * c-cppbuiltin.c (cpp_iec_559_value): Test
9472         flag_excess_precision_cmdline not flag_excess_precision.
9474 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9476         * c.opt (fopenmp-simd): New option.
9477         * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9478         (omp_pragmas): ... this new struct.
9479         (c_pp_lookup_pragma): Also walk omp_pragmas.
9480         (init_pragma): Init pragmas for -fopenmp-simd.
9482 2013-11-04  Marek Polacek  <polacek@redhat.com>
9484         PR c++/58979
9485         * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9487 2013-11-04  Joseph Myers  <joseph@codesourcery.com>
9489         * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9490         New functions.
9491         (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9493 2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>
9495         * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9496         (dump_ada_specs): Adjust prototype of second callback.
9497         * c-ada-spec.c (cpp_check): New global variable.
9498         (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9499         (print_generic_ada_decl): Likewise.
9500         (has_static_fields): Change return type to bool and add guard.
9501         (has_nontrivial_methods): New predicate.
9502         (is_tagged_type): Change return type to bool.
9503         (separate_class_package): Call has_nontrivial_methods.
9504         (pp_ada_tree_identifier): Minor tweaks.
9505         (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9506         (dump_ada_array_domains): Likewise.
9507         (dump_ada_array_type): Likewise.
9508         (dump_template_types): Remove cpp_check parameter and do not pass it to
9509         dump_generic_ada_node.
9510         (dump_ada_template): Likewise.
9511         (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9512         recursively.
9513         (print_ada_methods): Change return type to integer.  Remove cpp_check
9514         parameter and do not pass it down.
9515         (dump_nested_types): Remove cpp_check parameter and do not pass it to
9516         dump_generic_ada_node.
9517         (print_ada_declaration): Likewise.  Test RECORD_OR_UNION_TYPE_P before
9518         accessing methods.
9519         (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9520         down.  Use has_nontrivial_methods to recognize C++ classes.  Use return
9521         value of print_ada_methods.
9522         (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9523         Set cpp_check to it before invoking dump_ada_nodes.
9524         (dump_ada_specs): Likewise.
9526 2013-11-03  Marek Polacek  <polacek@redhat.com>
9528         * c-ubsan.c: Don't include hash-table.h.
9529         (ubsan_instrument_vla): New function.
9530         * c-ubsan.h: Declare it.
9532 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
9534         Automated part of renaming of symtab_node_base to symtab_node.
9536         Patch autogenerated by rename_symtab.py from
9537         https://github.com/davidmalcolm/gcc-refactoring-scripts
9538         revision 58bb219cc090b2f4516a9297d868c245495ee622
9540         * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9541         symtab_node_base to symtab_node.
9543 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
9545         Implement C++14 digit separators.
9546         * c-lex.c (interpret_float): Remove digit separators from scratch string
9547         before building real literal.
9549 2013-10-30  Jakub Jelinek  <jakub@redhat.com>
9551         * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9553 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9555         * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9556         fields.
9557         (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9558         enabled.
9559         * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9560         (insert_cilk_frame): New prototype.
9561         (cilk_init_builtins): Likewise.
9562         (gimplify_cilk_spawn): Likewise.
9563         (c_cilk_install_body_w_frame_cleanup): Likewise.
9564         (cilk_detect_spawn_and_unwrap): Likewise.
9565         (cilk_set_spawn_marker): Likewise.
9566         (build_cilk_sync): Likewise.
9567         (build_cilk_spawn): Likewise.
9568         * cilk.c: New file.
9570 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
9572         Patch autogenerated by refactor_symtab.py from
9573         https://github.com/davidmalcolm/gcc-refactoring-scripts
9574         revision 58bb219cc090b2f4516a9297d868c245495ee622
9576         * c-gimplify.c (c_genericize): Update for conversion of symtab types
9577         to a true class hierarchy.
9578         * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9580 2013-10-27  Richard Sandiford  <rdsandiford@googlemail.com>
9582         * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9584 2013-10-26  Jeff Law  <law@redhat.com>
9586         * c-common.c (c_define_builtins): Remove mudflap support.
9587         * c.opt: Ignore and warn for mudflap options.
9589 2013-10-24  Tobias Burnus  <burnus@net-b.de>
9591         PR other/33426
9592         * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9593         * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9595 2013-10-23  Jason Merrill  <jason@redhat.com>
9597         * c-format.c (gcc_cxxdiag_char_table): Add %X.
9599 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
9601         * c-common.h (omp_clause_mask::operator !=): New method.
9602         * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9603         instead of if (mask & something) tests everywhere.
9605         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9606         201307 instead of 201107.
9607         * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9608         (c_common_attribute_table): Add "omp declare target" and
9609         "omp declare simd" attributes.
9610         (handle_omp_declare_target_attribute,
9611         handle_omp_declare_simd_attribute): New functions.
9612         * c-omp.c: Include c-pragma.h.
9613         (c_finish_omp_taskgroup): New function.
9614         (c_finish_omp_atomic): Add swapped argument, if true,
9615         build the operation first with rhs, lhs arguments and use NOP_EXPR
9616         build_modify_expr.
9617         (c_finish_omp_for): Add code argument, pass it down to make_code.
9618         (c_omp_split_clauses): New function.
9619         (c_split_parallel_clauses): Removed.
9620         (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9621         c_omp_declare_simd_clauses_to_decls): New functions.
9622         * c-common.h (omp_clause_mask): New type.
9623         (OMP_CLAUSE_MASK_1): Define.
9624         (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9625         omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9626         omp_clause_mask::operator |, omp_clause_mask::operator &,
9627         omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9628         omp_clause_mask::operator ==): New methods.
9629         (enum c_omp_clause_split): New.
9630         (c_finish_omp_taskgroup): New prototype.
9631         (c_finish_omp_atomic): Add swapped argument.
9632         (c_finish_omp_for): Add code argument.
9633         (c_omp_split_clauses): New prototype.
9634         (c_split_parallel_clauses): Removed.
9635         (c_omp_declare_simd_clauses_to_numbers,
9636         c_omp_declare_simd_clauses_to_decls): New prototypes.
9637         * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9638         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9639         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9640         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9641         PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9642         Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9643         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9644         PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9645         PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9646         PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9647         PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9648         PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9649         PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9650         PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9651         PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9652         PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9653         PRAGMA_OMP_CLAUSE_UNIFORM.
9655 2013-10-09  Marc Glisse  <marc.glisse@inria.fr>
9657         PR tree-optimization/20318
9658         * c-common.c (handle_returns_nonnull_attribute): New function.
9659         (c_common_attribute_table): Add returns_nonnull.
9661 2013-10-03  Marc Glisse  <marc.glisse@inria.fr>
9663         PR c++/19476
9664         * c.opt (fcheck-new): Move to common.opt.
9666 2013-09-25  Marek Polacek  <polacek@redhat.com>
9667             Jakub Jelinek  <jakub@redhat.com>
9669         PR sanitizer/58413
9670         * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9671         an expression if we can prove it is correct.
9672         (ubsan_instrument_division): Likewise.  Remove unnecessary
9673         check.
9675 2013-09-18  Marek Polacek  <polacek@redhat.com>
9677         PR sanitizer/58411
9678         * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9679         Declare it.
9680         (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9682 2013-09-14  Iain Sandoe  <iain@codesourcery.com>
9684         PR target/48094
9685         * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9686         fobjc-gc, freplace-objc-classes): Accept for LTO.
9688 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
9690         * c-target.def: New hook
9692 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
9694         PR c++/43452
9695         * c.opt (Wdelete-incomplete): Add.
9697 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
9699         * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9700         (vector_types_compatible_elements_p): New function.
9701         * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9702         declaration.
9703         (vector_types_compatible_elements_p): Declare.
9705 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9707         * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9708         a virtual member function.
9709         (pp_simple_type_specifier): Remove.
9710         (pp_c_type_specifier): Likewise.
9711         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9712         Rename from pp_c_type_specifier.  Adjust.
9713         (c_pretty_printer::c_pretty_printer): Do not assign to
9714         simple_type_specifier.
9716 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9718         * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9719         member function.
9720         (c_pretty_printer::storage_class_specifier): Likewise.
9721         (c_pretty_printer::initializer): Likewise.
9722         (pp_declaration): Remove.
9723         (pp_declaration_specifiers): Likewise.
9724         (pp_abstract_declarator): Likewise.
9725         (pp_declarator): Likewise.
9726         (pp_type_id): Likewise.
9727         (pp_statement): Likewise.
9728         (pp_constant): Likewise.
9729         (pp_id_expression): Likewise.
9730         (pp_primary_expression): Likewise.
9731         (pp_unary_expression): Likewise.
9732         (pp_multiplicative_expression): Likewise.
9733         (pp_conditional_expression): Likewise.
9734         (pp_assignment_expression): Likewise.
9735         (pp_expression): Likewise.
9736         (pp_c_type_id): Likewise.
9737         (pp_c_storage_class_specifier): Likewise.
9738         * c-pretty-print.c (pp_c_type_cast): Tidy.
9739         (pp_c_pointer): Likewise.
9740         (pp_c_type_specifier): Likewise.
9741         (pp_c_parameter_type_list): Likewise.
9742         (pp_c_function_definition): Likewise.
9743         (pp_c_init_declarator): Likewise.
9744         (pp_c_initializer_list): Likewise.
9745         (pp_c_constructor_elts): Likewise.
9746         (c_pretty_printer::direct_abstract_declarator): Likewise.
9747         (c_pretty_printer::declaration_specifiers): Likewise.
9748         (c_pretty_printer::primary_expression): Likewise.
9749         (c_pretty_printer::postfix_expression): Likewise.
9750         (c_pretty_printer::type_id): Rename from pp_c_type_id.
9751         (c_pretty_printer::storage_class_specifier): Rename from
9752         pp_c_storage_class_specifier.
9753         (c_pretty_printer::initializer): Rename from pp_c_initializer.
9754         (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9755         storage_class_specifier, initializer, offset_list, flags.
9757 2013-08-30  Marek Polacek  <polacek@redhat.com>
9759         * c-ubsan.c: New file.
9760         * c-ubsan.h: New file.
9762 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9764         * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9765         member function.
9766         (c_pretty_printer::declaration_specifiers): Likewise.
9767         (c_pretty_printer::declarator): Likewise.
9768         (c_pretty_printer::abstract_declarator): Likewise.
9769         (c_pretty_printer::direct_abstract_declarator): Likewise.
9770         (c_pretty_printer::direct_declarator): Likewise.
9771         (c_pretty_printer::function_specifier): Likewise.
9772         (pp_declaration): Adjust.
9773         (pp_declaration_specifiers): Likewise.
9774         (pp_abstract_declarator): Likewise.
9775         (pp_direct_declarator): Likewise.
9776         (pp_function_specifier): Likewise.
9777         (pp_direct_abstract_declarator): Remove as unused.
9778         (pp_c_declaration): Remove.
9779         (pp_c_declaration_specifiers): Likewise.
9780         (pp_c_declarator): Likewise.
9781         (pp_c_direct_declarator): Likewise.
9782         (pp_c_function_specifier): Likewise.
9783         (pp_c_direct_abstract_declarator): Likewise.
9784         * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9785         from pp_c_abstract_declarator.  Adjust.
9786         (c_pretty_printer::direct_abstract_declarator): Rename from
9787         pp_c_direct_abstract_declarator.  Adjust.
9788         (c_pretty_printer::function_specifier): Rename from
9789         pp_c_function_specifier.  Adjust.
9790         (c_pretty_printer::declaration_specifiers): Rename from
9791         pp_c_declaration_specifiers.  Adjust.
9792         (c_pretty_printer::direct_declarator): Rename from
9793         pp_c_direct_declarator.  Adjust.
9794         (c_pretty_printer::declarator): Rename from pp_c_declarator.  Adjust.
9795         (c_pretty_printer::declaration): Rename from pp_c_declaration.  Adjust.
9796         (c_pretty_printer::c_pretty_printer): Do not assign to
9797         declaration, declaration_specifiers, declarator,
9798         direct_declarator, direct_abstract_declarator, function_specifier.
9800 2013-08-26  Gabriel Dos Reis  <gdre@integrable-solutions.net>
9802         * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9803         virtual member function.
9804         (c_pretty_printer::multiplicative_expression): Likewise.
9805         (c_pretty_printer::conditional_expression): Likewise.
9806         (c_pretty_printer::assignment_expression): Likewise.
9807         (c_pretty_printer::expression): Likewise.
9808         (pp_unary_expression): Adjust.
9809         (pp_multiplicative_expression): Likewise.
9810         (pp_assignment_expression): Likewise.
9811         (pp_conditional_expression): Likewise.
9812         (pp_expression): Likewise.
9813         * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9814         from pp_c_unary_expression.  Adjust.
9815         (c_pretty_printer::multiplicative_expression): Rename from
9816         pp_c_multiplicative_expression.  Adjust.
9817         (c_pretty_printer::conditional_expression): Rename from
9818         pp_c_conditional_expression.  Adjust.
9819         (c_pretty_printer::assignment_expression): Rename from
9820         pp_c_assignment_expression.  Adjust.
9821         (c_pretty_printer::expression): Rename from pp_c_expression.  Adjust.
9822         (c_pretty_printer::c_pretty_printer): Do not assign to
9823         unary_expression, multiplicative_expression,
9824         conditional_expression, expression.
9826 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9828         * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9829         virtual member function.
9830         (pp_postfix_expression): Adjust.
9831         (pp_c_postfix_expression): Remove.
9832         * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9833         from pp_c_postfix_expression.  Adjust.
9834         (c_pretty_printer::c_pretty_printer): Do not assign to
9835         postfix_expression.
9837 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9839         * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9840         virtua member function.
9841         (pp_primary_expression): Adjust.
9842         (pp_c_primary_expression): Remove.
9843         * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9844         from pp_c_primary_expression.  Adjust.
9845         (pp_c_initializer_list): Use pp_primary_expression.
9846         (c_pretty_printer::c_pretty_printer): Do not assign to
9847         primary_expression.
9849 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9851         * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9852         * c-pretty-print.c (M_): Remove.
9853         (c_pretty_printer::translate_string): Define.
9854         (pp_c_type_specifier): Use it.
9855         (pp_c_primary_expression): Likewise.
9856         (pp_c_expression): Likewise.
9858 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9860         * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9861         virtual function.
9862         (pp_c_id_expression): Remove.
9863         (pp_id_expression): Adjust.
9864         * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9865         pp_c_id_expression.  Adjust.
9866         (pp_c_postfix_expression): Use pp_id_expression.
9867         (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9869 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9871         * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9872         member function.
9873         (pp_constant): Adjust.
9874         (pp_c_constant): Remove.
9875         * c-pretty-print.c (c_pretty_printer::constant): Rename from
9876         pp_c_constant.  Adjust.
9877         (pp_c_constant)
9878         (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9879         (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9881 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9883         * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9884         (c_pretty_printer::c_pretty_printer): Declare.
9885         * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9886         c_pretty_printer_init.  Adjust.
9887         (print_c_tree): Do not call c_pretty_printer_init.
9888         * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9890 2013-08-09  Arnaud Charlet  <charlet@adacore.com>
9892         * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9894 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
9896         PR c++/58080
9897         * c-common.c (pointer_int_sum): Add bool parameter.
9898         * c-common.h (pointer_int_sum): Adjust declaration.
9900 2013-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9902         * c-pretty-print.c (print_c_tree): Simplify.  Use non-static local
9903         c_pretty_printer variable.
9905 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9907         * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9908         (pp_base): Remove.
9909         (pp_c_base): Likewise.  Adjust users.
9910         * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9911         (pp_c_whitespace): Do not call pp_base.
9912         (pp_c_left_paren): Likewise.
9913         (pp_c_right_paren): Likewise.
9914         (pp_c_left_brace): Likewise.
9915         (pp_c_right_brace): Likewise.
9916         (pp_c_left_bracket): Likewise.
9917         (pp_c_right_bracket): Likewise.
9918         (pp_c_dot): Likewise.
9919         (pp_c_ampersand): Likewise.
9920         (pp_c_star): Likewise.
9921         (pp_c_arrow): Likewise.
9922         (pp_c_semicolon): Likewise.
9923         (pp_c_complement): Likewise.
9924         (pp_c_exclamation): Likewise.
9925         (pp_c_direct_declarator): Likewise.
9926         (pp_c_ws_string): Likewise.
9927         (pp_c_identifier): Likewise.
9928         (pp_c_statement): Likewise.
9929         (print_c_tree): Likewise.
9931 2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>
9933         PR c++/58072
9934         * c-common.c (c_parse_error): Catch user-defined literal tokens and
9935         provide useful error strings.
9937 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9939         * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9940         printer functions instead of pp_string or operators and punctuators.
9941         (dump_generic_ada_node): Likewise.
9942         * c-pretty-print.c (pp_c_type_specifier): Likewise.
9943         (pp_c_relational_expression): Likewise.
9944         (pp_c_logical_or_expression): Likewise.
9946 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9948         * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9949         functions instead of pp_character.
9950         (pp_ada_tree_identifier): Likewise.
9951         (dump_ada_double_name): Likewise.
9952         (dump_ada_function_declaration): Likewise.
9953         (dump_ada_array_domains): Likewise.
9954         (dump_template_types): Likewise.
9955         (dump_generic_ada_node): Likewise.
9956         (print_ada_declaration): Likewise.
9957         (print_ada_struct_decl): Likewise.
9958         * c-pretty-print.c (pp_c_integer_constant): Likewise.
9960 2013-07-23  Tom Tromey  <tromey@redhat.com>
9962         * c-common.h (enum rid) <RID_GENERIC>: New constant.
9963         * c-common.c (c_common_reswords): Add _Generic.
9965 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
9967         * c-common.c: Fix typos.
9968         * c-common.h: Likewise.
9970 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
9972         PR c++/55203
9973         * c-common.c (c_common_attribute_table): Add warn_unused.
9974         (handle_warn_unused_attribute): New.
9976 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
9978         * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9979         for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9981 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
9983         PR c++/57869
9984         * c.opt: Add Wconditionally-supported.
9986 2013-07-08  Graham Stott  <graham.stott@btinternet.com>
9988         * array-notation-common.c (length_mismatch_in_expr_p): Delete
9989         unused variables l_length and l_node.
9991 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
9993         PR c/57821
9994         * c-common.c (complete_array_type): Delay folding first index
9995         like other indices.  When folding, check for index overflow.
9997 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
9999         PR c++/57509
10000         * c-common.h (c_build_vec_perm_expr): New complain argument.
10001         * c-common.c (c_build_vec_perm_expr): Likewise.
10002         Use save_expr also in C++.
10004 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10006         * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10007         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10008         * c-opts.c (c_common_post_options): Likewise.
10010 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10012         * array-notation-common.c (length_mismatch_in_expr): Changed the
10013         parameter type's from a dynamic array to a vec_tree.  Also removed
10014         the size parameters.
10015         * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10016         the change above.
10018 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10020         * c-common.h (struct cilkplus_an_parts): New structure.
10021         (struct cilkplus_an_loop_parts): Likewise.
10022         (cilkplus_extract_an_triplets): New prototype.
10023         (fix_sec_implicit_args): Likewise.
10024         * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10025         (fix_sec_implicit_args): Likewise.
10027 2013-06-20  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10029         * array-notation-common.c (find_inv_trees): Removed an unwanted
10030         typecasting.
10031         * c-common.h (struct inv_list::additional_tcodes): Changed type from
10032         enum rid to enum tree_code.
10034 2013-06-11  Jan Hubicka  <jh@suse.cz>
10036         * c-common.c (handle_alias_ifunc_attribute): Do not set
10037         DECL_EXTERNAL for weakref variables.
10038         * c-pragma.c (handle_pragma_weak): Make sure aliases
10039         are not declared as external.
10041 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10043         * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10044         function from c/c-array-notation.c.
10045         (is_cilkplus_reduce_builtin): Likewise.
10046         (find_rank): Likewise.
10047         (extract_array_notation_exprs): Likewise.
10048         (replace_array_notations): Likewise.
10049         (find_inv_trees): Likewise.
10050         (replace_inv_trees): Likewise.
10051         (contains_array_notation_expr): Likewise.
10052         (find_correct_array_notation_type): Likewise.
10053         * c-common.h (struct inv_list): Moved this struct from the file
10054         c/c-array-notation.c and added a new field called additional tcodes.
10055         (length_mismatch_in_expr_p): New prototype.
10056         (is_cilkplus_reduce_builtin): Likewise.
10057         (find_rank): Likewise.
10058         (extract_array_notation_exprs): Likewise.
10059         (replace_array_notation): Likewise.
10060         (find_inv_trees): Likewise.
10061         (replace_inv_trees): Likewise.
10062         (find_correct_array_notation_type): Likewise.
10064 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10066         * c-common.c (c_define_builtins): When cilkplus is enabled, the
10067         function array_notation_init_builtins is called.
10068         (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10069         * c-common.def (ARRAY_NOTATION_REF): New tree.
10070         * c-common.h (build_array_notation_expr): New function declaration.
10071         (build_array_notation_ref): Likewise.
10072         (extract_sec_implicit_index_arg): New extern declaration.
10073         (is_sec_implicit_index_fn): Likewise.
10074         (ARRAY_NOTATION_CHECK): New define.
10075         (ARRAY_NOTATION_ARRAY): Likewise.
10076         (ARRAY_NOTATION_START): Likewise.
10077         (ARRAY_NOTATION_LENGTH): Likewise.
10078         (ARRAY_NOTATION_STRIDE): Likewise.
10079         * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10080         ARRAY_NOTATION_REF.
10081         (pp_c_expression): Likewise.
10082         * c.opt (flag_enable_cilkplus): New flag.
10083         * array-notation-common.c: New file.
10085 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
10087         PR c++/57274
10088         * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10090 2013-05-10  Marc Glisse  <marc.glisse@inria.fr>
10092         * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10093         vectors.
10095 2013-05-07  Han Shen  <shenhan@google.com>
10097         * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10099 2013-04-29  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
10101         * c-common.c (check_user_alignment): Emit error for negative values.
10103 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10105         * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10107 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10109         * c-cppbuiltin.c (c_cpp_builtins): Do not define
10110         __GXX_EXPERIMENTAL_CXX1Y__.
10112 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10113             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
10115         * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10116         * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10117         to simply use OPT_Wpointer_arith.
10118         (c_sizeof_or_alignof_type): Likewise.
10120 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10122         * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10124 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
10126         * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10127         gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10128         specifiers.
10130 2013-04-07  Steven Bosscher  <steven@gcc.gnu.org>
10132         * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10134 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
10136         * c-common.c (pointer_int_sum): Remove dead code.
10138 2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
10140         PR middle-end/56524
10141         * c-common.c (handle_optimize_attribute): Don't call
10142         save_optabs_if_changed.
10144 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
10146         PR middle-end/56461
10147         * c-pch.c (pch_init): Free target_validity at the end.
10149 2013-03-04  Jakub Jelinek  <jakub@redhat.com>
10151         * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10153 2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
10154             Jakub Jelinek  <jakub@redhat.com>
10156         PR sanitizer/56454
10157         * c-common.c (handle_no_sanitize_address_attribute): New function.
10158         (c_common_attribute_table): Add no_sanitize_address attribute.
10159         (handle_no_address_safety_analysis_attribute): Add
10160         no_sanitize_address attribute, not no_address_safety_analysis
10161         attribute.
10163 2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
10165         PR target/52555
10166         * c-common.c (handle_optimize_attribute): Call
10167         save_optabs_if_changed.
10169 2013-02-18  Jakub Jelinek  <jakub@redhat.com>
10170             Steven Bosscher  <steven@gcc.gnu.org>
10172         PR pch/54117
10173         * c-opts.c (c_common_post_options): If debug info is enabled
10174         and non-dwarf*, refuse to load PCH files and when writing PCH
10175         file warn.
10177 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
10179         PR middle-end/56167
10180         * c-common.c (handle_error_attribute): Fix condition.
10182 2013-01-30  Jakub Jelinek  <jakub@redhat.com>
10184         PR c++/55742
10185         * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10187 2013-01-18  Jason Merrill  <jason@redhat.com>
10189         PR target/54908
10190         * c.opt (-fextern-tls-init): New.
10191         * c-opts.c (c_common_post_options): Handle it.
10193 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
10195         PR c/48418
10196         * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10197         RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10198         and is either negative or bigger or equal to type precision
10199         of the first operand.
10201 2012-12-03  Marek Polacek  <polacek@redhat.com>
10203         PR c/55570
10204         * c-common.c (check_user_alignment): Swap order of tests,
10205         check TREE_CODE first.
10207 2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>
10209         PR c++/52654
10210         * c-common.h (overflow_type): New enum.
10211         (build_userdef_literal): Add overflow_type argument.
10212         (tree_userdef_literal): Add overflow_type.
10213         (USERDEF_LITERAL_OVERFLOW): New access macro.
10214         * c-common.c (build_userdef_literal): Add overflow_type
10215         argument.
10216         * c-lex.c (c_lex_with_flags): Add overflow_type to
10217         build_userdef_literal calls.
10218         (interpret_integer, interpret_float): Add overflow_type argument.
10220 2012-11-28  Richard Biener  <rguenther@suse.de>
10222         PR c/35634
10223         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10224         here and use a type with proper overflow behavior for types that would
10225         need to be promoted for the arithmetic.
10227 2012-11-23  Jakub Jelinek  <jakub@redhat.com>
10229         PR sanitizer/55435
10230         * c-common.c (handle_no_address_safety_analysis_attribute): New
10231         function.
10232         (c_common_attribute_table): Add no_address_safety_analysis.
10234 2012-11-16  Simon Baldwin  <simonb@google.com>
10236         * c.opt: Add f[no-]canonical-system-headers.
10237         * c-opts.c (c_common_handle_option): Handle
10238         OPT_fcanonical_system_headers.
10240 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
10242         PR c++/54413
10243         * c-opts.c (c_common_handle_option): Set new flags.
10244         * c.opt: Describe new flags.
10246 2012-11-09  Jason Merrill  <jason@redhat.com>
10248         * c.opt (Wabi-tag): New.
10250 2012-11-09  Andi Kleen  <ak@linux.intel.com>
10252         PR 55139
10253         * c-common.c (get_atomic_generic_size): Mask with
10254         MEMMODEL_MASK
10256 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10258         PR c/53063
10259         * c.opt (Wformat): Make it Alias Wformat=1.
10260         (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10261         Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10262         LangEnabledBy.
10263         (Wformat=): RejectNegative. Use LangEnabledBy.
10264         (Wnonnull): Use LangEnabledBy.
10265         * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10266         * c-format.c (set_Wformat): Delete.
10267         (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10268         (maybe_read_dollar_number): Likewise.
10269         (avoid_dollar_number): Likewise.
10270         (finish_dollar_format_checking): Likewise.
10271         (check_format_info): Likewise.
10272         (check_format_info_main): Likewise.
10273         (check_format_types): Likewise.
10274         (format_type_warning): Likewise.
10275         * c-common.c (int): Likewise.
10276         (check_function_sentinel): Likewise.
10277         * c-common.h (warn_format,set_Wformat): Do not declare here.
10279 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10281         PR c/53063
10282         * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10283         Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10284         Use LangEnabledBy.
10285         (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10286         common.opt.
10287         (Wvariadic-macros): Init(1).
10288         * c-opts.c (c_common_handle_option): Do not handle them
10289         explicitly.
10290         (c_common_post_options): Likewise.
10291         (sanitize_cpp_opts): warn_unused_macros is now
10292         cpp_warn_unused_macros.
10293         (push_command_line_include): Likewise.
10294         * c-common.c (warn_unknown_pragmas): Do not define.
10295         * c-common.h (warn_unknown_pragmas): Do not declare.
10297 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10299         PR c/51294
10300         * c-common.c (conversion_warning): Handle conditional expressions.
10302 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
10304         PR c++/54930
10305         * c.opt (Wreturn_local_addr): Define new option.
10307 2012-10-25  Jason Merrill  <jason@redhat.com>
10309         * c.opt (Wvirtual-move-assign): New.
10311         * c.opt (Winherited-variadic-ctor): New.
10313 2012-10-25  Marc Glisse  <marc.glisse@inria.fr>
10315         PR c++/54427
10316         * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10318 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
10320         * c-common.h (pch_cpp_save_state): Declare.
10321         * c-target.def (c_preinclude): New hook.
10322         * c-opts.c (done_preinclude): New.
10323         (push_command_line_include): Handle default preincluded header.
10324         (cb_file_change): Call pch_cpp_save_state when calling
10325         push_command_line_include.
10326         * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10327         (pch_cpp_save_state): New.
10328         (pch_init): Call pch_cpp_save_state conditionally, instead of
10329         calling cpp_save_state.
10331 2012-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10333         PR c/53063
10334         PR c/40989
10335         * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10336         Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10337         Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10338         Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10339         Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10340         * c-opts.c (c_common_handle_option): Remove explicit handling from
10341         here.
10342         (c_common_post_options): Likewise.
10344 2012-10-18  Eric Botcazou  <ebotcazou@adacore.com>
10346         * c-ada-spec.c (LOCATION_COL): Delete.
10347         (compare_location): New function.
10348         (compare_node): Use it.
10349         (compare_comment): Likewise.
10351 2012-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10353         PR c/53063
10354         PR c/40989
10355         * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10356         * c-opts.c (c_common_handle_option): Do not set them here. Add
10357         comment.
10358         (c_common_post_options): Likewise.
10360 2012-10-16  Eric Botcazou  <ebotcazou@adacore.com>
10362         * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10363         (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10364         Remove POINTER_TYPE handling, add large unsigned handling and use
10365         ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10367 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
10369         PR c/54381
10370         * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10371         * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10372         locs and array of 3 trees instead of just single loc and single
10373         sizeof_arg tree.  Handle __builtin___*_chk builtins too, and
10374         also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10375         For *cmp* builtins that take two sources strings report warnings
10376         about first and second source, not about destination and source.
10378 2012-10-12  Marc Glisse  <marc.glisse@inria.fr>
10380         PR c++/53055
10381         * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10383 2012-10-11  Eric Botcazou  <ebotcazou@adacore.com>
10385         * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10386         declaring something coming from another file.
10388 2012-10-10  Arnaud Charlet  <charlet@adacore.com>
10390         PR ada/54845
10391         * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10393 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
10395         PR c++/54194
10396         * c-common.c (warn_about_parentheses): Add location_t parameter;
10397         use EXPR_LOC_OR_LOC.
10398         * c-common.h: Update declaration.
10400 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
10402         PR c++/54427
10403         * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10404         more operations. Make error messages optional.
10405         * c-common.h (enum stv_conv): Moved from c-typeck.c.
10406         (scalar_to_vector): Declare.
10408 2012-10-08  Jason Merrill  <jason@redhat.com>
10410         * c-common.c (c_common_reswords): Add thread_local.
10412 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
10414         PR c++/53528 C++11 attribute support
10415         * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10416         new functions.
10417         * c-common.c (check_cxx_fundamental_alignment_constraints): New
10418         static function.
10419         (handle_aligned_attribute): In choose strictest alignment
10420         among many.  Use new check_cxx_fundamental_alignment_constraints.
10421         (handle_transparent_union_attribute): In c++11 attribute syntax,
10422         don't look through typedefs.
10424 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
10426         * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10427         * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10428         out of dumpfile.h.
10430 2012-09-25  Dehao Chen  <dehao@google.com>
10432         PR middle-end/54645
10433         * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10434         map when read in the pch.
10436 2012-09-18  Arnaud Charlet  <charlet@adacore.com>
10438         * c-ada-spec.c: Style fixes.
10440 2012-09-18  Thomas Quinot  <quinot@adacore.com>
10442         * c.opt (-fada-spec-parent): Define new command line switch.
10443         * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10444         is specified, generate binding spec as a child of the specified unit.
10446 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
10447             Manuel López-Ibáñez  <manu@gcc.gnu.org>
10449         PR c++/53210
10450         * c.opt ([Winit-self]): Enabled by -Wall in C++.
10452 2012-08-23  Arnaud Charlet  <charlet@adacore.com>
10454         * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10455         for pointers, and add missing Convention C pragma.
10456         (print_ada_struct_decl): Add missing aliased keyword.
10457         (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10459 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
10461         * c-common.c (sizeof_pointer_memaccess_warning): New function.
10462         * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10463         * c-opts.c (c_common_handle_option): Enable it for -Wall.
10464         * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10465         * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10467 2012-08-10  Richard Guenther  <rguenther@suse.de>
10469         * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10471 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
10473         * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10474         instead of separate pp_newline and pp_flush.
10475         (print_c_tree): Likewise.
10477 2012-07-26  Richard Henderson  <rth@redhat.com>
10479         * c-common.c (handle_hot_attribute): Allow labels.
10480         (handle_cold_attribute): Likewise.
10482 2012-07-20  Jakub Jelinek  <jakub@redhat.com>
10484         PR c++/28656
10485         * c-common.c (check_function_nonnull): Handle multiple nonnull
10486         attributes properly.
10488 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
10490         * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10491         * c-ada-spec.c: Likewise.
10492         * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10494 2012-07-14  Steven Bosscher  <steven@gcc.gnu.org>
10496         * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10497         Remove code conditional on it.
10499 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
10501         * c-gimplify.c: Do not include basic-block.h.
10502         * c-common.c: Do not include linfuncs.h.
10504 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
10506         * c-common.h: Include tree.h.
10508 2012-07-02  Jason Merrill  <jason@redhat.com>
10510         PR c++/53524
10511         * c-common.c (get_priority): Call default_conversion.
10513 2012-07-01  Uros Bizjak  <ubizjak@gmail.com>
10515         * c-pch.c (c_common_write_pch): Remove unused variables.
10517 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
10519         * cppspec.c: Moved from gcc/ to here.
10521 2012-06-27  Kai Tietz  <ktietz@redhat.com>
10523         PR preprocessor/37215
10524         * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10526 2012-06-21  Steven Bosscher  <steven@gcc.gnu.org>
10528         * c-common.h (c_common_print_pch_checksum): Remove.
10529         * c-pch.c: Do not include output.h.
10530         (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10531         (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10532         (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10533         (struct c_pch_header): Remove.
10534         (get_ident): Update gpch version.
10535         (pch_init): Do not print executable_checksum to asm_out_file.
10536         Do not fail if there is no asm_out_file to read back from.  Set
10537         asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10538         (c_common_write_pch): Verify that nothing was written to asm_out_file
10539         since pch_init was called.  Do not write a c_pch_header, and do not
10540         copy from asm_out_file to the PCH.
10541         (c_common_read_pch): Do not read a c_pch_header, and do not restore
10542         the content of asm_out_file from the PCH.
10543         (c_common_print_pch_checksum): Remove.
10544         * c-opts.c (c_common_init): Print out executable_checksum directly.
10546 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
10548         * c-target.def (objc_declare_unresolved_class_reference,
10549         objc_declare_class_definition): Add new hooks.
10551 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
10553         * c-lex.c: Do not include output.h.
10554         (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10555         Remove uses of ASM_OUTPUT_IDENT.
10557 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
10559         PR c++/51033
10560         * c-common.h (c_build_vec_perm_expr): Move decl here.
10561         * c-common.c (c_build_vec_perm_expr): Move definition
10562         here.
10564 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
10566         * c.opt (fconserve-space): Turn into a no-op.
10568 2012-06-04  Sterling Augustine  <saugustine@google.com>
10570         * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10571         * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10572         both the start and end of the function.
10574 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
10576         * c-common.c: Do not include output.h.
10577         * c-pragma.c: Likewise.
10579 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
10581         * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10582         (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10583         (lang_decl_name): Handle namespace decls.
10585 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
10587         * c-ada-spec.c: Do not include output.h.
10588         * c-semantics.c: Likewise.
10590 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
10592         * c-common.c: Fix typo.
10594 2012-05-29  Michael Matz  <matz@suse.de>
10596         * c-common.h (c_expand_decl): Remove prototype.
10598 2012-05-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10600         * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10601         * c-opts.c (c_common_handle_option): Remove code handling
10602         warn_missing_braces.
10604 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
10606         PR c++/25137
10607         * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10608         -Wmissing_braces.
10610 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
10612         PR c++/53322
10613         * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10615 2012-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10617         * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10618         * c-opts.c (c_common_handle_option): Do not handle explicitly
10619         Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10621 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
10623         PR preprocessor/7263
10624         * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
10625         to cpp_classify_number.  For diagnostics, use the precise location
10626         instead of the global input_location.
10628 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
10630         PR c++/11856
10631         * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10633 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
10635         * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
10637 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10639         PR 53063
10640         * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10641         Wreorder): Use LangEnabledBy.
10642         * c-opts.c (c_common_handle_option): Do not enable them
10643         explicitly. Call lang-specific generated functions.
10644         (c_common_post_options): Do not set them here.
10646 2012-05-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10648         * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10649         Wmissing-field-initializers,Wmissing-parameter-type,
10650         Wold-style-declaration,Woverride-init): Use EnabledBy.
10651         * c-opts.c (c_common_post_options): Do not set here explicitly.
10653 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10655         PR 53063
10656         * c-opts.c (c_common_handle_option): Use handle_generated_option
10657         to enable sub-options.
10659 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
10661         PR c++/53158
10662         * c-common.c (warnings_for_convert_and_check): Use warning_at.
10664 2012-05-10  Richard Guenther  <rguenther@suse.de>
10666         * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10667         adjust commentary about TYPE_IS_SIZETYPE types.
10669 2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10671         PR c++/53261
10672         * c-common.c (warn_logical_operator): Check that argument of
10673         integer_zerop is not NULL.
10675 2012-05-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10677         PR c/43772
10678         * c-common.c (warn_logical_operator): Do not warn if either side
10679         is already true or false.
10681 2012-05-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10683         PR c/51712
10684         * c-common.c (expr_original_type): New.
10685         (shorten_compare): Do not warn for enumeration types.
10687 2012-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10689         * c.opt (fpermissive): Add Var(flag_permissive).
10691 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
10693         PR c++/51033
10694         * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10695         * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10697 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
10699         Add -Wvarargs option
10700         * c.opt (Wvarargs): Define new option.
10702 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10704         * c-common.c (check_function_arguments): Replace
10705         Wmissing-format-attribute with Wsuggest-attribute=format.
10707 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10709         * c.opt (Wsuggest-attribute=format): New. Alias of
10710         Wmissing-format-attribute.
10711         * c-format.c (decode_format_type): Replace
10712         Wmissing-format-attribute with Wsuggest-attribute=format.
10713         (check_function_format): Likewise.
10715 2012-04-27  Ollie Wild  <aaw@google.com>
10717         * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10718         * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10719         * c.opt: Add Wliteral-suffix.
10721 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10723         PR c/44774
10724         * c.opt (Wpedantic): New.
10725         (pedantic): Alias Wpedantic.
10726         * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10727         (c_common_post_options): Likewise.
10728         (sanitize_cpp_opts): Likewise.
10729         * c-lex.c (interpret_float): Likewise.
10730         * c-format.c (check_format_types): Likewise.
10731         * c-common.c (pointer_int_sum): Likewise.
10732         (c_sizeof_or_alignof_type): Likewise.
10733         (c_add_case_label): Likewise.
10734         (c_do_switch_warnings): Likewise.
10735         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10737 2012-04-15  Jason Merrill  <jason@redhat.com>
10739         PR c++/52818
10740         * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10741         (C_STD_NAME): Distinguish between C++98 and C++11.
10743 2012-04-11  Eric Botcazou  <ebotcazou@adacore.com>
10745         PR target/52624
10746         * c-common.h (uint16_type_node): Rename into...
10747         (c_uint16_type_node): ...this.
10748         * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10749         * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10751 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10753         * c-common.c (warn_if_unused_value): Move definition to here.
10754         * c-common.h (warn_if_unused_value): Move declaration to here.
10756 2012-03-23  William Bader  <williambader@hotmail.com>
10758         * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10760 2012-03-20  Jason Merrill  <jason@redhat.com>
10762         * c-common.h (enum cxx_dialect): Add cxx1y.
10763         * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10764         test.
10765         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10766         * c-opts.c (c_common_post_options): Likewise.
10767         (set_std_cxx1y): New.
10768         (c_common_handle_option): Call it.
10769         * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10771 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
10773         PR c++/14710
10774         * c.opt ([Wuseless-cast]): Add.
10776 2012-03-16  Richard Guenther  <rguenther@suse.de>
10778         * c-pretty-print.c (pp_c_initializer_list): Adjust.
10780 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10782         PR c++/44783
10783         * c.opt (ftemplate-backtrace-limit) Add.
10785 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10787         * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10788         handling.
10789         * c-pragma.c (handle_pragma_extern_prefix): Remove.
10790         (init_pragma): Don't register extern_prefix.
10792 2012-03-12  Richard Guenther  <rguenther@suse.de>
10794         * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10795         (builtin_type_for_size): Likewise.
10797 2012-02-13  Jakub Jelinek  <jakub@redhat.com>
10799         PR c++/52215
10800         * c-common.c (sync_resolve_params): Don't decide whether to convert
10801         or not based on TYPE_SIZE comparison, convert whenever arg_type
10802         is unsigned INTEGER_TYPE.
10804 2012-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
10806         PR c/52118
10807         * c.opt ([Wunused-local-typedefs]): Fix description.
10809 2012-01-24  Mike Stump  <mikestump@comcast.net>
10811         * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10812         exactly.
10814 2012-01-18  Richard Guenther  <rguenther@suse.de>
10816         * c-opts.c (c_common_post_options): Reset LTO flags if
10817         we are about to generate a PCH.
10819 2012-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
10821         PR c++/51777
10822         * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10823         use pp_unsigned_wide_integer.
10825 2012-01-10  Richard Guenther  <rguenther@suse.de>
10827         PR middle-end/51806
10828         * c-opts.c (c_common_handle_option): Move -Werror handling
10829         to language independent code.
10831 2012-01-05  Richard Guenther  <rguenther@suse.de>
10833         PR middle-end/51764
10834         * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10835         from common.opt.
10837 2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
10839         PR c++/51316
10840         * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10841         of array types with an unknown bound.
10843 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
10845         * c-common.c (flag_isoc99): Update comment to refer to C11.
10846         (flag_isoc1x): Change to flag_isoc11.
10847         * c-common.h (flag_isoc99): Update comment to refer to C11.
10848         (flag_isoc1x): Change to flag_isoc11.
10849         * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10850         C11.
10851         * c-opts.c (set_std_c1x): Change to set_std_c11.
10852         (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10853         Call set_std_c11.
10854         (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10855         (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10856         * c.opt (std=c1x): Change to std=c11.  Document as non-draft
10857         standard.
10858         (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10859         (std=gnu1x): Change to std=gnu11.  Refer to non-draft standard.
10860         (std=gnu1x): Make alias of std=gnu11.
10862 2011-12-19  Jason Merrill  <jason@redhat.com>
10864         PR c++/51228
10865         * c-common.c (handle_transparent_union_attribute): Check the first
10866         field if the type is complete.
10868 2011-12-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
10870         PR libstdc++/51365
10871         * c-common.c (RID_IS_FINAL): Add.
10872         * c-common.h (RID_IS_FINAL): Add.
10874 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
10876         * c.opt (fgnu-runtime): Provide full description.
10877         (fnext-runtime): Likewise.
10878         * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10880 2011-11-28  Andrew MacLeod  <amacleod@redhat.com>
10882         * c-cpp-builtin.c (cpp_atomic_builtins):New.  Emit all atomic
10883         predefines in one place.  Add LOCK_FREE predefines.
10884         (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10885         new func.
10887 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
10889         PR c/51256
10890         * c-common.c (get_atomic_generic_size): Check for various error
10891         conditions
10892         (resolve_overloaded_atomic_exchange,
10893         resolve_overloaded_atomic_compare_exchange,
10894         resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10895         error_mark_node for error conditions.
10897 2011-11-08  Richard Guenther  <rguenther@suse.de>
10899         PR middle-end/51010
10900         * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
10902 2011-11-07  Richard Henderson  <rth@redhat.com>
10903             Aldy Hernandez  <aldyh@redhat.com>
10904             Torvald Riegel  <triegel@redhat.com>
10906         Merged from transactional-memory.
10908         * c-common.c (handle_tm_wrap_attribute,
10909         handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10910         (struct c_common_reswords): Added __transaction* keywords.
10911         (struct c_common_attribute_table): Added transaction* and tm_regparm
10912         attributes.
10913         * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10914         masks.
10915         (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10916         find_tm_attribute): Declare.
10918 2011-11-07  Jason Merrill  <jason@redhat.com>
10920         PR c++/35688
10921         * c-common.c, c-common.h: Revert yesterday's changes.
10923 2011-11-06  Jason Merrill  <jason@redhat.com>
10925         PR c++/35688
10926         * c-common.c (decl_has_visibility_attr): Split out from...
10927         (c_determine_visibility): ...here.
10928         * c-common.h: Declare it.
10930 2011-11-06  Joseph Myers  <joseph@codesourcery.com>
10932         * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10933         (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10934         type.
10935         (check_user_alignment): New.  Split out of
10936         handle_aligned_attribute.  Disallow integer constants with
10937         noninteger types.  Conditionally allow zero.
10938         (handle_aligned_attribute): Use check_user_alignment.
10939         * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10941 2011-11-06  Andrew MacLeod  <amacleod@redhat.com>
10942             Richard Henderson  <rth@redhat.com>
10944         Merged from cxx-mem-model.
10946         * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
10947         * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
10948         parameters that are the same type size.
10949         (get_atomic_generic_size): New.  Find size of generic
10950         atomic function parameters and do typechecking.
10951         (add_atomic_size_parameter): New.  Insert size into parameter list.
10952         (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10953         either __atomic_exchange_n or external library call.
10954         (resolve_overloaded_atomic_compare_exchange): Restructure
10955         __atomic_compare_exchange to either _n variant or external library call.
10956         (resolve_overloaded_atomic_load): Restructure __atomic_load to either
10957         __atomic_load_n or an external library call.
10958         (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10959         __atomic_store_n or an external library call.
10960         (resolve_overloaded_builtin): Handle new __atomic builtins.
10962 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
10964         PR c++/50608
10965         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10966         (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
10967         <INDIRECT_REF>: Return the argument.
10968         <ARRAY_REF>: Remove special code for negative offset.
10969         Call fold_build_pointer_plus instead of size_binop.
10970         (fold_offsetof): Remove STOP_REF argument and adjust.
10971         * c-common.h (fold_offsetof_1): Declare.
10972         (fold_offsetof): Remove STOP_REF argument.
10974 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
10976         PR c++/50810
10977         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10978         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10979         Wnarrowing for C++0x and C++98.
10980         * c.opt ([Wnarrowing]): Update.
10982 2011-11-01  Paolo Carlini  <paolo.carlini@oracle.com>
10984         PR c++/44277
10985         * c.opt: Add Wzero-as-null-pointer-constant.
10987 2011-10-31  Jason Merrill  <jason@redhat.com>
10989         * c.opt (-fdeduce-init-list): Off by default.
10991         PR c++/50920
10992         * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10993         * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10994         and -Wc++11-compat.
10995         * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10997 2011-10-27  Roberto Agostino Vitillo  <ravitillo@lbl.gov>
10999         PR c++/30066
11000         * c.opt (fvisibility-inlines-hidden): Description change.
11002 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
11004         Implement C++11 user-defined literals.
11005         * c-common.c (build_userdef_literal): New.
11006         * c-common.def: New tree code.
11007         * c-common.h (tree_userdef_literal): New tree struct and accessors.
11008         * c-lex.c (interpret_float): Add suffix parm.
11009         (c_lex_with_flags): Build literal tokens.
11011 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11013         PR c++/50841
11014         Revert:
11015         2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11017         PR c++/50810
11018         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11019         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11020         Wnarrowing for C++0x and C++98.
11021         * c.opt ([Wnarrowing]): Update.
11023 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11025         PR c++/50810
11026         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11027         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11028         Wnarrowing for C++0x and C++98.
11029         * c.opt ([Wnarrowing]): Update.
11031 2011-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
11033         PR c++/45385
11034         * c-common.c (conversion_warning): Remove code looking for
11035         artificial operands.
11037 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
11039         PR bootstrap/50760
11040         * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11041         !NO_IMPLICIT_EXTERN_C.
11043 2011-10-17  Michael Spertus  <mike_spertus@symantec.com>
11045         * c-common.c (c_common_reswords): Add __bases,
11046         __direct_bases.
11047         * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11049 2011-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
11051         PR c++/50757
11052         * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11054 2011-10-15  Tom Tromey  <tromey@redhat.com>
11055             Dodji Seketeli  <dodji@redhat.com>
11057         * c.opt (fdebug-cpp): New option.
11058         * c-opts.c (c_common_handle_option): Handle the option.
11059         * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11060         output stream in parameter. Factorized from ...
11061         (maybe_print_line): ... this. Dump location debug information when
11062         -fdebug-cpp is in effect.
11063         (print_line_1): New static function. Takes an output stream in
11064         parameter. Factorized from ...
11065         (print_line): ... here. Dump location information when -fdebug-cpp
11066         is in effect.
11067         (scan_translation_unit): Dump location information when
11068         -fdebug-cpp is in effect.
11070 2011-10-15  Tom Tromey  <tromey@redhat.com>
11071             Dodji Seketeli  <dodji@redhat.com>
11073         * c.opt (ftrack-macro-expansion): New option. Handle it with and
11074         without argument.
11075         * c-opts.c (c_common_handle_option)<case
11076         OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11077         cases. Handle -ftrack-macro-expansion with and without argument.
11079 2011-10-15  Tom Tromey  <tromey@redhat.com>
11080             Dodji Seketeli  <dodji@redhat.com>
11082         * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11083         (print_line, cb_define, do_line_change): Adjust to avoid touching
11084         the internals of struct line_map.  Use the public API instead.
11085         * c-pch.c (c_common_read_pch): Likewise.
11086         * c-lex.c (fe_file_change): Likewise.
11088 2011-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
11090         PR c++/17212
11091         * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11093 2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
11095         PR c++/33067
11096         * c-pretty-print.c (pp_c_floating_constant): Output
11097         max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11099 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11101         * c-common.c (def_builtin_1): Delete old interface with two
11102         parallel arrays to hold standard builtin declarations, and replace
11103         it with a function based interface that can support creating
11104         builtins on the fly in the future.  Change all uses, and poison
11105         the old names.  Make sure 0 is not a legitimate builtin index.
11106         * c-omp.c (c_finish_omp_barrier): Ditto.
11107         (c_finish_omp_taskwait): Ditto.
11108         (c_finish_omp_flush): Ditto.
11110 2011-10-11  Tristan Gingold  <gingold@adacore.com>
11112         * c.opt: (fallow-parameterless-variadic-functions): New.
11114 2011-09-08  Dodji Seketeli  <dodji@redhat.com>
11116         PR c++/33255 - Support -Wunused-local-typedefs warning
11117         * c-common.h (struct c_language_function::local_typedefs): New
11118         field.
11119         (record_locally_defined_typedef, maybe_record_typedef_use)
11120         (maybe_warn_unused_local_typedefs): Declare new functions.
11121         * c-common.c (record_locally_defined_typedef)
11122         (maybe_record_typedef_use)
11123         (maybe_warn_unused_local_typedefs): Define new functions.
11124         * c.opt: Declare new -Wunused-local-typedefs flag.
11126 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
11128         PR middle-end/50266
11129         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11130         computations.
11132 2011-09-05  Richard Guenther  <rguenther@suse.de>
11134         * c-common.c (complete_array_type): Use ssize_int (-1) instead
11135         of integer_minus_one_node for empty array upper bounds.
11137 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
11139         * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11140         it's the first time it's being called on this main TU.
11142 2011-08-24  Richard Guenther  <rguenther@suse.de>
11144         PR c/49396
11145         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11147 2011-08-22  Gabriel Charette  <gchare@google.com>
11149         * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11150         defined in cpp_init_builtins and c_cpp_builtins.
11152 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
11154         * c-common.c (c_common_reswords): Add __builtin_complex.
11155         * c-common.h (RID_BUILTIN_COMPLEX): New.
11157 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
11159         * c-common.c (c_common_reswords): Add _Noreturn.
11160         (keyword_is_function_specifier): Handle RID_NORETURN.
11161         * c-common.h (RID_NORETURN): New.
11163 2011-08-10  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
11165         * c-common.c (unsafe_conversion_p): New function. Check if it is
11166         unsafe to convert an expression to the type.
11167         (conversion_warning): Adjust, use unsafe_conversion_p.
11168         * c-common.h (unsafe_conversion_p): New function declaration.
11170 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
11172         * c-common.h (c_finish_omp_atomic): Adjust prototype.
11173         (c_finish_omp_taskyield): New prototype.
11174         * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11175         arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11176         OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC.  If LHS1
11177         or RHS1 have side-effects, evaluate those too in the right spot,
11178         if it is a decl and LHS is also a decl, error out if they
11179         aren't the same.
11180         (c_finish_omp_taskyield): New function.
11181         * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11182         * c-pragma.c (omp_pragmas): Add taskyield.
11183         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11184         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11185         PRAGMA_OMP_CLAUSE_MERGEABLE.
11187 2011-07-25  Dodji Seketeli  <dodji@redhat.com>
11189         * c-common.h (set_underlying_type): Remove parm name from
11190         declaration.
11192 2011-07-25  Romain Geissler  <romain.geissler@gmail.com>
11194         * c-pretty-print.h: Search c-common.h in c-family.
11196 2011-07-22  Jason Merrill  <jason@redhat.com>
11198         PR c++/49793
11199         * c.opt (Wnarrowing): New.
11201         PR c++/30112
11202         * c-common.h: Declare c_linkage_bindings.
11203         * c-pragma.c (handle_pragma_redefine_extname): Use it.
11205         PR c++/49813
11206         * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11207         * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11208         as flag_isoc99 for 'restrict'.
11209         (pp_c_specifier_qualifier_list): Likewise for _Complex.
11211 2011-07-21  Ian Lance Taylor  <iant@google.com>
11213         PR middle-end/49705
11214         * c-common.c (c_disable_warnings): New static function.
11215         (c_enable_warnings): New static function.
11216         (c_fully_fold_internal): Change local unused_p to bool.  Call
11217         c_disable_warnings and c_enable_warnings rather than change
11218         c_inhibit_evaluation_warnings.
11220 2011-07-20  Jason Merrill  <jason@redhat.com>
11222         PR c++/6709 (DR 743)
11223         PR c++/42603 (DR 950)
11224         * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11225         (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11226         (CPP_DECLTYPE): New.
11227         * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11229 2011-07-19  Richard Guenther  <rguenther@suse.de>
11231         * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11232         * c-omp.c (c_finish_omp_for): Likewise.
11234 2011-07-12  Eric Botcazou  <ebotcazou@adacore.com>
11236         * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11237         body on the next line.
11239 2011-07-08  Jason Merrill  <jason@redhat.com>
11241         PR c++/45437
11242         * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11244         PR c++/49673
11245         * c-common.c (c_apply_type_quals_to_decl): Don't check
11246         TYPE_NEEDS_CONSTRUCTING.
11248 2011-07-06  Richard Guenther  <rguenther@suse.de>
11250         * c-common.c (c_common_nodes_and_builtins):
11251         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11253 2011-07-05  Richard Guenther  <rguenther@suse.de>
11255         * c-common.c (c_common_nodes_and_builtins): Build all common
11256         tree nodes first.
11258 2011-06-27  Jakub Jelinek  <jakub@redhat.com>
11260         * c-common.h (c_tree_chain_next): New static inline function.
11262         * c-common.c (check_builtin_function_arguments): Handle
11263         BUILT_IN_ASSUME_ALIGNED.
11265 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
11267         * c-common.c: Add sync_ or SYNC__ to builtin names.
11268         * c-omp.c: Add sync_ or SYNC__ to builtin names.
11270 2011-06-20  Pierre Vittet  <piervit@pvittet.com>
11272         * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11273         handler.
11274         (gen_pragma_handler): New union.
11275         (internal_pragma_handler): New type.
11276         (c_register_pragma_with_data)
11277         (c_register_pragma_with_expansion_and_data): New functions.
11279         * c-pragma.c (registered_pragmas, c_register_pragma_1)
11280         (c_register_pragma, c_register_pragma_with_expansion)
11281         (c_invoke_pragma_handler): Changed to work with
11282         internal_pragma_handler.
11283         (c_register_pragma_with_data)
11284         (c_register_pragma_with_expansion_and_data): New functions.
11286 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11288         * c-common.c: Include common/common-target.h.
11289         (handle_section_attribute): Use
11290         targetm_common.have_named_sections.
11291         * c-cppbuiltin.c: Include common/common-target.h.
11292         (c_cpp_builtins): Use targetm_common.except_unwind_info.
11294 2011-06-10  Richard Guenther  <rguenther@suse.de>
11296         * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11297         to print a IDENTIFIER_NODE.
11299 2011-06-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11300             Joseph Myers  <joseph@codesourcery.com>
11302         * c.opt (fbuilding-libgcc): New option.
11303         * c-cppbuiltin.c (c_cpp_builtins): Define
11304         __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11306 2011-06-07  Jason Merrill  <jason@redhat.com>
11308         * c-common.c (max_tinst_depth): Lower default to 900.
11310         * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11312 2011-06-07  Richard Guenther  <rguenther@suse.de>
11314         * c-common.c (c_common_nodes_and_builtins): Do not set
11315         size_type_node or call set_sizetype.
11317 2011-06-07  Dodji Seketeli  <dodji@redhat.com>
11319         PR debug/49130
11320         * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11321         type when using pointer comparison to compare types.
11323 2011-06-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
11325         * c.opt: Add -Wdelete-non-virtual-dtor.
11326         * c-opts.c (c_common_handle_option): Include it in -Wall.
11328 2011-05-30  Nathan Froyd  <froydnj@gcc.gnu.org>
11330         PR bootstrap/49190
11332         Revert:
11333         2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11335         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11336         not tree_common.
11338 2011-05-27  Jakub Jelinek  <jakub@redhat.com>
11340         PR c++/49165
11341         * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11342         C++ don't call c_common_truthvalue_conversion on void type arms.
11344 2011-05-27  Nathan Froyd  <froydnj@codesourcery.com>
11346         * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11347         (stmt_list_stack): Define.
11348         (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11349         * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11351 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11353         * c-common.c (warning_candidate_p): Check for BLOCKs.
11355 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11357         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11358         not tree_common.
11360 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11362         * c-common.c (def_fn_type): Remove extra va_end.
11364 2011-05-23  Jason Merrill  <jason@redhat.com>
11366         PR c++/48106
11367         * c-common.c (c_common_get_narrower): New.
11368         (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11370 2011-05-23  Nathan Froyd  <froydnj@codesourcery.com>
11372         * c-common.h (check_function_arguments): Tweak prototype of
11373         check_function_arguments.
11374         * c-common.c (check_function_arguments): Likewise.  Adjust
11375         calls to check_function_nonnull, check_function_format, and
11376         check_function_sentinel.
11377         (check_function_sentinel): Take a FUNCTION_TYPE rather than
11378         separate attributes and typelist arguments.  Use
11379         FOREACH_FUNCTION_ARGS to iterate over argument types.
11381 2011-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
11383         * c-common.c (c_common_reswords): Reorder.
11384         * c-common.h (rid): Likewise.
11386 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
11388         * c-common.c (def_fn_type): Don't call build_function_type, call
11389         build_function_type_array or build_varargs_function_type_array
11390         instead.
11391         (c_common_nodes_and_builtins): Likewise.
11393 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11395         * c-common.c (c_add_case_label): Omit the loc argument to
11396         build_case_label.
11397         * c-common.h (build_case_label): Remove.
11398         * c-semantics.c (build_case_label): Remove.
11400 2011-05-05  Joseph Myers  <joseph@codesourcery.com>
11402         * c-objc.h (objc_start_method_definition): Update prototype.
11403         * stub-objc.c (objc_start_method_definition): Add extra parameter.
11405 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
11407         * c-common.c (check_main_parameter_types): Reindent.  Don't use
11408         TYPE_ARG_TYPES directly.
11409         (handle_nonnull_attribute): Likewise.
11410         (sync_resolve_params): Likewise.
11411         * c-format.c (handle_format_arg_attribute): Likewise.  Adjust call
11412         to check_format_string.
11413         (handle_format_attribute): Likewise.
11414         (check_format_string): Take a function type to examine instead of
11415         a type list.  Use a function_arg_iterator to step through argument
11416         types.
11418 2011-05-04  Richard Guenther  <rguenther@suse.de>
11420         * c-common.c (fix_string_type): Use size_int for index type bounds.
11421         (start_fname_decls): Do not pass NULL to build_int_cst.
11422         (c_init_attributes): Likewise.
11423         * c-lex.c (c_lex_with_flags): Likewise.
11425 2011-04-27  Jason Merrill  <jason@redhat.com>
11427         * c-common.c (make_tree_vector_from_list): New.
11428         * c-common.h: Declare it.
11430 2011-04-26  Richard Guenther  <rguenther@suse.de>
11432         PR preprocessor/48248
11433         * c-ppoutput.c (maybe_print_line): Always optimize newlines
11434         for output size with -P.
11436 2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>
11438         * c-common.c (struct c_common_resword): Add __underlying_type.
11439         * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11441 2011-04-20  Jim Meyering  <meyering@redhat.com>
11443         * c-format.c (init_dollar_format_checking): Remove useless
11444         if-before-free.
11446 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
11448         * c-objc.h (objc_get_interface_ivars): Removed.
11449         (objc_detect_field_duplicates): New.
11450         * stub-objc.c: Likewise.
11452 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
11454         * stub-objc.c (objc_declare_protocols): Renamed to
11455         objc_declare_protocol.
11456         * c-objc.h: Likewise.
11458 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
11460         * stub-objc.c (objc_declare_class): Updated argument name.
11462 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11464         * c-common.h (c_common_init_ts): Declare.
11465         * c-common.c (c_common_init_ts): Define.
11467 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
11469         * c-objc.h (objc_build_message_expr): Updated prototype.
11470         * stub-objc.c (objc_build_message_expr): Likewise.
11472 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11474         * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11475         of cgraph_node.
11477 2011-04-11  Richard Guenther  <rguenther@suse.de>
11479         * c-common.c (complete_array_type): Build a range type of
11480         proper type.
11482 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11484         * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11485         (handle_type_generic_attribute): Likewise.
11487 2011-04-07  Jason Merrill  <jason@redhat.com>
11489         PR c++/48450
11490         * c-common.c (c_common_truthvalue_conversion): Don't ignore
11491         conversion from C++0x scoped enum.
11493 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
11495         * c-target-def.h: New file.
11496         * c-target.def: New file.
11497         * c-target.h: New file.
11498         * c-common.c (targetcm): Don't define here.
11499         * c-common.h (default_handle_c_option): Declare.
11500         * c-format.c: Include c-target.h instead of target.h.
11501         * c-opts.c: Include c-target.h instead of target.h.  Explicitly
11502         include tm.h.
11503         (default_handle_c_option): Move from targhooks.c.
11505 2011-03-29  Jakub Jelinek  <jakub@redhat.com>
11507         PR preprocessor/48248
11508         * c-ppoutput.c (print): Add src_file field.
11509         (init_pp_output): Initialize it.
11510         (maybe_print_line): Don't optimize by adding up to 8 newlines
11511         if map->to_file and print.src_file are different file.
11512         (print_line): Update print.src_file.
11514 2011-03-25  Kai Tietz  <ktietz@redhat.com>
11516         * c-ada-spec.c (compare_comment): Use filename_cmp
11517         instead of strcmp for filename.
11519 2011-03-25  Jeff Law  <law@redhat.com>
11521         * c-common.c (def_fn_type): Add missing va_end.
11523 2011-03-25  Jason Merrill  <jason@redhat.com>
11525         * c.opt: Add -std=c++03.
11527 2011-03-22  Eric Botcazou  <ebotcazou@adacore.com>
11529         * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11531 2011-03-17  Kai Tietz  <ktietz@redhat.com>
11533         PR target/12171
11534         * c-pretty-print.c (pp_c_specifier_qualifier_list):
11535         Display allowed attributes for function pointer types.
11536         (pp_c_attributes_display): New function to display
11537         attributes having affects_type_identity flag set to true.
11538         * c-pretty-print.h (pp_c_attributes_display): New prototype.
11540         * c-common.c (c_common_attribute_table):
11541         Add new element.
11542         (c_common_format_attribute_table): Likewise.
11544 2011-03-18  Jason Merrill  <jason@redhat.com>
11546         * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11547         * c-common.h: Don't declare it here.
11548         * c-common.c: Or define it here.
11549         * c-opts.c (c_common_handle_option): Or set it here.
11551         PR c++/35315
11552         * c-common.c (handle_transparent_union_attribute): Don't
11553         make a duplicate type in C++.
11555 2011-03-15  Jason Merrill  <jason@redhat.com>
11557         * c-common.c (max_constexpr_depth): New.
11558         * c-common.h: Declare it.
11559         * c-opts.c (c_common_handle_option): Set it.
11560         * c.opt (fconstexpr-depth): New option.
11562 2011-03-11  Jason Merrill  <jason@redhat.com>
11564         * c-common.c (attribute_takes_identifier_p): Add missing const.
11566         PR c++/46803
11567         * c-common.c (attribute_takes_identifier_p): Assume that an
11568         unknown attribute takes an identifier.
11570 2011-03-07  Nathan Froyd  <froydnj@codesourcery.com>
11572         PR c/47786
11573         * c-common.c (c_type_hash): Call list_length instead of iterating
11574         through DECL_CHAIN.  Rename 'i' to 'n_elements'.
11576 2011-02-19  Jakub Jelinek  <jakub@redhat.com>
11578         PR c/47809
11579         * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11581 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
11583         * c.opt (fobjc-abi-version=) New.
11584         (fobjc-nilcheck): New.
11586 2011-02-03  Nathan Froyd  <froydnj@codesourcery.com>
11588         PR c++/46890
11589         * c-common.h (keyword_is_decl_specifier): Declare.
11590         * c-common.c (keyword_is_decl_specifier): Define.
11591         (keyword_is_function_specifier): New function.
11593 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
11595         PR c/47473
11596         * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11597         EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11598         REAL_TYPE.
11600 2011-01-26  Arnaud Charlet  <charlet@adacore.com>
11602         * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11604 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
11606         PR pch/47430
11607         * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11608         after init_c_lex if pch_file is set.
11610 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
11612         PR c++/43601
11613         * c.opt (-fkeep-inline-dllexport): New switch.
11615 2011-01-12  Richard Guenther  <rguenther@suse.de>
11617         PR middle-end/32511
11618         * c-common.c (handle_weak_attribute): Warn instead of error
11619         on declaring an inline function weak.
11621 2011-01-05  Tom Tromey  <tromey@redhat.com>
11623         * c-common.h (lvalue_error): Update.
11624         * c-common.c (lvalue_error): Add 'loc' argument.  Call error_at,
11625         not error.
11627 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
11629         PR objc/47075
11630         * c-objc.h (objc_finish_message_expr): Added argument to
11631         prototype.
11633 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
11635         * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11636         Use prototype_p.
11638 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
11640         * c-objc.h (objc_maybe_warn_exceptions): New.
11641         * stub-objc.c (objc_maybe_warn_exceptions): New.
11643 2010-12-10  Nathan Froyd  <froydnj@codesourcery.com>
11645         * c-common.h (readonly_error): Declare.
11646         * c-common.c (readonly_error): Define.
11648 2010-12-09  Nathan Froyd  <froydnj@codesourcery.com>
11650         * c-common.h (invalid_indirection_error): Declare.
11651         * c-common.c (invalid_indirection_error): Define.
11653 2010-12-03  Richard Guenther  <rguenther@suse.de>
11655         PR c/46745
11656         * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11657         (pp_c_unary_expression): Likewise.
11658         (pp_c_expression): Likewise.
11660 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
11662         * c-common.h (objc_finish_function): New.
11663         (objc_non_volatilized_type): Removed.
11664         (objc_type_quals_match): Removed.
11665         * stub-objc.c (objc_finish_function): New.
11666         (objc_non_volatilized_type): Removed.
11667         (objc_type_quals_match): Removed.
11669 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
11671         * c-common.h (parse_optimize_options): Declare.
11672         * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11673         c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11675 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
11677         * c-opts.c (check_deps_environment_vars): Use getenv instead of
11678         GET_ENVIRONMENT.
11679         * c-pch.c (O_BINARY): Don't define here.
11680         * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11682 2010-11-25  Joseph Myers  <joseph@codesourcery.com>
11684         * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11685         targetm.except_unwind_info.
11687 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
11689         * c-opts.c (c_common_handle_option): Pass location to
11690         set_struct_debug_option.
11692 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
11694         * c-common.c (visibility_options): Move from ../opts.c.
11695         * c-common.h (struct visibility_flags, visibility_options):
11696         Declare here.
11697         * c-opts.c (finish_options): Rename to c_finish_options.
11698         (c_common_init): Update call to finish_options.
11700 2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
11702         PR objc/34033
11703         * c-lex.c (lex_string): Check that each string in an Objective-C
11704         string concat sequence starts with either one or zero '@', and
11705         that there are no spurious '@' signs at the end.
11707 2010-11-20  Joseph Myers  <joseph@codesourcery.com>
11709         * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11710         HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11711         HANDLE_PRAGMA_VISIBILITY.
11712         * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11713         HANDLE_PRAGMA_VISIBILITY): Don't define.
11714         (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11716 2010-11-20  Nathan Froyd  <froydnj@codesourcery.com>
11718         PR c++/16189
11719         PR c++/36888
11720         PR c++/45331
11721         * c-common.h (keyword_begins_type_specifier): Declare.
11722         (keyword_is_storage_class_specifier): Declare.
11723         (keyword_is_type_qualifier): Declare.
11724         * c-common.c (keyword_begins_type_specifier): New function.
11725         (keyword_is_storage_class_specifier): New function.
11726         (keyword_is_type_qualifier): Declare.
11728 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
11730         PR c/46547
11731         * c-common.c (in_late_binary_op): Define.
11732         (c_common_truthvalue_conversion): Check in_late_binary_op before
11733         calling c_save_expr.
11734         * c-common.h (in_late_binary_op): Declare.
11736 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
11738         * c-opts.c (c_common_handle_option): Update calls to
11739         set_struct_debug_option.
11741 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
11743         * c-common.h (objc_declare_protocols): Added additional argument.
11744         * stub-objc.c (objc_declare_protocol): Same change.
11746 2010-11-18  Nathan Froyd  <froydnj@codesourcery.com>
11748         PR c/33193
11749         * c-common.h (build_real_imag_expr): Declare.
11750         * c-semantics.c (build_real_imag_expr): Define.
11752 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
11754         * c-opts.c (c_common_parse_file): Take no arguments.
11755         * c-common.h (c_common_parse_file): Update prototype.
11757 2010-11-16  Jakub Jelinek  <jakub@redhat.com>
11759         PR c++/46401
11760         * c-common.c (warning_candidate_p): Don't track non-const calls
11761         or STRING_CSTs.
11763 2010-11-15  Ian Lance Taylor  <iant@google.com>
11765         * c-lex.c (init_c_lex): Set macro debug callbacks if
11766         flag_dump_go_spec is set.
11768 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
11770         * c-common.h (objc_build_incr_expr_for_property_ref): New.
11771         * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11773 2010-11-15  Nathan Froyd  <froydnj@codesourcery.com>
11775         PR preprocessor/45038
11776         * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11777         dialects.
11779 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
11781         * c-common.h (c_family_lang_mask): Declare.
11782         * c-opts.c (c_family_lang_mask): Make extern.
11783         * c-pragma.c (handle_pragma_diagnostic): Use
11784         control_warning_option.
11786 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
11788         * c-common.c (parse_optimize_options): Update call to
11789         decode_options.
11790         * c-common.h (c_common_handle_option): Update prototype.
11791         * c-opts.c (c_common_handle_option): Take location_t parameter and
11792         pass it to other functions.
11794 2010-11-11  Joseph Myers  <joseph@codesourcery.com>
11796         * c-opts.c (warning_as_error_callback): Remove.
11797         (c_common_initialize_diagnostics): Don't call
11798         register_warning_as_error_callback.
11799         (c_common_handle_option): Handle -Werror=normalized= here.
11801 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
11803         * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11804         in diagnostic.
11805         * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11806         letter.
11807         * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11808         Remove trailing '.' from diagnostics.
11809         * c.opt (Wwrite-strings_: Avoid '`' in help text.
11811 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
11813         * c-common.c (parse_optimize_options): Pass global_dc to
11814         decode_options.
11815         * c-opts.c (c_common_handle_option): Pass &global_options to
11816         set_Wstrict_aliasing.
11817         * c.opt (v): Don't mark Common or document here.
11819 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
11821         PR target/44981
11822         * c-format.c (format_type): New type gcc_objc_string_format_type.
11823         (valid_stringptr_type_p): New.
11824         (handle_format_arg_attribute): Use valid_stringptr_type_p ().
11825         (check_format_string): Pass expected type, use
11826         valid_stringptr_type_p (), check that the format string types are
11827         consistent with the format specification.
11828         (decode_format_attr): Warn if NSString is used outside objective-c.
11829         (format_types_orig): Add NSString.
11830         (format_name): New.
11831         (format_flags): New.
11832         (check_format_arg): Handle format strings requiring an external parser.
11833         first_target_format_type: New variable.
11834         (handle_format_attribute): Set up first_target_format_type, pass the
11835         expected format arg string type to check_format_string().
11836         * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
11837         * stub-objc.c (objc_string_ref_type_p): New.
11838         (objc_check_format_arg): New.
11840 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
11842         Fixed using the Objective-C 2.0 dot-syntax with class names.
11843         * c-common.h (objc_build_class_component_ref): New.
11844         * stub-objc.c (objc_build_class_component_ref): New.
11846 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
11848         * c.opt (Wproperty-assign-default): New option.
11850 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
11852         Implemented -fobjc-std=objc1 flag.
11853         * c.opt (fobjc-std=objc1): New option.
11855 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
11857         Implemented format and noreturn attributes for Objective-C methods.
11858         * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11859         attribute for Objective-C methods.
11861 2010-10-31  Jason Merrill  <jason@redhat.com>
11863         * c-common.c (conversion_warning, warn_for_collisions_1): Use
11864         EXPR_LOC_OR_HERE.
11866 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
11868         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11869         * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11870         (objc_add_property_declaration): Removed arguments for copies and
11871         ivar.
11872         (objc_build_getter_call): Renamed to
11873         objc_maybe_build_component_ref.
11874         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11875         (objc_is_property_ref): New.
11876         * c-common.c (c_common_reswords): Removed copies and ivar.
11877         * stub-objc.c (objc_add_property_declaration): Removed arguments
11878         for copies and ivar.
11879         (objc_build_getter_call): Renamed to
11880         objc_maybe_build_component_ref.
11881         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11882         (objc_is_property_ref): New.
11884 2010-10-29  Arnaud Charlet  <charlet@adacore.com>
11885             Matthew Gingell  <gingell@adacore.com>
11887         * c-ada-spec.c (separate_class_package): New function.
11888         (pp_ada_tree_identifier): Prefix references to C++ classes with the
11889         name of their enclosing package.
11890         (print_ada_declaration): Use separate_class_package.
11892 2010-10-27  Jason Merrill  <jason@redhat.com>
11894         * c-common.c (c_common_reswords): Add __is_literal_type.
11895         * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11897         * c-common.c (check_case_value): Remove special C++ code.
11899 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
11901         * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11902         RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
11903         and RID_LAST_PATTR.
11904         (objc_add_property_declaration): Added additional arguments.
11905         (objc_property_attribute_kind): Removed.
11906         (objc_set_property_attr): Removed.
11907         * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11908         copy and nonatomic.
11909         * stub-objc.c (objc_add_property_declaration): Added additional
11910         arguments.
11911         (objc_set_property_attr): Removed.
11913 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
11915         * c-common.h (objc_add_property_variable): Renamed to
11916         objc_add_property_declaration.  Added location argument.
11917         * stub-objc.c (objc_add_property_variable): Same change.
11919 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
11921         * c-common.h (objc_maybe_printable_name): New.
11922         * stub-objc.c (objc_maybe_printable_name): New.
11924 2010-10-22  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
11925             Andrew Pinski  <pinskia@gmail.com>
11927         * c-common.h (c_common_mark_addressable_vec): Declare.
11928         * c-common.c (c_common_mark_addressable_vec): New function.
11930 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
11932         * c-common.h (objc_set_method_type): Removed.
11933         (objc_add_method_declaration): Added boolean argument.
11934         (objc_start_method_definition): Same change.
11935         (objc_build_method_signature): Same change.
11936         * stub-objc.c (objc_set_method_type): Removed.
11937         (objc_add_method_declaration): Added boolean argument.
11938         (objc_start_method_definition): Same change.
11939         (objc_build_method_signature): Same change.
11941 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
11943         * c-common.h (finish_file): Removed.
11944         (objc_write_global_declarations): New.
11945         * c-opts.c (c_common_parse_file): Do not call finish_file.
11946         * stub-objc.c (objc_write_global_declarations): New.
11948 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
11950         Implemented parsing @synthesize and @dynamic for
11951         Objective-C/Objective-C++.
11952         * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11953         (objc_add_synthesize_declaration): New.
11954         (objc_add_dynamic_declaration): New.
11955         * c-common.c (c_common_reswords): Add synthesize and dynamic.
11956         * stub-objc.c (objc_add_synthesize_declaration): New.
11957         (objc_add_dynamic_declaration): New.
11959 2010-10-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
11961         PR target/46041
11962         * c-cppbuiltin.c (mode_has_fma): Move function here from
11963         builtins.c.  Don't use the fma optab, instead just use the
11964         HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11965         using -save-temps.
11967 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
11969         Merge from 'apple/trunk' branch on FSF servers.
11971         2005-11-08  Fariborz Jahanian  <fjahanian@apple.com>
11973         Radar 4330422
11974         * c-common.h (objc_non_volatilized_type): New declaration
11975         * stub-objc.c (objc_non_volatilized_type): New stub.
11977 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
11979         Merge from 'apple/trunk' branch on FSF servers.
11981         2006-03-27  Fariborz Jahanian  <fjahanian@apple.com>
11983         Radar 4133425
11984         * c-common.h (objc_diagnose_private_ivar): New decl.
11985         * stub-objc.c (objc_diagnose_private_ivar): New stub.
11987 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
11989         * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11990         * c-common.h (enum rid): Add RID_AT_PACKAGE.
11991         (objc_ivar_visibility_kind): New enum.
11992         (objc_set_visibility): Adjust prototype to use visibility enum.
11993         * stub-objc.c (objc_set_visibility): Adjust stub to use
11994         visibility enum.
11996 2010-10-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
11998         * c-cppbuiltin.c (builtin_define_float_constants): Emit
11999         __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12000         has the appropriate fma builtins.
12001         (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12003 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
12005         merge from FSF apple 'trunk' branch.
12006         2006 Fariborz Jahanian  <fjahanian@apple.com>
12008         Radars 4436866, 4505126, 4506903, 4517826
12009         * c-common.c (c_common_resword): Define @property and its attributes.
12010         * c-common.h: Define property attribute enum entries.
12011         (OBJC_IS_PATTR_KEYWORD): New.
12012         (objc_property_attribute_kind): New enum.
12013         Declare objc_set_property_attr (), objc_add_property_variable (),
12014         objc_build_getter_call () and objc_build_setter_call ().
12015         * stub-objc.c (objc_set_property_attr): New stub.
12016         (objc_add_property_variable): Likewise.
12017         (objc_build_getter_call): Likewise.
12018         (objc_build_setter_call) Likewise.
12020 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
12022         merge from FSF apple 'trunk' branch.
12023         2006-04-26  Fariborz Jahanian  <fjahanian@apple.com>
12025         Radar 3803157 (method attributes)
12026         * c-common.c (handle_deprecated_attribute): Recognize
12027         objc methods as valid declarations.
12028         * c-common.h: Declare objc_method_decl ().
12029         * stub-objc.c (objc_method_decl): New stub.
12031 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
12033         * c-common.c (parse_optimize_options): Call
12034         decode_cmdline_options_to_array_default_mask before
12035         decode_options.  Update arguments to decode_options.
12036         * c-common.h (c_common_init_options_struct): Declare.
12037         * c-opts.c (c_common_init_options_struct): New.  Split out from
12038         c_common_init_options.
12040 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
12042         Implemented fast enumeration for Objective-C.
12043         * c-common.h (objc_finish_foreach_loop): New.
12044         * stub-objc.c (objc_finish_foreach_loop): New.
12046 2010-10-05  Joseph Myers  <joseph@codesourcery.com>
12048         * c-common.h (struct diagnostic_context): Don't declare here.
12049         (c_common_initialize_diagnostics): Declare using
12050         diagnostic_context typedef.
12051         * c-opts.c (c_common_handle_option): Pass global_dc to
12052         handle_generated_option.
12054 2010-10-04  Joseph Myers  <joseph@codesourcery.com>
12056         * c-opts.c (c_common_handle_option): Pass &global_options_set to
12057         handle_generated_option.
12059 2010-10-03  Ian Lance Taylor  <iant@google.com>
12061         * c.opt (-fplan9-extensions): New option.
12063 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12065         * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12066         Remove.
12067         (c_cpp_builtins): Call functions from cppbuiltin.c instead
12068         of duplicating code.
12070 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
12072         * c-common.c: Add two new entries for @optional
12073         and @required keywords.
12075         merge from FSF 'apple/trunk' branch.
12076         2006-01-30  Fariborz Jahanian  <fjahanian@apple.com>
12078         Radar 4386773
12079         * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12080         objective-c keywords.
12081         (objc_set_method_opt): New declaration.
12082         * stub-objc.c (objc_set_method_opt): New stub.
12084 2010-09-30  Joseph Myers  <joseph@codesourcery.com>
12086         * c-common.c (handle_optimize_attribute): Pass &global_options to
12087         cl_optimization_save and cl_optimization_restore.
12088         * c-opts.c (c_common_handle_option): Pass &global_options to
12089         handle_generated_option.
12090         * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12091         (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12092         &global_options to cl_optimization_restore.
12094 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
12096         * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12097         Objective-C/Objective-C++ keywords.
12099 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
12101         Merge from 'apple/trunk' branch on FSF servers.
12103         2005-10-04  Fariborz Jahanian  <fjahanian@apple.com>
12105         Radar 4281748
12106         * c-common.h (objc_check_global_decl): New declaration.
12107         * stub-objc.c (objc_check_global_decl): New stub.
12109 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
12111         * c.opt: Don't use VarExists.
12113 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
12115         * c-common.c (c_cpp_error): Update names of diagnostic_context
12116         members.
12117         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12118         cl_optimization members.
12119         * c-opts.c (warning_as_error_callback, c_common_handle_option,
12120         sanitize_cpp_opts, finish_options): Update names of cpp_options
12121         members.
12123 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
12125         * c-common.h (OBJC_IS_CXX_KEYWORD): New macro.  Updated comments.
12126         (objc_is_reserved_word): Removed.
12127         * c-common.c: Updated comments.
12128         * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12129         objc_is_reserved_word.
12130         * stub-objc.c (objc_is_reserved_word): Removed.
12132 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
12134         * c-common.h (objc_add_method_declaration): Adjust prototype to
12135         include attributes.
12136         (objc_start_method_definition): Likewise.
12137         (objc_build_keyword_decl): Likewise.
12138         * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12139         (objc_start_method_definition): Likewise.
12140         (objc_build_keyword_decl): Likewise.
12142 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
12144         * c-common.h (objc_start_class_interface): Adjust prototype.
12145         (objc_start_category_interface): Likewise.
12146         (objc_start_protocol): Likewise.
12147         * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12148         (objc_start_class_interface): Likewise.
12149         (objc_start_category_interface): Likewise.
12151 2010-09-27  Ian Lance Taylor  <iant@google.com>
12153         * c-common.c (c_common_attribute_table): Add no_split_stack.
12154         (handle_no_split_stack_attribute): New static function.
12156 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
12158         Merge from 'apple/trunk' branch on FSF servers.
12160         2005-12-15  Fariborz Jahanian  <fjahanian@apple.com>
12162         Radar 4229905
12163         * c-common.h (objc_have_common_type): New declaration.
12164         * stub-objc.c (objc_have_common_type): New stub.
12166         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
12168         Radar 4154928
12169         * c-common.h (objc_common_type): New prototype.
12170         * stub-objc.c (objc_common_type): New stub.
12172 2010-09-24  Jan Hubicka  <jh@suse.cz>
12174         * c-common.c (handle_leaf_attribute): New function.
12175         (struct attribute_spec c_common_att): Add leaf.
12177 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
12179         * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12180         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12181         -dump, -dump=, -imacros, -imacros=, -include, -include=,
12182         -include-barrier, -include-directory, -include-directory=,
12183         -include-directory-after, -include-directory-after=,
12184         -include-prefix, -include-prefix=, -include-with-prefix,
12185         -include-with-prefix=, -include-with-prefix-after,
12186         -include-with-prefix-after=, -include-with-prefix-before,
12187         -include-with-prefix-before=, -no-integrated-cpp,
12188         -no-line-commands, -no-standard-includes, -no-warnings, -output,
12189         -output=, -pedantic, -pedantic-errors, -preprocess,
12190         -print-missing-file-dependencies, -trace-includes, -traditional,
12191         -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12192         -user-dependencies, -verbose, -write-dependencies,
12193         -write-user-dependencies, no-integrated-cpp, traditional): New.
12195 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
12197         PR objc/23710
12198         * c-common.h (objc_start_method_definition): Return bool instead
12199         of void.
12200         * stub-objc.c (objc_start_method_definition): Return bool instead
12201         of void.
12203 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
12205         PR objc/25965
12206         * c-common.h (objc_get_interface_ivars): New declaration.
12207         * stub-objc.c (objc_get_interface_ivars): New stub.
12209 2010-09-15  Ian Lance Taylor  <iant@google.com>
12211         * c-common.c (parse_optimize_options): Do not capitalize warning
12212         messages.  Remove period at end of warning message.
12214 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
12216         * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12217         (handle_alias_attribute): ... here.
12218         (handle_ifunc_attribute): New.
12220 2010-09-06  Mark Mitchell  <mark@codesourcery.com>
12222         * c-common.h (do_warn_double_promotion): Declare.
12223         * c-common.c (do_warn_double_promotion): Define.
12225 2010-09-05  Mark Mitchell  <mark@codesourcery.com>
12227         * c.opt (Wdouble-promotion): New.
12229 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12231         * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12232         fvtable-thunks, fxref): Mark no longer supported in help text.
12234 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12236         * c.opt (Wimport, fall-virtual, falt-external-templates,
12237         fdefault-inline, fenum-int-equiv, fexternal-templates,
12238         fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12239         fname-mangling-version-, fnew-abi, fnonnull-objects,
12240         foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12241         fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12242         applicable.
12243         (fhandle-exceptions): Mark with Alias and Warn.
12244         * c-opts.c (c_common_handle_option): Don't handle options marked
12245         as ignored.
12247 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12249         * c.opt (Wcomments, Werror-implicit-function-declaration,
12250         ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12251         std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12252         aliases.
12253         * c-common.c (option_codes): Use OPT_Wcomment instead of
12254         OPT_Wcomments.
12255         * c-opts.c (warning_as_error_callback, c_common_handle_option):
12256         Don't handle options marked as aliases.
12258 2010-08-25  Richard Guenther  <rguenther@suse.de>
12260         * c-common.c (c_common_get_alias_set): Remove special
12261         handling for pointers.
12263 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
12265         * c-common.c: Use FOR_EACH_VEC_ELT.
12266         * c-gimplify.c: Likewise.
12267         * c-pragma.c: Likewise.
12269 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
12271         * c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
12272         RejectDriver.
12273         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
12274         RejectDriver.
12275         * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12276         instead of OPT_MDX and OPT_MMDX.
12278 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
12280         * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12282 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
12284         * c.opt (MD, MMD): Change to MDX and MMDX.
12285         * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12287 2010-08-11  Joseph Myers  <joseph@codesourcery.com>
12289         * c-opts.c (c_common_handle_option): Call handle_generated_option
12290         instead of handle_option.
12292 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
12294         * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12295         (maybe_apply_renaming_pragma): Delete unneeded declarations.
12297 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
12299         * c-pragma.c (pending_redefinition): Declare.  Declare a VEC of it.
12300         (pending_redefine_extname): Change type to a VEC.
12301         (add_to_renaming_pragma_list): Update for new type of
12302         pending_redefine_extname.
12303         (maybe_apply_renaming_pragma): Likewise.
12305 2010-08-04  Arnaud Charlet  <charlet@adacore.com>
12307         * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12308         visited.
12309         (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12310         decide whether a type has already been declared/seen.
12311         Do not go to the original type.
12312         (dump_nested_types): New parameter forward.
12313         Generate forward declaration if needed and mark type as visited.
12314         (print_ada_declaration): Call dump_nested_types if not already done.
12315         Mark types as visited.
12317 2010-08-03  Joseph Myers  <joseph@codesourcery.com>
12319         * c.opt (-print-pch-checksum): Remove option.
12320         * c-opts.c (c_common_handle_option): Don't handle
12321         OPT_print_pch_checksum.
12323 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12325         * c-common.h (c_common_handle_option): Update prototype and return
12326         value type.
12327         * c-opts.c (c_common_handle_option): Update prototype and return
12328         value type.  Update calls to handle_option and
12329         enable_warning_as_error.
12331 2010-07-27  Jakub Jelinek  <jakub@redhat.com>
12333         PR c/45079
12334         * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12336 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12338         * c-common.h (c_common_missing_argument): Remove.
12339         * c-opts.c (c_common_missing_argument): Remove.
12340         * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12341         idirafter, imacros, include, isysroot, isystem, iquote): Add
12342         MissingArgError.
12343         * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12345 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12347         * c-common.h (c_common_option_lang_mask,
12348         c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12349         New.
12350         (c_common_init_options): Update prototype.
12351         * c-opts.c (c_common_option_lang_mask): New.
12352         (c_common_initialize_diagnostics): Split out of
12353         c_common_init_options.
12354         (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12355         New.
12356         (c_common_init_options): Update prototype.  Use decoded options in
12357         search for -lang-asm.
12359 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
12361         * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12362         * c-format.c: Likewise.
12364 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12366         * c-common.h: Include diagnostic-core.h. Error if already
12367         included.
12368         * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12370 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12372         * c-common.c (IN_GCC_FRONTEND): Do not undef.
12373         Do not include expr.h
12374         (vector_mode_valid_p): Move here.
12376 2010-06-21  DJ Delorie  <dj@redhat.com>
12378         * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12379         allow these pragmas anywhere.
12381 2010-06-14  Jakub Jelinek  <jakub@redhat.com>
12383         PR bootstrap/44509
12384         * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12385         (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12386         (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12387         ggc_strdup instead of xstrdup.
12389 2010-06-10  Jakub Jelinek  <jakub@redhat.com>
12391         * c-cppbuiltin.c: Include cpp-id-data.h.
12392         (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12393         (lazy_hex_fp_value): New function.
12394         (builtin_define_with_hex_fp_value): Provide definitions lazily.
12396 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12398         * c-gimplify.c: Do not include tree-flow.h
12400 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
12402         PR other/44034
12403         * c-common.c: Rename targetm member:
12404         targetm.enum_va_list -> targetm.enum_va_list_p
12406 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
12408         * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12410 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
12412         * c-cppbuiltin.c: Do not include except.h.
12414 2010-06-24  Andi Kleen  <ak@linux.intel.com>
12416         * c-common.c (warn_for_omitted_condop): New.
12417         * c-common.h (warn_for_omitted_condop): Add prototype.
12419 2010-06-21  Joseph Myers  <joseph@codesourcery.com>
12421         * c.opt (lang-objc): Remove.
12422         * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12424 2010-06-21  Joern Rennecke  <joern.rennecke@embecosm.com>
12426         * c-opts.c: Include "tm_p.h".
12428 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
12430         * c-common.c (parse_optimize_options): Update call to
12431         decode_options.
12433 2010-06-18  Nathan Froyd  <froydnj@codesourcery.com>
12435         * c-common.c (record_types_used_by_current_var_decl): Adjust for
12436         new type of types_used_by_cur_var_decl.
12438 2010-06-17  Joern Rennecke  <joern.rennecke@embecosm.com>
12440         PR bootstrap/44512
12441         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12442         for C++ standard compliance.
12444 2010-06-16  Jason Merrill  <jason@redhat.com>
12446         * c.opt: Add -Wnoexcept.
12448 2010-06-16  Richard Guenther  <rguenther@suse.de>
12450         PR c/44555
12451         * c-common.c (c_common_truthvalue_conversion): Remove
12452         premature and wrong optimization concering ADDR_EXPRs.
12454 2010-06-15  Arnaud Charlet  <charlet@adacore.com>
12456         * c-ada-spec.c (dump_sloc): Remove column info.
12457         (is_simple_enum): New function.
12458         (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12459         enum types when relevant.
12461 2010-06-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12463         * c-common.c (conversion_warning): Warn at expression
12464         location.
12466 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
12468         * c-opts.c (c_common_handle_option): Don't handle
12469         OPT_fshow_column.
12471 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
12473         * c-pragma.c (push_alignment): Use typed GC allocation.
12474         (handle_pragma_push_options): Likewise.
12476         * c-common.c (parse_optimize_options): Likewise.
12478         * c-common.h (struct sorted_fields_type): Add variable_size GTY
12479         option.
12481 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
12483         * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12484         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12485         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12486         flag_signed_bitfields, warn_strict_null_sentinel,
12487         flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12488         flag_gen_declaration, flag_no_gnu_keywords,
12489         flag_implement_inlines, flag_implicit_templates,
12490         flag_implicit_inline_templates, flag_optional_diags,
12491         flag_elide_constructors, flag_default_inline, flag_rtti,
12492         flag_conserve_space, flag_access_control, flag_check_new,
12493         flag_new_for_scope, flag_weak, flag_working_directory,
12494         flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12495         flag_enforce_eh_specs, flag_threadsafe_statics,
12496         flag_pretty_templates): Remove.
12497         * c-common.h (flag_preprocess_only, flag_nil_receivers,
12498         flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12499         flag_replace_objc_classes, flag_undef, flag_no_builtin,
12500         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12501         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12502         flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12503         flag_no_gnu_keywords, flag_implement_inlines,
12504         flag_implicit_templates, flag_implicit_inline_templates,
12505         flag_optional_diags, flag_elide_constructors, flag_default_inline,
12506         flag_rtti, flag_conserve_space, flag_access_control,
12507         flag_check_new, flag_new_for_scope, flag_weak,
12508         flag_working_directory, flag_use_cxa_atexit,
12509         flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12510         flag_threadsafe_statics, flag_pretty_templates,
12511         warn_strict_null_sentinel): Remove.
12512         * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12513         fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12514         fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12515         fimplicit-inline-templates, fimplicit-templates,
12516         flax-vector-conversions, fms-extensions, fnil-receivers,
12517         fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12518         frtti, fshort-double, fshort-enums, fshort-wchar,
12519         fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12520         funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12521         fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12522         gen-decls, undef): Use Var.
12523         (fdefault-inline, foptional-diags): Document as doing nothing.
12524         * c-opts.c (c_common_handle_option): Remove cases for options now
12525         using Var.  Mark ignored options as such.
12527 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
12529         * c-common.c: Moved to here from parent directory.
12530         * c-common.def: Likewise.
12531         * c-common.h: Likewise.
12532         * c-cppbuiltin.c: Likewise.
12533         * c-dump.c: Likewise.
12534         * c-format.c: Likewise.
12535         * c-format.h : Likewise.
12536         * c-gimplify.c: Likewise.
12537         * c-lex.c: Likewise.
12538         * c-omp.c: Likewise.
12539         * c.opt: Likewise.
12540         * c-opts.c: Likewise.
12541         * c-pch.c: Likewise.
12542         * c-ppoutput.c: Likewise.
12543         * c-pragma.c: Likewise.
12544         * c-pragma.h: Likewise.
12545         * c-pretty-print.c: Likewise.
12546         * c-pretty-print.h: Likewise.
12547         * c-semantics.c: Likewise.
12548         * stub-objc.c: Likewise.
12550         * c-common.c: Include gt-c-family-c-common.h.
12551         * c-pragma.c: Include gt-c-family-c-pragma.h.
12553 Copyright (C) 2010-2021 Free Software Foundation, Inc.
12555 Copying and distribution of this file, with or without modification,
12556 are permitted in any medium without royalty provided the copyright
12557 notice and this notice are preserved.