1 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
4 function declarations where arguments are missing. Rename variables.
6 2019-08-15 Richard Biener <rguenther@suse.de>
8 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
9 enabled, define __SIZETYPE__.
11 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
13 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
14 exclusion with "section" attribute.
15 (attr_noinit_exclusions): New table.
16 (handle_noinit_attribute): New function.
18 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
21 * c-common.c (resolve_overloaded_builtin): Use
22 copy_decl_built_in_function.
24 2019-08-13 Martin Sebor <msebor@redhat.com>
27 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
28 (asm_fprintf_length_spec): Same.
29 * c-format.h (format_lengths): Add FMT_LEN_w.
31 2019-08-10 Jakub Jelinek <jakub@redhat.com>
33 * c-pragma.h (enum pragma_omp_clause): Add
34 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
36 2019-08-07 Jakub Jelinek <jakub@redhat.com>
38 * c-pragma.h (enum pragma_omp_clause): Add
39 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
40 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
43 2019-08-05 Marek Polacek <polacek@redhat.com>
45 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
46 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
47 default for C++2a, unless -Wno-deprecated.
48 * c.opt (Wcomma-subscript): New warning.
50 2019-07-20 Jakub Jelinek <jakub@redhat.com>
52 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
53 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
54 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
55 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
56 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
57 constructs with the loop construct.
59 2019-07-13 Jakub Jelinek <jakub@redhat.com>
62 * c-omp.c (c_omp_split_clauses): Fix a pasto in
63 OMP_CLAUSE_REDUCTION_TASK handling.
65 2019-07-12 Jakub Jelinek <jakub@redhat.com>
67 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
68 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
70 2019-07-09 Martin Sebor <msebor@redhat.com>
73 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
75 * c-pretty-print.h: Same.
77 2019-07-09 Martin Sebor <msebor@redhat.com>
80 * c-format.c (check_argument_type): Change class-key from class to
81 struct and vice versa to match convention and avoid -Wclass-is-pod
83 * c-pretty-print.h: Same.
85 2019-07-03 Martin Liska <mliska@suse.cz>
87 * c-common.c (try_to_locate_new_include_insertion_point): Remove
90 2019-07-03 Jakub Jelinek <jakub@redhat.com>
92 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
93 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
96 2019-07-02 qing zhao <qing.zhao@oracle.com>
99 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
100 * c.opt: Add new option -fmax-include-depth.
102 2019-06-26 Jason Merrill <jason@redhat.com>
104 PR c++/55442 - memory-hog with highly recursive constexpr.
105 * c.opt (fconstexpr-loop-limit): New.
107 2019-06-25 Jakub Jelinek <jakub@redhat.com>
110 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
111 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
113 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
115 * c-common.c (c_common_nodes_and_builtins): Define
116 alternate "__intN__" name for "__intN" types.
118 2019-06-24 Jan Hubicka <jh@suse.cz>
120 * c-common.c (braced_lists_to_strings): Check that
121 type is array or integer prior checking string flag.
123 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
125 PR c++/90875 - added -Wswitch-outside-range option
126 * c.opt (Wswitch-outside-range): Added new option.
127 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
129 2019-06-21 Marek Polacek <polacek@redhat.com>
131 PR c++/90953 - ICE with -Wmissing-format-attribute.
132 * c-common.c (check_function_arguments_recurse): Use
134 (check_missing_format_attribute): Likewise.
136 2019-06-19 Marek Polacek <polacek@redhat.com>
138 PR c++/60364 - noreturn after first decl not diagnosed.
139 * c-attribs.c (handle_noreturn_attribute): No longer static.
140 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
142 * c-format.c (check_function_format): Use get_attribute_name.
144 2019-06-19 Martin Sebor <msebor@redhat.com>
147 * c-format.c (function_format_info::format_type): Adjust type.
148 (function_format_info::is_raw): New member.
149 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
150 (decode_format_attr): Adjust call to decode_format_type.
151 Avoid a redundant call to convert_format_name_to_system_name.
152 Avoid abbreviating the word "arguments" in a diagnostic.
153 (format_warning_substr): New function.
154 (avoid_dollar_number): Quote dollar sign in a diagnostic.
155 (finish_dollar_format_checking): Same.
156 (check_format_info): Same.
157 (struct baltoks_t): New.
158 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
159 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
161 (check_format_info_main): Call check_plain. Use baltoks_t. Call
162 maybe_diag_unbalanced_tokens.
163 (handle_format_attribute): Spell out the word "arguments" in
166 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
168 PR c++/90449 - add -Winaccessible-base option.
169 * c.opt (Winaccessible-base): New option.
171 2019-06-10 Jakub Jelinek <jakub@redhat.com>
173 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
174 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
175 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
176 combined/composite constructs where it is not allowed. Copy over
177 OMP_CLAUSE_REDUCTION_INSCAN.
179 2019-06-05 Martin Sebor <msebor@redhat.com>
181 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
182 (handle_alias_ifunc_attribute): Same.
183 (handle_copy_attribute): Same.
184 (handle_weakref_attribute): Same.
185 (handle_nonnull_attribute): Same.
186 * c-warn.c (warn_for_sign_compare): Same.
187 (warn_for_restrict): Same.
190 2019-06-05 Martin Sebor <msebor@redhat.com>
192 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
193 * c.opt (-Wformat-diag): Remove a spurious period.
195 2019-05-29 Jakub Jelinek <jakub@redhat.com>
198 * c-common.c (check_builtin_function_arguments)
199 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
202 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
204 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
206 2019-05-22 Martin Liska <mliska@suse.cz>
209 * c-attribs.c (handle_copy_attribute): Do not copy
210 target_clones attribute.
212 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
214 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
215 * c-ada-spec.c (print_assignment_operator): New function.
216 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
217 assignment operators declared as methods and filter out the others.
219 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
222 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
223 "omp declare target".
225 2019-05-16 Martin Sebor <msebor@redhat.com>
227 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
228 keywords, operators, and types in diagnostics.
229 (handle_scalar_storage_order_attribute): Same.
230 (handle_mode_attribute): Same.
231 (handle_visibility_attribute): Same.
232 (handle_assume_aligned_attribute): Same.
233 (handle_no_split_stack_attribute): Same.
234 * c-common.c (shorten_compare): Same.
235 (c_common_truthvalue_conversion): Same.
236 (cb_get_source_date_epoch): Same.
237 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
239 (interpret_float): Same.
240 * c-omp.c (c_finish_omp_for): Same.
241 * c-opts.c (c_common_post_options): Same.
242 * c-pch.c (c_common_pch_pragma): Same.
243 * c-pragma.c (pop_alignment): Same.
244 (handle_pragma_pack): Same.
245 (apply_pragma_weak): Same.
246 (handle_pragma_weak): Same.
247 (handle_pragma_scalar_storage_order): Same.
248 (handle_pragma_redefine_extname): Same.
249 (add_to_renaming_pragma_list): Same.
250 (maybe_apply_renaming_pragma): Same.
251 (push_visibility): Same.
252 (handle_pragma_visibility): Same.
253 (handle_pragma_optimize): Same.
254 (handle_pragma_message): Same.
255 * c-warn.c (warn_for_omitted_condop): Same.
256 (lvalue_error): Same.
258 2019-05-15 Richard Biener <rguenther@suse.de>
261 * c-common.c (c_common_mark_addressable_vec): Also mark
262 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
265 2019-05-06 Nathan Sidwell <nathan@acm.org>
267 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
269 2019-04-30 Nathan Sidwell <nathan@acm.org>
271 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
273 2019-04-30 Martin Liska <mliska@suse.cz>
275 * c-pragma.c (handle_pragma_diagnostic): Provide hints
278 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
280 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
281 the pointer target rather than the pointer itself.
283 2019-04-19 Jakub Jelinek <jakub@redhat.com>
286 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
288 (c_do_switch_warnings): Remove outside_range_p argument.
289 * c-common.c (check_case_bounds): Removed.
290 (c_add_case_label): Remove orig_type and outside_range_p arguments.
291 Don't call check_case_bounds. Fold low_value as well as high_value.
292 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
293 Check for case labels outside of range of original type here and
296 2019-04-12 Jakub Jelinek <jakub@redhat.com>
299 * c.opt (-fhandle-exceptions): Use %< and %> around option names
300 in the Warn diagnostics.
303 * c-attribs.c (handle_patchable_function_entry_attribute): Add
304 function comment. Warn if arguments of the attribute are not positive
307 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
309 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
310 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
312 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
314 * c-ada-spec.c (is_float128): New predicate extracted from...
315 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
316 <REAL_TYPE>: ...here. Call it.
318 2019-04-05 David Malcolm <dmalcolm@redhat.com>
321 * c-warn.c (check_address_or_pointer_of_packed_member): Add
322 auto_diagnostic_group. Guard inform calls by result of
325 2019-04-05 Marek Polacek <polacek@redhat.com>
327 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
328 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
331 2019-04-03 Jason Merrill <jason@redhat.com>
333 PR c++/86586 - -fcompare-debug=-Wsign-compare.
334 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
336 2019-04-01 Martin Sebor <msebor@redhat.com>
339 * c-attribs.c (handle_copy_attribute): Handle references and
340 non-constant expressions.
342 2019-03-22 Jakub Jelinek <jakub@redhat.com>
345 * c.opt (-fconstexpr-ops-limit=): New option.
347 2019-03-21 Jakub Jelinek <jakub@redhat.com>
349 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
352 2019-03-19 Martin Sebor <msebor@redhat.com>
354 PR tree-optimization/89688
355 * c-common.c (braced_list_to_string): Make static.
356 (braced_lists_to_strings): Define new function.
357 * c-common.h (braced_list_to_string): Remove.
358 (braced_lists_to_strings): Declare.
360 2019-03-12 Martin Liska <mliska@suse.cz>
362 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
364 2019-03-11 Martin Liska <mliska@suse.cz>
366 * c-opts.c (c_common_post_options): Wrap apostrophes
367 in gcc internal format with %'.
369 2019-03-11 Martin Liska <mliska@suse.cz>
371 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
372 in a string format message and fix GNU coding style.
373 * c-common.c (vector_types_convertible_p): Likewise.
374 (c_build_vec_perm_expr): Likewise.
375 * c-indentation.c (get_visual_column): Likewise.
376 * c-opts.c (c_common_handle_option): Likewise.
377 (c_common_post_options): Likewise.
378 (sanitize_cpp_opts): Likewise.
379 * c-pch.c (c_common_pch_pragma): Likewise.
380 * c-pragma.c (handle_pragma_pack): Likewise.
382 2019-03-08 Jakub Jelinek <jakub@redhat.com>
384 PR tree-optimization/89550
385 * c-common.c (c_common_truthvalue_conversion): Only set
386 TREE_NO_WARNING if warning_at returned true.
387 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
389 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
390 Martin Sebor <msebor@gmail.com>
392 * c.opt (Wmissing-attributes): Clean up doc string.
394 2019-02-25 Jakub Jelinek <jakub@redhat.com>
397 * c-format.c (maybe_read_dollar_number): Compute nargnum in
398 HOST_WIDE_INT type to avoid overflows and change overflow_flag
401 2019-02-22 Richard Biener <rguenther@suse.de>
403 * c-pch.c (no_checksum): Remove.
404 (pch_init): Remove assertion that executable_checksum is not
406 (c_common_valid_pch): Likewise.
408 2019-02-18 Martin Sebor <msebor@redhat.com>
411 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
413 2019-02-16 David Malcolm <dmalcolm@redhat.com>
416 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
417 implementing -Wtype-limits.
419 2019-02-11 Martin Sebor <msebor@redhat.com>
422 * c-common.c (invalid_array_size_error): New function.
423 (valid_array_size_p): Call it. Handle size as well as type.
424 * c-common.h (valid_constant_size_p): New function.
425 (enum cst_size_error): New type.
427 2019-01-31 David Malcolm <dmalcolm@redhat.com>
430 * known-headers.cc (get_stdlib_header_for_name): Add
431 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
433 2019-01-31 Jakub Jelinek <jakub@redhat.com>
436 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
437 a C cast in pp_c_flag_gnu_v3 mode.
439 2019-01-29 Jakub Jelinek <jakub@redhat.com>
442 * c-common.c (c_common_nodes_and_builtins): Build type variants for
443 builtin_structptr_types types even for C.
445 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
447 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
448 when rhs is of array type correctly. Fix handling of nested structures.
449 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
450 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
451 type casts within nested compound expressions.
453 2019-01-22 Jakub Jelinek <jakub@redhat.com>
456 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
457 variable after using BIT_FIELD_REF.
459 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
463 * c-common.h (warn_for_address_or_pointer_of_packed_member):
464 Remove the boolean argument.
465 * c-warn.c (check_address_of_packed_member): Renamed to ...
466 (check_address_or_pointer_of_packed_member): This. Also
467 warn pointer conversion.
468 (check_and_warn_address_of_packed_member): Renamed to ...
469 (check_and_warn_address_or_pointer_of_packed_member): This.
470 Also warn pointer conversion.
471 (warn_for_address_or_pointer_of_packed_member): Remove the
472 boolean argument. Don't check pointer conversion here.
474 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
477 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
479 2019-01-14 Jakub Jelinek <jakub@redhat.com>
481 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
482 and __cpp_nontype_template_parameter_auto. Add a comment that
483 __cpp_template_auto is deprecated.
485 2019-01-14 Tom Honermann <tom@honermann.net>
487 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
488 * c-common.c (c_common_reswords): Add char8_t.
489 (fix_string_type): Use char8_t for the type of u8 string literals.
490 (c_common_get_alias_set): char8_t doesn't alias.
491 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
493 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
494 (keyword_begins_type_specifier): Add RID_CHAR8.
495 * c-common.h (rid): Add RID_CHAR8.
496 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
497 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
498 Define char8_type_node and char8_array_type_node.
499 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
500 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
501 (c_cpp_builtins): Predefine __cpp_char8_t.
502 * c-lex.c (lex_string): Use char8_array_type_node as the type of
504 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
505 * c-opts.c: If not otherwise specified, enable -fchar8_t when
507 * c.opt: Add the -fchar8_t command line option.
509 2019-01-14 Martin Sebor <msebor@redhat.com>
512 * c-attribs.c (positional_argument): Call valid_format_string_type_p
513 and issue errors if it fails.
514 * c-common.h (valid_format_string_type_p): Declare.
515 * c-format.c (valid_stringptr_type_p): Rename...
516 (valid_format_string_type_p): ...to this and make extern.
517 (handle_format_arg_attribute): Adjust to new name.
518 (check_format_string): Same.
520 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
522 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
523 Replace "may may" with "may" in warning message.
525 2019-01-07 Jakub Jelinek <jakub@redhat.com>
528 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
529 (c_build_vec_convert): Declare.
530 * c-common.c (c_build_vec_convert): New function.
532 2019-01-04 Martin Sebor <msebor@redhat.com>
535 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
536 Handle C++ empty throw specification and C11 _Noreturn.
537 (has_attribute): Also handle C11 _Noreturn.
539 2019-01-04 Martin Sebor <msebor@redhat.com>
542 * c-attribs.c (positional_argument): Also accept enumerated types.
544 2019-01-01 Jakub Jelinek <jakub@redhat.com>
546 Update copyright years.
548 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
551 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
552 * c-warn.c (check_alignment_of_packed_member): New function.
553 (check_address_of_packed_member): Likewise.
554 (check_and_warn_address_of_packed_member): Likewise.
555 (warn_for_address_or_pointer_of_packed_member): Likewise.
556 * c.opt: Add -Wno-address-of-packed-member.
558 2018-12-20 David Malcolm <dmalcolm@redhat.com>
561 * c-warn.c (get_outermost_macro_expansion): New function.
562 (spelled_the_same_p): Use it to unwind the macro expansions, and
563 compare the outermost macro in each nested expansion, rather than
566 2018-12-19 David Malcolm <dmalcolm@redhat.com>
569 * c-common.h (warn_tautological_cmp): Convert 1st param from
570 location_t to const op_location_t &.
571 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
572 when testing for INTEGER_CST.
573 (warn_tautological_bitwise_comparison): Convert 1st param from
574 location_t to const op_location_t &; use it to build a
575 binary_op_rich_location, and use this.
576 (spelled_the_same_p): New function.
577 (warn_tautological_cmp): Convert 1st param from location_t to
578 const op_location_t &. Warn for macro expansions if
579 spelled_the_same_p. Use binary_op_rich_location.
581 2018-12-19 David Malcolm <dmalcolm@redhat.com>
585 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
586 (verify_tree): Handle location wrappers.
587 (c_common_truthvalue_conversion): Strip any location wrapper.
589 (fold_offsetof): Strip any location wrapper.
590 (complete_array_type): Likewise for initial_value.
591 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
592 index before checking for INTEGER_CST.
593 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
594 print parentheses around location wrappers.
595 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
596 before checking for INTEGER_CST.
597 (warn_tautological_bitwise_comparison): Call
598 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
599 before checking for INTEGER_CST.
600 (readonly_error): Strip any location wrapper.
601 (warn_array_subscript_with_type_char): Strip location wrappers
602 before checking for INTEGER_CST. Use the location of the index if
605 2018-12-06 Jason Merrill <jason@redhat.com>
607 PR c++/88136 - -Wdeprecated-copy false positives
608 * c.opt (Wdeprecated-copy-dtor): New.
609 (Wdeprecated-copy): Move to -Wextra.
611 2018-11-29 Martin Sebor <msebor@redhat.com>
615 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
616 alignments to values less than the target requires.
617 (has_attribute): For attribute aligned consider both the attribute
618 and the alignment bits.
619 * c-common.c (c_init_attributes): Optionally issue a warning for
622 2018-11-28 Martin Sebor <msebor@redhat.com>
626 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
627 or destination is an error.
629 2018-11-28 Jakub Jelinek <jakub@redhat.com>
632 * c-ubsan.c: Include langhooks.h.
633 (ubsan_instrument_division): Change gcc_assert that main variants
634 of op0 and op1 types are equal to gcc_checking_assert that the
635 main variants are compatible types.
637 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
639 * c-ada-spec.c: Include stringpool.h.
640 (has_static_fields): Return false for incomplete types.
641 (is_tagged_type): Likewise.
642 (has_nontrivial_methods): Likewise.
643 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
644 (struct overloaded_name_hash): New structure.
645 (struct overloaded_name_hasher): Likewise.
646 (overloaded_names): New global variable.
647 (init_overloaded_names): New static function.
648 (overloaded_name_p): New predicate.
649 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
650 on the TYPE_STUB_DECL of the original type of a typedef, if any.
651 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
652 Remove always-true condition and dump forward types.
653 (dump_ada_specs): Delete overloaded_names.
655 2018-11-20 Martin Sebor <msebor@redhat.com>
657 * c-attribs.c (type_for_vector_size): New function.
658 (type_valid_for_vector_size): Same.
659 (handle_vector_size_attribute): Move code to the functions above
661 (validate_attribute, has_attribute): New functions.
662 * c-common.h (has_attribute): Declare.
663 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
664 * c-common.c (c_common_resword): Same.
666 2018-11-16 Jason Merrill <jason@redhat.com>
668 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
669 * c-attribs.c (attr_cold_hot_exclusions): Make public.
671 2018-11-16 Jakub Jelinek <jakub@redhat.com>
674 * c-common.c (fix_string_type): Reject string literals larger than
675 TYPE_MAX_VALUE (ssizetype) bytes.
677 2018-11-15 Martin Sebor <msebor@redhat.com>
681 * c-attribs.c (positional_argument): New function.
682 (handle_alloc_size_attribute): Use it and simplify.
683 (handle_alloc_align_attribute): Same.
684 (handle_assume_aligned_attribute): Same.
685 (handle_nonnull_attribute): Same.
686 * c-common.c (check_function_arguments): Pass fntype to
687 check_function_format.
688 * c-common.h (check_function_format): Add an argument.
689 (PosArgFlags, positional_argument): Declare new type and function.
690 * c-format.c (decode_format_attr): Add arguments.
691 (check_format_string, get_constant): Same.
692 (convert_format_name_to_system_name): Adjust.
694 2018-11-15 David Malcolm <dmalcolm@redhat.com>
697 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
699 2018-11-14 Jakub Jelinek <jakub@redhat.com>
701 P1236R1 - Signed integers are two's complement
702 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
703 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
704 with in-range second operand well defined for -std=c++2a.
707 * c-common.c (parse_optimize_options): Allocate option string from
708 opts_obstack rather than as GC memory. Move the allocation after
709 warning for invalid option.
711 2018-11-13 David Malcolm <dmalcolm@redhat.com>
713 * c-common.c (c_get_substring_location): Update for renaming of
714 get_source_location_for_substring to get_location_within_string.
715 * c-lex.c: Replace "source_location" with "location_t".
716 * c-opts.c: Likewise.
717 * c-ppoutput.c: Likewise.
719 2018-11-13 Martin Sebor <msebor@redhat.com>
722 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
723 (handle_tls_model_attribute): Improve diagnostics.
725 2018-11-12 Jason Merrill <jason@redhat.com>
727 * c-cppbuiltin.c (c_cpp_builtins): Define
728 __cpp_impl_destroying_delete.
730 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
731 __cpp_conditional_explicit.
733 2018-11-09 Martin Sebor <msebor@redhat.com>
736 * c-attribs.c (handle_copy_attribute): New function.
738 2018-11-09 Martin Sebor <msebor@redhat.com>
741 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
743 2018-11-08 Jakub Jelinek <jakub@redhat.com>
745 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
746 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
747 enum omp_memory_order MEMORY_ORDER.
748 (c_finish_omp_flush): Add MO argument.
749 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
750 (c_finish_omp_for): Add FINAL_P argument.
751 * c-omp.c: Include memmodel.h.
752 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
753 OMP_TASKGROUP_CLAUSES to it.
754 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
755 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
756 instead of OMP_ATOMIC_SEQ_CST.
757 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
758 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
759 __atomic_thread_fence call with the given value.
760 (check_omp_for_incr_expr): Formatting fixes.
761 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
762 even in OpenMP loops, diagnose if NE_EXPR and incr expression
763 is not constant expression 1 or -1. Transform NE_EXPR loops
764 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
765 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
767 (c_omp_split_clauses): Add support for combined
768 #pragma omp parallel master and
769 #pragma omp {,parallel }master taskloop{, simd} constructs.
770 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
771 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
772 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
773 (c_omp_predetermined_sharing): Don't return
774 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
775 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
777 * c-pragma.h (enum pragma_kind): Likewise.
778 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
779 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
781 2018-11-08 David Malcolm <dmalcolm@redhat.com>
783 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
785 2018-11-08 David Malcolm <dmalcolm@redhat.com>
787 * c-format.c (local_cgraph_node_ptr_node): New variable.
788 (gcc_dump_printf_char_table): Add entry for %C.
789 (get_pointer_to_named_type): New function, taken from the handling
790 code for "gimple *" from...
791 (init_dynamic_diag_info): ...here. Add handling for
793 * c-format.h (T_CGRAPH_NODE): New.
795 2018-10-19 Jason Merrill <jason@redhat.com>
797 * c-cppbuiltin.c (c_cpp_builtins): Add
798 __cpp_nontype_template_parameter_class.
800 2018-10-31 Nathan Sidwell <nathan@acm.org>
802 * c-opts.c (c_finish_options): Force command line macro
803 location. Refactor to avoid repeating main debug hook.
804 (push_command_line_include): Clarify comment.
806 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
808 2018-10-30 Martin Sebor <msebor@redhat.com>
811 * c-format.c (check_format_types): Avoid diagnosing null pointer
812 arguments to printf-family of functions.
814 2018-10-30 Marek Polacek <polacek@redhat.com>
816 Implement P0892R2, explicit(bool).
817 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
819 2018-10-29 David Malcolm <dmalcolm@redhat.com>
821 * name-hint.h (name_hint::take_deferred): New member function.
823 2018-10-29 David Malcolm <dmalcolm@redhat.com>
826 * c-common.c (check_function_sentinel): Call fold_for_warn on the
828 (check_function_restrict): Rename param "argarray" to
829 "unfolded_argarray", and make a copy named "argarray", calling
830 fold_for_warn on each argument.
831 (check_function_arguments): Add note about responsibility for
832 folding the arguments.
834 2018-10-17 Joseph Myers <joseph@codesourcery.com>
836 * c-common.c (flag_isoc2x): New variable.
837 * c-common.h (clk_c): Update comment to reference C2X.
838 (flag_isoc99, flag_isoc11): Update comments to reference future
839 standard versions in general.
840 (flag_isoc2x): Declare.
841 * c-opts.c (set_std_c2x): New function.
842 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
843 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
845 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
847 2018-10-17 Joseph Myers <joseph@codesourcery.com>
849 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
850 (std=iso9899:2018): Document C17 as published in 2018.
852 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
855 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
857 2018-10-11 Will Wray <wjwray@gmail.com>
860 * c-pretty-print.h (pp_c_type_cast): Prototype.
861 (pp_c_integer_constant): Likewise.
862 * c-pretty-print.c (pp_c_type_cast): No longer static.
863 (pp_c_integer_constant): Likewise.
864 (pp_c_enumeration_constant): Fix loop termination when finding
865 name of constant. No longer returns a value. Call
866 pp_c_integer_constant.
867 (c_pretty_printer::constant): Update for changes to
868 pp_c_enumeration_constant.
870 2018-10-11 Jakub Jelinek <jakub@redhat.com>
872 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
873 for no_unique_address.
875 2018-10-09 David Malcolm <dmalcolm@redhat.com>
877 * c-common.c (c_option_controlling_cpp_error): Rename to...
878 (c_option_controlling_cpp_diagnostic): ...this, and convert
879 "reason" from int to enum.
880 (c_cpp_error): Rename to...
881 (c_cpp_diagnostic): ...this, converting level and reason to enums.
882 * c-common.h (c_cpp_error): Rename to...
883 (c_cpp_diagnostic): ...this, converting level and reason to enums.
884 * c-opts.c (c_common_init_options): Update for renaming.
886 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
889 * c-common.c (vector_types_compatible_elements_p): Use
890 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
892 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
894 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
895 to generate constructor destructor priority warning.
896 * c.opt (-Wprio-ctor-dtor): New option.
898 2018-10-01 Jason Merrill <jason@redhat.com>
900 * c-lex.c (c_common_has_attribute): Add no_unique_address.
902 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
904 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
905 (dump_ada_node): Add const keyword.
907 2018-09-25 Martin Liska <mliska@suse.cz>
909 * c-common.c (c_common_truthvalue_conversion):
910 Remove Pascal from documentation.
912 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
914 * c-ada-spec.c: Include diagnostic.h.
915 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
917 2018-09-19 Marek Polacek <polacek@redhat.com>
919 * c.opt (Wclass-conversion): New.
921 2018-09-17 David Malcolm <dmalcolm@redhat.com>
923 * c-format.c (range_label_for_format_type_mismatch::get_text):
924 Update for new param.
926 2018-09-17 David Malcolm <dmalcolm@redhat.com>
928 * c-format.c (format_warning_at_char): Update for introduction of
929 format_string_diagnostic_t.
930 (format_type_warning): Likewise.
932 2018-09-17 Martin Jambor <mjambor@suse.cz>
935 * c.opt (Wabsolute-value): New.
937 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
939 * c-common.c (complete_flexible_array_elts): New helper function.
940 * c-common.h (complete_flexible_array_elts): Declare.
942 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
944 * c-common.c (braced_list_to_string): Remove eval parameter.
945 Add some more checks. Always create zero-terminated STRING_CST.
946 * c-common.h (braced_list_to_string): Adjust prototype.
948 2018-08-27 David Malcolm <dmalcolm@redhat.com>
951 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
953 (maybe_suggest_missing_token_insertion): Likewise.
954 (maybe_add_include_fixit): Add param "override_location". If set,
955 and source-printing is enabled, then override the rich_location's
956 primary location with that of the insertion point for the fix-it
957 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
958 * c-common.h (extern void maybe_add_include_fixit): Add bool
960 * c-format.c (selftest::test_type_mismatch_range_labels): Update
961 for conversion of show_caret_p to a tri-state.
962 * c-warn.c (warn_for_restrict): Likewise.
964 (suggest_missing_header::~suggest_missing_header): Update call to
965 maybe_add_include_fixit to suggest overriding the location, as it
968 2018-08-27 Martin Liska <mliska@suse.cz>
970 * c-common.c (check_function_restrict): Use new function
971 fndecl_built_in_p and remove check for FUNCTION_DECL if
973 (check_builtin_function_arguments): Likewise.
974 (reject_gcc_builtin): Likewise.
975 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
977 2018-08-26 Marek Polacek <polacek@redhat.com>
979 PR c++/87029, Implement -Wredundant-move.
980 * c.opt (Wredundant-move): New option.
982 2018-08-21 Marek Polacek <polacek@redhat.com>
984 PR c++/86981, Implement -Wpessimizing-move.
985 * c.opt (Wpessimizing-move): New option.
987 2018-08-20 David Malcolm <dmalcolm@redhat.com>
990 * c-attribs.c (common_handle_aligned_attribute): Add
991 auto_diagnostic_group instance.
992 * c-indentation.c (warn_for_misleading_indentation): Likewise.
993 * c-opts.c (c_common_post_options): Likewise.
994 * c-warn.c (warn_logical_not_parentheses): Likewise.
995 (warn_duplicated_cond_add_or_warn): Likewise.
996 (warn_for_multistatement_macros): Likewise.
998 2018-08-20 Nathan Sidwell <nathan@acm.org>
1000 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1003 2018-08-17 Nathan Sidwell <nathan@acm.org>
1005 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1007 (laxy_hex_fp_value_count): Make unsigned.
1008 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1009 manipulate the macro.
1010 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1013 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1015 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1016 (gcc_dump_printf_length_specs): New.
1017 (gcc_dump_printf_flag_pairs): New.
1018 (gcc_dump_printf_flag_specs): New.
1019 (gcc_dump_printf_char_table): New.
1020 (format_types_orig): Add entry for "gcc_dump_printf".
1021 (init_dynamic_diag_info): Set up length_char_specs and
1022 conversion_specs for gcc_dump_printf_format_type.
1023 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1025 2018-08-17 Nathan Sidwell <nathan@acm.org>
1027 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1029 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1030 * c-cppbuiltin.c: Likewise.
1032 2018-08-17 Martin Liska <mliska@suse.cz>
1034 * c.opt: Remove Warn, Init and Report for options with
1035 Ignore/Deprecated flag. Warning is done automatically for
1038 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1041 * c-common.c (selftest::c_family_tests): Call
1042 selftest::c_indentation_c_tests.
1043 * c-common.h (selftest::c_indentation_c_tests): New decl.
1044 * c-indentation.c: Include "selftest.h".
1045 (next_tab_stop): Add "tab_width" param, rather than accessing
1047 (get_visual_column): Likewise. Clarify comment. Bulletproof
1048 against reading past the end of the line.
1049 (get_first_nws_vis_column): Add "tab_width" param.
1050 (detect_intervening_unindent): Likewise.
1051 (should_warn_for_misleading_indentation): Read tab width from
1052 cpp_opts and pass around.
1053 (selftest::test_next_tab_stop): New test.
1054 (selftest::assert_get_visual_column_succeeds): New function.
1055 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1056 (selftest::assert_get_visual_column_fails): New function.
1057 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1058 (selftest::test_get_visual_column): New test.
1059 (selftest::c_indentation_c_tests): New function.
1061 2018-08-16 Nathan Sidwell <nathan@acm.org>
1063 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1064 (store_ada_macro): Likewise.
1065 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1066 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1068 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1070 * c-format.c: Include "selftest-diagnostic.h" and
1071 "gcc-rich-location.h".
1072 (format_warning_at_char): Pass NULL for new label params of
1074 (class indirection_suffix): New class.
1075 (class range_label_for_format_type_mismatch): New class.
1076 (format_type_warning): Move logic for generating "*" suffix to
1077 class indirection_suffix. Create "fmt_label" and "param_label"
1078 to show their types, and pass them to the
1079 format_warning_at_substring calls.
1080 (selftest::test_type_mismatch_range_labels): New test.
1081 (selftest::c_format_c_tests): Call it.
1083 2018-08-13 Martin Sebor <msebor@redhat.com>
1085 PR tree-optimization/71625
1086 * c-common.c (braced_list_to_string): New function.
1087 * c-common.h (braced_list_to_string): Declare it.
1089 2018-08-08 Nathan Sidwell <nathan@acm.org>
1091 * c-common.c (try_to_locate_new_include_inertion_point): Use
1092 linemap_included_from_linemap.
1093 * c-lex.c (fe_file_change): Use linemap_included_from.
1094 * c-ppoutput.c (pp_file_change): Likewise.
1096 2018-08-01 Martin Sebor <msebor@redhat.com>
1098 PR tree-optimization/86650
1099 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1100 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1101 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1102 * c-format.h (T89_G): Update to be "gimple *" rather than
1104 (local_gcall_ptr_node): Rename...
1105 (local_gimple_ptr_node): ...to this.
1107 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1109 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1110 table entries for gcc_diag_char_table, and the 'Z' entry from
1111 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1112 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1113 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1114 adding missing "Z" for this table. Remove erroneous "G" and "K"
1116 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1117 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1118 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1120 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1122 * c-common.c (speculation_safe_resolve_call): New function.
1123 (speculation_safe_resolve_params): New function.
1124 (speculation_safe_resolve_return): New function.
1125 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1126 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1127 __HAVE_SPECULATION_SAFE_VALUE.
1129 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1131 * c-common.c (c_cpp_error): Remove redundant "line_table"
1132 parameter from call to rich_location::set_range.
1133 (maybe_suggest_missing_token_insertion): Likewise.
1135 2018-07-20 Martin Sebor <msebor@redhat.com>
1138 * c.opt (-Warray-bounds): Remove redundant -Wall.
1140 2018-07-20 Martin Sebor <msebor@redhat.com>
1143 * c-common.h (c_common_handle_option): Change function argument
1145 * c-opts.c (c_common_init_options): Same.
1146 (c_common_handle_option): Same. Remove special handling of
1147 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1148 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1149 options to take a HOST_WIDE_INT argument and accept a byte-size
1151 (-Wvla-larger-than): Same.
1152 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1153 (-Wno-vla-larger-than): Same.
1155 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1157 * c-attribs.c (c_common_attribute_table): Add
1158 "omp declare target implicit" attribute.
1160 2018-07-12 Richard Biener <rguenther@suse.de>
1163 * c-attribs.c (handle_packed_attribute): Do not build a variant
1164 type with TYPE_PACKED, instead ignore the attribute if we may
1165 not apply to the original type.
1167 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1170 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1171 to contain TREE_LIST for both the original class iterator and the
1174 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1176 * c-ada-spec.c (to_ada_name): Remove index parameter.
1177 (pp_ada_tree_identifier): Likewise.
1178 (dump_ada_macros): Adjust call to to_ada_name.
1179 (struct overloaded_name_hash): Delete.
1180 (struct overloaded_name_hasher): Likewise.
1181 (overloaded_names): Likewise.
1182 (compute_overloading_index): Likewise.
1183 (dump_ada_decl_name): Do not call compute_overloading_index and
1184 adjust calls to pp_ada_tree_identifier.
1185 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1186 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1187 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1188 (dump_ada_enum_type): Remove type and display_convention parameters.
1189 Adjust calls to pp_ada_tree_identifier.
1190 (dump_ada_node): Likewise and for dump_ada_structure.
1191 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1193 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1195 (print_constructor): Adjust call to pp_ada_tree_identifier.
1196 (print_destructor): Likewise.
1197 (dump_ada_declaration): Switch to aspect syntax.
1198 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1199 parameter with nested parameter.
1200 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1201 (dump_ada_specs): Do not delete overloaded_names table.
1203 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1206 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
1209 2018-07-05 Nathan Sidwell <nathan@acm.org>
1211 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1212 NO_IMPLICIT_EXTERN_C.
1214 2018-06-28 Martin Liska <mliska@suse.cz>
1216 * cppspec.c: Include opt-suggestions.h.
1218 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1219 Thomas Schwinge <thomas@codesourcery.com>
1220 Cesar Philippidis <cesar@codesourcery.com>
1222 * c-pragma.h (enum pragma_omp_clause): Add
1223 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1224 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1226 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1229 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1232 2018-06-18 Martin Sebor <msebor@redhat.com>
1235 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1238 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1240 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1242 2018-06-13 Jason Merrill <jason@redhat.com>
1244 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1245 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1248 PR c++/86094 - wrong code with defaulted move ctor.
1249 * c-opts.c (c_common_post_options): Bump the current ABI version to
1250 13. Set warn_abi_version and flag_abi_compat_version to the current
1251 version rather than 0. Fix defaulting flag_abi_compat_version from
1254 2018-06-12 Martin Sebor <msebor@redhat.com>
1257 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1258 sizeof source and destination yields the same value.
1260 2018-06-12 Martin Liska <mliska@suse.cz>
1262 * c.opt: Make MPX-related options as Deprecated.
1264 2018-06-08 David Malcolm <dmalcolm@redhat.com>
1266 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1269 2018-06-08 Martin Liska <mliska@suse.cz>
1271 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1272 for MPX (macros, related functions, fields in cgraph_node, ...).
1273 (handle_bnd_legacy): Likewise.
1274 (handle_bnd_instrument): Likewise.
1277 2018-06-06 Jakub Jelinek <jakub@redhat.com>
1280 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1281 __cpp_transactional_memory to 201500 instead of 210500.
1283 2018-06-06 Jason Merrill <jason@redhat.com>
1285 PR c++/85710 - ICE with -Wmemset-elt-size.
1286 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1288 2018-06-01 Jason Merrill <jason@redhat.com>
1290 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1293 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1295 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1296 declaration for a typedef independently of whether the declaration of
1297 the subtype is generated.
1299 2018-05-31 Martin Sebor <msebor@redhat.com>
1302 * c.opt (-Wno-alloc-size-larger-than): New option.
1304 2018-04-22 David Pagan <dave.pagan@oracle.com>
1307 * c-opts.c (c_common_post_options): Set default for warn_return_type
1308 for C++/C++ with ObjC extensions only. For C, makes it possible to
1309 differentiate between default (no option), -Wreturn-type, and
1312 2018-05-29 Jason Merrill <jason@redhat.com>
1314 * c.opt (Winit-list-lifetime): New flag.
1316 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1318 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1319 splay_tree_delete_pointers.
1321 2018-05-26 Jakub Jelinek <jakub@redhat.com>
1324 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1325 noinline variable to workaround broken kernel headers.
1327 2018-05-18 Jason Merrill <jason@redhat.com>
1329 * c.opt (Wdeprecated-copy): New flag.
1331 2018-05-17 Martin Liska <mliska@suse.cz>
1333 * c-warn.c (overflow_warning): Do not use
1334 space in between 'G_' and '('.
1336 2018-05-09 Jason Merrill <jason@redhat.com>
1338 * c-common.c (valid_array_size_p): Add complain parameter.
1339 * c-common.h: ...which defaults to true.
1341 2018-05-11 Jakub Jelinek <jakub@redhat.com>
1344 * c-omp.c (c_omp_predetermined_sharing): Return
1345 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1347 2018-05-11 Martin Liska <mliska@suse.cz>
1350 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1353 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1356 * c-common.h (fold_offsetof_1): Removed.
1357 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1358 CTX argument defaulted to ERROR_MARK.
1359 * c-common.c (fold_offsetof_1): Renamed to ...
1360 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1361 argument, convert the pointer constant to TYPE and use size_binop
1362 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1363 a pointer type. Adjust recursive calls.
1365 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1368 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1370 2018-05-07 Nathan Sidwell <nathan@acm.org>
1372 * c.opt (ffor-scope): Remove functionality, issue warning.
1374 2018-05-03 Nathan Sidwell <nathan@acm.org>
1376 * c.opt (ffriend-injection): Remove functionality, issue warning.
1378 2018-05-01 David Malcolm <dmalcolm@redhat.com>
1381 * c-format.c (struct format_check_results): Add field
1383 (check_format_info): Initialize it, and warn if encountered.
1384 (check_format_arg): Distinguish between wide char and
1385 everything else when detecting arrays of non-char.
1387 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1389 * c-format.c (get_corrected_substring): Update for
1390 location_get_source_line returning a char_span. Use a char_span
1391 when handling the prefix of the correction.
1392 * c-indentation.c (get_visual_column): Update for
1393 location_get_source_line returning a char_span.
1394 (get_first_nws_vis_column): Likewise.
1396 2018-03-29 David Malcolm <dmalcolm@redhat.com>
1399 * known-headers.cc (get_stdlib_header_for_name): Add various names
1400 from <assert.h>, <string.h>, and <memory.h>; add more names from
1403 2018-03-27 Jakub Jelinek <jakub@redhat.com>
1406 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1407 get_base_address of the second operand is a VAR_P, rather than the
1408 operand itself, and use gcc_checking_assert instead of gcc_assert.
1410 2018-03-23 Marek Polacek <polacek@redhat.com>
1413 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1414 <case RDIV_EXPR>: Tweak condition.
1416 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1418 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1420 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1423 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1427 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1430 2018-03-16 Richard Biener <rguenther@suse.de>
1433 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1434 unshare the possibly folded expression.
1436 2018-03-15 Richard Biener <rguenther@suse.de>
1439 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1441 2018-03-13 Martin Sebor <msebor@redhat.com>
1443 PR tree-optimization/84725
1444 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1445 with all three narrow character types, including their qualified forms.
1447 2018-03-12 Martin Sebor <msebor@redhat.com>
1449 PR tree-optimization/83456
1450 * c-common.c (check_function_restrict): Return bool.
1451 Restore checking of bounded built-in functions.
1452 (check_function_arguments): Also return the result
1453 of warn_for_restrict.
1454 * c-common.c (check_function_restrict): Return bool.
1455 * c-warn.c (warn_for_restrict): Return bool.
1457 2018-03-02 Marek Polacek <polacek@redhat.com>
1460 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1463 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1465 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1468 2018-03-01 Marek Polacek <polacek@redhat.com>
1471 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1472 alignment in computation.
1474 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1476 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1477 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1479 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1481 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1482 (is_char_array): Take a type instead of a declaration.
1483 (dump_ada_array_type): Likewise.
1484 (is_simple_enum): Minor tweak.
1485 (dump_ada_enum_type): New function extracted from...
1486 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1487 <INTEGER_TYPE>: Remove unreachable code.
1488 <RECORD_TYPE>: Likewise. Minor tweaks.
1489 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1490 <ENUMERAL_TYPE>: New case.
1491 <RECORD_TYPE>: Factor out common code.
1492 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1493 Minor tweaks. Deal with enumeral types.
1494 (dump_ada_structure): Minor tweaks.
1496 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1498 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1499 address for incomplete structures.
1500 (dump_forward_type): Do not bail out for incomplete structures.
1501 (dump_ada_declaration): Do not special-case incomplete structures
1502 for subtypes. Dump them as null records for types.
1504 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1506 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1507 (is_char_array): Fix formatting.
1508 (dump_template_types): Likewise.
1509 (dump_generic_ada_node): Rename into...
1510 (dump_ada_node): ...this.
1511 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1512 incomplete structures and not for empty structures. Do not use it
1513 when forward declarations are needed.
1514 (dump_forward_type): New function.
1515 (dump_nested_types): Remove FORWARD parameter. Do not consider
1516 TREE_VISITED and do not generate a forward declaration. Only dump
1517 original nested types for nested declaration.
1518 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1519 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1520 <RECORD_TYPE>: Do not consider TREE_VISITED.
1521 (dump_ada_declaration): Use booleans and fix formatting throughout.
1522 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1523 Call dump_forward_type instead of dump_nested_types for a typedef.
1524 Remove superfluous check and adjust call to dump_nested_types.
1525 <POINTER_TYPE>: Call dump_forward_type and fall through.
1526 (dump_ada_struct_decl): Rename into...
1527 (dump_ada_structure): ...this. Do not special-case empty structures.
1529 2018-02-27 Martin Sebor <msebor@redhat.com>
1532 * c.opt (-Wmissing-attributes): New option.
1534 2018-02-21 Martin Liska <mliska@suse.cz>
1536 * c.opt (Wcatch-value=): Add IntegerRange.
1538 2018-02-15 Jason Merrill <jason@redhat.com>
1540 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1542 2018-02-09 Nathan Sidwell <nathan@acm.org>
1545 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1547 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1550 2018-02-09 Martin Sebor <msebor@redhat.com>
1553 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1554 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1555 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1556 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1557 (-Wuninitialized): Same.
1559 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1561 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1562 keyword for components.
1564 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1566 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1568 2018-02-02 Julia Koval <julia.koval@intel.com>
1570 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1572 2018-01-29 Marek Polacek <polacek@redhat.com>
1575 * c-format.c (check_function_format): Check current_function_decl.
1577 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1579 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1581 (LAZY_HEX_FP_VALUES_CNT): Define.
1582 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1583 values rather than just 12.
1584 (builtin_define_with_hex_fp_value): Likewise.
1586 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1589 * c.opt (-fmacro-prefix-map): New option.
1590 * c-opts.c (c_common_handle_option): Handle it.
1591 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1592 * c-ppoutput.c (init_pp_output): Likewise.
1594 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1597 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1599 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1601 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1602 Skip 'f' and 'F' characters if it is true.
1603 (store_ada_macro): Minor tweak.
1604 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1605 <CPP_WSTRING>: Likewise.
1606 <CPP_STRING>: Output '&' in the buffer if not the first string.
1607 <CPP_NUMBER>: Adjust calls to dump_number.
1609 2018-01-10 David Malcolm <dmalcolm@redhat.com>
1612 * c-common.c: Include "selftest.h".
1613 (get_atomic_generic_size): Perform the test for integral type
1614 before the range test for any integer constant, fixing indentation
1615 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1616 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1617 (selftest::test_fold_for_warn): New function.
1618 (selftest::c_common_c_tests): New function.
1619 (selftest::c_family_tests): Call it, and
1620 selftest::c_pretty_print_c_tests.
1621 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1622 * c-format.c (check_format_arg): Convert VAR_P check to a
1624 * c-pretty-print.c: Include "selftest.h".
1625 (pp_c_cast_expression): Don't print casts for location wrappers.
1626 (selftest::assert_c_pretty_printer_output): New function.
1627 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1628 (selftest::test_location_wrappers): New function.
1629 (selftest::c_pretty_print_c_tests): New function.
1630 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1632 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1633 Alan Hayward <alan.hayward@arm.com>
1634 David Sherwood <david.sherwood@arm.com>
1636 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1638 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1639 Alan Hayward <alan.hayward@arm.com>
1640 David Sherwood <david.sherwood@arm.com>
1642 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1646 Alan Hayward <alan.hayward@arm.com>
1647 David Sherwood <david.sherwood@arm.com>
1649 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1650 (convert_vector_to_array_for_subscript): Handle polynomial
1651 TYPE_VECTOR_SUBPARTS.
1652 (c_common_type_for_mode): Check valid_vector_subparts_p.
1653 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1656 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1658 Update copyright years.
1660 2017-12-22 Mike Stump <mikestump@comcast.net>
1661 Eric Botcazou <ebotcazou@adacore.com>
1663 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1664 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1666 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
1670 * c-semantics.c (only_debug_stmts_after_p): New.
1671 (pop_stmt_list): Clear side effects in debug-only stmt list.
1672 Check for single nondebug stmt followed by debug stmts only.
1674 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
1677 * c-semantics.c (pop_stmt_list): Propagate side effects from
1678 single nondebug stmt to container list.
1680 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1682 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1683 conditions with typical order conditions.
1685 2017-12-18 Marek Polacek <polacek@redhat.com>
1687 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1690 2017-12-17 Martin Sebor <msebor@redhat.com>
1692 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1693 an error for attribute warn_if_not_aligned.
1695 2017-12-16 Martin Sebor <msebor@redhat.com>
1697 PR tree-optimization/78918
1698 * c-common.c (check_function_restrict): Avoid checking built-ins.
1699 * c.opt (-Wrestrict): Include in -Wall.
1701 2017-12-15 Jakub Jelinek <jakub@redhat.com>
1703 * c-attribs.c (c_common_attribute_table,
1704 c_common_format_attribute_table): Swap affects_type_identity
1705 and handler fields, adjust comments.
1707 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1709 * c.opt (Wcast-function-type): New warning option.
1710 * c-lex.c (get_fileinfo): Avoid warning.
1711 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1713 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
1716 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1717 Adjust the size of buf1 and buf2, add a new buf to avoid
1718 format-overflow warning.
1720 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1722 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1723 subsequent statement list.
1725 2017-12-07 Martin Sebor <msebor@redhat.com>
1729 * c-attribs.c (attr_aligned_exclusions): New array.
1730 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1731 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1732 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1733 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1734 (attr_warn_unused_result_exclusions): Same.
1735 (handle_hot_attribute, handle_cold_attribute): Simplify.
1736 (handle_const_attribute): Warn on function returning void.
1737 (handle_pure_attribute): Same.
1738 (handle_aligned_attribute): Diagnose conflicting attribute
1740 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1742 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1745 * c-common.c (selftest::c_family_tests): Call
1746 selftest::c_spellcheck_cc_tests.
1747 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1748 * c-spellcheck.cc: Include "selftest.h".
1749 (name_reserved_for_implementation_p): New function.
1750 (should_suggest_as_macro_p): New function.
1751 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1752 should_suggest_as_macro_p and call it.
1753 (selftest::test_name_reserved_for_implementation_p): New function.
1754 (selftest::c_spellcheck_cc_tests): New function.
1755 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1757 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1759 * c-spellcheck.cc: New file, taken from macro-handling code in
1761 * c-spellcheck.h: New file, taken from macro-handling code in
1764 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1766 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1768 (handle_simd_attribute): Don't check for "cilk simd function"
1769 attribute. Reindent, formatting changes.
1771 2017-11-30 Julia Koval <julia.koval@intel.com>
1773 * c-common.h (inv_list): Remove.
1775 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1778 * c-common.c (c_switch_covers_all_cases_p_1,
1779 c_switch_covers_all_cases_p): New functions.
1780 * c-common.h (c_switch_covers_all_cases_p): Declare.
1782 2017-11-28 Julia Koval <julia.koval@intel.com>
1783 Sebastian Peryt <sebastian.peryt@intel.com>
1785 * array-notation-common.c: Delete.
1786 * c-cilkplus.c: Ditto.
1787 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1788 * c-common.def (ARRAY_NOTATION_REF): Remove.
1789 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1790 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1791 c_validate_cilk_plus_loop, cilkplus_an_parts,
1792 cilk_ignorable_spawn_rhs_op,
1793 cilk_recognize_spawn): Remove.
1794 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1795 * c-omp.c: Remove CILK_SIMD check.
1796 * c-pragma.c: Ditto.
1797 * c-pragma.h: Remove CILK related pragmas.
1798 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1799 ARRAY_NOTATION_REF condition.
1800 (c_pretty_printer::expression): Ditto.
1801 * c.opt (fcilkplus): Remove.
1804 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1806 * c-pretty-print.c (pp_c_additive_expression,
1807 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1809 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1811 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1814 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1815 instead of tree_to_uhwi, formatting fix.
1817 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1820 * known-headers.cc: New file, based on material from c/c-decl.c.
1821 (suggest_missing_header): Copied as-is.
1822 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1823 heavily edited to add C++ support. Add some knowledge about
1824 <limits.h>, <stdint.h>, and <wchar.h>.
1825 * known-headers.h: Likewise.
1827 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1829 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1830 (lookup_name_fuzzy): Likewise. Convert return type from
1831 const char * to name_hint. Add location_t param.
1832 * name-hint.h: New header.
1834 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1838 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1840 2017-11-16 Joseph Myers <joseph@codesourcery.com>
1842 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1843 expected publication date of C17.
1844 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1846 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1849 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1850 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1852 2017-11-10 Martin Sebor <msebor@redhat.com>
1855 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1856 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1857 * c.opt (-Wstringop-truncation): New option.
1859 2017-11-06 Martin Liska <mliska@suse.cz>
1862 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1864 * c.opt: Set default value of warn_return_type.
1866 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1868 * c-common.c (binary_op_error): Update for renaming of
1870 (c_parse_error): Likewise.
1871 * c-warn.c (warn_logical_not_parentheses): Likewise for
1872 renaming of inform_at_rich_loc.
1873 (warn_for_restrict): Likewise for renaming of
1874 warning_at_rich_loc_n.
1876 2017-10-30 Joseph Myers <joseph@codesourcery.com>
1878 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1879 * c-opts.c (set_std_c17): New function.
1880 (c_common_init_options): Use gnu17 as default C version.
1881 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1883 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1885 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1886 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1887 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1890 2017-10-23 Marek Polacek <polacek@redhat.com>
1893 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1895 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1897 * c-common.c (check_builtin_function_arguments): Also check arguments
1898 of __builtin_alloca_with_align_and_max.
1900 2017-10-17 David Malcolm <dmalcolm@redhat.com>
1902 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1903 rather than NULL to format_warning_va.
1904 (check_format_types): Likewise when calling format_type_warning.
1905 Remove code to extract source_ranges and source_range * in favor
1906 of just a location_t.
1907 (format_type_warning): Convert source_range * param to a
1910 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1912 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1915 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1917 * c-common.c (enum missing_token_insertion_kind): New enum.
1918 (get_missing_token_insertion_kind): New function.
1919 (maybe_suggest_missing_token_insertion): New function.
1920 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1922 2017-10-11 Nathan Sidwell <nathan@acm.org>
1924 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1925 (c_common_handle_option): Update incpath_kind names.
1927 2017-10-11 Martin Liska <mliska@suse.cz>
1930 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1931 Wattributes warning.
1933 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1935 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1936 operating on trees as wide_ints.
1937 * c-common.c (pointer_int_sum): Likewise.
1938 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1939 * c-warn.c (match_case_to_enum_1): Likewise.
1940 (c_do_switch_warnings): Likewise.
1941 (maybe_warn_shift_overflow): Likewise.
1943 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1946 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1947 instead of wide_int::from.
1949 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1952 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1953 using to_widest use wide_int with the larger of the two precisions.
1955 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1957 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1960 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1962 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1963 when combining the original unconverted comparison operands.
1965 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1967 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1970 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1972 * c-ada-spec.c (to_ada_name): Add index parameter.
1973 (pp_ada_tree_identifier): Likewise.
1974 (dump_ada_macros): Adjust call to to_ada_name.
1975 (struct overloaded_name_hash): New type.
1976 (struct overloaded_name_hasher): Likewise.
1977 (overloaded_names): New hash table.
1978 (compute_overloading_index): New function.
1979 (dump_ada_decl_name): Call it and pass the result to
1980 pp_ada_tree_identifier.
1981 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1982 (dump_ada_function_declaration): Likewise.
1983 (dump_generic_ada_node): Likewise.
1984 (print_constructor): Likewise.
1985 (print_destructor): Likewise.
1986 (dump_ada_specs): Delete overloaded_names table.
1988 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1990 * c-ada-spec.c (max_ada_macros): Move around.
1991 (store_ada_macro_index): Likewise.
1992 (source_file): Rename into...
1993 (macro_source_file): ...this.
1994 (count_ada_macro): Move around.
1995 (store_ada_macro): Likewise.
1996 (compare_macro): Likewise.
1997 (print_ada_macros): Merge in...
1998 (dump_ada_macros): ...this.
1999 (source_file_base): Rename into...
2000 (current_source_file): ...this.
2001 (print_comment): Move around.
2002 (dump_ada_nodes): Call dump_ada_declaration directly.
2003 (struct with): Change type of limited field to bool.
2004 (append_withs): Change type of limited_access parameter to bool.
2005 (pp_ada_tree_identifie): Likewise.
2006 (dump_ada_decl_nam): Likewise.
2007 (dump_generic_ada_node): Likewise. Do not print the return type.
2008 (to_ada_name): Change type of space_found parameter to bool.
2009 (dump_ada_function_declaration): Return void and change type of
2010 parameters to bool. Also print the return type for a function.
2011 (print_ada_methods): Rename into...
2012 (dump_ada_methods): ...this.
2013 (print_ada_declaration): Rename into ...
2014 (dump_ada_declaration): ...this. Do not print the return type.
2015 (print_ada_struct_decl): Rename into...
2016 (dump_ada_struct_decl): ...this.
2018 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2020 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2021 rather than DECL_INITIAL.
2022 (common_handle_aligned_attribute): Likewise.
2024 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2026 * c.opt (gen-decls): Add RejectNegative.
2028 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2029 Jakub Jelinek <jakub@redhat.com>
2031 Add support for -std=c++2a.
2032 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2033 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2034 * c-opts.c (set_std_cxx2a): New.
2035 (c_common_handle_option): Set options when -std=c++2a is enabled.
2036 (c_common_post_options): Adjust comments.
2037 (set_std_cxx14, set_std_cxx17): Likewise.
2039 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2041 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2042 message for non-uniform endianness and issue a warning in C++.
2044 2017-09-15 Jakub Jelinek <jakub@redhat.com>
2046 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2047 (Wc++17-compat): Change from undocumented alias to option.
2048 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2049 change C++1z to C++17 in description.
2050 (std=c++1z, std=gnu++1z): Change from option to undocumented
2052 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2054 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2055 * c-opts.c (set_std_cxx1z): Rename to ...
2056 (set_std_cxx17): ... this.
2057 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2058 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
2060 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2063 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2065 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2066 function alignment if warn_if_not_aligned_p is true.
2068 2017-09-12 Nathan Sidwell <nathan@acm.org>
2070 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2071 resort_sorted_fields): Move to c/c-decl.c.
2072 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2073 (struct sorted_fields_type): Move to c/c-lang.h.
2075 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
2078 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2080 2017-09-04 Marek Polacek <polacek@redhat.com>
2083 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2084 (warn_tautological_cmp): Call it.
2086 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2088 * c-opts.c (c_common_finish): Write dependency information even if
2091 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2094 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2095 (omp_pragmas_simd): ... here.
2096 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2097 create new clauses list containing just simd clause.
2099 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2100 Alan Hayward <alan.hayward@arm.com>
2101 David Sherwood <david.sherwood@arm.com>
2103 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2104 into scalar_mode_supported_p call.
2105 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2107 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2108 Alan Hayward <alan.hayward@arm.com>
2109 David Sherwood <david.sherwood@arm.com>
2111 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2112 for the mode iterator.
2114 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2115 Alan Hayward <alan.hayward@arm.com>
2116 David Sherwood <david.sherwood@arm.com>
2118 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2119 * c-common.c (c_build_vec_perm_expr): Likewise.
2121 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2122 Alan Hayward <alan.hayward@arm.com>
2123 David Sherwood <david.sherwood@arm.com>
2125 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2127 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2128 Alan Hayward <alan.hayward@arm.com>
2129 David Sherwood <david.sherwood@arm.com>
2131 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2132 before calling targetm.addr_space.valid_pointer_mode.
2134 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2135 Alan Hayward <alan.hayward@arm.com>
2136 David Sherwood <david.sherwood@arm.com>
2138 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2140 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2141 Alan Hayward <alan.hayward@arm.com>
2142 David Sherwood <david.sherwood@arm.com>
2144 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2146 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2148 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2149 Alan Hayward <alan.hayward@arm.com>
2150 David Sherwood <david.sherwood@arm.com>
2152 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2155 2017-08-29 Martin Liska <mliska@suse.cz>
2158 * c-common.c (parse_optimize_options): Add argument to function
2160 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2162 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2164 * c-lex.c (interpret_float): Use token location
2165 when building an EXCESS_PRECISION_EXPR.
2167 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2169 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2170 it to check_function_format.
2171 * c-common.h (check_function_arguments): Add vec<location_t> *
2173 (check_function_format): Likewise.
2174 * c-format.c (struct format_check_context): Add field "arglocs".
2175 (check_function_format): Add param "arglocs"; pass it to
2177 (check_format_info): Add param "arglocs"; use it to initialize
2178 new field of format_ctx.
2179 (check_format_arg): Pass format_ctx->arglocs to new param of
2180 check_format_info_main.
2181 (class argument_parser): New field "arglocs".
2182 (argument_parser::argument_parser): Add "arglocs_" param and use
2183 it to initialize new field.
2184 (argument_parser::check_argument_type): Pass new arglocs field to
2186 (check_format_info_main): Add param "arglocs", and use it when
2187 constructing arg_parser.
2188 (check_format_types): Add param "arglocs"; use it if non-NULL when
2189 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2191 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2194 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2195 (c_common_attribute_table): Add warn_if_not_aligned.
2196 (handle_aligned_attribute): Renamed to ...
2197 (common_handle_aligned_attribute): Remove argument, name, and add
2198 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2199 (handle_aligned_attribute): New.
2200 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2202 2017-08-14 Martin Sebor <msebor@redhat.com>
2205 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2206 (handle_nonstring_attribute): New function.
2208 2017-08-14 Martin Sebor <msebor@redhat.com>
2211 * c-format.h (T89_G): New macro.
2212 * c-format.c (local_gcall_ptr_node): New variable.
2213 (init_dynamic_diag_info): Initialize it.
2215 2017-08-11 Martin Liska <mliska@suse.cz>
2217 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2218 TARGET_SUPPORTS_ALIASES.
2220 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2222 * c-common.c (c_parse_error): Add rich_location * param, using it
2223 rather implicitly using input_location.
2224 * c-common.h (c_parse_error): Add rich_location * param.
2226 2017-08-09 Marek Polacek <polacek@redhat.com>
2228 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2229 (c_common_truthvalue_conversion): Likewise.
2230 * c-omp.c (c_finish_omp_atomic): Likewise.
2231 * c-common.h (build_binary_op): Update declaration.
2233 2017-08-08 Martin Liska <mliska@suse.cz>
2235 * c-ada-spec.c: Include header files.
2236 * c-ubsan.c: Likewise.
2237 * c-warn.c: Likewise.
2239 2017-08-07 Jakub Jelinek <jakub@redhat.com>
2242 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2244 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2246 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2247 (print_ada_methods): Likewise.
2248 (print_ada_declaration): Likewise.
2250 2017-08-07 Martin Liska <mliska@suse.cz>
2252 * array-notation-common.c: Add new includes.
2253 * c-format.c( handle_format_attribute): Canonicalize a format
2255 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2257 * c-pretty-print.c: Add new include.
2259 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2261 * c-ada-spec.c (has_static_fields): Look only into variables.
2262 (print_constructor): Add TYPE parameter and use it for the name.
2263 (print_destructor): Likewise.
2264 (print_ada_declaration): Adjust to new constructor/destructor names.
2265 Adjust calls to print_constructor and print_destructor.
2266 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2267 Look only into variables in the final loop.
2269 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2271 * c-ada-spec.c (has_static_fields): Look only into fields.
2272 (dump_generic_ada_node): Small tweak.
2273 (dump_nested_types): Look only into fields.
2274 (print_ada_declaration): Look only into methods. Small tweak.
2275 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2277 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2279 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2280 (dump_ada_function_declaration): Likewise.
2281 (dump_generic_ada_node): Likewise.
2282 (print_ada_declaration): Add support for const-qualified variables.
2284 2017-07-31 Martin Liska <mliska@suse.cz>
2287 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2288 Guard condition with flag_sanitize_p also with current_function_decl
2290 (ubsan_maybe_instrument_reference_or_call): Likewise.
2292 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
2294 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2296 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2298 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2300 (print_ada_declaration): Add missing guard for record types.
2302 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2305 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2306 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2307 new COMPOUND_EXPRs around the rhs of the comparison.
2309 2017-07-27 Marek Polacek <polacek@redhat.com>
2312 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2315 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2317 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2318 (handle_noipa_attribute): New function.
2320 2017-07-07 Torsten Duwe <duwe@suse.de>
2322 * c-attribs.c (c_common_attribute_table): Add entry for
2323 "patchable_function_entry".
2325 2017-07-20 Nathan Sidwell <nathan@acm.org>
2327 Remove TYPE_METHODS.
2328 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2329 dump_ada_template, print_ada_methods,
2330 print_ada_declaration): Member fns are on TYPE_FIELDS.
2332 2017-07-18 Nathan Sidwell <nathan@acm.org>
2334 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2336 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2338 * c-common.c (try_to_locate_new_include_insertion_point): New
2340 (per_file_includes_t): New typedef.
2341 (added_includes_t): New typedef.
2342 (added_includes): New variable.
2343 (maybe_add_include_fixit): New function.
2344 * c-common.h (maybe_add_include_fixit): New decl.
2346 2017-07-10 Martin Sebor <msebor@redhat.com>
2349 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2351 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2353 * c-common.c (selftest::c_family_tests): New.
2354 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2355 (selftest::c_family_tests): New decl.
2357 2017-07-04 Marek Polacek <polacek@redhat.com>
2360 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2363 2017-07-04 Marek Polacek <polacek@redhat.com>
2365 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2367 2017-06-28 Martin Liska <mliska@suse.cz>
2370 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2371 to a function declaration.
2373 2017-06-28 Martin Liska <mliska@suse.cz>
2376 * c.opt: Add IntegerRange to various options.
2378 2017-06-26 Marek Polacek <polacek@redhat.com>
2381 * c-common.h (warn_for_multistatement_macros): Declare.
2382 * c-warn.c: Include "c-family/c-indentation.h".
2383 (warn_for_multistatement_macros): New function.
2384 * c.opt (Wmultistatement-macros): New option.
2385 * c-indentation.c (guard_tinfo_to_string): No longer static.
2386 Change the parameter type to "enum rid". Handle RID_SWITCH.
2387 * c-indentation.h (guard_tinfo_to_string): Declare.
2389 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
2391 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2393 2017-06-15 Martin Sebor <msebor@redhat.com>
2396 * c.opt (-Wclass-memaccess): New option.
2398 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2400 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2402 2017-06-13 Marek Polacek <polacek@redhat.com>
2405 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2408 2017-06-13 Martin Liska <mliska@suse.cz>
2411 * c-attribs.c (add_no_sanitize_value): New function.
2412 (handle_no_sanitize_attribute): Likewise.
2413 (handle_no_sanitize_address_attribute): Use the function.
2414 (handle_no_sanitize_thread_attribute): New function.
2415 (handle_no_address_safety_analysis_attribute): Use
2416 add_no_sanitize_value.
2417 (handle_no_sanitize_undefined_attribute): Likewise.
2418 * c-common.h: Declare new functions.
2419 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2420 (ubsan_instrument_shift): Likewise.
2421 (ubsan_instrument_bounds): Likewise.
2422 (ubsan_maybe_instrument_array_ref): Likewise.
2423 (ubsan_maybe_instrument_reference_or_call): Likewise.
2425 2017-06-11 Jason Merrill <jason@redhat.com>
2427 * c-ada-spec.c, c-pragma.c: Use id_equal.
2429 2017-06-04 Marek Polacek <polacek@redhat.com>
2432 * c-format.c (matching_type_p): Return false if any of the types
2433 requires structural equality.
2435 2017-06-02 Martin Sebor <msebor@redhat.com>
2438 * c-warn.c (conversion_warning): Use -Wconversion for integer
2439 conversion and -Wfloat-conversion for floating one.
2441 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2443 * c.opt (Wsizeof-pointer-div): New warning option.
2445 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2447 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2448 (Wcatch-value=1): Enable by -Wall.
2450 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2452 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2454 * c.opt (fdiagnostics-show-template-tree): New option.
2455 (felide-type): New option.
2457 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2459 * c.opt (Wcatch-value=): New C++ warning flag.
2461 2017-05-24 Nathan Sidwell <nathan@acm.org>
2463 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2464 const casts to avoid warning.
2466 2017-05-24 Martin Sebor <msebor@redhat.com>
2469 * c-common.h (unsafe_conversion_p): Add a function argument.
2470 * c-common.c (unsafe_conversion_p): Same.
2471 Add type names and values to diagnostics.
2472 (scalar_to_vector): Adjust.
2473 * c-warn.c (constant_expression_error): Add a function argument.
2474 Add type names and values to diagnostics.
2475 (conversion_warning): Add a function argument.
2476 Add type names and values to diagnostics.
2477 (warnings_for_convert_and_check): Same.
2479 2017-05-19 Jason Merrill <jason@redhat.com>
2481 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2484 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2486 * c-format.c (locus): Move out of function scope,
2489 2017-05-19 Nathan Sidwell <nathan@acm.org>
2491 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2492 (c_common_parse_file): Remove class dump handling.
2493 (get_dump_info): Likewise.
2495 2017-05-19 Richard Biener <rguenther@suse.de>
2498 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2499 to alias-set zero memory.
2501 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2503 * c-format.c (local_tree_type_node): Add GTY attribute.
2505 2017-05-18 Marek Polacek <polacek@redhat.com>
2507 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2508 (c_common_fixed_point_type_for_size): Likewise.
2509 (c_common_type_for_mode): Likewise.
2510 (shorten_compare): Likewise.
2511 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2512 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2514 2017-05-18 Marek Polacek <polacek@redhat.com>
2516 * c-common.c (self_promoting_args_p): Change the return type to bool.
2517 Use false/true instead of 0/1.
2518 * c-common.h (self_promoting_args_p): Update.
2520 2017-05-17 Marek Polacek <polacek@redhat.com>
2522 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2523 * c-warn.c: Likewise.
2525 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2527 Implement new C++ intrinsics __is_assignable and __is_constructible.
2528 * c-common.c (__is_assignable, __is_constructible): New.
2529 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2531 2017-05-17 Martin Liska <mliska@suse.cz>
2533 * c-common.h: Introduce dump_flags_t type and
2534 use it instead of int type.
2535 * c-gimplify.c (c_genericize): Likewise.
2536 * c-opts.c: Likewise.
2538 2017-05-17 Marek Polacek <polacek@redhat.com>
2540 * c-common.c (c_save_expr): Remove.
2541 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2542 * c-common.h (c_save_expr): Remove declaration.
2544 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2547 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2548 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2549 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2550 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2552 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2554 2017-05-09 Marek Polacek <polacek@redhat.com>
2557 * c-warn.c (unwrap_c_maybe_const): New.
2558 (warn_logical_operator): Call it.
2560 2017-05-09 Nathan Sidwell <nathan@acm.org>
2562 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2563 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2565 2017-05-08 Martin Sebor <msebor@redhat.com>
2567 PR translation/80280
2568 * c-format.h (struct format_flag_spec): Add new member.
2570 * c-format.c (local_tree_type_node): New global.
2571 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2572 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2573 (strfmon_flag_specs): Likewise.
2574 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2575 with distinct quoting properties.
2576 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2577 (flag_chars_t::validate): Add argument and handle bad quoting.
2578 (check_format_info_main): Handle quoting problems.
2579 (init_dynamic_diag_info): Simplify.
2581 2017-05-08 Jason Merrill <jason@redhat.com>
2583 * c-opts.c (c_common_post_options): Update defaults for
2584 flag_abi_version and flag_abi_compat_version.
2586 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2588 * c-common.c (c_cpp_error): Replace report_diagnostic
2589 with diagnostic_report_diagnostic.
2591 2017-05-04 Martin Sebor <msebor@redhat.com>
2593 PR translation/80280
2594 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2595 (handle_weakref_attribute): Same.
2597 2017-05-03 Nathan Sidwell <nathan@acm.org>
2599 Canonicalize canonical type hashing
2600 * c-common.c (complete_array_type): Use type_hash_canon.
2602 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2605 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2607 (cilk_install_body_pedigree_operations): Likewise.
2608 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2610 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2611 (cilk_install_body_pedigree_operations): Likewise.
2612 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2615 2017-04-27 Jakub Jelinek <jakub@redhat.com>
2618 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2619 flag on non-aggregate element types.
2621 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2623 * c-common.c (c_type_hasher, type_hash_table): Remove.
2624 (c_common_get_alias_set): Remove unreachable code.
2625 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2627 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2629 * c.opt (Wextra-semi): New C++ warning flag.
2631 2017-04-20 Jakub Jelinek <jakub@redhat.com>
2634 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2636 2017-04-18 Jakub Jelinek <jakub@redhat.com>
2640 * c-common.c (c_common_type_for_mode): Don't handle
2641 widest_*_literal_type_node here.
2642 c_common_signed_or_unsigned_type): Likewise.
2643 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2644 to *intTI_type_node or *intDI_type_node depending on whether
2645 TImode is supported by the target or not.
2647 2017-04-10 Martin Liska <mliska@suse.cz>
2650 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2651 doing an UBSAN check.
2653 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2655 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2657 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2660 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2662 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2663 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2666 2017-03-31 David Malcolm <dmalcolm@redhat.com>
2668 PR documentation/78732
2669 * c.opt (Wendif-labels): Fix description to refer to
2670 #else rather than #elif.
2672 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2675 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2676 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2678 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2681 * c-common.c (c_common_mark_addressable_vec): Don't set
2682 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2684 2017-03-21 Martin Sebor <msebor@redhat.com>
2687 * c-common.c (set_underlying_type): Mark type used only when
2688 original del is declared unused.
2690 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2692 PR translation/79848
2693 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2696 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2699 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2700 from inform's message, so that xgettext can locate it.
2702 2017-03-09 Marek Polacek <polacek@redhat.com>
2706 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2707 conversion to the attribute list.
2709 2017-03-09 Martin Liska <mliska@suse.cz>
2711 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2713 2017-03-03 Jason Merrill <jason@redhat.com>
2715 * c.opt (Wnoexcept-type): New.
2717 2017-03-02 Richard Biener <rguenther@suse.de>
2720 * c-common.c (c_common_mark_addressable_vec): Look through
2723 2017-02-28 Martin Liska <mliska@suse.cz>
2725 * c.opt: Replace space with tabular for options of <number>
2728 2017-02-28 Martin Liska <mliska@suse.cz>
2730 * c.opt: Fix --help=option -Q for options which are of
2733 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2736 * c-common.c (check_function_restrict): New function.
2737 (check_function_arguments): Add FNDECL argument. Call
2738 check_function_restrict if -Wrestrict.
2739 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2740 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2741 * c-common.h (check_function_arguments): Add FNDECL argument.
2742 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2744 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2746 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2747 treatment of parameters with pointer-to-tagged type and tidy up.
2748 (print_ada_methods): Remove the special treatment of C++ static member
2751 2017-02-22 Martin Liska <mliska@suse.cz>
2753 * c.opt: Replace inequality signs with square brackets
2756 2017-02-21 Jakub Jelinek <jakub@redhat.com>
2759 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2762 2017-02-17 Joseph Myers <joseph@codesourcery.com>
2764 * c-cppbuiltin.c (builtin_define_float_constants): Define
2765 __DECIMAL_DIG__ to the value for long double.
2767 2017-02-15 Marek Polacek <polacek@redhat.com>
2770 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2771 conversion has occured.
2773 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2775 * c-common.c (c_common_reswords): Add "__RTL".
2776 * c-common.h (enum rid): Add RID_RTL.
2778 2017-01-20 Marek Polacek <polacek@redhat.com>
2781 * c-common.h (do_warn_duplicated_branches_r): Declare.
2782 * c-gimplify.c (c_genericize): Walk the function tree calling
2783 do_warn_duplicated_branches_r.
2784 * c-warn.c (expr_from_macro_expansion_r): New.
2785 (do_warn_duplicated_branches): New.
2786 (do_warn_duplicated_branches_r): New.
2787 * c.opt (Wduplicated-branches): New option.
2789 2017-01-17 David Malcolm <dmalcolm@redhat.com>
2792 * c-indentation.c (warn_for_misleading_indentation): Use the past
2793 subjunctive in the note.
2795 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
2798 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2799 start type to integer_type.
2801 2017-01-16 Jakub Jelinek <jakub@redhat.com>
2804 * c.opt (gen-decls): Add Driver flag.
2806 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2809 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2812 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2814 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2817 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2819 2017-01-12 Martin Sebor <msebor@redhat.com>
2821 (-Wformat-overflow): ...to this.
2823 2017-01-11 Martin Sebor <msebor@redhat.com>
2826 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2827 Also enable for LTO.
2829 2017-01-10 Jason Merrill <jason@redhat.com>
2831 Implement P0195R2, C++17 variadic using.
2832 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2834 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2836 PR translation/79019
2837 PR translation/79020
2838 * c.opt (Wnormalized=): Fix typo in description.
2840 2017-01-08 Martin Sebor <msebor@redhat.com>
2843 * c.opt (-Wformat-truncation): New option.
2845 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2847 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2848 value to unsigned short to fit in 4 hex digits without
2851 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2853 * c.opt (fsso-struct): Add 'native' value.
2855 2017-01-05 Martin Liska <mliska@suse.cz>
2858 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2861 2017-01-04 Marek Polacek <polacek@redhat.com>
2864 * c.opt (Wpointer-compare): New option.
2866 2017-01-04 Jakub Jelinek <jakub@redhat.com>
2869 * c.opt (fsso-struct=): Add RejectNegative.
2871 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2873 Update copyright years.
2875 2016-12-29 Martin Liska <mliska@suse.cz>
2878 * c.opt (strong-eval-order): Add RejectNegative keyword.
2880 2016-12-22 Jason Merrill <jason@redhat.com>
2882 Implement P0522R0, matching of template template arguments.
2883 * c-cppbuiltin.c (c_cpp_builtins): Define
2884 __cpp_template_template_args.
2886 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2889 * c-common.c (struct nonnull_arg_ctx): New type.
2890 (check_function_nonnull): Return bool instead of void. Use
2891 nonnull_arg_ctx as context rather than just location_t.
2892 (check_nonnull_arg): Adjust for the new context type, set
2893 warned_p to true if a warning has been diagnosed.
2894 (check_function_arguments): Return bool instead of void.
2895 * c-common.h (check_function_arguments): Adjust prototype.
2897 2016-12-21 Jason Merrill <jason@redhat.com>
2899 * c.opt (-fnew-ttp-matching): New flag.
2900 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2902 2016-12-14 Martin Jambor <mjambor@suse.cz>
2904 * c-omp.c: Include omp-general.h instead of omp-low.h.
2905 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2908 2016-12-14 Martin Sebor <msebor@redhat.com>
2911 * c-common.c (check_nonnull_arg): Disable when optimization
2914 2016-12-12 Marek Polacek <polacek@redhat.com>
2917 * c-common.c (attribute_fallthrough_p): Return false for
2920 2016-12-08 Martin Sebor <msebor@redhat.com>
2923 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2925 2016-12-08 Martin Sebor <msebor@redhat.com>
2928 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2931 2016-12-07 Martin Sebor <msebor@redhat.com>
2937 * c.opt (-Wstringop-overflow): New option.
2939 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2941 * c-attribs.c (asan odr indicator): New attribute.
2942 (handle_asan_odr_indicator_attribute): New function.
2944 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2946 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2949 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2951 * c-common.c (excess_precision_mode_join): New.
2952 (c_ts18661_flt_eval_method): New.
2953 (c_c11_flt_eval_method): Likewise.
2954 (c_flt_eval_method): Likewise.
2955 * c-common.h (excess_precision_mode_join): New.
2956 (c_flt_eval_method): Likewise.
2957 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2958 (cpp_iec_559_value): Call it.
2959 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2960 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2961 __FLT_EVAL_METHOD_TS_18661_3__.
2963 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2965 * c-opts.c (c_common_post_options): Add logic to handle the default
2966 case for -fpermitted-flt-eval-methods.
2968 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2970 * c.opt (Wexpansion-to-defined): New.
2972 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2975 * c-pragma.c (handle_pragma_target): Don't replace
2976 current_target_pragma, but chainon the new args to the current one.
2978 2016-11-22 Nathan Sidwell <nathan@acm.org>
2980 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2981 indentation and formatting.
2983 2016-11-21 Martin Sebor <msebor@redhat.com>
2985 * c.opt (-fprintf-return-value): Enable by default.
2987 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2990 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2991 * c-common.c (c_common_nodes_and_builtins): Initialize
2992 const_tm_ptr_type_node.
2994 2016-11-16 Marek Polacek <polacek@redhat.com>
2997 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2999 2016-11-14 Jakub Jelinek <jakub@redhat.com>
3001 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3003 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3004 Richard Biener <rguenther@suse.de>
3006 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3007 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3008 * c.opt (fgimple): New option.
3010 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3013 * c-common.h (warn_for_restrict): Declare.
3014 * c-warn.c: Include gcc-rich-location.h.
3015 (warn_for_restrict): New function.
3016 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3017 (gcc_cdiag_char_table): Likewise.
3018 (gcc_cxxdiag_char_table): Likewise.
3019 * c.opt (Wrestrict): New option.
3021 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3023 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3024 for nested types only if the type is a record or union and dump SLOC.
3026 2016-11-09 Jason Merrill <jason@redhat.com>
3028 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3030 2016-11-09 Jakub Jelinek <jakub@redhat.com>
3032 * c-ubsan.c (ubsan_instrument_shift): Handle split
3033 -fsanitize=shift-base and -fsanitize=shift-exponent.
3035 2016-11-07 Jason Merrill <jason@redhat.com>
3037 * c.opt (Wc++1z-compat): New.
3038 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3040 2016-11-07 Martin Liska <mliska@suse.cz>
3042 * c-warn.c (warn_for_unused_label): Save all labels used
3043 in goto or in &label.
3045 2016-11-03 Jason Merrill <jason@redhat.com>
3047 * c-cppbuiltin.c (c_cpp_builtins): Correct
3048 __cpp_inheriting_constructors.
3050 2016-11-01 Jason Merrill <jason@redhat.com>
3052 * c-cppbuiltin.c (c_cpp_builtins): Update
3053 __cpp_inheriting_constructors.
3055 * c.opt (-fnew-inheriting-ctors): New.
3056 * c-opts.c: Default to on for ABI 11+.
3058 2016-10-31 Jakub Jelinek <jakub@redhat.com>
3061 * c.opt (fext-numeric-literals): Add Var and Init.
3062 * c-opts.c (c_common_handle_option): Don't clear
3063 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3064 (c_common_post_options): Clear it here if not set
3067 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
3070 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3073 2016-10-25 Jakub Jelinek <jakub@redhat.com>
3075 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3076 * c-common.c (c_common_reswords): Add __builtin_launder.
3078 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3080 * c-common.c (c_common_truthvalue_conversion): Warn for
3081 multiplications in boolean context. Fix the quoting of '<<' and '<'
3082 in the shift warning.
3084 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3086 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3088 2016-10-20 Jason Merrill <jason@redhat.com>
3090 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3092 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3094 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3095 integer shift ops in boolean context.
3097 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
3099 * c.opt (Walloca): New.
3100 (Walloca-larger-than=): New.
3101 (Wvla-larger-than=): New.
3103 2016-10-17 Marek Polacek <polacek@redhat.com>
3105 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3106 Return immediately when finding a match.
3107 (warn_tautological_cmp): Remove a boolean variable that is no longer
3110 2016-10-17 Marek Polacek <polacek@redhat.com>
3112 * c-attribs.c: New file.
3113 * c-common.c: Move attributes handling to c-attribs.c.
3114 (get_nonnull_operand): No longer static.
3115 * c-common.h: Move the declarations from c-attribs.c to its own section.
3117 2016-10-14 Jason Merrill <jason@redhat.com>
3119 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3120 and __cpp_deduction_guides.
3122 2016-10-13 Jason Merrill <jason@redhat.com>
3124 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3126 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3128 * c-cppbuiltin.c: Include memmodel.h.
3129 * c-opts.c: Likewise.
3130 * c-pragma.c: Likewise.
3131 * c-warn.c: Likewise.
3133 2016-10-12 Jakub Jelinek <jakub@redhat.com>
3135 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3136 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3137 * c-opts.c (sanitize_cpp_opts): Initialize
3138 cpp_opts->cpp_warn_implicit_fallthrough.
3140 2016-10-11 Marek Polacek <polacek@redhat.com>
3142 * c-common.c (warning_candidate_p): Change the return type to bool
3143 and return true/false instead of 1/0.
3144 (vector_mode_valid_p): Likewise.
3146 2016-10-11 Marek Polacek <polacek@redhat.com>
3148 * c-common.c (fold_for_warn): No longer static.
3149 (bool_promoted_to_int_p): Likewise.
3150 (c_common_get_narrower): Likewise.
3151 (constant_expression_warning): Move to c-warn.c.
3152 (constant_expression_error): Likewise.
3153 (overflow_warning): Likewise.
3154 (warn_logical_operator): Likewise.
3155 (find_array_ref_with_const_idx_r): Likewise.
3156 (warn_tautological_cmp): Likewise.
3157 (expr_has_boolean_operands_p): Likewise.
3158 (warn_logical_not_parentheses): Likewise.
3159 (warn_if_unused_value): Likewise.
3160 (strict_aliasing_warning): Likewise.
3161 (sizeof_pointer_memaccess_warning): Likewise.
3162 (check_main_parameter_types): Likewise.
3163 (conversion_warning): Likewise.
3164 (warnings_for_convert_and_check): Likewise.
3165 (match_case_to_enum_1): Likewise.
3166 (match_case_to_enum): Likewise.
3167 (c_do_switch_warnings): Likewise.
3168 (warn_for_omitted_condop): Likewise.
3169 (readonly_error): Likewise.
3170 (lvalue_error): Likewise.
3171 (invalid_indirection_error): Likewise.
3172 (warn_array_subscript_with_type_char): Likewise.
3173 (warn_about_parentheses): Likewise.
3174 (warn_for_unused_label): Likewise.
3175 (warn_for_div_by_zero): Likewise.
3176 (warn_for_memset): Likewise.
3177 (warn_for_sign_compare): Likewise.
3178 (do_warn_double_promotion): Likewise.
3179 (do_warn_unused_parameter): Likewise.
3180 (record_locally_defined_typedef): Likewise.
3181 (maybe_record_typedef_use): Likewise.
3182 (maybe_warn_unused_local_typedefs): Likewise.
3183 (maybe_warn_bool_compare): Likewise.
3184 (maybe_warn_shift_overflow): Likewise.
3185 (warn_duplicated_cond_add_or_warn): Likewise.
3186 (diagnose_mismatched_attributes): Likewise.
3187 * c-common.h: Move the declarations from c-warn.c to its own section.
3188 * c-warn.c: New file.
3190 2016-10-08 Jason Merrill <jason@redhat.com>
3192 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3193 into COND_EXPR in C++.
3195 2016-10-08 Jakub Jelinek <jakub@redhat.com>
3197 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3198 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3199 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3201 2016-10-07 Jakub Jelinek <jakub@redhat.com>
3203 Implement LWG2296 helper intrinsic
3204 * c-common.h (enum rid): Add RID_ADDRESSOF.
3205 * c-common.c (c_common_reswords): Add __builtin_addressof.
3207 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3210 * c-common.c (c_common_truthvalue_conversion): Warn also for
3211 suspicious enum values in boolean context.
3213 2016-10-06 Jakub Jelinek <jakub@redhat.com>
3215 Implement P0258R2 - helper for C++17
3216 std::has_unique_object_representations trait
3217 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3218 * c-common.c (c_common_reswords): Add
3219 __has_unique_object_representations.
3221 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3224 * c-ubsan.c (ubsan_instrument_return): Don't call
3225 initialize_sanitizer_builtins here.
3227 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3229 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3230 conditional expression in boolean context when only one arm is
3233 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3236 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3239 * c-common.c (c_common_reswords): Update comment for C++11.
3241 2016-10-04 Jason Merrill <jason@redhat.com>
3243 * c-common.c (make_tree_vector_from_ctor): New.
3244 * c-common.h: Declare it.
3246 2016-10-04 Jakub Jelinek <jakub@redhat.com>
3248 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3249 __LIBGCC_JCR_SECTION_NAME__.
3251 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3253 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3254 left shift in boolean context.
3256 2016-09-29 Jakub Jelinek <jakub@redhat.com>
3258 Implement P0001R1 - C++17 removal of register storage class specifier
3259 * c.opt (Wregister): New warning.
3260 * c-opts.c (c_common_post_options): Enable -Wregister by
3263 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3265 * c-opts.c (c_common_post_options): Remove special case for
3266 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3269 2016-09-27 Jakub Jelinek <jakub@redhat.com>
3271 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3274 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3276 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3278 * c-common.c: Include memmodel.h.
3280 2016-09-26 Marek Polacek <polacek@redhat.com>
3282 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3284 2016-09-26 Marek Polacek <polacek@redhat.com>
3287 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3288 (handle_fallthrough_attribute): New function.
3289 (attribute_fallthrough_p): New function.
3290 * c-common.h (attribute_fallthrough_p): Declare.
3292 2016-09-24 Marek Polacek <polacek@redhat.com>
3295 * c.opt (Wbool-operation): New.
3297 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3299 * c-common.c (c_common_truthvalue_conversion): Inhibit
3300 Wint-in-bool-context warning with from_macro_definition_at.
3301 Mention the expression will always evaluate to true.
3303 2016-09-21 Martin Sebor <msebor@redhat.com>
3306 * c.opt (fprintf-return-value): Temporarily initialize to zero
3307 to unblock bootstrap failures.
3309 2016-09-21 Jakub Jelinek <jakub@redhat.com>
3312 * c.opt (Waligned-new=): Add RejectNegative.
3313 (faligned-new=): Likewise. Spelling fix - change
3314 aligned_new_threshhold to aligned_new_threshold.
3315 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3316 to aligned_new_threshold.
3318 2016-09-20 Martin Sebor <msebor@redhat.com>
3321 * c.opt: Add -Wformat-length and -fprintf-return-value.
3323 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3326 * c.opt (Wint-in-bool-context): New warning.
3327 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3328 constants in boolean context.
3330 2016-09-19 Joseph Myers <joseph@codesourcery.com>
3332 * c-common.c (max_align_t_align): Also consider alignment of
3335 2016-09-15 Jason Merrill <jason@redhat.com>
3337 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3340 2016-09-14 Jason Merrill <jason@redhat.com>
3342 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3343 limit FIELD_DECL, either.
3345 2016-09-14 Marek Polacek <polacek@redhat.com>
3347 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3348 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3349 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3351 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3353 * c-common.c (warn_logical_not_parentheses): Replace
3354 rich_location::add_fixit_insert calls with add_fixit_insert_before
3355 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3357 2016-09-13 Jason Merrill <jason@redhat.com>
3358 Tom de Vries <tom@codesourcery.com>
3361 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3363 2016-09-13 Jason Merrill <jason@redhat.com>
3365 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3368 2016-09-12 Jason Merrill <jason@redhat.com>
3370 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3371 bit/byte confusion, allow large alignment for types.
3373 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3376 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3378 2016-09-12 David Malcolm <dmalcolm@redhat.com>
3381 * c-format.c (argument_parser::check_argument_type): Add params
3382 "type_start" and "conversion_char". Use the former to generate
3383 offset_to_type_start and pass it and conversion_char to
3385 (check_format_info_main): Capture the start of the type
3386 information as "type_start", and pass it an format_char
3387 to arg_parser.check_argument_type.
3388 (check_format_types): Provide an example in the leading comment.
3389 Add params "offset_to_type_start" and "conversion_char"; pass
3390 them to format_type_warning calls.
3391 (test_get_modifier_for_format_len): Likewise.
3392 (matching_type_p): New function.
3393 (get_format_for_type): Add param "conversion_char" and move
3394 implementation into...
3395 (get_format_for_type_1): ...new function, called twice.
3396 Use new function matching_type_p rather than checking for
3397 TYPE_CANONICAL equality.
3398 (get_corrected_substring): New function.
3399 (format_type_warning): Provide an example in the leading comment.
3400 Add params "offset_to_type_start" and "conversion_char". Replace
3401 call to get_format_for_type with call to get_corrected_substring
3402 and move rejection of hints for widths/precisions there.
3403 (assert_format_for_type_streq): Add param "conversion_char".
3404 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3405 (test_get_format_for_type_printf): Add conversion chars to the
3406 tests, adding coverage for various combinations of integer
3407 vs double conversions, and for preserving octal and hexadecimal
3409 (test_get_format_for_type_scanf): Add conversion chars to the
3412 2016-09-10 Tom de Vries <tom@codesourcery.com>
3415 * c-common.c (build_va_arg): Handle more strict
3416 targetm.canonical_va_list_type. Replace first argument type error with
3419 2016-09-09 Martin Sebor <msebor@redhat.com>
3423 * c-format.c (argument_parser::find_format_char_info): Use %qc
3424 format directive unconditionally.
3426 2016-09-09 Jason Merrill <jason@redhat.com>
3428 Implement C++17 new of over-aligned types.
3429 * c.opt: Add -faligned-new and -Waligned-new.
3430 * c-common.c (max_align_t_align): Split out from...
3431 (cxx_fundamental_alignment_p): ...here.
3432 * c-common.h: Declare it.
3433 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3435 2016-09-09 Joseph Myers <joseph@codesourcery.com>
3437 * c-cppbuiltin.c (builtin_define_type_width): New function.
3438 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3441 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3443 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3445 (substring_loc::get_location): Move to substring-locations.c,
3446 keeping implementation as...
3447 (c_get_substring_location): New function, from the above, reworked
3448 to use accessors rather than member lookup.
3449 * c-common.h (class substring_loc): Move to substring-locations.h,
3450 replacing with a forward decl.
3451 (c_get_substring_location): New decl.
3452 * c-format.c: Include "substring-locations.h".
3453 (format_warning_va): Move to substring-locations.c.
3454 (format_warning_at_substring): Likewise.
3456 2016-09-06 Martin Sebor <msebor@redhat.com>
3459 * c-format.c (check_function_format): Avoid issuing warnings for
3460 functions unless they call format functions with non-constant
3463 2016-09-06 Richard Biener <rguenther@suse.de>
3466 * c-common.c (c_common_mark_addressable_vec): Handle
3467 COMPOUND_LITERAL_EXPR.
3469 2016-09-05 Marek Polacek <polacek@redhat.com>
3472 * c-common.c (bool_promoted_to_int_p): New function.
3473 (expr_has_boolean_operands_p): New function.
3474 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3475 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3477 2016-09-04 Tom de Vries <tom@codesourcery.com>
3480 2016-08-29 Tom de Vries <tom@codesourcery.com>
3482 * c-common.c (build_va_arg): Replace first argument type error
3485 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3488 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3489 (c_finish_omp_for): Reject _Atomic qualified iterators.
3491 2016-09-01 Martin Sebor <msebor@redhat.com>
3493 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3494 size to guarantee it fits the output of the formatted function
3495 regardless of its arguments.
3497 2016-09-01 Marek Polacek <polacek@redhat.com>
3500 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3503 2016-08-29 Marek Polacek <polacek@redhat.com>
3506 * c-common.c (warn_logical_not_parentheses): Don't warn for
3507 a comparison or a logical operator.
3509 2016-08-29 Tom de Vries <tom@codesourcery.com>
3511 * c-common.c (build_va_arg): Fix type comparison assert.
3513 2016-08-29 Tom de Vries <tom@codesourcery.com>
3515 * c-common.c (build_va_arg): Replace first argument type error
3518 2016-08-29 Tom de Vries <tom@codesourcery.com>
3521 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3522 with error_mark_node as va_list instead of with illegal va_list.
3524 2016-08-25 Marek Polacek <polacek@redhat.com>
3525 David Malcolm <dmalcolm@redhat.com>
3527 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3528 * c-common.h (warn_logical_not_parentheses): Update declaration.
3530 2016-08-22 Marek Polacek <polacek@redhat.com>
3533 * c-common.c (warn_for_memset): Check type for null.
3535 2016-08-22 Joseph Myers <joseph@codesourcery.com>
3537 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
3538 _FloatNx types for suffixes for built-in functions.
3540 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3543 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3544 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3545 (RID_FLOAT128X): New enum rid values.
3546 (CASE_RID_FLOATN_NX): New macro.
3547 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3549 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3550 corresponding complex types.
3551 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3552 _FloatNx and corresponding complex types.
3553 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3554 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3555 and _FloatNx types for the widest type for determining
3556 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3557 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3558 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3560 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3562 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3565 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3567 * c-opts.c (c_diagnostic_finalizer): Update for change to
3568 diagnostic_show_locus.
3570 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3572 * c-common.c: Include "spellcheck.h".
3573 (cb_get_suggestion): New function.
3574 * c-common.h (cb_get_suggestion): New decl.
3575 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3578 2016-08-18 Marek Polacek <polacek@redhat.com>
3581 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3584 2016-08-16 David Malcolm <dmalcolm@redhat.com>
3587 * c-common.c (substring_loc::get_range): Rename to...
3588 (substring_loc::get_location): ...this, converting param from a
3589 source_range * to a location_t *. Call
3590 get_source_location_for_substring rather than
3591 get_source_range_for_substring, and pass in m_caret_idx.
3592 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3593 (substring_loc::get_range): Replace with...
3594 (substring_loc::get_location): ...this.
3595 (substring_loc::set_caret_index): New method.
3596 (substring_loc): Add field m_caret_idx.
3597 * c-format.c (format_warning_va): Update for above changes.
3598 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3599 clashing with type name.
3600 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3601 (check_argument_type): Likewise.
3602 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3603 Use a copy when emitting warnings, setting the caret index from TYPE.
3605 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
3606 Arnaud Charlet <charlet@adacore.com>
3608 * c-ada-spec.c (dump_number): New function.
3609 (handle_escape_character): Likewise.
3610 (print_ada_macros): Add handling of constant integers and strings.
3612 2016-08-12 Marek Polacek <polacek@redhat.com>
3615 * c-common.c (scalar_to_vector): Adjust fall through comment.
3616 * c-opts.c (c_common_handle_option): Likewise.
3617 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3618 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3619 fall through comment.
3620 * cilk.c (extract_free_variables): Add FALLTHRU.
3622 2016-08-10 Jason Merrill <jason@redhat.com>
3624 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3626 2016-08-09 Jason Merrill <jason@redhat.com>
3628 * c-common.c (c_common_attribute_table): vector_size affects type
3631 2016-08-09 Marek Polacek <polacek@redhat.com>
3634 * c-ada-spec.c (dump_generic_ada_node): Add return.
3636 2016-08-09 Jason Merrill <jason@redhat.com>
3638 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3639 C++17 constexpr lambdas.
3641 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3644 * c-common.h (selftest::c_format_c_tests): New declaration.
3645 (selftest::run_c_tests): New declaration.
3646 * c-format.c: Include "selftest.h.
3647 (format_warning_va): Add param "corrected_substring" and use
3648 it to add a replacement fix-it hint.
3649 (format_warning_at_substring): Likewise.
3650 (format_warning_at_char): Update for new param of
3652 (argument_parser::check_argument_type): Pass "fki" to
3654 (check_format_types): Add param "fki" and pass it to
3655 format_type_warning.
3656 (deref_n_times): New function.
3657 (get_modifier_for_format_len): New function.
3658 (selftest::test_get_modifier_for_format_len): New function.
3659 (get_format_for_type): New function.
3660 (format_type_warning): Add param "fki" and use it to attempt
3661 to provide hints for argument types when calling
3662 format_warning_at_substring.
3663 (selftest::get_info): New function.
3664 (selftest::assert_format_for_type_streq): New function.
3665 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3666 (selftest::test_get_format_for_type_printf): New function.
3667 (selftest::test_get_format_for_type_scanf): New function.
3668 (selftest::c_format_c_tests): New function.
3670 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3673 * c-format.c: Include "diagnostic.h".
3674 (location_column_from_byte_offset): Delete.
3675 (location_from_offset): Delete.
3676 (format_warning_va): New function.
3677 (format_warning_at_substring): New function.
3678 (format_warning_at_char): New function.
3679 (check_format_arg): Capture location of format_tree and pass to
3680 check_format_info_main.
3681 (argument_parser): Add fields "start_of_this_format" and
3682 "format_string_cst".
3683 (flag_chars_t::validate): Add param "format_string_cst". Convert
3684 warning_at call using location_from_offset to call to
3685 format_warning_at_char.
3686 (argument_parser::argument_parser): Add param "format_string_cst_"
3687 and use use it to initialize field "format_string_cst".
3688 Initialize new field "start_of_this_format".
3689 (argument_parser::read_format_flags): Convert warning_at call
3690 using location_from_offset to a call to format_warning_at_char.
3691 (argument_parser::read_any_format_left_precision): Likewise.
3692 (argument_parser::read_any_format_precision): Likewise.
3693 (argument_parser::read_any_other_modifier): Likewise.
3694 (argument_parser::find_format_char_info): Likewise, in three places.
3695 (argument_parser::parse_any_scan_set): Likewise, in one place.
3696 (argument_parser::handle_conversions): Likewise, in two places.
3697 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3698 and use it to make a substring_loc. Pass the latter to
3700 (check_format_info_main): Add params "fmt_param_loc" and
3701 "format_string_cst". Convert warning_at calls using
3702 location_from_offset to calls to format_warning_at_char. Pass the
3703 new params to the arg_parser ctor. Pass "format_string_cst" to
3704 flag_chars.validate. Pass "fmt_param_loc" to
3705 arg_parser.check_argument_type.
3706 (check_format_types): Convert first param from a location_t
3707 to a const substring_loc & and rename to "fmt_loc". Attempt
3708 to extract the range of the relevant parameter and pass it
3709 to format_type_warning.
3710 (format_type_warning): Convert first param from a location_t
3711 to a const substring_loc & and rename to "fmt_loc". Add
3712 params "param_range" and "type". Replace calls to warning_at
3713 with calls to format_warning_at_substring.
3715 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3717 * c-format.c (class flag_chars_t): New class.
3718 (struct length_modifier): New struct.
3719 (class argument_parser): New class.
3720 (flag_chars_t::flag_chars_t): New ctor.
3721 (flag_chars_t::has_char_p): New method.
3722 (flag_chars_t::add_char): New method.
3723 (flag_chars_t::validate): New method.
3724 (flag_chars_t::get_alloc_flag): New method.
3725 (flag_chars_t::assignment_suppression_p): New method.
3726 (argument_parser::argument_parser): New ctor.
3727 (argument_parser::read_any_dollar): New method.
3728 (argument_parser::read_format_flags): New method.
3729 (argument_parser::read_any_format_width): New method.
3730 (argument_parser::read_any_format_left_precision): New method.
3731 (argument_parser::read_any_format_precision): New method.
3732 (argument_parser::handle_alloc_chars): New method.
3733 (argument_parser::read_any_length_modifier): New method.
3734 (argument_parser::read_any_other_modifier): New method.
3735 (argument_parser::find_format_char_info): New method.
3736 (argument_parser::validate_flag_pairs): New method.
3737 (argument_parser::give_y2k_warnings): New method.
3738 (argument_parser::parse_any_scan_set): New method.
3739 (argument_parser::handle_conversions): New method.
3740 (argument_parser::check_argument_type): New method.
3741 (check_format_info_main): Introduce classes argument_parser
3742 and flag_chars_t, moving the code within the loop into methods
3743 of these classes. Make various locals "const".
3745 2016-08-05 David Malcolm <dmalcolm@redhat.com>
3747 * c-common.c: Include "substring-locations.h".
3748 (get_cpp_ttype_from_string_type): New function.
3749 (g_string_concat_db): New global.
3750 (substring_loc::get_range): New method.
3751 * c-common.h (g_string_concat_db): New declaration.
3752 (class substring_loc): New class.
3753 * c-lex.c (lex_string): When concatenating strings, capture the
3754 locations of all tokens using a new obstack, and record the
3755 concatenation locations within g_string_concat_db.
3756 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3759 2016-07-29 Marek Polacek <polacek@redhat.com>
3762 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3763 parentheses warning.
3766 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3768 2016-07-28 Martin Liska <mliska@suse.cz>
3770 PR gcov-profile/68025
3771 * c-common.c (handle_no_profile_instrument_function_attribute):
3773 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3775 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3778 2016-07-25 Jason Merrill <jason@redhat.com>
3781 * c.opt (fconstexpr-loop-limit): New.
3783 2016-07-22 Martin Sebor <msebor@redhat.com>
3786 * c-common.c (resolve_overloaded_builtin): Avoid converting
3787 __atomic_compare_exchange_n return type to that of what its
3788 first argument points to.
3790 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3792 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3793 ~(unsigned HOST_WIDE_INT) 0.
3795 2016-07-22 Martin Liska <mliska@suse.cz>
3797 PR gcov-profile/69028
3798 PR gcov-profile/62047
3799 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3800 to the current_function_decl.
3802 2016-07-21 Jason Merrill <jason@redhat.com>
3805 * c-common.c (c_common_truthvalue_conversion): Check
3806 c_inhibit_evaluation_warnings for warning about address of
3809 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3811 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3814 2016-07-15 Jason Merrill <jason@redhat.com>
3816 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3818 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3821 * c-common.h (enum lookup_name_fuzzy_kind): Add
3822 FUZZY_LOOKUP_FUNCTION_NAME.
3824 2016-07-08 Jason Merrill <jason@redhat.com>
3826 P0145: Refining Expression Order for C++.
3827 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3830 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3833 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3835 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3837 * c-pragma.h (enum pragma_kind): Rename
3838 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3841 2016-06-29 Richard Biener <rguenther@suse.de>
3844 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3846 2016-06-24 Jason Merrill <jason@redhat.com>
3848 P0145R2: Refining Expression Order for C++.
3849 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3852 2016-06-24 Jakub Jelinek <jakub@redhat.com>
3854 * c-common.c (check_builtin_function_arguments): Require last
3855 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3856 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3857 if the last argument is pointer to enumerated or boolean type.
3859 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3862 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3863 (lookup_name_fuzzy): New prototype.
3865 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
3867 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3869 2016-06-14 Jason Merrill <jason@redhat.com>
3871 P0145R2: Refining Expression Order for C++.
3872 * c.opt (fargs-in-order): New.
3873 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3875 2016-06-13 Jakub Jelinek <jakub@redhat.com>
3878 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3879 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3881 PR preprocessor/71183
3882 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3883 to cb_get_source_date_epoch.
3885 2016-06-10 Jakub Jelinek <jakub@redhat.com>
3888 * c.opt (Wpsabi): Add Warning flag.
3890 2016-06-10 Martin Sebor <msebor@redhat.com>
3893 * c-common.c (handle_nonnull_attribute): Accept
3894 the nonnull attribute in type-generic builtins.
3896 2016-06-09 Martin Sebor <msebor@redhat.com>
3899 * c-common.c (builtin_function_validate_nargs): Make text of error
3900 message consistent with others like it.
3902 2016-06-08 Martin Sebor <msebor@redhat.com>
3903 Jakub Jelinek <jakub@redhat.com>
3907 * c-common.c (check_builtin_function_arguments): Handle
3908 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3910 2016-06-08 Richard Biener <rguenther@suse.de>
3912 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3914 2016-06-07 Richard Biener <rguenther@suse.de>
3917 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3918 options and warn about others.
3920 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3922 * c-common.c (get_source_date_epoch): Rename to
3923 cb_get_source_date_epoch.
3924 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3925 message when the parsing fails. Use error_at instead of fatal_error.
3926 * c-common.h (get_source_date_epoch): Rename to
3927 cb_get_source_date_epoch.
3928 * c-common.h (cb_get_source_date_epoch): Prototype.
3929 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3930 * c-common.h (c_omp_region_type): Remove trailing comma.
3931 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3932 * c-lex.c (c_lex_with_flags): Remove initialization of
3933 pfile->source_date_epoch.
3935 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3938 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3939 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3940 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3941 instead of C_OMP_CLAUSE_SPLIT_FOR.
3943 2016-05-24 Richard Biener <rguenther@suse.de>
3947 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3948 (convert_vector_to_array_for_subscript): ... this.
3949 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3950 VIEW_CONVERT_EXPR to an array type. Rename to ...
3951 (convert_vector_to_array_for_subscript): ... this.
3953 2016-05-12 Marek Polacek <polacek@redhat.com>
3956 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3957 size_in_bytes and pass LOC to it.
3959 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3962 * c.opt (Wduplicate-decl-specifier): New option.
3964 2016-05-11 Marek Polacek <polacek@redhat.com>
3967 * c-common.c (diagnose_mismatched_attributes): New function.
3968 * c-common.h (diagnose_mismatched_attributes): Declare.
3970 2016-05-04 Marek Polacek <polacek@redhat.com>
3972 * c.opt (Wdangling-else): New option.
3974 2016-05-03 Marek Polacek <polacek@redhat.com>
3977 * c-common.c (builtin_function_validate_nargs): Add location
3979 (check_builtin_function_arguments): Add location and arguments
3980 parameters. Use them.
3981 * c-common.h (check_builtin_function_arguments): Update declaration.
3983 2016-05-03 Richard Biener <rguenther@suse.de>
3985 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3986 allow call args to gimplify to SSA names.
3988 2016-05-03 Marek Polacek <polacek@redhat.com>
3990 * c-common.h (enum c_omp_region_type): Remove stray comma.
3992 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3994 * c-common.h (enum c_omp_region_type): Define.
3996 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3998 * c-common.c (shorten_compare): Use wi::to_wide.
4000 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4003 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4004 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4005 reduction clauses in acc parallel loops.
4007 2016-04-29 Marek Polacek <polacek@redhat.com>
4010 * c-common.c (warn_for_memset): Check domain before accessing it.
4012 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4015 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4016 "aligned" attribute.
4018 2016-04-28 Jason Merrill <jason@redhat.com>
4020 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4022 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
4023 Matthias Klose <doko@debian.org>
4025 * c-common.c (get_source_date_epoch): New function, gets the environment
4026 variable SOURCE_DATE_EPOCH and parses it as long long with error
4028 * c-common.h (get_source_date_epoch): Prototype.
4029 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4031 2015-04-27 Ryan Burn <contact@rnburn.com>
4035 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4036 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4038 (cilk_detect_and_unwrap): Corresponding changes.
4039 (extract_free_variables): Don't extract free variables from
4040 AGGR_INIT_EXPR slot.
4041 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4042 (cilk_recognize_spawn): Likewise.
4044 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4046 * c.opt (Wmemset-elt-size): New option.
4047 * c-common.c (warn_for_memset): New function.
4048 * c-common.h (warn_for_memset): Declare.
4050 2016-04-25 Jason Merrill <jason@redhat.com>
4052 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4054 * c-common.h: Declare it.
4055 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4057 2016-04-22 Jason Merrill <jason@redhat.com>
4059 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4061 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4064 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4065 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4067 2016-04-18 Michael Matz <matz@suse.de>
4069 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4072 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4074 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4075 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4076 to incomplete types.
4077 (dump_nested_type): Remove redundant tests and tidy up.
4078 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4079 a type which is the typedef of an original type.
4081 2016-04-15 Marek Polacek <polacek@redhat.com>
4084 * c-common.c (build_va_arg): Change two asserts into errors and return
4087 2016-04-13 Marek Polacek <polacek@redhat.com>
4090 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4091 for switch statements, too.
4093 2016-03-28 Jason Merrill <jason@redhat.com>
4095 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4097 2016-03-23 Marek Polacek <polacek@redhat.com>
4100 * c.opt (Wignored-attributes): New option.
4102 2016-03-22 David Malcolm <dmalcolm@redhat.com>
4105 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4106 diagnostic text, reversing the order of the warning and note so
4107 that they appear in source order.
4109 2016-03-17 Marek Polacek <polacek@redhat.com>
4112 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4115 2016-03-14 Jason Merrill <jason@redhat.com>
4117 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4119 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4121 2016-03-09 Richard Biener <rguenther@suse.de>
4124 * c-common.c (strict_aliasing_warning): Add back
4125 alias_sets_conflict_p check.
4127 2016-03-08 Jason Merrill <jason@redhat.com>
4129 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4131 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4134 * c-indentation.c (get_visual_column): Move code to determine next
4136 (next_tab_stop): ...this new function.
4137 (line_contains_hash_if): Delete function.
4138 (detect_preprocessor_logic): Delete function.
4139 (get_first_nws_vis_column): New function.
4140 (detect_intervening_unindent): New function.
4141 (should_warn_for_misleading_indentation): Replace call to
4142 detect_preprocessor_logic with a call to
4143 detect_intervening_unindent.
4145 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4148 * c-indentation.c (should_warn_for_misleading_indentation): When
4149 suppressing warnings about cases where the guard and body are on
4150 the same column, only use the first non-whitespace column in place
4151 of the guard token column when dealing with "else" clauses.
4152 When rejecting aligned BODY and NEXT, loosen the requirement
4153 from equality with the first non-whitespace of guard to simply
4154 that they not be indented relative to it.
4156 2016-03-04 Richard Biener <rguenther@suse.de>
4159 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4160 instead of alias_sets_conflict_p.
4162 2016-03-01 Marek Polacek <polacek@redhat.com>
4165 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4168 2016-02-22 Martin Sebor <msebor@redhat.com>
4171 * c-common.c (check_builtin_function_arguments): Validate and
4172 reject invalid arguments to __builtin_alloca_with_align.
4174 2016-02-20 Mark Wielaard <mjw@redhat.com>
4177 * c.opt (Wunused-const-variable): Turn into Alias for...
4178 (Wunused-const-variable=): New option.
4180 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4183 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4185 (c_common_init_options): ...to here.
4186 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4188 2016-02-19 Jakub Jelinek <jakub@redhat.com>
4191 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4192 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4193 flag_preprocess_only.
4195 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4198 * c.opt (Wnonnull-compare): Enable for -Wall.
4200 2016-02-15 Jakub Jelinek <jakub@redhat.com>
4203 * c-common.c (sync_resolve_size): Diagnose too few arguments
4204 even when params is non-NULL empty vector.
4206 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4209 * c.opt (fshort-double): Remove.
4211 2016-02-05 Martin Sebor <msebor@redhat.com>
4214 * c.opt (Warning options): Update -Wplacement-new to take
4215 an optional argument.
4217 2016-02-01 Jakub Jelinek <jakub@redhat.com>
4219 PR preprocessor/69543
4221 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4222 instead of loc to control_warning_option.
4224 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4226 * c.opt (fopenacc-dim=): New option.
4228 2016-01-27 Ryan Burn <contact@rnburn.com>
4231 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4232 gimplify_arg. Removed superfluous post_p argument.
4233 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4234 superfluous post_p argument.
4235 * c-gimplify.c (c_gimplify_expr): Likewise.
4237 2016-01-26 David Malcolm <dmalcolm@redhat.com>
4240 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4241 pp_newline_and_flush with pp_flush.
4243 2016-01-20 Martin Sebor <msebor@redhat.com>
4246 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4247 an incompatible argument when the argument isn't a valid tree node.
4249 2016-01-18 Jason Merrill <jason@redhat.com>
4252 * c-common.c (check_function_arguments_recurse): Fold the whole
4253 COND_EXPR, not just the condition.
4255 2016-01-18 Tom de Vries <tom@codesourcery.com>
4257 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4258 classify as loop clause.
4260 2016-01-15 Jakub Jelinek <jakub@redhat.com>
4263 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4264 C++ FE no longer has limit on number of pragmas.
4266 2015-01-14 Ryan Burn <contact@rnburn.com>
4269 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
4270 to add missing cleanup point.
4272 2016-01-14 David Malcolm <dmalcolm@redhat.com>
4275 * c-indentation.c (get_visual_column): Add location_t param.
4276 Handle the column number being zero by effectively disabling the
4277 warning, with an "inform".
4278 (should_warn_for_misleading_indentation): Add location_t argument
4279 for all uses of get_visual_column.
4281 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4284 * c-indentation.c (should_warn_for_misleading_indentation):
4285 Don't warn about do-while statements.
4287 2016-01-07 Martin Sebor <msebor@redhat.com>
4290 * c-common.c (sync_resolve_size): Reject first argument when it's
4293 2016-01-05 David Malcolm <dmalcolm@redhat.com>
4296 * c-indentation.c (get_visual_column): Remove default argument.
4297 (should_warn_for_misleading_indentation): For the multiline case,
4298 update call to get_visual_column for next_stmt_exploc so that it
4299 captures the location of the first non-whitespace character in the
4300 relevant line. Don't issue warnings if there is non-whitespace
4301 before the next statement.
4303 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4305 Update copyright years.
4307 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4309 * c-common.c (binary_op_error): Convert first param from
4310 location_t to rich_location * and use it when emitting an error.
4311 * c-common.h (binary_op_error): Convert first param from
4312 location_t to rich_location *.
4314 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4316 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4317 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4319 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4321 * c-common.c (c_common_attribute_table): Handle "omp declare target
4324 2015-12-14 Jakub Jelinek <jakub@redhat.com>
4327 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4329 2014-12-12 Tobias Burnus <burnus@net-b.de>
4332 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4333 specifiers (%d, %i,%u and %c).
4335 2015-12-10 David Malcolm <dmalcolm@redhat.com>
4337 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4339 2015-12-08 Jakub Jelinek <jakub@redhat.com>
4343 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4344 * c-pragma.c (handle_pragma_diagnostic): Adjust
4345 control_warning_option caller.
4347 2015-12-07 David Malcolm <dmalcolm@redhat.com>
4349 * c-common.c (c_cpp_error): Update for change to
4350 rich_location::set_range.
4352 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
4354 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4355 shifting 1 out of the sign bit.
4357 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4359 * c-common.c (c_common_attribute_table[]): Update max arguments
4360 count for "simd" attribute.
4361 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4363 2015-12-03 Jakub Jelinek <jakub@redhat.com>
4365 PR preprocessor/57580
4366 * c-ppoutput.c (print): Change printed field to bool.
4367 Move src_file last for smaller padding.
4368 (init_pp_output): Set print.printed to false instead of 0.
4369 (scan_translation_unit): Fix up formatting. Set print.printed
4370 to true after printing something other than newline.
4371 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4372 (maybe_print_line_1): Set print.printed to false instead of 0.
4373 (print_line_1): Likewise.
4374 (do_line_change): Set print.printed to true instead of 1.
4375 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4376 dump_macro): Set print.printed to false after printing newline.
4378 2015-12-02 Jason Merrill <jason@redhat.com>
4380 * c-common.c (fold_for_warn): New.
4381 (warn_logical_operator, warn_tautological_cmp)
4382 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4384 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4385 (c_fully_fold_internal, decl_constant_value_for_optimization):
4387 * c-common.h: Don't declare decl_constant_value_for_optimization.
4389 2015-12-02 Joseph Myers <joseph@codesourcery.com>
4392 * c-common.h (c_build_qualified_type): Add extra default
4395 2015-12-01 Julian Brown <julian@codesourcery.com>
4396 Cesar Philippidis <cesar@codesourcery.com>
4397 James Norris <James_Norris@mentor.com>
4399 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4400 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4401 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4403 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4405 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4406 (decl_sloc_common): Delete and move bulk of processing to...
4407 (decl_sloc): ...here.
4408 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4409 (dump_ada_double_name): Remove S parameter and compute the suffix.
4410 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4411 element type and deal with an anonymous one.
4412 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4413 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4414 and remove reference to QUAL_UNION_TYPE.
4415 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4416 (dump_nested_type): ...here. New function extracted from above.
4417 Generate a full declaration for anonymous element type of arrays.
4418 (print_ada_declaration): Really skip anonymous declarations. Remove
4419 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4420 Clean up processing of declarations of array types and objects.
4421 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4422 Remove obsolete code and tidy up.
4424 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4427 * c-common.c (handle_transparent_union_attribute): Update
4430 2015-11-27 Martin Liska <mliska@suse.cz>
4433 * array-notation-common.c (cilkplus_extract_an_triplets):
4434 Release vector of vectors.
4435 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4437 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4440 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4441 (print_ada_struct_decl): Likewise.
4443 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4446 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4447 * cilk.c (recognize_spawn): Determine location in a more precise
4450 2015-11-19 Jason Merrill <jason@redhat.com>
4452 * c-common.c (shorten_compare): But look through macros from
4455 2015-11-18 Jason Merrill <jason@redhat.com>
4457 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4458 non-constant operand comes from a macro.
4460 2015-11-17 Jason Merrill <jason@redhat.com>
4463 * c-common.c (warn_tautological_cmp): Fold before checking for
4466 2015-11-16 Marek Polacek <polacek@redhat.com>
4469 * c-common.c (check_case_bounds): Fold low and high cases.
4471 2015-11-16 Marek Polacek <polacek@redhat.com>
4473 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4474 * c-common.c (c_common_get_alias_set): Likewise.
4475 (handle_visibility_attribute): Likewise.
4477 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4479 * c-common.c (handle_simd_attribute): New.
4480 (struct attribute_spec): Add entry for "simd".
4481 (handle_simd_attribute): New.
4483 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
4485 * c-lex.c (interpret_float): Use fold_convert.
4487 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4489 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4490 and store it on the result.
4491 * c-opts.c (c_common_init_options): Set
4492 global_dc->colorize_source_p.
4494 2015-11-12 James Norris <jnorris@codesourcery.com>
4495 Joseph Myers <joseph@codesourcery.com>
4497 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
4498 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4499 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4500 PRAGMA_OACC_CLAUSE_LINK.
4502 2015-11-11 Marek Polacek <polacek@redhat.com>
4506 * c-common.c (valid_array_size_p): New function.
4507 * c-common.h (valid_array_size_p): Declare.
4509 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4512 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4514 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4516 * array-notation-common.c: Remove unused header files.
4517 * c-ada-spec.c: Likewise.
4518 * c-cilkplus.c: Likewise.
4519 * c-common.c: Likewise.
4520 * c-cppbuiltin.c: Likewise.
4521 * c-dump.c: Likewise.
4522 * c-format.c: Likewise.
4523 * c-gimplify.c: Likewise.
4524 * c-indentation.c: Likewise.
4525 * c-lex.c: Likewise.
4526 * c-omp.c: Likewise.
4527 * c-opts.c: Likewise.
4528 * c-pch.c: Likewise.
4529 * c-ppoutput.c: Likewise.
4530 * c-pragma.c: Likewise.
4531 * c-pretty-print.c: Likewise.
4532 * c-semantics.c: Likewise.
4533 * c-ubsan.c: Likewise.
4535 * stub-objc.c: Likewise.
4537 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4538 Cesar Philippidis <cesar@codesourcery.com>
4539 James Norris <jnorris@codesourcery.com>
4540 Julian Brown <julian@codesourcery.com>
4541 Nathan Sidwell <nathan@codesourcery.com>
4543 * c-pragma.c (oacc_pragmas): Add "routine".
4544 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4546 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4548 * c-common.c (c_common_attributes): Add scalar_storage_order.
4549 (handle_scalar_storage_order_attribute): New function.
4550 * c-pragma.c (global_sso): New variable.
4551 (maybe_apply_pragma_scalar_storage_order): New function.
4552 (handle_pragma_scalar_storage_order): Likewise.
4553 (init_pragma): Register scalar_storage_order.
4554 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4555 * c.opt (Wscalar-storage-order): New warning.
4556 (fsso-struct=): New option.
4558 2015-11-08 Martin Sebor <msebor@redhat.com>
4560 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4562 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4564 * c-common.c: Don't undef DEF_BUILTIN.
4566 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4568 * c-common.c (c_cpp_error): Convert parameter from location_t to
4569 rich_location *. Eliminate the "column_override" parameter and
4570 the call to diagnostic_override_column.
4571 Update the "done_lexing" clause to set range 0
4572 on the rich_location, rather than overwriting a location_t.
4573 * c-common.h (c_cpp_error): Convert parameter from location_t to
4574 rich_location *. Eliminate the "column_override" parameter.
4576 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4577 Thomas Schwinge <thomas@codesourcery.com>
4578 James Norris <jnorris@codesourcery.com>
4580 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4581 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4582 clauses with parallel and kernels and loops.
4583 * c-pragma.h (enum pragma_omp_clause): Add entries for
4584 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4585 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4586 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4588 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4590 2015-11-05 Martin Sebor <msebor@redhat.com>
4593 * c.opt (-Wplacement-new): New option.
4595 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4597 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4598 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4599 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4600 save_expr or create_tmp_var* if TEST is true.
4601 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4602 Don't call add_stmt here.
4603 (struct c_omp_check_loop_iv_data): New type.
4604 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4605 c_omp_check_loop_iv_exprs): New functions.
4606 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4608 (c_omp_declare_simd_clauses_to_numbers): Change
4609 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4610 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4611 from numbers to PARM_DECLs.
4613 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4615 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4618 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
4621 * c-common.h (fold_offsetof_1): Add argument.
4622 * c-common.c (fold_offsetof_1): Diagnose more invalid
4623 offsetof expressions that reference elements past the end of
4626 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4627 Chung-Lin Tang <cltang@codesourcery.com>
4629 * c-pragma.c (oacc_pragmas): Add "atomic".
4630 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4632 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4634 * c-common.c (handle_target_clones_attribute): New.
4635 (c_common_attribute_table): Add handle_target_clones_attribute.
4636 (handle_always_inline_attribute): Add check on target_clones attribute.
4637 (handle_target_attribute): Ditto.
4639 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4641 * array-notation-common.c: Reorder #include's and remove duplicates.
4642 * c-ada-spec.c: Likewise.
4643 * c-cilkplus.c: Likewise.
4644 * c-common.c: Likewise.
4645 * c-cppbuiltin.c: Likewise.
4646 * c-dump.c: Likewise.
4647 * c-format.c: Likewise.
4648 * c-gimplify.c: Likewise.
4649 * c-indentation.c: Likewise.
4650 * c-lex.c: Likewise.
4651 * c-omp.c: Likewise.
4652 * c-opts.c: Likewise.
4653 * c-pch.c: Likewise.
4654 * c-ppoutput.c: Likewise.
4655 * c-pragma.c: Likewise.
4656 * c-pretty-print.c: Likewise.
4657 * c-semantics.c: Likewise.
4658 * c-ubsan.c: Likewise.
4660 * stub-objc.c: Likewise.
4662 2015-10-28 Jason Merrill <jason@redhat.com>
4664 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4666 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4667 James Norris <jnorris@codesourcery.com>
4668 Cesar Philippidis <cesar@codesourcery.com>
4672 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4673 * c-omp.c (c_oacc_split_loop_clauses): New function.
4675 2015-10-21 Martin Sebor <msebor@redhat.com>
4678 * c.opt: End each sentence that describes an option with a period.
4680 2015-10-20 Marek Polacek <polacek@redhat.com>
4682 * array-notation-common.c (is_cilkplus_vector_p): Define.
4683 * c-common.h (is_cilkplus_vector_p): Declare.
4685 2015-10-20 Marek Polacek <polacek@redhat.com>
4687 * c.opt (std=gnu++11): Do not describe as experimental.
4688 (std=gnu++14): Likewise.
4690 2015-10-19 Jason Merrill <jason@redhat.com>
4692 * c-cppbuiltin.c (c_cpp_builtins): Define
4693 __cpp_nontype_template_args.
4695 2015-10-19 Jason Merrill <jason@redhat.com>
4697 * c-cppbuiltin.c (c_cpp_builtins): Define
4698 __cpp_enumerator_attributes, __cpp_fold_expressions,
4699 __cpp_unicode_characters.
4701 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4702 Aldy Hernandez <aldyh@redhat.com>
4704 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4705 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4706 (c_define_builtins): Likewise.
4707 * c-common.h (enum c_omp_clause_split): Add
4708 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4709 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4710 (c_finish_omp_for): Add ORIG_DECLV argument.
4711 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4712 201511 instead of 201307.
4713 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4714 OMP_CRITICAL_CLAUSES to it.
4715 (c_finish_omp_ordered): Add CLAUSES argument, set
4716 OMP_ORDERED_CLAUSES to it.
4717 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4718 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4719 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4720 constructs and new OpenMP 4.5 clauses. Clear
4721 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4723 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4724 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4725 (enum pragma_omp_clause): Add
4726 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4727 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4729 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4731 * c-lex.c (interpret_float): Use real_equal instead of
4734 2015-10-04 Jason Merrill <jason@redhat.com>
4736 Implement N4514, C++ Extensions for Transactional Memory.
4737 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4738 (c_common_attribute_table): Add transaction_safe_dynamic.
4739 transaction_safe now affects type identity.
4740 (handle_tm_attribute): Handle transaction_safe_dynamic.
4741 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4742 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4743 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4745 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4746 * c-pretty-print.c (pp_c_attributes_display): Don't print
4747 transaction_safe in C++.
4749 2015-10-02 Marek Polacek <polacek@redhat.com>
4751 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4753 2015-10-02 Marek Polacek <polacek@redhat.com>
4756 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4757 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4758 * c.opt (Wduplicated-cond): New option.
4760 2015-10-01 Joseph Myers <joseph@codesourcery.com>
4762 * c.opt (std=c11): Do not describe as experimental.
4763 (std=gnu11): Likewise.
4764 (std=iso9899:2011): Likewise.
4766 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4768 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4769 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4771 2015-09-25 Marek Polacek <polacek@redhat.com>
4773 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4774 (ubsan_instrument_shift): Likewise.
4776 2015-09-25 Marek Polacek <polacek@redhat.com>
4779 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4781 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4783 * c-indentation.c (should_warn_for_misleading_indentation):
4784 Compare next_stmt_vis_column with guard_line_first_nws instead
4785 of with guard_line_vis_column.
4787 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4791 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4792 options and options not valid for the current language.
4794 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4796 * c-indentation.c (should_warn_for_misleading_indentation):
4797 Float out and consolidate the calls to get_visual_column that
4798 are passed guard_exploc as an argument. Compare
4799 next_stmt_vis_column with guard_line_first_nws instead of with
4800 body_line_first_nws.
4802 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4804 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4805 Wnamespaces): New C++ warnings.
4807 2015-09-22 Jason Merrill <jason@redhat.com>
4809 * c-common.h (abi_compat_version_crosses): New.
4810 (warn_abi_version): Declare.
4811 * c-common.c: Define it.
4812 * c-opts.c (c_common_post_options): Handle it.
4813 flag_abi_compat_version defaults to 8.
4815 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4817 Complete the implementation of N4230, Nested namespace definition.
4818 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4819 __cpp_nested_namespace_definitions.
4821 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4823 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4825 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4827 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4829 * c-pragma.h (pragma_lex): Add optional loc argument.
4831 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4833 * c-format.c (check_format_arg): Adjust to use common block size in all
4836 2015-09-15 David Malcolm <dmalcolm@redhat.com>
4838 * c-format.c (location_from_offset): Update for change in
4839 signature of location_get_source_line.
4840 * c-indentation.c (get_visual_column): Likewise.
4841 (line_contains_hash_if): Likewise.
4843 2015-09-14 Marek Polacek <polacek@redhat.com>
4845 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4846 setting various warnings.
4848 2015-09-14 Marek Polacek <polacek@redhat.com>
4850 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4853 2015-09-11 Mark Wielaard <mjw@redhat.com>
4856 * c.opt (Wunused-variable): Option from common.opt.
4857 (Wunused-const-variable): New option.
4859 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4862 * c.opt ([Wsubobject-linkage]): Add.
4864 2015-09-03 Martin Sebor <msebor@redhat.com>
4867 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4869 * c-common.c (reject_gcc_builtin): Define.
4871 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4874 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4876 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4877 cilk_gimplify_call_params_in_spawned_fn.
4878 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4879 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4882 2015-08-25 Marek Polacek <polacek@redhat.com>
4885 * c-common.c (handle_weak_attribute): Don't check whether the
4886 visibility can be changed here.
4888 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4890 * c-lex.c (c_lex_with_flags): Use explicit locations.
4892 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4894 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4895 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4897 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4900 * c-common.c (check_builtin_function_arguments): Add check
4901 for BUILT_IN_SIGNBIT argument.
4903 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4906 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4909 2015-08-17 Marek Polacek <polacek@redhat.com>
4911 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4912 with whitespaces before qualifier names.
4914 2015-08-12 Marek Polacek <polacek@redhat.com>
4917 * c-common.c (maybe_warn_shift_overflow): Properly handle
4918 left-shifting 1 into the sign bit.
4920 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4922 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4924 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4925 Braden Obrzut <admin@maniacsvault.net>
4926 Jason Merrill <jason@redhat.com>
4928 Add C++ Concepts TS support.
4929 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4930 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4931 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4932 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4933 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4934 * c.opt (fconcepts): New.
4936 2015-08-02 Martin Sebor <msebor@redhat.com>
4938 * c.opt (-Wframe-address): New warning option.
4940 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4942 * c-indentation.c (should_warn_for_misleading_indentation):
4945 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4947 * c-indentation.c (get_visual_column): Add parameter first_nws,
4948 use it. Update comment documenting the function.
4949 (is_first_nonwhitespace_on_line): Remove.
4950 (should_warn_for_misleading_indentation): Replace usage of
4951 of is_first_nonwhitespace_on_line with get_visual_column.
4953 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4955 * c-indentation.h (struct token_indent_info): Define.
4956 (get_token_indent_info): Define.
4957 (warn_for_misleading_information): Declare.
4958 * c-common.h (warn_for_misleading_information): Remove.
4959 * c-identation.c (warn_for_misleading_indentation):
4960 Change declaration to take three token_indent_infos. Adjust
4962 * c-identation.c (should_warn_for_misleading_indentation):
4963 Likewise. Bail out early if the body is a compound statement.
4964 (guard_tinfo_to_string): Define.
4966 2015-07-30 Jason Merrill <jason@redhat.com>
4968 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4969 '*' for reference decay.
4971 2015-07-30 Marek Polacek <polacek@redhat.com>
4973 * c-common.c (warn_tautological_cmp): Bail for float types.
4975 2015-07-27 Marek Polacek <polacek@redhat.com>
4978 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4980 2015-07-27 Marek Polacek <polacek@redhat.com>
4984 * c-common.c (find_array_ref_with_const_idx_r): New function.
4985 (warn_tautological_cmp): New function.
4986 * c-common.h (warn_tautological_cmp): Declare.
4987 * c.opt (Wtautological-compare): New option.
4989 2015-07-23 Marek Polacek <polacek@redhat.com>
4991 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4992 (ubsan_instrument_shift): Likewise.
4994 2015-07-23 Marek Polacek <polacek@redhat.com>
4997 * c-ubsan.c: Include gimplify.h.
4998 (ubsan_instrument_division): Unshare OP0 and OP1.
4999 (ubsan_instrument_shift): Likewise.
5001 2015-07-20 Marek Polacek <polacek@redhat.com>
5002 Richard Sandiford <richard.sandiford@arm.com>
5005 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5006 Use EXPR_LOC_OR_LOC.
5007 (maybe_warn_shift_overflow): New function.
5008 * c-common.h (maybe_warn_shift_overflow): Declare.
5009 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5010 * c.opt (Wshift-overflow): New option.
5012 2015-07-16 Martin Liska <mliska@suse.cz>
5014 * c-format.c (static void check_format_info_main): Use
5015 object_allocator instead of pool_allocator.
5016 (check_format_arg): Likewise.
5017 (check_format_info_main): Likewise.
5019 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
5021 * c-opts.c: Remove multiline #include comment.
5023 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
5025 * c-common.c: Fix double word typos.
5027 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5029 * c-ada-spec.h (cpp_operation): Revert latest change.
5030 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5031 constructors and destructors.
5033 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5035 * c-common.h: Adjust includes for flags.h changes.
5036 * stub-objc.c: Likewise.
5038 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5040 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5041 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5043 2015-07-08 Jakub Jelinek <jakub@redhat.com>
5045 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5046 are to be removed, return NULL rather than original clauses list.
5048 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5050 * array-notation-common.c: Adjust includes.
5051 * c-ada-spec.c: Likewise.
5052 * c-cilkplus.c: Likewise.
5053 * c-common.h: Likewise.
5054 * c-cppbuiltin.c: Likewise.
5055 * c-dump.c: Likewise.
5056 * c-format.c: Likewise.
5057 * c-gimplify.c: Likewise.
5058 * c-indentation.c: Likewise.
5059 * c-lex.c: Likewise.
5060 * c-omp.c: Likewise.
5061 * c-opts.c: Likewise.
5062 * c-pch.c: Likewise.
5063 * c-ppoutput.c: Likewise.
5064 * c-pragma.c: Likewise.
5065 * c-pretty-print.c: Likewise.
5066 * c-semantics.c: Likewise.
5067 * c-ubsan.c: Likewise.
5069 * stub-objc.c: Likewise.
5071 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5073 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5074 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5076 2015-07-01 Jason Merrill <jason@redhat.com>
5078 * c-common.h (D_CXX11): Rename from D_CXX0X.
5079 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5080 * c-common.c: Adjust.
5082 * c-opts.c (c_common_post_options): Default to C++14.
5084 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5086 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5088 Implement N4197 - Adding u8 character literals
5089 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
5091 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
5092 CPP_UTF8CHAR_USERDEF tokens.
5093 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
5094 and CPP_UTF8CHAR tokens.
5095 (lex_charconst): Treat CPP_UTF8CHAR token.
5097 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5100 * c-common.c (do_warn_unused_parameter): Move here.
5101 * c-common.h (do_warn_unused_parameter): Declare.
5103 2015-06-29 Marek Polacek <polacek@redhat.com>
5106 * c-common.c (check_case_bounds): Add bool * parameter. Set
5108 (c_add_case_label): Add bool * parameter. Pass it down to
5110 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5112 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5115 2015-06-27 Marek Polacek <polacek@redhat.com>
5117 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5118 or VECTOR_INTEGER_TYPE_P throughout.
5119 * c-gimplify.c: Likewise.
5121 2015-06-26 Marek Polacek <polacek@redhat.com>
5123 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5124 * c-common.c (c_fully_fold_internal): Likewise.
5125 (c_alignof_expr): Likewise.
5126 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5127 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
5128 * cilk.c (create_parm_list): Likewise.
5130 2015-06-26 Marek Polacek <polacek@redhat.com>
5132 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5134 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5136 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5137 * c-gimplify.c: Likewise.
5138 * c-pragma.c: Likewise.
5139 * c-ubsan.c: Likewise.
5142 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5144 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5147 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5149 * cilk.c: Move calls.h after tm.h in the include chain.
5151 2015-06-25 Marek Polacek <polacek@redhat.com>
5153 * array-notation-common.c: Use VAR_P throughout.
5154 * c-ada-spec.c: Likewise.
5155 * c-common.c: Likewise.
5156 * c-format.c: Likewise.
5157 * c-gimplify.c: Likewise.
5158 * c-omp.c: Likewise.
5159 * c-pragma.c: Likewise.
5160 * c-pretty-print.c: Likewise.
5163 2015-06-25 Marek Polacek <polacek@redhat.com>
5165 * cilk.c (extract_free_variables): Use is_global_var.
5167 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5169 * c-common.c: Don't include target-def.h.
5171 2015-06-23 Marek Polacek <polacek@redhat.com>
5173 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5174 when comparing INTEGER_CSTs.
5176 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5178 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5179 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5180 (dump_ada_template): Skip partially specialized types.
5182 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5184 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5187 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5189 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5190 * c-ada-spec.c: Likewise.
5191 * c-cilkplus.c: Likewise.
5192 * c-common.c: Likewise.
5193 * c-common.h: Likewise.
5194 * c-cppbuiltin.c: Likewise.
5195 * c-dump.c: Likewise.
5196 * c-format.c: Likewise.
5197 * c-gimplify.c: Likewise.
5198 * c-indentation.c: Likewise.
5199 * c-lex.c: Likewise.
5200 * c-omp.c: Likewise.
5201 * c-opts.c: Likewise.
5202 * c-pch.c: Likewise.
5203 * c-ppoutput.c: Likewise.
5204 * c-pragma.c: Likewise.
5205 * c-pretty-print.c: Likewise.
5206 * c-semantics.c: Likewise.
5207 * c-ubsan.c: Likewise.
5209 * stub-objc.c: Likewise.
5211 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5214 * c-common.c (c_common_truthvalue_conversion): Warn when
5215 converting an address of a reference to a truth value.
5217 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5219 * array-notation-common.c : Adjust include files.
5220 * c-ada-spec.c : Likewise.
5221 * c-cilkplus.c : Likewise.
5222 * c-common.c : Likewise.
5223 * c-common.h : Likewise.
5224 * c-cppbuiltin.c : Likewise.
5225 * c-dump.c : Likewise.
5226 * c-format.c : Likewise.
5227 * c-gimplify.c : Likewise.
5228 * c-indentation.c : Likewise.
5229 * c-lex.c : Likewise.
5230 * c-omp.c : Likewise.
5231 * c-opts.c : Likewise.
5232 * c-pch.c : Likewise.
5233 * c-ppoutput.c : Likewise.
5234 * c-pragma.c : Likewise.
5235 * c-pretty-print.c : Likewise.
5236 * c-semantics.c : Likewise.
5237 * c-ubsan.c : Likewise.
5238 * cilk.c : Likewise.
5239 * stub-objc.c : Likewise.
5241 2015-06-08 Marek Polacek <polacek@redhat.com>
5244 * c-format.c (location_from_offset): Return LOC if LINE is null.
5246 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5248 * c-common.h (c_parse_final_cleanups): New prototype.
5249 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5251 2015-06-04 Sriraman Tallam <tmsriram@google.com>
5253 * c-common.c (noplt): New attribute.
5254 (handle_noplt_attribute): New handler.
5256 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5258 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5259 * c-ada-spec.c: Likewise.
5260 * c-cilkplus.c: Likewise.
5261 * c-common.c: Likewise.
5262 * c-common.h: Likewise.
5263 * c-cppbuiltin.c: Likewise.
5264 * c-dump.c: Likewise.
5265 * c-format.c: Likewise.
5266 * c-gimplify.c: Likewise.
5267 * c-indentation.c: Likewise.
5268 * c-lex.c: Likewise.
5269 * c-omp.c: Likewise.
5270 * c-opts.c: Likewise.
5271 * c-pch.c: Likewise.
5272 * c-ppoutput.c: Likewise.
5273 * c-pragma.c: Likewise.
5274 * c-pretty-print.c: Likewise.
5275 * c-semantics.c: Likewise.
5276 * c-ubsan.c: Likewise.
5278 * stub-objc.c: Likewise.
5280 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5283 * c-indentation.c (should_warn_for_misleading_indentation): Use
5284 expand_location rather than expand_location_to_spelling_point.
5285 Don't warn if the guarding statement is more indented than the
5288 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5290 * c-indentation.c (warn_for_misleading_indentation): Bail out
5291 immediately if -Wmisleading-indentation isn't enabled.
5293 2015-06-01 Martin Liska <mliska@suse.cz>
5295 * c-format.c (check_format_arg):Use new type-based pool allocator.
5296 (check_format_info_main) Likewise.
5298 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5300 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5301 (has_nontrivial_methods): Likewise.
5303 2015-05-25 Marek Polacek <polacek@redhat.com>
5305 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5307 2015-05-22 Marek Polacek <polacek@redhat.com>
5310 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5312 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5314 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5315 STACK_GROWS_DOWNWARD.
5317 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5319 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5320 STACK_GROWS_DOWNWARD rather than if it is defined.
5322 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5325 * c-format.c (location_column_from_byte_offset): New.
5326 (location_from_offset): New.
5327 (struct format_wanted_type): Add offset_loc field.
5328 (check_format_info): Move handling of location for extra arguments
5329 closer to the point of warning.
5330 (check_format_info_main): Pass the result of location_from_offset
5332 (format_type_warning): Pass the result of location_from_offset
5335 2015-05-20 Marek Polacek <polacek@redhat.com>
5337 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5339 2015-05-20 Marek Polacek <polacek@redhat.com>
5341 * c-ada-spec.c (dump_sloc): Use DECL_P.
5343 2015-05-20 Marek Polacek <polacek@redhat.com>
5345 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5346 * c-common.c: Likewise.
5348 2015-05-19 David Malcolm <dmalcolm@redhat.com>
5350 * c-common.h (fe_file_change): Strengthen param from
5351 const line_map * to const line_map_ordinary *.
5352 (pp_file_change): Likewise.
5353 * c-lex.c (fe_file_change): Likewise.
5354 (cb_define): Use linemap_check_ordinary when invoking
5356 (cb_undef): Likewise.
5357 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5358 invoking cb_file_change.
5359 (c_finish_options): Likewise.
5360 (push_command_line_include): Likewise.
5361 (cb_file_change): Strengthen param "new_map" from
5362 const line_map * to const line_map_ordinary *.
5363 * c-ppoutput.c (cb_define): Likewise for local "map".
5364 (pp_file_change): Likewise for param "map" and local "from".
5366 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5368 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5370 2015-05-18 Tom de Vries <tom@codesourcery.com>
5372 * c-common.c (build_va_arg_1): New function.
5373 (build_va_arg): Add address operator to va_list operand if necessary.
5375 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5378 * c-common.c (int_safely_convertible_to_real_p): Define.
5379 (unsafe_conversion_p): Check conversions involving complex types.
5380 (conversion_warning): Add new warning message for conversions which
5381 discard imaginary component.
5382 * c-common.h: (enum conversion_safety): Add new enumerator for such
5385 2015-05-14 Marek Polacek <polacek@redhat.com>
5389 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5390 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5391 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5392 use it. If FOR_INT_CONST, require that all evaluated operands be
5395 2015-05-12 David Malcolm <dmalcolm@redhat.com>
5397 * c-common.h (warn_for_misleading_indentation): New prototype.
5398 * c-indentation.c: New file.
5399 * c.opt (Wmisleading-indentation): New option.
5401 2015-05-12 Tom de Vries <tom@codesourcery.com>
5403 PR tree-optimization/66010
5404 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5406 2015-05-09 Jason Merrill <jason@redhat.com>
5408 * c-opts.c (c_common_post_options): Also clear
5409 cpp_opts->cpp_warn_cxx11_compat.
5411 * c-common.h (enum cxx_dialect): Add cxx_unset.
5412 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5413 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5415 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5416 (std=gnu++0x): Mark as Undocumented.
5417 (std=gnu++1y): Add deprecated message.
5419 2015-05-08 Jason Merrill <jason@redhat.com>
5421 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5424 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5426 2015-05-08 Marek Polacek <polacek@redhat.com>
5429 * c.opt (Woverride-init-side-effects): New option.
5431 2015-05-07 Marek Polacek <polacek@redhat.com>
5434 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5436 * c.opt (Wshift-negative-value): New option.
5437 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5438 when -Wextra and C99/C++11 mode.
5440 2015-05-07 Marek Polacek <polacek@redhat.com>
5441 Martin Uecker <uecker@eecs.berkeley.edu>
5443 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5444 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5446 2015-05-05 Jason Merrill <jason@redhat.com>
5448 * c.opt (Wterminate): New.
5450 2015-04-30 Marek Polacek <polacek@redhat.com>
5452 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5453 require that the non-constant be of a boolean type.
5455 2015-04-29 Josh Triplett <josh@joshtriplett.org>
5457 * c-common.c (handle_section_attribute): Refactor to reduce
5458 nesting and distinguish between error cases.
5460 2015-04-29 Marek Polacek <polacek@redhat.com>
5463 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5466 2015-04-29 Jakub Jelinek <jakub@redhat.com>
5468 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5469 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5470 HOST_BITS_PER_WIDE_INT.
5472 2015-04-28 Tom de Vries <tom@codesourcery.com>
5474 PR tree-optimization/65887
5475 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5477 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
5478 Pierre-Marie de Rodat <derodat@adacore.com>
5480 * c-ada-spec.c (in_function): Delete.
5481 (dump_generic_ada_node): Do not change in_function and remove the
5482 redundant code dealing with it.
5483 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5484 (print_ada_methods): Output the static member functions in a nested
5485 package after the regular methods as well as associated renamings.
5487 2015-04-24 Marek Polacek <polacek@redhat.com>
5490 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5491 and OPT_Wshift_count_overflow.
5494 * c-common.c (warn_logical_operator): Warn if the operands have the
5497 2015-04-24 Marek Polacek <polacek@redhat.com>
5500 * c-common.c (warn_logical_operator): Bail if either operand comes
5501 from a macro expansion.
5503 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5506 * c-common.c (c_default_pointer_mode): Add definition.
5507 * c-common.h (c_default_pointer_mode): Add declaration.
5509 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5511 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5512 on record_builtin_type argument.
5514 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5517 * c-common.c (warn_logical_not_parentheses): Don't warn for
5520 2015-03-07 Marek Polacek <polacek@redhat.com>
5523 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5524 before trying to figure out whether we have a flexible array member.
5526 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
5527 Jonathan Wakely <jwakely.gcc@gmail.com>
5529 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5531 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5534 * c-ada-spec.c (print_destructor): Remove obsolete code.
5536 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5538 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5539 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5540 DECL_TEMPLATE_RESULT emulations.
5541 (dump_ada_template)): Add guard for TYPE_METHODS.
5543 2015-02-27 Marek Polacek <polacek@redhat.com>
5546 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5548 2015-02-27 Kai Tietz <ktietz@redhat.com>
5551 * c-pragma.c (handle_pragma_weak): Do not try to create
5552 weak/alias of declarations not being function, or variable
5555 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5558 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5560 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5562 2015-02-16 Marek Polacek <polacek@redhat.com>
5565 * c-format.c (check_format_types): Handle null param.
5567 2015-02-13 Marek Polacek <polacek@redhat.com>
5570 * c-format.c (check_format_types): Don't warn about different
5571 signedness if the original value is in the range of WANTED_TYPE.
5573 2015-02-12 Jason Merrill <jason@redhat.com>
5576 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5577 to the current highest version.
5578 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5580 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5584 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5585 instead of RDIV_EXPR. Use build_binary_op instead of
5588 2015-01-30 Joseph Myers <joseph@codesourcery.com>
5590 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5591 to pass input_location as first argument.
5593 2015-01-23 Tom de Vries <tom@codesourcery.com>
5596 * c.opt (fopenacc): Mark as LTO option.
5598 2015-01-23 Tom de Vries <tom@codesourcery.com>
5601 * c.opt (fopenmp): Mark as LTO option.
5603 2015-01-21 Jakub Jelinek <jakub@redhat.com>
5606 * cilk.c (fill_decls_vec): Only put decls into vector v.
5607 (compare_decls): Fix up formatting.
5609 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5612 * cilk.c: Include vec.h.
5613 (struct cilk_decls): New structure.
5614 (wrapper_parm_cb): Split this function to...
5615 (fill_decls_vec): ...this...
5616 (create_parm_list): ...and this.
5617 (compare_decls): New function.
5618 (for_local_cb): Remove.
5619 (wrapper_local_cb): Ditto.
5620 (build_wrapper_type): For now first traverse and fill vector of
5621 declarations then sort it and then deal with sorted vector.
5622 (cilk_outline): Ditto.
5623 (declare_one_free_variable): Ditto.
5625 2015-01-21 Jason Merrill <jason@redhat.com>
5628 * c-format.c (check_format_arg): Call decl_constant_value.
5630 2015-01-19 Martin Liska <mliska@suse.cz>
5632 * c-common.c (handle_noicf_attribute): New function.
5634 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5635 Bernd Schmidt <bernds@codesourcery.com>
5636 James Norris <jnorris@codesourcery.com>
5637 Cesar Philippidis <cesar@codesourcery.com>
5638 Ilmir Usmanov <i.usmanov@samsung.com>
5639 Jakub Jelinek <jakub@redhat.com>
5641 * c.opt (fopenacc): New option.
5642 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5643 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5645 * c-common.h (c_finish_oacc_wait): New prototype.
5646 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5647 (c_finish_oacc_wait): New function.
5648 * c-pragma.c (oacc_pragmas): New variable.
5649 (c_pp_lookup_pragma, init_pragma): Handle it.
5650 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5651 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5652 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5653 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5654 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5655 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5656 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5657 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5658 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5659 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5660 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5661 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5662 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5663 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5664 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5665 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5666 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5667 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5668 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5669 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5670 PRAGMA_OACC_CLAUSE_WORKER.
5672 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5674 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5675 for the new option fstack-protector_explicit.
5676 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5677 (handle_stack_protect_attribute): New function.
5679 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
5681 * c.opt: New option -Warray-bounds=.
5683 2015-01-09 Michael Collison <michael.collison@linaro.org>
5685 * array-notation-common.c: Include hash-set.h, machmode.h,
5686 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5687 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5688 * c-ada-spec.c: Ditto.
5689 * c-cilkplus.c: Ditto.
5690 * c-common.c: Include input.h due to flattening of tree.h.
5691 Define macro GCC_C_COMMON_C.
5692 * c-common.h: Flatten tree.h header files into c-common.h.
5693 Remove include of tree-core.h.
5694 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5695 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5696 fold-const.h, wide-int.h, and inchash.h due to
5697 flattening of tree.h.
5699 * c-format.c: Flatten tree.h header files into c-common.h.
5700 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5701 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5702 fold-const.h, wide-int.h, and inchash.h due to
5703 flattening of tree.h.
5704 * c-dump.c: Include hash-set.h, machmode.h,
5705 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5706 fold-const.h, wide-int.h, and inchash.h due to
5707 flattening of tree.h.
5708 * c-format.c: Include hash-set.h, machmode.h,
5709 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5710 fold-const.h, wide-int.h, inchash.h and real.h due to
5711 flattening of tree.h.
5712 * c-gimplify.c: Include hash-set.h, machmode.h,
5713 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5714 fold-const.h, wide-int.h, and inchash.h due to
5715 flattening of tree.h.
5721 * c-ppoutput.c: Ditto.
5722 * c-pragma.c: Ditto.
5723 * c-pretty-print.c: Ditto.
5724 * c-semantics.c: Ditto.
5726 * stub-objc.c: Ditto.
5728 2015-01-08 Jason Merrill <jason@redhat.com>
5730 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5731 do_ubsan_in_current_function.
5732 (ubsan_maybe_instrument_reference_or_call): Likewise.
5733 * c-ubsan.h: Declare it.
5735 2015-01-08 Mike Stump <mikestump@comcast.net>
5737 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5739 2015-01-07 Marek Polacek <polacek@redhat.com>
5742 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5743 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5745 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5748 * c.opt (Wsuggest-override): New option.
5750 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5752 Update copyright years.
5754 2015-01-05 Marek Polacek <polacek@redhat.com>
5757 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5759 * c-common.h (warn_array_subscript_with_type_char): Update
5762 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5764 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5765 Control macro with flag_sized_deallocation.
5767 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5769 * c.opt (Wdiscarded-array-qualifiers): New option.
5771 2014-12-19 Jakub Jelinek <jakub@redhat.com>
5773 PR preprocessor/63831
5774 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5775 and __has_cpp_attribute here.
5776 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5777 c_common_has_attribute.
5778 * c-common.h (c_common_has_attribute): New prototype.
5779 * c-lex.c (init_c_lex): Set cb->has_attribute to
5780 c_common_has_attribute instead of cb_has_attribute.
5781 (get_token_no_padding): New function.
5782 (cb_has_attribute): Renamed to ...
5783 (c_common_has_attribute): ... this. No longer static. Use
5784 get_token_no_padding, require ()s, don't build TREE_LIST
5785 unnecessarily, fix up formatting, adjust diagnostics, call
5788 2014-12-15 Jason Merrill <jason@redhat.com>
5790 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5791 (-Wsized-deallocation): New.
5792 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5793 to on in C++14 and up.
5795 2014-12-11 Jason Merrill <jason@redhat.com>
5797 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5799 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5800 we aren't complaining about VLAs.
5802 2014-12-06 Marek Polacek <polacek@redhat.com>
5804 PR tree-optimization/64183
5805 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5806 shift-expression if it is integer_type_node. Use types_compatible_p.
5808 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5810 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5811 last argument from create_tmp_var_raw and create_tmp_var calls.
5812 * cilk.c (gimplify_cilk_spawn): Likewise.
5813 * c-omp.c (c_finish_omp_atomic): Likewise.
5815 2014-11-28 Marek Polacek <polacek@redhat.com>
5817 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5818 instead of unsigned_type_node.
5820 2014-11-28 Marek Polacek <polacek@redhat.com>
5823 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5825 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5826 expression to unsigned_type_node.
5828 2014-11-20 Mark Wielaard <mjw@redhat.com>
5831 * c-opts.c (set_std_c89): Set lang_hooks.name.
5832 (set_std_c99): Likewise.
5833 (set_std_c11): Likewise.
5834 (set_std_cxx98): Likewise.
5835 (set_std_cxx11): Likewise.
5836 (set_std_cxx14): Likewise.
5837 (set_std_cxx1z): Likewise.
5839 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5842 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5843 return type to bool.
5844 * c-common.c: Include gimple-expr.h.
5845 (convert_vector_to_pointer_for_subscript): Change return type to
5846 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5847 and copy it into a TARGET_EXPR and use that instead of *vecp
5850 2014-11-19 David Malcolm <dmalcolm@redhat.com>
5852 Merger of git branch "gimple-classes-v2-option-3".
5853 * ChangeLog.gimple-classes: New.
5854 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5855 from being just a vec<gimple> to a vec<gbind *>.
5857 2014-11-18 Jakub Jelinek <jakub@redhat.com>
5860 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5861 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5862 get_pointer_alignment for non-pointers. Use ptype, or if it is
5863 reference type, corresponding pointer type, as type of kind
5865 (ubsan_maybe_instrument_reference,
5866 ubsan_maybe_instrument_member_call): Adjust callers.
5868 2014-11-15 Marek Polacek <polacek@redhat.com>
5871 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5873 (extract_array_notation_exprs): Return for NULL node.
5875 2014-11-12 Joseph Myers <joseph@codesourcery.com>
5877 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5878 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5880 2014-11-12 Jakub Jelinek <jakub@redhat.com>
5883 * c-common.c (check_builtin_function_arguments): Handle
5884 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5886 2014-11-10 Andi Kleen <ak@linux.intel.com>
5889 * c-common.h (check_no_cilk): Declare.
5890 * cilk.c (get_error_location): New function.
5891 (check_no_cilk): Dito.
5893 2014-11-10 Andi Kleen <ak@linux.intel.com>
5895 * cilk.c (recognize_spawn): Use expression location
5898 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5900 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5902 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5904 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5905 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5906 (__cpp_range_based_for, __cpp_initializer_lists,
5907 __cpp_delegating_constructors, __cpp_nsdmi,
5908 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5909 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5910 __has_cpp_attribute.
5911 * c-lex.c (cb_has_attribute): New callback CPP function;
5912 (init_c_lex): Set has_attribute callback.
5914 2014-11-04 Richard Biener <rguenther@suse.de>
5916 * c-common.c (shorten_compare): Do not shorten mixed
5917 DFP and non-DFP compares.
5919 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5921 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5922 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5923 Commentary and rearrangement of tests.
5924 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5925 Commentary and rearrangement of tests.
5926 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
5927 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5929 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5931 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5932 enum from machine_mode.
5934 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5936 * c-common.c: Adjust include files.
5937 * c-gimplify.c: Ditto.
5939 * c-pragma.c: Ditto.
5942 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5944 * c-gimplify.c: Adjust include files.
5946 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5949 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5950 c_common_initialize_diagnostics.
5951 * c-common.h: Likewise.
5953 2014-10-24 Marek Polacek <polacek@redhat.com>
5956 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5957 print "struct"/"union"/"enum" for typedefed names.
5959 2014-10-23 Marek Polacek <polacek@redhat.com>
5961 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5964 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5965 Yury Gribov <y.gribov@samsung.com>
5967 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5968 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5969 instead of flag_sanitize_recover as bool flag.
5971 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5973 * cilk.c: Revert previous change.
5975 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5978 * cilk.c: Include vec.h.
5979 (struct cilk_decls): New structure.
5980 (wrapper_parm_cb): Split this function to...
5981 (fill_decls_vec): ...this...
5982 (create_parm_list): ...and this.
5983 (compare_decls): New function.
5984 (for_local_cb): Remove.
5985 (wrapper_local_cb): Ditto.
5986 (build_wrapper_type): For now first traverse and fill vector of
5987 declarations then sort it and then deal with sorted vector.
5988 (cilk_outline): Ditto.
5989 (declare_one_free_variable): Ditto.
5991 2014-10-17 Marek Polacek <polacek@redhat.com>
5993 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5994 * c.opt (Wimplicit-int): Initialize to -1.
5996 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5998 * c-pragma.c: Adjust include files.
5999 * c-semantics.c: Likewise.
6001 2014-10-16 DJ Delorie <dj@redhat.com>
6003 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6006 2014-10-14 Jason Merrill <jason@redhat.com>
6009 * c-common.h (CPP_PREPARSED_EXPR): New.
6010 (N_CP_TTYPES): Adjust.
6012 2014-10-15 Marek Polacek <polacek@redhat.com>
6014 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6016 2014-10-14 DJ Delorie <dj@redhat.com>
6018 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6019 types, not just __int128.
6020 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6021 types, not just __int128.
6022 (cpp_atomic_builtins): Round pointer sizes up.
6023 (type_suffix): Use type precision, not specific types.
6024 * c-common.c (c_common_reswords): Remove __int128 special case.
6025 (c_common_type_for_size): Check for all __intN types, not just
6027 (c_common_type_for_mode): Likewise.
6028 (c_common_signed_or_unsigned_type): Likewise.
6029 (c_build_bitfield_integer_type): Likewise.
6030 (c_common_nodes_and_builtins): Likewise.
6031 (keyword_begins_type_specifier): Likewise.
6032 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6035 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6037 * c-common.c: Use hash_table instead of hashtab.
6039 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6041 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
6044 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
6049 * c-common.c (warn_logical_operator): Punt for vectors.
6051 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6053 Implement SD-6: SG10 Feature Test Recommendations
6054 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6055 macros and the __has_header macro.
6057 2014-09-30 Jason Merrill <jason@redhat.com>
6059 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6060 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6061 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6063 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6064 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6066 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6067 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6069 2014-09-24 Marek Polacek <polacek@redhat.com>
6073 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6075 2014-09-23 Andi Kleen <ak@linux.intel.com>
6077 * c-common.c (handle_no_reorder_attribute): New function.
6078 (c_common_attribute_table): Add no_reorder attribute.
6080 2014-09-22 Joseph Myers <joseph@codesourcery.com>
6082 * c-cppbuiltin.c (c_cpp_builtins): Define
6083 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6086 2014-09-18 Joseph Myers <joseph@codesourcery.com>
6088 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6089 for supported floating-point modes.
6091 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6093 * c.opt (Wpsabi): Use LangEnabledBy.
6094 * c-opts.c (c_common_handle_option): Do not handle here.
6096 2014-09-12 Joseph Myers <joseph@codesourcery.com>
6098 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6099 macros for floating-point modes.
6101 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
6104 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6105 __*_DENORM_MIN__ without denormals.
6107 2014-09-10 Jakub Jelinek <jakub@redhat.com>
6109 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6110 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6111 ubsan_create_data callers.
6112 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6113 index is constant or BIT_AND_EXPR with constant mask and is
6114 small enough for the bound.
6115 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6116 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6118 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6120 * c.opt: Add CppReason to various flags.
6121 (Wdate-time): Re-sort.
6122 * c-common.c: Include c-common.h earlier.
6123 (struct reason_option_codes_t): Delete.
6124 (c_option_controlling_cpp_error): Prefix global type and struct
6127 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6129 * c.opt (Wnormalized): New.
6130 (Wnormalized=): Use Enum and Reject Negative.
6131 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6133 2014-09-08 Joseph Myers <joseph@codesourcery.com>
6135 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6136 digits of floating-point modes if -fbuilding-libgcc.
6138 2014-09-05 Joseph Myers <joseph@codesourcery.com>
6140 * c-cppbuiltin.c (c_cpp_builtins): Also define
6141 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6142 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6143 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6144 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6145 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6146 __LIBGCC_STACK_GROWS_DOWNWARD__,
6147 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6148 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6149 __LIBGCC_DWARF_FRAME_REGISTERS__,
6150 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6151 __LIBGCC_STACK_POINTER_REGNUM__ and
6152 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6153 (builtin_define_with_value): Handle backslash-escaping in string
6156 2014-09-05 Richard Biener <rguenther@suse.de>
6159 * c-format.c (check_format_arg): Properly handle
6160 effectively signed POINTER_PLUS_EXPR offset.
6162 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6164 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6165 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6166 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6168 * c-opts.c (c_common_handle_option): Do not handle here.
6169 (sanitize_cpp_opts): Likewise.
6170 * c-common.c (struct reason_option_codes_t): Handle
6171 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6173 2014-09-03 Marek Polacek <polacek@redhat.com>
6175 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6177 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6178 Balaji V. Iyer <balaji.v.iyer@intel.com>
6179 Igor Zamyatin <igor.zamyatin@intel.com>
6181 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6182 * c-common.c (c_common_reswords): Added _Cilk_for.
6183 * c-common.h (enum rid): Added RID_CILK_FOR.
6184 (cilk_for_number_of_iterations): Add declaration.
6185 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6187 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6188 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6190 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6192 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6193 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6194 Wundef): Use CPP, Var and Init.
6195 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6197 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6199 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6200 * c-opts.c (c_common_handle_option): Do not handle here.
6202 2014-08-25 Jason Merrill <jason@redhat.com>
6204 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6205 -std=c++14 and -std=gnu++14, rather than the reverse.
6206 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6207 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6208 * c-common.h (cxx_dialect): Remove cxx1y.
6210 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6212 * c-common.h (enum cxx_dialect): Add cxx14.
6213 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6214 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6215 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6217 2014-08-22 Jason Merrill <jason@redhat.com>
6219 * c.opt (std=gnu++17): Fix alias.
6221 2014-08-22 Marek Polacek <polacek@redhat.com>
6224 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6225 check for vector types. Drop LHS argument.
6226 * c-common.h (warn_logical_not_parentheses): Adjust.
6228 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6230 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6231 (Wmultichar): Likewise.
6232 (Wdate-time): Use C-family languages instead of Common. Use CPP
6234 * c-opts.c (c_common_handle_option): Do not handle the above
6236 (sanitize_cpp_opts): Likewise.
6238 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6241 * c-opts.c: Include tree-diagnostics.h.
6242 (c_diagnostic_finalizer): New.
6243 (c_common_initialize_diagnostics): Use it.
6245 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6247 PR preprocessor/51303
6248 * c-common.c (struct reason_option_codes_t option_codes):
6249 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6251 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6255 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6256 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6257 (c_common_post_options): Call init_global_opts_from_cpp.
6258 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6260 2014-08-19 Marek Polacek <polacek@redhat.com>
6263 * c-common.c (maybe_warn_bool_compare): New function.
6264 * c-common.h (maybe_warn_bool_compare): Declare.
6265 * c.opt (Wbool-compare): New option.
6267 2014-08-19 Marek Polacek <polacek@redhat.com>
6269 * c.opt (Wc99-c11-compat): New option.
6271 2014-08-19 Marek Polacek <polacek@redhat.com>
6273 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6274 to warn_c90_c99_compat.
6275 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6278 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6279 Steven Bosscher <steven@gcc.gnu.org>
6282 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6283 format_check_results.
6284 (check_function_format): Use true and add comment for boolean
6286 (finish_dollar_format_checking): Use explicit location when warning.
6287 (check_format_info): Likewise.
6288 (check_format_arg): Set extra_arg_loc and format_string_loc.
6289 (check_format_info_main): Use explicit location when warning.
6290 (check_format_types): Pass explicit location.
6291 (format_type_warning): Likewise.
6293 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6296 * c-format.c: Handle Fortran flags.
6298 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6301 * array-notation-common.c (find_rank): Added handling for other
6302 types of references.
6304 2014-08-10 Marek Polacek <polacek@redhat.com>
6307 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6308 * c.opt (Wc90-c99-compat): Add option.
6310 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6312 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6314 2014-08-03 Marek Polacek <polacek@redhat.com>
6316 * c-common.c (check_case_value): Add location_t parameter. Use it.
6317 (c_add_case_label): Pass loc to check_case_value.
6319 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6321 * cilk.c: Use hash_map instead of pointer_map.
6323 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6325 * c-gimplify.c: Use hash_set instead of pointer_set.
6327 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6330 * array-notation-common.c (extract_array_notation_exprs): Handling
6333 2014-08-01 Jakub Jelinek <jakub@redhat.com>
6335 * c-common.h (min_align_of_type): Removed prototype.
6336 * c-common.c (min_align_of_type): Removed.
6337 * c-ubsan.h (ubsan_maybe_instrument_reference,
6338 ubsan_maybe_instrument_member_call): New prototypes.
6339 * c-ubsan.c: Include stor-layout.h and builtins.h.
6340 (ubsan_maybe_instrument_reference_or_call,
6341 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6344 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6347 * c.opt (-Wreturn-local-addr): Move to common.opt.
6349 2014-07-30 Jason Merrill <jason@redhat.com>
6354 * c.opt (-fuse-all-virtuals): New.
6356 2014-07-30 Tom Tromey <tromey@redhat.com>
6359 * c.opt (Wdesignated-init): New option.
6360 * c-common.c (c_common_attribute_table): Add "designated_init".
6361 (handle_designated_init): New function.
6363 2014-07-24 Marek Polacek <polacek@redhat.com>
6366 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6368 2014-07-16 Dodji Seketeli <dodji@redhat.com>
6370 PR preprocessor/60723 - missing system-ness marks for macro tokens
6371 * c-ppoutput.c (struct print::prev_was_system_token): New data
6373 (init_pp_output): Initialize it.
6374 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6375 (do_line_change): Return a flag saying if a line marker was
6377 (scan_translation_unit): Detect if the system-ness of the token we
6378 are about to emit is different from the one of the previously
6379 emitted token. If so, emit a line marker. Avoid emitting useless
6380 adjacent line markers. Avoid emitting line markers for tokens
6381 originating from the expansion of built-in macros.
6382 (scan_translation_unit_directives_only): Adjust.
6384 2014-07-15 Marek Polacek <polacek@redhat.com>
6386 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6387 TYPE_MAX_VALUE is NULL.
6389 2014-07-14 Jakub Jelinek <jakub@redhat.com>
6392 * c.opt (Wmemset-transposed-args): New warning.
6394 2014-07-10 Jason Merrill <jason@redhat.com>
6398 * c.opt (-fuse-all-virtuals): New.
6400 2014-07-09 Richard Biener <rguenther@suse.de>
6403 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6404 using unsigned arithmetic if overflow does not wrap instead of
6405 if overflow is undefined.
6407 2014-07-06 Marek Polacek <polacek@redhat.com>
6410 * c.opt (Wsizeof-array-argument): New option.
6412 2014-07-03 Jakub Jelinek <jakub@redhat.com>
6414 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
6415 comments->count <= 1, as comments->entries might be NULL.
6417 2014-07-01 Marek Polacek <polacek@redhat.com>
6419 * c.opt (Wint-conversion): New option.
6421 2014-07-01 Marek Polacek <polacek@redhat.com>
6424 * c.opt (Wincompatible-pointer-types): New option.
6426 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6429 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6430 Do not discard TYPE_QUALS of type.
6432 2014-06-26 Jason Merrill <jason@redhat.com>
6434 * c-common.h (enum cxx_dialect): Add cxx1z.
6435 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6436 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6438 2014-06-26 Teresa Johnson <tejohnson@google.com>
6440 * c-common.h (get_dump_info): Declare.
6441 * c-gimplify.c (c_genericize): Use saved dump files.
6442 * c-opts.c (c_common_parse_file): Begin and end dumps
6443 once around parsing invocation.
6444 (get_dump_info): New function.
6446 2014-06-23 Marek Polacek <polacek@redhat.com>
6447 Andrew MacLeod <amacleod@redhat.com>
6450 * c-common.c (get_atomic_generic_size): Don't segfault if the
6451 type doesn't have a size.
6453 2014-06-20 Marek Polacek <polacek@redhat.com>
6455 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6456 (ubsan_walk_array_refs_r): New function.
6457 (c_genericize): Instrument array bounds.
6458 * c-ubsan.c: Include "internal-fn.h".
6459 (ubsan_instrument_division): Mark instrumented arrays as having
6460 side effects. Adjust ubsan_type_descriptor call.
6461 (ubsan_instrument_shift): Likewise.
6462 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6463 (ubsan_instrument_bounds): New function.
6464 (ubsan_array_ref_instrumented_p): New function.
6465 (ubsan_maybe_instrument_array_ref): New function.
6466 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6467 (ubsan_array_ref_instrumented_p): Declare.
6468 (ubsan_maybe_instrument_array_ref): Declare.
6470 2014-06-20 Hale Wang <hale.wang@arm.com>
6473 * c.opt (fshort-enums): Add to LTO.
6474 * c.opt (fshort-wchar): Likewise.
6476 2014-06-16 Marek Polacek <polacek@redhat.com>
6479 * c.opt (Wswitch-bool): Add Var.
6481 2014-06-12 Jakub Jelinek <jakub@redhat.com>
6484 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6485 #pragma omp target teams or
6486 #pragma omp {,target }teams distribute simd.
6488 2014-06-12 Jason Merrill <jason@redhat.com>
6490 * c.opt (Wabi=, fabi-compat-version): New.
6491 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6492 (c_common_post_options): Handle flag_abi_compat_version default.
6493 Disallow -fabi-compat-version=1.
6494 * c-common.h (abi_version_crosses): New.
6496 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
6498 * c-common.c (handle_section_attribute): Update handling for
6499 section names that are no longer trees.
6501 2014-06-10 Jakub Jelinek <jakub@redhat.com>
6504 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6505 (omp_pragmas): ... back here.
6507 2014-06-05 Marek Polacek <polacek@redhat.com>
6510 * c-common.c (warn_logical_not_parentheses): New function.
6511 * c-common.h (warn_logical_not_parentheses): Declare.
6512 * c.opt (Wlogical-not-parentheses): New option.
6514 2014-06-04 Marek Polacek <polacek@redhat.com>
6517 * c-common.c (check_case_bounds): Add location parameter.
6519 (c_add_case_label): Pass loc to check_case_bounds.
6521 2014-06-03 Marek Polacek <polacek@redhat.com>
6524 * c.opt (Wswitch-bool): New option.
6526 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6528 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6530 (record_types_used_by_current_var_decl): Move prototype to where
6533 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6534 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6535 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6537 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6539 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6540 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6542 * c-pretty-print.c (pp_c_void_constant): New function.
6543 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6544 (c_pretty_printer::expression): Handle VOID_CST.
6545 * cilk.c (extract_free_variables): Likewise.
6546 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6547 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6549 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6551 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6552 * c-pragma.c (push_alignment): Adjust.
6553 (handle_pragma_push_options): Likewise.
6555 2014-05-09 Marek Polacek <polacek@redhat.com>
6558 * c-common.c (check_user_alignment): Return -1 if alignment is error
6560 (handle_aligned_attribute): Don't call default_conversion on
6562 (handle_vector_size_attribute): Likewise.
6563 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6564 (handle_sentinel_attribute): Call default_conversion and allow even
6565 integral types as an argument.
6567 2014-05-08 Marek Polacek <polacek@redhat.com>
6570 * c-common.c (min_align_of_type): New function factored out from...
6571 (c_sizeof_or_alignof_type): ...here.
6572 * c-common.h (min_align_of_type): Declare.
6574 2014-05-08 Marek Polacek <polacek@redhat.com>
6577 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6578 parameter type of main.
6580 2014-05-07 DJ Delorie <dj@redhat.com>
6582 * c-cppbuiltin.c (print_bits_of_hex): New.
6583 (builtin_define_type_minmax): Print values using hex so as not to
6584 require a pre-computed list of string values.
6586 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6587 Mike Stump <mikestump@comcast.net>
6588 Richard Sandiford <rdsandiford@googlemail.com>
6590 * c-ada-spec.c: Include wide-int.h.
6591 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6592 (dump_generic_ada_node): Use wide-int interfaces.
6593 * c-common.c: Include wide-int-print.h.
6594 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6595 (pointer_int_sum): Use wide-int interfaces.
6596 (c_common_nodes_and_builtins): Use make_int_cst.
6597 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6598 (handle_alloc_size_attribute): Use wide-int interfaces.
6599 (get_nonnull_operand): Likewise.
6600 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6601 * c-lex.c: Include wide-int.h.
6602 (narrowest_unsigned_type): Take a widest_int rather than two
6604 (narrowest_signed_type): Likewise.
6605 (interpret_integer): Update accordingly. Use wide-int interfaces.
6606 (lex_charconst): Use wide-int interfaces.
6607 * c-pretty-print.c: Include wide-int.h.
6608 (pp_c_integer_constant): Use wide-int interfaces.
6609 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6610 INT_CST_LT_UNSIGNED.
6612 2014-05-06 Richard Biener <rguenther@suse.de>
6614 * c-opts.c (c_common_post_options): For -freestanding,
6615 -fno-hosted and -fno-builtin disable pattern recognition
6616 if not enabled explicitely.
6618 2014-05-02 Marek Polacek <polacek@redhat.com>
6620 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6622 2014-05-01 Marek Polacek <polacek@redhat.com>
6625 * c.opt (Wdiscarded-qualifiers): Add.
6627 2014-04-30 Marek Polacek <polacek@redhat.com>
6629 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6630 INT_MIN / -1 sanitization only for integer types.
6632 2014-04-25 Marek Polacek <polacek@redhat.com>
6635 * c-common.c (handle_noinline_attribute): Warn if the attribute
6636 conflicts with always_inline attribute.
6637 (handle_always_inline_attribute): Warn if the attribute conflicts
6638 with noinline attribute.
6640 2014-04-25 Marek Polacek <polacek@redhat.com>
6643 * c-common.c (check_main_parameter_types): Warn about variadic main.
6645 2014-04-24 Mike Stump <mikestump@comcast.net>
6647 * c.opt (Wshadow-ivar): Default to on.
6649 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6651 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6653 2014-04-23 Marek Polacek <polacek@redhat.com>
6655 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6657 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6660 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6661 if flag_sanitize_undefined_trap_on_error.
6662 (ubsan_instrument_division, ubsan_instrument_shift,
6663 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6664 if !flag_sanitize_recover.
6666 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
6669 * c-common.c (registered_builtin_types): Make non-static.
6670 * c-common.h (registered_builtin_types): Declare.
6672 2014-04-14 Richard Biener <rguenther@suse.de>
6673 Marc Glisse <marc.glisse@inria.fr>
6676 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6677 apply may-alias the scalar pointer type when applicable.
6679 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6682 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6683 as possible argument for Cilk_spawn.
6685 2014-04-11 Tobias Burnus <burnus@net-b.de>
6688 * c.opt (Wformat-signedness): Add
6689 * c-format.c(check_format_types): Use it.
6691 2014-04-11 Jason Merrill <jason@redhat.com>
6694 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6695 default_conversion for an array argument.
6697 2014-04-08 Marek Polacek <polacek@redhat.com>
6700 * c-ubsan.c: Include asan.h.
6701 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6703 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6705 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6707 2014-04-02 Marek Polacek <polacek@redhat.com>
6709 * c-common.h (c_expand_expr): Remove declaration.
6711 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6714 * c-common.c (add_atomic_size_parameter): When creating new
6715 params vector, push the size argument first.
6717 2014-03-26 Jakub Jelinek <jakub@redhat.com>
6719 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6720 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6721 ubsan_create_data callers.
6723 2014-03-22 Jakub Jelinek <jakub@redhat.com>
6726 * c-opts.c (c_finish_options): Restore cb_file_change call to
6729 2014-03-13 Jakub Jelinek <jakub@redhat.com>
6732 * c-pragma.c (apply_pragma_weak): Only look at
6733 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6734 DECL_ASSEMBLER_NAME_SET_P (decl).
6735 (maybe_apply_pending_pragma_weaks): Exit early if
6736 vec_safe_is_empty (pending_weaks) rather than only when
6738 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6739 set assembler name back to NULL afterwards.
6741 2014-03-11 Jason Merrill <jason@redhat.com>
6743 * c.opt: Add -std=gnu++14.
6745 2014-03-11 Ian Bolton <ian.bolton@arm.com>
6747 * c-opts.c (c_common_post_options): Don't override
6748 -ffp-contract=fast if unsafe-math-optimizations is on.
6750 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
6752 * c.opt: Enable LTO FE for fshort-double.
6754 2014-03-07 Jason Merrill <jason@redhat.com>
6756 * c.opt: Add -std=c++14.
6758 2014-03-06 Marek Polacek <polacek@redhat.com>
6761 * cilk.c (contains_cilk_spawn_stmt): New function.
6762 (contains_cilk_spawn_stmt_walker): Likewise.
6763 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6764 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6766 2014-03-03 Jakub Jelinek <jakub@redhat.com>
6768 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6769 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6770 even when flag_preprocess_only.
6772 2014-02-26 Jason Merrill <jason@redhat.com>
6776 * c-common.c (shorten_compare): Don't check
6777 c_inhibit_evaluation_warnings.
6779 2014-02-19 Jakub Jelinek <jakub@redhat.com>
6782 * c-common.c (c_common_nodes_and_builtins): When initializing
6783 c_uint{16,32,64}_type_node, also set corresponding
6784 uint{16,32,64}_type_node to the same value.
6787 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6788 for PRAGMA_IVDEP if flag_preprocess_only.
6790 2014-02-12 Jakub Jelinek <jakub@redhat.com>
6793 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6794 if false, add ADD itself, rather than vice versa.
6795 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6796 copy. For SAVE_EXPR, only call merge_tlist once.
6798 2014-02-08 Jakub Jelinek <jakub@redhat.com>
6801 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6803 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6805 (c_common_attribute_table): Add alloc_align and assume_aligned
6808 2014-02-06 Marek Polacek <polacek@redhat.com>
6811 * c-common.c (warn_for_sign_compare): Call warning_at with location
6814 2014-02-05 Marek Polacek <polacek@redhat.com>
6817 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6820 2014-02-04 Marek Polacek <polacek@redhat.com>
6823 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6826 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
6830 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6831 handle_vector_size_attribute, handle_nonnull_attribute): Call
6832 default_conversion on the attribute argument.
6833 (handle_nonnull_attribute): Increment the argument number.
6835 2014-01-31 Marek Polacek <polacek@redhat.com>
6838 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6839 build_function_call_vec.
6840 (resolve_overloaded_builtin): Likewise.
6841 * c-common.h (build_function_call_vec): Adjust declaration.
6843 2014-01-30 Marek Polacek <polacek@redhat.com>
6846 * c-common.h (unsafe_conversion_p): Adjust declaration.
6847 (warnings_for_convert_and_check): Likewise.
6848 (convert_and_check): Likewise.
6849 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6850 expansion_point_location_if_in_system_header on it.
6851 (warnings_for_convert_and_check): Add location parameter. Call
6852 expansion_point_location_if_in_system_header on it. Use it.
6853 (convert_and_check): Add location parameter. Use it.
6854 (conversion_warning): Likewise.
6855 (c_add_case_label): Adjust convert_and_check calls.
6856 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6858 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6860 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6862 * c-pragma.c (init_pragma): Likewise.
6865 2014-01-23 Marek Polacek <polacek@redhat.com>
6868 * c-common.c (shorten_compare): Add location_t parameter.
6869 * c-common.h (shorten_binary_op): Adjust declaration.
6871 2014-01-23 Marek Polacek <polacek@redhat.com>
6874 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6875 * c-common.h: Declare it.
6877 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6879 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6880 * c-ada-spec.c (dump_ads): Likewise.
6881 (cpp_check): Likewise.
6882 (dump_ada_specs): Likewise.
6884 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
6887 * c-common.c (handle_no_instrument_function_attribute): Allow
6888 no_instrument_function attribute in class member
6889 definition/declaration.
6891 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6894 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6895 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6896 being COMPOUND_EXPR.
6897 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6898 operand a SAVE_EXPR and second MODIFY_EXPR.
6900 2014-01-09 Jakub Jelinek <jakub@redhat.com>
6903 * c-pch.c (c_common_write_pch): Call
6904 prepare_target_option_nodes_for_pch.
6906 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6908 Update copyright years
6910 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6912 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6913 the copyright notice.
6915 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6917 * c-ada-spec.c (print_constructor): New function.
6918 (print_destructor): Retrieve the origin of the destructor.
6919 (print_ada_declaration): Revamp handling of constructors/destructors.
6921 2013-12-23 Stuart Hastings <stuart@apple.com>
6922 Bill Maddox <maddox@google.com>
6923 Jason Merrill <jason@redhat.com>
6925 * c.opt: Add -fdeclone-ctor-dtor.
6926 * c-opts.c (c_common_post_options): Default to on iff -Os.
6928 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6930 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6932 * c-pragma.h (enum pragma_cilk_clause): Remove.
6933 (enum pragma_omp_clause): Added the following fields:
6934 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6935 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6936 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6937 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6938 PRAGMA_CILK_CLAUSE_UNIFORM.
6941 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6943 * cilk.c (cilk_outline): Made this function non-static.
6944 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6945 (create_cilk_wrapper): Added a new parameter: a function pointer.
6946 (c_install_body_w_frame_cleanup): Remove
6947 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6948 * c-common.h (cilk_outline): New prototype.
6949 (gimplify_cilk_spawn): Removed two parameters.
6950 (cilk_install_body_with_frame_cleanup): New prototype.
6951 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6952 CILK_SPAWN_STMT case.
6954 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6956 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6958 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6959 (int_array_type_node): Remove.
6960 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6962 2013-12-05 Marek Polacek <polacek@redhat.com>
6965 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6966 [ADJUST_FIELD_ALIGN].
6968 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6971 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6972 and check field alignment if set.
6973 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6974 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6976 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6977 Marek Polacek <polacek@redhat.com>
6979 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6980 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6982 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6985 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6988 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6991 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6992 goto invalid. If it is error_mark_node, don't issue further
6995 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6997 * c.opt (Wopenmp-simd): New.
6999 2013-11-22 Jakub Jelinek <jakub@redhat.com>
7001 * c-ubsan.h (ubsan_instrument_return): New prototype.
7002 * c-ubsan.c (ubsan_instrument_return): New function.
7004 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7006 * c-common.c: Add required include files from gimple.h.
7007 * c-gimplify.c: Likewise.
7010 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7012 * c-common.c (unsafe_conversion_p): Remove use of
7013 EXPR_LOC_OR_HERE macro.
7014 (conversion_warning): Likewise.
7015 (warnings_for_convert_and_check): Likewise.
7016 (warn_for_collisions_1): Likewise.
7017 (shorten_compare): Likewise, and remove use of in_system_header
7018 macro, using the location from the former.
7019 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7020 (cb_def_pragma): Remove use of in_system_header macro.
7021 (lex_string): Likewise.
7022 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7024 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7025 Mike Stump <mikestump@comcast.net>
7026 Richard Sandiford <rdsandiford@googlemail.com>
7028 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7029 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7030 tree_fits_shwi_p or tree_fits_uhwi_p.
7031 (dump_generic_ada_node): Likewise.
7032 * c-format.c (check_format_arg): Likewise.
7033 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7035 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7037 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7039 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7042 * c-common.c (unsafe_conversion_p): Make this function
7043 return an enumeration with more detail.
7044 (conversion_warning): Use the new return type of
7045 unsafe_conversion_p to separately warn either about conversions
7046 that lower floating point number precision or about the other
7047 kinds of conversions.
7048 * c-common.h (enum conversion_safety): New enumeration.
7049 (unsafe_conversion_p): switching return type to
7050 conversion_safety enumeration.
7051 * c.opt: Adding new warning -Wfloat-conversion and
7052 enabling it with -Wconversion.
7054 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7056 * c-opts.c: Include plugin.h.
7057 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
7059 2013-11-19 Marek Polacek <polacek@redhat.com>
7061 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7063 (ubsan_instrument_shift): Likewise.
7064 (ubsan_instrument_vla): Likewise.
7066 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7068 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7069 cast to unsigned type.
7071 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7073 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7075 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7076 rather than tree_low_cst.
7078 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7080 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7081 tree_to_uhwi throughout.
7083 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7085 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7086 tree_low_cst (..., 0) with tree_to_shwi throughout.
7088 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7090 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7091 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7093 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7095 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7096 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7098 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7100 * c-cilkplus.c: New file.
7101 * c-common.c (readonly_error): Add location argument.
7102 * c-common.h (readonly_error): Same.
7103 (c_finish_cilk_clauses): Protoize.
7104 (c_check_cilk_loop): Same.
7105 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7106 Do not fail on error_mark_node.
7107 Abstract increment canonicalization to here...
7108 (c_omp_for_incr_canonicalize_ptr): New.
7109 c-pragma.c (init_pragma): Register "simd" pragma.
7110 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7111 (enum pragma_cilk_clause): New.
7113 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7115 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7116 wchar_type and host_integerp checks.
7118 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7120 * c-common.c: Likewise.
7121 * c-gimplify.c: Likewise.
7124 2013-11-14 Diego Novillo <dnovillo@google.com>
7126 * c-common.c: Include fold-const.h.
7127 Include stor-layout.h.
7129 Include stringpool.h.
7132 Include trans-mem.h.
7133 * c-cppbuiltin.c: Include stor-layout.h.
7134 Include stringpool.h.
7135 * c-format.c: Include stringpool.h.
7136 * c-lex.c: Include stringpool.h.
7137 Include stor-layout.h.
7138 * c-pragma.c: Include stringpool.h.
7141 Include gcc-symtab.h.
7142 * c-pretty-print.c: Include stor-layout.h.
7144 * cilk.c: Include stringpool.h.
7147 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7149 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7150 * c-common.c (c_common_reswords): Add __auto_type.
7151 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7153 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7155 * c-common.c: Include gimplify.h.
7156 * c-gimplify.c: Likewise.
7158 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7159 * c-ubsan.c: Don't include gimple.h.
7161 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7163 * c-common.c (c_common_reswords): Add _Thread_local.
7165 2013-11-09 Joseph Myers <joseph@codesourcery.com>
7167 * c-common.c (atomic_size_supported_p): New function.
7168 (resolve_overloaded_atomic_exchange)
7169 (resolve_overloaded_atomic_compare_exchange)
7170 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7171 Use it instead of comparing size with a local list of sizes.
7173 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
7174 Joseph Myers <joseph@codesourcery.com>
7176 * c-common.h (enum rid): Add RID_ATOMIC.
7177 * c-common.c (c_common_reswords): Add _Atomic.
7178 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7179 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7180 * c-format.c (check_format_types): Check for extra _Atomic
7181 qualifiers in format argument.
7182 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7183 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7185 2013-11-06 Tobias Burnus <burnus@net-b.de>
7187 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7189 2013-11-06 Joseph Myers <joseph@codesourcery.com>
7191 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7193 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7194 to mean lack of IEEE 754 support.
7196 2013-11-05 Tobias Burnus <burnus@net-b.de>
7198 * c.opt (-Wdate-time): New option
7199 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7201 2013-11-05 Joseph Myers <joseph@codesourcery.com>
7203 * c-cppbuiltin.c (cpp_iec_559_value): Test
7204 flag_excess_precision_cmdline not flag_excess_precision.
7206 2013-11-05 Tobias Burnus <burnus@net-b.de>
7208 * c.opt (fopenmp-simd): New option.
7209 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7210 (omp_pragmas): ... this new struct.
7211 (c_pp_lookup_pragma): Also walk omp_pragmas.
7212 (init_pragma): Init pragmas for -fopenmp-simd.
7214 2013-11-04 Marek Polacek <polacek@redhat.com>
7217 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7219 2013-11-04 Joseph Myers <joseph@codesourcery.com>
7221 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7223 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7225 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7227 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7228 (dump_ada_specs): Adjust prototype of second callback.
7229 * c-ada-spec.c (cpp_check): New global variable.
7230 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7231 (print_generic_ada_decl): Likewise.
7232 (has_static_fields): Change return type to bool and add guard.
7233 (has_nontrivial_methods): New predicate.
7234 (is_tagged_type): Change return type to bool.
7235 (separate_class_package): Call has_nontrivial_methods.
7236 (pp_ada_tree_identifier): Minor tweaks.
7237 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7238 (dump_ada_array_domains): Likewise.
7239 (dump_ada_array_type): Likewise.
7240 (dump_template_types): Remove cpp_check parameter and do not pass it to
7241 dump_generic_ada_node.
7242 (dump_ada_template): Likewise.
7243 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7245 (print_ada_methods): Change return type to integer. Remove cpp_check
7246 parameter and do not pass it down.
7247 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7248 dump_generic_ada_node.
7249 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7251 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7252 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7253 value of print_ada_methods.
7254 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7255 Set cpp_check to it before invoking dump_ada_nodes.
7256 (dump_ada_specs): Likewise.
7258 2013-11-03 Marek Polacek <polacek@redhat.com>
7260 * c-ubsan.c: Don't include hash-table.h.
7261 (ubsan_instrument_vla): New function.
7262 * c-ubsan.h: Declare it.
7264 2013-10-31 David Malcolm <dmalcolm@redhat.com>
7266 Automated part of renaming of symtab_node_base to symtab_node.
7268 Patch autogenerated by rename_symtab.py from
7269 https://github.com/davidmalcolm/gcc-refactoring-scripts
7270 revision 58bb219cc090b2f4516a9297d868c245495ee622
7272 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7273 symtab_node_base to symtab_node.
7275 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7277 Implement C++14 digit separators.
7278 * c-lex.c (interpret_float): Remove digit separators from scratch string
7279 before building real literal.
7281 2013-10-30 Jakub Jelinek <jakub@redhat.com>
7283 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7285 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7287 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7289 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7291 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7292 (insert_cilk_frame): New prototype.
7293 (cilk_init_builtins): Likewise.
7294 (gimplify_cilk_spawn): Likewise.
7295 (c_cilk_install_body_w_frame_cleanup): Likewise.
7296 (cilk_detect_spawn_and_unwrap): Likewise.
7297 (cilk_set_spawn_marker): Likewise.
7298 (build_cilk_sync): Likewise.
7299 (build_cilk_spawn): Likewise.
7302 2013-10-29 David Malcolm <dmalcolm@redhat.com>
7304 Patch autogenerated by refactor_symtab.py from
7305 https://github.com/davidmalcolm/gcc-refactoring-scripts
7306 revision 58bb219cc090b2f4516a9297d868c245495ee622
7308 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7309 to a true class hierarchy.
7310 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7312 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7314 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7316 2013-10-26 Jeff Law <law@redhat.com>
7318 * c-common.c (c_define_builtins): Remove mudflap support.
7319 * c.opt: Ignore and warn for mudflap options.
7321 2013-10-24 Tobias Burnus <burnus@net-b.de>
7324 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7325 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7327 2013-10-23 Jason Merrill <jason@redhat.com>
7329 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7331 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7333 * c-common.h (omp_clause_mask::operator !=): New method.
7334 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7335 instead of if (mask & something) tests everywhere.
7337 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7338 201307 instead of 201107.
7339 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7340 (c_common_attribute_table): Add "omp declare target" and
7341 "omp declare simd" attributes.
7342 (handle_omp_declare_target_attribute,
7343 handle_omp_declare_simd_attribute): New functions.
7344 * c-omp.c: Include c-pragma.h.
7345 (c_finish_omp_taskgroup): New function.
7346 (c_finish_omp_atomic): Add swapped argument, if true,
7347 build the operation first with rhs, lhs arguments and use NOP_EXPR
7349 (c_finish_omp_for): Add code argument, pass it down to make_code.
7350 (c_omp_split_clauses): New function.
7351 (c_split_parallel_clauses): Removed.
7352 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7353 c_omp_declare_simd_clauses_to_decls): New functions.
7354 * c-common.h (omp_clause_mask): New type.
7355 (OMP_CLAUSE_MASK_1): Define.
7356 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7357 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7358 omp_clause_mask::operator |, omp_clause_mask::operator &,
7359 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7360 omp_clause_mask::operator ==): New methods.
7361 (enum c_omp_clause_split): New.
7362 (c_finish_omp_taskgroup): New prototype.
7363 (c_finish_omp_atomic): Add swapped argument.
7364 (c_finish_omp_for): Add code argument.
7365 (c_omp_split_clauses): New prototype.
7366 (c_split_parallel_clauses): Removed.
7367 (c_omp_declare_simd_clauses_to_numbers,
7368 c_omp_declare_simd_clauses_to_decls): New prototypes.
7369 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7370 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7371 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7372 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7373 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7374 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7375 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7376 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7377 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7378 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7379 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7380 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7381 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7382 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7383 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7384 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7385 PRAGMA_OMP_CLAUSE_UNIFORM.
7387 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
7389 PR tree-optimization/20318
7390 * c-common.c (handle_returns_nonnull_attribute): New function.
7391 (c_common_attribute_table): Add returns_nonnull.
7393 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
7396 * c.opt (fcheck-new): Move to common.opt.
7398 2013-09-25 Marek Polacek <polacek@redhat.com>
7399 Jakub Jelinek <jakub@redhat.com>
7402 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7403 an expression if we can prove it is correct.
7404 (ubsan_instrument_division): Likewise. Remove unnecessary
7407 2013-09-18 Marek Polacek <polacek@redhat.com>
7410 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7412 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7414 2013-09-14 Iain Sandoe <iain@codesourcery.com>
7417 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7418 fobjc-gc, freplace-objc-classes): Accept for LTO.
7420 2013-09-13 Jacek Caban <jacek@codeweavers.com>
7422 * c-target.def: New hook
7424 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7427 * c.opt (Wdelete-incomplete): Add.
7429 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7431 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7432 (vector_types_compatible_elements_p): New function.
7433 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7435 (vector_types_compatible_elements_p): Declare.
7437 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7439 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7440 a virtual member function.
7441 (pp_simple_type_specifier): Remove.
7442 (pp_c_type_specifier): Likewise.
7443 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7444 Rename from pp_c_type_specifier. Adjust.
7445 (c_pretty_printer::c_pretty_printer): Do not assign to
7446 simple_type_specifier.
7448 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7450 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7452 (c_pretty_printer::storage_class_specifier): Likewise.
7453 (c_pretty_printer::initializer): Likewise.
7454 (pp_declaration): Remove.
7455 (pp_declaration_specifiers): Likewise.
7456 (pp_abstract_declarator): Likewise.
7457 (pp_declarator): Likewise.
7458 (pp_type_id): Likewise.
7459 (pp_statement): Likewise.
7460 (pp_constant): Likewise.
7461 (pp_id_expression): Likewise.
7462 (pp_primary_expression): Likewise.
7463 (pp_unary_expression): Likewise.
7464 (pp_multiplicative_expression): Likewise.
7465 (pp_conditional_expression): Likewise.
7466 (pp_assignment_expression): Likewise.
7467 (pp_expression): Likewise.
7468 (pp_c_type_id): Likewise.
7469 (pp_c_storage_class_specifier): Likewise.
7470 * c-pretty-print.c (pp_c_type_cast): Tidy.
7471 (pp_c_pointer): Likewise.
7472 (pp_c_type_specifier): Likewise.
7473 (pp_c_parameter_type_list): Likewise.
7474 (pp_c_function_definition): Likewise.
7475 (pp_c_init_declarator): Likewise.
7476 (pp_c_initializer_list): Likewise.
7477 (pp_c_constructor_elts): Likewise.
7478 (c_pretty_printer::direct_abstract_declarator): Likewise.
7479 (c_pretty_printer::declaration_specifiers): Likewise.
7480 (c_pretty_printer::primary_expression): Likewise.
7481 (c_pretty_printer::postfix_expression): Likewise.
7482 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7483 (c_pretty_printer::storage_class_specifier): Rename from
7484 pp_c_storage_class_specifier.
7485 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7486 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7487 storage_class_specifier, initializer, offset_list, flags.
7489 2013-08-30 Marek Polacek <polacek@redhat.com>
7491 * c-ubsan.c: New file.
7492 * c-ubsan.h: New file.
7494 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7496 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7498 (c_pretty_printer::declaration_specifiers): Likewise.
7499 (c_pretty_printer::declarator): Likewise.
7500 (c_pretty_printer::abstract_declarator): Likewise.
7501 (c_pretty_printer::direct_abstract_declarator): Likewise.
7502 (c_pretty_printer::direct_declarator): Likewise.
7503 (c_pretty_printer::function_specifier): Likewise.
7504 (pp_declaration): Adjust.
7505 (pp_declaration_specifiers): Likewise.
7506 (pp_abstract_declarator): Likewise.
7507 (pp_direct_declarator): Likewise.
7508 (pp_function_specifier): Likewise.
7509 (pp_direct_abstract_declarator): Remove as unused.
7510 (pp_c_declaration): Remove.
7511 (pp_c_declaration_specifiers): Likewise.
7512 (pp_c_declarator): Likewise.
7513 (pp_c_direct_declarator): Likewise.
7514 (pp_c_function_specifier): Likewise.
7515 (pp_c_direct_abstract_declarator): Likewise.
7516 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7517 from pp_c_abstract_declarator. Adjust.
7518 (c_pretty_printer::direct_abstract_declarator): Rename from
7519 pp_c_direct_abstract_declarator. Adjust.
7520 (c_pretty_printer::function_specifier): Rename from
7521 pp_c_function_specifier. Adjust.
7522 (c_pretty_printer::declaration_specifiers): Rename from
7523 pp_c_declaration_specifiers. Adjust.
7524 (c_pretty_printer::direct_declarator): Rename from
7525 pp_c_direct_declarator. Adjust.
7526 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7527 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7528 (c_pretty_printer::c_pretty_printer): Do not assign to
7529 declaration, declaration_specifiers, declarator,
7530 direct_declarator, direct_abstract_declarator, function_specifier.
7532 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7534 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7535 virtual member function.
7536 (c_pretty_printer::multiplicative_expression): Likewise.
7537 (c_pretty_printer::conditional_expression): Likewise.
7538 (c_pretty_printer::assignment_expression): Likewise.
7539 (c_pretty_printer::expression): Likewise.
7540 (pp_unary_expression): Adjust.
7541 (pp_multiplicative_expression): Likewise.
7542 (pp_assignment_expression): Likewise.
7543 (pp_conditional_expression): Likewise.
7544 (pp_expression): Likewise.
7545 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7546 from pp_c_unary_expression. Adjust.
7547 (c_pretty_printer::multiplicative_expression): Rename from
7548 pp_c_multiplicative_expression. Adjust.
7549 (c_pretty_printer::conditional_expression): Rename from
7550 pp_c_conditional_expression. Adjust.
7551 (c_pretty_printer::assignment_expression): Rename from
7552 pp_c_assignment_expression. Adjust.
7553 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7554 (c_pretty_printer::c_pretty_printer): Do not assign to
7555 unary_expression, multiplicative_expression,
7556 conditional_expression, expression.
7558 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7560 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7561 virtual member function.
7562 (pp_postfix_expression): Adjust.
7563 (pp_c_postfix_expression): Remove.
7564 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7565 from pp_c_postfix_expression. Adjust.
7566 (c_pretty_printer::c_pretty_printer): Do not assign to
7569 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7571 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7572 virtua member function.
7573 (pp_primary_expression): Adjust.
7574 (pp_c_primary_expression): Remove.
7575 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7576 from pp_c_primary_expression. Adjust.
7577 (pp_c_initializer_list): Use pp_primary_expression.
7578 (c_pretty_printer::c_pretty_printer): Do not assign to
7581 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7583 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7584 * c-pretty-print.c (M_): Remove.
7585 (c_pretty_printer::translate_string): Define.
7586 (pp_c_type_specifier): Use it.
7587 (pp_c_primary_expression): Likewise.
7588 (pp_c_expression): Likewise.
7590 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7592 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7594 (pp_c_id_expression): Remove.
7595 (pp_id_expression): Adjust.
7596 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7597 pp_c_id_expression. Adjust.
7598 (pp_c_postfix_expression): Use pp_id_expression.
7599 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7601 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7603 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7605 (pp_constant): Adjust.
7606 (pp_c_constant): Remove.
7607 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7608 pp_c_constant. Adjust.
7610 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7611 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7613 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7615 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7616 (c_pretty_printer::c_pretty_printer): Declare.
7617 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7618 c_pretty_printer_init. Adjust.
7619 (print_c_tree): Do not call c_pretty_printer_init.
7620 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7622 2013-08-09 Arnaud Charlet <charlet@adacore.com>
7624 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7626 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7629 * c-common.c (pointer_int_sum): Add bool parameter.
7630 * c-common.h (pointer_int_sum): Adjust declaration.
7632 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7634 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7635 c_pretty_printer variable.
7637 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7639 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7641 (pp_c_base): Likewise. Adjust users.
7642 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7643 (pp_c_whitespace): Do not call pp_base.
7644 (pp_c_left_paren): Likewise.
7645 (pp_c_right_paren): Likewise.
7646 (pp_c_left_brace): Likewise.
7647 (pp_c_right_brace): Likewise.
7648 (pp_c_left_bracket): Likewise.
7649 (pp_c_right_bracket): Likewise.
7650 (pp_c_dot): Likewise.
7651 (pp_c_ampersand): Likewise.
7652 (pp_c_star): Likewise.
7653 (pp_c_arrow): Likewise.
7654 (pp_c_semicolon): Likewise.
7655 (pp_c_complement): Likewise.
7656 (pp_c_exclamation): Likewise.
7657 (pp_c_direct_declarator): Likewise.
7658 (pp_c_ws_string): Likewise.
7659 (pp_c_identifier): Likewise.
7660 (pp_c_statement): Likewise.
7661 (print_c_tree): Likewise.
7663 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7666 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7667 provide useful error strings.
7669 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7671 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7672 printer functions instead of pp_string or operators and punctuators.
7673 (dump_generic_ada_node): Likewise.
7674 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7675 (pp_c_relational_expression): Likewise.
7676 (pp_c_logical_or_expression): Likewise.
7678 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7680 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7681 functions instead of pp_character.
7682 (pp_ada_tree_identifier): Likewise.
7683 (dump_ada_double_name): Likewise.
7684 (dump_ada_function_declaration): Likewise.
7685 (dump_ada_array_domains): Likewise.
7686 (dump_template_types): Likewise.
7687 (dump_generic_ada_node): Likewise.
7688 (print_ada_declaration): Likewise.
7689 (print_ada_struct_decl): Likewise.
7690 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7692 2013-07-23 Tom Tromey <tromey@redhat.com>
7694 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7695 * c-common.c (c_common_reswords): Add _Generic.
7697 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
7699 * c-common.c: Fix typos.
7700 * c-common.h: Likewise.
7702 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
7705 * c-common.c (c_common_attribute_table): Add warn_unused.
7706 (handle_warn_unused_attribute): New.
7708 2013-07-10 Jakub Jelinek <jakub@redhat.com>
7710 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7711 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7713 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7716 * c.opt: Add Wconditionally-supported.
7718 2013-07-08 Graham Stott <graham.stott@btinternet.com>
7720 * array-notation-common.c (length_mismatch_in_expr_p): Delete
7721 unused variables l_length and l_node.
7723 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7726 * c-common.c (complete_array_type): Delay folding first index
7727 like other indices. When folding, check for index overflow.
7729 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
7732 * c-common.h (c_build_vec_perm_expr): New complain argument.
7733 * c-common.c (c_build_vec_perm_expr): Likewise.
7734 Use save_expr also in C++.
7736 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7738 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7739 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7740 * c-opts.c (c_common_post_options): Likewise.
7742 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7744 * array-notation-common.c (length_mismatch_in_expr): Changed the
7745 parameter type's from a dynamic array to a vec_tree. Also removed
7746 the size parameters.
7747 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7750 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7752 * c-common.h (struct cilkplus_an_parts): New structure.
7753 (struct cilkplus_an_loop_parts): Likewise.
7754 (cilkplus_extract_an_triplets): New prototype.
7755 (fix_sec_implicit_args): Likewise.
7756 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7757 (fix_sec_implicit_args): Likewise.
7759 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7761 * array-notation-common.c (find_inv_trees): Removed an unwanted
7763 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7764 enum rid to enum tree_code.
7766 2013-06-11 Jan Hubicka <jh@suse.cz>
7768 * c-common.c (handle_alias_ifunc_attribute): Do not set
7769 DECL_EXTERNAL for weakref variables.
7770 * c-pragma.c (handle_pragma_weak): Make sure aliases
7771 are not declared as external.
7773 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7775 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7776 function from c/c-array-notation.c.
7777 (is_cilkplus_reduce_builtin): Likewise.
7778 (find_rank): Likewise.
7779 (extract_array_notation_exprs): Likewise.
7780 (replace_array_notations): Likewise.
7781 (find_inv_trees): Likewise.
7782 (replace_inv_trees): Likewise.
7783 (contains_array_notation_expr): Likewise.
7784 (find_correct_array_notation_type): Likewise.
7785 * c-common.h (struct inv_list): Moved this struct from the file
7786 c/c-array-notation.c and added a new field called additional tcodes.
7787 (length_mismatch_in_expr_p): New prototype.
7788 (is_cilkplus_reduce_builtin): Likewise.
7789 (find_rank): Likewise.
7790 (extract_array_notation_exprs): Likewise.
7791 (replace_array_notation): Likewise.
7792 (find_inv_trees): Likewise.
7793 (replace_inv_trees): Likewise.
7794 (find_correct_array_notation_type): Likewise.
7796 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7798 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7799 function array_notation_init_builtins is called.
7800 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7801 * c-common.def (ARRAY_NOTATION_REF): New tree.
7802 * c-common.h (build_array_notation_expr): New function declaration.
7803 (build_array_notation_ref): Likewise.
7804 (extract_sec_implicit_index_arg): New extern declaration.
7805 (is_sec_implicit_index_fn): Likewise.
7806 (ARRAY_NOTATION_CHECK): New define.
7807 (ARRAY_NOTATION_ARRAY): Likewise.
7808 (ARRAY_NOTATION_START): Likewise.
7809 (ARRAY_NOTATION_LENGTH): Likewise.
7810 (ARRAY_NOTATION_STRIDE): Likewise.
7811 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7813 (pp_c_expression): Likewise.
7814 * c.opt (flag_enable_cilkplus): New flag.
7815 * array-notation-common.c: New file.
7817 2013-05-14 Jakub Jelinek <jakub@redhat.com>
7820 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7822 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
7824 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7827 2013-05-07 Han Shen <shenhan@google.com>
7829 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7831 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7833 * c-common.c (check_user_alignment): Emit error for negative values.
7835 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7837 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7839 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7841 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7842 __GXX_EXPERIMENTAL_CXX1Y__.
7844 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7845 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
7847 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7848 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7849 to simply use OPT_Wpointer_arith.
7850 (c_sizeof_or_alignof_type): Likewise.
7852 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7854 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7856 2013-04-12 Jakub Jelinek <jakub@redhat.com>
7858 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7859 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7862 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7864 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7866 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7868 * c-common.c (pointer_int_sum): Remove dead code.
7870 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7873 * c-common.c (handle_optimize_attribute): Don't call
7874 save_optabs_if_changed.
7876 2013-03-05 Jakub Jelinek <jakub@redhat.com>
7879 * c-pch.c (pch_init): Free target_validity at the end.
7881 2013-03-04 Jakub Jelinek <jakub@redhat.com>
7883 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7885 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7886 Jakub Jelinek <jakub@redhat.com>
7889 * c-common.c (handle_no_sanitize_address_attribute): New function.
7890 (c_common_attribute_table): Add no_sanitize_address attribute.
7891 (handle_no_address_safety_analysis_attribute): Add
7892 no_sanitize_address attribute, not no_address_safety_analysis
7895 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
7898 * c-common.c (handle_optimize_attribute): Call
7899 save_optabs_if_changed.
7901 2013-02-18 Jakub Jelinek <jakub@redhat.com>
7902 Steven Bosscher <steven@gcc.gnu.org>
7905 * c-opts.c (c_common_post_options): If debug info is enabled
7906 and non-dwarf*, refuse to load PCH files and when writing PCH
7909 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7912 * c-common.c (handle_error_attribute): Fix condition.
7914 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7917 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7919 2013-01-18 Jason Merrill <jason@redhat.com>
7922 * c.opt (-fextern-tls-init): New.
7923 * c-opts.c (c_common_post_options): Handle it.
7925 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7928 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7929 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7930 and is either negative or bigger or equal to type precision
7931 of the first operand.
7933 2012-12-03 Marek Polacek <polacek@redhat.com>
7936 * c-common.c (check_user_alignment): Swap order of tests,
7937 check TREE_CODE first.
7939 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7942 * c-common.h (overflow_type): New enum.
7943 (build_userdef_literal): Add overflow_type argument.
7944 (tree_userdef_literal): Add overflow_type.
7945 (USERDEF_LITERAL_OVERFLOW): New access macro.
7946 * c-common.c (build_userdef_literal): Add overflow_type
7948 * c-lex.c (c_lex_with_flags): Add overflow_type to
7949 build_userdef_literal calls.
7950 (interpret_integer, interpret_float): Add overflow_type argument.
7952 2012-11-28 Richard Biener <rguenther@suse.de>
7955 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7956 here and use a type with proper overflow behavior for types that would
7957 need to be promoted for the arithmetic.
7959 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7962 * c-common.c (handle_no_address_safety_analysis_attribute): New
7964 (c_common_attribute_table): Add no_address_safety_analysis.
7966 2012-11-16 Simon Baldwin <simonb@google.com>
7968 * c.opt: Add f[no-]canonical-system-headers.
7969 * c-opts.c (c_common_handle_option): Handle
7970 OPT_fcanonical_system_headers.
7972 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7975 * c-opts.c (c_common_handle_option): Set new flags.
7976 * c.opt: Describe new flags.
7978 2012-11-09 Jason Merrill <jason@redhat.com>
7980 * c.opt (Wabi-tag): New.
7982 2012-11-09 Andi Kleen <ak@linux.intel.com>
7985 * c-common.c (get_atomic_generic_size): Mask with
7988 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7991 * c.opt (Wformat): Make it Alias Wformat=1.
7992 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7993 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7995 (Wformat=): RejectNegative. Use LangEnabledBy.
7996 (Wnonnull): Use LangEnabledBy.
7997 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7998 * c-format.c (set_Wformat): Delete.
7999 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8000 (maybe_read_dollar_number): Likewise.
8001 (avoid_dollar_number): Likewise.
8002 (finish_dollar_format_checking): Likewise.
8003 (check_format_info): Likewise.
8004 (check_format_info_main): Likewise.
8005 (check_format_types): Likewise.
8006 (format_type_warning): Likewise.
8007 * c-common.c (int): Likewise.
8008 (check_function_sentinel): Likewise.
8009 * c-common.h (warn_format,set_Wformat): Do not declare here.
8011 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8014 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8015 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8017 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8019 (Wvariadic-macros): Init(1).
8020 * c-opts.c (c_common_handle_option): Do not handle them
8022 (c_common_post_options): Likewise.
8023 (sanitize_cpp_opts): warn_unused_macros is now
8024 cpp_warn_unused_macros.
8025 (push_command_line_include): Likewise.
8026 * c-common.c (warn_unknown_pragmas): Do not define.
8027 * c-common.h (warn_unknown_pragmas): Do not declare.
8029 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8032 * c-common.c (conversion_warning): Handle conditional expressions.
8034 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8037 * c.opt (Wreturn_local_addr): Define new option.
8039 2012-10-25 Jason Merrill <jason@redhat.com>
8041 * c.opt (Wvirtual-move-assign): New.
8043 * c.opt (Winherited-variadic-ctor): New.
8045 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
8048 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8050 2012-10-23 Joseph Myers <joseph@codesourcery.com>
8052 * c-common.h (pch_cpp_save_state): Declare.
8053 * c-target.def (c_preinclude): New hook.
8054 * c-opts.c (done_preinclude): New.
8055 (push_command_line_include): Handle default preincluded header.
8056 (cb_file_change): Call pch_cpp_save_state when calling
8057 push_command_line_include.
8058 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8059 (pch_cpp_save_state): New.
8060 (pch_init): Call pch_cpp_save_state conditionally, instead of
8061 calling cpp_save_state.
8063 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8067 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8068 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8069 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8070 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8071 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8072 * c-opts.c (c_common_handle_option): Remove explicit handling from
8074 (c_common_post_options): Likewise.
8076 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8078 * c-ada-spec.c (LOCATION_COL): Delete.
8079 (compare_location): New function.
8080 (compare_node): Use it.
8081 (compare_comment): Likewise.
8083 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8087 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8088 * c-opts.c (c_common_handle_option): Do not set them here. Add
8090 (c_common_post_options): Likewise.
8092 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8094 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8095 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8096 Remove POINTER_TYPE handling, add large unsigned handling and use
8097 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8099 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8102 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8103 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8104 locs and array of 3 trees instead of just single loc and single
8105 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8106 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8107 For *cmp* builtins that take two sources strings report warnings
8108 about first and second source, not about destination and source.
8110 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
8113 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8115 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8117 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8118 declaring something coming from another file.
8120 2012-10-10 Arnaud Charlet <charlet@adacore.com>
8123 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8125 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8128 * c-common.c (warn_about_parentheses): Add location_t parameter;
8129 use EXPR_LOC_OR_LOC.
8130 * c-common.h: Update declaration.
8132 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8135 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8136 more operations. Make error messages optional.
8137 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8138 (scalar_to_vector): Declare.
8140 2012-10-08 Jason Merrill <jason@redhat.com>
8142 * c-common.c (c_common_reswords): Add thread_local.
8144 2012-10-08 Dodji Seketeli <dodji@redhat.com>
8146 PR c++/53528 C++11 attribute support
8147 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8149 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8151 (handle_aligned_attribute): In choose strictest alignment
8152 among many. Use new check_cxx_fundamental_alignment_constraints.
8153 (handle_transparent_union_attribute): In c++11 attribute syntax,
8154 don't look through typedefs.
8156 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8158 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8159 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8162 2012-09-25 Dehao Chen <dehao@google.com>
8165 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
8166 map when read in the pch.
8168 2012-09-18 Arnaud Charlet <charlet@adacore.com>
8170 * c-ada-spec.c: Style fixes.
8172 2012-09-18 Thomas Quinot <quinot@adacore.com>
8174 * c.opt (-fada-spec-parent): Define new command line switch.
8175 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8176 is specified, generate binding spec as a child of the specified unit.
8178 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8179 Manuel López-Ibáñez <manu@gcc.gnu.org>
8182 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8184 2012-08-23 Arnaud Charlet <charlet@adacore.com>
8186 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8187 for pointers, and add missing Convention C pragma.
8188 (print_ada_struct_decl): Add missing aliased keyword.
8189 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8191 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8193 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8194 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8195 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8196 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8197 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8199 2012-08-10 Richard Guenther <rguenther@suse.de>
8201 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8203 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8205 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8206 instead of separate pp_newline and pp_flush.
8207 (print_c_tree): Likewise.
8209 2012-07-26 Richard Henderson <rth@redhat.com>
8211 * c-common.c (handle_hot_attribute): Allow labels.
8212 (handle_cold_attribute): Likewise.
8214 2012-07-20 Jakub Jelinek <jakub@redhat.com>
8217 * c-common.c (check_function_nonnull): Handle multiple nonnull
8218 attributes properly.
8220 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8222 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8223 * c-ada-spec.c: Likewise.
8224 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8226 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8228 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8229 Remove code conditional on it.
8231 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8233 * c-gimplify.c: Do not include basic-block.h.
8234 * c-common.c: Do not include linfuncs.h.
8236 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8238 * c-common.h: Include tree.h.
8240 2012-07-02 Jason Merrill <jason@redhat.com>
8243 * c-common.c (get_priority): Call default_conversion.
8245 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
8247 * c-pch.c (c_common_write_pch): Remove unused variables.
8249 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8251 * cppspec.c: Moved from gcc/ to here.
8253 2012-06-27 Kai Tietz <ktietz@redhat.com>
8255 PR preprocessor/37215
8256 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8258 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8260 * c-common.h (c_common_print_pch_checksum): Remove.
8261 * c-pch.c: Do not include output.h.
8262 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8263 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8264 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8265 (struct c_pch_header): Remove.
8266 (get_ident): Update gpch version.
8267 (pch_init): Do not print executable_checksum to asm_out_file.
8268 Do not fail if there is no asm_out_file to read back from. Set
8269 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8270 (c_common_write_pch): Verify that nothing was written to asm_out_file
8271 since pch_init was called. Do not write a c_pch_header, and do not
8272 copy from asm_out_file to the PCH.
8273 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8274 the content of asm_out_file from the PCH.
8275 (c_common_print_pch_checksum): Remove.
8276 * c-opts.c (c_common_init): Print out executable_checksum directly.
8278 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8280 * c-target.def (objc_declare_unresolved_class_reference,
8281 objc_declare_class_definition): Add new hooks.
8283 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8285 * c-lex.c: Do not include output.h.
8286 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8287 Remove uses of ASM_OUTPUT_IDENT.
8289 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
8292 * c-common.h (c_build_vec_perm_expr): Move decl here.
8293 * c-common.c (c_build_vec_perm_expr): Move definition
8296 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8298 * c.opt (fconserve-space): Turn into a no-op.
8300 2012-06-04 Sterling Augustine <saugustine@google.com>
8302 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8303 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8304 both the start and end of the function.
8306 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8308 * c-common.c: Do not include output.h.
8309 * c-pragma.c: Likewise.
8311 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8313 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8314 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8315 (lang_decl_name): Handle namespace decls.
8317 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8319 * c-ada-spec.c: Do not include output.h.
8320 * c-semantics.c: Likewise.
8322 2012-05-29 Joseph Myers <joseph@codesourcery.com>
8324 * c-common.c: Fix typo.
8326 2012-05-29 Michael Matz <matz@suse.de>
8328 * c-common.h (c_expand_decl): Remove prototype.
8330 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8332 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8333 * c-opts.c (c_common_handle_option): Remove code handling
8334 warn_missing_braces.
8336 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8339 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8342 2012-05-22 Dodji Seketeli <dodji@redhat.com>
8345 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8347 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8349 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8350 * c-opts.c (c_common_handle_option): Do not handle explicitly
8351 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8353 2012-05-16 Dodji Seketeli <dodji@redhat.com>
8355 PR preprocessor/7263
8356 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8357 to cpp_classify_number. For diagnostics, use the precise location
8358 instead of the global input_location.
8360 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8363 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8365 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8367 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
8369 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8372 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8373 Wreorder): Use LangEnabledBy.
8374 * c-opts.c (c_common_handle_option): Do not enable them
8375 explicitly. Call lang-specific generated functions.
8376 (c_common_post_options): Do not set them here.
8378 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8380 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8381 Wmissing-field-initializers,Wmissing-parameter-type,
8382 Wold-style-declaration,Woverride-init): Use EnabledBy.
8383 * c-opts.c (c_common_post_options): Do not set here explicitly.
8385 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8388 * c-opts.c (c_common_handle_option): Use handle_generated_option
8389 to enable sub-options.
8391 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8394 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8396 2012-05-10 Richard Guenther <rguenther@suse.de>
8398 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8399 adjust commentary about TYPE_IS_SIZETYPE types.
8401 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8404 * c-common.c (warn_logical_operator): Check that argument of
8405 integer_zerop is not NULL.
8407 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8410 * c-common.c (warn_logical_operator): Do not warn if either side
8411 is already true or false.
8413 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8416 * c-common.c (expr_original_type): New.
8417 (shorten_compare): Do not warn for enumeration types.
8419 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8421 * c.opt (fpermissive): Add Var(flag_permissive).
8423 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
8426 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8427 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8429 2012-04-30 Dodji Seketeli <dodji@redhat.com>
8431 Add -Wvarargs option
8432 * c.opt (Wvarargs): Define new option.
8434 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8436 * c-common.c (check_function_arguments): Replace
8437 Wmissing-format-attribute with Wsuggest-attribute=format.
8439 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8441 * c.opt (Wsuggest-attribute=format): New. Alias of
8442 Wmissing-format-attribute.
8443 * c-format.c (decode_format_type): Replace
8444 Wmissing-format-attribute with Wsuggest-attribute=format.
8445 (check_function_format): Likewise.
8447 2012-04-27 Ollie Wild <aaw@google.com>
8449 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8450 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8451 * c.opt: Add Wliteral-suffix.
8453 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8456 * c.opt (Wpedantic): New.
8457 (pedantic): Alias Wpedantic.
8458 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8459 (c_common_post_options): Likewise.
8460 (sanitize_cpp_opts): Likewise.
8461 * c-lex.c (interpret_float): Likewise.
8462 * c-format.c (check_format_types): Likewise.
8463 * c-common.c (pointer_int_sum): Likewise.
8464 (c_sizeof_or_alignof_type): Likewise.
8465 (c_add_case_label): Likewise.
8466 (c_do_switch_warnings): Likewise.
8467 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8469 2012-04-15 Jason Merrill <jason@redhat.com>
8472 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8473 (C_STD_NAME): Distinguish between C++98 and C++11.
8475 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8478 * c-common.h (uint16_type_node): Rename into...
8479 (c_uint16_type_node): ...this.
8480 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8481 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8483 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8485 * c-common.c (warn_if_unused_value): Move definition to here.
8486 * c-common.h (warn_if_unused_value): Move declaration to here.
8488 2012-03-23 William Bader <williambader@hotmail.com>
8490 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8492 2012-03-20 Jason Merrill <jason@redhat.com>
8494 * c-common.h (enum cxx_dialect): Add cxx1y.
8495 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8497 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8498 * c-opts.c (c_common_post_options): Likewise.
8499 (set_std_cxx1y): New.
8500 (c_common_handle_option): Call it.
8501 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8503 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8506 * c.opt ([Wuseless-cast]): Add.
8508 2012-03-16 Richard Guenther <rguenther@suse.de>
8510 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8512 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8515 * c.opt (ftemplate-backtrace-limit) Add.
8517 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8519 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8521 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8522 (init_pragma): Don't register extern_prefix.
8524 2012-03-12 Richard Guenther <rguenther@suse.de>
8526 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8527 (builtin_type_for_size): Likewise.
8529 2012-02-13 Jakub Jelinek <jakub@redhat.com>
8532 * c-common.c (sync_resolve_params): Don't decide whether to convert
8533 or not based on TYPE_SIZE comparison, convert whenever arg_type
8534 is unsigned INTEGER_TYPE.
8536 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8539 * c.opt ([Wunused-local-typedefs]): Fix description.
8541 2012-01-24 Mike Stump <mikestump@comcast.net>
8543 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8546 2012-01-18 Richard Guenther <rguenther@suse.de>
8548 * c-opts.c (c_common_post_options): Reset LTO flags if
8549 we are about to generate a PCH.
8551 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8554 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8555 use pp_unsigned_wide_integer.
8557 2012-01-10 Richard Guenther <rguenther@suse.de>
8560 * c-opts.c (c_common_handle_option): Move -Werror handling
8561 to language independent code.
8563 2012-01-05 Richard Guenther <rguenther@suse.de>
8566 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8569 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8572 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8573 of array types with an unknown bound.
8575 2011-12-20 Joseph Myers <joseph@codesourcery.com>
8577 * c-common.c (flag_isoc99): Update comment to refer to C11.
8578 (flag_isoc1x): Change to flag_isoc11.
8579 * c-common.h (flag_isoc99): Update comment to refer to C11.
8580 (flag_isoc1x): Change to flag_isoc11.
8581 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8583 * c-opts.c (set_std_c1x): Change to set_std_c11.
8584 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8586 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8587 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8588 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8590 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8591 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8592 (std=gnu1x): Make alias of std=gnu11.
8594 2011-12-19 Jason Merrill <jason@redhat.com>
8597 * c-common.c (handle_transparent_union_attribute): Check the first
8598 field if the type is complete.
8600 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8603 * c-common.c (RID_IS_FINAL): Add.
8604 * c-common.h (RID_IS_FINAL): Add.
8606 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8608 * c.opt (fgnu-runtime): Provide full description.
8609 (fnext-runtime): Likewise.
8610 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8612 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
8614 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8615 predefines in one place. Add LOCK_FREE predefines.
8616 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8619 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
8622 * c-common.c (get_atomic_generic_size): Check for various error
8624 (resolve_overloaded_atomic_exchange,
8625 resolve_overloaded_atomic_compare_exchange,
8626 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8627 error_mark_node for error conditions.
8629 2011-11-08 Richard Guenther <rguenther@suse.de>
8632 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
8634 2011-11-07 Richard Henderson <rth@redhat.com>
8635 Aldy Hernandez <aldyh@redhat.com>
8636 Torvald Riegel <triegel@redhat.com>
8638 Merged from transactional-memory.
8640 * c-common.c (handle_tm_wrap_attribute,
8641 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8642 (struct c_common_reswords): Added __transaction* keywords.
8643 (struct c_common_attribute_table): Added transaction* and tm_regparm
8645 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8647 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8648 find_tm_attribute): Declare.
8650 2011-11-07 Jason Merrill <jason@redhat.com>
8653 * c-common.c, c-common.h: Revert yesterday's changes.
8655 2011-11-06 Jason Merrill <jason@redhat.com>
8658 * c-common.c (decl_has_visibility_attr): Split out from...
8659 (c_determine_visibility): ...here.
8660 * c-common.h: Declare it.
8662 2011-11-06 Joseph Myers <joseph@codesourcery.com>
8664 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8665 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8667 (check_user_alignment): New. Split out of
8668 handle_aligned_attribute. Disallow integer constants with
8669 noninteger types. Conditionally allow zero.
8670 (handle_aligned_attribute): Use check_user_alignment.
8671 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8673 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
8674 Richard Henderson <rth@redhat.com>
8676 Merged from cxx-mem-model.
8678 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
8679 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
8680 parameters that are the same type size.
8681 (get_atomic_generic_size): New. Find size of generic
8682 atomic function parameters and do typechecking.
8683 (add_atomic_size_parameter): New. Insert size into parameter list.
8684 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8685 either __atomic_exchange_n or external library call.
8686 (resolve_overloaded_atomic_compare_exchange): Restructure
8687 __atomic_compare_exchange to either _n variant or external library call.
8688 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
8689 __atomic_load_n or an external library call.
8690 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8691 __atomic_store_n or an external library call.
8692 (resolve_overloaded_builtin): Handle new __atomic builtins.
8694 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8697 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8698 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8699 <INDIRECT_REF>: Return the argument.
8700 <ARRAY_REF>: Remove special code for negative offset.
8701 Call fold_build_pointer_plus instead of size_binop.
8702 (fold_offsetof): Remove STOP_REF argument and adjust.
8703 * c-common.h (fold_offsetof_1): Declare.
8704 (fold_offsetof): Remove STOP_REF argument.
8706 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8709 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8710 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8711 Wnarrowing for C++0x and C++98.
8712 * c.opt ([Wnarrowing]): Update.
8714 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8717 * c.opt: Add Wzero-as-null-pointer-constant.
8719 2011-10-31 Jason Merrill <jason@redhat.com>
8721 * c.opt (-fdeduce-init-list): Off by default.
8724 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8725 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8727 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8729 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8732 * c.opt (fvisibility-inlines-hidden): Description change.
8734 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8736 Implement C++11 user-defined literals.
8737 * c-common.c (build_userdef_literal): New.
8738 * c-common.def: New tree code.
8739 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8740 * c-lex.c (interpret_float): Add suffix parm.
8741 (c_lex_with_flags): Build literal tokens.
8743 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8747 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8750 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8751 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8752 Wnarrowing for C++0x and C++98.
8753 * c.opt ([Wnarrowing]): Update.
8755 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8758 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8759 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8760 Wnarrowing for C++0x and C++98.
8761 * c.opt ([Wnarrowing]): Update.
8763 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8766 * c-common.c (conversion_warning): Remove code looking for
8767 artificial operands.
8769 2011-10-18 Dodji Seketeli <dodji@redhat.com>
8772 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
8773 !NO_IMPLICIT_EXTERN_C.
8775 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
8777 * c-common.c (c_common_reswords): Add __bases,
8779 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8781 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8784 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8786 2011-10-15 Tom Tromey <tromey@redhat.com>
8787 Dodji Seketeli <dodji@redhat.com>
8789 * c.opt (fdebug-cpp): New option.
8790 * c-opts.c (c_common_handle_option): Handle the option.
8791 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8792 output stream in parameter. Factorized from ...
8793 (maybe_print_line): ... this. Dump location debug information when
8794 -fdebug-cpp is in effect.
8795 (print_line_1): New static function. Takes an output stream in
8796 parameter. Factorized from ...
8797 (print_line): ... here. Dump location information when -fdebug-cpp
8799 (scan_translation_unit): Dump location information when
8800 -fdebug-cpp is in effect.
8802 2011-10-15 Tom Tromey <tromey@redhat.com>
8803 Dodji Seketeli <dodji@redhat.com>
8805 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8807 * c-opts.c (c_common_handle_option)<case
8808 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8809 cases. Handle -ftrack-macro-expansion with and without argument.
8811 2011-10-15 Tom Tromey <tromey@redhat.com>
8812 Dodji Seketeli <dodji@redhat.com>
8814 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8815 (print_line, cb_define, do_line_change): Adjust to avoid touching
8816 the internals of struct line_map. Use the public API instead.
8817 * c-pch.c (c_common_read_pch): Likewise.
8818 * c-lex.c (fe_file_change): Likewise.
8820 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8823 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8825 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8828 * c-pretty-print.c (pp_c_floating_constant): Output
8829 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8831 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8833 * c-common.c (def_builtin_1): Delete old interface with two
8834 parallel arrays to hold standard builtin declarations, and replace
8835 it with a function based interface that can support creating
8836 builtins on the fly in the future. Change all uses, and poison
8837 the old names. Make sure 0 is not a legitimate builtin index.
8838 * c-omp.c (c_finish_omp_barrier): Ditto.
8839 (c_finish_omp_taskwait): Ditto.
8840 (c_finish_omp_flush): Ditto.
8842 2011-10-11 Tristan Gingold <gingold@adacore.com>
8844 * c.opt: (fallow-parameterless-variadic-functions): New.
8846 2011-09-08 Dodji Seketeli <dodji@redhat.com>
8848 PR c++/33255 - Support -Wunused-local-typedefs warning
8849 * c-common.h (struct c_language_function::local_typedefs): New
8851 (record_locally_defined_typedef, maybe_record_typedef_use)
8852 (maybe_warn_unused_local_typedefs): Declare new functions.
8853 * c-common.c (record_locally_defined_typedef)
8854 (maybe_record_typedef_use)
8855 (maybe_warn_unused_local_typedefs): Define new functions.
8856 * c.opt: Declare new -Wunused-local-typedefs flag.
8858 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8861 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8864 2011-09-05 Richard Guenther <rguenther@suse.de>
8866 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8867 of integer_minus_one_node for empty array upper bounds.
8869 2011-08-28 Dodji Seketeli <dodji@redhat.com>
8871 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8872 it's the first time it's being called on this main TU.
8874 2011-08-24 Richard Guenther <rguenther@suse.de>
8877 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8879 2011-08-22 Gabriel Charette <gchare@google.com>
8881 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8882 defined in cpp_init_builtins and c_cpp_builtins.
8884 2011-08-19 Joseph Myers <joseph@codesourcery.com>
8886 * c-common.c (c_common_reswords): Add __builtin_complex.
8887 * c-common.h (RID_BUILTIN_COMPLEX): New.
8889 2011-08-18 Joseph Myers <joseph@codesourcery.com>
8891 * c-common.c (c_common_reswords): Add _Noreturn.
8892 (keyword_is_function_specifier): Handle RID_NORETURN.
8893 * c-common.h (RID_NORETURN): New.
8895 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8897 * c-common.c (unsafe_conversion_p): New function. Check if it is
8898 unsafe to convert an expression to the type.
8899 (conversion_warning): Adjust, use unsafe_conversion_p.
8900 * c-common.h (unsafe_conversion_p): New function declaration.
8902 2011-08-02 Jakub Jelinek <jakub@redhat.com>
8904 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8905 (c_finish_omp_taskyield): New prototype.
8906 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8907 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8908 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8909 or RHS1 have side-effects, evaluate those too in the right spot,
8910 if it is a decl and LHS is also a decl, error out if they
8912 (c_finish_omp_taskyield): New function.
8913 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8914 * c-pragma.c (omp_pragmas): Add taskyield.
8915 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8916 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8917 PRAGMA_OMP_CLAUSE_MERGEABLE.
8919 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8921 * c-common.h (set_underlying_type): Remove parm name from
8924 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8926 * c-pretty-print.h: Search c-common.h in c-family.
8928 2011-07-22 Jason Merrill <jason@redhat.com>
8931 * c.opt (Wnarrowing): New.
8934 * c-common.h: Declare c_linkage_bindings.
8935 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8938 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8939 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8940 as flag_isoc99 for 'restrict'.
8941 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8943 2011-07-21 Ian Lance Taylor <iant@google.com>
8946 * c-common.c (c_disable_warnings): New static function.
8947 (c_enable_warnings): New static function.
8948 (c_fully_fold_internal): Change local unused_p to bool. Call
8949 c_disable_warnings and c_enable_warnings rather than change
8950 c_inhibit_evaluation_warnings.
8952 2011-07-20 Jason Merrill <jason@redhat.com>
8954 PR c++/6709 (DR 743)
8955 PR c++/42603 (DR 950)
8956 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8957 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8958 (CPP_DECLTYPE): New.
8959 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8961 2011-07-19 Richard Guenther <rguenther@suse.de>
8963 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8964 * c-omp.c (c_finish_omp_for): Likewise.
8966 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8968 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8969 body on the next line.
8971 2011-07-08 Jason Merrill <jason@redhat.com>
8974 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8977 * c-common.c (c_apply_type_quals_to_decl): Don't check
8978 TYPE_NEEDS_CONSTRUCTING.
8980 2011-07-06 Richard Guenther <rguenther@suse.de>
8982 * c-common.c (c_common_nodes_and_builtins):
8983 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8985 2011-07-05 Richard Guenther <rguenther@suse.de>
8987 * c-common.c (c_common_nodes_and_builtins): Build all common
8990 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8992 * c-common.h (c_tree_chain_next): New static inline function.
8994 * c-common.c (check_builtin_function_arguments): Handle
8995 BUILT_IN_ASSUME_ALIGNED.
8997 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8999 * c-common.c: Add sync_ or SYNC__ to builtin names.
9000 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9002 2011-06-20 Pierre Vittet <piervit@pvittet.com>
9004 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9006 (gen_pragma_handler): New union.
9007 (internal_pragma_handler): New type.
9008 (c_register_pragma_with_data)
9009 (c_register_pragma_with_expansion_and_data): New functions.
9011 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9012 (c_register_pragma, c_register_pragma_with_expansion)
9013 (c_invoke_pragma_handler): Changed to work with
9014 internal_pragma_handler.
9015 (c_register_pragma_with_data)
9016 (c_register_pragma_with_expansion_and_data): New functions.
9018 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9020 * c-common.c: Include common/common-target.h.
9021 (handle_section_attribute): Use
9022 targetm_common.have_named_sections.
9023 * c-cppbuiltin.c: Include common/common-target.h.
9024 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9026 2011-06-10 Richard Guenther <rguenther@suse.de>
9028 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9029 to print a IDENTIFIER_NODE.
9031 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9032 Joseph Myers <joseph@codesourcery.com>
9034 * c.opt (fbuilding-libgcc): New option.
9035 * c-cppbuiltin.c (c_cpp_builtins): Define
9036 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9038 2011-06-07 Jason Merrill <jason@redhat.com>
9040 * c-common.c (max_tinst_depth): Lower default to 900.
9042 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9044 2011-06-07 Richard Guenther <rguenther@suse.de>
9046 * c-common.c (c_common_nodes_and_builtins): Do not set
9047 size_type_node or call set_sizetype.
9049 2011-06-07 Dodji Seketeli <dodji@redhat.com>
9052 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9053 type when using pointer comparison to compare types.
9055 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9057 * c.opt: Add -Wdelete-non-virtual-dtor.
9058 * c-opts.c (c_common_handle_option): Include it in -Wall.
9060 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9065 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9067 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9070 2011-05-27 Jakub Jelinek <jakub@redhat.com>
9073 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9074 C++ don't call c_common_truthvalue_conversion on void type arms.
9076 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9078 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9079 (stmt_list_stack): Define.
9080 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9081 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9083 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9085 * c-common.c (warning_candidate_p): Check for BLOCKs.
9087 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9089 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9092 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9094 * c-common.c (def_fn_type): Remove extra va_end.
9096 2011-05-23 Jason Merrill <jason@redhat.com>
9099 * c-common.c (c_common_get_narrower): New.
9100 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9102 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9104 * c-common.h (check_function_arguments): Tweak prototype of
9105 check_function_arguments.
9106 * c-common.c (check_function_arguments): Likewise. Adjust
9107 calls to check_function_nonnull, check_function_format, and
9108 check_function_sentinel.
9109 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9110 separate attributes and typelist arguments. Use
9111 FOREACH_FUNCTION_ARGS to iterate over argument types.
9113 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9115 * c-common.c (c_common_reswords): Reorder.
9116 * c-common.h (rid): Likewise.
9118 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9120 * c-common.c (def_fn_type): Don't call build_function_type, call
9121 build_function_type_array or build_varargs_function_type_array
9123 (c_common_nodes_and_builtins): Likewise.
9125 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9127 * c-common.c (c_add_case_label): Omit the loc argument to
9129 * c-common.h (build_case_label): Remove.
9130 * c-semantics.c (build_case_label): Remove.
9132 2011-05-05 Joseph Myers <joseph@codesourcery.com>
9134 * c-objc.h (objc_start_method_definition): Update prototype.
9135 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9137 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9139 * c-common.c (check_main_parameter_types): Reindent. Don't use
9140 TYPE_ARG_TYPES directly.
9141 (handle_nonnull_attribute): Likewise.
9142 (sync_resolve_params): Likewise.
9143 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9144 to check_format_string.
9145 (handle_format_attribute): Likewise.
9146 (check_format_string): Take a function type to examine instead of
9147 a type list. Use a function_arg_iterator to step through argument
9150 2011-05-04 Richard Guenther <rguenther@suse.de>
9152 * c-common.c (fix_string_type): Use size_int for index type bounds.
9153 (start_fname_decls): Do not pass NULL to build_int_cst.
9154 (c_init_attributes): Likewise.
9155 * c-lex.c (c_lex_with_flags): Likewise.
9157 2011-04-27 Jason Merrill <jason@redhat.com>
9159 * c-common.c (make_tree_vector_from_list): New.
9160 * c-common.h: Declare it.
9162 2011-04-26 Richard Guenther <rguenther@suse.de>
9164 PR preprocessor/48248
9165 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9166 for output size with -P.
9168 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9170 * c-common.c (struct c_common_resword): Add __underlying_type.
9171 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9173 2011-04-20 Jim Meyering <meyering@redhat.com>
9175 * c-format.c (init_dollar_format_checking): Remove useless
9178 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9180 * c-objc.h (objc_get_interface_ivars): Removed.
9181 (objc_detect_field_duplicates): New.
9182 * stub-objc.c: Likewise.
9184 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9186 * stub-objc.c (objc_declare_protocols): Renamed to
9187 objc_declare_protocol.
9188 * c-objc.h: Likewise.
9190 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9192 * stub-objc.c (objc_declare_class): Updated argument name.
9194 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9196 * c-common.h (c_common_init_ts): Declare.
9197 * c-common.c (c_common_init_ts): Define.
9199 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9201 * c-objc.h (objc_build_message_expr): Updated prototype.
9202 * stub-objc.c (objc_build_message_expr): Likewise.
9204 2011-04-12 Martin Jambor <mjambor@suse.cz>
9206 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9209 2011-04-11 Richard Guenther <rguenther@suse.de>
9211 * c-common.c (complete_array_type): Build a range type of
9214 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9216 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9217 (handle_type_generic_attribute): Likewise.
9219 2011-04-07 Jason Merrill <jason@redhat.com>
9222 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9223 conversion from C++0x scoped enum.
9225 2011-04-06 Joseph Myers <joseph@codesourcery.com>
9227 * c-target-def.h: New file.
9228 * c-target.def: New file.
9229 * c-target.h: New file.
9230 * c-common.c (targetcm): Don't define here.
9231 * c-common.h (default_handle_c_option): Declare.
9232 * c-format.c: Include c-target.h instead of target.h.
9233 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9235 (default_handle_c_option): Move from targhooks.c.
9237 2011-03-29 Jakub Jelinek <jakub@redhat.com>
9239 PR preprocessor/48248
9240 * c-ppoutput.c (print): Add src_file field.
9241 (init_pp_output): Initialize it.
9242 (maybe_print_line): Don't optimize by adding up to 8 newlines
9243 if map->to_file and print.src_file are different file.
9244 (print_line): Update print.src_file.
9246 2011-03-25 Kai Tietz <ktietz@redhat.com>
9248 * c-ada-spec.c (compare_comment): Use filename_cmp
9249 instead of strcmp for filename.
9251 2011-03-25 Jeff Law <law@redhat.com>
9253 * c-common.c (def_fn_type): Add missing va_end.
9255 2011-03-25 Jason Merrill <jason@redhat.com>
9257 * c.opt: Add -std=c++03.
9259 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9261 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9263 2011-03-17 Kai Tietz <ktietz@redhat.com>
9266 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9267 Display allowed attributes for function pointer types.
9268 (pp_c_attributes_display): New function to display
9269 attributes having affects_type_identity flag set to true.
9270 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9272 * c-common.c (c_common_attribute_table):
9274 (c_common_format_attribute_table): Likewise.
9276 2011-03-18 Jason Merrill <jason@redhat.com>
9278 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9279 * c-common.h: Don't declare it here.
9280 * c-common.c: Or define it here.
9281 * c-opts.c (c_common_handle_option): Or set it here.
9284 * c-common.c (handle_transparent_union_attribute): Don't
9285 make a duplicate type in C++.
9287 2011-03-15 Jason Merrill <jason@redhat.com>
9289 * c-common.c (max_constexpr_depth): New.
9290 * c-common.h: Declare it.
9291 * c-opts.c (c_common_handle_option): Set it.
9292 * c.opt (fconstexpr-depth): New option.
9294 2011-03-11 Jason Merrill <jason@redhat.com>
9296 * c-common.c (attribute_takes_identifier_p): Add missing const.
9299 * c-common.c (attribute_takes_identifier_p): Assume that an
9300 unknown attribute takes an identifier.
9302 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9305 * c-common.c (c_type_hash): Call list_length instead of iterating
9306 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9308 2011-02-19 Jakub Jelinek <jakub@redhat.com>
9311 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9313 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9315 * c.opt (fobjc-abi-version=) New.
9316 (fobjc-nilcheck): New.
9318 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9321 * c-common.h (keyword_is_decl_specifier): Declare.
9322 * c-common.c (keyword_is_decl_specifier): Define.
9323 (keyword_is_function_specifier): New function.
9325 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9328 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9329 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9332 2011-01-26 Arnaud Charlet <charlet@adacore.com>
9334 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9336 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9339 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9340 after init_c_lex if pch_file is set.
9342 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9345 * c.opt (-fkeep-inline-dllexport): New switch.
9347 2011-01-12 Richard Guenther <rguenther@suse.de>
9350 * c-common.c (handle_weak_attribute): Warn instead of error
9351 on declaring an inline function weak.
9353 2011-01-05 Tom Tromey <tromey@redhat.com>
9355 * c-common.h (lvalue_error): Update.
9356 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9359 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9362 * c-objc.h (objc_finish_message_expr): Added argument to
9365 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9367 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9370 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9372 * c-objc.h (objc_maybe_warn_exceptions): New.
9373 * stub-objc.c (objc_maybe_warn_exceptions): New.
9375 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9377 * c-common.h (readonly_error): Declare.
9378 * c-common.c (readonly_error): Define.
9380 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9382 * c-common.h (invalid_indirection_error): Declare.
9383 * c-common.c (invalid_indirection_error): Define.
9385 2010-12-03 Richard Guenther <rguenther@suse.de>
9388 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9389 (pp_c_unary_expression): Likewise.
9390 (pp_c_expression): Likewise.
9392 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9394 * c-common.h (objc_finish_function): New.
9395 (objc_non_volatilized_type): Removed.
9396 (objc_type_quals_match): Removed.
9397 * stub-objc.c (objc_finish_function): New.
9398 (objc_non_volatilized_type): Removed.
9399 (objc_type_quals_match): Removed.
9401 2010-11-30 Joseph Myers <joseph@codesourcery.com>
9403 * c-common.h (parse_optimize_options): Declare.
9404 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9405 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9407 2010-11-29 Joseph Myers <joseph@codesourcery.com>
9409 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9411 * c-pch.c (O_BINARY): Don't define here.
9412 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9414 2010-11-25 Joseph Myers <joseph@codesourcery.com>
9416 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9417 targetm.except_unwind_info.
9419 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9421 * c-opts.c (c_common_handle_option): Pass location to
9422 set_struct_debug_option.
9424 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9426 * c-common.c (visibility_options): Move from ../opts.c.
9427 * c-common.h (struct visibility_flags, visibility_options):
9429 * c-opts.c (finish_options): Rename to c_finish_options.
9430 (c_common_init): Update call to finish_options.
9432 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9435 * c-lex.c (lex_string): Check that each string in an Objective-C
9436 string concat sequence starts with either one or zero '@', and
9437 that there are no spurious '@' signs at the end.
9439 2010-11-20 Joseph Myers <joseph@codesourcery.com>
9441 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9442 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9443 HANDLE_PRAGMA_VISIBILITY.
9444 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9445 HANDLE_PRAGMA_VISIBILITY): Don't define.
9446 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9448 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9453 * c-common.h (keyword_begins_type_specifier): Declare.
9454 (keyword_is_storage_class_specifier): Declare.
9455 (keyword_is_type_qualifier): Declare.
9456 * c-common.c (keyword_begins_type_specifier): New function.
9457 (keyword_is_storage_class_specifier): New function.
9458 (keyword_is_type_qualifier): Declare.
9460 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9463 * c-common.c (in_late_binary_op): Define.
9464 (c_common_truthvalue_conversion): Check in_late_binary_op before
9465 calling c_save_expr.
9466 * c-common.h (in_late_binary_op): Declare.
9468 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9470 * c-opts.c (c_common_handle_option): Update calls to
9471 set_struct_debug_option.
9473 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9475 * c-common.h (objc_declare_protocols): Added additional argument.
9476 * stub-objc.c (objc_declare_protocol): Same change.
9478 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9481 * c-common.h (build_real_imag_expr): Declare.
9482 * c-semantics.c (build_real_imag_expr): Define.
9484 2010-11-17 Joseph Myers <joseph@codesourcery.com>
9486 * c-opts.c (c_common_parse_file): Take no arguments.
9487 * c-common.h (c_common_parse_file): Update prototype.
9489 2010-11-16 Jakub Jelinek <jakub@redhat.com>
9492 * c-common.c (warning_candidate_p): Don't track non-const calls
9495 2010-11-15 Ian Lance Taylor <iant@google.com>
9497 * c-lex.c (init_c_lex): Set macro debug callbacks if
9498 flag_dump_go_spec is set.
9500 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9502 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9503 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9505 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9507 PR preprocessor/45038
9508 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9511 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9513 * c-common.h (c_family_lang_mask): Declare.
9514 * c-opts.c (c_family_lang_mask): Make extern.
9515 * c-pragma.c (handle_pragma_diagnostic): Use
9516 control_warning_option.
9518 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9520 * c-common.c (parse_optimize_options): Update call to
9522 * c-common.h (c_common_handle_option): Update prototype.
9523 * c-opts.c (c_common_handle_option): Take location_t parameter and
9524 pass it to other functions.
9526 2010-11-11 Joseph Myers <joseph@codesourcery.com>
9528 * c-opts.c (warning_as_error_callback): Remove.
9529 (c_common_initialize_diagnostics): Don't call
9530 register_warning_as_error_callback.
9531 (c_common_handle_option): Handle -Werror=normalized= here.
9533 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9535 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9537 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9539 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9540 Remove trailing '.' from diagnostics.
9541 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9543 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9545 * c-common.c (parse_optimize_options): Pass global_dc to
9547 * c-opts.c (c_common_handle_option): Pass &global_options to
9548 set_Wstrict_aliasing.
9549 * c.opt (v): Don't mark Common or document here.
9551 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9554 * c-format.c (format_type): New type gcc_objc_string_format_type.
9555 (valid_stringptr_type_p): New.
9556 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9557 (check_format_string): Pass expected type, use
9558 valid_stringptr_type_p (), check that the format string types are
9559 consistent with the format specification.
9560 (decode_format_attr): Warn if NSString is used outside objective-c.
9561 (format_types_orig): Add NSString.
9563 (format_flags): New.
9564 (check_format_arg): Handle format strings requiring an external parser.
9565 first_target_format_type: New variable.
9566 (handle_format_attribute): Set up first_target_format_type, pass the
9567 expected format arg string type to check_format_string().
9568 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9569 * stub-objc.c (objc_string_ref_type_p): New.
9570 (objc_check_format_arg): New.
9572 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9574 Fixed using the Objective-C 2.0 dot-syntax with class names.
9575 * c-common.h (objc_build_class_component_ref): New.
9576 * stub-objc.c (objc_build_class_component_ref): New.
9578 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9580 * c.opt (Wproperty-assign-default): New option.
9582 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9584 Implemented -fobjc-std=objc1 flag.
9585 * c.opt (fobjc-std=objc1): New option.
9587 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9589 Implemented format and noreturn attributes for Objective-C methods.
9590 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9591 attribute for Objective-C methods.
9593 2010-10-31 Jason Merrill <jason@redhat.com>
9595 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9598 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9600 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9601 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9602 (objc_add_property_declaration): Removed arguments for copies and
9604 (objc_build_getter_call): Renamed to
9605 objc_maybe_build_component_ref.
9606 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9607 (objc_is_property_ref): New.
9608 * c-common.c (c_common_reswords): Removed copies and ivar.
9609 * stub-objc.c (objc_add_property_declaration): Removed arguments
9610 for copies and ivar.
9611 (objc_build_getter_call): Renamed to
9612 objc_maybe_build_component_ref.
9613 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9614 (objc_is_property_ref): New.
9616 2010-10-29 Arnaud Charlet <charlet@adacore.com>
9617 Matthew Gingell <gingell@adacore.com>
9619 * c-ada-spec.c (separate_class_package): New function.
9620 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9621 name of their enclosing package.
9622 (print_ada_declaration): Use separate_class_package.
9624 2010-10-27 Jason Merrill <jason@redhat.com>
9626 * c-common.c (c_common_reswords): Add __is_literal_type.
9627 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9629 * c-common.c (check_case_value): Remove special C++ code.
9631 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9633 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9634 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9636 (objc_add_property_declaration): Added additional arguments.
9637 (objc_property_attribute_kind): Removed.
9638 (objc_set_property_attr): Removed.
9639 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9641 * stub-objc.c (objc_add_property_declaration): Added additional
9643 (objc_set_property_attr): Removed.
9645 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9647 * c-common.h (objc_add_property_variable): Renamed to
9648 objc_add_property_declaration. Added location argument.
9649 * stub-objc.c (objc_add_property_variable): Same change.
9651 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9653 * c-common.h (objc_maybe_printable_name): New.
9654 * stub-objc.c (objc_maybe_printable_name): New.
9656 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9657 Andrew Pinski <pinskia@gmail.com>
9659 * c-common.h (c_common_mark_addressable_vec): Declare.
9660 * c-common.c (c_common_mark_addressable_vec): New function.
9662 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9664 * c-common.h (objc_set_method_type): Removed.
9665 (objc_add_method_declaration): Added boolean argument.
9666 (objc_start_method_definition): Same change.
9667 (objc_build_method_signature): Same change.
9668 * stub-objc.c (objc_set_method_type): Removed.
9669 (objc_add_method_declaration): Added boolean argument.
9670 (objc_start_method_definition): Same change.
9671 (objc_build_method_signature): Same change.
9673 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9675 * c-common.h (finish_file): Removed.
9676 (objc_write_global_declarations): New.
9677 * c-opts.c (c_common_parse_file): Do not call finish_file.
9678 * stub-objc.c (objc_write_global_declarations): New.
9680 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9682 Implemented parsing @synthesize and @dynamic for
9683 Objective-C/Objective-C++.
9684 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9685 (objc_add_synthesize_declaration): New.
9686 (objc_add_dynamic_declaration): New.
9687 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9688 * stub-objc.c (objc_add_synthesize_declaration): New.
9689 (objc_add_dynamic_declaration): New.
9691 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9694 * c-cppbuiltin.c (mode_has_fma): Move function here from
9695 builtins.c. Don't use the fma optab, instead just use the
9696 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9699 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9701 Merge from 'apple/trunk' branch on FSF servers.
9703 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
9706 * c-common.h (objc_non_volatilized_type): New declaration
9707 * stub-objc.c (objc_non_volatilized_type): New stub.
9709 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9711 Merge from 'apple/trunk' branch on FSF servers.
9713 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
9716 * c-common.h (objc_diagnose_private_ivar): New decl.
9717 * stub-objc.c (objc_diagnose_private_ivar): New stub.
9719 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9721 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9722 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9723 (objc_ivar_visibility_kind): New enum.
9724 (objc_set_visibility): Adjust prototype to use visibility enum.
9725 * stub-objc.c (objc_set_visibility): Adjust stub to use
9728 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9730 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9731 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9732 has the appropriate fma builtins.
9733 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9735 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9737 merge from FSF apple 'trunk' branch.
9738 2006 Fariborz Jahanian <fjahanian@apple.com>
9740 Radars 4436866, 4505126, 4506903, 4517826
9741 * c-common.c (c_common_resword): Define @property and its attributes.
9742 * c-common.h: Define property attribute enum entries.
9743 (OBJC_IS_PATTR_KEYWORD): New.
9744 (objc_property_attribute_kind): New enum.
9745 Declare objc_set_property_attr (), objc_add_property_variable (),
9746 objc_build_getter_call () and objc_build_setter_call ().
9747 * stub-objc.c (objc_set_property_attr): New stub.
9748 (objc_add_property_variable): Likewise.
9749 (objc_build_getter_call): Likewise.
9750 (objc_build_setter_call) Likewise.
9752 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9754 merge from FSF apple 'trunk' branch.
9755 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
9757 Radar 3803157 (method attributes)
9758 * c-common.c (handle_deprecated_attribute): Recognize
9759 objc methods as valid declarations.
9760 * c-common.h: Declare objc_method_decl ().
9761 * stub-objc.c (objc_method_decl): New stub.
9763 2010-10-08 Joseph Myers <joseph@codesourcery.com>
9765 * c-common.c (parse_optimize_options): Call
9766 decode_cmdline_options_to_array_default_mask before
9767 decode_options. Update arguments to decode_options.
9768 * c-common.h (c_common_init_options_struct): Declare.
9769 * c-opts.c (c_common_init_options_struct): New. Split out from
9770 c_common_init_options.
9772 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9774 Implemented fast enumeration for Objective-C.
9775 * c-common.h (objc_finish_foreach_loop): New.
9776 * stub-objc.c (objc_finish_foreach_loop): New.
9778 2010-10-05 Joseph Myers <joseph@codesourcery.com>
9780 * c-common.h (struct diagnostic_context): Don't declare here.
9781 (c_common_initialize_diagnostics): Declare using
9782 diagnostic_context typedef.
9783 * c-opts.c (c_common_handle_option): Pass global_dc to
9784 handle_generated_option.
9786 2010-10-04 Joseph Myers <joseph@codesourcery.com>
9788 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9789 handle_generated_option.
9791 2010-10-03 Ian Lance Taylor <iant@google.com>
9793 * c.opt (-fplan9-extensions): New option.
9795 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9797 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9799 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9800 of duplicating code.
9802 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9804 * c-common.c: Add two new entries for @optional
9805 and @required keywords.
9807 merge from FSF 'apple/trunk' branch.
9808 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
9811 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9812 objective-c keywords.
9813 (objc_set_method_opt): New declaration.
9814 * stub-objc.c (objc_set_method_opt): New stub.
9816 2010-09-30 Joseph Myers <joseph@codesourcery.com>
9818 * c-common.c (handle_optimize_attribute): Pass &global_options to
9819 cl_optimization_save and cl_optimization_restore.
9820 * c-opts.c (c_common_handle_option): Pass &global_options to
9821 handle_generated_option.
9822 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9823 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9824 &global_options to cl_optimization_restore.
9826 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9828 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9829 Objective-C/Objective-C++ keywords.
9831 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9833 Merge from 'apple/trunk' branch on FSF servers.
9835 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
9838 * c-common.h (objc_check_global_decl): New declaration.
9839 * stub-objc.c (objc_check_global_decl): New stub.
9841 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9843 * c.opt: Don't use VarExists.
9845 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9847 * c-common.c (c_cpp_error): Update names of diagnostic_context
9849 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9850 cl_optimization members.
9851 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9852 sanitize_cpp_opts, finish_options): Update names of cpp_options
9855 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9857 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9858 (objc_is_reserved_word): Removed.
9859 * c-common.c: Updated comments.
9860 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9861 objc_is_reserved_word.
9862 * stub-objc.c (objc_is_reserved_word): Removed.
9864 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9866 * c-common.h (objc_add_method_declaration): Adjust prototype to
9868 (objc_start_method_definition): Likewise.
9869 (objc_build_keyword_decl): Likewise.
9870 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9871 (objc_start_method_definition): Likewise.
9872 (objc_build_keyword_decl): Likewise.
9874 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9876 * c-common.h (objc_start_class_interface): Adjust prototype.
9877 (objc_start_category_interface): Likewise.
9878 (objc_start_protocol): Likewise.
9879 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9880 (objc_start_class_interface): Likewise.
9881 (objc_start_category_interface): Likewise.
9883 2010-09-27 Ian Lance Taylor <iant@google.com>
9885 * c-common.c (c_common_attribute_table): Add no_split_stack.
9886 (handle_no_split_stack_attribute): New static function.
9888 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9890 Merge from 'apple/trunk' branch on FSF servers.
9892 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
9895 * c-common.h (objc_have_common_type): New declaration.
9896 * stub-objc.c (objc_have_common_type): New stub.
9898 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9901 * c-common.h (objc_common_type): New prototype.
9902 * stub-objc.c (objc_common_type): New stub.
9904 2010-09-24 Jan Hubicka <jh@suse.cz>
9906 * c-common.c (handle_leaf_attribute): New function.
9907 (struct attribute_spec c_common_att): Add leaf.
9909 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9911 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9912 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9913 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9914 -include-barrier, -include-directory, -include-directory=,
9915 -include-directory-after, -include-directory-after=,
9916 -include-prefix, -include-prefix=, -include-with-prefix,
9917 -include-with-prefix=, -include-with-prefix-after,
9918 -include-with-prefix-after=, -include-with-prefix-before,
9919 -include-with-prefix-before=, -no-integrated-cpp,
9920 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9921 -output=, -pedantic, -pedantic-errors, -preprocess,
9922 -print-missing-file-dependencies, -trace-includes, -traditional,
9923 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9924 -user-dependencies, -verbose, -write-dependencies,
9925 -write-user-dependencies, no-integrated-cpp, traditional): New.
9927 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9930 * c-common.h (objc_start_method_definition): Return bool instead
9932 * stub-objc.c (objc_start_method_definition): Return bool instead
9935 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9938 * c-common.h (objc_get_interface_ivars): New declaration.
9939 * stub-objc.c (objc_get_interface_ivars): New stub.
9941 2010-09-15 Ian Lance Taylor <iant@google.com>
9943 * c-common.c (parse_optimize_options): Do not capitalize warning
9944 messages. Remove period at end of warning message.
9946 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9948 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9949 (handle_alias_attribute): ... here.
9950 (handle_ifunc_attribute): New.
9952 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9954 * c-common.h (do_warn_double_promotion): Declare.
9955 * c-common.c (do_warn_double_promotion): Define.
9957 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9959 * c.opt (Wdouble-promotion): New.
9961 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9963 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9964 fvtable-thunks, fxref): Mark no longer supported in help text.
9966 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9968 * c.opt (Wimport, fall-virtual, falt-external-templates,
9969 fdefault-inline, fenum-int-equiv, fexternal-templates,
9970 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9971 fname-mangling-version-, fnew-abi, fnonnull-objects,
9972 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9973 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9975 (fhandle-exceptions): Mark with Alias and Warn.
9976 * c-opts.c (c_common_handle_option): Don't handle options marked
9979 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9981 * c.opt (Wcomments, Werror-implicit-function-declaration,
9982 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9983 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9985 * c-common.c (option_codes): Use OPT_Wcomment instead of
9987 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9988 Don't handle options marked as aliases.
9990 2010-08-25 Richard Guenther <rguenther@suse.de>
9992 * c-common.c (c_common_get_alias_set): Remove special
9993 handling for pointers.
9995 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9997 * c-common.c: Use FOR_EACH_VEC_ELT.
9998 * c-gimplify.c: Likewise.
9999 * c-pragma.c: Likewise.
10001 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10003 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10005 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10007 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10008 instead of OPT_MDX and OPT_MMDX.
10010 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10012 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10014 2010-08-12 Joseph Myers <joseph@codesourcery.com>
10016 * c.opt (MD, MMD): Change to MDX and MMDX.
10017 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10019 2010-08-11 Joseph Myers <joseph@codesourcery.com>
10021 * c-opts.c (c_common_handle_option): Call handle_generated_option
10022 instead of handle_option.
10024 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10026 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10027 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10029 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10031 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10032 (pending_redefine_extname): Change type to a VEC.
10033 (add_to_renaming_pragma_list): Update for new type of
10034 pending_redefine_extname.
10035 (maybe_apply_renaming_pragma): Likewise.
10037 2010-08-04 Arnaud Charlet <charlet@adacore.com>
10039 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10041 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10042 decide whether a type has already been declared/seen.
10043 Do not go to the original type.
10044 (dump_nested_types): New parameter forward.
10045 Generate forward declaration if needed and mark type as visited.
10046 (print_ada_declaration): Call dump_nested_types if not already done.
10047 Mark types as visited.
10049 2010-08-03 Joseph Myers <joseph@codesourcery.com>
10051 * c.opt (-print-pch-checksum): Remove option.
10052 * c-opts.c (c_common_handle_option): Don't handle
10053 OPT_print_pch_checksum.
10055 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10057 * c-common.h (c_common_handle_option): Update prototype and return
10059 * c-opts.c (c_common_handle_option): Update prototype and return
10060 value type. Update calls to handle_option and
10061 enable_warning_as_error.
10063 2010-07-27 Jakub Jelinek <jakub@redhat.com>
10066 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10068 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10070 * c-common.h (c_common_missing_argument): Remove.
10071 * c-opts.c (c_common_missing_argument): Remove.
10072 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10073 idirafter, imacros, include, isysroot, isystem, iquote): Add
10075 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10077 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10079 * c-common.h (c_common_option_lang_mask,
10080 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10082 (c_common_init_options): Update prototype.
10083 * c-opts.c (c_common_option_lang_mask): New.
10084 (c_common_initialize_diagnostics): Split out of
10085 c_common_init_options.
10086 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10088 (c_common_init_options): Update prototype. Use decoded options in
10089 search for -lang-asm.
10091 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10093 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10094 * c-format.c: Likewise.
10096 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10098 * c-common.h: Include diagnostic-core.h. Error if already
10100 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10102 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10104 * c-common.c (IN_GCC_FRONTEND): Do not undef.
10105 Do not include expr.h
10106 (vector_mode_valid_p): Move here.
10108 2010-06-21 DJ Delorie <dj@redhat.com>
10110 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10111 allow these pragmas anywhere.
10113 2010-06-14 Jakub Jelinek <jakub@redhat.com>
10116 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10117 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10118 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10119 ggc_strdup instead of xstrdup.
10121 2010-06-10 Jakub Jelinek <jakub@redhat.com>
10123 * c-cppbuiltin.c: Include cpp-id-data.h.
10124 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10125 (lazy_hex_fp_value): New function.
10126 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10128 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10130 * c-gimplify.c: Do not include tree-flow.h
10132 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10135 * c-common.c: Rename targetm member:
10136 targetm.enum_va_list -> targetm.enum_va_list_p
10138 2010-06-28 Anatoly Sokolov <aesok@post.ru>
10140 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10142 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10144 * c-cppbuiltin.c: Do not include except.h.
10146 2010-06-24 Andi Kleen <ak@linux.intel.com>
10148 * c-common.c (warn_for_omitted_condop): New.
10149 * c-common.h (warn_for_omitted_condop): Add prototype.
10151 2010-06-21 Joseph Myers <joseph@codesourcery.com>
10153 * c.opt (lang-objc): Remove.
10154 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10156 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10158 * c-opts.c: Include "tm_p.h".
10160 2010-06-20 Joseph Myers <joseph@codesourcery.com>
10162 * c-common.c (parse_optimize_options): Update call to
10165 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10167 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10168 new type of types_used_by_cur_var_decl.
10170 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10173 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10174 for C++ standard compliance.
10176 2010-06-16 Jason Merrill <jason@redhat.com>
10178 * c.opt: Add -Wnoexcept.
10180 2010-06-16 Richard Guenther <rguenther@suse.de>
10183 * c-common.c (c_common_truthvalue_conversion): Remove
10184 premature and wrong optimization concering ADDR_EXPRs.
10186 2010-06-15 Arnaud Charlet <charlet@adacore.com>
10188 * c-ada-spec.c (dump_sloc): Remove column info.
10189 (is_simple_enum): New function.
10190 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10191 enum types when relevant.
10193 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10195 * c-common.c (conversion_warning): Warn at expression
10198 2010-06-10 Joseph Myers <joseph@codesourcery.com>
10200 * c-opts.c (c_common_handle_option): Don't handle
10203 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10205 * c-pragma.c (push_alignment): Use typed GC allocation.
10206 (handle_pragma_push_options): Likewise.
10208 * c-common.c (parse_optimize_options): Likewise.
10210 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10213 2010-06-07 Joseph Myers <joseph@codesourcery.com>
10215 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10216 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10217 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10218 flag_signed_bitfields, warn_strict_null_sentinel,
10219 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10220 flag_gen_declaration, flag_no_gnu_keywords,
10221 flag_implement_inlines, flag_implicit_templates,
10222 flag_implicit_inline_templates, flag_optional_diags,
10223 flag_elide_constructors, flag_default_inline, flag_rtti,
10224 flag_conserve_space, flag_access_control, flag_check_new,
10225 flag_new_for_scope, flag_weak, flag_working_directory,
10226 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10227 flag_enforce_eh_specs, flag_threadsafe_statics,
10228 flag_pretty_templates): Remove.
10229 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10230 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10231 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10232 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10233 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10234 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10235 flag_no_gnu_keywords, flag_implement_inlines,
10236 flag_implicit_templates, flag_implicit_inline_templates,
10237 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10238 flag_rtti, flag_conserve_space, flag_access_control,
10239 flag_check_new, flag_new_for_scope, flag_weak,
10240 flag_working_directory, flag_use_cxa_atexit,
10241 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10242 flag_threadsafe_statics, flag_pretty_templates,
10243 warn_strict_null_sentinel): Remove.
10244 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10245 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10246 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10247 fimplicit-inline-templates, fimplicit-templates,
10248 flax-vector-conversions, fms-extensions, fnil-receivers,
10249 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10250 frtti, fshort-double, fshort-enums, fshort-wchar,
10251 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10252 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10253 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10254 gen-decls, undef): Use Var.
10255 (fdefault-inline, foptional-diags): Document as doing nothing.
10256 * c-opts.c (c_common_handle_option): Remove cases for options now
10257 using Var. Mark ignored options as such.
10259 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10261 * c-common.c: Moved to here from parent directory.
10262 * c-common.def: Likewise.
10263 * c-common.h: Likewise.
10264 * c-cppbuiltin.c: Likewise.
10265 * c-dump.c: Likewise.
10266 * c-format.c: Likewise.
10267 * c-format.h : Likewise.
10268 * c-gimplify.c: Likewise.
10269 * c-lex.c: Likewise.
10270 * c-omp.c: Likewise.
10272 * c-opts.c: Likewise.
10273 * c-pch.c: Likewise.
10274 * c-ppoutput.c: Likewise.
10275 * c-pragma.c: Likewise.
10276 * c-pragma.h: Likewise.
10277 * c-pretty-print.c: Likewise.
10278 * c-pretty-print.h: Likewise.
10279 * c-semantics.c: Likewise.
10280 * stub-objc.c: Likewise.
10282 * c-common.c: Include gt-c-family-c-common.h.
10283 * c-pragma.c: Include gt-c-family-c-pragma.h.
10285 Copyright (C) 2010-2019 Free Software Foundation, Inc.
10287 Copying and distribution of this file, with or without modification,
10288 are permitted in any medium without royalty provided the copyright
10289 notice and this notice are preserved.