1 2020-05-20 Nathan Sidwell <nathan@acm.org>
3 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
5 * c-common.c (try_to_locate_new_include_insertion_point): Use
6 strcmp to compare filenames.
7 * c-lex.c (init_c_lex): Move declaration to initialization.
8 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
11 2020-05-15 Jason Merrill <jason@redhat.com>
13 * c-opts.c (set_std_cxx20): Set flag_coroutines.
15 2020-05-13 Jason Merrill <jason@redhat.com>
17 * c.opt (std=c++20): Make c++2a the alias.
18 (std=gnu++20): Likewise.
19 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
21 * c-cppbuiltin.c: Adjust.
25 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
27 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
29 2020-05-08 Nathan Sidwell <nathan@acm.org>
31 Reimplement directives only processing.
32 * c-ppoutput.c (token_streamer): Ne.
33 (directives_only_cb): New. Swallow ...
34 (print_lines_directives_only): ... this.
35 (scan_translation_unit_directives_only): Reimplment using the
38 2020-05-07 Marek Polacek <polacek@redhat.com>
40 * c-format.c (badwords): Add "nonstatic".
42 202-05-07 Jakub Jelinek <jakub@redhat.com>
45 * c-common.c (speculation_safe_value_resolve_params): Return false if
46 error_operand_p (val2).
47 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
48 Remove extraneous semicolon.
50 2020-05-06 qing zhao <qing.zhao@oracle.com>
53 * c-indentation.c (get_visual_column): Add a hint to use the new
54 -flarge-source-files option.
56 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
58 * c-attribs.c (handle_vector_size_attribute): Add attribute
59 nonnull for argument args in order to silence warning of
60 uninitialized variable usage. Since this is local to the
61 compilation unit and thus cannot be checked at call sides by the
62 compiler, added an assert statement in order to verify this.
64 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
67 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
68 value to USHRT_MAX (65535).
70 2020-04-29 Jakub Jelinek <jakub@redhat.com>
72 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
74 2020-04-27 Jakub Jelinek <jakub@redhat.com>
77 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
78 fncode == BUILT_IN_NONE before initialization of first_param.
80 2020-04-23 Marek Polacek <polacek@redhat.com>
83 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
86 2020-04-14 Patrick Palka <ppalka@redhat.com>
89 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
90 ampersand if it's an rvalue reference type.
92 2020-04-13 Martin Sebor <msebor@redhat.com>
95 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
96 printing array bound for flexible array members.
98 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
100 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
103 2020-04-02 Richard Biener <rguenther@suse.de>
106 * c-opts.c (c_common_post_options): Enable -ffinite-loops
107 for -O2 and C++11 or newer.
109 2020-03-28 Patrick Palka <ppalka@redhat.com>
111 * c.opt: Add -fconcepts-diagnostics-depth.
113 2020-03-27 Martin Sebor <msebor@redhat.com>
116 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
117 to decl_attributes. Make handling of different kinds of entities
120 2020-03-27 Martin Sebor <msebor@redhat.com>
123 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
126 2020-03-23 Jakub Jelinek <jakub@redhat.com>
129 * c-warn.c (warnings_for_convert_and_check): For expr and/or
130 result being COMPOUND_EXPRs, skip to ultimate rhs.
132 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
135 * c-common.c (c_common_type_for_mode): Before using a registered
136 built-in type, check that the vectorness of the type matches
137 the vectorness of the mode.
139 2020-03-17 Jakub Jelinek <jakub@redhat.com>
141 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
142 issue in a diagnostic message.
144 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
146 * c.opt: Avoid redundancy in the help text.
148 2020-03-02 Marek Polacek <polacek@redhat.com>
150 PR c++/93958 - add missing -std=gnu++20.
151 * c.opt: Add -std=gnu++20.
153 2020-03-01 Martin Sebor <msebor@redhat.com>
156 * c-attribs.c (append_access_attrs): Correctly handle attribute.
157 (handle_access_attribute): Same.
159 2020-02-25 Jakub Jelinek <jakub@redhat.com>
162 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
163 "did you mean" hint in diagnostics.
165 2020-02-15 Jason Merrill <jason@redhat.com>
167 * c.opt: Add -std=c++20.
169 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
171 * c-ada-spec.c: Include bitmap.h.
172 (dump_ada_double_name): Rename into...
173 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
174 (dump_ada_array_type): Adjust to above renaming. Robustify.
175 (dump_nested_types_1): New function copied from... Add dumped_types
176 parameter and pass it down to dump_nested_type.
177 (dump_nested_types): ...this. Remove parent parameter. Just call
178 dump_nested_types_1 on an automatic bitmap.
179 (dump_nested_type): Add dumped_types parameter.
180 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
181 Adjust recursive calls and adjust to above renaming.
182 (dump_ada_declaration): Adjust call to dump_nested_types.
183 Tidy up and adjust to above renaming.
184 (dump_ada_specs): Initialize and release bitmap obstack.
186 2020-02-10 Martin Sebor <msebor@redhat.com>
189 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
191 2020-02-10 Jakub Jelinek <jakub@redhat.com>
194 * c-format.c (check_plain): Fix up last argument of strncasecmp.
195 Remove useless extra test.
197 2020-02-03 Julian Brown <julian@codesourcery.com>
198 Tobias Burnus <tobias@codesourcery.com>
200 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
202 2020-01-29 Jason Merrill <jason@redhat.com>
205 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
207 2020-01-23 Jason Merrill <jason@redhat.com>
209 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
211 2020-01-23 Martin Sebor <msebor@redhat.com>
214 * c-common.c (check_function_arguments): Avoid overlap checking
215 of sprintf functions.
217 2020-01-22 Jason Merrill <jason@redhat.com>
219 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
221 * c-warn.c (conversion_warning): Check operands only after checking
222 the whole expression. Don't check second operand of + for sign.
224 2020-01-21 Jason Merrill <jason@redhat.com>
225 Manuel López-Ibáñez <manu@gcc.gnu.org>
227 PR c++/40752 - useless -Wconversion with short +=.
228 * c.opt (-Warith-conversion): New.
229 * c-warn.c (conversion_warning): Recurse for operands of
230 operators. Only warn about the whole expression with
233 2020-01-21 Jason Merrill <jason@redhat.com>
235 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
236 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
238 2020-01-20 Nathan Sidwell <nathan@acm.org>
240 PR preprocessor/80005
241 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
243 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
245 * c-common.c (co_await, co_yield, co_return): New.
246 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
247 RID_CO_RETURN): New enumeration values.
248 (D_CXX_COROUTINES): Bit to identify coroutines are active.
249 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
250 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
251 * c.opt (fcoroutines): New command-line switch.
253 2020-01-10 David Malcolm <dmalcolm@redhat.com>
255 * c-format.c (local_event_ptr_node): New.
256 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
257 (init_dynamic_diag_info): Initialize local_event_ptr_node.
258 * c-format.h (T_EVENT_PTR): New define.
260 2020-01-10 Martin Sebor <msebor@redhat.com>
263 * c-attribs.c (append_access_attrs): Validate against the translated
264 access string rather than the human-readable representation.
266 2020-01-01 Jakub Jelinek <jakub@redhat.com>
268 Update copyright years.
270 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
272 * c-ada-spec.h (decl_sloc): Delete.
273 * c-ada-spec.c (decl_sloc): Make static.
275 2019-12-19 Julian Brown <julian@codesourcery.com>
277 * c-common.h (c_omp_map_clause_name): Add prototype.
278 * c-omp.c (c_omp_map_clause_name): New function.
279 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
280 PRAGMA_OACC_CLAUSE_DETACH.
282 2019-12-19 Julian Brown <julian@codesourcery.com>
283 Maciej W. Rozycki <macro@codesourcery.com>
284 Tobias Burnus <tobias@codesourcery.com>
285 Thomas Schwinge <thomas@codesourcery.com>
287 * c-pragma.h (pragma_omp_clause): Add
288 PRAGMA_OACC_CLAUSE_NO_CREATE.
290 2019-12-17 Martin Sebor <msebor@redhat.com>
293 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
295 2019-12-11 David Malcolm <dmalcolm@redhat.com>
297 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
299 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
301 2019-12-09 David Malcolm <dmalcolm@redhat.com>
303 * c-format.c (range_label_for_format_type_mismatch::get_text):
304 Replace label_text ctor called with true with label_text::take.
306 2019-12-09 David Malcolm <dmalcolm@redhat.com>
308 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
309 initial newline from expected outputs.
310 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
311 call to diagnostic_show_locus.
313 2019-12-06 Jakub Jelinek <jakub@redhat.com>
315 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
318 2019-12-05 Marek Polacek <polacek@redhat.com>
319 Jakub Jelinek <jakub@redhat.com>
321 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
322 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
324 2019-12-05 Marek Polacek <polacek@redhat.com>
326 PR c++/92271 - make __is_same alias for __is_same_as.
327 * c-common.c: Add __is_same, an alias for __is_same_as.
329 2019-12-03 Marek Polacek <polacek@redhat.com>
331 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
332 * c-cppbuiltin.c (c_cpp_builtins): Predefine
333 __cpp_aggregate_paren_init=201902 for -std=c++2a.
335 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
337 * c-attribs.c (handle_symver_attribute): New function
338 (c_common_attributes): Add symver.
340 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
342 * c-common.c (pointer_int_sum): Use verify_type_context to check
343 whether the target allows pointer arithmetic for the types involved.
344 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
345 to check whether the target allows sizeof and alignof operations
346 for the types involved.
348 2019-11-27 Jason Merrill <jason@redhat.com>
350 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
352 2019-11-26 Jakub Jelinek <jakub@redhat.com>
355 * c-attribs.c (handle_mode_attribute): Add mode attribute to
358 2019-11-25 Joseph Myers <joseph@codesourcery.com>
361 * c-common.c (c_common_type_for_mode): Handle decimal
362 floating-point types being NULL_TREE.
363 * c-format.c (get_format_for_type_1): Handle specified types being
365 * c-lex.c (interpret_float): Give an error for decimal
366 floating-point constants when decimal floating-point not
369 2019-11-23 Jakub Jelinek <jakub@redhat.com>
372 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
373 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
374 group warning with inform together.
375 (handle_access_attribute): Formatting fix.
377 2019-11-22 Jakub Jelinek <jakub@redhat.com>
380 * c-common.h (identifier_global_tag): Declare.
381 * c-format.c (get_pointer_to_named_type): Renamed to ...
382 (get_named_type): ... this. Use identifier_global_tag instead of
383 identifier_global_value, handle the return value being a TYPE_P.
384 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
385 to call get_named_type instead. Formatting fixes.
387 Implement P1902R1, Missing feature-test macros 2017-2019.
388 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
389 and __cpp_generic_lambdas for -std=c++2a. Define
390 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
391 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
392 __cpp_concepts for -std=c++2a.
394 2019-11-22 Martin Sebor <msebor@redhat.com>
397 * c-attribs.c (handle_access_attribute): New function.
398 (c_common_attribute_table): Add new attribute.
399 (get_argument_type): New function.
400 (append_access_attrs): New function.
401 (get_nonnull_operand): Rename...
402 (get_attribute_operand): ...to this.
403 * c-common.c (get_nonnull_operand): Rename...
404 (get_attribute_operand): ...to this.
406 2019-11-21 Joseph Myers <joseph@codesourcery.com>
408 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
411 2019-11-19 Joseph Myers <joseph@codesourcery.com>
413 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
414 warning for standard attributes mixed with fallthrough attributes.
416 2019-11-15 Joseph Myers <joseph@codesourcery.com>
418 * c-attribs.c (handle_fallthrough_attribute): Remove static.
419 * c-common.h (handle_fallthrough_attribute): Declare.
421 2019-11-15 Joseph Myers <joseph@codesourcery.com>
423 * c-attribs.c (handle_deprecated_attribute): Remove static.
424 * c-common.h (handle_deprecated_attribute): Declare.
426 2019-11-14 Joseph Myers <joseph@codesourcery.com>
428 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
431 2019-11-14 Jakub Jelinek <jakub@redhat.com>
433 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
436 * c-omp.c (c_omp_check_context_selector): Handle name lists
437 containing string literals. Don't diagnose atomic_default_mem_order
440 2019-11-13 Joseph Myers <joseph@codesourcery.com>
442 * c-cppbuiltin.c (builtin_define_float_constants): Also define
443 NORM_MAX constants. Update call to get_max_float.
444 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
447 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
449 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
450 (dump_forward_type): Do not generate a declaration for function types.
451 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
452 of the component type if it is declared in another file.
454 2019-11-12 Martin Liska <mliska@suse.cz>
456 * c-opts.c (c_common_post_options):
457 Use SET_OPTION_IF_UNSET.
459 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
460 Frederik Harwath <frederik@codesourcery.com>
463 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
465 * c-pragma.c (oacc_pragmas): Add "serial" entry.
467 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
469 * c-common.h (gnu_vector_type_p): New function.
470 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
471 vectors to satisfy gnu_vector_type_p.
472 (c_build_vec_convert): Likewise __builtin_convertvector.
473 (convert_vector_to_array_for_subscript): Likewise when applying
474 implicit vector to array conversion.
475 (scalar_to_vector): Likewise when converting vector-scalar
476 operations to vector-vector operations.
478 2019-11-08 Joseph Myers <joseph@codesourcery.com>
480 * c.opt (Wold-style-definition): Initialize to -1.
481 * c-opts.c (c_common_post_options): Set warn_old_style_definition
482 to flag_isoc2x if not set explicitly.
484 2019-11-07 Joseph Myers <joseph@codesourcery.com>
486 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
488 2019-11-05 Jason Merrill <jason@redhat.com>
490 * c-opts.c (c_common_post_options): -fconcepts-ts implies
493 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
495 * c-opts.c (c_common_post_options): Update
498 2019-11-02 Jakub Jelinek <jakub@redhat.com>
500 * c-common.h (c_omp_get_context_selector): Remove.
501 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
502 and renamed to omp_get_context_selector.
504 * c-omp.c (c_omp_mark_declare_variant): Use
505 omp_context_selector_set_compare.
507 PR c++/88335 - Implement P1073R3: Immediate functions
508 * c-common.h (enum rid): Add RID_CONSTEVAL.
509 * c-common.c (c_common_reswords): Add consteval.
511 2019-11-01 Martin Sebor <msebor@redhat.com>
517 * c-pretty-print.c (direct_abstract_declarator): Print
518 bound in zero-length arrays.
519 * c.opt (-Wzero-length-bounds): New option.
521 2019-10-30 Nathan Sidwell <nathan@acm.org>
523 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
526 2019-10-28 Martin Sebor <msebor@redhat.com>
529 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
530 even when only preprocessing.
531 * c-common.h (names_builtin_p): Declare new function.
532 * c-lex.c (init_c_lex): Set has_builtin.
533 (c_common_has_builtin): Define a new function.
534 * c-ppoutput.c (init_pp_output): Set has_builtin.
536 2019-10-24 Jakub Jelinek <jakub@redhat.com>
538 * c-common.h (c_omp_context_selector_matches): Remove.
539 * c-omp.c (c_omp_context_selector_matches): Remove.
540 * c-attribs.c (c_common_attribute_table): Add
541 "omp declare target {host,nohost,block}" attributes.
543 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
545 * c-lex.c (c_common_has_attribute): Update nodiscard value.
547 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
549 * c-common.h (user_facing_original_type_p): Declare.
550 * c-common.c: Include c-spellcheck.h.
551 (user_facing_original_type_p): New function.
553 2019-10-12 Jakub Jelinek <jakub@redhat.com>
555 * c-common.h (c_omp_mark_declare_variant,
556 c_omp_context_selector_matches): Declare.
557 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
559 (c_omp_get_context_selector): Support second argument NULL.
560 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
562 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
563 attribute, add "omp declare variant base" and
564 "omp declare variant variant" attributes.
566 2019-10-11 Joseph Myers <joseph@codesourcery.com>
568 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
569 CppReason(CPP_W_C11_C2X_COMPAT).
571 2019-10-11 Joseph Myers <joseph@codesourcery.com>
573 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
574 _Decimal64 and _Decimal128.
576 2019-10-10 Joseph Myers <joseph@codesourcery.com>
578 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
579 types if DFP not supported.
581 2019-10-10 Jakub Jelinek <jakub@redhat.com>
583 * c-common.h (c_omp_check_context_selector,
584 c_omp_get_context_selector): Declare.
585 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
586 in diagnostic message.
587 (c_omp_check_context_selector, c_omp_get_context_selector): New
589 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
591 (handle_omp_declare_variant_attribute): New function.
593 2019-10-09 Martin Sebor <msebor@redhat.com>
595 PR tree-optimization/90879
596 * c.opt (-Wstring-compare): New option.
598 2019-10-08 Andrew Sutton <asutton@lock3software.com>
599 Jason Merrill <jason@redhat.com>
601 Update the concepts implementation to conform to the C++20
602 specification, improve compile times, and generally clean up
605 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
606 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
607 * c.opt: Add -Wconcepts-ts.
608 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
609 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
610 (set_std_cxx2a): Enable concepts by default.
612 2019-10-08 Joseph Myers <joseph@codesourcery.com>
614 * c-opts.c (c_common_post_options): Set
615 -fno-fp-int-builtin-inexact for C2X.
617 2019-10-05 Jakub Jelinek <jakub@redhat.com>
619 PR c++/91369 - Implement P0784R7: constexpr new
620 * c-cppbuiltin.c (c_cpp_builtins): Predefine
621 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
623 2019-10-04 Joseph Myers <joseph@codesourcery.com>
626 * c-format.c (C_STD_VER): Handle C2x.
627 (C_STD_NAME): Likewise.
628 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
629 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
630 modifier allowed and 'p' flag.
631 * c-format.h (enum format_std_version): Add STD_C2X.
632 (struct format_char_info): Mention 'p' in comment on flags2.
634 2019-10-01 David Malcolm <dmalcolm@redhat.com>
636 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
637 calling diagnostic_show_locus, rather than destroying it afterwards.
639 2019-10-01 Jakub Jelinek <jakub@redhat.com>
642 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
643 with NULL DECL_FIELD_OFFSET.
645 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
647 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
648 has a type name, use it in preference to the __vector syntax.
650 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
652 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
653 two spaces between a comma and "...".
655 2019-09-27 Jakub Jelinek <jakub@redhat.com>
658 * c-common.h (c_omp_predefined_variable): Declare.
659 * c-omp.c (c_omp_predefined_variable): New function.
660 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
661 for predefined variables.
663 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
665 * c-common.h (build_function_call_vec): Take the original
666 function decl as an optional final parameter.
667 (check_builtin_function_arguments): Take the original function decl.
668 * c-common.c (check_builtin_function_arguments): Likewise.
669 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
670 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
672 2019-09-15 Jason Merrill <jason@redhat.com>
674 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
675 fold_for_warn in "|| mask" warning.
677 2019-09-10 Martin Liska <mliska@suse.cz>
679 * c.opt: Use newly added WarnRemoved.
681 2019-09-09 Martin Liska <mliska@suse.cz>
683 * c.opt: Update comment of removed
684 options that are preserved only for backward
687 2019-09-06 Martin Liska <mliska@suse.cz>
690 * c-common.c: Remove definition of flag_use_repository.
691 * c-common.h: Likewise.
692 * c-opts.c (c_common_handle_option):
693 Do not handle OPT_frepo option.
694 * c.opt: Mark the option with Deprecated.
696 2019-09-04 Marek Polacek <polacek@redhat.com>
698 * c.opt (fdeduce-init-list): Ignored.
700 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
703 * c.opt (Wenum-conversion): New option.
705 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
707 * c-attribs.c (handle_section_attribute): Call the
708 handle_generic_attribute target hook after performing target
709 independent processing.
710 (handle_noinit_attribute): Likewise.
712 2019-09-03 Ian Lance Taylor <iant@golang.org>
714 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
715 when using -fgo-dump-spec.
717 2019-09-02 Martin Liska <mliska@suse.cz>
720 * c-common.c (fname_as_string): Use cxx_printable_name for
721 __PRETTY_FUNCTION__ same as was used before r265711.
723 2019-08-28 Marek Polacek <polacek@redhat.com>
725 Implement P1152R4: Deprecating some uses of volatile.
727 * c-opts.c (c_common_post_options): Enable -Wvolatile by
728 default for C++2a, unless -Wno-deprecated.
729 * c.opt (Wvolatile): New warning.
731 2019-08-28 Marek Polacek <polacek@redhat.com>
733 PR c++/91360 - Implement C++20 P1143R2: constinit.
734 * c-common.c (c_common_reswords): Add constinit and __constinit.
735 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
736 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
739 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
740 * c-format.c (cxx_keywords): Add "constinit".
741 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
743 2019-08-27 Jakub Jelinek <jakub@redhat.com>
746 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
747 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
748 like COMPOUND_EXPR rather than normal expression.
750 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
753 * c-lex.c (c_lex_with_flags): Don't call
754 c_common_no_more_pch () from here.
756 2019-08-23 Jakub Jelinek <jakub@redhat.com>
759 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
760 instead of flag_excess_precision_cmdline.
761 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
762 * c-opts.c (c_common_post_options): Likewise.
764 2019-08-22 Martin Sebor <msebor@redhat.com>
767 * c-common.c (braced_list_to_string): Add argument and overload.
768 Handle flexible length arrays and unions.
770 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
772 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
773 function declarations where arguments are missing. Rename variables.
775 2019-08-15 Richard Biener <rguenther@suse.de>
777 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
778 enabled, define __SIZETYPE__.
780 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
782 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
783 exclusion with "section" attribute.
784 (attr_noinit_exclusions): New table.
785 (handle_noinit_attribute): New function.
787 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
790 * c-common.c (resolve_overloaded_builtin): Use
791 copy_decl_built_in_function.
793 2019-08-13 Martin Sebor <msebor@redhat.com>
796 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
797 (asm_fprintf_length_spec): Same.
798 * c-format.h (format_lengths): Add FMT_LEN_w.
800 2019-08-10 Jakub Jelinek <jakub@redhat.com>
802 * c-pragma.h (enum pragma_omp_clause): Add
803 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
805 2019-08-07 Jakub Jelinek <jakub@redhat.com>
807 * c-pragma.h (enum pragma_omp_clause): Add
808 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
809 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
812 2019-08-05 Marek Polacek <polacek@redhat.com>
814 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
815 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
816 default for C++2a, unless -Wno-deprecated.
817 * c.opt (Wcomma-subscript): New warning.
819 2019-07-20 Jakub Jelinek <jakub@redhat.com>
821 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
822 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
823 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
824 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
825 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
826 constructs with the loop construct.
828 2019-07-13 Jakub Jelinek <jakub@redhat.com>
831 * c-omp.c (c_omp_split_clauses): Fix a pasto in
832 OMP_CLAUSE_REDUCTION_TASK handling.
834 2019-07-12 Jakub Jelinek <jakub@redhat.com>
836 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
837 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
839 2019-07-09 Martin Sebor <msebor@redhat.com>
842 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
844 * c-pretty-print.h: Same.
846 2019-07-09 Martin Sebor <msebor@redhat.com>
849 * c-format.c (check_argument_type): Change class-key from class to
850 struct and vice versa to match convention and avoid -Wclass-is-pod
852 * c-pretty-print.h: Same.
854 2019-07-03 Martin Liska <mliska@suse.cz>
856 * c-common.c (try_to_locate_new_include_insertion_point): Remove
859 2019-07-03 Jakub Jelinek <jakub@redhat.com>
861 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
862 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
865 2019-07-02 qing zhao <qing.zhao@oracle.com>
867 PR preprocessor/90581
868 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
869 * c.opt: Add new option -fmax-include-depth.
871 2019-06-26 Jason Merrill <jason@redhat.com>
873 PR c++/55442 - memory-hog with highly recursive constexpr.
874 * c.opt (fconstexpr-loop-limit): New.
876 2019-06-25 Jakub Jelinek <jakub@redhat.com>
879 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
880 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
882 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
884 * c-common.c (c_common_nodes_and_builtins): Define
885 alternate "__intN__" name for "__intN" types.
887 2019-06-24 Jan Hubicka <jh@suse.cz>
889 * c-common.c (braced_lists_to_strings): Check that
890 type is array or integer prior checking string flag.
892 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
894 PR c++/90875 - added -Wswitch-outside-range option
895 * c.opt (Wswitch-outside-range): Added new option.
896 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
898 2019-06-21 Marek Polacek <polacek@redhat.com>
900 PR c++/90953 - ICE with -Wmissing-format-attribute.
901 * c-common.c (check_function_arguments_recurse): Use
903 (check_missing_format_attribute): Likewise.
905 2019-06-19 Marek Polacek <polacek@redhat.com>
907 PR c++/60364 - noreturn after first decl not diagnosed.
908 * c-attribs.c (handle_noreturn_attribute): No longer static.
909 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
911 * c-format.c (check_function_format): Use get_attribute_name.
913 2019-06-19 Martin Sebor <msebor@redhat.com>
916 * c-format.c (function_format_info::format_type): Adjust type.
917 (function_format_info::is_raw): New member.
918 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
919 (decode_format_attr): Adjust call to decode_format_type.
920 Avoid a redundant call to convert_format_name_to_system_name.
921 Avoid abbreviating the word "arguments" in a diagnostic.
922 (format_warning_substr): New function.
923 (avoid_dollar_number): Quote dollar sign in a diagnostic.
924 (finish_dollar_format_checking): Same.
925 (check_format_info): Same.
926 (struct baltoks_t): New.
927 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
928 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
930 (check_format_info_main): Call check_plain. Use baltoks_t. Call
931 maybe_diag_unbalanced_tokens.
932 (handle_format_attribute): Spell out the word "arguments" in
935 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
937 PR c++/90449 - add -Winaccessible-base option.
938 * c.opt (Winaccessible-base): New option.
940 2019-06-10 Jakub Jelinek <jakub@redhat.com>
942 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
943 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
944 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
945 combined/composite constructs where it is not allowed. Copy over
946 OMP_CLAUSE_REDUCTION_INSCAN.
948 2019-06-05 Martin Sebor <msebor@redhat.com>
950 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
951 (handle_alias_ifunc_attribute): Same.
952 (handle_copy_attribute): Same.
953 (handle_weakref_attribute): Same.
954 (handle_nonnull_attribute): Same.
955 * c-warn.c (warn_for_sign_compare): Same.
956 (warn_for_restrict): Same.
959 2019-06-05 Martin Sebor <msebor@redhat.com>
961 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
962 * c.opt (-Wformat-diag): Remove a spurious period.
964 2019-05-29 Jakub Jelinek <jakub@redhat.com>
967 * c-common.c (check_builtin_function_arguments)
968 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
971 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
973 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
975 2019-05-22 Martin Liska <mliska@suse.cz>
978 * c-attribs.c (handle_copy_attribute): Do not copy
979 target_clones attribute.
981 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
983 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
984 * c-ada-spec.c (print_assignment_operator): New function.
985 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
986 assignment operators declared as methods and filter out the others.
988 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
991 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
992 "omp declare target".
994 2019-05-16 Martin Sebor <msebor@redhat.com>
996 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
997 keywords, operators, and types in diagnostics.
998 (handle_scalar_storage_order_attribute): Same.
999 (handle_mode_attribute): Same.
1000 (handle_visibility_attribute): Same.
1001 (handle_assume_aligned_attribute): Same.
1002 (handle_no_split_stack_attribute): Same.
1003 * c-common.c (shorten_compare): Same.
1004 (c_common_truthvalue_conversion): Same.
1005 (cb_get_source_date_epoch): Same.
1006 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1008 (interpret_float): Same.
1009 * c-omp.c (c_finish_omp_for): Same.
1010 * c-opts.c (c_common_post_options): Same.
1011 * c-pch.c (c_common_pch_pragma): Same.
1012 * c-pragma.c (pop_alignment): Same.
1013 (handle_pragma_pack): Same.
1014 (apply_pragma_weak): Same.
1015 (handle_pragma_weak): Same.
1016 (handle_pragma_scalar_storage_order): Same.
1017 (handle_pragma_redefine_extname): Same.
1018 (add_to_renaming_pragma_list): Same.
1019 (maybe_apply_renaming_pragma): Same.
1020 (push_visibility): Same.
1021 (handle_pragma_visibility): Same.
1022 (handle_pragma_optimize): Same.
1023 (handle_pragma_message): Same.
1024 * c-warn.c (warn_for_omitted_condop): Same.
1025 (lvalue_error): Same.
1027 2019-05-15 Richard Biener <rguenther@suse.de>
1030 * c-common.c (c_common_mark_addressable_vec): Also mark
1031 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1034 2019-05-06 Nathan Sidwell <nathan@acm.org>
1036 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1038 2019-04-30 Nathan Sidwell <nathan@acm.org>
1040 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1042 2019-04-30 Martin Liska <mliska@suse.cz>
1044 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1045 for unknown options.
1047 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1049 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1050 the pointer target rather than the pointer itself.
1052 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1055 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1057 (c_do_switch_warnings): Remove outside_range_p argument.
1058 * c-common.c (check_case_bounds): Removed.
1059 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1060 Don't call check_case_bounds. Fold low_value as well as high_value.
1061 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1062 Check for case labels outside of range of original type here and
1065 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1067 PR translation/90041
1068 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1069 in the Warn diagnostics.
1072 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1073 function comment. Warn if arguments of the attribute are not positive
1076 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1078 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1079 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1081 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1083 * c-ada-spec.c (is_float128): New predicate extracted from...
1084 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1085 <REAL_TYPE>: ...here. Call it.
1087 2019-04-05 David Malcolm <dmalcolm@redhat.com>
1090 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1091 auto_diagnostic_group. Guard inform calls by result of
1094 2019-04-05 Marek Polacek <polacek@redhat.com>
1096 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
1097 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1100 2019-04-03 Jason Merrill <jason@redhat.com>
1102 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1103 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1105 2019-04-01 Martin Sebor <msebor@redhat.com>
1108 * c-attribs.c (handle_copy_attribute): Handle references and
1109 non-constant expressions.
1111 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1114 * c.opt (-fconstexpr-ops-limit=): New option.
1116 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1118 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1121 2019-03-19 Martin Sebor <msebor@redhat.com>
1123 PR tree-optimization/89688
1124 * c-common.c (braced_list_to_string): Make static.
1125 (braced_lists_to_strings): Define new function.
1126 * c-common.h (braced_list_to_string): Remove.
1127 (braced_lists_to_strings): Declare.
1129 2019-03-12 Martin Liska <mliska@suse.cz>
1131 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1133 2019-03-11 Martin Liska <mliska@suse.cz>
1135 * c-opts.c (c_common_post_options): Wrap apostrophes
1136 in gcc internal format with %'.
1138 2019-03-11 Martin Liska <mliska@suse.cz>
1140 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1141 in a string format message and fix GNU coding style.
1142 * c-common.c (vector_types_convertible_p): Likewise.
1143 (c_build_vec_perm_expr): Likewise.
1144 * c-indentation.c (get_visual_column): Likewise.
1145 * c-opts.c (c_common_handle_option): Likewise.
1146 (c_common_post_options): Likewise.
1147 (sanitize_cpp_opts): Likewise.
1148 * c-pch.c (c_common_pch_pragma): Likewise.
1149 * c-pragma.c (handle_pragma_pack): Likewise.
1151 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1153 PR tree-optimization/89550
1154 * c-common.c (c_common_truthvalue_conversion): Only set
1155 TREE_NO_WARNING if warning_at returned true.
1156 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1158 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1159 Martin Sebor <msebor@gmail.com>
1161 * c.opt (Wmissing-attributes): Clean up doc string.
1163 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1166 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1167 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1170 2019-02-22 Richard Biener <rguenther@suse.de>
1172 * c-pch.c (no_checksum): Remove.
1173 (pch_init): Remove assertion that executable_checksum is not
1175 (c_common_valid_pch): Likewise.
1177 2019-02-18 Martin Sebor <msebor@redhat.com>
1180 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1182 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1185 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1186 implementing -Wtype-limits.
1188 2019-02-11 Martin Sebor <msebor@redhat.com>
1191 * c-common.c (invalid_array_size_error): New function.
1192 (valid_array_size_p): Call it. Handle size as well as type.
1193 * c-common.h (valid_constant_size_p): New function.
1194 (enum cst_size_error): New type.
1196 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1199 * known-headers.cc (get_stdlib_header_for_name): Add
1200 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1202 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1205 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1206 a C cast in pp_c_flag_gnu_v3 mode.
1208 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1211 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1212 builtin_structptr_types types even for C.
1214 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1216 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1217 when rhs is of array type correctly. Fix handling of nested structures.
1218 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1219 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1220 type casts within nested compound expressions.
1222 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1225 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1226 variable after using BIT_FIELD_REF.
1228 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1232 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1233 Remove the boolean argument.
1234 * c-warn.c (check_address_of_packed_member): Renamed to ...
1235 (check_address_or_pointer_of_packed_member): This. Also
1236 warn pointer conversion.
1237 (check_and_warn_address_of_packed_member): Renamed to ...
1238 (check_and_warn_address_or_pointer_of_packed_member): This.
1239 Also warn pointer conversion.
1240 (warn_for_address_or_pointer_of_packed_member): Remove the
1241 boolean argument. Don't check pointer conversion here.
1243 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1246 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1248 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1250 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1251 and __cpp_nontype_template_parameter_auto. Add a comment that
1252 __cpp_template_auto is deprecated.
1254 2019-01-14 Tom Honermann <tom@honermann.net>
1256 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1257 * c-common.c (c_common_reswords): Add char8_t.
1258 (fix_string_type): Use char8_t for the type of u8 string literals.
1259 (c_common_get_alias_set): char8_t doesn't alias.
1260 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1262 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1263 (keyword_begins_type_specifier): Add RID_CHAR8.
1264 * c-common.h (rid): Add RID_CHAR8.
1265 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1266 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1267 Define char8_type_node and char8_array_type_node.
1268 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1269 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1270 (c_cpp_builtins): Predefine __cpp_char8_t.
1271 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1273 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1274 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1276 * c.opt: Add the -fchar8_t command line option.
1278 2019-01-14 Martin Sebor <msebor@redhat.com>
1281 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1282 and issue errors if it fails.
1283 * c-common.h (valid_format_string_type_p): Declare.
1284 * c-format.c (valid_stringptr_type_p): Rename...
1285 (valid_format_string_type_p): ...to this and make extern.
1286 (handle_format_arg_attribute): Adjust to new name.
1287 (check_format_string): Same.
1289 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1291 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1292 Replace "may may" with "may" in warning message.
1294 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1297 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1298 (c_build_vec_convert): Declare.
1299 * c-common.c (c_build_vec_convert): New function.
1301 2019-01-04 Martin Sebor <msebor@redhat.com>
1304 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1305 Handle C++ empty throw specification and C11 _Noreturn.
1306 (has_attribute): Also handle C11 _Noreturn.
1308 2019-01-04 Martin Sebor <msebor@redhat.com>
1311 * c-attribs.c (positional_argument): Also accept enumerated types.
1313 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1315 Update copyright years.
1317 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1320 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1321 * c-warn.c (check_alignment_of_packed_member): New function.
1322 (check_address_of_packed_member): Likewise.
1323 (check_and_warn_address_of_packed_member): Likewise.
1324 (warn_for_address_or_pointer_of_packed_member): Likewise.
1325 * c.opt: Add -Wno-address-of-packed-member.
1327 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1330 * c-warn.c (get_outermost_macro_expansion): New function.
1331 (spelled_the_same_p): Use it to unwind the macro expansions, and
1332 compare the outermost macro in each nested expansion, rather than
1335 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1338 * c-common.h (warn_tautological_cmp): Convert 1st param from
1339 location_t to const op_location_t &.
1340 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1341 when testing for INTEGER_CST.
1342 (warn_tautological_bitwise_comparison): Convert 1st param from
1343 location_t to const op_location_t &; use it to build a
1344 binary_op_rich_location, and use this.
1345 (spelled_the_same_p): New function.
1346 (warn_tautological_cmp): Convert 1st param from location_t to
1347 const op_location_t &. Warn for macro expansions if
1348 spelled_the_same_p. Use binary_op_rich_location.
1350 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1354 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1355 (verify_tree): Handle location wrappers.
1356 (c_common_truthvalue_conversion): Strip any location wrapper.
1358 (fold_offsetof): Strip any location wrapper.
1359 (complete_array_type): Likewise for initial_value.
1360 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1361 index before checking for INTEGER_CST.
1362 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1363 print parentheses around location wrappers.
1364 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1365 before checking for INTEGER_CST.
1366 (warn_tautological_bitwise_comparison): Call
1367 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1368 before checking for INTEGER_CST.
1369 (readonly_error): Strip any location wrapper.
1370 (warn_array_subscript_with_type_char): Strip location wrappers
1371 before checking for INTEGER_CST. Use the location of the index if
1374 2018-12-06 Jason Merrill <jason@redhat.com>
1376 PR c++/88136 - -Wdeprecated-copy false positives
1377 * c.opt (Wdeprecated-copy-dtor): New.
1378 (Wdeprecated-copy): Move to -Wextra.
1380 2018-11-29 Martin Sebor <msebor@redhat.com>
1384 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1385 alignments to values less than the target requires.
1386 (has_attribute): For attribute aligned consider both the attribute
1387 and the alignment bits.
1388 * c-common.c (c_init_attributes): Optionally issue a warning for
1391 2018-11-28 Martin Sebor <msebor@redhat.com>
1395 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1396 or destination is an error.
1398 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1401 * c-ubsan.c: Include langhooks.h.
1402 (ubsan_instrument_division): Change gcc_assert that main variants
1403 of op0 and op1 types are equal to gcc_checking_assert that the
1404 main variants are compatible types.
1406 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1408 * c-ada-spec.c: Include stringpool.h.
1409 (has_static_fields): Return false for incomplete types.
1410 (is_tagged_type): Likewise.
1411 (has_nontrivial_methods): Likewise.
1412 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1413 (struct overloaded_name_hash): New structure.
1414 (struct overloaded_name_hasher): Likewise.
1415 (overloaded_names): New global variable.
1416 (init_overloaded_names): New static function.
1417 (overloaded_name_p): New predicate.
1418 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1419 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1420 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1421 Remove always-true condition and dump forward types.
1422 (dump_ada_specs): Delete overloaded_names.
1424 2018-11-20 Martin Sebor <msebor@redhat.com>
1426 * c-attribs.c (type_for_vector_size): New function.
1427 (type_valid_for_vector_size): Same.
1428 (handle_vector_size_attribute): Move code to the functions above
1430 (validate_attribute, has_attribute): New functions.
1431 * c-common.h (has_attribute): Declare.
1432 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1433 * c-common.c (c_common_resword): Same.
1435 2018-11-16 Jason Merrill <jason@redhat.com>
1437 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1438 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1440 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1443 * c-common.c (fix_string_type): Reject string literals larger than
1444 TYPE_MAX_VALUE (ssizetype) bytes.
1446 2018-11-15 Martin Sebor <msebor@redhat.com>
1450 * c-attribs.c (positional_argument): New function.
1451 (handle_alloc_size_attribute): Use it and simplify.
1452 (handle_alloc_align_attribute): Same.
1453 (handle_assume_aligned_attribute): Same.
1454 (handle_nonnull_attribute): Same.
1455 * c-common.c (check_function_arguments): Pass fntype to
1456 check_function_format.
1457 * c-common.h (check_function_format): Add an argument.
1458 (PosArgFlags, positional_argument): Declare new type and function.
1459 * c-format.c (decode_format_attr): Add arguments.
1460 (check_format_string, get_constant): Same.
1461 (convert_format_name_to_system_name): Adjust.
1463 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1466 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1468 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1470 P1236R1 - Signed integers are two's complement
1471 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1472 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1473 with in-range second operand well defined for -std=c++2a.
1476 * c-common.c (parse_optimize_options): Allocate option string from
1477 opts_obstack rather than as GC memory. Move the allocation after
1478 warning for invalid option.
1480 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1482 * c-common.c (c_get_substring_location): Update for renaming of
1483 get_source_location_for_substring to get_location_within_string.
1484 * c-lex.c: Replace "source_location" with "location_t".
1485 * c-opts.c: Likewise.
1486 * c-ppoutput.c: Likewise.
1488 2018-11-13 Martin Sebor <msebor@redhat.com>
1491 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1492 (handle_tls_model_attribute): Improve diagnostics.
1494 2018-11-12 Jason Merrill <jason@redhat.com>
1496 * c-cppbuiltin.c (c_cpp_builtins): Define
1497 __cpp_impl_destroying_delete.
1499 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1500 __cpp_conditional_explicit.
1502 2018-11-09 Martin Sebor <msebor@redhat.com>
1505 * c-attribs.c (handle_copy_attribute): New function.
1507 2018-11-09 Martin Sebor <msebor@redhat.com>
1510 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1512 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1514 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1515 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1516 enum omp_memory_order MEMORY_ORDER.
1517 (c_finish_omp_flush): Add MO argument.
1518 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1519 (c_finish_omp_for): Add FINAL_P argument.
1520 * c-omp.c: Include memmodel.h.
1521 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1522 OMP_TASKGROUP_CLAUSES to it.
1523 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1524 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1525 instead of OMP_ATOMIC_SEQ_CST.
1526 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1527 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1528 __atomic_thread_fence call with the given value.
1529 (check_omp_for_incr_expr): Formatting fixes.
1530 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1531 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1532 is not constant expression 1 or -1. Transform NE_EXPR loops
1533 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1534 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1536 (c_omp_split_clauses): Add support for combined
1537 #pragma omp parallel master and
1538 #pragma omp {,parallel }master taskloop{, simd} constructs.
1539 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1540 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1541 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1542 (c_omp_predetermined_sharing): Don't return
1543 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1544 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1545 PRAGMA_OMP_REQUIRES.
1546 * c-pragma.h (enum pragma_kind): Likewise.
1547 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1548 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1550 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1552 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1554 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1556 * c-format.c (local_cgraph_node_ptr_node): New variable.
1557 (gcc_dump_printf_char_table): Add entry for %C.
1558 (get_pointer_to_named_type): New function, taken from the handling
1559 code for "gimple *" from...
1560 (init_dynamic_diag_info): ...here. Add handling for
1562 * c-format.h (T_CGRAPH_NODE): New.
1564 2018-10-19 Jason Merrill <jason@redhat.com>
1566 * c-cppbuiltin.c (c_cpp_builtins): Add
1567 __cpp_nontype_template_parameter_class.
1569 2018-10-31 Nathan Sidwell <nathan@acm.org>
1571 * c-opts.c (c_finish_options): Force command line macro
1572 location. Refactor to avoid repeating main debug hook.
1573 (push_command_line_include): Clarify comment.
1575 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1577 2018-10-30 Martin Sebor <msebor@redhat.com>
1580 * c-format.c (check_format_types): Avoid diagnosing null pointer
1581 arguments to printf-family of functions.
1583 2018-10-30 Marek Polacek <polacek@redhat.com>
1585 Implement P0892R2, explicit(bool).
1586 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1588 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1590 * name-hint.h (name_hint::take_deferred): New member function.
1592 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1595 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1597 (check_function_restrict): Rename param "argarray" to
1598 "unfolded_argarray", and make a copy named "argarray", calling
1599 fold_for_warn on each argument.
1600 (check_function_arguments): Add note about responsibility for
1601 folding the arguments.
1603 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1605 * c-common.c (flag_isoc2x): New variable.
1606 * c-common.h (clk_c): Update comment to reference C2X.
1607 (flag_isoc99, flag_isoc11): Update comments to reference future
1608 standard versions in general.
1609 (flag_isoc2x): Declare.
1610 * c-opts.c (set_std_c2x): New function.
1611 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1612 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1614 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1616 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1618 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1619 (std=iso9899:2018): Document C17 as published in 2018.
1621 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1624 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1626 2018-10-11 Will Wray <wjwray@gmail.com>
1629 * c-pretty-print.h (pp_c_type_cast): Prototype.
1630 (pp_c_integer_constant): Likewise.
1631 * c-pretty-print.c (pp_c_type_cast): No longer static.
1632 (pp_c_integer_constant): Likewise.
1633 (pp_c_enumeration_constant): Fix loop termination when finding
1634 name of constant. No longer returns a value. Call
1635 pp_c_integer_constant.
1636 (c_pretty_printer::constant): Update for changes to
1637 pp_c_enumeration_constant.
1639 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1641 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1642 for no_unique_address.
1644 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1646 * c-common.c (c_option_controlling_cpp_error): Rename to...
1647 (c_option_controlling_cpp_diagnostic): ...this, and convert
1648 "reason" from int to enum.
1649 (c_cpp_error): Rename to...
1650 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1651 * c-common.h (c_cpp_error): Rename to...
1652 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1653 * c-opts.c (c_common_init_options): Update for renaming.
1655 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1658 * c-common.c (vector_types_compatible_elements_p): Use
1659 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1661 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1663 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1664 to generate constructor destructor priority warning.
1665 * c.opt (-Wprio-ctor-dtor): New option.
1667 2018-10-01 Jason Merrill <jason@redhat.com>
1669 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1671 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1673 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1674 (dump_ada_node): Add const keyword.
1676 2018-09-25 Martin Liska <mliska@suse.cz>
1678 * c-common.c (c_common_truthvalue_conversion):
1679 Remove Pascal from documentation.
1681 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1683 * c-ada-spec.c: Include diagnostic.h.
1684 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1686 2018-09-19 Marek Polacek <polacek@redhat.com>
1688 * c.opt (Wclass-conversion): New.
1690 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1692 * c-format.c (range_label_for_format_type_mismatch::get_text):
1693 Update for new param.
1695 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1697 * c-format.c (format_warning_at_char): Update for introduction of
1698 format_string_diagnostic_t.
1699 (format_type_warning): Likewise.
1701 2018-09-17 Martin Jambor <mjambor@suse.cz>
1704 * c.opt (Wabsolute-value): New.
1706 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1708 * c-common.c (complete_flexible_array_elts): New helper function.
1709 * c-common.h (complete_flexible_array_elts): Declare.
1711 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1713 * c-common.c (braced_list_to_string): Remove eval parameter.
1714 Add some more checks. Always create zero-terminated STRING_CST.
1715 * c-common.h (braced_list_to_string): Adjust prototype.
1717 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1720 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1722 (maybe_suggest_missing_token_insertion): Likewise.
1723 (maybe_add_include_fixit): Add param "override_location". If set,
1724 and source-printing is enabled, then override the rich_location's
1725 primary location with that of the insertion point for the fix-it
1726 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1727 * c-common.h (extern void maybe_add_include_fixit): Add bool
1729 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1730 for conversion of show_caret_p to a tri-state.
1731 * c-warn.c (warn_for_restrict): Likewise.
1733 (suggest_missing_header::~suggest_missing_header): Update call to
1734 maybe_add_include_fixit to suggest overriding the location, as it
1737 2018-08-27 Martin Liska <mliska@suse.cz>
1739 * c-common.c (check_function_restrict): Use new function
1740 fndecl_built_in_p and remove check for FUNCTION_DECL if
1742 (check_builtin_function_arguments): Likewise.
1743 (reject_gcc_builtin): Likewise.
1744 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1746 2018-08-26 Marek Polacek <polacek@redhat.com>
1748 PR c++/87029, Implement -Wredundant-move.
1749 * c.opt (Wredundant-move): New option.
1751 2018-08-21 Marek Polacek <polacek@redhat.com>
1753 PR c++/86981, Implement -Wpessimizing-move.
1754 * c.opt (Wpessimizing-move): New option.
1756 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1759 * c-attribs.c (common_handle_aligned_attribute): Add
1760 auto_diagnostic_group instance.
1761 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1762 * c-opts.c (c_common_post_options): Likewise.
1763 * c-warn.c (warn_logical_not_parentheses): Likewise.
1764 (warn_duplicated_cond_add_or_warn): Likewise.
1765 (warn_for_multistatement_macros): Likewise.
1767 2018-08-20 Nathan Sidwell <nathan@acm.org>
1769 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1772 2018-08-17 Nathan Sidwell <nathan@acm.org>
1774 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1776 (laxy_hex_fp_value_count): Make unsigned.
1777 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1778 manipulate the macro.
1779 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1782 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1784 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1785 (gcc_dump_printf_length_specs): New.
1786 (gcc_dump_printf_flag_pairs): New.
1787 (gcc_dump_printf_flag_specs): New.
1788 (gcc_dump_printf_char_table): New.
1789 (format_types_orig): Add entry for "gcc_dump_printf".
1790 (init_dynamic_diag_info): Set up length_char_specs and
1791 conversion_specs for gcc_dump_printf_format_type.
1792 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1794 2018-08-17 Nathan Sidwell <nathan@acm.org>
1796 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1798 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1799 * c-cppbuiltin.c: Likewise.
1801 2018-08-17 Martin Liska <mliska@suse.cz>
1803 * c.opt: Remove Warn, Init and Report for options with
1804 Ignore/Deprecated flag. Warning is done automatically for
1807 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1810 * c-common.c (selftest::c_family_tests): Call
1811 selftest::c_indentation_c_tests.
1812 * c-common.h (selftest::c_indentation_c_tests): New decl.
1813 * c-indentation.c: Include "selftest.h".
1814 (next_tab_stop): Add "tab_width" param, rather than accessing
1816 (get_visual_column): Likewise. Clarify comment. Bulletproof
1817 against reading past the end of the line.
1818 (get_first_nws_vis_column): Add "tab_width" param.
1819 (detect_intervening_unindent): Likewise.
1820 (should_warn_for_misleading_indentation): Read tab width from
1821 cpp_opts and pass around.
1822 (selftest::test_next_tab_stop): New test.
1823 (selftest::assert_get_visual_column_succeeds): New function.
1824 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1825 (selftest::assert_get_visual_column_fails): New function.
1826 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1827 (selftest::test_get_visual_column): New test.
1828 (selftest::c_indentation_c_tests): New function.
1830 2018-08-16 Nathan Sidwell <nathan@acm.org>
1832 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1833 (store_ada_macro): Likewise.
1834 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1835 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1837 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1839 * c-format.c: Include "selftest-diagnostic.h" and
1840 "gcc-rich-location.h".
1841 (format_warning_at_char): Pass NULL for new label params of
1843 (class indirection_suffix): New class.
1844 (class range_label_for_format_type_mismatch): New class.
1845 (format_type_warning): Move logic for generating "*" suffix to
1846 class indirection_suffix. Create "fmt_label" and "param_label"
1847 to show their types, and pass them to the
1848 format_warning_at_substring calls.
1849 (selftest::test_type_mismatch_range_labels): New test.
1850 (selftest::c_format_c_tests): Call it.
1852 2018-08-13 Martin Sebor <msebor@redhat.com>
1854 PR tree-optimization/71625
1855 * c-common.c (braced_list_to_string): New function.
1856 * c-common.h (braced_list_to_string): Declare it.
1858 2018-08-08 Nathan Sidwell <nathan@acm.org>
1860 * c-common.c (try_to_locate_new_include_inertion_point): Use
1861 linemap_included_from_linemap.
1862 * c-lex.c (fe_file_change): Use linemap_included_from.
1863 * c-ppoutput.c (pp_file_change): Likewise.
1865 2018-08-01 Martin Sebor <msebor@redhat.com>
1867 PR tree-optimization/86650
1868 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1869 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1870 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1871 * c-format.h (T89_G): Update to be "gimple *" rather than
1873 (local_gcall_ptr_node): Rename...
1874 (local_gimple_ptr_node): ...to this.
1876 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1878 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1879 table entries for gcc_diag_char_table, and the 'Z' entry from
1880 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1881 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1882 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1883 adding missing "Z" for this table. Remove erroneous "G" and "K"
1885 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1886 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1887 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1889 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1891 * c-common.c (speculation_safe_resolve_call): New function.
1892 (speculation_safe_resolve_params): New function.
1893 (speculation_safe_resolve_return): New function.
1894 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1895 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1896 __HAVE_SPECULATION_SAFE_VALUE.
1898 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1900 * c-common.c (c_cpp_error): Remove redundant "line_table"
1901 parameter from call to rich_location::set_range.
1902 (maybe_suggest_missing_token_insertion): Likewise.
1904 2018-07-20 Martin Sebor <msebor@redhat.com>
1907 * c.opt (-Warray-bounds): Remove redundant -Wall.
1909 2018-07-20 Martin Sebor <msebor@redhat.com>
1912 * c-common.h (c_common_handle_option): Change function argument
1914 * c-opts.c (c_common_init_options): Same.
1915 (c_common_handle_option): Same. Remove special handling of
1916 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1917 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1918 options to take a HOST_WIDE_INT argument and accept a byte-size
1920 (-Wvla-larger-than): Same.
1921 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1922 (-Wno-vla-larger-than): Same.
1924 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1926 * c-attribs.c (c_common_attribute_table): Add
1927 "omp declare target implicit" attribute.
1929 2018-07-12 Richard Biener <rguenther@suse.de>
1932 * c-attribs.c (handle_packed_attribute): Do not build a variant
1933 type with TYPE_PACKED, instead ignore the attribute if we may
1934 not apply to the original type.
1936 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1939 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1940 to contain TREE_LIST for both the original class iterator and the
1943 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1945 * c-ada-spec.c (to_ada_name): Remove index parameter.
1946 (pp_ada_tree_identifier): Likewise.
1947 (dump_ada_macros): Adjust call to to_ada_name.
1948 (struct overloaded_name_hash): Delete.
1949 (struct overloaded_name_hasher): Likewise.
1950 (overloaded_names): Likewise.
1951 (compute_overloading_index): Likewise.
1952 (dump_ada_decl_name): Do not call compute_overloading_index and
1953 adjust calls to pp_ada_tree_identifier.
1954 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1955 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1956 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1957 (dump_ada_enum_type): Remove type and display_convention parameters.
1958 Adjust calls to pp_ada_tree_identifier.
1959 (dump_ada_node): Likewise and for dump_ada_structure.
1960 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1962 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1964 (print_constructor): Adjust call to pp_ada_tree_identifier.
1965 (print_destructor): Likewise.
1966 (dump_ada_declaration): Switch to aspect syntax.
1967 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1968 parameter with nested parameter.
1969 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1970 (dump_ada_specs): Do not delete overloaded_names table.
1972 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1975 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
1978 2018-07-05 Nathan Sidwell <nathan@acm.org>
1980 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1981 NO_IMPLICIT_EXTERN_C.
1983 2018-06-28 Martin Liska <mliska@suse.cz>
1985 * cppspec.c: Include opt-suggestions.h.
1987 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1988 Thomas Schwinge <thomas@codesourcery.com>
1989 Cesar Philippidis <cesar@codesourcery.com>
1991 * c-pragma.h (enum pragma_omp_clause): Add
1992 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1993 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1995 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1998 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
2001 2018-06-18 Martin Sebor <msebor@redhat.com>
2004 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2007 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2009 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2011 2018-06-13 Jason Merrill <jason@redhat.com>
2013 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2014 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2017 PR c++/86094 - wrong code with defaulted move ctor.
2018 * c-opts.c (c_common_post_options): Bump the current ABI version to
2019 13. Set warn_abi_version and flag_abi_compat_version to the current
2020 version rather than 0. Fix defaulting flag_abi_compat_version from
2023 2018-06-12 Martin Sebor <msebor@redhat.com>
2026 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2027 sizeof source and destination yields the same value.
2029 2018-06-12 Martin Liska <mliska@suse.cz>
2031 * c.opt: Make MPX-related options as Deprecated.
2033 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2035 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2038 2018-06-08 Martin Liska <mliska@suse.cz>
2040 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2041 for MPX (macros, related functions, fields in cgraph_node, ...).
2042 (handle_bnd_legacy): Likewise.
2043 (handle_bnd_instrument): Likewise.
2046 2018-06-06 Jakub Jelinek <jakub@redhat.com>
2049 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2050 __cpp_transactional_memory to 201500 instead of 210500.
2052 2018-06-06 Jason Merrill <jason@redhat.com>
2054 PR c++/85710 - ICE with -Wmemset-elt-size.
2055 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2057 2018-06-01 Jason Merrill <jason@redhat.com>
2059 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2062 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2064 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2065 declaration for a typedef independently of whether the declaration of
2066 the subtype is generated.
2068 2018-05-31 Martin Sebor <msebor@redhat.com>
2071 * c.opt (-Wno-alloc-size-larger-than): New option.
2073 2018-04-22 David Pagan <dave.pagan@oracle.com>
2076 * c-opts.c (c_common_post_options): Set default for warn_return_type
2077 for C++/C++ with ObjC extensions only. For C, makes it possible to
2078 differentiate between default (no option), -Wreturn-type, and
2081 2018-05-29 Jason Merrill <jason@redhat.com>
2083 * c.opt (Winit-list-lifetime): New flag.
2085 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2087 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2088 splay_tree_delete_pointers.
2090 2018-05-26 Jakub Jelinek <jakub@redhat.com>
2093 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2094 noinline variable to workaround broken kernel headers.
2096 2018-05-18 Jason Merrill <jason@redhat.com>
2098 * c.opt (Wdeprecated-copy): New flag.
2100 2018-05-17 Martin Liska <mliska@suse.cz>
2102 * c-warn.c (overflow_warning): Do not use
2103 space in between 'G_' and '('.
2105 2018-05-09 Jason Merrill <jason@redhat.com>
2107 * c-common.c (valid_array_size_p): Add complain parameter.
2108 * c-common.h: ...which defaults to true.
2110 2018-05-11 Jakub Jelinek <jakub@redhat.com>
2113 * c-omp.c (c_omp_predetermined_sharing): Return
2114 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2116 2018-05-11 Martin Liska <mliska@suse.cz>
2119 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2122 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2125 * c-common.h (fold_offsetof_1): Removed.
2126 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2127 CTX argument defaulted to ERROR_MARK.
2128 * c-common.c (fold_offsetof_1): Renamed to ...
2129 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2130 argument, convert the pointer constant to TYPE and use size_binop
2131 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2132 a pointer type. Adjust recursive calls.
2134 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2137 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2139 2018-05-07 Nathan Sidwell <nathan@acm.org>
2141 * c.opt (ffor-scope): Remove functionality, issue warning.
2143 2018-05-03 Nathan Sidwell <nathan@acm.org>
2145 * c.opt (ffriend-injection): Remove functionality, issue warning.
2147 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2150 * c-format.c (struct format_check_results): Add field
2152 (check_format_info): Initialize it, and warn if encountered.
2153 (check_format_arg): Distinguish between wide char and
2154 everything else when detecting arrays of non-char.
2156 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2158 * c-format.c (get_corrected_substring): Update for
2159 location_get_source_line returning a char_span. Use a char_span
2160 when handling the prefix of the correction.
2161 * c-indentation.c (get_visual_column): Update for
2162 location_get_source_line returning a char_span.
2163 (get_first_nws_vis_column): Likewise.
2165 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2168 * known-headers.cc (get_stdlib_header_for_name): Add various names
2169 from <assert.h>, <string.h>, and <memory.h>; add more names from
2172 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2175 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2176 get_base_address of the second operand is a VAR_P, rather than the
2177 operand itself, and use gcc_checking_assert instead of gcc_assert.
2179 2018-03-23 Marek Polacek <polacek@redhat.com>
2182 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2183 <case RDIV_EXPR>: Tweak condition.
2185 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2187 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2189 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2192 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2196 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2199 2018-03-16 Richard Biener <rguenther@suse.de>
2202 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2203 unshare the possibly folded expression.
2205 2018-03-15 Richard Biener <rguenther@suse.de>
2208 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2210 2018-03-13 Martin Sebor <msebor@redhat.com>
2212 PR tree-optimization/84725
2213 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2214 with all three narrow character types, including their qualified forms.
2216 2018-03-12 Martin Sebor <msebor@redhat.com>
2218 PR tree-optimization/83456
2219 * c-common.c (check_function_restrict): Return bool.
2220 Restore checking of bounded built-in functions.
2221 (check_function_arguments): Also return the result
2222 of warn_for_restrict.
2223 * c-common.c (check_function_restrict): Return bool.
2224 * c-warn.c (warn_for_restrict): Return bool.
2226 2018-03-02 Marek Polacek <polacek@redhat.com>
2229 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2232 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2234 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2237 2018-03-01 Marek Polacek <polacek@redhat.com>
2240 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2241 alignment in computation.
2243 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2245 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2246 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2248 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2250 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2251 (is_char_array): Take a type instead of a declaration.
2252 (dump_ada_array_type): Likewise.
2253 (is_simple_enum): Minor tweak.
2254 (dump_ada_enum_type): New function extracted from...
2255 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2256 <INTEGER_TYPE>: Remove unreachable code.
2257 <RECORD_TYPE>: Likewise. Minor tweaks.
2258 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2259 <ENUMERAL_TYPE>: New case.
2260 <RECORD_TYPE>: Factor out common code.
2261 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2262 Minor tweaks. Deal with enumeral types.
2263 (dump_ada_structure): Minor tweaks.
2265 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2267 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2268 address for incomplete structures.
2269 (dump_forward_type): Do not bail out for incomplete structures.
2270 (dump_ada_declaration): Do not special-case incomplete structures
2271 for subtypes. Dump them as null records for types.
2273 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2275 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2276 (is_char_array): Fix formatting.
2277 (dump_template_types): Likewise.
2278 (dump_generic_ada_node): Rename into...
2279 (dump_ada_node): ...this.
2280 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2281 incomplete structures and not for empty structures. Do not use it
2282 when forward declarations are needed.
2283 (dump_forward_type): New function.
2284 (dump_nested_types): Remove FORWARD parameter. Do not consider
2285 TREE_VISITED and do not generate a forward declaration. Only dump
2286 original nested types for nested declaration.
2287 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2288 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2289 <RECORD_TYPE>: Do not consider TREE_VISITED.
2290 (dump_ada_declaration): Use booleans and fix formatting throughout.
2291 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2292 Call dump_forward_type instead of dump_nested_types for a typedef.
2293 Remove superfluous check and adjust call to dump_nested_types.
2294 <POINTER_TYPE>: Call dump_forward_type and fall through.
2295 (dump_ada_struct_decl): Rename into...
2296 (dump_ada_structure): ...this. Do not special-case empty structures.
2298 2018-02-27 Martin Sebor <msebor@redhat.com>
2301 * c.opt (-Wmissing-attributes): New option.
2303 2018-02-21 Martin Liska <mliska@suse.cz>
2305 * c.opt (Wcatch-value=): Add IntegerRange.
2307 2018-02-15 Jason Merrill <jason@redhat.com>
2309 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2311 2018-02-09 Nathan Sidwell <nathan@acm.org>
2314 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2316 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2319 2018-02-09 Martin Sebor <msebor@redhat.com>
2322 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2323 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2324 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2325 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2326 (-Wuninitialized): Same.
2328 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2330 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2331 keyword for components.
2333 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2335 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2337 2018-02-02 Julia Koval <julia.koval@intel.com>
2339 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2341 2018-01-29 Marek Polacek <polacek@redhat.com>
2344 * c-format.c (check_function_format): Check current_function_decl.
2346 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2348 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2350 (LAZY_HEX_FP_VALUES_CNT): Define.
2351 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2352 values rather than just 12.
2353 (builtin_define_with_hex_fp_value): Likewise.
2355 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2358 * c.opt (-fmacro-prefix-map): New option.
2359 * c-opts.c (c_common_handle_option): Handle it.
2360 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2361 * c-ppoutput.c (init_pp_output): Likewise.
2363 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2366 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2368 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2370 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2371 Skip 'f' and 'F' characters if it is true.
2372 (store_ada_macro): Minor tweak.
2373 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2374 <CPP_WSTRING>: Likewise.
2375 <CPP_STRING>: Output '&' in the buffer if not the first string.
2376 <CPP_NUMBER>: Adjust calls to dump_number.
2378 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2381 * c-common.c: Include "selftest.h".
2382 (get_atomic_generic_size): Perform the test for integral type
2383 before the range test for any integer constant, fixing indentation
2384 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2385 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2386 (selftest::test_fold_for_warn): New function.
2387 (selftest::c_common_c_tests): New function.
2388 (selftest::c_family_tests): Call it, and
2389 selftest::c_pretty_print_c_tests.
2390 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2391 * c-format.c (check_format_arg): Convert VAR_P check to a
2393 * c-pretty-print.c: Include "selftest.h".
2394 (pp_c_cast_expression): Don't print casts for location wrappers.
2395 (selftest::assert_c_pretty_printer_output): New function.
2396 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2397 (selftest::test_location_wrappers): New function.
2398 (selftest::c_pretty_print_c_tests): New function.
2399 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2402 Alan Hayward <alan.hayward@arm.com>
2403 David Sherwood <david.sherwood@arm.com>
2405 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2408 Alan Hayward <alan.hayward@arm.com>
2409 David Sherwood <david.sherwood@arm.com>
2411 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2414 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2415 Alan Hayward <alan.hayward@arm.com>
2416 David Sherwood <david.sherwood@arm.com>
2418 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2419 (convert_vector_to_array_for_subscript): Handle polynomial
2420 TYPE_VECTOR_SUBPARTS.
2421 (c_common_type_for_mode): Check valid_vector_subparts_p.
2422 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2425 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2427 Update copyright years.
2429 2017-12-22 Mike Stump <mikestump@comcast.net>
2430 Eric Botcazou <ebotcazou@adacore.com>
2432 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2433 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2435 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2439 * c-semantics.c (only_debug_stmts_after_p): New.
2440 (pop_stmt_list): Clear side effects in debug-only stmt list.
2441 Check for single nondebug stmt followed by debug stmts only.
2443 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2446 * c-semantics.c (pop_stmt_list): Propagate side effects from
2447 single nondebug stmt to container list.
2449 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2451 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2452 conditions with typical order conditions.
2454 2017-12-18 Marek Polacek <polacek@redhat.com>
2456 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2459 2017-12-17 Martin Sebor <msebor@redhat.com>
2461 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2462 an error for attribute warn_if_not_aligned.
2464 2017-12-16 Martin Sebor <msebor@redhat.com>
2466 PR tree-optimization/78918
2467 * c-common.c (check_function_restrict): Avoid checking built-ins.
2468 * c.opt (-Wrestrict): Include in -Wall.
2470 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2472 * c-attribs.c (c_common_attribute_table,
2473 c_common_format_attribute_table): Swap affects_type_identity
2474 and handler fields, adjust comments.
2476 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2478 * c.opt (Wcast-function-type): New warning option.
2479 * c-lex.c (get_fileinfo): Avoid warning.
2480 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2482 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2485 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2486 Adjust the size of buf1 and buf2, add a new buf to avoid
2487 format-overflow warning.
2489 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2491 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2492 subsequent statement list.
2494 2017-12-07 Martin Sebor <msebor@redhat.com>
2498 * c-attribs.c (attr_aligned_exclusions): New array.
2499 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2500 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2501 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2502 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2503 (attr_warn_unused_result_exclusions): Same.
2504 (handle_hot_attribute, handle_cold_attribute): Simplify.
2505 (handle_const_attribute): Warn on function returning void.
2506 (handle_pure_attribute): Same.
2507 (handle_aligned_attribute): Diagnose conflicting attribute
2509 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2511 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2514 * c-common.c (selftest::c_family_tests): Call
2515 selftest::c_spellcheck_cc_tests.
2516 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2517 * c-spellcheck.cc: Include "selftest.h".
2518 (name_reserved_for_implementation_p): New function.
2519 (should_suggest_as_macro_p): New function.
2520 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2521 should_suggest_as_macro_p and call it.
2522 (selftest::test_name_reserved_for_implementation_p): New function.
2523 (selftest::c_spellcheck_cc_tests): New function.
2524 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2526 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2528 * c-spellcheck.cc: New file, taken from macro-handling code in
2530 * c-spellcheck.h: New file, taken from macro-handling code in
2533 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2535 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2537 (handle_simd_attribute): Don't check for "cilk simd function"
2538 attribute. Reindent, formatting changes.
2540 2017-11-30 Julia Koval <julia.koval@intel.com>
2542 * c-common.h (inv_list): Remove.
2544 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2547 * c-common.c (c_switch_covers_all_cases_p_1,
2548 c_switch_covers_all_cases_p): New functions.
2549 * c-common.h (c_switch_covers_all_cases_p): Declare.
2551 2017-11-28 Julia Koval <julia.koval@intel.com>
2552 Sebastian Peryt <sebastian.peryt@intel.com>
2554 * array-notation-common.c: Delete.
2555 * c-cilkplus.c: Ditto.
2556 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2557 * c-common.def (ARRAY_NOTATION_REF): Remove.
2558 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2559 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2560 c_validate_cilk_plus_loop, cilkplus_an_parts,
2561 cilk_ignorable_spawn_rhs_op,
2562 cilk_recognize_spawn): Remove.
2563 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2564 * c-omp.c: Remove CILK_SIMD check.
2565 * c-pragma.c: Ditto.
2566 * c-pragma.h: Remove CILK related pragmas.
2567 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2568 ARRAY_NOTATION_REF condition.
2569 (c_pretty_printer::expression): Ditto.
2570 * c.opt (fcilkplus): Remove.
2573 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2575 * c-pretty-print.c (pp_c_additive_expression,
2576 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2578 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2580 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2583 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2584 instead of tree_to_uhwi, formatting fix.
2586 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2589 * known-headers.cc: New file, based on material from c/c-decl.c.
2590 (suggest_missing_header): Copied as-is.
2591 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2592 heavily edited to add C++ support. Add some knowledge about
2593 <limits.h>, <stdint.h>, and <wchar.h>.
2594 * known-headers.h: Likewise.
2596 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2598 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2599 (lookup_name_fuzzy): Likewise. Convert return type from
2600 const char * to name_hint. Add location_t param.
2601 * name-hint.h: New header.
2603 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2607 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2609 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2611 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2612 expected publication date of C17.
2613 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2615 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2618 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2619 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2621 2017-11-10 Martin Sebor <msebor@redhat.com>
2624 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2625 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2626 * c.opt (-Wstringop-truncation): New option.
2628 2017-11-06 Martin Liska <mliska@suse.cz>
2631 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2633 * c.opt: Set default value of warn_return_type.
2635 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2637 * c-common.c (binary_op_error): Update for renaming of
2639 (c_parse_error): Likewise.
2640 * c-warn.c (warn_logical_not_parentheses): Likewise for
2641 renaming of inform_at_rich_loc.
2642 (warn_for_restrict): Likewise for renaming of
2643 warning_at_rich_loc_n.
2645 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2647 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2648 * c-opts.c (set_std_c17): New function.
2649 (c_common_init_options): Use gnu17 as default C version.
2650 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2652 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2654 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2655 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2656 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2659 2017-10-23 Marek Polacek <polacek@redhat.com>
2662 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2664 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2666 * c-common.c (check_builtin_function_arguments): Also check arguments
2667 of __builtin_alloca_with_align_and_max.
2669 2017-10-17 David Malcolm <dmalcolm@redhat.com>
2671 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2672 rather than NULL to format_warning_va.
2673 (check_format_types): Likewise when calling format_type_warning.
2674 Remove code to extract source_ranges and source_range * in favor
2675 of just a location_t.
2676 (format_type_warning): Convert source_range * param to a
2679 2017-10-13 Jakub Jelinek <jakub@redhat.com>
2681 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2684 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2686 * c-common.c (enum missing_token_insertion_kind): New enum.
2687 (get_missing_token_insertion_kind): New function.
2688 (maybe_suggest_missing_token_insertion): New function.
2689 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2691 2017-10-11 Nathan Sidwell <nathan@acm.org>
2693 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2694 (c_common_handle_option): Update incpath_kind names.
2696 2017-10-11 Martin Liska <mliska@suse.cz>
2699 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2700 Wattributes warning.
2702 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2704 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2705 operating on trees as wide_ints.
2706 * c-common.c (pointer_int_sum): Likewise.
2707 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2708 * c-warn.c (match_case_to_enum_1): Likewise.
2709 (c_do_switch_warnings): Likewise.
2710 (maybe_warn_shift_overflow): Likewise.
2712 2017-10-10 Jakub Jelinek <jakub@redhat.com>
2715 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2716 instead of wide_int::from.
2718 2017-10-06 Jakub Jelinek <jakub@redhat.com>
2721 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2722 using to_widest use wide_int with the larger of the two precisions.
2724 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2726 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2729 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2731 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2732 when combining the original unconverted comparison operands.
2734 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2736 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2739 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2741 * c-ada-spec.c (to_ada_name): Add index parameter.
2742 (pp_ada_tree_identifier): Likewise.
2743 (dump_ada_macros): Adjust call to to_ada_name.
2744 (struct overloaded_name_hash): New type.
2745 (struct overloaded_name_hasher): Likewise.
2746 (overloaded_names): New hash table.
2747 (compute_overloading_index): New function.
2748 (dump_ada_decl_name): Call it and pass the result to
2749 pp_ada_tree_identifier.
2750 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2751 (dump_ada_function_declaration): Likewise.
2752 (dump_generic_ada_node): Likewise.
2753 (print_constructor): Likewise.
2754 (print_destructor): Likewise.
2755 (dump_ada_specs): Delete overloaded_names table.
2757 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2759 * c-ada-spec.c (max_ada_macros): Move around.
2760 (store_ada_macro_index): Likewise.
2761 (source_file): Rename into...
2762 (macro_source_file): ...this.
2763 (count_ada_macro): Move around.
2764 (store_ada_macro): Likewise.
2765 (compare_macro): Likewise.
2766 (print_ada_macros): Merge in...
2767 (dump_ada_macros): ...this.
2768 (source_file_base): Rename into...
2769 (current_source_file): ...this.
2770 (print_comment): Move around.
2771 (dump_ada_nodes): Call dump_ada_declaration directly.
2772 (struct with): Change type of limited field to bool.
2773 (append_withs): Change type of limited_access parameter to bool.
2774 (pp_ada_tree_identifie): Likewise.
2775 (dump_ada_decl_nam): Likewise.
2776 (dump_generic_ada_node): Likewise. Do not print the return type.
2777 (to_ada_name): Change type of space_found parameter to bool.
2778 (dump_ada_function_declaration): Return void and change type of
2779 parameters to bool. Also print the return type for a function.
2780 (print_ada_methods): Rename into...
2781 (dump_ada_methods): ...this.
2782 (print_ada_declaration): Rename into ...
2783 (dump_ada_declaration): ...this. Do not print the return type.
2784 (print_ada_struct_decl): Rename into...
2785 (dump_ada_struct_decl): ...this.
2787 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2789 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2790 rather than DECL_INITIAL.
2791 (common_handle_aligned_attribute): Likewise.
2793 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2795 * c.opt (gen-decls): Add RejectNegative.
2797 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2798 Jakub Jelinek <jakub@redhat.com>
2800 Add support for -std=c++2a.
2801 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2802 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2803 * c-opts.c (set_std_cxx2a): New.
2804 (c_common_handle_option): Set options when -std=c++2a is enabled.
2805 (c_common_post_options): Adjust comments.
2806 (set_std_cxx14, set_std_cxx17): Likewise.
2808 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2810 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2811 message for non-uniform endianness and issue a warning in C++.
2813 2017-09-15 Jakub Jelinek <jakub@redhat.com>
2815 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2816 (Wc++17-compat): Change from undocumented alias to option.
2817 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2818 change C++1z to C++17 in description.
2819 (std=c++1z, std=gnu++1z): Change from option to undocumented
2821 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2823 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2824 * c-opts.c (set_std_cxx1z): Rename to ...
2825 (set_std_cxx17): ... this.
2826 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2827 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
2829 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2832 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2834 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2835 function alignment if warn_if_not_aligned_p is true.
2837 2017-09-12 Nathan Sidwell <nathan@acm.org>
2839 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2840 resort_sorted_fields): Move to c/c-decl.c.
2841 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2842 (struct sorted_fields_type): Move to c/c-lang.h.
2844 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
2847 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2849 2017-09-04 Marek Polacek <polacek@redhat.com>
2852 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2853 (warn_tautological_cmp): Call it.
2855 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2857 * c-opts.c (c_common_finish): Write dependency information even if
2860 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2863 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2864 (omp_pragmas_simd): ... here.
2865 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2866 create new clauses list containing just simd clause.
2868 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2869 Alan Hayward <alan.hayward@arm.com>
2870 David Sherwood <david.sherwood@arm.com>
2872 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2873 into scalar_mode_supported_p call.
2874 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2876 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2877 Alan Hayward <alan.hayward@arm.com>
2878 David Sherwood <david.sherwood@arm.com>
2880 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2881 for the mode iterator.
2883 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2884 Alan Hayward <alan.hayward@arm.com>
2885 David Sherwood <david.sherwood@arm.com>
2887 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2888 * c-common.c (c_build_vec_perm_expr): Likewise.
2890 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2891 Alan Hayward <alan.hayward@arm.com>
2892 David Sherwood <david.sherwood@arm.com>
2894 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2896 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2897 Alan Hayward <alan.hayward@arm.com>
2898 David Sherwood <david.sherwood@arm.com>
2900 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2901 before calling targetm.addr_space.valid_pointer_mode.
2903 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2904 Alan Hayward <alan.hayward@arm.com>
2905 David Sherwood <david.sherwood@arm.com>
2907 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2909 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2910 Alan Hayward <alan.hayward@arm.com>
2911 David Sherwood <david.sherwood@arm.com>
2913 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2915 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2917 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2918 Alan Hayward <alan.hayward@arm.com>
2919 David Sherwood <david.sherwood@arm.com>
2921 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2924 2017-08-29 Martin Liska <mliska@suse.cz>
2927 * c-common.c (parse_optimize_options): Add argument to function
2929 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2931 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2933 * c-lex.c (interpret_float): Use token location
2934 when building an EXCESS_PRECISION_EXPR.
2936 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2938 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2939 it to check_function_format.
2940 * c-common.h (check_function_arguments): Add vec<location_t> *
2942 (check_function_format): Likewise.
2943 * c-format.c (struct format_check_context): Add field "arglocs".
2944 (check_function_format): Add param "arglocs"; pass it to
2946 (check_format_info): Add param "arglocs"; use it to initialize
2947 new field of format_ctx.
2948 (check_format_arg): Pass format_ctx->arglocs to new param of
2949 check_format_info_main.
2950 (class argument_parser): New field "arglocs".
2951 (argument_parser::argument_parser): Add "arglocs_" param and use
2952 it to initialize new field.
2953 (argument_parser::check_argument_type): Pass new arglocs field to
2955 (check_format_info_main): Add param "arglocs", and use it when
2956 constructing arg_parser.
2957 (check_format_types): Add param "arglocs"; use it if non-NULL when
2958 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2960 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2963 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2964 (c_common_attribute_table): Add warn_if_not_aligned.
2965 (handle_aligned_attribute): Renamed to ...
2966 (common_handle_aligned_attribute): Remove argument, name, and add
2967 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2968 (handle_aligned_attribute): New.
2969 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2971 2017-08-14 Martin Sebor <msebor@redhat.com>
2974 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2975 (handle_nonstring_attribute): New function.
2977 2017-08-14 Martin Sebor <msebor@redhat.com>
2980 * c-format.h (T89_G): New macro.
2981 * c-format.c (local_gcall_ptr_node): New variable.
2982 (init_dynamic_diag_info): Initialize it.
2984 2017-08-11 Martin Liska <mliska@suse.cz>
2986 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2987 TARGET_SUPPORTS_ALIASES.
2989 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2991 * c-common.c (c_parse_error): Add rich_location * param, using it
2992 rather implicitly using input_location.
2993 * c-common.h (c_parse_error): Add rich_location * param.
2995 2017-08-09 Marek Polacek <polacek@redhat.com>
2997 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2998 (c_common_truthvalue_conversion): Likewise.
2999 * c-omp.c (c_finish_omp_atomic): Likewise.
3000 * c-common.h (build_binary_op): Update declaration.
3002 2017-08-08 Martin Liska <mliska@suse.cz>
3004 * c-ada-spec.c: Include header files.
3005 * c-ubsan.c: Likewise.
3006 * c-warn.c: Likewise.
3008 2017-08-07 Jakub Jelinek <jakub@redhat.com>
3011 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3013 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3015 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3016 (print_ada_methods): Likewise.
3017 (print_ada_declaration): Likewise.
3019 2017-08-07 Martin Liska <mliska@suse.cz>
3021 * array-notation-common.c: Add new includes.
3022 * c-format.c( handle_format_attribute): Canonicalize a format
3024 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3026 * c-pretty-print.c: Add new include.
3028 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3030 * c-ada-spec.c (has_static_fields): Look only into variables.
3031 (print_constructor): Add TYPE parameter and use it for the name.
3032 (print_destructor): Likewise.
3033 (print_ada_declaration): Adjust to new constructor/destructor names.
3034 Adjust calls to print_constructor and print_destructor.
3035 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3036 Look only into variables in the final loop.
3038 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3040 * c-ada-spec.c (has_static_fields): Look only into fields.
3041 (dump_generic_ada_node): Small tweak.
3042 (dump_nested_types): Look only into fields.
3043 (print_ada_declaration): Look only into methods. Small tweak.
3044 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3046 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3048 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3049 (dump_ada_function_declaration): Likewise.
3050 (dump_generic_ada_node): Likewise.
3051 (print_ada_declaration): Add support for const-qualified variables.
3053 2017-07-31 Martin Liska <mliska@suse.cz>
3056 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3057 Guard condition with flag_sanitize_p also with current_function_decl
3059 (ubsan_maybe_instrument_reference_or_call): Likewise.
3061 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
3063 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3065 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3067 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3069 (print_ada_declaration): Add missing guard for record types.
3071 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3074 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3075 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3076 new COMPOUND_EXPRs around the rhs of the comparison.
3078 2017-07-27 Marek Polacek <polacek@redhat.com>
3081 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3084 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3086 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3087 (handle_noipa_attribute): New function.
3089 2017-07-07 Torsten Duwe <duwe@suse.de>
3091 * c-attribs.c (c_common_attribute_table): Add entry for
3092 "patchable_function_entry".
3094 2017-07-20 Nathan Sidwell <nathan@acm.org>
3096 Remove TYPE_METHODS.
3097 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3098 dump_ada_template, print_ada_methods,
3099 print_ada_declaration): Member fns are on TYPE_FIELDS.
3101 2017-07-18 Nathan Sidwell <nathan@acm.org>
3103 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3105 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3107 * c-common.c (try_to_locate_new_include_insertion_point): New
3109 (per_file_includes_t): New typedef.
3110 (added_includes_t): New typedef.
3111 (added_includes): New variable.
3112 (maybe_add_include_fixit): New function.
3113 * c-common.h (maybe_add_include_fixit): New decl.
3115 2017-07-10 Martin Sebor <msebor@redhat.com>
3118 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3120 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3122 * c-common.c (selftest::c_family_tests): New.
3123 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3124 (selftest::c_family_tests): New decl.
3126 2017-07-04 Marek Polacek <polacek@redhat.com>
3129 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3132 2017-07-04 Marek Polacek <polacek@redhat.com>
3134 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3136 2017-06-28 Martin Liska <mliska@suse.cz>
3139 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3140 to a function declaration.
3142 2017-06-28 Martin Liska <mliska@suse.cz>
3145 * c.opt: Add IntegerRange to various options.
3147 2017-06-26 Marek Polacek <polacek@redhat.com>
3150 * c-common.h (warn_for_multistatement_macros): Declare.
3151 * c-warn.c: Include "c-family/c-indentation.h".
3152 (warn_for_multistatement_macros): New function.
3153 * c.opt (Wmultistatement-macros): New option.
3154 * c-indentation.c (guard_tinfo_to_string): No longer static.
3155 Change the parameter type to "enum rid". Handle RID_SWITCH.
3156 * c-indentation.h (guard_tinfo_to_string): Declare.
3158 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3160 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3162 2017-06-15 Martin Sebor <msebor@redhat.com>
3165 * c.opt (-Wclass-memaccess): New option.
3167 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3169 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3171 2017-06-13 Marek Polacek <polacek@redhat.com>
3174 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3177 2017-06-13 Martin Liska <mliska@suse.cz>
3180 * c-attribs.c (add_no_sanitize_value): New function.
3181 (handle_no_sanitize_attribute): Likewise.
3182 (handle_no_sanitize_address_attribute): Use the function.
3183 (handle_no_sanitize_thread_attribute): New function.
3184 (handle_no_address_safety_analysis_attribute): Use
3185 add_no_sanitize_value.
3186 (handle_no_sanitize_undefined_attribute): Likewise.
3187 * c-common.h: Declare new functions.
3188 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3189 (ubsan_instrument_shift): Likewise.
3190 (ubsan_instrument_bounds): Likewise.
3191 (ubsan_maybe_instrument_array_ref): Likewise.
3192 (ubsan_maybe_instrument_reference_or_call): Likewise.
3194 2017-06-11 Jason Merrill <jason@redhat.com>
3196 * c-ada-spec.c, c-pragma.c: Use id_equal.
3198 2017-06-04 Marek Polacek <polacek@redhat.com>
3201 * c-format.c (matching_type_p): Return false if any of the types
3202 requires structural equality.
3204 2017-06-02 Martin Sebor <msebor@redhat.com>
3207 * c-warn.c (conversion_warning): Use -Wconversion for integer
3208 conversion and -Wfloat-conversion for floating one.
3210 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3212 * c.opt (Wsizeof-pointer-div): New warning option.
3214 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3216 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3217 (Wcatch-value=1): Enable by -Wall.
3219 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3221 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3223 * c.opt (fdiagnostics-show-template-tree): New option.
3224 (felide-type): New option.
3226 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3228 * c.opt (Wcatch-value=): New C++ warning flag.
3230 2017-05-24 Nathan Sidwell <nathan@acm.org>
3232 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3233 const casts to avoid warning.
3235 2017-05-24 Martin Sebor <msebor@redhat.com>
3238 * c-common.h (unsafe_conversion_p): Add a function argument.
3239 * c-common.c (unsafe_conversion_p): Same.
3240 Add type names and values to diagnostics.
3241 (scalar_to_vector): Adjust.
3242 * c-warn.c (constant_expression_error): Add a function argument.
3243 Add type names and values to diagnostics.
3244 (conversion_warning): Add a function argument.
3245 Add type names and values to diagnostics.
3246 (warnings_for_convert_and_check): Same.
3248 2017-05-19 Jason Merrill <jason@redhat.com>
3250 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3253 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3255 * c-format.c (locus): Move out of function scope,
3258 2017-05-19 Nathan Sidwell <nathan@acm.org>
3260 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3261 (c_common_parse_file): Remove class dump handling.
3262 (get_dump_info): Likewise.
3264 2017-05-19 Richard Biener <rguenther@suse.de>
3267 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3268 to alias-set zero memory.
3270 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3272 * c-format.c (local_tree_type_node): Add GTY attribute.
3274 2017-05-18 Marek Polacek <polacek@redhat.com>
3276 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3277 (c_common_fixed_point_type_for_size): Likewise.
3278 (c_common_type_for_mode): Likewise.
3279 (shorten_compare): Likewise.
3280 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3281 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3283 2017-05-18 Marek Polacek <polacek@redhat.com>
3285 * c-common.c (self_promoting_args_p): Change the return type to bool.
3286 Use false/true instead of 0/1.
3287 * c-common.h (self_promoting_args_p): Update.
3289 2017-05-17 Marek Polacek <polacek@redhat.com>
3291 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3292 * c-warn.c: Likewise.
3294 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3296 Implement new C++ intrinsics __is_assignable and __is_constructible.
3297 * c-common.c (__is_assignable, __is_constructible): New.
3298 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3300 2017-05-17 Martin Liska <mliska@suse.cz>
3302 * c-common.h: Introduce dump_flags_t type and
3303 use it instead of int type.
3304 * c-gimplify.c (c_genericize): Likewise.
3305 * c-opts.c: Likewise.
3307 2017-05-17 Marek Polacek <polacek@redhat.com>
3309 * c-common.c (c_save_expr): Remove.
3310 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3311 * c-common.h (c_save_expr): Remove declaration.
3313 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3316 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3317 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3318 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3319 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3321 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3323 2017-05-09 Marek Polacek <polacek@redhat.com>
3326 * c-warn.c (unwrap_c_maybe_const): New.
3327 (warn_logical_operator): Call it.
3329 2017-05-09 Nathan Sidwell <nathan@acm.org>
3331 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3332 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3334 2017-05-08 Martin Sebor <msebor@redhat.com>
3336 PR translation/80280
3337 * c-format.h (struct format_flag_spec): Add new member.
3339 * c-format.c (local_tree_type_node): New global.
3340 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3341 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3342 (strfmon_flag_specs): Likewise.
3343 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3344 with distinct quoting properties.
3345 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3346 (flag_chars_t::validate): Add argument and handle bad quoting.
3347 (check_format_info_main): Handle quoting problems.
3348 (init_dynamic_diag_info): Simplify.
3350 2017-05-08 Jason Merrill <jason@redhat.com>
3352 * c-opts.c (c_common_post_options): Update defaults for
3353 flag_abi_version and flag_abi_compat_version.
3355 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3357 * c-common.c (c_cpp_error): Replace report_diagnostic
3358 with diagnostic_report_diagnostic.
3360 2017-05-04 Martin Sebor <msebor@redhat.com>
3362 PR translation/80280
3363 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3364 (handle_weakref_attribute): Same.
3366 2017-05-03 Nathan Sidwell <nathan@acm.org>
3368 Canonicalize canonical type hashing
3369 * c-common.c (complete_array_type): Use type_hash_canon.
3371 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3374 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3376 (cilk_install_body_pedigree_operations): Likewise.
3377 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3379 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3380 (cilk_install_body_pedigree_operations): Likewise.
3381 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3384 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3387 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3388 flag on non-aggregate element types.
3390 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3392 * c-common.c (c_type_hasher, type_hash_table): Remove.
3393 (c_common_get_alias_set): Remove unreachable code.
3394 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3396 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3398 * c.opt (Wextra-semi): New C++ warning flag.
3400 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3403 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3405 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3409 * c-common.c (c_common_type_for_mode): Don't handle
3410 widest_*_literal_type_node here.
3411 c_common_signed_or_unsigned_type): Likewise.
3412 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3413 to *intTI_type_node or *intDI_type_node depending on whether
3414 TImode is supported by the target or not.
3416 2017-04-10 Martin Liska <mliska@suse.cz>
3419 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3420 doing an UBSAN check.
3422 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3424 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3426 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3429 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3431 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3432 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3435 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3437 PR documentation/78732
3438 * c.opt (Wendif-labels): Fix description to refer to
3439 #else rather than #elif.
3441 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3444 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3445 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3447 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3450 * c-common.c (c_common_mark_addressable_vec): Don't set
3451 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3453 2017-03-21 Martin Sebor <msebor@redhat.com>
3456 * c-common.c (set_underlying_type): Mark type used only when
3457 original del is declared unused.
3459 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3461 PR translation/79848
3462 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3465 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3468 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3469 from inform's message, so that xgettext can locate it.
3471 2017-03-09 Marek Polacek <polacek@redhat.com>
3475 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3476 conversion to the attribute list.
3478 2017-03-09 Martin Liska <mliska@suse.cz>
3480 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3482 2017-03-03 Jason Merrill <jason@redhat.com>
3484 * c.opt (Wnoexcept-type): New.
3486 2017-03-02 Richard Biener <rguenther@suse.de>
3489 * c-common.c (c_common_mark_addressable_vec): Look through
3492 2017-02-28 Martin Liska <mliska@suse.cz>
3494 * c.opt: Replace space with tabular for options of <number>
3497 2017-02-28 Martin Liska <mliska@suse.cz>
3499 * c.opt: Fix --help=option -Q for options which are of
3502 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3505 * c-common.c (check_function_restrict): New function.
3506 (check_function_arguments): Add FNDECL argument. Call
3507 check_function_restrict if -Wrestrict.
3508 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3509 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3510 * c-common.h (check_function_arguments): Add FNDECL argument.
3511 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3513 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3515 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3516 treatment of parameters with pointer-to-tagged type and tidy up.
3517 (print_ada_methods): Remove the special treatment of C++ static member
3520 2017-02-22 Martin Liska <mliska@suse.cz>
3522 * c.opt: Replace inequality signs with square brackets
3525 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3528 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3531 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3533 * c-cppbuiltin.c (builtin_define_float_constants): Define
3534 __DECIMAL_DIG__ to the value for long double.
3536 2017-02-15 Marek Polacek <polacek@redhat.com>
3539 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3540 conversion has occured.
3542 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3544 * c-common.c (c_common_reswords): Add "__RTL".
3545 * c-common.h (enum rid): Add RID_RTL.
3547 2017-01-20 Marek Polacek <polacek@redhat.com>
3550 * c-common.h (do_warn_duplicated_branches_r): Declare.
3551 * c-gimplify.c (c_genericize): Walk the function tree calling
3552 do_warn_duplicated_branches_r.
3553 * c-warn.c (expr_from_macro_expansion_r): New.
3554 (do_warn_duplicated_branches): New.
3555 (do_warn_duplicated_branches_r): New.
3556 * c.opt (Wduplicated-branches): New option.
3558 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3561 * c-indentation.c (warn_for_misleading_indentation): Use the past
3562 subjunctive in the note.
3564 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3567 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3568 start type to integer_type.
3570 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3573 * c.opt (gen-decls): Add Driver flag.
3575 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3578 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3581 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3583 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3586 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3588 2017-01-12 Martin Sebor <msebor@redhat.com>
3590 (-Wformat-overflow): ...to this.
3592 2017-01-11 Martin Sebor <msebor@redhat.com>
3595 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3596 Also enable for LTO.
3598 2017-01-10 Jason Merrill <jason@redhat.com>
3600 Implement P0195R2, C++17 variadic using.
3601 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3603 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3605 PR translation/79019
3606 PR translation/79020
3607 * c.opt (Wnormalized=): Fix typo in description.
3609 2017-01-08 Martin Sebor <msebor@redhat.com>
3612 * c.opt (-Wformat-truncation): New option.
3614 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3616 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3617 value to unsigned short to fit in 4 hex digits without
3620 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3622 * c.opt (fsso-struct): Add 'native' value.
3624 2017-01-05 Martin Liska <mliska@suse.cz>
3627 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3630 2017-01-04 Marek Polacek <polacek@redhat.com>
3633 * c.opt (Wpointer-compare): New option.
3635 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3638 * c.opt (fsso-struct=): Add RejectNegative.
3640 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3642 Update copyright years.
3644 2016-12-29 Martin Liska <mliska@suse.cz>
3647 * c.opt (strong-eval-order): Add RejectNegative keyword.
3649 2016-12-22 Jason Merrill <jason@redhat.com>
3651 Implement P0522R0, matching of template template arguments.
3652 * c-cppbuiltin.c (c_cpp_builtins): Define
3653 __cpp_template_template_args.
3655 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3658 * c-common.c (struct nonnull_arg_ctx): New type.
3659 (check_function_nonnull): Return bool instead of void. Use
3660 nonnull_arg_ctx as context rather than just location_t.
3661 (check_nonnull_arg): Adjust for the new context type, set
3662 warned_p to true if a warning has been diagnosed.
3663 (check_function_arguments): Return bool instead of void.
3664 * c-common.h (check_function_arguments): Adjust prototype.
3666 2016-12-21 Jason Merrill <jason@redhat.com>
3668 * c.opt (-fnew-ttp-matching): New flag.
3669 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3671 2016-12-14 Martin Jambor <mjambor@suse.cz>
3673 * c-omp.c: Include omp-general.h instead of omp-low.h.
3674 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3677 2016-12-14 Martin Sebor <msebor@redhat.com>
3680 * c-common.c (check_nonnull_arg): Disable when optimization
3683 2016-12-12 Marek Polacek <polacek@redhat.com>
3686 * c-common.c (attribute_fallthrough_p): Return false for
3689 2016-12-08 Martin Sebor <msebor@redhat.com>
3692 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3694 2016-12-08 Martin Sebor <msebor@redhat.com>
3697 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3700 2016-12-07 Martin Sebor <msebor@redhat.com>
3706 * c.opt (-Wstringop-overflow): New option.
3708 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3710 * c-attribs.c (asan odr indicator): New attribute.
3711 (handle_asan_odr_indicator_attribute): New function.
3713 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3715 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3718 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3720 * c-common.c (excess_precision_mode_join): New.
3721 (c_ts18661_flt_eval_method): New.
3722 (c_c11_flt_eval_method): Likewise.
3723 (c_flt_eval_method): Likewise.
3724 * c-common.h (excess_precision_mode_join): New.
3725 (c_flt_eval_method): Likewise.
3726 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3727 (cpp_iec_559_value): Call it.
3728 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3729 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3730 __FLT_EVAL_METHOD_TS_18661_3__.
3732 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3734 * c-opts.c (c_common_post_options): Add logic to handle the default
3735 case for -fpermitted-flt-eval-methods.
3737 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
3739 * c.opt (Wexpansion-to-defined): New.
3741 2016-11-23 Jakub Jelinek <jakub@redhat.com>
3744 * c-pragma.c (handle_pragma_target): Don't replace
3745 current_target_pragma, but chainon the new args to the current one.
3747 2016-11-22 Nathan Sidwell <nathan@acm.org>
3749 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
3750 indentation and formatting.
3752 2016-11-21 Martin Sebor <msebor@redhat.com>
3754 * c.opt (-fprintf-return-value): Enable by default.
3756 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3759 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3760 * c-common.c (c_common_nodes_and_builtins): Initialize
3761 const_tm_ptr_type_node.
3763 2016-11-16 Marek Polacek <polacek@redhat.com>
3766 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3768 2016-11-14 Jakub Jelinek <jakub@redhat.com>
3770 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3772 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3773 Richard Biener <rguenther@suse.de>
3775 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3776 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3777 * c.opt (fgimple): New option.
3779 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3782 * c-common.h (warn_for_restrict): Declare.
3783 * c-warn.c: Include gcc-rich-location.h.
3784 (warn_for_restrict): New function.
3785 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3786 (gcc_cdiag_char_table): Likewise.
3787 (gcc_cxxdiag_char_table): Likewise.
3788 * c.opt (Wrestrict): New option.
3790 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3792 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3793 for nested types only if the type is a record or union and dump SLOC.
3795 2016-11-09 Jason Merrill <jason@redhat.com>
3797 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3799 2016-11-09 Jakub Jelinek <jakub@redhat.com>
3801 * c-ubsan.c (ubsan_instrument_shift): Handle split
3802 -fsanitize=shift-base and -fsanitize=shift-exponent.
3804 2016-11-07 Jason Merrill <jason@redhat.com>
3806 * c.opt (Wc++1z-compat): New.
3807 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3809 2016-11-07 Martin Liska <mliska@suse.cz>
3811 * c-warn.c (warn_for_unused_label): Save all labels used
3812 in goto or in &label.
3814 2016-11-03 Jason Merrill <jason@redhat.com>
3816 * c-cppbuiltin.c (c_cpp_builtins): Correct
3817 __cpp_inheriting_constructors.
3819 2016-11-01 Jason Merrill <jason@redhat.com>
3821 * c-cppbuiltin.c (c_cpp_builtins): Update
3822 __cpp_inheriting_constructors.
3824 * c.opt (-fnew-inheriting-ctors): New.
3825 * c-opts.c: Default to on for ABI 11+.
3827 2016-10-31 Jakub Jelinek <jakub@redhat.com>
3830 * c.opt (fext-numeric-literals): Add Var and Init.
3831 * c-opts.c (c_common_handle_option): Don't clear
3832 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3833 (c_common_post_options): Clear it here if not set
3836 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
3839 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3842 2016-10-25 Jakub Jelinek <jakub@redhat.com>
3844 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3845 * c-common.c (c_common_reswords): Add __builtin_launder.
3847 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3849 * c-common.c (c_common_truthvalue_conversion): Warn for
3850 multiplications in boolean context. Fix the quoting of '<<' and '<'
3851 in the shift warning.
3853 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3855 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3857 2016-10-20 Jason Merrill <jason@redhat.com>
3859 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3861 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3863 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3864 integer shift ops in boolean context.
3866 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
3868 * c.opt (Walloca): New.
3869 (Walloca-larger-than=): New.
3870 (Wvla-larger-than=): New.
3872 2016-10-17 Marek Polacek <polacek@redhat.com>
3874 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3875 Return immediately when finding a match.
3876 (warn_tautological_cmp): Remove a boolean variable that is no longer
3879 2016-10-17 Marek Polacek <polacek@redhat.com>
3881 * c-attribs.c: New file.
3882 * c-common.c: Move attributes handling to c-attribs.c.
3883 (get_nonnull_operand): No longer static.
3884 * c-common.h: Move the declarations from c-attribs.c to its own section.
3886 2016-10-14 Jason Merrill <jason@redhat.com>
3888 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3889 and __cpp_deduction_guides.
3891 2016-10-13 Jason Merrill <jason@redhat.com>
3893 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3895 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3897 * c-cppbuiltin.c: Include memmodel.h.
3898 * c-opts.c: Likewise.
3899 * c-pragma.c: Likewise.
3900 * c-warn.c: Likewise.
3902 2016-10-12 Jakub Jelinek <jakub@redhat.com>
3904 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3905 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3906 * c-opts.c (sanitize_cpp_opts): Initialize
3907 cpp_opts->cpp_warn_implicit_fallthrough.
3909 2016-10-11 Marek Polacek <polacek@redhat.com>
3911 * c-common.c (warning_candidate_p): Change the return type to bool
3912 and return true/false instead of 1/0.
3913 (vector_mode_valid_p): Likewise.
3915 2016-10-11 Marek Polacek <polacek@redhat.com>
3917 * c-common.c (fold_for_warn): No longer static.
3918 (bool_promoted_to_int_p): Likewise.
3919 (c_common_get_narrower): Likewise.
3920 (constant_expression_warning): Move to c-warn.c.
3921 (constant_expression_error): Likewise.
3922 (overflow_warning): Likewise.
3923 (warn_logical_operator): Likewise.
3924 (find_array_ref_with_const_idx_r): Likewise.
3925 (warn_tautological_cmp): Likewise.
3926 (expr_has_boolean_operands_p): Likewise.
3927 (warn_logical_not_parentheses): Likewise.
3928 (warn_if_unused_value): Likewise.
3929 (strict_aliasing_warning): Likewise.
3930 (sizeof_pointer_memaccess_warning): Likewise.
3931 (check_main_parameter_types): Likewise.
3932 (conversion_warning): Likewise.
3933 (warnings_for_convert_and_check): Likewise.
3934 (match_case_to_enum_1): Likewise.
3935 (match_case_to_enum): Likewise.
3936 (c_do_switch_warnings): Likewise.
3937 (warn_for_omitted_condop): Likewise.
3938 (readonly_error): Likewise.
3939 (lvalue_error): Likewise.
3940 (invalid_indirection_error): Likewise.
3941 (warn_array_subscript_with_type_char): Likewise.
3942 (warn_about_parentheses): Likewise.
3943 (warn_for_unused_label): Likewise.
3944 (warn_for_div_by_zero): Likewise.
3945 (warn_for_memset): Likewise.
3946 (warn_for_sign_compare): Likewise.
3947 (do_warn_double_promotion): Likewise.
3948 (do_warn_unused_parameter): Likewise.
3949 (record_locally_defined_typedef): Likewise.
3950 (maybe_record_typedef_use): Likewise.
3951 (maybe_warn_unused_local_typedefs): Likewise.
3952 (maybe_warn_bool_compare): Likewise.
3953 (maybe_warn_shift_overflow): Likewise.
3954 (warn_duplicated_cond_add_or_warn): Likewise.
3955 (diagnose_mismatched_attributes): Likewise.
3956 * c-common.h: Move the declarations from c-warn.c to its own section.
3957 * c-warn.c: New file.
3959 2016-10-08 Jason Merrill <jason@redhat.com>
3961 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3962 into COND_EXPR in C++.
3964 2016-10-08 Jakub Jelinek <jakub@redhat.com>
3966 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3967 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3968 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3970 2016-10-07 Jakub Jelinek <jakub@redhat.com>
3972 Implement LWG2296 helper intrinsic
3973 * c-common.h (enum rid): Add RID_ADDRESSOF.
3974 * c-common.c (c_common_reswords): Add __builtin_addressof.
3976 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3979 * c-common.c (c_common_truthvalue_conversion): Warn also for
3980 suspicious enum values in boolean context.
3982 2016-10-06 Jakub Jelinek <jakub@redhat.com>
3984 Implement P0258R2 - helper for C++17
3985 std::has_unique_object_representations trait
3986 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3987 * c-common.c (c_common_reswords): Add
3988 __has_unique_object_representations.
3990 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3993 * c-ubsan.c (ubsan_instrument_return): Don't call
3994 initialize_sanitizer_builtins here.
3996 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3998 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3999 conditional expression in boolean context when only one arm is
4002 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4005 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4008 * c-common.c (c_common_reswords): Update comment for C++11.
4010 2016-10-04 Jason Merrill <jason@redhat.com>
4012 * c-common.c (make_tree_vector_from_ctor): New.
4013 * c-common.h: Declare it.
4015 2016-10-04 Jakub Jelinek <jakub@redhat.com>
4017 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4018 __LIBGCC_JCR_SECTION_NAME__.
4020 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4022 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4023 left shift in boolean context.
4025 2016-09-29 Jakub Jelinek <jakub@redhat.com>
4027 Implement P0001R1 - C++17 removal of register storage class specifier
4028 * c.opt (Wregister): New warning.
4029 * c-opts.c (c_common_post_options): Enable -Wregister by
4032 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4034 * c-opts.c (c_common_post_options): Remove special case for
4035 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4038 2016-09-27 Jakub Jelinek <jakub@redhat.com>
4040 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4043 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4045 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4047 * c-common.c: Include memmodel.h.
4049 2016-09-26 Marek Polacek <polacek@redhat.com>
4051 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4053 2016-09-26 Marek Polacek <polacek@redhat.com>
4056 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4057 (handle_fallthrough_attribute): New function.
4058 (attribute_fallthrough_p): New function.
4059 * c-common.h (attribute_fallthrough_p): Declare.
4061 2016-09-24 Marek Polacek <polacek@redhat.com>
4064 * c.opt (Wbool-operation): New.
4066 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4068 * c-common.c (c_common_truthvalue_conversion): Inhibit
4069 Wint-in-bool-context warning with from_macro_definition_at.
4070 Mention the expression will always evaluate to true.
4072 2016-09-21 Martin Sebor <msebor@redhat.com>
4075 * c.opt (fprintf-return-value): Temporarily initialize to zero
4076 to unblock bootstrap failures.
4078 2016-09-21 Jakub Jelinek <jakub@redhat.com>
4081 * c.opt (Waligned-new=): Add RejectNegative.
4082 (faligned-new=): Likewise. Spelling fix - change
4083 aligned_new_threshhold to aligned_new_threshold.
4084 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4085 to aligned_new_threshold.
4087 2016-09-20 Martin Sebor <msebor@redhat.com>
4090 * c.opt: Add -Wformat-length and -fprintf-return-value.
4092 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4095 * c.opt (Wint-in-bool-context): New warning.
4096 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4097 constants in boolean context.
4099 2016-09-19 Joseph Myers <joseph@codesourcery.com>
4101 * c-common.c (max_align_t_align): Also consider alignment of
4104 2016-09-15 Jason Merrill <jason@redhat.com>
4106 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4109 2016-09-14 Jason Merrill <jason@redhat.com>
4111 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4112 limit FIELD_DECL, either.
4114 2016-09-14 Marek Polacek <polacek@redhat.com>
4116 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4117 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4118 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4120 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4122 * c-common.c (warn_logical_not_parentheses): Replace
4123 rich_location::add_fixit_insert calls with add_fixit_insert_before
4124 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4126 2016-09-13 Jason Merrill <jason@redhat.com>
4127 Tom de Vries <tom@codesourcery.com>
4130 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4132 2016-09-13 Jason Merrill <jason@redhat.com>
4134 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4137 2016-09-12 Jason Merrill <jason@redhat.com>
4139 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4140 bit/byte confusion, allow large alignment for types.
4142 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4145 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4147 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4150 * c-format.c (argument_parser::check_argument_type): Add params
4151 "type_start" and "conversion_char". Use the former to generate
4152 offset_to_type_start and pass it and conversion_char to
4154 (check_format_info_main): Capture the start of the type
4155 information as "type_start", and pass it an format_char
4156 to arg_parser.check_argument_type.
4157 (check_format_types): Provide an example in the leading comment.
4158 Add params "offset_to_type_start" and "conversion_char"; pass
4159 them to format_type_warning calls.
4160 (test_get_modifier_for_format_len): Likewise.
4161 (matching_type_p): New function.
4162 (get_format_for_type): Add param "conversion_char" and move
4163 implementation into...
4164 (get_format_for_type_1): ...new function, called twice.
4165 Use new function matching_type_p rather than checking for
4166 TYPE_CANONICAL equality.
4167 (get_corrected_substring): New function.
4168 (format_type_warning): Provide an example in the leading comment.
4169 Add params "offset_to_type_start" and "conversion_char". Replace
4170 call to get_format_for_type with call to get_corrected_substring
4171 and move rejection of hints for widths/precisions there.
4172 (assert_format_for_type_streq): Add param "conversion_char".
4173 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4174 (test_get_format_for_type_printf): Add conversion chars to the
4175 tests, adding coverage for various combinations of integer
4176 vs double conversions, and for preserving octal and hexadecimal
4178 (test_get_format_for_type_scanf): Add conversion chars to the
4181 2016-09-10 Tom de Vries <tom@codesourcery.com>
4184 * c-common.c (build_va_arg): Handle more strict
4185 targetm.canonical_va_list_type. Replace first argument type error with
4188 2016-09-09 Martin Sebor <msebor@redhat.com>
4192 * c-format.c (argument_parser::find_format_char_info): Use %qc
4193 format directive unconditionally.
4195 2016-09-09 Jason Merrill <jason@redhat.com>
4197 Implement C++17 new of over-aligned types.
4198 * c.opt: Add -faligned-new and -Waligned-new.
4199 * c-common.c (max_align_t_align): Split out from...
4200 (cxx_fundamental_alignment_p): ...here.
4201 * c-common.h: Declare it.
4202 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4204 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4206 * c-cppbuiltin.c (builtin_define_type_width): New function.
4207 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4210 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4212 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4214 (substring_loc::get_location): Move to substring-locations.c,
4215 keeping implementation as...
4216 (c_get_substring_location): New function, from the above, reworked
4217 to use accessors rather than member lookup.
4218 * c-common.h (class substring_loc): Move to substring-locations.h,
4219 replacing with a forward decl.
4220 (c_get_substring_location): New decl.
4221 * c-format.c: Include "substring-locations.h".
4222 (format_warning_va): Move to substring-locations.c.
4223 (format_warning_at_substring): Likewise.
4225 2016-09-06 Martin Sebor <msebor@redhat.com>
4228 * c-format.c (check_function_format): Avoid issuing warnings for
4229 functions unless they call format functions with non-constant
4232 2016-09-06 Richard Biener <rguenther@suse.de>
4235 * c-common.c (c_common_mark_addressable_vec): Handle
4236 COMPOUND_LITERAL_EXPR.
4238 2016-09-05 Marek Polacek <polacek@redhat.com>
4241 * c-common.c (bool_promoted_to_int_p): New function.
4242 (expr_has_boolean_operands_p): New function.
4243 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4244 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4246 2016-09-04 Tom de Vries <tom@codesourcery.com>
4249 2016-08-29 Tom de Vries <tom@codesourcery.com>
4251 * c-common.c (build_va_arg): Replace first argument type error
4254 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4257 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4258 (c_finish_omp_for): Reject _Atomic qualified iterators.
4260 2016-09-01 Martin Sebor <msebor@redhat.com>
4262 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4263 size to guarantee it fits the output of the formatted function
4264 regardless of its arguments.
4266 2016-09-01 Marek Polacek <polacek@redhat.com>
4269 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4272 2016-08-29 Marek Polacek <polacek@redhat.com>
4275 * c-common.c (warn_logical_not_parentheses): Don't warn for
4276 a comparison or a logical operator.
4278 2016-08-29 Tom de Vries <tom@codesourcery.com>
4280 * c-common.c (build_va_arg): Fix type comparison assert.
4282 2016-08-29 Tom de Vries <tom@codesourcery.com>
4284 * c-common.c (build_va_arg): Replace first argument type error
4287 2016-08-29 Tom de Vries <tom@codesourcery.com>
4290 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4291 with error_mark_node as va_list instead of with illegal va_list.
4293 2016-08-25 Marek Polacek <polacek@redhat.com>
4294 David Malcolm <dmalcolm@redhat.com>
4296 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4297 * c-common.h (warn_logical_not_parentheses): Update declaration.
4299 2016-08-22 Marek Polacek <polacek@redhat.com>
4302 * c-common.c (warn_for_memset): Check type for null.
4304 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4306 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4307 _FloatNx types for suffixes for built-in functions.
4309 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4312 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4313 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4314 (RID_FLOAT128X): New enum rid values.
4315 (CASE_RID_FLOATN_NX): New macro.
4316 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4318 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4319 corresponding complex types.
4320 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4321 _FloatNx and corresponding complex types.
4322 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4323 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4324 and _FloatNx types for the widest type for determining
4325 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4326 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4327 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4329 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4331 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4334 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4336 * c-opts.c (c_diagnostic_finalizer): Update for change to
4337 diagnostic_show_locus.
4339 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4341 * c-common.c: Include "spellcheck.h".
4342 (cb_get_suggestion): New function.
4343 * c-common.h (cb_get_suggestion): New decl.
4344 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4347 2016-08-18 Marek Polacek <polacek@redhat.com>
4350 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4353 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4356 * c-common.c (substring_loc::get_range): Rename to...
4357 (substring_loc::get_location): ...this, converting param from a
4358 source_range * to a location_t *. Call
4359 get_source_location_for_substring rather than
4360 get_source_range_for_substring, and pass in m_caret_idx.
4361 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4362 (substring_loc::get_range): Replace with...
4363 (substring_loc::get_location): ...this.
4364 (substring_loc::set_caret_index): New method.
4365 (substring_loc): Add field m_caret_idx.
4366 * c-format.c (format_warning_va): Update for above changes.
4367 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4368 clashing with type name.
4369 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4370 (check_argument_type): Likewise.
4371 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4372 Use a copy when emitting warnings, setting the caret index from TYPE.
4374 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4375 Arnaud Charlet <charlet@adacore.com>
4377 * c-ada-spec.c (dump_number): New function.
4378 (handle_escape_character): Likewise.
4379 (print_ada_macros): Add handling of constant integers and strings.
4381 2016-08-12 Marek Polacek <polacek@redhat.com>
4384 * c-common.c (scalar_to_vector): Adjust fall through comment.
4385 * c-opts.c (c_common_handle_option): Likewise.
4386 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4387 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4388 fall through comment.
4389 * cilk.c (extract_free_variables): Add FALLTHRU.
4391 2016-08-10 Jason Merrill <jason@redhat.com>
4393 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4395 2016-08-09 Jason Merrill <jason@redhat.com>
4397 * c-common.c (c_common_attribute_table): vector_size affects type
4400 2016-08-09 Marek Polacek <polacek@redhat.com>
4403 * c-ada-spec.c (dump_generic_ada_node): Add return.
4405 2016-08-09 Jason Merrill <jason@redhat.com>
4407 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4408 C++17 constexpr lambdas.
4410 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4413 * c-common.h (selftest::c_format_c_tests): New declaration.
4414 (selftest::run_c_tests): New declaration.
4415 * c-format.c: Include "selftest.h.
4416 (format_warning_va): Add param "corrected_substring" and use
4417 it to add a replacement fix-it hint.
4418 (format_warning_at_substring): Likewise.
4419 (format_warning_at_char): Update for new param of
4421 (argument_parser::check_argument_type): Pass "fki" to
4423 (check_format_types): Add param "fki" and pass it to
4424 format_type_warning.
4425 (deref_n_times): New function.
4426 (get_modifier_for_format_len): New function.
4427 (selftest::test_get_modifier_for_format_len): New function.
4428 (get_format_for_type): New function.
4429 (format_type_warning): Add param "fki" and use it to attempt
4430 to provide hints for argument types when calling
4431 format_warning_at_substring.
4432 (selftest::get_info): New function.
4433 (selftest::assert_format_for_type_streq): New function.
4434 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4435 (selftest::test_get_format_for_type_printf): New function.
4436 (selftest::test_get_format_for_type_scanf): New function.
4437 (selftest::c_format_c_tests): New function.
4439 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4442 * c-format.c: Include "diagnostic.h".
4443 (location_column_from_byte_offset): Delete.
4444 (location_from_offset): Delete.
4445 (format_warning_va): New function.
4446 (format_warning_at_substring): New function.
4447 (format_warning_at_char): New function.
4448 (check_format_arg): Capture location of format_tree and pass to
4449 check_format_info_main.
4450 (argument_parser): Add fields "start_of_this_format" and
4451 "format_string_cst".
4452 (flag_chars_t::validate): Add param "format_string_cst". Convert
4453 warning_at call using location_from_offset to call to
4454 format_warning_at_char.
4455 (argument_parser::argument_parser): Add param "format_string_cst_"
4456 and use use it to initialize field "format_string_cst".
4457 Initialize new field "start_of_this_format".
4458 (argument_parser::read_format_flags): Convert warning_at call
4459 using location_from_offset to a call to format_warning_at_char.
4460 (argument_parser::read_any_format_left_precision): Likewise.
4461 (argument_parser::read_any_format_precision): Likewise.
4462 (argument_parser::read_any_other_modifier): Likewise.
4463 (argument_parser::find_format_char_info): Likewise, in three places.
4464 (argument_parser::parse_any_scan_set): Likewise, in one place.
4465 (argument_parser::handle_conversions): Likewise, in two places.
4466 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4467 and use it to make a substring_loc. Pass the latter to
4469 (check_format_info_main): Add params "fmt_param_loc" and
4470 "format_string_cst". Convert warning_at calls using
4471 location_from_offset to calls to format_warning_at_char. Pass the
4472 new params to the arg_parser ctor. Pass "format_string_cst" to
4473 flag_chars.validate. Pass "fmt_param_loc" to
4474 arg_parser.check_argument_type.
4475 (check_format_types): Convert first param from a location_t
4476 to a const substring_loc & and rename to "fmt_loc". Attempt
4477 to extract the range of the relevant parameter and pass it
4478 to format_type_warning.
4479 (format_type_warning): Convert first param from a location_t
4480 to a const substring_loc & and rename to "fmt_loc". Add
4481 params "param_range" and "type". Replace calls to warning_at
4482 with calls to format_warning_at_substring.
4484 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4486 * c-format.c (class flag_chars_t): New class.
4487 (struct length_modifier): New struct.
4488 (class argument_parser): New class.
4489 (flag_chars_t::flag_chars_t): New ctor.
4490 (flag_chars_t::has_char_p): New method.
4491 (flag_chars_t::add_char): New method.
4492 (flag_chars_t::validate): New method.
4493 (flag_chars_t::get_alloc_flag): New method.
4494 (flag_chars_t::assignment_suppression_p): New method.
4495 (argument_parser::argument_parser): New ctor.
4496 (argument_parser::read_any_dollar): New method.
4497 (argument_parser::read_format_flags): New method.
4498 (argument_parser::read_any_format_width): New method.
4499 (argument_parser::read_any_format_left_precision): New method.
4500 (argument_parser::read_any_format_precision): New method.
4501 (argument_parser::handle_alloc_chars): New method.
4502 (argument_parser::read_any_length_modifier): New method.
4503 (argument_parser::read_any_other_modifier): New method.
4504 (argument_parser::find_format_char_info): New method.
4505 (argument_parser::validate_flag_pairs): New method.
4506 (argument_parser::give_y2k_warnings): New method.
4507 (argument_parser::parse_any_scan_set): New method.
4508 (argument_parser::handle_conversions): New method.
4509 (argument_parser::check_argument_type): New method.
4510 (check_format_info_main): Introduce classes argument_parser
4511 and flag_chars_t, moving the code within the loop into methods
4512 of these classes. Make various locals "const".
4514 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4516 * c-common.c: Include "substring-locations.h".
4517 (get_cpp_ttype_from_string_type): New function.
4518 (g_string_concat_db): New global.
4519 (substring_loc::get_range): New method.
4520 * c-common.h (g_string_concat_db): New declaration.
4521 (class substring_loc): New class.
4522 * c-lex.c (lex_string): When concatenating strings, capture the
4523 locations of all tokens using a new obstack, and record the
4524 concatenation locations within g_string_concat_db.
4525 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4528 2016-07-29 Marek Polacek <polacek@redhat.com>
4531 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4532 parentheses warning.
4535 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4537 2016-07-28 Martin Liska <mliska@suse.cz>
4539 PR gcov-profile/68025
4540 * c-common.c (handle_no_profile_instrument_function_attribute):
4542 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4544 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4547 2016-07-25 Jason Merrill <jason@redhat.com>
4550 * c.opt (fconstexpr-loop-limit): New.
4552 2016-07-22 Martin Sebor <msebor@redhat.com>
4555 * c-common.c (resolve_overloaded_builtin): Avoid converting
4556 __atomic_compare_exchange_n return type to that of what its
4557 first argument points to.
4559 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4561 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4562 ~(unsigned HOST_WIDE_INT) 0.
4564 2016-07-22 Martin Liska <mliska@suse.cz>
4566 PR gcov-profile/69028
4567 PR gcov-profile/62047
4568 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4569 to the current_function_decl.
4571 2016-07-21 Jason Merrill <jason@redhat.com>
4574 * c-common.c (c_common_truthvalue_conversion): Check
4575 c_inhibit_evaluation_warnings for warning about address of
4578 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4580 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4583 2016-07-15 Jason Merrill <jason@redhat.com>
4585 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4587 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4590 * c-common.h (enum lookup_name_fuzzy_kind): Add
4591 FUZZY_LOOKUP_FUNCTION_NAME.
4593 2016-07-08 Jason Merrill <jason@redhat.com>
4595 P0145: Refining Expression Order for C++.
4596 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4599 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4602 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4604 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4606 * c-pragma.h (enum pragma_kind): Rename
4607 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4610 2016-06-29 Richard Biener <rguenther@suse.de>
4613 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4615 2016-06-24 Jason Merrill <jason@redhat.com>
4617 P0145R2: Refining Expression Order for C++.
4618 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4621 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4623 * c-common.c (check_builtin_function_arguments): Require last
4624 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4625 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4626 if the last argument is pointer to enumerated or boolean type.
4628 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4631 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4632 (lookup_name_fuzzy): New prototype.
4634 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4636 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4638 2016-06-14 Jason Merrill <jason@redhat.com>
4640 P0145R2: Refining Expression Order for C++.
4641 * c.opt (fargs-in-order): New.
4642 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4644 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4647 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4648 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4650 PR preprocessor/71183
4651 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4652 to cb_get_source_date_epoch.
4654 2016-06-10 Jakub Jelinek <jakub@redhat.com>
4657 * c.opt (Wpsabi): Add Warning flag.
4659 2016-06-10 Martin Sebor <msebor@redhat.com>
4662 * c-common.c (handle_nonnull_attribute): Accept
4663 the nonnull attribute in type-generic builtins.
4665 2016-06-09 Martin Sebor <msebor@redhat.com>
4668 * c-common.c (builtin_function_validate_nargs): Make text of error
4669 message consistent with others like it.
4671 2016-06-08 Martin Sebor <msebor@redhat.com>
4672 Jakub Jelinek <jakub@redhat.com>
4676 * c-common.c (check_builtin_function_arguments): Handle
4677 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4679 2016-06-08 Richard Biener <rguenther@suse.de>
4681 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4683 2016-06-07 Richard Biener <rguenther@suse.de>
4686 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4687 options and warn about others.
4689 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
4691 * c-common.c (get_source_date_epoch): Rename to
4692 cb_get_source_date_epoch.
4693 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4694 message when the parsing fails. Use error_at instead of fatal_error.
4695 * c-common.h (get_source_date_epoch): Rename to
4696 cb_get_source_date_epoch.
4697 * c-common.h (cb_get_source_date_epoch): Prototype.
4698 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4699 * c-common.h (c_omp_region_type): Remove trailing comma.
4700 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4701 * c-lex.c (c_lex_with_flags): Remove initialization of
4702 pfile->source_date_epoch.
4704 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4707 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4708 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4709 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4710 instead of C_OMP_CLAUSE_SPLIT_FOR.
4712 2016-05-24 Richard Biener <rguenther@suse.de>
4716 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4717 (convert_vector_to_array_for_subscript): ... this.
4718 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4719 VIEW_CONVERT_EXPR to an array type. Rename to ...
4720 (convert_vector_to_array_for_subscript): ... this.
4722 2016-05-12 Marek Polacek <polacek@redhat.com>
4725 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4726 size_in_bytes and pass LOC to it.
4728 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4731 * c.opt (Wduplicate-decl-specifier): New option.
4733 2016-05-11 Marek Polacek <polacek@redhat.com>
4736 * c-common.c (diagnose_mismatched_attributes): New function.
4737 * c-common.h (diagnose_mismatched_attributes): Declare.
4739 2016-05-04 Marek Polacek <polacek@redhat.com>
4741 * c.opt (Wdangling-else): New option.
4743 2016-05-03 Marek Polacek <polacek@redhat.com>
4746 * c-common.c (builtin_function_validate_nargs): Add location
4748 (check_builtin_function_arguments): Add location and arguments
4749 parameters. Use them.
4750 * c-common.h (check_builtin_function_arguments): Update declaration.
4752 2016-05-03 Richard Biener <rguenther@suse.de>
4754 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4755 allow call args to gimplify to SSA names.
4757 2016-05-03 Marek Polacek <polacek@redhat.com>
4759 * c-common.h (enum c_omp_region_type): Remove stray comma.
4761 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4763 * c-common.h (enum c_omp_region_type): Define.
4765 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4767 * c-common.c (shorten_compare): Use wi::to_wide.
4769 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4772 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4773 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4774 reduction clauses in acc parallel loops.
4776 2016-04-29 Marek Polacek <polacek@redhat.com>
4779 * c-common.c (warn_for_memset): Check domain before accessing it.
4781 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4784 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4785 "aligned" attribute.
4787 2016-04-28 Jason Merrill <jason@redhat.com>
4789 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4791 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
4792 Matthias Klose <doko@debian.org>
4794 * c-common.c (get_source_date_epoch): New function, gets the environment
4795 variable SOURCE_DATE_EPOCH and parses it as long long with error
4797 * c-common.h (get_source_date_epoch): Prototype.
4798 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4800 2015-04-27 Ryan Burn <contact@rnburn.com>
4804 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4805 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4807 (cilk_detect_and_unwrap): Corresponding changes.
4808 (extract_free_variables): Don't extract free variables from
4809 AGGR_INIT_EXPR slot.
4810 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4811 (cilk_recognize_spawn): Likewise.
4813 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4815 * c.opt (Wmemset-elt-size): New option.
4816 * c-common.c (warn_for_memset): New function.
4817 * c-common.h (warn_for_memset): Declare.
4819 2016-04-25 Jason Merrill <jason@redhat.com>
4821 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4823 * c-common.h: Declare it.
4824 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4826 2016-04-22 Jason Merrill <jason@redhat.com>
4828 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4830 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4833 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4834 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4836 2016-04-18 Michael Matz <matz@suse.de>
4838 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4841 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4843 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4844 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4845 to incomplete types.
4846 (dump_nested_type): Remove redundant tests and tidy up.
4847 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4848 a type which is the typedef of an original type.
4850 2016-04-15 Marek Polacek <polacek@redhat.com>
4853 * c-common.c (build_va_arg): Change two asserts into errors and return
4856 2016-04-13 Marek Polacek <polacek@redhat.com>
4859 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4860 for switch statements, too.
4862 2016-03-28 Jason Merrill <jason@redhat.com>
4864 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4866 2016-03-23 Marek Polacek <polacek@redhat.com>
4869 * c.opt (Wignored-attributes): New option.
4871 2016-03-22 David Malcolm <dmalcolm@redhat.com>
4874 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4875 diagnostic text, reversing the order of the warning and note so
4876 that they appear in source order.
4878 2016-03-17 Marek Polacek <polacek@redhat.com>
4881 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4884 2016-03-14 Jason Merrill <jason@redhat.com>
4886 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4888 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4890 2016-03-09 Richard Biener <rguenther@suse.de>
4893 * c-common.c (strict_aliasing_warning): Add back
4894 alias_sets_conflict_p check.
4896 2016-03-08 Jason Merrill <jason@redhat.com>
4898 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4900 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4903 * c-indentation.c (get_visual_column): Move code to determine next
4905 (next_tab_stop): ...this new function.
4906 (line_contains_hash_if): Delete function.
4907 (detect_preprocessor_logic): Delete function.
4908 (get_first_nws_vis_column): New function.
4909 (detect_intervening_unindent): New function.
4910 (should_warn_for_misleading_indentation): Replace call to
4911 detect_preprocessor_logic with a call to
4912 detect_intervening_unindent.
4914 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4917 * c-indentation.c (should_warn_for_misleading_indentation): When
4918 suppressing warnings about cases where the guard and body are on
4919 the same column, only use the first non-whitespace column in place
4920 of the guard token column when dealing with "else" clauses.
4921 When rejecting aligned BODY and NEXT, loosen the requirement
4922 from equality with the first non-whitespace of guard to simply
4923 that they not be indented relative to it.
4925 2016-03-04 Richard Biener <rguenther@suse.de>
4928 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4929 instead of alias_sets_conflict_p.
4931 2016-03-01 Marek Polacek <polacek@redhat.com>
4934 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4937 2016-02-22 Martin Sebor <msebor@redhat.com>
4940 * c-common.c (check_builtin_function_arguments): Validate and
4941 reject invalid arguments to __builtin_alloca_with_align.
4943 2016-02-20 Mark Wielaard <mjw@redhat.com>
4946 * c.opt (Wunused-const-variable): Turn into Alias for...
4947 (Wunused-const-variable=): New option.
4949 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4952 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4954 (c_common_init_options): ...to here.
4955 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4957 2016-02-19 Jakub Jelinek <jakub@redhat.com>
4960 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4961 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4962 flag_preprocess_only.
4964 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4967 * c.opt (Wnonnull-compare): Enable for -Wall.
4969 2016-02-15 Jakub Jelinek <jakub@redhat.com>
4972 * c-common.c (sync_resolve_size): Diagnose too few arguments
4973 even when params is non-NULL empty vector.
4975 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4978 * c.opt (fshort-double): Remove.
4980 2016-02-05 Martin Sebor <msebor@redhat.com>
4983 * c.opt (Warning options): Update -Wplacement-new to take
4984 an optional argument.
4986 2016-02-01 Jakub Jelinek <jakub@redhat.com>
4988 PR preprocessor/69543
4990 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4991 instead of loc to control_warning_option.
4993 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4995 * c.opt (fopenacc-dim=): New option.
4997 2016-01-27 Ryan Burn <contact@rnburn.com>
5000 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
5001 gimplify_arg. Removed superfluous post_p argument.
5002 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5003 superfluous post_p argument.
5004 * c-gimplify.c (c_gimplify_expr): Likewise.
5006 2016-01-26 David Malcolm <dmalcolm@redhat.com>
5009 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5010 pp_newline_and_flush with pp_flush.
5012 2016-01-20 Martin Sebor <msebor@redhat.com>
5015 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5016 an incompatible argument when the argument isn't a valid tree node.
5018 2016-01-18 Jason Merrill <jason@redhat.com>
5021 * c-common.c (check_function_arguments_recurse): Fold the whole
5022 COND_EXPR, not just the condition.
5024 2016-01-18 Tom de Vries <tom@codesourcery.com>
5026 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5027 classify as loop clause.
5029 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5032 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5033 C++ FE no longer has limit on number of pragmas.
5035 2015-01-14 Ryan Burn <contact@rnburn.com>
5038 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
5039 to add missing cleanup point.
5041 2016-01-14 David Malcolm <dmalcolm@redhat.com>
5044 * c-indentation.c (get_visual_column): Add location_t param.
5045 Handle the column number being zero by effectively disabling the
5046 warning, with an "inform".
5047 (should_warn_for_misleading_indentation): Add location_t argument
5048 for all uses of get_visual_column.
5050 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5053 * c-indentation.c (should_warn_for_misleading_indentation):
5054 Don't warn about do-while statements.
5056 2016-01-07 Martin Sebor <msebor@redhat.com>
5059 * c-common.c (sync_resolve_size): Reject first argument when it's
5062 2016-01-05 David Malcolm <dmalcolm@redhat.com>
5065 * c-indentation.c (get_visual_column): Remove default argument.
5066 (should_warn_for_misleading_indentation): For the multiline case,
5067 update call to get_visual_column for next_stmt_exploc so that it
5068 captures the location of the first non-whitespace character in the
5069 relevant line. Don't issue warnings if there is non-whitespace
5070 before the next statement.
5072 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5074 Update copyright years.
5076 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5078 * c-common.c (binary_op_error): Convert first param from
5079 location_t to rich_location * and use it when emitting an error.
5080 * c-common.h (binary_op_error): Convert first param from
5081 location_t to rich_location *.
5083 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5085 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5086 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5088 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5090 * c-common.c (c_common_attribute_table): Handle "omp declare target
5093 2015-12-14 Jakub Jelinek <jakub@redhat.com>
5096 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5098 2014-12-12 Tobias Burnus <burnus@net-b.de>
5101 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5102 specifiers (%d, %i,%u and %c).
5104 2015-12-10 David Malcolm <dmalcolm@redhat.com>
5106 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5108 2015-12-08 Jakub Jelinek <jakub@redhat.com>
5112 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5113 * c-pragma.c (handle_pragma_diagnostic): Adjust
5114 control_warning_option caller.
5116 2015-12-07 David Malcolm <dmalcolm@redhat.com>
5118 * c-common.c (c_cpp_error): Update for change to
5119 rich_location::set_range.
5121 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
5123 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5124 shifting 1 out of the sign bit.
5126 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5128 * c-common.c (c_common_attribute_table[]): Update max arguments
5129 count for "simd" attribute.
5130 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5132 2015-12-03 Jakub Jelinek <jakub@redhat.com>
5134 PR preprocessor/57580
5135 * c-ppoutput.c (print): Change printed field to bool.
5136 Move src_file last for smaller padding.
5137 (init_pp_output): Set print.printed to false instead of 0.
5138 (scan_translation_unit): Fix up formatting. Set print.printed
5139 to true after printing something other than newline.
5140 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5141 (maybe_print_line_1): Set print.printed to false instead of 0.
5142 (print_line_1): Likewise.
5143 (do_line_change): Set print.printed to true instead of 1.
5144 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5145 dump_macro): Set print.printed to false after printing newline.
5147 2015-12-02 Jason Merrill <jason@redhat.com>
5149 * c-common.c (fold_for_warn): New.
5150 (warn_logical_operator, warn_tautological_cmp)
5151 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5153 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5154 (c_fully_fold_internal, decl_constant_value_for_optimization):
5156 * c-common.h: Don't declare decl_constant_value_for_optimization.
5158 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5161 * c-common.h (c_build_qualified_type): Add extra default
5164 2015-12-01 Julian Brown <julian@codesourcery.com>
5165 Cesar Philippidis <cesar@codesourcery.com>
5166 James Norris <James_Norris@mentor.com>
5168 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5169 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5170 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5172 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5174 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5175 (decl_sloc_common): Delete and move bulk of processing to...
5176 (decl_sloc): ...here.
5177 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5178 (dump_ada_double_name): Remove S parameter and compute the suffix.
5179 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5180 element type and deal with an anonymous one.
5181 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5182 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5183 and remove reference to QUAL_UNION_TYPE.
5184 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5185 (dump_nested_type): ...here. New function extracted from above.
5186 Generate a full declaration for anonymous element type of arrays.
5187 (print_ada_declaration): Really skip anonymous declarations. Remove
5188 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5189 Clean up processing of declarations of array types and objects.
5190 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5191 Remove obsolete code and tidy up.
5193 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5196 * c-common.c (handle_transparent_union_attribute): Update
5199 2015-11-27 Martin Liska <mliska@suse.cz>
5202 * array-notation-common.c (cilkplus_extract_an_triplets):
5203 Release vector of vectors.
5204 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5206 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5209 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5210 (print_ada_struct_decl): Likewise.
5212 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5215 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5216 * cilk.c (recognize_spawn): Determine location in a more precise
5219 2015-11-19 Jason Merrill <jason@redhat.com>
5221 * c-common.c (shorten_compare): But look through macros from
5224 2015-11-18 Jason Merrill <jason@redhat.com>
5226 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5227 non-constant operand comes from a macro.
5229 2015-11-17 Jason Merrill <jason@redhat.com>
5232 * c-common.c (warn_tautological_cmp): Fold before checking for
5235 2015-11-16 Marek Polacek <polacek@redhat.com>
5238 * c-common.c (check_case_bounds): Fold low and high cases.
5240 2015-11-16 Marek Polacek <polacek@redhat.com>
5242 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5243 * c-common.c (c_common_get_alias_set): Likewise.
5244 (handle_visibility_attribute): Likewise.
5246 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5248 * c-common.c (handle_simd_attribute): New.
5249 (struct attribute_spec): Add entry for "simd".
5250 (handle_simd_attribute): New.
5252 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5254 * c-lex.c (interpret_float): Use fold_convert.
5256 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5258 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5259 and store it on the result.
5260 * c-opts.c (c_common_init_options): Set
5261 global_dc->colorize_source_p.
5263 2015-11-12 James Norris <jnorris@codesourcery.com>
5264 Joseph Myers <joseph@codesourcery.com>
5266 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5267 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5268 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5269 PRAGMA_OACC_CLAUSE_LINK.
5271 2015-11-11 Marek Polacek <polacek@redhat.com>
5275 * c-common.c (valid_array_size_p): New function.
5276 * c-common.h (valid_array_size_p): Declare.
5278 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5281 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5283 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5285 * array-notation-common.c: Remove unused header files.
5286 * c-ada-spec.c: Likewise.
5287 * c-cilkplus.c: Likewise.
5288 * c-common.c: Likewise.
5289 * c-cppbuiltin.c: Likewise.
5290 * c-dump.c: Likewise.
5291 * c-format.c: Likewise.
5292 * c-gimplify.c: Likewise.
5293 * c-indentation.c: Likewise.
5294 * c-lex.c: Likewise.
5295 * c-omp.c: Likewise.
5296 * c-opts.c: Likewise.
5297 * c-pch.c: Likewise.
5298 * c-ppoutput.c: Likewise.
5299 * c-pragma.c: Likewise.
5300 * c-pretty-print.c: Likewise.
5301 * c-semantics.c: Likewise.
5302 * c-ubsan.c: Likewise.
5304 * stub-objc.c: Likewise.
5306 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5307 Cesar Philippidis <cesar@codesourcery.com>
5308 James Norris <jnorris@codesourcery.com>
5309 Julian Brown <julian@codesourcery.com>
5310 Nathan Sidwell <nathan@codesourcery.com>
5312 * c-pragma.c (oacc_pragmas): Add "routine".
5313 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5315 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5317 * c-common.c (c_common_attributes): Add scalar_storage_order.
5318 (handle_scalar_storage_order_attribute): New function.
5319 * c-pragma.c (global_sso): New variable.
5320 (maybe_apply_pragma_scalar_storage_order): New function.
5321 (handle_pragma_scalar_storage_order): Likewise.
5322 (init_pragma): Register scalar_storage_order.
5323 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5324 * c.opt (Wscalar-storage-order): New warning.
5325 (fsso-struct=): New option.
5327 2015-11-08 Martin Sebor <msebor@redhat.com>
5329 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5331 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5333 * c-common.c: Don't undef DEF_BUILTIN.
5335 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5337 * c-common.c (c_cpp_error): Convert parameter from location_t to
5338 rich_location *. Eliminate the "column_override" parameter and
5339 the call to diagnostic_override_column.
5340 Update the "done_lexing" clause to set range 0
5341 on the rich_location, rather than overwriting a location_t.
5342 * c-common.h (c_cpp_error): Convert parameter from location_t to
5343 rich_location *. Eliminate the "column_override" parameter.
5345 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5346 Thomas Schwinge <thomas@codesourcery.com>
5347 James Norris <jnorris@codesourcery.com>
5349 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5350 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5351 clauses with parallel and kernels and loops.
5352 * c-pragma.h (enum pragma_omp_clause): Add entries for
5353 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5354 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5355 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5357 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5359 2015-11-05 Martin Sebor <msebor@redhat.com>
5362 * c.opt (-Wplacement-new): New option.
5364 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5366 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5367 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5368 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5369 save_expr or create_tmp_var* if TEST is true.
5370 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5371 Don't call add_stmt here.
5372 (struct c_omp_check_loop_iv_data): New type.
5373 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5374 c_omp_check_loop_iv_exprs): New functions.
5375 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5377 (c_omp_declare_simd_clauses_to_numbers): Change
5378 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5379 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5380 from numbers to PARM_DECLs.
5382 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5384 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5387 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5390 * c-common.h (fold_offsetof_1): Add argument.
5391 * c-common.c (fold_offsetof_1): Diagnose more invalid
5392 offsetof expressions that reference elements past the end of
5395 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5396 Chung-Lin Tang <cltang@codesourcery.com>
5398 * c-pragma.c (oacc_pragmas): Add "atomic".
5399 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5401 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5403 * c-common.c (handle_target_clones_attribute): New.
5404 (c_common_attribute_table): Add handle_target_clones_attribute.
5405 (handle_always_inline_attribute): Add check on target_clones attribute.
5406 (handle_target_attribute): Ditto.
5408 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5410 * array-notation-common.c: Reorder #include's and remove duplicates.
5411 * c-ada-spec.c: Likewise.
5412 * c-cilkplus.c: Likewise.
5413 * c-common.c: Likewise.
5414 * c-cppbuiltin.c: Likewise.
5415 * c-dump.c: Likewise.
5416 * c-format.c: Likewise.
5417 * c-gimplify.c: Likewise.
5418 * c-indentation.c: Likewise.
5419 * c-lex.c: Likewise.
5420 * c-omp.c: Likewise.
5421 * c-opts.c: Likewise.
5422 * c-pch.c: Likewise.
5423 * c-ppoutput.c: Likewise.
5424 * c-pragma.c: Likewise.
5425 * c-pretty-print.c: Likewise.
5426 * c-semantics.c: Likewise.
5427 * c-ubsan.c: Likewise.
5429 * stub-objc.c: Likewise.
5431 2015-10-28 Jason Merrill <jason@redhat.com>
5433 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5435 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5436 James Norris <jnorris@codesourcery.com>
5437 Cesar Philippidis <cesar@codesourcery.com>
5441 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5442 * c-omp.c (c_oacc_split_loop_clauses): New function.
5444 2015-10-21 Martin Sebor <msebor@redhat.com>
5447 * c.opt: End each sentence that describes an option with a period.
5449 2015-10-20 Marek Polacek <polacek@redhat.com>
5451 * array-notation-common.c (is_cilkplus_vector_p): Define.
5452 * c-common.h (is_cilkplus_vector_p): Declare.
5454 2015-10-20 Marek Polacek <polacek@redhat.com>
5456 * c.opt (std=gnu++11): Do not describe as experimental.
5457 (std=gnu++14): Likewise.
5459 2015-10-19 Jason Merrill <jason@redhat.com>
5461 * c-cppbuiltin.c (c_cpp_builtins): Define
5462 __cpp_nontype_template_args.
5464 2015-10-19 Jason Merrill <jason@redhat.com>
5466 * c-cppbuiltin.c (c_cpp_builtins): Define
5467 __cpp_enumerator_attributes, __cpp_fold_expressions,
5468 __cpp_unicode_characters.
5470 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5471 Aldy Hernandez <aldyh@redhat.com>
5473 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5474 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5475 (c_define_builtins): Likewise.
5476 * c-common.h (enum c_omp_clause_split): Add
5477 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5478 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5479 (c_finish_omp_for): Add ORIG_DECLV argument.
5480 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5481 201511 instead of 201307.
5482 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5483 OMP_CRITICAL_CLAUSES to it.
5484 (c_finish_omp_ordered): Add CLAUSES argument, set
5485 OMP_ORDERED_CLAUSES to it.
5486 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5487 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5488 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5489 constructs and new OpenMP 4.5 clauses. Clear
5490 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5492 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5493 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5494 (enum pragma_omp_clause): Add
5495 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5496 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5498 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5500 * c-lex.c (interpret_float): Use real_equal instead of
5503 2015-10-04 Jason Merrill <jason@redhat.com>
5505 Implement N4514, C++ Extensions for Transactional Memory.
5506 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5507 (c_common_attribute_table): Add transaction_safe_dynamic.
5508 transaction_safe now affects type identity.
5509 (handle_tm_attribute): Handle transaction_safe_dynamic.
5510 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5511 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5512 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5515 * c-pretty-print.c (pp_c_attributes_display): Don't print
5516 transaction_safe in C++.
5518 2015-10-02 Marek Polacek <polacek@redhat.com>
5520 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5522 2015-10-02 Marek Polacek <polacek@redhat.com>
5525 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5526 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5527 * c.opt (Wduplicated-cond): New option.
5529 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5531 * c.opt (std=c11): Do not describe as experimental.
5532 (std=gnu11): Likewise.
5533 (std=iso9899:2011): Likewise.
5535 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5537 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5538 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5540 2015-09-25 Marek Polacek <polacek@redhat.com>
5542 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5543 (ubsan_instrument_shift): Likewise.
5545 2015-09-25 Marek Polacek <polacek@redhat.com>
5548 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5550 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5552 * c-indentation.c (should_warn_for_misleading_indentation):
5553 Compare next_stmt_vis_column with guard_line_first_nws instead
5554 of with guard_line_vis_column.
5556 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5560 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5561 options and options not valid for the current language.
5563 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5565 * c-indentation.c (should_warn_for_misleading_indentation):
5566 Float out and consolidate the calls to get_visual_column that
5567 are passed guard_exploc as an argument. Compare
5568 next_stmt_vis_column with guard_line_first_nws instead of with
5569 body_line_first_nws.
5571 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5573 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5574 Wnamespaces): New C++ warnings.
5576 2015-09-22 Jason Merrill <jason@redhat.com>
5578 * c-common.h (abi_compat_version_crosses): New.
5579 (warn_abi_version): Declare.
5580 * c-common.c: Define it.
5581 * c-opts.c (c_common_post_options): Handle it.
5582 flag_abi_compat_version defaults to 8.
5584 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5586 Complete the implementation of N4230, Nested namespace definition.
5587 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5588 __cpp_nested_namespace_definitions.
5590 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5592 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5594 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5596 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5598 * c-pragma.h (pragma_lex): Add optional loc argument.
5600 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5602 * c-format.c (check_format_arg): Adjust to use common block size in all
5605 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5607 * c-format.c (location_from_offset): Update for change in
5608 signature of location_get_source_line.
5609 * c-indentation.c (get_visual_column): Likewise.
5610 (line_contains_hash_if): Likewise.
5612 2015-09-14 Marek Polacek <polacek@redhat.com>
5614 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5615 setting various warnings.
5617 2015-09-14 Marek Polacek <polacek@redhat.com>
5619 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5622 2015-09-11 Mark Wielaard <mjw@redhat.com>
5625 * c.opt (Wunused-variable): Option from common.opt.
5626 (Wunused-const-variable): New option.
5628 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5631 * c.opt ([Wsubobject-linkage]): Add.
5633 2015-09-03 Martin Sebor <msebor@redhat.com>
5636 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5638 * c-common.c (reject_gcc_builtin): Define.
5640 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5643 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5645 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5646 cilk_gimplify_call_params_in_spawned_fn.
5647 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5648 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5651 2015-08-25 Marek Polacek <polacek@redhat.com>
5654 * c-common.c (handle_weak_attribute): Don't check whether the
5655 visibility can be changed here.
5657 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5659 * c-lex.c (c_lex_with_flags): Use explicit locations.
5661 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5663 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5664 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5666 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5669 * c-common.c (check_builtin_function_arguments): Add check
5670 for BUILT_IN_SIGNBIT argument.
5672 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5675 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5678 2015-08-17 Marek Polacek <polacek@redhat.com>
5680 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5681 with whitespaces before qualifier names.
5683 2015-08-12 Marek Polacek <polacek@redhat.com>
5686 * c-common.c (maybe_warn_shift_overflow): Properly handle
5687 left-shifting 1 into the sign bit.
5689 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5691 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5693 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5694 Braden Obrzut <admin@maniacsvault.net>
5695 Jason Merrill <jason@redhat.com>
5697 Add C++ Concepts TS support.
5698 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5699 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5700 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5702 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5703 * c.opt (fconcepts): New.
5705 2015-08-02 Martin Sebor <msebor@redhat.com>
5707 * c.opt (-Wframe-address): New warning option.
5709 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5711 * c-indentation.c (should_warn_for_misleading_indentation):
5714 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5716 * c-indentation.c (get_visual_column): Add parameter first_nws,
5717 use it. Update comment documenting the function.
5718 (is_first_nonwhitespace_on_line): Remove.
5719 (should_warn_for_misleading_indentation): Replace usage of
5720 of is_first_nonwhitespace_on_line with get_visual_column.
5722 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5724 * c-indentation.h (struct token_indent_info): Define.
5725 (get_token_indent_info): Define.
5726 (warn_for_misleading_information): Declare.
5727 * c-common.h (warn_for_misleading_information): Remove.
5728 * c-identation.c (warn_for_misleading_indentation):
5729 Change declaration to take three token_indent_infos. Adjust
5731 * c-identation.c (should_warn_for_misleading_indentation):
5732 Likewise. Bail out early if the body is a compound statement.
5733 (guard_tinfo_to_string): Define.
5735 2015-07-30 Jason Merrill <jason@redhat.com>
5737 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5738 '*' for reference decay.
5740 2015-07-30 Marek Polacek <polacek@redhat.com>
5742 * c-common.c (warn_tautological_cmp): Bail for float types.
5744 2015-07-27 Marek Polacek <polacek@redhat.com>
5747 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5749 2015-07-27 Marek Polacek <polacek@redhat.com>
5753 * c-common.c (find_array_ref_with_const_idx_r): New function.
5754 (warn_tautological_cmp): New function.
5755 * c-common.h (warn_tautological_cmp): Declare.
5756 * c.opt (Wtautological-compare): New option.
5758 2015-07-23 Marek Polacek <polacek@redhat.com>
5760 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5761 (ubsan_instrument_shift): Likewise.
5763 2015-07-23 Marek Polacek <polacek@redhat.com>
5766 * c-ubsan.c: Include gimplify.h.
5767 (ubsan_instrument_division): Unshare OP0 and OP1.
5768 (ubsan_instrument_shift): Likewise.
5770 2015-07-20 Marek Polacek <polacek@redhat.com>
5771 Richard Sandiford <richard.sandiford@arm.com>
5774 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5775 Use EXPR_LOC_OR_LOC.
5776 (maybe_warn_shift_overflow): New function.
5777 * c-common.h (maybe_warn_shift_overflow): Declare.
5778 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5779 * c.opt (Wshift-overflow): New option.
5781 2015-07-16 Martin Liska <mliska@suse.cz>
5783 * c-format.c (static void check_format_info_main): Use
5784 object_allocator instead of pool_allocator.
5785 (check_format_arg): Likewise.
5786 (check_format_info_main): Likewise.
5788 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
5790 * c-opts.c: Remove multiline #include comment.
5792 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
5794 * c-common.c: Fix double word typos.
5796 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5798 * c-ada-spec.h (cpp_operation): Revert latest change.
5799 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5800 constructors and destructors.
5802 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5804 * c-common.h: Adjust includes for flags.h changes.
5805 * stub-objc.c: Likewise.
5807 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5809 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5810 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5812 2015-07-08 Jakub Jelinek <jakub@redhat.com>
5814 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5815 are to be removed, return NULL rather than original clauses list.
5817 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5819 * array-notation-common.c: Adjust includes.
5820 * c-ada-spec.c: Likewise.
5821 * c-cilkplus.c: Likewise.
5822 * c-common.h: Likewise.
5823 * c-cppbuiltin.c: Likewise.
5824 * c-dump.c: Likewise.
5825 * c-format.c: Likewise.
5826 * c-gimplify.c: Likewise.
5827 * c-indentation.c: Likewise.
5828 * c-lex.c: Likewise.
5829 * c-omp.c: Likewise.
5830 * c-opts.c: Likewise.
5831 * c-pch.c: Likewise.
5832 * c-ppoutput.c: Likewise.
5833 * c-pragma.c: Likewise.
5834 * c-pretty-print.c: Likewise.
5835 * c-semantics.c: Likewise.
5836 * c-ubsan.c: Likewise.
5838 * stub-objc.c: Likewise.
5840 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5842 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5843 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5845 2015-07-01 Jason Merrill <jason@redhat.com>
5847 * c-common.h (D_CXX11): Rename from D_CXX0X.
5848 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5849 * c-common.c: Adjust.
5851 * c-opts.c (c_common_post_options): Default to C++14.
5853 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5855 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5857 Implement N4197 - Adding u8 character literals
5858 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
5860 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
5861 CPP_UTF8CHAR_USERDEF tokens.
5862 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
5863 and CPP_UTF8CHAR tokens.
5864 (lex_charconst): Treat CPP_UTF8CHAR token.
5866 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5869 * c-common.c (do_warn_unused_parameter): Move here.
5870 * c-common.h (do_warn_unused_parameter): Declare.
5872 2015-06-29 Marek Polacek <polacek@redhat.com>
5875 * c-common.c (check_case_bounds): Add bool * parameter. Set
5877 (c_add_case_label): Add bool * parameter. Pass it down to
5879 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5881 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5884 2015-06-27 Marek Polacek <polacek@redhat.com>
5886 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5887 or VECTOR_INTEGER_TYPE_P throughout.
5888 * c-gimplify.c: Likewise.
5890 2015-06-26 Marek Polacek <polacek@redhat.com>
5892 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5893 * c-common.c (c_fully_fold_internal): Likewise.
5894 (c_alignof_expr): Likewise.
5895 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5896 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
5897 * cilk.c (create_parm_list): Likewise.
5899 2015-06-26 Marek Polacek <polacek@redhat.com>
5901 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5903 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5905 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5906 * c-gimplify.c: Likewise.
5907 * c-pragma.c: Likewise.
5908 * c-ubsan.c: Likewise.
5911 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5913 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5916 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5918 * cilk.c: Move calls.h after tm.h in the include chain.
5920 2015-06-25 Marek Polacek <polacek@redhat.com>
5922 * array-notation-common.c: Use VAR_P throughout.
5923 * c-ada-spec.c: Likewise.
5924 * c-common.c: Likewise.
5925 * c-format.c: Likewise.
5926 * c-gimplify.c: Likewise.
5927 * c-omp.c: Likewise.
5928 * c-pragma.c: Likewise.
5929 * c-pretty-print.c: Likewise.
5932 2015-06-25 Marek Polacek <polacek@redhat.com>
5934 * cilk.c (extract_free_variables): Use is_global_var.
5936 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5938 * c-common.c: Don't include target-def.h.
5940 2015-06-23 Marek Polacek <polacek@redhat.com>
5942 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5943 when comparing INTEGER_CSTs.
5945 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5947 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5948 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5949 (dump_ada_template): Skip partially specialized types.
5951 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5953 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5956 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5958 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5959 * c-ada-spec.c: Likewise.
5960 * c-cilkplus.c: Likewise.
5961 * c-common.c: Likewise.
5962 * c-common.h: Likewise.
5963 * c-cppbuiltin.c: Likewise.
5964 * c-dump.c: Likewise.
5965 * c-format.c: Likewise.
5966 * c-gimplify.c: Likewise.
5967 * c-indentation.c: Likewise.
5968 * c-lex.c: Likewise.
5969 * c-omp.c: Likewise.
5970 * c-opts.c: Likewise.
5971 * c-pch.c: Likewise.
5972 * c-ppoutput.c: Likewise.
5973 * c-pragma.c: Likewise.
5974 * c-pretty-print.c: Likewise.
5975 * c-semantics.c: Likewise.
5976 * c-ubsan.c: Likewise.
5978 * stub-objc.c: Likewise.
5980 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5983 * c-common.c (c_common_truthvalue_conversion): Warn when
5984 converting an address of a reference to a truth value.
5986 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5988 * array-notation-common.c : Adjust include files.
5989 * c-ada-spec.c : Likewise.
5990 * c-cilkplus.c : Likewise.
5991 * c-common.c : Likewise.
5992 * c-common.h : Likewise.
5993 * c-cppbuiltin.c : Likewise.
5994 * c-dump.c : Likewise.
5995 * c-format.c : Likewise.
5996 * c-gimplify.c : Likewise.
5997 * c-indentation.c : Likewise.
5998 * c-lex.c : Likewise.
5999 * c-omp.c : Likewise.
6000 * c-opts.c : Likewise.
6001 * c-pch.c : Likewise.
6002 * c-ppoutput.c : Likewise.
6003 * c-pragma.c : Likewise.
6004 * c-pretty-print.c : Likewise.
6005 * c-semantics.c : Likewise.
6006 * c-ubsan.c : Likewise.
6007 * cilk.c : Likewise.
6008 * stub-objc.c : Likewise.
6010 2015-06-08 Marek Polacek <polacek@redhat.com>
6013 * c-format.c (location_from_offset): Return LOC if LINE is null.
6015 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6017 * c-common.h (c_parse_final_cleanups): New prototype.
6018 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6020 2015-06-04 Sriraman Tallam <tmsriram@google.com>
6022 * c-common.c (noplt): New attribute.
6023 (handle_noplt_attribute): New handler.
6025 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6027 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6028 * c-ada-spec.c: Likewise.
6029 * c-cilkplus.c: Likewise.
6030 * c-common.c: Likewise.
6031 * c-common.h: Likewise.
6032 * c-cppbuiltin.c: Likewise.
6033 * c-dump.c: Likewise.
6034 * c-format.c: Likewise.
6035 * c-gimplify.c: Likewise.
6036 * c-indentation.c: Likewise.
6037 * c-lex.c: Likewise.
6038 * c-omp.c: Likewise.
6039 * c-opts.c: Likewise.
6040 * c-pch.c: Likewise.
6041 * c-ppoutput.c: Likewise.
6042 * c-pragma.c: Likewise.
6043 * c-pretty-print.c: Likewise.
6044 * c-semantics.c: Likewise.
6045 * c-ubsan.c: Likewise.
6047 * stub-objc.c: Likewise.
6049 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6052 * c-indentation.c (should_warn_for_misleading_indentation): Use
6053 expand_location rather than expand_location_to_spelling_point.
6054 Don't warn if the guarding statement is more indented than the
6057 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6059 * c-indentation.c (warn_for_misleading_indentation): Bail out
6060 immediately if -Wmisleading-indentation isn't enabled.
6062 2015-06-01 Martin Liska <mliska@suse.cz>
6064 * c-format.c (check_format_arg):Use new type-based pool allocator.
6065 (check_format_info_main) Likewise.
6067 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6069 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6070 (has_nontrivial_methods): Likewise.
6072 2015-05-25 Marek Polacek <polacek@redhat.com>
6074 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6076 2015-05-22 Marek Polacek <polacek@redhat.com>
6079 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6081 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6083 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6084 STACK_GROWS_DOWNWARD.
6086 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6088 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6089 STACK_GROWS_DOWNWARD rather than if it is defined.
6091 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6094 * c-format.c (location_column_from_byte_offset): New.
6095 (location_from_offset): New.
6096 (struct format_wanted_type): Add offset_loc field.
6097 (check_format_info): Move handling of location for extra arguments
6098 closer to the point of warning.
6099 (check_format_info_main): Pass the result of location_from_offset
6101 (format_type_warning): Pass the result of location_from_offset
6104 2015-05-20 Marek Polacek <polacek@redhat.com>
6106 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6108 2015-05-20 Marek Polacek <polacek@redhat.com>
6110 * c-ada-spec.c (dump_sloc): Use DECL_P.
6112 2015-05-20 Marek Polacek <polacek@redhat.com>
6114 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6115 * c-common.c: Likewise.
6117 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6119 * c-common.h (fe_file_change): Strengthen param from
6120 const line_map * to const line_map_ordinary *.
6121 (pp_file_change): Likewise.
6122 * c-lex.c (fe_file_change): Likewise.
6123 (cb_define): Use linemap_check_ordinary when invoking
6125 (cb_undef): Likewise.
6126 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6127 invoking cb_file_change.
6128 (c_finish_options): Likewise.
6129 (push_command_line_include): Likewise.
6130 (cb_file_change): Strengthen param "new_map" from
6131 const line_map * to const line_map_ordinary *.
6132 * c-ppoutput.c (cb_define): Likewise for local "map".
6133 (pp_file_change): Likewise for param "map" and local "from".
6135 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6137 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6139 2015-05-18 Tom de Vries <tom@codesourcery.com>
6141 * c-common.c (build_va_arg_1): New function.
6142 (build_va_arg): Add address operator to va_list operand if necessary.
6144 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6147 * c-common.c (int_safely_convertible_to_real_p): Define.
6148 (unsafe_conversion_p): Check conversions involving complex types.
6149 (conversion_warning): Add new warning message for conversions which
6150 discard imaginary component.
6151 * c-common.h: (enum conversion_safety): Add new enumerator for such
6154 2015-05-14 Marek Polacek <polacek@redhat.com>
6158 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6159 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6160 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6161 use it. If FOR_INT_CONST, require that all evaluated operands be
6164 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6166 * c-common.h (warn_for_misleading_indentation): New prototype.
6167 * c-indentation.c: New file.
6168 * c.opt (Wmisleading-indentation): New option.
6170 2015-05-12 Tom de Vries <tom@codesourcery.com>
6172 PR tree-optimization/66010
6173 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6175 2015-05-09 Jason Merrill <jason@redhat.com>
6177 * c-opts.c (c_common_post_options): Also clear
6178 cpp_opts->cpp_warn_cxx11_compat.
6180 * c-common.h (enum cxx_dialect): Add cxx_unset.
6181 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6182 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6184 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6185 (std=gnu++0x): Mark as Undocumented.
6186 (std=gnu++1y): Add deprecated message.
6188 2015-05-08 Jason Merrill <jason@redhat.com>
6190 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6193 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6195 2015-05-08 Marek Polacek <polacek@redhat.com>
6198 * c.opt (Woverride-init-side-effects): New option.
6200 2015-05-07 Marek Polacek <polacek@redhat.com>
6203 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6205 * c.opt (Wshift-negative-value): New option.
6206 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6207 when -Wextra and C99/C++11 mode.
6209 2015-05-07 Marek Polacek <polacek@redhat.com>
6210 Martin Uecker <uecker@eecs.berkeley.edu>
6212 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6213 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6215 2015-05-05 Jason Merrill <jason@redhat.com>
6217 * c.opt (Wterminate): New.
6219 2015-04-30 Marek Polacek <polacek@redhat.com>
6221 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6222 require that the non-constant be of a boolean type.
6224 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6226 * c-common.c (handle_section_attribute): Refactor to reduce
6227 nesting and distinguish between error cases.
6229 2015-04-29 Marek Polacek <polacek@redhat.com>
6232 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6235 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6237 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6238 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6239 HOST_BITS_PER_WIDE_INT.
6241 2015-04-28 Tom de Vries <tom@codesourcery.com>
6243 PR tree-optimization/65887
6244 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6246 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6247 Pierre-Marie de Rodat <derodat@adacore.com>
6249 * c-ada-spec.c (in_function): Delete.
6250 (dump_generic_ada_node): Do not change in_function and remove the
6251 redundant code dealing with it.
6252 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6253 (print_ada_methods): Output the static member functions in a nested
6254 package after the regular methods as well as associated renamings.
6256 2015-04-24 Marek Polacek <polacek@redhat.com>
6259 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6260 and OPT_Wshift_count_overflow.
6263 * c-common.c (warn_logical_operator): Warn if the operands have the
6266 2015-04-24 Marek Polacek <polacek@redhat.com>
6269 * c-common.c (warn_logical_operator): Bail if either operand comes
6270 from a macro expansion.
6272 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6275 * c-common.c (c_default_pointer_mode): Add definition.
6276 * c-common.h (c_default_pointer_mode): Add declaration.
6278 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6280 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6281 on record_builtin_type argument.
6283 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6286 * c-common.c (warn_logical_not_parentheses): Don't warn for
6289 2015-03-07 Marek Polacek <polacek@redhat.com>
6292 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6293 before trying to figure out whether we have a flexible array member.
6295 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6296 Jonathan Wakely <jwakely.gcc@gmail.com>
6298 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6300 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6303 * c-ada-spec.c (print_destructor): Remove obsolete code.
6305 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6307 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6308 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6309 DECL_TEMPLATE_RESULT emulations.
6310 (dump_ada_template)): Add guard for TYPE_METHODS.
6312 2015-02-27 Marek Polacek <polacek@redhat.com>
6315 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6317 2015-02-27 Kai Tietz <ktietz@redhat.com>
6320 * c-pragma.c (handle_pragma_weak): Do not try to create
6321 weak/alias of declarations not being function, or variable
6324 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6327 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6329 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6331 2015-02-16 Marek Polacek <polacek@redhat.com>
6334 * c-format.c (check_format_types): Handle null param.
6336 2015-02-13 Marek Polacek <polacek@redhat.com>
6339 * c-format.c (check_format_types): Don't warn about different
6340 signedness if the original value is in the range of WANTED_TYPE.
6342 2015-02-12 Jason Merrill <jason@redhat.com>
6345 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6346 to the current highest version.
6347 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6349 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6353 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6354 instead of RDIV_EXPR. Use build_binary_op instead of
6357 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6359 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6360 to pass input_location as first argument.
6362 2015-01-23 Tom de Vries <tom@codesourcery.com>
6365 * c.opt (fopenacc): Mark as LTO option.
6367 2015-01-23 Tom de Vries <tom@codesourcery.com>
6370 * c.opt (fopenmp): Mark as LTO option.
6372 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6375 * cilk.c (fill_decls_vec): Only put decls into vector v.
6376 (compare_decls): Fix up formatting.
6378 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6381 * cilk.c: Include vec.h.
6382 (struct cilk_decls): New structure.
6383 (wrapper_parm_cb): Split this function to...
6384 (fill_decls_vec): ...this...
6385 (create_parm_list): ...and this.
6386 (compare_decls): New function.
6387 (for_local_cb): Remove.
6388 (wrapper_local_cb): Ditto.
6389 (build_wrapper_type): For now first traverse and fill vector of
6390 declarations then sort it and then deal with sorted vector.
6391 (cilk_outline): Ditto.
6392 (declare_one_free_variable): Ditto.
6394 2015-01-21 Jason Merrill <jason@redhat.com>
6397 * c-format.c (check_format_arg): Call decl_constant_value.
6399 2015-01-19 Martin Liska <mliska@suse.cz>
6401 * c-common.c (handle_noicf_attribute): New function.
6403 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6404 Bernd Schmidt <bernds@codesourcery.com>
6405 James Norris <jnorris@codesourcery.com>
6406 Cesar Philippidis <cesar@codesourcery.com>
6407 Ilmir Usmanov <i.usmanov@samsung.com>
6408 Jakub Jelinek <jakub@redhat.com>
6410 * c.opt (fopenacc): New option.
6411 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6412 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6414 * c-common.h (c_finish_oacc_wait): New prototype.
6415 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6416 (c_finish_oacc_wait): New function.
6417 * c-pragma.c (oacc_pragmas): New variable.
6418 (c_pp_lookup_pragma, init_pragma): Handle it.
6419 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6420 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6421 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6422 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6423 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6424 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6425 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6426 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6427 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6428 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6429 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6430 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6431 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6432 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6433 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6434 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6435 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6436 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6437 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6438 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6439 PRAGMA_OACC_CLAUSE_WORKER.
6441 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6443 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6444 for the new option fstack-protector_explicit.
6445 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6446 (handle_stack_protect_attribute): New function.
6448 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6450 * c.opt: New option -Warray-bounds=.
6452 2015-01-09 Michael Collison <michael.collison@linaro.org>
6454 * array-notation-common.c: Include hash-set.h, machmode.h,
6455 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6456 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6457 * c-ada-spec.c: Ditto.
6458 * c-cilkplus.c: Ditto.
6459 * c-common.c: Include input.h due to flattening of tree.h.
6460 Define macro GCC_C_COMMON_C.
6461 * c-common.h: Flatten tree.h header files into c-common.h.
6462 Remove include of tree-core.h.
6463 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6464 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6465 fold-const.h, wide-int.h, and inchash.h due to
6466 flattening of tree.h.
6468 * c-format.c: Flatten tree.h header files into c-common.h.
6469 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6470 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6471 fold-const.h, wide-int.h, and inchash.h due to
6472 flattening of tree.h.
6473 * c-dump.c: Include hash-set.h, machmode.h,
6474 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6475 fold-const.h, wide-int.h, and inchash.h due to
6476 flattening of tree.h.
6477 * c-format.c: Include hash-set.h, machmode.h,
6478 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6479 fold-const.h, wide-int.h, inchash.h and real.h due to
6480 flattening of tree.h.
6481 * c-gimplify.c: Include hash-set.h, machmode.h,
6482 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6483 fold-const.h, wide-int.h, and inchash.h due to
6484 flattening of tree.h.
6490 * c-ppoutput.c: Ditto.
6491 * c-pragma.c: Ditto.
6492 * c-pretty-print.c: Ditto.
6493 * c-semantics.c: Ditto.
6495 * stub-objc.c: Ditto.
6497 2015-01-08 Jason Merrill <jason@redhat.com>
6499 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6500 do_ubsan_in_current_function.
6501 (ubsan_maybe_instrument_reference_or_call): Likewise.
6502 * c-ubsan.h: Declare it.
6504 2015-01-08 Mike Stump <mikestump@comcast.net>
6506 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6508 2015-01-07 Marek Polacek <polacek@redhat.com>
6511 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6512 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6514 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6517 * c.opt (Wsuggest-override): New option.
6519 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6521 Update copyright years.
6523 2015-01-05 Marek Polacek <polacek@redhat.com>
6526 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6528 * c-common.h (warn_array_subscript_with_type_char): Update
6531 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6533 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6534 Control macro with flag_sized_deallocation.
6536 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6538 * c.opt (Wdiscarded-array-qualifiers): New option.
6540 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6542 PR preprocessor/63831
6543 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6544 and __has_cpp_attribute here.
6545 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6546 c_common_has_attribute.
6547 * c-common.h (c_common_has_attribute): New prototype.
6548 * c-lex.c (init_c_lex): Set cb->has_attribute to
6549 c_common_has_attribute instead of cb_has_attribute.
6550 (get_token_no_padding): New function.
6551 (cb_has_attribute): Renamed to ...
6552 (c_common_has_attribute): ... this. No longer static. Use
6553 get_token_no_padding, require ()s, don't build TREE_LIST
6554 unnecessarily, fix up formatting, adjust diagnostics, call
6557 2014-12-15 Jason Merrill <jason@redhat.com>
6559 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6560 (-Wsized-deallocation): New.
6561 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6562 to on in C++14 and up.
6564 2014-12-11 Jason Merrill <jason@redhat.com>
6566 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6568 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6569 we aren't complaining about VLAs.
6571 2014-12-06 Marek Polacek <polacek@redhat.com>
6573 PR tree-optimization/64183
6574 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6575 shift-expression if it is integer_type_node. Use types_compatible_p.
6577 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6579 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6580 last argument from create_tmp_var_raw and create_tmp_var calls.
6581 * cilk.c (gimplify_cilk_spawn): Likewise.
6582 * c-omp.c (c_finish_omp_atomic): Likewise.
6584 2014-11-28 Marek Polacek <polacek@redhat.com>
6586 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6587 instead of unsigned_type_node.
6589 2014-11-28 Marek Polacek <polacek@redhat.com>
6592 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6594 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6595 expression to unsigned_type_node.
6597 2014-11-20 Mark Wielaard <mjw@redhat.com>
6600 * c-opts.c (set_std_c89): Set lang_hooks.name.
6601 (set_std_c99): Likewise.
6602 (set_std_c11): Likewise.
6603 (set_std_cxx98): Likewise.
6604 (set_std_cxx11): Likewise.
6605 (set_std_cxx14): Likewise.
6606 (set_std_cxx1z): Likewise.
6608 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6611 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6612 return type to bool.
6613 * c-common.c: Include gimple-expr.h.
6614 (convert_vector_to_pointer_for_subscript): Change return type to
6615 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6616 and copy it into a TARGET_EXPR and use that instead of *vecp
6619 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6621 Merger of git branch "gimple-classes-v2-option-3".
6622 * ChangeLog.gimple-classes: New.
6623 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6624 from being just a vec<gimple> to a vec<gbind *>.
6626 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6629 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6630 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6631 get_pointer_alignment for non-pointers. Use ptype, or if it is
6632 reference type, corresponding pointer type, as type of kind
6634 (ubsan_maybe_instrument_reference,
6635 ubsan_maybe_instrument_member_call): Adjust callers.
6637 2014-11-15 Marek Polacek <polacek@redhat.com>
6640 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6642 (extract_array_notation_exprs): Return for NULL node.
6644 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6646 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6647 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6649 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6652 * c-common.c (check_builtin_function_arguments): Handle
6653 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6655 2014-11-10 Andi Kleen <ak@linux.intel.com>
6658 * c-common.h (check_no_cilk): Declare.
6659 * cilk.c (get_error_location): New function.
6660 (check_no_cilk): Dito.
6662 2014-11-10 Andi Kleen <ak@linux.intel.com>
6664 * cilk.c (recognize_spawn): Use expression location
6667 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6669 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6671 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6673 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6674 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6675 (__cpp_range_based_for, __cpp_initializer_lists,
6676 __cpp_delegating_constructors, __cpp_nsdmi,
6677 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6678 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6679 __has_cpp_attribute.
6680 * c-lex.c (cb_has_attribute): New callback CPP function;
6681 (init_c_lex): Set has_attribute callback.
6683 2014-11-04 Richard Biener <rguenther@suse.de>
6685 * c-common.c (shorten_compare): Do not shorten mixed
6686 DFP and non-DFP compares.
6688 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6690 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6691 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6692 Commentary and rearrangement of tests.
6693 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6694 Commentary and rearrangement of tests.
6695 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
6696 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6698 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6700 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6701 enum from machine_mode.
6703 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6705 * c-common.c: Adjust include files.
6706 * c-gimplify.c: Ditto.
6708 * c-pragma.c: Ditto.
6711 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6713 * c-gimplify.c: Adjust include files.
6715 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6718 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6719 c_common_initialize_diagnostics.
6720 * c-common.h: Likewise.
6722 2014-10-24 Marek Polacek <polacek@redhat.com>
6725 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6726 print "struct"/"union"/"enum" for typedefed names.
6728 2014-10-23 Marek Polacek <polacek@redhat.com>
6730 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6733 2014-10-22 Jakub Jelinek <jakub@redhat.com>
6734 Yury Gribov <y.gribov@samsung.com>
6736 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6737 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6738 instead of flag_sanitize_recover as bool flag.
6740 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6742 * cilk.c: Revert previous change.
6744 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6747 * cilk.c: Include vec.h.
6748 (struct cilk_decls): New structure.
6749 (wrapper_parm_cb): Split this function to...
6750 (fill_decls_vec): ...this...
6751 (create_parm_list): ...and this.
6752 (compare_decls): New function.
6753 (for_local_cb): Remove.
6754 (wrapper_local_cb): Ditto.
6755 (build_wrapper_type): For now first traverse and fill vector of
6756 declarations then sort it and then deal with sorted vector.
6757 (cilk_outline): Ditto.
6758 (declare_one_free_variable): Ditto.
6760 2014-10-17 Marek Polacek <polacek@redhat.com>
6762 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6763 * c.opt (Wimplicit-int): Initialize to -1.
6765 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6767 * c-pragma.c: Adjust include files.
6768 * c-semantics.c: Likewise.
6770 2014-10-16 DJ Delorie <dj@redhat.com>
6772 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6775 2014-10-14 Jason Merrill <jason@redhat.com>
6778 * c-common.h (CPP_PREPARSED_EXPR): New.
6779 (N_CP_TTYPES): Adjust.
6781 2014-10-15 Marek Polacek <polacek@redhat.com>
6783 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6785 2014-10-14 DJ Delorie <dj@redhat.com>
6787 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6788 types, not just __int128.
6789 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6790 types, not just __int128.
6791 (cpp_atomic_builtins): Round pointer sizes up.
6792 (type_suffix): Use type precision, not specific types.
6793 * c-common.c (c_common_reswords): Remove __int128 special case.
6794 (c_common_type_for_size): Check for all __intN types, not just
6796 (c_common_type_for_mode): Likewise.
6797 (c_common_signed_or_unsigned_type): Likewise.
6798 (c_build_bitfield_integer_type): Likewise.
6799 (c_common_nodes_and_builtins): Likewise.
6800 (keyword_begins_type_specifier): Likewise.
6801 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6804 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6806 * c-common.c: Use hash_table instead of hashtab.
6808 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6810 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
6813 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
6818 * c-common.c (warn_logical_operator): Punt for vectors.
6820 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6822 Implement SD-6: SG10 Feature Test Recommendations
6823 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6824 macros and the __has_header macro.
6826 2014-09-30 Jason Merrill <jason@redhat.com>
6828 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6829 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6830 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6832 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6833 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6835 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6836 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6838 2014-09-24 Marek Polacek <polacek@redhat.com>
6842 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6844 2014-09-23 Andi Kleen <ak@linux.intel.com>
6846 * c-common.c (handle_no_reorder_attribute): New function.
6847 (c_common_attribute_table): Add no_reorder attribute.
6849 2014-09-22 Joseph Myers <joseph@codesourcery.com>
6851 * c-cppbuiltin.c (c_cpp_builtins): Define
6852 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6855 2014-09-18 Joseph Myers <joseph@codesourcery.com>
6857 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6858 for supported floating-point modes.
6860 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6862 * c.opt (Wpsabi): Use LangEnabledBy.
6863 * c-opts.c (c_common_handle_option): Do not handle here.
6865 2014-09-12 Joseph Myers <joseph@codesourcery.com>
6867 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6868 macros for floating-point modes.
6870 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
6873 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6874 __*_DENORM_MIN__ without denormals.
6876 2014-09-10 Jakub Jelinek <jakub@redhat.com>
6878 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6879 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6880 ubsan_create_data callers.
6881 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6882 index is constant or BIT_AND_EXPR with constant mask and is
6883 small enough for the bound.
6884 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6885 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6887 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6889 * c.opt: Add CppReason to various flags.
6890 (Wdate-time): Re-sort.
6891 * c-common.c: Include c-common.h earlier.
6892 (struct reason_option_codes_t): Delete.
6893 (c_option_controlling_cpp_error): Prefix global type and struct
6896 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6898 * c.opt (Wnormalized): New.
6899 (Wnormalized=): Use Enum and Reject Negative.
6900 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6902 2014-09-08 Joseph Myers <joseph@codesourcery.com>
6904 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6905 digits of floating-point modes if -fbuilding-libgcc.
6907 2014-09-05 Joseph Myers <joseph@codesourcery.com>
6909 * c-cppbuiltin.c (c_cpp_builtins): Also define
6910 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6911 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6912 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6913 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6914 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6915 __LIBGCC_STACK_GROWS_DOWNWARD__,
6916 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6917 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6918 __LIBGCC_DWARF_FRAME_REGISTERS__,
6919 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6920 __LIBGCC_STACK_POINTER_REGNUM__ and
6921 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6922 (builtin_define_with_value): Handle backslash-escaping in string
6925 2014-09-05 Richard Biener <rguenther@suse.de>
6928 * c-format.c (check_format_arg): Properly handle
6929 effectively signed POINTER_PLUS_EXPR offset.
6931 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6933 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6934 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6935 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6937 * c-opts.c (c_common_handle_option): Do not handle here.
6938 (sanitize_cpp_opts): Likewise.
6939 * c-common.c (struct reason_option_codes_t): Handle
6940 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6942 2014-09-03 Marek Polacek <polacek@redhat.com>
6944 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6946 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6947 Balaji V. Iyer <balaji.v.iyer@intel.com>
6948 Igor Zamyatin <igor.zamyatin@intel.com>
6950 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6951 * c-common.c (c_common_reswords): Added _Cilk_for.
6952 * c-common.h (enum rid): Added RID_CILK_FOR.
6953 (cilk_for_number_of_iterations): Add declaration.
6954 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6956 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6957 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6959 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6961 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6962 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6963 Wundef): Use CPP, Var and Init.
6964 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6966 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6968 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6969 * c-opts.c (c_common_handle_option): Do not handle here.
6971 2014-08-25 Jason Merrill <jason@redhat.com>
6973 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6974 -std=c++14 and -std=gnu++14, rather than the reverse.
6975 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6976 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6977 * c-common.h (cxx_dialect): Remove cxx1y.
6979 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6981 * c-common.h (enum cxx_dialect): Add cxx14.
6982 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6983 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6984 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6986 2014-08-22 Jason Merrill <jason@redhat.com>
6988 * c.opt (std=gnu++17): Fix alias.
6990 2014-08-22 Marek Polacek <polacek@redhat.com>
6993 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6994 check for vector types. Drop LHS argument.
6995 * c-common.h (warn_logical_not_parentheses): Adjust.
6997 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6999 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
7000 (Wmultichar): Likewise.
7001 (Wdate-time): Use C-family languages instead of Common. Use CPP
7003 * c-opts.c (c_common_handle_option): Do not handle the above
7005 (sanitize_cpp_opts): Likewise.
7007 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7010 * c-opts.c: Include tree-diagnostics.h.
7011 (c_diagnostic_finalizer): New.
7012 (c_common_initialize_diagnostics): Use it.
7014 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7016 PR preprocessor/51303
7017 * c-common.c (struct reason_option_codes_t option_codes):
7018 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7020 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7024 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7025 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7026 (c_common_post_options): Call init_global_opts_from_cpp.
7027 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7029 2014-08-19 Marek Polacek <polacek@redhat.com>
7032 * c-common.c (maybe_warn_bool_compare): New function.
7033 * c-common.h (maybe_warn_bool_compare): Declare.
7034 * c.opt (Wbool-compare): New option.
7036 2014-08-19 Marek Polacek <polacek@redhat.com>
7038 * c.opt (Wc99-c11-compat): New option.
7040 2014-08-19 Marek Polacek <polacek@redhat.com>
7042 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7043 to warn_c90_c99_compat.
7044 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7047 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7048 Steven Bosscher <steven@gcc.gnu.org>
7051 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7052 format_check_results.
7053 (check_function_format): Use true and add comment for boolean
7055 (finish_dollar_format_checking): Use explicit location when warning.
7056 (check_format_info): Likewise.
7057 (check_format_arg): Set extra_arg_loc and format_string_loc.
7058 (check_format_info_main): Use explicit location when warning.
7059 (check_format_types): Pass explicit location.
7060 (format_type_warning): Likewise.
7062 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7065 * c-format.c: Handle Fortran flags.
7067 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7070 * array-notation-common.c (find_rank): Added handling for other
7071 types of references.
7073 2014-08-10 Marek Polacek <polacek@redhat.com>
7076 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7077 * c.opt (Wc90-c99-compat): Add option.
7079 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7081 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7083 2014-08-03 Marek Polacek <polacek@redhat.com>
7085 * c-common.c (check_case_value): Add location_t parameter. Use it.
7086 (c_add_case_label): Pass loc to check_case_value.
7088 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7090 * cilk.c: Use hash_map instead of pointer_map.
7092 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7094 * c-gimplify.c: Use hash_set instead of pointer_set.
7096 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7099 * array-notation-common.c (extract_array_notation_exprs): Handling
7102 2014-08-01 Jakub Jelinek <jakub@redhat.com>
7104 * c-common.h (min_align_of_type): Removed prototype.
7105 * c-common.c (min_align_of_type): Removed.
7106 * c-ubsan.h (ubsan_maybe_instrument_reference,
7107 ubsan_maybe_instrument_member_call): New prototypes.
7108 * c-ubsan.c: Include stor-layout.h and builtins.h.
7109 (ubsan_maybe_instrument_reference_or_call,
7110 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7113 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7116 * c.opt (-Wreturn-local-addr): Move to common.opt.
7118 2014-07-30 Jason Merrill <jason@redhat.com>
7123 * c.opt (-fuse-all-virtuals): New.
7125 2014-07-30 Tom Tromey <tromey@redhat.com>
7128 * c.opt (Wdesignated-init): New option.
7129 * c-common.c (c_common_attribute_table): Add "designated_init".
7130 (handle_designated_init): New function.
7132 2014-07-24 Marek Polacek <polacek@redhat.com>
7135 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7137 2014-07-16 Dodji Seketeli <dodji@redhat.com>
7139 PR preprocessor/60723 - missing system-ness marks for macro tokens
7140 * c-ppoutput.c (struct print::prev_was_system_token): New data
7142 (init_pp_output): Initialize it.
7143 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7144 (do_line_change): Return a flag saying if a line marker was
7146 (scan_translation_unit): Detect if the system-ness of the token we
7147 are about to emit is different from the one of the previously
7148 emitted token. If so, emit a line marker. Avoid emitting useless
7149 adjacent line markers. Avoid emitting line markers for tokens
7150 originating from the expansion of built-in macros.
7151 (scan_translation_unit_directives_only): Adjust.
7153 2014-07-15 Marek Polacek <polacek@redhat.com>
7155 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7156 TYPE_MAX_VALUE is NULL.
7158 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7161 * c.opt (Wmemset-transposed-args): New warning.
7163 2014-07-10 Jason Merrill <jason@redhat.com>
7167 * c.opt (-fuse-all-virtuals): New.
7169 2014-07-09 Richard Biener <rguenther@suse.de>
7172 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7173 using unsigned arithmetic if overflow does not wrap instead of
7174 if overflow is undefined.
7176 2014-07-06 Marek Polacek <polacek@redhat.com>
7179 * c.opt (Wsizeof-array-argument): New option.
7181 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7183 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7184 comments->count <= 1, as comments->entries might be NULL.
7186 2014-07-01 Marek Polacek <polacek@redhat.com>
7188 * c.opt (Wint-conversion): New option.
7190 2014-07-01 Marek Polacek <polacek@redhat.com>
7193 * c.opt (Wincompatible-pointer-types): New option.
7195 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7198 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7199 Do not discard TYPE_QUALS of type.
7201 2014-06-26 Jason Merrill <jason@redhat.com>
7203 * c-common.h (enum cxx_dialect): Add cxx1z.
7204 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7205 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7207 2014-06-26 Teresa Johnson <tejohnson@google.com>
7209 * c-common.h (get_dump_info): Declare.
7210 * c-gimplify.c (c_genericize): Use saved dump files.
7211 * c-opts.c (c_common_parse_file): Begin and end dumps
7212 once around parsing invocation.
7213 (get_dump_info): New function.
7215 2014-06-23 Marek Polacek <polacek@redhat.com>
7216 Andrew MacLeod <amacleod@redhat.com>
7219 * c-common.c (get_atomic_generic_size): Don't segfault if the
7220 type doesn't have a size.
7222 2014-06-20 Marek Polacek <polacek@redhat.com>
7224 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7225 (ubsan_walk_array_refs_r): New function.
7226 (c_genericize): Instrument array bounds.
7227 * c-ubsan.c: Include "internal-fn.h".
7228 (ubsan_instrument_division): Mark instrumented arrays as having
7229 side effects. Adjust ubsan_type_descriptor call.
7230 (ubsan_instrument_shift): Likewise.
7231 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7232 (ubsan_instrument_bounds): New function.
7233 (ubsan_array_ref_instrumented_p): New function.
7234 (ubsan_maybe_instrument_array_ref): New function.
7235 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7236 (ubsan_array_ref_instrumented_p): Declare.
7237 (ubsan_maybe_instrument_array_ref): Declare.
7239 2014-06-20 Hale Wang <hale.wang@arm.com>
7242 * c.opt (fshort-enums): Add to LTO.
7243 * c.opt (fshort-wchar): Likewise.
7245 2014-06-16 Marek Polacek <polacek@redhat.com>
7248 * c.opt (Wswitch-bool): Add Var.
7250 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7253 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7254 #pragma omp target teams or
7255 #pragma omp {,target }teams distribute simd.
7257 2014-06-12 Jason Merrill <jason@redhat.com>
7259 * c.opt (Wabi=, fabi-compat-version): New.
7260 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7261 (c_common_post_options): Handle flag_abi_compat_version default.
7262 Disallow -fabi-compat-version=1.
7263 * c-common.h (abi_version_crosses): New.
7265 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7267 * c-common.c (handle_section_attribute): Update handling for
7268 section names that are no longer trees.
7270 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7273 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7274 (omp_pragmas): ... back here.
7276 2014-06-05 Marek Polacek <polacek@redhat.com>
7279 * c-common.c (warn_logical_not_parentheses): New function.
7280 * c-common.h (warn_logical_not_parentheses): Declare.
7281 * c.opt (Wlogical-not-parentheses): New option.
7283 2014-06-04 Marek Polacek <polacek@redhat.com>
7286 * c-common.c (check_case_bounds): Add location parameter.
7288 (c_add_case_label): Pass loc to check_case_bounds.
7290 2014-06-03 Marek Polacek <polacek@redhat.com>
7293 * c.opt (Wswitch-bool): New option.
7295 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7297 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7299 (record_types_used_by_current_var_decl): Move prototype to where
7302 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7303 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7304 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7306 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7308 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7309 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7311 * c-pretty-print.c (pp_c_void_constant): New function.
7312 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7313 (c_pretty_printer::expression): Handle VOID_CST.
7314 * cilk.c (extract_free_variables): Likewise.
7315 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7316 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7318 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7320 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7321 * c-pragma.c (push_alignment): Adjust.
7322 (handle_pragma_push_options): Likewise.
7324 2014-05-09 Marek Polacek <polacek@redhat.com>
7327 * c-common.c (check_user_alignment): Return -1 if alignment is error
7329 (handle_aligned_attribute): Don't call default_conversion on
7331 (handle_vector_size_attribute): Likewise.
7332 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7333 (handle_sentinel_attribute): Call default_conversion and allow even
7334 integral types as an argument.
7336 2014-05-08 Marek Polacek <polacek@redhat.com>
7339 * c-common.c (min_align_of_type): New function factored out from...
7340 (c_sizeof_or_alignof_type): ...here.
7341 * c-common.h (min_align_of_type): Declare.
7343 2014-05-08 Marek Polacek <polacek@redhat.com>
7346 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7347 parameter type of main.
7349 2014-05-07 DJ Delorie <dj@redhat.com>
7351 * c-cppbuiltin.c (print_bits_of_hex): New.
7352 (builtin_define_type_minmax): Print values using hex so as not to
7353 require a pre-computed list of string values.
7355 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7356 Mike Stump <mikestump@comcast.net>
7357 Richard Sandiford <rdsandiford@googlemail.com>
7359 * c-ada-spec.c: Include wide-int.h.
7360 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7361 (dump_generic_ada_node): Use wide-int interfaces.
7362 * c-common.c: Include wide-int-print.h.
7363 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7364 (pointer_int_sum): Use wide-int interfaces.
7365 (c_common_nodes_and_builtins): Use make_int_cst.
7366 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7367 (handle_alloc_size_attribute): Use wide-int interfaces.
7368 (get_nonnull_operand): Likewise.
7369 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7370 * c-lex.c: Include wide-int.h.
7371 (narrowest_unsigned_type): Take a widest_int rather than two
7373 (narrowest_signed_type): Likewise.
7374 (interpret_integer): Update accordingly. Use wide-int interfaces.
7375 (lex_charconst): Use wide-int interfaces.
7376 * c-pretty-print.c: Include wide-int.h.
7377 (pp_c_integer_constant): Use wide-int interfaces.
7378 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7379 INT_CST_LT_UNSIGNED.
7381 2014-05-06 Richard Biener <rguenther@suse.de>
7383 * c-opts.c (c_common_post_options): For -freestanding,
7384 -fno-hosted and -fno-builtin disable pattern recognition
7385 if not enabled explicitely.
7387 2014-05-02 Marek Polacek <polacek@redhat.com>
7389 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7391 2014-05-01 Marek Polacek <polacek@redhat.com>
7394 * c.opt (Wdiscarded-qualifiers): Add.
7396 2014-04-30 Marek Polacek <polacek@redhat.com>
7398 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7399 INT_MIN / -1 sanitization only for integer types.
7401 2014-04-25 Marek Polacek <polacek@redhat.com>
7404 * c-common.c (handle_noinline_attribute): Warn if the attribute
7405 conflicts with always_inline attribute.
7406 (handle_always_inline_attribute): Warn if the attribute conflicts
7407 with noinline attribute.
7409 2014-04-25 Marek Polacek <polacek@redhat.com>
7412 * c-common.c (check_main_parameter_types): Warn about variadic main.
7414 2014-04-24 Mike Stump <mikestump@comcast.net>
7416 * c.opt (Wshadow-ivar): Default to on.
7418 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7420 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7422 2014-04-23 Marek Polacek <polacek@redhat.com>
7424 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7426 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7429 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7430 if flag_sanitize_undefined_trap_on_error.
7431 (ubsan_instrument_division, ubsan_instrument_shift,
7432 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7433 if !flag_sanitize_recover.
7435 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7438 * c-common.c (registered_builtin_types): Make non-static.
7439 * c-common.h (registered_builtin_types): Declare.
7441 2014-04-14 Richard Biener <rguenther@suse.de>
7442 Marc Glisse <marc.glisse@inria.fr>
7445 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7446 apply may-alias the scalar pointer type when applicable.
7448 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7451 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7452 as possible argument for Cilk_spawn.
7454 2014-04-11 Tobias Burnus <burnus@net-b.de>
7457 * c.opt (Wformat-signedness): Add
7458 * c-format.c(check_format_types): Use it.
7460 2014-04-11 Jason Merrill <jason@redhat.com>
7463 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7464 default_conversion for an array argument.
7466 2014-04-08 Marek Polacek <polacek@redhat.com>
7469 * c-ubsan.c: Include asan.h.
7470 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7472 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7474 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7476 2014-04-02 Marek Polacek <polacek@redhat.com>
7478 * c-common.h (c_expand_expr): Remove declaration.
7480 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7483 * c-common.c (add_atomic_size_parameter): When creating new
7484 params vector, push the size argument first.
7486 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7488 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7489 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7490 ubsan_create_data callers.
7492 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7495 * c-opts.c (c_finish_options): Restore cb_file_change call to
7498 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7501 * c-pragma.c (apply_pragma_weak): Only look at
7502 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7503 DECL_ASSEMBLER_NAME_SET_P (decl).
7504 (maybe_apply_pending_pragma_weaks): Exit early if
7505 vec_safe_is_empty (pending_weaks) rather than only when
7507 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7508 set assembler name back to NULL afterwards.
7510 2014-03-11 Jason Merrill <jason@redhat.com>
7512 * c.opt: Add -std=gnu++14.
7514 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7516 * c-opts.c (c_common_post_options): Don't override
7517 -ffp-contract=fast if unsafe-math-optimizations is on.
7519 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7521 * c.opt: Enable LTO FE for fshort-double.
7523 2014-03-07 Jason Merrill <jason@redhat.com>
7525 * c.opt: Add -std=c++14.
7527 2014-03-06 Marek Polacek <polacek@redhat.com>
7530 * cilk.c (contains_cilk_spawn_stmt): New function.
7531 (contains_cilk_spawn_stmt_walker): Likewise.
7532 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7533 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7535 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7537 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7538 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7539 even when flag_preprocess_only.
7541 2014-02-26 Jason Merrill <jason@redhat.com>
7545 * c-common.c (shorten_compare): Don't check
7546 c_inhibit_evaluation_warnings.
7548 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7551 * c-common.c (c_common_nodes_and_builtins): When initializing
7552 c_uint{16,32,64}_type_node, also set corresponding
7553 uint{16,32,64}_type_node to the same value.
7556 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7557 for PRAGMA_IVDEP if flag_preprocess_only.
7559 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7562 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7563 if false, add ADD itself, rather than vice versa.
7564 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7565 copy. For SAVE_EXPR, only call merge_tlist once.
7567 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7570 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7572 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7574 (c_common_attribute_table): Add alloc_align and assume_aligned
7577 2014-02-06 Marek Polacek <polacek@redhat.com>
7580 * c-common.c (warn_for_sign_compare): Call warning_at with location
7583 2014-02-05 Marek Polacek <polacek@redhat.com>
7586 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7589 2014-02-04 Marek Polacek <polacek@redhat.com>
7592 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7595 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7599 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7600 handle_vector_size_attribute, handle_nonnull_attribute): Call
7601 default_conversion on the attribute argument.
7602 (handle_nonnull_attribute): Increment the argument number.
7604 2014-01-31 Marek Polacek <polacek@redhat.com>
7607 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7608 build_function_call_vec.
7609 (resolve_overloaded_builtin): Likewise.
7610 * c-common.h (build_function_call_vec): Adjust declaration.
7612 2014-01-30 Marek Polacek <polacek@redhat.com>
7615 * c-common.h (unsafe_conversion_p): Adjust declaration.
7616 (warnings_for_convert_and_check): Likewise.
7617 (convert_and_check): Likewise.
7618 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7619 expansion_point_location_if_in_system_header on it.
7620 (warnings_for_convert_and_check): Add location parameter. Call
7621 expansion_point_location_if_in_system_header on it. Use it.
7622 (convert_and_check): Add location parameter. Use it.
7623 (conversion_warning): Likewise.
7624 (c_add_case_label): Adjust convert_and_check calls.
7625 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7627 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7629 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7631 * c-pragma.c (init_pragma): Likewise.
7634 2014-01-23 Marek Polacek <polacek@redhat.com>
7637 * c-common.c (shorten_compare): Add location_t parameter.
7638 * c-common.h (shorten_binary_op): Adjust declaration.
7640 2014-01-23 Marek Polacek <polacek@redhat.com>
7643 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7644 * c-common.h: Declare it.
7646 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7648 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7649 * c-ada-spec.c (dump_ads): Likewise.
7650 (cpp_check): Likewise.
7651 (dump_ada_specs): Likewise.
7653 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7656 * c-common.c (handle_no_instrument_function_attribute): Allow
7657 no_instrument_function attribute in class member
7658 definition/declaration.
7660 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7663 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7664 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7665 being COMPOUND_EXPR.
7666 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7667 operand a SAVE_EXPR and second MODIFY_EXPR.
7669 2014-01-09 Jakub Jelinek <jakub@redhat.com>
7672 * c-pch.c (c_common_write_pch): Call
7673 prepare_target_option_nodes_for_pch.
7675 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7677 Update copyright years
7679 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7681 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7682 the copyright notice.
7684 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7686 * c-ada-spec.c (print_constructor): New function.
7687 (print_destructor): Retrieve the origin of the destructor.
7688 (print_ada_declaration): Revamp handling of constructors/destructors.
7690 2013-12-23 Stuart Hastings <stuart@apple.com>
7691 Bill Maddox <maddox@google.com>
7692 Jason Merrill <jason@redhat.com>
7694 * c.opt: Add -fdeclone-ctor-dtor.
7695 * c-opts.c (c_common_post_options): Default to on iff -Os.
7697 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7699 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7701 * c-pragma.h (enum pragma_cilk_clause): Remove.
7702 (enum pragma_omp_clause): Added the following fields:
7703 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7704 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7705 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7706 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7707 PRAGMA_CILK_CLAUSE_UNIFORM.
7710 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7712 * cilk.c (cilk_outline): Made this function non-static.
7713 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7714 (create_cilk_wrapper): Added a new parameter: a function pointer.
7715 (c_install_body_w_frame_cleanup): Remove
7716 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7717 * c-common.h (cilk_outline): New prototype.
7718 (gimplify_cilk_spawn): Removed two parameters.
7719 (cilk_install_body_with_frame_cleanup): New prototype.
7720 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7721 CILK_SPAWN_STMT case.
7723 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7725 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7727 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7728 (int_array_type_node): Remove.
7729 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7731 2013-12-05 Marek Polacek <polacek@redhat.com>
7734 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7735 [ADJUST_FIELD_ALIGN].
7737 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7740 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7741 and check field alignment if set.
7742 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7743 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7745 2013-12-04 Jakub Jelinek <jakub@redhat.com>
7746 Marek Polacek <polacek@redhat.com>
7748 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7749 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7751 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7754 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7757 2013-11-29 Jakub Jelinek <jakub@redhat.com>
7760 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7761 goto invalid. If it is error_mark_node, don't issue further
7764 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7766 * c.opt (Wopenmp-simd): New.
7768 2013-11-22 Jakub Jelinek <jakub@redhat.com>
7770 * c-ubsan.h (ubsan_instrument_return): New prototype.
7771 * c-ubsan.c (ubsan_instrument_return): New function.
7773 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7775 * c-common.c: Add required include files from gimple.h.
7776 * c-gimplify.c: Likewise.
7779 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7781 * c-common.c (unsafe_conversion_p): Remove use of
7782 EXPR_LOC_OR_HERE macro.
7783 (conversion_warning): Likewise.
7784 (warnings_for_convert_and_check): Likewise.
7785 (warn_for_collisions_1): Likewise.
7786 (shorten_compare): Likewise, and remove use of in_system_header
7787 macro, using the location from the former.
7788 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7789 (cb_def_pragma): Remove use of in_system_header macro.
7790 (lex_string): Likewise.
7791 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7793 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7794 Mike Stump <mikestump@comcast.net>
7795 Richard Sandiford <rdsandiford@googlemail.com>
7797 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7798 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7799 tree_fits_shwi_p or tree_fits_uhwi_p.
7800 (dump_generic_ada_node): Likewise.
7801 * c-format.c (check_format_arg): Likewise.
7802 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7804 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7806 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7808 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7811 * c-common.c (unsafe_conversion_p): Make this function
7812 return an enumeration with more detail.
7813 (conversion_warning): Use the new return type of
7814 unsafe_conversion_p to separately warn either about conversions
7815 that lower floating point number precision or about the other
7816 kinds of conversions.
7817 * c-common.h (enum conversion_safety): New enumeration.
7818 (unsafe_conversion_p): switching return type to
7819 conversion_safety enumeration.
7820 * c.opt: Adding new warning -Wfloat-conversion and
7821 enabling it with -Wconversion.
7823 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7825 * c-opts.c: Include plugin.h.
7826 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
7828 2013-11-19 Marek Polacek <polacek@redhat.com>
7830 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7832 (ubsan_instrument_shift): Likewise.
7833 (ubsan_instrument_vla): Likewise.
7835 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7837 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7838 cast to unsigned type.
7840 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7842 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7844 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7845 rather than tree_low_cst.
7847 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7849 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7850 tree_to_uhwi throughout.
7852 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7854 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7855 tree_low_cst (..., 0) with tree_to_shwi throughout.
7857 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7859 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7860 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7862 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7864 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7865 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7867 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7869 * c-cilkplus.c: New file.
7870 * c-common.c (readonly_error): Add location argument.
7871 * c-common.h (readonly_error): Same.
7872 (c_finish_cilk_clauses): Protoize.
7873 (c_check_cilk_loop): Same.
7874 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7875 Do not fail on error_mark_node.
7876 Abstract increment canonicalization to here...
7877 (c_omp_for_incr_canonicalize_ptr): New.
7878 c-pragma.c (init_pragma): Register "simd" pragma.
7879 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7880 (enum pragma_cilk_clause): New.
7882 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7884 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7885 wchar_type and host_integerp checks.
7887 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7889 * c-common.c: Likewise.
7890 * c-gimplify.c: Likewise.
7893 2013-11-14 Diego Novillo <dnovillo@google.com>
7895 * c-common.c: Include fold-const.h.
7896 Include stor-layout.h.
7898 Include stringpool.h.
7901 Include trans-mem.h.
7902 * c-cppbuiltin.c: Include stor-layout.h.
7903 Include stringpool.h.
7904 * c-format.c: Include stringpool.h.
7905 * c-lex.c: Include stringpool.h.
7906 Include stor-layout.h.
7907 * c-pragma.c: Include stringpool.h.
7910 Include gcc-symtab.h.
7911 * c-pretty-print.c: Include stor-layout.h.
7913 * cilk.c: Include stringpool.h.
7916 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7918 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7919 * c-common.c (c_common_reswords): Add __auto_type.
7920 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7922 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7924 * c-common.c: Include gimplify.h.
7925 * c-gimplify.c: Likewise.
7927 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7928 * c-ubsan.c: Don't include gimple.h.
7930 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7932 * c-common.c (c_common_reswords): Add _Thread_local.
7934 2013-11-09 Joseph Myers <joseph@codesourcery.com>
7936 * c-common.c (atomic_size_supported_p): New function.
7937 (resolve_overloaded_atomic_exchange)
7938 (resolve_overloaded_atomic_compare_exchange)
7939 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7940 Use it instead of comparing size with a local list of sizes.
7942 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
7943 Joseph Myers <joseph@codesourcery.com>
7945 * c-common.h (enum rid): Add RID_ATOMIC.
7946 * c-common.c (c_common_reswords): Add _Atomic.
7947 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7948 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7949 * c-format.c (check_format_types): Check for extra _Atomic
7950 qualifiers in format argument.
7951 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7952 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7954 2013-11-06 Tobias Burnus <burnus@net-b.de>
7956 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7958 2013-11-06 Joseph Myers <joseph@codesourcery.com>
7960 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7962 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7963 to mean lack of IEEE 754 support.
7965 2013-11-05 Tobias Burnus <burnus@net-b.de>
7967 * c.opt (-Wdate-time): New option
7968 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7970 2013-11-05 Joseph Myers <joseph@codesourcery.com>
7972 * c-cppbuiltin.c (cpp_iec_559_value): Test
7973 flag_excess_precision_cmdline not flag_excess_precision.
7975 2013-11-05 Tobias Burnus <burnus@net-b.de>
7977 * c.opt (fopenmp-simd): New option.
7978 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7979 (omp_pragmas): ... this new struct.
7980 (c_pp_lookup_pragma): Also walk omp_pragmas.
7981 (init_pragma): Init pragmas for -fopenmp-simd.
7983 2013-11-04 Marek Polacek <polacek@redhat.com>
7986 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7988 2013-11-04 Joseph Myers <joseph@codesourcery.com>
7990 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7992 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7994 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7996 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7997 (dump_ada_specs): Adjust prototype of second callback.
7998 * c-ada-spec.c (cpp_check): New global variable.
7999 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
8000 (print_generic_ada_decl): Likewise.
8001 (has_static_fields): Change return type to bool and add guard.
8002 (has_nontrivial_methods): New predicate.
8003 (is_tagged_type): Change return type to bool.
8004 (separate_class_package): Call has_nontrivial_methods.
8005 (pp_ada_tree_identifier): Minor tweaks.
8006 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8007 (dump_ada_array_domains): Likewise.
8008 (dump_ada_array_type): Likewise.
8009 (dump_template_types): Remove cpp_check parameter and do not pass it to
8010 dump_generic_ada_node.
8011 (dump_ada_template): Likewise.
8012 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8014 (print_ada_methods): Change return type to integer. Remove cpp_check
8015 parameter and do not pass it down.
8016 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8017 dump_generic_ada_node.
8018 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8020 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8021 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8022 value of print_ada_methods.
8023 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8024 Set cpp_check to it before invoking dump_ada_nodes.
8025 (dump_ada_specs): Likewise.
8027 2013-11-03 Marek Polacek <polacek@redhat.com>
8029 * c-ubsan.c: Don't include hash-table.h.
8030 (ubsan_instrument_vla): New function.
8031 * c-ubsan.h: Declare it.
8033 2013-10-31 David Malcolm <dmalcolm@redhat.com>
8035 Automated part of renaming of symtab_node_base to symtab_node.
8037 Patch autogenerated by rename_symtab.py from
8038 https://github.com/davidmalcolm/gcc-refactoring-scripts
8039 revision 58bb219cc090b2f4516a9297d868c245495ee622
8041 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8042 symtab_node_base to symtab_node.
8044 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8046 Implement C++14 digit separators.
8047 * c-lex.c (interpret_float): Remove digit separators from scratch string
8048 before building real literal.
8050 2013-10-30 Jakub Jelinek <jakub@redhat.com>
8052 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8054 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8056 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8058 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8060 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8061 (insert_cilk_frame): New prototype.
8062 (cilk_init_builtins): Likewise.
8063 (gimplify_cilk_spawn): Likewise.
8064 (c_cilk_install_body_w_frame_cleanup): Likewise.
8065 (cilk_detect_spawn_and_unwrap): Likewise.
8066 (cilk_set_spawn_marker): Likewise.
8067 (build_cilk_sync): Likewise.
8068 (build_cilk_spawn): Likewise.
8071 2013-10-29 David Malcolm <dmalcolm@redhat.com>
8073 Patch autogenerated by refactor_symtab.py from
8074 https://github.com/davidmalcolm/gcc-refactoring-scripts
8075 revision 58bb219cc090b2f4516a9297d868c245495ee622
8077 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8078 to a true class hierarchy.
8079 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8081 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8083 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8085 2013-10-26 Jeff Law <law@redhat.com>
8087 * c-common.c (c_define_builtins): Remove mudflap support.
8088 * c.opt: Ignore and warn for mudflap options.
8090 2013-10-24 Tobias Burnus <burnus@net-b.de>
8093 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8094 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8096 2013-10-23 Jason Merrill <jason@redhat.com>
8098 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8100 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8102 * c-common.h (omp_clause_mask::operator !=): New method.
8103 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8104 instead of if (mask & something) tests everywhere.
8106 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8107 201307 instead of 201107.
8108 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8109 (c_common_attribute_table): Add "omp declare target" and
8110 "omp declare simd" attributes.
8111 (handle_omp_declare_target_attribute,
8112 handle_omp_declare_simd_attribute): New functions.
8113 * c-omp.c: Include c-pragma.h.
8114 (c_finish_omp_taskgroup): New function.
8115 (c_finish_omp_atomic): Add swapped argument, if true,
8116 build the operation first with rhs, lhs arguments and use NOP_EXPR
8118 (c_finish_omp_for): Add code argument, pass it down to make_code.
8119 (c_omp_split_clauses): New function.
8120 (c_split_parallel_clauses): Removed.
8121 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8122 c_omp_declare_simd_clauses_to_decls): New functions.
8123 * c-common.h (omp_clause_mask): New type.
8124 (OMP_CLAUSE_MASK_1): Define.
8125 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8126 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8127 omp_clause_mask::operator |, omp_clause_mask::operator &,
8128 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8129 omp_clause_mask::operator ==): New methods.
8130 (enum c_omp_clause_split): New.
8131 (c_finish_omp_taskgroup): New prototype.
8132 (c_finish_omp_atomic): Add swapped argument.
8133 (c_finish_omp_for): Add code argument.
8134 (c_omp_split_clauses): New prototype.
8135 (c_split_parallel_clauses): Removed.
8136 (c_omp_declare_simd_clauses_to_numbers,
8137 c_omp_declare_simd_clauses_to_decls): New prototypes.
8138 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8139 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8140 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8141 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8142 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8143 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8144 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8145 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8146 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8147 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8148 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8149 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8150 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8151 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8152 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8153 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8154 PRAGMA_OMP_CLAUSE_UNIFORM.
8156 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8158 PR tree-optimization/20318
8159 * c-common.c (handle_returns_nonnull_attribute): New function.
8160 (c_common_attribute_table): Add returns_nonnull.
8162 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8165 * c.opt (fcheck-new): Move to common.opt.
8167 2013-09-25 Marek Polacek <polacek@redhat.com>
8168 Jakub Jelinek <jakub@redhat.com>
8171 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8172 an expression if we can prove it is correct.
8173 (ubsan_instrument_division): Likewise. Remove unnecessary
8176 2013-09-18 Marek Polacek <polacek@redhat.com>
8179 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8181 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8183 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8186 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8187 fobjc-gc, freplace-objc-classes): Accept for LTO.
8189 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8191 * c-target.def: New hook
8193 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8196 * c.opt (Wdelete-incomplete): Add.
8198 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8200 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8201 (vector_types_compatible_elements_p): New function.
8202 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8204 (vector_types_compatible_elements_p): Declare.
8206 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8208 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8209 a virtual member function.
8210 (pp_simple_type_specifier): Remove.
8211 (pp_c_type_specifier): Likewise.
8212 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8213 Rename from pp_c_type_specifier. Adjust.
8214 (c_pretty_printer::c_pretty_printer): Do not assign to
8215 simple_type_specifier.
8217 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8219 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8221 (c_pretty_printer::storage_class_specifier): Likewise.
8222 (c_pretty_printer::initializer): Likewise.
8223 (pp_declaration): Remove.
8224 (pp_declaration_specifiers): Likewise.
8225 (pp_abstract_declarator): Likewise.
8226 (pp_declarator): Likewise.
8227 (pp_type_id): Likewise.
8228 (pp_statement): Likewise.
8229 (pp_constant): Likewise.
8230 (pp_id_expression): Likewise.
8231 (pp_primary_expression): Likewise.
8232 (pp_unary_expression): Likewise.
8233 (pp_multiplicative_expression): Likewise.
8234 (pp_conditional_expression): Likewise.
8235 (pp_assignment_expression): Likewise.
8236 (pp_expression): Likewise.
8237 (pp_c_type_id): Likewise.
8238 (pp_c_storage_class_specifier): Likewise.
8239 * c-pretty-print.c (pp_c_type_cast): Tidy.
8240 (pp_c_pointer): Likewise.
8241 (pp_c_type_specifier): Likewise.
8242 (pp_c_parameter_type_list): Likewise.
8243 (pp_c_function_definition): Likewise.
8244 (pp_c_init_declarator): Likewise.
8245 (pp_c_initializer_list): Likewise.
8246 (pp_c_constructor_elts): Likewise.
8247 (c_pretty_printer::direct_abstract_declarator): Likewise.
8248 (c_pretty_printer::declaration_specifiers): Likewise.
8249 (c_pretty_printer::primary_expression): Likewise.
8250 (c_pretty_printer::postfix_expression): Likewise.
8251 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8252 (c_pretty_printer::storage_class_specifier): Rename from
8253 pp_c_storage_class_specifier.
8254 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8255 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8256 storage_class_specifier, initializer, offset_list, flags.
8258 2013-08-30 Marek Polacek <polacek@redhat.com>
8260 * c-ubsan.c: New file.
8261 * c-ubsan.h: New file.
8263 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8265 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8267 (c_pretty_printer::declaration_specifiers): Likewise.
8268 (c_pretty_printer::declarator): Likewise.
8269 (c_pretty_printer::abstract_declarator): Likewise.
8270 (c_pretty_printer::direct_abstract_declarator): Likewise.
8271 (c_pretty_printer::direct_declarator): Likewise.
8272 (c_pretty_printer::function_specifier): Likewise.
8273 (pp_declaration): Adjust.
8274 (pp_declaration_specifiers): Likewise.
8275 (pp_abstract_declarator): Likewise.
8276 (pp_direct_declarator): Likewise.
8277 (pp_function_specifier): Likewise.
8278 (pp_direct_abstract_declarator): Remove as unused.
8279 (pp_c_declaration): Remove.
8280 (pp_c_declaration_specifiers): Likewise.
8281 (pp_c_declarator): Likewise.
8282 (pp_c_direct_declarator): Likewise.
8283 (pp_c_function_specifier): Likewise.
8284 (pp_c_direct_abstract_declarator): Likewise.
8285 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8286 from pp_c_abstract_declarator. Adjust.
8287 (c_pretty_printer::direct_abstract_declarator): Rename from
8288 pp_c_direct_abstract_declarator. Adjust.
8289 (c_pretty_printer::function_specifier): Rename from
8290 pp_c_function_specifier. Adjust.
8291 (c_pretty_printer::declaration_specifiers): Rename from
8292 pp_c_declaration_specifiers. Adjust.
8293 (c_pretty_printer::direct_declarator): Rename from
8294 pp_c_direct_declarator. Adjust.
8295 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8296 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8297 (c_pretty_printer::c_pretty_printer): Do not assign to
8298 declaration, declaration_specifiers, declarator,
8299 direct_declarator, direct_abstract_declarator, function_specifier.
8301 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8303 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8304 virtual member function.
8305 (c_pretty_printer::multiplicative_expression): Likewise.
8306 (c_pretty_printer::conditional_expression): Likewise.
8307 (c_pretty_printer::assignment_expression): Likewise.
8308 (c_pretty_printer::expression): Likewise.
8309 (pp_unary_expression): Adjust.
8310 (pp_multiplicative_expression): Likewise.
8311 (pp_assignment_expression): Likewise.
8312 (pp_conditional_expression): Likewise.
8313 (pp_expression): Likewise.
8314 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8315 from pp_c_unary_expression. Adjust.
8316 (c_pretty_printer::multiplicative_expression): Rename from
8317 pp_c_multiplicative_expression. Adjust.
8318 (c_pretty_printer::conditional_expression): Rename from
8319 pp_c_conditional_expression. Adjust.
8320 (c_pretty_printer::assignment_expression): Rename from
8321 pp_c_assignment_expression. Adjust.
8322 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8323 (c_pretty_printer::c_pretty_printer): Do not assign to
8324 unary_expression, multiplicative_expression,
8325 conditional_expression, expression.
8327 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8329 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8330 virtual member function.
8331 (pp_postfix_expression): Adjust.
8332 (pp_c_postfix_expression): Remove.
8333 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8334 from pp_c_postfix_expression. Adjust.
8335 (c_pretty_printer::c_pretty_printer): Do not assign to
8338 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8340 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8341 virtua member function.
8342 (pp_primary_expression): Adjust.
8343 (pp_c_primary_expression): Remove.
8344 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8345 from pp_c_primary_expression. Adjust.
8346 (pp_c_initializer_list): Use pp_primary_expression.
8347 (c_pretty_printer::c_pretty_printer): Do not assign to
8350 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8352 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8353 * c-pretty-print.c (M_): Remove.
8354 (c_pretty_printer::translate_string): Define.
8355 (pp_c_type_specifier): Use it.
8356 (pp_c_primary_expression): Likewise.
8357 (pp_c_expression): Likewise.
8359 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8361 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8363 (pp_c_id_expression): Remove.
8364 (pp_id_expression): Adjust.
8365 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8366 pp_c_id_expression. Adjust.
8367 (pp_c_postfix_expression): Use pp_id_expression.
8368 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8370 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8372 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8374 (pp_constant): Adjust.
8375 (pp_c_constant): Remove.
8376 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8377 pp_c_constant. Adjust.
8379 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8380 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8382 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8384 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8385 (c_pretty_printer::c_pretty_printer): Declare.
8386 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8387 c_pretty_printer_init. Adjust.
8388 (print_c_tree): Do not call c_pretty_printer_init.
8389 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8391 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8393 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8395 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8398 * c-common.c (pointer_int_sum): Add bool parameter.
8399 * c-common.h (pointer_int_sum): Adjust declaration.
8401 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8403 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8404 c_pretty_printer variable.
8406 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8408 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8410 (pp_c_base): Likewise. Adjust users.
8411 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8412 (pp_c_whitespace): Do not call pp_base.
8413 (pp_c_left_paren): Likewise.
8414 (pp_c_right_paren): Likewise.
8415 (pp_c_left_brace): Likewise.
8416 (pp_c_right_brace): Likewise.
8417 (pp_c_left_bracket): Likewise.
8418 (pp_c_right_bracket): Likewise.
8419 (pp_c_dot): Likewise.
8420 (pp_c_ampersand): Likewise.
8421 (pp_c_star): Likewise.
8422 (pp_c_arrow): Likewise.
8423 (pp_c_semicolon): Likewise.
8424 (pp_c_complement): Likewise.
8425 (pp_c_exclamation): Likewise.
8426 (pp_c_direct_declarator): Likewise.
8427 (pp_c_ws_string): Likewise.
8428 (pp_c_identifier): Likewise.
8429 (pp_c_statement): Likewise.
8430 (print_c_tree): Likewise.
8432 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8435 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8436 provide useful error strings.
8438 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8440 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8441 printer functions instead of pp_string or operators and punctuators.
8442 (dump_generic_ada_node): Likewise.
8443 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8444 (pp_c_relational_expression): Likewise.
8445 (pp_c_logical_or_expression): Likewise.
8447 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8449 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8450 functions instead of pp_character.
8451 (pp_ada_tree_identifier): Likewise.
8452 (dump_ada_double_name): Likewise.
8453 (dump_ada_function_declaration): Likewise.
8454 (dump_ada_array_domains): Likewise.
8455 (dump_template_types): Likewise.
8456 (dump_generic_ada_node): Likewise.
8457 (print_ada_declaration): Likewise.
8458 (print_ada_struct_decl): Likewise.
8459 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8461 2013-07-23 Tom Tromey <tromey@redhat.com>
8463 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8464 * c-common.c (c_common_reswords): Add _Generic.
8466 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8468 * c-common.c: Fix typos.
8469 * c-common.h: Likewise.
8471 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8474 * c-common.c (c_common_attribute_table): Add warn_unused.
8475 (handle_warn_unused_attribute): New.
8477 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8479 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8480 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8482 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8485 * c.opt: Add Wconditionally-supported.
8487 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8489 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8490 unused variables l_length and l_node.
8492 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8495 * c-common.c (complete_array_type): Delay folding first index
8496 like other indices. When folding, check for index overflow.
8498 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8501 * c-common.h (c_build_vec_perm_expr): New complain argument.
8502 * c-common.c (c_build_vec_perm_expr): Likewise.
8503 Use save_expr also in C++.
8505 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8507 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8508 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8509 * c-opts.c (c_common_post_options): Likewise.
8511 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8513 * array-notation-common.c (length_mismatch_in_expr): Changed the
8514 parameter type's from a dynamic array to a vec_tree. Also removed
8515 the size parameters.
8516 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8519 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8521 * c-common.h (struct cilkplus_an_parts): New structure.
8522 (struct cilkplus_an_loop_parts): Likewise.
8523 (cilkplus_extract_an_triplets): New prototype.
8524 (fix_sec_implicit_args): Likewise.
8525 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8526 (fix_sec_implicit_args): Likewise.
8528 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8530 * array-notation-common.c (find_inv_trees): Removed an unwanted
8532 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8533 enum rid to enum tree_code.
8535 2013-06-11 Jan Hubicka <jh@suse.cz>
8537 * c-common.c (handle_alias_ifunc_attribute): Do not set
8538 DECL_EXTERNAL for weakref variables.
8539 * c-pragma.c (handle_pragma_weak): Make sure aliases
8540 are not declared as external.
8542 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8544 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8545 function from c/c-array-notation.c.
8546 (is_cilkplus_reduce_builtin): Likewise.
8547 (find_rank): Likewise.
8548 (extract_array_notation_exprs): Likewise.
8549 (replace_array_notations): Likewise.
8550 (find_inv_trees): Likewise.
8551 (replace_inv_trees): Likewise.
8552 (contains_array_notation_expr): Likewise.
8553 (find_correct_array_notation_type): Likewise.
8554 * c-common.h (struct inv_list): Moved this struct from the file
8555 c/c-array-notation.c and added a new field called additional tcodes.
8556 (length_mismatch_in_expr_p): New prototype.
8557 (is_cilkplus_reduce_builtin): Likewise.
8558 (find_rank): Likewise.
8559 (extract_array_notation_exprs): Likewise.
8560 (replace_array_notation): Likewise.
8561 (find_inv_trees): Likewise.
8562 (replace_inv_trees): Likewise.
8563 (find_correct_array_notation_type): Likewise.
8565 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8567 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8568 function array_notation_init_builtins is called.
8569 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8570 * c-common.def (ARRAY_NOTATION_REF): New tree.
8571 * c-common.h (build_array_notation_expr): New function declaration.
8572 (build_array_notation_ref): Likewise.
8573 (extract_sec_implicit_index_arg): New extern declaration.
8574 (is_sec_implicit_index_fn): Likewise.
8575 (ARRAY_NOTATION_CHECK): New define.
8576 (ARRAY_NOTATION_ARRAY): Likewise.
8577 (ARRAY_NOTATION_START): Likewise.
8578 (ARRAY_NOTATION_LENGTH): Likewise.
8579 (ARRAY_NOTATION_STRIDE): Likewise.
8580 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8582 (pp_c_expression): Likewise.
8583 * c.opt (flag_enable_cilkplus): New flag.
8584 * array-notation-common.c: New file.
8586 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8589 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8591 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8593 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8596 2013-05-07 Han Shen <shenhan@google.com>
8598 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8600 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8602 * c-common.c (check_user_alignment): Emit error for negative values.
8604 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8606 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8608 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8610 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8611 __GXX_EXPERIMENTAL_CXX1Y__.
8613 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8614 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8616 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8617 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8618 to simply use OPT_Wpointer_arith.
8619 (c_sizeof_or_alignof_type): Likewise.
8621 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8623 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8625 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8627 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8628 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8631 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8633 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8635 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8637 * c-common.c (pointer_int_sum): Remove dead code.
8639 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8642 * c-common.c (handle_optimize_attribute): Don't call
8643 save_optabs_if_changed.
8645 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8648 * c-pch.c (pch_init): Free target_validity at the end.
8650 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8652 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8654 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8655 Jakub Jelinek <jakub@redhat.com>
8658 * c-common.c (handle_no_sanitize_address_attribute): New function.
8659 (c_common_attribute_table): Add no_sanitize_address attribute.
8660 (handle_no_address_safety_analysis_attribute): Add
8661 no_sanitize_address attribute, not no_address_safety_analysis
8664 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
8667 * c-common.c (handle_optimize_attribute): Call
8668 save_optabs_if_changed.
8670 2013-02-18 Jakub Jelinek <jakub@redhat.com>
8671 Steven Bosscher <steven@gcc.gnu.org>
8674 * c-opts.c (c_common_post_options): If debug info is enabled
8675 and non-dwarf*, refuse to load PCH files and when writing PCH
8678 2013-02-05 Jakub Jelinek <jakub@redhat.com>
8681 * c-common.c (handle_error_attribute): Fix condition.
8683 2013-01-30 Jakub Jelinek <jakub@redhat.com>
8686 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8688 2013-01-18 Jason Merrill <jason@redhat.com>
8691 * c.opt (-fextern-tls-init): New.
8692 * c-opts.c (c_common_post_options): Handle it.
8694 2013-01-09 Jakub Jelinek <jakub@redhat.com>
8697 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8698 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8699 and is either negative or bigger or equal to type precision
8700 of the first operand.
8702 2012-12-03 Marek Polacek <polacek@redhat.com>
8705 * c-common.c (check_user_alignment): Swap order of tests,
8706 check TREE_CODE first.
8708 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8711 * c-common.h (overflow_type): New enum.
8712 (build_userdef_literal): Add overflow_type argument.
8713 (tree_userdef_literal): Add overflow_type.
8714 (USERDEF_LITERAL_OVERFLOW): New access macro.
8715 * c-common.c (build_userdef_literal): Add overflow_type
8717 * c-lex.c (c_lex_with_flags): Add overflow_type to
8718 build_userdef_literal calls.
8719 (interpret_integer, interpret_float): Add overflow_type argument.
8721 2012-11-28 Richard Biener <rguenther@suse.de>
8724 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8725 here and use a type with proper overflow behavior for types that would
8726 need to be promoted for the arithmetic.
8728 2012-11-23 Jakub Jelinek <jakub@redhat.com>
8731 * c-common.c (handle_no_address_safety_analysis_attribute): New
8733 (c_common_attribute_table): Add no_address_safety_analysis.
8735 2012-11-16 Simon Baldwin <simonb@google.com>
8737 * c.opt: Add f[no-]canonical-system-headers.
8738 * c-opts.c (c_common_handle_option): Handle
8739 OPT_fcanonical_system_headers.
8741 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8744 * c-opts.c (c_common_handle_option): Set new flags.
8745 * c.opt: Describe new flags.
8747 2012-11-09 Jason Merrill <jason@redhat.com>
8749 * c.opt (Wabi-tag): New.
8751 2012-11-09 Andi Kleen <ak@linux.intel.com>
8754 * c-common.c (get_atomic_generic_size): Mask with
8757 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8760 * c.opt (Wformat): Make it Alias Wformat=1.
8761 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8762 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8764 (Wformat=): RejectNegative. Use LangEnabledBy.
8765 (Wnonnull): Use LangEnabledBy.
8766 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8767 * c-format.c (set_Wformat): Delete.
8768 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8769 (maybe_read_dollar_number): Likewise.
8770 (avoid_dollar_number): Likewise.
8771 (finish_dollar_format_checking): Likewise.
8772 (check_format_info): Likewise.
8773 (check_format_info_main): Likewise.
8774 (check_format_types): Likewise.
8775 (format_type_warning): Likewise.
8776 * c-common.c (int): Likewise.
8777 (check_function_sentinel): Likewise.
8778 * c-common.h (warn_format,set_Wformat): Do not declare here.
8780 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8783 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8784 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8786 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8788 (Wvariadic-macros): Init(1).
8789 * c-opts.c (c_common_handle_option): Do not handle them
8791 (c_common_post_options): Likewise.
8792 (sanitize_cpp_opts): warn_unused_macros is now
8793 cpp_warn_unused_macros.
8794 (push_command_line_include): Likewise.
8795 * c-common.c (warn_unknown_pragmas): Do not define.
8796 * c-common.h (warn_unknown_pragmas): Do not declare.
8798 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8801 * c-common.c (conversion_warning): Handle conditional expressions.
8803 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8806 * c.opt (Wreturn_local_addr): Define new option.
8808 2012-10-25 Jason Merrill <jason@redhat.com>
8810 * c.opt (Wvirtual-move-assign): New.
8812 * c.opt (Winherited-variadic-ctor): New.
8814 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
8817 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8819 2012-10-23 Joseph Myers <joseph@codesourcery.com>
8821 * c-common.h (pch_cpp_save_state): Declare.
8822 * c-target.def (c_preinclude): New hook.
8823 * c-opts.c (done_preinclude): New.
8824 (push_command_line_include): Handle default preincluded header.
8825 (cb_file_change): Call pch_cpp_save_state when calling
8826 push_command_line_include.
8827 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8828 (pch_cpp_save_state): New.
8829 (pch_init): Call pch_cpp_save_state conditionally, instead of
8830 calling cpp_save_state.
8832 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8836 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8837 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8838 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8839 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8840 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8841 * c-opts.c (c_common_handle_option): Remove explicit handling from
8843 (c_common_post_options): Likewise.
8845 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8847 * c-ada-spec.c (LOCATION_COL): Delete.
8848 (compare_location): New function.
8849 (compare_node): Use it.
8850 (compare_comment): Likewise.
8852 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8856 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8857 * c-opts.c (c_common_handle_option): Do not set them here. Add
8859 (c_common_post_options): Likewise.
8861 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8863 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8864 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8865 Remove POINTER_TYPE handling, add large unsigned handling and use
8866 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8868 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8871 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8872 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8873 locs and array of 3 trees instead of just single loc and single
8874 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8875 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8876 For *cmp* builtins that take two sources strings report warnings
8877 about first and second source, not about destination and source.
8879 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
8882 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8884 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8886 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8887 declaring something coming from another file.
8889 2012-10-10 Arnaud Charlet <charlet@adacore.com>
8892 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8894 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8897 * c-common.c (warn_about_parentheses): Add location_t parameter;
8898 use EXPR_LOC_OR_LOC.
8899 * c-common.h: Update declaration.
8901 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8904 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8905 more operations. Make error messages optional.
8906 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8907 (scalar_to_vector): Declare.
8909 2012-10-08 Jason Merrill <jason@redhat.com>
8911 * c-common.c (c_common_reswords): Add thread_local.
8913 2012-10-08 Dodji Seketeli <dodji@redhat.com>
8915 PR c++/53528 C++11 attribute support
8916 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8918 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8920 (handle_aligned_attribute): In choose strictest alignment
8921 among many. Use new check_cxx_fundamental_alignment_constraints.
8922 (handle_transparent_union_attribute): In c++11 attribute syntax,
8923 don't look through typedefs.
8925 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8927 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8928 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8931 2012-09-25 Dehao Chen <dehao@google.com>
8934 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
8935 map when read in the pch.
8937 2012-09-18 Arnaud Charlet <charlet@adacore.com>
8939 * c-ada-spec.c: Style fixes.
8941 2012-09-18 Thomas Quinot <quinot@adacore.com>
8943 * c.opt (-fada-spec-parent): Define new command line switch.
8944 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8945 is specified, generate binding spec as a child of the specified unit.
8947 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8948 Manuel López-Ibáñez <manu@gcc.gnu.org>
8951 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8953 2012-08-23 Arnaud Charlet <charlet@adacore.com>
8955 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8956 for pointers, and add missing Convention C pragma.
8957 (print_ada_struct_decl): Add missing aliased keyword.
8958 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8960 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8962 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8963 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8964 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8965 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8966 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8968 2012-08-10 Richard Guenther <rguenther@suse.de>
8970 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8972 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8974 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8975 instead of separate pp_newline and pp_flush.
8976 (print_c_tree): Likewise.
8978 2012-07-26 Richard Henderson <rth@redhat.com>
8980 * c-common.c (handle_hot_attribute): Allow labels.
8981 (handle_cold_attribute): Likewise.
8983 2012-07-20 Jakub Jelinek <jakub@redhat.com>
8986 * c-common.c (check_function_nonnull): Handle multiple nonnull
8987 attributes properly.
8989 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8991 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8992 * c-ada-spec.c: Likewise.
8993 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8995 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8997 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8998 Remove code conditional on it.
9000 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9002 * c-gimplify.c: Do not include basic-block.h.
9003 * c-common.c: Do not include linfuncs.h.
9005 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9007 * c-common.h: Include tree.h.
9009 2012-07-02 Jason Merrill <jason@redhat.com>
9012 * c-common.c (get_priority): Call default_conversion.
9014 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
9016 * c-pch.c (c_common_write_pch): Remove unused variables.
9018 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9020 * cppspec.c: Moved from gcc/ to here.
9022 2012-06-27 Kai Tietz <ktietz@redhat.com>
9024 PR preprocessor/37215
9025 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9027 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9029 * c-common.h (c_common_print_pch_checksum): Remove.
9030 * c-pch.c: Do not include output.h.
9031 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9032 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9033 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9034 (struct c_pch_header): Remove.
9035 (get_ident): Update gpch version.
9036 (pch_init): Do not print executable_checksum to asm_out_file.
9037 Do not fail if there is no asm_out_file to read back from. Set
9038 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9039 (c_common_write_pch): Verify that nothing was written to asm_out_file
9040 since pch_init was called. Do not write a c_pch_header, and do not
9041 copy from asm_out_file to the PCH.
9042 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9043 the content of asm_out_file from the PCH.
9044 (c_common_print_pch_checksum): Remove.
9045 * c-opts.c (c_common_init): Print out executable_checksum directly.
9047 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9049 * c-target.def (objc_declare_unresolved_class_reference,
9050 objc_declare_class_definition): Add new hooks.
9052 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9054 * c-lex.c: Do not include output.h.
9055 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9056 Remove uses of ASM_OUTPUT_IDENT.
9058 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
9061 * c-common.h (c_build_vec_perm_expr): Move decl here.
9062 * c-common.c (c_build_vec_perm_expr): Move definition
9065 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9067 * c.opt (fconserve-space): Turn into a no-op.
9069 2012-06-04 Sterling Augustine <saugustine@google.com>
9071 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9072 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9073 both the start and end of the function.
9075 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9077 * c-common.c: Do not include output.h.
9078 * c-pragma.c: Likewise.
9080 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9082 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9083 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9084 (lang_decl_name): Handle namespace decls.
9086 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9088 * c-ada-spec.c: Do not include output.h.
9089 * c-semantics.c: Likewise.
9091 2012-05-29 Joseph Myers <joseph@codesourcery.com>
9093 * c-common.c: Fix typo.
9095 2012-05-29 Michael Matz <matz@suse.de>
9097 * c-common.h (c_expand_decl): Remove prototype.
9099 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9101 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9102 * c-opts.c (c_common_handle_option): Remove code handling
9103 warn_missing_braces.
9105 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9108 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9111 2012-05-22 Dodji Seketeli <dodji@redhat.com>
9114 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9116 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9118 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9119 * c-opts.c (c_common_handle_option): Do not handle explicitly
9120 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9122 2012-05-16 Dodji Seketeli <dodji@redhat.com>
9124 PR preprocessor/7263
9125 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
9126 to cpp_classify_number. For diagnostics, use the precise location
9127 instead of the global input_location.
9129 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9132 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9134 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9136 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
9138 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9141 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9142 Wreorder): Use LangEnabledBy.
9143 * c-opts.c (c_common_handle_option): Do not enable them
9144 explicitly. Call lang-specific generated functions.
9145 (c_common_post_options): Do not set them here.
9147 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9149 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9150 Wmissing-field-initializers,Wmissing-parameter-type,
9151 Wold-style-declaration,Woverride-init): Use EnabledBy.
9152 * c-opts.c (c_common_post_options): Do not set here explicitly.
9154 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9157 * c-opts.c (c_common_handle_option): Use handle_generated_option
9158 to enable sub-options.
9160 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9163 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9165 2012-05-10 Richard Guenther <rguenther@suse.de>
9167 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9168 adjust commentary about TYPE_IS_SIZETYPE types.
9170 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9173 * c-common.c (warn_logical_operator): Check that argument of
9174 integer_zerop is not NULL.
9176 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9179 * c-common.c (warn_logical_operator): Do not warn if either side
9180 is already true or false.
9182 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9185 * c-common.c (expr_original_type): New.
9186 (shorten_compare): Do not warn for enumeration types.
9188 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9190 * c.opt (fpermissive): Add Var(flag_permissive).
9192 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9195 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9196 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9198 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9200 Add -Wvarargs option
9201 * c.opt (Wvarargs): Define new option.
9203 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9205 * c-common.c (check_function_arguments): Replace
9206 Wmissing-format-attribute with Wsuggest-attribute=format.
9208 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9210 * c.opt (Wsuggest-attribute=format): New. Alias of
9211 Wmissing-format-attribute.
9212 * c-format.c (decode_format_type): Replace
9213 Wmissing-format-attribute with Wsuggest-attribute=format.
9214 (check_function_format): Likewise.
9216 2012-04-27 Ollie Wild <aaw@google.com>
9218 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9219 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9220 * c.opt: Add Wliteral-suffix.
9222 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9225 * c.opt (Wpedantic): New.
9226 (pedantic): Alias Wpedantic.
9227 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9228 (c_common_post_options): Likewise.
9229 (sanitize_cpp_opts): Likewise.
9230 * c-lex.c (interpret_float): Likewise.
9231 * c-format.c (check_format_types): Likewise.
9232 * c-common.c (pointer_int_sum): Likewise.
9233 (c_sizeof_or_alignof_type): Likewise.
9234 (c_add_case_label): Likewise.
9235 (c_do_switch_warnings): Likewise.
9236 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9238 2012-04-15 Jason Merrill <jason@redhat.com>
9241 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9242 (C_STD_NAME): Distinguish between C++98 and C++11.
9244 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9247 * c-common.h (uint16_type_node): Rename into...
9248 (c_uint16_type_node): ...this.
9249 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9250 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9252 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9254 * c-common.c (warn_if_unused_value): Move definition to here.
9255 * c-common.h (warn_if_unused_value): Move declaration to here.
9257 2012-03-23 William Bader <williambader@hotmail.com>
9259 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9261 2012-03-20 Jason Merrill <jason@redhat.com>
9263 * c-common.h (enum cxx_dialect): Add cxx1y.
9264 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9266 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9267 * c-opts.c (c_common_post_options): Likewise.
9268 (set_std_cxx1y): New.
9269 (c_common_handle_option): Call it.
9270 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9272 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9275 * c.opt ([Wuseless-cast]): Add.
9277 2012-03-16 Richard Guenther <rguenther@suse.de>
9279 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9281 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9284 * c.opt (ftemplate-backtrace-limit) Add.
9286 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9288 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9290 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9291 (init_pragma): Don't register extern_prefix.
9293 2012-03-12 Richard Guenther <rguenther@suse.de>
9295 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9296 (builtin_type_for_size): Likewise.
9298 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9301 * c-common.c (sync_resolve_params): Don't decide whether to convert
9302 or not based on TYPE_SIZE comparison, convert whenever arg_type
9303 is unsigned INTEGER_TYPE.
9305 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9308 * c.opt ([Wunused-local-typedefs]): Fix description.
9310 2012-01-24 Mike Stump <mikestump@comcast.net>
9312 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9315 2012-01-18 Richard Guenther <rguenther@suse.de>
9317 * c-opts.c (c_common_post_options): Reset LTO flags if
9318 we are about to generate a PCH.
9320 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9323 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9324 use pp_unsigned_wide_integer.
9326 2012-01-10 Richard Guenther <rguenther@suse.de>
9329 * c-opts.c (c_common_handle_option): Move -Werror handling
9330 to language independent code.
9332 2012-01-05 Richard Guenther <rguenther@suse.de>
9335 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9338 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9341 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9342 of array types with an unknown bound.
9344 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9346 * c-common.c (flag_isoc99): Update comment to refer to C11.
9347 (flag_isoc1x): Change to flag_isoc11.
9348 * c-common.h (flag_isoc99): Update comment to refer to C11.
9349 (flag_isoc1x): Change to flag_isoc11.
9350 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9352 * c-opts.c (set_std_c1x): Change to set_std_c11.
9353 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9355 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9356 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9357 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9359 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9360 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9361 (std=gnu1x): Make alias of std=gnu11.
9363 2011-12-19 Jason Merrill <jason@redhat.com>
9366 * c-common.c (handle_transparent_union_attribute): Check the first
9367 field if the type is complete.
9369 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9372 * c-common.c (RID_IS_FINAL): Add.
9373 * c-common.h (RID_IS_FINAL): Add.
9375 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9377 * c.opt (fgnu-runtime): Provide full description.
9378 (fnext-runtime): Likewise.
9379 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9381 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9383 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9384 predefines in one place. Add LOCK_FREE predefines.
9385 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9388 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9391 * c-common.c (get_atomic_generic_size): Check for various error
9393 (resolve_overloaded_atomic_exchange,
9394 resolve_overloaded_atomic_compare_exchange,
9395 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9396 error_mark_node for error conditions.
9398 2011-11-08 Richard Guenther <rguenther@suse.de>
9401 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9403 2011-11-07 Richard Henderson <rth@redhat.com>
9404 Aldy Hernandez <aldyh@redhat.com>
9405 Torvald Riegel <triegel@redhat.com>
9407 Merged from transactional-memory.
9409 * c-common.c (handle_tm_wrap_attribute,
9410 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9411 (struct c_common_reswords): Added __transaction* keywords.
9412 (struct c_common_attribute_table): Added transaction* and tm_regparm
9414 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9416 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9417 find_tm_attribute): Declare.
9419 2011-11-07 Jason Merrill <jason@redhat.com>
9422 * c-common.c, c-common.h: Revert yesterday's changes.
9424 2011-11-06 Jason Merrill <jason@redhat.com>
9427 * c-common.c (decl_has_visibility_attr): Split out from...
9428 (c_determine_visibility): ...here.
9429 * c-common.h: Declare it.
9431 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9433 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9434 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9436 (check_user_alignment): New. Split out of
9437 handle_aligned_attribute. Disallow integer constants with
9438 noninteger types. Conditionally allow zero.
9439 (handle_aligned_attribute): Use check_user_alignment.
9440 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9442 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9443 Richard Henderson <rth@redhat.com>
9445 Merged from cxx-mem-model.
9447 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9448 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9449 parameters that are the same type size.
9450 (get_atomic_generic_size): New. Find size of generic
9451 atomic function parameters and do typechecking.
9452 (add_atomic_size_parameter): New. Insert size into parameter list.
9453 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9454 either __atomic_exchange_n or external library call.
9455 (resolve_overloaded_atomic_compare_exchange): Restructure
9456 __atomic_compare_exchange to either _n variant or external library call.
9457 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9458 __atomic_load_n or an external library call.
9459 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9460 __atomic_store_n or an external library call.
9461 (resolve_overloaded_builtin): Handle new __atomic builtins.
9463 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9466 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9467 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9468 <INDIRECT_REF>: Return the argument.
9469 <ARRAY_REF>: Remove special code for negative offset.
9470 Call fold_build_pointer_plus instead of size_binop.
9471 (fold_offsetof): Remove STOP_REF argument and adjust.
9472 * c-common.h (fold_offsetof_1): Declare.
9473 (fold_offsetof): Remove STOP_REF argument.
9475 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9478 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9479 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9480 Wnarrowing for C++0x and C++98.
9481 * c.opt ([Wnarrowing]): Update.
9483 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9486 * c.opt: Add Wzero-as-null-pointer-constant.
9488 2011-10-31 Jason Merrill <jason@redhat.com>
9490 * c.opt (-fdeduce-init-list): Off by default.
9493 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9494 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9496 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9498 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9501 * c.opt (fvisibility-inlines-hidden): Description change.
9503 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9505 Implement C++11 user-defined literals.
9506 * c-common.c (build_userdef_literal): New.
9507 * c-common.def: New tree code.
9508 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9509 * c-lex.c (interpret_float): Add suffix parm.
9510 (c_lex_with_flags): Build literal tokens.
9512 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9516 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9519 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9520 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9521 Wnarrowing for C++0x and C++98.
9522 * c.opt ([Wnarrowing]): Update.
9524 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9527 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9528 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9529 Wnarrowing for C++0x and C++98.
9530 * c.opt ([Wnarrowing]): Update.
9532 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9535 * c-common.c (conversion_warning): Remove code looking for
9536 artificial operands.
9538 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9541 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9542 !NO_IMPLICIT_EXTERN_C.
9544 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9546 * c-common.c (c_common_reswords): Add __bases,
9548 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9550 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9553 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9555 2011-10-15 Tom Tromey <tromey@redhat.com>
9556 Dodji Seketeli <dodji@redhat.com>
9558 * c.opt (fdebug-cpp): New option.
9559 * c-opts.c (c_common_handle_option): Handle the option.
9560 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9561 output stream in parameter. Factorized from ...
9562 (maybe_print_line): ... this. Dump location debug information when
9563 -fdebug-cpp is in effect.
9564 (print_line_1): New static function. Takes an output stream in
9565 parameter. Factorized from ...
9566 (print_line): ... here. Dump location information when -fdebug-cpp
9568 (scan_translation_unit): Dump location information when
9569 -fdebug-cpp is in effect.
9571 2011-10-15 Tom Tromey <tromey@redhat.com>
9572 Dodji Seketeli <dodji@redhat.com>
9574 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9576 * c-opts.c (c_common_handle_option)<case
9577 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9578 cases. Handle -ftrack-macro-expansion with and without argument.
9580 2011-10-15 Tom Tromey <tromey@redhat.com>
9581 Dodji Seketeli <dodji@redhat.com>
9583 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9584 (print_line, cb_define, do_line_change): Adjust to avoid touching
9585 the internals of struct line_map. Use the public API instead.
9586 * c-pch.c (c_common_read_pch): Likewise.
9587 * c-lex.c (fe_file_change): Likewise.
9589 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9592 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9594 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9597 * c-pretty-print.c (pp_c_floating_constant): Output
9598 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9600 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9602 * c-common.c (def_builtin_1): Delete old interface with two
9603 parallel arrays to hold standard builtin declarations, and replace
9604 it with a function based interface that can support creating
9605 builtins on the fly in the future. Change all uses, and poison
9606 the old names. Make sure 0 is not a legitimate builtin index.
9607 * c-omp.c (c_finish_omp_barrier): Ditto.
9608 (c_finish_omp_taskwait): Ditto.
9609 (c_finish_omp_flush): Ditto.
9611 2011-10-11 Tristan Gingold <gingold@adacore.com>
9613 * c.opt: (fallow-parameterless-variadic-functions): New.
9615 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9617 PR c++/33255 - Support -Wunused-local-typedefs warning
9618 * c-common.h (struct c_language_function::local_typedefs): New
9620 (record_locally_defined_typedef, maybe_record_typedef_use)
9621 (maybe_warn_unused_local_typedefs): Declare new functions.
9622 * c-common.c (record_locally_defined_typedef)
9623 (maybe_record_typedef_use)
9624 (maybe_warn_unused_local_typedefs): Define new functions.
9625 * c.opt: Declare new -Wunused-local-typedefs flag.
9627 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9630 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9633 2011-09-05 Richard Guenther <rguenther@suse.de>
9635 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9636 of integer_minus_one_node for empty array upper bounds.
9638 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9640 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9641 it's the first time it's being called on this main TU.
9643 2011-08-24 Richard Guenther <rguenther@suse.de>
9646 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9648 2011-08-22 Gabriel Charette <gchare@google.com>
9650 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9651 defined in cpp_init_builtins and c_cpp_builtins.
9653 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9655 * c-common.c (c_common_reswords): Add __builtin_complex.
9656 * c-common.h (RID_BUILTIN_COMPLEX): New.
9658 2011-08-18 Joseph Myers <joseph@codesourcery.com>
9660 * c-common.c (c_common_reswords): Add _Noreturn.
9661 (keyword_is_function_specifier): Handle RID_NORETURN.
9662 * c-common.h (RID_NORETURN): New.
9664 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9666 * c-common.c (unsafe_conversion_p): New function. Check if it is
9667 unsafe to convert an expression to the type.
9668 (conversion_warning): Adjust, use unsafe_conversion_p.
9669 * c-common.h (unsafe_conversion_p): New function declaration.
9671 2011-08-02 Jakub Jelinek <jakub@redhat.com>
9673 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9674 (c_finish_omp_taskyield): New prototype.
9675 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9676 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9677 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9678 or RHS1 have side-effects, evaluate those too in the right spot,
9679 if it is a decl and LHS is also a decl, error out if they
9681 (c_finish_omp_taskyield): New function.
9682 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9683 * c-pragma.c (omp_pragmas): Add taskyield.
9684 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9685 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9686 PRAGMA_OMP_CLAUSE_MERGEABLE.
9688 2011-07-25 Dodji Seketeli <dodji@redhat.com>
9690 * c-common.h (set_underlying_type): Remove parm name from
9693 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
9695 * c-pretty-print.h: Search c-common.h in c-family.
9697 2011-07-22 Jason Merrill <jason@redhat.com>
9700 * c.opt (Wnarrowing): New.
9703 * c-common.h: Declare c_linkage_bindings.
9704 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9707 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9708 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9709 as flag_isoc99 for 'restrict'.
9710 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9712 2011-07-21 Ian Lance Taylor <iant@google.com>
9715 * c-common.c (c_disable_warnings): New static function.
9716 (c_enable_warnings): New static function.
9717 (c_fully_fold_internal): Change local unused_p to bool. Call
9718 c_disable_warnings and c_enable_warnings rather than change
9719 c_inhibit_evaluation_warnings.
9721 2011-07-20 Jason Merrill <jason@redhat.com>
9723 PR c++/6709 (DR 743)
9724 PR c++/42603 (DR 950)
9725 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9726 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9727 (CPP_DECLTYPE): New.
9728 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9730 2011-07-19 Richard Guenther <rguenther@suse.de>
9732 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9733 * c-omp.c (c_finish_omp_for): Likewise.
9735 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9737 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9738 body on the next line.
9740 2011-07-08 Jason Merrill <jason@redhat.com>
9743 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9746 * c-common.c (c_apply_type_quals_to_decl): Don't check
9747 TYPE_NEEDS_CONSTRUCTING.
9749 2011-07-06 Richard Guenther <rguenther@suse.de>
9751 * c-common.c (c_common_nodes_and_builtins):
9752 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9754 2011-07-05 Richard Guenther <rguenther@suse.de>
9756 * c-common.c (c_common_nodes_and_builtins): Build all common
9759 2011-06-27 Jakub Jelinek <jakub@redhat.com>
9761 * c-common.h (c_tree_chain_next): New static inline function.
9763 * c-common.c (check_builtin_function_arguments): Handle
9764 BUILT_IN_ASSUME_ALIGNED.
9766 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
9768 * c-common.c: Add sync_ or SYNC__ to builtin names.
9769 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9771 2011-06-20 Pierre Vittet <piervit@pvittet.com>
9773 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9775 (gen_pragma_handler): New union.
9776 (internal_pragma_handler): New type.
9777 (c_register_pragma_with_data)
9778 (c_register_pragma_with_expansion_and_data): New functions.
9780 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9781 (c_register_pragma, c_register_pragma_with_expansion)
9782 (c_invoke_pragma_handler): Changed to work with
9783 internal_pragma_handler.
9784 (c_register_pragma_with_data)
9785 (c_register_pragma_with_expansion_and_data): New functions.
9787 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9789 * c-common.c: Include common/common-target.h.
9790 (handle_section_attribute): Use
9791 targetm_common.have_named_sections.
9792 * c-cppbuiltin.c: Include common/common-target.h.
9793 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9795 2011-06-10 Richard Guenther <rguenther@suse.de>
9797 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9798 to print a IDENTIFIER_NODE.
9800 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9801 Joseph Myers <joseph@codesourcery.com>
9803 * c.opt (fbuilding-libgcc): New option.
9804 * c-cppbuiltin.c (c_cpp_builtins): Define
9805 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9807 2011-06-07 Jason Merrill <jason@redhat.com>
9809 * c-common.c (max_tinst_depth): Lower default to 900.
9811 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9813 2011-06-07 Richard Guenther <rguenther@suse.de>
9815 * c-common.c (c_common_nodes_and_builtins): Do not set
9816 size_type_node or call set_sizetype.
9818 2011-06-07 Dodji Seketeli <dodji@redhat.com>
9821 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9822 type when using pointer comparison to compare types.
9824 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9826 * c.opt: Add -Wdelete-non-virtual-dtor.
9827 * c-opts.c (c_common_handle_option): Include it in -Wall.
9829 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9834 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9836 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9839 2011-05-27 Jakub Jelinek <jakub@redhat.com>
9842 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9843 C++ don't call c_common_truthvalue_conversion on void type arms.
9845 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9847 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9848 (stmt_list_stack): Define.
9849 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9850 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9852 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9854 * c-common.c (warning_candidate_p): Check for BLOCKs.
9856 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9858 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9861 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9863 * c-common.c (def_fn_type): Remove extra va_end.
9865 2011-05-23 Jason Merrill <jason@redhat.com>
9868 * c-common.c (c_common_get_narrower): New.
9869 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9871 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9873 * c-common.h (check_function_arguments): Tweak prototype of
9874 check_function_arguments.
9875 * c-common.c (check_function_arguments): Likewise. Adjust
9876 calls to check_function_nonnull, check_function_format, and
9877 check_function_sentinel.
9878 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9879 separate attributes and typelist arguments. Use
9880 FOREACH_FUNCTION_ARGS to iterate over argument types.
9882 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9884 * c-common.c (c_common_reswords): Reorder.
9885 * c-common.h (rid): Likewise.
9887 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9889 * c-common.c (def_fn_type): Don't call build_function_type, call
9890 build_function_type_array or build_varargs_function_type_array
9892 (c_common_nodes_and_builtins): Likewise.
9894 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9896 * c-common.c (c_add_case_label): Omit the loc argument to
9898 * c-common.h (build_case_label): Remove.
9899 * c-semantics.c (build_case_label): Remove.
9901 2011-05-05 Joseph Myers <joseph@codesourcery.com>
9903 * c-objc.h (objc_start_method_definition): Update prototype.
9904 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9906 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9908 * c-common.c (check_main_parameter_types): Reindent. Don't use
9909 TYPE_ARG_TYPES directly.
9910 (handle_nonnull_attribute): Likewise.
9911 (sync_resolve_params): Likewise.
9912 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9913 to check_format_string.
9914 (handle_format_attribute): Likewise.
9915 (check_format_string): Take a function type to examine instead of
9916 a type list. Use a function_arg_iterator to step through argument
9919 2011-05-04 Richard Guenther <rguenther@suse.de>
9921 * c-common.c (fix_string_type): Use size_int for index type bounds.
9922 (start_fname_decls): Do not pass NULL to build_int_cst.
9923 (c_init_attributes): Likewise.
9924 * c-lex.c (c_lex_with_flags): Likewise.
9926 2011-04-27 Jason Merrill <jason@redhat.com>
9928 * c-common.c (make_tree_vector_from_list): New.
9929 * c-common.h: Declare it.
9931 2011-04-26 Richard Guenther <rguenther@suse.de>
9933 PR preprocessor/48248
9934 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9935 for output size with -P.
9937 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9939 * c-common.c (struct c_common_resword): Add __underlying_type.
9940 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9942 2011-04-20 Jim Meyering <meyering@redhat.com>
9944 * c-format.c (init_dollar_format_checking): Remove useless
9947 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9949 * c-objc.h (objc_get_interface_ivars): Removed.
9950 (objc_detect_field_duplicates): New.
9951 * stub-objc.c: Likewise.
9953 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9955 * stub-objc.c (objc_declare_protocols): Renamed to
9956 objc_declare_protocol.
9957 * c-objc.h: Likewise.
9959 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9961 * stub-objc.c (objc_declare_class): Updated argument name.
9963 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9965 * c-common.h (c_common_init_ts): Declare.
9966 * c-common.c (c_common_init_ts): Define.
9968 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9970 * c-objc.h (objc_build_message_expr): Updated prototype.
9971 * stub-objc.c (objc_build_message_expr): Likewise.
9973 2011-04-12 Martin Jambor <mjambor@suse.cz>
9975 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9978 2011-04-11 Richard Guenther <rguenther@suse.de>
9980 * c-common.c (complete_array_type): Build a range type of
9983 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9985 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9986 (handle_type_generic_attribute): Likewise.
9988 2011-04-07 Jason Merrill <jason@redhat.com>
9991 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9992 conversion from C++0x scoped enum.
9994 2011-04-06 Joseph Myers <joseph@codesourcery.com>
9996 * c-target-def.h: New file.
9997 * c-target.def: New file.
9998 * c-target.h: New file.
9999 * c-common.c (targetcm): Don't define here.
10000 * c-common.h (default_handle_c_option): Declare.
10001 * c-format.c: Include c-target.h instead of target.h.
10002 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10004 (default_handle_c_option): Move from targhooks.c.
10006 2011-03-29 Jakub Jelinek <jakub@redhat.com>
10008 PR preprocessor/48248
10009 * c-ppoutput.c (print): Add src_file field.
10010 (init_pp_output): Initialize it.
10011 (maybe_print_line): Don't optimize by adding up to 8 newlines
10012 if map->to_file and print.src_file are different file.
10013 (print_line): Update print.src_file.
10015 2011-03-25 Kai Tietz <ktietz@redhat.com>
10017 * c-ada-spec.c (compare_comment): Use filename_cmp
10018 instead of strcmp for filename.
10020 2011-03-25 Jeff Law <law@redhat.com>
10022 * c-common.c (def_fn_type): Add missing va_end.
10024 2011-03-25 Jason Merrill <jason@redhat.com>
10026 * c.opt: Add -std=c++03.
10028 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10030 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10032 2011-03-17 Kai Tietz <ktietz@redhat.com>
10035 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10036 Display allowed attributes for function pointer types.
10037 (pp_c_attributes_display): New function to display
10038 attributes having affects_type_identity flag set to true.
10039 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10041 * c-common.c (c_common_attribute_table):
10043 (c_common_format_attribute_table): Likewise.
10045 2011-03-18 Jason Merrill <jason@redhat.com>
10047 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10048 * c-common.h: Don't declare it here.
10049 * c-common.c: Or define it here.
10050 * c-opts.c (c_common_handle_option): Or set it here.
10053 * c-common.c (handle_transparent_union_attribute): Don't
10054 make a duplicate type in C++.
10056 2011-03-15 Jason Merrill <jason@redhat.com>
10058 * c-common.c (max_constexpr_depth): New.
10059 * c-common.h: Declare it.
10060 * c-opts.c (c_common_handle_option): Set it.
10061 * c.opt (fconstexpr-depth): New option.
10063 2011-03-11 Jason Merrill <jason@redhat.com>
10065 * c-common.c (attribute_takes_identifier_p): Add missing const.
10068 * c-common.c (attribute_takes_identifier_p): Assume that an
10069 unknown attribute takes an identifier.
10071 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10074 * c-common.c (c_type_hash): Call list_length instead of iterating
10075 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10077 2011-02-19 Jakub Jelinek <jakub@redhat.com>
10080 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10082 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10084 * c.opt (fobjc-abi-version=) New.
10085 (fobjc-nilcheck): New.
10087 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10090 * c-common.h (keyword_is_decl_specifier): Declare.
10091 * c-common.c (keyword_is_decl_specifier): Define.
10092 (keyword_is_function_specifier): New function.
10094 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10097 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10098 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10101 2011-01-26 Arnaud Charlet <charlet@adacore.com>
10103 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10105 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10108 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10109 after init_c_lex if pch_file is set.
10111 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10114 * c.opt (-fkeep-inline-dllexport): New switch.
10116 2011-01-12 Richard Guenther <rguenther@suse.de>
10118 PR middle-end/32511
10119 * c-common.c (handle_weak_attribute): Warn instead of error
10120 on declaring an inline function weak.
10122 2011-01-05 Tom Tromey <tromey@redhat.com>
10124 * c-common.h (lvalue_error): Update.
10125 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10128 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
10131 * c-objc.h (objc_finish_message_expr): Added argument to
10134 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10136 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10139 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10141 * c-objc.h (objc_maybe_warn_exceptions): New.
10142 * stub-objc.c (objc_maybe_warn_exceptions): New.
10144 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10146 * c-common.h (readonly_error): Declare.
10147 * c-common.c (readonly_error): Define.
10149 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10151 * c-common.h (invalid_indirection_error): Declare.
10152 * c-common.c (invalid_indirection_error): Define.
10154 2010-12-03 Richard Guenther <rguenther@suse.de>
10157 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10158 (pp_c_unary_expression): Likewise.
10159 (pp_c_expression): Likewise.
10161 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10163 * c-common.h (objc_finish_function): New.
10164 (objc_non_volatilized_type): Removed.
10165 (objc_type_quals_match): Removed.
10166 * stub-objc.c (objc_finish_function): New.
10167 (objc_non_volatilized_type): Removed.
10168 (objc_type_quals_match): Removed.
10170 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10172 * c-common.h (parse_optimize_options): Declare.
10173 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10174 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10176 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10178 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10180 * c-pch.c (O_BINARY): Don't define here.
10181 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10183 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10185 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10186 targetm.except_unwind_info.
10188 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10190 * c-opts.c (c_common_handle_option): Pass location to
10191 set_struct_debug_option.
10193 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10195 * c-common.c (visibility_options): Move from ../opts.c.
10196 * c-common.h (struct visibility_flags, visibility_options):
10198 * c-opts.c (finish_options): Rename to c_finish_options.
10199 (c_common_init): Update call to finish_options.
10201 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10204 * c-lex.c (lex_string): Check that each string in an Objective-C
10205 string concat sequence starts with either one or zero '@', and
10206 that there are no spurious '@' signs at the end.
10208 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10210 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10211 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10212 HANDLE_PRAGMA_VISIBILITY.
10213 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10214 HANDLE_PRAGMA_VISIBILITY): Don't define.
10215 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10217 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10222 * c-common.h (keyword_begins_type_specifier): Declare.
10223 (keyword_is_storage_class_specifier): Declare.
10224 (keyword_is_type_qualifier): Declare.
10225 * c-common.c (keyword_begins_type_specifier): New function.
10226 (keyword_is_storage_class_specifier): New function.
10227 (keyword_is_type_qualifier): Declare.
10229 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10232 * c-common.c (in_late_binary_op): Define.
10233 (c_common_truthvalue_conversion): Check in_late_binary_op before
10234 calling c_save_expr.
10235 * c-common.h (in_late_binary_op): Declare.
10237 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10239 * c-opts.c (c_common_handle_option): Update calls to
10240 set_struct_debug_option.
10242 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10244 * c-common.h (objc_declare_protocols): Added additional argument.
10245 * stub-objc.c (objc_declare_protocol): Same change.
10247 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10250 * c-common.h (build_real_imag_expr): Declare.
10251 * c-semantics.c (build_real_imag_expr): Define.
10253 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10255 * c-opts.c (c_common_parse_file): Take no arguments.
10256 * c-common.h (c_common_parse_file): Update prototype.
10258 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10261 * c-common.c (warning_candidate_p): Don't track non-const calls
10264 2010-11-15 Ian Lance Taylor <iant@google.com>
10266 * c-lex.c (init_c_lex): Set macro debug callbacks if
10267 flag_dump_go_spec is set.
10269 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10271 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10272 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10274 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10276 PR preprocessor/45038
10277 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10280 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10282 * c-common.h (c_family_lang_mask): Declare.
10283 * c-opts.c (c_family_lang_mask): Make extern.
10284 * c-pragma.c (handle_pragma_diagnostic): Use
10285 control_warning_option.
10287 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10289 * c-common.c (parse_optimize_options): Update call to
10291 * c-common.h (c_common_handle_option): Update prototype.
10292 * c-opts.c (c_common_handle_option): Take location_t parameter and
10293 pass it to other functions.
10295 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10297 * c-opts.c (warning_as_error_callback): Remove.
10298 (c_common_initialize_diagnostics): Don't call
10299 register_warning_as_error_callback.
10300 (c_common_handle_option): Handle -Werror=normalized= here.
10302 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10304 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10306 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10308 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10309 Remove trailing '.' from diagnostics.
10310 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10312 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10314 * c-common.c (parse_optimize_options): Pass global_dc to
10316 * c-opts.c (c_common_handle_option): Pass &global_options to
10317 set_Wstrict_aliasing.
10318 * c.opt (v): Don't mark Common or document here.
10320 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10323 * c-format.c (format_type): New type gcc_objc_string_format_type.
10324 (valid_stringptr_type_p): New.
10325 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10326 (check_format_string): Pass expected type, use
10327 valid_stringptr_type_p (), check that the format string types are
10328 consistent with the format specification.
10329 (decode_format_attr): Warn if NSString is used outside objective-c.
10330 (format_types_orig): Add NSString.
10331 (format_name): New.
10332 (format_flags): New.
10333 (check_format_arg): Handle format strings requiring an external parser.
10334 first_target_format_type: New variable.
10335 (handle_format_attribute): Set up first_target_format_type, pass the
10336 expected format arg string type to check_format_string().
10337 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10338 * stub-objc.c (objc_string_ref_type_p): New.
10339 (objc_check_format_arg): New.
10341 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10343 Fixed using the Objective-C 2.0 dot-syntax with class names.
10344 * c-common.h (objc_build_class_component_ref): New.
10345 * stub-objc.c (objc_build_class_component_ref): New.
10347 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10349 * c.opt (Wproperty-assign-default): New option.
10351 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10353 Implemented -fobjc-std=objc1 flag.
10354 * c.opt (fobjc-std=objc1): New option.
10356 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10358 Implemented format and noreturn attributes for Objective-C methods.
10359 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10360 attribute for Objective-C methods.
10362 2010-10-31 Jason Merrill <jason@redhat.com>
10364 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10367 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10369 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10370 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10371 (objc_add_property_declaration): Removed arguments for copies and
10373 (objc_build_getter_call): Renamed to
10374 objc_maybe_build_component_ref.
10375 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10376 (objc_is_property_ref): New.
10377 * c-common.c (c_common_reswords): Removed copies and ivar.
10378 * stub-objc.c (objc_add_property_declaration): Removed arguments
10379 for copies and ivar.
10380 (objc_build_getter_call): Renamed to
10381 objc_maybe_build_component_ref.
10382 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10383 (objc_is_property_ref): New.
10385 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10386 Matthew Gingell <gingell@adacore.com>
10388 * c-ada-spec.c (separate_class_package): New function.
10389 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10390 name of their enclosing package.
10391 (print_ada_declaration): Use separate_class_package.
10393 2010-10-27 Jason Merrill <jason@redhat.com>
10395 * c-common.c (c_common_reswords): Add __is_literal_type.
10396 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10398 * c-common.c (check_case_value): Remove special C++ code.
10400 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10402 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10403 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10404 and RID_LAST_PATTR.
10405 (objc_add_property_declaration): Added additional arguments.
10406 (objc_property_attribute_kind): Removed.
10407 (objc_set_property_attr): Removed.
10408 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10409 copy and nonatomic.
10410 * stub-objc.c (objc_add_property_declaration): Added additional
10412 (objc_set_property_attr): Removed.
10414 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10416 * c-common.h (objc_add_property_variable): Renamed to
10417 objc_add_property_declaration. Added location argument.
10418 * stub-objc.c (objc_add_property_variable): Same change.
10420 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10422 * c-common.h (objc_maybe_printable_name): New.
10423 * stub-objc.c (objc_maybe_printable_name): New.
10425 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10426 Andrew Pinski <pinskia@gmail.com>
10428 * c-common.h (c_common_mark_addressable_vec): Declare.
10429 * c-common.c (c_common_mark_addressable_vec): New function.
10431 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10433 * c-common.h (objc_set_method_type): Removed.
10434 (objc_add_method_declaration): Added boolean argument.
10435 (objc_start_method_definition): Same change.
10436 (objc_build_method_signature): Same change.
10437 * stub-objc.c (objc_set_method_type): Removed.
10438 (objc_add_method_declaration): Added boolean argument.
10439 (objc_start_method_definition): Same change.
10440 (objc_build_method_signature): Same change.
10442 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10444 * c-common.h (finish_file): Removed.
10445 (objc_write_global_declarations): New.
10446 * c-opts.c (c_common_parse_file): Do not call finish_file.
10447 * stub-objc.c (objc_write_global_declarations): New.
10449 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10451 Implemented parsing @synthesize and @dynamic for
10452 Objective-C/Objective-C++.
10453 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10454 (objc_add_synthesize_declaration): New.
10455 (objc_add_dynamic_declaration): New.
10456 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10457 * stub-objc.c (objc_add_synthesize_declaration): New.
10458 (objc_add_dynamic_declaration): New.
10460 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10463 * c-cppbuiltin.c (mode_has_fma): Move function here from
10464 builtins.c. Don't use the fma optab, instead just use the
10465 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10468 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10470 Merge from 'apple/trunk' branch on FSF servers.
10472 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10475 * c-common.h (objc_non_volatilized_type): New declaration
10476 * stub-objc.c (objc_non_volatilized_type): New stub.
10478 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10480 Merge from 'apple/trunk' branch on FSF servers.
10482 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10485 * c-common.h (objc_diagnose_private_ivar): New decl.
10486 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10488 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10490 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10491 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10492 (objc_ivar_visibility_kind): New enum.
10493 (objc_set_visibility): Adjust prototype to use visibility enum.
10494 * stub-objc.c (objc_set_visibility): Adjust stub to use
10497 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10499 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10500 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10501 has the appropriate fma builtins.
10502 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10504 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10506 merge from FSF apple 'trunk' branch.
10507 2006 Fariborz Jahanian <fjahanian@apple.com>
10509 Radars 4436866, 4505126, 4506903, 4517826
10510 * c-common.c (c_common_resword): Define @property and its attributes.
10511 * c-common.h: Define property attribute enum entries.
10512 (OBJC_IS_PATTR_KEYWORD): New.
10513 (objc_property_attribute_kind): New enum.
10514 Declare objc_set_property_attr (), objc_add_property_variable (),
10515 objc_build_getter_call () and objc_build_setter_call ().
10516 * stub-objc.c (objc_set_property_attr): New stub.
10517 (objc_add_property_variable): Likewise.
10518 (objc_build_getter_call): Likewise.
10519 (objc_build_setter_call) Likewise.
10521 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10523 merge from FSF apple 'trunk' branch.
10524 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10526 Radar 3803157 (method attributes)
10527 * c-common.c (handle_deprecated_attribute): Recognize
10528 objc methods as valid declarations.
10529 * c-common.h: Declare objc_method_decl ().
10530 * stub-objc.c (objc_method_decl): New stub.
10532 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10534 * c-common.c (parse_optimize_options): Call
10535 decode_cmdline_options_to_array_default_mask before
10536 decode_options. Update arguments to decode_options.
10537 * c-common.h (c_common_init_options_struct): Declare.
10538 * c-opts.c (c_common_init_options_struct): New. Split out from
10539 c_common_init_options.
10541 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10543 Implemented fast enumeration for Objective-C.
10544 * c-common.h (objc_finish_foreach_loop): New.
10545 * stub-objc.c (objc_finish_foreach_loop): New.
10547 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10549 * c-common.h (struct diagnostic_context): Don't declare here.
10550 (c_common_initialize_diagnostics): Declare using
10551 diagnostic_context typedef.
10552 * c-opts.c (c_common_handle_option): Pass global_dc to
10553 handle_generated_option.
10555 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10557 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10558 handle_generated_option.
10560 2010-10-03 Ian Lance Taylor <iant@google.com>
10562 * c.opt (-fplan9-extensions): New option.
10564 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10566 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10568 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10569 of duplicating code.
10571 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10573 * c-common.c: Add two new entries for @optional
10574 and @required keywords.
10576 merge from FSF 'apple/trunk' branch.
10577 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10580 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10581 objective-c keywords.
10582 (objc_set_method_opt): New declaration.
10583 * stub-objc.c (objc_set_method_opt): New stub.
10585 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10587 * c-common.c (handle_optimize_attribute): Pass &global_options to
10588 cl_optimization_save and cl_optimization_restore.
10589 * c-opts.c (c_common_handle_option): Pass &global_options to
10590 handle_generated_option.
10591 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10592 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10593 &global_options to cl_optimization_restore.
10595 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10597 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10598 Objective-C/Objective-C++ keywords.
10600 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10602 Merge from 'apple/trunk' branch on FSF servers.
10604 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10607 * c-common.h (objc_check_global_decl): New declaration.
10608 * stub-objc.c (objc_check_global_decl): New stub.
10610 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10612 * c.opt: Don't use VarExists.
10614 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10616 * c-common.c (c_cpp_error): Update names of diagnostic_context
10618 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10619 cl_optimization members.
10620 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10621 sanitize_cpp_opts, finish_options): Update names of cpp_options
10624 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10626 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10627 (objc_is_reserved_word): Removed.
10628 * c-common.c: Updated comments.
10629 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10630 objc_is_reserved_word.
10631 * stub-objc.c (objc_is_reserved_word): Removed.
10633 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10635 * c-common.h (objc_add_method_declaration): Adjust prototype to
10636 include attributes.
10637 (objc_start_method_definition): Likewise.
10638 (objc_build_keyword_decl): Likewise.
10639 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10640 (objc_start_method_definition): Likewise.
10641 (objc_build_keyword_decl): Likewise.
10643 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10645 * c-common.h (objc_start_class_interface): Adjust prototype.
10646 (objc_start_category_interface): Likewise.
10647 (objc_start_protocol): Likewise.
10648 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10649 (objc_start_class_interface): Likewise.
10650 (objc_start_category_interface): Likewise.
10652 2010-09-27 Ian Lance Taylor <iant@google.com>
10654 * c-common.c (c_common_attribute_table): Add no_split_stack.
10655 (handle_no_split_stack_attribute): New static function.
10657 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10659 Merge from 'apple/trunk' branch on FSF servers.
10661 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
10664 * c-common.h (objc_have_common_type): New declaration.
10665 * stub-objc.c (objc_have_common_type): New stub.
10667 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10670 * c-common.h (objc_common_type): New prototype.
10671 * stub-objc.c (objc_common_type): New stub.
10673 2010-09-24 Jan Hubicka <jh@suse.cz>
10675 * c-common.c (handle_leaf_attribute): New function.
10676 (struct attribute_spec c_common_att): Add leaf.
10678 2010-09-22 Joseph Myers <joseph@codesourcery.com>
10680 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10681 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10682 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10683 -include-barrier, -include-directory, -include-directory=,
10684 -include-directory-after, -include-directory-after=,
10685 -include-prefix, -include-prefix=, -include-with-prefix,
10686 -include-with-prefix=, -include-with-prefix-after,
10687 -include-with-prefix-after=, -include-with-prefix-before,
10688 -include-with-prefix-before=, -no-integrated-cpp,
10689 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10690 -output=, -pedantic, -pedantic-errors, -preprocess,
10691 -print-missing-file-dependencies, -trace-includes, -traditional,
10692 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10693 -user-dependencies, -verbose, -write-dependencies,
10694 -write-user-dependencies, no-integrated-cpp, traditional): New.
10696 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10699 * c-common.h (objc_start_method_definition): Return bool instead
10701 * stub-objc.c (objc_start_method_definition): Return bool instead
10704 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10707 * c-common.h (objc_get_interface_ivars): New declaration.
10708 * stub-objc.c (objc_get_interface_ivars): New stub.
10710 2010-09-15 Ian Lance Taylor <iant@google.com>
10712 * c-common.c (parse_optimize_options): Do not capitalize warning
10713 messages. Remove period at end of warning message.
10715 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10717 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10718 (handle_alias_attribute): ... here.
10719 (handle_ifunc_attribute): New.
10721 2010-09-06 Mark Mitchell <mark@codesourcery.com>
10723 * c-common.h (do_warn_double_promotion): Declare.
10724 * c-common.c (do_warn_double_promotion): Define.
10726 2010-09-05 Mark Mitchell <mark@codesourcery.com>
10728 * c.opt (Wdouble-promotion): New.
10730 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10732 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10733 fvtable-thunks, fxref): Mark no longer supported in help text.
10735 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10737 * c.opt (Wimport, fall-virtual, falt-external-templates,
10738 fdefault-inline, fenum-int-equiv, fexternal-templates,
10739 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10740 fname-mangling-version-, fnew-abi, fnonnull-objects,
10741 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10742 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10744 (fhandle-exceptions): Mark with Alias and Warn.
10745 * c-opts.c (c_common_handle_option): Don't handle options marked
10748 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10750 * c.opt (Wcomments, Werror-implicit-function-declaration,
10751 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10752 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10754 * c-common.c (option_codes): Use OPT_Wcomment instead of
10756 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10757 Don't handle options marked as aliases.
10759 2010-08-25 Richard Guenther <rguenther@suse.de>
10761 * c-common.c (c_common_get_alias_set): Remove special
10762 handling for pointers.
10764 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10766 * c-common.c: Use FOR_EACH_VEC_ELT.
10767 * c-gimplify.c: Likewise.
10768 * c-pragma.c: Likewise.
10770 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10772 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10774 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10776 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10777 instead of OPT_MDX and OPT_MMDX.
10779 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10781 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10783 2010-08-12 Joseph Myers <joseph@codesourcery.com>
10785 * c.opt (MD, MMD): Change to MDX and MMDX.
10786 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10788 2010-08-11 Joseph Myers <joseph@codesourcery.com>
10790 * c-opts.c (c_common_handle_option): Call handle_generated_option
10791 instead of handle_option.
10793 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10795 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10796 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10798 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10800 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10801 (pending_redefine_extname): Change type to a VEC.
10802 (add_to_renaming_pragma_list): Update for new type of
10803 pending_redefine_extname.
10804 (maybe_apply_renaming_pragma): Likewise.
10806 2010-08-04 Arnaud Charlet <charlet@adacore.com>
10808 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10810 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10811 decide whether a type has already been declared/seen.
10812 Do not go to the original type.
10813 (dump_nested_types): New parameter forward.
10814 Generate forward declaration if needed and mark type as visited.
10815 (print_ada_declaration): Call dump_nested_types if not already done.
10816 Mark types as visited.
10818 2010-08-03 Joseph Myers <joseph@codesourcery.com>
10820 * c.opt (-print-pch-checksum): Remove option.
10821 * c-opts.c (c_common_handle_option): Don't handle
10822 OPT_print_pch_checksum.
10824 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10826 * c-common.h (c_common_handle_option): Update prototype and return
10828 * c-opts.c (c_common_handle_option): Update prototype and return
10829 value type. Update calls to handle_option and
10830 enable_warning_as_error.
10832 2010-07-27 Jakub Jelinek <jakub@redhat.com>
10835 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10837 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10839 * c-common.h (c_common_missing_argument): Remove.
10840 * c-opts.c (c_common_missing_argument): Remove.
10841 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10842 idirafter, imacros, include, isysroot, isystem, iquote): Add
10844 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10846 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10848 * c-common.h (c_common_option_lang_mask,
10849 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10851 (c_common_init_options): Update prototype.
10852 * c-opts.c (c_common_option_lang_mask): New.
10853 (c_common_initialize_diagnostics): Split out of
10854 c_common_init_options.
10855 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10857 (c_common_init_options): Update prototype. Use decoded options in
10858 search for -lang-asm.
10860 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10862 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10863 * c-format.c: Likewise.
10865 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10867 * c-common.h: Include diagnostic-core.h. Error if already
10869 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10871 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10873 * c-common.c (IN_GCC_FRONTEND): Do not undef.
10874 Do not include expr.h
10875 (vector_mode_valid_p): Move here.
10877 2010-06-21 DJ Delorie <dj@redhat.com>
10879 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10880 allow these pragmas anywhere.
10882 2010-06-14 Jakub Jelinek <jakub@redhat.com>
10885 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10886 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10887 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10888 ggc_strdup instead of xstrdup.
10890 2010-06-10 Jakub Jelinek <jakub@redhat.com>
10892 * c-cppbuiltin.c: Include cpp-id-data.h.
10893 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10894 (lazy_hex_fp_value): New function.
10895 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10897 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10899 * c-gimplify.c: Do not include tree-flow.h
10901 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10904 * c-common.c: Rename targetm member:
10905 targetm.enum_va_list -> targetm.enum_va_list_p
10907 2010-06-28 Anatoly Sokolov <aesok@post.ru>
10909 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10911 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10913 * c-cppbuiltin.c: Do not include except.h.
10915 2010-06-24 Andi Kleen <ak@linux.intel.com>
10917 * c-common.c (warn_for_omitted_condop): New.
10918 * c-common.h (warn_for_omitted_condop): Add prototype.
10920 2010-06-21 Joseph Myers <joseph@codesourcery.com>
10922 * c.opt (lang-objc): Remove.
10923 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10925 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10927 * c-opts.c: Include "tm_p.h".
10929 2010-06-20 Joseph Myers <joseph@codesourcery.com>
10931 * c-common.c (parse_optimize_options): Update call to
10934 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10936 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10937 new type of types_used_by_cur_var_decl.
10939 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10942 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10943 for C++ standard compliance.
10945 2010-06-16 Jason Merrill <jason@redhat.com>
10947 * c.opt: Add -Wnoexcept.
10949 2010-06-16 Richard Guenther <rguenther@suse.de>
10952 * c-common.c (c_common_truthvalue_conversion): Remove
10953 premature and wrong optimization concering ADDR_EXPRs.
10955 2010-06-15 Arnaud Charlet <charlet@adacore.com>
10957 * c-ada-spec.c (dump_sloc): Remove column info.
10958 (is_simple_enum): New function.
10959 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10960 enum types when relevant.
10962 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10964 * c-common.c (conversion_warning): Warn at expression
10967 2010-06-10 Joseph Myers <joseph@codesourcery.com>
10969 * c-opts.c (c_common_handle_option): Don't handle
10972 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10974 * c-pragma.c (push_alignment): Use typed GC allocation.
10975 (handle_pragma_push_options): Likewise.
10977 * c-common.c (parse_optimize_options): Likewise.
10979 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10982 2010-06-07 Joseph Myers <joseph@codesourcery.com>
10984 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10985 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10986 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10987 flag_signed_bitfields, warn_strict_null_sentinel,
10988 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10989 flag_gen_declaration, flag_no_gnu_keywords,
10990 flag_implement_inlines, flag_implicit_templates,
10991 flag_implicit_inline_templates, flag_optional_diags,
10992 flag_elide_constructors, flag_default_inline, flag_rtti,
10993 flag_conserve_space, flag_access_control, flag_check_new,
10994 flag_new_for_scope, flag_weak, flag_working_directory,
10995 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10996 flag_enforce_eh_specs, flag_threadsafe_statics,
10997 flag_pretty_templates): Remove.
10998 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10999 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
11000 flag_replace_objc_classes, flag_undef, flag_no_builtin,
11001 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11002 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11003 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11004 flag_no_gnu_keywords, flag_implement_inlines,
11005 flag_implicit_templates, flag_implicit_inline_templates,
11006 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11007 flag_rtti, flag_conserve_space, flag_access_control,
11008 flag_check_new, flag_new_for_scope, flag_weak,
11009 flag_working_directory, flag_use_cxa_atexit,
11010 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11011 flag_threadsafe_statics, flag_pretty_templates,
11012 warn_strict_null_sentinel): Remove.
11013 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11014 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11015 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11016 fimplicit-inline-templates, fimplicit-templates,
11017 flax-vector-conversions, fms-extensions, fnil-receivers,
11018 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11019 frtti, fshort-double, fshort-enums, fshort-wchar,
11020 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11021 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11022 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11023 gen-decls, undef): Use Var.
11024 (fdefault-inline, foptional-diags): Document as doing nothing.
11025 * c-opts.c (c_common_handle_option): Remove cases for options now
11026 using Var. Mark ignored options as such.
11028 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11030 * c-common.c: Moved to here from parent directory.
11031 * c-common.def: Likewise.
11032 * c-common.h: Likewise.
11033 * c-cppbuiltin.c: Likewise.
11034 * c-dump.c: Likewise.
11035 * c-format.c: Likewise.
11036 * c-format.h : Likewise.
11037 * c-gimplify.c: Likewise.
11038 * c-lex.c: Likewise.
11039 * c-omp.c: Likewise.
11041 * c-opts.c: Likewise.
11042 * c-pch.c: Likewise.
11043 * c-ppoutput.c: Likewise.
11044 * c-pragma.c: Likewise.
11045 * c-pragma.h: Likewise.
11046 * c-pretty-print.c: Likewise.
11047 * c-pretty-print.h: Likewise.
11048 * c-semantics.c: Likewise.
11049 * stub-objc.c: Likewise.
11051 * c-common.c: Include gt-c-family-c-common.h.
11052 * c-pragma.c: Include gt-c-family-c-pragma.h.
11054 Copyright (C) 2010-2020 Free Software Foundation, Inc.
11056 Copying and distribution of this file, with or without modification,
11057 are permitted in any medium without royalty provided the copyright
11058 notice and this notice are preserved.