1 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
3 * c-attribs.c (handle_unavailable_attribute): New.
5 2021-08-30 Jason Merrill <jason@redhat.com>
7 * c.opt: Add -Wmissing-requires.
9 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
12 * c-opts.c (c_common_input_charset_cb): New function.
13 (c_common_post_options): Call new function
14 diagnostic_initialize_input_context().
16 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
18 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
19 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
20 "di" and "u", respecitively; fill with BADLEN to match
22 (get_init_dynamic_hwi): Split off from ...
23 (init_dynamic_diag_info): ... here. Call it.
24 (init_dynamic_gfc_info): Call it.
26 2021-08-20 Jakub Jelinek <jakub@redhat.com>
28 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
29 * c-pragma.c (omp_pragmas): Add error directive.
30 * c-omp.c (omp_directives): Uncomment error directive entry.
32 2021-08-18 Jakub Jelinek <jakub@redhat.com>
34 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
35 * c-pragma.c (omp_pragmas): Add nothing directive.
36 * c-omp.c (omp_directives): Uncomment nothing directive entry.
38 2021-08-17 Jakub Jelinek <jakub@redhat.com>
41 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
42 * c-common.c (c_common_reswords): Add __is_layout_compatible.
44 2021-08-17 Matt Jacobson <mhjacobson@me.com>
46 * c-opts.c (c_common_post_options): Default to
47 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
49 2021-08-17 Jakub Jelinek <jakub@redhat.com>
51 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
52 * c-pragma.c (omp_pragmas): Add scope construct.
53 * c-omp.c (omp_directives): Uncomment scope directive entry.
55 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
57 * c-cppbuiltin.c (c_cpp_builtins): Define
58 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
60 2021-08-12 Jakub Jelinek <jakub@redhat.com>
62 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
63 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
64 * c-pragma.c (omp_pragmas_simd): Add masked construct.
65 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
67 (c_finish_omp_masked): Declare.
68 * c-omp.c (c_finish_omp_masked): New function.
69 (c_omp_split_clauses): Handle combined masked constructs.
71 2021-07-30 Jakub Jelinek <jakub@redhat.com>
74 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
75 * c-common.c (c_common_reswords): Add
76 __is_pointer_interconvertible_base_of.
78 2021-07-29 Richard Biener <rguenther@suse.de>
81 * c-common.c (c_common_mark_addressable_vec): Look through
82 C_MAYBE_CONST_EXPR even if not at the toplevel.
84 2021-07-27 Martin Sebor <msebor@redhat.com>
87 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
89 2021-07-23 Jakub Jelinek <jakub@redhat.com>
91 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
92 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
95 2021-07-23 Jakub Jelinek <jakub@redhat.com>
97 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
98 PRAGMA_OMP__LAST_ enumerators.
100 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
101 Joseph Myers <joseph@codesourcery.com>
102 Cesar Philippidis <cesar@codesourcery.com>
104 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
106 2021-07-20 Martin Sebor <msebor@redhat.com>
108 * c-common.c (c_build_shufflevector): Adjust by-value argument to
110 * c-common.h (c_build_shufflevector): Same.
112 2021-07-16 Andrew Pinski <apinski@marvell.com>
115 * c-common.c (parse_optimize_options): Use the correct
118 2021-07-15 Martin Sebor <msebor@redhat.com>
122 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
124 2021-07-14 Jason Merrill <jason@redhat.com>
126 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
128 2021-07-06 Martin Sebor <msebor@redhat.com>
130 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
131 (gcc_cdiag_char_table): Same.
132 (gcc_cxxdiag_char_table): Same.
134 2021-07-02 Jakub Jelinek <jakub@redhat.com>
136 * c-common.h (enum c_omp_directive_kind): New enum.
137 (struct c_omp_directive): New type.
138 (c_omp_categorize_directive): Declare.
139 * c-omp.c (omp_directives): New variable.
140 (c_omp_categorize_directive): New function.
142 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
144 * c-ada-spec.c (packed_layout): New global variable.
145 (dump_ada_declaration): Set it upon seeing a packed record type.
146 Do not put the "aliased" keyword if it is set.
147 (dump_ada_structure): Add Pack aspect if it is set and clear it.
149 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
151 * c-ada-spec.c (check_name): Rename into...
152 (check_type_name_conflict): ...this. Minor tweak.
153 (dump_ada_function_declaration): Adjust to above renaming.
154 (dump_ada_array_domains): Fix oversight.
155 (dump_ada_declaration): Call check_type_name_conflict for variables.
157 2021-06-25 Martin Sebor <msebor@redhat.com>
159 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
160 (c_common_truthvalue_conversion): Replace direct uses of
161 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
163 (check_function_arguments_recurse): Same.
164 * c-gimplify.c (c_gimplify_expr): Same.
165 * c-warn.c (overflow_warning): Same.
166 (warn_logical_operator): Same.
167 (warn_if_unused_value): Same.
168 (do_warn_unused_parameter): Same.
170 2021-06-24 Jakub Jelinek <jakub@redhat.com>
172 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
174 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
175 combined target constructs also add map (always, tofrom:) clause.
177 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
179 * c-attribs.c (common_handle_aligned_attribute): Remove short
180 circuit and dead code.
182 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
185 * known-headers.cc (get_stdlib_header_for_name): Add known
186 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
189 2021-06-12 Jason Merrill <jason@redhat.com>
191 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
193 2021-06-11 Jakub Jelinek <jakub@redhat.com>
196 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
197 -std=c++2b for P1938R3 consteval if support.
199 2021-06-09 Jason Merrill <jason@redhat.com>
202 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
205 2021-06-07 Martin Liska <mliska@suse.cz>
207 * c-target.def: Split long lines and replace them
210 2021-06-04 Martin Sebor <msebor@redhat.com>
213 * c-attribs.c (positional_argument): Bail on erroneous types.
215 2021-06-04 Martin Sebor <msebor@redhat.com>
217 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
218 for element presence.
220 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
222 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
223 (dump_ada_decl_name): Likewise.
224 (dump_anonymous_type_name): Remove parent parameter and adjust.
225 (dump_sloc): Minor tweak.
226 (dump_ada_array_type): Remove type parameter and adjust.
227 (dump_ada_enum_type): Remove parent parameter and adjust.
228 (dump_ada_node): Adjust calls to above functions.
229 (dumped_anonymous_types): New global variable.
230 (dump_nested_types_1): Rename into...
231 (dump_nested_types): ...this.
232 (dump_nested_type): Remove parent and dumped_types parameters.
233 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
234 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
235 (dump_ada_specs): Initialize and free dumped_anonymous_types.
237 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
239 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
240 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
242 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
244 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
245 (htable_t): New typedef.
246 (overloaded_names): Use it.
247 (add_name): New function.
248 (init_overloaded_names): Use add_name to populate the table and add
249 special cases for sigaction and stat.
250 (overloaded_name_p): Rename into...
251 (overloading_index): ...this. Do not initialize overloaded_names table
252 here. Return the index or zero.
253 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
254 but add an overloading suffix instead.
255 (dump_ada_specs): Initialize overloaded_names tables here.
257 2021-06-01 Martin Liska <mliska@suse.cz>
260 * c-attribs.c (handle_optimize_attribute): Limit sanity check
261 to a situation where we are not in processing of an optimize
263 * c-pragma.c (handle_pragma_pop_options): Restore target
266 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
269 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
271 2021-05-31 Richard Biener <rguenther@suse.de>
274 * c-common.c: Include tree-vector-builder.h and
276 (c_common_reswords): Add __builtin_shufflevector.
277 (c_build_shufflevector): New funtion.
278 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
279 (c_build_shufflevector): Declare.
281 2021-05-28 Jakub Jelinek <jakub@redhat.com>
284 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
285 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
287 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
289 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
291 2021-05-25 Martin Liska <mliska@suse.cz>
293 PR tree-optimization/92860
295 * c-attribs.c (handle_optimize_attribute): Save target node
296 before calling parse_optimize_options and save it in case
298 * c-pragma.c (handle_pragma_target): Similarly for pragma.
299 (handle_pragma_pop_options): Likewise here.
301 2021-05-25 Martin Liska <mliska@suse.cz>
303 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
305 2021-05-25 Jakub Jelinek <jakub@redhat.com>
308 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
309 combined with simd and not with taskloop or for.
311 2021-05-21 Jakub Jelinek <jakub@redhat.com>
314 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
315 on firstprivate clause copy going to target construct, and for
316 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
318 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
320 * c.opt (Wc++11-extensions, Wc++14-extensions)
321 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
324 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
326 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
328 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
330 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
331 * c-pch.c (struct c_pch_validity): Use type uint32_t.
332 (pch_init): Renamed member.
333 (c_common_valid_pch): Adjust access to debug_type_names.
335 2021-05-19 Martin Sebor <msebor@redhat.com>
338 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
341 2021-05-18 Richard Biener <rguenther@suse.de>
344 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
345 Reword existing nunit diagnostic.
347 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
349 * c-common.c (braced_list_to_string): Return CTOR unchanged
350 if host and target character sizes don't match.
352 2021-05-14 Martin Liska <mliska@suse.cz>
354 * c.opt: Add Warning keyword for 2 options.
356 2021-05-13 Martin Liska <mliska@suse.cz>
359 * c-attribs.c (handle_target_clones_attribute): Expect a string
360 argument to target_clone argument.
362 2021-05-11 Joseph Myers <joseph@codesourcery.com>
364 * c-lex.c (interpret_float): Handle digit separators for C2X.
366 2021-05-10 Martin Liska <mliska@suse.cz>
368 * c-ada-spec.c (print_destructor): Use startswith
369 function instead of strncmp.
370 (dump_ada_declaration): Likewise.
371 * c-common.c (disable_builtin_function): Likewise.
372 (def_builtin_1): Likewise.
373 * c-format.c (check_tokens): Likewise.
374 (check_plain): Likewise.
375 (convert_format_name_to_system_name): Likewise.
377 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
379 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
382 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
383 Nathan Sidwell <nathan@codesourcery.com>
384 Tom de Vries <vries@codesourcery.com>
385 Julian Brown <julian@codesourcery.com>
386 Kwok Cheung Yeung <kcy@codesourcery.com>
388 * c.opt (Wopenacc-parallelism): New.
390 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
392 * c.opt (fopenacc-kernels=): Remove.
394 2021-04-08 Jakub Jelinek <jakub@redhat.com>
396 * c-warn.c (do_warn_double_promotion): Fix comment typo,
398 (check_alignment_of_packed_member): Fix a comment typo,
400 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
401 and onless -> unless.
402 (warn_parm_array_mismatch): Fix comment typos, declaratation
403 -> declaration and woud -> would. Fix up comment indentation.
405 2021-04-08 Martin Sebor <msebor@redhat.com>
408 * c.opt (Wmismatched-new-delete): Correct spelling.
410 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
412 * c-ada-spec.c (is_simple_enum): Minor tweaks.
413 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
414 enumeral types use again the type name for the enumeration constants.
415 (dump_ada_node): Adjust call to dump_ada_enum_type.
416 (dump_nested_type): Likewise.
418 2021-04-01 Jason Merrill <jason@redhat.com>
421 * c-opts.c (c_common_post_options): Bump latest_abi_version.
423 2021-03-25 Jakub Jelinek <jakub@redhat.com>
426 * c-warn.c (do_warn_duplicated_branches): Pass also
427 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
429 2021-03-20 Jakub Jelinek <jakub@redhat.com>
432 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
434 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
436 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
437 after entering the separate class package, if any.
439 2021-03-04 Richard Biener <rguenther@suse.de>
441 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
444 2021-03-04 Jakub Jelinek <jakub@redhat.com>
447 * c-ppoutput.c (print): Change src_line type from int to unsigned.
448 (token_streamer::stream) Likewise.
449 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
452 2021-03-03 Jakub Jelinek <jakub@redhat.com>
455 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
456 instead of mark_addressable. Fix a comment typo -
457 neutrallly -> neutrally.
459 2021-02-28 Jakub Jelinek <jakub@redhat.com>
462 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
463 message - refernced -> referenced. Remove superfluous space before
464 closing paren of function calls.
466 2021-02-25 Nathan Sidwell <nathan@acm.org>
469 * c.opt (-flang-info-module-cmi): Renamed option.
471 2021-02-19 Nathan Sidwell <nathan@acm.org>
473 * c.opt (flang-info-module-read, flang-info-module-read=): New.
475 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
478 * c-attribs.c (c_common_attribute_table): Add the "retain"
480 (handle_retain_attribute): New function.
482 2021-02-16 Marek Polacek <polacek@redhat.com>
485 * c-attribs.c (handle_assume_aligned_attribute): Check that the
486 alignment argument is non-negative. Tweak a warning message.
488 2021-02-12 Martin Sebor <msebor@redhat.com>
491 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
492 print_generic_expr_to_str.
494 2021-02-10 Richard Biener <rguenther@suse.de>
496 * c-common.c (parse_optimize_options): Free decoded_options.
498 2021-02-04 emsr <3dw4rd@verizon.net>
500 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
502 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
504 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
505 * c-lex.c (interpret_integer): Set node type for size literal.
507 2021-01-28 Jakub Jelinek <jakub@redhat.com>
509 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
510 draft from description.
511 (-std=c++2b): Fix a pasto, 2020 -> 2023.
513 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
515 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
516 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
518 * c-opts.c (set_std_cxx23): New.
519 (c_common_handle_option): Set options when -std=c++23 is enabled.
520 (c_common_post_options): Adjust comments.
521 (set_std_cxx20): Likewise.
523 2021-01-25 Martin Sebor <msebor@redhat.com>
526 * c-common.c (check_nonnull_arg): Adjust warning text.
528 2021-01-17 Martin Sebor <msebor@redhat.com>
530 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
531 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
533 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
535 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
536 Redefine PRAGMA_OACC_CLAUSE_DETACH.
538 2021-01-15 Jakub Jelinek <jakub@redhat.com>
540 PR tree-optimization/98597
541 * c-pretty-print.c: Include options.h.
542 (c_fold_indirect_ref_for_warn): New function.
543 (print_mem_ref): Use it. If it returns something that has compatible
544 type and is TBAA compatible with zero offset, print it and return,
545 otherwise print it using offsetof syntax or array ref syntax. Fix up
546 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
547 argument has pointer to array type. Print pointers using the standard
550 2021-01-12 Martin Sebor <msebor@redhat.com>
554 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
555 has pointer type. Remove redundant code. Avoid calling
556 gimple_canonical_types_compatible_p.
558 2021-01-07 Martin Sebor <msebor@redhat.com>
561 * c-pretty-print.c (print_mem_ref): Strip array from access type.
562 Avoid assuming acces type's size is constant. Correct condition
563 guarding the printing of a parenthesis.
565 2021-01-06 Martin Sebor <msebor@redhat.com>
568 * c-pretty-print.c (c_pretty_printer::primary_expression): For
569 SSA_NAMEs print VLA names and GIMPLE defining statements.
570 (print_mem_ref): New function.
571 (c_pretty_printer::unary_expression): Call it.
573 2021-01-06 Richard Biener <rguenther@suse.de>
575 PR tree-optimization/95582
576 * c-attribs.c (c_common_attribute_table): Add entry for
577 signed_bool_precision.
578 (handle_signed_bool_precision_attribute): New.
580 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
582 * c.opt: Add -stdlib= option and enumerations for
583 libstdc++ and libc++.
585 2020-12-16 Martin Liska <mliska@suse.cz>
587 * c.opt: Remove usage of Report.
589 2020-12-14 Martin Sebor <msebor@redhat.com>
594 * c-attribs.c (maybe_add_noinline): New function.
595 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
596 Implicitly add attribute noinline to functions not declared inline
599 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
601 * c-pragma.c (omp_pragmas): Add 'allocate'.
602 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
604 2020-12-08 Jakub Jelinek <jakub@redhat.com>
607 * c-pragma.c (omp_pragmas): Remove "master".
608 (omp_pragmas_simd): Add "master".
610 2020-12-07 Marek Polacek <polacek@redhat.com>
613 * c-common.c (verify_tree_lim_r): New function.
614 (verify_sequence_points): Use it. Use nullptr instead of 0.
616 2020-12-03 Martin Sebor <msebor@redhat.com>
620 * c-attribs.c (handle_dealloc_attribute): New function.
621 (handle_malloc_attribute): Handle argument forms of attribute.
622 * c.opt (-Wmismatched-dealloc): New option.
623 (-Wmismatched-new-delete): New option.
625 2020-12-03 Jakub Jelinek <jakub@redhat.com>
628 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
629 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
631 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
633 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
634 {__GNUC_EXECUTION_CHARSET_NAME} and
635 _WIDE_EXECUTION_CHARSET_NAME} macros.
637 2020-12-01 Nathan Sidwell <nathan@acm.org>
639 * c-common.c (module, import, export): New internal tokens (with
641 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
643 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
644 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
646 2020-12-01 Nathan Sidwell <nathan@acm.org>
648 * c-opts.c (c_common_init_options): Ask for module dependencies.
649 (c_common_handle_option): Handle -Mmodules -Mno-modules.
650 * c-pch.c (c_common_valid_pch): ... does not play with C++
652 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
654 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
655 (fmodule-only, fmodule-mapper, fmodule-lazy)
656 (fmodule-version-ignore, Winvalid-imported-macros)
657 (flang-info-include-translate, flang-info-include-translate-not):
660 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
662 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
663 (dump_ada_structure): Also deal with convention, unchecked union and
664 bit-field for nested types. In the latter case, print an Alignment
665 aspect along with the Pack aspect.
667 2020-11-25 Martin Sebor <msebor@redhat.com>
670 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
673 2020-11-24 Martin Sebor <msebor@redhat.com>
675 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
677 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
679 * c-attribs.c (handle_special_var_sec_attribute): New.
680 (handle_noinit_attribute): Remove.
681 (attr_noinit_exclusions): Rename to...
682 (attr_section_exclusions): ...this, and add "persistent" attribute
684 (c_common_attribute_table): Add "persistent" attribute.
686 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
688 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
689 Treat opaque types like other types.
690 (c_pretty_printer::direct_abstract_declarator): Opaque types are
693 2020-11-20 Martin Sebor <msebor@redhat.com>
695 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
696 with fewer arguments.
698 2020-11-20 Martin Sebor <msebor@redhat.com>
701 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
702 Error out on invalid modes.
704 2020-11-20 Jakub Jelinek <jakub@redhat.com>
707 * c-common.c (check_builtin_function_arguments): Handle
708 BUILT_IN_CLEAR_PADDING.
710 2020-11-18 Nathan Sidwell <nathan@acm.org>
712 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
714 2020-11-17 Nathan Sidwell <nathan@acm.org>
716 * c-common.h (enum c_tree_index): Reorder to place lazy fields
717 after newly-added CTI_MODULE_HWM.
719 2020-11-17 Joseph Myers <joseph@codesourcery.com>
721 * c-cppbuiltin.c (builtin_define_float_constants): Define
722 "*_IS_IEC_60559__" macros.
724 2020-11-17 Nathan Sidwell <nathan@acm.org>
726 * c-lex.c: #include "langhooks.h".
727 (cb_undef): Maybe call preprocess_undef lang hook.
728 * c-opts.c (c_common_post_options): Maybe call preprocess_options
730 (push_command_line_include): Maybe call preprocess_main_file lang
732 (cb_file_change): Likewise.
733 * c-ppoutput.c: #include "langhooks.h.
734 (scan_translation_unit): Maybe call preprocess_token lang hook.
735 (class do_streamer): New, derive from token_streamer.
736 (directives_only_cb): Data pointer is do_streamer, call
737 preprocess_token lang hook.
738 (scan_translation_unit_directives_only): Use do_streamer.
739 (print_line_1): Move src_line recording to after string output.
740 (cb_undef): Maybe call preprocess_undef lang hook.
742 2020-11-17 Nathan Sidwell <nathan@acm.org>
744 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
745 code duplicating that functionality.
747 2020-11-17 Jakub Jelinek <jakub@redhat.com>
750 * c-common.c (check_builtin_function_arguments)
751 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
752 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
753 for more builtins and argument positions.
755 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
758 * stub-objc.c: Include c-common.h to declare enum rid.
760 2020-11-13 Jakub Jelinek <jakub@redhat.com>
763 * c-cppbuiltin.c: Include configargs.h.
764 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
765 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
768 2020-11-13 Gergö Barany <gergo@codesourcery.com>
769 Thomas Schwinge <thomas@codesourcery.com>
771 * c.opt (fopenacc-kernels): Add.
773 2020-11-13 Jason Merrill <jason@redhat.com>
775 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
777 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
780 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
782 2020-11-13 Martin Liska <mliska@suse.cz>
784 * c-attribs.c (build_attr_access_from_parms): Format properly.
786 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
789 * c-common.c (c_common_reswords): null_unspecified, nullable,
790 nonnull, null_resettable: New keywords.
791 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
792 RID_NONNULL, RID_NULL_RESETTABLE: New.
793 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
794 ranges accepted for property attributes.
795 * c-attribs.c (handle_objc_nullability_attribute): New.
796 * c-objc.h (enum objc_property_attribute_group): Add
797 OBJC_PROPATTR_GROUP_NULLABLE.
798 (enum objc_property_attribute_kind):Add
799 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
800 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
802 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
805 * c-attribs.c (handle_objc_root_class_attribute): New
806 * c-objc.h (objc_start_class_interface): Add a location
807 value for the position of the class name.
808 * c.opt: Add Wobjc-root-class.
809 * stub-objc.c (objc_start_class_interface): Add a location
810 value for the position of the class name.
812 2020-11-12 Joseph Myers <joseph@codesourcery.com>
814 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
815 Allow scope for C. Handle standard attributes for C. Do not
816 accept unscoped attributes if std_syntax and not handled as
818 * c-common.h (c_common_has_attribute): Update prototype.
820 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
823 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
824 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
826 2020-11-11 Patrick Palka <ppalka@redhat.com>
829 * c-opts.c (c_common_post_options): Update latest_abi_version.
831 2020-11-10 Jakub Jelinek <jakub@redhat.com>
834 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
836 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
837 recursively and just return true instead of warning if it is true.
840 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
842 * c-common.h (c_omp_adjust_map_clauses): New declaration.
843 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
844 (c_omp_adjust_map_clauses): New function.
846 2020-11-09 Marek Polacek <polacek@redhat.com>
849 * c-common.c (attribute_fallthrough_p): Tweak the warning
852 2020-11-09 Patrick Palka <ppalka@redhat.com>
854 * c-pragma.c (handle_pragma_diagnostic): Split the
855 unknown-option -Wpragmas diagnostic into a warning and a
856 subsequent note containing a spelling suggestion. Avoid
857 computing the suggestion if -Wpragmas warnings are being
860 2020-11-09 Patrick Palka <ppalka@redhat.com>
863 * c-indentation.c (get_visual_column): Remove location_t
864 parameter. Move the column-tracking diagnostic code from here
866 (should_warn_for_misleading_indentation): ... here, before the
867 early exit for when the loci are not all distinct. Don't pass a
868 location_t argument to get_visual_column.
869 (assert_get_visual_column_succeeds): Don't pass a location_t
870 argument to get_visual_column.
871 (assert_get_visual_column_fails): Likewise.
873 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
875 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
876 of keywords accepted in @property attribute contexts.
877 * c-objc.h (enum objc_property_attribute_group): Add
878 OBJC_PROPATTR_GROUP_CLASS.
879 (enum objc_property_attribute_kind): Add
880 OBJC_PROPERTY_ATTR_CLASS.
882 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
884 * c-common.c (c_common_reswords): Add 'atomic' property
886 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
889 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
891 * c-attribs.c (handle_nsobject_attribute): New.
892 * c.opt: Add WNSObject-attribute.
894 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
896 * c-objc.h (enum objc_property_attribute_group): New
897 (enum objc_property_attribute_kind): New.
898 (OBJC_PROPATTR_GROUP_MASK): New.
899 (struct property_attribute_info): Small class encapsulating
900 parser output from property attributes.
901 (objc_prop_attr_kind_for_rid): New
902 (objc_add_property_declaration): Simplify interface.
903 * stub-objc.c (enum rid): Dummy type.
904 (objc_add_property_declaration): Simplify interface.
905 (objc_prop_attr_kind_for_rid): New.
907 2020-11-06 Nathan Sidwell <nathan@acm.org>
909 * c-ada-spec.c (collect_ada_nodes): Rename
910 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
911 (collect_ada_node): Likewise.
912 (dump_forward_type): Likewise.
913 * c-common.c (set_underlying_type): Rename
914 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
915 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
917 2020-11-06 Jakub Jelinek <jakub@redhat.com>
919 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
921 2020-11-05 Marek Polacek <polacek@redhat.com>
924 * c.opt (Wexceptions): New option.
926 2020-11-05 Marek Polacek <polacek@redhat.com>
929 * c.opt (Wvexing-parse): New option.
931 2020-11-04 Jakub Jelinek <jakub@redhat.com>
934 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
935 underlying decl to clear in the allocate_head bitmap.
937 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
939 * c-objc.h (objc_non_constant_expr_p): New.
940 * stub-objc.c (objc_non_constant_expr_p): New.
942 2020-11-03 Nathan Sidwell <nathan@acm.org>
944 * c.opt (MQ,MT): Reword description to be make-agnostic.
946 2020-11-02 Nathan Sidwell <nathan@acm.org>
948 * c-opts.c (c_common_post_options): Move var decl to its
949 initialization point.
951 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
953 * c-lex.c (c_lex_with_flags): When combining '@' with a
954 keyword for Objective-C, combine the location ranges too.
956 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
957 H.J.Lu <hjl.tools@gmail.com>
959 * c-attribs.c (c_common_attribute_table): Add new attribute
961 (handle_zero_call_used_regs_attribute): New function.
963 2020-10-28 Marek Polacek <polacek@redhat.com>
966 * c-opts.c (c_common_post_options): In C++20, turn on
967 -Wdeprecated-enum-enum-conversion and
968 -Wdeprecated-enum-float-conversion.
969 * c.opt (Wdeprecated-enum-enum-conversion,
970 Wdeprecated-enum-float-conversion): New options.
971 (Wenum-conversion): Allow for C++ too.
973 2020-10-28 Jakub Jelinek <jakub@redhat.com>
975 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
976 * c-omp.c: Include bitmap.h.
977 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
979 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
981 * c-common.c (__is_nothrow_assignable): New.
982 (__is_nothrow_constructible): Likewise.
983 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
984 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
986 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
988 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
990 2020-10-23 Marek Polacek <polacek@redhat.com>
993 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
994 (c_common_init_ts): Likewise.
995 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
996 * c-common.h (maybe_warn_sizeof_array_div): Declare.
997 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
998 (maybe_warn_sizeof_array_div): New function.
999 * c.opt (Wsizeof-array-div): New option.
1001 2020-10-23 Martin Sebor <msebor@redhat.com>
1004 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
1006 2020-10-22 Martin Liska <mliska@suse.cz>
1009 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
1010 (handle_stack_protect_attribute): Add error message for a
1011 no_stack_protector function.
1013 2020-10-22 Martin Liska <mliska@suse.cz>
1015 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
1017 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
1019 * c-gimplify.c: Include tree-nested.h
1020 (c_genericize): Update for new nested function info.
1022 2020-10-14 Martin Sebor <msebor@redhat.com>
1025 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
1026 bounds in an extra list.
1028 2020-10-05 Richard Biener <rguenther@suse.de>
1029 Jakub Jelinek <jakub@redhat.com>
1032 * c-pretty-print.c: Include langhooks.h.
1033 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
1035 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
1037 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
1039 2020-09-30 Martin Sebor <msebor@redhat.com>
1042 * c-attribs.c (append_access_attr): Use the function declaration
1043 location for a warning about an attribute access argument.
1045 2020-09-29 Marek Polacek <polacek@redhat.com>
1048 * c.opt (Wrange-loop-construct): New option.
1050 2020-09-23 Martin Sebor <msebor@redhat.com>
1053 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
1055 2020-09-23 Marek Polacek <polacek@redhat.com>
1058 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
1059 after loops and other structured control constructs have been lowered.
1061 2020-09-22 Jakub Jelinek <jakub@redhat.com>
1063 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
1064 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
1066 2020-09-21 Marek Polacek <polacek@redhat.com>
1068 * c.opt (Wctad-maybe-unsupported): New option.
1070 2020-09-19 Martin Sebor <msebor@redhat.com>
1073 * c-common.h (warn_parm_array_mismatch): Declare new function.
1074 (has_attribute): Move declaration of an existing function.
1075 (build_attr_access_from_parms): Declare new function.
1076 * c-warn.c (parm_array_as_string): Define new function.
1077 (plus_one): Define new function.
1078 (warn_parm_ptrarray_mismatch): Define new function.
1079 (warn_parm_array_mismatch): Define new function.
1080 (vla_bound_parm_decl): New function.
1081 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
1082 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
1084 (c_pretty_printer::direct_abstract_declarator): ...but instead print
1085 them in brackets here. Also print [static]. Strip extraneous
1086 expressions from VLA bounds.
1088 2020-09-19 Martin Sebor <msebor@redhat.com>
1091 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
1092 (handle_argspec_attribute): New function.
1093 (get_argument, get_argument_type): New functions.
1094 (append_access_attrs): Add overload. Handle internal attribute
1095 representation in addition to external.
1096 (handle_access_attribute): Handle internal attribute representation
1097 in addition to external.
1098 (build_attr_access_from_parms): New function.
1100 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1102 * c-gimplify.c (genericize_c_loop): Rewrite to match
1103 c_finish_loop in c-typeck.c.
1105 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
1107 * c-common.c (c_block_may_fallthrough): New, split from
1108 cxx_block_may_fallthrough in the cp front end.
1109 (c_common_init_ts): Move handling of loop and switch-related
1110 statements here from the cp front end.
1111 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
1113 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
1114 * c-common.h (c_block_may_fallthru): Declare.
1115 (bc_state_t): Move here from cp front end.
1116 (save_bc_state, restore_bc_state): Declare.
1117 (c_genericize_control_stmt): Declare.
1118 (WHILE_COND, WHILE_BODY): Likewise.
1119 (DO_COND, DO_BODY): Likewise.
1120 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
1121 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
1122 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
1123 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
1124 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
1125 * c-dump.c (dump_stmt): Copy from cp front end.
1126 (c_dump_tree): Move code to handle structured loop and switch
1127 tree nodes here from cp front end.
1128 * c-gimplify.c: Adjust includes.
1129 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
1131 (save_bc_state, restore_bc_state): New functions using old code
1133 (get_bc_label, expr_loc_or_loc): Move from cp front end.
1134 (genericize_c_loop): Move from cp front end.
1135 (genericize_for_stmt, genericize_while_stmt): Likewise.
1136 (genericize_do_stmt, genericize_switch_stmt): Likewise.
1137 (genericize_continue_stmt, genericize_break_stmt): Likewise.
1138 (genericize_omp_for_stmt): Likewise.
1139 (c_genericize_control_stmt): New function using code split from
1141 (c_genericize_control_r): New.
1142 (c_genericize): Call walk_tree with c_genericize_control_r.
1143 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
1144 structured loop and switch tree nodes here from cp front end.
1146 2020-09-17 Patrick Palka <ppalka@redhat.com>
1149 * c-indentation.c (should_warn_for_misleading_indentation): Move
1150 declarations of local variables closer to their first use.
1151 Handle virtual token locations by resolving them to their
1152 respective macro expansion points. If all three tokens are
1153 produced from the same macro expansion, then instead use their
1154 loci within the macro definition.
1156 2020-09-16 Martin Sebor <msebor@redhat.com>
1160 * c-attribs.c (validate_attr_args): New function.
1161 (validate_attr_arg): Same.
1162 (handle_section_attribute): Call it. Introduce a local variable.
1163 (handle_alloc_size_attribute): Same.
1164 (handle_alloc_align_attribute): Same.
1166 2020-09-14 Jakub Jelinek <jakub@redhat.com>
1168 * c-attribs.c (handle_optimize_attribute): Adjust
1169 cl_optimization_save, cl_optimization_restore and
1170 build_optimization_node callers.
1171 * c-pragma.c (handle_pragma_optimize): Adjust
1172 build_optimization_node caller.
1173 (handle_pragma_push_options): Adjust
1174 build_optimization_node and build_target_option_node callers.
1175 (handle_pragma_pop_options, handle_pragma_reset_options):
1176 Adjust cl_optimization_restore callers.
1178 2020-08-28 Martin Sebor <msebor@redhat.com>
1180 * c.opt (Wstringop-overread): New option.
1182 2020-08-11 Jakub Jelinek <jakub@redhat.com>
1185 * c-common.c (get_atomic_generic_size): Require that first argument's
1186 type points to a complete type and use tree_fits_uhwi_p instead of
1187 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
1189 2020-07-31 Martin Sebor <msebor@redhat.com>
1192 * c-common.c (check_function_arguments_recurse): Return early when
1193 no-warning bit is set.
1195 2020-07-31 Richard Biener <rguenther@suse.de>
1198 * c-common.h (c_common_finalize_early_debug): Declare.
1199 * c-common.c: Include debug.h.
1200 (c_common_finalize_early_debug): finalize_early_debug langhook
1201 implementation generating debug for extern declarations.
1203 2020-07-27 Nathan Sidwell <nathan@acm.org>
1205 * c-common.c (try_to_locate_new_include_insertion_point): Use
1206 strcmp, not pointer equality.
1208 2020-07-25 Martin Sebor <msebor@redhat.com>
1211 * c-common.c (check_nonnull_arg): Print note only when warning was
1214 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
1216 * c-omp.c (c_finish_omp_critical): Check for no name but
1217 nonzero hint provided.
1219 2020-07-20 Jason Merrill <jason@redhat.com>
1221 * c-cppbuiltin.c (c_cpp_builtins): Update
1222 __cpp_nontype_template_args for C++20.
1224 2020-07-20 Martin Sebor <msebor@redhat.com>
1227 * c.opt: Remove stray text.
1229 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
1232 * c-indentation.c (should_warn_for_misleading_indentation): Get
1233 global tabstop from the new source.
1234 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
1235 is now a common option.
1238 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
1240 * c.opt (Wscalar-storage-order): Add explicit variable.
1242 2020-07-07 Nathan Sidwell <nathan@acm.org>
1244 * c-opts.c (c_common_post_options): Add 'injecting' arg to
1246 (c_finish_options): Add linemap_line_start calls for builtin and cmd
1247 maps. Force token position to line_table's highest line.
1248 * c-ppoutput.c (print_line_1): Refactor, print line zero.
1249 (cb_define): Always increment source line.
1251 2020-07-06 Martin Sebor <msebor@redhat.com>
1254 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
1255 to stub lambda objects with null this pointer.
1256 (check_nonnull_arg): Handle C++ nullptr.
1258 2020-07-02 Jason Merrill <jason@redhat.com>
1259 Jakub Jelinek <jakub@redhat.com>
1261 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
1263 2020-06-30 Jakub Jelinek <jakub@redhat.com>
1266 * c-common.c (check_function_arguments_recurse): Don't crash on
1267 calls to internal functions.
1269 2020-06-28 Martin Sebor <msebor@redhat.com>
1272 * c-common.c (struct nonnull_arg_ctx): Add members.
1273 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
1274 C++ member functions specially. Consider the this pointer implicitly
1276 (check_nonnull_arg): Use location of argument when available.
1277 (check_function_arguments): Use nonnull_arg_ctx as argument.
1279 2020-06-27 Jakub Jelinek <jakub@redhat.com>
1282 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
1283 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
1284 smaller precision intop operands separately.
1286 2020-06-26 Marek Polacek <polacek@redhat.com>
1288 * c-opts.c (c_common_init_options): Default to gnu++17.
1290 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
1293 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
1296 2020-06-16 Jakub Jelinek <jakub@redhat.com>
1298 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
1299 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
1301 (c_omp_is_loop_iterator): New function.
1302 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
1303 if outer loop iterator is present. Perform duplicate checking through
1304 hash_set in the function rather than expecting caller to do that.
1305 Pass NULL instead of d->ppset to walk_tree_1.
1306 (c_omp_check_nonrect_loop_iv): New function.
1307 (c_omp_check_loop_iv): Use it. Fill in new members, allow
1308 non-rectangular loop forms, diagnose multiple associated loops with
1309 the same iterator. Pass NULL instead of &pset to walk_tree_1.
1310 (c_omp_check_loop_iv_exprs): Likewise.
1312 2020-06-10 Martin Liska <mliska@suse.cz>
1314 PR tree-optimization/92860
1315 * c-attribs.c (handle_optimize_attribute):
1316 Save global options and compare it after parsing of function
1318 * c-pragma.c (opt_stack::saved_global_options): New field.
1319 (handle_pragma_push_options): Save global_options.
1320 (handle_pragma_pop_options): Compare them after pop.
1322 2020-06-09 Jakub Jelinek <jakub@redhat.com>
1325 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
1326 case when MEM_REF's first argument has type pointer to incomplete type.
1328 2020-06-05 Jason Merrill <jason@redhat.com>
1330 * c-pretty-print.c (pp_c_additive_expression): Handle negative
1331 operand to POINTER_PLUS_EXPR.
1333 2020-06-04 Martin Sebor <msebor@redhat.com>
1337 * c-attribs.c (append_access_attrs): Handle attr_access::none.
1338 (handle_access_attribute): Same.
1340 2020-06-03 Mark Wielaard <mark@klomp.org>
1342 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
1344 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
1345 New function declaration.
1347 2020-06-03 Mark Wielaard <mark@klomp.org>
1349 * known-headers.cc (get_string_macro_hint): New function.
1350 (get_stdlib_header_for_name): Use get_string_macro_hint.
1351 (get_c_stdlib_header_for_string_macro_name): New function.
1352 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
1353 New function declaration.
1355 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
1357 * c-common.h (c_omp_predetermined_mapping): Declare.
1358 * c-omp.c (c_omp_predetermined_mapping): New.
1360 2020-05-22 Mark Wielaard <mark@klomp.org>
1362 * known-headers.cc (get_stdlib_header_for_name): Add a new
1363 stdlib_hint array for stdbool and stdint.
1365 2020-05-22 Mark Wielaard <mark@klomp.org>
1367 * known-headers.cc (get_stdlib_header_for_name): Return
1368 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
1371 2020-05-20 Nathan Sidwell <nathan@acm.org>
1373 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
1375 * c-common.c (try_to_locate_new_include_insertion_point): Use
1376 strcmp to compare filenames.
1377 * c-lex.c (init_c_lex): Move declaration to initialization.
1378 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
1379 deferred count loop.
1381 2020-05-15 Jason Merrill <jason@redhat.com>
1383 * c-opts.c (set_std_cxx20): Set flag_coroutines.
1385 2020-05-13 Jason Merrill <jason@redhat.com>
1387 * c.opt (std=c++20): Make c++2a the alias.
1388 (std=gnu++20): Likewise.
1389 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
1391 * c-cppbuiltin.c: Adjust.
1392 * c-ubsan.c: Adjust.
1395 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
1397 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
1399 2020-05-08 Nathan Sidwell <nathan@acm.org>
1401 Reimplement directives only processing.
1402 * c-ppoutput.c (token_streamer): Ne.
1403 (directives_only_cb): New. Swallow ...
1404 (print_lines_directives_only): ... this.
1405 (scan_translation_unit_directives_only): Reimplment using the
1406 published interface.
1408 2020-05-07 Marek Polacek <polacek@redhat.com>
1410 * c-format.c (badwords): Add "nonstatic".
1412 202-05-07 Jakub Jelinek <jakub@redhat.com>
1415 * c-common.c (speculation_safe_value_resolve_params): Return false if
1416 error_operand_p (val2).
1417 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
1418 Remove extraneous semicolon.
1420 2020-05-06 qing zhao <qing.zhao@oracle.com>
1423 * c-indentation.c (get_visual_column): Add a hint to use the new
1424 -flarge-source-files option.
1426 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
1428 * c-attribs.c (handle_vector_size_attribute): Add attribute
1429 nonnull for argument args in order to silence warning of
1430 uninitialized variable usage. Since this is local to the
1431 compilation unit and thus cannot be checked at call sides by the
1432 compiler, added an assert statement in order to verify this.
1434 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
1437 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
1438 value to USHRT_MAX (65535).
1440 2020-04-29 Jakub Jelinek <jakub@redhat.com>
1442 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
1444 2020-04-27 Jakub Jelinek <jakub@redhat.com>
1447 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
1448 fncode == BUILT_IN_NONE before initialization of first_param.
1450 2020-04-23 Marek Polacek <polacek@redhat.com>
1453 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
1456 2020-04-14 Patrick Palka <ppalka@redhat.com>
1459 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
1460 ampersand if it's an rvalue reference type.
1462 2020-04-13 Martin Sebor <msebor@redhat.com>
1465 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
1466 printing array bound for flexible array members.
1468 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1470 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
1473 2020-04-02 Richard Biener <rguenther@suse.de>
1476 * c-opts.c (c_common_post_options): Enable -ffinite-loops
1477 for -O2 and C++11 or newer.
1479 2020-03-28 Patrick Palka <ppalka@redhat.com>
1481 * c.opt: Add -fconcepts-diagnostics-depth.
1483 2020-03-27 Martin Sebor <msebor@redhat.com>
1486 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
1487 to decl_attributes. Make handling of different kinds of entities
1490 2020-03-27 Martin Sebor <msebor@redhat.com>
1493 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
1496 2020-03-23 Jakub Jelinek <jakub@redhat.com>
1499 * c-warn.c (warnings_for_convert_and_check): For expr and/or
1500 result being COMPOUND_EXPRs, skip to ultimate rhs.
1502 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
1505 * c-common.c (c_common_type_for_mode): Before using a registered
1506 built-in type, check that the vectorness of the type matches
1507 the vectorness of the mode.
1509 2020-03-17 Jakub Jelinek <jakub@redhat.com>
1511 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
1512 issue in a diagnostic message.
1514 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
1516 * c.opt: Avoid redundancy in the help text.
1518 2020-03-02 Marek Polacek <polacek@redhat.com>
1520 PR c++/93958 - add missing -std=gnu++20.
1521 * c.opt: Add -std=gnu++20.
1523 2020-03-01 Martin Sebor <msebor@redhat.com>
1526 * c-attribs.c (append_access_attrs): Correctly handle attribute.
1527 (handle_access_attribute): Same.
1529 2020-02-25 Jakub Jelinek <jakub@redhat.com>
1532 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
1533 "did you mean" hint in diagnostics.
1535 2020-02-15 Jason Merrill <jason@redhat.com>
1537 * c.opt: Add -std=c++20.
1539 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
1541 * c-ada-spec.c: Include bitmap.h.
1542 (dump_ada_double_name): Rename into...
1543 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
1544 (dump_ada_array_type): Adjust to above renaming. Robustify.
1545 (dump_nested_types_1): New function copied from... Add dumped_types
1546 parameter and pass it down to dump_nested_type.
1547 (dump_nested_types): ...this. Remove parent parameter. Just call
1548 dump_nested_types_1 on an automatic bitmap.
1549 (dump_nested_type): Add dumped_types parameter.
1550 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
1551 Adjust recursive calls and adjust to above renaming.
1552 (dump_ada_declaration): Adjust call to dump_nested_types.
1553 Tidy up and adjust to above renaming.
1554 (dump_ada_specs): Initialize and release bitmap obstack.
1556 2020-02-10 Martin Sebor <msebor@redhat.com>
1559 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
1561 2020-02-10 Jakub Jelinek <jakub@redhat.com>
1564 * c-format.c (check_plain): Fix up last argument of strncasecmp.
1565 Remove useless extra test.
1567 2020-02-03 Julian Brown <julian@codesourcery.com>
1568 Tobias Burnus <tobias@codesourcery.com>
1570 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
1572 2020-01-29 Jason Merrill <jason@redhat.com>
1575 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
1577 2020-01-23 Jason Merrill <jason@redhat.com>
1579 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
1581 2020-01-23 Martin Sebor <msebor@redhat.com>
1584 * c-common.c (check_function_arguments): Avoid overlap checking
1585 of sprintf functions.
1587 2020-01-22 Jason Merrill <jason@redhat.com>
1589 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
1591 * c-warn.c (conversion_warning): Check operands only after checking
1592 the whole expression. Don't check second operand of + for sign.
1594 2020-01-21 Jason Merrill <jason@redhat.com>
1595 Manuel López-Ibáñez <manu@gcc.gnu.org>
1597 PR c++/40752 - useless -Wconversion with short +=.
1598 * c.opt (-Warith-conversion): New.
1599 * c-warn.c (conversion_warning): Recurse for operands of
1600 operators. Only warn about the whole expression with
1603 2020-01-21 Jason Merrill <jason@redhat.com>
1605 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
1606 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
1608 2020-01-20 Nathan Sidwell <nathan@acm.org>
1610 PR preprocessor/80005
1611 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
1613 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1615 * c-common.c (co_await, co_yield, co_return): New.
1616 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
1617 RID_CO_RETURN): New enumeration values.
1618 (D_CXX_COROUTINES): Bit to identify coroutines are active.
1619 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
1620 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
1621 * c.opt (fcoroutines): New command-line switch.
1623 2020-01-10 David Malcolm <dmalcolm@redhat.com>
1625 * c-format.c (local_event_ptr_node): New.
1626 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
1627 (init_dynamic_diag_info): Initialize local_event_ptr_node.
1628 * c-format.h (T_EVENT_PTR): New define.
1630 2020-01-10 Martin Sebor <msebor@redhat.com>
1633 * c-attribs.c (append_access_attrs): Validate against the translated
1634 access string rather than the human-readable representation.
1636 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1638 Update copyright years.
1640 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
1642 * c-ada-spec.h (decl_sloc): Delete.
1643 * c-ada-spec.c (decl_sloc): Make static.
1645 2019-12-19 Julian Brown <julian@codesourcery.com>
1647 * c-common.h (c_omp_map_clause_name): Add prototype.
1648 * c-omp.c (c_omp_map_clause_name): New function.
1649 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
1650 PRAGMA_OACC_CLAUSE_DETACH.
1652 2019-12-19 Julian Brown <julian@codesourcery.com>
1653 Maciej W. Rozycki <macro@codesourcery.com>
1654 Tobias Burnus <tobias@codesourcery.com>
1655 Thomas Schwinge <thomas@codesourcery.com>
1657 * c-pragma.h (pragma_omp_clause): Add
1658 PRAGMA_OACC_CLAUSE_NO_CREATE.
1660 2019-12-17 Martin Sebor <msebor@redhat.com>
1663 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
1665 2019-12-11 David Malcolm <dmalcolm@redhat.com>
1667 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
1669 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
1671 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1673 * c-format.c (range_label_for_format_type_mismatch::get_text):
1674 Replace label_text ctor called with true with label_text::take.
1676 2019-12-09 David Malcolm <dmalcolm@redhat.com>
1678 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
1679 initial newline from expected outputs.
1680 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
1681 call to diagnostic_show_locus.
1683 2019-12-06 Jakub Jelinek <jakub@redhat.com>
1685 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
1688 2019-12-05 Marek Polacek <polacek@redhat.com>
1689 Jakub Jelinek <jakub@redhat.com>
1691 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
1692 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
1694 2019-12-05 Marek Polacek <polacek@redhat.com>
1696 PR c++/92271 - make __is_same alias for __is_same_as.
1697 * c-common.c: Add __is_same, an alias for __is_same_as.
1699 2019-12-03 Marek Polacek <polacek@redhat.com>
1701 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
1702 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1703 __cpp_aggregate_paren_init=201902 for -std=c++2a.
1705 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
1707 * c-attribs.c (handle_symver_attribute): New function
1708 (c_common_attributes): Add symver.
1710 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
1712 * c-common.c (pointer_int_sum): Use verify_type_context to check
1713 whether the target allows pointer arithmetic for the types involved.
1714 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
1715 to check whether the target allows sizeof and alignof operations
1716 for the types involved.
1718 2019-11-27 Jason Merrill <jason@redhat.com>
1720 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1722 2019-11-26 Jakub Jelinek <jakub@redhat.com>
1725 * c-attribs.c (handle_mode_attribute): Add mode attribute to
1728 2019-11-25 Joseph Myers <joseph@codesourcery.com>
1731 * c-common.c (c_common_type_for_mode): Handle decimal
1732 floating-point types being NULL_TREE.
1733 * c-format.c (get_format_for_type_1): Handle specified types being
1735 * c-lex.c (interpret_float): Give an error for decimal
1736 floating-point constants when decimal floating-point not
1739 2019-11-23 Jakub Jelinek <jakub@redhat.com>
1742 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
1743 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
1744 group warning with inform together.
1745 (handle_access_attribute): Formatting fix.
1747 2019-11-22 Jakub Jelinek <jakub@redhat.com>
1750 * c-common.h (identifier_global_tag): Declare.
1751 * c-format.c (get_pointer_to_named_type): Renamed to ...
1752 (get_named_type): ... this. Use identifier_global_tag instead of
1753 identifier_global_value, handle the return value being a TYPE_P.
1754 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
1755 to call get_named_type instead. Formatting fixes.
1757 Implement P1902R1, Missing feature-test macros 2017-2019.
1758 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
1759 and __cpp_generic_lambdas for -std=c++2a. Define
1760 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
1761 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
1762 __cpp_concepts for -std=c++2a.
1764 2019-11-22 Martin Sebor <msebor@redhat.com>
1767 * c-attribs.c (handle_access_attribute): New function.
1768 (c_common_attribute_table): Add new attribute.
1769 (get_argument_type): New function.
1770 (append_access_attrs): New function.
1771 (get_nonnull_operand): Rename...
1772 (get_attribute_operand): ...to this.
1773 * c-common.c (get_nonnull_operand): Rename...
1774 (get_attribute_operand): ...to this.
1776 2019-11-21 Joseph Myers <joseph@codesourcery.com>
1778 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
1781 2019-11-19 Joseph Myers <joseph@codesourcery.com>
1783 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
1784 warning for standard attributes mixed with fallthrough attributes.
1786 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1788 * c-attribs.c (handle_fallthrough_attribute): Remove static.
1789 * c-common.h (handle_fallthrough_attribute): Declare.
1791 2019-11-15 Joseph Myers <joseph@codesourcery.com>
1793 * c-attribs.c (handle_deprecated_attribute): Remove static.
1794 * c-common.h (handle_deprecated_attribute): Declare.
1796 2019-11-14 Joseph Myers <joseph@codesourcery.com>
1798 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
1801 2019-11-14 Jakub Jelinek <jakub@redhat.com>
1803 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
1806 * c-omp.c (c_omp_check_context_selector): Handle name lists
1807 containing string literals. Don't diagnose atomic_default_mem_order
1808 with multiple props.
1810 2019-11-13 Joseph Myers <joseph@codesourcery.com>
1812 * c-cppbuiltin.c (builtin_define_float_constants): Also define
1813 NORM_MAX constants. Update call to get_max_float.
1814 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
1817 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
1819 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
1820 (dump_forward_type): Do not generate a declaration for function types.
1821 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
1822 of the component type if it is declared in another file.
1824 2019-11-12 Martin Liska <mliska@suse.cz>
1826 * c-opts.c (c_common_post_options):
1827 Use SET_OPTION_IF_UNSET.
1829 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
1830 Frederik Harwath <frederik@codesourcery.com>
1833 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
1835 * c-pragma.c (oacc_pragmas): Add "serial" entry.
1837 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
1839 * c-common.h (gnu_vector_type_p): New function.
1840 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
1841 vectors to satisfy gnu_vector_type_p.
1842 (c_build_vec_convert): Likewise __builtin_convertvector.
1843 (convert_vector_to_array_for_subscript): Likewise when applying
1844 implicit vector to array conversion.
1845 (scalar_to_vector): Likewise when converting vector-scalar
1846 operations to vector-vector operations.
1848 2019-11-08 Joseph Myers <joseph@codesourcery.com>
1850 * c.opt (Wold-style-definition): Initialize to -1.
1851 * c-opts.c (c_common_post_options): Set warn_old_style_definition
1852 to flag_isoc2x if not set explicitly.
1854 2019-11-07 Joseph Myers <joseph@codesourcery.com>
1856 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
1858 2019-11-05 Jason Merrill <jason@redhat.com>
1860 * c-opts.c (c_common_post_options): -fconcepts-ts implies
1863 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
1865 * c-opts.c (c_common_post_options): Update
1868 2019-11-02 Jakub Jelinek <jakub@redhat.com>
1870 * c-common.h (c_omp_get_context_selector): Remove.
1871 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
1872 and renamed to omp_get_context_selector.
1874 * c-omp.c (c_omp_mark_declare_variant): Use
1875 omp_context_selector_set_compare.
1877 PR c++/88335 - Implement P1073R3: Immediate functions
1878 * c-common.h (enum rid): Add RID_CONSTEVAL.
1879 * c-common.c (c_common_reswords): Add consteval.
1881 2019-11-01 Martin Sebor <msebor@redhat.com>
1887 * c-pretty-print.c (direct_abstract_declarator): Print
1888 bound in zero-length arrays.
1889 * c.opt (-Wzero-length-bounds): New option.
1891 2019-10-30 Nathan Sidwell <nathan@acm.org>
1893 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
1896 2019-10-28 Martin Sebor <msebor@redhat.com>
1899 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
1900 even when only preprocessing.
1901 * c-common.h (names_builtin_p): Declare new function.
1902 * c-lex.c (init_c_lex): Set has_builtin.
1903 (c_common_has_builtin): Define a new function.
1904 * c-ppoutput.c (init_pp_output): Set has_builtin.
1906 2019-10-24 Jakub Jelinek <jakub@redhat.com>
1908 * c-common.h (c_omp_context_selector_matches): Remove.
1909 * c-omp.c (c_omp_context_selector_matches): Remove.
1910 * c-attribs.c (c_common_attribute_table): Add
1911 "omp declare target {host,nohost,block}" attributes.
1913 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
1915 * c-lex.c (c_common_has_attribute): Update nodiscard value.
1917 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
1919 * c-common.h (user_facing_original_type_p): Declare.
1920 * c-common.c: Include c-spellcheck.h.
1921 (user_facing_original_type_p): New function.
1923 2019-10-12 Jakub Jelinek <jakub@redhat.com>
1925 * c-common.h (c_omp_mark_declare_variant,
1926 c_omp_context_selector_matches): Declare.
1927 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
1929 (c_omp_get_context_selector): Support second argument NULL.
1930 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
1932 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
1933 attribute, add "omp declare variant base" and
1934 "omp declare variant variant" attributes.
1936 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1938 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
1939 CppReason(CPP_W_C11_C2X_COMPAT).
1941 2019-10-11 Joseph Myers <joseph@codesourcery.com>
1943 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
1944 _Decimal64 and _Decimal128.
1946 2019-10-10 Joseph Myers <joseph@codesourcery.com>
1948 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
1949 types if DFP not supported.
1951 2019-10-10 Jakub Jelinek <jakub@redhat.com>
1953 * c-common.h (c_omp_check_context_selector,
1954 c_omp_get_context_selector): Declare.
1955 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
1956 in diagnostic message.
1957 (c_omp_check_context_selector, c_omp_get_context_selector): New
1959 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
1961 (handle_omp_declare_variant_attribute): New function.
1963 2019-10-09 Martin Sebor <msebor@redhat.com>
1965 PR tree-optimization/90879
1966 * c.opt (-Wstring-compare): New option.
1968 2019-10-08 Andrew Sutton <asutton@lock3software.com>
1969 Jason Merrill <jason@redhat.com>
1971 Update the concepts implementation to conform to the C++20
1972 specification, improve compile times, and generally clean up
1975 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
1976 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
1977 * c.opt: Add -Wconcepts-ts.
1978 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
1979 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
1980 (set_std_cxx2a): Enable concepts by default.
1982 2019-10-08 Joseph Myers <joseph@codesourcery.com>
1984 * c-opts.c (c_common_post_options): Set
1985 -fno-fp-int-builtin-inexact for C2X.
1987 2019-10-05 Jakub Jelinek <jakub@redhat.com>
1989 PR c++/91369 - Implement P0784R7: constexpr new
1990 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1991 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
1993 2019-10-04 Joseph Myers <joseph@codesourcery.com>
1996 * c-format.c (C_STD_VER): Handle C2x.
1997 (C_STD_NAME): Likewise.
1998 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
1999 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
2000 modifier allowed and 'p' flag.
2001 * c-format.h (enum format_std_version): Add STD_C2X.
2002 (struct format_char_info): Mention 'p' in comment on flags2.
2004 2019-10-01 David Malcolm <dmalcolm@redhat.com>
2006 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
2007 calling diagnostic_show_locus, rather than destroying it afterwards.
2009 2019-10-01 Jakub Jelinek <jakub@redhat.com>
2012 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
2013 with NULL DECL_FIELD_OFFSET.
2015 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
2017 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
2018 has a type name, use it in preference to the __vector syntax.
2020 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
2022 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
2023 two spaces between a comma and "...".
2025 2019-09-27 Jakub Jelinek <jakub@redhat.com>
2028 * c-common.h (c_omp_predefined_variable): Declare.
2029 * c-omp.c (c_omp_predefined_variable): New function.
2030 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
2031 for predefined variables.
2033 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
2035 * c-common.h (build_function_call_vec): Take the original
2036 function decl as an optional final parameter.
2037 (check_builtin_function_arguments): Take the original function decl.
2038 * c-common.c (check_builtin_function_arguments): Likewise.
2039 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
2040 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
2042 2019-09-15 Jason Merrill <jason@redhat.com>
2044 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
2045 fold_for_warn in "|| mask" warning.
2047 2019-09-10 Martin Liska <mliska@suse.cz>
2049 * c.opt: Use newly added WarnRemoved.
2051 2019-09-09 Martin Liska <mliska@suse.cz>
2053 * c.opt: Update comment of removed
2054 options that are preserved only for backward
2057 2019-09-06 Martin Liska <mliska@suse.cz>
2060 * c-common.c: Remove definition of flag_use_repository.
2061 * c-common.h: Likewise.
2062 * c-opts.c (c_common_handle_option):
2063 Do not handle OPT_frepo option.
2064 * c.opt: Mark the option with Deprecated.
2066 2019-09-04 Marek Polacek <polacek@redhat.com>
2068 * c.opt (fdeduce-init-list): Ignored.
2070 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2073 * c.opt (Wenum-conversion): New option.
2075 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2077 * c-attribs.c (handle_section_attribute): Call the
2078 handle_generic_attribute target hook after performing target
2079 independent processing.
2080 (handle_noinit_attribute): Likewise.
2082 2019-09-03 Ian Lance Taylor <iant@golang.org>
2084 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
2085 when using -fgo-dump-spec.
2087 2019-09-02 Martin Liska <mliska@suse.cz>
2090 * c-common.c (fname_as_string): Use cxx_printable_name for
2091 __PRETTY_FUNCTION__ same as was used before r265711.
2093 2019-08-28 Marek Polacek <polacek@redhat.com>
2095 Implement P1152R4: Deprecating some uses of volatile.
2097 * c-opts.c (c_common_post_options): Enable -Wvolatile by
2098 default for C++2a, unless -Wno-deprecated.
2099 * c.opt (Wvolatile): New warning.
2101 2019-08-28 Marek Polacek <polacek@redhat.com>
2103 PR c++/91360 - Implement C++20 P1143R2: constinit.
2104 * c-common.c (c_common_reswords): Add constinit and __constinit.
2105 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
2106 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
2109 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
2110 * c-format.c (cxx_keywords): Add "constinit".
2111 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
2113 2019-08-27 Jakub Jelinek <jakub@redhat.com>
2116 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
2117 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
2118 like COMPOUND_EXPR rather than normal expression.
2120 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
2123 * c-lex.c (c_lex_with_flags): Don't call
2124 c_common_no_more_pch () from here.
2126 2019-08-23 Jakub Jelinek <jakub@redhat.com>
2129 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
2130 instead of flag_excess_precision_cmdline.
2131 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
2132 * c-opts.c (c_common_post_options): Likewise.
2134 2019-08-22 Martin Sebor <msebor@redhat.com>
2137 * c-common.c (braced_list_to_string): Add argument and overload.
2138 Handle flexible length arrays and unions.
2140 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
2142 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
2143 function declarations where arguments are missing. Rename variables.
2145 2019-08-15 Richard Biener <rguenther@suse.de>
2147 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
2148 enabled, define __SIZETYPE__.
2150 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
2152 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
2153 exclusion with "section" attribute.
2154 (attr_noinit_exclusions): New table.
2155 (handle_noinit_attribute): New function.
2157 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
2160 * c-common.c (resolve_overloaded_builtin): Use
2161 copy_decl_built_in_function.
2163 2019-08-13 Martin Sebor <msebor@redhat.com>
2166 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
2167 (asm_fprintf_length_spec): Same.
2168 * c-format.h (format_lengths): Add FMT_LEN_w.
2170 2019-08-10 Jakub Jelinek <jakub@redhat.com>
2172 * c-pragma.h (enum pragma_omp_clause): Add
2173 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
2175 2019-08-07 Jakub Jelinek <jakub@redhat.com>
2177 * c-pragma.h (enum pragma_omp_clause): Add
2178 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
2179 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
2182 2019-08-05 Marek Polacek <polacek@redhat.com>
2184 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
2185 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
2186 default for C++2a, unless -Wno-deprecated.
2187 * c.opt (Wcomma-subscript): New warning.
2189 2019-07-20 Jakub Jelinek <jakub@redhat.com>
2191 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
2192 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
2193 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
2194 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
2195 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
2196 constructs with the loop construct.
2198 2019-07-13 Jakub Jelinek <jakub@redhat.com>
2201 * c-omp.c (c_omp_split_clauses): Fix a pasto in
2202 OMP_CLAUSE_REDUCTION_TASK handling.
2204 2019-07-12 Jakub Jelinek <jakub@redhat.com>
2206 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
2207 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
2209 2019-07-09 Martin Sebor <msebor@redhat.com>
2212 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
2213 and others to class.
2214 * c-pretty-print.h: Same.
2216 2019-07-09 Martin Sebor <msebor@redhat.com>
2219 * c-format.c (check_argument_type): Change class-key from class to
2220 struct and vice versa to match convention and avoid -Wclass-is-pod
2221 and -Wstruct-no-pod.
2222 * c-pretty-print.h: Same.
2224 2019-07-03 Martin Liska <mliska@suse.cz>
2226 * c-common.c (try_to_locate_new_include_insertion_point): Remove
2229 2019-07-03 Jakub Jelinek <jakub@redhat.com>
2231 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
2232 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
2235 2019-07-02 qing zhao <qing.zhao@oracle.com>
2237 PR preprocessor/90581
2238 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
2239 * c.opt: Add new option -fmax-include-depth.
2241 2019-06-26 Jason Merrill <jason@redhat.com>
2243 PR c++/55442 - memory-hog with highly recursive constexpr.
2244 * c.opt (fconstexpr-loop-limit): New.
2246 2019-06-25 Jakub Jelinek <jakub@redhat.com>
2249 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
2250 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
2252 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
2254 * c-common.c (c_common_nodes_and_builtins): Define
2255 alternate "__intN__" name for "__intN" types.
2257 2019-06-24 Jan Hubicka <jh@suse.cz>
2259 * c-common.c (braced_lists_to_strings): Check that
2260 type is array or integer prior checking string flag.
2262 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
2264 PR c++/90875 - added -Wswitch-outside-range option
2265 * c.opt (Wswitch-outside-range): Added new option.
2266 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
2268 2019-06-21 Marek Polacek <polacek@redhat.com>
2270 PR c++/90953 - ICE with -Wmissing-format-attribute.
2271 * c-common.c (check_function_arguments_recurse): Use
2273 (check_missing_format_attribute): Likewise.
2275 2019-06-19 Marek Polacek <polacek@redhat.com>
2277 PR c++/60364 - noreturn after first decl not diagnosed.
2278 * c-attribs.c (handle_noreturn_attribute): No longer static.
2279 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
2281 * c-format.c (check_function_format): Use get_attribute_name.
2283 2019-06-19 Martin Sebor <msebor@redhat.com>
2285 PR translation/90156
2286 * c-format.c (function_format_info::format_type): Adjust type.
2287 (function_format_info::is_raw): New member.
2288 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
2289 (decode_format_attr): Adjust call to decode_format_type.
2290 Avoid a redundant call to convert_format_name_to_system_name.
2291 Avoid abbreviating the word "arguments" in a diagnostic.
2292 (format_warning_substr): New function.
2293 (avoid_dollar_number): Quote dollar sign in a diagnostic.
2294 (finish_dollar_format_checking): Same.
2295 (check_format_info): Same.
2296 (struct baltoks_t): New.
2297 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
2298 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
2300 (check_format_info_main): Call check_plain. Use baltoks_t. Call
2301 maybe_diag_unbalanced_tokens.
2302 (handle_format_attribute): Spell out the word "arguments" in
2305 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
2307 PR c++/90449 - add -Winaccessible-base option.
2308 * c.opt (Winaccessible-base): New option.
2310 2019-06-10 Jakub Jelinek <jakub@redhat.com>
2312 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
2313 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
2314 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
2315 combined/composite constructs where it is not allowed. Copy over
2316 OMP_CLAUSE_REDUCTION_INSCAN.
2318 2019-06-05 Martin Sebor <msebor@redhat.com>
2320 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
2321 (handle_alias_ifunc_attribute): Same.
2322 (handle_copy_attribute): Same.
2323 (handle_weakref_attribute): Same.
2324 (handle_nonnull_attribute): Same.
2325 * c-warn.c (warn_for_sign_compare): Same.
2326 (warn_for_restrict): Same.
2329 2019-06-05 Martin Sebor <msebor@redhat.com>
2331 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
2332 * c.opt (-Wformat-diag): Remove a spurious period.
2334 2019-05-29 Jakub Jelinek <jakub@redhat.com>
2337 * c-common.c (check_builtin_function_arguments)
2338 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
2341 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
2343 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2345 2019-05-22 Martin Liska <mliska@suse.cz>
2348 * c-attribs.c (handle_copy_attribute): Do not copy
2349 target_clones attribute.
2351 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
2353 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
2354 * c-ada-spec.c (print_assignment_operator): New function.
2355 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
2356 assignment operators declared as methods and filter out the others.
2358 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
2361 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
2362 "omp declare target".
2364 2019-05-16 Martin Sebor <msebor@redhat.com>
2366 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
2367 keywords, operators, and types in diagnostics.
2368 (handle_scalar_storage_order_attribute): Same.
2369 (handle_mode_attribute): Same.
2370 (handle_visibility_attribute): Same.
2371 (handle_assume_aligned_attribute): Same.
2372 (handle_no_split_stack_attribute): Same.
2373 * c-common.c (shorten_compare): Same.
2374 (c_common_truthvalue_conversion): Same.
2375 (cb_get_source_date_epoch): Same.
2376 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
2378 (interpret_float): Same.
2379 * c-omp.c (c_finish_omp_for): Same.
2380 * c-opts.c (c_common_post_options): Same.
2381 * c-pch.c (c_common_pch_pragma): Same.
2382 * c-pragma.c (pop_alignment): Same.
2383 (handle_pragma_pack): Same.
2384 (apply_pragma_weak): Same.
2385 (handle_pragma_weak): Same.
2386 (handle_pragma_scalar_storage_order): Same.
2387 (handle_pragma_redefine_extname): Same.
2388 (add_to_renaming_pragma_list): Same.
2389 (maybe_apply_renaming_pragma): Same.
2390 (push_visibility): Same.
2391 (handle_pragma_visibility): Same.
2392 (handle_pragma_optimize): Same.
2393 (handle_pragma_message): Same.
2394 * c-warn.c (warn_for_omitted_condop): Same.
2395 (lvalue_error): Same.
2397 2019-05-15 Richard Biener <rguenther@suse.de>
2400 * c-common.c (c_common_mark_addressable_vec): Also mark
2401 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
2404 2019-05-06 Nathan Sidwell <nathan@acm.org>
2406 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
2408 2019-04-30 Nathan Sidwell <nathan@acm.org>
2410 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
2412 2019-04-30 Martin Liska <mliska@suse.cz>
2414 * c-pragma.c (handle_pragma_diagnostic): Provide hints
2415 for unknown options.
2417 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
2419 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
2420 the pointer target rather than the pointer itself.
2422 2019-04-19 Jakub Jelinek <jakub@redhat.com>
2425 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
2427 (c_do_switch_warnings): Remove outside_range_p argument.
2428 * c-common.c (check_case_bounds): Removed.
2429 (c_add_case_label): Remove orig_type and outside_range_p arguments.
2430 Don't call check_case_bounds. Fold low_value as well as high_value.
2431 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
2432 Check for case labels outside of range of original type here and
2435 2019-04-12 Jakub Jelinek <jakub@redhat.com>
2437 PR translation/90041
2438 * c.opt (-fhandle-exceptions): Use %< and %> around option names
2439 in the Warn diagnostics.
2442 * c-attribs.c (handle_patchable_function_entry_attribute): Add
2443 function comment. Warn if arguments of the attribute are not positive
2446 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
2448 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
2449 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
2451 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
2453 * c-ada-spec.c (is_float128): New predicate extracted from...
2454 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
2455 <REAL_TYPE>: ...here. Call it.
2457 2019-04-05 David Malcolm <dmalcolm@redhat.com>
2460 * c-warn.c (check_address_or_pointer_of_packed_member): Add
2461 auto_diagnostic_group. Guard inform calls by result of
2464 2019-04-05 Marek Polacek <polacek@redhat.com>
2466 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
2467 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
2470 2019-04-03 Jason Merrill <jason@redhat.com>
2472 PR c++/86586 - -fcompare-debug=-Wsign-compare.
2473 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
2475 2019-04-01 Martin Sebor <msebor@redhat.com>
2478 * c-attribs.c (handle_copy_attribute): Handle references and
2479 non-constant expressions.
2481 2019-03-22 Jakub Jelinek <jakub@redhat.com>
2484 * c.opt (-fconstexpr-ops-limit=): New option.
2486 2019-03-21 Jakub Jelinek <jakub@redhat.com>
2488 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
2491 2019-03-19 Martin Sebor <msebor@redhat.com>
2493 PR tree-optimization/89688
2494 * c-common.c (braced_list_to_string): Make static.
2495 (braced_lists_to_strings): Define new function.
2496 * c-common.h (braced_list_to_string): Remove.
2497 (braced_lists_to_strings): Declare.
2499 2019-03-12 Martin Liska <mliska@suse.cz>
2501 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
2503 2019-03-11 Martin Liska <mliska@suse.cz>
2505 * c-opts.c (c_common_post_options): Wrap apostrophes
2506 in gcc internal format with %'.
2508 2019-03-11 Martin Liska <mliska@suse.cz>
2510 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
2511 in a string format message and fix GNU coding style.
2512 * c-common.c (vector_types_convertible_p): Likewise.
2513 (c_build_vec_perm_expr): Likewise.
2514 * c-indentation.c (get_visual_column): Likewise.
2515 * c-opts.c (c_common_handle_option): Likewise.
2516 (c_common_post_options): Likewise.
2517 (sanitize_cpp_opts): Likewise.
2518 * c-pch.c (c_common_pch_pragma): Likewise.
2519 * c-pragma.c (handle_pragma_pack): Likewise.
2521 2019-03-08 Jakub Jelinek <jakub@redhat.com>
2523 PR tree-optimization/89550
2524 * c-common.c (c_common_truthvalue_conversion): Only set
2525 TREE_NO_WARNING if warning_at returned true.
2526 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
2528 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
2529 Martin Sebor <msebor@gmail.com>
2531 * c.opt (Wmissing-attributes): Clean up doc string.
2533 2019-02-25 Jakub Jelinek <jakub@redhat.com>
2536 * c-format.c (maybe_read_dollar_number): Compute nargnum in
2537 HOST_WIDE_INT type to avoid overflows and change overflow_flag
2540 2019-02-22 Richard Biener <rguenther@suse.de>
2542 * c-pch.c (no_checksum): Remove.
2543 (pch_init): Remove assertion that executable_checksum is not
2545 (c_common_valid_pch): Likewise.
2547 2019-02-18 Martin Sebor <msebor@redhat.com>
2550 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
2552 2019-02-16 David Malcolm <dmalcolm@redhat.com>
2555 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
2556 implementing -Wtype-limits.
2558 2019-02-11 Martin Sebor <msebor@redhat.com>
2561 * c-common.c (invalid_array_size_error): New function.
2562 (valid_array_size_p): Call it. Handle size as well as type.
2563 * c-common.h (valid_constant_size_p): New function.
2564 (enum cst_size_error): New type.
2566 2019-01-31 David Malcolm <dmalcolm@redhat.com>
2569 * known-headers.cc (get_stdlib_header_for_name): Add
2570 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
2572 2019-01-31 Jakub Jelinek <jakub@redhat.com>
2575 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
2576 a C cast in pp_c_flag_gnu_v3 mode.
2578 2019-01-29 Jakub Jelinek <jakub@redhat.com>
2581 * c-common.c (c_common_nodes_and_builtins): Build type variants for
2582 builtin_structptr_types types even for C.
2584 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2586 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
2587 when rhs is of array type correctly. Fix handling of nested structures.
2588 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
2589 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
2590 type casts within nested compound expressions.
2592 2019-01-22 Jakub Jelinek <jakub@redhat.com>
2595 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
2596 variable after using BIT_FIELD_REF.
2598 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
2602 * c-common.h (warn_for_address_or_pointer_of_packed_member):
2603 Remove the boolean argument.
2604 * c-warn.c (check_address_of_packed_member): Renamed to ...
2605 (check_address_or_pointer_of_packed_member): This. Also
2606 warn pointer conversion.
2607 (check_and_warn_address_of_packed_member): Renamed to ...
2608 (check_and_warn_address_or_pointer_of_packed_member): This.
2609 Also warn pointer conversion.
2610 (warn_for_address_or_pointer_of_packed_member): Remove the
2611 boolean argument. Don't check pointer conversion here.
2613 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
2616 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
2618 2019-01-14 Jakub Jelinek <jakub@redhat.com>
2620 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
2621 and __cpp_nontype_template_parameter_auto. Add a comment that
2622 __cpp_template_auto is deprecated.
2624 2019-01-14 Tom Honermann <tom@honermann.net>
2626 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
2627 * c-common.c (c_common_reswords): Add char8_t.
2628 (fix_string_type): Use char8_t for the type of u8 string literals.
2629 (c_common_get_alias_set): char8_t doesn't alias.
2630 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
2632 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
2633 (keyword_begins_type_specifier): Add RID_CHAR8.
2634 * c-common.h (rid): Add RID_CHAR8.
2635 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
2636 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
2637 Define char8_type_node and char8_array_type_node.
2638 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
2639 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
2640 (c_cpp_builtins): Predefine __cpp_char8_t.
2641 * c-lex.c (lex_string): Use char8_array_type_node as the type of
2643 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
2644 * c-opts.c: If not otherwise specified, enable -fchar8_t when
2646 * c.opt: Add the -fchar8_t command line option.
2648 2019-01-14 Martin Sebor <msebor@redhat.com>
2651 * c-attribs.c (positional_argument): Call valid_format_string_type_p
2652 and issue errors if it fails.
2653 * c-common.h (valid_format_string_type_p): Declare.
2654 * c-format.c (valid_stringptr_type_p): Rename...
2655 (valid_format_string_type_p): ...to this and make extern.
2656 (handle_format_arg_attribute): Adjust to new name.
2657 (check_format_string): Same.
2659 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
2661 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
2662 Replace "may may" with "may" in warning message.
2664 2019-01-07 Jakub Jelinek <jakub@redhat.com>
2667 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
2668 (c_build_vec_convert): Declare.
2669 * c-common.c (c_build_vec_convert): New function.
2671 2019-01-04 Martin Sebor <msebor@redhat.com>
2674 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
2675 Handle C++ empty throw specification and C11 _Noreturn.
2676 (has_attribute): Also handle C11 _Noreturn.
2678 2019-01-04 Martin Sebor <msebor@redhat.com>
2681 * c-attribs.c (positional_argument): Also accept enumerated types.
2683 2019-01-01 Jakub Jelinek <jakub@redhat.com>
2685 Update copyright years.
2687 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
2690 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
2691 * c-warn.c (check_alignment_of_packed_member): New function.
2692 (check_address_of_packed_member): Likewise.
2693 (check_and_warn_address_of_packed_member): Likewise.
2694 (warn_for_address_or_pointer_of_packed_member): Likewise.
2695 * c.opt: Add -Wno-address-of-packed-member.
2697 2018-12-20 David Malcolm <dmalcolm@redhat.com>
2700 * c-warn.c (get_outermost_macro_expansion): New function.
2701 (spelled_the_same_p): Use it to unwind the macro expansions, and
2702 compare the outermost macro in each nested expansion, rather than
2705 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2708 * c-common.h (warn_tautological_cmp): Convert 1st param from
2709 location_t to const op_location_t &.
2710 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
2711 when testing for INTEGER_CST.
2712 (warn_tautological_bitwise_comparison): Convert 1st param from
2713 location_t to const op_location_t &; use it to build a
2714 binary_op_rich_location, and use this.
2715 (spelled_the_same_p): New function.
2716 (warn_tautological_cmp): Convert 1st param from location_t to
2717 const op_location_t &. Warn for macro expansions if
2718 spelled_the_same_p. Use binary_op_rich_location.
2720 2018-12-19 David Malcolm <dmalcolm@redhat.com>
2724 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
2725 (verify_tree): Handle location wrappers.
2726 (c_common_truthvalue_conversion): Strip any location wrapper.
2728 (fold_offsetof): Strip any location wrapper.
2729 (complete_array_type): Likewise for initial_value.
2730 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
2731 index before checking for INTEGER_CST.
2732 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
2733 print parentheses around location wrappers.
2734 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
2735 before checking for INTEGER_CST.
2736 (warn_tautological_bitwise_comparison): Call
2737 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
2738 before checking for INTEGER_CST.
2739 (readonly_error): Strip any location wrapper.
2740 (warn_array_subscript_with_type_char): Strip location wrappers
2741 before checking for INTEGER_CST. Use the location of the index if
2744 2018-12-06 Jason Merrill <jason@redhat.com>
2746 PR c++/88136 - -Wdeprecated-copy false positives
2747 * c.opt (Wdeprecated-copy-dtor): New.
2748 (Wdeprecated-copy): Move to -Wextra.
2750 2018-11-29 Martin Sebor <msebor@redhat.com>
2754 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
2755 alignments to values less than the target requires.
2756 (has_attribute): For attribute aligned consider both the attribute
2757 and the alignment bits.
2758 * c-common.c (c_init_attributes): Optionally issue a warning for
2761 2018-11-28 Martin Sebor <msebor@redhat.com>
2765 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
2766 or destination is an error.
2768 2018-11-28 Jakub Jelinek <jakub@redhat.com>
2771 * c-ubsan.c: Include langhooks.h.
2772 (ubsan_instrument_division): Change gcc_assert that main variants
2773 of op0 and op1 types are equal to gcc_checking_assert that the
2774 main variants are compatible types.
2776 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
2778 * c-ada-spec.c: Include stringpool.h.
2779 (has_static_fields): Return false for incomplete types.
2780 (is_tagged_type): Likewise.
2781 (has_nontrivial_methods): Likewise.
2782 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
2783 (struct overloaded_name_hash): New structure.
2784 (struct overloaded_name_hasher): Likewise.
2785 (overloaded_names): New global variable.
2786 (init_overloaded_names): New static function.
2787 (overloaded_name_p): New predicate.
2788 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
2789 on the TYPE_STUB_DECL of the original type of a typedef, if any.
2790 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
2791 Remove always-true condition and dump forward types.
2792 (dump_ada_specs): Delete overloaded_names.
2794 2018-11-20 Martin Sebor <msebor@redhat.com>
2796 * c-attribs.c (type_for_vector_size): New function.
2797 (type_valid_for_vector_size): Same.
2798 (handle_vector_size_attribute): Move code to the functions above
2800 (validate_attribute, has_attribute): New functions.
2801 * c-common.h (has_attribute): Declare.
2802 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
2803 * c-common.c (c_common_resword): Same.
2805 2018-11-16 Jason Merrill <jason@redhat.com>
2807 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
2808 * c-attribs.c (attr_cold_hot_exclusions): Make public.
2810 2018-11-16 Jakub Jelinek <jakub@redhat.com>
2813 * c-common.c (fix_string_type): Reject string literals larger than
2814 TYPE_MAX_VALUE (ssizetype) bytes.
2816 2018-11-15 Martin Sebor <msebor@redhat.com>
2820 * c-attribs.c (positional_argument): New function.
2821 (handle_alloc_size_attribute): Use it and simplify.
2822 (handle_alloc_align_attribute): Same.
2823 (handle_assume_aligned_attribute): Same.
2824 (handle_nonnull_attribute): Same.
2825 * c-common.c (check_function_arguments): Pass fntype to
2826 check_function_format.
2827 * c-common.h (check_function_format): Add an argument.
2828 (PosArgFlags, positional_argument): Declare new type and function.
2829 * c-format.c (decode_format_attr): Add arguments.
2830 (check_format_string, get_constant): Same.
2831 (convert_format_name_to_system_name): Adjust.
2833 2018-11-15 David Malcolm <dmalcolm@redhat.com>
2836 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
2838 2018-11-14 Jakub Jelinek <jakub@redhat.com>
2840 P1236R1 - Signed integers are two's complement
2841 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
2842 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
2843 with in-range second operand well defined for -std=c++2a.
2846 * c-common.c (parse_optimize_options): Allocate option string from
2847 opts_obstack rather than as GC memory. Move the allocation after
2848 warning for invalid option.
2850 2018-11-13 David Malcolm <dmalcolm@redhat.com>
2852 * c-common.c (c_get_substring_location): Update for renaming of
2853 get_source_location_for_substring to get_location_within_string.
2854 * c-lex.c: Replace "source_location" with "location_t".
2855 * c-opts.c: Likewise.
2856 * c-ppoutput.c: Likewise.
2858 2018-11-13 Martin Sebor <msebor@redhat.com>
2861 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
2862 (handle_tls_model_attribute): Improve diagnostics.
2864 2018-11-12 Jason Merrill <jason@redhat.com>
2866 * c-cppbuiltin.c (c_cpp_builtins): Define
2867 __cpp_impl_destroying_delete.
2869 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
2870 __cpp_conditional_explicit.
2872 2018-11-09 Martin Sebor <msebor@redhat.com>
2875 * c-attribs.c (handle_copy_attribute): New function.
2877 2018-11-09 Martin Sebor <msebor@redhat.com>
2880 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
2882 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2884 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
2885 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2886 enum omp_memory_order MEMORY_ORDER.
2887 (c_finish_omp_flush): Add MO argument.
2888 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
2889 (c_finish_omp_for): Add FINAL_P argument.
2890 * c-omp.c: Include memmodel.h.
2891 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
2892 OMP_TASKGROUP_CLAUSES to it.
2893 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
2894 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
2895 instead of OMP_ATOMIC_SEQ_CST.
2896 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
2897 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
2898 __atomic_thread_fence call with the given value.
2899 (check_omp_for_incr_expr): Formatting fixes.
2900 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
2901 even in OpenMP loops, diagnose if NE_EXPR and incr expression
2902 is not constant expression 1 or -1. Transform NE_EXPR loops
2903 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
2904 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
2906 (c_omp_split_clauses): Add support for combined
2907 #pragma omp parallel master and
2908 #pragma omp {,parallel }master taskloop{, simd} constructs.
2909 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
2910 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
2911 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2912 (c_omp_predetermined_sharing): Don't return
2913 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
2914 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
2915 PRAGMA_OMP_REQUIRES.
2916 * c-pragma.h (enum pragma_kind): Likewise.
2917 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
2918 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
2920 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2922 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
2924 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2926 * c-format.c (local_cgraph_node_ptr_node): New variable.
2927 (gcc_dump_printf_char_table): Add entry for %C.
2928 (get_pointer_to_named_type): New function, taken from the handling
2929 code for "gimple *" from...
2930 (init_dynamic_diag_info): ...here. Add handling for
2932 * c-format.h (T_CGRAPH_NODE): New.
2934 2018-10-19 Jason Merrill <jason@redhat.com>
2936 * c-cppbuiltin.c (c_cpp_builtins): Add
2937 __cpp_nontype_template_parameter_class.
2939 2018-10-31 Nathan Sidwell <nathan@acm.org>
2941 * c-opts.c (c_finish_options): Force command line macro
2942 location. Refactor to avoid repeating main debug hook.
2943 (push_command_line_include): Clarify comment.
2945 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
2947 2018-10-30 Martin Sebor <msebor@redhat.com>
2950 * c-format.c (check_format_types): Avoid diagnosing null pointer
2951 arguments to printf-family of functions.
2953 2018-10-30 Marek Polacek <polacek@redhat.com>
2955 Implement P0892R2, explicit(bool).
2956 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
2958 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2960 * name-hint.h (name_hint::take_deferred): New member function.
2962 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2965 * c-common.c (check_function_sentinel): Call fold_for_warn on the
2967 (check_function_restrict): Rename param "argarray" to
2968 "unfolded_argarray", and make a copy named "argarray", calling
2969 fold_for_warn on each argument.
2970 (check_function_arguments): Add note about responsibility for
2971 folding the arguments.
2973 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2975 * c-common.c (flag_isoc2x): New variable.
2976 * c-common.h (clk_c): Update comment to reference C2X.
2977 (flag_isoc99, flag_isoc11): Update comments to reference future
2978 standard versions in general.
2979 (flag_isoc2x): Declare.
2980 * c-opts.c (set_std_c2x): New function.
2981 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
2982 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
2984 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
2986 2018-10-17 Joseph Myers <joseph@codesourcery.com>
2988 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
2989 (std=iso9899:2018): Document C17 as published in 2018.
2991 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
2994 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
2996 2018-10-11 Will Wray <wjwray@gmail.com>
2999 * c-pretty-print.h (pp_c_type_cast): Prototype.
3000 (pp_c_integer_constant): Likewise.
3001 * c-pretty-print.c (pp_c_type_cast): No longer static.
3002 (pp_c_integer_constant): Likewise.
3003 (pp_c_enumeration_constant): Fix loop termination when finding
3004 name of constant. No longer returns a value. Call
3005 pp_c_integer_constant.
3006 (c_pretty_printer::constant): Update for changes to
3007 pp_c_enumeration_constant.
3009 2018-10-11 Jakub Jelinek <jakub@redhat.com>
3011 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
3012 for no_unique_address.
3014 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3016 * c-common.c (c_option_controlling_cpp_error): Rename to...
3017 (c_option_controlling_cpp_diagnostic): ...this, and convert
3018 "reason" from int to enum.
3019 (c_cpp_error): Rename to...
3020 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3021 * c-common.h (c_cpp_error): Rename to...
3022 (c_cpp_diagnostic): ...this, converting level and reason to enums.
3023 * c-opts.c (c_common_init_options): Update for renaming.
3025 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
3028 * c-common.c (vector_types_compatible_elements_p): Use
3029 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
3031 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
3033 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
3034 to generate constructor destructor priority warning.
3035 * c.opt (-Wprio-ctor-dtor): New option.
3037 2018-10-01 Jason Merrill <jason@redhat.com>
3039 * c-lex.c (c_common_has_attribute): Add no_unique_address.
3041 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
3043 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
3044 (dump_ada_node): Add const keyword.
3046 2018-09-25 Martin Liska <mliska@suse.cz>
3048 * c-common.c (c_common_truthvalue_conversion):
3049 Remove Pascal from documentation.
3051 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
3053 * c-ada-spec.c: Include diagnostic.h.
3054 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
3056 2018-09-19 Marek Polacek <polacek@redhat.com>
3058 * c.opt (Wclass-conversion): New.
3060 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3062 * c-format.c (range_label_for_format_type_mismatch::get_text):
3063 Update for new param.
3065 2018-09-17 David Malcolm <dmalcolm@redhat.com>
3067 * c-format.c (format_warning_at_char): Update for introduction of
3068 format_string_diagnostic_t.
3069 (format_type_warning): Likewise.
3071 2018-09-17 Martin Jambor <mjambor@suse.cz>
3074 * c.opt (Wabsolute-value): New.
3076 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
3078 * c-common.c (complete_flexible_array_elts): New helper function.
3079 * c-common.h (complete_flexible_array_elts): Declare.
3081 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3083 * c-common.c (braced_list_to_string): Remove eval parameter.
3084 Add some more checks. Always create zero-terminated STRING_CST.
3085 * c-common.h (braced_list_to_string): Adjust prototype.
3087 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3090 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
3092 (maybe_suggest_missing_token_insertion): Likewise.
3093 (maybe_add_include_fixit): Add param "override_location". If set,
3094 and source-printing is enabled, then override the rich_location's
3095 primary location with that of the insertion point for the fix-it
3096 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
3097 * c-common.h (extern void maybe_add_include_fixit): Add bool
3099 * c-format.c (selftest::test_type_mismatch_range_labels): Update
3100 for conversion of show_caret_p to a tri-state.
3101 * c-warn.c (warn_for_restrict): Likewise.
3103 (suggest_missing_header::~suggest_missing_header): Update call to
3104 maybe_add_include_fixit to suggest overriding the location, as it
3107 2018-08-27 Martin Liska <mliska@suse.cz>
3109 * c-common.c (check_function_restrict): Use new function
3110 fndecl_built_in_p and remove check for FUNCTION_DECL if
3112 (check_builtin_function_arguments): Likewise.
3113 (reject_gcc_builtin): Likewise.
3114 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
3116 2018-08-26 Marek Polacek <polacek@redhat.com>
3118 PR c++/87029, Implement -Wredundant-move.
3119 * c.opt (Wredundant-move): New option.
3121 2018-08-21 Marek Polacek <polacek@redhat.com>
3123 PR c++/86981, Implement -Wpessimizing-move.
3124 * c.opt (Wpessimizing-move): New option.
3126 2018-08-20 David Malcolm <dmalcolm@redhat.com>
3129 * c-attribs.c (common_handle_aligned_attribute): Add
3130 auto_diagnostic_group instance.
3131 * c-indentation.c (warn_for_misleading_indentation): Likewise.
3132 * c-opts.c (c_common_post_options): Likewise.
3133 * c-warn.c (warn_logical_not_parentheses): Likewise.
3134 (warn_duplicated_cond_add_or_warn): Likewise.
3135 (warn_for_multistatement_macros): Likewise.
3137 2018-08-20 Nathan Sidwell <nathan@acm.org>
3139 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
3142 2018-08-17 Nathan Sidwell <nathan@acm.org>
3144 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
3146 (laxy_hex_fp_value_count): Make unsigned.
3147 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
3148 manipulate the macro.
3149 (builtin_defin_with_hex_fp_value): Adjust callback name, use
3152 2018-08-17 David Malcolm <dmalcolm@redhat.com>
3154 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
3155 (gcc_dump_printf_length_specs): New.
3156 (gcc_dump_printf_flag_pairs): New.
3157 (gcc_dump_printf_flag_specs): New.
3158 (gcc_dump_printf_char_table): New.
3159 (format_types_orig): Add entry for "gcc_dump_printf".
3160 (init_dynamic_diag_info): Set up length_char_specs and
3161 conversion_specs for gcc_dump_printf_format_type.
3162 (handle_format_attribute): Handle gcc_dump_printf_format_type.
3164 2018-08-17 Nathan Sidwell <nathan@acm.org>
3166 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
3168 * c-ada-spec.c: Don't #include "cpp-id-data.h"
3169 * c-cppbuiltin.c: Likewise.
3171 2018-08-17 Martin Liska <mliska@suse.cz>
3173 * c.opt: Remove Warn, Init and Report for options with
3174 Ignore/Deprecated flag. Warning is done automatically for
3177 2018-08-16 David Malcolm <dmalcolm@redhat.com>
3180 * c-common.c (selftest::c_family_tests): Call
3181 selftest::c_indentation_c_tests.
3182 * c-common.h (selftest::c_indentation_c_tests): New decl.
3183 * c-indentation.c: Include "selftest.h".
3184 (next_tab_stop): Add "tab_width" param, rather than accessing
3186 (get_visual_column): Likewise. Clarify comment. Bulletproof
3187 against reading past the end of the line.
3188 (get_first_nws_vis_column): Add "tab_width" param.
3189 (detect_intervening_unindent): Likewise.
3190 (should_warn_for_misleading_indentation): Read tab width from
3191 cpp_opts and pass around.
3192 (selftest::test_next_tab_stop): New test.
3193 (selftest::assert_get_visual_column_succeeds): New function.
3194 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
3195 (selftest::assert_get_visual_column_fails): New function.
3196 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
3197 (selftest::test_get_visual_column): New test.
3198 (selftest::c_indentation_c_tests): New function.
3200 2018-08-16 Nathan Sidwell <nathan@acm.org>
3202 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
3203 (store_ada_macro): Likewise.
3204 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
3205 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
3207 2018-08-15 David Malcolm <dmalcolm@redhat.com>
3209 * c-format.c: Include "selftest-diagnostic.h" and
3210 "gcc-rich-location.h".
3211 (format_warning_at_char): Pass NULL for new label params of
3213 (class indirection_suffix): New class.
3214 (class range_label_for_format_type_mismatch): New class.
3215 (format_type_warning): Move logic for generating "*" suffix to
3216 class indirection_suffix. Create "fmt_label" and "param_label"
3217 to show their types, and pass them to the
3218 format_warning_at_substring calls.
3219 (selftest::test_type_mismatch_range_labels): New test.
3220 (selftest::c_format_c_tests): Call it.
3222 2018-08-13 Martin Sebor <msebor@redhat.com>
3224 PR tree-optimization/71625
3225 * c-common.c (braced_list_to_string): New function.
3226 * c-common.h (braced_list_to_string): Declare it.
3228 2018-08-08 Nathan Sidwell <nathan@acm.org>
3230 * c-common.c (try_to_locate_new_include_inertion_point): Use
3231 linemap_included_from_linemap.
3232 * c-lex.c (fe_file_change): Use linemap_included_from.
3233 * c-ppoutput.c (pp_file_change): Likewise.
3235 2018-08-01 Martin Sebor <msebor@redhat.com>
3237 PR tree-optimization/86650
3238 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
3239 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
3240 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
3241 * c-format.h (T89_G): Update to be "gimple *" rather than
3243 (local_gcall_ptr_node): Rename...
3244 (local_gimple_ptr_node): ...to this.
3246 2018-07-31 David Malcolm <dmalcolm@redhat.com>
3248 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
3249 table entries for gcc_diag_char_table, and the 'Z' entry from
3250 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
3251 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
3252 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
3253 adding missing "Z" for this table. Remove erroneous "G" and "K"
3255 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3256 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
3257 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
3259 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
3261 * c-common.c (speculation_safe_resolve_call): New function.
3262 (speculation_safe_resolve_params): New function.
3263 (speculation_safe_resolve_return): New function.
3264 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
3265 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
3266 __HAVE_SPECULATION_SAFE_VALUE.
3268 2018-07-20 David Malcolm <dmalcolm@redhat.com>
3270 * c-common.c (c_cpp_error): Remove redundant "line_table"
3271 parameter from call to rich_location::set_range.
3272 (maybe_suggest_missing_token_insertion): Likewise.
3274 2018-07-20 Martin Sebor <msebor@redhat.com>
3277 * c.opt (-Warray-bounds): Remove redundant -Wall.
3279 2018-07-20 Martin Sebor <msebor@redhat.com>
3282 * c-common.h (c_common_handle_option): Change function argument
3284 * c-opts.c (c_common_init_options): Same.
3285 (c_common_handle_option): Same. Remove special handling of
3286 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
3287 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
3288 options to take a HOST_WIDE_INT argument and accept a byte-size
3290 (-Wvla-larger-than): Same.
3291 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
3292 (-Wno-vla-larger-than): Same.
3294 2018-07-12 Jakub Jelinek <jakub@redhat.com>
3296 * c-attribs.c (c_common_attribute_table): Add
3297 "omp declare target implicit" attribute.
3299 2018-07-12 Richard Biener <rguenther@suse.de>
3302 * c-attribs.c (handle_packed_attribute): Do not build a variant
3303 type with TYPE_PACKED, instead ignore the attribute if we may
3304 not apply to the original type.
3306 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3309 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
3310 to contain TREE_LIST for both the original class iterator and the
3313 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
3315 * c-ada-spec.c (to_ada_name): Remove index parameter.
3316 (pp_ada_tree_identifier): Likewise.
3317 (dump_ada_macros): Adjust call to to_ada_name.
3318 (struct overloaded_name_hash): Delete.
3319 (struct overloaded_name_hasher): Likewise.
3320 (overloaded_names): Likewise.
3321 (compute_overloading_index): Likewise.
3322 (dump_ada_decl_name): Do not call compute_overloading_index and
3323 adjust calls to pp_ada_tree_identifier.
3324 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
3325 (dump_ada_import): Add spc parameter and switch to aspect syntax.
3326 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
3327 (dump_ada_enum_type): Remove type and display_convention parameters.
3328 Adjust calls to pp_ada_tree_identifier.
3329 (dump_ada_node): Likewise and for dump_ada_structure.
3330 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
3332 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
3334 (print_constructor): Adjust call to pp_ada_tree_identifier.
3335 (print_destructor): Likewise.
3336 (dump_ada_declaration): Switch to aspect syntax.
3337 (dump_ada_structure): Likewise and tidy up. Replace display_convention
3338 parameter with nested parameter.
3339 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
3340 (dump_ada_specs): Do not delete overloaded_names table.
3342 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
3345 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
3348 2018-07-05 Nathan Sidwell <nathan@acm.org>
3350 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
3351 NO_IMPLICIT_EXTERN_C.
3353 2018-06-28 Martin Liska <mliska@suse.cz>
3355 * cppspec.c: Include opt-suggestions.h.
3357 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
3358 Thomas Schwinge <thomas@codesourcery.com>
3359 Cesar Philippidis <cesar@codesourcery.com>
3361 * c-pragma.h (enum pragma_omp_clause): Add
3362 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
3363 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
3365 2018-06-20 Jakub Jelinek <jakub@redhat.com>
3368 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
3371 2018-06-18 Martin Sebor <msebor@redhat.com>
3374 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
3377 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
3379 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
3381 2018-06-13 Jason Merrill <jason@redhat.com>
3383 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
3384 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
3387 PR c++/86094 - wrong code with defaulted move ctor.
3388 * c-opts.c (c_common_post_options): Bump the current ABI version to
3389 13. Set warn_abi_version and flag_abi_compat_version to the current
3390 version rather than 0. Fix defaulting flag_abi_compat_version from
3393 2018-06-12 Martin Sebor <msebor@redhat.com>
3396 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
3397 sizeof source and destination yields the same value.
3399 2018-06-12 Martin Liska <mliska@suse.cz>
3401 * c.opt: Make MPX-related options as Deprecated.
3403 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3405 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
3408 2018-06-08 Martin Liska <mliska@suse.cz>
3410 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
3411 for MPX (macros, related functions, fields in cgraph_node, ...).
3412 (handle_bnd_legacy): Likewise.
3413 (handle_bnd_instrument): Likewise.
3416 2018-06-06 Jakub Jelinek <jakub@redhat.com>
3419 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
3420 __cpp_transactional_memory to 201500 instead of 210500.
3422 2018-06-06 Jason Merrill <jason@redhat.com>
3424 PR c++/85710 - ICE with -Wmemset-elt-size.
3425 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
3427 2018-06-01 Jason Merrill <jason@redhat.com>
3429 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
3432 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
3434 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
3435 declaration for a typedef independently of whether the declaration of
3436 the subtype is generated.
3438 2018-05-31 Martin Sebor <msebor@redhat.com>
3441 * c.opt (-Wno-alloc-size-larger-than): New option.
3443 2018-04-22 David Pagan <dave.pagan@oracle.com>
3446 * c-opts.c (c_common_post_options): Set default for warn_return_type
3447 for C++/C++ with ObjC extensions only. For C, makes it possible to
3448 differentiate between default (no option), -Wreturn-type, and
3451 2018-05-29 Jason Merrill <jason@redhat.com>
3453 * c.opt (Winit-list-lifetime): New flag.
3455 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3457 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
3458 splay_tree_delete_pointers.
3460 2018-05-26 Jakub Jelinek <jakub@redhat.com>
3463 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
3464 noinline variable to workaround broken kernel headers.
3466 2018-05-18 Jason Merrill <jason@redhat.com>
3468 * c.opt (Wdeprecated-copy): New flag.
3470 2018-05-17 Martin Liska <mliska@suse.cz>
3472 * c-warn.c (overflow_warning): Do not use
3473 space in between 'G_' and '('.
3475 2018-05-09 Jason Merrill <jason@redhat.com>
3477 * c-common.c (valid_array_size_p): Add complain parameter.
3478 * c-common.h: ...which defaults to true.
3480 2018-05-11 Jakub Jelinek <jakub@redhat.com>
3483 * c-omp.c (c_omp_predetermined_sharing): Return
3484 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
3486 2018-05-11 Martin Liska <mliska@suse.cz>
3489 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
3492 2018-05-10 Jakub Jelinek <jakub@redhat.com>
3495 * c-common.h (fold_offsetof_1): Removed.
3496 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
3497 CTX argument defaulted to ERROR_MARK.
3498 * c-common.c (fold_offsetof_1): Renamed to ...
3499 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
3500 argument, convert the pointer constant to TYPE and use size_binop
3501 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
3502 a pointer type. Adjust recursive calls.
3504 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
3507 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
3509 2018-05-07 Nathan Sidwell <nathan@acm.org>
3511 * c.opt (ffor-scope): Remove functionality, issue warning.
3513 2018-05-03 Nathan Sidwell <nathan@acm.org>
3515 * c.opt (ffriend-injection): Remove functionality, issue warning.
3517 2018-05-01 David Malcolm <dmalcolm@redhat.com>
3520 * c-format.c (struct format_check_results): Add field
3522 (check_format_info): Initialize it, and warn if encountered.
3523 (check_format_arg): Distinguish between wide char and
3524 everything else when detecting arrays of non-char.
3526 2018-04-30 David Malcolm <dmalcolm@redhat.com>
3528 * c-format.c (get_corrected_substring): Update for
3529 location_get_source_line returning a char_span. Use a char_span
3530 when handling the prefix of the correction.
3531 * c-indentation.c (get_visual_column): Update for
3532 location_get_source_line returning a char_span.
3533 (get_first_nws_vis_column): Likewise.
3535 2018-03-29 David Malcolm <dmalcolm@redhat.com>
3538 * known-headers.cc (get_stdlib_header_for_name): Add various names
3539 from <assert.h>, <string.h>, and <memory.h>; add more names from
3542 2018-03-27 Jakub Jelinek <jakub@redhat.com>
3545 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
3546 get_base_address of the second operand is a VAR_P, rather than the
3547 operand itself, and use gcc_checking_assert instead of gcc_assert.
3549 2018-03-23 Marek Polacek <polacek@redhat.com>
3552 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
3553 <case RDIV_EXPR>: Tweak condition.
3555 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
3557 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
3559 2018-03-16 Jakub Jelinek <jakub@redhat.com>
3562 * c-warn.c (conversion_warning): Replace "to to" with "to" in
3566 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
3569 2018-03-16 Richard Biener <rguenther@suse.de>
3572 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
3573 unshare the possibly folded expression.
3575 2018-03-15 Richard Biener <rguenther@suse.de>
3578 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
3580 2018-03-13 Martin Sebor <msebor@redhat.com>
3582 PR tree-optimization/84725
3583 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
3584 with all three narrow character types, including their qualified forms.
3586 2018-03-12 Martin Sebor <msebor@redhat.com>
3588 PR tree-optimization/83456
3589 * c-common.c (check_function_restrict): Return bool.
3590 Restore checking of bounded built-in functions.
3591 (check_function_arguments): Also return the result
3592 of warn_for_restrict.
3593 * c-common.c (check_function_restrict): Return bool.
3594 * c-warn.c (warn_for_restrict): Return bool.
3596 2018-03-02 Marek Polacek <polacek@redhat.com>
3599 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
3602 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
3604 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
3607 2018-03-01 Marek Polacek <polacek@redhat.com>
3610 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
3611 alignment in computation.
3613 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3615 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
3616 <REAL_TYPE>: Deal specifically with _Float128/__float128.
3618 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3620 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
3621 (is_char_array): Take a type instead of a declaration.
3622 (dump_ada_array_type): Likewise.
3623 (is_simple_enum): Minor tweak.
3624 (dump_ada_enum_type): New function extracted from...
3625 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
3626 <INTEGER_TYPE>: Remove unreachable code.
3627 <RECORD_TYPE>: Likewise. Minor tweaks.
3628 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
3629 <ENUMERAL_TYPE>: New case.
3630 <RECORD_TYPE>: Factor out common code.
3631 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
3632 Minor tweaks. Deal with enumeral types.
3633 (dump_ada_structure): Minor tweaks.
3635 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3637 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
3638 address for incomplete structures.
3639 (dump_forward_type): Do not bail out for incomplete structures.
3640 (dump_ada_declaration): Do not special-case incomplete structures
3641 for subtypes. Dump them as null records for types.
3643 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
3645 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
3646 (is_char_array): Fix formatting.
3647 (dump_template_types): Likewise.
3648 (dump_generic_ada_node): Rename into...
3649 (dump_ada_node): ...this.
3650 <POINTER_TYPE>: Remove superfluous space. Use generic address for
3651 incomplete structures and not for empty structures. Do not use it
3652 when forward declarations are needed.
3653 (dump_forward_type): New function.
3654 (dump_nested_types): Remove FORWARD parameter. Do not consider
3655 TREE_VISITED and do not generate a forward declaration. Only dump
3656 original nested types for nested declaration.
3657 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
3658 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
3659 <RECORD_TYPE>: Do not consider TREE_VISITED.
3660 (dump_ada_declaration): Use booleans and fix formatting throughout.
3661 <TYPE_DECL>: Skip incomplete structures and not empty structures.
3662 Call dump_forward_type instead of dump_nested_types for a typedef.
3663 Remove superfluous check and adjust call to dump_nested_types.
3664 <POINTER_TYPE>: Call dump_forward_type and fall through.
3665 (dump_ada_struct_decl): Rename into...
3666 (dump_ada_structure): ...this. Do not special-case empty structures.
3668 2018-02-27 Martin Sebor <msebor@redhat.com>
3671 * c.opt (-Wmissing-attributes): New option.
3673 2018-02-21 Martin Liska <mliska@suse.cz>
3675 * c.opt (Wcatch-value=): Add IntegerRange.
3677 2018-02-15 Jason Merrill <jason@redhat.com>
3679 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3681 2018-02-09 Nathan Sidwell <nathan@acm.org>
3684 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
3686 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
3689 2018-02-09 Martin Sebor <msebor@redhat.com>
3692 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
3693 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
3694 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
3695 (-Wstrict-overflow, -Wsuggest-attribute): Same.
3696 (-Wuninitialized): Same.
3698 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
3700 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
3701 keyword for components.
3703 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
3705 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
3707 2018-02-02 Julia Koval <julia.koval@intel.com>
3709 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
3711 2018-01-29 Marek Polacek <polacek@redhat.com>
3714 * c-format.c (check_function_format): Check current_function_decl.
3716 2018-01-27 Jakub Jelinek <jakub@redhat.com>
3718 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
3720 (LAZY_HEX_FP_VALUES_CNT): Define.
3721 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
3722 values rather than just 12.
3723 (builtin_define_with_hex_fp_value): Likewise.
3725 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
3728 * c.opt (-fmacro-prefix-map): New option.
3729 * c-opts.c (c_common_handle_option): Handle it.
3730 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
3731 * c-ppoutput.c (init_pp_output): Likewise.
3733 2018-01-17 David Malcolm <dmalcolm@redhat.com>
3736 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
3738 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
3740 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
3741 Skip 'f' and 'F' characters if it is true.
3742 (store_ada_macro): Minor tweak.
3743 (dump_ada_macros) <CPP_COMMENT>: Likewise.
3744 <CPP_WSTRING>: Likewise.
3745 <CPP_STRING>: Output '&' in the buffer if not the first string.
3746 <CPP_NUMBER>: Adjust calls to dump_number.
3748 2018-01-10 David Malcolm <dmalcolm@redhat.com>
3751 * c-common.c: Include "selftest.h".
3752 (get_atomic_generic_size): Perform the test for integral type
3753 before the range test for any integer constant, fixing indentation
3754 of braces. Call fold_for_warn before testing for an INTEGER_CST.
3755 (reject_gcc_builtin): Strip any location wrapper from EXPR.
3756 (selftest::test_fold_for_warn): New function.
3757 (selftest::c_common_c_tests): New function.
3758 (selftest::c_family_tests): Call it, and
3759 selftest::c_pretty_print_c_tests.
3760 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
3761 * c-format.c (check_format_arg): Convert VAR_P check to a
3763 * c-pretty-print.c: Include "selftest.h".
3764 (pp_c_cast_expression): Don't print casts for location wrappers.
3765 (selftest::assert_c_pretty_printer_output): New function.
3766 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
3767 (selftest::test_location_wrappers): New function.
3768 (selftest::c_pretty_print_c_tests): New function.
3769 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
3771 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3772 Alan Hayward <alan.hayward@arm.com>
3773 David Sherwood <david.sherwood@arm.com>
3775 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
3777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3778 Alan Hayward <alan.hayward@arm.com>
3779 David Sherwood <david.sherwood@arm.com>
3781 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
3784 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
3785 Alan Hayward <alan.hayward@arm.com>
3786 David Sherwood <david.sherwood@arm.com>
3788 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
3789 (convert_vector_to_array_for_subscript): Handle polynomial
3790 TYPE_VECTOR_SUBPARTS.
3791 (c_common_type_for_mode): Check valid_vector_subparts_p.
3792 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
3795 2018-01-03 Jakub Jelinek <jakub@redhat.com>
3797 Update copyright years.
3799 2017-12-22 Mike Stump <mikestump@comcast.net>
3800 Eric Botcazou <ebotcazou@adacore.com>
3802 * c-pragma.c (init_pragma): Register pragma GCC unroll.
3803 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
3805 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
3809 * c-semantics.c (only_debug_stmts_after_p): New.
3810 (pop_stmt_list): Clear side effects in debug-only stmt list.
3811 Check for single nondebug stmt followed by debug stmts only.
3813 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
3816 * c-semantics.c (pop_stmt_list): Propagate side effects from
3817 single nondebug stmt to container list.
3819 2017-12-19 Jakub Jelinek <jakub@redhat.com>
3821 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
3822 conditions with typical order conditions.
3824 2017-12-18 Marek Polacek <polacek@redhat.com>
3826 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
3829 2017-12-17 Martin Sebor <msebor@redhat.com>
3831 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
3832 an error for attribute warn_if_not_aligned.
3834 2017-12-16 Martin Sebor <msebor@redhat.com>
3836 PR tree-optimization/78918
3837 * c-common.c (check_function_restrict): Avoid checking built-ins.
3838 * c.opt (-Wrestrict): Include in -Wall.
3840 2017-12-15 Jakub Jelinek <jakub@redhat.com>
3842 * c-attribs.c (c_common_attribute_table,
3843 c_common_format_attribute_table): Swap affects_type_identity
3844 and handler fields, adjust comments.
3846 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3848 * c.opt (Wcast-function-type): New warning option.
3849 * c-lex.c (get_fileinfo): Avoid warning.
3850 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
3852 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
3855 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
3856 Adjust the size of buf1 and buf2, add a new buf to avoid
3857 format-overflow warning.
3859 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
3861 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
3862 subsequent statement list.
3864 2017-12-07 Martin Sebor <msebor@redhat.com>
3868 * c-attribs.c (attr_aligned_exclusions): New array.
3869 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
3870 (attr_common_exclusions, attr_const_pure_exclusions): Same.
3871 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
3872 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
3873 (attr_warn_unused_result_exclusions): Same.
3874 (handle_hot_attribute, handle_cold_attribute): Simplify.
3875 (handle_const_attribute): Warn on function returning void.
3876 (handle_pure_attribute): Same.
3877 (handle_aligned_attribute): Diagnose conflicting attribute
3879 * c-warn.c (diagnose_mismatched_attributes): Simplify.
3881 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3884 * c-common.c (selftest::c_family_tests): Call
3885 selftest::c_spellcheck_cc_tests.
3886 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
3887 * c-spellcheck.cc: Include "selftest.h".
3888 (name_reserved_for_implementation_p): New function.
3889 (should_suggest_as_macro_p): New function.
3890 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
3891 should_suggest_as_macro_p and call it.
3892 (selftest::test_name_reserved_for_implementation_p): New function.
3893 (selftest::c_spellcheck_cc_tests): New function.
3894 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
3896 2017-12-06 David Malcolm <dmalcolm@redhat.com>
3898 * c-spellcheck.cc: New file, taken from macro-handling code in
3900 * c-spellcheck.h: New file, taken from macro-handling code in
3903 2017-12-01 Jakub Jelinek <jakub@redhat.com>
3905 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
3907 (handle_simd_attribute): Don't check for "cilk simd function"
3908 attribute. Reindent, formatting changes.
3910 2017-11-30 Julia Koval <julia.koval@intel.com>
3912 * c-common.h (inv_list): Remove.
3914 2017-11-28 Jakub Jelinek <jakub@redhat.com>
3917 * c-common.c (c_switch_covers_all_cases_p_1,
3918 c_switch_covers_all_cases_p): New functions.
3919 * c-common.h (c_switch_covers_all_cases_p): Declare.
3921 2017-11-28 Julia Koval <julia.koval@intel.com>
3922 Sebastian Peryt <sebastian.peryt@intel.com>
3924 * array-notation-common.c: Delete.
3925 * c-cilkplus.c: Ditto.
3926 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
3927 * c-common.def (ARRAY_NOTATION_REF): Remove.
3928 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
3929 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
3930 c_validate_cilk_plus_loop, cilkplus_an_parts,
3931 cilk_ignorable_spawn_rhs_op,
3932 cilk_recognize_spawn): Remove.
3933 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
3934 * c-omp.c: Remove CILK_SIMD check.
3935 * c-pragma.c: Ditto.
3936 * c-pragma.h: Remove CILK related pragmas.
3937 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
3938 ARRAY_NOTATION_REF condition.
3939 (c_pretty_printer::expression): Ditto.
3940 * c.opt (fcilkplus): Remove.
3943 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
3945 * c-pretty-print.c (pp_c_additive_expression,
3946 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
3948 2017-11-21 Jakub Jelinek <jakub@redhat.com>
3950 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
3953 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
3954 instead of tree_to_uhwi, formatting fix.
3956 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3959 * known-headers.cc: New file, based on material from c/c-decl.c.
3960 (suggest_missing_header): Copied as-is.
3961 (get_stdlib_header_for_name): New, based on get_c_name_hint but
3962 heavily edited to add C++ support. Add some knowledge about
3963 <limits.h>, <stdint.h>, and <wchar.h>.
3964 * known-headers.h: Likewise.
3966 2017-11-20 David Malcolm <dmalcolm@redhat.com>
3968 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
3969 (lookup_name_fuzzy): Likewise. Convert return type from
3970 const char * to name_hint. Add location_t param.
3971 * name-hint.h: New header.
3973 2017-11-19 Jakub Jelinek <jakub@redhat.com>
3977 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
3979 2017-11-16 Joseph Myers <joseph@codesourcery.com>
3981 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
3982 expected publication date of C17.
3983 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
3985 2017-11-15 Joseph Myers <joseph@codesourcery.com>
3988 * c-common.c (c_common_reswords): Add __builtin_tgmath.
3989 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
3991 2017-11-10 Martin Sebor <msebor@redhat.com>
3994 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
3995 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
3996 * c.opt (-Wstringop-truncation): New option.
3998 2017-11-06 Martin Liska <mliska@suse.cz>
4001 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
4003 * c.opt: Set default value of warn_return_type.
4005 2017-10-31 David Malcolm <dmalcolm@redhat.com>
4007 * c-common.c (binary_op_error): Update for renaming of
4009 (c_parse_error): Likewise.
4010 * c-warn.c (warn_logical_not_parentheses): Likewise for
4011 renaming of inform_at_rich_loc.
4012 (warn_for_restrict): Likewise for renaming of
4013 warning_at_rich_loc_n.
4015 2017-10-30 Joseph Myers <joseph@codesourcery.com>
4017 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
4018 * c-opts.c (set_std_c17): New function.
4019 (c_common_init_options): Use gnu17 as default C version.
4020 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
4022 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
4024 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
4025 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
4026 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
4029 2017-10-23 Marek Polacek <polacek@redhat.com>
4032 * c-warn.c (warnings_for_convert_and_check): Fix typos.
4034 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
4036 * c-common.c (check_builtin_function_arguments): Also check arguments
4037 of __builtin_alloca_with_align_and_max.
4039 2017-10-17 David Malcolm <dmalcolm@redhat.com>
4041 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
4042 rather than NULL to format_warning_va.
4043 (check_format_types): Likewise when calling format_type_warning.
4044 Remove code to extract source_ranges and source_range * in favor
4045 of just a location_t.
4046 (format_type_warning): Convert source_range * param to a
4049 2017-10-13 Jakub Jelinek <jakub@redhat.com>
4051 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
4054 2017-10-12 David Malcolm <dmalcolm@redhat.com>
4056 * c-common.c (enum missing_token_insertion_kind): New enum.
4057 (get_missing_token_insertion_kind): New function.
4058 (maybe_suggest_missing_token_insertion): New function.
4059 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
4061 2017-10-11 Nathan Sidwell <nathan@acm.org>
4063 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
4064 (c_common_handle_option): Update incpath_kind names.
4066 2017-10-11 Martin Liska <mliska@suse.cz>
4069 * c-attribs.c (handle_no_sanitize_attribute): Report directly
4070 Wattributes warning.
4072 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
4074 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
4075 operating on trees as wide_ints.
4076 * c-common.c (pointer_int_sum): Likewise.
4077 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4078 * c-warn.c (match_case_to_enum_1): Likewise.
4079 (c_do_switch_warnings): Likewise.
4080 (maybe_warn_shift_overflow): Likewise.
4082 2017-10-10 Jakub Jelinek <jakub@redhat.com>
4085 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
4086 instead of wide_int::from.
4088 2017-10-06 Jakub Jelinek <jakub@redhat.com>
4091 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
4092 using to_widest use wide_int with the larger of the two precisions.
4094 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
4096 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
4099 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
4101 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
4102 when combining the original unconverted comparison operands.
4104 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4106 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
4109 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4111 * c-ada-spec.c (to_ada_name): Add index parameter.
4112 (pp_ada_tree_identifier): Likewise.
4113 (dump_ada_macros): Adjust call to to_ada_name.
4114 (struct overloaded_name_hash): New type.
4115 (struct overloaded_name_hasher): Likewise.
4116 (overloaded_names): New hash table.
4117 (compute_overloading_index): New function.
4118 (dump_ada_decl_name): Call it and pass the result to
4119 pp_ada_tree_identifier.
4120 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4121 (dump_ada_function_declaration): Likewise.
4122 (dump_generic_ada_node): Likewise.
4123 (print_constructor): Likewise.
4124 (print_destructor): Likewise.
4125 (dump_ada_specs): Delete overloaded_names table.
4127 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
4129 * c-ada-spec.c (max_ada_macros): Move around.
4130 (store_ada_macro_index): Likewise.
4131 (source_file): Rename into...
4132 (macro_source_file): ...this.
4133 (count_ada_macro): Move around.
4134 (store_ada_macro): Likewise.
4135 (compare_macro): Likewise.
4136 (print_ada_macros): Merge in...
4137 (dump_ada_macros): ...this.
4138 (source_file_base): Rename into...
4139 (current_source_file): ...this.
4140 (print_comment): Move around.
4141 (dump_ada_nodes): Call dump_ada_declaration directly.
4142 (struct with): Change type of limited field to bool.
4143 (append_withs): Change type of limited_access parameter to bool.
4144 (pp_ada_tree_identifie): Likewise.
4145 (dump_ada_decl_nam): Likewise.
4146 (dump_generic_ada_node): Likewise. Do not print the return type.
4147 (to_ada_name): Change type of space_found parameter to bool.
4148 (dump_ada_function_declaration): Return void and change type of
4149 parameters to bool. Also print the return type for a function.
4150 (print_ada_methods): Rename into...
4151 (dump_ada_methods): ...this.
4152 (print_ada_declaration): Rename into ...
4153 (dump_ada_declaration): ...this. Do not print the return type.
4154 (print_ada_struct_decl): Rename into...
4155 (dump_ada_struct_decl): ...this.
4157 2017-09-29 Jakub Jelinek <jakub@redhat.com>
4159 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
4160 rather than DECL_INITIAL.
4161 (common_handle_aligned_attribute): Likewise.
4163 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
4165 * c.opt (gen-decls): Add RejectNegative.
4167 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
4168 Jakub Jelinek <jakub@redhat.com>
4170 Add support for -std=c++2a.
4171 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
4172 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
4173 * c-opts.c (set_std_cxx2a): New.
4174 (c_common_handle_option): Set options when -std=c++2a is enabled.
4175 (c_common_post_options): Adjust comments.
4176 (set_std_cxx14, set_std_cxx17): Likewise.
4178 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
4180 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
4181 message for non-uniform endianness and issue a warning in C++.
4183 2017-09-15 Jakub Jelinek <jakub@redhat.com>
4185 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
4186 (Wc++17-compat): Change from undocumented alias to option.
4187 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
4188 change C++1z to C++17 in description.
4189 (std=c++1z, std=gnu++1z): Change from option to undocumented
4191 (std=c++17, std=gnu++17): Change from undocumented alias to option.
4193 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
4194 * c-opts.c (set_std_cxx1z): Rename to ...
4195 (set_std_cxx17): ... this.
4196 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
4197 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
4199 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
4202 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
4204 * c-attribs.c (common_handle_aligned_attribute): Don't warn
4205 function alignment if warn_if_not_aligned_p is true.
4207 2017-09-12 Nathan Sidwell <nathan@acm.org>
4209 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
4210 resort_sorted_fields): Move to c/c-decl.c.
4211 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
4212 (struct sorted_fields_type): Move to c/c-lang.h.
4214 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
4217 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
4219 2017-09-04 Marek Polacek <polacek@redhat.com>
4222 * c-warn.c (warn_tautological_bitwise_comparison): New function.
4223 (warn_tautological_cmp): Call it.
4225 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
4227 * c-opts.c (c_common_finish): Write dependency information even if
4230 2017-09-01 Jakub Jelinek <jakub@redhat.com>
4233 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
4234 (omp_pragmas_simd): ... here.
4235 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
4236 create new clauses list containing just simd clause.
4238 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4239 Alan Hayward <alan.hayward@arm.com>
4240 David Sherwood <david.sherwood@arm.com>
4242 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
4243 into scalar_mode_supported_p call.
4244 (handle_mode_attribute): Update call to scalar_mode_supported_p.
4246 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4247 Alan Hayward <alan.hayward@arm.com>
4248 David Sherwood <david.sherwood@arm.com>
4250 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
4251 for the mode iterator.
4253 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4254 Alan Hayward <alan.hayward@arm.com>
4255 David Sherwood <david.sherwood@arm.com>
4257 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
4258 * c-common.c (c_build_vec_perm_expr): Likewise.
4260 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4261 Alan Hayward <alan.hayward@arm.com>
4262 David Sherwood <david.sherwood@arm.com>
4264 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
4266 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4267 Alan Hayward <alan.hayward@arm.com>
4268 David Sherwood <david.sherwood@arm.com>
4270 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
4271 before calling targetm.addr_space.valid_pointer_mode.
4273 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4274 Alan Hayward <alan.hayward@arm.com>
4275 David Sherwood <david.sherwood@arm.com>
4277 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
4279 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4280 Alan Hayward <alan.hayward@arm.com>
4281 David Sherwood <david.sherwood@arm.com>
4283 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
4285 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
4287 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
4288 Alan Hayward <alan.hayward@arm.com>
4289 David Sherwood <david.sherwood@arm.com>
4291 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
4294 2017-08-29 Martin Liska <mliska@suse.cz>
4297 * c-common.c (parse_optimize_options): Add argument to function
4299 * c-pragma.c (handle_pragma_diagnostic): Likewise.
4301 2017-08-24 David Malcolm <dmalcolm@redhat.com>
4303 * c-lex.c (interpret_float): Use token location
4304 when building an EXCESS_PRECISION_EXPR.
4306 2017-08-21 David Malcolm <dmalcolm@redhat.com>
4308 * c-common.c (check_function_arguments): Add "arglogs" param; pass
4309 it to check_function_format.
4310 * c-common.h (check_function_arguments): Add vec<location_t> *
4312 (check_function_format): Likewise.
4313 * c-format.c (struct format_check_context): Add field "arglocs".
4314 (check_function_format): Add param "arglocs"; pass it to
4316 (check_format_info): Add param "arglocs"; use it to initialize
4317 new field of format_ctx.
4318 (check_format_arg): Pass format_ctx->arglocs to new param of
4319 check_format_info_main.
4320 (class argument_parser): New field "arglocs".
4321 (argument_parser::argument_parser): Add "arglocs_" param and use
4322 it to initialize new field.
4323 (argument_parser::check_argument_type): Pass new arglocs field to
4325 (check_format_info_main): Add param "arglocs", and use it when
4326 constructing arg_parser.
4327 (check_format_types): Add param "arglocs"; use it if non-NULL when
4328 !EXPR_HAS_LOCATION (cur_param) to get at location information.
4330 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
4333 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
4334 (c_common_attribute_table): Add warn_if_not_aligned.
4335 (handle_aligned_attribute): Renamed to ...
4336 (common_handle_aligned_attribute): Remove argument, name, and add
4337 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
4338 (handle_aligned_attribute): New.
4339 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
4341 2017-08-14 Martin Sebor <msebor@redhat.com>
4344 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
4345 (handle_nonstring_attribute): New function.
4347 2017-08-14 Martin Sebor <msebor@redhat.com>
4350 * c-format.h (T89_G): New macro.
4351 * c-format.c (local_gcall_ptr_node): New variable.
4352 (init_dynamic_diag_info): Initialize it.
4354 2017-08-11 Martin Liska <mliska@suse.cz>
4356 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
4357 TARGET_SUPPORTS_ALIASES.
4359 2017-08-10 David Malcolm <dmalcolm@redhat.com>
4361 * c-common.c (c_parse_error): Add rich_location * param, using it
4362 rather implicitly using input_location.
4363 * c-common.h (c_parse_error): Add rich_location * param.
4365 2017-08-09 Marek Polacek <polacek@redhat.com>
4367 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
4368 (c_common_truthvalue_conversion): Likewise.
4369 * c-omp.c (c_finish_omp_atomic): Likewise.
4370 * c-common.h (build_binary_op): Update declaration.
4372 2017-08-08 Martin Liska <mliska@suse.cz>
4374 * c-ada-spec.c: Include header files.
4375 * c-ubsan.c: Likewise.
4376 * c-warn.c: Likewise.
4378 2017-08-07 Jakub Jelinek <jakub@redhat.com>
4381 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
4383 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
4385 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
4386 (print_ada_methods): Likewise.
4387 (print_ada_declaration): Likewise.
4389 2017-08-07 Martin Liska <mliska@suse.cz>
4391 * array-notation-common.c: Add new includes.
4392 * c-format.c( handle_format_attribute): Canonicalize a format
4394 * c-lex.c (c_common_has_attribute): Canonicalize name of an
4396 * c-pretty-print.c: Add new include.
4398 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
4400 * c-ada-spec.c (has_static_fields): Look only into variables.
4401 (print_constructor): Add TYPE parameter and use it for the name.
4402 (print_destructor): Likewise.
4403 (print_ada_declaration): Adjust to new constructor/destructor names.
4404 Adjust calls to print_constructor and print_destructor.
4405 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
4406 Look only into variables in the final loop.
4408 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4410 * c-ada-spec.c (has_static_fields): Look only into fields.
4411 (dump_generic_ada_node): Small tweak.
4412 (dump_nested_types): Look only into fields.
4413 (print_ada_declaration): Look only into methods. Small tweak.
4414 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
4416 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
4418 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
4419 (dump_ada_function_declaration): Likewise.
4420 (dump_generic_ada_node): Likewise.
4421 (print_ada_declaration): Add support for const-qualified variables.
4423 2017-07-31 Martin Liska <mliska@suse.cz>
4426 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
4427 Guard condition with flag_sanitize_p also with current_function_decl
4429 (ubsan_maybe_instrument_reference_or_call): Likewise.
4431 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
4433 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
4435 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
4437 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
4439 (print_ada_declaration): Add missing guard for record types.
4441 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4444 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
4445 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
4446 new COMPOUND_EXPRs around the rhs of the comparison.
4448 2017-07-27 Marek Polacek <polacek@redhat.com>
4451 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
4454 2017-07-27 Jakub Jelinek <jakub@redhat.com>
4456 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
4457 (handle_noipa_attribute): New function.
4459 2017-07-07 Torsten Duwe <duwe@suse.de>
4461 * c-attribs.c (c_common_attribute_table): Add entry for
4462 "patchable_function_entry".
4464 2017-07-20 Nathan Sidwell <nathan@acm.org>
4466 Remove TYPE_METHODS.
4467 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
4468 dump_ada_template, print_ada_methods,
4469 print_ada_declaration): Member fns are on TYPE_FIELDS.
4471 2017-07-18 Nathan Sidwell <nathan@acm.org>
4473 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
4475 2017-07-14 David Malcolm <dmalcolm@redhat.com>
4477 * c-common.c (try_to_locate_new_include_insertion_point): New
4479 (per_file_includes_t): New typedef.
4480 (added_includes_t): New typedef.
4481 (added_includes): New variable.
4482 (maybe_add_include_fixit): New function.
4483 * c-common.h (maybe_add_include_fixit): New decl.
4485 2017-07-10 Martin Sebor <msebor@redhat.com>
4488 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
4490 2017-07-06 David Malcolm <dmalcolm@redhat.com>
4492 * c-common.c (selftest::c_family_tests): New.
4493 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
4494 (selftest::c_family_tests): New decl.
4496 2017-07-04 Marek Polacek <polacek@redhat.com>
4499 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
4502 2017-07-04 Marek Polacek <polacek@redhat.com>
4504 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
4506 2017-06-28 Martin Liska <mliska@suse.cz>
4509 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
4510 to a function declaration.
4512 2017-06-28 Martin Liska <mliska@suse.cz>
4515 * c.opt: Add IntegerRange to various options.
4517 2017-06-26 Marek Polacek <polacek@redhat.com>
4520 * c-common.h (warn_for_multistatement_macros): Declare.
4521 * c-warn.c: Include "c-family/c-indentation.h".
4522 (warn_for_multistatement_macros): New function.
4523 * c.opt (Wmultistatement-macros): New option.
4524 * c-indentation.c (guard_tinfo_to_string): No longer static.
4525 Change the parameter type to "enum rid". Handle RID_SWITCH.
4526 * c-indentation.h (guard_tinfo_to_string): Declare.
4528 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
4530 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
4532 2017-06-15 Martin Sebor <msebor@redhat.com>
4535 * c.opt (-Wclass-memaccess): New option.
4537 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
4539 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
4541 2017-06-13 Marek Polacek <polacek@redhat.com>
4544 * c-warn.c (do_warn_duplicated_branches): Return if any of the
4547 2017-06-13 Martin Liska <mliska@suse.cz>
4550 * c-attribs.c (add_no_sanitize_value): New function.
4551 (handle_no_sanitize_attribute): Likewise.
4552 (handle_no_sanitize_address_attribute): Use the function.
4553 (handle_no_sanitize_thread_attribute): New function.
4554 (handle_no_address_safety_analysis_attribute): Use
4555 add_no_sanitize_value.
4556 (handle_no_sanitize_undefined_attribute): Likewise.
4557 * c-common.h: Declare new functions.
4558 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
4559 (ubsan_instrument_shift): Likewise.
4560 (ubsan_instrument_bounds): Likewise.
4561 (ubsan_maybe_instrument_array_ref): Likewise.
4562 (ubsan_maybe_instrument_reference_or_call): Likewise.
4564 2017-06-11 Jason Merrill <jason@redhat.com>
4566 * c-ada-spec.c, c-pragma.c: Use id_equal.
4568 2017-06-04 Marek Polacek <polacek@redhat.com>
4571 * c-format.c (matching_type_p): Return false if any of the types
4572 requires structural equality.
4574 2017-06-02 Martin Sebor <msebor@redhat.com>
4577 * c-warn.c (conversion_warning): Use -Wconversion for integer
4578 conversion and -Wfloat-conversion for floating one.
4580 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4582 * c.opt (Wsizeof-pointer-div): New warning option.
4584 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
4586 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
4587 (Wcatch-value=1): Enable by -Wall.
4589 2017-05-30 David Malcolm <dmalcolm@redhat.com>
4591 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
4593 * c.opt (fdiagnostics-show-template-tree): New option.
4594 (felide-type): New option.
4596 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
4598 * c.opt (Wcatch-value=): New C++ warning flag.
4600 2017-05-24 Nathan Sidwell <nathan@acm.org>
4602 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
4603 const casts to avoid warning.
4605 2017-05-24 Martin Sebor <msebor@redhat.com>
4608 * c-common.h (unsafe_conversion_p): Add a function argument.
4609 * c-common.c (unsafe_conversion_p): Same.
4610 Add type names and values to diagnostics.
4611 (scalar_to_vector): Adjust.
4612 * c-warn.c (constant_expression_error): Add a function argument.
4613 Add type names and values to diagnostics.
4614 (conversion_warning): Add a function argument.
4615 Add type names and values to diagnostics.
4616 (warnings_for_convert_and_check): Same.
4618 2017-05-19 Jason Merrill <jason@redhat.com>
4620 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
4623 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4625 * c-format.c (locus): Move out of function scope,
4628 2017-05-19 Nathan Sidwell <nathan@acm.org>
4630 * c-opts.c (class_dump_file, class_dump_flags): Delete.
4631 (c_common_parse_file): Remove class dump handling.
4632 (get_dump_info): Likewise.
4634 2017-05-19 Richard Biener <rguenther@suse.de>
4637 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
4638 to alias-set zero memory.
4640 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
4642 * c-format.c (local_tree_type_node): Add GTY attribute.
4644 2017-05-18 Marek Polacek <polacek@redhat.com>
4646 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
4647 (c_common_fixed_point_type_for_size): Likewise.
4648 (c_common_type_for_mode): Likewise.
4649 (shorten_compare): Likewise.
4650 (c_promoting_integer_type_p): Use false/true instead of 0/1.
4651 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
4653 2017-05-18 Marek Polacek <polacek@redhat.com>
4655 * c-common.c (self_promoting_args_p): Change the return type to bool.
4656 Use false/true instead of 0/1.
4657 * c-common.h (self_promoting_args_p): Update.
4659 2017-05-17 Marek Polacek <polacek@redhat.com>
4661 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
4662 * c-warn.c: Likewise.
4664 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
4666 Implement new C++ intrinsics __is_assignable and __is_constructible.
4667 * c-common.c (__is_assignable, __is_constructible): New.
4668 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
4670 2017-05-17 Martin Liska <mliska@suse.cz>
4672 * c-common.h: Introduce dump_flags_t type and
4673 use it instead of int type.
4674 * c-gimplify.c (c_genericize): Likewise.
4675 * c-opts.c: Likewise.
4677 2017-05-17 Marek Polacek <polacek@redhat.com>
4679 * c-common.c (c_save_expr): Remove.
4680 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
4681 * c-common.h (c_save_expr): Remove declaration.
4683 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
4686 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
4687 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
4688 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
4689 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
4691 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
4693 2017-05-09 Marek Polacek <polacek@redhat.com>
4696 * c-warn.c (unwrap_c_maybe_const): New.
4697 (warn_logical_operator): Call it.
4699 2017-05-09 Nathan Sidwell <nathan@acm.org>
4701 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
4702 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
4704 2017-05-08 Martin Sebor <msebor@redhat.com>
4706 PR translation/80280
4707 * c-format.h (struct format_flag_spec): Add new member.
4709 * c-format.c (local_tree_type_node): New global.
4710 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
4711 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
4712 (strfmon_flag_specs): Likewise.
4713 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
4714 with distinct quoting properties.
4715 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
4716 (flag_chars_t::validate): Add argument and handle bad quoting.
4717 (check_format_info_main): Handle quoting problems.
4718 (init_dynamic_diag_info): Simplify.
4720 2017-05-08 Jason Merrill <jason@redhat.com>
4722 * c-opts.c (c_common_post_options): Update defaults for
4723 flag_abi_version and flag_abi_compat_version.
4725 2017-05-05 David Malcolm <dmalcolm@redhat.com>
4727 * c-common.c (c_cpp_error): Replace report_diagnostic
4728 with diagnostic_report_diagnostic.
4730 2017-05-04 Martin Sebor <msebor@redhat.com>
4732 PR translation/80280
4733 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
4734 (handle_weakref_attribute): Same.
4736 2017-05-03 Nathan Sidwell <nathan@acm.org>
4738 Canonicalize canonical type hashing
4739 * c-common.c (complete_array_type): Use type_hash_canon.
4741 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
4744 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
4746 (cilk_install_body_pedigree_operations): Likewise.
4747 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
4749 (cilk_gimplify_call_params_in_spawned_fn): Remove.
4750 (cilk_install_body_pedigree_operations): Likewise.
4751 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
4754 2017-04-27 Jakub Jelinek <jakub@redhat.com>
4757 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
4758 flag on non-aggregate element types.
4760 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
4762 * c-common.c (c_type_hasher, type_hash_table): Remove.
4763 (c_common_get_alias_set): Remove unreachable code.
4764 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
4766 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
4768 * c.opt (Wextra-semi): New C++ warning flag.
4770 2017-04-20 Jakub Jelinek <jakub@redhat.com>
4773 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
4775 2017-04-18 Jakub Jelinek <jakub@redhat.com>
4779 * c-common.c (c_common_type_for_mode): Don't handle
4780 widest_*_literal_type_node here.
4781 c_common_signed_or_unsigned_type): Likewise.
4782 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
4783 to *intTI_type_node or *intDI_type_node depending on whether
4784 TImode is supported by the target or not.
4786 2017-04-10 Martin Liska <mliska@suse.cz>
4789 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
4790 doing an UBSAN check.
4792 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
4794 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
4796 2017-03-31 Jakub Jelinek <jakub@redhat.com>
4799 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
4801 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
4802 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
4805 2017-03-31 David Malcolm <dmalcolm@redhat.com>
4807 PR documentation/78732
4808 * c.opt (Wendif-labels): Fix description to refer to
4809 #else rather than #elif.
4811 2017-03-31 Jakub Jelinek <jakub@redhat.com>
4814 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
4815 * c-common.c (c_common_reswords): Add __is_aggregate trait.
4817 2017-03-27 Jakub Jelinek <jakub@redhat.com>
4820 * c-common.c (c_common_mark_addressable_vec): Don't set
4821 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
4823 2017-03-21 Martin Sebor <msebor@redhat.com>
4826 * c-common.c (set_underlying_type): Mark type used only when
4827 original del is declared unused.
4829 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4831 PR translation/79848
4832 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
4835 2017-03-10 David Malcolm <dmalcolm@redhat.com>
4838 * c-indentation.c (warn_for_misleading_indentation): Remove parens
4839 from inform's message, so that xgettext can locate it.
4841 2017-03-09 Marek Polacek <polacek@redhat.com>
4845 * c-attribs.c (handle_nonnull_attribute): Save the result of default
4846 conversion to the attribute list.
4848 2017-03-09 Martin Liska <mliska@suse.cz>
4850 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
4852 2017-03-03 Jason Merrill <jason@redhat.com>
4854 * c.opt (Wnoexcept-type): New.
4856 2017-03-02 Richard Biener <rguenther@suse.de>
4859 * c-common.c (c_common_mark_addressable_vec): Look through
4862 2017-02-28 Martin Liska <mliska@suse.cz>
4864 * c.opt: Replace space with tabular for options of <number>
4867 2017-02-28 Martin Liska <mliska@suse.cz>
4869 * c.opt: Fix --help=option -Q for options which are of
4872 2017-02-24 Jakub Jelinek <jakub@redhat.com>
4875 * c-common.c (check_function_restrict): New function.
4876 (check_function_arguments): Add FNDECL argument. Call
4877 check_function_restrict if -Wrestrict.
4878 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
4879 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
4880 * c-common.h (check_function_arguments): Add FNDECL argument.
4881 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
4883 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
4885 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
4886 treatment of parameters with pointer-to-tagged type and tidy up.
4887 (print_ada_methods): Remove the special treatment of C++ static member
4890 2017-02-22 Martin Liska <mliska@suse.cz>
4892 * c.opt: Replace inequality signs with square brackets
4895 2017-02-21 Jakub Jelinek <jakub@redhat.com>
4898 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
4901 2017-02-17 Joseph Myers <joseph@codesourcery.com>
4903 * c-cppbuiltin.c (builtin_define_float_constants): Define
4904 __DECIMAL_DIG__ to the value for long double.
4906 2017-02-15 Marek Polacek <polacek@redhat.com>
4909 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
4910 conversion has occured.
4912 2017-01-24 David Malcolm <dmalcolm@redhat.com>
4914 * c-common.c (c_common_reswords): Add "__RTL".
4915 * c-common.h (enum rid): Add RID_RTL.
4917 2017-01-20 Marek Polacek <polacek@redhat.com>
4920 * c-common.h (do_warn_duplicated_branches_r): Declare.
4921 * c-gimplify.c (c_genericize): Walk the function tree calling
4922 do_warn_duplicated_branches_r.
4923 * c-warn.c (expr_from_macro_expansion_r): New.
4924 (do_warn_duplicated_branches): New.
4925 (do_warn_duplicated_branches_r): New.
4926 * c.opt (Wduplicated-branches): New option.
4928 2017-01-17 David Malcolm <dmalcolm@redhat.com>
4931 * c-indentation.c (warn_for_misleading_indentation): Use the past
4932 subjunctive in the note.
4934 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
4937 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
4938 start type to integer_type.
4940 2017-01-16 Jakub Jelinek <jakub@redhat.com>
4943 * c.opt (gen-decls): Add Driver flag.
4945 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4948 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4951 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4953 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
4956 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
4958 2017-01-12 Martin Sebor <msebor@redhat.com>
4960 (-Wformat-overflow): ...to this.
4962 2017-01-11 Martin Sebor <msebor@redhat.com>
4965 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
4966 Also enable for LTO.
4968 2017-01-10 Jason Merrill <jason@redhat.com>
4970 Implement P0195R2, C++17 variadic using.
4971 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
4973 2017-01-09 Jakub Jelinek <jakub@redhat.com>
4975 PR translation/79019
4976 PR translation/79020
4977 * c.opt (Wnormalized=): Fix typo in description.
4979 2017-01-08 Martin Sebor <msebor@redhat.com>
4982 * c.opt (-Wformat-truncation): New option.
4984 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
4986 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
4987 value to unsigned short to fit in 4 hex digits without
4990 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
4992 * c.opt (fsso-struct): Add 'native' value.
4994 2017-01-05 Martin Liska <mliska@suse.cz>
4997 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
5000 2017-01-04 Marek Polacek <polacek@redhat.com>
5003 * c.opt (Wpointer-compare): New option.
5005 2017-01-04 Jakub Jelinek <jakub@redhat.com>
5008 * c.opt (fsso-struct=): Add RejectNegative.
5010 2017-01-01 Jakub Jelinek <jakub@redhat.com>
5012 Update copyright years.
5014 2016-12-29 Martin Liska <mliska@suse.cz>
5017 * c.opt (strong-eval-order): Add RejectNegative keyword.
5019 2016-12-22 Jason Merrill <jason@redhat.com>
5021 Implement P0522R0, matching of template template arguments.
5022 * c-cppbuiltin.c (c_cpp_builtins): Define
5023 __cpp_template_template_args.
5025 2016-12-21 Jakub Jelinek <jakub@redhat.com>
5028 * c-common.c (struct nonnull_arg_ctx): New type.
5029 (check_function_nonnull): Return bool instead of void. Use
5030 nonnull_arg_ctx as context rather than just location_t.
5031 (check_nonnull_arg): Adjust for the new context type, set
5032 warned_p to true if a warning has been diagnosed.
5033 (check_function_arguments): Return bool instead of void.
5034 * c-common.h (check_function_arguments): Adjust prototype.
5036 2016-12-21 Jason Merrill <jason@redhat.com>
5038 * c.opt (-fnew-ttp-matching): New flag.
5039 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
5041 2016-12-14 Martin Jambor <mjambor@suse.cz>
5043 * c-omp.c: Include omp-general.h instead of omp-low.h.
5044 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
5047 2016-12-14 Martin Sebor <msebor@redhat.com>
5050 * c-common.c (check_nonnull_arg): Disable when optimization
5053 2016-12-12 Marek Polacek <polacek@redhat.com>
5056 * c-common.c (attribute_fallthrough_p): Return false for
5059 2016-12-08 Martin Sebor <msebor@redhat.com>
5062 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
5064 2016-12-08 Martin Sebor <msebor@redhat.com>
5067 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
5070 2016-12-07 Martin Sebor <msebor@redhat.com>
5076 * c.opt (-Wstringop-overflow): New option.
5078 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
5080 * c-attribs.c (asan odr indicator): New attribute.
5081 (handle_asan_odr_indicator_attribute): New function.
5083 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5085 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
5088 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5090 * c-common.c (excess_precision_mode_join): New.
5091 (c_ts18661_flt_eval_method): New.
5092 (c_c11_flt_eval_method): Likewise.
5093 (c_flt_eval_method): Likewise.
5094 * c-common.h (excess_precision_mode_join): New.
5095 (c_flt_eval_method): Likewise.
5096 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
5097 (cpp_iec_559_value): Call it.
5098 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
5099 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
5100 __FLT_EVAL_METHOD_TS_18661_3__.
5102 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
5104 * c-opts.c (c_common_post_options): Add logic to handle the default
5105 case for -fpermitted-flt-eval-methods.
5107 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
5109 * c.opt (Wexpansion-to-defined): New.
5111 2016-11-23 Jakub Jelinek <jakub@redhat.com>
5114 * c-pragma.c (handle_pragma_target): Don't replace
5115 current_target_pragma, but chainon the new args to the current one.
5117 2016-11-22 Nathan Sidwell <nathan@acm.org>
5119 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
5120 indentation and formatting.
5122 2016-11-21 Martin Sebor <msebor@redhat.com>
5124 * c.opt (-fprintf-return-value): Enable by default.
5126 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5129 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
5130 * c-common.c (c_common_nodes_and_builtins): Initialize
5131 const_tm_ptr_type_node.
5133 2016-11-16 Marek Polacek <polacek@redhat.com>
5136 * c-common.c (c_add_case_label): Turn error_at calls into inform.
5138 2016-11-14 Jakub Jelinek <jakub@redhat.com>
5140 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
5142 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
5143 Richard Biener <rguenther@suse.de>
5145 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
5146 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
5147 * c.opt (fgimple): New option.
5149 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
5152 * c-common.h (warn_for_restrict): Declare.
5153 * c-warn.c: Include gcc-rich-location.h.
5154 (warn_for_restrict): New function.
5155 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
5156 (gcc_cdiag_char_table): Likewise.
5157 (gcc_cxxdiag_char_table): Likewise.
5158 * c.opt (Wrestrict): New option.
5160 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
5162 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
5163 for nested types only if the type is a record or union and dump SLOC.
5165 2016-11-09 Jason Merrill <jason@redhat.com>
5167 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
5169 2016-11-09 Jakub Jelinek <jakub@redhat.com>
5171 * c-ubsan.c (ubsan_instrument_shift): Handle split
5172 -fsanitize=shift-base and -fsanitize=shift-exponent.
5174 2016-11-07 Jason Merrill <jason@redhat.com>
5176 * c.opt (Wc++1z-compat): New.
5177 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
5179 2016-11-07 Martin Liska <mliska@suse.cz>
5181 * c-warn.c (warn_for_unused_label): Save all labels used
5182 in goto or in &label.
5184 2016-11-03 Jason Merrill <jason@redhat.com>
5186 * c-cppbuiltin.c (c_cpp_builtins): Correct
5187 __cpp_inheriting_constructors.
5189 2016-11-01 Jason Merrill <jason@redhat.com>
5191 * c-cppbuiltin.c (c_cpp_builtins): Update
5192 __cpp_inheriting_constructors.
5194 * c.opt (-fnew-inheriting-ctors): New.
5195 * c-opts.c: Default to on for ABI 11+.
5197 2016-10-31 Jakub Jelinek <jakub@redhat.com>
5200 * c.opt (fext-numeric-literals): Add Var and Init.
5201 * c-opts.c (c_common_handle_option): Don't clear
5202 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
5203 (c_common_post_options): Clear it here if not set
5206 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
5209 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
5212 2016-10-25 Jakub Jelinek <jakub@redhat.com>
5214 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
5215 * c-common.c (c_common_reswords): Add __builtin_launder.
5217 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
5219 * c-common.c (c_common_truthvalue_conversion): Warn for
5220 multiplications in boolean context. Fix the quoting of '<<' and '<'
5221 in the shift warning.
5223 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
5225 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
5227 2016-10-20 Jason Merrill <jason@redhat.com>
5229 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
5231 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5233 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
5234 integer shift ops in boolean context.
5236 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
5238 * c.opt (Walloca): New.
5239 (Walloca-larger-than=): New.
5240 (Wvla-larger-than=): New.
5242 2016-10-17 Marek Polacek <polacek@redhat.com>
5244 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
5245 Return immediately when finding a match.
5246 (warn_tautological_cmp): Remove a boolean variable that is no longer
5249 2016-10-17 Marek Polacek <polacek@redhat.com>
5251 * c-attribs.c: New file.
5252 * c-common.c: Move attributes handling to c-attribs.c.
5253 (get_nonnull_operand): No longer static.
5254 * c-common.h: Move the declarations from c-attribs.c to its own section.
5256 2016-10-14 Jason Merrill <jason@redhat.com>
5258 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
5259 and __cpp_deduction_guides.
5261 2016-10-13 Jason Merrill <jason@redhat.com>
5263 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
5265 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
5267 * c-cppbuiltin.c: Include memmodel.h.
5268 * c-opts.c: Likewise.
5269 * c-pragma.c: Likewise.
5270 * c-warn.c: Likewise.
5272 2016-10-12 Jakub Jelinek <jakub@redhat.com>
5274 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
5275 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
5276 * c-opts.c (sanitize_cpp_opts): Initialize
5277 cpp_opts->cpp_warn_implicit_fallthrough.
5279 2016-10-11 Marek Polacek <polacek@redhat.com>
5281 * c-common.c (warning_candidate_p): Change the return type to bool
5282 and return true/false instead of 1/0.
5283 (vector_mode_valid_p): Likewise.
5285 2016-10-11 Marek Polacek <polacek@redhat.com>
5287 * c-common.c (fold_for_warn): No longer static.
5288 (bool_promoted_to_int_p): Likewise.
5289 (c_common_get_narrower): Likewise.
5290 (constant_expression_warning): Move to c-warn.c.
5291 (constant_expression_error): Likewise.
5292 (overflow_warning): Likewise.
5293 (warn_logical_operator): Likewise.
5294 (find_array_ref_with_const_idx_r): Likewise.
5295 (warn_tautological_cmp): Likewise.
5296 (expr_has_boolean_operands_p): Likewise.
5297 (warn_logical_not_parentheses): Likewise.
5298 (warn_if_unused_value): Likewise.
5299 (strict_aliasing_warning): Likewise.
5300 (sizeof_pointer_memaccess_warning): Likewise.
5301 (check_main_parameter_types): Likewise.
5302 (conversion_warning): Likewise.
5303 (warnings_for_convert_and_check): Likewise.
5304 (match_case_to_enum_1): Likewise.
5305 (match_case_to_enum): Likewise.
5306 (c_do_switch_warnings): Likewise.
5307 (warn_for_omitted_condop): Likewise.
5308 (readonly_error): Likewise.
5309 (lvalue_error): Likewise.
5310 (invalid_indirection_error): Likewise.
5311 (warn_array_subscript_with_type_char): Likewise.
5312 (warn_about_parentheses): Likewise.
5313 (warn_for_unused_label): Likewise.
5314 (warn_for_div_by_zero): Likewise.
5315 (warn_for_memset): Likewise.
5316 (warn_for_sign_compare): Likewise.
5317 (do_warn_double_promotion): Likewise.
5318 (do_warn_unused_parameter): Likewise.
5319 (record_locally_defined_typedef): Likewise.
5320 (maybe_record_typedef_use): Likewise.
5321 (maybe_warn_unused_local_typedefs): Likewise.
5322 (maybe_warn_bool_compare): Likewise.
5323 (maybe_warn_shift_overflow): Likewise.
5324 (warn_duplicated_cond_add_or_warn): Likewise.
5325 (diagnose_mismatched_attributes): Likewise.
5326 * c-common.h: Move the declarations from c-warn.c to its own section.
5327 * c-warn.c: New file.
5329 2016-10-08 Jason Merrill <jason@redhat.com>
5331 * c-common.c (c_common_truthvalue_conversion): Don't distribute
5332 into COND_EXPR in C++.
5334 2016-10-08 Jakub Jelinek <jakub@redhat.com>
5336 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
5337 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
5338 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
5340 2016-10-07 Jakub Jelinek <jakub@redhat.com>
5342 Implement LWG2296 helper intrinsic
5343 * c-common.h (enum rid): Add RID_ADDRESSOF.
5344 * c-common.c (c_common_reswords): Add __builtin_addressof.
5346 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
5349 * c-common.c (c_common_truthvalue_conversion): Warn also for
5350 suspicious enum values in boolean context.
5352 2016-10-06 Jakub Jelinek <jakub@redhat.com>
5354 Implement P0258R2 - helper for C++17
5355 std::has_unique_object_representations trait
5356 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
5357 * c-common.c (c_common_reswords): Add
5358 __has_unique_object_representations.
5360 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5363 * c-ubsan.c (ubsan_instrument_return): Don't call
5364 initialize_sanitizer_builtins here.
5366 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5368 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
5369 conditional expression in boolean context when only one arm is
5372 2016-10-05 Jakub Jelinek <jakub@redhat.com>
5375 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
5378 * c-common.c (c_common_reswords): Update comment for C++11.
5380 2016-10-04 Jason Merrill <jason@redhat.com>
5382 * c-common.c (make_tree_vector_from_ctor): New.
5383 * c-common.h: Declare it.
5385 2016-10-04 Jakub Jelinek <jakub@redhat.com>
5387 * c-cppbuiltin.c (c_cpp_builtins): Don't define
5388 __LIBGCC_JCR_SECTION_NAME__.
5390 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
5392 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
5393 left shift in boolean context.
5395 2016-09-29 Jakub Jelinek <jakub@redhat.com>
5397 Implement P0001R1 - C++17 removal of register storage class specifier
5398 * c.opt (Wregister): New warning.
5399 * c-opts.c (c_common_post_options): Enable -Wregister by
5402 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
5404 * c-opts.c (c_common_post_options): Remove special case for
5405 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
5408 2016-09-27 Jakub Jelinek <jakub@redhat.com>
5410 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
5413 * c-ada-spec.c (print_ada_declaration): Remove break after return.
5415 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
5417 * c-common.c: Include memmodel.h.
5419 2016-09-26 Marek Polacek <polacek@redhat.com>
5421 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
5423 2016-09-26 Marek Polacek <polacek@redhat.com>
5426 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
5427 (handle_fallthrough_attribute): New function.
5428 (attribute_fallthrough_p): New function.
5429 * c-common.h (attribute_fallthrough_p): Declare.
5431 2016-09-24 Marek Polacek <polacek@redhat.com>
5434 * c.opt (Wbool-operation): New.
5436 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
5438 * c-common.c (c_common_truthvalue_conversion): Inhibit
5439 Wint-in-bool-context warning with from_macro_definition_at.
5440 Mention the expression will always evaluate to true.
5442 2016-09-21 Martin Sebor <msebor@redhat.com>
5445 * c.opt (fprintf-return-value): Temporarily initialize to zero
5446 to unblock bootstrap failures.
5448 2016-09-21 Jakub Jelinek <jakub@redhat.com>
5451 * c.opt (Waligned-new=): Add RejectNegative.
5452 (faligned-new=): Likewise. Spelling fix - change
5453 aligned_new_threshhold to aligned_new_threshold.
5454 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
5455 to aligned_new_threshold.
5457 2016-09-20 Martin Sebor <msebor@redhat.com>
5460 * c.opt: Add -Wformat-length and -fprintf-return-value.
5462 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5465 * c.opt (Wint-in-bool-context): New warning.
5466 * c-common.c (c_common_truthvalue_conversion): Warn on integer
5467 constants in boolean context.
5469 2016-09-19 Joseph Myers <joseph@codesourcery.com>
5471 * c-common.c (max_align_t_align): Also consider alignment of
5474 2016-09-15 Jason Merrill <jason@redhat.com>
5476 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
5479 2016-09-14 Jason Merrill <jason@redhat.com>
5481 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5482 limit FIELD_DECL, either.
5484 2016-09-14 Marek Polacek <polacek@redhat.com>
5486 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
5487 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
5488 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
5490 2016-09-13 David Malcolm <dmalcolm@redhat.com>
5492 * c-common.c (warn_logical_not_parentheses): Replace
5493 rich_location::add_fixit_insert calls with add_fixit_insert_before
5494 and add_fixit_insert_after, eliminating the "next_loc" calculation.
5496 2016-09-13 Jason Merrill <jason@redhat.com>
5497 Tom de Vries <tom@codesourcery.com>
5500 * c-common.c (set_underlying_type): Don't treat array as builtin type.
5502 2016-09-13 Jason Merrill <jason@redhat.com>
5504 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
5507 2016-09-12 Jason Merrill <jason@redhat.com>
5509 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
5510 bit/byte confusion, allow large alignment for types.
5512 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
5515 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
5517 2016-09-12 David Malcolm <dmalcolm@redhat.com>
5520 * c-format.c (argument_parser::check_argument_type): Add params
5521 "type_start" and "conversion_char". Use the former to generate
5522 offset_to_type_start and pass it and conversion_char to
5524 (check_format_info_main): Capture the start of the type
5525 information as "type_start", and pass it an format_char
5526 to arg_parser.check_argument_type.
5527 (check_format_types): Provide an example in the leading comment.
5528 Add params "offset_to_type_start" and "conversion_char"; pass
5529 them to format_type_warning calls.
5530 (test_get_modifier_for_format_len): Likewise.
5531 (matching_type_p): New function.
5532 (get_format_for_type): Add param "conversion_char" and move
5533 implementation into...
5534 (get_format_for_type_1): ...new function, called twice.
5535 Use new function matching_type_p rather than checking for
5536 TYPE_CANONICAL equality.
5537 (get_corrected_substring): New function.
5538 (format_type_warning): Provide an example in the leading comment.
5539 Add params "offset_to_type_start" and "conversion_char". Replace
5540 call to get_format_for_type with call to get_corrected_substring
5541 and move rejection of hints for widths/precisions there.
5542 (assert_format_for_type_streq): Add param "conversion_char".
5543 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
5544 (test_get_format_for_type_printf): Add conversion chars to the
5545 tests, adding coverage for various combinations of integer
5546 vs double conversions, and for preserving octal and hexadecimal
5548 (test_get_format_for_type_scanf): Add conversion chars to the
5551 2016-09-10 Tom de Vries <tom@codesourcery.com>
5554 * c-common.c (build_va_arg): Handle more strict
5555 targetm.canonical_va_list_type. Replace first argument type error with
5558 2016-09-09 Martin Sebor <msebor@redhat.com>
5562 * c-format.c (argument_parser::find_format_char_info): Use %qc
5563 format directive unconditionally.
5565 2016-09-09 Jason Merrill <jason@redhat.com>
5567 Implement C++17 new of over-aligned types.
5568 * c.opt: Add -faligned-new and -Waligned-new.
5569 * c-common.c (max_align_t_align): Split out from...
5570 (cxx_fundamental_alignment_p): ...here.
5571 * c-common.h: Declare it.
5572 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
5574 2016-09-09 Joseph Myers <joseph@codesourcery.com>
5576 * c-cppbuiltin.c (builtin_define_type_width): New function.
5577 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
5580 2016-09-07 David Malcolm <dmalcolm@redhat.com>
5582 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
5584 (substring_loc::get_location): Move to substring-locations.c,
5585 keeping implementation as...
5586 (c_get_substring_location): New function, from the above, reworked
5587 to use accessors rather than member lookup.
5588 * c-common.h (class substring_loc): Move to substring-locations.h,
5589 replacing with a forward decl.
5590 (c_get_substring_location): New decl.
5591 * c-format.c: Include "substring-locations.h".
5592 (format_warning_va): Move to substring-locations.c.
5593 (format_warning_at_substring): Likewise.
5595 2016-09-06 Martin Sebor <msebor@redhat.com>
5598 * c-format.c (check_function_format): Avoid issuing warnings for
5599 functions unless they call format functions with non-constant
5602 2016-09-06 Richard Biener <rguenther@suse.de>
5605 * c-common.c (c_common_mark_addressable_vec): Handle
5606 COMPOUND_LITERAL_EXPR.
5608 2016-09-05 Marek Polacek <polacek@redhat.com>
5611 * c-common.c (bool_promoted_to_int_p): New function.
5612 (expr_has_boolean_operands_p): New function.
5613 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
5614 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
5616 2016-09-04 Tom de Vries <tom@codesourcery.com>
5619 2016-08-29 Tom de Vries <tom@codesourcery.com>
5621 * c-common.c (build_va_arg): Replace first argument type error
5624 2016-09-02 Jakub Jelinek <jakub@redhat.com>
5627 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
5628 (c_finish_omp_for): Reject _Atomic qualified iterators.
5630 2016-09-01 Martin Sebor <msebor@redhat.com>
5632 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
5633 size to guarantee it fits the output of the formatted function
5634 regardless of its arguments.
5636 2016-09-01 Marek Polacek <polacek@redhat.com>
5639 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
5642 2016-08-29 Marek Polacek <polacek@redhat.com>
5645 * c-common.c (warn_logical_not_parentheses): Don't warn for
5646 a comparison or a logical operator.
5648 2016-08-29 Tom de Vries <tom@codesourcery.com>
5650 * c-common.c (build_va_arg): Fix type comparison assert.
5652 2016-08-29 Tom de Vries <tom@codesourcery.com>
5654 * c-common.c (build_va_arg): Replace first argument type error
5657 2016-08-29 Tom de Vries <tom@codesourcery.com>
5660 * c-common.c (build_va_arg): Add first argument error. Build va_arg
5661 with error_mark_node as va_list instead of with illegal va_list.
5663 2016-08-25 Marek Polacek <polacek@redhat.com>
5664 David Malcolm <dmalcolm@redhat.com>
5666 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
5667 * c-common.h (warn_logical_not_parentheses): Update declaration.
5669 2016-08-22 Marek Polacek <polacek@redhat.com>
5672 * c-common.c (warn_for_memset): Check type for null.
5674 2016-08-22 Joseph Myers <joseph@codesourcery.com>
5676 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
5677 _FloatNx types for suffixes for built-in functions.
5679 2016-08-19 Joseph Myers <joseph@codesourcery.com>
5682 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
5683 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
5684 (RID_FLOAT128X): New enum rid values.
5685 (CASE_RID_FLOATN_NX): New macro.
5686 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
5688 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
5689 corresponding complex types.
5690 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
5691 _FloatNx and corresponding complex types.
5692 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
5693 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
5694 and _FloatNx types for the widest type for determining
5695 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
5696 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
5697 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
5699 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
5701 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
5704 2016-08-18 David Malcolm <dmalcolm@redhat.com>
5706 * c-opts.c (c_diagnostic_finalizer): Update for change to
5707 diagnostic_show_locus.
5709 2016-08-18 David Malcolm <dmalcolm@redhat.com>
5711 * c-common.c: Include "spellcheck.h".
5712 (cb_get_suggestion): New function.
5713 * c-common.h (cb_get_suggestion): New decl.
5714 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
5717 2016-08-18 Marek Polacek <polacek@redhat.com>
5720 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
5723 2016-08-16 David Malcolm <dmalcolm@redhat.com>
5726 * c-common.c (substring_loc::get_range): Rename to...
5727 (substring_loc::get_location): ...this, converting param from a
5728 source_range * to a location_t *. Call
5729 get_source_location_for_substring rather than
5730 get_source_range_for_substring, and pass in m_caret_idx.
5731 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
5732 (substring_loc::get_range): Replace with...
5733 (substring_loc::get_location): ...this.
5734 (substring_loc::set_caret_index): New method.
5735 (substring_loc): Add field m_caret_idx.
5736 * c-format.c (format_warning_va): Update for above changes.
5737 Rename local "substring_loc" to "fmt_substring_loc" to avoid
5738 clashing with type name.
5739 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
5740 (check_argument_type): Likewise.
5741 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
5742 Use a copy when emitting warnings, setting the caret index from TYPE.
5744 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
5745 Arnaud Charlet <charlet@adacore.com>
5747 * c-ada-spec.c (dump_number): New function.
5748 (handle_escape_character): Likewise.
5749 (print_ada_macros): Add handling of constant integers and strings.
5751 2016-08-12 Marek Polacek <polacek@redhat.com>
5754 * c-common.c (scalar_to_vector): Adjust fall through comment.
5755 * c-opts.c (c_common_handle_option): Likewise.
5756 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
5757 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
5758 fall through comment.
5759 * cilk.c (extract_free_variables): Add FALLTHRU.
5761 2016-08-10 Jason Merrill <jason@redhat.com>
5763 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
5765 2016-08-09 Jason Merrill <jason@redhat.com>
5767 * c-common.c (c_common_attribute_table): vector_size affects type
5770 2016-08-09 Marek Polacek <polacek@redhat.com>
5773 * c-ada-spec.c (dump_generic_ada_node): Add return.
5775 2016-08-09 Jason Merrill <jason@redhat.com>
5777 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
5778 C++17 constexpr lambdas.
5780 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5783 * c-common.h (selftest::c_format_c_tests): New declaration.
5784 (selftest::run_c_tests): New declaration.
5785 * c-format.c: Include "selftest.h.
5786 (format_warning_va): Add param "corrected_substring" and use
5787 it to add a replacement fix-it hint.
5788 (format_warning_at_substring): Likewise.
5789 (format_warning_at_char): Update for new param of
5791 (argument_parser::check_argument_type): Pass "fki" to
5793 (check_format_types): Add param "fki" and pass it to
5794 format_type_warning.
5795 (deref_n_times): New function.
5796 (get_modifier_for_format_len): New function.
5797 (selftest::test_get_modifier_for_format_len): New function.
5798 (get_format_for_type): New function.
5799 (format_type_warning): Add param "fki" and use it to attempt
5800 to provide hints for argument types when calling
5801 format_warning_at_substring.
5802 (selftest::get_info): New function.
5803 (selftest::assert_format_for_type_streq): New function.
5804 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
5805 (selftest::test_get_format_for_type_printf): New function.
5806 (selftest::test_get_format_for_type_scanf): New function.
5807 (selftest::c_format_c_tests): New function.
5809 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5812 * c-format.c: Include "diagnostic.h".
5813 (location_column_from_byte_offset): Delete.
5814 (location_from_offset): Delete.
5815 (format_warning_va): New function.
5816 (format_warning_at_substring): New function.
5817 (format_warning_at_char): New function.
5818 (check_format_arg): Capture location of format_tree and pass to
5819 check_format_info_main.
5820 (argument_parser): Add fields "start_of_this_format" and
5821 "format_string_cst".
5822 (flag_chars_t::validate): Add param "format_string_cst". Convert
5823 warning_at call using location_from_offset to call to
5824 format_warning_at_char.
5825 (argument_parser::argument_parser): Add param "format_string_cst_"
5826 and use use it to initialize field "format_string_cst".
5827 Initialize new field "start_of_this_format".
5828 (argument_parser::read_format_flags): Convert warning_at call
5829 using location_from_offset to a call to format_warning_at_char.
5830 (argument_parser::read_any_format_left_precision): Likewise.
5831 (argument_parser::read_any_format_precision): Likewise.
5832 (argument_parser::read_any_other_modifier): Likewise.
5833 (argument_parser::find_format_char_info): Likewise, in three places.
5834 (argument_parser::parse_any_scan_set): Likewise, in one place.
5835 (argument_parser::handle_conversions): Likewise, in two places.
5836 (argument_parser::check_argument_type): Add param "fmt_param_loc"
5837 and use it to make a substring_loc. Pass the latter to
5839 (check_format_info_main): Add params "fmt_param_loc" and
5840 "format_string_cst". Convert warning_at calls using
5841 location_from_offset to calls to format_warning_at_char. Pass the
5842 new params to the arg_parser ctor. Pass "format_string_cst" to
5843 flag_chars.validate. Pass "fmt_param_loc" to
5844 arg_parser.check_argument_type.
5845 (check_format_types): Convert first param from a location_t
5846 to a const substring_loc & and rename to "fmt_loc". Attempt
5847 to extract the range of the relevant parameter and pass it
5848 to format_type_warning.
5849 (format_type_warning): Convert first param from a location_t
5850 to a const substring_loc & and rename to "fmt_loc". Add
5851 params "param_range" and "type". Replace calls to warning_at
5852 with calls to format_warning_at_substring.
5854 2016-08-08 David Malcolm <dmalcolm@redhat.com>
5856 * c-format.c (class flag_chars_t): New class.
5857 (struct length_modifier): New struct.
5858 (class argument_parser): New class.
5859 (flag_chars_t::flag_chars_t): New ctor.
5860 (flag_chars_t::has_char_p): New method.
5861 (flag_chars_t::add_char): New method.
5862 (flag_chars_t::validate): New method.
5863 (flag_chars_t::get_alloc_flag): New method.
5864 (flag_chars_t::assignment_suppression_p): New method.
5865 (argument_parser::argument_parser): New ctor.
5866 (argument_parser::read_any_dollar): New method.
5867 (argument_parser::read_format_flags): New method.
5868 (argument_parser::read_any_format_width): New method.
5869 (argument_parser::read_any_format_left_precision): New method.
5870 (argument_parser::read_any_format_precision): New method.
5871 (argument_parser::handle_alloc_chars): New method.
5872 (argument_parser::read_any_length_modifier): New method.
5873 (argument_parser::read_any_other_modifier): New method.
5874 (argument_parser::find_format_char_info): New method.
5875 (argument_parser::validate_flag_pairs): New method.
5876 (argument_parser::give_y2k_warnings): New method.
5877 (argument_parser::parse_any_scan_set): New method.
5878 (argument_parser::handle_conversions): New method.
5879 (argument_parser::check_argument_type): New method.
5880 (check_format_info_main): Introduce classes argument_parser
5881 and flag_chars_t, moving the code within the loop into methods
5882 of these classes. Make various locals "const".
5884 2016-08-05 David Malcolm <dmalcolm@redhat.com>
5886 * c-common.c: Include "substring-locations.h".
5887 (get_cpp_ttype_from_string_type): New function.
5888 (g_string_concat_db): New global.
5889 (substring_loc::get_range): New method.
5890 * c-common.h (g_string_concat_db): New declaration.
5891 (class substring_loc): New class.
5892 * c-lex.c (lex_string): When concatenating strings, capture the
5893 locations of all tokens using a new obstack, and record the
5894 concatenation locations within g_string_concat_db.
5895 * c-opts.c (c_common_init_options): Construct g_string_concat_db
5898 2016-07-29 Marek Polacek <polacek@redhat.com>
5901 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
5902 parentheses warning.
5905 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
5907 2016-07-28 Martin Liska <mliska@suse.cz>
5909 PR gcov-profile/68025
5910 * c-common.c (handle_no_profile_instrument_function_attribute):
5912 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
5914 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
5917 2016-07-25 Jason Merrill <jason@redhat.com>
5920 * c.opt (fconstexpr-loop-limit): New.
5922 2016-07-22 Martin Sebor <msebor@redhat.com>
5925 * c-common.c (resolve_overloaded_builtin): Avoid converting
5926 __atomic_compare_exchange_n return type to that of what its
5927 first argument points to.
5929 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
5931 * c-common.c: Use HOST_WIDE_INT_M1U instead of
5932 ~(unsigned HOST_WIDE_INT) 0.
5934 2016-07-22 Martin Liska <mliska@suse.cz>
5936 PR gcov-profile/69028
5937 PR gcov-profile/62047
5938 * cilk.c (create_cilk_helper_decl): Set location of a new decl
5939 to the current_function_decl.
5941 2016-07-21 Jason Merrill <jason@redhat.com>
5944 * c-common.c (c_common_truthvalue_conversion): Check
5945 c_inhibit_evaluation_warnings for warning about address of
5948 2016-07-20 David Malcolm <dmalcolm@redhat.com>
5950 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
5953 2016-07-15 Jason Merrill <jason@redhat.com>
5955 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
5957 2016-07-15 Jakub Jelinek <jakub@redhat.com>
5960 * c-common.h (enum lookup_name_fuzzy_kind): Add
5961 FUZZY_LOOKUP_FUNCTION_NAME.
5963 2016-07-08 Jason Merrill <jason@redhat.com>
5965 P0145: Refining Expression Order for C++.
5966 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
5969 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
5972 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
5974 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
5976 * c-pragma.h (enum pragma_kind): Rename
5977 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
5980 2016-06-29 Richard Biener <rguenther@suse.de>
5983 * c-common.c (c_common_get_alias_set): Remove union type punning case.
5985 2016-06-24 Jason Merrill <jason@redhat.com>
5987 P0145R2: Refining Expression Order for C++.
5988 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
5991 2016-06-24 Jakub Jelinek <jakub@redhat.com>
5993 * c-common.c (check_builtin_function_arguments): Require last
5994 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
5995 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
5996 if the last argument is pointer to enumerated or boolean type.
5998 2016-06-22 David Malcolm <dmalcolm@redhat.com>
6001 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
6002 (lookup_name_fuzzy): New prototype.
6004 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
6006 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
6008 2016-06-14 Jason Merrill <jason@redhat.com>
6010 P0145R2: Refining Expression Order for C++.
6011 * c.opt (fargs-in-order): New.
6012 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
6014 2016-06-13 Jakub Jelinek <jakub@redhat.com>
6017 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
6018 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
6020 PR preprocessor/71183
6021 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
6022 to cb_get_source_date_epoch.
6024 2016-06-10 Jakub Jelinek <jakub@redhat.com>
6027 * c.opt (Wpsabi): Add Warning flag.
6029 2016-06-10 Martin Sebor <msebor@redhat.com>
6032 * c-common.c (handle_nonnull_attribute): Accept
6033 the nonnull attribute in type-generic builtins.
6035 2016-06-09 Martin Sebor <msebor@redhat.com>
6038 * c-common.c (builtin_function_validate_nargs): Make text of error
6039 message consistent with others like it.
6041 2016-06-08 Martin Sebor <msebor@redhat.com>
6042 Jakub Jelinek <jakub@redhat.com>
6046 * c-common.c (check_builtin_function_arguments): Handle
6047 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
6049 2016-06-08 Richard Biener <rguenther@suse.de>
6051 * c-common.c (parse_optimize_options): Improve diagnostic messages.
6053 2016-06-07 Richard Biener <rguenther@suse.de>
6056 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
6057 options and warn about others.
6059 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
6061 * c-common.c (get_source_date_epoch): Rename to
6062 cb_get_source_date_epoch.
6063 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
6064 message when the parsing fails. Use error_at instead of fatal_error.
6065 * c-common.h (get_source_date_epoch): Rename to
6066 cb_get_source_date_epoch.
6067 * c-common.h (cb_get_source_date_epoch): Prototype.
6068 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
6069 * c-common.h (c_omp_region_type): Remove trailing comma.
6070 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
6071 * c-lex.c (c_lex_with_flags): Remove initialization of
6072 pfile->source_date_epoch.
6074 2016-05-30 Jakub Jelinek <jakub@redhat.com>
6077 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
6078 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
6079 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
6080 instead of C_OMP_CLAUSE_SPLIT_FOR.
6082 2016-05-24 Richard Biener <rguenther@suse.de>
6086 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
6087 (convert_vector_to_array_for_subscript): ... this.
6088 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
6089 VIEW_CONVERT_EXPR to an array type. Rename to ...
6090 (convert_vector_to_array_for_subscript): ... this.
6092 2016-05-12 Marek Polacek <polacek@redhat.com>
6095 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
6096 size_in_bytes and pass LOC to it.
6098 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
6101 * c.opt (Wduplicate-decl-specifier): New option.
6103 2016-05-11 Marek Polacek <polacek@redhat.com>
6106 * c-common.c (diagnose_mismatched_attributes): New function.
6107 * c-common.h (diagnose_mismatched_attributes): Declare.
6109 2016-05-04 Marek Polacek <polacek@redhat.com>
6111 * c.opt (Wdangling-else): New option.
6113 2016-05-03 Marek Polacek <polacek@redhat.com>
6116 * c-common.c (builtin_function_validate_nargs): Add location
6118 (check_builtin_function_arguments): Add location and arguments
6119 parameters. Use them.
6120 * c-common.h (check_builtin_function_arguments): Update declaration.
6122 2016-05-03 Richard Biener <rguenther@suse.de>
6124 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
6125 allow call args to gimplify to SSA names.
6127 2016-05-03 Marek Polacek <polacek@redhat.com>
6129 * c-common.h (enum c_omp_region_type): Remove stray comma.
6131 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
6133 * c-common.h (enum c_omp_region_type): Define.
6135 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
6137 * c-common.c (shorten_compare): Use wi::to_wide.
6139 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
6142 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
6143 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
6144 reduction clauses in acc parallel loops.
6146 2016-04-29 Marek Polacek <polacek@redhat.com>
6149 * c-common.c (warn_for_memset): Check domain before accessing it.
6151 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
6154 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
6155 "aligned" attribute.
6157 2016-04-28 Jason Merrill <jason@redhat.com>
6159 * c-lex.c (c_common_has_attribute): Handle nodiscard.
6161 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
6162 Matthias Klose <doko@debian.org>
6164 * c-common.c (get_source_date_epoch): New function, gets the environment
6165 variable SOURCE_DATE_EPOCH and parses it as long long with error
6167 * c-common.h (get_source_date_epoch): Prototype.
6168 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
6170 2015-04-27 Ryan Burn <contact@rnburn.com>
6174 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
6175 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
6177 (cilk_detect_and_unwrap): Corresponding changes.
6178 (extract_free_variables): Don't extract free variables from
6179 AGGR_INIT_EXPR slot.
6180 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
6181 (cilk_recognize_spawn): Likewise.
6183 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
6185 * c.opt (Wmemset-elt-size): New option.
6186 * c-common.c (warn_for_memset): New function.
6187 * c-common.h (warn_for_memset): Declare.
6189 2016-04-25 Jason Merrill <jason@redhat.com>
6191 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
6193 * c-common.h: Declare it.
6194 * c-lex.c (c_common_has_attribute): Add maybe_unused.
6196 2016-04-22 Jason Merrill <jason@redhat.com>
6198 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
6200 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
6203 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
6204 * c-common.h (c_finish_cilk_clauses): Remove declaration.
6206 2016-04-18 Michael Matz <matz@suse.de>
6208 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
6211 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
6213 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
6214 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
6215 to incomplete types.
6216 (dump_nested_type): Remove redundant tests and tidy up.
6217 (print_ada_declaration): Also set TREE_VISITED on the declaration of
6218 a type which is the typedef of an original type.
6220 2016-04-15 Marek Polacek <polacek@redhat.com>
6223 * c-common.c (build_va_arg): Change two asserts into errors and return
6226 2016-04-13 Marek Polacek <polacek@redhat.com>
6229 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
6230 for switch statements, too.
6232 2016-03-28 Jason Merrill <jason@redhat.com>
6234 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
6236 2016-03-23 Marek Polacek <polacek@redhat.com>
6239 * c.opt (Wignored-attributes): New option.
6241 2016-03-22 David Malcolm <dmalcolm@redhat.com>
6244 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
6245 diagnostic text, reversing the order of the warning and note so
6246 that they appear in source order.
6248 2016-03-17 Marek Polacek <polacek@redhat.com>
6251 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
6254 2016-03-14 Jason Merrill <jason@redhat.com>
6256 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
6258 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
6260 2016-03-09 Richard Biener <rguenther@suse.de>
6263 * c-common.c (strict_aliasing_warning): Add back
6264 alias_sets_conflict_p check.
6266 2016-03-08 Jason Merrill <jason@redhat.com>
6268 * c-opts.c (set_std_cxx1z): Don't enable concepts.
6270 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6273 * c-indentation.c (get_visual_column): Move code to determine next
6275 (next_tab_stop): ...this new function.
6276 (line_contains_hash_if): Delete function.
6277 (detect_preprocessor_logic): Delete function.
6278 (get_first_nws_vis_column): New function.
6279 (detect_intervening_unindent): New function.
6280 (should_warn_for_misleading_indentation): Replace call to
6281 detect_preprocessor_logic with a call to
6282 detect_intervening_unindent.
6284 2016-03-04 David Malcolm <dmalcolm@redhat.com>
6287 * c-indentation.c (should_warn_for_misleading_indentation): When
6288 suppressing warnings about cases where the guard and body are on
6289 the same column, only use the first non-whitespace column in place
6290 of the guard token column when dealing with "else" clauses.
6291 When rejecting aligned BODY and NEXT, loosen the requirement
6292 from equality with the first non-whitespace of guard to simply
6293 that they not be indented relative to it.
6295 2016-03-04 Richard Biener <rguenther@suse.de>
6298 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
6299 instead of alias_sets_conflict_p.
6301 2016-03-01 Marek Polacek <polacek@redhat.com>
6304 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
6307 2016-02-22 Martin Sebor <msebor@redhat.com>
6310 * c-common.c (check_builtin_function_arguments): Validate and
6311 reject invalid arguments to __builtin_alloca_with_align.
6313 2016-02-20 Mark Wielaard <mjw@redhat.com>
6316 * c.opt (Wunused-const-variable): Turn into Alias for...
6317 (Wunused-const-variable=): New option.
6319 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6322 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
6324 (c_common_init_options): ...to here.
6325 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
6327 2016-02-19 Jakub Jelinek <jakub@redhat.com>
6330 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
6331 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
6332 flag_preprocess_only.
6334 2016-02-16 Jakub Jelinek <jakub@redhat.com>
6337 * c.opt (Wnonnull-compare): Enable for -Wall.
6339 2016-02-15 Jakub Jelinek <jakub@redhat.com>
6342 * c-common.c (sync_resolve_size): Diagnose too few arguments
6343 even when params is non-NULL empty vector.
6345 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
6348 * c.opt (fshort-double): Remove.
6350 2016-02-05 Martin Sebor <msebor@redhat.com>
6353 * c.opt (Warning options): Update -Wplacement-new to take
6354 an optional argument.
6356 2016-02-01 Jakub Jelinek <jakub@redhat.com>
6358 PR preprocessor/69543
6360 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
6361 instead of loc to control_warning_option.
6363 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
6365 * c.opt (fopenacc-dim=): New option.
6367 2016-01-27 Ryan Burn <contact@rnburn.com>
6370 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
6371 gimplify_arg. Removed superfluous post_p argument.
6372 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
6373 superfluous post_p argument.
6374 * c-gimplify.c (c_gimplify_expr): Likewise.
6376 2016-01-26 David Malcolm <dmalcolm@redhat.com>
6379 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
6380 pp_newline_and_flush with pp_flush.
6382 2016-01-20 Martin Sebor <msebor@redhat.com>
6385 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
6386 an incompatible argument when the argument isn't a valid tree node.
6388 2016-01-18 Jason Merrill <jason@redhat.com>
6391 * c-common.c (check_function_arguments_recurse): Fold the whole
6392 COND_EXPR, not just the condition.
6394 2016-01-18 Tom de Vries <tom@codesourcery.com>
6396 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
6397 classify as loop clause.
6399 2016-01-15 Jakub Jelinek <jakub@redhat.com>
6402 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
6403 C++ FE no longer has limit on number of pragmas.
6405 2015-01-14 Ryan Burn <contact@rnburn.com>
6408 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
6409 to add missing cleanup point.
6411 2016-01-14 David Malcolm <dmalcolm@redhat.com>
6414 * c-indentation.c (get_visual_column): Add location_t param.
6415 Handle the column number being zero by effectively disabling the
6416 warning, with an "inform".
6417 (should_warn_for_misleading_indentation): Add location_t argument
6418 for all uses of get_visual_column.
6420 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
6423 * c-indentation.c (should_warn_for_misleading_indentation):
6424 Don't warn about do-while statements.
6426 2016-01-07 Martin Sebor <msebor@redhat.com>
6429 * c-common.c (sync_resolve_size): Reject first argument when it's
6432 2016-01-05 David Malcolm <dmalcolm@redhat.com>
6435 * c-indentation.c (get_visual_column): Remove default argument.
6436 (should_warn_for_misleading_indentation): For the multiline case,
6437 update call to get_visual_column for next_stmt_exploc so that it
6438 captures the location of the first non-whitespace character in the
6439 relevant line. Don't issue warnings if there is non-whitespace
6440 before the next statement.
6442 2016-01-04 Jakub Jelinek <jakub@redhat.com>
6444 Update copyright years.
6446 2015-12-21 David Malcolm <dmalcolm@redhat.com>
6448 * c-common.c (binary_op_error): Convert first param from
6449 location_t to rich_location * and use it when emitting an error.
6450 * c-common.h (binary_op_error): Convert first param from
6451 location_t to rich_location *.
6453 2015-12-16 David Malcolm <dmalcolm@redhat.com>
6455 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
6456 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
6458 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
6460 * c-common.c (c_common_attribute_table): Handle "omp declare target
6463 2015-12-14 Jakub Jelinek <jakub@redhat.com>
6466 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
6468 2014-12-12 Tobias Burnus <burnus@net-b.de>
6471 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
6472 specifiers (%d, %i,%u and %c).
6474 2015-12-10 David Malcolm <dmalcolm@redhat.com>
6476 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
6478 2015-12-08 Jakub Jelinek <jakub@redhat.com>
6482 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
6483 * c-pragma.c (handle_pragma_diagnostic): Adjust
6484 control_warning_option caller.
6486 2015-12-07 David Malcolm <dmalcolm@redhat.com>
6488 * c-common.c (c_cpp_error): Update for change to
6489 rich_location::set_range.
6491 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
6493 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
6494 shifting 1 out of the sign bit.
6496 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
6498 * c-common.c (c_common_attribute_table[]): Update max arguments
6499 count for "simd" attribute.
6500 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
6502 2015-12-03 Jakub Jelinek <jakub@redhat.com>
6504 PR preprocessor/57580
6505 * c-ppoutput.c (print): Change printed field to bool.
6506 Move src_file last for smaller padding.
6507 (init_pp_output): Set print.printed to false instead of 0.
6508 (scan_translation_unit): Fix up formatting. Set print.printed
6509 to true after printing something other than newline.
6510 (scan_translation_unit_trad): Set print.printed to true instead of 1.
6511 (maybe_print_line_1): Set print.printed to false instead of 0.
6512 (print_line_1): Likewise.
6513 (do_line_change): Set print.printed to true instead of 1.
6514 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
6515 dump_macro): Set print.printed to false after printing newline.
6517 2015-12-02 Jason Merrill <jason@redhat.com>
6519 * c-common.c (fold_for_warn): New.
6520 (warn_logical_operator, warn_tautological_cmp)
6521 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
6523 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
6524 (c_fully_fold_internal, decl_constant_value_for_optimization):
6526 * c-common.h: Don't declare decl_constant_value_for_optimization.
6528 2015-12-02 Joseph Myers <joseph@codesourcery.com>
6531 * c-common.h (c_build_qualified_type): Add extra default
6534 2015-12-01 Julian Brown <julian@codesourcery.com>
6535 Cesar Philippidis <cesar@codesourcery.com>
6536 James Norris <James_Norris@mentor.com>
6538 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
6539 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
6540 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
6542 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
6544 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
6545 (decl_sloc_common): Delete and move bulk of processing to...
6546 (decl_sloc): ...here.
6547 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
6548 (dump_ada_double_name): Remove S parameter and compute the suffix.
6549 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
6550 element type and deal with an anonymous one.
6551 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
6552 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
6553 and remove reference to QUAL_UNION_TYPE.
6554 (dump_nested_types): Make 2 passes on the fields and move bulk to...
6555 (dump_nested_type): ...here. New function extracted from above.
6556 Generate a full declaration for anonymous element type of arrays.
6557 (print_ada_declaration): Really skip anonymous declarations. Remove
6558 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
6559 Clean up processing of declarations of array types and objects.
6560 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
6561 Remove obsolete code and tidy up.
6563 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
6566 * c-common.c (handle_transparent_union_attribute): Update
6569 2015-11-27 Martin Liska <mliska@suse.cz>
6572 * array-notation-common.c (cilkplus_extract_an_triplets):
6573 Release vector of vectors.
6574 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
6576 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
6579 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
6580 (print_ada_struct_decl): Likewise.
6582 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
6585 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
6586 * cilk.c (recognize_spawn): Determine location in a more precise
6589 2015-11-19 Jason Merrill <jason@redhat.com>
6591 * c-common.c (shorten_compare): But look through macros from
6594 2015-11-18 Jason Merrill <jason@redhat.com>
6596 * c-common.c (shorten_compare): Don't -Wtype-limits if the
6597 non-constant operand comes from a macro.
6599 2015-11-17 Jason Merrill <jason@redhat.com>
6602 * c-common.c (warn_tautological_cmp): Fold before checking for
6605 2015-11-16 Marek Polacek <polacek@redhat.com>
6608 * c-common.c (check_case_bounds): Fold low and high cases.
6610 2015-11-16 Marek Polacek <polacek@redhat.com>
6612 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
6613 * c-common.c (c_common_get_alias_set): Likewise.
6614 (handle_visibility_attribute): Likewise.
6616 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
6618 * c-common.c (handle_simd_attribute): New.
6619 (struct attribute_spec): Add entry for "simd".
6620 (handle_simd_attribute): New.
6622 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
6624 * c-lex.c (interpret_float): Use fold_convert.
6626 2015-11-13 David Malcolm <dmalcolm@redhat.com>
6628 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
6629 and store it on the result.
6630 * c-opts.c (c_common_init_options): Set
6631 global_dc->colorize_source_p.
6633 2015-11-12 James Norris <jnorris@codesourcery.com>
6634 Joseph Myers <joseph@codesourcery.com>
6636 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6637 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
6638 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
6639 PRAGMA_OACC_CLAUSE_LINK.
6641 2015-11-11 Marek Polacek <polacek@redhat.com>
6645 * c-common.c (valid_array_size_p): New function.
6646 * c-common.h (valid_array_size_p): Declare.
6648 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
6651 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
6653 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
6655 * array-notation-common.c: Remove unused header files.
6656 * c-ada-spec.c: Likewise.
6657 * c-cilkplus.c: Likewise.
6658 * c-common.c: Likewise.
6659 * c-cppbuiltin.c: Likewise.
6660 * c-dump.c: Likewise.
6661 * c-format.c: Likewise.
6662 * c-gimplify.c: Likewise.
6663 * c-indentation.c: Likewise.
6664 * c-lex.c: Likewise.
6665 * c-omp.c: Likewise.
6666 * c-opts.c: Likewise.
6667 * c-pch.c: Likewise.
6668 * c-ppoutput.c: Likewise.
6669 * c-pragma.c: Likewise.
6670 * c-pretty-print.c: Likewise.
6671 * c-semantics.c: Likewise.
6672 * c-ubsan.c: Likewise.
6674 * stub-objc.c: Likewise.
6676 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
6677 Cesar Philippidis <cesar@codesourcery.com>
6678 James Norris <jnorris@codesourcery.com>
6679 Julian Brown <julian@codesourcery.com>
6680 Nathan Sidwell <nathan@codesourcery.com>
6682 * c-pragma.c (oacc_pragmas): Add "routine".
6683 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
6685 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
6687 * c-common.c (c_common_attributes): Add scalar_storage_order.
6688 (handle_scalar_storage_order_attribute): New function.
6689 * c-pragma.c (global_sso): New variable.
6690 (maybe_apply_pragma_scalar_storage_order): New function.
6691 (handle_pragma_scalar_storage_order): Likewise.
6692 (init_pragma): Register scalar_storage_order.
6693 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
6694 * c.opt (Wscalar-storage-order): New warning.
6695 (fsso-struct=): New option.
6697 2015-11-08 Martin Sebor <msebor@redhat.com>
6699 * c.opt (Wplacement-new): Add a period to the end of a sentence.
6701 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
6703 * c-common.c: Don't undef DEF_BUILTIN.
6705 2015-11-06 David Malcolm <dmalcolm@redhat.com>
6707 * c-common.c (c_cpp_error): Convert parameter from location_t to
6708 rich_location *. Eliminate the "column_override" parameter and
6709 the call to diagnostic_override_column.
6710 Update the "done_lexing" clause to set range 0
6711 on the rich_location, rather than overwriting a location_t.
6712 * c-common.h (c_cpp_error): Convert parameter from location_t to
6713 rich_location *. Eliminate the "column_override" parameter.
6715 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
6716 Thomas Schwinge <thomas@codesourcery.com>
6717 James Norris <jnorris@codesourcery.com>
6719 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
6720 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
6721 clauses with parallel and kernels and loops.
6722 * c-pragma.h (enum pragma_omp_clause): Add entries for
6723 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
6724 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
6725 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
6727 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
6729 2015-11-05 Martin Sebor <msebor@redhat.com>
6732 * c.opt (-Wplacement-new): New option.
6734 2015-11-05 Jakub Jelinek <jakub@redhat.com>
6736 * c-common.h (c_finish_omp_atomic): Add TEST argument.
6737 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
6738 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
6739 save_expr or create_tmp_var* if TEST is true.
6740 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
6741 Don't call add_stmt here.
6742 (struct c_omp_check_loop_iv_data): New type.
6743 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
6744 c_omp_check_loop_iv_exprs): New functions.
6745 (c_omp_split_clauses): Adjust for lastprivate being allowed on
6747 (c_omp_declare_simd_clauses_to_numbers): Change
6748 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
6749 (c_omp_declare_simd_clauses_to_decls): Similarly change those
6750 from numbers to PARM_DECLs.
6752 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
6754 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
6757 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
6760 * c-common.h (fold_offsetof_1): Add argument.
6761 * c-common.c (fold_offsetof_1): Diagnose more invalid
6762 offsetof expressions that reference elements past the end of
6765 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
6766 Chung-Lin Tang <cltang@codesourcery.com>
6768 * c-pragma.c (oacc_pragmas): Add "atomic".
6769 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
6771 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
6773 * c-common.c (handle_target_clones_attribute): New.
6774 (c_common_attribute_table): Add handle_target_clones_attribute.
6775 (handle_always_inline_attribute): Add check on target_clones attribute.
6776 (handle_target_attribute): Ditto.
6778 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
6780 * array-notation-common.c: Reorder #include's and remove duplicates.
6781 * c-ada-spec.c: Likewise.
6782 * c-cilkplus.c: Likewise.
6783 * c-common.c: Likewise.
6784 * c-cppbuiltin.c: Likewise.
6785 * c-dump.c: Likewise.
6786 * c-format.c: Likewise.
6787 * c-gimplify.c: Likewise.
6788 * c-indentation.c: Likewise.
6789 * c-lex.c: Likewise.
6790 * c-omp.c: Likewise.
6791 * c-opts.c: Likewise.
6792 * c-pch.c: Likewise.
6793 * c-ppoutput.c: Likewise.
6794 * c-pragma.c: Likewise.
6795 * c-pretty-print.c: Likewise.
6796 * c-semantics.c: Likewise.
6797 * c-ubsan.c: Likewise.
6799 * stub-objc.c: Likewise.
6801 2015-10-28 Jason Merrill <jason@redhat.com>
6803 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
6805 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
6806 James Norris <jnorris@codesourcery.com>
6807 Cesar Philippidis <cesar@codesourcery.com>
6811 * c-common.h (c_oacc_split_loop_clauses): Declare function.
6812 * c-omp.c (c_oacc_split_loop_clauses): New function.
6814 2015-10-21 Martin Sebor <msebor@redhat.com>
6817 * c.opt: End each sentence that describes an option with a period.
6819 2015-10-20 Marek Polacek <polacek@redhat.com>
6821 * array-notation-common.c (is_cilkplus_vector_p): Define.
6822 * c-common.h (is_cilkplus_vector_p): Declare.
6824 2015-10-20 Marek Polacek <polacek@redhat.com>
6826 * c.opt (std=gnu++11): Do not describe as experimental.
6827 (std=gnu++14): Likewise.
6829 2015-10-19 Jason Merrill <jason@redhat.com>
6831 * c-cppbuiltin.c (c_cpp_builtins): Define
6832 __cpp_nontype_template_args.
6834 2015-10-19 Jason Merrill <jason@redhat.com>
6836 * c-cppbuiltin.c (c_cpp_builtins): Define
6837 __cpp_enumerator_attributes, __cpp_fold_expressions,
6838 __cpp_unicode_characters.
6840 2015-10-13 Jakub Jelinek <jakub@redhat.com>
6841 Aldy Hernandez <aldyh@redhat.com>
6843 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
6844 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
6845 (c_define_builtins): Likewise.
6846 * c-common.h (enum c_omp_clause_split): Add
6847 C_OMP_CLAUSE_SPLIT_TASKLOOP.
6848 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
6849 (c_finish_omp_for): Add ORIG_DECLV argument.
6850 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
6851 201511 instead of 201307.
6852 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
6853 OMP_CRITICAL_CLAUSES to it.
6854 (c_finish_omp_ordered): Add CLAUSES argument, set
6855 OMP_ORDERED_CLAUSES to it.
6856 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
6857 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
6858 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
6859 constructs and new OpenMP 4.5 clauses. Clear
6860 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
6862 * c-pragma.c (omp_pragmas_simd): Add taskloop.
6863 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
6864 (enum pragma_omp_clause): Add
6865 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
6866 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
6868 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
6870 * c-lex.c (interpret_float): Use real_equal instead of
6873 2015-10-04 Jason Merrill <jason@redhat.com>
6875 Implement N4514, C++ Extensions for Transactional Memory.
6876 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
6877 (c_common_attribute_table): Add transaction_safe_dynamic.
6878 transaction_safe now affects type identity.
6879 (handle_tm_attribute): Handle transaction_safe_dynamic.
6880 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
6881 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
6882 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
6884 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
6885 * c-pretty-print.c (pp_c_attributes_display): Don't print
6886 transaction_safe in C++.
6888 2015-10-02 Marek Polacek <polacek@redhat.com>
6890 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
6892 2015-10-02 Marek Polacek <polacek@redhat.com>
6895 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
6896 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
6897 * c.opt (Wduplicated-cond): New option.
6899 2015-10-01 Joseph Myers <joseph@codesourcery.com>
6901 * c.opt (std=c11): Do not describe as experimental.
6902 (std=gnu11): Likewise.
6903 (std=iso9899:2011): Likewise.
6905 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
6907 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
6908 (DEF_FUNCTION_TYPE_VAR_11): Delete.
6910 2015-09-25 Marek Polacek <polacek@redhat.com>
6912 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
6913 (ubsan_instrument_shift): Likewise.
6915 2015-09-25 Marek Polacek <polacek@redhat.com>
6918 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
6920 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
6922 * c-indentation.c (should_warn_for_misleading_indentation):
6923 Compare next_stmt_vis_column with guard_line_first_nws instead
6924 of with guard_line_vis_column.
6926 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
6930 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
6931 options and options not valid for the current language.
6933 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
6935 * c-indentation.c (should_warn_for_misleading_indentation):
6936 Float out and consolidate the calls to get_visual_column that
6937 are passed guard_exploc as an argument. Compare
6938 next_stmt_vis_column with guard_line_first_nws instead of with
6939 body_line_first_nws.
6941 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
6943 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
6944 Wnamespaces): New C++ warnings.
6946 2015-09-22 Jason Merrill <jason@redhat.com>
6948 * c-common.h (abi_compat_version_crosses): New.
6949 (warn_abi_version): Declare.
6950 * c-common.c: Define it.
6951 * c-opts.c (c_common_post_options): Handle it.
6952 flag_abi_compat_version defaults to 8.
6954 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
6956 Complete the implementation of N4230, Nested namespace definition.
6957 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
6958 __cpp_nested_namespace_definitions.
6960 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6962 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
6964 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
6966 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
6968 * c-pragma.h (pragma_lex): Add optional loc argument.
6970 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
6972 * c-format.c (check_format_arg): Adjust to use common block size in all
6975 2015-09-15 David Malcolm <dmalcolm@redhat.com>
6977 * c-format.c (location_from_offset): Update for change in
6978 signature of location_get_source_line.
6979 * c-indentation.c (get_visual_column): Likewise.
6980 (line_contains_hash_if): Likewise.
6982 2015-09-14 Marek Polacek <polacek@redhat.com>
6984 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
6985 setting various warnings.
6987 2015-09-14 Marek Polacek <polacek@redhat.com>
6989 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
6992 2015-09-11 Mark Wielaard <mjw@redhat.com>
6995 * c.opt (Wunused-variable): Option from common.opt.
6996 (Wunused-const-variable): New option.
6998 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7001 * c.opt ([Wsubobject-linkage]): Add.
7003 2015-09-03 Martin Sebor <msebor@redhat.com>
7006 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
7008 * c-common.c (reject_gcc_builtin): Define.
7010 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
7013 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
7015 * c-gimplify.c (c_gimplify_expr): Added a call to the function
7016 cilk_gimplify_call_params_in_spawned_fn.
7017 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
7018 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
7021 2015-08-25 Marek Polacek <polacek@redhat.com>
7024 * c-common.c (handle_weak_attribute): Don't check whether the
7025 visibility can be changed here.
7027 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7029 * c-lex.c (c_lex_with_flags): Use explicit locations.
7031 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
7033 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
7034 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
7036 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7039 * c-common.c (check_builtin_function_arguments): Add check
7040 for BUILT_IN_SIGNBIT argument.
7042 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
7045 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
7048 2015-08-17 Marek Polacek <polacek@redhat.com>
7050 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
7051 with whitespaces before qualifier names.
7053 2015-08-12 Marek Polacek <polacek@redhat.com>
7056 * c-common.c (maybe_warn_shift_overflow): Properly handle
7057 left-shifting 1 into the sign bit.
7059 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7061 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
7063 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
7064 Braden Obrzut <admin@maniacsvault.net>
7065 Jason Merrill <jason@redhat.com>
7067 Add C++ Concepts TS support.
7068 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
7069 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
7070 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
7071 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
7072 * c-opts.c (set_std_cxx1z): Set flag_concepts.
7073 * c.opt (fconcepts): New.
7075 2015-08-02 Martin Sebor <msebor@redhat.com>
7077 * c.opt (-Wframe-address): New warning option.
7079 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7081 * c-indentation.c (should_warn_for_misleading_indentation):
7084 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7086 * c-indentation.c (get_visual_column): Add parameter first_nws,
7087 use it. Update comment documenting the function.
7088 (is_first_nonwhitespace_on_line): Remove.
7089 (should_warn_for_misleading_indentation): Replace usage of
7090 of is_first_nonwhitespace_on_line with get_visual_column.
7092 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
7094 * c-indentation.h (struct token_indent_info): Define.
7095 (get_token_indent_info): Define.
7096 (warn_for_misleading_information): Declare.
7097 * c-common.h (warn_for_misleading_information): Remove.
7098 * c-identation.c (warn_for_misleading_indentation):
7099 Change declaration to take three token_indent_infos. Adjust
7101 * c-identation.c (should_warn_for_misleading_indentation):
7102 Likewise. Bail out early if the body is a compound statement.
7103 (guard_tinfo_to_string): Define.
7105 2015-07-30 Jason Merrill <jason@redhat.com>
7107 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
7108 '*' for reference decay.
7110 2015-07-30 Marek Polacek <polacek@redhat.com>
7112 * c-common.c (warn_tautological_cmp): Bail for float types.
7114 2015-07-27 Marek Polacek <polacek@redhat.com>
7117 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
7119 2015-07-27 Marek Polacek <polacek@redhat.com>
7123 * c-common.c (find_array_ref_with_const_idx_r): New function.
7124 (warn_tautological_cmp): New function.
7125 * c-common.h (warn_tautological_cmp): Declare.
7126 * c.opt (Wtautological-compare): New option.
7128 2015-07-23 Marek Polacek <polacek@redhat.com>
7130 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
7131 (ubsan_instrument_shift): Likewise.
7133 2015-07-23 Marek Polacek <polacek@redhat.com>
7136 * c-ubsan.c: Include gimplify.h.
7137 (ubsan_instrument_division): Unshare OP0 and OP1.
7138 (ubsan_instrument_shift): Likewise.
7140 2015-07-20 Marek Polacek <polacek@redhat.com>
7141 Richard Sandiford <richard.sandiford@arm.com>
7144 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
7145 Use EXPR_LOC_OR_LOC.
7146 (maybe_warn_shift_overflow): New function.
7147 * c-common.h (maybe_warn_shift_overflow): Declare.
7148 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
7149 * c.opt (Wshift-overflow): New option.
7151 2015-07-16 Martin Liska <mliska@suse.cz>
7153 * c-format.c (static void check_format_info_main): Use
7154 object_allocator instead of pool_allocator.
7155 (check_format_arg): Likewise.
7156 (check_format_info_main): Likewise.
7158 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
7160 * c-opts.c: Remove multiline #include comment.
7162 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
7164 * c-common.c: Fix double word typos.
7166 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
7168 * c-ada-spec.h (cpp_operation): Revert latest change.
7169 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
7170 constructors and destructors.
7172 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
7174 * c-common.h: Adjust includes for flags.h changes.
7175 * stub-objc.c: Likewise.
7177 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
7179 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
7180 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
7182 2015-07-08 Jakub Jelinek <jakub@redhat.com>
7184 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
7185 are to be removed, return NULL rather than original clauses list.
7187 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
7189 * array-notation-common.c: Adjust includes.
7190 * c-ada-spec.c: Likewise.
7191 * c-cilkplus.c: Likewise.
7192 * c-common.h: Likewise.
7193 * c-cppbuiltin.c: Likewise.
7194 * c-dump.c: Likewise.
7195 * c-format.c: Likewise.
7196 * c-gimplify.c: Likewise.
7197 * c-indentation.c: Likewise.
7198 * c-lex.c: Likewise.
7199 * c-omp.c: Likewise.
7200 * c-opts.c: Likewise.
7201 * c-pch.c: Likewise.
7202 * c-ppoutput.c: Likewise.
7203 * c-pragma.c: Likewise.
7204 * c-pretty-print.c: Likewise.
7205 * c-semantics.c: Likewise.
7206 * c-ubsan.c: Likewise.
7208 * stub-objc.c: Likewise.
7210 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
7212 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
7213 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
7215 2015-07-01 Jason Merrill <jason@redhat.com>
7217 * c-common.h (D_CXX11): Rename from D_CXX0X.
7218 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
7219 * c-common.c: Adjust.
7221 * c-opts.c (c_common_post_options): Default to C++14.
7223 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
7225 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
7227 Implement N4197 - Adding u8 character literals
7228 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
7230 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
7231 CPP_UTF8CHAR_USERDEF tokens.
7232 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
7233 and CPP_UTF8CHAR tokens.
7234 (lex_charconst): Treat CPP_UTF8CHAR token.
7236 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7239 * c-common.c (do_warn_unused_parameter): Move here.
7240 * c-common.h (do_warn_unused_parameter): Declare.
7242 2015-06-29 Marek Polacek <polacek@redhat.com>
7245 * c-common.c (check_case_bounds): Add bool * parameter. Set
7247 (c_add_case_label): Add bool * parameter. Pass it down to
7249 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
7251 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
7254 2015-06-27 Marek Polacek <polacek@redhat.com>
7256 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
7257 or VECTOR_INTEGER_TYPE_P throughout.
7258 * c-gimplify.c: Likewise.
7260 2015-06-26 Marek Polacek <polacek@redhat.com>
7262 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
7263 * c-common.c (c_fully_fold_internal): Likewise.
7264 (c_alignof_expr): Likewise.
7265 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
7266 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
7267 * cilk.c (create_parm_list): Likewise.
7269 2015-06-26 Marek Polacek <polacek@redhat.com>
7271 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
7273 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7275 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
7276 * c-gimplify.c: Likewise.
7277 * c-pragma.c: Likewise.
7278 * c-ubsan.c: Likewise.
7281 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7283 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
7286 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
7288 * cilk.c: Move calls.h after tm.h in the include chain.
7290 2015-06-25 Marek Polacek <polacek@redhat.com>
7292 * array-notation-common.c: Use VAR_P throughout.
7293 * c-ada-spec.c: Likewise.
7294 * c-common.c: Likewise.
7295 * c-format.c: Likewise.
7296 * c-gimplify.c: Likewise.
7297 * c-omp.c: Likewise.
7298 * c-pragma.c: Likewise.
7299 * c-pretty-print.c: Likewise.
7302 2015-06-25 Marek Polacek <polacek@redhat.com>
7304 * cilk.c (extract_free_variables): Use is_global_var.
7306 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
7308 * c-common.c: Don't include target-def.h.
7310 2015-06-23 Marek Polacek <polacek@redhat.com>
7312 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
7313 when comparing INTEGER_CSTs.
7315 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
7317 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
7318 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
7319 (dump_ada_template): Skip partially specialized types.
7321 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
7323 * c-common.c (scalar_to_vector): Use std::swap instead of manually
7326 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
7328 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
7329 * c-ada-spec.c: Likewise.
7330 * c-cilkplus.c: Likewise.
7331 * c-common.c: Likewise.
7332 * c-common.h: Likewise.
7333 * c-cppbuiltin.c: Likewise.
7334 * c-dump.c: Likewise.
7335 * c-format.c: Likewise.
7336 * c-gimplify.c: Likewise.
7337 * c-indentation.c: Likewise.
7338 * c-lex.c: Likewise.
7339 * c-omp.c: Likewise.
7340 * c-opts.c: Likewise.
7341 * c-pch.c: Likewise.
7342 * c-ppoutput.c: Likewise.
7343 * c-pragma.c: Likewise.
7344 * c-pretty-print.c: Likewise.
7345 * c-semantics.c: Likewise.
7346 * c-ubsan.c: Likewise.
7348 * stub-objc.c: Likewise.
7350 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
7353 * c-common.c (c_common_truthvalue_conversion): Warn when
7354 converting an address of a reference to a truth value.
7356 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
7358 * array-notation-common.c : Adjust include files.
7359 * c-ada-spec.c : Likewise.
7360 * c-cilkplus.c : Likewise.
7361 * c-common.c : Likewise.
7362 * c-common.h : Likewise.
7363 * c-cppbuiltin.c : Likewise.
7364 * c-dump.c : Likewise.
7365 * c-format.c : Likewise.
7366 * c-gimplify.c : Likewise.
7367 * c-indentation.c : Likewise.
7368 * c-lex.c : Likewise.
7369 * c-omp.c : Likewise.
7370 * c-opts.c : Likewise.
7371 * c-pch.c : Likewise.
7372 * c-ppoutput.c : Likewise.
7373 * c-pragma.c : Likewise.
7374 * c-pretty-print.c : Likewise.
7375 * c-semantics.c : Likewise.
7376 * c-ubsan.c : Likewise.
7377 * cilk.c : Likewise.
7378 * stub-objc.c : Likewise.
7380 2015-06-08 Marek Polacek <polacek@redhat.com>
7383 * c-format.c (location_from_offset): Return LOC if LINE is null.
7385 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
7387 * c-common.h (c_parse_final_cleanups): New prototype.
7388 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
7390 2015-06-04 Sriraman Tallam <tmsriram@google.com>
7392 * c-common.c (noplt): New attribute.
7393 (handle_noplt_attribute): New handler.
7395 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
7397 * array-notation-common.c: Adjust includes for restructured coretypes.h.
7398 * c-ada-spec.c: Likewise.
7399 * c-cilkplus.c: Likewise.
7400 * c-common.c: Likewise.
7401 * c-common.h: Likewise.
7402 * c-cppbuiltin.c: Likewise.
7403 * c-dump.c: Likewise.
7404 * c-format.c: Likewise.
7405 * c-gimplify.c: Likewise.
7406 * c-indentation.c: Likewise.
7407 * c-lex.c: Likewise.
7408 * c-omp.c: Likewise.
7409 * c-opts.c: Likewise.
7410 * c-pch.c: Likewise.
7411 * c-ppoutput.c: Likewise.
7412 * c-pragma.c: Likewise.
7413 * c-pretty-print.c: Likewise.
7414 * c-semantics.c: Likewise.
7415 * c-ubsan.c: Likewise.
7417 * stub-objc.c: Likewise.
7419 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7422 * c-indentation.c (should_warn_for_misleading_indentation): Use
7423 expand_location rather than expand_location_to_spelling_point.
7424 Don't warn if the guarding statement is more indented than the
7427 2015-06-02 David Malcolm <dmalcolm@redhat.com>
7429 * c-indentation.c (warn_for_misleading_indentation): Bail out
7430 immediately if -Wmisleading-indentation isn't enabled.
7432 2015-06-01 Martin Liska <mliska@suse.cz>
7434 * c-format.c (check_format_arg):Use new type-based pool allocator.
7435 (check_format_info_main) Likewise.
7437 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
7439 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
7440 (has_nontrivial_methods): Likewise.
7442 2015-05-25 Marek Polacek <polacek@redhat.com>
7444 * c-ubsan.c (ubsan_instrument_shift): Use type0.
7446 2015-05-22 Marek Polacek <polacek@redhat.com>
7449 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
7451 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7453 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
7454 STACK_GROWS_DOWNWARD.
7456 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
7458 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
7459 STACK_GROWS_DOWNWARD rather than if it is defined.
7461 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7464 * c-format.c (location_column_from_byte_offset): New.
7465 (location_from_offset): New.
7466 (struct format_wanted_type): Add offset_loc field.
7467 (check_format_info): Move handling of location for extra arguments
7468 closer to the point of warning.
7469 (check_format_info_main): Pass the result of location_from_offset
7471 (format_type_warning): Pass the result of location_from_offset
7474 2015-05-20 Marek Polacek <polacek@redhat.com>
7476 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
7478 2015-05-20 Marek Polacek <polacek@redhat.com>
7480 * c-ada-spec.c (dump_sloc): Use DECL_P.
7482 2015-05-20 Marek Polacek <polacek@redhat.com>
7484 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
7485 * c-common.c: Likewise.
7487 2015-05-19 David Malcolm <dmalcolm@redhat.com>
7489 * c-common.h (fe_file_change): Strengthen param from
7490 const line_map * to const line_map_ordinary *.
7491 (pp_file_change): Likewise.
7492 * c-lex.c (fe_file_change): Likewise.
7493 (cb_define): Use linemap_check_ordinary when invoking
7495 (cb_undef): Likewise.
7496 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
7497 invoking cb_file_change.
7498 (c_finish_options): Likewise.
7499 (push_command_line_include): Likewise.
7500 (cb_file_change): Strengthen param "new_map" from
7501 const line_map * to const line_map_ordinary *.
7502 * c-ppoutput.c (cb_define): Likewise for local "map".
7503 (pp_file_change): Likewise for param "map" and local "from".
7505 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
7507 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
7509 2015-05-18 Tom de Vries <tom@codesourcery.com>
7511 * c-common.c (build_va_arg_1): New function.
7512 (build_va_arg): Add address operator to va_list operand if necessary.
7514 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
7517 * c-common.c (int_safely_convertible_to_real_p): Define.
7518 (unsafe_conversion_p): Check conversions involving complex types.
7519 (conversion_warning): Add new warning message for conversions which
7520 discard imaginary component.
7521 * c-common.h: (enum conversion_safety): Add new enumerator for such
7524 2015-05-14 Marek Polacek <polacek@redhat.com>
7528 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
7529 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
7530 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
7531 use it. If FOR_INT_CONST, require that all evaluated operands be
7534 2015-05-12 David Malcolm <dmalcolm@redhat.com>
7536 * c-common.h (warn_for_misleading_indentation): New prototype.
7537 * c-indentation.c: New file.
7538 * c.opt (Wmisleading-indentation): New option.
7540 2015-05-12 Tom de Vries <tom@codesourcery.com>
7542 PR tree-optimization/66010
7543 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
7545 2015-05-09 Jason Merrill <jason@redhat.com>
7547 * c-opts.c (c_common_post_options): Also clear
7548 cpp_opts->cpp_warn_cxx11_compat.
7550 * c-common.h (enum cxx_dialect): Add cxx_unset.
7551 * c-common.c (cxx_dialect): Initialize to cxx_unset.
7552 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
7554 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
7555 (std=gnu++0x): Mark as Undocumented.
7556 (std=gnu++1y): Add deprecated message.
7558 2015-05-08 Jason Merrill <jason@redhat.com>
7560 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
7563 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
7565 2015-05-08 Marek Polacek <polacek@redhat.com>
7568 * c.opt (Woverride-init-side-effects): New option.
7570 2015-05-07 Marek Polacek <polacek@redhat.com>
7573 * c-common.c (c_fully_fold_internal): Warn when left shifting a
7575 * c.opt (Wshift-negative-value): New option.
7576 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
7577 when -Wextra and C99/C++11 mode.
7579 2015-05-07 Marek Polacek <polacek@redhat.com>
7580 Martin Uecker <uecker@eecs.berkeley.edu>
7582 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
7583 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
7585 2015-05-05 Jason Merrill <jason@redhat.com>
7587 * c.opt (Wterminate): New.
7589 2015-04-30 Marek Polacek <polacek@redhat.com>
7591 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
7592 require that the non-constant be of a boolean type.
7594 2015-04-29 Josh Triplett <josh@joshtriplett.org>
7596 * c-common.c (handle_section_attribute): Refactor to reduce
7597 nesting and distinguish between error cases.
7599 2015-04-29 Marek Polacek <polacek@redhat.com>
7602 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
7605 2015-04-29 Jakub Jelinek <jakub@redhat.com>
7607 * c-common.h (omp_clause_mask): Unconditionally define as a class.
7608 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
7609 HOST_BITS_PER_WIDE_INT.
7611 2015-04-28 Tom de Vries <tom@codesourcery.com>
7613 PR tree-optimization/65887
7614 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
7616 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
7617 Pierre-Marie de Rodat <derodat@adacore.com>
7619 * c-ada-spec.c (in_function): Delete.
7620 (dump_generic_ada_node): Do not change in_function and remove the
7621 redundant code dealing with it.
7622 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
7623 (print_ada_methods): Output the static member functions in a nested
7624 package after the regular methods as well as associated renamings.
7626 2015-04-24 Marek Polacek <polacek@redhat.com>
7629 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
7630 and OPT_Wshift_count_overflow.
7633 * c-common.c (warn_logical_operator): Warn if the operands have the
7636 2015-04-24 Marek Polacek <polacek@redhat.com>
7639 * c-common.c (warn_logical_operator): Bail if either operand comes
7640 from a macro expansion.
7642 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
7645 * c-common.c (c_default_pointer_mode): Add definition.
7646 * c-common.h (c_default_pointer_mode): Add declaration.
7648 2015-03-11 Jakub Jelinek <jakub@redhat.com>
7650 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
7651 on record_builtin_type argument.
7653 2015-03-10 Jakub Jelinek <jakub@redhat.com>
7656 * c-common.c (warn_logical_not_parentheses): Don't warn for
7659 2015-03-07 Marek Polacek <polacek@redhat.com>
7662 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
7663 before trying to figure out whether we have a flexible array member.
7665 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
7666 Jonathan Wakely <jwakely.gcc@gmail.com>
7668 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
7670 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
7673 * c-ada-spec.c (print_destructor): Remove obsolete code.
7675 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
7677 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
7678 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
7679 DECL_TEMPLATE_RESULT emulations.
7680 (dump_ada_template)): Add guard for TYPE_METHODS.
7682 2015-02-27 Marek Polacek <polacek@redhat.com>
7685 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
7687 2015-02-27 Kai Tietz <ktietz@redhat.com>
7690 * c-pragma.c (handle_pragma_weak): Do not try to create
7691 weak/alias of declarations not being function, or variable
7694 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
7697 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7699 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
7701 2015-02-16 Marek Polacek <polacek@redhat.com>
7704 * c-format.c (check_format_types): Handle null param.
7706 2015-02-13 Marek Polacek <polacek@redhat.com>
7709 * c-format.c (check_format_types): Don't warn about different
7710 signedness if the original value is in the range of WANTED_TYPE.
7712 2015-02-12 Jason Merrill <jason@redhat.com>
7715 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
7716 to the current highest version.
7717 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
7719 2015-02-04 Jakub Jelinek <jakub@redhat.com>
7723 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
7724 instead of RDIV_EXPR. Use build_binary_op instead of
7727 2015-01-30 Joseph Myers <joseph@codesourcery.com>
7729 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
7730 to pass input_location as first argument.
7732 2015-01-23 Tom de Vries <tom@codesourcery.com>
7735 * c.opt (fopenacc): Mark as LTO option.
7737 2015-01-23 Tom de Vries <tom@codesourcery.com>
7740 * c.opt (fopenmp): Mark as LTO option.
7742 2015-01-21 Jakub Jelinek <jakub@redhat.com>
7745 * cilk.c (fill_decls_vec): Only put decls into vector v.
7746 (compare_decls): Fix up formatting.
7748 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
7751 * cilk.c: Include vec.h.
7752 (struct cilk_decls): New structure.
7753 (wrapper_parm_cb): Split this function to...
7754 (fill_decls_vec): ...this...
7755 (create_parm_list): ...and this.
7756 (compare_decls): New function.
7757 (for_local_cb): Remove.
7758 (wrapper_local_cb): Ditto.
7759 (build_wrapper_type): For now first traverse and fill vector of
7760 declarations then sort it and then deal with sorted vector.
7761 (cilk_outline): Ditto.
7762 (declare_one_free_variable): Ditto.
7764 2015-01-21 Jason Merrill <jason@redhat.com>
7767 * c-format.c (check_format_arg): Call decl_constant_value.
7769 2015-01-19 Martin Liska <mliska@suse.cz>
7771 * c-common.c (handle_noicf_attribute): New function.
7773 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
7774 Bernd Schmidt <bernds@codesourcery.com>
7775 James Norris <jnorris@codesourcery.com>
7776 Cesar Philippidis <cesar@codesourcery.com>
7777 Ilmir Usmanov <i.usmanov@samsung.com>
7778 Jakub Jelinek <jakub@redhat.com>
7780 * c.opt (fopenacc): New option.
7781 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
7782 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
7784 * c-common.h (c_finish_oacc_wait): New prototype.
7785 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
7786 (c_finish_oacc_wait): New function.
7787 * c-pragma.c (oacc_pragmas): New variable.
7788 (c_pp_lookup_pragma, init_pragma): Handle it.
7789 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
7790 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
7791 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
7792 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
7793 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
7794 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
7795 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
7796 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
7797 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
7798 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
7799 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
7800 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
7801 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
7802 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
7803 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
7804 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
7805 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
7806 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
7807 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
7808 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
7809 PRAGMA_OACC_CLAUSE_WORKER.
7811 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
7813 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
7814 for the new option fstack-protector_explicit.
7815 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
7816 (handle_stack_protect_attribute): New function.
7818 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
7820 * c.opt: New option -Warray-bounds=.
7822 2015-01-09 Michael Collison <michael.collison@linaro.org>
7824 * array-notation-common.c: Include hash-set.h, machmode.h,
7825 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7826 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
7827 * c-ada-spec.c: Ditto.
7828 * c-cilkplus.c: Ditto.
7829 * c-common.c: Include input.h due to flattening of tree.h.
7830 Define macro GCC_C_COMMON_C.
7831 * c-common.h: Flatten tree.h header files into c-common.h.
7832 Remove include of tree-core.h.
7833 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7834 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7835 fold-const.h, wide-int.h, and inchash.h due to
7836 flattening of tree.h.
7838 * c-format.c: Flatten tree.h header files into c-common.h.
7839 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
7840 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7841 fold-const.h, wide-int.h, and inchash.h due to
7842 flattening of tree.h.
7843 * c-dump.c: Include hash-set.h, machmode.h,
7844 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7845 fold-const.h, wide-int.h, and inchash.h due to
7846 flattening of tree.h.
7847 * c-format.c: Include hash-set.h, machmode.h,
7848 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7849 fold-const.h, wide-int.h, inchash.h and real.h due to
7850 flattening of tree.h.
7851 * c-gimplify.c: Include hash-set.h, machmode.h,
7852 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
7853 fold-const.h, wide-int.h, and inchash.h due to
7854 flattening of tree.h.
7860 * c-ppoutput.c: Ditto.
7861 * c-pragma.c: Ditto.
7862 * c-pretty-print.c: Ditto.
7863 * c-semantics.c: Ditto.
7865 * stub-objc.c: Ditto.
7867 2015-01-08 Jason Merrill <jason@redhat.com>
7869 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
7870 do_ubsan_in_current_function.
7871 (ubsan_maybe_instrument_reference_or_call): Likewise.
7872 * c-ubsan.h: Declare it.
7874 2015-01-08 Mike Stump <mikestump@comcast.net>
7876 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
7878 2015-01-07 Marek Polacek <polacek@redhat.com>
7881 * c-common.c (c_fully_fold_internal): Warn for division and modulo
7882 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
7884 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
7887 * c.opt (Wsuggest-override): New option.
7889 2015-01-05 Jakub Jelinek <jakub@redhat.com>
7891 Update copyright years.
7893 2015-01-05 Marek Polacek <polacek@redhat.com>
7896 * c-common.c (warn_array_subscript_with_type_char): Add location_t
7898 * c-common.h (warn_array_subscript_with_type_char): Update
7901 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
7903 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
7904 Control macro with flag_sized_deallocation.
7906 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
7908 * c.opt (Wdiscarded-array-qualifiers): New option.
7910 2014-12-19 Jakub Jelinek <jakub@redhat.com>
7912 PR preprocessor/63831
7913 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
7914 and __has_cpp_attribute here.
7915 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
7916 c_common_has_attribute.
7917 * c-common.h (c_common_has_attribute): New prototype.
7918 * c-lex.c (init_c_lex): Set cb->has_attribute to
7919 c_common_has_attribute instead of cb_has_attribute.
7920 (get_token_no_padding): New function.
7921 (cb_has_attribute): Renamed to ...
7922 (c_common_has_attribute): ... this. No longer static. Use
7923 get_token_no_padding, require ()s, don't build TREE_LIST
7924 unnecessarily, fix up formatting, adjust diagnostics, call
7927 2014-12-15 Jason Merrill <jason@redhat.com>
7929 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
7930 (-Wsized-deallocation): New.
7931 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
7932 to on in C++14 and up.
7934 2014-12-11 Jason Merrill <jason@redhat.com>
7936 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
7938 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
7939 we aren't complaining about VLAs.
7941 2014-12-06 Marek Polacek <polacek@redhat.com>
7943 PR tree-optimization/64183
7944 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
7945 shift-expression if it is integer_type_node. Use types_compatible_p.
7947 2014-11-29 Jakub Jelinek <jakub@redhat.com>
7949 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
7950 last argument from create_tmp_var_raw and create_tmp_var calls.
7951 * cilk.c (gimplify_cilk_spawn): Likewise.
7952 * c-omp.c (c_finish_omp_atomic): Likewise.
7954 2014-11-28 Marek Polacek <polacek@redhat.com>
7956 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
7957 instead of unsigned_type_node.
7959 2014-11-28 Marek Polacek <polacek@redhat.com>
7962 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
7964 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
7965 expression to unsigned_type_node.
7967 2014-11-20 Mark Wielaard <mjw@redhat.com>
7970 * c-opts.c (set_std_c89): Set lang_hooks.name.
7971 (set_std_c99): Likewise.
7972 (set_std_c11): Likewise.
7973 (set_std_cxx98): Likewise.
7974 (set_std_cxx11): Likewise.
7975 (set_std_cxx14): Likewise.
7976 (set_std_cxx1z): Likewise.
7978 2014-11-21 Jakub Jelinek <jakub@redhat.com>
7981 * c-common.h (convert_vector_to_pointer_for_subscript): Change
7982 return type to bool.
7983 * c-common.c: Include gimple-expr.h.
7984 (convert_vector_to_pointer_for_subscript): Change return type to
7985 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
7986 and copy it into a TARGET_EXPR and use that instead of *vecp
7989 2014-11-19 David Malcolm <dmalcolm@redhat.com>
7991 Merger of git branch "gimple-classes-v2-option-3".
7992 * ChangeLog.gimple-classes: New.
7993 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
7994 from being just a vec<gimple> to a vec<gbind *>.
7996 2014-11-18 Jakub Jelinek <jakub@redhat.com>
7999 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
8000 argument to ptype, set type to TREE_TYPE (ptype). Don't call
8001 get_pointer_alignment for non-pointers. Use ptype, or if it is
8002 reference type, corresponding pointer type, as type of kind
8004 (ubsan_maybe_instrument_reference,
8005 ubsan_maybe_instrument_member_call): Adjust callers.
8007 2014-11-15 Marek Polacek <polacek@redhat.com>
8010 * array-notation-common.c (is_sec_implicit_index_fn): Return false
8012 (extract_array_notation_exprs): Return for NULL node.
8014 2014-11-12 Joseph Myers <joseph@codesourcery.com>
8016 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
8017 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
8019 2014-11-12 Jakub Jelinek <jakub@redhat.com>
8022 * c-common.c (check_builtin_function_arguments): Handle
8023 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
8025 2014-11-10 Andi Kleen <ak@linux.intel.com>
8028 * c-common.h (check_no_cilk): Declare.
8029 * cilk.c (get_error_location): New function.
8030 (check_no_cilk): Dito.
8032 2014-11-10 Andi Kleen <ak@linux.intel.com>
8034 * cilk.c (recognize_spawn): Use expression location
8037 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
8039 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
8041 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
8043 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
8044 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
8045 (__cpp_range_based_for, __cpp_initializer_lists,
8046 __cpp_delegating_constructors, __cpp_nsdmi,
8047 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
8048 for C++11; (__cpp_attribute_deprecated): Remove in favor of
8049 __has_cpp_attribute.
8050 * c-lex.c (cb_has_attribute): New callback CPP function;
8051 (init_c_lex): Set has_attribute callback.
8053 2014-11-04 Richard Biener <rguenther@suse.de>
8055 * c-common.c (shorten_compare): Do not shorten mixed
8056 DFP and non-DFP compares.
8058 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8060 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
8061 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
8062 Commentary and rearrangement of tests.
8063 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
8064 Commentary and rearrangement of tests.
8065 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
8066 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
8068 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
8070 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
8071 enum from machine_mode.
8073 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
8075 * c-common.c: Adjust include files.
8076 * c-gimplify.c: Ditto.
8078 * c-pragma.c: Ditto.
8081 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
8083 * c-gimplify.c: Adjust include files.
8085 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
8088 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
8089 c_common_initialize_diagnostics.
8090 * c-common.h: Likewise.
8092 2014-10-24 Marek Polacek <polacek@redhat.com>
8095 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
8096 print "struct"/"union"/"enum" for typedefed names.
8098 2014-10-23 Marek Polacek <polacek@redhat.com>
8100 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
8103 2014-10-22 Jakub Jelinek <jakub@redhat.com>
8104 Yury Gribov <y.gribov@samsung.com>
8106 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8107 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
8108 instead of flag_sanitize_recover as bool flag.
8110 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
8112 * cilk.c: Revert previous change.
8114 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
8117 * cilk.c: Include vec.h.
8118 (struct cilk_decls): New structure.
8119 (wrapper_parm_cb): Split this function to...
8120 (fill_decls_vec): ...this...
8121 (create_parm_list): ...and this.
8122 (compare_decls): New function.
8123 (for_local_cb): Remove.
8124 (wrapper_local_cb): Ditto.
8125 (build_wrapper_type): For now first traverse and fill vector of
8126 declarations then sort it and then deal with sorted vector.
8127 (cilk_outline): Ditto.
8128 (declare_one_free_variable): Ditto.
8130 2014-10-17 Marek Polacek <polacek@redhat.com>
8132 * c-opts.c (c_common_post_options): Set warn_implicit_int.
8133 * c.opt (Wimplicit-int): Initialize to -1.
8135 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
8137 * c-pragma.c: Adjust include files.
8138 * c-semantics.c: Likewise.
8140 2014-10-16 DJ Delorie <dj@redhat.com>
8142 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
8145 2014-10-14 Jason Merrill <jason@redhat.com>
8148 * c-common.h (CPP_PREPARSED_EXPR): New.
8149 (N_CP_TTYPES): Adjust.
8151 2014-10-15 Marek Polacek <polacek@redhat.com>
8153 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
8155 2014-10-14 DJ Delorie <dj@redhat.com>
8157 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
8158 types, not just __int128.
8159 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
8160 types, not just __int128.
8161 (cpp_atomic_builtins): Round pointer sizes up.
8162 (type_suffix): Use type precision, not specific types.
8163 * c-common.c (c_common_reswords): Remove __int128 special case.
8164 (c_common_type_for_size): Check for all __intN types, not just
8166 (c_common_type_for_mode): Likewise.
8167 (c_common_signed_or_unsigned_type): Likewise.
8168 (c_build_bitfield_integer_type): Likewise.
8169 (c_common_nodes_and_builtins): Likewise.
8170 (keyword_begins_type_specifier): Likewise.
8171 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
8174 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
8176 * c-common.c: Use hash_table instead of hashtab.
8178 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
8180 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
8183 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
8188 * c-common.c (warn_logical_operator): Punt for vectors.
8190 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
8192 Implement SD-6: SG10 Feature Test Recommendations
8193 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
8194 macros and the __has_header macro.
8196 2014-09-30 Jason Merrill <jason@redhat.com>
8198 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
8199 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
8200 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8202 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
8203 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
8205 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
8206 * c-common.c (c_common_reswords): Remove __is_convertible_to.
8208 2014-09-24 Marek Polacek <polacek@redhat.com>
8212 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
8214 2014-09-23 Andi Kleen <ak@linux.intel.com>
8216 * c-common.c (handle_no_reorder_attribute): New function.
8217 (c_common_attribute_table): Add no_reorder attribute.
8219 2014-09-22 Joseph Myers <joseph@codesourcery.com>
8221 * c-cppbuiltin.c (c_cpp_builtins): Define
8222 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
8225 2014-09-18 Joseph Myers <joseph@codesourcery.com>
8227 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
8228 for supported floating-point modes.
8230 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8232 * c.opt (Wpsabi): Use LangEnabledBy.
8233 * c-opts.c (c_common_handle_option): Do not handle here.
8235 2014-09-12 Joseph Myers <joseph@codesourcery.com>
8237 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
8238 macros for floating-point modes.
8240 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
8243 * c-cppbuiltin.c (builtin_define_float_constants): Correct
8244 __*_DENORM_MIN__ without denormals.
8246 2014-09-10 Jakub Jelinek <jakub@redhat.com>
8248 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8249 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8250 ubsan_create_data callers.
8251 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
8252 index is constant or BIT_AND_EXPR with constant mask and is
8253 small enough for the bound.
8254 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
8255 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
8257 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8259 * c.opt: Add CppReason to various flags.
8260 (Wdate-time): Re-sort.
8261 * c-common.c: Include c-common.h earlier.
8262 (struct reason_option_codes_t): Delete.
8263 (c_option_controlling_cpp_error): Prefix global type and struct
8266 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8268 * c.opt (Wnormalized): New.
8269 (Wnormalized=): Use Enum and Reject Negative.
8270 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
8272 2014-09-08 Joseph Myers <joseph@codesourcery.com>
8274 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
8275 digits of floating-point modes if -fbuilding-libgcc.
8277 2014-09-05 Joseph Myers <joseph@codesourcery.com>
8279 * c-cppbuiltin.c (c_cpp_builtins): Also define
8280 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
8281 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
8282 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
8283 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
8284 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
8285 __LIBGCC_STACK_GROWS_DOWNWARD__,
8286 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
8287 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
8288 __LIBGCC_DWARF_FRAME_REGISTERS__,
8289 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
8290 __LIBGCC_STACK_POINTER_REGNUM__ and
8291 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
8292 (builtin_define_with_value): Handle backslash-escaping in string
8295 2014-09-05 Richard Biener <rguenther@suse.de>
8298 * c-format.c (check_format_arg): Properly handle
8299 effectively signed POINTER_PLUS_EXPR offset.
8301 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8303 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
8304 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
8305 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
8307 * c-opts.c (c_common_handle_option): Do not handle here.
8308 (sanitize_cpp_opts): Likewise.
8309 * c-common.c (struct reason_option_codes_t): Handle
8310 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
8312 2014-09-03 Marek Polacek <polacek@redhat.com>
8314 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
8316 2014-09-02 Jakub Jelinek <jakub@redhat.com>
8317 Balaji V. Iyer <balaji.v.iyer@intel.com>
8318 Igor Zamyatin <igor.zamyatin@intel.com>
8320 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
8321 * c-common.c (c_common_reswords): Added _Cilk_for.
8322 * c-common.h (enum rid): Added RID_CILK_FOR.
8323 (cilk_for_number_of_iterations): Add declaration.
8324 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
8326 * c-pragma.c (init_pragma): Register "grainsize" pragma.
8327 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
8329 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8331 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
8332 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
8333 Wundef): Use CPP, Var and Init.
8334 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
8336 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8338 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
8339 * c-opts.c (c_common_handle_option): Do not handle here.
8341 2014-08-25 Jason Merrill <jason@redhat.com>
8343 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
8344 -std=c++14 and -std=gnu++14, rather than the reverse.
8345 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
8346 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
8347 * c-common.h (cxx_dialect): Remove cxx1y.
8349 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
8351 * c-common.h (enum cxx_dialect): Add cxx14.
8352 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
8353 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
8354 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
8356 2014-08-22 Jason Merrill <jason@redhat.com>
8358 * c.opt (std=gnu++17): Fix alias.
8360 2014-08-22 Marek Polacek <polacek@redhat.com>
8363 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
8364 check for vector types. Drop LHS argument.
8365 * c-common.h (warn_logical_not_parentheses): Adjust.
8367 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8369 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
8370 (Wmultichar): Likewise.
8371 (Wdate-time): Use C-family languages instead of Common. Use CPP
8373 * c-opts.c (c_common_handle_option): Do not handle the above
8375 (sanitize_cpp_opts): Likewise.
8377 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8380 * c-opts.c: Include tree-diagnostics.h.
8381 (c_diagnostic_finalizer): New.
8382 (c_common_initialize_diagnostics): Use it.
8384 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8386 PR preprocessor/51303
8387 * c-common.c (struct reason_option_codes_t option_codes):
8388 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
8390 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8394 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
8395 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
8396 (c_common_post_options): Call init_global_opts_from_cpp.
8397 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
8399 2014-08-19 Marek Polacek <polacek@redhat.com>
8402 * c-common.c (maybe_warn_bool_compare): New function.
8403 * c-common.h (maybe_warn_bool_compare): Declare.
8404 * c.opt (Wbool-compare): New option.
8406 2014-08-19 Marek Polacek <polacek@redhat.com>
8408 * c.opt (Wc99-c11-compat): New option.
8410 2014-08-19 Marek Polacek <polacek@redhat.com>
8412 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
8413 to warn_c90_c99_compat.
8414 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
8417 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
8418 Steven Bosscher <steven@gcc.gnu.org>
8421 * c-format.c: Add extra_arg_loc and format_string_loc to struct
8422 format_check_results.
8423 (check_function_format): Use true and add comment for boolean
8425 (finish_dollar_format_checking): Use explicit location when warning.
8426 (check_format_info): Likewise.
8427 (check_format_arg): Set extra_arg_loc and format_string_loc.
8428 (check_format_info_main): Use explicit location when warning.
8429 (check_format_types): Pass explicit location.
8430 (format_type_warning): Likewise.
8432 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8435 * c-format.c: Handle Fortran flags.
8437 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
8440 * array-notation-common.c (find_rank): Added handling for other
8441 types of references.
8443 2014-08-10 Marek Polacek <polacek@redhat.com>
8446 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
8447 * c.opt (Wc90-c99-compat): Add option.
8449 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
8451 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
8453 2014-08-03 Marek Polacek <polacek@redhat.com>
8455 * c-common.c (check_case_value): Add location_t parameter. Use it.
8456 (c_add_case_label): Pass loc to check_case_value.
8458 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8460 * cilk.c: Use hash_map instead of pointer_map.
8462 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
8464 * c-gimplify.c: Use hash_set instead of pointer_set.
8466 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
8469 * array-notation-common.c (extract_array_notation_exprs): Handling
8472 2014-08-01 Jakub Jelinek <jakub@redhat.com>
8474 * c-common.h (min_align_of_type): Removed prototype.
8475 * c-common.c (min_align_of_type): Removed.
8476 * c-ubsan.h (ubsan_maybe_instrument_reference,
8477 ubsan_maybe_instrument_member_call): New prototypes.
8478 * c-ubsan.c: Include stor-layout.h and builtins.h.
8479 (ubsan_maybe_instrument_reference_or_call,
8480 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
8483 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
8486 * c.opt (-Wreturn-local-addr): Move to common.opt.
8488 2014-07-30 Jason Merrill <jason@redhat.com>
8493 * c.opt (-fuse-all-virtuals): New.
8495 2014-07-30 Tom Tromey <tromey@redhat.com>
8498 * c.opt (Wdesignated-init): New option.
8499 * c-common.c (c_common_attribute_table): Add "designated_init".
8500 (handle_designated_init): New function.
8502 2014-07-24 Marek Polacek <polacek@redhat.com>
8505 * c-opts.c (c_finish_options): If -imacros is in effect, return.
8507 2014-07-16 Dodji Seketeli <dodji@redhat.com>
8509 PR preprocessor/60723 - missing system-ness marks for macro tokens
8510 * c-ppoutput.c (struct print::prev_was_system_token): New data
8512 (init_pp_output): Initialize it.
8513 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
8514 (do_line_change): Return a flag saying if a line marker was
8516 (scan_translation_unit): Detect if the system-ness of the token we
8517 are about to emit is different from the one of the previously
8518 emitted token. If so, emit a line marker. Avoid emitting useless
8519 adjacent line markers. Avoid emitting line markers for tokens
8520 originating from the expansion of built-in macros.
8521 (scan_translation_unit_directives_only): Adjust.
8523 2014-07-15 Marek Polacek <polacek@redhat.com>
8525 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
8526 TYPE_MAX_VALUE is NULL.
8528 2014-07-14 Jakub Jelinek <jakub@redhat.com>
8531 * c.opt (Wmemset-transposed-args): New warning.
8533 2014-07-10 Jason Merrill <jason@redhat.com>
8537 * c.opt (-fuse-all-virtuals): New.
8539 2014-07-09 Richard Biener <rguenther@suse.de>
8542 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8543 using unsigned arithmetic if overflow does not wrap instead of
8544 if overflow is undefined.
8546 2014-07-06 Marek Polacek <polacek@redhat.com>
8549 * c.opt (Wsizeof-array-argument): New option.
8551 2014-07-03 Jakub Jelinek <jakub@redhat.com>
8553 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
8554 comments->count <= 1, as comments->entries might be NULL.
8556 2014-07-01 Marek Polacek <polacek@redhat.com>
8558 * c.opt (Wint-conversion): New option.
8560 2014-07-01 Marek Polacek <polacek@redhat.com>
8563 * c.opt (Wincompatible-pointer-types): New option.
8565 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
8568 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
8569 Do not discard TYPE_QUALS of type.
8571 2014-06-26 Jason Merrill <jason@redhat.com>
8573 * c-common.h (enum cxx_dialect): Add cxx1z.
8574 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
8575 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
8577 2014-06-26 Teresa Johnson <tejohnson@google.com>
8579 * c-common.h (get_dump_info): Declare.
8580 * c-gimplify.c (c_genericize): Use saved dump files.
8581 * c-opts.c (c_common_parse_file): Begin and end dumps
8582 once around parsing invocation.
8583 (get_dump_info): New function.
8585 2014-06-23 Marek Polacek <polacek@redhat.com>
8586 Andrew MacLeod <amacleod@redhat.com>
8589 * c-common.c (get_atomic_generic_size): Don't segfault if the
8590 type doesn't have a size.
8592 2014-06-20 Marek Polacek <polacek@redhat.com>
8594 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
8595 (ubsan_walk_array_refs_r): New function.
8596 (c_genericize): Instrument array bounds.
8597 * c-ubsan.c: Include "internal-fn.h".
8598 (ubsan_instrument_division): Mark instrumented arrays as having
8599 side effects. Adjust ubsan_type_descriptor call.
8600 (ubsan_instrument_shift): Likewise.
8601 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
8602 (ubsan_instrument_bounds): New function.
8603 (ubsan_array_ref_instrumented_p): New function.
8604 (ubsan_maybe_instrument_array_ref): New function.
8605 * c-ubsan.h (ubsan_instrument_bounds): Declare.
8606 (ubsan_array_ref_instrumented_p): Declare.
8607 (ubsan_maybe_instrument_array_ref): Declare.
8609 2014-06-20 Hale Wang <hale.wang@arm.com>
8612 * c.opt (fshort-enums): Add to LTO.
8613 * c.opt (fshort-wchar): Likewise.
8615 2014-06-16 Marek Polacek <polacek@redhat.com>
8618 * c.opt (Wswitch-bool): Add Var.
8620 2014-06-12 Jakub Jelinek <jakub@redhat.com>
8623 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
8624 #pragma omp target teams or
8625 #pragma omp {,target }teams distribute simd.
8627 2014-06-12 Jason Merrill <jason@redhat.com>
8629 * c.opt (Wabi=, fabi-compat-version): New.
8630 * c-opts.c (c_common_handle_option): Handle -Wabi=.
8631 (c_common_post_options): Handle flag_abi_compat_version default.
8632 Disallow -fabi-compat-version=1.
8633 * c-common.h (abi_version_crosses): New.
8635 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
8637 * c-common.c (handle_section_attribute): Update handling for
8638 section names that are no longer trees.
8640 2014-06-10 Jakub Jelinek <jakub@redhat.com>
8643 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
8644 (omp_pragmas): ... back here.
8646 2014-06-05 Marek Polacek <polacek@redhat.com>
8649 * c-common.c (warn_logical_not_parentheses): New function.
8650 * c-common.h (warn_logical_not_parentheses): Declare.
8651 * c.opt (Wlogical-not-parentheses): New option.
8653 2014-06-04 Marek Polacek <polacek@redhat.com>
8656 * c-common.c (check_case_bounds): Add location parameter.
8658 (c_add_case_label): Pass loc to check_case_bounds.
8660 2014-06-03 Marek Polacek <polacek@redhat.com>
8663 * c.opt (Wswitch-bool): New option.
8665 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8667 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
8669 (record_types_used_by_current_var_decl): Move prototype to where
8672 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8673 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8674 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8676 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
8678 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
8679 * c-common.c (c_common_nodes_and_builtins): Don't initialize
8681 * c-pretty-print.c (pp_c_void_constant): New function.
8682 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
8683 (c_pretty_printer::expression): Handle VOID_CST.
8684 * cilk.c (extract_free_variables): Likewise.
8685 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
8686 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
8688 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
8690 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
8691 * c-pragma.c (push_alignment): Adjust.
8692 (handle_pragma_push_options): Likewise.
8694 2014-05-09 Marek Polacek <polacek@redhat.com>
8697 * c-common.c (check_user_alignment): Return -1 if alignment is error
8699 (handle_aligned_attribute): Don't call default_conversion on
8701 (handle_vector_size_attribute): Likewise.
8702 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
8703 (handle_sentinel_attribute): Call default_conversion and allow even
8704 integral types as an argument.
8706 2014-05-08 Marek Polacek <polacek@redhat.com>
8709 * c-common.c (min_align_of_type): New function factored out from...
8710 (c_sizeof_or_alignof_type): ...here.
8711 * c-common.h (min_align_of_type): Declare.
8713 2014-05-08 Marek Polacek <polacek@redhat.com>
8716 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
8717 parameter type of main.
8719 2014-05-07 DJ Delorie <dj@redhat.com>
8721 * c-cppbuiltin.c (print_bits_of_hex): New.
8722 (builtin_define_type_minmax): Print values using hex so as not to
8723 require a pre-computed list of string values.
8725 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
8726 Mike Stump <mikestump@comcast.net>
8727 Richard Sandiford <rdsandiford@googlemail.com>
8729 * c-ada-spec.c: Include wide-int.h.
8730 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
8731 (dump_generic_ada_node): Use wide-int interfaces.
8732 * c-common.c: Include wide-int-print.h.
8733 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
8734 (pointer_int_sum): Use wide-int interfaces.
8735 (c_common_nodes_and_builtins): Use make_int_cst.
8736 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
8737 (handle_alloc_size_attribute): Use wide-int interfaces.
8738 (get_nonnull_operand): Likewise.
8739 * c-format.c (get_constant): Use tree_fits_uhwi_p.
8740 * c-lex.c: Include wide-int.h.
8741 (narrowest_unsigned_type): Take a widest_int rather than two
8743 (narrowest_signed_type): Likewise.
8744 (interpret_integer): Update accordingly. Use wide-int interfaces.
8745 (lex_charconst): Use wide-int interfaces.
8746 * c-pretty-print.c: Include wide-int.h.
8747 (pp_c_integer_constant): Use wide-int interfaces.
8748 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
8749 INT_CST_LT_UNSIGNED.
8751 2014-05-06 Richard Biener <rguenther@suse.de>
8753 * c-opts.c (c_common_post_options): For -freestanding,
8754 -fno-hosted and -fno-builtin disable pattern recognition
8755 if not enabled explicitely.
8757 2014-05-02 Marek Polacek <polacek@redhat.com>
8759 * c.opt (Wsizeof-pointer-memaccess): Describe option.
8761 2014-05-01 Marek Polacek <polacek@redhat.com>
8764 * c.opt (Wdiscarded-qualifiers): Add.
8766 2014-04-30 Marek Polacek <polacek@redhat.com>
8768 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
8769 INT_MIN / -1 sanitization only for integer types.
8771 2014-04-25 Marek Polacek <polacek@redhat.com>
8774 * c-common.c (handle_noinline_attribute): Warn if the attribute
8775 conflicts with always_inline attribute.
8776 (handle_always_inline_attribute): Warn if the attribute conflicts
8777 with noinline attribute.
8779 2014-04-25 Marek Polacek <polacek@redhat.com>
8782 * c-common.c (check_main_parameter_types): Warn about variadic main.
8784 2014-04-24 Mike Stump <mikestump@comcast.net>
8786 * c.opt (Wshadow-ivar): Default to on.
8788 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
8790 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
8792 2014-04-23 Marek Polacek <polacek@redhat.com>
8794 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
8796 2014-04-22 Jakub Jelinek <jakub@redhat.com>
8799 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
8800 if flag_sanitize_undefined_trap_on_error.
8801 (ubsan_instrument_division, ubsan_instrument_shift,
8802 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
8803 if !flag_sanitize_recover.
8805 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
8808 * c-common.c (registered_builtin_types): Make non-static.
8809 * c-common.h (registered_builtin_types): Declare.
8811 2014-04-14 Richard Biener <rguenther@suse.de>
8812 Marc Glisse <marc.glisse@inria.fr>
8815 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
8816 apply may-alias the scalar pointer type when applicable.
8818 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
8821 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
8822 as possible argument for Cilk_spawn.
8824 2014-04-11 Tobias Burnus <burnus@net-b.de>
8827 * c.opt (Wformat-signedness): Add
8828 * c-format.c(check_format_types): Use it.
8830 2014-04-11 Jason Merrill <jason@redhat.com>
8833 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
8834 default_conversion for an array argument.
8836 2014-04-08 Marek Polacek <polacek@redhat.com>
8839 * c-ubsan.c: Include asan.h.
8840 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
8842 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
8844 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
8846 2014-04-02 Marek Polacek <polacek@redhat.com>
8848 * c-common.h (c_expand_expr): Remove declaration.
8850 2014-03-28 Jakub Jelinek <jakub@redhat.com>
8853 * c-common.c (add_atomic_size_parameter): When creating new
8854 params vector, push the size argument first.
8856 2014-03-26 Jakub Jelinek <jakub@redhat.com>
8858 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
8859 ubsan_instrument_vla, ubsan_instrument_return): Adjust
8860 ubsan_create_data callers.
8862 2014-03-22 Jakub Jelinek <jakub@redhat.com>
8865 * c-opts.c (c_finish_options): Restore cb_file_change call to
8868 2014-03-13 Jakub Jelinek <jakub@redhat.com>
8871 * c-pragma.c (apply_pragma_weak): Only look at
8872 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
8873 DECL_ASSEMBLER_NAME_SET_P (decl).
8874 (maybe_apply_pending_pragma_weaks): Exit early if
8875 vec_safe_is_empty (pending_weaks) rather than only when
8877 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
8878 set assembler name back to NULL afterwards.
8880 2014-03-11 Jason Merrill <jason@redhat.com>
8882 * c.opt: Add -std=gnu++14.
8884 2014-03-11 Ian Bolton <ian.bolton@arm.com>
8886 * c-opts.c (c_common_post_options): Don't override
8887 -ffp-contract=fast if unsafe-math-optimizations is on.
8889 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
8891 * c.opt: Enable LTO FE for fshort-double.
8893 2014-03-07 Jason Merrill <jason@redhat.com>
8895 * c.opt: Add -std=c++14.
8897 2014-03-06 Marek Polacek <polacek@redhat.com>
8900 * cilk.c (contains_cilk_spawn_stmt): New function.
8901 (contains_cilk_spawn_stmt_walker): Likewise.
8902 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
8903 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
8905 2014-03-03 Jakub Jelinek <jakub@redhat.com>
8907 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
8908 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
8909 even when flag_preprocess_only.
8911 2014-02-26 Jason Merrill <jason@redhat.com>
8915 * c-common.c (shorten_compare): Don't check
8916 c_inhibit_evaluation_warnings.
8918 2014-02-19 Jakub Jelinek <jakub@redhat.com>
8921 * c-common.c (c_common_nodes_and_builtins): When initializing
8922 c_uint{16,32,64}_type_node, also set corresponding
8923 uint{16,32,64}_type_node to the same value.
8926 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
8927 for PRAGMA_IVDEP if flag_preprocess_only.
8929 2014-02-12 Jakub Jelinek <jakub@redhat.com>
8932 * c-common.c (merge_tlist): If copy is true, call new_tlist,
8933 if false, add ADD itself, rather than vice versa.
8934 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
8935 copy. For SAVE_EXPR, only call merge_tlist once.
8937 2014-02-08 Jakub Jelinek <jakub@redhat.com>
8940 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
8942 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
8944 (c_common_attribute_table): Add alloc_align and assume_aligned
8947 2014-02-06 Marek Polacek <polacek@redhat.com>
8950 * c-common.c (warn_for_sign_compare): Call warning_at with location
8953 2014-02-05 Marek Polacek <polacek@redhat.com>
8956 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
8959 2014-02-04 Marek Polacek <polacek@redhat.com>
8962 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
8965 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
8969 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
8970 handle_vector_size_attribute, handle_nonnull_attribute): Call
8971 default_conversion on the attribute argument.
8972 (handle_nonnull_attribute): Increment the argument number.
8974 2014-01-31 Marek Polacek <polacek@redhat.com>
8977 * c-common.c (add_atomic_size_parameter): Pass vNULL to
8978 build_function_call_vec.
8979 (resolve_overloaded_builtin): Likewise.
8980 * c-common.h (build_function_call_vec): Adjust declaration.
8982 2014-01-30 Marek Polacek <polacek@redhat.com>
8985 * c-common.h (unsafe_conversion_p): Adjust declaration.
8986 (warnings_for_convert_and_check): Likewise.
8987 (convert_and_check): Likewise.
8988 * c-common.c (unsafe_conversion_p): Add location parameter. Call
8989 expansion_point_location_if_in_system_header on it.
8990 (warnings_for_convert_and_check): Add location parameter. Call
8991 expansion_point_location_if_in_system_header on it. Use it.
8992 (convert_and_check): Add location parameter. Use it.
8993 (conversion_warning): Likewise.
8994 (c_add_case_label): Adjust convert_and_check calls.
8995 (scalar_to_vector): Adjust unsafe_conversion_p calls.
8997 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
8999 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
9001 * c-pragma.c (init_pragma): Likewise.
9004 2014-01-23 Marek Polacek <polacek@redhat.com>
9007 * c-common.c (shorten_compare): Add location_t parameter.
9008 * c-common.h (shorten_binary_op): Adjust declaration.
9010 2014-01-23 Marek Polacek <polacek@redhat.com>
9013 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
9014 * c-common.h: Declare it.
9016 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
9018 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
9019 * c-ada-spec.c (dump_ads): Likewise.
9020 (cpp_check): Likewise.
9021 (dump_ada_specs): Likewise.
9023 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
9026 * c-common.c (handle_no_instrument_function_attribute): Allow
9027 no_instrument_function attribute in class member
9028 definition/declaration.
9030 2014-01-15 Jakub Jelinek <jakub@redhat.com>
9033 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
9034 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
9035 being COMPOUND_EXPR.
9036 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
9037 operand a SAVE_EXPR and second MODIFY_EXPR.
9039 2014-01-09 Jakub Jelinek <jakub@redhat.com>
9042 * c-pch.c (c_common_write_pch): Call
9043 prepare_target_option_nodes_for_pch.
9045 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9047 Update copyright years
9049 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
9051 * array-notation-common.c, c-cilkplus.c: Use the standard form for
9052 the copyright notice.
9054 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
9056 * c-ada-spec.c (print_constructor): New function.
9057 (print_destructor): Retrieve the origin of the destructor.
9058 (print_ada_declaration): Revamp handling of constructors/destructors.
9060 2013-12-23 Stuart Hastings <stuart@apple.com>
9061 Bill Maddox <maddox@google.com>
9062 Jason Merrill <jason@redhat.com>
9064 * c.opt: Add -fdeclone-ctor-dtor.
9065 * c-opts.c (c_common_post_options): Default to on iff -Os.
9067 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
9069 * c-common.c (c_common_attribute_table): Added "cilk simd function"
9071 * c-pragma.h (enum pragma_cilk_clause): Remove.
9072 (enum pragma_omp_clause): Added the following fields:
9073 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
9074 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
9075 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
9076 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
9077 PRAGMA_CILK_CLAUSE_UNIFORM.
9080 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
9082 * cilk.c (cilk_outline): Made this function non-static.
9083 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
9084 (create_cilk_wrapper): Added a new parameter: a function pointer.
9085 (c_install_body_w_frame_cleanup): Remove
9086 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
9087 * c-common.h (cilk_outline): New prototype.
9088 (gimplify_cilk_spawn): Removed two parameters.
9089 (cilk_install_body_with_frame_cleanup): New prototype.
9090 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
9091 CILK_SPAWN_STMT case.
9093 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
9095 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
9097 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
9098 (int_array_type_node): Remove.
9099 * c-common.c (c_common_nodes_and_builtins): Don't build it.
9101 2013-12-05 Marek Polacek <polacek@redhat.com>
9104 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
9105 [ADJUST_FIELD_ALIGN].
9107 2013-12-04 Joseph Myers <joseph@codesourcery.com>
9110 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
9111 and check field alignment if set.
9112 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
9113 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
9115 2013-12-04 Jakub Jelinek <jakub@redhat.com>
9116 Marek Polacek <polacek@redhat.com>
9118 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
9119 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
9121 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
9124 * cilk.c (gimplify_cilk_spawn): Properly handle function without
9127 2013-11-29 Jakub Jelinek <jakub@redhat.com>
9130 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
9131 goto invalid. If it is error_mark_node, don't issue further
9134 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
9136 * c.opt (Wopenmp-simd): New.
9138 2013-11-22 Jakub Jelinek <jakub@redhat.com>
9140 * c-ubsan.h (ubsan_instrument_return): New prototype.
9141 * c-ubsan.c (ubsan_instrument_return): New function.
9143 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
9145 * c-common.c: Add required include files from gimple.h.
9146 * c-gimplify.c: Likewise.
9149 2013-11-22 David Malcolm <dmalcolm@redhat.com>
9151 * c-common.c (unsafe_conversion_p): Remove use of
9152 EXPR_LOC_OR_HERE macro.
9153 (conversion_warning): Likewise.
9154 (warnings_for_convert_and_check): Likewise.
9155 (warn_for_collisions_1): Likewise.
9156 (shorten_compare): Likewise, and remove use of in_system_header
9157 macro, using the location from the former.
9158 * c-lex.c (dump_one_header): Remove use of input_filename macro.
9159 (cb_def_pragma): Remove use of in_system_header macro.
9160 (lex_string): Likewise.
9161 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9163 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9164 Mike Stump <mikestump@comcast.net>
9165 Richard Sandiford <rdsandiford@googlemail.com>
9167 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
9168 instead of TREE_INT_CST_LOW, in cases where there is a protecting
9169 tree_fits_shwi_p or tree_fits_uhwi_p.
9170 (dump_generic_ada_node): Likewise.
9171 * c-format.c (check_format_arg): Likewise.
9172 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9174 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
9176 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
9178 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
9181 * c-common.c (unsafe_conversion_p): Make this function
9182 return an enumeration with more detail.
9183 (conversion_warning): Use the new return type of
9184 unsafe_conversion_p to separately warn either about conversions
9185 that lower floating point number precision or about the other
9186 kinds of conversions.
9187 * c-common.h (enum conversion_safety): New enumeration.
9188 (unsafe_conversion_p): switching return type to
9189 conversion_safety enumeration.
9190 * c.opt: Adding new warning -Wfloat-conversion and
9191 enabling it with -Wconversion.
9193 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
9195 * c-opts.c: Include plugin.h.
9196 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
9198 2013-11-19 Marek Polacek <polacek@redhat.com>
9200 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
9202 (ubsan_instrument_shift): Likewise.
9203 (ubsan_instrument_vla): Likewise.
9205 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9207 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
9208 cast to unsigned type.
9210 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9212 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
9214 (complete_array_type): Update comment to refer to tree_to_[su]hwi
9215 rather than tree_low_cst.
9217 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9219 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
9220 tree_to_uhwi throughout.
9222 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9224 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
9225 tree_low_cst (..., 0) with tree_to_shwi throughout.
9227 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9229 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
9230 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
9232 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
9234 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
9235 host_integerp (..., 0) with tree_fits_shwi_p throughout.
9237 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
9239 * c-cilkplus.c: New file.
9240 * c-common.c (readonly_error): Add location argument.
9241 * c-common.h (readonly_error): Same.
9242 (c_finish_cilk_clauses): Protoize.
9243 (c_check_cilk_loop): Same.
9244 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
9245 Do not fail on error_mark_node.
9246 Abstract increment canonicalization to here...
9247 (c_omp_for_incr_canonicalize_ptr): New.
9248 c-pragma.c (init_pragma): Register "simd" pragma.
9249 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
9250 (enum pragma_cilk_clause): New.
9252 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
9254 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
9255 wchar_type and host_integerp checks.
9257 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
9259 * c-common.c: Likewise.
9260 * c-gimplify.c: Likewise.
9263 2013-11-14 Diego Novillo <dnovillo@google.com>
9265 * c-common.c: Include fold-const.h.
9266 Include stor-layout.h.
9268 Include stringpool.h.
9271 Include trans-mem.h.
9272 * c-cppbuiltin.c: Include stor-layout.h.
9273 Include stringpool.h.
9274 * c-format.c: Include stringpool.h.
9275 * c-lex.c: Include stringpool.h.
9276 Include stor-layout.h.
9277 * c-pragma.c: Include stringpool.h.
9280 Include gcc-symtab.h.
9281 * c-pretty-print.c: Include stor-layout.h.
9283 * cilk.c: Include stringpool.h.
9286 2013-11-13 Joseph Myers <joseph@codesourcery.com>
9288 * c-common.h (enum rid): Add RID_AUTO_TYPE.
9289 * c-common.c (c_common_reswords): Add __auto_type.
9290 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
9292 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
9294 * c-common.c: Include gimplify.h.
9295 * c-gimplify.c: Likewise.
9297 * c-omp.c: Include gimple-expr.h instead of gimple.h.
9298 * c-ubsan.c: Don't include gimple.h.
9300 2013-11-12 Joseph Myers <joseph@codesourcery.com>
9302 * c-common.c (c_common_reswords): Add _Thread_local.
9304 2013-11-09 Joseph Myers <joseph@codesourcery.com>
9306 * c-common.c (atomic_size_supported_p): New function.
9307 (resolve_overloaded_atomic_exchange)
9308 (resolve_overloaded_atomic_compare_exchange)
9309 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
9310 Use it instead of comparing size with a local list of sizes.
9312 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
9313 Joseph Myers <joseph@codesourcery.com>
9315 * c-common.h (enum rid): Add RID_ATOMIC.
9316 * c-common.c (c_common_reswords): Add _Atomic.
9317 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
9318 (keyword_is_type_qualifier): Accept RID_ATOMIC.
9319 * c-format.c (check_format_types): Check for extra _Atomic
9320 qualifiers in format argument.
9321 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
9322 (pp_c_type_qualifier_list): Mention _Atomic in comment.
9324 2013-11-06 Tobias Burnus <burnus@net-b.de>
9326 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
9328 2013-11-06 Joseph Myers <joseph@codesourcery.com>
9330 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
9332 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
9333 to mean lack of IEEE 754 support.
9335 2013-11-05 Tobias Burnus <burnus@net-b.de>
9337 * c.opt (-Wdate-time): New option
9338 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
9340 2013-11-05 Joseph Myers <joseph@codesourcery.com>
9342 * c-cppbuiltin.c (cpp_iec_559_value): Test
9343 flag_excess_precision_cmdline not flag_excess_precision.
9345 2013-11-05 Tobias Burnus <burnus@net-b.de>
9347 * c.opt (fopenmp-simd): New option.
9348 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
9349 (omp_pragmas): ... this new struct.
9350 (c_pp_lookup_pragma): Also walk omp_pragmas.
9351 (init_pragma): Init pragmas for -fopenmp-simd.
9353 2013-11-04 Marek Polacek <polacek@redhat.com>
9356 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
9358 2013-11-04 Joseph Myers <joseph@codesourcery.com>
9360 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
9362 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
9364 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
9366 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
9367 (dump_ada_specs): Adjust prototype of second callback.
9368 * c-ada-spec.c (cpp_check): New global variable.
9369 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
9370 (print_generic_ada_decl): Likewise.
9371 (has_static_fields): Change return type to bool and add guard.
9372 (has_nontrivial_methods): New predicate.
9373 (is_tagged_type): Change return type to bool.
9374 (separate_class_package): Call has_nontrivial_methods.
9375 (pp_ada_tree_identifier): Minor tweaks.
9376 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
9377 (dump_ada_array_domains): Likewise.
9378 (dump_ada_array_type): Likewise.
9379 (dump_template_types): Remove cpp_check parameter and do not pass it to
9380 dump_generic_ada_node.
9381 (dump_ada_template): Likewise.
9382 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
9384 (print_ada_methods): Change return type to integer. Remove cpp_check
9385 parameter and do not pass it down.
9386 (dump_nested_types): Remove cpp_check parameter and do not pass it to
9387 dump_generic_ada_node.
9388 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
9390 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
9391 down. Use has_nontrivial_methods to recognize C++ classes. Use return
9392 value of print_ada_methods.
9393 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
9394 Set cpp_check to it before invoking dump_ada_nodes.
9395 (dump_ada_specs): Likewise.
9397 2013-11-03 Marek Polacek <polacek@redhat.com>
9399 * c-ubsan.c: Don't include hash-table.h.
9400 (ubsan_instrument_vla): New function.
9401 * c-ubsan.h: Declare it.
9403 2013-10-31 David Malcolm <dmalcolm@redhat.com>
9405 Automated part of renaming of symtab_node_base to symtab_node.
9407 Patch autogenerated by rename_symtab.py from
9408 https://github.com/davidmalcolm/gcc-refactoring-scripts
9409 revision 58bb219cc090b2f4516a9297d868c245495ee622
9411 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
9412 symtab_node_base to symtab_node.
9414 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
9416 Implement C++14 digit separators.
9417 * c-lex.c (interpret_float): Remove digit separators from scratch string
9418 before building real literal.
9420 2013-10-30 Jakub Jelinek <jakub@redhat.com>
9422 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
9424 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
9426 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
9428 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
9430 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
9431 (insert_cilk_frame): New prototype.
9432 (cilk_init_builtins): Likewise.
9433 (gimplify_cilk_spawn): Likewise.
9434 (c_cilk_install_body_w_frame_cleanup): Likewise.
9435 (cilk_detect_spawn_and_unwrap): Likewise.
9436 (cilk_set_spawn_marker): Likewise.
9437 (build_cilk_sync): Likewise.
9438 (build_cilk_spawn): Likewise.
9441 2013-10-29 David Malcolm <dmalcolm@redhat.com>
9443 Patch autogenerated by refactor_symtab.py from
9444 https://github.com/davidmalcolm/gcc-refactoring-scripts
9445 revision 58bb219cc090b2f4516a9297d868c245495ee622
9447 * c-gimplify.c (c_genericize): Update for conversion of symtab types
9448 to a true class hierarchy.
9449 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
9451 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
9453 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
9455 2013-10-26 Jeff Law <law@redhat.com>
9457 * c-common.c (c_define_builtins): Remove mudflap support.
9458 * c.opt: Ignore and warn for mudflap options.
9460 2013-10-24 Tobias Burnus <burnus@net-b.de>
9463 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
9464 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
9466 2013-10-23 Jason Merrill <jason@redhat.com>
9468 * c-format.c (gcc_cxxdiag_char_table): Add %X.
9470 2013-10-11 Jakub Jelinek <jakub@redhat.com>
9472 * c-common.h (omp_clause_mask::operator !=): New method.
9473 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
9474 instead of if (mask & something) tests everywhere.
9476 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
9477 201307 instead of 201107.
9478 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
9479 (c_common_attribute_table): Add "omp declare target" and
9480 "omp declare simd" attributes.
9481 (handle_omp_declare_target_attribute,
9482 handle_omp_declare_simd_attribute): New functions.
9483 * c-omp.c: Include c-pragma.h.
9484 (c_finish_omp_taskgroup): New function.
9485 (c_finish_omp_atomic): Add swapped argument, if true,
9486 build the operation first with rhs, lhs arguments and use NOP_EXPR
9488 (c_finish_omp_for): Add code argument, pass it down to make_code.
9489 (c_omp_split_clauses): New function.
9490 (c_split_parallel_clauses): Removed.
9491 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
9492 c_omp_declare_simd_clauses_to_decls): New functions.
9493 * c-common.h (omp_clause_mask): New type.
9494 (OMP_CLAUSE_MASK_1): Define.
9495 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
9496 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
9497 omp_clause_mask::operator |, omp_clause_mask::operator &,
9498 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
9499 omp_clause_mask::operator ==): New methods.
9500 (enum c_omp_clause_split): New.
9501 (c_finish_omp_taskgroup): New prototype.
9502 (c_finish_omp_atomic): Add swapped argument.
9503 (c_finish_omp_for): Add code argument.
9504 (c_omp_split_clauses): New prototype.
9505 (c_split_parallel_clauses): Removed.
9506 (c_omp_declare_simd_clauses_to_numbers,
9507 c_omp_declare_simd_clauses_to_decls): New prototypes.
9508 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
9509 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
9510 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
9511 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
9512 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
9513 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
9514 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
9515 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
9516 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
9517 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
9518 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
9519 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
9520 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
9521 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
9522 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
9523 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
9524 PRAGMA_OMP_CLAUSE_UNIFORM.
9526 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
9528 PR tree-optimization/20318
9529 * c-common.c (handle_returns_nonnull_attribute): New function.
9530 (c_common_attribute_table): Add returns_nonnull.
9532 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
9535 * c.opt (fcheck-new): Move to common.opt.
9537 2013-09-25 Marek Polacek <polacek@redhat.com>
9538 Jakub Jelinek <jakub@redhat.com>
9541 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
9542 an expression if we can prove it is correct.
9543 (ubsan_instrument_division): Likewise. Remove unnecessary
9546 2013-09-18 Marek Polacek <polacek@redhat.com>
9549 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
9551 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
9553 2013-09-14 Iain Sandoe <iain@codesourcery.com>
9556 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
9557 fobjc-gc, freplace-objc-classes): Accept for LTO.
9559 2013-09-13 Jacek Caban <jacek@codeweavers.com>
9561 * c-target.def: New hook
9563 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
9566 * c.opt (Wdelete-incomplete): Add.
9568 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
9570 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
9571 (vector_types_compatible_elements_p): New function.
9572 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
9574 (vector_types_compatible_elements_p): Declare.
9576 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9578 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
9579 a virtual member function.
9580 (pp_simple_type_specifier): Remove.
9581 (pp_c_type_specifier): Likewise.
9582 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
9583 Rename from pp_c_type_specifier. Adjust.
9584 (c_pretty_printer::c_pretty_printer): Do not assign to
9585 simple_type_specifier.
9587 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9589 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
9591 (c_pretty_printer::storage_class_specifier): Likewise.
9592 (c_pretty_printer::initializer): Likewise.
9593 (pp_declaration): Remove.
9594 (pp_declaration_specifiers): Likewise.
9595 (pp_abstract_declarator): Likewise.
9596 (pp_declarator): Likewise.
9597 (pp_type_id): Likewise.
9598 (pp_statement): Likewise.
9599 (pp_constant): Likewise.
9600 (pp_id_expression): Likewise.
9601 (pp_primary_expression): Likewise.
9602 (pp_unary_expression): Likewise.
9603 (pp_multiplicative_expression): Likewise.
9604 (pp_conditional_expression): Likewise.
9605 (pp_assignment_expression): Likewise.
9606 (pp_expression): Likewise.
9607 (pp_c_type_id): Likewise.
9608 (pp_c_storage_class_specifier): Likewise.
9609 * c-pretty-print.c (pp_c_type_cast): Tidy.
9610 (pp_c_pointer): Likewise.
9611 (pp_c_type_specifier): Likewise.
9612 (pp_c_parameter_type_list): Likewise.
9613 (pp_c_function_definition): Likewise.
9614 (pp_c_init_declarator): Likewise.
9615 (pp_c_initializer_list): Likewise.
9616 (pp_c_constructor_elts): Likewise.
9617 (c_pretty_printer::direct_abstract_declarator): Likewise.
9618 (c_pretty_printer::declaration_specifiers): Likewise.
9619 (c_pretty_printer::primary_expression): Likewise.
9620 (c_pretty_printer::postfix_expression): Likewise.
9621 (c_pretty_printer::type_id): Rename from pp_c_type_id.
9622 (c_pretty_printer::storage_class_specifier): Rename from
9623 pp_c_storage_class_specifier.
9624 (c_pretty_printer::initializer): Rename from pp_c_initializer.
9625 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
9626 storage_class_specifier, initializer, offset_list, flags.
9628 2013-08-30 Marek Polacek <polacek@redhat.com>
9630 * c-ubsan.c: New file.
9631 * c-ubsan.h: New file.
9633 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
9635 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
9637 (c_pretty_printer::declaration_specifiers): Likewise.
9638 (c_pretty_printer::declarator): Likewise.
9639 (c_pretty_printer::abstract_declarator): Likewise.
9640 (c_pretty_printer::direct_abstract_declarator): Likewise.
9641 (c_pretty_printer::direct_declarator): Likewise.
9642 (c_pretty_printer::function_specifier): Likewise.
9643 (pp_declaration): Adjust.
9644 (pp_declaration_specifiers): Likewise.
9645 (pp_abstract_declarator): Likewise.
9646 (pp_direct_declarator): Likewise.
9647 (pp_function_specifier): Likewise.
9648 (pp_direct_abstract_declarator): Remove as unused.
9649 (pp_c_declaration): Remove.
9650 (pp_c_declaration_specifiers): Likewise.
9651 (pp_c_declarator): Likewise.
9652 (pp_c_direct_declarator): Likewise.
9653 (pp_c_function_specifier): Likewise.
9654 (pp_c_direct_abstract_declarator): Likewise.
9655 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
9656 from pp_c_abstract_declarator. Adjust.
9657 (c_pretty_printer::direct_abstract_declarator): Rename from
9658 pp_c_direct_abstract_declarator. Adjust.
9659 (c_pretty_printer::function_specifier): Rename from
9660 pp_c_function_specifier. Adjust.
9661 (c_pretty_printer::declaration_specifiers): Rename from
9662 pp_c_declaration_specifiers. Adjust.
9663 (c_pretty_printer::direct_declarator): Rename from
9664 pp_c_direct_declarator. Adjust.
9665 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
9666 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
9667 (c_pretty_printer::c_pretty_printer): Do not assign to
9668 declaration, declaration_specifiers, declarator,
9669 direct_declarator, direct_abstract_declarator, function_specifier.
9671 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
9673 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
9674 virtual member function.
9675 (c_pretty_printer::multiplicative_expression): Likewise.
9676 (c_pretty_printer::conditional_expression): Likewise.
9677 (c_pretty_printer::assignment_expression): Likewise.
9678 (c_pretty_printer::expression): Likewise.
9679 (pp_unary_expression): Adjust.
9680 (pp_multiplicative_expression): Likewise.
9681 (pp_assignment_expression): Likewise.
9682 (pp_conditional_expression): Likewise.
9683 (pp_expression): Likewise.
9684 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
9685 from pp_c_unary_expression. Adjust.
9686 (c_pretty_printer::multiplicative_expression): Rename from
9687 pp_c_multiplicative_expression. Adjust.
9688 (c_pretty_printer::conditional_expression): Rename from
9689 pp_c_conditional_expression. Adjust.
9690 (c_pretty_printer::assignment_expression): Rename from
9691 pp_c_assignment_expression. Adjust.
9692 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
9693 (c_pretty_printer::c_pretty_printer): Do not assign to
9694 unary_expression, multiplicative_expression,
9695 conditional_expression, expression.
9697 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9699 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
9700 virtual member function.
9701 (pp_postfix_expression): Adjust.
9702 (pp_c_postfix_expression): Remove.
9703 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
9704 from pp_c_postfix_expression. Adjust.
9705 (c_pretty_printer::c_pretty_printer): Do not assign to
9708 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9710 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
9711 virtua member function.
9712 (pp_primary_expression): Adjust.
9713 (pp_c_primary_expression): Remove.
9714 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
9715 from pp_c_primary_expression. Adjust.
9716 (pp_c_initializer_list): Use pp_primary_expression.
9717 (c_pretty_printer::c_pretty_printer): Do not assign to
9720 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
9722 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
9723 * c-pretty-print.c (M_): Remove.
9724 (c_pretty_printer::translate_string): Define.
9725 (pp_c_type_specifier): Use it.
9726 (pp_c_primary_expression): Likewise.
9727 (pp_c_expression): Likewise.
9729 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9731 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
9733 (pp_c_id_expression): Remove.
9734 (pp_id_expression): Adjust.
9735 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
9736 pp_c_id_expression. Adjust.
9737 (pp_c_postfix_expression): Use pp_id_expression.
9738 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
9740 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
9742 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
9744 (pp_constant): Adjust.
9745 (pp_c_constant): Remove.
9746 * c-pretty-print.c (c_pretty_printer::constant): Rename from
9747 pp_c_constant. Adjust.
9749 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
9750 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
9752 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9754 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
9755 (c_pretty_printer::c_pretty_printer): Declare.
9756 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
9757 c_pretty_printer_init. Adjust.
9758 (print_c_tree): Do not call c_pretty_printer_init.
9759 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
9761 2013-08-09 Arnaud Charlet <charlet@adacore.com>
9763 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
9765 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
9768 * c-common.c (pointer_int_sum): Add bool parameter.
9769 * c-common.h (pointer_int_sum): Adjust declaration.
9771 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
9773 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
9774 c_pretty_printer variable.
9776 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
9778 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
9780 (pp_c_base): Likewise. Adjust users.
9781 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
9782 (pp_c_whitespace): Do not call pp_base.
9783 (pp_c_left_paren): Likewise.
9784 (pp_c_right_paren): Likewise.
9785 (pp_c_left_brace): Likewise.
9786 (pp_c_right_brace): Likewise.
9787 (pp_c_left_bracket): Likewise.
9788 (pp_c_right_bracket): Likewise.
9789 (pp_c_dot): Likewise.
9790 (pp_c_ampersand): Likewise.
9791 (pp_c_star): Likewise.
9792 (pp_c_arrow): Likewise.
9793 (pp_c_semicolon): Likewise.
9794 (pp_c_complement): Likewise.
9795 (pp_c_exclamation): Likewise.
9796 (pp_c_direct_declarator): Likewise.
9797 (pp_c_ws_string): Likewise.
9798 (pp_c_identifier): Likewise.
9799 (pp_c_statement): Likewise.
9800 (print_c_tree): Likewise.
9802 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
9805 * c-common.c (c_parse_error): Catch user-defined literal tokens and
9806 provide useful error strings.
9808 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9810 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
9811 printer functions instead of pp_string or operators and punctuators.
9812 (dump_generic_ada_node): Likewise.
9813 * c-pretty-print.c (pp_c_type_specifier): Likewise.
9814 (pp_c_relational_expression): Likewise.
9815 (pp_c_logical_or_expression): Likewise.
9817 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
9819 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
9820 functions instead of pp_character.
9821 (pp_ada_tree_identifier): Likewise.
9822 (dump_ada_double_name): Likewise.
9823 (dump_ada_function_declaration): Likewise.
9824 (dump_ada_array_domains): Likewise.
9825 (dump_template_types): Likewise.
9826 (dump_generic_ada_node): Likewise.
9827 (print_ada_declaration): Likewise.
9828 (print_ada_struct_decl): Likewise.
9829 * c-pretty-print.c (pp_c_integer_constant): Likewise.
9831 2013-07-23 Tom Tromey <tromey@redhat.com>
9833 * c-common.h (enum rid) <RID_GENERIC>: New constant.
9834 * c-common.c (c_common_reswords): Add _Generic.
9836 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
9838 * c-common.c: Fix typos.
9839 * c-common.h: Likewise.
9841 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
9844 * c-common.c (c_common_attribute_table): Add warn_unused.
9845 (handle_warn_unused_attribute): New.
9847 2013-07-10 Jakub Jelinek <jakub@redhat.com>
9849 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
9850 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
9852 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
9855 * c.opt: Add Wconditionally-supported.
9857 2013-07-08 Graham Stott <graham.stott@btinternet.com>
9859 * array-notation-common.c (length_mismatch_in_expr_p): Delete
9860 unused variables l_length and l_node.
9862 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
9865 * c-common.c (complete_array_type): Delay folding first index
9866 like other indices. When folding, check for index overflow.
9868 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
9871 * c-common.h (c_build_vec_perm_expr): New complain argument.
9872 * c-common.c (c_build_vec_perm_expr): Likewise.
9873 Use save_expr also in C++.
9875 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
9877 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
9878 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9879 * c-opts.c (c_common_post_options): Likewise.
9881 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9883 * array-notation-common.c (length_mismatch_in_expr): Changed the
9884 parameter type's from a dynamic array to a vec_tree. Also removed
9885 the size parameters.
9886 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
9889 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
9891 * c-common.h (struct cilkplus_an_parts): New structure.
9892 (struct cilkplus_an_loop_parts): Likewise.
9893 (cilkplus_extract_an_triplets): New prototype.
9894 (fix_sec_implicit_args): Likewise.
9895 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
9896 (fix_sec_implicit_args): Likewise.
9898 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
9900 * array-notation-common.c (find_inv_trees): Removed an unwanted
9902 * c-common.h (struct inv_list::additional_tcodes): Changed type from
9903 enum rid to enum tree_code.
9905 2013-06-11 Jan Hubicka <jh@suse.cz>
9907 * c-common.c (handle_alias_ifunc_attribute): Do not set
9908 DECL_EXTERNAL for weakref variables.
9909 * c-pragma.c (handle_pragma_weak): Make sure aliases
9910 are not declared as external.
9912 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
9914 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
9915 function from c/c-array-notation.c.
9916 (is_cilkplus_reduce_builtin): Likewise.
9917 (find_rank): Likewise.
9918 (extract_array_notation_exprs): Likewise.
9919 (replace_array_notations): Likewise.
9920 (find_inv_trees): Likewise.
9921 (replace_inv_trees): Likewise.
9922 (contains_array_notation_expr): Likewise.
9923 (find_correct_array_notation_type): Likewise.
9924 * c-common.h (struct inv_list): Moved this struct from the file
9925 c/c-array-notation.c and added a new field called additional tcodes.
9926 (length_mismatch_in_expr_p): New prototype.
9927 (is_cilkplus_reduce_builtin): Likewise.
9928 (find_rank): Likewise.
9929 (extract_array_notation_exprs): Likewise.
9930 (replace_array_notation): Likewise.
9931 (find_inv_trees): Likewise.
9932 (replace_inv_trees): Likewise.
9933 (find_correct_array_notation_type): Likewise.
9935 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
9937 * c-common.c (c_define_builtins): When cilkplus is enabled, the
9938 function array_notation_init_builtins is called.
9939 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
9940 * c-common.def (ARRAY_NOTATION_REF): New tree.
9941 * c-common.h (build_array_notation_expr): New function declaration.
9942 (build_array_notation_ref): Likewise.
9943 (extract_sec_implicit_index_arg): New extern declaration.
9944 (is_sec_implicit_index_fn): Likewise.
9945 (ARRAY_NOTATION_CHECK): New define.
9946 (ARRAY_NOTATION_ARRAY): Likewise.
9947 (ARRAY_NOTATION_START): Likewise.
9948 (ARRAY_NOTATION_LENGTH): Likewise.
9949 (ARRAY_NOTATION_STRIDE): Likewise.
9950 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
9952 (pp_c_expression): Likewise.
9953 * c.opt (flag_enable_cilkplus): New flag.
9954 * array-notation-common.c: New file.
9956 2013-05-14 Jakub Jelinek <jakub@redhat.com>
9959 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
9961 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
9963 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
9966 2013-05-07 Han Shen <shenhan@google.com>
9968 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
9970 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
9972 * c-common.c (check_user_alignment): Emit error for negative values.
9974 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9976 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
9978 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9980 * c-cppbuiltin.c (c_cpp_builtins): Do not define
9981 __GXX_EXPERIMENTAL_CXX1Y__.
9983 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9984 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9986 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
9987 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
9988 to simply use OPT_Wpointer_arith.
9989 (c_sizeof_or_alignof_type): Likewise.
9991 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
9993 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
9995 2013-04-12 Jakub Jelinek <jakub@redhat.com>
9997 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
9998 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
10001 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
10003 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
10005 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
10007 * c-common.c (pointer_int_sum): Remove dead code.
10009 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
10011 PR middle-end/56524
10012 * c-common.c (handle_optimize_attribute): Don't call
10013 save_optabs_if_changed.
10015 2013-03-05 Jakub Jelinek <jakub@redhat.com>
10017 PR middle-end/56461
10018 * c-pch.c (pch_init): Free target_validity at the end.
10020 2013-03-04 Jakub Jelinek <jakub@redhat.com>
10022 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
10024 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
10025 Jakub Jelinek <jakub@redhat.com>
10028 * c-common.c (handle_no_sanitize_address_attribute): New function.
10029 (c_common_attribute_table): Add no_sanitize_address attribute.
10030 (handle_no_address_safety_analysis_attribute): Add
10031 no_sanitize_address attribute, not no_address_safety_analysis
10034 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
10037 * c-common.c (handle_optimize_attribute): Call
10038 save_optabs_if_changed.
10040 2013-02-18 Jakub Jelinek <jakub@redhat.com>
10041 Steven Bosscher <steven@gcc.gnu.org>
10044 * c-opts.c (c_common_post_options): If debug info is enabled
10045 and non-dwarf*, refuse to load PCH files and when writing PCH
10048 2013-02-05 Jakub Jelinek <jakub@redhat.com>
10050 PR middle-end/56167
10051 * c-common.c (handle_error_attribute): Fix condition.
10053 2013-01-30 Jakub Jelinek <jakub@redhat.com>
10056 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
10058 2013-01-18 Jason Merrill <jason@redhat.com>
10061 * c.opt (-fextern-tls-init): New.
10062 * c-opts.c (c_common_post_options): Handle it.
10064 2013-01-09 Jakub Jelinek <jakub@redhat.com>
10067 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
10068 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
10069 and is either negative or bigger or equal to type precision
10070 of the first operand.
10072 2012-12-03 Marek Polacek <polacek@redhat.com>
10075 * c-common.c (check_user_alignment): Swap order of tests,
10076 check TREE_CODE first.
10078 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
10081 * c-common.h (overflow_type): New enum.
10082 (build_userdef_literal): Add overflow_type argument.
10083 (tree_userdef_literal): Add overflow_type.
10084 (USERDEF_LITERAL_OVERFLOW): New access macro.
10085 * c-common.c (build_userdef_literal): Add overflow_type
10087 * c-lex.c (c_lex_with_flags): Add overflow_type to
10088 build_userdef_literal calls.
10089 (interpret_integer, interpret_float): Add overflow_type argument.
10091 2012-11-28 Richard Biener <rguenther@suse.de>
10094 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
10095 here and use a type with proper overflow behavior for types that would
10096 need to be promoted for the arithmetic.
10098 2012-11-23 Jakub Jelinek <jakub@redhat.com>
10101 * c-common.c (handle_no_address_safety_analysis_attribute): New
10103 (c_common_attribute_table): Add no_address_safety_analysis.
10105 2012-11-16 Simon Baldwin <simonb@google.com>
10107 * c.opt: Add f[no-]canonical-system-headers.
10108 * c-opts.c (c_common_handle_option): Handle
10109 OPT_fcanonical_system_headers.
10111 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
10114 * c-opts.c (c_common_handle_option): Set new flags.
10115 * c.opt: Describe new flags.
10117 2012-11-09 Jason Merrill <jason@redhat.com>
10119 * c.opt (Wabi-tag): New.
10121 2012-11-09 Andi Kleen <ak@linux.intel.com>
10124 * c-common.c (get_atomic_generic_size): Mask with
10127 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10130 * c.opt (Wformat): Make it Alias Wformat=1.
10131 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
10132 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
10134 (Wformat=): RejectNegative. Use LangEnabledBy.
10135 (Wnonnull): Use LangEnabledBy.
10136 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
10137 * c-format.c (set_Wformat): Delete.
10138 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
10139 (maybe_read_dollar_number): Likewise.
10140 (avoid_dollar_number): Likewise.
10141 (finish_dollar_format_checking): Likewise.
10142 (check_format_info): Likewise.
10143 (check_format_info_main): Likewise.
10144 (check_format_types): Likewise.
10145 (format_type_warning): Likewise.
10146 * c-common.c (int): Likewise.
10147 (check_function_sentinel): Likewise.
10148 * c-common.h (warn_format,set_Wformat): Do not declare here.
10150 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10153 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
10154 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
10156 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
10158 (Wvariadic-macros): Init(1).
10159 * c-opts.c (c_common_handle_option): Do not handle them
10161 (c_common_post_options): Likewise.
10162 (sanitize_cpp_opts): warn_unused_macros is now
10163 cpp_warn_unused_macros.
10164 (push_command_line_include): Likewise.
10165 * c-common.c (warn_unknown_pragmas): Do not define.
10166 * c-common.h (warn_unknown_pragmas): Do not declare.
10168 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
10171 * c-common.c (conversion_warning): Handle conditional expressions.
10173 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
10176 * c.opt (Wreturn_local_addr): Define new option.
10178 2012-10-25 Jason Merrill <jason@redhat.com>
10180 * c.opt (Wvirtual-move-assign): New.
10182 * c.opt (Winherited-variadic-ctor): New.
10184 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
10187 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
10189 2012-10-23 Joseph Myers <joseph@codesourcery.com>
10191 * c-common.h (pch_cpp_save_state): Declare.
10192 * c-target.def (c_preinclude): New hook.
10193 * c-opts.c (done_preinclude): New.
10194 (push_command_line_include): Handle default preincluded header.
10195 (cb_file_change): Call pch_cpp_save_state when calling
10196 push_command_line_include.
10197 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
10198 (pch_cpp_save_state): New.
10199 (pch_init): Call pch_cpp_save_state conditionally, instead of
10200 calling cpp_save_state.
10202 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
10206 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
10207 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
10208 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
10209 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
10210 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
10211 * c-opts.c (c_common_handle_option): Remove explicit handling from
10213 (c_common_post_options): Likewise.
10215 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
10217 * c-ada-spec.c (LOCATION_COL): Delete.
10218 (compare_location): New function.
10219 (compare_node): Use it.
10220 (compare_comment): Likewise.
10222 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
10226 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
10227 * c-opts.c (c_common_handle_option): Do not set them here. Add
10229 (c_common_post_options): Likewise.
10231 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
10233 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
10234 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
10235 Remove POINTER_TYPE handling, add large unsigned handling and use
10236 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
10238 2012-10-12 Jakub Jelinek <jakub@redhat.com>
10241 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
10242 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
10243 locs and array of 3 trees instead of just single loc and single
10244 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
10245 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
10246 For *cmp* builtins that take two sources strings report warnings
10247 about first and second source, not about destination and source.
10249 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
10252 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
10254 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
10256 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
10257 declaring something coming from another file.
10259 2012-10-10 Arnaud Charlet <charlet@adacore.com>
10262 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
10264 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
10267 * c-common.c (warn_about_parentheses): Add location_t parameter;
10268 use EXPR_LOC_OR_LOC.
10269 * c-common.h: Update declaration.
10271 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
10274 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
10275 more operations. Make error messages optional.
10276 * c-common.h (enum stv_conv): Moved from c-typeck.c.
10277 (scalar_to_vector): Declare.
10279 2012-10-08 Jason Merrill <jason@redhat.com>
10281 * c-common.c (c_common_reswords): Add thread_local.
10283 2012-10-08 Dodji Seketeli <dodji@redhat.com>
10285 PR c++/53528 C++11 attribute support
10286 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
10288 * c-common.c (check_cxx_fundamental_alignment_constraints): New
10290 (handle_aligned_attribute): In choose strictest alignment
10291 among many. Use new check_cxx_fundamental_alignment_constraints.
10292 (handle_transparent_union_attribute): In c++11 attribute syntax,
10293 don't look through typedefs.
10295 2012-10-04 Arnaud Charlet <charlet@adacore.com>
10297 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
10298 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
10301 2012-09-25 Dehao Chen <dehao@google.com>
10303 PR middle-end/54645
10304 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
10305 map when read in the pch.
10307 2012-09-18 Arnaud Charlet <charlet@adacore.com>
10309 * c-ada-spec.c: Style fixes.
10311 2012-09-18 Thomas Quinot <quinot@adacore.com>
10313 * c.opt (-fada-spec-parent): Define new command line switch.
10314 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
10315 is specified, generate binding spec as a child of the specified unit.
10317 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
10318 Manuel López-Ibáñez <manu@gcc.gnu.org>
10321 * c.opt ([Winit-self]): Enabled by -Wall in C++.
10323 2012-08-23 Arnaud Charlet <charlet@adacore.com>
10325 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
10326 for pointers, and add missing Convention C pragma.
10327 (print_ada_struct_decl): Add missing aliased keyword.
10328 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
10330 2012-08-17 Jakub Jelinek <jakub@redhat.com>
10332 * c-common.c (sizeof_pointer_memaccess_warning): New function.
10333 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
10334 * c-opts.c (c_common_handle_option): Enable it for -Wall.
10335 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
10336 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
10338 2012-08-10 Richard Guenther <rguenther@suse.de>
10340 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
10342 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
10344 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
10345 instead of separate pp_newline and pp_flush.
10346 (print_c_tree): Likewise.
10348 2012-07-26 Richard Henderson <rth@redhat.com>
10350 * c-common.c (handle_hot_attribute): Allow labels.
10351 (handle_cold_attribute): Likewise.
10353 2012-07-20 Jakub Jelinek <jakub@redhat.com>
10356 * c-common.c (check_function_nonnull): Handle multiple nonnull
10357 attributes properly.
10359 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
10361 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
10362 * c-ada-spec.c: Likewise.
10363 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
10365 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
10367 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
10368 Remove code conditional on it.
10370 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
10372 * c-gimplify.c: Do not include basic-block.h.
10373 * c-common.c: Do not include linfuncs.h.
10375 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
10377 * c-common.h: Include tree.h.
10379 2012-07-02 Jason Merrill <jason@redhat.com>
10382 * c-common.c (get_priority): Call default_conversion.
10384 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
10386 * c-pch.c (c_common_write_pch): Remove unused variables.
10388 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
10390 * cppspec.c: Moved from gcc/ to here.
10392 2012-06-27 Kai Tietz <ktietz@redhat.com>
10394 PR preprocessor/37215
10395 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
10397 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
10399 * c-common.h (c_common_print_pch_checksum): Remove.
10400 * c-pch.c: Do not include output.h.
10401 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
10402 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
10403 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
10404 (struct c_pch_header): Remove.
10405 (get_ident): Update gpch version.
10406 (pch_init): Do not print executable_checksum to asm_out_file.
10407 Do not fail if there is no asm_out_file to read back from. Set
10408 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
10409 (c_common_write_pch): Verify that nothing was written to asm_out_file
10410 since pch_init was called. Do not write a c_pch_header, and do not
10411 copy from asm_out_file to the PCH.
10412 (c_common_read_pch): Do not read a c_pch_header, and do not restore
10413 the content of asm_out_file from the PCH.
10414 (c_common_print_pch_checksum): Remove.
10415 * c-opts.c (c_common_init): Print out executable_checksum directly.
10417 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10419 * c-target.def (objc_declare_unresolved_class_reference,
10420 objc_declare_class_definition): Add new hooks.
10422 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
10424 * c-lex.c: Do not include output.h.
10425 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
10426 Remove uses of ASM_OUTPUT_IDENT.
10428 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
10431 * c-common.h (c_build_vec_perm_expr): Move decl here.
10432 * c-common.c (c_build_vec_perm_expr): Move definition
10435 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
10437 * c.opt (fconserve-space): Turn into a no-op.
10439 2012-06-04 Sterling Augustine <saugustine@google.com>
10441 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
10442 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
10443 both the start and end of the function.
10445 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10447 * c-common.c: Do not include output.h.
10448 * c-pragma.c: Likewise.
10450 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
10452 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
10453 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
10454 (lang_decl_name): Handle namespace decls.
10456 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
10458 * c-ada-spec.c: Do not include output.h.
10459 * c-semantics.c: Likewise.
10461 2012-05-29 Joseph Myers <joseph@codesourcery.com>
10463 * c-common.c: Fix typo.
10465 2012-05-29 Michael Matz <matz@suse.de>
10467 * c-common.h (c_expand_decl): Remove prototype.
10469 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
10471 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
10472 * c-opts.c (c_common_handle_option): Remove code handling
10473 warn_missing_braces.
10475 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
10478 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
10481 2012-05-22 Dodji Seketeli <dodji@redhat.com>
10484 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
10486 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
10488 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
10489 * c-opts.c (c_common_handle_option): Do not handle explicitly
10490 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
10492 2012-05-16 Dodji Seketeli <dodji@redhat.com>
10494 PR preprocessor/7263
10495 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
10496 to cpp_classify_number. For diagnostics, use the precise location
10497 instead of the global input_location.
10499 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
10502 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
10504 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
10506 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
10508 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
10511 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
10512 Wreorder): Use LangEnabledBy.
10513 * c-opts.c (c_common_handle_option): Do not enable them
10514 explicitly. Call lang-specific generated functions.
10515 (c_common_post_options): Do not set them here.
10517 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
10519 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
10520 Wmissing-field-initializers,Wmissing-parameter-type,
10521 Wold-style-declaration,Woverride-init): Use EnabledBy.
10522 * c-opts.c (c_common_post_options): Do not set here explicitly.
10524 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10527 * c-opts.c (c_common_handle_option): Use handle_generated_option
10528 to enable sub-options.
10530 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
10533 * c-common.c (warnings_for_convert_and_check): Use warning_at.
10535 2012-05-10 Richard Guenther <rguenther@suse.de>
10537 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
10538 adjust commentary about TYPE_IS_SIZETYPE types.
10540 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
10543 * c-common.c (warn_logical_operator): Check that argument of
10544 integer_zerop is not NULL.
10546 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
10549 * c-common.c (warn_logical_operator): Do not warn if either side
10550 is already true or false.
10552 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
10555 * c-common.c (expr_original_type): New.
10556 (shorten_compare): Do not warn for enumeration types.
10558 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10560 * c.opt (fpermissive): Add Var(flag_permissive).
10562 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
10565 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
10566 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
10568 2012-04-30 Dodji Seketeli <dodji@redhat.com>
10570 Add -Wvarargs option
10571 * c.opt (Wvarargs): Define new option.
10573 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10575 * c-common.c (check_function_arguments): Replace
10576 Wmissing-format-attribute with Wsuggest-attribute=format.
10578 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10580 * c.opt (Wsuggest-attribute=format): New. Alias of
10581 Wmissing-format-attribute.
10582 * c-format.c (decode_format_type): Replace
10583 Wmissing-format-attribute with Wsuggest-attribute=format.
10584 (check_function_format): Likewise.
10586 2012-04-27 Ollie Wild <aaw@google.com>
10588 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
10589 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
10590 * c.opt: Add Wliteral-suffix.
10592 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
10595 * c.opt (Wpedantic): New.
10596 (pedantic): Alias Wpedantic.
10597 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
10598 (c_common_post_options): Likewise.
10599 (sanitize_cpp_opts): Likewise.
10600 * c-lex.c (interpret_float): Likewise.
10601 * c-format.c (check_format_types): Likewise.
10602 * c-common.c (pointer_int_sum): Likewise.
10603 (c_sizeof_or_alignof_type): Likewise.
10604 (c_add_case_label): Likewise.
10605 (c_do_switch_warnings): Likewise.
10606 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10608 2012-04-15 Jason Merrill <jason@redhat.com>
10611 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
10612 (C_STD_NAME): Distinguish between C++98 and C++11.
10614 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
10617 * c-common.h (uint16_type_node): Rename into...
10618 (c_uint16_type_node): ...this.
10619 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
10620 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
10622 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
10624 * c-common.c (warn_if_unused_value): Move definition to here.
10625 * c-common.h (warn_if_unused_value): Move declaration to here.
10627 2012-03-23 William Bader <williambader@hotmail.com>
10629 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
10631 2012-03-20 Jason Merrill <jason@redhat.com>
10633 * c-common.h (enum cxx_dialect): Add cxx1y.
10634 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
10636 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10637 * c-opts.c (c_common_post_options): Likewise.
10638 (set_std_cxx1y): New.
10639 (c_common_handle_option): Call it.
10640 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
10642 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
10645 * c.opt ([Wuseless-cast]): Add.
10647 2012-03-16 Richard Guenther <rguenther@suse.de>
10649 * c-pretty-print.c (pp_c_initializer_list): Adjust.
10651 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
10654 * c.opt (ftemplate-backtrace-limit) Add.
10656 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10658 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
10660 * c-pragma.c (handle_pragma_extern_prefix): Remove.
10661 (init_pragma): Don't register extern_prefix.
10663 2012-03-12 Richard Guenther <rguenther@suse.de>
10665 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
10666 (builtin_type_for_size): Likewise.
10668 2012-02-13 Jakub Jelinek <jakub@redhat.com>
10671 * c-common.c (sync_resolve_params): Don't decide whether to convert
10672 or not based on TYPE_SIZE comparison, convert whenever arg_type
10673 is unsigned INTEGER_TYPE.
10675 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
10678 * c.opt ([Wunused-local-typedefs]): Fix description.
10680 2012-01-24 Mike Stump <mikestump@comcast.net>
10682 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
10685 2012-01-18 Richard Guenther <rguenther@suse.de>
10687 * c-opts.c (c_common_post_options): Reset LTO flags if
10688 we are about to generate a PCH.
10690 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
10693 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
10694 use pp_unsigned_wide_integer.
10696 2012-01-10 Richard Guenther <rguenther@suse.de>
10698 PR middle-end/51806
10699 * c-opts.c (c_common_handle_option): Move -Werror handling
10700 to language independent code.
10702 2012-01-05 Richard Guenther <rguenther@suse.de>
10704 PR middle-end/51764
10705 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
10708 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
10711 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
10712 of array types with an unknown bound.
10714 2011-12-20 Joseph Myers <joseph@codesourcery.com>
10716 * c-common.c (flag_isoc99): Update comment to refer to C11.
10717 (flag_isoc1x): Change to flag_isoc11.
10718 * c-common.h (flag_isoc99): Update comment to refer to C11.
10719 (flag_isoc1x): Change to flag_isoc11.
10720 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
10722 * c-opts.c (set_std_c1x): Change to set_std_c11.
10723 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
10725 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
10726 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
10727 * c.opt (std=c1x): Change to std=c11. Document as non-draft
10729 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
10730 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
10731 (std=gnu1x): Make alias of std=gnu11.
10733 2011-12-19 Jason Merrill <jason@redhat.com>
10736 * c-common.c (handle_transparent_union_attribute): Check the first
10737 field if the type is complete.
10739 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
10742 * c-common.c (RID_IS_FINAL): Add.
10743 * c-common.h (RID_IS_FINAL): Add.
10745 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
10747 * c.opt (fgnu-runtime): Provide full description.
10748 (fnext-runtime): Likewise.
10749 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
10751 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
10753 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
10754 predefines in one place. Add LOCK_FREE predefines.
10755 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
10758 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
10761 * c-common.c (get_atomic_generic_size): Check for various error
10763 (resolve_overloaded_atomic_exchange,
10764 resolve_overloaded_atomic_compare_exchange,
10765 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
10766 error_mark_node for error conditions.
10768 2011-11-08 Richard Guenther <rguenther@suse.de>
10770 PR middle-end/51010
10771 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
10773 2011-11-07 Richard Henderson <rth@redhat.com>
10774 Aldy Hernandez <aldyh@redhat.com>
10775 Torvald Riegel <triegel@redhat.com>
10777 Merged from transactional-memory.
10779 * c-common.c (handle_tm_wrap_attribute,
10780 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
10781 (struct c_common_reswords): Added __transaction* keywords.
10782 (struct c_common_attribute_table): Added transaction* and tm_regparm
10784 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
10786 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
10787 find_tm_attribute): Declare.
10789 2011-11-07 Jason Merrill <jason@redhat.com>
10792 * c-common.c, c-common.h: Revert yesterday's changes.
10794 2011-11-06 Jason Merrill <jason@redhat.com>
10797 * c-common.c (decl_has_visibility_attr): Split out from...
10798 (c_determine_visibility): ...here.
10799 * c-common.h: Declare it.
10801 2011-11-06 Joseph Myers <joseph@codesourcery.com>
10803 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
10804 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
10806 (check_user_alignment): New. Split out of
10807 handle_aligned_attribute. Disallow integer constants with
10808 noninteger types. Conditionally allow zero.
10809 (handle_aligned_attribute): Use check_user_alignment.
10810 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
10812 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
10813 Richard Henderson <rth@redhat.com>
10815 Merged from cxx-mem-model.
10817 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
10818 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
10819 parameters that are the same type size.
10820 (get_atomic_generic_size): New. Find size of generic
10821 atomic function parameters and do typechecking.
10822 (add_atomic_size_parameter): New. Insert size into parameter list.
10823 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
10824 either __atomic_exchange_n or external library call.
10825 (resolve_overloaded_atomic_compare_exchange): Restructure
10826 __atomic_compare_exchange to either _n variant or external library call.
10827 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
10828 __atomic_load_n or an external library call.
10829 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
10830 __atomic_store_n or an external library call.
10831 (resolve_overloaded_builtin): Handle new __atomic builtins.
10833 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
10836 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
10837 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
10838 <INDIRECT_REF>: Return the argument.
10839 <ARRAY_REF>: Remove special code for negative offset.
10840 Call fold_build_pointer_plus instead of size_binop.
10841 (fold_offsetof): Remove STOP_REF argument and adjust.
10842 * c-common.h (fold_offsetof_1): Declare.
10843 (fold_offsetof): Remove STOP_REF argument.
10845 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
10848 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10849 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10850 Wnarrowing for C++0x and C++98.
10851 * c.opt ([Wnarrowing]): Update.
10853 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
10856 * c.opt: Add Wzero-as-null-pointer-constant.
10858 2011-10-31 Jason Merrill <jason@redhat.com>
10860 * c.opt (-fdeduce-init-list): Off by default.
10863 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
10864 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
10865 and -Wc++11-compat.
10866 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
10868 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
10871 * c.opt (fvisibility-inlines-hidden): Description change.
10873 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
10875 Implement C++11 user-defined literals.
10876 * c-common.c (build_userdef_literal): New.
10877 * c-common.def: New tree code.
10878 * c-common.h (tree_userdef_literal): New tree struct and accessors.
10879 * c-lex.c (interpret_float): Add suffix parm.
10880 (c_lex_with_flags): Build literal tokens.
10882 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10886 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10889 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10890 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10891 Wnarrowing for C++0x and C++98.
10892 * c.opt ([Wnarrowing]): Update.
10894 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
10897 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
10898 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
10899 Wnarrowing for C++0x and C++98.
10900 * c.opt ([Wnarrowing]): Update.
10902 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
10905 * c-common.c (conversion_warning): Remove code looking for
10906 artificial operands.
10908 2011-10-18 Dodji Seketeli <dodji@redhat.com>
10911 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
10912 !NO_IMPLICIT_EXTERN_C.
10914 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
10916 * c-common.c (c_common_reswords): Add __bases,
10918 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
10920 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
10923 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
10925 2011-10-15 Tom Tromey <tromey@redhat.com>
10926 Dodji Seketeli <dodji@redhat.com>
10928 * c.opt (fdebug-cpp): New option.
10929 * c-opts.c (c_common_handle_option): Handle the option.
10930 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
10931 output stream in parameter. Factorized from ...
10932 (maybe_print_line): ... this. Dump location debug information when
10933 -fdebug-cpp is in effect.
10934 (print_line_1): New static function. Takes an output stream in
10935 parameter. Factorized from ...
10936 (print_line): ... here. Dump location information when -fdebug-cpp
10938 (scan_translation_unit): Dump location information when
10939 -fdebug-cpp is in effect.
10941 2011-10-15 Tom Tromey <tromey@redhat.com>
10942 Dodji Seketeli <dodji@redhat.com>
10944 * c.opt (ftrack-macro-expansion): New option. Handle it with and
10946 * c-opts.c (c_common_handle_option)<case
10947 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
10948 cases. Handle -ftrack-macro-expansion with and without argument.
10950 2011-10-15 Tom Tromey <tromey@redhat.com>
10951 Dodji Seketeli <dodji@redhat.com>
10953 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
10954 (print_line, cb_define, do_line_change): Adjust to avoid touching
10955 the internals of struct line_map. Use the public API instead.
10956 * c-pch.c (c_common_read_pch): Likewise.
10957 * c-lex.c (fe_file_change): Likewise.
10959 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
10962 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
10964 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
10967 * c-pretty-print.c (pp_c_floating_constant): Output
10968 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
10970 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10972 * c-common.c (def_builtin_1): Delete old interface with two
10973 parallel arrays to hold standard builtin declarations, and replace
10974 it with a function based interface that can support creating
10975 builtins on the fly in the future. Change all uses, and poison
10976 the old names. Make sure 0 is not a legitimate builtin index.
10977 * c-omp.c (c_finish_omp_barrier): Ditto.
10978 (c_finish_omp_taskwait): Ditto.
10979 (c_finish_omp_flush): Ditto.
10981 2011-10-11 Tristan Gingold <gingold@adacore.com>
10983 * c.opt: (fallow-parameterless-variadic-functions): New.
10985 2011-09-08 Dodji Seketeli <dodji@redhat.com>
10987 PR c++/33255 - Support -Wunused-local-typedefs warning
10988 * c-common.h (struct c_language_function::local_typedefs): New
10990 (record_locally_defined_typedef, maybe_record_typedef_use)
10991 (maybe_warn_unused_local_typedefs): Declare new functions.
10992 * c-common.c (record_locally_defined_typedef)
10993 (maybe_record_typedef_use)
10994 (maybe_warn_unused_local_typedefs): Define new functions.
10995 * c.opt: Declare new -Wunused-local-typedefs flag.
10997 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
10999 PR middle-end/50266
11000 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
11003 2011-09-05 Richard Guenther <rguenther@suse.de>
11005 * c-common.c (complete_array_type): Use ssize_int (-1) instead
11006 of integer_minus_one_node for empty array upper bounds.
11008 2011-08-28 Dodji Seketeli <dodji@redhat.com>
11010 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
11011 it's the first time it's being called on this main TU.
11013 2011-08-24 Richard Guenther <rguenther@suse.de>
11016 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
11018 2011-08-22 Gabriel Charette <gchare@google.com>
11020 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
11021 defined in cpp_init_builtins and c_cpp_builtins.
11023 2011-08-19 Joseph Myers <joseph@codesourcery.com>
11025 * c-common.c (c_common_reswords): Add __builtin_complex.
11026 * c-common.h (RID_BUILTIN_COMPLEX): New.
11028 2011-08-18 Joseph Myers <joseph@codesourcery.com>
11030 * c-common.c (c_common_reswords): Add _Noreturn.
11031 (keyword_is_function_specifier): Handle RID_NORETURN.
11032 * c-common.h (RID_NORETURN): New.
11034 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11036 * c-common.c (unsafe_conversion_p): New function. Check if it is
11037 unsafe to convert an expression to the type.
11038 (conversion_warning): Adjust, use unsafe_conversion_p.
11039 * c-common.h (unsafe_conversion_p): New function declaration.
11041 2011-08-02 Jakub Jelinek <jakub@redhat.com>
11043 * c-common.h (c_finish_omp_atomic): Adjust prototype.
11044 (c_finish_omp_taskyield): New prototype.
11045 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
11046 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
11047 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
11048 or RHS1 have side-effects, evaluate those too in the right spot,
11049 if it is a decl and LHS is also a decl, error out if they
11051 (c_finish_omp_taskyield): New function.
11052 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
11053 * c-pragma.c (omp_pragmas): Add taskyield.
11054 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
11055 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
11056 PRAGMA_OMP_CLAUSE_MERGEABLE.
11058 2011-07-25 Dodji Seketeli <dodji@redhat.com>
11060 * c-common.h (set_underlying_type): Remove parm name from
11063 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
11065 * c-pretty-print.h: Search c-common.h in c-family.
11067 2011-07-22 Jason Merrill <jason@redhat.com>
11070 * c.opt (Wnarrowing): New.
11073 * c-common.h: Declare c_linkage_bindings.
11074 * c-pragma.c (handle_pragma_redefine_extname): Use it.
11077 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
11078 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
11079 as flag_isoc99 for 'restrict'.
11080 (pp_c_specifier_qualifier_list): Likewise for _Complex.
11082 2011-07-21 Ian Lance Taylor <iant@google.com>
11084 PR middle-end/49705
11085 * c-common.c (c_disable_warnings): New static function.
11086 (c_enable_warnings): New static function.
11087 (c_fully_fold_internal): Change local unused_p to bool. Call
11088 c_disable_warnings and c_enable_warnings rather than change
11089 c_inhibit_evaluation_warnings.
11091 2011-07-20 Jason Merrill <jason@redhat.com>
11093 PR c++/6709 (DR 743)
11094 PR c++/42603 (DR 950)
11095 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
11096 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
11097 (CPP_DECLTYPE): New.
11098 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
11100 2011-07-19 Richard Guenther <rguenther@suse.de>
11102 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
11103 * c-omp.c (c_finish_omp_for): Likewise.
11105 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
11107 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
11108 body on the next line.
11110 2011-07-08 Jason Merrill <jason@redhat.com>
11113 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
11116 * c-common.c (c_apply_type_quals_to_decl): Don't check
11117 TYPE_NEEDS_CONSTRUCTING.
11119 2011-07-06 Richard Guenther <rguenther@suse.de>
11121 * c-common.c (c_common_nodes_and_builtins):
11122 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
11124 2011-07-05 Richard Guenther <rguenther@suse.de>
11126 * c-common.c (c_common_nodes_and_builtins): Build all common
11129 2011-06-27 Jakub Jelinek <jakub@redhat.com>
11131 * c-common.h (c_tree_chain_next): New static inline function.
11133 * c-common.c (check_builtin_function_arguments): Handle
11134 BUILT_IN_ASSUME_ALIGNED.
11136 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
11138 * c-common.c: Add sync_ or SYNC__ to builtin names.
11139 * c-omp.c: Add sync_ or SYNC__ to builtin names.
11141 2011-06-20 Pierre Vittet <piervit@pvittet.com>
11143 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
11145 (gen_pragma_handler): New union.
11146 (internal_pragma_handler): New type.
11147 (c_register_pragma_with_data)
11148 (c_register_pragma_with_expansion_and_data): New functions.
11150 * c-pragma.c (registered_pragmas, c_register_pragma_1)
11151 (c_register_pragma, c_register_pragma_with_expansion)
11152 (c_invoke_pragma_handler): Changed to work with
11153 internal_pragma_handler.
11154 (c_register_pragma_with_data)
11155 (c_register_pragma_with_expansion_and_data): New functions.
11157 2011-06-14 Joseph Myers <joseph@codesourcery.com>
11159 * c-common.c: Include common/common-target.h.
11160 (handle_section_attribute): Use
11161 targetm_common.have_named_sections.
11162 * c-cppbuiltin.c: Include common/common-target.h.
11163 (c_cpp_builtins): Use targetm_common.except_unwind_info.
11165 2011-06-10 Richard Guenther <rguenther@suse.de>
11167 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
11168 to print a IDENTIFIER_NODE.
11170 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11171 Joseph Myers <joseph@codesourcery.com>
11173 * c.opt (fbuilding-libgcc): New option.
11174 * c-cppbuiltin.c (c_cpp_builtins): Define
11175 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
11177 2011-06-07 Jason Merrill <jason@redhat.com>
11179 * c-common.c (max_tinst_depth): Lower default to 900.
11181 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
11183 2011-06-07 Richard Guenther <rguenther@suse.de>
11185 * c-common.c (c_common_nodes_and_builtins): Do not set
11186 size_type_node or call set_sizetype.
11188 2011-06-07 Dodji Seketeli <dodji@redhat.com>
11191 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
11192 type when using pointer comparison to compare types.
11194 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
11196 * c.opt: Add -Wdelete-non-virtual-dtor.
11197 * c-opts.c (c_common_handle_option): Include it in -Wall.
11199 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
11204 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11206 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11209 2011-05-27 Jakub Jelinek <jakub@redhat.com>
11212 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
11213 C++ don't call c_common_truthvalue_conversion on void type arms.
11215 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
11217 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
11218 (stmt_list_stack): Define.
11219 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
11220 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
11222 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11224 * c-common.c (warning_candidate_p): Check for BLOCKs.
11226 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
11228 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
11231 2011-05-25 Jakub Jelinek <jakub@redhat.com>
11233 * c-common.c (def_fn_type): Remove extra va_end.
11235 2011-05-23 Jason Merrill <jason@redhat.com>
11238 * c-common.c (c_common_get_narrower): New.
11239 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
11241 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
11243 * c-common.h (check_function_arguments): Tweak prototype of
11244 check_function_arguments.
11245 * c-common.c (check_function_arguments): Likewise. Adjust
11246 calls to check_function_nonnull, check_function_format, and
11247 check_function_sentinel.
11248 (check_function_sentinel): Take a FUNCTION_TYPE rather than
11249 separate attributes and typelist arguments. Use
11250 FOREACH_FUNCTION_ARGS to iterate over argument types.
11252 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11254 * c-common.c (c_common_reswords): Reorder.
11255 * c-common.h (rid): Likewise.
11257 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
11259 * c-common.c (def_fn_type): Don't call build_function_type, call
11260 build_function_type_array or build_varargs_function_type_array
11262 (c_common_nodes_and_builtins): Likewise.
11264 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
11266 * c-common.c (c_add_case_label): Omit the loc argument to
11268 * c-common.h (build_case_label): Remove.
11269 * c-semantics.c (build_case_label): Remove.
11271 2011-05-05 Joseph Myers <joseph@codesourcery.com>
11273 * c-objc.h (objc_start_method_definition): Update prototype.
11274 * stub-objc.c (objc_start_method_definition): Add extra parameter.
11276 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
11278 * c-common.c (check_main_parameter_types): Reindent. Don't use
11279 TYPE_ARG_TYPES directly.
11280 (handle_nonnull_attribute): Likewise.
11281 (sync_resolve_params): Likewise.
11282 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
11283 to check_format_string.
11284 (handle_format_attribute): Likewise.
11285 (check_format_string): Take a function type to examine instead of
11286 a type list. Use a function_arg_iterator to step through argument
11289 2011-05-04 Richard Guenther <rguenther@suse.de>
11291 * c-common.c (fix_string_type): Use size_int for index type bounds.
11292 (start_fname_decls): Do not pass NULL to build_int_cst.
11293 (c_init_attributes): Likewise.
11294 * c-lex.c (c_lex_with_flags): Likewise.
11296 2011-04-27 Jason Merrill <jason@redhat.com>
11298 * c-common.c (make_tree_vector_from_list): New.
11299 * c-common.h: Declare it.
11301 2011-04-26 Richard Guenther <rguenther@suse.de>
11303 PR preprocessor/48248
11304 * c-ppoutput.c (maybe_print_line): Always optimize newlines
11305 for output size with -P.
11307 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
11309 * c-common.c (struct c_common_resword): Add __underlying_type.
11310 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
11312 2011-04-20 Jim Meyering <meyering@redhat.com>
11314 * c-format.c (init_dollar_format_checking): Remove useless
11317 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
11319 * c-objc.h (objc_get_interface_ivars): Removed.
11320 (objc_detect_field_duplicates): New.
11321 * stub-objc.c: Likewise.
11323 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11325 * stub-objc.c (objc_declare_protocols): Renamed to
11326 objc_declare_protocol.
11327 * c-objc.h: Likewise.
11329 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
11331 * stub-objc.c (objc_declare_class): Updated argument name.
11333 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
11335 * c-common.h (c_common_init_ts): Declare.
11336 * c-common.c (c_common_init_ts): Define.
11338 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
11340 * c-objc.h (objc_build_message_expr): Updated prototype.
11341 * stub-objc.c (objc_build_message_expr): Likewise.
11343 2011-04-12 Martin Jambor <mjambor@suse.cz>
11345 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
11348 2011-04-11 Richard Guenther <rguenther@suse.de>
11350 * c-common.c (complete_array_type): Build a range type of
11353 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
11355 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
11356 (handle_type_generic_attribute): Likewise.
11358 2011-04-07 Jason Merrill <jason@redhat.com>
11361 * c-common.c (c_common_truthvalue_conversion): Don't ignore
11362 conversion from C++0x scoped enum.
11364 2011-04-06 Joseph Myers <joseph@codesourcery.com>
11366 * c-target-def.h: New file.
11367 * c-target.def: New file.
11368 * c-target.h: New file.
11369 * c-common.c (targetcm): Don't define here.
11370 * c-common.h (default_handle_c_option): Declare.
11371 * c-format.c: Include c-target.h instead of target.h.
11372 * c-opts.c: Include c-target.h instead of target.h. Explicitly
11374 (default_handle_c_option): Move from targhooks.c.
11376 2011-03-29 Jakub Jelinek <jakub@redhat.com>
11378 PR preprocessor/48248
11379 * c-ppoutput.c (print): Add src_file field.
11380 (init_pp_output): Initialize it.
11381 (maybe_print_line): Don't optimize by adding up to 8 newlines
11382 if map->to_file and print.src_file are different file.
11383 (print_line): Update print.src_file.
11385 2011-03-25 Kai Tietz <ktietz@redhat.com>
11387 * c-ada-spec.c (compare_comment): Use filename_cmp
11388 instead of strcmp for filename.
11390 2011-03-25 Jeff Law <law@redhat.com>
11392 * c-common.c (def_fn_type): Add missing va_end.
11394 2011-03-25 Jason Merrill <jason@redhat.com>
11396 * c.opt: Add -std=c++03.
11398 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
11400 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
11402 2011-03-17 Kai Tietz <ktietz@redhat.com>
11405 * c-pretty-print.c (pp_c_specifier_qualifier_list):
11406 Display allowed attributes for function pointer types.
11407 (pp_c_attributes_display): New function to display
11408 attributes having affects_type_identity flag set to true.
11409 * c-pretty-print.h (pp_c_attributes_display): New prototype.
11411 * c-common.c (c_common_attribute_table):
11413 (c_common_format_attribute_table): Likewise.
11415 2011-03-18 Jason Merrill <jason@redhat.com>
11417 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
11418 * c-common.h: Don't declare it here.
11419 * c-common.c: Or define it here.
11420 * c-opts.c (c_common_handle_option): Or set it here.
11423 * c-common.c (handle_transparent_union_attribute): Don't
11424 make a duplicate type in C++.
11426 2011-03-15 Jason Merrill <jason@redhat.com>
11428 * c-common.c (max_constexpr_depth): New.
11429 * c-common.h: Declare it.
11430 * c-opts.c (c_common_handle_option): Set it.
11431 * c.opt (fconstexpr-depth): New option.
11433 2011-03-11 Jason Merrill <jason@redhat.com>
11435 * c-common.c (attribute_takes_identifier_p): Add missing const.
11438 * c-common.c (attribute_takes_identifier_p): Assume that an
11439 unknown attribute takes an identifier.
11441 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
11444 * c-common.c (c_type_hash): Call list_length instead of iterating
11445 through DECL_CHAIN. Rename 'i' to 'n_elements'.
11447 2011-02-19 Jakub Jelinek <jakub@redhat.com>
11450 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
11452 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
11454 * c.opt (fobjc-abi-version=) New.
11455 (fobjc-nilcheck): New.
11457 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
11460 * c-common.h (keyword_is_decl_specifier): Declare.
11461 * c-common.c (keyword_is_decl_specifier): Define.
11462 (keyword_is_function_specifier): New function.
11464 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11467 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
11468 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
11471 2011-01-26 Arnaud Charlet <charlet@adacore.com>
11473 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
11475 2011-01-26 Jakub Jelinek <jakub@redhat.com>
11478 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
11479 after init_c_lex if pch_file is set.
11481 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
11484 * c.opt (-fkeep-inline-dllexport): New switch.
11486 2011-01-12 Richard Guenther <rguenther@suse.de>
11488 PR middle-end/32511
11489 * c-common.c (handle_weak_attribute): Warn instead of error
11490 on declaring an inline function weak.
11492 2011-01-05 Tom Tromey <tromey@redhat.com>
11494 * c-common.h (lvalue_error): Update.
11495 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
11498 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
11501 * c-objc.h (objc_finish_message_expr): Added argument to
11504 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
11506 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
11509 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
11511 * c-objc.h (objc_maybe_warn_exceptions): New.
11512 * stub-objc.c (objc_maybe_warn_exceptions): New.
11514 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
11516 * c-common.h (readonly_error): Declare.
11517 * c-common.c (readonly_error): Define.
11519 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
11521 * c-common.h (invalid_indirection_error): Declare.
11522 * c-common.c (invalid_indirection_error): Define.
11524 2010-12-03 Richard Guenther <rguenther@suse.de>
11527 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
11528 (pp_c_unary_expression): Likewise.
11529 (pp_c_expression): Likewise.
11531 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
11533 * c-common.h (objc_finish_function): New.
11534 (objc_non_volatilized_type): Removed.
11535 (objc_type_quals_match): Removed.
11536 * stub-objc.c (objc_finish_function): New.
11537 (objc_non_volatilized_type): Removed.
11538 (objc_type_quals_match): Removed.
11540 2010-11-30 Joseph Myers <joseph@codesourcery.com>
11542 * c-common.h (parse_optimize_options): Declare.
11543 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
11544 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
11546 2010-11-29 Joseph Myers <joseph@codesourcery.com>
11548 * c-opts.c (check_deps_environment_vars): Use getenv instead of
11550 * c-pch.c (O_BINARY): Don't define here.
11551 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
11553 2010-11-25 Joseph Myers <joseph@codesourcery.com>
11555 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
11556 targetm.except_unwind_info.
11558 2010-11-23 Joseph Myers <joseph@codesourcery.com>
11560 * c-opts.c (c_common_handle_option): Pass location to
11561 set_struct_debug_option.
11563 2010-11-23 Joseph Myers <joseph@codesourcery.com>
11565 * c-common.c (visibility_options): Move from ../opts.c.
11566 * c-common.h (struct visibility_flags, visibility_options):
11568 * c-opts.c (finish_options): Rename to c_finish_options.
11569 (c_common_init): Update call to finish_options.
11571 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
11574 * c-lex.c (lex_string): Check that each string in an Objective-C
11575 string concat sequence starts with either one or zero '@', and
11576 that there are no spurious '@' signs at the end.
11578 2010-11-20 Joseph Myers <joseph@codesourcery.com>
11580 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
11581 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
11582 HANDLE_PRAGMA_VISIBILITY.
11583 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
11584 HANDLE_PRAGMA_VISIBILITY): Don't define.
11585 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
11587 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
11592 * c-common.h (keyword_begins_type_specifier): Declare.
11593 (keyword_is_storage_class_specifier): Declare.
11594 (keyword_is_type_qualifier): Declare.
11595 * c-common.c (keyword_begins_type_specifier): New function.
11596 (keyword_is_storage_class_specifier): New function.
11597 (keyword_is_type_qualifier): Declare.
11599 2010-11-19 Joseph Myers <joseph@codesourcery.com>
11602 * c-common.c (in_late_binary_op): Define.
11603 (c_common_truthvalue_conversion): Check in_late_binary_op before
11604 calling c_save_expr.
11605 * c-common.h (in_late_binary_op): Declare.
11607 2010-11-19 Joseph Myers <joseph@codesourcery.com>
11609 * c-opts.c (c_common_handle_option): Update calls to
11610 set_struct_debug_option.
11612 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
11614 * c-common.h (objc_declare_protocols): Added additional argument.
11615 * stub-objc.c (objc_declare_protocol): Same change.
11617 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
11620 * c-common.h (build_real_imag_expr): Declare.
11621 * c-semantics.c (build_real_imag_expr): Define.
11623 2010-11-17 Joseph Myers <joseph@codesourcery.com>
11625 * c-opts.c (c_common_parse_file): Take no arguments.
11626 * c-common.h (c_common_parse_file): Update prototype.
11628 2010-11-16 Jakub Jelinek <jakub@redhat.com>
11631 * c-common.c (warning_candidate_p): Don't track non-const calls
11634 2010-11-15 Ian Lance Taylor <iant@google.com>
11636 * c-lex.c (init_c_lex): Set macro debug callbacks if
11637 flag_dump_go_spec is set.
11639 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
11641 * c-common.h (objc_build_incr_expr_for_property_ref): New.
11642 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
11644 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
11646 PR preprocessor/45038
11647 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
11650 2010-11-12 Joseph Myers <joseph@codesourcery.com>
11652 * c-common.h (c_family_lang_mask): Declare.
11653 * c-opts.c (c_family_lang_mask): Make extern.
11654 * c-pragma.c (handle_pragma_diagnostic): Use
11655 control_warning_option.
11657 2010-11-12 Joseph Myers <joseph@codesourcery.com>
11659 * c-common.c (parse_optimize_options): Update call to
11661 * c-common.h (c_common_handle_option): Update prototype.
11662 * c-opts.c (c_common_handle_option): Take location_t parameter and
11663 pass it to other functions.
11665 2010-11-11 Joseph Myers <joseph@codesourcery.com>
11667 * c-opts.c (warning_as_error_callback): Remove.
11668 (c_common_initialize_diagnostics): Don't call
11669 register_warning_as_error_callback.
11670 (c_common_handle_option): Handle -Werror=normalized= here.
11672 2010-11-10 Joseph Myers <joseph@codesourcery.com>
11674 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
11676 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
11678 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
11679 Remove trailing '.' from diagnostics.
11680 * c.opt (Wwrite-strings_: Avoid '`' in help text.
11682 2010-11-10 Joseph Myers <joseph@codesourcery.com>
11684 * c-common.c (parse_optimize_options): Pass global_dc to
11686 * c-opts.c (c_common_handle_option): Pass &global_options to
11687 set_Wstrict_aliasing.
11688 * c.opt (v): Don't mark Common or document here.
11690 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
11693 * c-format.c (format_type): New type gcc_objc_string_format_type.
11694 (valid_stringptr_type_p): New.
11695 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
11696 (check_format_string): Pass expected type, use
11697 valid_stringptr_type_p (), check that the format string types are
11698 consistent with the format specification.
11699 (decode_format_attr): Warn if NSString is used outside objective-c.
11700 (format_types_orig): Add NSString.
11701 (format_name): New.
11702 (format_flags): New.
11703 (check_format_arg): Handle format strings requiring an external parser.
11704 first_target_format_type: New variable.
11705 (handle_format_attribute): Set up first_target_format_type, pass the
11706 expected format arg string type to check_format_string().
11707 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
11708 * stub-objc.c (objc_string_ref_type_p): New.
11709 (objc_check_format_arg): New.
11711 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
11713 Fixed using the Objective-C 2.0 dot-syntax with class names.
11714 * c-common.h (objc_build_class_component_ref): New.
11715 * stub-objc.c (objc_build_class_component_ref): New.
11717 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11719 * c.opt (Wproperty-assign-default): New option.
11721 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
11723 Implemented -fobjc-std=objc1 flag.
11724 * c.opt (fobjc-std=objc1): New option.
11726 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
11728 Implemented format and noreturn attributes for Objective-C methods.
11729 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
11730 attribute for Objective-C methods.
11732 2010-10-31 Jason Merrill <jason@redhat.com>
11734 * c-common.c (conversion_warning, warn_for_collisions_1): Use
11737 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
11739 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
11740 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
11741 (objc_add_property_declaration): Removed arguments for copies and
11743 (objc_build_getter_call): Renamed to
11744 objc_maybe_build_component_ref.
11745 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11746 (objc_is_property_ref): New.
11747 * c-common.c (c_common_reswords): Removed copies and ivar.
11748 * stub-objc.c (objc_add_property_declaration): Removed arguments
11749 for copies and ivar.
11750 (objc_build_getter_call): Renamed to
11751 objc_maybe_build_component_ref.
11752 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
11753 (objc_is_property_ref): New.
11755 2010-10-29 Arnaud Charlet <charlet@adacore.com>
11756 Matthew Gingell <gingell@adacore.com>
11758 * c-ada-spec.c (separate_class_package): New function.
11759 (pp_ada_tree_identifier): Prefix references to C++ classes with the
11760 name of their enclosing package.
11761 (print_ada_declaration): Use separate_class_package.
11763 2010-10-27 Jason Merrill <jason@redhat.com>
11765 * c-common.c (c_common_reswords): Add __is_literal_type.
11766 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
11768 * c-common.c (check_case_value): Remove special C++ code.
11770 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11772 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
11773 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
11774 and RID_LAST_PATTR.
11775 (objc_add_property_declaration): Added additional arguments.
11776 (objc_property_attribute_kind): Removed.
11777 (objc_set_property_attr): Removed.
11778 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
11779 copy and nonatomic.
11780 * stub-objc.c (objc_add_property_declaration): Added additional
11782 (objc_set_property_attr): Removed.
11784 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
11786 * c-common.h (objc_add_property_variable): Renamed to
11787 objc_add_property_declaration. Added location argument.
11788 * stub-objc.c (objc_add_property_variable): Same change.
11790 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
11792 * c-common.h (objc_maybe_printable_name): New.
11793 * stub-objc.c (objc_maybe_printable_name): New.
11795 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
11796 Andrew Pinski <pinskia@gmail.com>
11798 * c-common.h (c_common_mark_addressable_vec): Declare.
11799 * c-common.c (c_common_mark_addressable_vec): New function.
11801 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11803 * c-common.h (objc_set_method_type): Removed.
11804 (objc_add_method_declaration): Added boolean argument.
11805 (objc_start_method_definition): Same change.
11806 (objc_build_method_signature): Same change.
11807 * stub-objc.c (objc_set_method_type): Removed.
11808 (objc_add_method_declaration): Added boolean argument.
11809 (objc_start_method_definition): Same change.
11810 (objc_build_method_signature): Same change.
11812 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
11814 * c-common.h (finish_file): Removed.
11815 (objc_write_global_declarations): New.
11816 * c-opts.c (c_common_parse_file): Do not call finish_file.
11817 * stub-objc.c (objc_write_global_declarations): New.
11819 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11821 Implemented parsing @synthesize and @dynamic for
11822 Objective-C/Objective-C++.
11823 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
11824 (objc_add_synthesize_declaration): New.
11825 (objc_add_dynamic_declaration): New.
11826 * c-common.c (c_common_reswords): Add synthesize and dynamic.
11827 * stub-objc.c (objc_add_synthesize_declaration): New.
11828 (objc_add_dynamic_declaration): New.
11830 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
11833 * c-cppbuiltin.c (mode_has_fma): Move function here from
11834 builtins.c. Don't use the fma optab, instead just use the
11835 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
11838 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
11840 Merge from 'apple/trunk' branch on FSF servers.
11842 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
11845 * c-common.h (objc_non_volatilized_type): New declaration
11846 * stub-objc.c (objc_non_volatilized_type): New stub.
11848 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
11850 Merge from 'apple/trunk' branch on FSF servers.
11852 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
11855 * c-common.h (objc_diagnose_private_ivar): New decl.
11856 * stub-objc.c (objc_diagnose_private_ivar): New stub.
11858 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
11860 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
11861 * c-common.h (enum rid): Add RID_AT_PACKAGE.
11862 (objc_ivar_visibility_kind): New enum.
11863 (objc_set_visibility): Adjust prototype to use visibility enum.
11864 * stub-objc.c (objc_set_visibility): Adjust stub to use
11867 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
11869 * c-cppbuiltin.c (builtin_define_float_constants): Emit
11870 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
11871 has the appropriate fma builtins.
11872 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
11874 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
11876 merge from FSF apple 'trunk' branch.
11877 2006 Fariborz Jahanian <fjahanian@apple.com>
11879 Radars 4436866, 4505126, 4506903, 4517826
11880 * c-common.c (c_common_resword): Define @property and its attributes.
11881 * c-common.h: Define property attribute enum entries.
11882 (OBJC_IS_PATTR_KEYWORD): New.
11883 (objc_property_attribute_kind): New enum.
11884 Declare objc_set_property_attr (), objc_add_property_variable (),
11885 objc_build_getter_call () and objc_build_setter_call ().
11886 * stub-objc.c (objc_set_property_attr): New stub.
11887 (objc_add_property_variable): Likewise.
11888 (objc_build_getter_call): Likewise.
11889 (objc_build_setter_call) Likewise.
11891 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
11893 merge from FSF apple 'trunk' branch.
11894 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
11896 Radar 3803157 (method attributes)
11897 * c-common.c (handle_deprecated_attribute): Recognize
11898 objc methods as valid declarations.
11899 * c-common.h: Declare objc_method_decl ().
11900 * stub-objc.c (objc_method_decl): New stub.
11902 2010-10-08 Joseph Myers <joseph@codesourcery.com>
11904 * c-common.c (parse_optimize_options): Call
11905 decode_cmdline_options_to_array_default_mask before
11906 decode_options. Update arguments to decode_options.
11907 * c-common.h (c_common_init_options_struct): Declare.
11908 * c-opts.c (c_common_init_options_struct): New. Split out from
11909 c_common_init_options.
11911 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
11913 Implemented fast enumeration for Objective-C.
11914 * c-common.h (objc_finish_foreach_loop): New.
11915 * stub-objc.c (objc_finish_foreach_loop): New.
11917 2010-10-05 Joseph Myers <joseph@codesourcery.com>
11919 * c-common.h (struct diagnostic_context): Don't declare here.
11920 (c_common_initialize_diagnostics): Declare using
11921 diagnostic_context typedef.
11922 * c-opts.c (c_common_handle_option): Pass global_dc to
11923 handle_generated_option.
11925 2010-10-04 Joseph Myers <joseph@codesourcery.com>
11927 * c-opts.c (c_common_handle_option): Pass &global_options_set to
11928 handle_generated_option.
11930 2010-10-03 Ian Lance Taylor <iant@google.com>
11932 * c.opt (-fplan9-extensions): New option.
11934 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
11936 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
11938 (c_cpp_builtins): Call functions from cppbuiltin.c instead
11939 of duplicating code.
11941 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
11943 * c-common.c: Add two new entries for @optional
11944 and @required keywords.
11946 merge from FSF 'apple/trunk' branch.
11947 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
11950 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
11951 objective-c keywords.
11952 (objc_set_method_opt): New declaration.
11953 * stub-objc.c (objc_set_method_opt): New stub.
11955 2010-09-30 Joseph Myers <joseph@codesourcery.com>
11957 * c-common.c (handle_optimize_attribute): Pass &global_options to
11958 cl_optimization_save and cl_optimization_restore.
11959 * c-opts.c (c_common_handle_option): Pass &global_options to
11960 handle_generated_option.
11961 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
11962 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
11963 &global_options to cl_optimization_restore.
11965 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
11967 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
11968 Objective-C/Objective-C++ keywords.
11970 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11972 Merge from 'apple/trunk' branch on FSF servers.
11974 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
11977 * c-common.h (objc_check_global_decl): New declaration.
11978 * stub-objc.c (objc_check_global_decl): New stub.
11980 2010-09-29 Joseph Myers <joseph@codesourcery.com>
11982 * c.opt: Don't use VarExists.
11984 2010-09-29 Joseph Myers <joseph@codesourcery.com>
11986 * c-common.c (c_cpp_error): Update names of diagnostic_context
11988 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
11989 cl_optimization members.
11990 * c-opts.c (warning_as_error_callback, c_common_handle_option,
11991 sanitize_cpp_opts, finish_options): Update names of cpp_options
11994 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
11996 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
11997 (objc_is_reserved_word): Removed.
11998 * c-common.c: Updated comments.
11999 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
12000 objc_is_reserved_word.
12001 * stub-objc.c (objc_is_reserved_word): Removed.
12003 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12005 * c-common.h (objc_add_method_declaration): Adjust prototype to
12006 include attributes.
12007 (objc_start_method_definition): Likewise.
12008 (objc_build_keyword_decl): Likewise.
12009 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
12010 (objc_start_method_definition): Likewise.
12011 (objc_build_keyword_decl): Likewise.
12013 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
12015 * c-common.h (objc_start_class_interface): Adjust prototype.
12016 (objc_start_category_interface): Likewise.
12017 (objc_start_protocol): Likewise.
12018 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
12019 (objc_start_class_interface): Likewise.
12020 (objc_start_category_interface): Likewise.
12022 2010-09-27 Ian Lance Taylor <iant@google.com>
12024 * c-common.c (c_common_attribute_table): Add no_split_stack.
12025 (handle_no_split_stack_attribute): New static function.
12027 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
12029 Merge from 'apple/trunk' branch on FSF servers.
12031 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
12034 * c-common.h (objc_have_common_type): New declaration.
12035 * stub-objc.c (objc_have_common_type): New stub.
12037 2005-06-22 Ziemowit Laski <zlaski@apple.com>
12040 * c-common.h (objc_common_type): New prototype.
12041 * stub-objc.c (objc_common_type): New stub.
12043 2010-09-24 Jan Hubicka <jh@suse.cz>
12045 * c-common.c (handle_leaf_attribute): New function.
12046 (struct attribute_spec c_common_att): Add leaf.
12048 2010-09-22 Joseph Myers <joseph@codesourcery.com>
12050 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
12051 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
12052 -dump, -dump=, -imacros, -imacros=, -include, -include=,
12053 -include-barrier, -include-directory, -include-directory=,
12054 -include-directory-after, -include-directory-after=,
12055 -include-prefix, -include-prefix=, -include-with-prefix,
12056 -include-with-prefix=, -include-with-prefix-after,
12057 -include-with-prefix-after=, -include-with-prefix-before,
12058 -include-with-prefix-before=, -no-integrated-cpp,
12059 -no-line-commands, -no-standard-includes, -no-warnings, -output,
12060 -output=, -pedantic, -pedantic-errors, -preprocess,
12061 -print-missing-file-dependencies, -trace-includes, -traditional,
12062 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
12063 -user-dependencies, -verbose, -write-dependencies,
12064 -write-user-dependencies, no-integrated-cpp, traditional): New.
12066 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12069 * c-common.h (objc_start_method_definition): Return bool instead
12071 * stub-objc.c (objc_start_method_definition): Return bool instead
12074 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
12077 * c-common.h (objc_get_interface_ivars): New declaration.
12078 * stub-objc.c (objc_get_interface_ivars): New stub.
12080 2010-09-15 Ian Lance Taylor <iant@google.com>
12082 * c-common.c (parse_optimize_options): Do not capitalize warning
12083 messages. Remove period at end of warning message.
12085 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
12087 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
12088 (handle_alias_attribute): ... here.
12089 (handle_ifunc_attribute): New.
12091 2010-09-06 Mark Mitchell <mark@codesourcery.com>
12093 * c-common.h (do_warn_double_promotion): Declare.
12094 * c-common.c (do_warn_double_promotion): Define.
12096 2010-09-05 Mark Mitchell <mark@codesourcery.com>
12098 * c.opt (Wdouble-promotion): New.
12100 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12102 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
12103 fvtable-thunks, fxref): Mark no longer supported in help text.
12105 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12107 * c.opt (Wimport, fall-virtual, falt-external-templates,
12108 fdefault-inline, fenum-int-equiv, fexternal-templates,
12109 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
12110 fname-mangling-version-, fnew-abi, fnonnull-objects,
12111 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
12112 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
12114 (fhandle-exceptions): Mark with Alias and Warn.
12115 * c-opts.c (c_common_handle_option): Don't handle options marked
12118 2010-09-02 Joseph Myers <joseph@codesourcery.com>
12120 * c.opt (Wcomments, Werror-implicit-function-declaration,
12121 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
12122 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
12124 * c-common.c (option_codes): Use OPT_Wcomment instead of
12126 * c-opts.c (warning_as_error_callback, c_common_handle_option):
12127 Don't handle options marked as aliases.
12129 2010-08-25 Richard Guenther <rguenther@suse.de>
12131 * c-common.c (c_common_get_alias_set): Remove special
12132 handling for pointers.
12134 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
12136 * c-common.c: Use FOR_EACH_VEC_ELT.
12137 * c-gimplify.c: Likewise.
12138 * c-pragma.c: Likewise.
12140 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12142 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
12144 (MMDX): Change back to MMD. Mark NoDriverArg instead of
12146 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
12147 instead of OPT_MDX and OPT_MMDX.
12149 2010-08-16 Joseph Myers <joseph@codesourcery.com>
12151 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
12153 2010-08-12 Joseph Myers <joseph@codesourcery.com>
12155 * c.opt (MD, MMD): Change to MDX and MMDX.
12156 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
12158 2010-08-11 Joseph Myers <joseph@codesourcery.com>
12160 * c-opts.c (c_common_handle_option): Call handle_generated_option
12161 instead of handle_option.
12163 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12165 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
12166 (maybe_apply_renaming_pragma): Delete unneeded declarations.
12168 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
12170 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
12171 (pending_redefine_extname): Change type to a VEC.
12172 (add_to_renaming_pragma_list): Update for new type of
12173 pending_redefine_extname.
12174 (maybe_apply_renaming_pragma): Likewise.
12176 2010-08-04 Arnaud Charlet <charlet@adacore.com>
12178 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
12180 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
12181 decide whether a type has already been declared/seen.
12182 Do not go to the original type.
12183 (dump_nested_types): New parameter forward.
12184 Generate forward declaration if needed and mark type as visited.
12185 (print_ada_declaration): Call dump_nested_types if not already done.
12186 Mark types as visited.
12188 2010-08-03 Joseph Myers <joseph@codesourcery.com>
12190 * c.opt (-print-pch-checksum): Remove option.
12191 * c-opts.c (c_common_handle_option): Don't handle
12192 OPT_print_pch_checksum.
12194 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12196 * c-common.h (c_common_handle_option): Update prototype and return
12198 * c-opts.c (c_common_handle_option): Update prototype and return
12199 value type. Update calls to handle_option and
12200 enable_warning_as_error.
12202 2010-07-27 Jakub Jelinek <jakub@redhat.com>
12205 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
12207 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12209 * c-common.h (c_common_missing_argument): Remove.
12210 * c-opts.c (c_common_missing_argument): Remove.
12211 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
12212 idirafter, imacros, include, isysroot, isystem, iquote): Add
12214 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
12216 2010-07-27 Joseph Myers <joseph@codesourcery.com>
12218 * c-common.h (c_common_option_lang_mask,
12219 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
12221 (c_common_init_options): Update prototype.
12222 * c-opts.c (c_common_option_lang_mask): New.
12223 (c_common_initialize_diagnostics): Split out of
12224 c_common_init_options.
12225 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
12227 (c_common_init_options): Update prototype. Use decoded options in
12228 search for -lang-asm.
12230 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
12232 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
12233 * c-format.c: Likewise.
12235 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
12237 * c-common.h: Include diagnostic-core.h. Error if already
12239 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
12241 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
12243 * c-common.c (IN_GCC_FRONTEND): Do not undef.
12244 Do not include expr.h
12245 (vector_mode_valid_p): Move here.
12247 2010-06-21 DJ Delorie <dj@redhat.com>
12249 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
12250 allow these pragmas anywhere.
12252 2010-06-14 Jakub Jelinek <jakub@redhat.com>
12255 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
12256 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
12257 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
12258 ggc_strdup instead of xstrdup.
12260 2010-06-10 Jakub Jelinek <jakub@redhat.com>
12262 * c-cppbuiltin.c: Include cpp-id-data.h.
12263 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
12264 (lazy_hex_fp_value): New function.
12265 (builtin_define_with_hex_fp_value): Provide definitions lazily.
12267 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
12269 * c-gimplify.c: Do not include tree-flow.h
12271 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
12274 * c-common.c: Rename targetm member:
12275 targetm.enum_va_list -> targetm.enum_va_list_p
12277 2010-06-28 Anatoly Sokolov <aesok@post.ru>
12279 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
12281 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
12283 * c-cppbuiltin.c: Do not include except.h.
12285 2010-06-24 Andi Kleen <ak@linux.intel.com>
12287 * c-common.c (warn_for_omitted_condop): New.
12288 * c-common.h (warn_for_omitted_condop): Add prototype.
12290 2010-06-21 Joseph Myers <joseph@codesourcery.com>
12292 * c.opt (lang-objc): Remove.
12293 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
12295 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
12297 * c-opts.c: Include "tm_p.h".
12299 2010-06-20 Joseph Myers <joseph@codesourcery.com>
12301 * c-common.c (parse_optimize_options): Update call to
12304 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
12306 * c-common.c (record_types_used_by_current_var_decl): Adjust for
12307 new type of types_used_by_cur_var_decl.
12309 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
12312 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
12313 for C++ standard compliance.
12315 2010-06-16 Jason Merrill <jason@redhat.com>
12317 * c.opt: Add -Wnoexcept.
12319 2010-06-16 Richard Guenther <rguenther@suse.de>
12322 * c-common.c (c_common_truthvalue_conversion): Remove
12323 premature and wrong optimization concering ADDR_EXPRs.
12325 2010-06-15 Arnaud Charlet <charlet@adacore.com>
12327 * c-ada-spec.c (dump_sloc): Remove column info.
12328 (is_simple_enum): New function.
12329 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
12330 enum types when relevant.
12332 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
12334 * c-common.c (conversion_warning): Warn at expression
12337 2010-06-10 Joseph Myers <joseph@codesourcery.com>
12339 * c-opts.c (c_common_handle_option): Don't handle
12342 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
12344 * c-pragma.c (push_alignment): Use typed GC allocation.
12345 (handle_pragma_push_options): Likewise.
12347 * c-common.c (parse_optimize_options): Likewise.
12349 * c-common.h (struct sorted_fields_type): Add variable_size GTY
12352 2010-06-07 Joseph Myers <joseph@codesourcery.com>
12354 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
12355 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12356 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12357 flag_signed_bitfields, warn_strict_null_sentinel,
12358 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
12359 flag_gen_declaration, flag_no_gnu_keywords,
12360 flag_implement_inlines, flag_implicit_templates,
12361 flag_implicit_inline_templates, flag_optional_diags,
12362 flag_elide_constructors, flag_default_inline, flag_rtti,
12363 flag_conserve_space, flag_access_control, flag_check_new,
12364 flag_new_for_scope, flag_weak, flag_working_directory,
12365 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
12366 flag_enforce_eh_specs, flag_threadsafe_statics,
12367 flag_pretty_templates): Remove.
12368 * c-common.h (flag_preprocess_only, flag_nil_receivers,
12369 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
12370 flag_replace_objc_classes, flag_undef, flag_no_builtin,
12371 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
12372 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
12373 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
12374 flag_no_gnu_keywords, flag_implement_inlines,
12375 flag_implicit_templates, flag_implicit_inline_templates,
12376 flag_optional_diags, flag_elide_constructors, flag_default_inline,
12377 flag_rtti, flag_conserve_space, flag_access_control,
12378 flag_check_new, flag_new_for_scope, flag_weak,
12379 flag_working_directory, flag_use_cxa_atexit,
12380 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
12381 flag_threadsafe_statics, flag_pretty_templates,
12382 warn_strict_null_sentinel): Remove.
12383 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
12384 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
12385 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
12386 fimplicit-inline-templates, fimplicit-templates,
12387 flax-vector-conversions, fms-extensions, fnil-receivers,
12388 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
12389 frtti, fshort-double, fshort-enums, fshort-wchar,
12390 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
12391 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
12392 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
12393 gen-decls, undef): Use Var.
12394 (fdefault-inline, foptional-diags): Document as doing nothing.
12395 * c-opts.c (c_common_handle_option): Remove cases for options now
12396 using Var. Mark ignored options as such.
12398 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
12400 * c-common.c: Moved to here from parent directory.
12401 * c-common.def: Likewise.
12402 * c-common.h: Likewise.
12403 * c-cppbuiltin.c: Likewise.
12404 * c-dump.c: Likewise.
12405 * c-format.c: Likewise.
12406 * c-format.h : Likewise.
12407 * c-gimplify.c: Likewise.
12408 * c-lex.c: Likewise.
12409 * c-omp.c: Likewise.
12411 * c-opts.c: Likewise.
12412 * c-pch.c: Likewise.
12413 * c-ppoutput.c: Likewise.
12414 * c-pragma.c: Likewise.
12415 * c-pragma.h: Likewise.
12416 * c-pretty-print.c: Likewise.
12417 * c-pretty-print.h: Likewise.
12418 * c-semantics.c: Likewise.
12419 * stub-objc.c: Likewise.
12421 * c-common.c: Include gt-c-family-c-common.h.
12422 * c-pragma.c: Include gt-c-family-c-pragma.h.
12424 Copyright (C) 2010-2021 Free Software Foundation, Inc.
12426 Copying and distribution of this file, with or without modification,
12427 are permitted in any medium without royalty provided the copyright
12428 notice and this notice are preserved.