Daily bump.
[official-gcc.git] / gcc / c-family / ChangeLog
blobb74dd910cf045cbf62fba4d97d00912295a6fe75
1 2021-12-30  Jakub Jelinek  <jakub@redhat.com>
3         PR c++/103012
4         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
5         cpp_define_unused/cpp_undef calls with forced token locations
6         BUILTINS_LOCATION.
8 2021-12-27  Patrick Palka  <ppalka@redhat.com>
10         PR c++/103700
11         * c-common.c (pointer_int_sum): When quiet, return
12         error_mark_node for an incomplete pointed-to type and don't
13         call size_in_bytes_loc.
15 2021-12-17  Jason Merrill  <jason@redhat.com>
17         PR c++/103681
18         * c-opts.c (c_common_post_options): Update defaults.
20 2021-12-16  Martin Liska  <mliska@suse.cz>
22         PR target/103709
23         * c-pragma.c (handle_pragma_pop_options): Do not check
24         global options modification when an error is seen in parsing
25         of options (pragmas or attributes).
27 2021-12-12  Jonathan Wakely  <jwakely@redhat.com>
29         * known-headers.cc: Define INCLUDE_MEMORY instead of
30         INCLUDE_UNIQUE_PTR.
31         * name-hint.h: Likewise.
32         (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
34 2021-12-09  Jakub Jelinek  <jakub@redhat.com>
36         PR pch/71934
37         * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
38         with NULL value instead of NULL to host_hooks.gt_pch_use_address.
40 2021-12-03  Jakub Jelinek  <jakub@redhat.com>
42         PR pch/71934
43         * c-pch.c (struct c_pch_validity): Remove pch_init member.
44         (pch_init): Don't initialize v.pch_init.
45         (c_common_valid_pch): Don't warn and punt if .text addresses change.
47 2021-12-01  Jason Merrill  <jason@redhat.com>
49         PR c++/103310
50         * c.opt: Add -fconstexpr-fp-except.
52 2021-11-29  Richard Biener  <rguenther@suse.de>
54         * c-format.c (check_format_string): Remove spurious
55         gcc_unreachable.
57 2021-11-29  Richard Biener  <rguenther@suse.de>
59         * c-opts.c (c_common_post_options): Remove unreachable return.
60         * c-pragma.c (handle_pragma_target): Likewise.
61         (handle_pragma_optimize): Likewise.
63 2021-11-25  Jakub Jelinek  <jakub@redhat.com>
65         PR c++/102611
66         * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
67         default for C++23 regardless of warn_deprecated.
68         * c-cppbuiltin.c (c_cpp_builtins): Predefine
69         __cpp_multidimensional_subscript=202110L for C++23.
71 2021-11-23  Martin Sebor  <msebor@redhat.com>
73         PR middle-end/88232
74         * c.opt: Add -Winfinite-recursion.
76 2021-11-19  Martin Sebor  <msebor@redhat.com>
78         PR c++/33925
79         PR c/102867
80         * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
81         and improve handling tof defined symbols.
83 2021-11-19  Martin Liska  <mliska@suse.cz>
85         Revert:
86         2021-11-18  Martin Liska  <mliska@suse.cz>
88         * c-gimplify.c (genericize_c_loop): Use option directly.
90 2021-11-18  Matthias Kretz  <m.kretz@gsi.de>
92         * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
93         * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
95 2021-11-18  Martin Liska  <mliska@suse.cz>
97         * c-gimplify.c (genericize_c_loop): Use option directly.
99 2021-11-17  Martin Uecker  <uecker@gcc.gnu.org>
101         PR c/91038
102         PR c/29970
103         * c-common.c (pointer_int_sum): Make sure pointer expressions
104         are evaluated first when the size expression depends on for
105         variably-modified types.
107 2021-11-17  Marek Polacek  <polacek@redhat.com>
109         PR preprocessor/103026
110         * c.opt (Wbidi-chars, Wbidi-chars=): New option.
112 2021-11-16  Jason Merrill  <jason@redhat.com>
114         * c-common.c (release_tree_vector): Only cache vecs smaller than
115         16 elements.
117 2021-11-15  Jason Merrill  <jason@redhat.com>
119         * c.opt: Add -fimplicit-constexpr.
120         * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
121         * c-opts.c (c_common_post_options): Disable below C++14.
123 2021-11-15  Jakub Jelinek  <jakub@redhat.com>
125         * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
126         Duplicate to both OMP_TARGET and OMP_TEAMS.
128 2021-11-10  Marek Polacek  <polacek@redhat.com>
130         PR c++/101940
131         * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
132         ignored_attributes.
134 2021-11-09  David Malcolm  <dmalcolm@redhat.com>
136         * c-pragma.c (GCC_BAD_AT): New macro.
137         (GCC_BAD2_AT): New macro.
138         (handle_pragma_pack): Use the location of the pertinent token when
139         issuing diagnostics about invalid constants/actions, and trailing
140         junk.
141         (handle_pragma_target): Likewise for non-string "GCC option".
142         (handle_pragma_message): Likewise for trailing junk.
144 2021-11-03  Joseph Myers  <joseph@codesourcery.com>
146         PR c/103031
147         * c-common.c (convert_and_check): Add argument init_const.  Call
148         convert_init if init_const.
149         * c-common.h (convert_and_check): Update prototype.
150         (convert_init): New prototype.
152 2021-11-01  David Malcolm  <dmalcolm@redhat.com>
154         * c-lex.c (c_lex_with_flags): When complaining about non-printable
155         CPP_OTHER tokens, set the "escape on output" flag.
157 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
159         * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
160         POINTER_PLUS_EXPR.
161         (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
162         (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
164 2021-10-27  Jakub Jelinek  <jakub@redhat.com>
166         PR c++/102854
167         * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
168         * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
169         TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
170         conversions temporarily clear the 3rd bit from d->kind while walking
171         subtrees.
172         (c_omp_check_loop_iv_exprs): Add CODE argument.  Or in 4 into data.kind
173         if possibly non-rectangular.
175 2021-10-21  Jakub Jelinek  <jakub@redhat.com>
177         PR middle-end/64888
178         * c-omp.c (c_omp_predefined_variable): Return true also for
179         ubsan_create_data created artificial variables.
181 2021-10-14  Joseph Myers  <joseph@codesourcery.com>
183         * c-format.c (printf_length_specs, scanf_length_specs)
184         (print_char_table, scan_char_table): Support DFP formats for C2X.
185         * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
186         (T2X_D32, T2X_D64, T2X_D128): New macros.
188 2021-10-14  Kwok Cheung Yeung  <kcy@codesourcery.com>
190         * c-omp.c (c_omp_check_context_selector): Rename to
191         omp_check_context_selector and move to omp-general.c.
192         (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
193         move to omp-general.c.
195 2021-10-12  Joseph Myers  <joseph@codesourcery.com>
197         * c-format.c (print_char_table): Add %b and %B formats.
198         (scan_char_table): Add %b format.
199         * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
200         (T2X_UPD, T2X_UIM): New macros.
202 2021-10-12  Jakub Jelinek  <jakub@redhat.com>
204         * c-omp.c (c_finish_omp_atomic): Use
205         clear_padding_type_may_have_padding_p.
207 2021-10-08  Martin Liska  <mliska@suse.cz>
209         * c-opts.c (c_common_post_options): Use new macro
210         OPTION_SET_P.
212 2021-10-07  Martin Liska  <mliska@suse.cz>
214         * c-common.c (parse_optimize_options): Make
215         save_opt_decoded_options a pointer type.
217 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
219         PR tree-optimization/102571
220         * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
221         padding, but the non-padding bits are contiguous set of bytes
222         by adjusting the memcmp call arguments instead of emitting
223         __builtin_clear_padding and then comparing all the type's bytes.
225 2021-10-06  Jakub Jelinek  <jakub@redhat.com>
227         PR c++/102612
228         * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
229         __cpp_constexpr to 202110L rather than 201907L.
231 2021-10-04  Marek Polacek  <polacek@redhat.com>
233         PR c++/97573
234         * c-common.h (do_warn_array_compare): Declare.
235         * c-warn.c (do_warn_array_compare): New.
236         * c.opt (Warray-compare): New option.
238 2021-10-02  Iain Sandoe  <iain@sandoe.co.uk>
240         * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
241         NULL, this is not needed.
243 2021-10-01  Martin Sebor  <msebor@redhat.com>
245         PR c/102103
246         * c-common.c (decl_with_nonnull_addr_p): Handle members.
247         Check and perform warning suppression.
248         (c_common_truthvalue_conversion): Enhance warning suppression.
250 2021-10-01  Martin Liska  <mliska@suse.cz>
252         PR target/102552
253         * c-common.c (parse_optimize_options): decoded_options[0] is
254           used for program name, so merged_decoded_options should also
255           respect that.
257 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
258             Richard Biener  <rguenther@suse.de>
260         PR sanitizer/102515
261         * c-ubsan.c (ubsan_instrument_division): Check the right
262         flag_sanitize_recover bit, depending on which sanitization
263         is done.  Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
264         rather than SANITIZE_DIVIDE.  If both SANITIZE_SI_OVERFLOW
265         and SANITIZE_DIVIDE is enabled, neither check is known
266         to be false and flag_sanitize_recover bits for those two
267         aren't the same, emit both __ubsan_handle_divrem_overflow
268         and __ubsan_handle_divrem_overflow_abort calls.
270 2021-10-01  Martin Liska  <mliska@suse.cz>
272         * c-common.c (parse_optimize_options): Combine optimize
273         options with what was provided on the command line.
275 2021-10-01  Jakub Jelinek  <jakub@redhat.com>
277         * c-omp.c (c_omp_split_clauses): Also copy
278         OMP_CLAUSE_ORDER_REPRODUCIBLE.
280 2021-09-27  Martin Liska  <mliska@suse.cz>
282         * c-opts.c (c_common_init_options_struct): Set also
283           x_flag_default_complex_method.
285 2021-09-22  Jakub Jelinek  <jakub@redhat.com>
287         * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
289 2021-09-20  Matthias Kretz  <m.kretz@gsi.de>
291         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
292         undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
293         __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
294         __ROUNDING_MATH__ according to the new optimization flags.
296 2021-09-18  Jakub Jelinek  <jakub@redhat.com>
298         * c-omp.c (c_omp_split_clauses): Split order clause also to
299         distribute construct.  Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
301 2021-09-17  Jakub Jelinek  <jakub@redhat.com>
303         * c-omp.c (c_finish_omp_atomic): Avoid creating
304         TARGET_EXPR if test is true, use create_tmp_var_raw instead of
305         create_tmp_var and add a zero initializer to TARGET_EXPRs that
306         had NULL initializer.  When omitting operands after v = x,
307         use type of v rather than type of x.  Fix type of vtmp
308         TARGET_EXPR.
310 2021-09-13  Jason Merrill  <jason@redhat.com>
312         * c.opt: Add -Winterference-size.
313         * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
314         and __GCC_CONSTRUCTIVE_SIZE.
316 2021-09-10  Jakub Jelinek  <jakub@redhat.com>
318         * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
319         * c-omp.c: Include gimple-fold.h.
320         (c_finish_omp_atomic): Add r and weak arguments.  Add support for
321         OpenMP 5.1 atomics.
323 2021-09-09  qing zhao  <qing.zhao@oracle.com>
325         * c-attribs.c (handle_uninitialized_attribute): New function.
326         (c_common_attribute_table): Add "uninitialized" attribute.
328 2021-09-08  liuhongt  <hongtao.liu@intel.com>
330         * c-common.c (excess_precision_mode_join): Update below comments.
331         (c_ts18661_flt_eval_method): Set excess_precision_type to
332         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
333         * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
334         (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
335         EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
337 2021-09-07  Marcel Vollweiler  <marcel@codesourcery.com>
339         * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
341 2021-09-03  Eric Botcazou  <ebotcazou@adacore.com>
343         * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
344         and -gnatwu warning for the package specification.
346 2021-09-01  Iain Sandoe  <iain@sandoe.co.uk>
348         * c-attribs.c (handle_unavailable_attribute): New.
350 2021-08-30  Jason Merrill  <jason@redhat.com>
352         * c.opt: Add -Wmissing-requires.
354 2021-08-25  Lewis Hyatt  <lhyatt@gmail.com>
356         PR other/93067
357         * c-opts.c (c_common_input_charset_cb): New function.
358         (c_common_post_options): Call new function
359         diagnostic_initialize_input_context().
361 2021-08-20  Tobias Burnus  <tobias@codesourcery.com>
363         * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
364         (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
365         "di" and "u", respecitively; fill with BADLEN to match
366         size of 'types'.
367         (get_init_dynamic_hwi): Split off from ...
368         (init_dynamic_diag_info): ... here. Call it.
369         (init_dynamic_gfc_info): Call it.
371 2021-08-20  Jakub Jelinek  <jakub@redhat.com>
373         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
374         * c-pragma.c (omp_pragmas): Add error directive.
375         * c-omp.c (omp_directives): Uncomment error directive entry.
377 2021-08-18  Jakub Jelinek  <jakub@redhat.com>
379         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
380         * c-pragma.c (omp_pragmas): Add nothing directive.
381         * c-omp.c (omp_directives): Uncomment nothing directive entry.
383 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
385         PR c++/101539
386         * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
387         * c-common.c (c_common_reswords): Add __is_layout_compatible.
389 2021-08-17  Matt Jacobson  <mhjacobson@me.com>
391         * c-opts.c (c_common_post_options): Default to
392         flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
394 2021-08-17  Jakub Jelinek  <jakub@redhat.com>
396         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
397         * c-pragma.c (omp_pragmas): Add scope construct.
398         * c-omp.c (omp_directives): Uncomment scope directive entry.
400 2021-08-16  Sebastian Huber  <sebastian.huber@embedded-brains.de>
402         * c-cppbuiltin.c (c_cpp_builtins): Define
403         __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
405 2021-08-12  Jakub Jelinek  <jakub@redhat.com>
407         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
408         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
409         * c-pragma.c (omp_pragmas_simd): Add masked construct.
410         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
411         enumerator.
412         (c_finish_omp_masked): Declare.
413         * c-omp.c (c_finish_omp_masked): New function.
414         (c_omp_split_clauses): Handle combined masked constructs.
416 2021-07-30  Jakub Jelinek  <jakub@redhat.com>
418         PR c++/101539
419         * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
420         * c-common.c (c_common_reswords): Add
421         __is_pointer_interconvertible_base_of.
423 2021-07-29  Richard Biener  <rguenther@suse.de>
425         PR c/101512
426         * c-common.c (c_common_mark_addressable_vec): Look through
427         C_MAYBE_CONST_EXPR even if not at the toplevel.
429 2021-07-27  Martin Sebor  <msebor@redhat.com>
431         PR c/101585
432         * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
434 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
436         * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
437         on attr_id.  Return 1 for omp::directive or omp::sequence in C++11
438         and later.
440 2021-07-23  Jakub Jelinek  <jakub@redhat.com>
442         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
443         PRAGMA_OMP__LAST_ enumerators.
445 2021-07-21  Thomas Schwinge  <thomas@codesourcery.com>
446             Joseph Myers  <joseph@codesourcery.com>
447             Cesar Philippidis  <cesar@codesourcery.com>
449         * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
451 2021-07-20  Martin Sebor  <msebor@redhat.com>
453         * c-common.c (c_build_shufflevector): Adjust by-value argument to
454         by-const-reference.
455         * c-common.h (c_build_shufflevector): Same.
457 2021-07-16  Andrew Pinski  <apinski@marvell.com>
459         PR c/101453
460         * c-common.c (parse_optimize_options): Use the correct
461         size for buffer.
463 2021-07-15  Martin Sebor  <msebor@redhat.com>
465         PR c/101289
466         PR c/97548
467         * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
469 2021-07-14  Jason Merrill  <jason@redhat.com>
471         * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
473 2021-07-06  Martin Sebor  <msebor@redhat.com>
475         * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
476          (gcc_cdiag_char_table): Same.
477          (gcc_cxxdiag_char_table): Same.
479 2021-07-02  Jakub Jelinek  <jakub@redhat.com>
481         * c-common.h (enum c_omp_directive_kind): New enum.
482         (struct c_omp_directive): New type.
483         (c_omp_categorize_directive): Declare.
484         * c-omp.c (omp_directives): New variable.
485         (c_omp_categorize_directive): New function.
487 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
489         * c-ada-spec.c (packed_layout): New global variable.
490         (dump_ada_declaration): Set it upon seeing a packed record type.
491         Do not put the "aliased" keyword if it is set.
492         (dump_ada_structure): Add Pack aspect if it is set and clear it.
494 2021-07-01  Eric Botcazou  <ebotcazou@adacore.com>
496         * c-ada-spec.c (check_name): Rename into...
497         (check_type_name_conflict): ...this.  Minor tweak.
498         (dump_ada_function_declaration): Adjust to above renaming.
499         (dump_ada_array_domains): Fix oversight.
500         (dump_ada_declaration): Call check_type_name_conflict for variables.
502 2021-06-25  Martin Sebor  <msebor@redhat.com>
504         * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
505         (c_common_truthvalue_conversion): Replace direct uses of
506         TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
507         copy_no_warning.
508         (check_function_arguments_recurse): Same.
509         * c-gimplify.c (c_gimplify_expr): Same.
510         * c-warn.c (overflow_warning): Same.
511         (warn_logical_operator): Same.
512         (warn_if_unused_value): Same.
513         (do_warn_unused_parameter): Same.
515 2021-06-24  Jakub Jelinek  <jakub@redhat.com>
517         * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
518         C_ORT_OMP_TARGET.
519         * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
520         combined target constructs also add map (always, tofrom:) clause.
522 2021-06-15  Robin Dapp  <rdapp@linux.ibm.com>
524         * c-attribs.c (common_handle_aligned_attribute): Remove short
525         circuit and dead code.
527 2021-06-14  Jonathan Wakely  <jwakely@redhat.com>
529         PR c++/101052
530         * known-headers.cc (get_stdlib_header_for_name): Add known
531         headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
532         exit, and getenv.
534 2021-06-12  Jason Merrill  <jason@redhat.com>
536         * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
538 2021-06-11  Jakub Jelinek  <jakub@redhat.com>
540         PR c++/100974
541         * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
542         -std=c++2b for P1938R3 consteval if support.
544 2021-06-09  Jason Merrill  <jason@redhat.com>
546         PR c++/100879
547         * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
548         warning.
550 2021-06-07  Martin Liska  <mliska@suse.cz>
552         * c-target.def: Split long lines and replace them
553         with '\n\'.
555 2021-06-04  Martin Sebor  <msebor@redhat.com>
557         PR c/100783
558         * c-attribs.c (positional_argument): Bail on erroneous types.
560 2021-06-04  Martin Sebor  <msebor@redhat.com>
562         * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
563         for element presence.
565 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
567         * c-ada-spec.c (dump_ada_macros): Minor tweaks.
568         (dump_ada_decl_name): Likewise.
569         (dump_anonymous_type_name): Remove parent parameter and adjust.
570         (dump_sloc): Minor tweak.
571         (dump_ada_array_type): Remove type parameter and adjust.
572         (dump_ada_enum_type): Remove parent parameter and adjust.
573         (dump_ada_node): Adjust calls to above functions.
574         (dumped_anonymous_types): New global variable.
575         (dump_nested_types_1): Rename into...
576         (dump_nested_types): ...this.
577         (dump_nested_type): Remove parent and dumped_types parameters.
578         <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
579         Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
580         (dump_ada_specs): Initialize and free dumped_anonymous_types.
582 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
584         * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
585         (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
587 2021-06-03  Eric Botcazou  <ebotcazou@adacore.com>
589         * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
590         (htable_t): New typedef.
591         (overloaded_names): Use it.
592         (add_name): New function.
593         (init_overloaded_names): Use add_name to populate the table and add
594         special cases for sigaction and stat.
595         (overloaded_name_p): Rename into...
596         (overloading_index): ...this.  Do not initialize overloaded_names table
597         here.  Return the index or zero.
598         (dump_ada_declaration): Minor tweaks.  Do not skip overloaded functions
599         but add an overloading suffix instead.
600         (dump_ada_specs): Initialize overloaded_names tables here.
602 2021-06-01  Martin Liska  <mliska@suse.cz>
604         PR other/100759
605         * c-attribs.c (handle_optimize_attribute): Limit sanity check
606         to a situation where we are not in processing of an optimize
607         pragma.
608         * c-pragma.c (handle_pragma_pop_options): Restore target
609         options.
611 2021-05-31  Indu Bhagat  <indu.bhagat@oracle.com>
613         PR testsuite/100749
614         * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
616 2021-05-31  Richard Biener  <rguenther@suse.de>
618         PR c++/88601
619         * c-common.c: Include tree-vector-builder.h and
620         vec-perm-indices.h.
621         (c_common_reswords): Add __builtin_shufflevector.
622         (c_build_shufflevector): New funtion.
623         * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
624         (c_build_shufflevector): Declare.
626 2021-05-28  Jakub Jelinek  <jakub@redhat.com>
628         PR middle-end/99928
629         * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
630         target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
632 2021-05-28  Tobias Burnus  <tobias@codesourcery.com>
634         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
636 2021-05-25  Martin Liska  <mliska@suse.cz>
638         PR tree-optimization/92860
639         PR target/99592
640         * c-attribs.c (handle_optimize_attribute): Save target node
641         before calling parse_optimize_options and save it in case
642         it changes.
643         * c-pragma.c (handle_pragma_target): Similarly for pragma.
644         (handle_pragma_pop_options): Likewise here.
646 2021-05-25  Martin Liska  <mliska@suse.cz>
648         * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
650 2021-05-25  Jakub Jelinek  <jakub@redhat.com>
652         PR middle-end/99928
653         * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
654         combined with simd and not with taskloop or for.
656 2021-05-21  Jakub Jelinek  <jakub@redhat.com>
658         PR middle-end/99928
659         * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
660         on firstprivate clause copy going to target construct, and for
661         target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
663 2021-05-20  Jonathan Wakely  <jwakely@redhat.com>
665         * c.opt (Wc++11-extensions, Wc++14-extensions)
666         (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
667         options.
669 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
671         * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
673 2021-05-20  Indu Bhagat  <indu.bhagat@oracle.com>
675         * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
676         * c-pch.c (struct c_pch_validity): Use type uint32_t.
677         (pch_init): Renamed member.
678         (c_common_valid_pch): Adjust access to debug_type_names.
680 2021-05-19  Martin Sebor  <msebor@redhat.com>
682         PR c/100619
683         * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
684         bounds.
686 2021-05-18  Richard Biener  <rguenther@suse.de>
688         PR c/100547
689         * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
690         Reword existing nunit diagnostic.
692 2021-05-17  Joern Rennecke  <joern.rennecke@embecosm.com>
694         * c-common.c (braced_list_to_string): Return CTOR unchanged
695         if host and target character sizes don't match.
697 2021-05-14  Martin Liska  <mliska@suse.cz>
699         * c.opt: Add Warning keyword for 2 options.
701 2021-05-13  Martin Liska  <mliska@suse.cz>
703         PR middle-end/100504
704         * c-attribs.c (handle_target_clones_attribute): Expect a string
705         argument to target_clone argument.
707 2021-05-11  Joseph Myers  <joseph@codesourcery.com>
709         * c-lex.c (interpret_float): Handle digit separators for C2X.
711 2021-05-10  Martin Liska  <mliska@suse.cz>
713         * c-ada-spec.c (print_destructor): Use startswith
714         function instead of strncmp.
715         (dump_ada_declaration): Likewise.
716         * c-common.c (disable_builtin_function): Likewise.
717         (def_builtin_1): Likewise.
718         * c-format.c (check_tokens): Likewise.
719         (check_plain): Likewise.
720         (convert_format_name_to_system_name): Likewise.
722 2021-04-28  Patrick McGehearty  <patrick.mcgehearty@oracle.com>
724         * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
725         complex divide
727 2021-04-26  Thomas Schwinge  <thomas@codesourcery.com>
728             Nathan Sidwell  <nathan@codesourcery.com>
729             Tom de Vries  <vries@codesourcery.com>
730             Julian Brown  <julian@codesourcery.com>
731             Kwok Cheung Yeung  <kcy@codesourcery.com>
733         * c.opt (Wopenacc-parallelism): New.
735 2021-04-19  Thomas Schwinge  <thomas@codesourcery.com>
737         * c.opt (fopenacc-kernels=): Remove.
739 2021-04-08  Jakub Jelinek  <jakub@redhat.com>
741         * c-warn.c (do_warn_double_promotion): Fix comment typo,
742         occured -> occurred.
743         (check_alignment_of_packed_member): Fix a comment typo,
744         memeber -> member.
745         (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
746         and onless -> unless.
747         (warn_parm_array_mismatch): Fix comment typos, declaratation
748         -> declaration and woud -> would.  Fix up comment indentation.
750 2021-04-08  Martin Sebor  <msebor@redhat.com>
752         PR middle-end/99883
753         * c.opt (Wmismatched-new-delete): Correct spelling.
755 2021-04-05  Eric Botcazou  <ebotcazou@adacore.com>
757         * c-ada-spec.c (is_simple_enum): Minor tweaks.
758         (dump_ada_enum_type): Add TYPE and PARENT parameters.  For non-simple
759         enumeral types use again the type name for the enumeration constants.
760         (dump_ada_node): Adjust call to dump_ada_enum_type.
761         (dump_nested_type): Likewise.
763 2021-04-01  Jason Merrill  <jason@redhat.com>
765         PR c++/98481
766         * c-opts.c (c_common_post_options): Bump latest_abi_version.
768 2021-03-25  Jakub Jelinek  <jakub@redhat.com>
770         PR c++/99565
771         * c-warn.c (do_warn_duplicated_branches): Pass also
772         OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
774 2021-03-20  Jakub Jelinek  <jakub@redhat.com>
776         PR debug/99230
777         * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
779 2021-03-05  Eric Botcazou  <ebotcazou@adacore.com>
781         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
782         after entering the separate class package, if any.
784 2021-03-04  Richard Biener  <rguenther@suse.de>
786         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
787         Handle ERROR_MARK.
789 2021-03-04  Jakub Jelinek  <jakub@redhat.com>
791         PR c/99325
792         * c-ppoutput.c (print): Change src_line type from int to unsigned.
793         (token_streamer::stream) Likewise.
794         (maybe_print_line_1): Likewise.  Don't strcmp src_file if src_loc is
795         UNKNOWN_LOCATION.
797 2021-03-03  Jakub Jelinek  <jakub@redhat.com>
799         PR c/99324
800         * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
801         instead of mark_addressable.  Fix a comment typo -
802         neutrallly -> neutrally.
804 2021-02-28  Jakub Jelinek  <jakub@redhat.com>
806         PR c/99304
807         * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
808         message - refernced -> referenced.  Remove superfluous space before
809         closing paren of function calls.
811 2021-02-25  Nathan Sidwell  <nathan@acm.org>
813         PR c++/99166
814         * c.opt (-flang-info-module-cmi): Renamed option.
816 2021-02-19  Nathan Sidwell  <nathan@acm.org>
818         * c.opt (flang-info-module-read, flang-info-module-read=): New.
820 2021-02-18  H.J. Lu  <hjl.tools@gmail.com>
822         PR target/99113
823         * c-attribs.c (c_common_attribute_table): Add the "retain"
824         attribute.
825         (handle_retain_attribute): New function.
827 2021-02-16  Marek Polacek  <polacek@redhat.com>
829         PR c++/99062
830         * c-attribs.c (handle_assume_aligned_attribute): Check that the
831         alignment argument is non-negative.  Tweak a warning message.
833 2021-02-12  Martin Sebor  <msebor@redhat.com>
835         PR c/99055
836         * c-warn.c (warn_parm_array_mismatch): Free strings returned from
837         print_generic_expr_to_str.
839 2021-02-10  Richard Biener  <rguenther@suse.de>
841         * c-common.c (parse_optimize_options): Free decoded_options.
843 2021-02-04  emsr  <3dw4rd@verizon.net>
845         * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
847 2021-02-03  Ed Smith-Rowland  <3dw4rd@verizon.net>
849         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
850         * c-lex.c (interpret_integer): Set node type for size literal.
852 2021-01-28  Jakub Jelinek  <jakub@redhat.com>
854         * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
855         draft from description.
856         (-std=c++2b): Fix a pasto, 2020 -> 2023.
858 2021-01-26  Paul Fee  <paul.f.fee@gmail.com>
860         * c-common.h (cxx_dialect): Add cxx23 as a dialect.
861         * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
862         and -std=gnu++2b
863         * c-opts.c (set_std_cxx23): New.
864         (c_common_handle_option): Set options when -std=c++23 is enabled.
865         (c_common_post_options): Adjust comments.
866         (set_std_cxx20): Likewise.
868 2021-01-25  Martin Sebor  <msebor@redhat.com>
870         PR c++/98646
871         * c-common.c (check_nonnull_arg): Adjust warning text.
873 2021-01-17  Martin Sebor  <msebor@redhat.com>
875         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
876         assume SSA_NAME_IDENTIFIER evaluates to nonzero.
878 2021-01-16  Kwok Cheung Yeung  <kcy@codesourcery.com>
880         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
881         Redefine PRAGMA_OACC_CLAUSE_DETACH.
883 2021-01-15  Jakub Jelinek  <jakub@redhat.com>
885         PR tree-optimization/98597
886         * c-pretty-print.c: Include options.h.
887         (c_fold_indirect_ref_for_warn): New function.
888         (print_mem_ref): Use it.  If it returns something that has compatible
889         type and is TBAA compatible with zero offset, print it and return,
890         otherwise print it using offsetof syntax or array ref syntax.  Fix up
891         printing if MEM_REFs first operand is ADDR_EXPR, or when the first
892         argument has pointer to array type.  Print pointers using the standard
893         formatting.
895 2021-01-12  Martin Sebor  <msebor@redhat.com>
897         PR c/98597
898         PR c/98592
899         * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
900         has pointer type.  Remove redundant code.  Avoid calling
901         gimple_canonical_types_compatible_p.
903 2021-01-07  Martin Sebor  <msebor@redhat.com>
905         PR middle-end/98578
906         * c-pretty-print.c (print_mem_ref): Strip array from access type.
907         Avoid assuming acces type's size is constant.  Correct condition
908         guarding the printing of a parenthesis.
910 2021-01-06  Martin Sebor  <msebor@redhat.com>
912         PR c++/95768
913         * c-pretty-print.c (c_pretty_printer::primary_expression): For
914         SSA_NAMEs print VLA names and GIMPLE defining statements.
915         (print_mem_ref): New function.
916         (c_pretty_printer::unary_expression): Call it.
918 2021-01-06  Richard Biener  <rguenther@suse.de>
920         PR tree-optimization/95582
921         * c-attribs.c (c_common_attribute_table): Add entry for
922         signed_bool_precision.
923         (handle_signed_bool_precision_attribute): New.
925 2020-12-24  Iain Sandoe  <iain@sandoe.co.uk>
927         * c.opt: Add -stdlib= option and enumerations for
928         libstdc++ and libc++.
930 2020-12-16  Martin Liska  <mliska@suse.cz>
932         * c.opt: Remove usage of Report.
934 2020-12-14  Martin Sebor  <msebor@redhat.com>
936         PR middle-end/98166
937         PR c++/57111
938         PR middle-end/98160
939         * c-attribs.c (maybe_add_noinline): New function.
940         (handle_malloc_attribute): Call it.  Use ATTR_FLAG_INTERNAL.
941         Implicitly add attribute noinline to functions not declared inline
942         and warn on those.
944 2020-12-09  Tobias Burnus  <tobias@codesourcery.com>
946         * c-pragma.c (omp_pragmas): Add 'allocate'.
947         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
949 2020-12-08  Jakub Jelinek  <jakub@redhat.com>
951         PR c++/98187
952         * c-pragma.c (omp_pragmas): Remove "master".
953         (omp_pragmas_simd): Add "master".
955 2020-12-07  Marek Polacek  <polacek@redhat.com>
957         PR c++/98126
958         * c-common.c (verify_tree_lim_r): New function.
959         (verify_sequence_points): Use it.  Use nullptr instead of 0.
961 2020-12-03  Martin Sebor  <msebor@redhat.com>
963         PR c++/90629
964         PR middle-end/94527
965         * c-attribs.c (handle_dealloc_attribute): New function.
966         (handle_malloc_attribute): Handle argument forms of attribute.
967         * c.opt (-Wmismatched-dealloc): New option.
968         (-Wmismatched-new-delete): New option.
970 2020-12-03  Jakub Jelinek  <jakub@redhat.com>
972         PR libstdc++/93121
973         * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
974         * c-common.c (c_common_reswords): Add __builtin_bit_cast.
976 2020-12-01  JeanHeyd Meneide  <phdofthehouse@gmail.com>
978         * c-cppbuiltin.c (c_cpp_builtins): Add predefined
979         {__GNUC_EXECUTION_CHARSET_NAME} and
980         _WIDE_EXECUTION_CHARSET_NAME} macros.
982 2020-12-01  Nathan Sidwell  <nathan@acm.org>
984         * c-common.c (module, import, export): New internal tokens (with
985         trailing space).
986         * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
987         them.
988         (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
989         * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
991 2020-12-01  Nathan Sidwell  <nathan@acm.org>
993         * c-opts.c (c_common_init_options): Ask for module dependencies.
994         (c_common_handle_option): Handle -Mmodules -Mno-modules.
995         * c-pch.c (c_common_valid_pch): ... does not play with C++
996         modules.
997         * c.opt (Mmodules, Mno-modules): New preprocessor dependency
998         options.
999         (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1000         (fmodule-only, fmodule-mapper, fmodule-lazy)
1001         (fmodule-version-ignore, Winvalid-imported-macros)
1002         (flang-info-include-translate, flang-info-include-translate-not):
1003         New options
1005 2020-11-28  Eric Botcazou  <ebotcazou@adacore.com>
1007         * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1008         (dump_ada_structure): Also deal with convention, unchecked union and
1009         bit-field for nested types.  In the latter case, print an Alignment
1010         aspect along with the Pack aspect.
1012 2020-11-25  Martin Sebor  <msebor@redhat.com>
1014         PR bootstrap/94982
1015         * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1016         -Wformat-diag.
1018 2020-11-24  Martin Sebor  <msebor@redhat.com>
1020         * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1022 2020-11-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1024         * c-attribs.c (handle_special_var_sec_attribute): New.
1025         (handle_noinit_attribute): Remove.
1026         (attr_noinit_exclusions): Rename to...
1027         (attr_section_exclusions): ...this, and add "persistent" attribute
1028         exclusion.
1029         (c_common_attribute_table): Add "persistent" attribute.
1031 2020-11-21  Aaron Sawdey  <acsawdey@linux.ibm.com>
1033         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1034         Treat opaque types like other types.
1035         (c_pretty_printer::direct_abstract_declarator): Opaque types are
1036         supported types.
1038 2020-11-20  Martin Sebor  <msebor@redhat.com>
1040         * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1041         with fewer arguments.
1043 2020-11-20  Martin Sebor  <msebor@redhat.com>
1045         PR middle-end/97879
1046         * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1047         Error out on invalid modes.
1049 2020-11-20  Jakub Jelinek  <jakub@redhat.com>
1051         PR libstdc++/88101
1052         * c-common.c (check_builtin_function_arguments): Handle
1053         BUILT_IN_CLEAR_PADDING.
1055 2020-11-18  Nathan Sidwell  <nathan@acm.org>
1057         * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1059 2020-11-17  Nathan Sidwell  <nathan@acm.org>
1061         * c-common.h (enum c_tree_index): Reorder to place lazy fields
1062         after newly-added CTI_MODULE_HWM.
1064 2020-11-17  Joseph Myers  <joseph@codesourcery.com>
1066         * c-cppbuiltin.c (builtin_define_float_constants): Define
1067         "*_IS_IEC_60559__" macros.
1069 2020-11-17  Nathan Sidwell  <nathan@acm.org>
1071         * c-lex.c: #include "langhooks.h".
1072         (cb_undef): Maybe call preprocess_undef lang hook.
1073         * c-opts.c (c_common_post_options): Maybe call preprocess_options
1074         lang hook.
1075         (push_command_line_include): Maybe call preprocess_main_file lang
1076         hook.
1077         (cb_file_change): Likewise.
1078         * c-ppoutput.c: #include "langhooks.h.
1079         (scan_translation_unit): Maybe call preprocess_token lang hook.
1080         (class do_streamer): New, derive from token_streamer.
1081         (directives_only_cb): Data pointer is do_streamer, call
1082         preprocess_token lang hook.
1083         (scan_translation_unit_directives_only): Use do_streamer.
1084         (print_line_1): Move src_line recording to after string output.
1085         (cb_undef): Maybe call preprocess_undef lang hook.
1087 2020-11-17  Nathan Sidwell  <nathan@acm.org>
1089         * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1090         code duplicating that functionality.
1092 2020-11-17  Jakub Jelinek  <jakub@redhat.com>
1094         PR c/90628
1095         * c-common.c (check_builtin_function_arguments)
1096         <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1097         to _Atomic.  For the TYPE_READONLY case, adjust message to be usable
1098         for more builtins and argument positions.
1100 2020-11-16  Iain Sandoe  <iain@sandoe.co.uk>
1102         PR objc/97854
1103         * stub-objc.c: Include c-common.h to declare enum rid.
1105 2020-11-13  Jakub Jelinek  <jakub@redhat.com>
1107         PR c++/63287
1108         * c-cppbuiltin.c: Include configargs.h.
1109         (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1110         defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1111         "single".
1113 2020-11-13  Gergö Barany  <gergo@codesourcery.com>
1114             Thomas Schwinge  <thomas@codesourcery.com>
1116         * c.opt (fopenacc-kernels): Add.
1118 2020-11-13  Jason Merrill  <jason@redhat.com>
1120         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1122 2020-11-13  Piotr H. Dabrowski  <phd@phd.re>
1124         PR c++/91318
1125         * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1127 2020-11-13  Martin Liska  <mliska@suse.cz>
1129         * c-attribs.c (build_attr_access_from_parms): Format properly.
1131 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
1133         PR objc/90707
1134         * c-common.c (c_common_reswords): null_unspecified, nullable,
1135         nonnull, null_resettable: New keywords.
1136         * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1137         RID_NONNULL, RID_NULL_RESETTABLE: New.
1138         (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1139         ranges accepted for property attributes.
1140         * c-attribs.c (handle_objc_nullability_attribute): New.
1141         * c-objc.h (enum objc_property_attribute_group): Add
1142         OBJC_PROPATTR_GROUP_NULLABLE.
1143         (enum objc_property_attribute_kind):Add
1144         OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1145         OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1147 2020-11-13  Iain Sandoe  <iain@sandoe.co.uk>
1149         PR objc/77404
1150         * c-attribs.c (handle_objc_root_class_attribute): New
1151         * c-objc.h (objc_start_class_interface): Add a location
1152         value for the position of the class name.
1153         * c.opt: Add Wobjc-root-class.
1154         * stub-objc.c (objc_start_class_interface): Add a location
1155         value for the position of the class name.
1157 2020-11-12  Joseph Myers  <joseph@codesourcery.com>
1159         * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1160         Allow scope for C.  Handle standard attributes for C.  Do not
1161         accept unscoped attributes if std_syntax and not handled as
1162         standard attributes.
1163         * c-common.h (c_common_has_attribute): Update prototype.
1165 2020-11-12  Nicholas Guriev  <guriev-ns@ya.ru>
1167         PR pch/86674
1168         * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1169         reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1171 2020-11-11  Patrick Palka  <ppalka@redhat.com>
1173         PR c++/88115
1174         * c-opts.c (c_common_post_options): Update latest_abi_version.
1176 2020-11-10  Jakub Jelinek  <jakub@redhat.com>
1178         PR c/97748
1179         * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1180         to false.
1181         * c-warn.c (warn_if_unused_value): Likewise.  Pass it down
1182         recursively and just return true instead of warning if it is true.
1183         Handle COMPLEX_EXPR.
1185 2020-11-10  Chung-Lin Tang  <cltang@codesourcery.com>
1187         * c-common.h (c_omp_adjust_map_clauses): New declaration.
1188         * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1189         (c_omp_adjust_map_clauses): New function.
1191 2020-11-09  Marek Polacek  <polacek@redhat.com>
1193         DR 1914
1194         * c-common.c (attribute_fallthrough_p): Tweak the warning
1195         message.
1197 2020-11-09  Patrick Palka  <ppalka@redhat.com>
1199         * c-pragma.c (handle_pragma_diagnostic): Split the
1200         unknown-option -Wpragmas diagnostic into a warning and a
1201         subsequent note containing a spelling suggestion.  Avoid
1202         computing the suggestion if -Wpragmas warnings are being
1203         suppressed.
1205 2020-11-09  Patrick Palka  <ppalka@redhat.com>
1207         PR testsuite/97117
1208         * c-indentation.c (get_visual_column): Remove location_t
1209         parameter.  Move the column-tracking diagnostic code from here
1210         to ...
1211         (should_warn_for_misleading_indentation): ... here, before the
1212         early exit for when the loci are not all distinct.  Don't pass a
1213         location_t argument to get_visual_column.
1214         (assert_get_visual_column_succeeds): Don't pass a location_t
1215         argument to get_visual_column.
1216         (assert_get_visual_column_fails): Likewise.
1218 2020-11-08  Iain Sandoe  <iain@sandoe.co.uk>
1220         * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1221         of keywords accepted in @property attribute contexts.
1222         * c-objc.h (enum objc_property_attribute_group): Add
1223         OBJC_PROPATTR_GROUP_CLASS.
1224         (enum objc_property_attribute_kind): Add
1225         OBJC_PROPERTY_ATTR_CLASS.
1227 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
1229         * c-common.c (c_common_reswords): Add 'atomic' property
1230         attribute.
1231         * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1232         property attributes.
1234 2020-11-07  Iain Sandoe  <iain@sandoe.co.uk>
1236         * c-attribs.c (handle_nsobject_attribute): New.
1237         * c.opt: Add WNSObject-attribute.
1239 2020-11-06  Iain Sandoe  <iain@sandoe.co.uk>
1241         * c-objc.h (enum objc_property_attribute_group): New
1242         (enum objc_property_attribute_kind): New.
1243         (OBJC_PROPATTR_GROUP_MASK): New.
1244         (struct property_attribute_info): Small class encapsulating
1245         parser output from property attributes.
1246         (objc_prop_attr_kind_for_rid): New
1247         (objc_add_property_declaration): Simplify interface.
1248         * stub-objc.c (enum rid): Dummy type.
1249         (objc_add_property_declaration): Simplify interface.
1250         (objc_prop_attr_kind_for_rid): New.
1252 2020-11-06  Nathan Sidwell  <nathan@acm.org>
1254         * c-ada-spec.c (collect_ada_nodes): Rename
1255         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1256         (collect_ada_node): Likewise.
1257         (dump_forward_type): Likewise.
1258         * c-common.c (set_underlying_type): Rename
1259         DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1260         (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1262 2020-11-06  Jakub Jelinek  <jakub@redhat.com>
1264         * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1266 2020-11-05  Marek Polacek  <polacek@redhat.com>
1268         PR c++/97675
1269         * c.opt (Wexceptions): New option.
1271 2020-11-05  Marek Polacek  <polacek@redhat.com>
1273         PR c++/25814
1274         * c.opt (Wvexing-parse): New option.
1276 2020-11-04  Jakub Jelinek  <jakub@redhat.com>
1278         PR c++/97670
1279         * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1280         underlying decl to clear in the allocate_head bitmap.
1282 2020-11-04  Iain Sandoe  <iain@sandoe.co.uk>
1284         * c-objc.h (objc_non_constant_expr_p): New.
1285         * stub-objc.c (objc_non_constant_expr_p): New.
1287 2020-11-03  Nathan Sidwell  <nathan@acm.org>
1289         * c.opt (MQ,MT): Reword description to be make-agnostic.
1291 2020-11-02  Nathan Sidwell  <nathan@acm.org>
1293         * c-opts.c (c_common_post_options): Move var decl to its
1294         initialization point.
1296 2020-11-01  Iain Sandoe  <iain@sandoe.co.uk>
1298         * c-lex.c (c_lex_with_flags): When combining '@' with a
1299         keyword for Objective-C, combine the location ranges too.
1301 2020-10-30  Qing Zhao  <qing.zhao@oracle.com>
1302             H.J.Lu  <hjl.tools@gmail.com>
1304         * c-attribs.c (c_common_attribute_table): Add new attribute
1305         zero_call_used_regs.
1306         (handle_zero_call_used_regs_attribute): New function.
1308 2020-10-28  Marek Polacek  <polacek@redhat.com>
1310         PR c++/97573
1311         * c-opts.c (c_common_post_options): In C++20, turn on
1312         -Wdeprecated-enum-enum-conversion and
1313         -Wdeprecated-enum-float-conversion.
1314         * c.opt (Wdeprecated-enum-enum-conversion,
1315         Wdeprecated-enum-float-conversion): New options.
1316         (Wenum-conversion): Allow for C++ too.
1318 2020-10-28  Jakub Jelinek  <jakub@redhat.com>
1320         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
1321         * c-omp.c: Include bitmap.h.
1322         (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
1324 2020-10-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
1326         * c-common.c (__is_nothrow_assignable): New.
1327         (__is_nothrow_constructible): Likewise.
1328         * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
1329         (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
1331 2020-10-23  Jan Hubicka  <hubicka@ucw.cz>
1333         * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
1335 2020-10-23  Marek Polacek  <polacek@redhat.com>
1337         PR c++/91741
1338         * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
1339         (c_common_init_ts): Likewise.
1340         * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
1341         * c-common.h (maybe_warn_sizeof_array_div): Declare.
1342         * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
1343         (maybe_warn_sizeof_array_div): New function.
1344         * c.opt (Wsizeof-array-div): New option.
1346 2020-10-23  Martin Sebor  <msebor@redhat.com>
1348         PR c/97463
1349         * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1351 2020-10-22  Martin Liska  <mliska@suse.cz>
1353         PR c/94722
1354         * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1355         (handle_stack_protect_attribute): Add error message for a
1356         no_stack_protector function.
1358 2020-10-22  Martin Liska  <mliska@suse.cz>
1360         * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1362 2020-10-22  Jan Hubicka  <hubicka@ucw.cz>
1364         * c-gimplify.c: Include tree-nested.h
1365         (c_genericize): Update for new nested function info.
1367 2020-10-14  Martin Sebor  <msebor@redhat.com>
1369         PR c/97413
1370         * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1371         bounds in an extra list.
1373 2020-10-05  Richard Biener  <rguenther@suse.de>
1374             Jakub Jelinek  <jakub@redhat.com>
1376         PR c++/97197
1377         * c-pretty-print.c: Include langhooks.h.
1378         (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1379         expression.
1380         (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1381         unary_expression.
1382         (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1384 2020-09-30  Martin Sebor  <msebor@redhat.com>
1386         PR middle-end/97189
1387         * c-attribs.c (append_access_attr): Use the function declaration
1388         location for a warning about an attribute access argument.
1390 2020-09-29  Marek Polacek  <polacek@redhat.com>
1392         PR c++/94695
1393         * c.opt (Wrange-loop-construct): New option.
1395 2020-09-23  Martin Sebor  <msebor@redhat.com>
1397         PR c/97131
1398         * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1400 2020-09-23  Marek Polacek  <polacek@redhat.com>
1402         PR c/97125
1403         * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1404         after loops and other structured control constructs have been lowered.
1406 2020-09-22  Jakub Jelinek  <jakub@redhat.com>
1408         * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1409         warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1411 2020-09-21  Marek Polacek  <polacek@redhat.com>
1413         * c.opt (Wctad-maybe-unsupported): New option.
1415 2020-09-19  Martin Sebor  <msebor@redhat.com>
1417         PR c/50584
1418         * c-common.h (warn_parm_array_mismatch): Declare new function.
1419         (has_attribute): Move declaration of an existing function.
1420         (build_attr_access_from_parms): Declare new function.
1421         * c-warn.c (parm_array_as_string): Define new function.
1422         (plus_one):  Define new function.
1423         (warn_parm_ptrarray_mismatch): Define new function.
1424         (warn_parm_array_mismatch):  Define new function.
1425         (vla_bound_parm_decl): New function.
1426         * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1427         * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1428         qualifiers here...
1429         (c_pretty_printer::direct_abstract_declarator): ...but instead print
1430         them in brackets here.  Also print [static].  Strip extraneous
1431         expressions from VLA bounds.
1433 2020-09-19  Martin Sebor  <msebor@redhat.com>
1435         PR c/50584
1436         * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1437         (handle_argspec_attribute): New function.
1438         (get_argument, get_argument_type): New functions.
1439         (append_access_attrs): Add overload.  Handle internal attribute
1440         representation in addition to external.
1441         (handle_access_attribute): Handle internal attribute representation
1442         in addition to external.
1443         (build_attr_access_from_parms): New function.
1445 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
1447         * c-gimplify.c (genericize_c_loop): Rewrite to match
1448         c_finish_loop in c-typeck.c.
1450 2020-09-19  Sandra Loosemore  <sandra@codesourcery.com>
1452         * c-common.c (c_block_may_fallthrough): New, split from
1453         cxx_block_may_fallthrough in the cp front end.
1454         (c_common_init_ts): Move handling of loop and switch-related
1455         statements here from the cp front end.
1456         * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1457         cp front end.
1458         (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1459         * c-common.h (c_block_may_fallthru): Declare.
1460         (bc_state_t): Move here from cp front end.
1461         (save_bc_state, restore_bc_state): Declare.
1462         (c_genericize_control_stmt): Declare.
1463         (WHILE_COND, WHILE_BODY): Likewise.
1464         (DO_COND, DO_BODY): Likewise.
1465         (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1466         (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1467         (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1468         (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1469         (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1470         * c-dump.c (dump_stmt): Copy from cp front end.
1471         (c_dump_tree): Move code to handle structured loop and switch
1472         tree nodes here from cp front end.
1473         * c-gimplify.c: Adjust includes.
1474         (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1475         cp front end.
1476         (save_bc_state, restore_bc_state): New functions using old code
1477         from cp front end.
1478         (get_bc_label, expr_loc_or_loc): Move from cp front end.
1479         (genericize_c_loop): Move from cp front end.
1480         (genericize_for_stmt, genericize_while_stmt): Likewise.
1481         (genericize_do_stmt, genericize_switch_stmt): Likewise.
1482         (genericize_continue_stmt, genericize_break_stmt): Likewise.
1483         (genericize_omp_for_stmt): Likewise.
1484         (c_genericize_control_stmt): New function using code split from
1485         cp front end.
1486         (c_genericize_control_r): New.
1487         (c_genericize): Call walk_tree with c_genericize_control_r.
1488         * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1489         structured loop and switch tree nodes here from cp front end.
1491 2020-09-17  Patrick Palka  <ppalka@redhat.com>
1493         PR c/80076
1494         * c-indentation.c (should_warn_for_misleading_indentation): Move
1495         declarations of local variables closer to their first use.
1496         Handle virtual token locations by resolving them to their
1497         respective macro expansion points.  If all three tokens are
1498         produced from the same macro expansion, then instead use their
1499         loci within the macro definition.
1501 2020-09-16  Martin Sebor  <msebor@redhat.com>
1503         PR c/78666
1504         PR c/96126
1505         * c-attribs.c (validate_attr_args): New function.
1506         (validate_attr_arg): Same.
1507         (handle_section_attribute): Call it.  Introduce a local variable.
1508         (handle_alloc_size_attribute):  Same.
1509         (handle_alloc_align_attribute): Same.
1511 2020-09-14  Jakub Jelinek  <jakub@redhat.com>
1513         * c-attribs.c (handle_optimize_attribute): Adjust
1514         cl_optimization_save, cl_optimization_restore and
1515         build_optimization_node callers.
1516         * c-pragma.c (handle_pragma_optimize): Adjust
1517         build_optimization_node caller.
1518         (handle_pragma_push_options): Adjust
1519         build_optimization_node and build_target_option_node callers.
1520         (handle_pragma_pop_options, handle_pragma_reset_options):
1521         Adjust cl_optimization_restore callers.
1523 2020-08-28  Martin Sebor  <msebor@redhat.com>
1525         * c.opt (Wstringop-overread): New option.
1527 2020-08-11  Jakub Jelinek  <jakub@redhat.com>
1529         PR c/96545
1530         * c-common.c (get_atomic_generic_size): Require that first argument's
1531         type points to a complete type and use tree_fits_uhwi_p instead of
1532         just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1534 2020-07-31  Martin Sebor  <msebor@redhat.com>
1536         PR c++/96003
1537         * c-common.c (check_function_arguments_recurse): Return early when
1538         no-warning bit is set.
1540 2020-07-31  Richard Biener  <rguenther@suse.de>
1542         PR debug/96383
1543         * c-common.h (c_common_finalize_early_debug): Declare.
1544         * c-common.c: Include debug.h.
1545         (c_common_finalize_early_debug): finalize_early_debug langhook
1546         implementation generating debug for extern declarations.
1548 2020-07-27  Nathan Sidwell  <nathan@acm.org>
1550         * c-common.c (try_to_locate_new_include_insertion_point): Use
1551         strcmp, not pointer equality.
1553 2020-07-25  Martin Sebor  <msebor@redhat.com>
1555         PR c++/96310
1556         * c-common.c (check_nonnull_arg): Print note only when warning was
1557         issued.
1559 2020-07-22  Tobias Burnus  <tobias@codesourcery.com>
1561         * c-omp.c (c_finish_omp_critical): Check for no name but
1562         nonzero hint provided.
1564 2020-07-20  Jason Merrill  <jason@redhat.com>
1566         * c-cppbuiltin.c (c_cpp_builtins): Update
1567         __cpp_nontype_template_args for C++20.
1569 2020-07-20  Martin Sebor  <msebor@redhat.com>
1571         PR c/96249
1572         * c.opt: Remove stray text.
1574 2020-07-14  Lewis Hyatt  <lhyatt@gmail.com>
1576         PR other/86904
1577         * c-indentation.c (should_warn_for_misleading_indentation): Get
1578         global tabstop from the new source.
1579         * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1580         is now a common option.
1581         * c.opt: Likewise.
1583 2020-07-08  Eric Botcazou  <ebotcazou@adacore.com>
1585         * c.opt (Wscalar-storage-order): Add explicit variable.
1587 2020-07-07  Nathan Sidwell  <nathan@acm.org>
1589         * c-opts.c (c_common_post_options): Add 'injecting' arg to
1590         cpp_read_main_file.
1591         (c_finish_options): Add linemap_line_start calls for builtin and cmd
1592         maps.  Force token position to line_table's highest line.
1593         * c-ppoutput.c (print_line_1): Refactor, print line zero.
1594         (cb_define): Always increment source line.
1596 2020-07-06  Martin Sebor  <msebor@redhat.com>
1598         PR c++/95984
1599         * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1600         to stub lambda objects with null this pointer.
1601         (check_nonnull_arg): Handle C++ nullptr.
1603 2020-07-02  Jason Merrill  <jason@redhat.com>
1604             Jakub Jelinek  <jakub@redhat.com>
1606         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1608 2020-06-30  Jakub Jelinek  <jakub@redhat.com>
1610         PR c++/95963
1611         * c-common.c (check_function_arguments_recurse): Don't crash on
1612         calls to internal functions.
1614 2020-06-28  Martin Sebor  <msebor@redhat.com>
1616         PR c++/86568
1617         * c-common.c (struct nonnull_arg_ctx): Add members.
1618         (check_function_nonnull): Use nonnull_arg_ctx as argument.  Handle
1619         C++ member functions specially.  Consider the this pointer implicitly
1620         nonnull.
1621         (check_nonnull_arg): Use location of argument when available.
1622         (check_function_arguments): Use nonnull_arg_ctx as argument.
1624 2020-06-27  Jakub Jelinek  <jakub@redhat.com>
1626         PR middle-end/95903
1627         * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1628         !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1629         smaller precision intop operands separately.
1631 2020-06-26  Marek Polacek  <polacek@redhat.com>
1633         * c-opts.c (c_common_init_options): Default to gnu++17.
1635 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
1637         PR c/95378
1638         * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1639         pointer arguments.
1641 2020-06-16  Jakub Jelinek  <jakub@redhat.com>
1643         * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1644         * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1645         idx members.
1646         (c_omp_is_loop_iterator): New function.
1647         (c_omp_check_loop_iv_r): Use it.  Add support for silent scanning
1648         if outer loop iterator is present.  Perform duplicate checking through
1649         hash_set in the function rather than expecting caller to do that.
1650         Pass NULL instead of d->ppset to walk_tree_1.
1651         (c_omp_check_nonrect_loop_iv): New function.
1652         (c_omp_check_loop_iv): Use it.  Fill in new members, allow
1653         non-rectangular loop forms, diagnose multiple associated loops with
1654         the same iterator.  Pass NULL instead of &pset to walk_tree_1.
1655         (c_omp_check_loop_iv_exprs): Likewise.
1657 2020-06-10  Martin Liska  <mliska@suse.cz>
1659         PR tree-optimization/92860
1660         * c-attribs.c (handle_optimize_attribute):
1661         Save global options and compare it after parsing of function
1662         attribute.
1663         * c-pragma.c (opt_stack::saved_global_options): New field.
1664         (handle_pragma_push_options): Save global_options.
1665         (handle_pragma_pop_options): Compare them after pop.
1667 2020-06-09  Jakub Jelinek  <jakub@redhat.com>
1669         PR c/95580
1670         * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1671         case when MEM_REF's first argument has type pointer to incomplete type.
1673 2020-06-05  Jason Merrill  <jason@redhat.com>
1675         * c-pretty-print.c (pp_c_additive_expression): Handle negative
1676         operand to POINTER_PLUS_EXPR.
1678 2020-06-04  Martin Sebor  <msebor@redhat.com>
1680         PR middle-end/10138
1681         PR middle-end/95136
1682         * c-attribs.c (append_access_attrs): Handle attr_access::none.
1683         (handle_access_attribute): Same.
1685 2020-06-03  Mark Wielaard  <mark@klomp.org>
1687         * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1688         New function.
1689         * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1690         New function declaration.
1692 2020-06-03  Mark Wielaard  <mark@klomp.org>
1694         * known-headers.cc (get_string_macro_hint): New function.
1695         (get_stdlib_header_for_name): Use get_string_macro_hint.
1696         (get_c_stdlib_header_for_string_macro_name): New function.
1697         * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1698         New function declaration.
1700 2020-06-03  Tobias Burnus  <tobias@codesourcery.com>
1702         * c-common.h (c_omp_predetermined_mapping): Declare.
1703         * c-omp.c (c_omp_predetermined_mapping): New.
1705 2020-05-22  Mark Wielaard  <mark@klomp.org>
1707         * known-headers.cc (get_stdlib_header_for_name): Add a new
1708         stdlib_hint array for stdbool and stdint.
1710 2020-05-22  Mark Wielaard  <mark@klomp.org>
1712         * known-headers.cc (get_stdlib_header_for_name): Return
1713         "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1714         flag_isoc99.
1716 2020-05-20  Nathan Sidwell  <nathan@acm.org>
1718         * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1720         * c-common.c (try_to_locate_new_include_insertion_point): Use
1721         strcmp to compare filenames.
1722         * c-lex.c (init_c_lex): Move declaration to initialization.
1723         * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1724         deferred count loop.
1726 2020-05-15  Jason Merrill  <jason@redhat.com>
1728         * c-opts.c (set_std_cxx20): Set flag_coroutines.
1730 2020-05-13  Jason Merrill  <jason@redhat.com>
1732         * c.opt (std=c++20): Make c++2a the alias.
1733         (std=gnu++20): Likewise.
1734         * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1735         * c-opts.c: Adjust.
1736         * c-cppbuiltin.c: Adjust.
1737         * c-ubsan.c: Adjust.
1738         * c-warn.c: Adjust.
1740 2020-05-12  Eric Botcazou  <ebotcazou@adacore.com>
1742         * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1744 2020-05-08  Nathan Sidwell  <nathan@acm.org>
1746         Reimplement directives only processing.
1747         * c-ppoutput.c (token_streamer): Ne.
1748         (directives_only_cb): New.  Swallow ...
1749         (print_lines_directives_only): ... this.
1750         (scan_translation_unit_directives_only): Reimplment using the
1751         published interface.
1753 2020-05-07  Marek Polacek  <polacek@redhat.com>
1755         * c-format.c (badwords): Add "nonstatic".
1757 202-05-07  Jakub Jelinek  <jakub@redhat.com>
1759         PR c/94968
1760         * c-common.c (speculation_safe_value_resolve_params): Return false if
1761         error_operand_p (val2).
1762         (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1763         Remove extraneous semicolon.
1765 2020-05-06  qing zhao  <qing.zhao@oracle.com>
1767         PR c/94230
1768         * c-indentation.c (get_visual_column): Add a hint to use the new
1769         -flarge-source-files option.
1771 2020-05-05  Stefan Schulze Frielinghaus  <stefansf@linux.ibm.com>
1773         * c-attribs.c (handle_vector_size_attribute): Add attribute
1774         nonnull for argument args in order to silence warning of
1775         uninitialized variable usage.  Since this is local to the
1776         compilation unit and thus cannot be checked at call sides by the
1777         compiler, added an assert statement in order to verify this.
1779 2020-05-01  H.J. Lu  <hongjiu.lu@intel.com>
1781         PR target/93492
1782         * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1783         value to USHRT_MAX (65535).
1785 2020-04-29  Jakub Jelinek  <jakub@redhat.com>
1787         * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1789 2020-04-27  Jakub Jelinek  <jakub@redhat.com>
1791         PR c/94755
1792         * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1793         fncode == BUILT_IN_NONE before initialization of first_param.
1795 2020-04-23  Marek Polacek  <polacek@redhat.com>
1797         PR c++/94733
1798         * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1799         TREE_PURPOSE.
1801 2020-04-14  Patrick Palka  <ppalka@redhat.com>
1803         PR c++/85278
1804         * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1805         ampersand if it's an rvalue reference type.
1807 2020-04-13  Martin Sebor  <msebor@redhat.com>
1809         PR c/92326
1810         * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1811         printing array bound for flexible array members.
1813 2020-04-13  Iain Sandoe  <iain@sandoe.co.uk>
1815         * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1816         define, per n4861.
1818 2020-04-02  Richard Biener  <rguenther@suse.de>
1820         PR c/94392
1821         * c-opts.c (c_common_post_options): Enable -ffinite-loops
1822         for -O2 and C++11 or newer.
1824 2020-03-28  Patrick Palka  <ppalka@redhat.com>
1826         * c.opt: Add -fconcepts-diagnostics-depth.
1828 2020-03-27  Martin Sebor  <msebor@redhat.com>
1830         PR c++/94346
1831         * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1832         to decl_attributes.  Make handling of different kinds of entities
1833         more robust.
1835 2020-03-27  Martin Sebor  <msebor@redhat.com>
1837         PR c++/94098
1838         * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1839         here.
1841 2020-03-23  Jakub Jelinek  <jakub@redhat.com>
1843         PR c++/91993
1844         * c-warn.c (warnings_for_convert_and_check): For expr and/or
1845         result being COMPOUND_EXPRs, skip to ultimate rhs.
1847 2020-03-20  Richard Sandiford  <richard.sandiford@arm.com>
1849         PR middle-end/94072
1850         * c-common.c (c_common_type_for_mode): Before using a registered
1851         built-in type, check that the vectorness of the type matches
1852         the vectorness of the mode.
1854 2020-03-17  Jakub Jelinek  <jakub@redhat.com>
1856         * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1857         issue in a diagnostic message.
1859 2020-03-15  Lewis Hyatt  <lhyatt@gmail.com>
1861         * c.opt: Avoid redundancy in the help text.
1863 2020-03-02  Marek Polacek  <polacek@redhat.com>
1865         PR c++/93958 - add missing -std=gnu++20.
1866         * c.opt: Add -std=gnu++20.
1868 2020-03-01  Martin Sebor  <msebor@redhat.com>
1870         PR c++/92721
1871         * c-attribs.c (append_access_attrs): Correctly handle attribute.
1872         (handle_access_attribute): Same.
1874 2020-02-25  Jakub Jelinek  <jakub@redhat.com>
1876         PR c/93858
1877         * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1878         "did you mean" hint in diagnostics.
1880 2020-02-15  Jason Merrill  <jason@redhat.com>
1882         * c.opt: Add -std=c++20.
1884 2020-02-14  Eric Botcazou  <ebotcazou@adacore.com>
1886         * c-ada-spec.c: Include bitmap.h.
1887         (dump_ada_double_name): Rename into...
1888         (dump_anonymous_type_name): ...this.  Always use the TYPE_UID.
1889         (dump_ada_array_type): Adjust to above renaming.  Robustify.
1890         (dump_nested_types_1): New function copied from...  Add dumped_types
1891         parameter and pass it down to dump_nested_type.
1892         (dump_nested_types): ...this.  Remove parent parameter.  Just call
1893         dump_nested_types_1 on an automatic bitmap.
1894         (dump_nested_type): Add dumped_types parameter.
1895         <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1896         Adjust recursive calls and adjust to above renaming.
1897         (dump_ada_declaration): Adjust call to dump_nested_types.
1898         Tidy up and adjust to above renaming.
1899         (dump_ada_specs): Initialize and release bitmap obstack.
1901 2020-02-10  Martin Sebor  <msebor@redhat.com>
1903         PR c/93640
1904         * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1906 2020-02-10  Jakub Jelinek  <jakub@redhat.com>
1908         PR other/93641
1909         * c-format.c (check_plain): Fix up last argument of strncasecmp.
1910         Remove useless extra test.
1912 2020-02-03  Julian Brown  <julian@codesourcery.com>
1913             Tobias Burnus  <tobias@codesourcery.com>
1915         * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1917 2020-01-29  Jason Merrill  <jason@redhat.com>
1919         PR c++/89357
1920         * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1922 2020-01-23  Jason Merrill  <jason@redhat.com>
1924         * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1926 2020-01-23  Martin Sebor  <msebor@redhat.com>
1928         PR c/84919
1929         * c-common.c (check_function_arguments): Avoid overlap checking
1930         of sprintf functions.
1932 2020-01-22  Jason Merrill  <jason@redhat.com>
1934         PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1935         PR c++/40752
1936         * c-warn.c (conversion_warning): Check operands only after checking
1937         the whole expression.  Don't check second operand of + for sign.
1939 2020-01-21  Jason Merrill  <jason@redhat.com>
1940             Manuel López-Ibáñez  <manu@gcc.gnu.org>
1942         PR c++/40752 - useless -Wconversion with short +=.
1943         * c.opt (-Warith-conversion): New.
1944         * c-warn.c (conversion_warning): Recurse for operands of
1945         operators.  Only warn about the whole expression with
1946         -Warith-conversion.
1948 2020-01-21  Jason Merrill  <jason@redhat.com>
1950         * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1951         * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1953 2020-01-20  Nathan Sidwell  <nathan@acm.org>
1955         PR preprocessor/80005
1956         * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1958 2020-01-18  Iain Sandoe  <iain@sandoe.co.uk>
1960         * c-common.c (co_await, co_yield, co_return): New.
1961         * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1962         RID_CO_RETURN): New enumeration values.
1963         (D_CXX_COROUTINES): Bit to identify coroutines are active.
1964         (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1965         * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1966         * c.opt (fcoroutines): New command-line switch.
1968 2020-01-10  David Malcolm  <dmalcolm@redhat.com>
1970         * c-format.c (local_event_ptr_node): New.
1971         (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1972         (init_dynamic_diag_info): Initialize local_event_ptr_node.
1973         * c-format.h (T_EVENT_PTR): New define.
1975 2020-01-10  Martin Sebor  <msebor@redhat.com>
1977         PR c/93132
1978         * c-attribs.c (append_access_attrs): Validate against the translated
1979         access string rather than the human-readable representation.
1981 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
1983         Update copyright years.
1985 2019-12-20  Eric Botcazou  <ebotcazou@adacore.com>
1987         * c-ada-spec.h (decl_sloc): Delete.
1988         * c-ada-spec.c (decl_sloc): Make static.
1990 2019-12-19  Julian Brown  <julian@codesourcery.com>
1992         * c-common.h (c_omp_map_clause_name): Add prototype.
1993         * c-omp.c (c_omp_map_clause_name): New function.
1994         * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1995         PRAGMA_OACC_CLAUSE_DETACH.
1997 2019-12-19  Julian Brown  <julian@codesourcery.com>
1998             Maciej W. Rozycki  <macro@codesourcery.com>
1999             Tobias Burnus  <tobias@codesourcery.com>
2000             Thomas Schwinge  <thomas@codesourcery.com>
2002         * c-pragma.h (pragma_omp_clause): Add
2003         PRAGMA_OACC_CLAUSE_NO_CREATE.
2005 2019-12-17  Martin Sebor  <msebor@redhat.com>
2007         PR c++/61339
2008         * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2010 2019-12-11  David Malcolm  <dmalcolm@redhat.com>
2012         * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2013         implementation.
2014         * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2016 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
2018         * c-format.c (range_label_for_format_type_mismatch::get_text):
2019         Replace label_text ctor called with true with label_text::take.
2021 2019-12-09  David Malcolm  <dmalcolm@redhat.com>
2023         * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2024         initial newline from expected outputs.
2025         * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2026         call to diagnostic_show_locus.
2028 2019-12-06  Jakub Jelinek  <jakub@redhat.com>
2030         * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2031         now.
2033 2019-12-05  Marek Polacek  <polacek@redhat.com>
2034             Jakub Jelinek  <jakub@redhat.com>
2036         PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2037         * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2039 2019-12-05  Marek Polacek  <polacek@redhat.com>
2041         PR c++/92271 - make __is_same alias for __is_same_as.
2042         * c-common.c: Add __is_same, an alias for __is_same_as.
2044 2019-12-03  Marek Polacek  <polacek@redhat.com>
2046         PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2047         * c-cppbuiltin.c (c_cpp_builtins): Predefine
2048         __cpp_aggregate_paren_init=201902 for -std=c++2a.
2050 2019-11-30  Jan Hubicka  <hubicka@ucw.cz>
2052         * c-attribs.c (handle_symver_attribute): New function
2053         (c_common_attributes): Add symver.
2055 2019-11-30  Richard Sandiford  <richard.sandiford@arm.com>
2057         * c-common.c (pointer_int_sum): Use verify_type_context to check
2058         whether the target allows pointer arithmetic for the types involved.
2059         (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2060         to check whether the target allows sizeof and alignof operations
2061         for the types involved.
2063 2019-11-27  Jason Merrill  <jason@redhat.com>
2065         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2067 2019-11-26  Jakub Jelinek  <jakub@redhat.com>
2069         PR c++/61414
2070         * c-attribs.c (handle_mode_attribute): Add mode attribute to
2071         ENUMERAL_TYPEs.
2073 2019-11-25  Joseph Myers  <joseph@codesourcery.com>
2075         PR c/91985
2076         * c-common.c (c_common_type_for_mode): Handle decimal
2077         floating-point types being NULL_TREE.
2078         * c-format.c (get_format_for_type_1): Handle specified types being
2079         NULL_TREE.
2080         * c-lex.c (interpret_float): Give an error for decimal
2081         floating-point constants when decimal floating-point not
2082         supported.
2084 2019-11-23  Jakub Jelinek  <jakub@redhat.com>
2086         PR middle-end/83859
2087         * c-attribs.c (append_access_attrs): Avoid buffer overflow.  Avoid
2088         memory leak.  Use XNEWVEC macro.  Use auto_diagnostic_group to
2089         group warning with inform together.
2090         (handle_access_attribute): Formatting fix.
2092 2019-11-22  Jakub Jelinek  <jakub@redhat.com>
2094         PR c/90677
2095         * c-common.h (identifier_global_tag): Declare.
2096         * c-format.c (get_pointer_to_named_type): Renamed to ...
2097         (get_named_type): ... this.  Use identifier_global_tag instead of
2098         identifier_global_value, handle the return value being a TYPE_P.
2099         (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2100         to call get_named_type instead.  Formatting fixes.
2102         Implement P1902R1, Missing feature-test macros 2017-2019.
2103         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2104         and __cpp_generic_lambdas for -std=c++2a.  Define
2105         __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2106         __cpp_consteval for -std=c++2a.  Remove a FIXME comment about
2107         __cpp_concepts for -std=c++2a.
2109 2019-11-22  Martin Sebor  <msebor@redhat.com>
2111         PR middle-end/83859
2112         * c-attribs.c (handle_access_attribute): New function.
2113         (c_common_attribute_table): Add new attribute.
2114         (get_argument_type): New function.
2115         (append_access_attrs): New function.
2116         (get_nonnull_operand): Rename...
2117         (get_attribute_operand): ...to this.
2118         * c-common.c (get_nonnull_operand): Rename...
2119         (get_attribute_operand): ...to this.
2121 2019-11-21  Joseph Myers  <joseph@codesourcery.com>
2123         * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2124         of warning.
2126 2019-11-19  Joseph Myers  <joseph@codesourcery.com>
2128         * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2129         warning for standard attributes mixed with fallthrough attributes.
2131 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
2133         * c-attribs.c (handle_fallthrough_attribute): Remove static.
2134         * c-common.h (handle_fallthrough_attribute): Declare.
2136 2019-11-15  Joseph Myers  <joseph@codesourcery.com>
2138         * c-attribs.c (handle_deprecated_attribute): Remove static.
2139         * c-common.h (handle_deprecated_attribute): Declare.
2141 2019-11-14  Joseph Myers  <joseph@codesourcery.com>
2143         * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2144         char for C.
2146 2019-11-14  Jakub Jelinek  <jakub@redhat.com>
2148         * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2149         valid vendors.
2151         * c-omp.c (c_omp_check_context_selector): Handle name lists
2152         containing string literals.  Don't diagnose atomic_default_mem_order
2153         with multiple props.
2155 2019-11-13  Joseph Myers  <joseph@codesourcery.com>
2157         * c-cppbuiltin.c (builtin_define_float_constants): Also define
2158         NORM_MAX constants.  Update call to get_max_float.
2159         (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2160         constants.
2162 2019-11-13  Eric Botcazou  <ebotcazou@adacore.com>
2164         * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2165         (dump_forward_type): Do not generate a declaration for function types.
2166         (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2167         of the component type if it is declared in another file.
2169 2019-11-12  Martin Liska  <mliska@suse.cz>
2171         * c-opts.c (c_common_post_options):
2172         Use SET_OPTION_IF_UNSET.
2174 2019-11-12  Maciej W. Rozycki  <macro@codesourcery.com>
2175             Frederik Harwath  <frederik@codesourcery.com>
2177         gcc/c-family/
2178         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2179         constant.
2180         * c-pragma.c (oacc_pragmas): Add "serial" entry.
2182 2019-11-08  Richard Sandiford  <richard.sandiford@arm.com>
2184         * c-common.h (gnu_vector_type_p): New function.
2185         * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2186         vectors to satisfy gnu_vector_type_p.
2187         (c_build_vec_convert): Likewise __builtin_convertvector.
2188         (convert_vector_to_array_for_subscript): Likewise when applying
2189         implicit vector to array conversion.
2190         (scalar_to_vector): Likewise when converting vector-scalar
2191         operations to vector-vector operations.
2193 2019-11-08  Joseph Myers  <joseph@codesourcery.com>
2195         * c.opt (Wold-style-definition): Initialize to -1.
2196         * c-opts.c (c_common_post_options): Set warn_old_style_definition
2197         to flag_isoc2x if not set explicitly.
2199 2019-11-07  Joseph Myers  <joseph@codesourcery.com>
2201         * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2203 2019-11-05  Jason Merrill  <jason@redhat.com>
2205         * c-opts.c (c_common_post_options): -fconcepts-ts implies
2206         -fconcepts.
2208 2019-11-04  Kamlesh Kumar  <kamleshbhalui@gmail.com>
2210         * c-opts.c (c_common_post_options): Update
2211         latest_abi_version.
2213 2019-11-02  Jakub Jelinek  <jakub@redhat.com>
2215         * c-common.h (c_omp_get_context_selector): Remove.
2216         * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2217         and renamed to omp_get_context_selector.
2219         * c-omp.c (c_omp_mark_declare_variant): Use
2220         omp_context_selector_set_compare.
2222         PR c++/88335 - Implement P1073R3: Immediate functions
2223         * c-common.h (enum rid): Add RID_CONSTEVAL.
2224         * c-common.c (c_common_reswords): Add consteval.
2226 2019-11-01  Martin Sebor  <msebor@redhat.com>
2228         PR middle-end/91679
2229         PR middle-end/91647
2230         PR middle-end/91463
2231         PR middle-end/92312
2232         * c-pretty-print.c (direct_abstract_declarator): Print
2233         bound in zero-length arrays.
2234         * c.opt (-Wzero-length-bounds): New option.
2236 2019-10-30  Nathan Sidwell  <nathan@acm.org>
2238         * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2239         macros.
2241 2019-10-28  Martin Sebor  <msebor@redhat.com>
2243         PR c/66970
2244         * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2245         even when only preprocessing.
2246         * c-common.h (names_builtin_p): Declare new function.
2247         * c-lex.c (init_c_lex): Set has_builtin.
2248         (c_common_has_builtin): Define a new function.
2249         * c-ppoutput.c (init_pp_output): Set has_builtin.
2251 2019-10-24  Jakub Jelinek  <jakub@redhat.com>
2253         * c-common.h (c_omp_context_selector_matches): Remove.
2254         * c-omp.c (c_omp_context_selector_matches): Remove.
2255         * c-attribs.c (c_common_attribute_table): Add
2256         "omp declare target {host,nohost,block}" attributes.
2258 2019-10-17  JeanHeyd Meneide  <phdofthehouse@gmail.com>
2260         * c-lex.c (c_common_has_attribute): Update nodiscard value.
2262 2019-10-14  Richard Sandiford  <richard.sandiford@arm.com>
2264         * c-common.h (user_facing_original_type_p): Declare.
2265         * c-common.c: Include c-spellcheck.h.
2266         (user_facing_original_type_p): New function.
2268 2019-10-12  Jakub Jelinek  <jakub@redhat.com>
2270         * c-common.h (c_omp_mark_declare_variant,
2271         c_omp_context_selector_matches): Declare.
2272         * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2273         and hsa-common.h.
2274         (c_omp_get_context_selector): Support second argument NULL.
2275         (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2276         functions.
2277         * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2278         attribute, add "omp declare variant base" and
2279         "omp declare variant variant" attributes.
2281 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
2283         * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2284         CppReason(CPP_W_C11_C2X_COMPAT).
2286 2019-10-11  Joseph Myers  <joseph@codesourcery.com>
2288         * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2289         _Decimal64 and _Decimal128.
2291 2019-10-10  Joseph Myers  <joseph@codesourcery.com>
2293         * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2294         types if DFP not supported.
2296 2019-10-10  Jakub Jelinek  <jakub@redhat.com>
2298         * c-common.h (c_omp_check_context_selector,
2299         c_omp_get_context_selector): Declare.
2300         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2301         in diagnostic message.
2302         (c_omp_check_context_selector, c_omp_get_context_selector): New
2303         functions.
2304         * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
2305         attribute.
2306         (handle_omp_declare_variant_attribute): New function.
2308 2019-10-09  Martin Sebor  <msebor@redhat.com>
2310         PR tree-optimization/90879
2311         * c.opt (-Wstring-compare): New option.
2313 2019-10-08  Andrew Sutton  <asutton@lock3software.com>
2314             Jason Merrill  <jason@redhat.com>
2316         Update the concepts implementation to conform to the C++20
2317         specification, improve compile times, and generally clean up
2318         the implementation.
2320         * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
2321         concepts when -std=c++2a. Bump __cpp_concepts to 201907.
2322         * c.opt: Add -Wconcepts-ts.
2323         * c-opts.c (c_common_post_options): Warn when -fconcepts is used
2324         with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
2325         (set_std_cxx2a): Enable concepts by default.
2327 2019-10-08  Joseph Myers  <joseph@codesourcery.com>
2329         * c-opts.c (c_common_post_options): Set
2330         -fno-fp-int-builtin-inexact for C2X.
2332 2019-10-05  Jakub Jelinek  <jakub@redhat.com>
2334         PR c++/91369 - Implement P0784R7: constexpr new
2335         * c-cppbuiltin.c (c_cpp_builtins): Predefine
2336         __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
2338 2019-10-04  Joseph Myers  <joseph@codesourcery.com>
2340         PR c/82752
2341         * c-format.c (C_STD_VER): Handle C2x.
2342         (C_STD_NAME): Likewise.
2343         (strftime_flag_specs): Add 'O' modifier with 'p' flag.
2344         (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2345         modifier allowed and 'p' flag.
2346         * c-format.h (enum format_std_version): Add STD_C2X.
2347         (struct format_char_info): Mention 'p' in comment on flags2.
2349 2019-10-01  David Malcolm  <dmalcolm@redhat.com>
2351         * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2352         calling diagnostic_show_locus, rather than destroying it afterwards.
2354 2019-10-01  Jakub Jelinek  <jakub@redhat.com>
2356         PR c++/91925
2357         * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2358         with NULL DECL_FIELD_OFFSET.
2360 2019-10-01  Richard Sandiford  <richard.sandiford@arm.com>
2362         * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2363         has a type name, use it in preference to the __vector syntax.
2365 2019-09-30  Richard Sandiford  <richard.sandiford@arm.com>
2367         * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2368         two spaces between a comma and "...".
2370 2019-09-27  Jakub Jelinek  <jakub@redhat.com>
2372         PR c++/88203
2373         * c-common.h (c_omp_predefined_variable): Declare.
2374         * c-omp.c (c_omp_predefined_variable): New function.
2375         (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2376         for predefined variables.
2378 2019-09-27  Richard Sandiford  <richard.sandiford@arm.com>
2380         * c-common.h (build_function_call_vec): Take the original
2381         function decl as an optional final parameter.
2382         (check_builtin_function_arguments): Take the original function decl.
2383         * c-common.c (check_builtin_function_arguments): Likewise.
2384         Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2385         Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2387 2019-09-15  Jason Merrill  <jason@redhat.com>
2389         * c-warn.c (warn_logical_operator): Strip location wrappers.  Don't
2390         fold_for_warn in "|| mask" warning.
2392 2019-09-10  Martin Liska  <mliska@suse.cz>
2394         * c.opt: Use newly added WarnRemoved.
2396 2019-09-09  Martin Liska  <mliska@suse.cz>
2398         * c.opt: Update comment of removed
2399         options that are preserved only for backward
2400         compatibility.
2402 2019-09-06  Martin Liska  <mliska@suse.cz>
2404         PR c++/91125
2405         * c-common.c: Remove definition of flag_use_repository.
2406         * c-common.h: Likewise.
2407         * c-opts.c (c_common_handle_option):
2408         Do not handle OPT_frepo option.
2409         * c.opt: Mark the option with Deprecated.
2411 2019-09-04  Marek Polacek  <polacek@redhat.com>
2413         * c.opt (fdeduce-init-list): Ignored.
2415 2019-09-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2417         PR c/78736
2418         * c.opt (Wenum-conversion): New option.
2420 2019-09-03  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2422         * c-attribs.c (handle_section_attribute): Call the
2423         handle_generic_attribute target hook after performing target
2424         independent processing.
2425         (handle_noinit_attribute): Likewise.
2427 2019-09-03  Ian Lance Taylor  <iant@golang.org>
2429         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2430         when using -fgo-dump-spec.
2432 2019-09-02  Martin Liska  <mliska@suse.cz>
2434         PR c++/91155
2435         * c-common.c (fname_as_string): Use cxx_printable_name for
2436         __PRETTY_FUNCTION__ same as was used before r265711.
2438 2019-08-28  Marek Polacek  <polacek@redhat.com>
2440         Implement P1152R4: Deprecating some uses of volatile.
2441         PR c++/91361
2442         * c-opts.c (c_common_post_options): Enable -Wvolatile by
2443         default for C++2a, unless -Wno-deprecated.
2444         * c.opt (Wvolatile): New warning.
2446 2019-08-28  Marek Polacek  <polacek@redhat.com>
2448         PR c++/91360 - Implement C++20 P1143R2: constinit.
2449         * c-common.c (c_common_reswords): Add constinit and __constinit.
2450         (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2451         * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2452         RID_LAST_CXX20.
2453         (D_CXX20): Define.
2454         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2455         * c-format.c (cxx_keywords): Add "constinit".
2456         * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2458 2019-08-27  Jakub Jelinek  <jakub@redhat.com>
2460         PR c++/91415
2461         * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2462         COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2463         like COMPOUND_EXPR rather than normal expression.
2465 2019-08-23  Iain Sandoe  <iain@sandoe.co.uk>
2467         PR pch/61250
2468         * c-lex.c (c_lex_with_flags):  Don't call
2469         c_common_no_more_pch () from here.
2471 2019-08-23  Jakub Jelinek  <jakub@redhat.com>
2473         PR middle-end/91283
2474         * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2475         instead of flag_excess_precision_cmdline.
2476         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2477         * c-opts.c (c_common_post_options): Likewise.
2479 2019-08-22  Martin Sebor  <msebor@redhat.com>
2481         PR middle-end/91490
2482         * c-common.c (braced_list_to_string): Add argument and overload.
2483         Handle flexible length arrays and unions.
2485 2019-08-21  Eric Botcazou  <ebotcazou@adacore.com>
2487         * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2488         function declarations where arguments are missing.  Rename variables.
2490 2019-08-15  Richard Biener  <rguenther@suse.de>
2492         * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2493         enabled, define __SIZETYPE__.
2495 2019-08-14  Christophe Lyon  <christophe.lyon@linaro.org>
2497         * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2498         exclusion with "section" attribute.
2499         (attr_noinit_exclusions): New table.
2500         (handle_noinit_attribute): New function.
2502 2019-08-13  Richard Sandiford  <richard.sandiford@arm.com>
2504         PR middle-end/91421
2505         * c-common.c (resolve_overloaded_builtin): Use
2506         copy_decl_built_in_function.
2508 2019-08-13  Martin Sebor  <msebor@redhat.com>
2510         PR c/80619
2511         * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2512         (asm_fprintf_length_spec): Same.
2513         * c-format.h (format_lengths): Add FMT_LEN_w.
2515 2019-08-10  Jakub Jelinek  <jakub@redhat.com>
2517         * c-pragma.h (enum pragma_omp_clause): Add
2518         PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2520 2019-08-07  Jakub Jelinek  <jakub@redhat.com>
2522         * c-pragma.h (enum pragma_omp_clause): Add
2523         PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR.  Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2524         equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2525         enumeration value.
2527 2019-08-05  Marek Polacek  <polacek@redhat.com>
2529         PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2530         * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2531         default for C++2a, unless -Wno-deprecated.
2532         * c.opt (Wcomma-subscript): New warning.
2534 2019-07-20  Jakub Jelinek  <jakub@redhat.com>
2536         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2537         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2538         * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2539         * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2540         * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2541         constructs with the loop construct.
2543 2019-07-13  Jakub Jelinek  <jakub@redhat.com>
2545         PR c/91149
2546         * c-omp.c (c_omp_split_clauses): Fix a pasto in
2547         OMP_CLAUSE_REDUCTION_TASK handling.
2549 2019-07-12  Jakub Jelinek  <jakub@redhat.com>
2551         * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2552         * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2554 2019-07-09  Martin Sebor  <msebor@redhat.com>
2556         PR c++/61339
2557         * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2558         and others to class.
2559         * c-pretty-print.h: Same.
2561 2019-07-09  Martin Sebor  <msebor@redhat.com>
2563         PR c++/61339
2564         * c-format.c (check_argument_type): Change class-key from class to
2565         struct and vice versa to match convention and avoid -Wclass-is-pod
2566         and -Wstruct-no-pod.
2567         * c-pretty-print.h: Same.
2569 2019-07-03  Martin Liska  <mliska@suse.cz>
2571         * c-common.c (try_to_locate_new_include_insertion_point): Remove
2572         dead assignemts.
2574 2019-07-03  Jakub Jelinek  <jakub@redhat.com>
2576         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2577         clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2578         with OMP_PARALLEL.
2580 2019-07-02  qing zhao  <qing.zhao@oracle.com>
2582         PR preprocessor/90581
2583         * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2584         * c.opt: Add new option -fmax-include-depth.
2586 2019-06-26  Jason Merrill  <jason@redhat.com>
2588         PR c++/55442 - memory-hog with highly recursive constexpr.
2589         * c.opt (fconstexpr-loop-limit): New.
2591 2019-06-25  Jakub Jelinek  <jakub@redhat.com>
2593         PR sanitizer/90954
2594         * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2595         to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2597 2019-06-25  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2599         * c-common.c (c_common_nodes_and_builtins): Define
2600         alternate "__intN__" name for "__intN" types.
2602 2019-06-24  Jan Hubicka  <jh@suse.cz>
2604         * c-common.c (braced_lists_to_strings): Check that
2605         type is array or integer prior checking string flag.
2607 2019-06-21  Matthew Beliveau  <mbelivea@redhat.com>
2609         PR c++/90875 - added -Wswitch-outside-range option
2610         * c.opt (Wswitch-outside-range): Added new option.
2611         * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2613 2019-06-21  Marek Polacek  <polacek@redhat.com>
2615         PR c++/90953 - ICE with -Wmissing-format-attribute.
2616         * c-common.c (check_function_arguments_recurse): Use
2617         get_attribute_name.
2618         (check_missing_format_attribute): Likewise.
2620 2019-06-19  Marek Polacek  <polacek@redhat.com>
2622         PR c++/60364 - noreturn after first decl not diagnosed.
2623         * c-attribs.c (handle_noreturn_attribute): No longer static.
2624         * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2625         Declare.
2626         * c-format.c (check_function_format): Use get_attribute_name.
2628 2019-06-19  Martin Sebor  <msebor@redhat.com>
2630         PR translation/90156
2631         * c-format.c (function_format_info::format_type): Adjust type.
2632         (function_format_info::is_raw): New member.
2633         (decode_format_type): Adjust signature.  Handle "raw" diag attributes.
2634         (decode_format_attr): Adjust call to decode_format_type.
2635         Avoid a redundant call to convert_format_name_to_system_name.
2636         Avoid abbreviating the word "arguments" in a diagnostic.
2637         (format_warning_substr): New function.
2638         (avoid_dollar_number): Quote dollar sign in a diagnostic.
2639         (finish_dollar_format_checking): Same.
2640         (check_format_info): Same.
2641         (struct baltoks_t): New.
2642         (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2643         (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2644         functions.
2645         (check_format_info_main): Call check_plain.  Use baltoks_t.  Call
2646         maybe_diag_unbalanced_tokens.
2647         (handle_format_attribute): Spell out the word "arguments" in
2648         a diagnostic.
2650 2019-06-11  Matthew Beliveau  <mbelivea@redhat.com>
2652         PR c++/90449 - add -Winaccessible-base option.
2653         * c.opt (Winaccessible-base): New option.
2655 2019-06-10  Jakub Jelinek  <jakub@redhat.com>
2657         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2658         * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2659         * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2660         combined/composite constructs where it is not allowed.  Copy over
2661         OMP_CLAUSE_REDUCTION_INSCAN.
2663 2019-06-05  Martin Sebor  <msebor@redhat.com>
2665         * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2666         (handle_alias_ifunc_attribute): Same.
2667         (handle_copy_attribute): Same.
2668         (handle_weakref_attribute): Same.
2669         (handle_nonnull_attribute): Same.
2670         * c-warn.c (warn_for_sign_compare): Same.
2671         (warn_for_restrict): Same.
2672         * c.opt: Same.
2674 2019-06-05  Martin Sebor  <msebor@redhat.com>
2676         * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2677         * c.opt (-Wformat-diag): Remove a spurious period.
2679 2019-05-29  Jakub Jelinek  <jakub@redhat.com>
2681         PR c/90628
2682         * c-common.c (check_builtin_function_arguments)
2683         <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2684         as last argument.
2686 2019-05-23  Eric Botcazou  <ebotcazou@adacore.com>
2688         * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2690 2019-05-22  Martin Liska  <mliska@suse.cz>
2692         PR lto/90500
2693         * c-attribs.c (handle_copy_attribute): Do not copy
2694         target_clones attribute.
2696 2019-05-21  Eric Botcazou  <ebotcazou@adacore.com>
2698         * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2699         * c-ada-spec.c (print_assignment_operator): New function.
2700         (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2701         assignment operators declared as methods and filter out the others.
2703 2019-05-17  Thomas Schwinge  <thomas@codesourcery.com>
2705         PR c/89433
2706         * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2707         "omp declare target".
2709 2019-05-16  Martin Sebor  <msebor@redhat.com>
2711         * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2712         keywords, operators, and types in diagnostics.
2713         (handle_scalar_storage_order_attribute): Same.
2714         (handle_mode_attribute): Same.
2715         (handle_visibility_attribute): Same.
2716         (handle_assume_aligned_attribute): Same.
2717         (handle_no_split_stack_attribute): Same.
2718         * c-common.c (shorten_compare): Same.
2719         (c_common_truthvalue_conversion): Same.
2720         (cb_get_source_date_epoch): Same.
2721         * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2722         in diagnostics.
2723         (interpret_float): Same.
2724         * c-omp.c (c_finish_omp_for): Same.
2725         * c-opts.c (c_common_post_options): Same.
2726         * c-pch.c (c_common_pch_pragma): Same.
2727         * c-pragma.c (pop_alignment): Same.
2728         (handle_pragma_pack): Same.
2729         (apply_pragma_weak): Same.
2730         (handle_pragma_weak): Same.
2731         (handle_pragma_scalar_storage_order): Same.
2732         (handle_pragma_redefine_extname): Same.
2733         (add_to_renaming_pragma_list): Same.
2734         (maybe_apply_renaming_pragma): Same.
2735         (push_visibility): Same.
2736         (handle_pragma_visibility): Same.
2737         (handle_pragma_optimize): Same.
2738         (handle_pragma_message): Same.
2739         * c-warn.c (warn_for_omitted_condop): Same.
2740         (lvalue_error): Same.
2742 2019-05-15  Richard Biener  <rguenther@suse.de>
2744         PR c/90474
2745         * c-common.c (c_common_mark_addressable_vec): Also mark
2746         a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2747         c_mark_addressable.
2749 2019-05-06  Nathan Sidwell  <nathan@acm.org>
2751         * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2753 2019-04-30  Nathan Sidwell  <nathan@acm.org>
2755         * c-common.c (c_common_init_ts): Use MARK_TS_EXP.  Mark SIZEOF_EXPR.
2757 2019-04-30  Martin Liska  <mliska@suse.cz>
2759         * c-pragma.c (handle_pragma_diagnostic): Provide hints
2760         for unknown options.
2762 2019-04-26  Richard Sandiford  <richard.sandiford@arm.com>
2764         * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2765         the pointer target rather than the pointer itself.
2767 2019-04-19  Jakub Jelinek  <jakub@redhat.com>
2769         PR c/89888
2770         * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2771         arguments.
2772         (c_do_switch_warnings): Remove outside_range_p argument.
2773         * c-common.c (check_case_bounds): Removed.
2774         (c_add_case_label): Remove orig_type and outside_range_p arguments.
2775         Don't call check_case_bounds.  Fold low_value as well as high_value.
2776         * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2777         Check for case labels outside of range of original type here and
2778         adjust them.
2780 2019-04-12  Jakub Jelinek  <jakub@redhat.com>
2782         PR translation/90041
2783         * c.opt (-fhandle-exceptions): Use %< and %> around option names
2784         in the Warn diagnostics.
2786         PR c/89946
2787         * c-attribs.c (handle_patchable_function_entry_attribute): Add
2788         function comment.  Warn if arguments of the attribute are not positive
2789         integer constants.
2791 2019-04-09  Eric Botcazou  <ebotcazou@adacore.com>
2793         * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2794         (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2796 2019-04-07  Eric Botcazou  <ebotcazou@adacore.com>
2798         * c-ada-spec.c (is_float128): New predicate extracted from...
2799         (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2800         <REAL_TYPE>: ...here.  Call it.
2802 2019-04-05  David Malcolm  <dmalcolm@redhat.com>
2804         PR c/89985
2805         * c-warn.c (check_address_or_pointer_of_packed_member): Add
2806         auto_diagnostic_group.  Guard inform calls by result of
2807         warning_at call.
2809 2019-04-05  Marek Polacek  <polacek@redhat.com>
2811         PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
2812         * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2813         of RHS.
2815 2019-04-03  Jason Merrill  <jason@redhat.com>
2817         PR c++/86586 - -fcompare-debug=-Wsign-compare.
2818         * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2820 2019-04-01  Martin Sebor  <msebor@redhat.com>
2822         PR c/89685
2823         * c-attribs.c (handle_copy_attribute): Handle references and
2824         non-constant expressions.
2826 2019-03-22  Jakub Jelinek  <jakub@redhat.com>
2828         PR c++/87481
2829         * c.opt (-fconstexpr-ops-limit=): New option.
2831 2019-03-21  Jakub Jelinek  <jakub@redhat.com>
2833         * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2834         template param.
2836 2019-03-19  Martin Sebor  <msebor@redhat.com>
2838         PR tree-optimization/89688
2839         * c-common.c (braced_list_to_string): Make static.
2840         (braced_lists_to_strings): Define new function.
2841         * c-common.h (braced_list_to_string): Remove.
2842         (braced_lists_to_strings): Declare.
2844 2019-03-12  Martin Liska  <mliska@suse.cz>
2846         * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2848 2019-03-11  Martin Liska  <mliska@suse.cz>
2850         * c-opts.c (c_common_post_options): Wrap apostrophes
2851         in gcc internal format with %'.
2853 2019-03-11  Martin Liska  <mliska@suse.cz>
2855         * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2856         in a string format message and fix GNU coding style.
2857         * c-common.c (vector_types_convertible_p): Likewise.
2858         (c_build_vec_perm_expr): Likewise.
2859         * c-indentation.c (get_visual_column): Likewise.
2860         * c-opts.c (c_common_handle_option): Likewise.
2861         (c_common_post_options): Likewise.
2862         (sanitize_cpp_opts): Likewise.
2863         * c-pch.c (c_common_pch_pragma): Likewise.
2864         * c-pragma.c (handle_pragma_pack): Likewise.
2866 2019-03-08  Jakub Jelinek  <jakub@redhat.com>
2868         PR tree-optimization/89550
2869         * c-common.c (c_common_truthvalue_conversion): Only set
2870         TREE_NO_WARNING if warning_at returned true.
2871         * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2873 2019-02-25  Sandra Loosemore  <sandra@codesourcery.com>
2874             Martin Sebor  <msebor@gmail.com>
2876         * c.opt (Wmissing-attributes): Clean up doc string.
2878 2019-02-25  Jakub Jelinek  <jakub@redhat.com>
2880         PR c/89495
2881         * c-format.c (maybe_read_dollar_number): Compute nargnum in
2882         HOST_WIDE_INT type to avoid overflows and change overflow_flag
2883         checking.
2885 2019-02-22  Richard Biener  <rguenther@suse.de>
2887         * c-pch.c (no_checksum): Remove.
2888         (pch_init): Remove assertion that executable_checksum is not
2889         all zero.
2890         (c_common_valid_pch): Likewise.
2892 2019-02-18  Martin Sebor  <msebor@redhat.com>
2894         PR middle-end/89294
2895         * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2897 2019-02-16  David Malcolm  <dmalcolm@redhat.com>
2899         PR c++/88680
2900         * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2901         implementing -Wtype-limits.
2903 2019-02-11  Martin Sebor  <msebor@redhat.com>
2905         PR c++/87996
2906         * c-common.c (invalid_array_size_error): New function.
2907         (valid_array_size_p): Call it.  Handle size as well as type.
2908         * c-common.h (valid_constant_size_p): New function.
2909         (enum cst_size_error): New type.
2911 2019-01-31  David Malcolm  <dmalcolm@redhat.com>
2913         PR c/89122
2914         * known-headers.cc (get_stdlib_header_for_name): Add
2915         {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2917 2019-01-31  Jakub Jelinek  <jakub@redhat.com>
2919         PR libstdc++/88170
2920         * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2921         a C cast in pp_c_flag_gnu_v3 mode.
2923 2019-01-29  Jakub Jelinek  <jakub@redhat.com>
2925         PR c/86125
2926         * c-common.c (c_common_nodes_and_builtins): Build type variants for
2927         builtin_structptr_types types even for C.
2929 2019-01-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2931         * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2932         when rhs is of array type correctly.  Fix handling of nested structures.
2933         Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2934         (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2935         type casts within nested compound expressions.
2937 2019-01-22  Jakub Jelinek  <jakub@redhat.com>
2939         PR middle-end/88968
2940         * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2941         variable after using BIT_FIELD_REF.
2943 2019-01-18  H.J. Lu  <hongjiu.lu@intel.com>
2945         PR c/51628
2946         PR c/88664
2947         * c-common.h (warn_for_address_or_pointer_of_packed_member):
2948         Remove the boolean argument.
2949         * c-warn.c (check_address_of_packed_member): Renamed to ...
2950         (check_address_or_pointer_of_packed_member): This.  Also
2951         warn pointer conversion.
2952         (check_and_warn_address_of_packed_member): Renamed to ...
2953         (check_and_warn_address_or_pointer_of_packed_member): This.
2954         Also warn pointer conversion.
2955         (warn_for_address_or_pointer_of_packed_member): Remove the
2956         boolean argument.  Don't check pointer conversion here.
2958 2019-01-15  Richard Sandiford  <richard.sandiford@arm.com>
2960         PR inline-asm/52813
2961         * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2963 2019-01-14  Jakub Jelinek  <jakub@redhat.com>
2965         * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2966         and __cpp_nontype_template_parameter_auto.  Add a comment that
2967         __cpp_template_auto is deprecated.
2969 2019-01-14  Tom Honermann  <tom@honermann.net>
2971         Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2972         * c-common.c (c_common_reswords): Add char8_t.
2973         (fix_string_type): Use char8_t for the type of u8 string literals.
2974         (c_common_get_alias_set): char8_t doesn't alias.
2975         (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2976         C++.
2977         (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2978         (keyword_begins_type_specifier): Add RID_CHAR8.
2979         * c-common.h (rid): Add RID_CHAR8.
2980         (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2981         Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2982         Define char8_type_node and char8_array_type_node.
2983         * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2984         __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2985         (c_cpp_builtins): Predefine __cpp_char8_t.
2986         * c-lex.c (lex_string): Use char8_array_type_node as the type of
2987         CPP_UTF8STRING.
2988         (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2989         * c-opts.c: If not otherwise specified, enable -fchar8_t when
2990         targeting C++2a.
2991         * c.opt: Add the -fchar8_t command line option.
2993 2019-01-14  Martin Sebor  <msebor@redhat.com>
2995         PR target/88638
2996         * c-attribs.c (positional_argument): Call valid_format_string_type_p
2997         and issue errors if it fails.
2998         * c-common.h (valid_format_string_type_p): Declare.
2999         * c-format.c (valid_stringptr_type_p): Rename...
3000         (valid_format_string_type_p): ...to this and make extern.
3001         (handle_format_arg_attribute): Adjust to new name.
3002         (check_format_string): Same.
3004 2019-01-13  H.J. Lu  <hongjiu.lu@intel.com>
3006         * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3007         Replace "may may" with "may" in warning message.
3009 2019-01-07  Jakub Jelinek  <jakub@redhat.com>
3011         PR c++/85052
3012         * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3013         (c_build_vec_convert): Declare.
3014         * c-common.c (c_build_vec_convert): New function.
3016 2019-01-04  Martin Sebor  <msebor@redhat.com>
3018         PR c/88546
3019         * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3020         Handle C++ empty throw specification and C11 _Noreturn.
3021         (has_attribute): Also handle C11 _Noreturn.
3023 2019-01-04  Martin Sebor  <msebor@redhat.com>
3025         PR c/88363
3026         * c-attribs.c (positional_argument): Also accept enumerated types.
3028 2019-01-01  Jakub Jelinek  <jakub@redhat.com>
3030         Update copyright years.
3032 2018-12-20  H.J. Lu  <hongjiu.lu@intel.com>
3034         PR c/51628
3035         * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3036         * c-warn.c (check_alignment_of_packed_member): New function.
3037         (check_address_of_packed_member): Likewise.
3038         (check_and_warn_address_of_packed_member): Likewise.
3039         (warn_for_address_or_pointer_of_packed_member): Likewise.
3040         * c.opt: Add -Wno-address-of-packed-member.
3042 2018-12-20  David Malcolm  <dmalcolm@redhat.com>
3044         PR c++/87504
3045         * c-warn.c (get_outermost_macro_expansion): New function.
3046         (spelled_the_same_p): Use it to unwind the macro expansions, and
3047         compare the outermost macro in each nested expansion, rather than
3048         the innermost.
3050 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
3052         PR c++/87504
3053         * c-common.h (warn_tautological_cmp): Convert 1st param from
3054         location_t to const op_location_t &.
3055         * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3056         when testing for INTEGER_CST.
3057         (warn_tautological_bitwise_comparison): Convert 1st param from
3058         location_t to const op_location_t &; use it to build a
3059         binary_op_rich_location, and use this.
3060         (spelled_the_same_p): New function.
3061         (warn_tautological_cmp): Convert 1st param from location_t to
3062         const op_location_t &.  Warn for macro expansions if
3063         spelled_the_same_p.  Use binary_op_rich_location.
3065 2018-12-19  David Malcolm  <dmalcolm@redhat.com>
3067         PR c++/43064
3068         PR c++/43486
3069         * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3070         (verify_tree): Handle location wrappers.
3071         (c_common_truthvalue_conversion): Strip any location wrapper.
3072         Handle CONST_DECL.
3073         (fold_offsetof): Strip any location wrapper.
3074         (complete_array_type): Likewise for initial_value.
3075         (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3076         index before checking for INTEGER_CST.
3077         * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3078         print parentheses around location wrappers.
3079         * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3080         before checking for INTEGER_CST.
3081         (warn_tautological_bitwise_comparison): Call
3082         tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3083         before checking for INTEGER_CST.
3084         (readonly_error): Strip any location wrapper.
3085         (warn_array_subscript_with_type_char): Strip location wrappers
3086         before checking for INTEGER_CST.  Use the location of the index if
3087         available.
3089 2018-12-06  Jason Merrill  <jason@redhat.com>
3091         PR c++/88136 - -Wdeprecated-copy false positives
3092         * c.opt (Wdeprecated-copy-dtor): New.
3093         (Wdeprecated-copy): Move to -Wextra.
3095 2018-11-29  Martin Sebor  <msebor@redhat.com>
3097         PR c/88172
3098         PR testsuite/88208
3099         * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3100         alignments to values less than the target requires.
3101         (has_attribute): For attribute aligned consider both the attribute
3102         and the alignment bits.
3103         * c-common.c (c_init_attributes): Optionally issue a warning for
3104         zero alignment.
3106 2018-11-28  Martin Sebor  <msebor@redhat.com>
3108         PR c/88065
3109         PR c/87297
3110         * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3111         or destination is an error.
3113 2018-11-28  Jakub Jelinek  <jakub@redhat.com>
3115         PR c++/88215
3116         * c-ubsan.c: Include langhooks.h.
3117         (ubsan_instrument_division): Change gcc_assert that main variants
3118         of op0 and op1 types are equal to gcc_checking_assert that the
3119         main variants are compatible types.
3121 2018-11-27  Eric Botcazou  <ebotcazou@adacore.com>
3123         * c-ada-spec.c: Include stringpool.h.
3124         (has_static_fields): Return false for incomplete types.
3125         (is_tagged_type): Likewise.
3126         (has_nontrivial_methods): Likewise.
3127         (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3128         (struct overloaded_name_hash): New structure.
3129         (struct overloaded_name_hasher): Likewise.
3130         (overloaded_names): New global variable.
3131         (init_overloaded_names): New static function.
3132         (overloaded_name_p): New predicate.
3133         (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3134         on the TYPE_STUB_DECL of the original type of a typedef, if any.
3135         <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3136         Remove always-true condition and dump forward types.
3137         (dump_ada_specs): Delete overloaded_names.
3139 2018-11-20  Martin Sebor  <msebor@redhat.com>
3141         * c-attribs.c (type_for_vector_size): New function.
3142         (type_valid_for_vector_size): Same.
3143         (handle_vector_size_attribute): Move code to the functions above
3144         and call them.
3145         (validate_attribute, has_attribute): New functions.
3146         * c-common.h (has_attribute): Declare.
3147         (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3148         * c-common.c (c_common_resword): Same.
3150 2018-11-16  Jason Merrill  <jason@redhat.com>
3152         * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3153         * c-attribs.c (attr_cold_hot_exclusions): Make public.
3155 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
3157         PR middle-end/87854
3158         * c-common.c (fix_string_type): Reject string literals larger than
3159         TYPE_MAX_VALUE (ssizetype) bytes.
3161 2018-11-15  Martin Sebor  <msebor@redhat.com>
3163         PR c++/87541
3164         PR c++/87542
3165         * c-attribs.c (positional_argument): New function.
3166         (handle_alloc_size_attribute): Use it and simplify.
3167         (handle_alloc_align_attribute): Same.
3168         (handle_assume_aligned_attribute): Same.
3169         (handle_nonnull_attribute): Same.
3170         * c-common.c (check_function_arguments): Pass fntype to
3171         check_function_format.
3172         * c-common.h (check_function_format): Add an argument.
3173         (PosArgFlags, positional_argument): Declare new type and function.
3174         * c-format.c (decode_format_attr): Add arguments.
3175         (check_format_string, get_constant): Same.
3176         (convert_format_name_to_system_name): Adjust.
3178 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
3180         PR other/19165
3181         * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3183 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
3185         P1236R1 - Signed integers are two's complement
3186         * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3187         * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3188         with in-range second operand well defined for -std=c++2a.
3190         PR other/88007
3191         * c-common.c (parse_optimize_options): Allocate option string from
3192         opts_obstack rather than as GC memory.  Move the allocation after
3193         warning for invalid option.
3195 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
3197         * c-common.c (c_get_substring_location): Update for renaming of
3198         get_source_location_for_substring to get_location_within_string.
3199         * c-lex.c: Replace "source_location" with "location_t".
3200         * c-opts.c: Likewise.
3201         * c-ppoutput.c: Likewise.
3203 2018-11-13  Martin Sebor  <msebor@redhat.com>
3205         PR middle-end/81824
3206         * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3207         (handle_tls_model_attribute): Improve diagnostics.
3209 2018-11-12  Jason Merrill  <jason@redhat.com>
3211         * c-cppbuiltin.c (c_cpp_builtins): Define
3212         __cpp_impl_destroying_delete.
3214         * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3215         __cpp_conditional_explicit.
3217 2018-11-09  Martin Sebor  <msebor@redhat.com>
3219         PR middle-end/81824
3220         * c-attribs.c (handle_copy_attribute): New function.
3222 2018-11-09  Martin Sebor  <msebor@redhat.com>
3224         PR c/87795
3225         * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3227 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
3229         * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3230         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3231         enum omp_memory_order MEMORY_ORDER.
3232         (c_finish_omp_flush): Add MO argument.
3233         (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3234         (c_finish_omp_for): Add FINAL_P argument.
3235         * c-omp.c: Include memmodel.h.
3236         (c_finish_omp_taskgroup): Add CLAUSES argument.  Set
3237         OMP_TASKGROUP_CLAUSES to it.
3238         (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3239         enum omp_memory_order MEMORY_ORDER.  Set OMP_ATOMIC_MEMORY_ORDER
3240         instead of OMP_ATOMIC_SEQ_CST.
3241         (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3242         (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3243         __atomic_thread_fence call with the given value.
3244         (check_omp_for_incr_expr): Formatting fixes.
3245         (c_finish_omp_for): Add FINAL_P argument.  Allow NE_EXPR
3246         even in OpenMP loops, diagnose if NE_EXPR and incr expression
3247         is not constant expression 1 or -1.  Transform NE_EXPR loops
3248         with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3249         (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3250         loops too.
3251         (c_omp_split_clauses): Add support for combined
3252         #pragma omp parallel master and
3253         #pragma omp {,parallel }master taskloop{, simd} constructs.
3254         Handle OMP_CLAUSE_IN_REDUCTION.  Handle OMP_CLAUSE_REDUCTION_TASK.
3255         Handle OMP_CLAUSE_NONTEMPORAL.  Handle splitting OMP_CLAUSE_IF
3256         also to OMP_SIMD.  Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3257         (c_omp_predetermined_sharing): Don't return
3258         OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3259         * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3260         PRAGMA_OMP_REQUIRES.
3261         * c-pragma.h (enum pragma_kind): Likewise.
3262         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3263         and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3265 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3267         * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3269 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
3271         * c-format.c (local_cgraph_node_ptr_node): New variable.
3272         (gcc_dump_printf_char_table): Add entry for %C.
3273         (get_pointer_to_named_type): New function, taken from the handling
3274         code for "gimple *" from...
3275         (init_dynamic_diag_info): ...here.  Add handling for
3276         "cgraph_node *".
3277         * c-format.h (T_CGRAPH_NODE): New.
3279 2018-10-19  Jason Merrill  <jason@redhat.com>
3281         * c-cppbuiltin.c (c_cpp_builtins): Add
3282         __cpp_nontype_template_parameter_class.
3284 2018-10-31  Nathan Sidwell  <nathan@acm.org>
3286         * c-opts.c (c_finish_options): Force command line macro
3287         location.  Refactor to avoid repeating main debug hook.
3288         (push_command_line_include): Clarify comment.
3290         * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3292 2018-10-30  Martin Sebor  <msebor@redhat.com>
3294         PR middle-end/87041
3295         * c-format.c (check_format_types): Avoid diagnosing null pointer
3296         arguments to printf-family of functions.
3298 2018-10-30  Marek Polacek  <polacek@redhat.com>
3300         Implement P0892R2, explicit(bool).
3301         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3303 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3305         * name-hint.h (name_hint::take_deferred): New member function.
3307 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3309         PR c++/56856
3310         * c-common.c (check_function_sentinel): Call fold_for_warn on the
3311         argument.
3312         (check_function_restrict): Rename param "argarray" to
3313         "unfolded_argarray", and make a copy named "argarray", calling
3314         fold_for_warn on each argument.
3315         (check_function_arguments): Add note about responsibility for
3316         folding the arguments.
3318 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3320         * c-common.c (flag_isoc2x): New variable.
3321         * c-common.h (clk_c): Update comment to reference C2X.
3322         (flag_isoc99, flag_isoc11): Update comments to reference future
3323         standard versions in general.
3324         (flag_isoc2x): Declare.
3325         * c-opts.c (set_std_c2x): New function.
3326         (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
3327         (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
3328         flag_isoc2x to 0.
3329         * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
3331 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3333         * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
3334         (std=iso9899:2018): Document C17 as published in 2018.
3336 2018-10-12  Christophe Lyon  <christophe.lyon@linaro.org>
3338         PR c++/87364
3339         * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
3341 2018-10-11  Will Wray  <wjwray@gmail.com>
3343         PR c++/87364
3344         * c-pretty-print.h (pp_c_type_cast): Prototype.
3345         (pp_c_integer_constant): Likewise.
3346         * c-pretty-print.c (pp_c_type_cast): No longer static.
3347         (pp_c_integer_constant): Likewise.
3348         (pp_c_enumeration_constant): Fix loop termination when finding
3349         name of constant.  No longer returns a value.  Call
3350         pp_c_integer_constant.
3351         (c_pretty_printer::constant): Update for changes to
3352         pp_c_enumeration_constant.
3354 2018-10-11  Jakub Jelinek  <jakub@redhat.com>
3356         * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3357         for no_unique_address.
3359 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
3361         * c-common.c (c_option_controlling_cpp_error): Rename to...
3362         (c_option_controlling_cpp_diagnostic): ...this, and convert
3363         "reason" from int to enum.
3364         (c_cpp_error): Rename to...
3365         (c_cpp_diagnostic): ...this, converting level and reason to enums.
3366         * c-common.h (c_cpp_error): Rename to...
3367         (c_cpp_diagnostic): ...this, converting level and reason to enums.
3368         * c-opts.c (c_common_init_options): Update for renaming.
3370 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
3372         PR c/87286
3373         * c-common.c (vector_types_compatible_elements_p): Use
3374         INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3376 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
3378         * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3379         to generate constructor destructor priority warning.
3380         * c.opt (-Wprio-ctor-dtor): New option.
3382 2018-10-01  Jason Merrill  <jason@redhat.com>
3384         * c-lex.c (c_common_has_attribute): Add no_unique_address.
3386 2018-10-01  Eric Botcazou  <ebotcazou@adacore.com>
3388         * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3389         (dump_ada_node): Add const keyword.
3391 2018-09-25  Martin Liska  <mliska@suse.cz>
3393         * c-common.c (c_common_truthvalue_conversion):
3394         Remove Pascal from documentation.
3396 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
3398         * c-ada-spec.c: Include diagnostic.h.
3399         (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3401 2018-09-19  Marek Polacek  <polacek@redhat.com>
3403         * c.opt (Wclass-conversion): New.
3405 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3407         * c-format.c (range_label_for_format_type_mismatch::get_text):
3408         Update for new param.
3410 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
3412         * c-format.c (format_warning_at_char): Update for introduction of
3413         format_string_diagnostic_t.
3414         (format_type_warning): Likewise.
3416 2018-09-17  Martin Jambor  <mjambor@suse.cz>
3418         PR c/63886
3419         * c.opt (Wabsolute-value): New.
3421 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3423         * c-common.c (complete_flexible_array_elts): New helper function.
3424         * c-common.h (complete_flexible_array_elts): Declare.
3426 2018-09-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3428         * c-common.c (braced_list_to_string): Remove eval parameter.
3429         Add some more checks.  Always create zero-terminated STRING_CST.
3430         * c-common.h (braced_list_to_string): Adjust prototype.
3432 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
3434         PR 87091
3435         * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3436         to a tri-state.
3437         (maybe_suggest_missing_token_insertion): Likewise.
3438         (maybe_add_include_fixit): Add param "override_location".  If set,
3439         and source-printing is enabled, then override the rich_location's
3440         primary location with that of the insertion point for the fix-it
3441         hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3442         * c-common.h (extern void maybe_add_include_fixit): Add bool
3443         param.
3444         * c-format.c (selftest::test_type_mismatch_range_labels): Update
3445         for conversion of show_caret_p to a tri-state.
3446         * c-warn.c (warn_for_restrict): Likewise.
3447         * known-headers.cc
3448         (suggest_missing_header::~suggest_missing_header): Update call to
3449         maybe_add_include_fixit to suggest overriding the location, as it
3450         is for a note.
3452 2018-08-27  Martin Liska  <mliska@suse.cz>
3454         * c-common.c (check_function_restrict): Use new function
3455         fndecl_built_in_p and remove check for FUNCTION_DECL if
3456         possible.
3457         (check_builtin_function_arguments): Likewise.
3458         (reject_gcc_builtin): Likewise.
3459         * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3461 2018-08-26  Marek Polacek  <polacek@redhat.com>
3463         PR c++/87029, Implement -Wredundant-move.
3464         * c.opt (Wredundant-move): New option.
3466 2018-08-21  Marek Polacek  <polacek@redhat.com>
3468         PR c++/86981, Implement -Wpessimizing-move.
3469         * c.opt (Wpessimizing-move): New option.
3471 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
3473         PR other/84889
3474         * c-attribs.c (common_handle_aligned_attribute): Add
3475         auto_diagnostic_group instance.
3476         * c-indentation.c (warn_for_misleading_indentation): Likewise.
3477         * c-opts.c (c_common_post_options): Likewise.
3478         * c-warn.c (warn_logical_not_parentheses): Likewise.
3479         (warn_duplicated_cond_add_or_warn): Likewise.
3480         (warn_for_multistatement_macros): Likewise.
3482 2018-08-20  Nathan Sidwell  <nathan@acm.org>
3484         * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3485         access.
3487 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3489         * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3490         field.
3491         (laxy_hex_fp_value_count): Make unsigned.
3492         (lazy_hex_fp_value): Provided with macro & lazy number.  Directly
3493         manipulate the macro.
3494         (builtin_defin_with_hex_fp_value): Adjust callback name, use
3495         cpp_define_lazily.
3497 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
3499         * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3500         (gcc_dump_printf_length_specs): New.
3501         (gcc_dump_printf_flag_pairs): New.
3502         (gcc_dump_printf_flag_specs): New.
3503         (gcc_dump_printf_char_table): New.
3504         (format_types_orig): Add entry for "gcc_dump_printf".
3505         (init_dynamic_diag_info): Set up length_char_specs and
3506         conversion_specs for gcc_dump_printf_format_type.
3507         (handle_format_attribute): Handle gcc_dump_printf_format_type.
3509 2018-08-17  Nathan Sidwell  <nathan@acm.org>
3511         * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3513         * c-ada-spec.c: Don't #include "cpp-id-data.h"
3514         * c-cppbuiltin.c: Likewise.
3516 2018-08-17  Martin Liska  <mliska@suse.cz>
3518         * c.opt: Remove Warn, Init and Report for options with
3519         Ignore/Deprecated flag. Warning is done automatically for
3520         Deprecated flags.
3522 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
3524         PR c++/70693
3525         * c-common.c (selftest::c_family_tests): Call
3526         selftest::c_indentation_c_tests.
3527         * c-common.h (selftest::c_indentation_c_tests): New decl.
3528         * c-indentation.c: Include "selftest.h".
3529         (next_tab_stop): Add "tab_width" param, rather than accessing
3530         cpp_opts.
3531         (get_visual_column): Likewise.  Clarify comment.  Bulletproof
3532         against reading past the end of the line.
3533         (get_first_nws_vis_column): Add "tab_width" param.
3534         (detect_intervening_unindent): Likewise.
3535         (should_warn_for_misleading_indentation): Read tab width from
3536         cpp_opts and pass around.
3537         (selftest::test_next_tab_stop): New test.
3538         (selftest::assert_get_visual_column_succeeds): New function.
3539         (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3540         (selftest::assert_get_visual_column_fails): New function.
3541         (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3542         (selftest::test_get_visual_column): New test.
3543         (selftest::c_indentation_c_tests): New function.
3545 2018-08-16  Nathan Sidwell  <nathan@acm.org>
3547         * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3548         (store_ada_macro): Likewise.
3549         * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3550         * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3552 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
3554         * c-format.c: Include "selftest-diagnostic.h" and
3555         "gcc-rich-location.h".
3556         (format_warning_at_char): Pass NULL for new label params of
3557         format_warning_va.
3558         (class indirection_suffix): New class.
3559         (class range_label_for_format_type_mismatch): New class.
3560         (format_type_warning): Move logic for generating "*" suffix to
3561         class indirection_suffix.  Create "fmt_label" and "param_label"
3562         to show their types, and pass them to the
3563         format_warning_at_substring calls.
3564         (selftest::test_type_mismatch_range_labels): New test.
3565         (selftest::c_format_c_tests): Call it.
3567 2018-08-13  Martin Sebor  <msebor@redhat.com>
3569         PR tree-optimization/71625
3570         * c-common.c (braced_list_to_string): New function.
3571         * c-common.h (braced_list_to_string): Declare it.
3573 2018-08-08  Nathan Sidwell  <nathan@acm.org>
3575         * c-common.c (try_to_locate_new_include_inertion_point): Use
3576         linemap_included_from_linemap.
3577         * c-lex.c (fe_file_change): Use linemap_included_from.
3578         * c-ppoutput.c (pp_file_change): Likewise.
3580 2018-08-01  Martin Sebor  <msebor@redhat.com>
3582         PR tree-optimization/86650
3583         * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3584         (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3585         (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3586         * c-format.h (T89_G): Update to be "gimple *" rather than
3587         "gcall *".
3588         (local_gcall_ptr_node): Rename...
3589         (local_gimple_ptr_node): ...to this.
3591 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
3593         * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3594         table entries for gcc_diag_char_table, and the 'Z' entry from
3595         gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3596         &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3597         (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3598         adding missing "Z" for this table.  Remove erroneous "G" and "K"
3599         entries.
3600         (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
3601         (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3602         (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE.  Remove "v".
3604 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
3606         * c-common.c (speculation_safe_resolve_call): New function.
3607         (speculation_safe_resolve_params): New function.
3608         (speculation_safe_resolve_return): New function.
3609         (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3610         * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3611         __HAVE_SPECULATION_SAFE_VALUE.
3613 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
3615         * c-common.c (c_cpp_error): Remove redundant "line_table"
3616         parameter from call to rich_location::set_range.
3617         (maybe_suggest_missing_token_insertion): Likewise.
3619 2018-07-20  Martin Sebor  <msebor@redhat.com>
3621         PR middle-end/82063
3622         * c.opt (-Warray-bounds): Remove redundant -Wall.
3624 2018-07-20  Martin Sebor  <msebor@redhat.com>
3626         PR middle-end/82063
3627         * c-common.h (c_common_handle_option): Change function argument
3628         to HOST_WIDE_INT.
3629         * c-opts.c (c_common_init_options): Same.
3630         (c_common_handle_option): Same.  Remove special handling of
3631         OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3632         * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3633         options to take a HOST_WIDE_INT argument and accept a byte-size
3634         suffix.  Initialize.
3635         (-Wvla-larger-than): Same.
3636         (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3637         (-Wno-vla-larger-than): Same.
3639 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
3641         * c-attribs.c (c_common_attribute_table): Add
3642         "omp declare target implicit" attribute.
3644 2018-07-12  Richard Biener  <rguenther@suse.de>
3646         PR c/86453
3647         * c-attribs.c (handle_packed_attribute): Do not build a variant
3648         type with TYPE_PACKED, instead ignore the attribute if we may
3649         not apply to the original type.
3651 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
3653         PR c++/86443
3654         * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3655         to contain TREE_LIST for both the original class iterator and the
3656         "last" helper var.
3658 2018-07-07  Eric Botcazou  <ebotcazou@adacore.com>
3660         * c-ada-spec.c (to_ada_name): Remove index parameter.
3661         (pp_ada_tree_identifier): Likewise.
3662         (dump_ada_macros): Adjust call to to_ada_name.
3663         (struct overloaded_name_hash): Delete.
3664         (struct overloaded_name_hasher): Likewise.
3665         (overloaded_names): Likewise.
3666         (compute_overloading_index): Likewise.
3667         (dump_ada_decl_name): Do not call compute_overloading_index and
3668         adjust calls to pp_ada_tree_identifier.
3669         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3670         (dump_ada_import): Add spc parameter and switch to aspect syntax.
3671         (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3672         (dump_ada_enum_type): Remove type and display_convention parameters.
3673         Adjust calls to pp_ada_tree_identifier.
3674         (dump_ada_node): Likewise and for dump_ada_structure.
3675         (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3676         and tidy up.
3677         <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3678         syntax.
3679         (print_constructor): Adjust call to pp_ada_tree_identifier.
3680         (print_destructor): Likewise.
3681         (dump_ada_declaration): Switch to aspect syntax.
3682         (dump_ada_structure): Likewise and tidy up.  Replace display_convention
3683         parameter with nested parameter.
3684         (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3685         (dump_ada_specs): Do not delete overloaded_names table.
3687 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
3689         PR target/86324
3690         * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3691         target hook.
3693 2018-07-05  Nathan Sidwell  <nathan@acm.org>
3695         * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3696         NO_IMPLICIT_EXTERN_C.
3698 2018-06-28  Martin Liska  <mliska@suse.cz>
3700         * cppspec.c: Include opt-suggestions.h.
3702 2018-06-20  Chung-Lin Tang  <cltang@codesourcery.com>
3703             Thomas Schwinge  <thomas@codesourcery.com>
3704             Cesar Philippidis  <cesar@codesourcery.com>
3706         * c-pragma.h (enum pragma_omp_clause): Add
3707         PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3708         PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3710 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
3712         PR c++/86210
3713         * c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
3714         comment.
3716 2018-06-18  Martin Sebor  <msebor@redhat.com>
3718         PR middle-end/85602
3719         * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3720         nonstring.
3722 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
3724         * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3726 2018-06-13  Jason Merrill  <jason@redhat.com>
3728         * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3729         (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3730         handling.
3732         PR c++/86094 - wrong code with defaulted move ctor.
3733         * c-opts.c (c_common_post_options): Bump the current ABI version to
3734         13.  Set warn_abi_version and flag_abi_compat_version to the current
3735         version rather than 0.  Fix defaulting flag_abi_compat_version from
3736         warn_abi_version.
3738 2018-06-12  Martin Sebor  <msebor@redhat.com>
3740         PR c/85931
3741         * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3742         sizeof source and destination yields the same value.
3744 2018-06-12  Martin Liska  <mliska@suse.cz>
3746         * c.opt: Make MPX-related options as Deprecated.
3748 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
3750         * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3751         rather than 0.
3753 2018-06-08  Martin Liska  <mliska@suse.cz>
3755         * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3756         for MPX (macros, related functions, fields in cgraph_node, ...).
3757         (handle_bnd_legacy): Likewise.
3758         (handle_bnd_instrument): Likewise.
3759         * c.opt: Likewise.
3761 2018-06-06  Jakub Jelinek  <jakub@redhat.com>
3763         PR c++/86068
3764         * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3765         __cpp_transactional_memory to 201500 instead of 210500.
3767 2018-06-06  Jason Merrill  <jason@redhat.com>
3769         PR c++/85710 - ICE with -Wmemset-elt-size.
3770         * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3772 2018-06-01  Jason Merrill  <jason@redhat.com>
3774         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3775         201703.
3777 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3779         * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3780         declaration for a typedef independently of whether the declaration of
3781         the subtype is generated.
3783 2018-05-31  Martin Sebor  <msebor@redhat.com>
3785         PR c/82063
3786         * c.opt (-Wno-alloc-size-larger-than): New option.
3788 2018-04-22  David Pagan  <dave.pagan@oracle.com>
3790         PR c/55976
3791         * c-opts.c (c_common_post_options): Set default for warn_return_type
3792         for C++/C++ with ObjC extensions only. For C, makes it possible to
3793         differentiate between default (no option), -Wreturn-type, and
3794         -Wno-return-type.
3796 2018-05-29  Jason Merrill  <jason@redhat.com>
3798         * c.opt (Winit-list-lifetime): New flag.
3800 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3802         * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3803         splay_tree_delete_pointers.
3805 2018-05-26  Jakub Jelinek  <jakub@redhat.com>
3807         PR bootstrap/85921
3808         * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3809         noinline variable to workaround broken kernel headers.
3811 2018-05-18  Jason Merrill  <jason@redhat.com>
3813         * c.opt (Wdeprecated-copy): New flag.
3815 2018-05-17  Martin Liska  <mliska@suse.cz>
3817         * c-warn.c (overflow_warning): Do not use
3818         space in between 'G_' and '('.
3820 2018-05-09  Jason Merrill  <jason@redhat.com>
3822         * c-common.c (valid_array_size_p): Add complain parameter.
3823         * c-common.h: ...which defaults to true.
3825 2018-05-11  Jakub Jelinek  <jakub@redhat.com>
3827         PR c/85696
3828         * c-omp.c (c_omp_predetermined_sharing): Return
3829         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3831 2018-05-11  Martin Liska  <mliska@suse.cz>
3833         PR sanitizer/85556
3834         * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3835         TREE_LIST values.
3837 2018-05-10  Jakub Jelinek  <jakub@redhat.com>
3839         PR c++/85662
3840         * c-common.h (fold_offsetof_1): Removed.
3841         (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3842         CTX argument defaulted to ERROR_MARK.
3843         * c-common.c (fold_offsetof_1): Renamed to ...
3844         (fold_offsetof): ... this.  Remove wrapper function.  Add TYPE
3845         argument, convert the pointer constant to TYPE and use size_binop
3846         with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3847         a pointer type.  Adjust recursive calls.
3849 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
3851         PR c++/85400
3852         * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3854 2018-05-07  Nathan Sidwell  <nathan@acm.org>
3856         * c.opt (ffor-scope): Remove functionality, issue warning.
3858 2018-05-03  Nathan Sidwell  <nathan@acm.org>
3860         * c.opt (ffriend-injection): Remove functionality, issue warning.
3862 2018-05-01  David Malcolm  <dmalcolm@redhat.com>
3864         PR c/84258
3865         * c-format.c (struct format_check_results): Add field
3866         "number_non_char".
3867         (check_format_info): Initialize it, and warn if encountered.
3868         (check_format_arg): Distinguish between wide char and
3869         everything else when detecting arrays of non-char.
3871 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
3873         * c-format.c (get_corrected_substring): Update for
3874         location_get_source_line returning a char_span.  Use a char_span
3875         when handling the prefix of the correction.
3876         * c-indentation.c (get_visual_column): Update for
3877         location_get_source_line returning a char_span.
3878         (get_first_nws_vis_column): Likewise.
3880 2018-03-29  David Malcolm  <dmalcolm@redhat.com>
3882         PR c++/84269
3883         * known-headers.cc (get_stdlib_header_for_name): Add various names
3884         from <assert.h>, <string.h>, and <memory.h>; add more names from
3885         <stdio.h>.
3887 2018-03-27  Jakub Jelinek  <jakub@redhat.com>
3889         PR c++/85061
3890         * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3891         get_base_address of the second operand is a VAR_P, rather than the
3892         operand itself, and use gcc_checking_assert instead of gcc_assert.
3894 2018-03-23  Marek Polacek  <polacek@redhat.com>
3896         PR c++/85045
3897         * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3898         <case RDIV_EXPR>: Tweak condition.
3900 2018-03-20  Eric Botcazou  <ebotcazou@adacore.com>
3902         * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3904 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
3906         PR c/84909
3907         * c-warn.c (conversion_warning): Replace "to to" with "to" in
3908         diagnostics.
3910         PR c/84910
3911         * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3912         diagnostics.
3914 2018-03-16  Richard Biener  <rguenther@suse.de>
3916         PR c/84873
3917         * c-gimplify.c (c_gimplify_expr): Revert previous change.  Instead
3918         unshare the possibly folded expression.
3920 2018-03-15  Richard Biener  <rguenther@suse.de>
3922         PR c/84873
3923         * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3925 2018-03-13  Martin Sebor  <msebor@redhat.com>
3927         PR tree-optimization/84725
3928         * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3929         with all three narrow character types, including their qualified forms.
3931 2018-03-12  Martin Sebor  <msebor@redhat.com>
3933         PR tree-optimization/83456
3934         * c-common.c (check_function_restrict): Return bool.
3935         Restore checking of bounded built-in functions.
3936         (check_function_arguments): Also return the result
3937         of warn_for_restrict.
3938         * c-common.c (check_function_restrict): Return bool.
3939         * c-warn.c (warn_for_restrict): Return bool.
3941 2018-03-02  Marek Polacek  <polacek@redhat.com>
3943         PR c++/84171
3944         * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3945         is erroneous.
3947 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
3949         * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3950         function".
3952 2018-03-01  Marek Polacek  <polacek@redhat.com>
3954         PR c++/84639
3955         * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3956         alignment in computation.
3958 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3960         * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3961         <REAL_TYPE>: Deal specifically with _Float128/__float128.
3963 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3965         * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3966         (is_char_array): Take a type instead of a declaration.
3967         (dump_ada_array_type): Likewise.
3968         (is_simple_enum): Minor tweak.
3969         (dump_ada_enum_type): New function extracted from...
3970         (dump_ada_node) <ENUMERAL_TYPE>: ...here.  Invoke it.
3971         <INTEGER_TYPE>: Remove unreachable code.
3972         <RECORD_TYPE>: Likewise.  Minor tweaks.
3973         (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3974         <ENUMERAL_TYPE>: New case.
3975         <RECORD_TYPE>: Factor out common code.
3976         (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3977         Minor tweaks.  Deal with enumeral types.
3978         (dump_ada_structure): Minor tweaks.
3980 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3982         * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3983         address for incomplete structures.
3984         (dump_forward_type): Do not bail out for incomplete structures.
3985         (dump_ada_declaration): Do not special-case incomplete structures
3986         for subtypes.  Dump them as null records for types.
3988 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
3990         * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3991         (is_char_array): Fix formatting.
3992         (dump_template_types): Likewise.
3993         (dump_generic_ada_node): Rename into...
3994         (dump_ada_node): ...this.
3995         <POINTER_TYPE>: Remove superfluous space.  Use generic address for
3996         incomplete structures and not for empty structures.  Do not use it
3997         when forward declarations are needed.
3998         (dump_forward_type): New function.
3999         (dump_nested_types): Remove FORWARD parameter.  Do not consider
4000         TREE_VISITED and do not generate a forward declaration.  Only dump
4001         original nested types for nested declaration.
4002         (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4003         <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4004         <RECORD_TYPE>: Do not consider TREE_VISITED.
4005         (dump_ada_declaration): Use booleans and fix formatting throughout.
4006         <TYPE_DECL>: Skip incomplete structures and not empty structures.
4007         Call dump_forward_type instead of dump_nested_types for a typedef.
4008         Remove superfluous check and adjust call to dump_nested_types.
4009         <POINTER_TYPE>: Call dump_forward_type and fall through.
4010         (dump_ada_struct_decl): Rename into...
4011         (dump_ada_structure): ...this.  Do not special-case empty structures.
4013 2018-02-27  Martin Sebor  <msebor@redhat.com>
4015         PR c++/83871
4016         * c.opt (-Wmissing-attributes): New option.
4018 2018-02-21  Martin Liska  <mliska@suse.cz>
4020         * c.opt (Wcatch-value=): Add IntegerRange.
4022 2018-02-15  Jason Merrill  <jason@redhat.com>
4024         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4026 2018-02-09  Nathan Sidwell  <nathan@acm.org>
4028         PR c/84293
4029         * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4030         arg.
4031         * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4032         arg.  Adjust.
4034 2018-02-09  Martin Sebor  <msebor@redhat.com>
4036         PR lto/84212
4037         * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4038         (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4039         (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4040         (-Wstrict-overflow, -Wsuggest-attribute): Same.
4041         (-Wuninitialized): Same.
4043 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
4045         * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4046         keyword for components.
4048 2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>
4050         * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4052 2018-02-02  Julia Koval  <julia.koval@intel.com>
4054         * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4056 2018-01-29  Marek Polacek  <polacek@redhat.com>
4058         PR c/83966
4059         * c-format.c (check_function_format): Check current_function_decl.
4061 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
4063         * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4064         argument.
4065         (LAZY_HEX_FP_VALUES_CNT): Define.
4066         (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4067         values rather than just 12.
4068         (builtin_define_with_hex_fp_value): Likewise.
4070 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
4072         PR other/70268
4073         * c.opt (-fmacro-prefix-map): New option.
4074         * c-opts.c (c_common_handle_option): Handle it.
4075         * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4076         * c-ppoutput.c (init_pp_output): Likewise.
4078 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
4080         PR c++/83814
4081         * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4083 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
4085         * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4086         Skip 'f' and 'F' characters if it is true.
4087         (store_ada_macro): Minor tweak.
4088         (dump_ada_macros) <CPP_COMMENT>: Likewise.
4089         <CPP_WSTRING>: Likewise.
4090         <CPP_STRING>: Output '&' in the buffer if not the first string.
4091         <CPP_NUMBER>: Adjust calls to dump_number.
4093 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
4095         PR c++/43486
4096         * c-common.c: Include "selftest.h".
4097         (get_atomic_generic_size): Perform the test for integral type
4098         before the range test for any integer constant, fixing indentation
4099         of braces.  Call fold_for_warn before testing for an INTEGER_CST.
4100         (reject_gcc_builtin): Strip any location wrapper from EXPR.
4101         (selftest::test_fold_for_warn): New function.
4102         (selftest::c_common_c_tests): New function.
4103         (selftest::c_family_tests): Call it, and
4104         selftest::c_pretty_print_c_tests.
4105         * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4106         * c-format.c (check_format_arg): Convert VAR_P check to a
4107         fold_for_warn.
4108         * c-pretty-print.c: Include "selftest.h".
4109         (pp_c_cast_expression): Don't print casts for location wrappers.
4110         (selftest::assert_c_pretty_printer_output): New function.
4111         (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4112         (selftest::test_location_wrappers): New function.
4113         (selftest::c_pretty_print_c_tests): New function.
4114         * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4116 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
4117             Alan Hayward  <alan.hayward@arm.com>
4118             David Sherwood  <david.sherwood@arm.com>
4120         * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4122 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
4123             Alan Hayward  <alan.hayward@arm.com>
4124             David Sherwood  <david.sherwood@arm.com>
4126         * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4127         as polynomial.
4129 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
4130             Alan Hayward  <alan.hayward@arm.com>
4131             David Sherwood  <david.sherwood@arm.com>
4133         * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4134         (convert_vector_to_array_for_subscript): Handle polynomial
4135         TYPE_VECTOR_SUBPARTS.
4136         (c_common_type_for_mode): Check valid_vector_subparts_p.
4137         * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4138         VECTOR_CST_NELTS.
4140 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
4142         Update copyright years.
4144 2017-12-22  Mike Stump  <mikestump@comcast.net>
4145             Eric Botcazou  <ebotcazou@adacore.com>
4147         * c-pragma.c (init_pragma): Register pragma GCC unroll.
4148         * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4150 2017-12-22  Alexandre Oliva  <aoliva@redhat.com>
4152         PR debug/83527
4153         PR debug/83419
4154         * c-semantics.c (only_debug_stmts_after_p): New.
4155         (pop_stmt_list): Clear side effects in debug-only stmt list.
4156         Check for single nondebug stmt followed by debug stmts only.
4158 2017-12-21  Alexandre Oliva  <aoliva@redhat.com>
4160         PR debug/83419
4161         * c-semantics.c (pop_stmt_list): Propagate side effects from
4162         single nondebug stmt to container list.
4164 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
4166         * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4167         conditions with typical order conditions.
4169 2017-12-18  Marek Polacek  <polacek@redhat.com>
4171         * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4172         not in effect.
4174 2017-12-17  Martin Sebor  <msebor@redhat.com>
4176         * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4177         an error for attribute warn_if_not_aligned.
4179 2017-12-16  Martin Sebor  <msebor@redhat.com>
4181         PR tree-optimization/78918
4182         * c-common.c (check_function_restrict): Avoid checking built-ins.
4183         * c.opt (-Wrestrict): Include in -Wall.
4185 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
4187         * c-attribs.c (c_common_attribute_table,
4188         c_common_format_attribute_table): Swap affects_type_identity
4189         and handler fields, adjust comments.
4191 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4193         * c.opt (Wcast-function-type): New warning option.
4194         * c-lex.c (get_fileinfo): Avoid warning.
4195         * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4197 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
4199         PR middle_end/79538
4200         * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4201         Adjust the size of buf1 and buf2, add a new buf to avoid
4202         format-overflow warning.
4204 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
4206         * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4207         subsequent statement list.
4209 2017-12-07  Martin Sebor  <msebor@redhat.com>
4211         PR c/81544
4212         PR c/81566
4213         * c-attribs.c (attr_aligned_exclusions): New array.
4214         (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4215         (attr_common_exclusions, attr_const_pure_exclusions): Same.
4216         (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4217         (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4218         (attr_warn_unused_result_exclusions): Same.
4219         (handle_hot_attribute, handle_cold_attribute): Simplify.
4220         (handle_const_attribute): Warn on function returning void.
4221         (handle_pure_attribute): Same.
4222         (handle_aligned_attribute): Diagnose conflicting attribute
4223         specifications.
4224         * c-warn.c (diagnose_mismatched_attributes): Simplify.
4226 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4228         PR c/83236
4229         * c-common.c (selftest::c_family_tests): Call
4230         selftest::c_spellcheck_cc_tests.
4231         * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4232         * c-spellcheck.cc: Include "selftest.h".
4233         (name_reserved_for_implementation_p): New function.
4234         (should_suggest_as_macro_p): New function.
4235         (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4236         should_suggest_as_macro_p and call it.
4237         (selftest::test_name_reserved_for_implementation_p): New function.
4238         (selftest::c_spellcheck_cc_tests): New function.
4239         * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4241 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4243         * c-spellcheck.cc: New file, taken from macro-handling code in
4244         spellcheck-tree.c.
4245         * c-spellcheck.h: New file, taken from macro-handling code in
4246         spellcheck-tree.h.
4248 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
4250         * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4251         attribute.
4252         (handle_simd_attribute): Don't check for "cilk simd function"
4253         attribute.  Reindent, formatting changes.
4255 2017-11-30  Julia Koval  <julia.koval@intel.com>
4257         * c-common.h (inv_list): Remove.
4259 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4261         PR sanitizer/81275
4262         * c-common.c (c_switch_covers_all_cases_p_1,
4263         c_switch_covers_all_cases_p): New functions.
4264         * c-common.h (c_switch_covers_all_cases_p): Declare.
4266 2017-11-28  Julia Koval  <julia.koval@intel.com>
4267             Sebastian Peryt  <sebastian.peryt@intel.com>
4269         * array-notation-common.c: Delete.
4270         * c-cilkplus.c: Ditto.
4271         * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4272         * c-common.def (ARRAY_NOTATION_REF): Remove.
4273         * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4274         build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4275         c_validate_cilk_plus_loop, cilkplus_an_parts,
4276         cilk_ignorable_spawn_rhs_op,
4277         cilk_recognize_spawn): Remove.
4278         * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4279         * c-omp.c: Remove CILK_SIMD check.
4280         * c-pragma.c: Ditto.
4281         * c-pragma.h: Remove CILK related pragmas.
4282         * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4283         ARRAY_NOTATION_REF condition.
4284         (c_pretty_printer::expression): Ditto.
4285         * c.opt (fcilkplus): Remove.
4286         * cilk.c: Delete.
4288 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
4290         * c-pretty-print.c (pp_c_additive_expression,
4291         c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4293 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
4295         * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4297         PR c++/83059
4298         * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4299         instead of tree_to_uhwi, formatting fix.
4301 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4303         PR c/81404
4304         * known-headers.cc: New file, based on material from c/c-decl.c.
4305         (suggest_missing_header): Copied as-is.
4306         (get_stdlib_header_for_name): New, based on get_c_name_hint but
4307         heavily edited to add C++ support.  Add some knowledge about
4308         <limits.h>, <stdint.h>, and <wchar.h>.
4309         * known-headers.h: Likewise.
4311 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
4313         * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
4314         (lookup_name_fuzzy): Likewise.  Convert return type from
4315         const char * to name_hint.  Add location_t param.
4316         * name-hint.h: New header.
4318 2017-11-19  Jakub Jelinek  <jakub@redhat.com>
4320         PR c/66618
4321         PR c/69960
4322         * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
4324 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
4326         * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
4327         expected publication date of C17.
4328         (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
4330 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
4332         PR c/81156
4333         * c-common.c (c_common_reswords): Add __builtin_tgmath.
4334         * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
4336 2017-11-10  Martin Sebor  <msebor@redhat.com>
4338         PR c/81117
4339         * c-common.c (catenate_strings): Use memcpy instead of strncpy.
4340         * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
4341         * c.opt (-Wstringop-truncation): New option.
4343 2017-11-06  Martin Liska  <mliska@suse.cz>
4345         PR middle-end/82404
4346         * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4347         FE.
4348         * c.opt: Set default value of warn_return_type.
4350 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
4352         * c-common.c (binary_op_error): Update for renaming of
4353         error_at_rich_loc.
4354         (c_parse_error): Likewise.
4355         * c-warn.c (warn_logical_not_parentheses): Likewise for
4356         renaming of inform_at_rich_loc.
4357         (warn_for_restrict): Likewise for renaming of
4358         warning_at_rich_loc_n.
4360 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
4362         * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4363         * c-opts.c (set_std_c17): New function.
4364         (c_common_init_options): Use gnu17 as default C version.
4365         (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4367 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
4369         * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4370         (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4371         _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4372         __FP_FAST_FMA<N>X.
4374 2017-10-23  Marek Polacek  <polacek@redhat.com>
4376         PR c/82681
4377         * c-warn.c (warnings_for_convert_and_check): Fix typos.
4379 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
4381         * c-common.c (check_builtin_function_arguments): Also check arguments
4382         of __builtin_alloca_with_align_and_max.
4384 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
4386         * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4387         rather than NULL to format_warning_va.
4388         (check_format_types): Likewise when calling format_type_warning.
4389         Remove code to extract source_ranges and source_range * in favor
4390         of just a location_t.
4391         (format_type_warning): Convert source_range * param to a
4392         location_t.
4394 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
4396         * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4397         [LR]SHIFT_EXPR.
4399 2017-10-12  David Malcolm  <dmalcolm@redhat.com>
4401         * c-common.c (enum missing_token_insertion_kind): New enum.
4402         (get_missing_token_insertion_kind): New function.
4403         (maybe_suggest_missing_token_insertion): New function.
4404         * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4406 2017-10-11  Nathan Sidwell  <nathan@acm.org>
4408         * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4409         (c_common_handle_option): Update incpath_kind names.
4411 2017-10-11  Martin Liska  <mliska@suse.cz>
4413         PR sanitizer/82490
4414         * c-attribs.c (handle_no_sanitize_attribute): Report directly
4415         Wattributes warning.
4417 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
4419         * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4420         operating on trees as wide_ints.
4421         * c-common.c (pointer_int_sum): Likewise.
4422         * c-pretty-print.c (pp_c_integer_constant): Likewise.
4423         * c-warn.c (match_case_to_enum_1): Likewise.
4424         (c_do_switch_warnings): Likewise.
4425         (maybe_warn_shift_overflow): Likewise.
4427 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
4429         PR c/82437
4430         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4431         instead of wide_int::from.
4433 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
4435         PR c/82437
4436         * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4437         using to_widest use wide_int with the larger of the two precisions.
4439 2017-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4441         * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4442         functions.
4444 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
4446         * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4447         when combining the original unconverted comparison operands.
4449 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
4451         * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4452         attribute.
4454 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
4456         * c-ada-spec.c (to_ada_name): Add index parameter.
4457         (pp_ada_tree_identifier): Likewise.
4458         (dump_ada_macros): Adjust call to to_ada_name.
4459         (struct overloaded_name_hash): New type.
4460         (struct overloaded_name_hasher): Likewise.
4461         (overloaded_names): New hash table.
4462         (compute_overloading_index): New function.
4463         (dump_ada_decl_name): Call it and pass the result to
4464         pp_ada_tree_identifier.
4465         (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4466         (dump_ada_function_declaration): Likewise.
4467         (dump_generic_ada_node): Likewise.
4468         (print_constructor): Likewise.
4469         (print_destructor): Likewise.
4470         (dump_ada_specs): Delete overloaded_names table.
4472 2017-09-29  Eric Botcazou  <ebotcazou@adacore.com>
4474         * c-ada-spec.c (max_ada_macros): Move around.
4475         (store_ada_macro_index): Likewise.
4476         (source_file): Rename into...
4477         (macro_source_file): ...this.
4478         (count_ada_macro): Move around.
4479         (store_ada_macro): Likewise.
4480         (compare_macro): Likewise.
4481         (print_ada_macros): Merge in...
4482         (dump_ada_macros): ...this.
4483         (source_file_base): Rename into...
4484         (current_source_file): ...this.
4485         (print_comment): Move around.
4486         (dump_ada_nodes): Call dump_ada_declaration directly.
4487         (struct with): Change type of limited field to bool.
4488         (append_withs): Change type of limited_access parameter to bool.
4489         (pp_ada_tree_identifie): Likewise.
4490         (dump_ada_decl_nam): Likewise.
4491         (dump_generic_ada_node): Likewise.  Do not print the return type.
4492         (to_ada_name): Change type of space_found parameter to bool.
4493         (dump_ada_function_declaration): Return void and change type of
4494         parameters to bool.  Also print the return type for a function.
4495         (print_ada_methods): Rename into...
4496         (dump_ada_methods): ...this.
4497         (print_ada_declaration): Rename into ...
4498         (dump_ada_declaration): ...this.  Do not print the return type.
4499         (print_ada_struct_decl): Rename into...
4500         (dump_ada_struct_decl): ...this.
4502 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
4504         * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4505         rather than DECL_INITIAL.
4506         (common_handle_aligned_attribute): Likewise.
4508 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
4510         * c.opt (gen-decls): Add RejectNegative.
4512 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
4513             Jakub Jelinek  <jakub@redhat.com>
4515         Add support for -std=c++2a.
4516         * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4517         * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4518         * c-opts.c (set_std_cxx2a): New.
4519         (c_common_handle_option): Set options when -std=c++2a is enabled.
4520         (c_common_post_options): Adjust comments.
4521         (set_std_cxx14, set_std_cxx17): Likewise.
4523 2017-09-15  Eric Botcazou  <ebotcazou@adacore.com>
4525         * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4526         message for non-uniform endianness and issue a warning in C++.
4528 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
4530         * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4531         (Wc++17-compat): Change from undocumented alias to option.
4532         (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4533         change C++1z to C++17 in description.
4534         (std=c++1z, std=gnu++1z): Change from option to undocumented
4535         deprecated alias.
4536         (std=c++17, std=gnu++17): Change from undocumented alias to option.
4537         Adjust description.
4538         * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4539         * c-opts.c (set_std_cxx1z): Rename to ...
4540         (set_std_cxx17): ... this.
4541         (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4542         and OPT_std_gnu__1z to OPT_std_gnu__17.  Adjust set_std_cxx1z
4543         caller.
4544         (c_common_post_options): Use cxx17 instead of cxx1z.  Adjust
4545         comments.
4547 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
4549         * c-attribs.c (common_handle_aligned_attribute): Don't warn
4550         function alignment if warn_if_not_aligned_p is true.
4552 2017-09-12  Nathan Sidwell  <nathan@acm.org>
4554         * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4555         resort_sorted_fields): Move to c/c-decl.c.
4556         * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4557         (struct sorted_fields_type): Move to c/c-lang.h.
4559 2017-09-09  Jonathan Wakely  <jwakely@redhat.com>
4561         PR c++/81852
4562         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4564 2017-09-04  Marek Polacek  <polacek@redhat.com>
4566         PR c/81783
4567         * c-warn.c (warn_tautological_bitwise_comparison): New function.
4568         (warn_tautological_cmp): Call it.
4570 2017-09-01  Boris Kolpackov  <boris@codesynthesis.com>
4572         * c-opts.c (c_common_finish): Write dependency information even if
4573         there are errors.
4575 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
4577         PR c/81887
4578         * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4579         (omp_pragmas_simd): ... here.
4580         * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4581         create new clauses list containing just simd clause.
4583 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4584             Alan Hayward  <alan.hayward@arm.com>
4585             David Sherwood  <david.sherwood@arm.com>
4587         * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4588         into scalar_mode_supported_p call.
4589         (handle_mode_attribute): Update call to scalar_mode_supported_p.
4591 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4592             Alan Hayward  <alan.hayward@arm.com>
4593             David Sherwood  <david.sherwood@arm.com>
4595         * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4596         for the mode iterator.
4598 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4599             Alan Hayward  <alan.hayward@arm.com>
4600             David Sherwood  <david.sherwood@arm.com>
4602         * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4603         * c-common.c (c_build_vec_perm_expr): Likewise.
4605 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4606             Alan Hayward  <alan.hayward@arm.com>
4607             David Sherwood  <david.sherwood@arm.com>
4609         * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4611 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4612             Alan Hayward  <alan.hayward@arm.com>
4613             David Sherwood  <david.sherwood@arm.com>
4615         * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4616         before calling targetm.addr_space.valid_pointer_mode.
4618 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4619             Alan Hayward  <alan.hayward@arm.com>
4620             David Sherwood  <david.sherwood@arm.com>
4622         * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4624 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4625             Alan Hayward  <alan.hayward@arm.com>
4626             David Sherwood  <david.sherwood@arm.com>
4628         * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4629         iterators.
4630         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4632 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
4633             Alan Hayward  <alan.hayward@arm.com>
4634             David Sherwood  <david.sherwood@arm.com>
4636         * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4637         case statements.
4639 2017-08-29  Martin Liska  <mliska@suse.cz>
4641         PR other/39851
4642         * c-common.c (parse_optimize_options): Add argument to function
4643         call.
4644         * c-pragma.c (handle_pragma_diagnostic): Likewise.
4646 2017-08-24  David Malcolm  <dmalcolm@redhat.com>
4648         * c-lex.c (interpret_float): Use token location
4649         when building an EXCESS_PRECISION_EXPR.
4651 2017-08-21  David Malcolm  <dmalcolm@redhat.com>
4653         * c-common.c (check_function_arguments): Add "arglogs" param; pass
4654         it to check_function_format.
4655         * c-common.h (check_function_arguments): Add vec<location_t> *
4656         param.
4657         (check_function_format): Likewise.
4658         * c-format.c (struct format_check_context): Add field "arglocs".
4659         (check_function_format): Add param "arglocs"; pass it to
4660         check_format_info.
4661         (check_format_info): Add param "arglocs"; use it to initialize
4662         new field of format_ctx.
4663         (check_format_arg): Pass format_ctx->arglocs to new param of
4664         check_format_info_main.
4665         (class argument_parser): New field "arglocs".
4666         (argument_parser::argument_parser): Add "arglocs_" param and use
4667         it to initialize new field.
4668         (argument_parser::check_argument_type): Pass new arglocs field to
4669         check_format_types.
4670         (check_format_info_main): Add param "arglocs", and use it when
4671         constructing arg_parser.
4672         (check_format_types): Add param "arglocs"; use it if non-NULL when
4673         !EXPR_HAS_LOCATION (cur_param) to get at location information.
4675 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
4677         PR c/53037
4678         * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4679         (c_common_attribute_table): Add warn_if_not_aligned.
4680         (handle_aligned_attribute): Renamed to ...
4681         (common_handle_aligned_attribute): Remove argument, name, and add
4682         argument, warn_if_not_aligned.  Handle warn_if_not_aligned.
4683         (handle_aligned_attribute): New.
4684         * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4686 2017-08-14  Martin Sebor  <msebor@redhat.com>
4688         PR c/81117
4689         * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4690         (handle_nonstring_attribute): New function.
4692 2017-08-14  Martin Sebor  <msebor@redhat.com>
4694         PR c/81117
4695         * c-format.h (T89_G): New macro.
4696         * c-format.c (local_gcall_ptr_node): New variable.
4697         (init_dynamic_diag_info): Initialize it.
4699 2017-08-11  Martin Liska  <mliska@suse.cz>
4701         * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4702         TARGET_SUPPORTS_ALIASES.
4704 2017-08-10  David Malcolm  <dmalcolm@redhat.com>
4706         * c-common.c (c_parse_error): Add rich_location * param, using it
4707         rather implicitly using input_location.
4708         * c-common.h (c_parse_error): Add rich_location * param.
4710 2017-08-09  Marek Polacek  <polacek@redhat.com>
4712         * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4713         (c_common_truthvalue_conversion): Likewise.
4714         * c-omp.c (c_finish_omp_atomic): Likewise.
4715         * c-common.h (build_binary_op): Update declaration.
4717 2017-08-08  Martin Liska  <mliska@suse.cz>
4719         * c-ada-spec.c: Include header files.
4720         * c-ubsan.c: Likewise.
4721         * c-warn.c: Likewise.
4723 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
4725         PR c/69389
4726         * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4728 2017-08-07  Eric Botcazou  <ebotcazou@adacore.com>
4730         * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4731         (print_ada_methods): Likewise.
4732         (print_ada_declaration): Likewise.
4734 2017-08-07  Martin Liska  <mliska@suse.cz>
4736         * array-notation-common.c: Add new includes.
4737         * c-format.c( handle_format_attribute): Canonicalize a format
4738         function name.
4739         * c-lex.c (c_common_has_attribute): Canonicalize name of an
4740         attribute.
4741         * c-pretty-print.c: Add new include.
4743 2017-08-05  Eric Botcazou  <ebotcazou@adacore.com>
4745         * c-ada-spec.c (has_static_fields): Look only into variables.
4746         (print_constructor): Add TYPE parameter and use it for the name.
4747         (print_destructor): Likewise.
4748         (print_ada_declaration): Adjust to new constructor/destructor names.
4749         Adjust calls to print_constructor and print_destructor.
4750         (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4751         Look only into variables in the final loop.
4753 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4755         * c-ada-spec.c (has_static_fields): Look only into fields.
4756         (dump_generic_ada_node): Small tweak.
4757         (dump_nested_types): Look only into fields.
4758         (print_ada_declaration): Look only into methods.  Small tweak.
4759         (print_ada_struct_decl): Look only into fields.  Use DECL_VIRTUAL_P.
4761 2017-08-01  Eric Botcazou  <ebotcazou@adacore.com>
4763         * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4764         (dump_ada_function_declaration): Likewise.
4765         (dump_generic_ada_node): Likewise.
4766         (print_ada_declaration): Add support for const-qualified variables.
4768 2017-07-31  Martin Liska  <mliska@suse.cz>
4770         PR sanitize/81530
4771         * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4772         Guard condition with flag_sanitize_p also with current_function_decl
4773         non-null equality.
4774         (ubsan_maybe_instrument_reference_or_call): Likewise.
4776 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
4778         * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4780 2017-07-29  Eric Botcazou  <ebotcazou@adacore.com>
4782         * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4783         for enumeral types.
4784         (print_ada_declaration): Add missing guard for record types.
4786 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
4788         PR c/45784
4789         * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4790         rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4791         new COMPOUND_EXPRs around the rhs of the comparison.
4793 2017-07-27  Marek Polacek  <polacek@redhat.com>
4795         PR c/81417
4796         * c-warn.c (warn_for_sign_compare): Tweak the warning message.  Print
4797         the types.
4799 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
4801         * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4802         (handle_noipa_attribute): New function.
4804 2017-07-07  Torsten Duwe  <duwe@suse.de>
4806         * c-attribs.c (c_common_attribute_table): Add entry for
4807         "patchable_function_entry".
4809 2017-07-20  Nathan Sidwell  <nathan@acm.org>
4811         Remove TYPE_METHODS.
4812         * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4813         dump_ada_template, print_ada_methods,
4814         print_ada_declaration): Member fns are on TYPE_FIELDS.
4816 2017-07-18  Nathan Sidwell  <nathan@acm.org>
4818         * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4820 2017-07-14  David Malcolm  <dmalcolm@redhat.com>
4822         * c-common.c (try_to_locate_new_include_insertion_point): New
4823         function.
4824         (per_file_includes_t): New typedef.
4825         (added_includes_t): New typedef.
4826         (added_includes): New variable.
4827         (maybe_add_include_fixit): New function.
4828         * c-common.h (maybe_add_include_fixit): New decl.
4830 2017-07-10  Martin Sebor  <msebor@redhat.com>
4832         PR other/81345
4833         * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4835 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
4837         * c-common.c (selftest::c_family_tests): New.
4838         * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4839         (selftest::c_family_tests): New decl.
4841 2017-07-04  Marek Polacek  <polacek@redhat.com>
4843         PR c/81231
4844         * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4845         types.
4847 2017-07-04  Marek Polacek  <polacek@redhat.com>
4849         * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4851 2017-06-28  Martin Liska  <mliska@suse.cz>
4853         PR ipa/81128
4854         * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4855         to a function declaration.
4857 2017-06-28  Martin Liska  <mliska@suse.cz>
4859         PR driver/79659
4860         * c.opt: Add IntegerRange to various options.
4862 2017-06-26  Marek Polacek  <polacek@redhat.com>
4864         PR c/80116
4865         * c-common.h (warn_for_multistatement_macros): Declare.
4866         * c-warn.c: Include "c-family/c-indentation.h".
4867         (warn_for_multistatement_macros): New function.
4868         * c.opt (Wmultistatement-macros): New option.
4869         * c-indentation.c (guard_tinfo_to_string): No longer static.
4870         Change the parameter type to "enum rid".  Handle RID_SWITCH.
4871         * c-indentation.h (guard_tinfo_to_string): Declare.
4873 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
4875         * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4877 2017-06-15  Martin Sebor  <msebor@redhat.com>
4879         PR c++/80560
4880         * c.opt (-Wclass-memaccess): New option.
4882 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
4884         * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4886 2017-06-13  Marek Polacek  <polacek@redhat.com>
4888         PR objc/80949
4889         * c-warn.c (do_warn_duplicated_branches): Return if any of the
4890         branches is null.
4892 2017-06-13  Martin Liska  <mliska@suse.cz>
4894         PR sanitize/78204
4895         * c-attribs.c (add_no_sanitize_value): New function.
4896         (handle_no_sanitize_attribute): Likewise.
4897         (handle_no_sanitize_address_attribute): Use the function.
4898         (handle_no_sanitize_thread_attribute): New function.
4899         (handle_no_address_safety_analysis_attribute): Use
4900         add_no_sanitize_value.
4901         (handle_no_sanitize_undefined_attribute): Likewise.
4902         * c-common.h: Declare new functions.
4903         * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4904         (ubsan_instrument_shift): Likewise.
4905         (ubsan_instrument_bounds): Likewise.
4906         (ubsan_maybe_instrument_array_ref): Likewise.
4907         (ubsan_maybe_instrument_reference_or_call): Likewise.
4909 2017-06-11  Jason Merrill  <jason@redhat.com>
4911         * c-ada-spec.c, c-pragma.c: Use id_equal.
4913 2017-06-04  Marek Polacek  <polacek@redhat.com>
4915         PR c/80919
4916         * c-format.c (matching_type_p): Return false if any of the types
4917         requires structural equality.
4919 2017-06-02  Martin Sebor  <msebor@redhat.com>
4921         PR c/80892
4922         * c-warn.c (conversion_warning): Use -Wconversion for integer
4923         conversion and -Wfloat-conversion for floating one.
4925 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4927         * c.opt (Wsizeof-pointer-div): New warning option.
4929 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
4931         * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4932         (Wcatch-value=1): Enable by -Wall.
4934 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
4936         * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4937         format_chars.
4938         * c.opt (fdiagnostics-show-template-tree): New option.
4939         (felide-type): New option.
4941 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
4943         * c.opt (Wcatch-value=): New C++ warning flag.
4945 2017-05-24  Nathan Sidwell  <nathan@acm.org>
4947         * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4948         const casts to avoid warning.
4950 2017-05-24  Martin Sebor  <msebor@redhat.com>
4952         PR c/80731
4953         * c-common.h (unsafe_conversion_p): Add a function argument.
4954         * c-common.c (unsafe_conversion_p): Same.
4955         Add type names and values to diagnostics.
4956         (scalar_to_vector): Adjust.
4957         * c-warn.c (constant_expression_error): Add a function argument.
4958         Add type names and values to diagnostics.
4959         (conversion_warning): Add a function argument.
4960         Add type names and values to diagnostics.
4961         (warnings_for_convert_and_check): Same.
4963 2017-05-19  Jason Merrill  <jason@redhat.com>
4965         * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4966         enumerators.
4968 2017-05-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4970         * c-format.c (locus): Move out of function scope,
4971         add GTY attribute.
4973 2017-05-19  Nathan Sidwell  <nathan@acm.org>
4975         * c-opts.c (class_dump_file, class_dump_flags): Delete.
4976         (c_common_parse_file): Remove class dump handling.
4977         (get_dump_info): Likewise.
4979 2017-05-19  Richard Biener  <rguenther@suse.de>
4981         PR c++/80593
4982         * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4983         to alias-set zero memory.
4985 2017-05-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4987         * c-format.c (local_tree_type_node): Add GTY attribute.
4989 2017-05-18  Marek Polacek  <polacek@redhat.com>
4991         * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4992         (c_common_fixed_point_type_for_size): Likewise.
4993         (c_common_type_for_mode): Likewise.
4994         (shorten_compare): Likewise.
4995         (c_promoting_integer_type_p): Use false/true instead of 0/1.
4996         * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4998 2017-05-18  Marek Polacek  <polacek@redhat.com>
5000         * c-common.c (self_promoting_args_p): Change the return type to bool.
5001         Use false/true instead of 0/1.
5002         * c-common.h (self_promoting_args_p): Update.
5004 2017-05-17  Marek Polacek  <polacek@redhat.com>
5006         * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5007         * c-warn.c: Likewise.
5009 2017-05-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
5011         Implement new C++ intrinsics __is_assignable and __is_constructible.
5012         * c-common.c (__is_assignable, __is_constructible): New.
5013         * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5015 2017-05-17  Martin Liska  <mliska@suse.cz>
5017         * c-common.h: Introduce dump_flags_t type and
5018         use it instead of int type.
5019         * c-gimplify.c (c_genericize): Likewise.
5020         * c-opts.c: Likewise.
5022 2017-05-17  Marek Polacek  <polacek@redhat.com>
5024         * c-common.c (c_save_expr): Remove.
5025         (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5026         * c-common.h (c_save_expr): Remove declaration.
5028 2017-05-09  Volker Reichelt  <v.reichelt@netcologne.de>
5030         PR c/35441
5031         * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5032         MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5033         (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5034         (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5035         RDIV_EXPR.
5036         (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5038 2017-05-09  Marek Polacek  <polacek@redhat.com>
5040         PR c/80525
5041         * c-warn.c (unwrap_c_maybe_const): New.
5042         (warn_logical_operator): Call it.
5044 2017-05-09  Nathan Sidwell  <nathan@acm.org>
5046         * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5047         * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5049 2017-05-08  Martin Sebor  <msebor@redhat.com>
5051         PR translation/80280
5052         * c-format.h (struct format_flag_spec): Add new member.
5053         (T89_T): New macro.
5054         * c-format.c (local_tree_type_node): New global.
5055         (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5056         (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5057         (strfmon_flag_specs): Likewise.
5058         (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5059         with distinct quoting properties.
5060         (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5061         (flag_chars_t::validate): Add argument and handle bad quoting.
5062         (check_format_info_main): Handle quoting problems.
5063         (init_dynamic_diag_info): Simplify.
5065 2017-05-08  Jason Merrill  <jason@redhat.com>
5067         * c-opts.c (c_common_post_options): Update defaults for
5068         flag_abi_version and flag_abi_compat_version.
5070 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
5072         * c-common.c (c_cpp_error): Replace report_diagnostic
5073         with diagnostic_report_diagnostic.
5075 2017-05-04  Martin Sebor  <msebor@redhat.com>
5077         PR translation/80280
5078         * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5079         (handle_weakref_attribute): Same.
5081 2017-05-03  Nathan Sidwell  <nathan@acm.org>
5083         Canonicalize canonical type hashing
5084         * c-common.c (complete_array_type): Use type_hash_canon.
5086 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
5088         PR c++/80038
5089         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5090         prototype.
5091         (cilk_install_body_pedigree_operations): Likewise.
5092         * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5093         detatched.
5094         (cilk_gimplify_call_params_in_spawned_fn): Remove.
5095         (cilk_install_body_pedigree_operations): Likewise.
5096         (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5097         unwrapping.
5099 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
5101         PR c++/80534
5102         * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5103         flag on non-aggregate element types.
5105 2017-04-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5107         * c-common.c (c_type_hasher, type_hash_table): Remove.
5108         (c_common_get_alias_set): Remove unreachable code.
5109         * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5111 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
5113         * c.opt (Wextra-semi): New C++ warning flag.
5115 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
5117         PR middle-end/80423
5118         * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5120 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
5122         PR middle-end/79788
5123         PR middle-end/80375
5124         * c-common.c (c_common_type_for_mode): Don't handle
5125         widest_*_literal_type_node here.
5126         c_common_signed_or_unsigned_type): Likewise.
5127         (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5128         to *intTI_type_node or *intDI_type_node depending on whether
5129         TImode is supported by the target or not.
5131 2017-04-10  Martin Liska  <mliska@suse.cz>
5133         PR sanitizer/80350
5134         * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5135         doing an UBSAN check.
5137 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
5139         * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5141 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
5143         PR c++/79572
5144         * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5145         tree *.
5146         * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise.  Handle
5147         not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5148         REFERENCE_TYPE.
5150 2017-03-31  David Malcolm  <dmalcolm@redhat.com>
5152         PR documentation/78732
5153         * c.opt (Wendif-labels): Fix description to refer to
5154         #else rather than #elif.
5156 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
5158         PR libstdc++/80251
5159         * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5160         * c-common.c (c_common_reswords): Add __is_aggregate trait.
5162 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
5164         PR middle-end/80162
5165         * c-common.c (c_common_mark_addressable_vec): Don't set
5166         TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5168 2017-03-21  Martin Sebor  <msebor@redhat.com>
5170         PR c++/79548
5171         * c-common.c (set_underlying_type): Mark type used only when
5172         original del is declared unused.
5174 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
5176         PR translation/79848
5177         * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5178         "%qs".
5180 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
5182         PR c/79921
5183         * c-indentation.c (warn_for_misleading_indentation): Remove parens
5184         from inform's message, so that xgettext can locate it.
5186 2017-03-09  Marek Polacek  <polacek@redhat.com>
5188         PR c++/79962
5189         PR c++/79984
5190         * c-attribs.c (handle_nonnull_attribute): Save the result of default
5191         conversion to the attribute list.
5193 2017-03-09  Martin Liska  <mliska@suse.cz>
5195         * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5197 2017-03-03  Jason Merrill  <jason@redhat.com>
5199         * c.opt (Wnoexcept-type): New.
5201 2017-03-02  Richard Biener  <rguenther@suse.de>
5203         PR c/79756
5204         * c-common.c (c_common_mark_addressable_vec): Look through
5205         C_MAYBE_CONST_EXPR.
5207 2017-02-28  Martin Liska  <mliska@suse.cz>
5209         * c.opt: Replace space with tabular for options of <number>
5210         type.
5212 2017-02-28  Martin Liska  <mliska@suse.cz>
5214         * c.opt: Fix --help=option -Q for options which are of
5215         an enum type.
5217 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
5219         PR c++/79588
5220         * c-common.c (check_function_restrict): New function.
5221         (check_function_arguments): Add FNDECL argument.  Call
5222         check_function_restrict if -Wrestrict.
5223         * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5224         and NARGS.  Use auto_vec for ARG_POSITIONS, simplify.
5225         * c-common.h (check_function_arguments): Add FNDECL argument.
5226         (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5228 2017-02-24  Eric Botcazou  <ebotcazou@adacore.com>
5230         * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5231         treatment of parameters with pointer-to-tagged type and tidy up.
5232         (print_ada_methods): Remove the special treatment of C++ static member
5233         functions.
5235 2017-02-22  Martin Liska  <mliska@suse.cz>
5237         * c.opt: Replace inequality signs with square brackets
5238         for -Wnornalized.
5240 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
5242         PR c++/79641
5243         * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5244         preserve quals.
5246 2017-02-17  Joseph Myers  <joseph@codesourcery.com>
5248         * c-cppbuiltin.c (builtin_define_float_constants): Define
5249         __DECIMAL_DIG__ to the value for long double.
5251 2017-02-15  Marek Polacek  <polacek@redhat.com>
5253         PR c/79515
5254         * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5255         conversion has occured.
5257 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
5259         * c-common.c (c_common_reswords): Add "__RTL".
5260         * c-common.h (enum rid): Add RID_RTL.
5262 2017-01-20  Marek Polacek  <polacek@redhat.com>
5264         PR c/64279
5265         * c-common.h (do_warn_duplicated_branches_r): Declare.
5266         * c-gimplify.c (c_genericize): Walk the function tree calling
5267         do_warn_duplicated_branches_r.
5268         * c-warn.c (expr_from_macro_expansion_r): New.
5269         (do_warn_duplicated_branches): New.
5270         (do_warn_duplicated_branches_r): New.
5271         * c.opt (Wduplicated-branches): New option.
5273 2017-01-17  David Malcolm  <dmalcolm@redhat.com>
5275         PR c++/71497
5276         * c-indentation.c (warn_for_misleading_indentation): Use the past
5277         subjunctive in the note.
5279 2017-01-17  Aldy Hernandez  <aldyh@redhat.com>
5281         PR c/79116
5282         * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5283         start type to integer_type.
5285 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
5287         PR driver/49726
5288         * c.opt (gen-decls): Add Driver flag.
5290 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5292         Revert:
5293         2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5295         PR c++/71737
5296         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5298 2017-01-16  Paolo Carlini  <paolo.carlini@oracle.com>
5300         PR c++/71737
5301         * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5303 2017-01-12  Martin Sebor  <msebor@redhat.com>
5305         (-Wformat-overflow): ...to this.
5307 2017-01-11  Martin Sebor  <msebor@redhat.com>
5309         PR c/78768
5310         * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
5311         Also enable for LTO.
5313 2017-01-10  Jason Merrill  <jason@redhat.com>
5315         Implement P0195R2, C++17 variadic using.
5316         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
5318 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
5320         PR translation/79019
5321         PR translation/79020
5322         * c.opt (Wnormalized=): Fix typo in description.
5324 2017-01-08  Martin Sebor  <msebor@redhat.com>
5326         PR middle-end/77708
5327         * c.opt (-Wformat-truncation): New option.
5329 2017-01-06  Alexandre Oliva  <aoliva@redhat.com>
5331         * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
5332         value to unsigned short to fit in 4 hex digits without
5333         warnings.
5335 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
5337         * c.opt (fsso-struct): Add 'native' value.
5339 2017-01-05  Martin Liska  <mliska@suse.cz>
5341         PR pch/78970
5342         * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5343         header.
5345 2017-01-04  Marek Polacek  <polacek@redhat.com>
5347         PR c++/64767
5348         * c.opt (Wpointer-compare): New option.
5350 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
5352         PR driver/78957
5353         * c.opt (fsso-struct=): Add RejectNegative.
5355 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
5357         Update copyright years.
5359 2016-12-29  Martin Liska  <mliska@suse.cz>
5361         PR c/78933
5362         * c.opt (strong-eval-order): Add RejectNegative keyword.
5364 2016-12-22  Jason Merrill  <jason@redhat.com>
5366         Implement P0522R0, matching of template template arguments.
5367         * c-cppbuiltin.c (c_cpp_builtins): Define
5368         __cpp_template_template_args.
5370 2016-12-21  Jakub Jelinek  <jakub@redhat.com>
5372         PR bootstrap/78817
5373         * c-common.c (struct nonnull_arg_ctx): New type.
5374         (check_function_nonnull): Return bool instead of void.  Use
5375         nonnull_arg_ctx as context rather than just location_t.
5376         (check_nonnull_arg): Adjust for the new context type, set
5377         warned_p to true if a warning has been diagnosed.
5378         (check_function_arguments): Return bool instead of void.
5379         * c-common.h (check_function_arguments): Adjust prototype.
5381 2016-12-21  Jason Merrill  <jason@redhat.com>
5383         * c.opt (-fnew-ttp-matching): New flag.
5384         * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5386 2016-12-14  Martin Jambor  <mjambor@suse.cz>
5388         * c-omp.c: Include omp-general.h instead of omp-low.h.
5389         (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5390         name.
5392 2016-12-14  Martin Sebor  <msebor@redhat.com>
5394         PR c/17308
5395         * c-common.c (check_nonnull_arg): Disable when optimization
5396         is enabled.
5398 2016-12-12  Marek Polacek  <polacek@redhat.com>
5400         PR c++/78647
5401         * c-common.c (attribute_fallthrough_p): Return false for
5402         error_mark_node.
5404 2016-12-08  Martin Sebor  <msebor@redhat.com>
5406         PR c/78284
5407         * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5409 2016-12-08  Martin Sebor  <msebor@redhat.com>
5411         PR c/78165
5412         * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5413         suffix.
5415 2016-12-07  Martin Sebor  <msebor@redhat.com>
5417         PR c/53562
5418         PR middle-end/77784
5419         PR middle-end/78149
5420         PR middle-end/78138
5421         * c.opt (-Wstringop-overflow): New option.
5423 2016-12-02  Maxim Ostapenko  <m.ostapenko@samsung.com>
5425         * c-attribs.c (asan odr indicator): New attribute.
5426         (handle_asan_odr_indicator_attribute): New function.
5428 2016-11-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5430         * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5431         ptrdiff_type_node;
5433 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
5435         * c-common.c (excess_precision_mode_join): New.
5436         (c_ts18661_flt_eval_method): New.
5437         (c_c11_flt_eval_method): Likewise.
5438         (c_flt_eval_method): Likewise.
5439         * c-common.h (excess_precision_mode_join): New.
5440         (c_flt_eval_method): Likewise.
5441         * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5442         (cpp_iec_559_value): Call it.
5443         (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5444         call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5445         __FLT_EVAL_METHOD_TS_18661_3__.
5447 2016-11-23  James Greenhalgh  <james.greenhalgh@arm.com>
5449         * c-opts.c (c_common_post_options): Add logic to handle the default
5450         case for -fpermitted-flt-eval-methods.
5452 2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
5454         * c.opt (Wexpansion-to-defined): New.
5456 2016-11-23  Jakub Jelinek  <jakub@redhat.com>
5458         PR target/78451
5459         * c-pragma.c (handle_pragma_target): Don't replace
5460         current_target_pragma, but chainon the new args to the current one.
5462 2016-11-22  Nathan Sidwell  <nathan@acm.org>
5464         * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5465         indentation and formatting.
5467 2016-11-21  Martin Sebor  <msebor@redhat.com>
5469         * c.opt (-fprintf-return-value): Enable by default.
5471 2016-11-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5473         PR c++/71973
5474         * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5475         * c-common.c (c_common_nodes_and_builtins): Initialize
5476         const_tm_ptr_type_node.
5478 2016-11-16  Marek Polacek  <polacek@redhat.com>
5480         PR c/78285
5481         * c-common.c (c_add_case_label): Turn error_at calls into inform.
5483 2016-11-14  Jakub Jelinek  <jakub@redhat.com>
5485         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5487 2016-11-14  Prasad Ghangal  <prasad.ghangal@gmail.com>
5488             Richard Biener  <rguenther@suse.de>
5490         * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5491         * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5492         * c.opt (fgimple): New option.
5494 2016-11-13  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5496         PR c/35503
5497         * c-common.h (warn_for_restrict): Declare.
5498         * c-warn.c: Include gcc-rich-location.h.
5499         (warn_for_restrict): New function.
5500         * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5501         (gcc_cdiag_char_table): Likewise.
5502         (gcc_cxxdiag_char_table): Likewise.
5503         * c.opt (Wrestrict): New option.
5505 2016-11-13  Eric Botcazou  <ebotcazou@adacore.com>
5507         * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5508         for nested types only if the type is a record or union and dump SLOC.
5510 2016-11-09  Jason Merrill  <jason@redhat.com>
5512         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5514 2016-11-09  Jakub Jelinek  <jakub@redhat.com>
5516         * c-ubsan.c (ubsan_instrument_shift): Handle split
5517         -fsanitize=shift-base and -fsanitize=shift-exponent.
5519 2016-11-07  Jason Merrill  <jason@redhat.com>
5521         * c.opt (Wc++1z-compat): New.
5522         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5524 2016-11-07  Martin Liska  <mliska@suse.cz>
5526         * c-warn.c (warn_for_unused_label): Save all labels used
5527         in goto or in &label.
5529 2016-11-03  Jason Merrill  <jason@redhat.com>
5531         * c-cppbuiltin.c (c_cpp_builtins): Correct
5532         __cpp_inheriting_constructors.
5534 2016-11-01  Jason Merrill  <jason@redhat.com>
5536         * c-cppbuiltin.c (c_cpp_builtins): Update
5537         __cpp_inheriting_constructors.
5539         * c.opt (-fnew-inheriting-ctors): New.
5540         * c-opts.c: Default to on for ABI 11+.
5542 2016-10-31  Jakub Jelinek  <jakub@redhat.com>
5544         PR c++/77948
5545         * c.opt (fext-numeric-literals): Add Var and Init.
5546         * c-opts.c (c_common_handle_option): Don't clear
5547         cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5548         (c_common_post_options): Clear it here if not set
5549         explicitly.
5551 2016-10-28  Aldy Hernandez  <aldyh@redhat.com>
5553         PR debug/77773
5554         * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5555         if NULL.
5557 2016-10-25  Jakub Jelinek  <jakub@redhat.com>
5559         * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5560         * c-common.c (c_common_reswords): Add __builtin_launder.
5562 2016-10-24  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5564         * c-common.c (c_common_truthvalue_conversion): Warn for
5565         multiplications in boolean context.  Fix the quoting of '<<' and '<'
5566         in the shift warning.
5568 2016-10-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5570         * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5572 2016-10-20  Jason Merrill  <jason@redhat.com>
5574         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5576 2016-10-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5578         * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5579         integer shift ops in boolean context.
5581 2016-10-18  Aldy Hernandez  <aldyh@redhat.com>
5583         * c.opt (Walloca): New.
5584         (Walloca-larger-than=): New.
5585         (Wvla-larger-than=): New.
5587 2016-10-17  Marek Polacek  <polacek@redhat.com>
5589         * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5590         Return immediately when finding a match.
5591         (warn_tautological_cmp): Remove a boolean variable that is no longer
5592         needed.
5594 2016-10-17  Marek Polacek  <polacek@redhat.com>
5596         * c-attribs.c: New file.
5597         * c-common.c: Move attributes handling to c-attribs.c.
5598         (get_nonnull_operand): No longer static.
5599         * c-common.h: Move the declarations from c-attribs.c to its own section.
5601 2016-10-14  Jason Merrill  <jason@redhat.com>
5603         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5604         and __cpp_deduction_guides.
5606 2016-10-13  Jason Merrill  <jason@redhat.com>
5608         * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5610 2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5612         * c-cppbuiltin.c: Include memmodel.h.
5613         * c-opts.c: Likewise.
5614         * c-pragma.c: Likewise.
5615         * c-warn.c: Likewise.
5617 2016-10-12  Jakub Jelinek  <jakub@redhat.com>
5619         * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5620         (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5621         * c-opts.c (sanitize_cpp_opts): Initialize
5622         cpp_opts->cpp_warn_implicit_fallthrough.
5624 2016-10-11  Marek Polacek  <polacek@redhat.com>
5626         * c-common.c (warning_candidate_p): Change the return type to bool
5627         and return true/false instead of 1/0.
5628         (vector_mode_valid_p): Likewise.
5630 2016-10-11  Marek Polacek  <polacek@redhat.com>
5632         * c-common.c (fold_for_warn): No longer static.
5633         (bool_promoted_to_int_p): Likewise.
5634         (c_common_get_narrower): Likewise.
5635         (constant_expression_warning): Move to c-warn.c.
5636         (constant_expression_error): Likewise.
5637         (overflow_warning): Likewise.
5638         (warn_logical_operator): Likewise.
5639         (find_array_ref_with_const_idx_r): Likewise.
5640         (warn_tautological_cmp): Likewise.
5641         (expr_has_boolean_operands_p): Likewise.
5642         (warn_logical_not_parentheses): Likewise.
5643         (warn_if_unused_value): Likewise.
5644         (strict_aliasing_warning): Likewise.
5645         (sizeof_pointer_memaccess_warning): Likewise.
5646         (check_main_parameter_types): Likewise.
5647         (conversion_warning): Likewise.
5648         (warnings_for_convert_and_check): Likewise.
5649         (match_case_to_enum_1): Likewise.
5650         (match_case_to_enum): Likewise.
5651         (c_do_switch_warnings): Likewise.
5652         (warn_for_omitted_condop): Likewise.
5653         (readonly_error): Likewise.
5654         (lvalue_error): Likewise.
5655         (invalid_indirection_error): Likewise.
5656         (warn_array_subscript_with_type_char): Likewise.
5657         (warn_about_parentheses): Likewise.
5658         (warn_for_unused_label): Likewise.
5659         (warn_for_div_by_zero): Likewise.
5660         (warn_for_memset): Likewise.
5661         (warn_for_sign_compare): Likewise.
5662         (do_warn_double_promotion): Likewise.
5663         (do_warn_unused_parameter): Likewise.
5664         (record_locally_defined_typedef): Likewise.
5665         (maybe_record_typedef_use): Likewise.
5666         (maybe_warn_unused_local_typedefs): Likewise.
5667         (maybe_warn_bool_compare): Likewise.
5668         (maybe_warn_shift_overflow): Likewise.
5669         (warn_duplicated_cond_add_or_warn): Likewise.
5670         (diagnose_mismatched_attributes): Likewise.
5671         * c-common.h: Move the declarations from c-warn.c to its own section.
5672         * c-warn.c: New file.
5674 2016-10-08  Jason Merrill  <jason@redhat.com>
5676         * c-common.c (c_common_truthvalue_conversion): Don't distribute
5677         into COND_EXPR in C++.
5679 2016-10-08  Jakub Jelinek  <jakub@redhat.com>
5681         * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5682         token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5683         CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5685 2016-10-07  Jakub Jelinek  <jakub@redhat.com>
5687         Implement LWG2296 helper intrinsic
5688         * c-common.h (enum rid): Add RID_ADDRESSOF.
5689         * c-common.c (c_common_reswords): Add __builtin_addressof.
5691 2016-10-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5693         PR c++/77700
5694         * c-common.c (c_common_truthvalue_conversion): Warn also for
5695         suspicious enum values in boolean context.
5697 2016-10-06  Jakub Jelinek  <jakub@redhat.com>
5699         Implement P0258R2 - helper for C++17
5700         std::has_unique_object_representations trait
5701         * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5702         * c-common.c (c_common_reswords): Add
5703         __has_unique_object_representations.
5705 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
5707         PR sanitizer/66343
5708         * c-ubsan.c (ubsan_instrument_return): Don't call
5709         initialize_sanitizer_builtins here.
5711 2016-10-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5713         * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5714         conditional expression in boolean context when only one arm is
5715         non-boolean.
5717 2016-10-05  Jakub Jelinek  <jakub@redhat.com>
5719         PR sanitizer/77823
5720         * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5721         is not integral.
5723         * c-common.c (c_common_reswords): Update comment for C++11.
5725 2016-10-04  Jason Merrill  <jason@redhat.com>
5727         * c-common.c (make_tree_vector_from_ctor): New.
5728         * c-common.h: Declare it.
5730 2016-10-04  Jakub Jelinek  <jakub@redhat.com>
5732         * c-cppbuiltin.c (c_cpp_builtins): Don't define
5733         __LIBGCC_JCR_SECTION_NAME__.
5735 2016-10-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5737         * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5738         left shift in boolean context.
5740 2016-09-29  Jakub Jelinek  <jakub@redhat.com>
5742         Implement P0001R1 - C++17 removal of register storage class specifier
5743         * c.opt (Wregister): New warning.
5744         * c-opts.c (c_common_post_options): Enable -Wregister by
5745         default for C++17.
5747 2016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
5749         * c-opts.c (c_common_post_options): Remove special case for
5750         TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5751         in C++.
5753 2016-09-27  Jakub Jelinek  <jakub@redhat.com>
5755         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5756         -std=c++1z.
5758         * c-ada-spec.c (print_ada_declaration): Remove break after return.
5760 2016-09-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5762         * c-common.c: Include memmodel.h.
5764 2016-09-26  Marek Polacek  <polacek@redhat.com>
5766         * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5768 2016-09-26  Marek Polacek  <polacek@redhat.com>
5770         PR c/7652
5771         * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5772         (handle_fallthrough_attribute): New function.
5773         (attribute_fallthrough_p): New function.
5774         * c-common.h (attribute_fallthrough_p): Declare.
5776 2016-09-24  Marek Polacek  <polacek@redhat.com>
5778         PR c/77490
5779         * c.opt (Wbool-operation): New.
5781 2016-09-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5783         * c-common.c (c_common_truthvalue_conversion): Inhibit
5784         Wint-in-bool-context warning with from_macro_definition_at.
5785         Mention the expression will always evaluate to true.
5787 2016-09-21  Martin Sebor  <msebor@redhat.com>
5789         PR bootstrap/77676
5790         * c.opt (fprintf-return-value): Temporarily initialize to zero
5791         to unblock bootstrap failures.
5793 2016-09-21  Jakub Jelinek  <jakub@redhat.com>
5795         PR c++/77651
5796         * c.opt (Waligned-new=): Add RejectNegative.
5797         (faligned-new=): Likewise.  Spelling fix - change
5798         aligned_new_threshhold to aligned_new_threshold.
5799         * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5800         to aligned_new_threshold.
5802 2016-09-20  Martin Sebor  <msebor@redhat.com>
5804         PR middle-end/49905
5805         * c.opt: Add -Wformat-length and -fprintf-return-value.
5807 2016-09-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5809         PR c++/77434
5810         * c.opt (Wint-in-bool-context): New warning.
5811         * c-common.c (c_common_truthvalue_conversion): Warn on integer
5812         constants in boolean context.
5814 2016-09-19  Joseph Myers  <joseph@codesourcery.com>
5816         * c-common.c (max_align_t_align): Also consider alignment of
5817         float128_type_node.
5819 2016-09-15  Jason Merrill  <jason@redhat.com>
5821         * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5822         DECL_EXTERNAL.
5824 2016-09-14  Jason Merrill  <jason@redhat.com>
5826         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5827         limit FIELD_DECL, either.
5829 2016-09-14  Marek Polacek  <polacek@redhat.com>
5831         * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5832         * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5833         * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5835 2016-09-13  David Malcolm  <dmalcolm@redhat.com>
5837         * c-common.c (warn_logical_not_parentheses): Replace
5838         rich_location::add_fixit_insert calls with add_fixit_insert_before
5839         and add_fixit_insert_after, eliminating the "next_loc" calculation.
5841 2016-09-13  Jason Merrill  <jason@redhat.com>
5842             Tom de Vries  <tom@codesourcery.com>
5844         PR c++/77427
5845         * c-common.c (set_underlying_type): Don't treat array as builtin type.
5847 2016-09-13  Jason Merrill  <jason@redhat.com>
5849         * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5850         limit types at all.
5852 2016-09-12  Jason Merrill  <jason@redhat.com>
5854         * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5855         bit/byte confusion, allow large alignment for types.
5857 2016-09-12  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5859         PR c++/77496
5860         * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5862 2016-09-12  David Malcolm  <dmalcolm@redhat.com>
5864         PR c/72858
5865         * c-format.c (argument_parser::check_argument_type): Add params
5866         "type_start" and "conversion_char".  Use the former to generate
5867         offset_to_type_start and pass it and conversion_char to
5868         check_format_types.
5869         (check_format_info_main): Capture the start of the type
5870         information as "type_start", and pass it an format_char
5871         to arg_parser.check_argument_type.
5872         (check_format_types): Provide an example in the leading comment.
5873         Add params "offset_to_type_start" and "conversion_char"; pass
5874         them to format_type_warning calls.
5875         (test_get_modifier_for_format_len): Likewise.
5876         (matching_type_p): New function.
5877         (get_format_for_type): Add param "conversion_char" and move
5878         implementation into...
5879         (get_format_for_type_1): ...new function, called twice.
5880         Use new function matching_type_p rather than checking for
5881         TYPE_CANONICAL equality.
5882         (get_corrected_substring): New function.
5883         (format_type_warning): Provide an example in the leading comment.
5884         Add params "offset_to_type_start" and "conversion_char".  Replace
5885         call to get_format_for_type with call to get_corrected_substring
5886         and move rejection of hints for widths/precisions there.
5887         (assert_format_for_type_streq): Add param "conversion_char".
5888         (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5889         (test_get_format_for_type_printf): Add conversion chars to the
5890         tests, adding coverage for various combinations of integer
5891         vs double conversions, and for preserving octal and hexadecimal
5892         conversions.
5893         (test_get_format_for_type_scanf): Add conversion chars to the
5894         tests.
5896 2016-09-10  Tom de Vries  <tom@codesourcery.com>
5898         PR C/71602
5899         * c-common.c (build_va_arg): Handle more strict
5900         targetm.canonical_va_list_type.  Replace first argument type error with
5901         assert.
5903 2016-09-09  Martin Sebor  <msebor@redhat.com>
5905         PR c/77520
5906         PR c/77521
5907         * c-format.c (argument_parser::find_format_char_info): Use %qc
5908         format directive unconditionally.
5910 2016-09-09  Jason Merrill  <jason@redhat.com>
5912         Implement C++17 new of over-aligned types.
5913         * c.opt: Add -faligned-new and -Waligned-new.
5914         * c-common.c (max_align_t_align): Split out from...
5915         (cxx_fundamental_alignment_p): ...here.
5916         * c-common.h: Declare it.
5917         * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5919 2016-09-09  Joseph Myers  <joseph@codesourcery.com>
5921         * c-cppbuiltin.c (builtin_define_type_width): New function.
5922         (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5923         macros.
5925 2016-09-07  David Malcolm  <dmalcolm@redhat.com>
5927         * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5928         a POINTER_TYPE.
5929         (substring_loc::get_location): Move to substring-locations.c,
5930         keeping implementation as...
5931         (c_get_substring_location): New function, from the above, reworked
5932         to use accessors rather than member lookup.
5933         * c-common.h (class substring_loc): Move to substring-locations.h,
5934         replacing with a forward decl.
5935         (c_get_substring_location): New decl.
5936         * c-format.c: Include "substring-locations.h".
5937         (format_warning_va): Move to substring-locations.c.
5938         (format_warning_at_substring): Likewise.
5940 2016-09-06  Martin Sebor  <msebor@redhat.com>
5942         PR c/77336
5943         * c-format.c (check_function_format): Avoid issuing warnings for
5944         functions unless they call format functions with non-constant
5945         format strings.
5947 2016-09-06  Richard Biener  <rguenther@suse.de>
5949         PR c/77450
5950         * c-common.c (c_common_mark_addressable_vec): Handle
5951         COMPOUND_LITERAL_EXPR.
5953 2016-09-05  Marek Polacek  <polacek@redhat.com>
5955         PR c/77423
5956         * c-common.c (bool_promoted_to_int_p): New function.
5957         (expr_has_boolean_operands_p): New function.
5958         (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5959         (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5961 2016-09-04  Tom de Vries  <tom@codesourcery.com>
5963         revert:
5964         2016-08-29  Tom de Vries  <tom@codesourcery.com>
5966         * c-common.c (build_va_arg): Replace first argument type error
5967         with assert.
5969 2016-09-02  Jakub Jelinek  <jakub@redhat.com>
5971         PR c/65467
5972         * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5973         (c_finish_omp_for): Reject _Atomic qualified iterators.
5975 2016-09-01  Martin Sebor  <msebor@redhat.com>
5977         * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5978         size to guarantee it fits the output of the formatted function
5979         regardless of its arguments.
5981 2016-09-01  Marek Polacek  <polacek@redhat.com>
5983         PR c/7652
5984         * c-common.c (resolve_overloaded_builtin): Fix formatting.  Add
5985         FALLTHRU comments.
5987 2016-08-29  Marek Polacek  <polacek@redhat.com>
5989         PR c/77292
5990         * c-common.c (warn_logical_not_parentheses): Don't warn for
5991         a comparison or a logical operator.
5993 2016-08-29  Tom de Vries  <tom@codesourcery.com>
5995         * c-common.c (build_va_arg): Fix type comparison assert.
5997 2016-08-29  Tom de Vries  <tom@codesourcery.com>
5999         * c-common.c (build_va_arg): Replace first argument type error
6000         with assert.
6002 2016-08-29  Tom de Vries  <tom@codesourcery.com>
6004         PR c/77398
6005         * c-common.c (build_va_arg): Add first argument error.  Build va_arg
6006         with error_mark_node as va_list instead of with illegal va_list.
6008 2016-08-25  Marek Polacek  <polacek@redhat.com>
6009             David Malcolm  <dmalcolm@redhat.com>
6011         * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6012         * c-common.h (warn_logical_not_parentheses): Update declaration.
6014 2016-08-22  Marek Polacek  <polacek@redhat.com>
6016         PR c++/77321
6017         * c-common.c (warn_for_memset): Check type for null.
6019 2016-08-22  Joseph Myers  <joseph@codesourcery.com>
6021         * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6022         _FloatNx types for suffixes for built-in functions.
6024 2016-08-19  Joseph Myers  <joseph@codesourcery.com>
6026         PR c/32187
6027         * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6028         (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6029         (RID_FLOAT128X): New enum rid values.
6030         (CASE_RID_FLOATN_NX): New macro.
6031         * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6032         keywords.
6033         (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6034         corresponding complex types.
6035         (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6036         _FloatNx and corresponding complex types.
6037         (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6038         * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6039         and _FloatNx types for the widest type for determining
6040         DECIMAL_DIG.  Define __LDBL_DECIMAL_DIG__ as well as
6041         __DECIMAL_DIG__ for long double.  Handle FMA_SUFFIX being NULL.
6042         (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6043         and _FloatNx types.
6044         * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6045         constants.
6046         * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6047         _FloatNx types.
6049 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
6051         * c-opts.c (c_diagnostic_finalizer): Update for change to
6052         diagnostic_show_locus.
6054 2016-08-18  David Malcolm  <dmalcolm@redhat.com>
6056         * c-common.c: Include "spellcheck.h".
6057         (cb_get_suggestion): New function.
6058         * c-common.h (cb_get_suggestion): New decl.
6059         * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6060         cb_get_suggestion.
6062 2016-08-18  Marek Polacek  <polacek@redhat.com>
6064         PR c/71514
6065         * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6066         and pointer-to-VLA.
6068 2016-08-16  David Malcolm  <dmalcolm@redhat.com>
6070         PR c/72857
6071         * c-common.c (substring_loc::get_range): Rename to...
6072         (substring_loc::get_location): ...this, converting param from a
6073         source_range * to a location_t *.  Call
6074         get_source_location_for_substring rather than
6075         get_source_range_for_substring, and pass in m_caret_idx.
6076         * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6077         (substring_loc::get_range): Replace with...
6078         (substring_loc::get_location): ...this.
6079         (substring_loc::set_caret_index): New method.
6080         (substring_loc): Add field m_caret_idx.
6081         * c-format.c (format_warning_va): Update for above changes.
6082         Rename local "substring_loc" to "fmt_substring_loc" to avoid
6083         clashing with type name.
6084         (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6085         (check_argument_type): Likewise.
6086         (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6087         Use a copy when emitting warnings, setting the caret index from TYPE.
6089 2016-08-16  Eric Botcazou  <ebotcazou@adacore.com>
6090             Arnaud Charlet  <charlet@adacore.com>
6092         * c-ada-spec.c (dump_number): New function.
6093         (handle_escape_character): Likewise.
6094         (print_ada_macros): Add handling of constant integers and strings.
6096 2016-08-12  Marek Polacek  <polacek@redhat.com>
6098         PR c/7652
6099         * c-common.c (scalar_to_vector): Adjust fall through comment.
6100         * c-opts.c (c_common_handle_option): Likewise.
6101         * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6102         * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6103         fall through comment.
6104         * cilk.c (extract_free_variables): Add FALLTHRU.
6106 2016-08-10  Jason Merrill  <jason@redhat.com>
6108         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6110 2016-08-09  Jason Merrill  <jason@redhat.com>
6112         * c-common.c (c_common_attribute_table): vector_size affects type
6113         identity.
6115 2016-08-09  Marek Polacek  <polacek@redhat.com>
6117         PR c/7652
6118         * c-ada-spec.c (dump_generic_ada_node): Add return.
6120 2016-08-09  Jason Merrill  <jason@redhat.com>
6122         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6123         C++17 constexpr lambdas.
6125 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
6127         PR c/64955
6128         * c-common.h (selftest::c_format_c_tests): New declaration.
6129         (selftest::run_c_tests): New declaration.
6130         * c-format.c: Include "selftest.h.
6131         (format_warning_va): Add param "corrected_substring" and use
6132         it to add a replacement fix-it hint.
6133         (format_warning_at_substring): Likewise.
6134         (format_warning_at_char): Update for new param of
6135         format_warning_va.
6136         (argument_parser::check_argument_type): Pass "fki" to
6137         check_format_types.
6138         (check_format_types): Add param "fki" and pass it to
6139         format_type_warning.
6140         (deref_n_times): New function.
6141         (get_modifier_for_format_len): New function.
6142         (selftest::test_get_modifier_for_format_len): New function.
6143         (get_format_for_type): New function.
6144         (format_type_warning): Add param "fki" and use it to attempt
6145         to provide hints for argument types when calling
6146         format_warning_at_substring.
6147         (selftest::get_info): New function.
6148         (selftest::assert_format_for_type_streq): New function.
6149         (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6150         (selftest::test_get_format_for_type_printf): New function.
6151         (selftest::test_get_format_for_type_scanf): New function.
6152         (selftest::c_format_c_tests): New function.
6154 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
6156         PR c/52952
6157         * c-format.c: Include "diagnostic.h".
6158         (location_column_from_byte_offset): Delete.
6159         (location_from_offset): Delete.
6160         (format_warning_va): New function.
6161         (format_warning_at_substring): New function.
6162         (format_warning_at_char): New function.
6163         (check_format_arg): Capture location of format_tree and pass to
6164         check_format_info_main.
6165         (argument_parser): Add fields "start_of_this_format" and
6166         "format_string_cst".
6167         (flag_chars_t::validate): Add param "format_string_cst".  Convert
6168         warning_at call using location_from_offset to call to
6169         format_warning_at_char.
6170         (argument_parser::argument_parser): Add param "format_string_cst_"
6171         and use use it to initialize field "format_string_cst".
6172         Initialize new field "start_of_this_format".
6173         (argument_parser::read_format_flags): Convert warning_at call
6174         using location_from_offset to a call to format_warning_at_char.
6175         (argument_parser::read_any_format_left_precision): Likewise.
6176         (argument_parser::read_any_format_precision): Likewise.
6177         (argument_parser::read_any_other_modifier): Likewise.
6178         (argument_parser::find_format_char_info): Likewise, in three places.
6179         (argument_parser::parse_any_scan_set): Likewise, in one place.
6180         (argument_parser::handle_conversions): Likewise, in two places.
6181         (argument_parser::check_argument_type): Add param "fmt_param_loc"
6182         and use it to make a substring_loc.  Pass the latter to
6183         check_format_types.
6184         (check_format_info_main): Add params "fmt_param_loc" and
6185         "format_string_cst".  Convert warning_at calls using
6186         location_from_offset to calls to format_warning_at_char.  Pass the
6187         new params to the arg_parser ctor.  Pass "format_string_cst" to
6188         flag_chars.validate.  Pass "fmt_param_loc" to
6189         arg_parser.check_argument_type.
6190         (check_format_types): Convert first param from a location_t
6191         to a const substring_loc & and rename to "fmt_loc".  Attempt
6192         to extract the range of the relevant parameter and pass it
6193         to format_type_warning.
6194         (format_type_warning): Convert first param from a location_t
6195         to a const substring_loc & and rename to "fmt_loc".  Add
6196         params "param_range" and "type".  Replace calls to warning_at
6197         with calls to format_warning_at_substring.
6199 2016-08-08  David Malcolm  <dmalcolm@redhat.com>
6201         * c-format.c (class flag_chars_t): New class.
6202         (struct length_modifier): New struct.
6203         (class argument_parser): New class.
6204         (flag_chars_t::flag_chars_t): New ctor.
6205         (flag_chars_t::has_char_p): New method.
6206         (flag_chars_t::add_char): New method.
6207         (flag_chars_t::validate): New method.
6208         (flag_chars_t::get_alloc_flag): New method.
6209         (flag_chars_t::assignment_suppression_p): New method.
6210         (argument_parser::argument_parser): New ctor.
6211         (argument_parser::read_any_dollar): New method.
6212         (argument_parser::read_format_flags): New method.
6213         (argument_parser::read_any_format_width): New method.
6214         (argument_parser::read_any_format_left_precision): New method.
6215         (argument_parser::read_any_format_precision): New method.
6216         (argument_parser::handle_alloc_chars): New method.
6217         (argument_parser::read_any_length_modifier): New method.
6218         (argument_parser::read_any_other_modifier): New method.
6219         (argument_parser::find_format_char_info): New method.
6220         (argument_parser::validate_flag_pairs): New method.
6221         (argument_parser::give_y2k_warnings): New method.
6222         (argument_parser::parse_any_scan_set): New method.
6223         (argument_parser::handle_conversions): New method.
6224         (argument_parser::check_argument_type): New method.
6225         (check_format_info_main): Introduce classes argument_parser
6226         and flag_chars_t, moving the code within the loop into methods
6227         of these classes.  Make various locals "const".
6229 2016-08-05  David Malcolm  <dmalcolm@redhat.com>
6231         * c-common.c: Include "substring-locations.h".
6232         (get_cpp_ttype_from_string_type): New function.
6233         (g_string_concat_db): New global.
6234         (substring_loc::get_range): New method.
6235         * c-common.h (g_string_concat_db): New declaration.
6236         (class substring_loc): New class.
6237         * c-lex.c (lex_string): When concatenating strings, capture the
6238         locations of all tokens using a new obstack, and record the
6239         concatenation locations within g_string_concat_db.
6240         * c-opts.c (c_common_init_options): Construct g_string_concat_db
6241         on the ggc-heap.
6243 2016-07-29  Marek Polacek  <polacek@redhat.com>
6245         PR c/71926
6246         * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6247         parentheses warning.
6249         PR c/71574
6250         * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6252 2016-07-28  Martin Liska  <mliska@suse.cz>
6254         PR gcov-profile/68025
6255         * c-common.c (handle_no_profile_instrument_function_attribute):
6257 2016-07-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6259         * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6260         BITS_PER_UNIT_LOG.
6262 2016-07-25  Jason Merrill  <jason@redhat.com>
6264         PR c++/65970
6265         * c.opt (fconstexpr-loop-limit): New.
6267 2016-07-22  Martin Sebor  <msebor@redhat.com>
6269         PR c++/71675
6270         * c-common.c (resolve_overloaded_builtin): Avoid converting
6271         __atomic_compare_exchange_n return type to that of what its
6272         first argument points to.
6274 2016-07-22  Uros Bizjak  <ubizjak@gmail.com>
6276         * c-common.c: Use HOST_WIDE_INT_M1U instead of
6277         ~(unsigned HOST_WIDE_INT) 0.
6279 2016-07-22  Martin Liska  <mliska@suse.cz>
6281         PR gcov-profile/69028
6282         PR gcov-profile/62047
6283         * cilk.c (create_cilk_helper_decl): Set location of a new decl
6284         to the current_function_decl.
6286 2016-07-21  Jason Merrill  <jason@redhat.com>
6288         PR c++/65168
6289         * c-common.c (c_common_truthvalue_conversion): Check
6290         c_inhibit_evaluation_warnings for warning about address of
6291         reference.
6293 2016-07-20  David Malcolm  <dmalcolm@redhat.com>
6295         * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6296         const char *.
6298 2016-07-15  Jason Merrill  <jason@redhat.com>
6300         * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6302 2016-07-15  Jakub Jelinek  <jakub@redhat.com>
6304         PR c/71858
6305         * c-common.h (enum lookup_name_fuzzy_kind): Add
6306         FUZZY_LOOKUP_FUNCTION_NAME.
6308 2016-07-08  Jason Merrill  <jason@redhat.com>
6310         P0145: Refining Expression Order for C++.
6311         * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
6312         * c-opts.c: Adjust.
6314 2016-07-05  Markus Trippelsdorf  <markus@trippelsdorf.de>
6316         PR c++/71214
6317         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
6319 2016-06-29  Thomas Schwinge  <thomas@codesourcery.com>
6321         * c-pragma.h (enum pragma_kind): Rename
6322         PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE.  Adjust all
6323         users.
6325 2016-06-29  Richard Biener  <rguenther@suse.de>
6327         PR middle-end/71002
6328         * c-common.c (c_common_get_alias_set): Remove union type punning case.
6330 2016-06-24  Jason Merrill  <jason@redhat.com>
6332         P0145R2: Refining Expression Order for C++.
6333         * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
6334         MODIFY_EXPR.
6336 2016-06-24  Jakub Jelinek  <jakub@redhat.com>
6338         * c-common.c (check_builtin_function_arguments): Require last
6339         argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
6340         Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
6341         if the last argument is pointer to enumerated or boolean type.
6343 2016-06-22  David Malcolm  <dmalcolm@redhat.com>
6345         PR c/70339
6346         * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6347         (lookup_name_fuzzy): New prototype.
6349 2016-06-21  John David Anglin  <danglin@gcc.gnu.org>
6351         * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6353 2016-06-14  Jason Merrill  <jason@redhat.com>
6355         P0145R2: Refining Expression Order for C++.
6356         * c.opt (fargs-in-order): New.
6357         * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6359 2016-06-13  Jakub Jelinek  <jakub@redhat.com>
6361         PR sanitizer/71498
6362         * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6363         all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6365         PR preprocessor/71183
6366         * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6367         to cb_get_source_date_epoch.
6369 2016-06-10  Jakub Jelinek  <jakub@redhat.com>
6371         PR c/68657
6372         * c.opt (Wpsabi): Add Warning flag.
6374 2016-06-10  Martin Sebor  <msebor@redhat.com>
6376         PR c/71392
6377         * c-common.c (handle_nonnull_attribute): Accept
6378         the nonnull attribute in type-generic builtins.
6380 2016-06-09  Martin Sebor  <msebor@redhat.com>
6382         PR c/70883
6383         * c-common.c (builtin_function_validate_nargs): Make text of error
6384         message consistent with others like it.
6386 2016-06-08  Martin Sebor  <msebor@redhat.com>
6387             Jakub Jelinek  <jakub@redhat.com>
6389         PR c++/70507
6390         PR c/68120
6391         * c-common.c (check_builtin_function_arguments): Handle
6392         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6394 2016-06-08  Richard Biener  <rguenther@suse.de>
6396         * c-common.c (parse_optimize_options): Improve diagnostic messages.
6398 2016-06-07  Richard Biener  <rguenther@suse.de>
6400         PR c/61564
6401         * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6402         options and warn about others.
6404 2016-06-01  Eduard Sanou  <dhole@openmailbox.org>
6406         * c-common.c (get_source_date_epoch): Rename to
6407         cb_get_source_date_epoch.
6408         * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6409         message when the parsing fails.  Use error_at instead of fatal_error.
6410         * c-common.h (get_source_date_epoch): Rename to
6411         cb_get_source_date_epoch.
6412         * c-common.h (cb_get_source_date_epoch): Prototype.
6413         * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6414         * c-common.h (c_omp_region_type): Remove trailing comma.
6415         * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6416         * c-lex.c (c_lex_with_flags): Remove initialization of
6417         pfile->source_date_epoch.
6419 2016-05-30  Jakub Jelinek  <jakub@redhat.com>
6421         PR c++/71349
6422         * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6423         C_OMP_CLAUSE_SPLIT_TARGET.  Put OMP_CLAUSE_NOWAIT to
6424         C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6425         instead of C_OMP_CLAUSE_SPLIT_FOR.
6427 2016-05-24  Richard Biener  <rguenther@suse.de>
6429         PR middle-end/70434
6430         PR c/69504
6431         * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6432         (convert_vector_to_array_for_subscript): ... this.
6433         * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6434         VIEW_CONVERT_EXPR to an array type.  Rename to ...
6435         (convert_vector_to_array_for_subscript): ... this.
6437 2016-05-12  Marek Polacek  <polacek@redhat.com>
6439         PR c/70756
6440         * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6441         size_in_bytes and pass LOC to it.
6443 2016-05-11  Mikhail Maltsev  <maltsevm@gmail.com>
6445         PR c/43651
6446         * c.opt (Wduplicate-decl-specifier): New option.
6448 2016-05-11  Marek Polacek  <polacek@redhat.com>
6450         PR c++/71024
6451         * c-common.c (diagnose_mismatched_attributes): New function.
6452         * c-common.h (diagnose_mismatched_attributes): Declare.
6454 2016-05-04  Marek Polacek  <polacek@redhat.com>
6456         * c.opt (Wdangling-else): New option.
6458 2016-05-03  Marek Polacek  <polacek@redhat.com>
6460         PR c/70859
6461         * c-common.c (builtin_function_validate_nargs): Add location
6462         parameter.  Use it.
6463         (check_builtin_function_arguments): Add location and arguments
6464         parameters.  Use them.
6465         * c-common.h (check_builtin_function_arguments): Update declaration.
6467 2016-05-03  Richard Biener  <rguenther@suse.de>
6469         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6470         allow call args to gimplify to SSA names.
6472 2016-05-03  Marek Polacek  <polacek@redhat.com>
6474         * c-common.h (enum c_omp_region_type): Remove stray comma.
6476 2016-05-02  Cesar Philippidis  <cesar@codesourcery.com>
6478         * c-common.h (enum c_omp_region_type): Define.
6480 2016-05-02  Richard Sandiford  <richard.sandiford@arm.com>
6482         * c-common.c (shorten_compare): Use wi::to_wide.
6484 2016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
6486         PR middle-end/70626
6487         * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6488         * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6489         reduction clauses in acc parallel loops.
6491 2016-04-29  Marek Polacek  <polacek@redhat.com>
6493         PR c/70852
6494         * c-common.c (warn_for_memset): Check domain before accessing it.
6496 2016-04-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
6498         PR/69089
6499         * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6500         "aligned" attribute.
6502 2016-04-28  Jason Merrill  <jason@redhat.com>
6504         * c-lex.c (c_common_has_attribute): Handle nodiscard.
6506 2016-04-28  Eduard Sanou  <dhole@openmailbox.org>
6507             Matthias Klose  <doko@debian.org>
6509         * c-common.c (get_source_date_epoch): New function, gets the environment
6510         variable SOURCE_DATE_EPOCH and parses it as long long with error
6511         handling.
6512         * c-common.h (get_source_date_epoch): Prototype.
6513         * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6515 2015-04-27  Ryan Burn  <contact@rnburn.com>
6517         PR c++/69024
6518         PR c++/68997
6519         * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6520         (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6521         external linkage.
6522         (cilk_detect_and_unwrap): Corresponding changes.
6523         (extract_free_variables): Don't extract free variables from
6524         AGGR_INIT_EXPR slot.
6525         * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6526         (cilk_recognize_spawn): Likewise.
6528 2016-04-27  Bernd Schmidt  <bschmidt@redhat.com>
6530         * c.opt (Wmemset-elt-size): New option.
6531         * c-common.c (warn_for_memset): New function.
6532         * c-common.h (warn_for_memset): Declare.
6534 2016-04-25  Jason Merrill  <jason@redhat.com>
6536         * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6537         No longer static.
6538         * c-common.h: Declare it.
6539         * c-lex.c (c_common_has_attribute): Add maybe_unused.
6541 2016-04-22  Jason Merrill  <jason@redhat.com>
6543         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6545 2016-04-20  Ilya Verbin  <ilya.verbin@intel.com>
6547         PR c++/69363
6548         * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6549         * c-common.h (c_finish_cilk_clauses): Remove declaration.
6551 2016-04-18  Michael Matz  <matz@suse.de>
6553         * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6554         and SET_DECL_ALIGN.
6556 2016-04-17  Eric Botcazou  <ebotcazou@adacore.com>
6558         * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6559         (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6560         to incomplete types.
6561         (dump_nested_type): Remove redundant tests and tidy up.
6562         (print_ada_declaration): Also set TREE_VISITED on the declaration of
6563         a type which is the typedef of an original type.
6565 2016-04-15  Marek Polacek  <polacek@redhat.com>
6567         PR c/70651
6568         * c-common.c (build_va_arg): Change two asserts into errors and return
6569         error_mark_node.
6571 2016-04-13  Marek Polacek  <polacek@redhat.com>
6573         PR c++/70639
6574         * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6575         for switch statements, too.
6577 2016-03-28  Jason Merrill  <jason@redhat.com>
6579         * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6581 2016-03-23  Marek Polacek  <polacek@redhat.com>
6583         PR c++/69884
6584         * c.opt (Wignored-attributes): New option.
6586 2016-03-22  David Malcolm  <dmalcolm@redhat.com>
6588         PR c/69993
6589         * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6590         diagnostic text, reversing the order of the warning and note so
6591         that they appear in source order.
6593 2016-03-17  Marek Polacek  <polacek@redhat.com>
6595         PR c/69407
6596         * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6597         operations.
6599 2016-03-14  Jason Merrill  <jason@redhat.com>
6601         * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6603         * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6605 2016-03-09  Richard Biener  <rguenther@suse.de>
6607         PR c/70143
6608         * c-common.c (strict_aliasing_warning): Add back
6609         alias_sets_conflict_p check.
6611 2016-03-08  Jason Merrill  <jason@redhat.com>
6613         * c-opts.c (set_std_cxx1z): Don't enable concepts.
6615 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
6617         PR c/68187
6618         * c-indentation.c (get_visual_column): Move code to determine next
6619         tab stop to...
6620         (next_tab_stop): ...this new function.
6621         (line_contains_hash_if): Delete function.
6622         (detect_preprocessor_logic): Delete function.
6623         (get_first_nws_vis_column): New function.
6624         (detect_intervening_unindent): New function.
6625         (should_warn_for_misleading_indentation): Replace call to
6626         detect_preprocessor_logic with a call to
6627         detect_intervening_unindent.
6629 2016-03-04  David Malcolm  <dmalcolm@redhat.com>
6631         PR c/68187
6632         * c-indentation.c (should_warn_for_misleading_indentation): When
6633         suppressing warnings about cases where the guard and body are on
6634         the same column, only use the first non-whitespace column in place
6635         of the guard token column when dealing with "else" clauses.
6636         When rejecting aligned BODY and NEXT, loosen the requirement
6637         from equality with the first non-whitespace of guard to simply
6638         that they not be indented relative to it.
6640 2016-03-04  Richard Biener  <rguenther@suse.de>
6642         PR c++/70054
6643         * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6644         instead of alias_sets_conflict_p.
6646 2016-03-01  Marek Polacek  <polacek@redhat.com>
6648         PR c++/69795
6649         * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6650         any DECL.
6652 2016-02-22  Martin Sebor  <msebor@redhat.com>
6654         PR middle-end/69780
6655         * c-common.c (check_builtin_function_arguments): Validate and
6656         reject invalid arguments to __builtin_alloca_with_align.
6658 2016-02-20  Mark Wielaard  <mjw@redhat.com>
6660         PR c/28901
6661         * c.opt (Wunused-const-variable): Turn into Alias for...
6662         (Wunused-const-variable=): New option.
6664 2016-02-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6666         PR c++/69865
6667         * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6668         here...
6669         (c_common_init_options): ...to here.
6670         (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6672 2016-02-19  Jakub Jelinek  <jakub@redhat.com>
6674         PR c++/69826
6675         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6676         (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6677         flag_preprocess_only.
6679 2016-02-16  Jakub Jelinek  <jakub@redhat.com>
6681         PR c/69835
6682         * c.opt (Wnonnull-compare): Enable for -Wall.
6684 2016-02-15  Jakub Jelinek  <jakub@redhat.com>
6686         PR c++/69797
6687         * c-common.c (sync_resolve_size): Diagnose too few arguments
6688         even when params is non-NULL empty vector.
6690 2016-02-08  Bernd Schmidt  <bschmidt@redhat.com>
6692         PR target/60410
6693         * c.opt (fshort-double): Remove.
6695 2016-02-05  Martin Sebor  <msebor@redhat.com>
6697         PR c++/69662
6698         * c.opt (Warning options): Update -Wplacement-new to take
6699         an optional argument.
6701 2016-02-01  Jakub Jelinek  <jakub@redhat.com>
6703         PR preprocessor/69543
6704         PR c/69558
6705         * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6706         instead of loc to control_warning_option.
6708 2016-02-01  Nathan Sidwell  <nathan@codesourcery.com>
6710         * c.opt (fopenacc-dim=): New option.
6712 2016-01-27  Ryan Burn  <contact@rnburn.com>
6714         PR cilkplus/69267
6715         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6716         gimplify_arg. Removed superfluous post_p argument.
6717         * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6718         superfluous post_p argument.
6719         * c-gimplify.c (c_gimplify_expr): Likewise.
6721 2016-01-26  David Malcolm  <dmalcolm@redhat.com>
6723         PR other/69006
6724         * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6725         pp_newline_and_flush with pp_flush.
6727 2016-01-20  Martin Sebor  <msebor@redhat.com>
6729         PR c/69405
6730         * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6731         an incompatible argument when the argument isn't a valid tree node.
6733 2016-01-18  Jason Merrill  <jason@redhat.com>
6735         PR c++/68767
6736         * c-common.c (check_function_arguments_recurse): Fold the whole
6737         COND_EXPR, not just the condition.
6739 2016-01-18  Tom de Vries  <tom@codesourcery.com>
6741         * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6742         classify as loop clause.
6744 2016-01-15  Jakub Jelinek  <jakub@redhat.com>
6746         PR bootstrap/68271
6747         * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6748         C++ FE no longer has limit on number of pragmas.
6750 2015-01-14  Ryan Burn  <contact@rnburn.com>
6752         PR c++/69048
6753         * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
6754         to add missing cleanup point.
6756 2016-01-14  David Malcolm  <dmalcolm@redhat.com>
6758         PR c++/68819
6759         * c-indentation.c (get_visual_column): Add location_t param.
6760         Handle the column number being zero by effectively disabling the
6761         warning, with an "inform".
6762         (should_warn_for_misleading_indentation): Add location_t argument
6763         for all uses of get_visual_column.
6765 2016-01-10  Patrick Palka  <ppalka@gcc.gnu.org>
6767         PR c++/69029
6768         * c-indentation.c (should_warn_for_misleading_indentation):
6769         Don't warn about do-while statements.
6771 2016-01-07  Martin Sebor  <msebor@redhat.com>
6773         PR c/68966
6774         * c-common.c (sync_resolve_size): Reject first argument when it's
6775         a pointer to _Bool.
6777 2016-01-05  David Malcolm  <dmalcolm@redhat.com>
6779         PR c/69122
6780         * c-indentation.c (get_visual_column): Remove default argument.
6781         (should_warn_for_misleading_indentation): For the multiline case,
6782         update call to get_visual_column for next_stmt_exploc so that it
6783         captures the location of the first non-whitespace character in the
6784         relevant line.  Don't issue warnings if there is non-whitespace
6785         before the next statement.
6787 2016-01-04  Jakub Jelinek  <jakub@redhat.com>
6789         Update copyright years.
6791 2015-12-21  David Malcolm  <dmalcolm@redhat.com>
6793         * c-common.c (binary_op_error): Convert first param from
6794         location_t to rich_location * and use it when emitting an error.
6795         * c-common.h (binary_op_error): Convert first param from
6796         location_t to rich_location *.
6798 2015-12-16  David Malcolm  <dmalcolm@redhat.com>
6800         * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6801         * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6803 2015-12-15  Ilya Verbin  <ilya.verbin@intel.com>
6805         * c-common.c (c_common_attribute_table): Handle "omp declare target
6806         link" attribute.
6808 2015-12-14  Jakub Jelinek  <jakub@redhat.com>
6810         PR c/68833
6811         * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6813 2014-12-12  Tobias Burnus  <burnus@net-b.de>
6815         PR fortran/68815
6816         * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6817         specifiers (%d, %i,%u and %c).
6819 2015-12-10  David Malcolm  <dmalcolm@redhat.com>
6821         * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6823 2015-12-08  Jakub Jelinek  <jakub@redhat.com>
6825         PR c/48088
6826         PR c/68657
6827         * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6828         * c-pragma.c (handle_pragma_diagnostic): Adjust
6829         control_warning_option caller.
6831 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
6833         * c-common.c (c_cpp_error): Update for change to
6834         rich_location::set_range.
6836 2015-12-04  Paolo Bonzini  <bonzini@gnu.org>
6838         * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6839         shifting 1 out of the sign bit.
6841 2015-12-04  Kirill Yukhin  <kirill.yukhin@intel.com>
6843         * c-common.c (c_common_attribute_table[]): Update max arguments
6844         count for "simd" attribute.
6845         (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6847 2015-12-03  Jakub Jelinek  <jakub@redhat.com>
6849         PR preprocessor/57580
6850         * c-ppoutput.c (print): Change printed field to bool.
6851         Move src_file last for smaller padding.
6852         (init_pp_output): Set print.printed to false instead of 0.
6853         (scan_translation_unit): Fix up formatting.  Set print.printed
6854         to true after printing something other than newline.
6855         (scan_translation_unit_trad): Set print.printed to true instead of 1.
6856         (maybe_print_line_1): Set print.printed to false instead of 0.
6857         (print_line_1): Likewise.
6858         (do_line_change): Set print.printed to true instead of 1.
6859         (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6860         dump_macro): Set print.printed to false after printing newline.
6862 2015-12-02  Jason Merrill  <jason@redhat.com>
6864         * c-common.c (fold_for_warn): New.
6865         (warn_logical_operator, warn_tautological_cmp)
6866         (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6868         * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6869         (c_fully_fold_internal, decl_constant_value_for_optimization):
6870         Move to c/c-fold.c.
6871         * c-common.h: Don't declare decl_constant_value_for_optimization.
6873 2015-12-02  Joseph Myers  <joseph@codesourcery.com>
6875         PR c/68162
6876         * c-common.h (c_build_qualified_type): Add extra default
6877         arguments.
6879 2015-12-01  Julian Brown  <julian@codesourcery.com>
6880             Cesar Philippidis  <cesar@codesourcery.com>
6881             James Norris  <James_Norris@mentor.com>
6883         * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6884         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6885         (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6887 2015-11-30  Eric Botcazou  <ebotcazou@adacore.com>
6889         * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6890         (decl_sloc_common): Delete and move bulk of processing to...
6891         (decl_sloc): ...here.
6892         (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6893         (dump_ada_double_name): Remove S parameter and compute the suffix.
6894         (dump_ada_array_type): Add PARENT parameter.  Simplify computation of
6895         element type and deal with an anonymous one.
6896         (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6897         (dump_generic_ada_node): Tweak.  Adjust call to dump_ada_array_type
6898         and remove reference to QUAL_UNION_TYPE.
6899         (dump_nested_types): Make 2 passes on the fields and move bulk to...
6900         (dump_nested_type): ...here.  New function extracted from above.
6901         Generate a full declaration for anonymous element type of arrays.
6902         (print_ada_declaration): Really skip anonymous declarations.  Remove
6903         references to QUAL_UNION_TYPE.  Adjust call to dump_ada_array_type.
6904         Clean up processing of declarations of array types and objects.
6905         (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6906         Remove obsolete code and tidy up.
6908 2015-11-29  Jan Hubicka  <hubicka@ucw.cz>
6910         PR c/67581
6911         * c-common.c (handle_transparent_union_attribute): Update
6912         also type variants.
6914 2015-11-27  Martin Liska  <mliska@suse.cz>
6916         PR c++/68312
6917         * array-notation-common.c (cilkplus_extract_an_triplets):
6918         Release vector of vectors.
6919         * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6921 2015-11-26  Eric Botcazou  <ebotcazou@adacore.com>
6923         PR c++/68527
6924         * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6925         (print_ada_struct_decl): Likewise.
6927 2015-11-23  Igor Zamyatin  <igor.zamyatin@intel.com>
6929         PR c++/68001
6930         * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6931         * cilk.c (recognize_spawn): Determine location in a more precise
6932         way.
6934 2015-11-19  Jason Merrill  <jason@redhat.com>
6936         * c-common.c (shorten_compare): But look through macros from
6937         system headers.
6939 2015-11-18  Jason Merrill  <jason@redhat.com>
6941         * c-common.c (shorten_compare): Don't -Wtype-limits if the
6942         non-constant operand comes from a macro.
6944 2015-11-17  Jason Merrill  <jason@redhat.com>
6946         PR bootstrap/68346
6947         * c-common.c (warn_tautological_cmp): Fold before checking for
6948         constants.
6950 2015-11-16  Marek Polacek  <polacek@redhat.com>
6952         PR c++/68362
6953         * c-common.c (check_case_bounds): Fold low and high cases.
6955 2015-11-16  Marek Polacek  <polacek@redhat.com>
6957         * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6958         * c-common.c (c_common_get_alias_set): Likewise.
6959         (handle_visibility_attribute): Likewise.
6961 2015-11-16  Kirill Yukhin  <kirill.yukhin@intel.com>
6963         * c-common.c (handle_simd_attribute): New.
6964         (struct attribute_spec): Add entry for "simd".
6965         (handle_simd_attribute): New.
6967 2015-11-13  Kai Tietz  <ktietz70@googlemail.com>
6969         * c-lex.c (interpret_float): Use fold_convert.
6971 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
6973         * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6974         and store it on the result.
6975         * c-opts.c (c_common_init_options): Set
6976         global_dc->colorize_source_p.
6978 2015-11-12  James Norris  <jnorris@codesourcery.com>
6979             Joseph Myers  <joseph@codesourcery.com>
6981         * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6982         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6983         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6984         PRAGMA_OACC_CLAUSE_LINK.
6986 2015-11-11  Marek Polacek  <polacek@redhat.com>
6988         PR c/68107
6989         PR c++/68266
6990         * c-common.c (valid_array_size_p): New function.
6991         * c-common.h (valid_array_size_p): Declare.
6993 2015-11-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
6995         PR bootstrap/68271
6996         * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6998 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
7000         * array-notation-common.c: Remove unused header files.
7001         * c-ada-spec.c: Likewise.
7002         * c-cilkplus.c: Likewise.
7003         * c-common.c: Likewise.
7004         * c-cppbuiltin.c: Likewise.
7005         * c-dump.c: Likewise.
7006         * c-format.c: Likewise.
7007         * c-gimplify.c: Likewise.
7008         * c-indentation.c: Likewise.
7009         * c-lex.c: Likewise.
7010         * c-omp.c: Likewise.
7011         * c-opts.c: Likewise.
7012         * c-pch.c: Likewise.
7013         * c-ppoutput.c: Likewise.
7014         * c-pragma.c: Likewise.
7015         * c-pretty-print.c: Likewise.
7016         * c-semantics.c: Likewise.
7017         * c-ubsan.c: Likewise.
7018         * cilk.c: Likewise.
7019         * stub-objc.c: Likewise.
7021 2015-11-09  Thomas Schwinge  <thomas@codesourcery.com>
7022             Cesar Philippidis  <cesar@codesourcery.com>
7023             James Norris  <jnorris@codesourcery.com>
7024             Julian Brown  <julian@codesourcery.com>
7025             Nathan Sidwell  <nathan@codesourcery.com>
7027         * c-pragma.c (oacc_pragmas): Add "routine".
7028         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7030 2015-11-08  Eric Botcazou  <ebotcazou@adacore.com>
7032         * c-common.c (c_common_attributes): Add scalar_storage_order.
7033         (handle_scalar_storage_order_attribute): New function.
7034         * c-pragma.c (global_sso): New variable.
7035         (maybe_apply_pragma_scalar_storage_order): New function.
7036         (handle_pragma_scalar_storage_order): Likewise.
7037         (init_pragma): Register scalar_storage_order.
7038         * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7039         * c.opt (Wscalar-storage-order): New warning.
7040         (fsso-struct=): New option.
7042 2015-11-08  Martin Sebor  <msebor@redhat.com>
7044         * c.opt (Wplacement-new): Add a period to the end of a sentence.
7046 2015-11-07  Richard Sandiford  <richard.sandiford@arm.com>
7048         * c-common.c: Don't undef DEF_BUILTIN.
7050 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
7052         * c-common.c (c_cpp_error): Convert parameter from location_t to
7053         rich_location *.  Eliminate the "column_override" parameter and
7054         the call to diagnostic_override_column.
7055         Update the "done_lexing" clause to set range 0
7056         on the rich_location, rather than overwriting a location_t.
7057         * c-common.h (c_cpp_error): Convert parameter from location_t to
7058         rich_location *.  Eliminate the "column_override" parameter.
7060 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
7061             Thomas Schwinge  <thomas@codesourcery.com>
7062             James Norris  <jnorris@codesourcery.com>
7064         * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7065         AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses.  Associate REDUCTION
7066         clauses with parallel and kernels and loops.
7067         * c-pragma.h (enum pragma_omp_clause): Add entries for
7068         PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7069         * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7070         NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7071         INDEPENDENT,SEQ}.
7072         (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7074 2015-11-05  Martin Sebor  <msebor@redhat.com>
7076         PR c++/67942
7077         * c.opt (-Wplacement-new): New option.
7079 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
7081         * c-common.h (c_finish_omp_atomic): Add TEST argument.
7082         (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7083         * c-omp.c (c_finish_omp_atomic): Add TEST argument.  Don't call
7084         save_expr or create_tmp_var* if TEST is true.
7085         (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7086         Don't call add_stmt here.
7087         (struct c_omp_check_loop_iv_data): New type.
7088         (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7089         c_omp_check_loop_iv_exprs): New functions.
7090         (c_omp_split_clauses): Adjust for lastprivate being allowed on
7091         distribute.
7092         (c_omp_declare_simd_clauses_to_numbers): Change
7093         OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7094         (c_omp_declare_simd_clauses_to_decls): Similarly change those
7095         from numbers to PARM_DECLs.
7097 2015-11-04  Mikhail Maltsev  <maltsevm@gmail.com>
7099         * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7100         flag_checking.
7102 2015-11-03  Bernd Schmidt  <bschmidt@redhat.com>
7104         PR c++-common/67882
7105         * c-common.h (fold_offsetof_1): Add argument.
7106         * c-common.c (fold_offsetof_1): Diagnose more invalid
7107         offsetof expressions that reference elements past the end of
7108         an array.
7110 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
7111             Chung-Lin Tang  <cltang@codesourcery.com>
7113         * c-pragma.c (oacc_pragmas): Add "atomic".
7114         * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7116 2015-10-30  Evgeny Stupachenko  <evstupac@gmail.com>
7118         * c-common.c (handle_target_clones_attribute): New.
7119         (c_common_attribute_table): Add handle_target_clones_attribute.
7120         (handle_always_inline_attribute): Add check on target_clones attribute.
7121         (handle_target_attribute): Ditto.
7123 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
7125         * array-notation-common.c: Reorder #include's and remove duplicates.
7126         * c-ada-spec.c: Likewise.
7127         * c-cilkplus.c: Likewise.
7128         * c-common.c: Likewise.
7129         * c-cppbuiltin.c: Likewise.
7130         * c-dump.c: Likewise.
7131         * c-format.c: Likewise.
7132         * c-gimplify.c: Likewise.
7133         * c-indentation.c: Likewise.
7134         * c-lex.c: Likewise.
7135         * c-omp.c: Likewise.
7136         * c-opts.c: Likewise.
7137         * c-pch.c: Likewise.
7138         * c-ppoutput.c: Likewise.
7139         * c-pragma.c: Likewise.
7140         * c-pretty-print.c: Likewise.
7141         * c-semantics.c: Likewise.
7142         * c-ubsan.c: Likewise.
7143         * cilk.c: Likewise.
7144         * stub-objc.c: Likewise.
7146 2015-10-28  Jason Merrill  <jason@redhat.com>
7148         * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7150 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
7151             James Norris  <jnorris@codesourcery.com>
7152             Cesar Philippidis  <cesar@codesourcery.com>
7154         PR c/64765
7155         PR c/64880
7156         * c-common.h (c_oacc_split_loop_clauses): Declare function.
7157         * c-omp.c (c_oacc_split_loop_clauses): New function.
7159 2015-10-21  Martin Sebor  <msebor@redhat.com>
7161         PR driver/68043
7162         * c.opt: End each sentence that describes an option with a period.
7164 2015-10-20  Marek Polacek  <polacek@redhat.com>
7166         * array-notation-common.c (is_cilkplus_vector_p): Define.
7167         * c-common.h (is_cilkplus_vector_p): Declare.
7169 2015-10-20  Marek Polacek  <polacek@redhat.com>
7171         * c.opt (std=gnu++11): Do not describe as experimental.
7172         (std=gnu++14): Likewise.
7174 2015-10-19  Jason Merrill  <jason@redhat.com>
7176         * c-cppbuiltin.c (c_cpp_builtins): Define
7177         __cpp_nontype_template_args.
7179 2015-10-19  Jason Merrill  <jason@redhat.com>
7181         * c-cppbuiltin.c (c_cpp_builtins): Define
7182         __cpp_enumerator_attributes, __cpp_fold_expressions,
7183         __cpp_unicode_characters.
7185 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
7186             Aldy Hernandez  <aldyh@redhat.com>
7188         * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7189         DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7190         (c_define_builtins): Likewise.
7191         * c-common.h (enum c_omp_clause_split): Add
7192         C_OMP_CLAUSE_SPLIT_TASKLOOP.
7193         (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7194         (c_finish_omp_for): Add ORIG_DECLV argument.
7195         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7196         201511 instead of 201307.
7197         * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7198         OMP_CRITICAL_CLAUSES to it.
7199         (c_finish_omp_ordered): Add CLAUSES argument, set
7200         OMP_ORDERED_CLAUSES to it.
7201         (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7202         to it if OMP_FOR.  Clear DECL_INITIAL on the IVs.
7203         (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7204         constructs and new OpenMP 4.5 clauses.  Clear
7205         OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD.  Add
7206         verification code.
7207         * c-pragma.c (omp_pragmas_simd): Add taskloop.
7208         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7209         (enum pragma_omp_clause): Add
7210         PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7211         and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7213 2015-10-05  Richard Sandiford  <richard.sandiford@arm.com>
7215         * c-lex.c (interpret_float): Use real_equal instead of
7216         REAL_VALUES_EQUAL.
7218 2015-10-04  Jason Merrill  <jason@redhat.com>
7220         Implement N4514, C++ Extensions for Transactional Memory.
7221         * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7222         (c_common_attribute_table): Add transaction_safe_dynamic.
7223         transaction_safe now affects type identity.
7224         (handle_tm_attribute): Handle transaction_safe_dynamic.
7225         * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7226         RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7227         (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7228         (D_TRANSMEM): New.
7229         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7230         * c-pretty-print.c (pp_c_attributes_display): Don't print
7231         transaction_safe in C++.
7233 2015-10-02  Marek Polacek  <polacek@redhat.com>
7235         * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7237 2015-10-02  Marek Polacek  <polacek@redhat.com>
7239         PR c/64249
7240         * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7241         * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7242         * c.opt (Wduplicated-cond): New option.
7244 2015-10-01  Joseph Myers  <joseph@codesourcery.com>
7246         * c.opt (std=c11): Do not describe as experimental.
7247         (std=gnu11): Likewise.
7248         (std=iso9899:2011): Likewise.
7250 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
7252         * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7253         (DEF_FUNCTION_TYPE_VAR_11): Delete.
7255 2015-09-25  Marek Polacek  <polacek@redhat.com>
7257         * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7258         (ubsan_instrument_shift): Likewise.
7260 2015-09-25  Marek Polacek  <polacek@redhat.com>
7262         PR sanitizer/64906
7263         * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7265 2015-09-24  Patrick Palka  <ppalka@gcc.gnu.org>
7267         * c-indentation.c (should_warn_for_misleading_indentation):
7268         Compare next_stmt_vis_column with guard_line_first_nws instead
7269         of with guard_line_vis_column.
7271 2015-09-23  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7273         PR c/49654
7274         PR c/49655
7275         * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7276         options and options not valid for the current language.
7278 2015-09-22  Patrick Palka  <ppalka@gcc.gnu.org>
7280         * c-indentation.c (should_warn_for_misleading_indentation):
7281         Float out and consolidate the calls to get_visual_column that
7282         are passed guard_exploc as an argument.  Compare
7283         next_stmt_vis_column with guard_line_first_nws instead of with
7284         body_line_first_nws.
7286 2015-09-22  Nathan Sidwell  <nathan@codesourcery.com>
7288         * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7289         Wnamespaces): New C++ warnings.
7291 2015-09-22  Jason Merrill  <jason@redhat.com>
7293         * c-common.h (abi_compat_version_crosses): New.
7294         (warn_abi_version): Declare.
7295         * c-common.c: Define it.
7296         * c-opts.c (c_common_post_options): Handle it.
7297         flag_abi_compat_version defaults to 8.
7299 2015-09-21  Ville Voutilainen  <ville.voutilainen@gmail.com>
7301         Complete the implementation of N4230, Nested namespace definition.
7302         * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7303         __cpp_nested_namespace_definitions.
7305 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7307         * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
7309 2015-09-18  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7311         * c-pragma.c (handle_pragma_diagnostic): Use explicit location
7312         when warning.
7313         * c-pragma.h (pragma_lex): Add optional loc argument.
7315 2015-09-16  Mikhail Maltsev  <maltsevm@gmail.com>
7317         * c-format.c (check_format_arg): Adjust to use common block size in all
7318         object pools.
7320 2015-09-15  David Malcolm  <dmalcolm@redhat.com>
7322         * c-format.c (location_from_offset): Update for change in
7323         signature of location_get_source_line.
7324         * c-indentation.c (get_visual_column): Likewise.
7325         (line_contains_hash_if): Likewise.
7327 2015-09-14  Marek Polacek  <polacek@redhat.com>
7329         * c-opts.c (c_common_post_options): Set C++ standard earlier, before
7330         setting various warnings.
7332 2015-09-14  Marek Polacek  <polacek@redhat.com>
7334         * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
7335         a negative value.
7337 2015-09-11  Mark Wielaard  <mjw@redhat.com>
7339         PR c/28901
7340         * c.opt (Wunused-variable): Option from common.opt.
7341         (Wunused-const-variable): New option.
7343 2015-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
7345         PR c++/53184
7346         * c.opt ([Wsubobject-linkage]): Add.
7348 2015-09-03  Martin Sebor  <msebor@redhat.com>
7350         PR c/66516
7351         * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7352         functions.
7353         * c-common.c (reject_gcc_builtin): Define.
7355 2015-09-02  Balaji V. Iyer  <balaji.v.iyer@intel.com>
7357         PR middle-end/60586
7358         * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7359         prototype.
7360         * c-gimplify.c (c_gimplify_expr): Added a call to the function
7361         cilk_gimplify_call_params_in_spawned_fn.
7362         * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7363         (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7364         unwrapping.
7366 2015-08-25  Marek Polacek  <polacek@redhat.com>
7368         PR middle-end/67330
7369         * c-common.c (handle_weak_attribute): Don't check whether the
7370         visibility can be changed here.
7372 2015-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7374         * c-lex.c (c_lex_with_flags): Use explicit locations.
7376 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
7378         * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7379         c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7381 2015-08-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
7383         PR middle-end/36757
7384         * c-common.c (check_builtin_function_arguments): Add check
7385         for BUILT_IN_SIGNBIT argument.
7387 2015-08-18  Paolo Carlini  <paolo.carlini@oracle.com>
7389         PR c++/67160
7390         * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7391         in c++1z mode.
7393 2015-08-17  Marek Polacek  <polacek@redhat.com>
7395         * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7396         with whitespaces before qualifier names.
7398 2015-08-12  Marek Polacek  <polacek@redhat.com>
7400         PR c++/55095
7401         * c-common.c (maybe_warn_shift_overflow): Properly handle
7402         left-shifting 1 into the sign bit.
7404 2015-08-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7406         * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7408 2015-08-06  Andrew Sutton  <andrew.n.sutton@gmail.com>
7409             Braden Obrzut  <admin@maniacsvault.net>
7410             Jason Merrill  <jason@redhat.com>
7412         Add C++ Concepts TS support.
7413         * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7414         * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7415         (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7416         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7417         * c-opts.c (set_std_cxx1z): Set flag_concepts.
7418         * c.opt (fconcepts): New.
7420 2015-08-02  Martin Sebor  <msebor@redhat.com>
7422         * c.opt (-Wframe-address): New warning option.
7424 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7426         * c-indentation.c (should_warn_for_misleading_indentation):
7427         Improve heuristics.
7429 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7431         * c-indentation.c (get_visual_column): Add parameter first_nws,
7432         use it.  Update comment documenting the function.
7433         (is_first_nonwhitespace_on_line): Remove.
7434         (should_warn_for_misleading_indentation): Replace usage of
7435         of is_first_nonwhitespace_on_line with get_visual_column.
7437 2015-08-02  Patrick Palka  <ppalka@gcc.gnu.org>
7439         * c-indentation.h (struct token_indent_info): Define.
7440         (get_token_indent_info): Define.
7441         (warn_for_misleading_information): Declare.
7442         * c-common.h (warn_for_misleading_information): Remove.
7443         * c-identation.c (warn_for_misleading_indentation):
7444         Change declaration to take three token_indent_infos.  Adjust
7445         accordingly.
7446         * c-identation.c (should_warn_for_misleading_indentation):
7447         Likewise.  Bail out early if the body is a compound statement.
7448         (guard_tinfo_to_string): Define.
7450 2015-07-30  Jason Merrill  <jason@redhat.com>
7452         * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7453         '*' for reference decay.
7455 2015-07-30  Marek Polacek  <polacek@redhat.com>
7457         * c-common.c (warn_tautological_cmp): Bail for float types.
7459 2015-07-27  Marek Polacek  <polacek@redhat.com>
7461         PR bootstrap/67030
7462         * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7464 2015-07-27  Marek Polacek  <polacek@redhat.com>
7466         PR c++/66555
7467         PR c/54979
7468         * c-common.c (find_array_ref_with_const_idx_r): New function.
7469         (warn_tautological_cmp): New function.
7470         * c-common.h (warn_tautological_cmp): Declare.
7471         * c.opt (Wtautological-compare): New option.
7473 2015-07-23  Marek Polacek  <polacek@redhat.com>
7475         * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7476         (ubsan_instrument_shift): Likewise.
7478 2015-07-23  Marek Polacek  <polacek@redhat.com>
7480         PR sanitizer/66908
7481         * c-ubsan.c: Include gimplify.h.
7482         (ubsan_instrument_division): Unshare OP0 and OP1.
7483         (ubsan_instrument_shift): Likewise.
7485 2015-07-20  Marek Polacek  <polacek@redhat.com>
7486             Richard Sandiford  <richard.sandiford@arm.com>
7488         PR c++/55095
7489         * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7490         Use EXPR_LOC_OR_LOC.
7491         (maybe_warn_shift_overflow): New function.
7492         * c-common.h (maybe_warn_shift_overflow): Declare.
7493         * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7494         * c.opt (Wshift-overflow): New option.
7496 2015-07-16  Martin Liska  <mliska@suse.cz>
7498         * c-format.c (static void check_format_info_main): Use
7499         object_allocator instead of pool_allocator.
7500         (check_format_arg): Likewise.
7501         (check_format_info_main): Likewise.
7503 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
7505         * c-opts.c: Remove multiline #include comment.
7507 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
7509         * c-common.c: Fix double word typos.
7511 2015-07-10  Eric Botcazou  <ebotcazou@adacore.com>
7513         * c-ada-spec.h (cpp_operation): Revert latest change.
7514         * c-ada-spec.c (print_ada_declaration): Likewise.  Skip implicit
7515         constructors and destructors.
7517 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
7519         * c-common.h: Adjust includes for flags.h changes.
7520         * stub-objc.c: Likewise.
7522 2015-07-08  Eric Botcazou  <ebotcazou@adacore.com>
7524         * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7525         * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7527 2015-07-08  Jakub Jelinek  <jakub@redhat.com>
7529         * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7530         are to be removed, return NULL rather than original clauses list.
7532 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
7534         * array-notation-common.c: Adjust includes.
7535         * c-ada-spec.c: Likewise.
7536         * c-cilkplus.c: Likewise.
7537         * c-common.h: Likewise.
7538         * c-cppbuiltin.c: Likewise.
7539         * c-dump.c: Likewise.
7540         * c-format.c: Likewise.
7541         * c-gimplify.c: Likewise.
7542         * c-indentation.c: Likewise.
7543         * c-lex.c: Likewise.
7544         * c-omp.c: Likewise.
7545         * c-opts.c: Likewise.
7546         * c-pch.c: Likewise.
7547         * c-ppoutput.c: Likewise.
7548         * c-pragma.c: Likewise.
7549         * c-pretty-print.c: Likewise.
7550         * c-semantics.c: Likewise.
7551         * c-ubsan.c: Likewise.
7552         * cilk.c: Likewise.
7553         * stub-objc.c: Likewise.
7555 2015-07-07  Eric Botcazou  <ebotcazou@adacore.com>
7557         * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7558         * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7560 2015-07-01  Jason Merrill  <jason@redhat.com>
7562         * c-common.h (D_CXX11): Rename from D_CXX0X.
7563         (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7564         * c-common.c: Adjust.
7566         * c-opts.c (c_common_post_options): Default to C++14.
7568         * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7570 2015-06-30  Edward Smith-Rowland  <3dw4rd@verizon.net>
7572         Implement N4197 - Adding u8 character literals
7573         * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7574         CPP_CHAR.
7575         * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7576         CPP_UTF8CHAR_USERDEF tokens.
7577         * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7578         and CPP_UTF8CHAR tokens.
7579         (lex_charconst): Treat CPP_UTF8CHAR token.
7581 2015-06-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7583         PR fortran/66605
7584         * c-common.c (do_warn_unused_parameter): Move here.
7585         * c-common.h (do_warn_unused_parameter): Declare.
7587 2015-06-29  Marek Polacek  <polacek@redhat.com>
7589         PR c/66322
7590         * c-common.c (check_case_bounds): Add bool * parameter.  Set
7591         OUTSIDE_RANGE_P.
7592         (c_add_case_label): Add bool * parameter.  Pass it down to
7593         check_case_bounds.
7594         (c_do_switch_warnings): Add bool parameters.  Implement -Wswitch-bool
7595         warning here.
7596         * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7597         declarations.
7599 2015-06-27  Marek Polacek  <polacek@redhat.com>
7601         * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7602         or VECTOR_INTEGER_TYPE_P throughout.
7603         * c-gimplify.c: Likewise.
7605 2015-06-26  Marek Polacek  <polacek@redhat.com>
7607         * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7608         * c-common.c (c_fully_fold_internal): Likewise.
7609         (c_alignof_expr): Likewise.
7610         * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7611         * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7612         * cilk.c (create_parm_list): Likewise.
7614 2015-06-26  Marek Polacek  <polacek@redhat.com>
7616         * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7618 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7620         * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7621         * c-gimplify.c: Likewise.
7622         * c-pragma.c: Likewise.
7623         * c-ubsan.c: Likewise.
7624         * cilk.c: Likewise.
7626 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
7628         * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7629         ggc_hasher.
7631 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
7633         * cilk.c: Move calls.h after tm.h in the include chain.
7635 2015-06-25  Marek Polacek  <polacek@redhat.com>
7637         * array-notation-common.c: Use VAR_P throughout.
7638         * c-ada-spec.c: Likewise.
7639         * c-common.c: Likewise.
7640         * c-format.c: Likewise.
7641         * c-gimplify.c: Likewise.
7642         * c-omp.c: Likewise.
7643         * c-pragma.c: Likewise.
7644         * c-pretty-print.c: Likewise.
7645         * cilk.c: Likewise.
7647 2015-06-25  Marek Polacek  <polacek@redhat.com>
7649         * cilk.c (extract_free_variables): Use is_global_var.
7651 2015-06-23  Richard Sandiford  <richard.sandiford@arm.com>
7653         * c-common.c: Don't include target-def.h.
7655 2015-06-23  Marek Polacek  <polacek@redhat.com>
7657         * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7658         when comparing INTEGER_CSTs.
7660 2015-06-22  Pierre-Marie de Rodat  <derodat@adacore.com>
7662         * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7663         * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7664         (dump_ada_template): Skip partially specialized types.
7666 2015-06-22  Mikhail Maltsev  <maltsevm@gmail.com>
7668         * c-common.c (scalar_to_vector): Use std::swap instead of manually
7669         swapping.
7671 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
7673         * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7674         * c-ada-spec.c: Likewise.
7675         * c-cilkplus.c: Likewise.
7676         * c-common.c: Likewise.
7677         * c-common.h: Likewise.
7678         * c-cppbuiltin.c: Likewise.
7679         * c-dump.c: Likewise.
7680         * c-format.c: Likewise.
7681         * c-gimplify.c: Likewise.
7682         * c-indentation.c: Likewise.
7683         * c-lex.c: Likewise.
7684         * c-omp.c: Likewise.
7685         * c-opts.c: Likewise.
7686         * c-pch.c: Likewise.
7687         * c-ppoutput.c: Likewise.
7688         * c-pragma.c: Likewise.
7689         * c-pretty-print.c: Likewise.
7690         * c-semantics.c: Likewise.
7691         * c-ubsan.c: Likewise.
7692         * cilk.c: Likewise.
7693         * stub-objc.c: Likewise.
7695 2015-06-13  Patrick Palka  <ppalka@gcc.gnu.org>
7697         PR c++/65168
7698         * c-common.c (c_common_truthvalue_conversion): Warn when
7699         converting an address of a reference to a truth value.
7701 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
7703         * array-notation-common.c : Adjust include files.
7704         * c-ada-spec.c : Likewise.
7705         * c-cilkplus.c : Likewise.
7706         * c-common.c : Likewise.
7707         * c-common.h : Likewise.
7708         * c-cppbuiltin.c : Likewise.
7709         * c-dump.c : Likewise.
7710         * c-format.c : Likewise.
7711         * c-gimplify.c : Likewise.
7712         * c-indentation.c : Likewise.
7713         * c-lex.c : Likewise.
7714         * c-omp.c : Likewise.
7715         * c-opts.c : Likewise.
7716         * c-pch.c : Likewise.
7717         * c-ppoutput.c : Likewise.
7718         * c-pragma.c : Likewise.
7719         * c-pretty-print.c : Likewise.
7720         * c-semantics.c : Likewise.
7721         * c-ubsan.c : Likewise.
7722         * cilk.c : Likewise.
7723         * stub-objc.c : Likewise.
7725 2015-06-08  Marek Polacek  <polacek@redhat.com>
7727         PR c/66415
7728         * c-format.c (location_from_offset): Return LOC if LINE is null.
7730 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
7732         * c-common.h (c_parse_final_cleanups): New prototype.
7733         * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7735 2015-06-04  Sriraman Tallam  <tmsriram@google.com>
7737         * c-common.c (noplt): New attribute.
7738         (handle_noplt_attribute): New handler.
7740 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
7742         * array-notation-common.c: Adjust includes for restructured coretypes.h.
7743         * c-ada-spec.c: Likewise.
7744         * c-cilkplus.c: Likewise.
7745         * c-common.c: Likewise.
7746         * c-common.h: Likewise.
7747         * c-cppbuiltin.c: Likewise.
7748         * c-dump.c: Likewise.
7749         * c-format.c: Likewise.
7750         * c-gimplify.c: Likewise.
7751         * c-indentation.c: Likewise.
7752         * c-lex.c: Likewise.
7753         * c-omp.c: Likewise.
7754         * c-opts.c: Likewise.
7755         * c-pch.c: Likewise.
7756         * c-ppoutput.c: Likewise.
7757         * c-pragma.c: Likewise.
7758         * c-pretty-print.c: Likewise.
7759         * c-semantics.c: Likewise.
7760         * c-ubsan.c: Likewise.
7761         * cilk.c: Likewise.
7762         * stub-objc.c: Likewise.
7764 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
7766         PR c/66220:
7767         * c-indentation.c (should_warn_for_misleading_indentation): Use
7768         expand_location rather than expand_location_to_spelling_point.
7769         Don't warn if the guarding statement is more indented than the
7770         next/body stmts.
7772 2015-06-02  David Malcolm  <dmalcolm@redhat.com>
7774         * c-indentation.c (warn_for_misleading_indentation): Bail out
7775         immediately if -Wmisleading-indentation isn't enabled.
7777 2015-06-01  Martin Liska  <mliska@suse.cz>
7779         * c-format.c (check_format_arg):Use new type-based pool allocator.
7780         (check_format_info_main) Likewise.
7782 2015-05-31  Eric Botcazou  <ebotcazou@adacore.com>
7784         * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7785         (has_nontrivial_methods): Likewise.
7787 2015-05-25  Marek Polacek  <polacek@redhat.com>
7789         * c-ubsan.c (ubsan_instrument_shift): Use type0.
7791 2015-05-22  Marek Polacek  <polacek@redhat.com>
7793         PR c/47043
7794         * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7796 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7798         * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7799         STACK_GROWS_DOWNWARD.
7801 2015-05-21  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
7803         * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7804         STACK_GROWS_DOWNWARD rather than if it is defined.
7806 2015-05-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7808         PR c/52952
7809         * c-format.c (location_column_from_byte_offset): New.
7810         (location_from_offset): New.
7811         (struct format_wanted_type): Add offset_loc field.
7812         (check_format_info): Move handling of location for extra arguments
7813         closer to the point of warning.
7814         (check_format_info_main): Pass the result of location_from_offset
7815         to warning_at.
7816         (format_type_warning): Pass the result of location_from_offset
7817         to warning_at.
7819 2015-05-20  Marek Polacek  <polacek@redhat.com>
7821         * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7823 2015-05-20  Marek Polacek  <polacek@redhat.com>
7825         * c-ada-spec.c (dump_sloc): Use DECL_P.
7827 2015-05-20  Marek Polacek  <polacek@redhat.com>
7829         * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7830         * c-common.c: Likewise.
7832 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
7834         * c-common.h (fe_file_change): Strengthen param from
7835         const line_map * to const line_map_ordinary *.
7836         (pp_file_change): Likewise.
7837         * c-lex.c (fe_file_change): Likewise.
7838         (cb_define): Use linemap_check_ordinary when invoking
7839         SOURCE_LINE.
7840         (cb_undef): Likewise.
7841         * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7842         invoking cb_file_change.
7843         (c_finish_options): Likewise.
7844         (push_command_line_include): Likewise.
7845         (cb_file_change): Strengthen param "new_map" from
7846         const line_map * to const line_map_ordinary *.
7847         * c-ppoutput.c (cb_define): Likewise for local "map".
7848         (pp_file_change): Likewise for param "map" and local "from".
7850 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
7852         * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7854 2015-05-18  Tom de Vries  <tom@codesourcery.com>
7856         * c-common.c (build_va_arg_1): New function.
7857         (build_va_arg): Add address operator to va_list operand if necessary.
7859 2015-05-15  Mikhail Maltsev  <maltsevm@gmail.com>
7861         PR c/48956
7862         * c-common.c (int_safely_convertible_to_real_p): Define.
7863         (unsafe_conversion_p): Check conversions involving complex types.
7864         (conversion_warning): Add new warning message for conversions which
7865         discard imaginary component.
7866         * c-common.h: (enum conversion_safety): Add new enumerator for such
7867         conversions.
7869 2015-05-14  Marek Polacek  <polacek@redhat.com>
7871         PR c/66066
7872         PR c/66127
7873         * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7874         (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7875         C_MAYBE_CONST_EXPR_INT_OPERANDS set.  Add FOR_INT_CONST argument and
7876         use it.  If FOR_INT_CONST, require that all evaluated operands be
7877         INTEGER_CSTs.
7879 2015-05-12  David Malcolm  <dmalcolm@redhat.com>
7881         * c-common.h (warn_for_misleading_indentation): New prototype.
7882         * c-indentation.c: New file.
7883         * c.opt (Wmisleading-indentation): New option.
7885 2015-05-12  Tom de Vries  <tom@codesourcery.com>
7887         PR tree-optimization/66010
7888         * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7890 2015-05-09  Jason Merrill  <jason@redhat.com>
7892         * c-opts.c (c_common_post_options): Also clear
7893         cpp_opts->cpp_warn_cxx11_compat.
7895         * c-common.h (enum cxx_dialect): Add cxx_unset.
7896         * c-common.c (cxx_dialect): Initialize to cxx_unset.
7897         * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7899         * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7900         (std=gnu++0x): Mark as Undocumented.
7901         (std=gnu++1y): Add deprecated message.
7903 2015-05-08  Jason Merrill  <jason@redhat.com>
7905         * c.opt (Wc++11-compat): Make primary.  Rename var warn_cxx11_compat.
7906         * c-opts.c: Adjust.
7908         * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7910 2015-05-08  Marek Polacek  <polacek@redhat.com>
7912         PR c/64918
7913         * c.opt (Woverride-init-side-effects): New option.
7915 2015-05-07  Marek Polacek  <polacek@redhat.com>
7917         PR c/65179
7918         * c-common.c (c_fully_fold_internal): Warn when left shifting a
7919         negative value.
7920         * c.opt (Wshift-negative-value): New option.
7921         * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7922         when -Wextra and C99/C++11 mode.
7924 2015-05-07  Marek Polacek  <polacek@redhat.com>
7925             Martin Uecker  <uecker@eecs.berkeley.edu>
7927         * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7928         flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7930 2015-05-05  Jason Merrill  <jason@redhat.com>
7932         * c.opt (Wterminate): New.
7934 2015-04-30  Marek Polacek  <polacek@redhat.com>
7936         * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7937         require that the non-constant be of a boolean type.
7939 2015-04-29  Josh Triplett  <josh@joshtriplett.org>
7941         * c-common.c (handle_section_attribute): Refactor to reduce
7942         nesting and distinguish between error cases.
7944 2015-04-29  Marek Polacek  <polacek@redhat.com>
7946         PR c/64610
7947         * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7948         with 0/1.
7950 2015-04-29  Jakub Jelinek  <jakub@redhat.com>
7952         * c-common.h (omp_clause_mask): Unconditionally define as a class.
7953         Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7954         HOST_BITS_PER_WIDE_INT.
7956 2015-04-28  Tom de Vries  <tom@codesourcery.com>
7958         PR tree-optimization/65887
7959         * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7961 2015-04-28  Eric Botcazou  <ebotcazou@adacore.com>
7962             Pierre-Marie de Rodat  <derodat@adacore.com>
7964         * c-ada-spec.c (in_function): Delete.
7965         (dump_generic_ada_node): Do not change in_function and remove the
7966         redundant code dealing with it.
7967         (print_ada_declaration): Do not change in_function.  Use INDENT_INCR.
7968         (print_ada_methods): Output the static member functions in a nested
7969         package after the regular methods as well as associated renamings.
7971 2015-04-24  Marek Polacek  <polacek@redhat.com>
7973         PR c/65830
7974         * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7975         and OPT_Wshift_count_overflow.
7977         PR c/63357
7978         * c-common.c (warn_logical_operator): Warn if the operands have the
7979         same expressions.
7981 2015-04-24  Marek Polacek  <polacek@redhat.com>
7983         PR c/61534
7984         * c-common.c (warn_logical_operator): Bail if either operand comes
7985         from a macro expansion.
7987 2015-04-10  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
7989         PR target/55143
7990         * c-common.c (c_default_pointer_mode): Add definition.
7991         * c-common.h (c_default_pointer_mode): Add declaration.
7993 2015-03-11  Jakub Jelinek  <jakub@redhat.com>
7995         * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7996         on record_builtin_type argument.
7998 2015-03-10  Jakub Jelinek  <jakub@redhat.com>
8000         PR c/65120
8001         * c-common.c (warn_logical_not_parentheses): Don't warn for
8002         !x == 0 or !x != 0.
8004 2015-03-07  Marek Polacek  <polacek@redhat.com>
8006         PR sanitizer/65280
8007         * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8008         before trying to figure out whether we have a flexible array member.
8010 2015-03-06  Eric Botcazou  <ebotcazou@adacore.com>
8011             Jonathan Wakely  <jwakely.gcc@gmail.com>
8013         * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8015 2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
8017         PR ada/65319
8018         * c-ada-spec.c (print_destructor): Remove obsolete code.
8020 2015-03-01  Eric Botcazou  <ebotcazou@adacore.com>
8022         * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8023         (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8024         DECL_TEMPLATE_RESULT emulations.
8025         (dump_ada_template)): Add guard for TYPE_METHODS.
8027 2015-02-27  Marek Polacek  <polacek@redhat.com>
8029         PR c/65040
8030         * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8032 2015-02-27  Kai Tietz  <ktietz@redhat.com>
8034         PR c/35330
8035         * c-pragma.c (handle_pragma_weak): Do not try to create
8036         weak/alias of declarations not being function, or variable
8037         declarations.
8039 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
8041         PR libgomp/64625
8042         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8043         Remove macros.
8044         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8046 2015-02-16  Marek Polacek  <polacek@redhat.com>
8048         PR c/65066
8049         * c-format.c (check_format_types): Handle null param.
8051 2015-02-13  Marek Polacek  <polacek@redhat.com>
8053         PR c/65040
8054         * c-format.c (check_format_types): Don't warn about different
8055         signedness if the original value is in the range of WANTED_TYPE.
8057 2015-02-12  Jason Merrill  <jason@redhat.com>
8059         PR c++/64956
8060         * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8061         to the current highest version.
8062         * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8064 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
8066         PR c/64824
8067         PR c/64868
8068         * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8069         instead of RDIV_EXPR.  Use build_binary_op instead of
8070         build2_loc.
8072 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
8074         * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8075         to pass input_location as first argument.
8077 2015-01-23  Tom de Vries  <tom@codesourcery.com>
8079         PR libgomp/64672
8080         * c.opt (fopenacc): Mark as LTO option.
8082 2015-01-23  Tom de Vries  <tom@codesourcery.com>
8084         PR libgomp/64707
8085         * c.opt (fopenmp): Mark as LTO option.
8087 2015-01-21  Jakub Jelinek  <jakub@redhat.com>
8089         PR c/63307
8090         * cilk.c (fill_decls_vec): Only put decls into vector v.
8091         (compare_decls): Fix up formatting.
8093 2015-01-21  Igor Zamyatin  <igor.zamyatin@intel.com>
8095         PR c/63307
8096         * cilk.c: Include vec.h.
8097         (struct cilk_decls): New structure.
8098         (wrapper_parm_cb): Split this function to...
8099         (fill_decls_vec): ...this...
8100         (create_parm_list): ...and this.
8101         (compare_decls): New function.
8102         (for_local_cb): Remove.
8103         (wrapper_local_cb): Ditto.
8104         (build_wrapper_type): For now first traverse and fill vector of
8105         declarations then sort it and then deal with sorted vector.
8106         (cilk_outline): Ditto.
8107         (declare_one_free_variable): Ditto.
8109 2015-01-21  Jason Merrill  <jason@redhat.com>
8111         PR c++/64629
8112         * c-format.c (check_format_arg): Call decl_constant_value.
8114 2015-01-19  Martin Liska  <mliska@suse.cz>
8116         * c-common.c (handle_noicf_attribute): New function.
8118 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
8119             Bernd Schmidt  <bernds@codesourcery.com>
8120             James Norris  <jnorris@codesourcery.com>
8121             Cesar Philippidis  <cesar@codesourcery.com>
8122             Ilmir Usmanov  <i.usmanov@samsung.com>
8123             Jakub Jelinek  <jakub@redhat.com>
8125         * c.opt (fopenacc): New option.
8126         * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8127         * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8128         New macros.
8129         * c-common.h (c_finish_oacc_wait): New prototype.
8130         * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8131         (c_finish_oacc_wait): New function.
8132         * c-pragma.c (oacc_pragmas): New variable.
8133         (c_pp_lookup_pragma, init_pragma): Handle it.
8134         * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8135         PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8136         PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8137         PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8138         (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8139         PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8140         PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8141         PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8142         PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8143         PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8144         PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8145         PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8146         PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8147         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8148         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8149         PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8150         PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8151         PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8152         PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8153         PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8154         PRAGMA_OACC_CLAUSE_WORKER.
8156 2015-01-14  Marcos Diaz  <marcos.diaz@tallertechnologies.com>
8158         * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8159         for the new option fstack-protector_explicit.
8160         * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8161         (handle_stack_protect_attribute): New function.
8163 2015-01-13  Martin Uecker  <uecker@eecs.berkeley.edu>
8165         * c.opt: New option -Warray-bounds=.
8167 2015-01-09  Michael Collison  <michael.collison@linaro.org>
8169         * array-notation-common.c: Include hash-set.h, machmode.h,
8170         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8171         fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8172         * c-ada-spec.c: Ditto.
8173         * c-cilkplus.c: Ditto.
8174         * c-common.c: Include input.h due to flattening of tree.h.
8175         Define macro GCC_C_COMMON_C.
8176         * c-common.h: Flatten tree.h header files into c-common.h.
8177         Remove include of tree-core.h.
8178         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8179         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8180         fold-const.h, wide-int.h, and inchash.h due to
8181         flattening of tree.h.
8182         * c-dump.c: Ditto.
8183         * c-format.c: Flatten tree.h header files into c-common.h.
8184         * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8185         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8186         fold-const.h, wide-int.h, and inchash.h due to
8187         flattening of tree.h.
8188         * c-dump.c: Include hash-set.h, machmode.h,
8189         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8190         fold-const.h, wide-int.h, and inchash.h due to
8191         flattening of tree.h.
8192         * c-format.c: Include hash-set.h, machmode.h,
8193         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8194         fold-const.h, wide-int.h, inchash.h and real.h due to
8195         flattening of tree.h.
8196         * c-gimplify.c: Include hash-set.h, machmode.h,
8197         vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8198         fold-const.h, wide-int.h, and inchash.h due to
8199         flattening of tree.h.
8200         * cilk.c: Ditto.
8201         * c-lex.c: Ditto.
8202         * c-omp.c: Ditto.
8203         * c-opts.c: Ditto.
8204         * c-pch.c: Ditto.
8205         * c-ppoutput.c: Ditto.
8206         * c-pragma.c: Ditto.
8207         * c-pretty-print.c: Ditto.
8208         * c-semantics.c: Ditto.
8209         * c-ubsan.c: Ditto.
8210         * stub-objc.c: Ditto.
8212 2015-01-08  Jason Merrill  <jason@redhat.com>
8214         * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8215         do_ubsan_in_current_function.
8216         (ubsan_maybe_instrument_reference_or_call): Likewise.
8217         * c-ubsan.h: Declare it.
8219 2015-01-08  Mike Stump  <mikestump@comcast.net>
8221         * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8223 2015-01-07  Marek Polacek  <polacek@redhat.com>
8225         PR c/64440
8226         * c-common.c (c_fully_fold_internal): Warn for division and modulo
8227         if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8229 2015-01-05  Trevor Saunders  <tsaunders@mozilla.com>
8231         PR c++/31397
8232         * c.opt (Wsuggest-override): New option.
8234 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
8236         Update copyright years.
8238 2015-01-05  Marek Polacek  <polacek@redhat.com>
8240         PR c/64423
8241         * c-common.c (warn_array_subscript_with_type_char): Add location_t
8242         parameter.  Use it.
8243         * c-common.h (warn_array_subscript_with_type_char): Update
8244         declaration.
8246 2014-12-20  Edward Smith-Rowland  <3dw4rd@verizon.net>
8248         * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8249         Control macro with flag_sized_deallocation.
8251 2014-12-20  Martin Uecker  <uecker@eecs.berkeley.edu>
8253         * c.opt (Wdiscarded-array-qualifiers): New option.
8255 2014-12-19  Jakub Jelinek  <jakub@redhat.com>
8257         PR preprocessor/63831
8258         * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8259         and __has_cpp_attribute here.
8260         * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8261         c_common_has_attribute.
8262         * c-common.h (c_common_has_attribute): New prototype.
8263         * c-lex.c (init_c_lex): Set cb->has_attribute to
8264         c_common_has_attribute instead of cb_has_attribute.
8265         (get_token_no_padding): New function.
8266         (cb_has_attribute): Renamed to ...
8267         (c_common_has_attribute): ... this.  No longer static.  Use
8268         get_token_no_padding, require ()s, don't build TREE_LIST
8269         unnecessarily, fix up formatting, adjust diagnostics, call
8270         init_attributes.
8272 2014-12-15  Jason Merrill  <jason@redhat.com>
8274         * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8275         (-Wsized-deallocation): New.
8276         * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8277         to on in C++14 and up.
8279 2014-12-11  Jason Merrill  <jason@redhat.com>
8281         * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8283         * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8284         we aren't complaining about VLAs.
8286 2014-12-06  Marek Polacek  <polacek@redhat.com>
8288         PR tree-optimization/64183
8289         * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8290         shift-expression if it is integer_type_node.  Use types_compatible_p.
8292 2014-11-29  Jakub Jelinek  <jakub@redhat.com>
8294         * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8295         last argument from create_tmp_var_raw and create_tmp_var calls.
8296         * cilk.c (gimplify_cilk_spawn): Likewise.
8297         * c-omp.c (c_finish_omp_atomic): Likewise.
8299 2014-11-28  Marek Polacek  <polacek@redhat.com>
8301         * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8302         instead of unsigned_type_node.
8304 2014-11-28  Marek Polacek  <polacek@redhat.com>
8306         PR c/63862
8307         * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
8308         to op1_utype.
8309         * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
8310         expression to unsigned_type_node.
8312 2014-11-20  Mark Wielaard  <mjw@redhat.com>
8314         PR debug/38757
8315         * c-opts.c (set_std_c89): Set lang_hooks.name.
8316         (set_std_c99): Likewise.
8317         (set_std_c11): Likewise.
8318         (set_std_cxx98): Likewise.
8319         (set_std_cxx11): Likewise.
8320         (set_std_cxx14): Likewise.
8321         (set_std_cxx1z): Likewise.
8323 2014-11-21  Jakub Jelinek  <jakub@redhat.com>
8325         PR target/63764
8326         * c-common.h (convert_vector_to_pointer_for_subscript): Change
8327         return type to bool.
8328         * c-common.c: Include gimple-expr.h.
8329         (convert_vector_to_pointer_for_subscript): Change return type to
8330         bool.  If *vecp is not lvalue_p and has VECTOR_TYPE, return true
8331         and copy it into a TARGET_EXPR and use that instead of *vecp
8332         directly.
8334 2014-11-19  David Malcolm  <dmalcolm@redhat.com>
8336         Merger of git branch "gimple-classes-v2-option-3".
8337         * ChangeLog.gimple-classes: New.
8338         * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
8339         from being just a vec<gimple> to a vec<gbind *>.
8341 2014-11-18  Jakub Jelinek  <jakub@redhat.com>
8343         PR sanitizer/63813
8344         * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8345         argument to ptype, set type to TREE_TYPE (ptype).  Don't call
8346         get_pointer_alignment for non-pointers.  Use ptype, or if it is
8347         reference type, corresponding pointer type, as type of kind
8348         argument.
8349         (ubsan_maybe_instrument_reference,
8350         ubsan_maybe_instrument_member_call): Adjust callers.
8352 2014-11-15  Marek Polacek  <polacek@redhat.com>
8354         PR middle-end/63884
8355         * array-notation-common.c (is_sec_implicit_index_fn): Return false
8356         for NULL fndecl.
8357         (extract_array_notation_exprs): Return for NULL node.
8359 2014-11-12  Joseph Myers  <joseph@codesourcery.com>
8361         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8362         undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8364 2014-11-12  Jakub Jelinek  <jakub@redhat.com>
8366         PR c/59708
8367         * c-common.c (check_builtin_function_arguments): Handle
8368         BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8370 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8372         PR c/60804
8373         * c-common.h (check_no_cilk): Declare.
8374         * cilk.c (get_error_location): New function.
8375         (check_no_cilk): Dito.
8377 2014-11-10  Andi Kleen  <ak@linux.intel.com>
8379         * cilk.c (recognize_spawn): Use expression location
8380         for error message.
8382 2014-11-10  Paolo Carlini  <paolo.carlini@oracle.com>
8384         * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8386 2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
8388         * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8389         (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8390         (__cpp_range_based_for, __cpp_initializer_lists,
8391         __cpp_delegating_constructors, __cpp_nsdmi,
8392         __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8393         for C++11; (__cpp_attribute_deprecated): Remove in favor of
8394         __has_cpp_attribute.
8395         * c-lex.c (cb_has_attribute): New callback CPP function;
8396         (init_c_lex): Set has_attribute callback.
8398 2014-11-04  Richard Biener  <rguenther@suse.de>
8400         * c-common.c (shorten_compare): Do not shorten mixed
8401         DFP and non-DFP compares.
8403 2014-11-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
8405         * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8406         * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8407         Commentary and rearrangement of tests.
8408         * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8409         Commentary and rearrangement of tests.
8410         * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8411         * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8413 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
8415         * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8416         enum from machine_mode.
8418 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
8420         * c-common.c: Adjust include files.
8421         * c-gimplify.c: Ditto.
8422         * cilk.c: Ditto.
8423         * c-pragma.c: Ditto.
8424         * c-ubsan.c: Ditto.
8426 2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
8428         * c-gimplify.c: Adjust include files.
8430 2014-10-26  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8432         PR c++/53061
8433         * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8434         c_common_initialize_diagnostics.
8435         * c-common.h: Likewise.
8437 2014-10-24  Marek Polacek  <polacek@redhat.com>
8439         PR c/56980
8440         * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8441         print "struct"/"union"/"enum" for typedefed names.
8443 2014-10-23  Marek Polacek  <polacek@redhat.com>
8445         * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8446         in unsigned type.
8448 2014-10-22  Jakub Jelinek  <jakub@redhat.com>
8449             Yury Gribov  <y.gribov@samsung.com>
8451         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8452         ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8453         instead of flag_sanitize_recover as bool flag.
8455 2014-10-21  Kirill Yukhin  <kirill.yukhin@intel.com>
8457         * cilk.c: Revert previous change.
8459 2014-10-20  Igor Zamyatin  <igor.zamyatin@intel.com>
8461         PR c/63307
8462         * cilk.c: Include vec.h.
8463         (struct cilk_decls): New structure.
8464         (wrapper_parm_cb): Split this function to...
8465         (fill_decls_vec): ...this...
8466         (create_parm_list): ...and this.
8467         (compare_decls): New function.
8468         (for_local_cb): Remove.
8469         (wrapper_local_cb): Ditto.
8470         (build_wrapper_type): For now first traverse and fill vector of
8471         declarations then sort it and then deal with sorted vector.
8472         (cilk_outline): Ditto.
8473         (declare_one_free_variable): Ditto.
8475 2014-10-17  Marek Polacek  <polacek@redhat.com>
8477         * c-opts.c (c_common_post_options): Set warn_implicit_int.
8478         * c.opt (Wimplicit-int): Initialize to -1.
8480 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
8482         * c-pragma.c: Adjust include files.
8483         * c-semantics.c: Likewise.
8485 2014-10-16  DJ Delorie  <dj@redhat.com>
8487         * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8488         multiples of bytes.
8490 2014-10-14  Jason Merrill  <jason@redhat.com>
8492         PR c++/63455
8493         * c-common.h (CPP_PREPARSED_EXPR): New.
8494         (N_CP_TTYPES): Adjust.
8496 2014-10-15  Marek Polacek  <polacek@redhat.com>
8498         * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8500 2014-10-14  DJ Delorie  <dj@redhat.com>
8502         * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8503         types, not just __int128.
8504         * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8505         types, not just __int128.
8506         (cpp_atomic_builtins): Round pointer sizes up.
8507         (type_suffix): Use type precision, not specific types.
8508         * c-common.c (c_common_reswords): Remove __int128 special case.
8509         (c_common_type_for_size): Check for all __intN types, not just
8510         __int128.
8511         (c_common_type_for_mode): Likewise.
8512         (c_common_signed_or_unsigned_type): Likewise.
8513         (c_build_bitfield_integer_type): Likewise.
8514         (c_common_nodes_and_builtins): Likewise.
8515         (keyword_begins_type_specifier): Likewise.
8516         * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8517         __intN variants.
8519 2014-10-12  Trevor Saunders  <tsaunders@mozilla.com>
8521         * c-common.c: Use hash_table instead of hashtab.
8523 2014-10-06  Edward Smith-Rowland  <3dw4rd@verizon.net>
8525         * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8526         C++11 section.
8528 2014-10-03  Marc Glisse  <marc.glisse@inria.fr>
8530         PR c++/54427
8531         PR c++/57198
8532         PR c++/58845
8533         * c-common.c (warn_logical_operator): Punt for vectors.
8535 2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>
8537         Implement SD-6: SG10 Feature Test Recommendations
8538         * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8539         macros and the __has_header macro.
8541 2014-09-30  Jason Merrill  <jason@redhat.com>
8543         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8544         RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8545         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8547         * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8548         * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8550         * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8551         * c-common.c (c_common_reswords): Remove __is_convertible_to.
8553 2014-09-24  Marek Polacek  <polacek@redhat.com>
8555         PR c/61405
8556         PR c/53874
8557         * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8559 2014-09-23  Andi Kleen  <ak@linux.intel.com>
8561         * c-common.c (handle_no_reorder_attribute): New function.
8562         (c_common_attribute_table): Add no_reorder attribute.
8564 2014-09-22  Joseph Myers  <joseph@codesourcery.com>
8566         * c-cppbuiltin.c (c_cpp_builtins): Define
8567         __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8568         modes.
8570 2014-09-18  Joseph Myers  <joseph@codesourcery.com>
8572         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8573         for supported floating-point modes.
8575 2014-09-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8577         * c.opt (Wpsabi): Use LangEnabledBy.
8578         * c-opts.c (c_common_handle_option): Do not handle here.
8580 2014-09-12  Joseph Myers  <joseph@codesourcery.com>
8582         * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8583         macros for floating-point modes.
8585 2014-09-11  Marc Glisse  <marc.glisse@inria.fr>
8587         PR target/58757
8588         * c-cppbuiltin.c (builtin_define_float_constants): Correct
8589         __*_DENORM_MIN__ without denormals.
8591 2014-09-10  Jakub Jelinek  <jakub@redhat.com>
8593         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8594         ubsan_instrument_vla, ubsan_instrument_return): Adjust
8595         ubsan_create_data callers.
8596         (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8597         index is constant or BIT_AND_EXPR with constant mask and is
8598         small enough for the bound.
8599         * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8600         ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8602 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8604         * c.opt: Add CppReason to various flags.
8605         (Wdate-time): Re-sort.
8606         * c-common.c: Include c-common.h earlier.
8607         (struct reason_option_codes_t): Delete.
8608         (c_option_controlling_cpp_error): Prefix global type and struct
8609         with cpp_.
8611 2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8613         * c.opt (Wnormalized): New.
8614         (Wnormalized=): Use Enum and Reject Negative.
8615         * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8617 2014-09-08  Joseph Myers  <joseph@codesourcery.com>
8619         * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8620         digits of floating-point modes if -fbuilding-libgcc.
8622 2014-09-05  Joseph Myers  <joseph@codesourcery.com>
8624         * c-cppbuiltin.c (c_cpp_builtins): Also define
8625         __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8626         __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8627         __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8628         __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8629         __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8630         __LIBGCC_STACK_GROWS_DOWNWARD__,
8631         __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8632         __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8633         __LIBGCC_DWARF_FRAME_REGISTERS__,
8634         __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8635         __LIBGCC_STACK_POINTER_REGNUM__ and
8636         __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8637         (builtin_define_with_value): Handle backslash-escaping in string
8638         macro values.
8640 2014-09-05  Richard Biener  <rguenther@suse.de>
8642         PR middle-end/63148
8643         * c-format.c (check_format_arg): Properly handle
8644         effectively signed POINTER_PLUS_EXPR offset.
8646 2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8648         * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8649         Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8650         (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8651         and Init.
8652         * c-opts.c (c_common_handle_option): Do not handle here.
8653         (sanitize_cpp_opts): Likewise.
8654         * c-common.c (struct reason_option_codes_t): Handle
8655         CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8657 2014-09-03  Marek Polacek  <polacek@redhat.com>
8659         * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8661 2014-09-02  Jakub Jelinek  <jakub@redhat.com>
8662             Balaji V. Iyer  <balaji.v.iyer@intel.com>
8663             Igor Zamyatin  <igor.zamyatin@intel.com>
8665         * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8666         * c-common.c (c_common_reswords): Added _Cilk_for.
8667         * c-common.h (enum rid): Added RID_CILK_FOR.
8668         (cilk_for_number_of_iterations): Add declaration.
8669         * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8670         CILK_FOR.
8671         * c-pragma.c (init_pragma): Register "grainsize" pragma.
8672         * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8674 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8676         * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8677         Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8678         Wundef): Use CPP, Var and Init.
8679         * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8681 2014-08-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8683         * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8684         * c-opts.c (c_common_handle_option): Do not handle here.
8686 2014-08-25  Jason Merrill  <jason@redhat.com>
8688         * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8689         -std=c++14 and -std=gnu++14, rather than the reverse.
8690         * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8691         OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8692         * c-common.h (cxx_dialect): Remove cxx1y.
8694 2014-08-23  Edward Smith-Rowland  <3dw4rd@verizon.net>
8696         * c-common.h (enum cxx_dialect): Add cxx14.
8697         * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8698         * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8699         cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8701 2014-08-22  Jason Merrill  <jason@redhat.com>
8703         * c.opt (std=gnu++17): Fix alias.
8705 2014-08-22  Marek Polacek  <polacek@redhat.com>
8707         PR c++/62199
8708         * c-common.c (warn_logical_not_parentheses): Don't check LHS.  Don't
8709         check for vector types.  Drop LHS argument.
8710         * c-common.h (warn_logical_not_parentheses): Adjust.
8712 2014-08-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8714         * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8715         (Wmultichar): Likewise.
8716         (Wdate-time): Use C-family languages instead of Common. Use CPP
8717         and Var.
8718         * c-opts.c (c_common_handle_option): Do not handle the above
8719         options here.
8720         (sanitize_cpp_opts): Likewise.
8722 2014-08-21  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8724         PR fortran/44054
8725         * c-opts.c: Include tree-diagnostics.h.
8726         (c_diagnostic_finalizer): New.
8727         (c_common_initialize_diagnostics): Use it.
8729 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8731         PR preprocessor/51303
8732         * c-common.c (struct reason_option_codes_t option_codes):
8733         Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8735 2014-08-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8737         PR c/60975
8738         PR c/53063
8739         * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8740         * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8741         (c_common_post_options): Call init_global_opts_from_cpp.
8742         (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8744 2014-08-19  Marek Polacek  <polacek@redhat.com>
8746         PR c++/62153
8747         * c-common.c (maybe_warn_bool_compare): New function.
8748         * c-common.h (maybe_warn_bool_compare): Declare.
8749         * c.opt (Wbool-compare): New option.
8751 2014-08-19  Marek Polacek  <polacek@redhat.com>
8753         * c.opt (Wc99-c11-compat): New option.
8755 2014-08-19  Marek Polacek  <polacek@redhat.com>
8757         * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8758         to warn_c90_c99_compat.
8759         * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8760         to -1.
8762 2014-08-19  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8763             Steven Bosscher  <steven@gcc.gnu.org>
8765         PR c/52952
8766         * c-format.c: Add extra_arg_loc and format_string_loc to struct
8767         format_check_results.
8768         (check_function_format): Use true and add comment for boolean
8769         argument.
8770         (finish_dollar_format_checking): Use explicit location when warning.
8771         (check_format_info): Likewise.
8772         (check_format_arg): Set extra_arg_loc and format_string_loc.
8773         (check_format_info_main): Use explicit location when warning.
8774         (check_format_types): Pass explicit location.
8775         (format_type_warning): Likewise.
8777 2014-08-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
8779         PR fortran/44054
8780         * c-format.c: Handle Fortran flags.
8782 2014-08-12  Igor Zamyatin  <igor.zamyatin@intel.com>
8784         PR other/61962
8785         * array-notation-common.c (find_rank): Added handling for other
8786         types of references.
8788 2014-08-10  Marek Polacek  <polacek@redhat.com>
8790         PR c/51849
8791         * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8792         * c.opt (Wc90-c99-compat): Add option.
8794 2014-08-07  Trevor Saunders  <tsaunders@mozilla.com>
8796         * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8798 2014-08-03  Marek Polacek  <polacek@redhat.com>
8800         * c-common.c (check_case_value): Add location_t parameter.  Use it.
8801         (c_add_case_label): Pass loc to check_case_value.
8803 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8805         * cilk.c: Use hash_map instead of pointer_map.
8807 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
8809         * c-gimplify.c: Use hash_set instead of pointer_set.
8811 2014-08-01  Igor Zamyatin  <igor.zamyatin@intel.com>
8813         PR middle-end/61455
8814         * array-notation-common.c (extract_array_notation_exprs): Handling
8815         of DECL_EXPR added.
8817 2014-08-01  Jakub Jelinek  <jakub@redhat.com>
8819         * c-common.h (min_align_of_type): Removed prototype.
8820         * c-common.c (min_align_of_type): Removed.
8821         * c-ubsan.h (ubsan_maybe_instrument_reference,
8822         ubsan_maybe_instrument_member_call): New prototypes.
8823         * c-ubsan.c: Include stor-layout.h and builtins.h.
8824         (ubsan_maybe_instrument_reference_or_call,
8825         ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8826         functions.
8828 2014-07-31  Marc Glisse  <marc.glisse@inria.fr>
8830         PR c++/60517
8831         * c.opt (-Wreturn-local-addr): Move to common.opt.
8833 2014-07-30  Jason Merrill  <jason@redhat.com>
8835         PR c++/61659
8836         PR c++/61687
8837         Revert:
8838         * c.opt (-fuse-all-virtuals): New.
8840 2014-07-30  Tom Tromey  <tromey@redhat.com>
8842         PR c/59855
8843         * c.opt (Wdesignated-init): New option.
8844         * c-common.c (c_common_attribute_table): Add "designated_init".
8845         (handle_designated_init): New function.
8847 2014-07-24  Marek Polacek  <polacek@redhat.com>
8849         PR c/57653
8850         * c-opts.c (c_finish_options): If -imacros is in effect, return.
8852 2014-07-16  Dodji Seketeli  <dodji@redhat.com>
8854         PR preprocessor/60723 - missing system-ness marks for macro tokens
8855         * c-ppoutput.c (struct print::prev_was_system_token): New data
8856         member.
8857         (init_pp_output): Initialize it.
8858         (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8859         (do_line_change): Return a flag saying if a line marker was
8860         emitted or not.
8861         (scan_translation_unit): Detect if the system-ness of the token we
8862         are about to emit is different from the one of the previously
8863         emitted token.  If so, emit a line marker.  Avoid emitting useless
8864         adjacent line markers.  Avoid emitting line markers for tokens
8865         originating from the expansion of built-in macros.
8866         (scan_translation_unit_directives_only): Adjust.
8868 2014-07-15  Marek Polacek  <polacek@redhat.com>
8870         * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8871         TYPE_MAX_VALUE is NULL.
8873 2014-07-14  Jakub Jelinek  <jakub@redhat.com>
8875         PR middle-end/61294
8876         * c.opt (Wmemset-transposed-args): New warning.
8878 2014-07-10  Jason Merrill  <jason@redhat.com>
8880         PR c++/61659
8881         PR c++/61687
8882         * c.opt (-fuse-all-virtuals): New.
8884 2014-07-09  Richard Biener  <rguenther@suse.de>
8886         PR c-family/61741
8887         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8888         using unsigned arithmetic if overflow does not wrap instead of
8889         if overflow is undefined.
8891 2014-07-06  Marek Polacek  <polacek@redhat.com>
8893         PR c/6940
8894         * c.opt (Wsizeof-array-argument): New option.
8896 2014-07-03  Jakub Jelinek  <jakub@redhat.com>
8898         * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
8899         comments->count <= 1, as comments->entries might be NULL.
8901 2014-07-01  Marek Polacek  <polacek@redhat.com>
8903         * c.opt (Wint-conversion): New option.
8905 2014-07-01  Marek Polacek  <polacek@redhat.com>
8907         PR c/58286
8908         * c.opt (Wincompatible-pointer-types): New option.
8910 2014-06-30  Paolo Carlini  <paolo.carlini@oracle.com>
8912         PR c++/51400
8913         * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8914         Do not discard TYPE_QUALS of type.
8916 2014-06-26  Jason Merrill  <jason@redhat.com>
8918         * c-common.h (enum cxx_dialect): Add cxx1z.
8919         * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8920         * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8922 2014-06-26  Teresa Johnson  <tejohnson@google.com>
8924         * c-common.h (get_dump_info): Declare.
8925         * c-gimplify.c (c_genericize): Use saved dump files.
8926         * c-opts.c (c_common_parse_file): Begin and end dumps
8927         once around parsing invocation.
8928         (get_dump_info): New function.
8930 2014-06-23  Marek Polacek  <polacek@redhat.com>
8931             Andrew MacLeod  <amacleod@redhat.com>
8933         PR c/61553
8934         * c-common.c (get_atomic_generic_size): Don't segfault if the
8935         type doesn't have a size.
8937 2014-06-20  Marek Polacek  <polacek@redhat.com>
8939         * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8940         (ubsan_walk_array_refs_r): New function.
8941         (c_genericize): Instrument array bounds.
8942         * c-ubsan.c: Include "internal-fn.h".
8943         (ubsan_instrument_division): Mark instrumented arrays as having
8944         side effects.  Adjust ubsan_type_descriptor call.
8945         (ubsan_instrument_shift): Likewise.
8946         (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8947         (ubsan_instrument_bounds): New function.
8948         (ubsan_array_ref_instrumented_p): New function.
8949         (ubsan_maybe_instrument_array_ref): New function.
8950         * c-ubsan.h (ubsan_instrument_bounds): Declare.
8951         (ubsan_array_ref_instrumented_p): Declare.
8952         (ubsan_maybe_instrument_array_ref): Declare.
8954 2014-06-20  Hale Wang  <hale.wang@arm.com>
8956         PR lto/61123
8957         * c.opt (fshort-enums): Add to LTO.
8958         * c.opt (fshort-wchar): Likewise.
8960 2014-06-16  Marek Polacek  <polacek@redhat.com>
8962         PR c/60439
8963         * c.opt (Wswitch-bool): Add Var.
8965 2014-06-12  Jakub Jelinek  <jakub@redhat.com>
8967         PR middle-end/61486
8968         * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8969         #pragma omp target teams or
8970         #pragma omp {,target }teams distribute simd.
8972 2014-06-12  Jason Merrill  <jason@redhat.com>
8974         * c.opt (Wabi=, fabi-compat-version): New.
8975         * c-opts.c (c_common_handle_option): Handle -Wabi=.
8976         (c_common_post_options): Handle flag_abi_compat_version default.
8977         Disallow -fabi-compat-version=1.
8978         * c-common.h (abi_version_crosses): New.
8980 2014-06-11  Jan Hubicka  <hubicka@ucw.cz>
8982         * c-common.c (handle_section_attribute): Update handling for
8983         section names that are no longer trees.
8985 2014-06-10  Jakub Jelinek  <jakub@redhat.com>
8987         PR fortran/60928
8988         * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8989         (omp_pragmas): ... back here.
8991 2014-06-05  Marek Polacek  <polacek@redhat.com>
8993         PR c/49706
8994         * c-common.c (warn_logical_not_parentheses): New function.
8995         * c-common.h (warn_logical_not_parentheses): Declare.
8996         * c.opt (Wlogical-not-parentheses): New option.
8998 2014-06-04  Marek Polacek  <polacek@redhat.com>
9000         PR c/30020
9001         * c-common.c (check_case_bounds): Add location parameter.
9002         Use it.
9003         (c_add_case_label): Pass loc to check_case_bounds.
9005 2014-06-03  Marek Polacek  <polacek@redhat.com>
9007         PR c/60439
9008         * c.opt (Wswitch-bool): New option.
9010 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
9012         * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9013         Remove prototypes.
9014         (record_types_used_by_current_var_decl): Move prototype to where
9015         it belongs.
9017         * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9018         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9019         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9021 2014-05-21  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
9023         * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9024         * c-common.c (c_common_nodes_and_builtins): Don't initialize
9025         void_zero_node.
9026         * c-pretty-print.c (pp_c_void_constant): New function.
9027         (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9028         (c_pretty_printer::expression): Handle VOID_CST.
9029         * cilk.c (extract_free_variables): Likewise.
9030         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9031         (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9033 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
9035         * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9036         * c-pragma.c (push_alignment): Adjust.
9037         (handle_pragma_push_options): Likewise.
9039 2014-05-09  Marek Polacek  <polacek@redhat.com>
9041         PR c/50459
9042         * c-common.c (check_user_alignment): Return -1 if alignment is error
9043         node.
9044         (handle_aligned_attribute): Don't call default_conversion on
9045         FUNCTION_DECLs.
9046         (handle_vector_size_attribute): Likewise.
9047         (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9048         (handle_sentinel_attribute): Call default_conversion and allow even
9049         integral types as an argument.
9051 2014-05-08  Marek Polacek  <polacek@redhat.com>
9053         PR c/61053
9054         * c-common.c (min_align_of_type): New function factored out from...
9055         (c_sizeof_or_alignof_type): ...here.
9056         * c-common.h (min_align_of_type): Declare.
9058 2014-05-08  Marek Polacek  <polacek@redhat.com>
9060         PR c/61077
9061         * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9062         parameter type of main.
9064 2014-05-07  DJ Delorie  <dj@redhat.com>
9066         * c-cppbuiltin.c (print_bits_of_hex): New.
9067         (builtin_define_type_minmax): Print values using hex so as not to
9068         require a pre-computed list of string values.
9070 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
9071             Mike Stump  <mikestump@comcast.net>
9072             Richard Sandiford  <rdsandiford@googlemail.com>
9074         * c-ada-spec.c: Include wide-int.h.
9075         (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9076         (dump_generic_ada_node): Use wide-int interfaces.
9077         * c-common.c: Include wide-int-print.h.
9078         (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9079         (pointer_int_sum): Use wide-int interfaces.
9080         (c_common_nodes_and_builtins): Use make_int_cst.
9081         (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9082         (handle_alloc_size_attribute): Use wide-int interfaces.
9083         (get_nonnull_operand): Likewise.
9084         * c-format.c (get_constant): Use tree_fits_uhwi_p.
9085         * c-lex.c: Include wide-int.h.
9086         (narrowest_unsigned_type): Take a widest_int rather than two
9087         HOST_WIDE_INTs.
9088         (narrowest_signed_type): Likewise.
9089         (interpret_integer): Update accordingly.  Use wide-int interfaces.
9090         (lex_charconst): Use wide-int interfaces.
9091         * c-pretty-print.c: Include wide-int.h.
9092         (pp_c_integer_constant): Use wide-int interfaces.
9093         * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9094         INT_CST_LT_UNSIGNED.
9096 2014-05-06  Richard Biener  <rguenther@suse.de>
9098         * c-opts.c (c_common_post_options): For -freestanding,
9099         -fno-hosted and -fno-builtin disable pattern recognition
9100         if not enabled explicitely.
9102 2014-05-02  Marek Polacek  <polacek@redhat.com>
9104         * c.opt (Wsizeof-pointer-memaccess): Describe option.
9106 2014-05-01  Marek Polacek  <polacek@redhat.com>
9108         PR c/43245
9109         * c.opt (Wdiscarded-qualifiers): Add.
9111 2014-04-30  Marek Polacek  <polacek@redhat.com>
9113         * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs.  Perform
9114         INT_MIN / -1 sanitization only for integer types.
9116 2014-04-25  Marek Polacek  <polacek@redhat.com>
9118         PR c/18079
9119         * c-common.c (handle_noinline_attribute): Warn if the attribute
9120         conflicts with always_inline attribute.
9121         (handle_always_inline_attribute): Warn if the attribute conflicts
9122         with noinline attribute.
9124 2014-04-25  Marek Polacek  <polacek@redhat.com>
9126         PR c/60156
9127         * c-common.c (check_main_parameter_types): Warn about variadic main.
9129 2014-04-24  Mike Stump  <mikestump@comcast.net>
9131         * c.opt (Wshadow-ivar): Default to on.
9133 2014-04-24  Dimitris Papavasiliou  <dpapavas@gmail.com>
9135         * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9137 2014-04-23  Marek Polacek  <polacek@redhat.com>
9139         * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9141 2014-04-22  Jakub Jelinek  <jakub@redhat.com>
9143         PR sanitizer/60275
9144         * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9145         if flag_sanitize_undefined_trap_on_error.
9146         (ubsan_instrument_division, ubsan_instrument_shift,
9147         ubsan_instrument_vla): Likewise.  Use __ubsan_handle_*_abort ()
9148         if !flag_sanitize_recover.
9150 2014-04-22  Marc Glisse  <marc.glisse@inria.fr>
9152         PR libstdc++/43622
9153         * c-common.c (registered_builtin_types): Make non-static.
9154         * c-common.h (registered_builtin_types): Declare.
9156 2014-04-14  Richard Biener  <rguenther@suse.de>
9157             Marc Glisse  <marc.glisse@inria.fr>
9159         PR c/60819
9160         * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9161         apply may-alias the scalar pointer type when applicable.
9163 2014-04-12  Igor Zamyatin  <igor.zamyatin@intel.com>
9165         PR middle-end/60467
9166         * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9167         as possible argument for Cilk_spawn.
9169 2014-04-11  Tobias Burnus  <burnus@net-b.de>
9171         PR c/60194
9172         * c.opt (Wformat-signedness): Add
9173         * c-format.c(check_format_types): Use it.
9175 2014-04-11  Jason Merrill  <jason@redhat.com>
9177         PR c++/57926
9178         * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9179         default_conversion for an array argument.
9181 2014-04-08  Marek Polacek  <polacek@redhat.com>
9183         PR sanitizer/60745
9184         * c-ubsan.c: Include asan.h.
9185         (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9187 2014-04-03  Nathan Sidwell  <nathan@codesourcery.com>
9189         * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9191 2014-04-02  Marek Polacek  <polacek@redhat.com>
9193         * c-common.h (c_expand_expr): Remove declaration.
9195 2014-03-28  Jakub Jelinek  <jakub@redhat.com>
9197         PR c++/60689
9198         * c-common.c (add_atomic_size_parameter): When creating new
9199         params vector, push the size argument first.
9201 2014-03-26  Jakub Jelinek  <jakub@redhat.com>
9203         * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9204         ubsan_instrument_vla, ubsan_instrument_return): Adjust
9205         ubsan_create_data callers.
9207 2014-03-22  Jakub Jelinek  <jakub@redhat.com>
9209         PR debug/60603
9210         * c-opts.c (c_finish_options): Restore cb_file_change call to
9211         <built-in>.
9213 2014-03-13  Jakub Jelinek  <jakub@redhat.com>
9215         PR middle-end/36282
9216         * c-pragma.c (apply_pragma_weak): Only look at
9217         TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9218         DECL_ASSEMBLER_NAME_SET_P (decl).
9219         (maybe_apply_pending_pragma_weaks): Exit early if
9220         vec_safe_is_empty (pending_weaks) rather than only when
9221         !pending_weaks.
9222         (maybe_apply_pragma_weak): Likewise.  If !DECL_ASSEMBLER_NAME_SET_P,
9223         set assembler name back to NULL afterwards.
9225 2014-03-11  Jason Merrill  <jason@redhat.com>
9227         * c.opt: Add -std=gnu++14.
9229 2014-03-11  Ian Bolton  <ian.bolton@arm.com>
9231         * c-opts.c (c_common_post_options): Don't override
9232         -ffp-contract=fast if unsafe-math-optimizations is on.
9234 2014-03-08  Paulo Matos  <paulo@matos-sorge.com>
9236         * c.opt: Enable LTO FE for fshort-double.
9238 2014-03-07  Jason Merrill  <jason@redhat.com>
9240         * c.opt: Add -std=c++14.
9242 2014-03-06  Marek Polacek  <polacek@redhat.com>
9244         PR c/60197
9245         * cilk.c (contains_cilk_spawn_stmt): New function.
9246         (contains_cilk_spawn_stmt_walker): Likewise.
9247         (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9248         * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9250 2014-03-03  Jakub Jelinek  <jakub@redhat.com>
9252         * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9253         (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9254         even when flag_preprocess_only.
9256 2014-02-26  Jason Merrill  <jason@redhat.com>
9258         PR c++/59231
9259         PR c++/11586
9260         * c-common.c (shorten_compare): Don't check
9261         c_inhibit_evaluation_warnings.
9263 2014-02-19  Jakub Jelinek  <jakub@redhat.com>
9265         PR c/37743
9266         * c-common.c (c_common_nodes_and_builtins): When initializing
9267         c_uint{16,32,64}_type_node, also set corresponding
9268         uint{16,32,64}_type_node to the same value.
9270         PR c++/60267
9271         * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9272         for PRAGMA_IVDEP if flag_preprocess_only.
9274 2014-02-12  Jakub Jelinek  <jakub@redhat.com>
9276         PR c/60101
9277         * c-common.c (merge_tlist): If copy is true, call new_tlist,
9278         if false, add ADD itself, rather than vice versa.
9279         (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9280         copy.  For SAVE_EXPR, only call merge_tlist once.
9282 2014-02-08  Jakub Jelinek  <jakub@redhat.com>
9284         PR middle-end/60092
9285         * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9286         and tree_to_uhwi.
9287         (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9288         functions.
9289         (c_common_attribute_table): Add alloc_align and assume_aligned
9290         attributes.
9292 2014-02-06  Marek Polacek  <polacek@redhat.com>
9294         PR c/60087
9295         * c-common.c (warn_for_sign_compare): Call warning_at with location
9296         instead of warning.
9298 2014-02-05  Marek Polacek  <polacek@redhat.com>
9300         PR c/53123
9301         * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9302         statement.
9304 2014-02-04  Marek Polacek  <polacek@redhat.com>
9306         PR c/60036
9307         * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
9308         SAVE_EXPR.
9310 2014-02-03  Marc Glisse  <marc.glisse@inria.fr>
9312         PR c++/53017
9313         PR c++/59211
9314         * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
9315         handle_vector_size_attribute, handle_nonnull_attribute): Call
9316         default_conversion on the attribute argument.
9317         (handle_nonnull_attribute): Increment the argument number.
9319 2014-01-31  Marek Polacek  <polacek@redhat.com>
9321         PR c/59963
9322         * c-common.c (add_atomic_size_parameter): Pass vNULL to
9323         build_function_call_vec.
9324         (resolve_overloaded_builtin): Likewise.
9325         * c-common.h (build_function_call_vec): Adjust declaration.
9327 2014-01-30  Marek Polacek  <polacek@redhat.com>
9329         PR c/59940
9330         * c-common.h (unsafe_conversion_p): Adjust declaration.
9331         (warnings_for_convert_and_check): Likewise.
9332         (convert_and_check): Likewise.
9333         * c-common.c (unsafe_conversion_p): Add location parameter.  Call
9334         expansion_point_location_if_in_system_header on it.
9335         (warnings_for_convert_and_check): Add location parameter.  Call
9336         expansion_point_location_if_in_system_header on it.  Use it.
9337         (convert_and_check): Add location parameter.  Use it.
9338         (conversion_warning): Likewise.
9339         (c_add_case_label): Adjust convert_and_check calls.
9340         (scalar_to_vector): Adjust unsafe_conversion_p calls.
9342 2014-01-24  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9344         * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9345         flag_cilkplus.
9346         * c-pragma.c (init_pragma): Likewise.
9347         * c.opt: Likewise.
9349 2014-01-23  Marek Polacek  <polacek@redhat.com>
9351         PR c/59846
9352         * c-common.c (shorten_compare): Add location_t parameter.
9353         * c-common.h (shorten_binary_op): Adjust declaration.
9355 2014-01-23  Marek Polacek  <polacek@redhat.com>
9357         PR c/58346
9358         * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9359         * c-common.h: Declare it.
9361 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
9363         * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9364         * c-ada-spec.c (dump_ads): Likewise.
9365         (cpp_check): Likewise.
9366         (dump_ada_specs): Likewise.
9368 2014-01-15  Laurent Alfonsi  <laurent.alfonsi@st.com>
9370         PR c++/49718
9371         * c-common.c (handle_no_instrument_function_attribute): Allow
9372         no_instrument_function attribute in class member
9373         definition/declaration.
9375 2014-01-15  Jakub Jelinek  <jakub@redhat.com>
9377         PR c/58943
9378         * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9379         build_modify_expr with non-NOP_EXPR opcode.  Handle return from it
9380         being COMPOUND_EXPR.
9381         (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9382         operand a SAVE_EXPR and second MODIFY_EXPR.
9384 2014-01-09  Jakub Jelinek  <jakub@redhat.com>
9386         PR target/58115
9387         * c-pch.c (c_common_write_pch): Call
9388         prepare_target_option_nodes_for_pch.
9390 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9392         Update copyright years
9394 2014-01-02  Richard Sandiford  <rdsandiford@googlemail.com>
9396         * array-notation-common.c, c-cilkplus.c: Use the standard form for
9397         the copyright notice.
9399 2013-12-28  Eric Botcazou  <ebotcazou@adacore.com>
9401         * c-ada-spec.c (print_constructor): New function.
9402         (print_destructor): Retrieve the origin of the destructor.
9403         (print_ada_declaration): Revamp handling of constructors/destructors.
9405 2013-12-23  Stuart Hastings  <stuart@apple.com>
9406             Bill Maddox  <maddox@google.com>
9407             Jason Merrill  <jason@redhat.com>
9409         * c.opt: Add -fdeclone-ctor-dtor.
9410         * c-opts.c (c_common_post_options): Default to on iff -Os.
9412 2013-12-18  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9414         * c-common.c (c_common_attribute_table): Added "cilk simd function"
9415         attribute.
9416         * c-pragma.h (enum pragma_cilk_clause): Remove.
9417         (enum pragma_omp_clause): Added the following fields:
9418         PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9419         PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9420         PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9421         PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9422         PRAGMA_CILK_CLAUSE_UNIFORM.
9425 2013-12-11  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9427         * cilk.c (cilk_outline): Made this function non-static.
9428         (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9429         (create_cilk_wrapper): Added a new parameter: a function pointer.
9430         (c_install_body_w_frame_cleanup): Remove
9431         (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9432         * c-common.h (cilk_outline): New prototype.
9433         (gimplify_cilk_spawn): Removed two parameters.
9434         (cilk_install_body_with_frame_cleanup): New prototype.
9435         * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9436         CILK_SPAWN_STMT case.
9438 2013-12-11  Bernd Schmidt  <bernds@codesourcery.com>
9440         * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9442         * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9443         (int_array_type_node): Remove.
9444         * c-common.c (c_common_nodes_and_builtins): Don't build it.
9446 2013-12-05  Marek Polacek  <polacek@redhat.com>
9448         PR c/52023
9449         * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9450         [ADJUST_FIELD_ALIGN].
9452 2013-12-04  Joseph Myers  <joseph@codesourcery.com>
9454         PR c/52023
9455         * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9456         and check field alignment if set.
9457         * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9458         (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9460 2013-12-04  Jakub Jelinek  <jakub@redhat.com>
9461             Marek Polacek  <polacek@redhat.com>
9463         * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9464         sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9466 2013-11-29   H.J. Lu  <hongjiu.lu@intel.com>
9468         PR c/59309
9469         * cilk.c (gimplify_cilk_spawn): Properly handle function without
9470         arguments.
9472 2013-11-29  Jakub Jelinek  <jakub@redhat.com>
9474         PR c/59280
9475         * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9476         goto invalid.  If it is error_mark_node, don't issue further
9477         diagnostics.
9479 2013-11-28  Sergey Ostanevich  <sergos.gnu@gmail.com>
9481         * c.opt (Wopenmp-simd): New.
9483 2013-11-22  Jakub Jelinek  <jakub@redhat.com>
9485         * c-ubsan.h (ubsan_instrument_return): New prototype.
9486         * c-ubsan.c (ubsan_instrument_return): New function.
9488 2013-11-22  Andrew MacLeod  <amacleod@redhat.com>
9490         * c-common.c: Add required include files from gimple.h.
9491         * c-gimplify.c: Likewise.
9492         * cilk.c: Likewise.
9494 2013-11-22  David Malcolm  <dmalcolm@redhat.com>
9496         * c-common.c (unsafe_conversion_p): Remove use of
9497         EXPR_LOC_OR_HERE macro.
9498         (conversion_warning): Likewise.
9499         (warnings_for_convert_and_check): Likewise.
9500         (warn_for_collisions_1): Likewise.
9501         (shorten_compare): Likewise, and remove use of in_system_header
9502         macro, using the location from the former.
9503         * c-lex.c (dump_one_header): Remove use of input_filename macro.
9504         (cb_def_pragma): Remove use of in_system_header macro.
9505         (lex_string): Likewise.
9506         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9508 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
9509             Mike Stump  <mikestump@comcast.net>
9510             Richard Sandiford  <rdsandiford@googlemail.com>
9512         * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9513         instead of TREE_INT_CST_LOW, in cases where there is a protecting
9514         tree_fits_shwi_p or tree_fits_uhwi_p.
9515         (dump_generic_ada_node): Likewise.
9516         * c-format.c (check_format_arg): Likewise.
9517         * c-pretty-print.c (pp_c_integer_constant): Likewise.
9519 2013-11-20  Kenneth Zadeck  <zadeck@naturalbridge.com>
9521         * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9523 2013-11-19  Joshua J Cogliati  <jrincayc@yahoo.com>
9525         PR c/53001
9526         * c-common.c (unsafe_conversion_p): Make this function
9527         return an enumeration with more detail.
9528         (conversion_warning): Use the new return type of
9529         unsafe_conversion_p to separately warn either about conversions
9530         that lower floating point number precision or about the other
9531         kinds of conversions.
9532         * c-common.h (enum conversion_safety): New enumeration.
9533         (unsafe_conversion_p): switching return type to
9534         conversion_safety enumeration.
9535         * c.opt: Adding new warning -Wfloat-conversion and
9536         enabling it with -Wconversion.
9538 2013-11-19  Basile Starynkevitch  <basile@starynkevitch.net>
9540         * c-opts.c: Include plugin.h.
9541         (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9543 2013-11-19  Marek Polacek  <polacek@redhat.com>
9545         * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9546         call.
9547         (ubsan_instrument_shift): Likewise.
9548         (ubsan_instrument_vla): Likewise.
9550 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9552         * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9553         cast to unsigned type.
9555 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9557         * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9558         tree_low_cst.
9559         (complete_array_type): Update comment to refer to tree_to_[su]hwi
9560         rather than tree_low_cst.
9562 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9564         * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9565         tree_to_uhwi throughout.
9567 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9569         * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9570         tree_low_cst (..., 0) with tree_to_shwi throughout.
9572 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9574         * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9575         host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9577 2013-11-18  Richard Sandiford  <rdsandiford@googlemail.com>
9579         * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9580         host_integerp (..., 0) with tree_fits_shwi_p throughout.
9582 2013-11-15  Aldy Hernandez  <aldyh@redhat.com>
9584         * c-cilkplus.c: New file.
9585         * c-common.c (readonly_error): Add location argument.
9586         * c-common.h (readonly_error): Same.
9587         (c_finish_cilk_clauses): Protoize.
9588         (c_check_cilk_loop): Same.
9589         c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9590         Do not fail on error_mark_node.
9591         Abstract increment canonicalization to here...
9592         (c_omp_for_incr_canonicalize_ptr): New.
9593         c-pragma.c (init_pragma): Register "simd" pragma.
9594         c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9595         (enum pragma_cilk_clause): New.
9597 2013-11-15  Richard Sandiford  <rdsandiford@googlemail.com>
9599         * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9600         wchar_type and host_integerp checks.
9602 2013-11-14  Andrew MacLeod  <amacleod@redhat.com>
9604         * c-common.c: Likewise.
9605         * c-gimplify.c: Likewise.
9606         * cilk.c: Likewise.
9608 2013-11-14  Diego Novillo  <dnovillo@google.com>
9610         * c-common.c: Include fold-const.h.
9611         Include stor-layout.h.
9612         Include calls.h.
9613         Include stringpool.h.
9614         Include attribs.h.
9615         Include varasm.h.
9616         Include trans-mem.h.
9617         * c-cppbuiltin.c: Include stor-layout.h.
9618         Include stringpool.h.
9619         * c-format.c: Include stringpool.h.
9620         * c-lex.c: Include stringpool.h.
9621         Include stor-layout.h.
9622         * c-pragma.c: Include stringpool.h.
9623         Include attribs.h.
9624         Include varasm.h.
9625         Include gcc-symtab.h.
9626         * c-pretty-print.c: Include stor-layout.h.
9627         Include attribs.h.
9628         * cilk.c: Include stringpool.h.
9629         Include calls.h.
9631 2013-11-13  Joseph Myers  <joseph@codesourcery.com>
9633         * c-common.h (enum rid): Add RID_AUTO_TYPE.
9634         * c-common.c (c_common_reswords): Add __auto_type.
9635         (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9637 2013-11-12  Andrew MacLeod  <amacleod@redhat.com>
9639         * c-common.c: Include gimplify.h.
9640         * c-gimplify.c: Likewise.
9641         * cilk.c: Likewise.
9642         * c-omp.c: Include gimple-expr.h instead of gimple.h.
9643         * c-ubsan.c: Don't include gimple.h.
9645 2013-11-12  Joseph Myers  <joseph@codesourcery.com>
9647         * c-common.c (c_common_reswords): Add _Thread_local.
9649 2013-11-09  Joseph Myers  <joseph@codesourcery.com>
9651         * c-common.c (atomic_size_supported_p): New function.
9652         (resolve_overloaded_atomic_exchange)
9653         (resolve_overloaded_atomic_compare_exchange)
9654         (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9655         Use it instead of comparing size with a local list of sizes.
9657 2013-11-07  Andrew MacLeod  <amacleod@redhat.com>
9658             Joseph Myers  <joseph@codesourcery.com>
9660         * c-common.h (enum rid): Add RID_ATOMIC.
9661         * c-common.c (c_common_reswords): Add _Atomic.
9662         (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9663         (keyword_is_type_qualifier): Accept RID_ATOMIC.
9664         * c-format.c (check_format_types): Check for extra _Atomic
9665         qualifiers in format argument.
9666         * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9667         (pp_c_type_qualifier_list): Mention _Atomic in comment.
9669 2013-11-06  Tobias Burnus  <burnus@net-b.de>
9671         * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9673 2013-11-06  Joseph Myers  <joseph@codesourcery.com>
9675         * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9676         standards modes.
9677         * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9678         to mean lack of IEEE 754 support.
9680 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9682         * c.opt (-Wdate-time): New option
9683         * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9685 2013-11-05  Joseph Myers  <joseph@codesourcery.com>
9687         * c-cppbuiltin.c (cpp_iec_559_value): Test
9688         flag_excess_precision_cmdline not flag_excess_precision.
9690 2013-11-05  Tobias Burnus  <burnus@net-b.de>
9692         * c.opt (fopenmp-simd): New option.
9693         * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9694         (omp_pragmas): ... this new struct.
9695         (c_pp_lookup_pragma): Also walk omp_pragmas.
9696         (init_pragma): Init pragmas for -fopenmp-simd.
9698 2013-11-04  Marek Polacek  <polacek@redhat.com>
9700         PR c++/58979
9701         * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9703 2013-11-04  Joseph Myers  <joseph@codesourcery.com>
9705         * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9706         New functions.
9707         (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9709 2013-11-04  Eric Botcazou  <ebotcazou@adacore.com>
9711         * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9712         (dump_ada_specs): Adjust prototype of second callback.
9713         * c-ada-spec.c (cpp_check): New global variable.
9714         (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9715         (print_generic_ada_decl): Likewise.
9716         (has_static_fields): Change return type to bool and add guard.
9717         (has_nontrivial_methods): New predicate.
9718         (is_tagged_type): Change return type to bool.
9719         (separate_class_package): Call has_nontrivial_methods.
9720         (pp_ada_tree_identifier): Minor tweaks.
9721         (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9722         (dump_ada_array_domains): Likewise.
9723         (dump_ada_array_type): Likewise.
9724         (dump_template_types): Remove cpp_check parameter and do not pass it to
9725         dump_generic_ada_node.
9726         (dump_ada_template): Likewise.
9727         (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9728         recursively.
9729         (print_ada_methods): Change return type to integer.  Remove cpp_check
9730         parameter and do not pass it down.
9731         (dump_nested_types): Remove cpp_check parameter and do not pass it to
9732         dump_generic_ada_node.
9733         (print_ada_declaration): Likewise.  Test RECORD_OR_UNION_TYPE_P before
9734         accessing methods.
9735         (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9736         down.  Use has_nontrivial_methods to recognize C++ classes.  Use return
9737         value of print_ada_methods.
9738         (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9739         Set cpp_check to it before invoking dump_ada_nodes.
9740         (dump_ada_specs): Likewise.
9742 2013-11-03  Marek Polacek  <polacek@redhat.com>
9744         * c-ubsan.c: Don't include hash-table.h.
9745         (ubsan_instrument_vla): New function.
9746         * c-ubsan.h: Declare it.
9748 2013-10-31  David Malcolm  <dmalcolm@redhat.com>
9750         Automated part of renaming of symtab_node_base to symtab_node.
9752         Patch autogenerated by rename_symtab.py from
9753         https://github.com/davidmalcolm/gcc-refactoring-scripts
9754         revision 58bb219cc090b2f4516a9297d868c245495ee622
9756         * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9757         symtab_node_base to symtab_node.
9759 2013-10-31  Edward Smith-Rowland  <3dw4rd@verizon.net>
9761         Implement C++14 digit separators.
9762         * c-lex.c (interpret_float): Remove digit separators from scratch string
9763         before building real literal.
9765 2013-10-30  Jakub Jelinek  <jakub@redhat.com>
9767         * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9769 2013-10-29  Balaji V. Iyer  <balaji.v.iyer@intel.com>
9771         * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9772         fields.
9773         (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9774         enabled.
9775         * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9776         (insert_cilk_frame): New prototype.
9777         (cilk_init_builtins): Likewise.
9778         (gimplify_cilk_spawn): Likewise.
9779         (c_cilk_install_body_w_frame_cleanup): Likewise.
9780         (cilk_detect_spawn_and_unwrap): Likewise.
9781         (cilk_set_spawn_marker): Likewise.
9782         (build_cilk_sync): Likewise.
9783         (build_cilk_spawn): Likewise.
9784         * cilk.c: New file.
9786 2013-10-29  David Malcolm  <dmalcolm@redhat.com>
9788         Patch autogenerated by refactor_symtab.py from
9789         https://github.com/davidmalcolm/gcc-refactoring-scripts
9790         revision 58bb219cc090b2f4516a9297d868c245495ee622
9792         * c-gimplify.c (c_genericize): Update for conversion of symtab types
9793         to a true class hierarchy.
9794         * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9796 2013-10-27  Richard Sandiford  <rdsandiford@googlemail.com>
9798         * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9800 2013-10-26  Jeff Law  <law@redhat.com>
9802         * c-common.c (c_define_builtins): Remove mudflap support.
9803         * c.opt: Ignore and warn for mudflap options.
9805 2013-10-24  Tobias Burnus  <burnus@net-b.de>
9807         PR other/33426
9808         * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9809         * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9811 2013-10-23  Jason Merrill  <jason@redhat.com>
9813         * c-format.c (gcc_cxxdiag_char_table): Add %X.
9815 2013-10-11  Jakub Jelinek  <jakub@redhat.com>
9817         * c-common.h (omp_clause_mask::operator !=): New method.
9818         * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9819         instead of if (mask & something) tests everywhere.
9821         * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9822         201307 instead of 201107.
9823         * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9824         (c_common_attribute_table): Add "omp declare target" and
9825         "omp declare simd" attributes.
9826         (handle_omp_declare_target_attribute,
9827         handle_omp_declare_simd_attribute): New functions.
9828         * c-omp.c: Include c-pragma.h.
9829         (c_finish_omp_taskgroup): New function.
9830         (c_finish_omp_atomic): Add swapped argument, if true,
9831         build the operation first with rhs, lhs arguments and use NOP_EXPR
9832         build_modify_expr.
9833         (c_finish_omp_for): Add code argument, pass it down to make_code.
9834         (c_omp_split_clauses): New function.
9835         (c_split_parallel_clauses): Removed.
9836         (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9837         c_omp_declare_simd_clauses_to_decls): New functions.
9838         * c-common.h (omp_clause_mask): New type.
9839         (OMP_CLAUSE_MASK_1): Define.
9840         (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9841         omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9842         omp_clause_mask::operator |, omp_clause_mask::operator &,
9843         omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9844         omp_clause_mask::operator ==): New methods.
9845         (enum c_omp_clause_split): New.
9846         (c_finish_omp_taskgroup): New prototype.
9847         (c_finish_omp_atomic): Add swapped argument.
9848         (c_finish_omp_for): Add code argument.
9849         (c_omp_split_clauses): New prototype.
9850         (c_split_parallel_clauses): Removed.
9851         (c_omp_declare_simd_clauses_to_numbers,
9852         c_omp_declare_simd_clauses_to_decls): New prototypes.
9853         * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9854         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9855         PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9856         PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9857         PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9858         Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9859         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9860         PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9861         PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9862         PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9863         PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9864         PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9865         PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9866         PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9867         PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9868         PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9869         PRAGMA_OMP_CLAUSE_UNIFORM.
9871 2013-10-09  Marc Glisse  <marc.glisse@inria.fr>
9873         PR tree-optimization/20318
9874         * c-common.c (handle_returns_nonnull_attribute): New function.
9875         (c_common_attribute_table): Add returns_nonnull.
9877 2013-10-03  Marc Glisse  <marc.glisse@inria.fr>
9879         PR c++/19476
9880         * c.opt (fcheck-new): Move to common.opt.
9882 2013-09-25  Marek Polacek  <polacek@redhat.com>
9883             Jakub Jelinek  <jakub@redhat.com>
9885         PR sanitizer/58413
9886         * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9887         an expression if we can prove it is correct.
9888         (ubsan_instrument_division): Likewise.  Remove unnecessary
9889         check.
9891 2013-09-18  Marek Polacek  <polacek@redhat.com>
9893         PR sanitizer/58411
9894         * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9895         Declare it.
9896         (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9898 2013-09-14  Iain Sandoe  <iain@codesourcery.com>
9900         PR target/48094
9901         * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9902         fobjc-gc, freplace-objc-classes): Accept for LTO.
9904 2013-09-13  Jacek Caban  <jacek@codeweavers.com>
9906         * c-target.def: New hook
9908 2013-09-09  Paolo Carlini  <paolo.carlini@oracle.com>
9910         PR c++/43452
9911         * c.opt (Wdelete-incomplete): Add.
9913 2013-09-08  Joern Rennecke  <joern.rennecke@embecosm.com>
9915         * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9916         (vector_types_compatible_elements_p): New function.
9917         * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9918         declaration.
9919         (vector_types_compatible_elements_p): Declare.
9921 2013-09-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9923         * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9924         a virtual member function.
9925         (pp_simple_type_specifier): Remove.
9926         (pp_c_type_specifier): Likewise.
9927         * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9928         Rename from pp_c_type_specifier.  Adjust.
9929         (c_pretty_printer::c_pretty_printer): Do not assign to
9930         simple_type_specifier.
9932 2013-09-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9934         * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9935         member function.
9936         (c_pretty_printer::storage_class_specifier): Likewise.
9937         (c_pretty_printer::initializer): Likewise.
9938         (pp_declaration): Remove.
9939         (pp_declaration_specifiers): Likewise.
9940         (pp_abstract_declarator): Likewise.
9941         (pp_declarator): Likewise.
9942         (pp_type_id): Likewise.
9943         (pp_statement): Likewise.
9944         (pp_constant): Likewise.
9945         (pp_id_expression): Likewise.
9946         (pp_primary_expression): Likewise.
9947         (pp_unary_expression): Likewise.
9948         (pp_multiplicative_expression): Likewise.
9949         (pp_conditional_expression): Likewise.
9950         (pp_assignment_expression): Likewise.
9951         (pp_expression): Likewise.
9952         (pp_c_type_id): Likewise.
9953         (pp_c_storage_class_specifier): Likewise.
9954         * c-pretty-print.c (pp_c_type_cast): Tidy.
9955         (pp_c_pointer): Likewise.
9956         (pp_c_type_specifier): Likewise.
9957         (pp_c_parameter_type_list): Likewise.
9958         (pp_c_function_definition): Likewise.
9959         (pp_c_init_declarator): Likewise.
9960         (pp_c_initializer_list): Likewise.
9961         (pp_c_constructor_elts): Likewise.
9962         (c_pretty_printer::direct_abstract_declarator): Likewise.
9963         (c_pretty_printer::declaration_specifiers): Likewise.
9964         (c_pretty_printer::primary_expression): Likewise.
9965         (c_pretty_printer::postfix_expression): Likewise.
9966         (c_pretty_printer::type_id): Rename from pp_c_type_id.
9967         (c_pretty_printer::storage_class_specifier): Rename from
9968         pp_c_storage_class_specifier.
9969         (c_pretty_printer::initializer): Rename from pp_c_initializer.
9970         (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9971         storage_class_specifier, initializer, offset_list, flags.
9973 2013-08-30  Marek Polacek  <polacek@redhat.com>
9975         * c-ubsan.c: New file.
9976         * c-ubsan.h: New file.
9978 2013-08-30  Gabriel Dos Reis  <gdr@integrable-solutions.net>
9980         * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9981         member function.
9982         (c_pretty_printer::declaration_specifiers): Likewise.
9983         (c_pretty_printer::declarator): Likewise.
9984         (c_pretty_printer::abstract_declarator): Likewise.
9985         (c_pretty_printer::direct_abstract_declarator): Likewise.
9986         (c_pretty_printer::direct_declarator): Likewise.
9987         (c_pretty_printer::function_specifier): Likewise.
9988         (pp_declaration): Adjust.
9989         (pp_declaration_specifiers): Likewise.
9990         (pp_abstract_declarator): Likewise.
9991         (pp_direct_declarator): Likewise.
9992         (pp_function_specifier): Likewise.
9993         (pp_direct_abstract_declarator): Remove as unused.
9994         (pp_c_declaration): Remove.
9995         (pp_c_declaration_specifiers): Likewise.
9996         (pp_c_declarator): Likewise.
9997         (pp_c_direct_declarator): Likewise.
9998         (pp_c_function_specifier): Likewise.
9999         (pp_c_direct_abstract_declarator): Likewise.
10000         * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10001         from pp_c_abstract_declarator.  Adjust.
10002         (c_pretty_printer::direct_abstract_declarator): Rename from
10003         pp_c_direct_abstract_declarator.  Adjust.
10004         (c_pretty_printer::function_specifier): Rename from
10005         pp_c_function_specifier.  Adjust.
10006         (c_pretty_printer::declaration_specifiers): Rename from
10007         pp_c_declaration_specifiers.  Adjust.
10008         (c_pretty_printer::direct_declarator): Rename from
10009         pp_c_direct_declarator.  Adjust.
10010         (c_pretty_printer::declarator): Rename from pp_c_declarator.  Adjust.
10011         (c_pretty_printer::declaration): Rename from pp_c_declaration.  Adjust.
10012         (c_pretty_printer::c_pretty_printer): Do not assign to
10013         declaration, declaration_specifiers, declarator,
10014         direct_declarator, direct_abstract_declarator, function_specifier.
10016 2013-08-26  Gabriel Dos Reis  <gdre@integrable-solutions.net>
10018         * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10019         virtual member function.
10020         (c_pretty_printer::multiplicative_expression): Likewise.
10021         (c_pretty_printer::conditional_expression): Likewise.
10022         (c_pretty_printer::assignment_expression): Likewise.
10023         (c_pretty_printer::expression): Likewise.
10024         (pp_unary_expression): Adjust.
10025         (pp_multiplicative_expression): Likewise.
10026         (pp_assignment_expression): Likewise.
10027         (pp_conditional_expression): Likewise.
10028         (pp_expression): Likewise.
10029         * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10030         from pp_c_unary_expression.  Adjust.
10031         (c_pretty_printer::multiplicative_expression): Rename from
10032         pp_c_multiplicative_expression.  Adjust.
10033         (c_pretty_printer::conditional_expression): Rename from
10034         pp_c_conditional_expression.  Adjust.
10035         (c_pretty_printer::assignment_expression): Rename from
10036         pp_c_assignment_expression.  Adjust.
10037         (c_pretty_printer::expression): Rename from pp_c_expression.  Adjust.
10038         (c_pretty_printer::c_pretty_printer): Do not assign to
10039         unary_expression, multiplicative_expression,
10040         conditional_expression, expression.
10042 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10044         * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10045         virtual member function.
10046         (pp_postfix_expression): Adjust.
10047         (pp_c_postfix_expression): Remove.
10048         * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10049         from pp_c_postfix_expression.  Adjust.
10050         (c_pretty_printer::c_pretty_printer): Do not assign to
10051         postfix_expression.
10053 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10055         * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10056         virtua member function.
10057         (pp_primary_expression): Adjust.
10058         (pp_c_primary_expression): Remove.
10059         * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10060         from pp_c_primary_expression.  Adjust.
10061         (pp_c_initializer_list): Use pp_primary_expression.
10062         (c_pretty_printer::c_pretty_printer): Do not assign to
10063         primary_expression.
10065 2013-08-25  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10067         * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10068         * c-pretty-print.c (M_): Remove.
10069         (c_pretty_printer::translate_string): Define.
10070         (pp_c_type_specifier): Use it.
10071         (pp_c_primary_expression): Likewise.
10072         (pp_c_expression): Likewise.
10074 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10076         * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10077         virtual function.
10078         (pp_c_id_expression): Remove.
10079         (pp_id_expression): Adjust.
10080         * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10081         pp_c_id_expression.  Adjust.
10082         (pp_c_postfix_expression): Use pp_id_expression.
10083         (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10085 2013-08-24  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10087         * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10088         member function.
10089         (pp_constant): Adjust.
10090         (pp_c_constant): Remove.
10091         * c-pretty-print.c (c_pretty_printer::constant): Rename from
10092         pp_c_constant.  Adjust.
10093         (pp_c_constant)
10094         (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10095         (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10097 2013-08-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10099         * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10100         (c_pretty_printer::c_pretty_printer): Declare.
10101         * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10102         c_pretty_printer_init.  Adjust.
10103         (print_c_tree): Do not call c_pretty_printer_init.
10104         * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10106 2013-08-09  Arnaud Charlet  <charlet@adacore.com>
10108         * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10110 2013-08-05  Paolo Carlini  <paolo.carlini@oracle.com>
10112         PR c++/58080
10113         * c-common.c (pointer_int_sum): Add bool parameter.
10114         * c-common.h (pointer_int_sum): Adjust declaration.
10116 2013-08-05  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10118         * c-pretty-print.c (print_c_tree): Simplify.  Use non-static local
10119         c_pretty_printer variable.
10121 2013-08-04  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10123         * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10124         (pp_base): Remove.
10125         (pp_c_base): Likewise.  Adjust users.
10126         * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10127         (pp_c_whitespace): Do not call pp_base.
10128         (pp_c_left_paren): Likewise.
10129         (pp_c_right_paren): Likewise.
10130         (pp_c_left_brace): Likewise.
10131         (pp_c_right_brace): Likewise.
10132         (pp_c_left_bracket): Likewise.
10133         (pp_c_right_bracket): Likewise.
10134         (pp_c_dot): Likewise.
10135         (pp_c_ampersand): Likewise.
10136         (pp_c_star): Likewise.
10137         (pp_c_arrow): Likewise.
10138         (pp_c_semicolon): Likewise.
10139         (pp_c_complement): Likewise.
10140         (pp_c_exclamation): Likewise.
10141         (pp_c_direct_declarator): Likewise.
10142         (pp_c_ws_string): Likewise.
10143         (pp_c_identifier): Likewise.
10144         (pp_c_statement): Likewise.
10145         (print_c_tree): Likewise.
10147 2013-08-04  Ed Smith-Rowland  <3dw4rd@verizon.net>
10149         PR c++/58072
10150         * c-common.c (c_parse_error): Catch user-defined literal tokens and
10151         provide useful error strings.
10153 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10155         * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10156         printer functions instead of pp_string or operators and punctuators.
10157         (dump_generic_ada_node): Likewise.
10158         * c-pretty-print.c (pp_c_type_specifier): Likewise.
10159         (pp_c_relational_expression): Likewise.
10160         (pp_c_logical_or_expression): Likewise.
10162 2013-08-03  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10164         * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10165         functions instead of pp_character.
10166         (pp_ada_tree_identifier): Likewise.
10167         (dump_ada_double_name): Likewise.
10168         (dump_ada_function_declaration): Likewise.
10169         (dump_ada_array_domains): Likewise.
10170         (dump_template_types): Likewise.
10171         (dump_generic_ada_node): Likewise.
10172         (print_ada_declaration): Likewise.
10173         (print_ada_struct_decl): Likewise.
10174         * c-pretty-print.c (pp_c_integer_constant): Likewise.
10176 2013-07-23  Tom Tromey  <tromey@redhat.com>
10178         * c-common.h (enum rid) <RID_GENERIC>: New constant.
10179         * c-common.c (c_common_reswords): Add _Generic.
10181 2013-07-21   Ondřej Bílka  <neleai@seznam.cz>
10183         * c-common.c: Fix typos.
10184         * c-common.h: Likewise.
10186 2013-07-13  Lubos Lunak  <l.lunak@suse.cz>
10188         PR c++/55203
10189         * c-common.c (c_common_attribute_table): Add warn_unused.
10190         (handle_warn_unused_attribute): New.
10192 2013-07-10  Jakub Jelinek  <jakub@redhat.com>
10194         * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10195         for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10197 2013-07-10  Paolo Carlini  <paolo.carlini@oracle.com>
10199         PR c++/57869
10200         * c.opt: Add Wconditionally-supported.
10202 2013-07-08  Graham Stott  <graham.stott@btinternet.com>
10204         * array-notation-common.c (length_mismatch_in_expr_p): Delete
10205         unused variables l_length and l_node.
10207 2013-07-04  Joern Rennecke  <joern.rennecke@embecosm.com>
10209         PR c/57821
10210         * c-common.c (complete_array_type): Delay folding first index
10211         like other indices.  When folding, check for index overflow.
10213 2013-06-27  Marc Glisse  <marc.glisse@inria.fr>
10215         PR c++/57509
10216         * c-common.h (c_build_vec_perm_expr): New complain argument.
10217         * c-common.c (c_build_vec_perm_expr): Likewise.
10218         Use save_expr also in C++.
10220 2013-06-22  Gabriel Dos Reis  <gdr@integrable-solutions.net>
10222         * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10223         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10224         * c-opts.c (c_common_post_options): Likewise.
10226 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10228         * array-notation-common.c (length_mismatch_in_expr): Changed the
10229         parameter type's from a dynamic array to a vec_tree.  Also removed
10230         the size parameters.
10231         * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10232         the change above.
10234 2013-06-21  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10236         * c-common.h (struct cilkplus_an_parts): New structure.
10237         (struct cilkplus_an_loop_parts): Likewise.
10238         (cilkplus_extract_an_triplets): New prototype.
10239         (fix_sec_implicit_args): Likewise.
10240         * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10241         (fix_sec_implicit_args): Likewise.
10243 2013-06-20  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10245         * array-notation-common.c (find_inv_trees): Removed an unwanted
10246         typecasting.
10247         * c-common.h (struct inv_list::additional_tcodes): Changed type from
10248         enum rid to enum tree_code.
10250 2013-06-11  Jan Hubicka  <jh@suse.cz>
10252         * c-common.c (handle_alias_ifunc_attribute): Do not set
10253         DECL_EXTERNAL for weakref variables.
10254         * c-pragma.c (handle_pragma_weak): Make sure aliases
10255         are not declared as external.
10257 2013-06-07  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10259         * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10260         function from c/c-array-notation.c.
10261         (is_cilkplus_reduce_builtin): Likewise.
10262         (find_rank): Likewise.
10263         (extract_array_notation_exprs): Likewise.
10264         (replace_array_notations): Likewise.
10265         (find_inv_trees): Likewise.
10266         (replace_inv_trees): Likewise.
10267         (contains_array_notation_expr): Likewise.
10268         (find_correct_array_notation_type): Likewise.
10269         * c-common.h (struct inv_list): Moved this struct from the file
10270         c/c-array-notation.c and added a new field called additional tcodes.
10271         (length_mismatch_in_expr_p): New prototype.
10272         (is_cilkplus_reduce_builtin): Likewise.
10273         (find_rank): Likewise.
10274         (extract_array_notation_exprs): Likewise.
10275         (replace_array_notation): Likewise.
10276         (find_inv_trees): Likewise.
10277         (replace_inv_trees): Likewise.
10278         (find_correct_array_notation_type): Likewise.
10280 2013-05-28  Balaji V. Iyer  <balaji.v.iyer@intel.com>
10282         * c-common.c (c_define_builtins): When cilkplus is enabled, the
10283         function array_notation_init_builtins is called.
10284         (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10285         * c-common.def (ARRAY_NOTATION_REF): New tree.
10286         * c-common.h (build_array_notation_expr): New function declaration.
10287         (build_array_notation_ref): Likewise.
10288         (extract_sec_implicit_index_arg): New extern declaration.
10289         (is_sec_implicit_index_fn): Likewise.
10290         (ARRAY_NOTATION_CHECK): New define.
10291         (ARRAY_NOTATION_ARRAY): Likewise.
10292         (ARRAY_NOTATION_START): Likewise.
10293         (ARRAY_NOTATION_LENGTH): Likewise.
10294         (ARRAY_NOTATION_STRIDE): Likewise.
10295         * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10296         ARRAY_NOTATION_REF.
10297         (pp_c_expression): Likewise.
10298         * c.opt (flag_enable_cilkplus): New flag.
10299         * array-notation-common.c: New file.
10301 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
10303         PR c++/57274
10304         * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
10306 2013-05-10  Marc Glisse  <marc.glisse@inria.fr>
10308         * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
10309         vectors.
10311 2013-05-07  Han Shen  <shenhan@google.com>
10313         * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
10315 2013-04-29  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>
10317         * c-common.c (check_user_alignment): Emit error for negative values.
10319 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10321         * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
10323 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10325         * c-cppbuiltin.c (c_cpp_builtins): Do not define
10326         __GXX_EXPERIMENTAL_CXX1Y__.
10328 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10329             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
10331         * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
10332         * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
10333         to simply use OPT_Wpointer_arith.
10334         (c_sizeof_or_alignof_type): Likewise.
10336 2013-04-24  Paolo Carlini  <paolo.carlini@oracle.com>
10338         * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
10340 2013-04-12  Jakub Jelinek  <jakub@redhat.com>
10342         * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
10343         gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10344         specifiers.
10346 2013-04-07  Steven Bosscher  <steven@gcc.gnu.org>
10348         * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10350 2013-04-03  Paolo Carlini  <paolo.carlini@oracle.com>
10352         * c-common.c (pointer_int_sum): Remove dead code.
10354 2013-03-09  Richard Sandiford  <rdsandiford@googlemail.com>
10356         PR middle-end/56524
10357         * c-common.c (handle_optimize_attribute): Don't call
10358         save_optabs_if_changed.
10360 2013-03-05  Jakub Jelinek  <jakub@redhat.com>
10362         PR middle-end/56461
10363         * c-pch.c (pch_init): Free target_validity at the end.
10365 2013-03-04  Jakub Jelinek  <jakub@redhat.com>
10367         * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10369 2013-02-28  Konstantin Serebryany  <konstantin.s.serebryany@gmail.com>
10370             Jakub Jelinek  <jakub@redhat.com>
10372         PR sanitizer/56454
10373         * c-common.c (handle_no_sanitize_address_attribute): New function.
10374         (c_common_attribute_table): Add no_sanitize_address attribute.
10375         (handle_no_address_safety_analysis_attribute): Add
10376         no_sanitize_address attribute, not no_address_safety_analysis
10377         attribute.
10379 2013-02-18  Aldy Hernandez  <aldyh@redhat.com>
10381         PR target/52555
10382         * c-common.c (handle_optimize_attribute): Call
10383         save_optabs_if_changed.
10385 2013-02-18  Jakub Jelinek  <jakub@redhat.com>
10386             Steven Bosscher  <steven@gcc.gnu.org>
10388         PR pch/54117
10389         * c-opts.c (c_common_post_options): If debug info is enabled
10390         and non-dwarf*, refuse to load PCH files and when writing PCH
10391         file warn.
10393 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
10395         PR middle-end/56167
10396         * c-common.c (handle_error_attribute): Fix condition.
10398 2013-01-30  Jakub Jelinek  <jakub@redhat.com>
10400         PR c++/55742
10401         * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10403 2013-01-18  Jason Merrill  <jason@redhat.com>
10405         PR target/54908
10406         * c.opt (-fextern-tls-init): New.
10407         * c-opts.c (c_common_post_options): Handle it.
10409 2013-01-09  Jakub Jelinek  <jakub@redhat.com>
10411         PR c/48418
10412         * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10413         RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10414         and is either negative or bigger or equal to type precision
10415         of the first operand.
10417 2012-12-03  Marek Polacek  <polacek@redhat.com>
10419         PR c/55570
10420         * c-common.c (check_user_alignment): Swap order of tests,
10421         check TREE_CODE first.
10423 2012-11-29  Ed Smith-Rowland  <3dw4rd@verizon.net>
10425         PR c++/52654
10426         * c-common.h (overflow_type): New enum.
10427         (build_userdef_literal): Add overflow_type argument.
10428         (tree_userdef_literal): Add overflow_type.
10429         (USERDEF_LITERAL_OVERFLOW): New access macro.
10430         * c-common.c (build_userdef_literal): Add overflow_type
10431         argument.
10432         * c-lex.c (c_lex_with_flags): Add overflow_type to
10433         build_userdef_literal calls.
10434         (interpret_integer, interpret_float): Add overflow_type argument.
10436 2012-11-28  Richard Biener  <rguenther@suse.de>
10438         PR c/35634
10439         * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10440         here and use a type with proper overflow behavior for types that would
10441         need to be promoted for the arithmetic.
10443 2012-11-23  Jakub Jelinek  <jakub@redhat.com>
10445         PR sanitizer/55435
10446         * c-common.c (handle_no_address_safety_analysis_attribute): New
10447         function.
10448         (c_common_attribute_table): Add no_address_safety_analysis.
10450 2012-11-16  Simon Baldwin  <simonb@google.com>
10452         * c.opt: Add f[no-]canonical-system-headers.
10453         * c-opts.c (c_common_handle_option): Handle
10454         OPT_fcanonical_system_headers.
10456 2012-11-09  Ed Smith-Rowland  <3dw4rd@verizon.net>
10458         PR c++/54413
10459         * c-opts.c (c_common_handle_option): Set new flags.
10460         * c.opt: Describe new flags.
10462 2012-11-09  Jason Merrill  <jason@redhat.com>
10464         * c.opt (Wabi-tag): New.
10466 2012-11-09  Andi Kleen  <ak@linux.intel.com>
10468         PR 55139
10469         * c-common.c (get_atomic_generic_size): Mask with
10470         MEMMODEL_MASK
10472 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10474         PR c/53063
10475         * c.opt (Wformat): Make it Alias Wformat=1.
10476         (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10477         Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10478         LangEnabledBy.
10479         (Wformat=): RejectNegative. Use LangEnabledBy.
10480         (Wnonnull): Use LangEnabledBy.
10481         * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10482         * c-format.c (set_Wformat): Delete.
10483         (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10484         (maybe_read_dollar_number): Likewise.
10485         (avoid_dollar_number): Likewise.
10486         (finish_dollar_format_checking): Likewise.
10487         (check_format_info): Likewise.
10488         (check_format_info_main): Likewise.
10489         (check_format_types): Likewise.
10490         (format_type_warning): Likewise.
10491         * c-common.c (int): Likewise.
10492         (check_function_sentinel): Likewise.
10493         * c-common.h (warn_format,set_Wformat): Do not declare here.
10495 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10497         PR c/53063
10498         * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10499         Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10500         Use LangEnabledBy.
10501         (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10502         common.opt.
10503         (Wvariadic-macros): Init(1).
10504         * c-opts.c (c_common_handle_option): Do not handle them
10505         explicitly.
10506         (c_common_post_options): Likewise.
10507         (sanitize_cpp_opts): warn_unused_macros is now
10508         cpp_warn_unused_macros.
10509         (push_command_line_include): Likewise.
10510         * c-common.c (warn_unknown_pragmas): Do not define.
10511         * c-common.h (warn_unknown_pragmas): Do not declare.
10513 2012-11-07  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10515         PR c/51294
10516         * c-common.c (conversion_warning): Handle conditional expressions.
10518 2012-10-29  Jonathan Wakely  <jwakely.gcc@gmail.com>
10520         PR c++/54930
10521         * c.opt (Wreturn_local_addr): Define new option.
10523 2012-10-25  Jason Merrill  <jason@redhat.com>
10525         * c.opt (Wvirtual-move-assign): New.
10527         * c.opt (Winherited-variadic-ctor): New.
10529 2012-10-25  Marc Glisse  <marc.glisse@inria.fr>
10531         PR c++/54427
10532         * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10534 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
10536         * c-common.h (pch_cpp_save_state): Declare.
10537         * c-target.def (c_preinclude): New hook.
10538         * c-opts.c (done_preinclude): New.
10539         (push_command_line_include): Handle default preincluded header.
10540         (cb_file_change): Call pch_cpp_save_state when calling
10541         push_command_line_include.
10542         * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10543         (pch_cpp_save_state): New.
10544         (pch_init): Call pch_cpp_save_state conditionally, instead of
10545         calling cpp_save_state.
10547 2012-10-20  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10549         PR c/53063
10550         PR c/40989
10551         * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10552         Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10553         Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10554         Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10555         Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10556         * c-opts.c (c_common_handle_option): Remove explicit handling from
10557         here.
10558         (c_common_post_options): Likewise.
10560 2012-10-18  Eric Botcazou  <ebotcazou@adacore.com>
10562         * c-ada-spec.c (LOCATION_COL): Delete.
10563         (compare_location): New function.
10564         (compare_node): Use it.
10565         (compare_comment): Likewise.
10567 2012-10-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10569         PR c/53063
10570         PR c/40989
10571         * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10572         * c-opts.c (c_common_handle_option): Do not set them here. Add
10573         comment.
10574         (c_common_post_options): Likewise.
10576 2012-10-16  Eric Botcazou  <ebotcazou@adacore.com>
10578         * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10579         (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10580         Remove POINTER_TYPE handling, add large unsigned handling and use
10581         ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10583 2012-10-12  Jakub Jelinek  <jakub@redhat.com>
10585         PR c/54381
10586         * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10587         * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10588         locs and array of 3 trees instead of just single loc and single
10589         sizeof_arg tree.  Handle __builtin___*_chk builtins too, and
10590         also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10591         For *cmp* builtins that take two sources strings report warnings
10592         about first and second source, not about destination and source.
10594 2012-10-12  Marc Glisse  <marc.glisse@inria.fr>
10596         PR c++/53055
10597         * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10599 2012-10-11  Eric Botcazou  <ebotcazou@adacore.com>
10601         * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10602         declaring something coming from another file.
10604 2012-10-10  Arnaud Charlet  <charlet@adacore.com>
10606         PR ada/54845
10607         * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10609 2012-10-09  Paolo Carlini  <paolo.carlini@oracle.com>
10611         PR c++/54194
10612         * c-common.c (warn_about_parentheses): Add location_t parameter;
10613         use EXPR_LOC_OR_LOC.
10614         * c-common.h: Update declaration.
10616 2012-10-09  Marc Glisse  <marc.glisse@inria.fr>
10618         PR c++/54427
10619         * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10620         more operations. Make error messages optional.
10621         * c-common.h (enum stv_conv): Moved from c-typeck.c.
10622         (scalar_to_vector): Declare.
10624 2012-10-08  Jason Merrill  <jason@redhat.com>
10626         * c-common.c (c_common_reswords): Add thread_local.
10628 2012-10-08  Dodji Seketeli  <dodji@redhat.com>
10630         PR c++/53528 C++11 attribute support
10631         * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10632         new functions.
10633         * c-common.c (check_cxx_fundamental_alignment_constraints): New
10634         static function.
10635         (handle_aligned_attribute): In choose strictest alignment
10636         among many.  Use new check_cxx_fundamental_alignment_constraints.
10637         (handle_transparent_union_attribute): In c++11 attribute syntax,
10638         don't look through typedefs.
10640 2012-10-04  Arnaud Charlet  <charlet@adacore.com>
10642         * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10643         * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10644         out of dumpfile.h.
10646 2012-09-25  Dehao Chen  <dehao@google.com>
10648         PR middle-end/54645
10649         * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10650         map when read in the pch.
10652 2012-09-18  Arnaud Charlet  <charlet@adacore.com>
10654         * c-ada-spec.c: Style fixes.
10656 2012-09-18  Thomas Quinot  <quinot@adacore.com>
10658         * c.opt (-fada-spec-parent): Define new command line switch.
10659         * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10660         is specified, generate binding spec as a child of the specified unit.
10662 2012-09-13  Paolo Carlini  <paolo.carlini@oracle.com>
10663             Manuel López-Ibáñez  <manu@gcc.gnu.org>
10665         PR c++/53210
10666         * c.opt ([Winit-self]): Enabled by -Wall in C++.
10668 2012-08-23  Arnaud Charlet  <charlet@adacore.com>
10670         * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10671         for pointers, and add missing Convention C pragma.
10672         (print_ada_struct_decl): Add missing aliased keyword.
10673         (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10675 2012-08-17  Jakub Jelinek  <jakub@redhat.com>
10677         * c-common.c (sizeof_pointer_memaccess_warning): New function.
10678         * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10679         * c-opts.c (c_common_handle_option): Enable it for -Wall.
10680         * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10681         * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10683 2012-08-10  Richard Guenther  <rguenther@suse.de>
10685         * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10687 2012-08-07  Steven Bosscher  <steven@gcc.gnu.org>
10689         * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10690         instead of separate pp_newline and pp_flush.
10691         (print_c_tree): Likewise.
10693 2012-07-26  Richard Henderson  <rth@redhat.com>
10695         * c-common.c (handle_hot_attribute): Allow labels.
10696         (handle_cold_attribute): Likewise.
10698 2012-07-20  Jakub Jelinek  <jakub@redhat.com>
10700         PR c++/28656
10701         * c-common.c (check_function_nonnull): Handle multiple nonnull
10702         attributes properly.
10704 2012-07-16  Steven Bosscher  <steven@gcc.gnu.org>
10706         * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10707         * c-ada-spec.c: Likewise.
10708         * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10710 2012-07-14  Steven Bosscher  <steven@gcc.gnu.org>
10712         * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10713         Remove code conditional on it.
10715 2012-07-11  Steven Bosscher  <steven@gcc.gnu.org>
10717         * c-gimplify.c: Do not include basic-block.h.
10718         * c-common.c: Do not include linfuncs.h.
10720 2012-07-08  Steven Bosscher  <steven@gcc.gnu.org>
10722         * c-common.h: Include tree.h.
10724 2012-07-02  Jason Merrill  <jason@redhat.com>
10726         PR c++/53524
10727         * c-common.c (get_priority): Call default_conversion.
10729 2012-07-01  Uros Bizjak  <ubizjak@gmail.com>
10731         * c-pch.c (c_common_write_pch): Remove unused variables.
10733 2012-06-29  Steven Bosscher  <steven@gcc.gnu.org>
10735         * cppspec.c: Moved from gcc/ to here.
10737 2012-06-27  Kai Tietz  <ktietz@redhat.com>
10739         PR preprocessor/37215
10740         * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10742 2012-06-21  Steven Bosscher  <steven@gcc.gnu.org>
10744         * c-common.h (c_common_print_pch_checksum): Remove.
10745         * c-pch.c: Do not include output.h.
10746         (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10747         (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10748         (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10749         (struct c_pch_header): Remove.
10750         (get_ident): Update gpch version.
10751         (pch_init): Do not print executable_checksum to asm_out_file.
10752         Do not fail if there is no asm_out_file to read back from.  Set
10753         asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10754         (c_common_write_pch): Verify that nothing was written to asm_out_file
10755         since pch_init was called.  Do not write a c_pch_header, and do not
10756         copy from asm_out_file to the PCH.
10757         (c_common_read_pch): Do not read a c_pch_header, and do not restore
10758         the content of asm_out_file from the PCH.
10759         (c_common_print_pch_checksum): Remove.
10760         * c-opts.c (c_common_init): Print out executable_checksum directly.
10762 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
10764         * c-target.def (objc_declare_unresolved_class_reference,
10765         objc_declare_class_definition): Add new hooks.
10767 2012-06-19  Steven Bosscher  <steven@gcc.gnu.org>
10769         * c-lex.c: Do not include output.h.
10770         (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10771         Remove uses of ASM_OUTPUT_IDENT.
10773 2012-06-15  Marc Glisse  <marc.glisse@inria.fr>
10775         PR c++/51033
10776         * c-common.h (c_build_vec_perm_expr): Move decl here.
10777         * c-common.c (c_build_vec_perm_expr): Move definition
10778         here.
10780 2012-06-06  Steven Bosscher  <steven@gcc.gnu.org>
10782         * c.opt (fconserve-space): Turn into a no-op.
10784 2012-06-04  Sterling Augustine  <saugustine@google.com>
10786         * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10787         * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10788         both the start and end of the function.
10790 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
10792         * c-common.c: Do not include output.h.
10793         * c-pragma.c: Likewise.
10795 2012-06-04  Steven Bosscher  <steven@gcc.gnu.org>
10797         * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10798         (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10799         (lang_decl_name): Handle namespace decls.
10801 2012-05-31  Steven Bosscher  <steven@gcc.gnu.org>
10803         * c-ada-spec.c: Do not include output.h.
10804         * c-semantics.c: Likewise.
10806 2012-05-29  Joseph Myers  <joseph@codesourcery.com>
10808         * c-common.c: Fix typo.
10810 2012-05-29  Michael Matz  <matz@suse.de>
10812         * c-common.h (c_expand_decl): Remove prototype.
10814 2012-05-29  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10816         * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10817         * c-opts.c (c_common_handle_option): Remove code handling
10818         warn_missing_braces.
10820 2012-05-28  Paolo Carlini  <paolo.carlini@oracle.com>
10822         PR c++/25137
10823         * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10824         -Wmissing_braces.
10826 2012-05-22  Dodji Seketeli  <dodji@redhat.com>
10828         PR c++/53322
10829         * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10831 2012-05-17  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10833         * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10834         * c-opts.c (c_common_handle_option): Do not handle explicitly
10835         Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10837 2012-05-16  Dodji Seketeli  <dodji@redhat.com>
10839         PR preprocessor/7263
10840         * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
10841         to cpp_classify_number.  For diagnostics, use the precise location
10842         instead of the global input_location.
10844 2012-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
10846         PR c++/11856
10847         * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10849 2012-05-14  Bernd Schmidt  <bernds@codesourcery.com>
10851         * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
10853 2012-05-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10855         PR 53063
10856         * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10857         Wreorder): Use LangEnabledBy.
10858         * c-opts.c (c_common_handle_option): Do not enable them
10859         explicitly. Call lang-specific generated functions.
10860         (c_common_post_options): Do not set them here.
10862 2012-05-13  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10864         * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10865         Wmissing-field-initializers,Wmissing-parameter-type,
10866         Wold-style-declaration,Woverride-init): Use EnabledBy.
10867         * c-opts.c (c_common_post_options): Do not set here explicitly.
10869 2012-05-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10871         PR 53063
10872         * c-opts.c (c_common_handle_option): Use handle_generated_option
10873         to enable sub-options.
10875 2012-05-10  Paolo Carlini  <paolo.carlini@oracle.com>
10877         PR c++/53158
10878         * c-common.c (warnings_for_convert_and_check): Use warning_at.
10880 2012-05-10  Richard Guenther  <rguenther@suse.de>
10882         * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10883         adjust commentary about TYPE_IS_SIZETYPE types.
10885 2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10887         PR c++/53261
10888         * c-common.c (warn_logical_operator): Check that argument of
10889         integer_zerop is not NULL.
10891 2012-05-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10893         PR c/43772
10894         * c-common.c (warn_logical_operator): Do not warn if either side
10895         is already true or false.
10897 2012-05-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10899         PR c/51712
10900         * c-common.c (expr_original_type): New.
10901         (shorten_compare): Do not warn for enumeration types.
10903 2012-05-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10905         * c.opt (fpermissive): Add Var(flag_permissive).
10907 2012-04-30  Marc Glisse  <marc.glisse@inria.fr>
10909         PR c++/51033
10910         * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10911         * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10913 2012-04-30  Dodji Seketeli  <dodji@redhat.com>
10915         Add -Wvarargs option
10916         * c.opt (Wvarargs): Define new option.
10918 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10920         * c-common.c (check_function_arguments): Replace
10921         Wmissing-format-attribute with Wsuggest-attribute=format.
10923 2012-04-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10925         * c.opt (Wsuggest-attribute=format): New. Alias of
10926         Wmissing-format-attribute.
10927         * c-format.c (decode_format_type): Replace
10928         Wmissing-format-attribute with Wsuggest-attribute=format.
10929         (check_function_format): Likewise.
10931 2012-04-27  Ollie Wild  <aaw@google.com>
10933         * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10934         * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10935         * c.opt: Add Wliteral-suffix.
10937 2012-04-22  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10939         PR c/44774
10940         * c.opt (Wpedantic): New.
10941         (pedantic): Alias Wpedantic.
10942         * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10943         (c_common_post_options): Likewise.
10944         (sanitize_cpp_opts): Likewise.
10945         * c-lex.c (interpret_float): Likewise.
10946         * c-format.c (check_format_types): Likewise.
10947         * c-common.c (pointer_int_sum): Likewise.
10948         (c_sizeof_or_alignof_type): Likewise.
10949         (c_add_case_label): Likewise.
10950         (c_do_switch_warnings): Likewise.
10951         * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10953 2012-04-15  Jason Merrill  <jason@redhat.com>
10955         PR c++/52818
10956         * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10957         (C_STD_NAME): Distinguish between C++98 and C++11.
10959 2012-04-11  Eric Botcazou  <ebotcazou@adacore.com>
10961         PR target/52624
10962         * c-common.h (uint16_type_node): Rename into...
10963         (c_uint16_type_node): ...this.
10964         * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10965         * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10967 2012-04-10  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10969         * c-common.c (warn_if_unused_value): Move definition to here.
10970         * c-common.h (warn_if_unused_value): Move declaration to here.
10972 2012-03-23  William Bader  <williambader@hotmail.com>
10974         * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10976 2012-03-20  Jason Merrill  <jason@redhat.com>
10978         * c-common.h (enum cxx_dialect): Add cxx1y.
10979         * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10980         test.
10981         * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10982         * c-opts.c (c_common_post_options): Likewise.
10983         (set_std_cxx1y): New.
10984         (c_common_handle_option): Call it.
10985         * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10987 2012-03-19  Paolo Carlini  <paolo.carlini@oracle.com>
10989         PR c++/14710
10990         * c.opt ([Wuseless-cast]): Add.
10992 2012-03-16  Richard Guenther  <rguenther@suse.de>
10994         * c-pretty-print.c (pp_c_initializer_list): Adjust.
10996 2012-03-15  Manuel López-Ibáñez  <manu@gcc.gnu.org>
10998         PR c++/44783
10999         * c.opt (ftemplate-backtrace-limit) Add.
11001 2012-03-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11003         * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11004         handling.
11005         * c-pragma.c (handle_pragma_extern_prefix): Remove.
11006         (init_pragma): Don't register extern_prefix.
11008 2012-03-12  Richard Guenther  <rguenther@suse.de>
11010         * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11011         (builtin_type_for_size): Likewise.
11013 2012-02-13  Jakub Jelinek  <jakub@redhat.com>
11015         PR c++/52215
11016         * c-common.c (sync_resolve_params): Don't decide whether to convert
11017         or not based on TYPE_SIZE comparison, convert whenever arg_type
11018         is unsigned INTEGER_TYPE.
11020 2012-02-06  Paolo Carlini  <paolo.carlini@oracle.com>
11022         PR c/52118
11023         * c.opt ([Wunused-local-typedefs]): Fix description.
11025 2012-01-24  Mike Stump  <mikestump@comcast.net>
11027         * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11028         exactly.
11030 2012-01-18  Richard Guenther  <rguenther@suse.de>
11032         * c-opts.c (c_common_post_options): Reset LTO flags if
11033         we are about to generate a PCH.
11035 2012-01-17  Paolo Carlini  <paolo.carlini@oracle.com>
11037         PR c++/51777
11038         * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11039         use pp_unsigned_wide_integer.
11041 2012-01-10  Richard Guenther  <rguenther@suse.de>
11043         PR middle-end/51806
11044         * c-opts.c (c_common_handle_option): Move -Werror handling
11045         to language independent code.
11047 2012-01-05  Richard Guenther  <rguenther@suse.de>
11049         PR middle-end/51764
11050         * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11051         from common.opt.
11053 2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>
11055         PR c++/51316
11056         * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11057         of array types with an unknown bound.
11059 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
11061         * c-common.c (flag_isoc99): Update comment to refer to C11.
11062         (flag_isoc1x): Change to flag_isoc11.
11063         * c-common.h (flag_isoc99): Update comment to refer to C11.
11064         (flag_isoc1x): Change to flag_isoc11.
11065         * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11066         C11.
11067         * c-opts.c (set_std_c1x): Change to set_std_c11.
11068         (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11069         Call set_std_c11.
11070         (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11071         (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11072         * c.opt (std=c1x): Change to std=c11.  Document as non-draft
11073         standard.
11074         (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11075         (std=gnu1x): Change to std=gnu11.  Refer to non-draft standard.
11076         (std=gnu1x): Make alias of std=gnu11.
11078 2011-12-19  Jason Merrill  <jason@redhat.com>
11080         PR c++/51228
11081         * c-common.c (handle_transparent_union_attribute): Check the first
11082         field if the type is complete.
11084 2011-12-15  Jonathan Wakely  <jwakely.gcc@gmail.com>
11086         PR libstdc++/51365
11087         * c-common.c (RID_IS_FINAL): Add.
11088         * c-common.h (RID_IS_FINAL): Add.
11090 2011-11-30  Iain Sandoe  <iains@gcc.gnu.org>
11092         * c.opt (fgnu-runtime): Provide full description.
11093         (fnext-runtime): Likewise.
11094         * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11096 2011-11-28  Andrew MacLeod  <amacleod@redhat.com>
11098         * c-cpp-builtin.c (cpp_atomic_builtins):New.  Emit all atomic
11099         predefines in one place.  Add LOCK_FREE predefines.
11100         (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11101         new func.
11103 2011-11-24  Andrew MacLeod  <amacleod@redhat.com>
11105         PR c/51256
11106         * c-common.c (get_atomic_generic_size): Check for various error
11107         conditions
11108         (resolve_overloaded_atomic_exchange,
11109         resolve_overloaded_atomic_compare_exchange,
11110         resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11111         error_mark_node for error conditions.
11113 2011-11-08  Richard Guenther  <rguenther@suse.de>
11115         PR middle-end/51010
11116         * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
11118 2011-11-07  Richard Henderson  <rth@redhat.com>
11119             Aldy Hernandez  <aldyh@redhat.com>
11120             Torvald Riegel  <triegel@redhat.com>
11122         Merged from transactional-memory.
11124         * c-common.c (handle_tm_wrap_attribute,
11125         handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11126         (struct c_common_reswords): Added __transaction* keywords.
11127         (struct c_common_attribute_table): Added transaction* and tm_regparm
11128         attributes.
11129         * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11130         masks.
11131         (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11132         find_tm_attribute): Declare.
11134 2011-11-07  Jason Merrill  <jason@redhat.com>
11136         PR c++/35688
11137         * c-common.c, c-common.h: Revert yesterday's changes.
11139 2011-11-06  Jason Merrill  <jason@redhat.com>
11141         PR c++/35688
11142         * c-common.c (decl_has_visibility_attr): Split out from...
11143         (c_determine_visibility): ...here.
11144         * c-common.h: Declare it.
11146 2011-11-06  Joseph Myers  <joseph@codesourcery.com>
11148         * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11149         (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11150         type.
11151         (check_user_alignment): New.  Split out of
11152         handle_aligned_attribute.  Disallow integer constants with
11153         noninteger types.  Conditionally allow zero.
11154         (handle_aligned_attribute): Use check_user_alignment.
11155         * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11157 2011-11-06  Andrew MacLeod  <amacleod@redhat.com>
11158             Richard Henderson  <rth@redhat.com>
11160         Merged from cxx-mem-model.
11162         * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
11163         * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
11164         parameters that are the same type size.
11165         (get_atomic_generic_size): New.  Find size of generic
11166         atomic function parameters and do typechecking.
11167         (add_atomic_size_parameter): New.  Insert size into parameter list.
11168         (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11169         either __atomic_exchange_n or external library call.
11170         (resolve_overloaded_atomic_compare_exchange): Restructure
11171         __atomic_compare_exchange to either _n variant or external library call.
11172         (resolve_overloaded_atomic_load): Restructure __atomic_load to either
11173         __atomic_load_n or an external library call.
11174         (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11175         __atomic_store_n or an external library call.
11176         (resolve_overloaded_builtin): Handle new __atomic builtins.
11178 2011-11-04  Eric Botcazou  <ebotcazou@adacore.com>
11180         PR c++/50608
11181         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11182         (fold_offsetof_1): Make global.  Remove STOP_REF argument and adjust.
11183         <INDIRECT_REF>: Return the argument.
11184         <ARRAY_REF>: Remove special code for negative offset.
11185         Call fold_build_pointer_plus instead of size_binop.
11186         (fold_offsetof): Remove STOP_REF argument and adjust.
11187         * c-common.h (fold_offsetof_1): Declare.
11188         (fold_offsetof): Remove STOP_REF argument.
11190 2011-11-02  Paolo Carlini  <paolo.carlini@oracle.com>
11192         PR c++/50810
11193         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11194         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11195         Wnarrowing for C++0x and C++98.
11196         * c.opt ([Wnarrowing]): Update.
11198 2011-11-01  Paolo Carlini  <paolo.carlini@oracle.com>
11200         PR c++/44277
11201         * c.opt: Add Wzero-as-null-pointer-constant.
11203 2011-10-31  Jason Merrill  <jason@redhat.com>
11205         * c.opt (-fdeduce-init-list): Off by default.
11207         PR c++/50920
11208         * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11209         * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11210         and -Wc++11-compat.
11211         * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11213 2011-10-27  Roberto Agostino Vitillo  <ravitillo@lbl.gov>
11215         PR c++/30066
11216         * c.opt (fvisibility-inlines-hidden): Description change.
11218 2011-10-26  Ed Smith-Rowland  <3dw4rd@verizon.net>
11220         Implement C++11 user-defined literals.
11221         * c-common.c (build_userdef_literal): New.
11222         * c-common.def: New tree code.
11223         * c-common.h (tree_userdef_literal): New tree struct and accessors.
11224         * c-lex.c (interpret_float): Add suffix parm.
11225         (c_lex_with_flags): Build literal tokens.
11227 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11229         PR c++/50841
11230         Revert:
11231         2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11233         PR c++/50810
11234         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11235         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11236         Wnarrowing for C++0x and C++98.
11237         * c.opt ([Wnarrowing]): Update.
11239 2011-10-23  Paolo Carlini  <paolo.carlini@oracle.com>
11241         PR c++/50810
11242         * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11243         of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11244         Wnarrowing for C++0x and C++98.
11245         * c.opt ([Wnarrowing]): Update.
11247 2011-10-21  Paolo Carlini  <paolo.carlini@oracle.com>
11249         PR c++/45385
11250         * c-common.c (conversion_warning): Remove code looking for
11251         artificial operands.
11253 2011-10-18  Dodji Seketeli  <dodji@redhat.com>
11255         PR bootstrap/50760
11256         * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
11257         !NO_IMPLICIT_EXTERN_C.
11259 2011-10-17  Michael Spertus  <mike_spertus@symantec.com>
11261         * c-common.c (c_common_reswords): Add __bases,
11262         __direct_bases.
11263         * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11265 2011-10-17  Paolo Carlini  <paolo.carlini@oracle.com>
11267         PR c++/50757
11268         * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11270 2011-10-15  Tom Tromey  <tromey@redhat.com>
11271             Dodji Seketeli  <dodji@redhat.com>
11273         * c.opt (fdebug-cpp): New option.
11274         * c-opts.c (c_common_handle_option): Handle the option.
11275         * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11276         output stream in parameter. Factorized from ...
11277         (maybe_print_line): ... this. Dump location debug information when
11278         -fdebug-cpp is in effect.
11279         (print_line_1): New static function. Takes an output stream in
11280         parameter. Factorized from ...
11281         (print_line): ... here. Dump location information when -fdebug-cpp
11282         is in effect.
11283         (scan_translation_unit): Dump location information when
11284         -fdebug-cpp is in effect.
11286 2011-10-15  Tom Tromey  <tromey@redhat.com>
11287             Dodji Seketeli  <dodji@redhat.com>
11289         * c.opt (ftrack-macro-expansion): New option. Handle it with and
11290         without argument.
11291         * c-opts.c (c_common_handle_option)<case
11292         OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11293         cases. Handle -ftrack-macro-expansion with and without argument.
11295 2011-10-15  Tom Tromey  <tromey@redhat.com>
11296             Dodji Seketeli  <dodji@redhat.com>
11298         * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11299         (print_line, cb_define, do_line_change): Adjust to avoid touching
11300         the internals of struct line_map.  Use the public API instead.
11301         * c-pch.c (c_common_read_pch): Likewise.
11302         * c-lex.c (fe_file_change): Likewise.
11304 2011-10-14  Paolo Carlini  <paolo.carlini@oracle.com>
11306         PR c++/17212
11307         * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
11309 2011-10-11  Paolo Carlini  <paolo.carlini@oracle.com>
11311         PR c++/33067
11312         * c-pretty-print.c (pp_c_floating_constant): Output
11313         max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
11315 2011-10-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
11317         * c-common.c (def_builtin_1): Delete old interface with two
11318         parallel arrays to hold standard builtin declarations, and replace
11319         it with a function based interface that can support creating
11320         builtins on the fly in the future.  Change all uses, and poison
11321         the old names.  Make sure 0 is not a legitimate builtin index.
11322         * c-omp.c (c_finish_omp_barrier): Ditto.
11323         (c_finish_omp_taskwait): Ditto.
11324         (c_finish_omp_flush): Ditto.
11326 2011-10-11  Tristan Gingold  <gingold@adacore.com>
11328         * c.opt: (fallow-parameterless-variadic-functions): New.
11330 2011-09-08  Dodji Seketeli  <dodji@redhat.com>
11332         PR c++/33255 - Support -Wunused-local-typedefs warning
11333         * c-common.h (struct c_language_function::local_typedefs): New
11334         field.
11335         (record_locally_defined_typedef, maybe_record_typedef_use)
11336         (maybe_warn_unused_local_typedefs): Declare new functions.
11337         * c-common.c (record_locally_defined_typedef)
11338         (maybe_record_typedef_use)
11339         (maybe_warn_unused_local_typedefs): Define new functions.
11340         * c.opt: Declare new -Wunused-local-typedefs flag.
11342 2011-09-06  Eric Botcazou  <ebotcazou@adacore.com>
11344         PR middle-end/50266
11345         * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11346         computations.
11348 2011-09-05  Richard Guenther  <rguenther@suse.de>
11350         * c-common.c (complete_array_type): Use ssize_int (-1) instead
11351         of integer_minus_one_node for empty array upper bounds.
11353 2011-08-28  Dodji Seketeli  <dodji@redhat.com>
11355         * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11356         it's the first time it's being called on this main TU.
11358 2011-08-24  Richard Guenther  <rguenther@suse.de>
11360         PR c/49396
11361         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11363 2011-08-22  Gabriel Charette  <gchare@google.com>
11365         * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11366         defined in cpp_init_builtins and c_cpp_builtins.
11368 2011-08-19  Joseph Myers  <joseph@codesourcery.com>
11370         * c-common.c (c_common_reswords): Add __builtin_complex.
11371         * c-common.h (RID_BUILTIN_COMPLEX): New.
11373 2011-08-18  Joseph Myers  <joseph@codesourcery.com>
11375         * c-common.c (c_common_reswords): Add _Noreturn.
11376         (keyword_is_function_specifier): Handle RID_NORETURN.
11377         * c-common.h (RID_NORETURN): New.
11379 2011-08-10  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
11381         * c-common.c (unsafe_conversion_p): New function. Check if it is
11382         unsafe to convert an expression to the type.
11383         (conversion_warning): Adjust, use unsafe_conversion_p.
11384         * c-common.h (unsafe_conversion_p): New function declaration.
11386 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
11388         * c-common.h (c_finish_omp_atomic): Adjust prototype.
11389         (c_finish_omp_taskyield): New prototype.
11390         * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11391         arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11392         OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC.  If LHS1
11393         or RHS1 have side-effects, evaluate those too in the right spot,
11394         if it is a decl and LHS is also a decl, error out if they
11395         aren't the same.
11396         (c_finish_omp_taskyield): New function.
11397         * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11398         * c-pragma.c (omp_pragmas): Add taskyield.
11399         * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11400         (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11401         PRAGMA_OMP_CLAUSE_MERGEABLE.
11403 2011-07-25  Dodji Seketeli  <dodji@redhat.com>
11405         * c-common.h (set_underlying_type): Remove parm name from
11406         declaration.
11408 2011-07-25  Romain Geissler  <romain.geissler@gmail.com>
11410         * c-pretty-print.h: Search c-common.h in c-family.
11412 2011-07-22  Jason Merrill  <jason@redhat.com>
11414         PR c++/49793
11415         * c.opt (Wnarrowing): New.
11417         PR c++/30112
11418         * c-common.h: Declare c_linkage_bindings.
11419         * c-pragma.c (handle_pragma_redefine_extname): Use it.
11421         PR c++/49813
11422         * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11423         * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11424         as flag_isoc99 for 'restrict'.
11425         (pp_c_specifier_qualifier_list): Likewise for _Complex.
11427 2011-07-21  Ian Lance Taylor  <iant@google.com>
11429         PR middle-end/49705
11430         * c-common.c (c_disable_warnings): New static function.
11431         (c_enable_warnings): New static function.
11432         (c_fully_fold_internal): Change local unused_p to bool.  Call
11433         c_disable_warnings and c_enable_warnings rather than change
11434         c_inhibit_evaluation_warnings.
11436 2011-07-20  Jason Merrill  <jason@redhat.com>
11438         PR c++/6709 (DR 743)
11439         PR c++/42603 (DR 950)
11440         * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11441         (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11442         (CPP_DECLTYPE): New.
11443         * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11445 2011-07-19  Richard Guenther  <rguenther@suse.de>
11447         * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11448         * c-omp.c (c_finish_omp_for): Likewise.
11450 2011-07-12  Eric Botcazou  <ebotcazou@adacore.com>
11452         * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11453         body on the next line.
11455 2011-07-08  Jason Merrill  <jason@redhat.com>
11457         PR c++/45437
11458         * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11460         PR c++/49673
11461         * c-common.c (c_apply_type_quals_to_decl): Don't check
11462         TYPE_NEEDS_CONSTRUCTING.
11464 2011-07-06  Richard Guenther  <rguenther@suse.de>
11466         * c-common.c (c_common_nodes_and_builtins):
11467         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11469 2011-07-05  Richard Guenther  <rguenther@suse.de>
11471         * c-common.c (c_common_nodes_and_builtins): Build all common
11472         tree nodes first.
11474 2011-06-27  Jakub Jelinek  <jakub@redhat.com>
11476         * c-common.h (c_tree_chain_next): New static inline function.
11478         * c-common.c (check_builtin_function_arguments): Handle
11479         BUILT_IN_ASSUME_ALIGNED.
11481 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
11483         * c-common.c: Add sync_ or SYNC__ to builtin names.
11484         * c-omp.c: Add sync_ or SYNC__ to builtin names.
11486 2011-06-20  Pierre Vittet  <piervit@pvittet.com>
11488         * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11489         handler.
11490         (gen_pragma_handler): New union.
11491         (internal_pragma_handler): New type.
11492         (c_register_pragma_with_data)
11493         (c_register_pragma_with_expansion_and_data): New functions.
11495         * c-pragma.c (registered_pragmas, c_register_pragma_1)
11496         (c_register_pragma, c_register_pragma_with_expansion)
11497         (c_invoke_pragma_handler): Changed to work with
11498         internal_pragma_handler.
11499         (c_register_pragma_with_data)
11500         (c_register_pragma_with_expansion_and_data): New functions.
11502 2011-06-14  Joseph Myers  <joseph@codesourcery.com>
11504         * c-common.c: Include common/common-target.h.
11505         (handle_section_attribute): Use
11506         targetm_common.have_named_sections.
11507         * c-cppbuiltin.c: Include common/common-target.h.
11508         (c_cpp_builtins): Use targetm_common.except_unwind_info.
11510 2011-06-10  Richard Guenther  <rguenther@suse.de>
11512         * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11513         to print a IDENTIFIER_NODE.
11515 2011-06-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
11516             Joseph Myers  <joseph@codesourcery.com>
11518         * c.opt (fbuilding-libgcc): New option.
11519         * c-cppbuiltin.c (c_cpp_builtins): Define
11520         __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11522 2011-06-07  Jason Merrill  <jason@redhat.com>
11524         * c-common.c (max_tinst_depth): Lower default to 900.
11526         * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11528 2011-06-07  Richard Guenther  <rguenther@suse.de>
11530         * c-common.c (c_common_nodes_and_builtins): Do not set
11531         size_type_node or call set_sizetype.
11533 2011-06-07  Dodji Seketeli  <dodji@redhat.com>
11535         PR debug/49130
11536         * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11537         type when using pointer comparison to compare types.
11539 2011-06-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
11541         * c.opt: Add -Wdelete-non-virtual-dtor.
11542         * c-opts.c (c_common_handle_option): Include it in -Wall.
11544 2011-05-30  Nathan Froyd  <froydnj@gcc.gnu.org>
11546         PR bootstrap/49190
11548         Revert:
11549         2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11551         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11552         not tree_common.
11554 2011-05-27  Jakub Jelinek  <jakub@redhat.com>
11556         PR c++/49165
11557         * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11558         C++ don't call c_common_truthvalue_conversion on void type arms.
11560 2011-05-27  Nathan Froyd  <froydnj@codesourcery.com>
11562         * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11563         (stmt_list_stack): Define.
11564         (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11565         * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11567 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11569         * c-common.c (warning_candidate_p): Check for BLOCKs.
11571 2011-05-26  Nathan Froyd  <froydnj@codesourcery.com>
11573         * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11574         not tree_common.
11576 2011-05-25  Jakub Jelinek  <jakub@redhat.com>
11578         * c-common.c (def_fn_type): Remove extra va_end.
11580 2011-05-23  Jason Merrill  <jason@redhat.com>
11582         PR c++/48106
11583         * c-common.c (c_common_get_narrower): New.
11584         (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11586 2011-05-23  Nathan Froyd  <froydnj@codesourcery.com>
11588         * c-common.h (check_function_arguments): Tweak prototype of
11589         check_function_arguments.
11590         * c-common.c (check_function_arguments): Likewise.  Adjust
11591         calls to check_function_nonnull, check_function_format, and
11592         check_function_sentinel.
11593         (check_function_sentinel): Take a FUNCTION_TYPE rather than
11594         separate attributes and typelist arguments.  Use
11595         FOREACH_FUNCTION_ARGS to iterate over argument types.
11597 2011-05-15  Paolo Carlini  <paolo.carlini@oracle.com>
11599         * c-common.c (c_common_reswords): Reorder.
11600         * c-common.h (rid): Likewise.
11602 2011-05-10  Nathan Froyd  <froydnj@codesourcery.com>
11604         * c-common.c (def_fn_type): Don't call build_function_type, call
11605         build_function_type_array or build_varargs_function_type_array
11606         instead.
11607         (c_common_nodes_and_builtins): Likewise.
11609 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
11611         * c-common.c (c_add_case_label): Omit the loc argument to
11612         build_case_label.
11613         * c-common.h (build_case_label): Remove.
11614         * c-semantics.c (build_case_label): Remove.
11616 2011-05-05  Joseph Myers  <joseph@codesourcery.com>
11618         * c-objc.h (objc_start_method_definition): Update prototype.
11619         * stub-objc.c (objc_start_method_definition): Add extra parameter.
11621 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
11623         * c-common.c (check_main_parameter_types): Reindent.  Don't use
11624         TYPE_ARG_TYPES directly.
11625         (handle_nonnull_attribute): Likewise.
11626         (sync_resolve_params): Likewise.
11627         * c-format.c (handle_format_arg_attribute): Likewise.  Adjust call
11628         to check_format_string.
11629         (handle_format_attribute): Likewise.
11630         (check_format_string): Take a function type to examine instead of
11631         a type list.  Use a function_arg_iterator to step through argument
11632         types.
11634 2011-05-04  Richard Guenther  <rguenther@suse.de>
11636         * c-common.c (fix_string_type): Use size_int for index type bounds.
11637         (start_fname_decls): Do not pass NULL to build_int_cst.
11638         (c_init_attributes): Likewise.
11639         * c-lex.c (c_lex_with_flags): Likewise.
11641 2011-04-27  Jason Merrill  <jason@redhat.com>
11643         * c-common.c (make_tree_vector_from_list): New.
11644         * c-common.h: Declare it.
11646 2011-04-26  Richard Guenther  <rguenther@suse.de>
11648         PR preprocessor/48248
11649         * c-ppoutput.c (maybe_print_line): Always optimize newlines
11650         for output size with -P.
11652 2011-04-25  Paolo Carlini  <paolo.carlini@oracle.com>
11654         * c-common.c (struct c_common_resword): Add __underlying_type.
11655         * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11657 2011-04-20  Jim Meyering  <meyering@redhat.com>
11659         * c-format.c (init_dollar_format_checking): Remove useless
11660         if-before-free.
11662 2011-04-15  Nicola Pero  <nicola.pero@meta-innovation.com>
11664         * c-objc.h (objc_get_interface_ivars): Removed.
11665         (objc_detect_field_duplicates): New.
11666         * stub-objc.c: Likewise.
11668 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
11670         * stub-objc.c (objc_declare_protocols): Renamed to
11671         objc_declare_protocol.
11672         * c-objc.h: Likewise.
11674 2011-04-14  Nicola Pero  <nicola.pero@meta-innovation.com>
11676         * stub-objc.c (objc_declare_class): Updated argument name.
11678 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
11680         * c-common.h (c_common_init_ts): Declare.
11681         * c-common.c (c_common_init_ts): Define.
11683 2011-04-12  Nicola Pero  <nicola.pero@meta-innovation.com>
11685         * c-objc.h (objc_build_message_expr): Updated prototype.
11686         * stub-objc.c (objc_build_message_expr): Likewise.
11688 2011-04-12  Martin Jambor  <mjambor@suse.cz>
11690         * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11691         of cgraph_node.
11693 2011-04-11  Richard Guenther  <rguenther@suse.de>
11695         * c-common.c (complete_array_type): Build a range type of
11696         proper type.
11698 2011-04-08  Nathan Froyd  <froydnj@codesourcery.com>
11700         * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11701         (handle_type_generic_attribute): Likewise.
11703 2011-04-07  Jason Merrill  <jason@redhat.com>
11705         PR c++/48450
11706         * c-common.c (c_common_truthvalue_conversion): Don't ignore
11707         conversion from C++0x scoped enum.
11709 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
11711         * c-target-def.h: New file.
11712         * c-target.def: New file.
11713         * c-target.h: New file.
11714         * c-common.c (targetcm): Don't define here.
11715         * c-common.h (default_handle_c_option): Declare.
11716         * c-format.c: Include c-target.h instead of target.h.
11717         * c-opts.c: Include c-target.h instead of target.h.  Explicitly
11718         include tm.h.
11719         (default_handle_c_option): Move from targhooks.c.
11721 2011-03-29  Jakub Jelinek  <jakub@redhat.com>
11723         PR preprocessor/48248
11724         * c-ppoutput.c (print): Add src_file field.
11725         (init_pp_output): Initialize it.
11726         (maybe_print_line): Don't optimize by adding up to 8 newlines
11727         if map->to_file and print.src_file are different file.
11728         (print_line): Update print.src_file.
11730 2011-03-25  Kai Tietz  <ktietz@redhat.com>
11732         * c-ada-spec.c (compare_comment): Use filename_cmp
11733         instead of strcmp for filename.
11735 2011-03-25  Jeff Law  <law@redhat.com>
11737         * c-common.c (def_fn_type): Add missing va_end.
11739 2011-03-25  Jason Merrill  <jason@redhat.com>
11741         * c.opt: Add -std=c++03.
11743 2011-03-22  Eric Botcazou  <ebotcazou@adacore.com>
11745         * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11747 2011-03-17  Kai Tietz  <ktietz@redhat.com>
11749         PR target/12171
11750         * c-pretty-print.c (pp_c_specifier_qualifier_list):
11751         Display allowed attributes for function pointer types.
11752         (pp_c_attributes_display): New function to display
11753         attributes having affects_type_identity flag set to true.
11754         * c-pretty-print.h (pp_c_attributes_display): New prototype.
11756         * c-common.c (c_common_attribute_table):
11757         Add new element.
11758         (c_common_format_attribute_table): Likewise.
11760 2011-03-18  Jason Merrill  <jason@redhat.com>
11762         * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11763         * c-common.h: Don't declare it here.
11764         * c-common.c: Or define it here.
11765         * c-opts.c (c_common_handle_option): Or set it here.
11767         PR c++/35315
11768         * c-common.c (handle_transparent_union_attribute): Don't
11769         make a duplicate type in C++.
11771 2011-03-15  Jason Merrill  <jason@redhat.com>
11773         * c-common.c (max_constexpr_depth): New.
11774         * c-common.h: Declare it.
11775         * c-opts.c (c_common_handle_option): Set it.
11776         * c.opt (fconstexpr-depth): New option.
11778 2011-03-11  Jason Merrill  <jason@redhat.com>
11780         * c-common.c (attribute_takes_identifier_p): Add missing const.
11782         PR c++/46803
11783         * c-common.c (attribute_takes_identifier_p): Assume that an
11784         unknown attribute takes an identifier.
11786 2011-03-07  Nathan Froyd  <froydnj@codesourcery.com>
11788         PR c/47786
11789         * c-common.c (c_type_hash): Call list_length instead of iterating
11790         through DECL_CHAIN.  Rename 'i' to 'n_elements'.
11792 2011-02-19  Jakub Jelinek  <jakub@redhat.com>
11794         PR c/47809
11795         * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11797 2011-02-17  Iain Sandoe  <iains@gcc.gnu.org>
11799         * c.opt (fobjc-abi-version=) New.
11800         (fobjc-nilcheck): New.
11802 2011-02-03  Nathan Froyd  <froydnj@codesourcery.com>
11804         PR c++/46890
11805         * c-common.h (keyword_is_decl_specifier): Declare.
11806         * c-common.c (keyword_is_decl_specifier): Define.
11807         (keyword_is_function_specifier): New function.
11809 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
11811         PR c/47473
11812         * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11813         EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11814         REAL_TYPE.
11816 2011-01-26  Arnaud Charlet  <charlet@adacore.com>
11818         * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11820 2011-01-26  Jakub Jelinek  <jakub@redhat.com>
11822         PR pch/47430
11823         * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11824         after init_c_lex if pch_file is set.
11826 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
11828         PR c++/43601
11829         * c.opt (-fkeep-inline-dllexport): New switch.
11831 2011-01-12  Richard Guenther  <rguenther@suse.de>
11833         PR middle-end/32511
11834         * c-common.c (handle_weak_attribute): Warn instead of error
11835         on declaring an inline function weak.
11837 2011-01-05  Tom Tromey  <tromey@redhat.com>
11839         * c-common.h (lvalue_error): Update.
11840         * c-common.c (lvalue_error): Add 'loc' argument.  Call error_at,
11841         not error.
11843 2010-12-29  Nicola Pero  <nicola.pero@meta-innovation.com>
11845         PR objc/47075
11846         * c-objc.h (objc_finish_message_expr): Added argument to
11847         prototype.
11849 2010-12-22  Nathan Froyd  <froydnj@codesourcery.com>
11851         * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11852         Use prototype_p.
11854 2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>
11856         * c-objc.h (objc_maybe_warn_exceptions): New.
11857         * stub-objc.c (objc_maybe_warn_exceptions): New.
11859 2010-12-10  Nathan Froyd  <froydnj@codesourcery.com>
11861         * c-common.h (readonly_error): Declare.
11862         * c-common.c (readonly_error): Define.
11864 2010-12-09  Nathan Froyd  <froydnj@codesourcery.com>
11866         * c-common.h (invalid_indirection_error): Declare.
11867         * c-common.c (invalid_indirection_error): Define.
11869 2010-12-03  Richard Guenther  <rguenther@suse.de>
11871         PR c/46745
11872         * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11873         (pp_c_unary_expression): Likewise.
11874         (pp_c_expression): Likewise.
11876 2010-11-30  Nicola Pero  <nicola.pero@meta-innovation.com>
11878         * c-common.h (objc_finish_function): New.
11879         (objc_non_volatilized_type): Removed.
11880         (objc_type_quals_match): Removed.
11881         * stub-objc.c (objc_finish_function): New.
11882         (objc_non_volatilized_type): Removed.
11883         (objc_type_quals_match): Removed.
11885 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
11887         * c-common.h (parse_optimize_options): Declare.
11888         * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11889         c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11891 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
11893         * c-opts.c (check_deps_environment_vars): Use getenv instead of
11894         GET_ENVIRONMENT.
11895         * c-pch.c (O_BINARY): Don't define here.
11896         * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11898 2010-11-25  Joseph Myers  <joseph@codesourcery.com>
11900         * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11901         targetm.except_unwind_info.
11903 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
11905         * c-opts.c (c_common_handle_option): Pass location to
11906         set_struct_debug_option.
11908 2010-11-23  Joseph Myers  <joseph@codesourcery.com>
11910         * c-common.c (visibility_options): Move from ../opts.c.
11911         * c-common.h (struct visibility_flags, visibility_options):
11912         Declare here.
11913         * c-opts.c (finish_options): Rename to c_finish_options.
11914         (c_common_init): Update call to finish_options.
11916 2010-11-22  Nicola Pero  <nicola.pero@meta-innovation.com>
11918         PR objc/34033
11919         * c-lex.c (lex_string): Check that each string in an Objective-C
11920         string concat sequence starts with either one or zero '@', and
11921         that there are no spurious '@' signs at the end.
11923 2010-11-20  Joseph Myers  <joseph@codesourcery.com>
11925         * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11926         HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11927         HANDLE_PRAGMA_VISIBILITY.
11928         * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11929         HANDLE_PRAGMA_VISIBILITY): Don't define.
11930         (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11932 2010-11-20  Nathan Froyd  <froydnj@codesourcery.com>
11934         PR c++/16189
11935         PR c++/36888
11936         PR c++/45331
11937         * c-common.h (keyword_begins_type_specifier): Declare.
11938         (keyword_is_storage_class_specifier): Declare.
11939         (keyword_is_type_qualifier): Declare.
11940         * c-common.c (keyword_begins_type_specifier): New function.
11941         (keyword_is_storage_class_specifier): New function.
11942         (keyword_is_type_qualifier): Declare.
11944 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
11946         PR c/46547
11947         * c-common.c (in_late_binary_op): Define.
11948         (c_common_truthvalue_conversion): Check in_late_binary_op before
11949         calling c_save_expr.
11950         * c-common.h (in_late_binary_op): Declare.
11952 2010-11-19  Joseph Myers  <joseph@codesourcery.com>
11954         * c-opts.c (c_common_handle_option): Update calls to
11955         set_struct_debug_option.
11957 2010-11-19  Nicola Pero  <nicola.pero@meta-innovation.com>
11959         * c-common.h (objc_declare_protocols): Added additional argument.
11960         * stub-objc.c (objc_declare_protocol): Same change.
11962 2010-11-18  Nathan Froyd  <froydnj@codesourcery.com>
11964         PR c/33193
11965         * c-common.h (build_real_imag_expr): Declare.
11966         * c-semantics.c (build_real_imag_expr): Define.
11968 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
11970         * c-opts.c (c_common_parse_file): Take no arguments.
11971         * c-common.h (c_common_parse_file): Update prototype.
11973 2010-11-16  Jakub Jelinek  <jakub@redhat.com>
11975         PR c++/46401
11976         * c-common.c (warning_candidate_p): Don't track non-const calls
11977         or STRING_CSTs.
11979 2010-11-15  Ian Lance Taylor  <iant@google.com>
11981         * c-lex.c (init_c_lex): Set macro debug callbacks if
11982         flag_dump_go_spec is set.
11984 2010-11-15  Nicola Pero  <nicola.pero@meta-innovation.com>
11986         * c-common.h (objc_build_incr_expr_for_property_ref): New.
11987         * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11989 2010-11-15  Nathan Froyd  <froydnj@codesourcery.com>
11991         PR preprocessor/45038
11992         * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11993         dialects.
11995 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
11997         * c-common.h (c_family_lang_mask): Declare.
11998         * c-opts.c (c_family_lang_mask): Make extern.
11999         * c-pragma.c (handle_pragma_diagnostic): Use
12000         control_warning_option.
12002 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
12004         * c-common.c (parse_optimize_options): Update call to
12005         decode_options.
12006         * c-common.h (c_common_handle_option): Update prototype.
12007         * c-opts.c (c_common_handle_option): Take location_t parameter and
12008         pass it to other functions.
12010 2010-11-11  Joseph Myers  <joseph@codesourcery.com>
12012         * c-opts.c (warning_as_error_callback): Remove.
12013         (c_common_initialize_diagnostics): Don't call
12014         register_warning_as_error_callback.
12015         (c_common_handle_option): Handle -Werror=normalized= here.
12017 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
12019         * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12020         in diagnostic.
12021         * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12022         letter.
12023         * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12024         Remove trailing '.' from diagnostics.
12025         * c.opt (Wwrite-strings_: Avoid '`' in help text.
12027 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
12029         * c-common.c (parse_optimize_options): Pass global_dc to
12030         decode_options.
12031         * c-opts.c (c_common_handle_option): Pass &global_options to
12032         set_Wstrict_aliasing.
12033         * c.opt (v): Don't mark Common or document here.
12035 2010-11-06  Iain Sandoe  <iains@gcc.gnu.org>
12037         PR target/44981
12038         * c-format.c (format_type): New type gcc_objc_string_format_type.
12039         (valid_stringptr_type_p): New.
12040         (handle_format_arg_attribute): Use valid_stringptr_type_p ().
12041         (check_format_string): Pass expected type, use
12042         valid_stringptr_type_p (), check that the format string types are
12043         consistent with the format specification.
12044         (decode_format_attr): Warn if NSString is used outside objective-c.
12045         (format_types_orig): Add NSString.
12046         (format_name): New.
12047         (format_flags): New.
12048         (check_format_arg): Handle format strings requiring an external parser.
12049         first_target_format_type: New variable.
12050         (handle_format_attribute): Set up first_target_format_type, pass the
12051         expected format arg string type to check_format_string().
12052         * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
12053         * stub-objc.c (objc_string_ref_type_p): New.
12054         (objc_check_format_arg): New.
12056 2010-11-04  Nicola Pero  <nicola.pero@meta-innovation.com>
12058         Fixed using the Objective-C 2.0 dot-syntax with class names.
12059         * c-common.h (objc_build_class_component_ref): New.
12060         * stub-objc.c (objc_build_class_component_ref): New.
12062 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
12064         * c.opt (Wproperty-assign-default): New option.
12066 2010-11-03  Nicola Pero  <nicola.pero@meta-innovation.com>
12068         Implemented -fobjc-std=objc1 flag.
12069         * c.opt (fobjc-std=objc1): New option.
12071 2010-11-01  Nicola Pero  <nicola.pero@meta-innovation.com>
12073         Implemented format and noreturn attributes for Objective-C methods.
12074         * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12075         attribute for Objective-C methods.
12077 2010-10-31  Jason Merrill  <jason@redhat.com>
12079         * c-common.c (conversion_warning, warn_for_collisions_1): Use
12080         EXPR_LOC_OR_HERE.
12082 2010-10-30  Nicola Pero  <nicola.pero@meta-innovation.com>
12084         Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12085         * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12086         (objc_add_property_declaration): Removed arguments for copies and
12087         ivar.
12088         (objc_build_getter_call): Renamed to
12089         objc_maybe_build_component_ref.
12090         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12091         (objc_is_property_ref): New.
12092         * c-common.c (c_common_reswords): Removed copies and ivar.
12093         * stub-objc.c (objc_add_property_declaration): Removed arguments
12094         for copies and ivar.
12095         (objc_build_getter_call): Renamed to
12096         objc_maybe_build_component_ref.
12097         (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12098         (objc_is_property_ref): New.
12100 2010-10-29  Arnaud Charlet  <charlet@adacore.com>
12101             Matthew Gingell  <gingell@adacore.com>
12103         * c-ada-spec.c (separate_class_package): New function.
12104         (pp_ada_tree_identifier): Prefix references to C++ classes with the
12105         name of their enclosing package.
12106         (print_ada_declaration): Use separate_class_package.
12108 2010-10-27  Jason Merrill  <jason@redhat.com>
12110         * c-common.c (c_common_reswords): Add __is_literal_type.
12111         * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12113         * c-common.c (check_case_value): Remove special C++ code.
12115 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
12117         * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12118         RID_RETAIN, RID_COPY and RID_NONATOMIC.  Updated RID_FIRST_PATTR
12119         and RID_LAST_PATTR.
12120         (objc_add_property_declaration): Added additional arguments.
12121         (objc_property_attribute_kind): Removed.
12122         (objc_set_property_attr): Removed.
12123         * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12124         copy and nonatomic.
12125         * stub-objc.c (objc_add_property_declaration): Added additional
12126         arguments.
12127         (objc_set_property_attr): Removed.
12129 2010-10-27  Nicola Pero  <nicola.pero@meta-innovation.com>
12131         * c-common.h (objc_add_property_variable): Renamed to
12132         objc_add_property_declaration.  Added location argument.
12133         * stub-objc.c (objc_add_property_variable): Same change.
12135 2010-10-23  Nicola Pero  <nicola.pero@meta-innovation.com>
12137         * c-common.h (objc_maybe_printable_name): New.
12138         * stub-objc.c (objc_maybe_printable_name): New.
12140 2010-10-22  Artjoms Sinkarovs  <artyom.shinakroff@gmail.com>
12141             Andrew Pinski  <pinskia@gmail.com>
12143         * c-common.h (c_common_mark_addressable_vec): Declare.
12144         * c-common.c (c_common_mark_addressable_vec): New function.
12146 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
12148         * c-common.h (objc_set_method_type): Removed.
12149         (objc_add_method_declaration): Added boolean argument.
12150         (objc_start_method_definition): Same change.
12151         (objc_build_method_signature): Same change.
12152         * stub-objc.c (objc_set_method_type): Removed.
12153         (objc_add_method_declaration): Added boolean argument.
12154         (objc_start_method_definition): Same change.
12155         (objc_build_method_signature): Same change.
12157 2010-10-20  Nicola Pero  <nicola.pero@meta-innovation.com>
12159         * c-common.h (finish_file): Removed.
12160         (objc_write_global_declarations): New.
12161         * c-opts.c (c_common_parse_file): Do not call finish_file.
12162         * stub-objc.c (objc_write_global_declarations): New.
12164 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
12166         Implemented parsing @synthesize and @dynamic for
12167         Objective-C/Objective-C++.
12168         * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12169         (objc_add_synthesize_declaration): New.
12170         (objc_add_dynamic_declaration): New.
12171         * c-common.c (c_common_reswords): Add synthesize and dynamic.
12172         * stub-objc.c (objc_add_synthesize_declaration): New.
12173         (objc_add_dynamic_declaration): New.
12175 2010-10-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
12177         PR target/46041
12178         * c-cppbuiltin.c (mode_has_fma): Move function here from
12179         builtins.c.  Don't use the fma optab, instead just use the
12180         HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12181         using -save-temps.
12183 2010-10-18  Nicola Pero  <nicola.pero@meta-innovation.com>
12185         Merge from 'apple/trunk' branch on FSF servers.
12187         2005-11-08  Fariborz Jahanian  <fjahanian@apple.com>
12189         Radar 4330422
12190         * c-common.h (objc_non_volatilized_type): New declaration
12191         * stub-objc.c (objc_non_volatilized_type): New stub.
12193 2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>
12195         Merge from 'apple/trunk' branch on FSF servers.
12197         2006-03-27  Fariborz Jahanian  <fjahanian@apple.com>
12199         Radar 4133425
12200         * c-common.h (objc_diagnose_private_ivar): New decl.
12201         * stub-objc.c (objc_diagnose_private_ivar): New stub.
12203 2010-10-17  Iain Sandoe  <iains@gcc.gnu.org>
12205         * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12206         * c-common.h (enum rid): Add RID_AT_PACKAGE.
12207         (objc_ivar_visibility_kind): New enum.
12208         (objc_set_visibility): Adjust prototype to use visibility enum.
12209         * stub-objc.c (objc_set_visibility): Adjust stub to use
12210         visibility enum.
12212 2010-10-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
12214         * c-cppbuiltin.c (builtin_define_float_constants): Emit
12215         __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12216         has the appropriate fma builtins.
12217         (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12219 2010-10-14  Iain Sandoe  <iains@gcc.gnu.org>
12221         merge from FSF apple 'trunk' branch.
12222         2006 Fariborz Jahanian  <fjahanian@apple.com>
12224         Radars 4436866, 4505126, 4506903, 4517826
12225         * c-common.c (c_common_resword): Define @property and its attributes.
12226         * c-common.h: Define property attribute enum entries.
12227         (OBJC_IS_PATTR_KEYWORD): New.
12228         (objc_property_attribute_kind): New enum.
12229         Declare objc_set_property_attr (), objc_add_property_variable (),
12230         objc_build_getter_call () and objc_build_setter_call ().
12231         * stub-objc.c (objc_set_property_attr): New stub.
12232         (objc_add_property_variable): Likewise.
12233         (objc_build_getter_call): Likewise.
12234         (objc_build_setter_call) Likewise.
12236 2010-10-13  Iain Sandoe  <iains@gcc.gnu.org>
12238         merge from FSF apple 'trunk' branch.
12239         2006-04-26  Fariborz Jahanian  <fjahanian@apple.com>
12241         Radar 3803157 (method attributes)
12242         * c-common.c (handle_deprecated_attribute): Recognize
12243         objc methods as valid declarations.
12244         * c-common.h: Declare objc_method_decl ().
12245         * stub-objc.c (objc_method_decl): New stub.
12247 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
12249         * c-common.c (parse_optimize_options): Call
12250         decode_cmdline_options_to_array_default_mask before
12251         decode_options.  Update arguments to decode_options.
12252         * c-common.h (c_common_init_options_struct): Declare.
12253         * c-opts.c (c_common_init_options_struct): New.  Split out from
12254         c_common_init_options.
12256 2010-10-06  Nicola Pero  <nicola.pero@meta-innovation.com>
12258         Implemented fast enumeration for Objective-C.
12259         * c-common.h (objc_finish_foreach_loop): New.
12260         * stub-objc.c (objc_finish_foreach_loop): New.
12262 2010-10-05  Joseph Myers  <joseph@codesourcery.com>
12264         * c-common.h (struct diagnostic_context): Don't declare here.
12265         (c_common_initialize_diagnostics): Declare using
12266         diagnostic_context typedef.
12267         * c-opts.c (c_common_handle_option): Pass global_dc to
12268         handle_generated_option.
12270 2010-10-04  Joseph Myers  <joseph@codesourcery.com>
12272         * c-opts.c (c_common_handle_option): Pass &global_options_set to
12273         handle_generated_option.
12275 2010-10-03  Ian Lance Taylor  <iant@google.com>
12277         * c.opt (-fplan9-extensions): New option.
12279 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
12281         * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12282         Remove.
12283         (c_cpp_builtins): Call functions from cppbuiltin.c instead
12284         of duplicating code.
12286 2010-09-30  Iain Sandoe  <iains@gcc.gnu.org>
12288         * c-common.c: Add two new entries for @optional
12289         and @required keywords.
12291         merge from FSF 'apple/trunk' branch.
12292         2006-01-30  Fariborz Jahanian  <fjahanian@apple.com>
12294         Radar 4386773
12295         * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12296         objective-c keywords.
12297         (objc_set_method_opt): New declaration.
12298         * stub-objc.c (objc_set_method_opt): New stub.
12300 2010-09-30  Joseph Myers  <joseph@codesourcery.com>
12302         * c-common.c (handle_optimize_attribute): Pass &global_options to
12303         cl_optimization_save and cl_optimization_restore.
12304         * c-opts.c (c_common_handle_option): Pass &global_options to
12305         handle_generated_option.
12306         * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
12307         (handle_pragma_pop_options, handle_pragma_reset_options): Pass
12308         &global_options to cl_optimization_restore.
12310 2010-09-30  Nicola Pero  <nicola.pero@meta-innovation.com>
12312         * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
12313         Objective-C/Objective-C++ keywords.
12315 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
12317         Merge from 'apple/trunk' branch on FSF servers.
12319         2005-10-04  Fariborz Jahanian  <fjahanian@apple.com>
12321         Radar 4281748
12322         * c-common.h (objc_check_global_decl): New declaration.
12323         * stub-objc.c (objc_check_global_decl): New stub.
12325 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
12327         * c.opt: Don't use VarExists.
12329 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
12331         * c-common.c (c_cpp_error): Update names of diagnostic_context
12332         members.
12333         * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
12334         cl_optimization members.
12335         * c-opts.c (warning_as_error_callback, c_common_handle_option,
12336         sanitize_cpp_opts, finish_options): Update names of cpp_options
12337         members.
12339 2010-09-29  Nicola Pero  <nicola.pero@meta-innovation.com>
12341         * c-common.h (OBJC_IS_CXX_KEYWORD): New macro.  Updated comments.
12342         (objc_is_reserved_word): Removed.
12343         * c-common.c: Updated comments.
12344         * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12345         objc_is_reserved_word.
12346         * stub-objc.c (objc_is_reserved_word): Removed.
12348 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
12350         * c-common.h (objc_add_method_declaration): Adjust prototype to
12351         include attributes.
12352         (objc_start_method_definition): Likewise.
12353         (objc_build_keyword_decl): Likewise.
12354         * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12355         (objc_start_method_definition): Likewise.
12356         (objc_build_keyword_decl): Likewise.
12358 2010-09-28  Iain Sandoe  <iains@gcc.gnu.org>
12360         * c-common.h (objc_start_class_interface): Adjust prototype.
12361         (objc_start_category_interface): Likewise.
12362         (objc_start_protocol): Likewise.
12363         * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12364         (objc_start_class_interface): Likewise.
12365         (objc_start_category_interface): Likewise.
12367 2010-09-27  Ian Lance Taylor  <iant@google.com>
12369         * c-common.c (c_common_attribute_table): Add no_split_stack.
12370         (handle_no_split_stack_attribute): New static function.
12372 2010-09-27  Nicola Pero  <nicola.pero@meta-innovation.com>
12374         Merge from 'apple/trunk' branch on FSF servers.
12376         2005-12-15  Fariborz Jahanian  <fjahanian@apple.com>
12378         Radar 4229905
12379         * c-common.h (objc_have_common_type): New declaration.
12380         * stub-objc.c (objc_have_common_type): New stub.
12382         2005-06-22  Ziemowit Laski  <zlaski@apple.com>
12384         Radar 4154928
12385         * c-common.h (objc_common_type): New prototype.
12386         * stub-objc.c (objc_common_type): New stub.
12388 2010-09-24  Jan Hubicka  <jh@suse.cz>
12390         * c-common.c (handle_leaf_attribute): New function.
12391         (struct attribute_spec c_common_att): Add leaf.
12393 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
12395         * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12396         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12397         -dump, -dump=, -imacros, -imacros=, -include, -include=,
12398         -include-barrier, -include-directory, -include-directory=,
12399         -include-directory-after, -include-directory-after=,
12400         -include-prefix, -include-prefix=, -include-with-prefix,
12401         -include-with-prefix=, -include-with-prefix-after,
12402         -include-with-prefix-after=, -include-with-prefix-before,
12403         -include-with-prefix-before=, -no-integrated-cpp,
12404         -no-line-commands, -no-standard-includes, -no-warnings, -output,
12405         -output=, -pedantic, -pedantic-errors, -preprocess,
12406         -print-missing-file-dependencies, -trace-includes, -traditional,
12407         -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12408         -user-dependencies, -verbose, -write-dependencies,
12409         -write-user-dependencies, no-integrated-cpp, traditional): New.
12411 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
12413         PR objc/23710
12414         * c-common.h (objc_start_method_definition): Return bool instead
12415         of void.
12416         * stub-objc.c (objc_start_method_definition): Return bool instead
12417         of void.
12419 2010-09-21  Nicola Pero  <nicola.pero@meta-innovation.com>
12421         PR objc/25965
12422         * c-common.h (objc_get_interface_ivars): New declaration.
12423         * stub-objc.c (objc_get_interface_ivars): New stub.
12425 2010-09-15  Ian Lance Taylor  <iant@google.com>
12427         * c-common.c (parse_optimize_options): Do not capitalize warning
12428         messages.  Remove period at end of warning message.
12430 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
12432         * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12433         (handle_alias_attribute): ... here.
12434         (handle_ifunc_attribute): New.
12436 2010-09-06  Mark Mitchell  <mark@codesourcery.com>
12438         * c-common.h (do_warn_double_promotion): Declare.
12439         * c-common.c (do_warn_double_promotion): Define.
12441 2010-09-05  Mark Mitchell  <mark@codesourcery.com>
12443         * c.opt (Wdouble-promotion): New.
12445 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12447         * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12448         fvtable-thunks, fxref): Mark no longer supported in help text.
12450 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12452         * c.opt (Wimport, fall-virtual, falt-external-templates,
12453         fdefault-inline, fenum-int-equiv, fexternal-templates,
12454         fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12455         fname-mangling-version-, fnew-abi, fnonnull-objects,
12456         foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12457         fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12458         applicable.
12459         (fhandle-exceptions): Mark with Alias and Warn.
12460         * c-opts.c (c_common_handle_option): Don't handle options marked
12461         as ignored.
12463 2010-09-02  Joseph Myers  <joseph@codesourcery.com>
12465         * c.opt (Wcomments, Werror-implicit-function-declaration,
12466         ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12467         std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12468         aliases.
12469         * c-common.c (option_codes): Use OPT_Wcomment instead of
12470         OPT_Wcomments.
12471         * c-opts.c (warning_as_error_callback, c_common_handle_option):
12472         Don't handle options marked as aliases.
12474 2010-08-25  Richard Guenther  <rguenther@suse.de>
12476         * c-common.c (c_common_get_alias_set): Remove special
12477         handling for pointers.
12479 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
12481         * c-common.c: Use FOR_EACH_VEC_ELT.
12482         * c-gimplify.c: Likewise.
12483         * c-pragma.c: Likewise.
12485 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
12487         * c.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
12488         RejectDriver.
12489         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
12490         RejectDriver.
12491         * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12492         instead of OPT_MDX and OPT_MMDX.
12494 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
12496         * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12498 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
12500         * c.opt (MD, MMD): Change to MDX and MMDX.
12501         * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12503 2010-08-11  Joseph Myers  <joseph@codesourcery.com>
12505         * c-opts.c (c_common_handle_option): Call handle_generated_option
12506         instead of handle_option.
12508 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
12510         * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12511         (maybe_apply_renaming_pragma): Delete unneeded declarations.
12513 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
12515         * c-pragma.c (pending_redefinition): Declare.  Declare a VEC of it.
12516         (pending_redefine_extname): Change type to a VEC.
12517         (add_to_renaming_pragma_list): Update for new type of
12518         pending_redefine_extname.
12519         (maybe_apply_renaming_pragma): Likewise.
12521 2010-08-04  Arnaud Charlet  <charlet@adacore.com>
12523         * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12524         visited.
12525         (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12526         decide whether a type has already been declared/seen.
12527         Do not go to the original type.
12528         (dump_nested_types): New parameter forward.
12529         Generate forward declaration if needed and mark type as visited.
12530         (print_ada_declaration): Call dump_nested_types if not already done.
12531         Mark types as visited.
12533 2010-08-03  Joseph Myers  <joseph@codesourcery.com>
12535         * c.opt (-print-pch-checksum): Remove option.
12536         * c-opts.c (c_common_handle_option): Don't handle
12537         OPT_print_pch_checksum.
12539 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12541         * c-common.h (c_common_handle_option): Update prototype and return
12542         value type.
12543         * c-opts.c (c_common_handle_option): Update prototype and return
12544         value type.  Update calls to handle_option and
12545         enable_warning_as_error.
12547 2010-07-27  Jakub Jelinek  <jakub@redhat.com>
12549         PR c/45079
12550         * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12552 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12554         * c-common.h (c_common_missing_argument): Remove.
12555         * c-opts.c (c_common_missing_argument): Remove.
12556         * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12557         idirafter, imacros, include, isysroot, isystem, iquote): Add
12558         MissingArgError.
12559         * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12561 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
12563         * c-common.h (c_common_option_lang_mask,
12564         c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12565         New.
12566         (c_common_init_options): Update prototype.
12567         * c-opts.c (c_common_option_lang_mask): New.
12568         (c_common_initialize_diagnostics): Split out of
12569         c_common_init_options.
12570         (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12571         New.
12572         (c_common_init_options): Update prototype.  Use decoded options in
12573         search for -lang-asm.
12575 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
12577         * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12578         * c-format.c: Likewise.
12580 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12582         * c-common.h: Include diagnostic-core.h. Error if already
12583         included.
12584         * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12586 2010-07-03  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12588         * c-common.c (IN_GCC_FRONTEND): Do not undef.
12589         Do not include expr.h
12590         (vector_mode_valid_p): Move here.
12592 2010-06-21  DJ Delorie  <dj@redhat.com>
12594         * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12595         allow these pragmas anywhere.
12597 2010-06-14  Jakub Jelinek  <jakub@redhat.com>
12599         PR bootstrap/44509
12600         * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12601         (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12602         (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12603         ggc_strdup instead of xstrdup.
12605 2010-06-10  Jakub Jelinek  <jakub@redhat.com>
12607         * c-cppbuiltin.c: Include cpp-id-data.h.
12608         (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12609         (lazy_hex_fp_value): New function.
12610         (builtin_define_with_hex_fp_value): Provide definitions lazily.
12612 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12614         * c-gimplify.c: Do not include tree-flow.h
12616 2010-06-29  Joern Rennecke  <joern.rennecke@embecosm.com>
12618         PR other/44034
12619         * c-common.c: Rename targetm member:
12620         targetm.enum_va_list -> targetm.enum_va_list_p
12622 2010-06-28  Anatoly Sokolov  <aesok@post.ru>
12624         * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12626 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
12628         * c-cppbuiltin.c: Do not include except.h.
12630 2010-06-24  Andi Kleen  <ak@linux.intel.com>
12632         * c-common.c (warn_for_omitted_condop): New.
12633         * c-common.h (warn_for_omitted_condop): Add prototype.
12635 2010-06-21  Joseph Myers  <joseph@codesourcery.com>
12637         * c.opt (lang-objc): Remove.
12638         * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12640 2010-06-21  Joern Rennecke  <joern.rennecke@embecosm.com>
12642         * c-opts.c: Include "tm_p.h".
12644 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
12646         * c-common.c (parse_optimize_options): Update call to
12647         decode_options.
12649 2010-06-18  Nathan Froyd  <froydnj@codesourcery.com>
12651         * c-common.c (record_types_used_by_current_var_decl): Adjust for
12652         new type of types_used_by_cur_var_decl.
12654 2010-06-17  Joern Rennecke  <joern.rennecke@embecosm.com>
12656         PR bootstrap/44512
12657         * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12658         for C++ standard compliance.
12660 2010-06-16  Jason Merrill  <jason@redhat.com>
12662         * c.opt: Add -Wnoexcept.
12664 2010-06-16  Richard Guenther  <rguenther@suse.de>
12666         PR c/44555
12667         * c-common.c (c_common_truthvalue_conversion): Remove
12668         premature and wrong optimization concering ADDR_EXPRs.
12670 2010-06-15  Arnaud Charlet  <charlet@adacore.com>
12672         * c-ada-spec.c (dump_sloc): Remove column info.
12673         (is_simple_enum): New function.
12674         (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12675         enum types when relevant.
12677 2010-06-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
12679         * c-common.c (conversion_warning): Warn at expression
12680         location.
12682 2010-06-10  Joseph Myers  <joseph@codesourcery.com>
12684         * c-opts.c (c_common_handle_option): Don't handle
12685         OPT_fshow_column.
12687 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
12689         * c-pragma.c (push_alignment): Use typed GC allocation.
12690         (handle_pragma_push_options): Likewise.
12692         * c-common.c (parse_optimize_options): Likewise.
12694         * c-common.h (struct sorted_fields_type): Add variable_size GTY
12695         option.
12697 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
12699         * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12700         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12701         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12702         flag_signed_bitfields, warn_strict_null_sentinel,
12703         flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12704         flag_gen_declaration, flag_no_gnu_keywords,
12705         flag_implement_inlines, flag_implicit_templates,
12706         flag_implicit_inline_templates, flag_optional_diags,
12707         flag_elide_constructors, flag_default_inline, flag_rtti,
12708         flag_conserve_space, flag_access_control, flag_check_new,
12709         flag_new_for_scope, flag_weak, flag_working_directory,
12710         flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12711         flag_enforce_eh_specs, flag_threadsafe_statics,
12712         flag_pretty_templates): Remove.
12713         * c-common.h (flag_preprocess_only, flag_nil_receivers,
12714         flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12715         flag_replace_objc_classes, flag_undef, flag_no_builtin,
12716         flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12717         flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12718         flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12719         flag_no_gnu_keywords, flag_implement_inlines,
12720         flag_implicit_templates, flag_implicit_inline_templates,
12721         flag_optional_diags, flag_elide_constructors, flag_default_inline,
12722         flag_rtti, flag_conserve_space, flag_access_control,
12723         flag_check_new, flag_new_for_scope, flag_weak,
12724         flag_working_directory, flag_use_cxa_atexit,
12725         flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12726         flag_threadsafe_statics, flag_pretty_templates,
12727         warn_strict_null_sentinel): Remove.
12728         * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12729         fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12730         fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12731         fimplicit-inline-templates, fimplicit-templates,
12732         flax-vector-conversions, fms-extensions, fnil-receivers,
12733         fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12734         frtti, fshort-double, fshort-enums, fshort-wchar,
12735         fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12736         funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12737         fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12738         gen-decls, undef): Use Var.
12739         (fdefault-inline, foptional-diags): Document as doing nothing.
12740         * c-opts.c (c_common_handle_option): Remove cases for options now
12741         using Var.  Mark ignored options as such.
12743 2010-06-05  Steven Bosscher  <steven@gcc.gnu.org>
12745         * c-common.c: Moved to here from parent directory.
12746         * c-common.def: Likewise.
12747         * c-common.h: Likewise.
12748         * c-cppbuiltin.c: Likewise.
12749         * c-dump.c: Likewise.
12750         * c-format.c: Likewise.
12751         * c-format.h : Likewise.
12752         * c-gimplify.c: Likewise.
12753         * c-lex.c: Likewise.
12754         * c-omp.c: Likewise.
12755         * c.opt: Likewise.
12756         * c-opts.c: Likewise.
12757         * c-pch.c: Likewise.
12758         * c-ppoutput.c: Likewise.
12759         * c-pragma.c: Likewise.
12760         * c-pragma.h: Likewise.
12761         * c-pretty-print.c: Likewise.
12762         * c-pretty-print.h: Likewise.
12763         * c-semantics.c: Likewise.
12764         * stub-objc.c: Likewise.
12766         * c-common.c: Include gt-c-family-c-common.h.
12767         * c-pragma.c: Include gt-c-family-c-pragma.h.
12769 Copyright (C) 2010-2021 Free Software Foundation, Inc.
12771 Copying and distribution of this file, with or without modification,
12772 are permitted in any medium without royalty provided the copyright
12773 notice and this notice are preserved.