1 2020-05-20 Nathan Sidwell <nathan@acm.org>
3 * c-common.c (try_to_locate_new_include_insertion_point): Use
4 strcmp to compare filenames.
5 * c-lex.c (init_c_lex): Move declaration to initialization.
6 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
9 2020-05-15 Jason Merrill <jason@redhat.com>
11 * c-opts.c (set_std_cxx20): Set flag_coroutines.
13 2020-05-13 Jason Merrill <jason@redhat.com>
15 * c.opt (std=c++20): Make c++2a the alias.
16 (std=gnu++20): Likewise.
17 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
19 * c-cppbuiltin.c: Adjust.
23 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
25 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
27 2020-05-08 Nathan Sidwell <nathan@acm.org>
29 Reimplement directives only processing.
30 * c-ppoutput.c (token_streamer): Ne.
31 (directives_only_cb): New. Swallow ...
32 (print_lines_directives_only): ... this.
33 (scan_translation_unit_directives_only): Reimplment using the
36 2020-05-07 Marek Polacek <polacek@redhat.com>
38 * c-format.c (badwords): Add "nonstatic".
40 202-05-07 Jakub Jelinek <jakub@redhat.com>
43 * c-common.c (speculation_safe_value_resolve_params): Return false if
44 error_operand_p (val2).
45 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
46 Remove extraneous semicolon.
48 2020-05-06 qing zhao <qing.zhao@oracle.com>
51 * c-indentation.c (get_visual_column): Add a hint to use the new
52 -flarge-source-files option.
54 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
56 * c-attribs.c (handle_vector_size_attribute): Add attribute
57 nonnull for argument args in order to silence warning of
58 uninitialized variable usage. Since this is local to the
59 compilation unit and thus cannot be checked at call sides by the
60 compiler, added an assert statement in order to verify this.
62 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
65 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
66 value to USHRT_MAX (65535).
68 2020-04-29 Jakub Jelinek <jakub@redhat.com>
70 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
72 2020-04-27 Jakub Jelinek <jakub@redhat.com>
75 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
76 fncode == BUILT_IN_NONE before initialization of first_param.
78 2020-04-23 Marek Polacek <polacek@redhat.com>
81 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
84 2020-04-14 Patrick Palka <ppalka@redhat.com>
87 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
88 ampersand if it's an rvalue reference type.
90 2020-04-13 Martin Sebor <msebor@redhat.com>
93 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
94 printing array bound for flexible array members.
96 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
98 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
101 2020-04-02 Richard Biener <rguenther@suse.de>
104 * c-opts.c (c_common_post_options): Enable -ffinite-loops
105 for -O2 and C++11 or newer.
107 2020-03-28 Patrick Palka <ppalka@redhat.com>
109 * c.opt: Add -fconcepts-diagnostics-depth.
111 2020-03-27 Martin Sebor <msebor@redhat.com>
114 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
115 to decl_attributes. Make handling of different kinds of entities
118 2020-03-27 Martin Sebor <msebor@redhat.com>
121 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
124 2020-03-23 Jakub Jelinek <jakub@redhat.com>
127 * c-warn.c (warnings_for_convert_and_check): For expr and/or
128 result being COMPOUND_EXPRs, skip to ultimate rhs.
130 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
133 * c-common.c (c_common_type_for_mode): Before using a registered
134 built-in type, check that the vectorness of the type matches
135 the vectorness of the mode.
137 2020-03-17 Jakub Jelinek <jakub@redhat.com>
139 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
140 issue in a diagnostic message.
142 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
144 * c.opt: Avoid redundancy in the help text.
146 2020-03-02 Marek Polacek <polacek@redhat.com>
148 PR c++/93958 - add missing -std=gnu++20.
149 * c.opt: Add -std=gnu++20.
151 2020-03-01 Martin Sebor <msebor@redhat.com>
154 * c-attribs.c (append_access_attrs): Correctly handle attribute.
155 (handle_access_attribute): Same.
157 2020-02-25 Jakub Jelinek <jakub@redhat.com>
160 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
161 "did you mean" hint in diagnostics.
163 2020-02-15 Jason Merrill <jason@redhat.com>
165 * c.opt: Add -std=c++20.
167 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
169 * c-ada-spec.c: Include bitmap.h.
170 (dump_ada_double_name): Rename into...
171 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
172 (dump_ada_array_type): Adjust to above renaming. Robustify.
173 (dump_nested_types_1): New function copied from... Add dumped_types
174 parameter and pass it down to dump_nested_type.
175 (dump_nested_types): ...this. Remove parent parameter. Just call
176 dump_nested_types_1 on an automatic bitmap.
177 (dump_nested_type): Add dumped_types parameter.
178 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
179 Adjust recursive calls and adjust to above renaming.
180 (dump_ada_declaration): Adjust call to dump_nested_types.
181 Tidy up and adjust to above renaming.
182 (dump_ada_specs): Initialize and release bitmap obstack.
184 2020-02-10 Martin Sebor <msebor@redhat.com>
187 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
189 2020-02-10 Jakub Jelinek <jakub@redhat.com>
192 * c-format.c (check_plain): Fix up last argument of strncasecmp.
193 Remove useless extra test.
195 2020-02-03 Julian Brown <julian@codesourcery.com>
196 Tobias Burnus <tobias@codesourcery.com>
198 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
200 2020-01-29 Jason Merrill <jason@redhat.com>
203 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
205 2020-01-23 Jason Merrill <jason@redhat.com>
207 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
209 2020-01-23 Martin Sebor <msebor@redhat.com>
212 * c-common.c (check_function_arguments): Avoid overlap checking
213 of sprintf functions.
215 2020-01-22 Jason Merrill <jason@redhat.com>
217 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
219 * c-warn.c (conversion_warning): Check operands only after checking
220 the whole expression. Don't check second operand of + for sign.
222 2020-01-21 Jason Merrill <jason@redhat.com>
223 Manuel López-Ibáñez <manu@gcc.gnu.org>
225 PR c++/40752 - useless -Wconversion with short +=.
226 * c.opt (-Warith-conversion): New.
227 * c-warn.c (conversion_warning): Recurse for operands of
228 operators. Only warn about the whole expression with
231 2020-01-21 Jason Merrill <jason@redhat.com>
233 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
234 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
236 2020-01-20 Nathan Sidwell <nathan@acm.org>
238 PR preprocessor/80005
239 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
241 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
243 * c-common.c (co_await, co_yield, co_return): New.
244 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
245 RID_CO_RETURN): New enumeration values.
246 (D_CXX_COROUTINES): Bit to identify coroutines are active.
247 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
248 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
249 * c.opt (fcoroutines): New command-line switch.
251 2020-01-10 David Malcolm <dmalcolm@redhat.com>
253 * c-format.c (local_event_ptr_node): New.
254 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
255 (init_dynamic_diag_info): Initialize local_event_ptr_node.
256 * c-format.h (T_EVENT_PTR): New define.
258 2020-01-10 Martin Sebor <msebor@redhat.com>
261 * c-attribs.c (append_access_attrs): Validate against the translated
262 access string rather than the human-readable representation.
264 2020-01-01 Jakub Jelinek <jakub@redhat.com>
266 Update copyright years.
268 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
270 * c-ada-spec.h (decl_sloc): Delete.
271 * c-ada-spec.c (decl_sloc): Make static.
273 2019-12-19 Julian Brown <julian@codesourcery.com>
275 * c-common.h (c_omp_map_clause_name): Add prototype.
276 * c-omp.c (c_omp_map_clause_name): New function.
277 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
278 PRAGMA_OACC_CLAUSE_DETACH.
280 2019-12-19 Julian Brown <julian@codesourcery.com>
281 Maciej W. Rozycki <macro@codesourcery.com>
282 Tobias Burnus <tobias@codesourcery.com>
283 Thomas Schwinge <thomas@codesourcery.com>
285 * c-pragma.h (pragma_omp_clause): Add
286 PRAGMA_OACC_CLAUSE_NO_CREATE.
288 2019-12-17 Martin Sebor <msebor@redhat.com>
291 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
293 2019-12-11 David Malcolm <dmalcolm@redhat.com>
295 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
297 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
299 2019-12-09 David Malcolm <dmalcolm@redhat.com>
301 * c-format.c (range_label_for_format_type_mismatch::get_text):
302 Replace label_text ctor called with true with label_text::take.
304 2019-12-09 David Malcolm <dmalcolm@redhat.com>
306 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
307 initial newline from expected outputs.
308 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
309 call to diagnostic_show_locus.
311 2019-12-06 Jakub Jelinek <jakub@redhat.com>
313 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
316 2019-12-05 Marek Polacek <polacek@redhat.com>
317 Jakub Jelinek <jakub@redhat.com>
319 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
320 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
322 2019-12-05 Marek Polacek <polacek@redhat.com>
324 PR c++/92271 - make __is_same alias for __is_same_as.
325 * c-common.c: Add __is_same, an alias for __is_same_as.
327 2019-12-03 Marek Polacek <polacek@redhat.com>
329 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
330 * c-cppbuiltin.c (c_cpp_builtins): Predefine
331 __cpp_aggregate_paren_init=201902 for -std=c++2a.
333 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
335 * c-attribs.c (handle_symver_attribute): New function
336 (c_common_attributes): Add symver.
338 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
340 * c-common.c (pointer_int_sum): Use verify_type_context to check
341 whether the target allows pointer arithmetic for the types involved.
342 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
343 to check whether the target allows sizeof and alignof operations
344 for the types involved.
346 2019-11-27 Jason Merrill <jason@redhat.com>
348 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
350 2019-11-26 Jakub Jelinek <jakub@redhat.com>
353 * c-attribs.c (handle_mode_attribute): Add mode attribute to
356 2019-11-25 Joseph Myers <joseph@codesourcery.com>
359 * c-common.c (c_common_type_for_mode): Handle decimal
360 floating-point types being NULL_TREE.
361 * c-format.c (get_format_for_type_1): Handle specified types being
363 * c-lex.c (interpret_float): Give an error for decimal
364 floating-point constants when decimal floating-point not
367 2019-11-23 Jakub Jelinek <jakub@redhat.com>
370 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
371 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
372 group warning with inform together.
373 (handle_access_attribute): Formatting fix.
375 2019-11-22 Jakub Jelinek <jakub@redhat.com>
378 * c-common.h (identifier_global_tag): Declare.
379 * c-format.c (get_pointer_to_named_type): Renamed to ...
380 (get_named_type): ... this. Use identifier_global_tag instead of
381 identifier_global_value, handle the return value being a TYPE_P.
382 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
383 to call get_named_type instead. Formatting fixes.
385 Implement P1902R1, Missing feature-test macros 2017-2019.
386 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
387 and __cpp_generic_lambdas for -std=c++2a. Define
388 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
389 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
390 __cpp_concepts for -std=c++2a.
392 2019-11-22 Martin Sebor <msebor@redhat.com>
395 * c-attribs.c (handle_access_attribute): New function.
396 (c_common_attribute_table): Add new attribute.
397 (get_argument_type): New function.
398 (append_access_attrs): New function.
399 (get_nonnull_operand): Rename...
400 (get_attribute_operand): ...to this.
401 * c-common.c (get_nonnull_operand): Rename...
402 (get_attribute_operand): ...to this.
404 2019-11-21 Joseph Myers <joseph@codesourcery.com>
406 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
409 2019-11-19 Joseph Myers <joseph@codesourcery.com>
411 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
412 warning for standard attributes mixed with fallthrough attributes.
414 2019-11-15 Joseph Myers <joseph@codesourcery.com>
416 * c-attribs.c (handle_fallthrough_attribute): Remove static.
417 * c-common.h (handle_fallthrough_attribute): Declare.
419 2019-11-15 Joseph Myers <joseph@codesourcery.com>
421 * c-attribs.c (handle_deprecated_attribute): Remove static.
422 * c-common.h (handle_deprecated_attribute): Declare.
424 2019-11-14 Joseph Myers <joseph@codesourcery.com>
426 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
429 2019-11-14 Jakub Jelinek <jakub@redhat.com>
431 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
434 * c-omp.c (c_omp_check_context_selector): Handle name lists
435 containing string literals. Don't diagnose atomic_default_mem_order
438 2019-11-13 Joseph Myers <joseph@codesourcery.com>
440 * c-cppbuiltin.c (builtin_define_float_constants): Also define
441 NORM_MAX constants. Update call to get_max_float.
442 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
445 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
447 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
448 (dump_forward_type): Do not generate a declaration for function types.
449 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
450 of the component type if it is declared in another file.
452 2019-11-12 Martin Liska <mliska@suse.cz>
454 * c-opts.c (c_common_post_options):
455 Use SET_OPTION_IF_UNSET.
457 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
458 Frederik Harwath <frederik@codesourcery.com>
461 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
463 * c-pragma.c (oacc_pragmas): Add "serial" entry.
465 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
467 * c-common.h (gnu_vector_type_p): New function.
468 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
469 vectors to satisfy gnu_vector_type_p.
470 (c_build_vec_convert): Likewise __builtin_convertvector.
471 (convert_vector_to_array_for_subscript): Likewise when applying
472 implicit vector to array conversion.
473 (scalar_to_vector): Likewise when converting vector-scalar
474 operations to vector-vector operations.
476 2019-11-08 Joseph Myers <joseph@codesourcery.com>
478 * c.opt (Wold-style-definition): Initialize to -1.
479 * c-opts.c (c_common_post_options): Set warn_old_style_definition
480 to flag_isoc2x if not set explicitly.
482 2019-11-07 Joseph Myers <joseph@codesourcery.com>
484 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
486 2019-11-05 Jason Merrill <jason@redhat.com>
488 * c-opts.c (c_common_post_options): -fconcepts-ts implies
491 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
493 * c-opts.c (c_common_post_options): Update
496 2019-11-02 Jakub Jelinek <jakub@redhat.com>
498 * c-common.h (c_omp_get_context_selector): Remove.
499 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
500 and renamed to omp_get_context_selector.
502 * c-omp.c (c_omp_mark_declare_variant): Use
503 omp_context_selector_set_compare.
505 PR c++/88335 - Implement P1073R3: Immediate functions
506 * c-common.h (enum rid): Add RID_CONSTEVAL.
507 * c-common.c (c_common_reswords): Add consteval.
509 2019-11-01 Martin Sebor <msebor@redhat.com>
515 * c-pretty-print.c (direct_abstract_declarator): Print
516 bound in zero-length arrays.
517 * c.opt (-Wzero-length-bounds): New option.
519 2019-10-30 Nathan Sidwell <nathan@acm.org>
521 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
524 2019-10-28 Martin Sebor <msebor@redhat.com>
527 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
528 even when only preprocessing.
529 * c-common.h (names_builtin_p): Declare new function.
530 * c-lex.c (init_c_lex): Set has_builtin.
531 (c_common_has_builtin): Define a new function.
532 * c-ppoutput.c (init_pp_output): Set has_builtin.
534 2019-10-24 Jakub Jelinek <jakub@redhat.com>
536 * c-common.h (c_omp_context_selector_matches): Remove.
537 * c-omp.c (c_omp_context_selector_matches): Remove.
538 * c-attribs.c (c_common_attribute_table): Add
539 "omp declare target {host,nohost,block}" attributes.
541 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
543 * c-lex.c (c_common_has_attribute): Update nodiscard value.
545 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
547 * c-common.h (user_facing_original_type_p): Declare.
548 * c-common.c: Include c-spellcheck.h.
549 (user_facing_original_type_p): New function.
551 2019-10-12 Jakub Jelinek <jakub@redhat.com>
553 * c-common.h (c_omp_mark_declare_variant,
554 c_omp_context_selector_matches): Declare.
555 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
557 (c_omp_get_context_selector): Support second argument NULL.
558 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
560 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
561 attribute, add "omp declare variant base" and
562 "omp declare variant variant" attributes.
564 2019-10-11 Joseph Myers <joseph@codesourcery.com>
566 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
567 CppReason(CPP_W_C11_C2X_COMPAT).
569 2019-10-11 Joseph Myers <joseph@codesourcery.com>
571 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
572 _Decimal64 and _Decimal128.
574 2019-10-10 Joseph Myers <joseph@codesourcery.com>
576 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
577 types if DFP not supported.
579 2019-10-10 Jakub Jelinek <jakub@redhat.com>
581 * c-common.h (c_omp_check_context_selector,
582 c_omp_get_context_selector): Declare.
583 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
584 in diagnostic message.
585 (c_omp_check_context_selector, c_omp_get_context_selector): New
587 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
589 (handle_omp_declare_variant_attribute): New function.
591 2019-10-09 Martin Sebor <msebor@redhat.com>
593 PR tree-optimization/90879
594 * c.opt (-Wstring-compare): New option.
596 2019-10-08 Andrew Sutton <asutton@lock3software.com>
597 Jason Merrill <jason@redhat.com>
599 Update the concepts implementation to conform to the C++20
600 specification, improve compile times, and generally clean up
603 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
604 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
605 * c.opt: Add -Wconcepts-ts.
606 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
607 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
608 (set_std_cxx2a): Enable concepts by default.
610 2019-10-08 Joseph Myers <joseph@codesourcery.com>
612 * c-opts.c (c_common_post_options): Set
613 -fno-fp-int-builtin-inexact for C2X.
615 2019-10-05 Jakub Jelinek <jakub@redhat.com>
617 PR c++/91369 - Implement P0784R7: constexpr new
618 * c-cppbuiltin.c (c_cpp_builtins): Predefine
619 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
621 2019-10-04 Joseph Myers <joseph@codesourcery.com>
624 * c-format.c (C_STD_VER): Handle C2x.
625 (C_STD_NAME): Likewise.
626 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
627 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
628 modifier allowed and 'p' flag.
629 * c-format.h (enum format_std_version): Add STD_C2X.
630 (struct format_char_info): Mention 'p' in comment on flags2.
632 2019-10-01 David Malcolm <dmalcolm@redhat.com>
634 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
635 calling diagnostic_show_locus, rather than destroying it afterwards.
637 2019-10-01 Jakub Jelinek <jakub@redhat.com>
640 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
641 with NULL DECL_FIELD_OFFSET.
643 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
645 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
646 has a type name, use it in preference to the __vector syntax.
648 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
650 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
651 two spaces between a comma and "...".
653 2019-09-27 Jakub Jelinek <jakub@redhat.com>
656 * c-common.h (c_omp_predefined_variable): Declare.
657 * c-omp.c (c_omp_predefined_variable): New function.
658 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
659 for predefined variables.
661 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
663 * c-common.h (build_function_call_vec): Take the original
664 function decl as an optional final parameter.
665 (check_builtin_function_arguments): Take the original function decl.
666 * c-common.c (check_builtin_function_arguments): Likewise.
667 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
668 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
670 2019-09-15 Jason Merrill <jason@redhat.com>
672 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
673 fold_for_warn in "|| mask" warning.
675 2019-09-10 Martin Liska <mliska@suse.cz>
677 * c.opt: Use newly added WarnRemoved.
679 2019-09-09 Martin Liska <mliska@suse.cz>
681 * c.opt: Update comment of removed
682 options that are preserved only for backward
685 2019-09-06 Martin Liska <mliska@suse.cz>
688 * c-common.c: Remove definition of flag_use_repository.
689 * c-common.h: Likewise.
690 * c-opts.c (c_common_handle_option):
691 Do not handle OPT_frepo option.
692 * c.opt: Mark the option with Deprecated.
694 2019-09-04 Marek Polacek <polacek@redhat.com>
696 * c.opt (fdeduce-init-list): Ignored.
698 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
701 * c.opt (Wenum-conversion): New option.
703 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
705 * c-attribs.c (handle_section_attribute): Call the
706 handle_generic_attribute target hook after performing target
707 independent processing.
708 (handle_noinit_attribute): Likewise.
710 2019-09-03 Ian Lance Taylor <iant@golang.org>
712 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
713 when using -fgo-dump-spec.
715 2019-09-02 Martin Liska <mliska@suse.cz>
718 * c-common.c (fname_as_string): Use cxx_printable_name for
719 __PRETTY_FUNCTION__ same as was used before r265711.
721 2019-08-28 Marek Polacek <polacek@redhat.com>
723 Implement P1152R4: Deprecating some uses of volatile.
725 * c-opts.c (c_common_post_options): Enable -Wvolatile by
726 default for C++2a, unless -Wno-deprecated.
727 * c.opt (Wvolatile): New warning.
729 2019-08-28 Marek Polacek <polacek@redhat.com>
731 PR c++/91360 - Implement C++20 P1143R2: constinit.
732 * c-common.c (c_common_reswords): Add constinit and __constinit.
733 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
734 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
737 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
738 * c-format.c (cxx_keywords): Add "constinit".
739 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
741 2019-08-27 Jakub Jelinek <jakub@redhat.com>
744 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
745 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
746 like COMPOUND_EXPR rather than normal expression.
748 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
751 * c-lex.c (c_lex_with_flags): Don't call
752 c_common_no_more_pch () from here.
754 2019-08-23 Jakub Jelinek <jakub@redhat.com>
757 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
758 instead of flag_excess_precision_cmdline.
759 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
760 * c-opts.c (c_common_post_options): Likewise.
762 2019-08-22 Martin Sebor <msebor@redhat.com>
765 * c-common.c (braced_list_to_string): Add argument and overload.
766 Handle flexible length arrays and unions.
768 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
770 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
771 function declarations where arguments are missing. Rename variables.
773 2019-08-15 Richard Biener <rguenther@suse.de>
775 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
776 enabled, define __SIZETYPE__.
778 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
780 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
781 exclusion with "section" attribute.
782 (attr_noinit_exclusions): New table.
783 (handle_noinit_attribute): New function.
785 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
788 * c-common.c (resolve_overloaded_builtin): Use
789 copy_decl_built_in_function.
791 2019-08-13 Martin Sebor <msebor@redhat.com>
794 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
795 (asm_fprintf_length_spec): Same.
796 * c-format.h (format_lengths): Add FMT_LEN_w.
798 2019-08-10 Jakub Jelinek <jakub@redhat.com>
800 * c-pragma.h (enum pragma_omp_clause): Add
801 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
803 2019-08-07 Jakub Jelinek <jakub@redhat.com>
805 * c-pragma.h (enum pragma_omp_clause): Add
806 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
807 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
810 2019-08-05 Marek Polacek <polacek@redhat.com>
812 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
813 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
814 default for C++2a, unless -Wno-deprecated.
815 * c.opt (Wcomma-subscript): New warning.
817 2019-07-20 Jakub Jelinek <jakub@redhat.com>
819 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
820 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
821 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
822 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
823 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
824 constructs with the loop construct.
826 2019-07-13 Jakub Jelinek <jakub@redhat.com>
829 * c-omp.c (c_omp_split_clauses): Fix a pasto in
830 OMP_CLAUSE_REDUCTION_TASK handling.
832 2019-07-12 Jakub Jelinek <jakub@redhat.com>
834 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
835 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
837 2019-07-09 Martin Sebor <msebor@redhat.com>
840 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
842 * c-pretty-print.h: Same.
844 2019-07-09 Martin Sebor <msebor@redhat.com>
847 * c-format.c (check_argument_type): Change class-key from class to
848 struct and vice versa to match convention and avoid -Wclass-is-pod
850 * c-pretty-print.h: Same.
852 2019-07-03 Martin Liska <mliska@suse.cz>
854 * c-common.c (try_to_locate_new_include_insertion_point): Remove
857 2019-07-03 Jakub Jelinek <jakub@redhat.com>
859 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
860 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
863 2019-07-02 qing zhao <qing.zhao@oracle.com>
865 PR preprocessor/90581
866 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
867 * c.opt: Add new option -fmax-include-depth.
869 2019-06-26 Jason Merrill <jason@redhat.com>
871 PR c++/55442 - memory-hog with highly recursive constexpr.
872 * c.opt (fconstexpr-loop-limit): New.
874 2019-06-25 Jakub Jelinek <jakub@redhat.com>
877 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
878 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
880 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
882 * c-common.c (c_common_nodes_and_builtins): Define
883 alternate "__intN__" name for "__intN" types.
885 2019-06-24 Jan Hubicka <jh@suse.cz>
887 * c-common.c (braced_lists_to_strings): Check that
888 type is array or integer prior checking string flag.
890 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
892 PR c++/90875 - added -Wswitch-outside-range option
893 * c.opt (Wswitch-outside-range): Added new option.
894 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
896 2019-06-21 Marek Polacek <polacek@redhat.com>
898 PR c++/90953 - ICE with -Wmissing-format-attribute.
899 * c-common.c (check_function_arguments_recurse): Use
901 (check_missing_format_attribute): Likewise.
903 2019-06-19 Marek Polacek <polacek@redhat.com>
905 PR c++/60364 - noreturn after first decl not diagnosed.
906 * c-attribs.c (handle_noreturn_attribute): No longer static.
907 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
909 * c-format.c (check_function_format): Use get_attribute_name.
911 2019-06-19 Martin Sebor <msebor@redhat.com>
914 * c-format.c (function_format_info::format_type): Adjust type.
915 (function_format_info::is_raw): New member.
916 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
917 (decode_format_attr): Adjust call to decode_format_type.
918 Avoid a redundant call to convert_format_name_to_system_name.
919 Avoid abbreviating the word "arguments" in a diagnostic.
920 (format_warning_substr): New function.
921 (avoid_dollar_number): Quote dollar sign in a diagnostic.
922 (finish_dollar_format_checking): Same.
923 (check_format_info): Same.
924 (struct baltoks_t): New.
925 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
926 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
928 (check_format_info_main): Call check_plain. Use baltoks_t. Call
929 maybe_diag_unbalanced_tokens.
930 (handle_format_attribute): Spell out the word "arguments" in
933 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
935 PR c++/90449 - add -Winaccessible-base option.
936 * c.opt (Winaccessible-base): New option.
938 2019-06-10 Jakub Jelinek <jakub@redhat.com>
940 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
941 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
942 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
943 combined/composite constructs where it is not allowed. Copy over
944 OMP_CLAUSE_REDUCTION_INSCAN.
946 2019-06-05 Martin Sebor <msebor@redhat.com>
948 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
949 (handle_alias_ifunc_attribute): Same.
950 (handle_copy_attribute): Same.
951 (handle_weakref_attribute): Same.
952 (handle_nonnull_attribute): Same.
953 * c-warn.c (warn_for_sign_compare): Same.
954 (warn_for_restrict): Same.
957 2019-06-05 Martin Sebor <msebor@redhat.com>
959 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
960 * c.opt (-Wformat-diag): Remove a spurious period.
962 2019-05-29 Jakub Jelinek <jakub@redhat.com>
965 * c-common.c (check_builtin_function_arguments)
966 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
969 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
971 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
973 2019-05-22 Martin Liska <mliska@suse.cz>
976 * c-attribs.c (handle_copy_attribute): Do not copy
977 target_clones attribute.
979 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
981 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
982 * c-ada-spec.c (print_assignment_operator): New function.
983 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
984 assignment operators declared as methods and filter out the others.
986 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
989 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
990 "omp declare target".
992 2019-05-16 Martin Sebor <msebor@redhat.com>
994 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
995 keywords, operators, and types in diagnostics.
996 (handle_scalar_storage_order_attribute): Same.
997 (handle_mode_attribute): Same.
998 (handle_visibility_attribute): Same.
999 (handle_assume_aligned_attribute): Same.
1000 (handle_no_split_stack_attribute): Same.
1001 * c-common.c (shorten_compare): Same.
1002 (c_common_truthvalue_conversion): Same.
1003 (cb_get_source_date_epoch): Same.
1004 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
1006 (interpret_float): Same.
1007 * c-omp.c (c_finish_omp_for): Same.
1008 * c-opts.c (c_common_post_options): Same.
1009 * c-pch.c (c_common_pch_pragma): Same.
1010 * c-pragma.c (pop_alignment): Same.
1011 (handle_pragma_pack): Same.
1012 (apply_pragma_weak): Same.
1013 (handle_pragma_weak): Same.
1014 (handle_pragma_scalar_storage_order): Same.
1015 (handle_pragma_redefine_extname): Same.
1016 (add_to_renaming_pragma_list): Same.
1017 (maybe_apply_renaming_pragma): Same.
1018 (push_visibility): Same.
1019 (handle_pragma_visibility): Same.
1020 (handle_pragma_optimize): Same.
1021 (handle_pragma_message): Same.
1022 * c-warn.c (warn_for_omitted_condop): Same.
1023 (lvalue_error): Same.
1025 2019-05-15 Richard Biener <rguenther@suse.de>
1028 * c-common.c (c_common_mark_addressable_vec): Also mark
1029 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
1032 2019-05-06 Nathan Sidwell <nathan@acm.org>
1034 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
1036 2019-04-30 Nathan Sidwell <nathan@acm.org>
1038 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
1040 2019-04-30 Martin Liska <mliska@suse.cz>
1042 * c-pragma.c (handle_pragma_diagnostic): Provide hints
1043 for unknown options.
1045 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
1047 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
1048 the pointer target rather than the pointer itself.
1050 2019-04-19 Jakub Jelinek <jakub@redhat.com>
1053 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
1055 (c_do_switch_warnings): Remove outside_range_p argument.
1056 * c-common.c (check_case_bounds): Removed.
1057 (c_add_case_label): Remove orig_type and outside_range_p arguments.
1058 Don't call check_case_bounds. Fold low_value as well as high_value.
1059 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
1060 Check for case labels outside of range of original type here and
1063 2019-04-12 Jakub Jelinek <jakub@redhat.com>
1065 PR translation/90041
1066 * c.opt (-fhandle-exceptions): Use %< and %> around option names
1067 in the Warn diagnostics.
1070 * c-attribs.c (handle_patchable_function_entry_attribute): Add
1071 function comment. Warn if arguments of the attribute are not positive
1074 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
1076 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
1077 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
1079 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
1081 * c-ada-spec.c (is_float128): New predicate extracted from...
1082 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
1083 <REAL_TYPE>: ...here. Call it.
1085 2019-04-05 David Malcolm <dmalcolm@redhat.com>
1088 * c-warn.c (check_address_or_pointer_of_packed_member): Add
1089 auto_diagnostic_group. Guard inform calls by result of
1092 2019-04-05 Marek Polacek <polacek@redhat.com>
1094 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
1095 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
1098 2019-04-03 Jason Merrill <jason@redhat.com>
1100 PR c++/86586 - -fcompare-debug=-Wsign-compare.
1101 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
1103 2019-04-01 Martin Sebor <msebor@redhat.com>
1106 * c-attribs.c (handle_copy_attribute): Handle references and
1107 non-constant expressions.
1109 2019-03-22 Jakub Jelinek <jakub@redhat.com>
1112 * c.opt (-fconstexpr-ops-limit=): New option.
1114 2019-03-21 Jakub Jelinek <jakub@redhat.com>
1116 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
1119 2019-03-19 Martin Sebor <msebor@redhat.com>
1121 PR tree-optimization/89688
1122 * c-common.c (braced_list_to_string): Make static.
1123 (braced_lists_to_strings): Define new function.
1124 * c-common.h (braced_list_to_string): Remove.
1125 (braced_lists_to_strings): Declare.
1127 2019-03-12 Martin Liska <mliska@suse.cz>
1129 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1131 2019-03-11 Martin Liska <mliska@suse.cz>
1133 * c-opts.c (c_common_post_options): Wrap apostrophes
1134 in gcc internal format with %'.
1136 2019-03-11 Martin Liska <mliska@suse.cz>
1138 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1139 in a string format message and fix GNU coding style.
1140 * c-common.c (vector_types_convertible_p): Likewise.
1141 (c_build_vec_perm_expr): Likewise.
1142 * c-indentation.c (get_visual_column): Likewise.
1143 * c-opts.c (c_common_handle_option): Likewise.
1144 (c_common_post_options): Likewise.
1145 (sanitize_cpp_opts): Likewise.
1146 * c-pch.c (c_common_pch_pragma): Likewise.
1147 * c-pragma.c (handle_pragma_pack): Likewise.
1149 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1151 PR tree-optimization/89550
1152 * c-common.c (c_common_truthvalue_conversion): Only set
1153 TREE_NO_WARNING if warning_at returned true.
1154 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1156 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1157 Martin Sebor <msebor@gmail.com>
1159 * c.opt (Wmissing-attributes): Clean up doc string.
1161 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1164 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1165 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1168 2019-02-22 Richard Biener <rguenther@suse.de>
1170 * c-pch.c (no_checksum): Remove.
1171 (pch_init): Remove assertion that executable_checksum is not
1173 (c_common_valid_pch): Likewise.
1175 2019-02-18 Martin Sebor <msebor@redhat.com>
1178 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1180 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1183 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1184 implementing -Wtype-limits.
1186 2019-02-11 Martin Sebor <msebor@redhat.com>
1189 * c-common.c (invalid_array_size_error): New function.
1190 (valid_array_size_p): Call it. Handle size as well as type.
1191 * c-common.h (valid_constant_size_p): New function.
1192 (enum cst_size_error): New type.
1194 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1197 * known-headers.cc (get_stdlib_header_for_name): Add
1198 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1200 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1203 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1204 a C cast in pp_c_flag_gnu_v3 mode.
1206 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1209 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1210 builtin_structptr_types types even for C.
1212 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1214 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1215 when rhs is of array type correctly. Fix handling of nested structures.
1216 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1217 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1218 type casts within nested compound expressions.
1220 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1223 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1224 variable after using BIT_FIELD_REF.
1226 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1230 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1231 Remove the boolean argument.
1232 * c-warn.c (check_address_of_packed_member): Renamed to ...
1233 (check_address_or_pointer_of_packed_member): This. Also
1234 warn pointer conversion.
1235 (check_and_warn_address_of_packed_member): Renamed to ...
1236 (check_and_warn_address_or_pointer_of_packed_member): This.
1237 Also warn pointer conversion.
1238 (warn_for_address_or_pointer_of_packed_member): Remove the
1239 boolean argument. Don't check pointer conversion here.
1241 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1244 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1246 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1248 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1249 and __cpp_nontype_template_parameter_auto. Add a comment that
1250 __cpp_template_auto is deprecated.
1252 2019-01-14 Tom Honermann <tom@honermann.net>
1254 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1255 * c-common.c (c_common_reswords): Add char8_t.
1256 (fix_string_type): Use char8_t for the type of u8 string literals.
1257 (c_common_get_alias_set): char8_t doesn't alias.
1258 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1260 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1261 (keyword_begins_type_specifier): Add RID_CHAR8.
1262 * c-common.h (rid): Add RID_CHAR8.
1263 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1264 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1265 Define char8_type_node and char8_array_type_node.
1266 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1267 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1268 (c_cpp_builtins): Predefine __cpp_char8_t.
1269 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1271 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1272 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1274 * c.opt: Add the -fchar8_t command line option.
1276 2019-01-14 Martin Sebor <msebor@redhat.com>
1279 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1280 and issue errors if it fails.
1281 * c-common.h (valid_format_string_type_p): Declare.
1282 * c-format.c (valid_stringptr_type_p): Rename...
1283 (valid_format_string_type_p): ...to this and make extern.
1284 (handle_format_arg_attribute): Adjust to new name.
1285 (check_format_string): Same.
1287 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1289 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1290 Replace "may may" with "may" in warning message.
1292 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1295 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1296 (c_build_vec_convert): Declare.
1297 * c-common.c (c_build_vec_convert): New function.
1299 2019-01-04 Martin Sebor <msebor@redhat.com>
1302 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1303 Handle C++ empty throw specification and C11 _Noreturn.
1304 (has_attribute): Also handle C11 _Noreturn.
1306 2019-01-04 Martin Sebor <msebor@redhat.com>
1309 * c-attribs.c (positional_argument): Also accept enumerated types.
1311 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1313 Update copyright years.
1315 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1318 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1319 * c-warn.c (check_alignment_of_packed_member): New function.
1320 (check_address_of_packed_member): Likewise.
1321 (check_and_warn_address_of_packed_member): Likewise.
1322 (warn_for_address_or_pointer_of_packed_member): Likewise.
1323 * c.opt: Add -Wno-address-of-packed-member.
1325 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1328 * c-warn.c (get_outermost_macro_expansion): New function.
1329 (spelled_the_same_p): Use it to unwind the macro expansions, and
1330 compare the outermost macro in each nested expansion, rather than
1333 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1336 * c-common.h (warn_tautological_cmp): Convert 1st param from
1337 location_t to const op_location_t &.
1338 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1339 when testing for INTEGER_CST.
1340 (warn_tautological_bitwise_comparison): Convert 1st param from
1341 location_t to const op_location_t &; use it to build a
1342 binary_op_rich_location, and use this.
1343 (spelled_the_same_p): New function.
1344 (warn_tautological_cmp): Convert 1st param from location_t to
1345 const op_location_t &. Warn for macro expansions if
1346 spelled_the_same_p. Use binary_op_rich_location.
1348 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1352 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1353 (verify_tree): Handle location wrappers.
1354 (c_common_truthvalue_conversion): Strip any location wrapper.
1356 (fold_offsetof): Strip any location wrapper.
1357 (complete_array_type): Likewise for initial_value.
1358 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1359 index before checking for INTEGER_CST.
1360 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1361 print parentheses around location wrappers.
1362 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1363 before checking for INTEGER_CST.
1364 (warn_tautological_bitwise_comparison): Call
1365 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1366 before checking for INTEGER_CST.
1367 (readonly_error): Strip any location wrapper.
1368 (warn_array_subscript_with_type_char): Strip location wrappers
1369 before checking for INTEGER_CST. Use the location of the index if
1372 2018-12-06 Jason Merrill <jason@redhat.com>
1374 PR c++/88136 - -Wdeprecated-copy false positives
1375 * c.opt (Wdeprecated-copy-dtor): New.
1376 (Wdeprecated-copy): Move to -Wextra.
1378 2018-11-29 Martin Sebor <msebor@redhat.com>
1382 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1383 alignments to values less than the target requires.
1384 (has_attribute): For attribute aligned consider both the attribute
1385 and the alignment bits.
1386 * c-common.c (c_init_attributes): Optionally issue a warning for
1389 2018-11-28 Martin Sebor <msebor@redhat.com>
1393 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1394 or destination is an error.
1396 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1399 * c-ubsan.c: Include langhooks.h.
1400 (ubsan_instrument_division): Change gcc_assert that main variants
1401 of op0 and op1 types are equal to gcc_checking_assert that the
1402 main variants are compatible types.
1404 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1406 * c-ada-spec.c: Include stringpool.h.
1407 (has_static_fields): Return false for incomplete types.
1408 (is_tagged_type): Likewise.
1409 (has_nontrivial_methods): Likewise.
1410 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1411 (struct overloaded_name_hash): New structure.
1412 (struct overloaded_name_hasher): Likewise.
1413 (overloaded_names): New global variable.
1414 (init_overloaded_names): New static function.
1415 (overloaded_name_p): New predicate.
1416 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1417 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1418 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1419 Remove always-true condition and dump forward types.
1420 (dump_ada_specs): Delete overloaded_names.
1422 2018-11-20 Martin Sebor <msebor@redhat.com>
1424 * c-attribs.c (type_for_vector_size): New function.
1425 (type_valid_for_vector_size): Same.
1426 (handle_vector_size_attribute): Move code to the functions above
1428 (validate_attribute, has_attribute): New functions.
1429 * c-common.h (has_attribute): Declare.
1430 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1431 * c-common.c (c_common_resword): Same.
1433 2018-11-16 Jason Merrill <jason@redhat.com>
1435 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1436 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1438 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1441 * c-common.c (fix_string_type): Reject string literals larger than
1442 TYPE_MAX_VALUE (ssizetype) bytes.
1444 2018-11-15 Martin Sebor <msebor@redhat.com>
1448 * c-attribs.c (positional_argument): New function.
1449 (handle_alloc_size_attribute): Use it and simplify.
1450 (handle_alloc_align_attribute): Same.
1451 (handle_assume_aligned_attribute): Same.
1452 (handle_nonnull_attribute): Same.
1453 * c-common.c (check_function_arguments): Pass fntype to
1454 check_function_format.
1455 * c-common.h (check_function_format): Add an argument.
1456 (PosArgFlags, positional_argument): Declare new type and function.
1457 * c-format.c (decode_format_attr): Add arguments.
1458 (check_format_string, get_constant): Same.
1459 (convert_format_name_to_system_name): Adjust.
1461 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1464 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1466 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1468 P1236R1 - Signed integers are two's complement
1469 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1470 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1471 with in-range second operand well defined for -std=c++2a.
1474 * c-common.c (parse_optimize_options): Allocate option string from
1475 opts_obstack rather than as GC memory. Move the allocation after
1476 warning for invalid option.
1478 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1480 * c-common.c (c_get_substring_location): Update for renaming of
1481 get_source_location_for_substring to get_location_within_string.
1482 * c-lex.c: Replace "source_location" with "location_t".
1483 * c-opts.c: Likewise.
1484 * c-ppoutput.c: Likewise.
1486 2018-11-13 Martin Sebor <msebor@redhat.com>
1489 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1490 (handle_tls_model_attribute): Improve diagnostics.
1492 2018-11-12 Jason Merrill <jason@redhat.com>
1494 * c-cppbuiltin.c (c_cpp_builtins): Define
1495 __cpp_impl_destroying_delete.
1497 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1498 __cpp_conditional_explicit.
1500 2018-11-09 Martin Sebor <msebor@redhat.com>
1503 * c-attribs.c (handle_copy_attribute): New function.
1505 2018-11-09 Martin Sebor <msebor@redhat.com>
1508 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1510 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1512 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1513 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1514 enum omp_memory_order MEMORY_ORDER.
1515 (c_finish_omp_flush): Add MO argument.
1516 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1517 (c_finish_omp_for): Add FINAL_P argument.
1518 * c-omp.c: Include memmodel.h.
1519 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1520 OMP_TASKGROUP_CLAUSES to it.
1521 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1522 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1523 instead of OMP_ATOMIC_SEQ_CST.
1524 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1525 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1526 __atomic_thread_fence call with the given value.
1527 (check_omp_for_incr_expr): Formatting fixes.
1528 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1529 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1530 is not constant expression 1 or -1. Transform NE_EXPR loops
1531 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1532 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1534 (c_omp_split_clauses): Add support for combined
1535 #pragma omp parallel master and
1536 #pragma omp {,parallel }master taskloop{, simd} constructs.
1537 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1538 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1539 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1540 (c_omp_predetermined_sharing): Don't return
1541 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1542 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1543 PRAGMA_OMP_REQUIRES.
1544 * c-pragma.h (enum pragma_kind): Likewise.
1545 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1546 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1548 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1550 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1552 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1554 * c-format.c (local_cgraph_node_ptr_node): New variable.
1555 (gcc_dump_printf_char_table): Add entry for %C.
1556 (get_pointer_to_named_type): New function, taken from the handling
1557 code for "gimple *" from...
1558 (init_dynamic_diag_info): ...here. Add handling for
1560 * c-format.h (T_CGRAPH_NODE): New.
1562 2018-10-19 Jason Merrill <jason@redhat.com>
1564 * c-cppbuiltin.c (c_cpp_builtins): Add
1565 __cpp_nontype_template_parameter_class.
1567 2018-10-31 Nathan Sidwell <nathan@acm.org>
1569 * c-opts.c (c_finish_options): Force command line macro
1570 location. Refactor to avoid repeating main debug hook.
1571 (push_command_line_include): Clarify comment.
1573 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1575 2018-10-30 Martin Sebor <msebor@redhat.com>
1578 * c-format.c (check_format_types): Avoid diagnosing null pointer
1579 arguments to printf-family of functions.
1581 2018-10-30 Marek Polacek <polacek@redhat.com>
1583 Implement P0892R2, explicit(bool).
1584 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1586 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1588 * name-hint.h (name_hint::take_deferred): New member function.
1590 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1593 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1595 (check_function_restrict): Rename param "argarray" to
1596 "unfolded_argarray", and make a copy named "argarray", calling
1597 fold_for_warn on each argument.
1598 (check_function_arguments): Add note about responsibility for
1599 folding the arguments.
1601 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1603 * c-common.c (flag_isoc2x): New variable.
1604 * c-common.h (clk_c): Update comment to reference C2X.
1605 (flag_isoc99, flag_isoc11): Update comments to reference future
1606 standard versions in general.
1607 (flag_isoc2x): Declare.
1608 * c-opts.c (set_std_c2x): New function.
1609 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1610 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1612 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1614 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1616 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1617 (std=iso9899:2018): Document C17 as published in 2018.
1619 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1622 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1624 2018-10-11 Will Wray <wjwray@gmail.com>
1627 * c-pretty-print.h (pp_c_type_cast): Prototype.
1628 (pp_c_integer_constant): Likewise.
1629 * c-pretty-print.c (pp_c_type_cast): No longer static.
1630 (pp_c_integer_constant): Likewise.
1631 (pp_c_enumeration_constant): Fix loop termination when finding
1632 name of constant. No longer returns a value. Call
1633 pp_c_integer_constant.
1634 (c_pretty_printer::constant): Update for changes to
1635 pp_c_enumeration_constant.
1637 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1639 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1640 for no_unique_address.
1642 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1644 * c-common.c (c_option_controlling_cpp_error): Rename to...
1645 (c_option_controlling_cpp_diagnostic): ...this, and convert
1646 "reason" from int to enum.
1647 (c_cpp_error): Rename to...
1648 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1649 * c-common.h (c_cpp_error): Rename to...
1650 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1651 * c-opts.c (c_common_init_options): Update for renaming.
1653 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1656 * c-common.c (vector_types_compatible_elements_p): Use
1657 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1659 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1661 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1662 to generate constructor destructor priority warning.
1663 * c.opt (-Wprio-ctor-dtor): New option.
1665 2018-10-01 Jason Merrill <jason@redhat.com>
1667 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1669 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1671 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1672 (dump_ada_node): Add const keyword.
1674 2018-09-25 Martin Liska <mliska@suse.cz>
1676 * c-common.c (c_common_truthvalue_conversion):
1677 Remove Pascal from documentation.
1679 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1681 * c-ada-spec.c: Include diagnostic.h.
1682 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1684 2018-09-19 Marek Polacek <polacek@redhat.com>
1686 * c.opt (Wclass-conversion): New.
1688 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1690 * c-format.c (range_label_for_format_type_mismatch::get_text):
1691 Update for new param.
1693 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1695 * c-format.c (format_warning_at_char): Update for introduction of
1696 format_string_diagnostic_t.
1697 (format_type_warning): Likewise.
1699 2018-09-17 Martin Jambor <mjambor@suse.cz>
1702 * c.opt (Wabsolute-value): New.
1704 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1706 * c-common.c (complete_flexible_array_elts): New helper function.
1707 * c-common.h (complete_flexible_array_elts): Declare.
1709 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1711 * c-common.c (braced_list_to_string): Remove eval parameter.
1712 Add some more checks. Always create zero-terminated STRING_CST.
1713 * c-common.h (braced_list_to_string): Adjust prototype.
1715 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1718 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1720 (maybe_suggest_missing_token_insertion): Likewise.
1721 (maybe_add_include_fixit): Add param "override_location". If set,
1722 and source-printing is enabled, then override the rich_location's
1723 primary location with that of the insertion point for the fix-it
1724 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1725 * c-common.h (extern void maybe_add_include_fixit): Add bool
1727 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1728 for conversion of show_caret_p to a tri-state.
1729 * c-warn.c (warn_for_restrict): Likewise.
1731 (suggest_missing_header::~suggest_missing_header): Update call to
1732 maybe_add_include_fixit to suggest overriding the location, as it
1735 2018-08-27 Martin Liska <mliska@suse.cz>
1737 * c-common.c (check_function_restrict): Use new function
1738 fndecl_built_in_p and remove check for FUNCTION_DECL if
1740 (check_builtin_function_arguments): Likewise.
1741 (reject_gcc_builtin): Likewise.
1742 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1744 2018-08-26 Marek Polacek <polacek@redhat.com>
1746 PR c++/87029, Implement -Wredundant-move.
1747 * c.opt (Wredundant-move): New option.
1749 2018-08-21 Marek Polacek <polacek@redhat.com>
1751 PR c++/86981, Implement -Wpessimizing-move.
1752 * c.opt (Wpessimizing-move): New option.
1754 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1757 * c-attribs.c (common_handle_aligned_attribute): Add
1758 auto_diagnostic_group instance.
1759 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1760 * c-opts.c (c_common_post_options): Likewise.
1761 * c-warn.c (warn_logical_not_parentheses): Likewise.
1762 (warn_duplicated_cond_add_or_warn): Likewise.
1763 (warn_for_multistatement_macros): Likewise.
1765 2018-08-20 Nathan Sidwell <nathan@acm.org>
1767 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1770 2018-08-17 Nathan Sidwell <nathan@acm.org>
1772 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1774 (laxy_hex_fp_value_count): Make unsigned.
1775 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1776 manipulate the macro.
1777 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1780 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1782 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1783 (gcc_dump_printf_length_specs): New.
1784 (gcc_dump_printf_flag_pairs): New.
1785 (gcc_dump_printf_flag_specs): New.
1786 (gcc_dump_printf_char_table): New.
1787 (format_types_orig): Add entry for "gcc_dump_printf".
1788 (init_dynamic_diag_info): Set up length_char_specs and
1789 conversion_specs for gcc_dump_printf_format_type.
1790 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1792 2018-08-17 Nathan Sidwell <nathan@acm.org>
1794 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1796 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1797 * c-cppbuiltin.c: Likewise.
1799 2018-08-17 Martin Liska <mliska@suse.cz>
1801 * c.opt: Remove Warn, Init and Report for options with
1802 Ignore/Deprecated flag. Warning is done automatically for
1805 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1808 * c-common.c (selftest::c_family_tests): Call
1809 selftest::c_indentation_c_tests.
1810 * c-common.h (selftest::c_indentation_c_tests): New decl.
1811 * c-indentation.c: Include "selftest.h".
1812 (next_tab_stop): Add "tab_width" param, rather than accessing
1814 (get_visual_column): Likewise. Clarify comment. Bulletproof
1815 against reading past the end of the line.
1816 (get_first_nws_vis_column): Add "tab_width" param.
1817 (detect_intervening_unindent): Likewise.
1818 (should_warn_for_misleading_indentation): Read tab width from
1819 cpp_opts and pass around.
1820 (selftest::test_next_tab_stop): New test.
1821 (selftest::assert_get_visual_column_succeeds): New function.
1822 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1823 (selftest::assert_get_visual_column_fails): New function.
1824 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1825 (selftest::test_get_visual_column): New test.
1826 (selftest::c_indentation_c_tests): New function.
1828 2018-08-16 Nathan Sidwell <nathan@acm.org>
1830 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1831 (store_ada_macro): Likewise.
1832 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1833 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1835 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1837 * c-format.c: Include "selftest-diagnostic.h" and
1838 "gcc-rich-location.h".
1839 (format_warning_at_char): Pass NULL for new label params of
1841 (class indirection_suffix): New class.
1842 (class range_label_for_format_type_mismatch): New class.
1843 (format_type_warning): Move logic for generating "*" suffix to
1844 class indirection_suffix. Create "fmt_label" and "param_label"
1845 to show their types, and pass them to the
1846 format_warning_at_substring calls.
1847 (selftest::test_type_mismatch_range_labels): New test.
1848 (selftest::c_format_c_tests): Call it.
1850 2018-08-13 Martin Sebor <msebor@redhat.com>
1852 PR tree-optimization/71625
1853 * c-common.c (braced_list_to_string): New function.
1854 * c-common.h (braced_list_to_string): Declare it.
1856 2018-08-08 Nathan Sidwell <nathan@acm.org>
1858 * c-common.c (try_to_locate_new_include_inertion_point): Use
1859 linemap_included_from_linemap.
1860 * c-lex.c (fe_file_change): Use linemap_included_from.
1861 * c-ppoutput.c (pp_file_change): Likewise.
1863 2018-08-01 Martin Sebor <msebor@redhat.com>
1865 PR tree-optimization/86650
1866 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1867 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1868 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1869 * c-format.h (T89_G): Update to be "gimple *" rather than
1871 (local_gcall_ptr_node): Rename...
1872 (local_gimple_ptr_node): ...to this.
1874 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1876 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1877 table entries for gcc_diag_char_table, and the 'Z' entry from
1878 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1879 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1880 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1881 adding missing "Z" for this table. Remove erroneous "G" and "K"
1883 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1884 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1885 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1887 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1889 * c-common.c (speculation_safe_resolve_call): New function.
1890 (speculation_safe_resolve_params): New function.
1891 (speculation_safe_resolve_return): New function.
1892 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1893 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1894 __HAVE_SPECULATION_SAFE_VALUE.
1896 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1898 * c-common.c (c_cpp_error): Remove redundant "line_table"
1899 parameter from call to rich_location::set_range.
1900 (maybe_suggest_missing_token_insertion): Likewise.
1902 2018-07-20 Martin Sebor <msebor@redhat.com>
1905 * c.opt (-Warray-bounds): Remove redundant -Wall.
1907 2018-07-20 Martin Sebor <msebor@redhat.com>
1910 * c-common.h (c_common_handle_option): Change function argument
1912 * c-opts.c (c_common_init_options): Same.
1913 (c_common_handle_option): Same. Remove special handling of
1914 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1915 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1916 options to take a HOST_WIDE_INT argument and accept a byte-size
1918 (-Wvla-larger-than): Same.
1919 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1920 (-Wno-vla-larger-than): Same.
1922 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1924 * c-attribs.c (c_common_attribute_table): Add
1925 "omp declare target implicit" attribute.
1927 2018-07-12 Richard Biener <rguenther@suse.de>
1930 * c-attribs.c (handle_packed_attribute): Do not build a variant
1931 type with TYPE_PACKED, instead ignore the attribute if we may
1932 not apply to the original type.
1934 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1937 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1938 to contain TREE_LIST for both the original class iterator and the
1941 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1943 * c-ada-spec.c (to_ada_name): Remove index parameter.
1944 (pp_ada_tree_identifier): Likewise.
1945 (dump_ada_macros): Adjust call to to_ada_name.
1946 (struct overloaded_name_hash): Delete.
1947 (struct overloaded_name_hasher): Likewise.
1948 (overloaded_names): Likewise.
1949 (compute_overloading_index): Likewise.
1950 (dump_ada_decl_name): Do not call compute_overloading_index and
1951 adjust calls to pp_ada_tree_identifier.
1952 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1953 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1954 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1955 (dump_ada_enum_type): Remove type and display_convention parameters.
1956 Adjust calls to pp_ada_tree_identifier.
1957 (dump_ada_node): Likewise and for dump_ada_structure.
1958 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1960 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1962 (print_constructor): Adjust call to pp_ada_tree_identifier.
1963 (print_destructor): Likewise.
1964 (dump_ada_declaration): Switch to aspect syntax.
1965 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1966 parameter with nested parameter.
1967 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1968 (dump_ada_specs): Do not delete overloaded_names table.
1970 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1973 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
1976 2018-07-05 Nathan Sidwell <nathan@acm.org>
1978 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1979 NO_IMPLICIT_EXTERN_C.
1981 2018-06-28 Martin Liska <mliska@suse.cz>
1983 * cppspec.c: Include opt-suggestions.h.
1985 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1986 Thomas Schwinge <thomas@codesourcery.com>
1987 Cesar Philippidis <cesar@codesourcery.com>
1989 * c-pragma.h (enum pragma_omp_clause): Add
1990 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1991 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1993 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1996 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1999 2018-06-18 Martin Sebor <msebor@redhat.com>
2002 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
2005 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2007 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
2009 2018-06-13 Jason Merrill <jason@redhat.com>
2011 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
2012 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
2015 PR c++/86094 - wrong code with defaulted move ctor.
2016 * c-opts.c (c_common_post_options): Bump the current ABI version to
2017 13. Set warn_abi_version and flag_abi_compat_version to the current
2018 version rather than 0. Fix defaulting flag_abi_compat_version from
2021 2018-06-12 Martin Sebor <msebor@redhat.com>
2024 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
2025 sizeof source and destination yields the same value.
2027 2018-06-12 Martin Liska <mliska@suse.cz>
2029 * c.opt: Make MPX-related options as Deprecated.
2031 2018-06-08 David Malcolm <dmalcolm@redhat.com>
2033 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
2036 2018-06-08 Martin Liska <mliska@suse.cz>
2038 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
2039 for MPX (macros, related functions, fields in cgraph_node, ...).
2040 (handle_bnd_legacy): Likewise.
2041 (handle_bnd_instrument): Likewise.
2044 2018-06-06 Jakub Jelinek <jakub@redhat.com>
2047 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
2048 __cpp_transactional_memory to 201500 instead of 210500.
2050 2018-06-06 Jason Merrill <jason@redhat.com>
2052 PR c++/85710 - ICE with -Wmemset-elt-size.
2053 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
2055 2018-06-01 Jason Merrill <jason@redhat.com>
2057 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
2060 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
2062 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
2063 declaration for a typedef independently of whether the declaration of
2064 the subtype is generated.
2066 2018-05-31 Martin Sebor <msebor@redhat.com>
2069 * c.opt (-Wno-alloc-size-larger-than): New option.
2071 2018-04-22 David Pagan <dave.pagan@oracle.com>
2074 * c-opts.c (c_common_post_options): Set default for warn_return_type
2075 for C++/C++ with ObjC extensions only. For C, makes it possible to
2076 differentiate between default (no option), -Wreturn-type, and
2079 2018-05-29 Jason Merrill <jason@redhat.com>
2081 * c.opt (Winit-list-lifetime): New flag.
2083 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
2085 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
2086 splay_tree_delete_pointers.
2088 2018-05-26 Jakub Jelinek <jakub@redhat.com>
2091 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
2092 noinline variable to workaround broken kernel headers.
2094 2018-05-18 Jason Merrill <jason@redhat.com>
2096 * c.opt (Wdeprecated-copy): New flag.
2098 2018-05-17 Martin Liska <mliska@suse.cz>
2100 * c-warn.c (overflow_warning): Do not use
2101 space in between 'G_' and '('.
2103 2018-05-09 Jason Merrill <jason@redhat.com>
2105 * c-common.c (valid_array_size_p): Add complain parameter.
2106 * c-common.h: ...which defaults to true.
2108 2018-05-11 Jakub Jelinek <jakub@redhat.com>
2111 * c-omp.c (c_omp_predetermined_sharing): Return
2112 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
2114 2018-05-11 Martin Liska <mliska@suse.cz>
2117 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
2120 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2123 * c-common.h (fold_offsetof_1): Removed.
2124 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2125 CTX argument defaulted to ERROR_MARK.
2126 * c-common.c (fold_offsetof_1): Renamed to ...
2127 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2128 argument, convert the pointer constant to TYPE and use size_binop
2129 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2130 a pointer type. Adjust recursive calls.
2132 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2135 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2137 2018-05-07 Nathan Sidwell <nathan@acm.org>
2139 * c.opt (ffor-scope): Remove functionality, issue warning.
2141 2018-05-03 Nathan Sidwell <nathan@acm.org>
2143 * c.opt (ffriend-injection): Remove functionality, issue warning.
2145 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2148 * c-format.c (struct format_check_results): Add field
2150 (check_format_info): Initialize it, and warn if encountered.
2151 (check_format_arg): Distinguish between wide char and
2152 everything else when detecting arrays of non-char.
2154 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2156 * c-format.c (get_corrected_substring): Update for
2157 location_get_source_line returning a char_span. Use a char_span
2158 when handling the prefix of the correction.
2159 * c-indentation.c (get_visual_column): Update for
2160 location_get_source_line returning a char_span.
2161 (get_first_nws_vis_column): Likewise.
2163 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2166 * known-headers.cc (get_stdlib_header_for_name): Add various names
2167 from <assert.h>, <string.h>, and <memory.h>; add more names from
2170 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2173 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2174 get_base_address of the second operand is a VAR_P, rather than the
2175 operand itself, and use gcc_checking_assert instead of gcc_assert.
2177 2018-03-23 Marek Polacek <polacek@redhat.com>
2180 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2181 <case RDIV_EXPR>: Tweak condition.
2183 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2185 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2187 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2190 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2194 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2197 2018-03-16 Richard Biener <rguenther@suse.de>
2200 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2201 unshare the possibly folded expression.
2203 2018-03-15 Richard Biener <rguenther@suse.de>
2206 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2208 2018-03-13 Martin Sebor <msebor@redhat.com>
2210 PR tree-optimization/84725
2211 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2212 with all three narrow character types, including their qualified forms.
2214 2018-03-12 Martin Sebor <msebor@redhat.com>
2216 PR tree-optimization/83456
2217 * c-common.c (check_function_restrict): Return bool.
2218 Restore checking of bounded built-in functions.
2219 (check_function_arguments): Also return the result
2220 of warn_for_restrict.
2221 * c-common.c (check_function_restrict): Return bool.
2222 * c-warn.c (warn_for_restrict): Return bool.
2224 2018-03-02 Marek Polacek <polacek@redhat.com>
2227 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2230 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2232 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2235 2018-03-01 Marek Polacek <polacek@redhat.com>
2238 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2239 alignment in computation.
2241 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2243 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2244 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2246 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2248 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2249 (is_char_array): Take a type instead of a declaration.
2250 (dump_ada_array_type): Likewise.
2251 (is_simple_enum): Minor tweak.
2252 (dump_ada_enum_type): New function extracted from...
2253 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2254 <INTEGER_TYPE>: Remove unreachable code.
2255 <RECORD_TYPE>: Likewise. Minor tweaks.
2256 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2257 <ENUMERAL_TYPE>: New case.
2258 <RECORD_TYPE>: Factor out common code.
2259 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2260 Minor tweaks. Deal with enumeral types.
2261 (dump_ada_structure): Minor tweaks.
2263 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2265 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2266 address for incomplete structures.
2267 (dump_forward_type): Do not bail out for incomplete structures.
2268 (dump_ada_declaration): Do not special-case incomplete structures
2269 for subtypes. Dump them as null records for types.
2271 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2273 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2274 (is_char_array): Fix formatting.
2275 (dump_template_types): Likewise.
2276 (dump_generic_ada_node): Rename into...
2277 (dump_ada_node): ...this.
2278 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2279 incomplete structures and not for empty structures. Do not use it
2280 when forward declarations are needed.
2281 (dump_forward_type): New function.
2282 (dump_nested_types): Remove FORWARD parameter. Do not consider
2283 TREE_VISITED and do not generate a forward declaration. Only dump
2284 original nested types for nested declaration.
2285 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2286 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2287 <RECORD_TYPE>: Do not consider TREE_VISITED.
2288 (dump_ada_declaration): Use booleans and fix formatting throughout.
2289 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2290 Call dump_forward_type instead of dump_nested_types for a typedef.
2291 Remove superfluous check and adjust call to dump_nested_types.
2292 <POINTER_TYPE>: Call dump_forward_type and fall through.
2293 (dump_ada_struct_decl): Rename into...
2294 (dump_ada_structure): ...this. Do not special-case empty structures.
2296 2018-02-27 Martin Sebor <msebor@redhat.com>
2299 * c.opt (-Wmissing-attributes): New option.
2301 2018-02-21 Martin Liska <mliska@suse.cz>
2303 * c.opt (Wcatch-value=): Add IntegerRange.
2305 2018-02-15 Jason Merrill <jason@redhat.com>
2307 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2309 2018-02-09 Nathan Sidwell <nathan@acm.org>
2312 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2314 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2317 2018-02-09 Martin Sebor <msebor@redhat.com>
2320 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2321 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2322 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2323 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2324 (-Wuninitialized): Same.
2326 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2328 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2329 keyword for components.
2331 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2333 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2335 2018-02-02 Julia Koval <julia.koval@intel.com>
2337 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2339 2018-01-29 Marek Polacek <polacek@redhat.com>
2342 * c-format.c (check_function_format): Check current_function_decl.
2344 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2346 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2348 (LAZY_HEX_FP_VALUES_CNT): Define.
2349 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2350 values rather than just 12.
2351 (builtin_define_with_hex_fp_value): Likewise.
2353 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2356 * c.opt (-fmacro-prefix-map): New option.
2357 * c-opts.c (c_common_handle_option): Handle it.
2358 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2359 * c-ppoutput.c (init_pp_output): Likewise.
2361 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2364 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2366 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2368 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2369 Skip 'f' and 'F' characters if it is true.
2370 (store_ada_macro): Minor tweak.
2371 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2372 <CPP_WSTRING>: Likewise.
2373 <CPP_STRING>: Output '&' in the buffer if not the first string.
2374 <CPP_NUMBER>: Adjust calls to dump_number.
2376 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2379 * c-common.c: Include "selftest.h".
2380 (get_atomic_generic_size): Perform the test for integral type
2381 before the range test for any integer constant, fixing indentation
2382 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2383 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2384 (selftest::test_fold_for_warn): New function.
2385 (selftest::c_common_c_tests): New function.
2386 (selftest::c_family_tests): Call it, and
2387 selftest::c_pretty_print_c_tests.
2388 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2389 * c-format.c (check_format_arg): Convert VAR_P check to a
2391 * c-pretty-print.c: Include "selftest.h".
2392 (pp_c_cast_expression): Don't print casts for location wrappers.
2393 (selftest::assert_c_pretty_printer_output): New function.
2394 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2395 (selftest::test_location_wrappers): New function.
2396 (selftest::c_pretty_print_c_tests): New function.
2397 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2400 Alan Hayward <alan.hayward@arm.com>
2401 David Sherwood <david.sherwood@arm.com>
2403 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2405 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2406 Alan Hayward <alan.hayward@arm.com>
2407 David Sherwood <david.sherwood@arm.com>
2409 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2412 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2413 Alan Hayward <alan.hayward@arm.com>
2414 David Sherwood <david.sherwood@arm.com>
2416 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2417 (convert_vector_to_array_for_subscript): Handle polynomial
2418 TYPE_VECTOR_SUBPARTS.
2419 (c_common_type_for_mode): Check valid_vector_subparts_p.
2420 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2423 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2425 Update copyright years.
2427 2017-12-22 Mike Stump <mikestump@comcast.net>
2428 Eric Botcazou <ebotcazou@adacore.com>
2430 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2431 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2433 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2437 * c-semantics.c (only_debug_stmts_after_p): New.
2438 (pop_stmt_list): Clear side effects in debug-only stmt list.
2439 Check for single nondebug stmt followed by debug stmts only.
2441 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2444 * c-semantics.c (pop_stmt_list): Propagate side effects from
2445 single nondebug stmt to container list.
2447 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2449 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2450 conditions with typical order conditions.
2452 2017-12-18 Marek Polacek <polacek@redhat.com>
2454 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2457 2017-12-17 Martin Sebor <msebor@redhat.com>
2459 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2460 an error for attribute warn_if_not_aligned.
2462 2017-12-16 Martin Sebor <msebor@redhat.com>
2464 PR tree-optimization/78918
2465 * c-common.c (check_function_restrict): Avoid checking built-ins.
2466 * c.opt (-Wrestrict): Include in -Wall.
2468 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2470 * c-attribs.c (c_common_attribute_table,
2471 c_common_format_attribute_table): Swap affects_type_identity
2472 and handler fields, adjust comments.
2474 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2476 * c.opt (Wcast-function-type): New warning option.
2477 * c-lex.c (get_fileinfo): Avoid warning.
2478 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2480 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2483 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2484 Adjust the size of buf1 and buf2, add a new buf to avoid
2485 format-overflow warning.
2487 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2489 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2490 subsequent statement list.
2492 2017-12-07 Martin Sebor <msebor@redhat.com>
2496 * c-attribs.c (attr_aligned_exclusions): New array.
2497 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2498 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2499 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2500 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2501 (attr_warn_unused_result_exclusions): Same.
2502 (handle_hot_attribute, handle_cold_attribute): Simplify.
2503 (handle_const_attribute): Warn on function returning void.
2504 (handle_pure_attribute): Same.
2505 (handle_aligned_attribute): Diagnose conflicting attribute
2507 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2509 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2512 * c-common.c (selftest::c_family_tests): Call
2513 selftest::c_spellcheck_cc_tests.
2514 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2515 * c-spellcheck.cc: Include "selftest.h".
2516 (name_reserved_for_implementation_p): New function.
2517 (should_suggest_as_macro_p): New function.
2518 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2519 should_suggest_as_macro_p and call it.
2520 (selftest::test_name_reserved_for_implementation_p): New function.
2521 (selftest::c_spellcheck_cc_tests): New function.
2522 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2524 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2526 * c-spellcheck.cc: New file, taken from macro-handling code in
2528 * c-spellcheck.h: New file, taken from macro-handling code in
2531 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2533 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2535 (handle_simd_attribute): Don't check for "cilk simd function"
2536 attribute. Reindent, formatting changes.
2538 2017-11-30 Julia Koval <julia.koval@intel.com>
2540 * c-common.h (inv_list): Remove.
2542 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2545 * c-common.c (c_switch_covers_all_cases_p_1,
2546 c_switch_covers_all_cases_p): New functions.
2547 * c-common.h (c_switch_covers_all_cases_p): Declare.
2549 2017-11-28 Julia Koval <julia.koval@intel.com>
2550 Sebastian Peryt <sebastian.peryt@intel.com>
2552 * array-notation-common.c: Delete.
2553 * c-cilkplus.c: Ditto.
2554 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2555 * c-common.def (ARRAY_NOTATION_REF): Remove.
2556 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2557 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2558 c_validate_cilk_plus_loop, cilkplus_an_parts,
2559 cilk_ignorable_spawn_rhs_op,
2560 cilk_recognize_spawn): Remove.
2561 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2562 * c-omp.c: Remove CILK_SIMD check.
2563 * c-pragma.c: Ditto.
2564 * c-pragma.h: Remove CILK related pragmas.
2565 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2566 ARRAY_NOTATION_REF condition.
2567 (c_pretty_printer::expression): Ditto.
2568 * c.opt (fcilkplus): Remove.
2571 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2573 * c-pretty-print.c (pp_c_additive_expression,
2574 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2576 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2578 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2581 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2582 instead of tree_to_uhwi, formatting fix.
2584 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2587 * known-headers.cc: New file, based on material from c/c-decl.c.
2588 (suggest_missing_header): Copied as-is.
2589 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2590 heavily edited to add C++ support. Add some knowledge about
2591 <limits.h>, <stdint.h>, and <wchar.h>.
2592 * known-headers.h: Likewise.
2594 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2596 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2597 (lookup_name_fuzzy): Likewise. Convert return type from
2598 const char * to name_hint. Add location_t param.
2599 * name-hint.h: New header.
2601 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2605 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2607 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2609 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2610 expected publication date of C17.
2611 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2613 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2616 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2617 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2619 2017-11-10 Martin Sebor <msebor@redhat.com>
2622 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2623 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2624 * c.opt (-Wstringop-truncation): New option.
2626 2017-11-06 Martin Liska <mliska@suse.cz>
2629 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2631 * c.opt: Set default value of warn_return_type.
2633 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2635 * c-common.c (binary_op_error): Update for renaming of
2637 (c_parse_error): Likewise.
2638 * c-warn.c (warn_logical_not_parentheses): Likewise for
2639 renaming of inform_at_rich_loc.
2640 (warn_for_restrict): Likewise for renaming of
2641 warning_at_rich_loc_n.
2643 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2645 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2646 * c-opts.c (set_std_c17): New function.
2647 (c_common_init_options): Use gnu17 as default C version.
2648 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2650 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2652 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2653 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2654 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2657 2017-10-23 Marek Polacek <polacek@redhat.com>
2660 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2662 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2664 * c-common.c (check_builtin_function_arguments): Also check arguments
2665 of __builtin_alloca_with_align_and_max.
2667 2017-10-17 David Malcolm <dmalcolm@redhat.com>
2669 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2670 rather than NULL to format_warning_va.
2671 (check_format_types): Likewise when calling format_type_warning.
2672 Remove code to extract source_ranges and source_range * in favor
2673 of just a location_t.
2674 (format_type_warning): Convert source_range * param to a
2677 2017-10-13 Jakub Jelinek <jakub@redhat.com>
2679 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2682 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2684 * c-common.c (enum missing_token_insertion_kind): New enum.
2685 (get_missing_token_insertion_kind): New function.
2686 (maybe_suggest_missing_token_insertion): New function.
2687 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2689 2017-10-11 Nathan Sidwell <nathan@acm.org>
2691 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2692 (c_common_handle_option): Update incpath_kind names.
2694 2017-10-11 Martin Liska <mliska@suse.cz>
2697 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2698 Wattributes warning.
2700 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2702 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2703 operating on trees as wide_ints.
2704 * c-common.c (pointer_int_sum): Likewise.
2705 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2706 * c-warn.c (match_case_to_enum_1): Likewise.
2707 (c_do_switch_warnings): Likewise.
2708 (maybe_warn_shift_overflow): Likewise.
2710 2017-10-10 Jakub Jelinek <jakub@redhat.com>
2713 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2714 instead of wide_int::from.
2716 2017-10-06 Jakub Jelinek <jakub@redhat.com>
2719 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2720 using to_widest use wide_int with the larger of the two precisions.
2722 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2724 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2727 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2729 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2730 when combining the original unconverted comparison operands.
2732 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2734 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2737 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2739 * c-ada-spec.c (to_ada_name): Add index parameter.
2740 (pp_ada_tree_identifier): Likewise.
2741 (dump_ada_macros): Adjust call to to_ada_name.
2742 (struct overloaded_name_hash): New type.
2743 (struct overloaded_name_hasher): Likewise.
2744 (overloaded_names): New hash table.
2745 (compute_overloading_index): New function.
2746 (dump_ada_decl_name): Call it and pass the result to
2747 pp_ada_tree_identifier.
2748 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2749 (dump_ada_function_declaration): Likewise.
2750 (dump_generic_ada_node): Likewise.
2751 (print_constructor): Likewise.
2752 (print_destructor): Likewise.
2753 (dump_ada_specs): Delete overloaded_names table.
2755 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2757 * c-ada-spec.c (max_ada_macros): Move around.
2758 (store_ada_macro_index): Likewise.
2759 (source_file): Rename into...
2760 (macro_source_file): ...this.
2761 (count_ada_macro): Move around.
2762 (store_ada_macro): Likewise.
2763 (compare_macro): Likewise.
2764 (print_ada_macros): Merge in...
2765 (dump_ada_macros): ...this.
2766 (source_file_base): Rename into...
2767 (current_source_file): ...this.
2768 (print_comment): Move around.
2769 (dump_ada_nodes): Call dump_ada_declaration directly.
2770 (struct with): Change type of limited field to bool.
2771 (append_withs): Change type of limited_access parameter to bool.
2772 (pp_ada_tree_identifie): Likewise.
2773 (dump_ada_decl_nam): Likewise.
2774 (dump_generic_ada_node): Likewise. Do not print the return type.
2775 (to_ada_name): Change type of space_found parameter to bool.
2776 (dump_ada_function_declaration): Return void and change type of
2777 parameters to bool. Also print the return type for a function.
2778 (print_ada_methods): Rename into...
2779 (dump_ada_methods): ...this.
2780 (print_ada_declaration): Rename into ...
2781 (dump_ada_declaration): ...this. Do not print the return type.
2782 (print_ada_struct_decl): Rename into...
2783 (dump_ada_struct_decl): ...this.
2785 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2787 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2788 rather than DECL_INITIAL.
2789 (common_handle_aligned_attribute): Likewise.
2791 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2793 * c.opt (gen-decls): Add RejectNegative.
2795 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2796 Jakub Jelinek <jakub@redhat.com>
2798 Add support for -std=c++2a.
2799 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2800 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2801 * c-opts.c (set_std_cxx2a): New.
2802 (c_common_handle_option): Set options when -std=c++2a is enabled.
2803 (c_common_post_options): Adjust comments.
2804 (set_std_cxx14, set_std_cxx17): Likewise.
2806 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2808 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2809 message for non-uniform endianness and issue a warning in C++.
2811 2017-09-15 Jakub Jelinek <jakub@redhat.com>
2813 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2814 (Wc++17-compat): Change from undocumented alias to option.
2815 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2816 change C++1z to C++17 in description.
2817 (std=c++1z, std=gnu++1z): Change from option to undocumented
2819 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2821 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2822 * c-opts.c (set_std_cxx1z): Rename to ...
2823 (set_std_cxx17): ... this.
2824 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2825 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
2827 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2830 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2832 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2833 function alignment if warn_if_not_aligned_p is true.
2835 2017-09-12 Nathan Sidwell <nathan@acm.org>
2837 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2838 resort_sorted_fields): Move to c/c-decl.c.
2839 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2840 (struct sorted_fields_type): Move to c/c-lang.h.
2842 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
2845 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2847 2017-09-04 Marek Polacek <polacek@redhat.com>
2850 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2851 (warn_tautological_cmp): Call it.
2853 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2855 * c-opts.c (c_common_finish): Write dependency information even if
2858 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2861 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2862 (omp_pragmas_simd): ... here.
2863 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2864 create new clauses list containing just simd clause.
2866 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2867 Alan Hayward <alan.hayward@arm.com>
2868 David Sherwood <david.sherwood@arm.com>
2870 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2871 into scalar_mode_supported_p call.
2872 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2874 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2875 Alan Hayward <alan.hayward@arm.com>
2876 David Sherwood <david.sherwood@arm.com>
2878 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2879 for the mode iterator.
2881 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2882 Alan Hayward <alan.hayward@arm.com>
2883 David Sherwood <david.sherwood@arm.com>
2885 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2886 * c-common.c (c_build_vec_perm_expr): Likewise.
2888 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2889 Alan Hayward <alan.hayward@arm.com>
2890 David Sherwood <david.sherwood@arm.com>
2892 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2894 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2895 Alan Hayward <alan.hayward@arm.com>
2896 David Sherwood <david.sherwood@arm.com>
2898 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2899 before calling targetm.addr_space.valid_pointer_mode.
2901 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2902 Alan Hayward <alan.hayward@arm.com>
2903 David Sherwood <david.sherwood@arm.com>
2905 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2907 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2908 Alan Hayward <alan.hayward@arm.com>
2909 David Sherwood <david.sherwood@arm.com>
2911 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2913 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2915 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2916 Alan Hayward <alan.hayward@arm.com>
2917 David Sherwood <david.sherwood@arm.com>
2919 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2922 2017-08-29 Martin Liska <mliska@suse.cz>
2925 * c-common.c (parse_optimize_options): Add argument to function
2927 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2929 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2931 * c-lex.c (interpret_float): Use token location
2932 when building an EXCESS_PRECISION_EXPR.
2934 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2936 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2937 it to check_function_format.
2938 * c-common.h (check_function_arguments): Add vec<location_t> *
2940 (check_function_format): Likewise.
2941 * c-format.c (struct format_check_context): Add field "arglocs".
2942 (check_function_format): Add param "arglocs"; pass it to
2944 (check_format_info): Add param "arglocs"; use it to initialize
2945 new field of format_ctx.
2946 (check_format_arg): Pass format_ctx->arglocs to new param of
2947 check_format_info_main.
2948 (class argument_parser): New field "arglocs".
2949 (argument_parser::argument_parser): Add "arglocs_" param and use
2950 it to initialize new field.
2951 (argument_parser::check_argument_type): Pass new arglocs field to
2953 (check_format_info_main): Add param "arglocs", and use it when
2954 constructing arg_parser.
2955 (check_format_types): Add param "arglocs"; use it if non-NULL when
2956 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2958 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2961 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2962 (c_common_attribute_table): Add warn_if_not_aligned.
2963 (handle_aligned_attribute): Renamed to ...
2964 (common_handle_aligned_attribute): Remove argument, name, and add
2965 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2966 (handle_aligned_attribute): New.
2967 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2969 2017-08-14 Martin Sebor <msebor@redhat.com>
2972 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2973 (handle_nonstring_attribute): New function.
2975 2017-08-14 Martin Sebor <msebor@redhat.com>
2978 * c-format.h (T89_G): New macro.
2979 * c-format.c (local_gcall_ptr_node): New variable.
2980 (init_dynamic_diag_info): Initialize it.
2982 2017-08-11 Martin Liska <mliska@suse.cz>
2984 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2985 TARGET_SUPPORTS_ALIASES.
2987 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2989 * c-common.c (c_parse_error): Add rich_location * param, using it
2990 rather implicitly using input_location.
2991 * c-common.h (c_parse_error): Add rich_location * param.
2993 2017-08-09 Marek Polacek <polacek@redhat.com>
2995 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2996 (c_common_truthvalue_conversion): Likewise.
2997 * c-omp.c (c_finish_omp_atomic): Likewise.
2998 * c-common.h (build_binary_op): Update declaration.
3000 2017-08-08 Martin Liska <mliska@suse.cz>
3002 * c-ada-spec.c: Include header files.
3003 * c-ubsan.c: Likewise.
3004 * c-warn.c: Likewise.
3006 2017-08-07 Jakub Jelinek <jakub@redhat.com>
3009 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
3011 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
3013 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
3014 (print_ada_methods): Likewise.
3015 (print_ada_declaration): Likewise.
3017 2017-08-07 Martin Liska <mliska@suse.cz>
3019 * array-notation-common.c: Add new includes.
3020 * c-format.c( handle_format_attribute): Canonicalize a format
3022 * c-lex.c (c_common_has_attribute): Canonicalize name of an
3024 * c-pretty-print.c: Add new include.
3026 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
3028 * c-ada-spec.c (has_static_fields): Look only into variables.
3029 (print_constructor): Add TYPE parameter and use it for the name.
3030 (print_destructor): Likewise.
3031 (print_ada_declaration): Adjust to new constructor/destructor names.
3032 Adjust calls to print_constructor and print_destructor.
3033 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
3034 Look only into variables in the final loop.
3036 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3038 * c-ada-spec.c (has_static_fields): Look only into fields.
3039 (dump_generic_ada_node): Small tweak.
3040 (dump_nested_types): Look only into fields.
3041 (print_ada_declaration): Look only into methods. Small tweak.
3042 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
3044 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
3046 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
3047 (dump_ada_function_declaration): Likewise.
3048 (dump_generic_ada_node): Likewise.
3049 (print_ada_declaration): Add support for const-qualified variables.
3051 2017-07-31 Martin Liska <mliska@suse.cz>
3054 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
3055 Guard condition with flag_sanitize_p also with current_function_decl
3057 (ubsan_maybe_instrument_reference_or_call): Likewise.
3059 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
3061 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
3063 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
3065 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
3067 (print_ada_declaration): Add missing guard for record types.
3069 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3072 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
3073 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
3074 new COMPOUND_EXPRs around the rhs of the comparison.
3076 2017-07-27 Marek Polacek <polacek@redhat.com>
3079 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
3082 2017-07-27 Jakub Jelinek <jakub@redhat.com>
3084 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
3085 (handle_noipa_attribute): New function.
3087 2017-07-07 Torsten Duwe <duwe@suse.de>
3089 * c-attribs.c (c_common_attribute_table): Add entry for
3090 "patchable_function_entry".
3092 2017-07-20 Nathan Sidwell <nathan@acm.org>
3094 Remove TYPE_METHODS.
3095 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
3096 dump_ada_template, print_ada_methods,
3097 print_ada_declaration): Member fns are on TYPE_FIELDS.
3099 2017-07-18 Nathan Sidwell <nathan@acm.org>
3101 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
3103 2017-07-14 David Malcolm <dmalcolm@redhat.com>
3105 * c-common.c (try_to_locate_new_include_insertion_point): New
3107 (per_file_includes_t): New typedef.
3108 (added_includes_t): New typedef.
3109 (added_includes): New variable.
3110 (maybe_add_include_fixit): New function.
3111 * c-common.h (maybe_add_include_fixit): New decl.
3113 2017-07-10 Martin Sebor <msebor@redhat.com>
3116 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
3118 2017-07-06 David Malcolm <dmalcolm@redhat.com>
3120 * c-common.c (selftest::c_family_tests): New.
3121 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
3122 (selftest::c_family_tests): New decl.
3124 2017-07-04 Marek Polacek <polacek@redhat.com>
3127 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3130 2017-07-04 Marek Polacek <polacek@redhat.com>
3132 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3134 2017-06-28 Martin Liska <mliska@suse.cz>
3137 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3138 to a function declaration.
3140 2017-06-28 Martin Liska <mliska@suse.cz>
3143 * c.opt: Add IntegerRange to various options.
3145 2017-06-26 Marek Polacek <polacek@redhat.com>
3148 * c-common.h (warn_for_multistatement_macros): Declare.
3149 * c-warn.c: Include "c-family/c-indentation.h".
3150 (warn_for_multistatement_macros): New function.
3151 * c.opt (Wmultistatement-macros): New option.
3152 * c-indentation.c (guard_tinfo_to_string): No longer static.
3153 Change the parameter type to "enum rid". Handle RID_SWITCH.
3154 * c-indentation.h (guard_tinfo_to_string): Declare.
3156 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3158 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3160 2017-06-15 Martin Sebor <msebor@redhat.com>
3163 * c.opt (-Wclass-memaccess): New option.
3165 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3167 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3169 2017-06-13 Marek Polacek <polacek@redhat.com>
3172 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3175 2017-06-13 Martin Liska <mliska@suse.cz>
3178 * c-attribs.c (add_no_sanitize_value): New function.
3179 (handle_no_sanitize_attribute): Likewise.
3180 (handle_no_sanitize_address_attribute): Use the function.
3181 (handle_no_sanitize_thread_attribute): New function.
3182 (handle_no_address_safety_analysis_attribute): Use
3183 add_no_sanitize_value.
3184 (handle_no_sanitize_undefined_attribute): Likewise.
3185 * c-common.h: Declare new functions.
3186 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3187 (ubsan_instrument_shift): Likewise.
3188 (ubsan_instrument_bounds): Likewise.
3189 (ubsan_maybe_instrument_array_ref): Likewise.
3190 (ubsan_maybe_instrument_reference_or_call): Likewise.
3192 2017-06-11 Jason Merrill <jason@redhat.com>
3194 * c-ada-spec.c, c-pragma.c: Use id_equal.
3196 2017-06-04 Marek Polacek <polacek@redhat.com>
3199 * c-format.c (matching_type_p): Return false if any of the types
3200 requires structural equality.
3202 2017-06-02 Martin Sebor <msebor@redhat.com>
3205 * c-warn.c (conversion_warning): Use -Wconversion for integer
3206 conversion and -Wfloat-conversion for floating one.
3208 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3210 * c.opt (Wsizeof-pointer-div): New warning option.
3212 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3214 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3215 (Wcatch-value=1): Enable by -Wall.
3217 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3219 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3221 * c.opt (fdiagnostics-show-template-tree): New option.
3222 (felide-type): New option.
3224 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3226 * c.opt (Wcatch-value=): New C++ warning flag.
3228 2017-05-24 Nathan Sidwell <nathan@acm.org>
3230 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3231 const casts to avoid warning.
3233 2017-05-24 Martin Sebor <msebor@redhat.com>
3236 * c-common.h (unsafe_conversion_p): Add a function argument.
3237 * c-common.c (unsafe_conversion_p): Same.
3238 Add type names and values to diagnostics.
3239 (scalar_to_vector): Adjust.
3240 * c-warn.c (constant_expression_error): Add a function argument.
3241 Add type names and values to diagnostics.
3242 (conversion_warning): Add a function argument.
3243 Add type names and values to diagnostics.
3244 (warnings_for_convert_and_check): Same.
3246 2017-05-19 Jason Merrill <jason@redhat.com>
3248 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3251 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3253 * c-format.c (locus): Move out of function scope,
3256 2017-05-19 Nathan Sidwell <nathan@acm.org>
3258 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3259 (c_common_parse_file): Remove class dump handling.
3260 (get_dump_info): Likewise.
3262 2017-05-19 Richard Biener <rguenther@suse.de>
3265 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3266 to alias-set zero memory.
3268 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3270 * c-format.c (local_tree_type_node): Add GTY attribute.
3272 2017-05-18 Marek Polacek <polacek@redhat.com>
3274 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3275 (c_common_fixed_point_type_for_size): Likewise.
3276 (c_common_type_for_mode): Likewise.
3277 (shorten_compare): Likewise.
3278 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3279 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3281 2017-05-18 Marek Polacek <polacek@redhat.com>
3283 * c-common.c (self_promoting_args_p): Change the return type to bool.
3284 Use false/true instead of 0/1.
3285 * c-common.h (self_promoting_args_p): Update.
3287 2017-05-17 Marek Polacek <polacek@redhat.com>
3289 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3290 * c-warn.c: Likewise.
3292 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3294 Implement new C++ intrinsics __is_assignable and __is_constructible.
3295 * c-common.c (__is_assignable, __is_constructible): New.
3296 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3298 2017-05-17 Martin Liska <mliska@suse.cz>
3300 * c-common.h: Introduce dump_flags_t type and
3301 use it instead of int type.
3302 * c-gimplify.c (c_genericize): Likewise.
3303 * c-opts.c: Likewise.
3305 2017-05-17 Marek Polacek <polacek@redhat.com>
3307 * c-common.c (c_save_expr): Remove.
3308 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3309 * c-common.h (c_save_expr): Remove declaration.
3311 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3314 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3315 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3316 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3317 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3319 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3321 2017-05-09 Marek Polacek <polacek@redhat.com>
3324 * c-warn.c (unwrap_c_maybe_const): New.
3325 (warn_logical_operator): Call it.
3327 2017-05-09 Nathan Sidwell <nathan@acm.org>
3329 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3330 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3332 2017-05-08 Martin Sebor <msebor@redhat.com>
3334 PR translation/80280
3335 * c-format.h (struct format_flag_spec): Add new member.
3337 * c-format.c (local_tree_type_node): New global.
3338 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3339 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3340 (strfmon_flag_specs): Likewise.
3341 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3342 with distinct quoting properties.
3343 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3344 (flag_chars_t::validate): Add argument and handle bad quoting.
3345 (check_format_info_main): Handle quoting problems.
3346 (init_dynamic_diag_info): Simplify.
3348 2017-05-08 Jason Merrill <jason@redhat.com>
3350 * c-opts.c (c_common_post_options): Update defaults for
3351 flag_abi_version and flag_abi_compat_version.
3353 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3355 * c-common.c (c_cpp_error): Replace report_diagnostic
3356 with diagnostic_report_diagnostic.
3358 2017-05-04 Martin Sebor <msebor@redhat.com>
3360 PR translation/80280
3361 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3362 (handle_weakref_attribute): Same.
3364 2017-05-03 Nathan Sidwell <nathan@acm.org>
3366 Canonicalize canonical type hashing
3367 * c-common.c (complete_array_type): Use type_hash_canon.
3369 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3372 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3374 (cilk_install_body_pedigree_operations): Likewise.
3375 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3377 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3378 (cilk_install_body_pedigree_operations): Likewise.
3379 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3382 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3385 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3386 flag on non-aggregate element types.
3388 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3390 * c-common.c (c_type_hasher, type_hash_table): Remove.
3391 (c_common_get_alias_set): Remove unreachable code.
3392 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3394 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3396 * c.opt (Wextra-semi): New C++ warning flag.
3398 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3401 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3403 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3407 * c-common.c (c_common_type_for_mode): Don't handle
3408 widest_*_literal_type_node here.
3409 c_common_signed_or_unsigned_type): Likewise.
3410 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3411 to *intTI_type_node or *intDI_type_node depending on whether
3412 TImode is supported by the target or not.
3414 2017-04-10 Martin Liska <mliska@suse.cz>
3417 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3418 doing an UBSAN check.
3420 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3422 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3424 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3427 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3429 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3430 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3433 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3435 PR documentation/78732
3436 * c.opt (Wendif-labels): Fix description to refer to
3437 #else rather than #elif.
3439 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3442 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3443 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3445 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3448 * c-common.c (c_common_mark_addressable_vec): Don't set
3449 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3451 2017-03-21 Martin Sebor <msebor@redhat.com>
3454 * c-common.c (set_underlying_type): Mark type used only when
3455 original del is declared unused.
3457 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3459 PR translation/79848
3460 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3463 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3466 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3467 from inform's message, so that xgettext can locate it.
3469 2017-03-09 Marek Polacek <polacek@redhat.com>
3473 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3474 conversion to the attribute list.
3476 2017-03-09 Martin Liska <mliska@suse.cz>
3478 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3480 2017-03-03 Jason Merrill <jason@redhat.com>
3482 * c.opt (Wnoexcept-type): New.
3484 2017-03-02 Richard Biener <rguenther@suse.de>
3487 * c-common.c (c_common_mark_addressable_vec): Look through
3490 2017-02-28 Martin Liska <mliska@suse.cz>
3492 * c.opt: Replace space with tabular for options of <number>
3495 2017-02-28 Martin Liska <mliska@suse.cz>
3497 * c.opt: Fix --help=option -Q for options which are of
3500 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3503 * c-common.c (check_function_restrict): New function.
3504 (check_function_arguments): Add FNDECL argument. Call
3505 check_function_restrict if -Wrestrict.
3506 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3507 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3508 * c-common.h (check_function_arguments): Add FNDECL argument.
3509 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3511 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3513 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3514 treatment of parameters with pointer-to-tagged type and tidy up.
3515 (print_ada_methods): Remove the special treatment of C++ static member
3518 2017-02-22 Martin Liska <mliska@suse.cz>
3520 * c.opt: Replace inequality signs with square brackets
3523 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3526 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3529 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3531 * c-cppbuiltin.c (builtin_define_float_constants): Define
3532 __DECIMAL_DIG__ to the value for long double.
3534 2017-02-15 Marek Polacek <polacek@redhat.com>
3537 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3538 conversion has occured.
3540 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3542 * c-common.c (c_common_reswords): Add "__RTL".
3543 * c-common.h (enum rid): Add RID_RTL.
3545 2017-01-20 Marek Polacek <polacek@redhat.com>
3548 * c-common.h (do_warn_duplicated_branches_r): Declare.
3549 * c-gimplify.c (c_genericize): Walk the function tree calling
3550 do_warn_duplicated_branches_r.
3551 * c-warn.c (expr_from_macro_expansion_r): New.
3552 (do_warn_duplicated_branches): New.
3553 (do_warn_duplicated_branches_r): New.
3554 * c.opt (Wduplicated-branches): New option.
3556 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3559 * c-indentation.c (warn_for_misleading_indentation): Use the past
3560 subjunctive in the note.
3562 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3565 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3566 start type to integer_type.
3568 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3571 * c.opt (gen-decls): Add Driver flag.
3573 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3576 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3579 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3581 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3584 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3586 2017-01-12 Martin Sebor <msebor@redhat.com>
3588 (-Wformat-overflow): ...to this.
3590 2017-01-11 Martin Sebor <msebor@redhat.com>
3593 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3594 Also enable for LTO.
3596 2017-01-10 Jason Merrill <jason@redhat.com>
3598 Implement P0195R2, C++17 variadic using.
3599 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3601 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3603 PR translation/79019
3604 PR translation/79020
3605 * c.opt (Wnormalized=): Fix typo in description.
3607 2017-01-08 Martin Sebor <msebor@redhat.com>
3610 * c.opt (-Wformat-truncation): New option.
3612 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3614 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3615 value to unsigned short to fit in 4 hex digits without
3618 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3620 * c.opt (fsso-struct): Add 'native' value.
3622 2017-01-05 Martin Liska <mliska@suse.cz>
3625 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3628 2017-01-04 Marek Polacek <polacek@redhat.com>
3631 * c.opt (Wpointer-compare): New option.
3633 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3636 * c.opt (fsso-struct=): Add RejectNegative.
3638 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3640 Update copyright years.
3642 2016-12-29 Martin Liska <mliska@suse.cz>
3645 * c.opt (strong-eval-order): Add RejectNegative keyword.
3647 2016-12-22 Jason Merrill <jason@redhat.com>
3649 Implement P0522R0, matching of template template arguments.
3650 * c-cppbuiltin.c (c_cpp_builtins): Define
3651 __cpp_template_template_args.
3653 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3656 * c-common.c (struct nonnull_arg_ctx): New type.
3657 (check_function_nonnull): Return bool instead of void. Use
3658 nonnull_arg_ctx as context rather than just location_t.
3659 (check_nonnull_arg): Adjust for the new context type, set
3660 warned_p to true if a warning has been diagnosed.
3661 (check_function_arguments): Return bool instead of void.
3662 * c-common.h (check_function_arguments): Adjust prototype.
3664 2016-12-21 Jason Merrill <jason@redhat.com>
3666 * c.opt (-fnew-ttp-matching): New flag.
3667 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3669 2016-12-14 Martin Jambor <mjambor@suse.cz>
3671 * c-omp.c: Include omp-general.h instead of omp-low.h.
3672 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3675 2016-12-14 Martin Sebor <msebor@redhat.com>
3678 * c-common.c (check_nonnull_arg): Disable when optimization
3681 2016-12-12 Marek Polacek <polacek@redhat.com>
3684 * c-common.c (attribute_fallthrough_p): Return false for
3687 2016-12-08 Martin Sebor <msebor@redhat.com>
3690 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3692 2016-12-08 Martin Sebor <msebor@redhat.com>
3695 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3698 2016-12-07 Martin Sebor <msebor@redhat.com>
3704 * c.opt (-Wstringop-overflow): New option.
3706 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3708 * c-attribs.c (asan odr indicator): New attribute.
3709 (handle_asan_odr_indicator_attribute): New function.
3711 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3713 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3716 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3718 * c-common.c (excess_precision_mode_join): New.
3719 (c_ts18661_flt_eval_method): New.
3720 (c_c11_flt_eval_method): Likewise.
3721 (c_flt_eval_method): Likewise.
3722 * c-common.h (excess_precision_mode_join): New.
3723 (c_flt_eval_method): Likewise.
3724 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3725 (cpp_iec_559_value): Call it.
3726 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3727 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3728 __FLT_EVAL_METHOD_TS_18661_3__.
3730 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3732 * c-opts.c (c_common_post_options): Add logic to handle the default
3733 case for -fpermitted-flt-eval-methods.
3735 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
3737 * c.opt (Wexpansion-to-defined): New.
3739 2016-11-23 Jakub Jelinek <jakub@redhat.com>
3742 * c-pragma.c (handle_pragma_target): Don't replace
3743 current_target_pragma, but chainon the new args to the current one.
3745 2016-11-22 Nathan Sidwell <nathan@acm.org>
3747 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
3748 indentation and formatting.
3750 2016-11-21 Martin Sebor <msebor@redhat.com>
3752 * c.opt (-fprintf-return-value): Enable by default.
3754 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3757 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3758 * c-common.c (c_common_nodes_and_builtins): Initialize
3759 const_tm_ptr_type_node.
3761 2016-11-16 Marek Polacek <polacek@redhat.com>
3764 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3766 2016-11-14 Jakub Jelinek <jakub@redhat.com>
3768 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3770 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3771 Richard Biener <rguenther@suse.de>
3773 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3774 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3775 * c.opt (fgimple): New option.
3777 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3780 * c-common.h (warn_for_restrict): Declare.
3781 * c-warn.c: Include gcc-rich-location.h.
3782 (warn_for_restrict): New function.
3783 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3784 (gcc_cdiag_char_table): Likewise.
3785 (gcc_cxxdiag_char_table): Likewise.
3786 * c.opt (Wrestrict): New option.
3788 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3790 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3791 for nested types only if the type is a record or union and dump SLOC.
3793 2016-11-09 Jason Merrill <jason@redhat.com>
3795 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3797 2016-11-09 Jakub Jelinek <jakub@redhat.com>
3799 * c-ubsan.c (ubsan_instrument_shift): Handle split
3800 -fsanitize=shift-base and -fsanitize=shift-exponent.
3802 2016-11-07 Jason Merrill <jason@redhat.com>
3804 * c.opt (Wc++1z-compat): New.
3805 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3807 2016-11-07 Martin Liska <mliska@suse.cz>
3809 * c-warn.c (warn_for_unused_label): Save all labels used
3810 in goto or in &label.
3812 2016-11-03 Jason Merrill <jason@redhat.com>
3814 * c-cppbuiltin.c (c_cpp_builtins): Correct
3815 __cpp_inheriting_constructors.
3817 2016-11-01 Jason Merrill <jason@redhat.com>
3819 * c-cppbuiltin.c (c_cpp_builtins): Update
3820 __cpp_inheriting_constructors.
3822 * c.opt (-fnew-inheriting-ctors): New.
3823 * c-opts.c: Default to on for ABI 11+.
3825 2016-10-31 Jakub Jelinek <jakub@redhat.com>
3828 * c.opt (fext-numeric-literals): Add Var and Init.
3829 * c-opts.c (c_common_handle_option): Don't clear
3830 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3831 (c_common_post_options): Clear it here if not set
3834 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
3837 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3840 2016-10-25 Jakub Jelinek <jakub@redhat.com>
3842 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3843 * c-common.c (c_common_reswords): Add __builtin_launder.
3845 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3847 * c-common.c (c_common_truthvalue_conversion): Warn for
3848 multiplications in boolean context. Fix the quoting of '<<' and '<'
3849 in the shift warning.
3851 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3853 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3855 2016-10-20 Jason Merrill <jason@redhat.com>
3857 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3859 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3861 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3862 integer shift ops in boolean context.
3864 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
3866 * c.opt (Walloca): New.
3867 (Walloca-larger-than=): New.
3868 (Wvla-larger-than=): New.
3870 2016-10-17 Marek Polacek <polacek@redhat.com>
3872 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3873 Return immediately when finding a match.
3874 (warn_tautological_cmp): Remove a boolean variable that is no longer
3877 2016-10-17 Marek Polacek <polacek@redhat.com>
3879 * c-attribs.c: New file.
3880 * c-common.c: Move attributes handling to c-attribs.c.
3881 (get_nonnull_operand): No longer static.
3882 * c-common.h: Move the declarations from c-attribs.c to its own section.
3884 2016-10-14 Jason Merrill <jason@redhat.com>
3886 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3887 and __cpp_deduction_guides.
3889 2016-10-13 Jason Merrill <jason@redhat.com>
3891 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3893 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3895 * c-cppbuiltin.c: Include memmodel.h.
3896 * c-opts.c: Likewise.
3897 * c-pragma.c: Likewise.
3898 * c-warn.c: Likewise.
3900 2016-10-12 Jakub Jelinek <jakub@redhat.com>
3902 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3903 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3904 * c-opts.c (sanitize_cpp_opts): Initialize
3905 cpp_opts->cpp_warn_implicit_fallthrough.
3907 2016-10-11 Marek Polacek <polacek@redhat.com>
3909 * c-common.c (warning_candidate_p): Change the return type to bool
3910 and return true/false instead of 1/0.
3911 (vector_mode_valid_p): Likewise.
3913 2016-10-11 Marek Polacek <polacek@redhat.com>
3915 * c-common.c (fold_for_warn): No longer static.
3916 (bool_promoted_to_int_p): Likewise.
3917 (c_common_get_narrower): Likewise.
3918 (constant_expression_warning): Move to c-warn.c.
3919 (constant_expression_error): Likewise.
3920 (overflow_warning): Likewise.
3921 (warn_logical_operator): Likewise.
3922 (find_array_ref_with_const_idx_r): Likewise.
3923 (warn_tautological_cmp): Likewise.
3924 (expr_has_boolean_operands_p): Likewise.
3925 (warn_logical_not_parentheses): Likewise.
3926 (warn_if_unused_value): Likewise.
3927 (strict_aliasing_warning): Likewise.
3928 (sizeof_pointer_memaccess_warning): Likewise.
3929 (check_main_parameter_types): Likewise.
3930 (conversion_warning): Likewise.
3931 (warnings_for_convert_and_check): Likewise.
3932 (match_case_to_enum_1): Likewise.
3933 (match_case_to_enum): Likewise.
3934 (c_do_switch_warnings): Likewise.
3935 (warn_for_omitted_condop): Likewise.
3936 (readonly_error): Likewise.
3937 (lvalue_error): Likewise.
3938 (invalid_indirection_error): Likewise.
3939 (warn_array_subscript_with_type_char): Likewise.
3940 (warn_about_parentheses): Likewise.
3941 (warn_for_unused_label): Likewise.
3942 (warn_for_div_by_zero): Likewise.
3943 (warn_for_memset): Likewise.
3944 (warn_for_sign_compare): Likewise.
3945 (do_warn_double_promotion): Likewise.
3946 (do_warn_unused_parameter): Likewise.
3947 (record_locally_defined_typedef): Likewise.
3948 (maybe_record_typedef_use): Likewise.
3949 (maybe_warn_unused_local_typedefs): Likewise.
3950 (maybe_warn_bool_compare): Likewise.
3951 (maybe_warn_shift_overflow): Likewise.
3952 (warn_duplicated_cond_add_or_warn): Likewise.
3953 (diagnose_mismatched_attributes): Likewise.
3954 * c-common.h: Move the declarations from c-warn.c to its own section.
3955 * c-warn.c: New file.
3957 2016-10-08 Jason Merrill <jason@redhat.com>
3959 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3960 into COND_EXPR in C++.
3962 2016-10-08 Jakub Jelinek <jakub@redhat.com>
3964 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3965 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3966 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3968 2016-10-07 Jakub Jelinek <jakub@redhat.com>
3970 Implement LWG2296 helper intrinsic
3971 * c-common.h (enum rid): Add RID_ADDRESSOF.
3972 * c-common.c (c_common_reswords): Add __builtin_addressof.
3974 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3977 * c-common.c (c_common_truthvalue_conversion): Warn also for
3978 suspicious enum values in boolean context.
3980 2016-10-06 Jakub Jelinek <jakub@redhat.com>
3982 Implement P0258R2 - helper for C++17
3983 std::has_unique_object_representations trait
3984 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3985 * c-common.c (c_common_reswords): Add
3986 __has_unique_object_representations.
3988 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3991 * c-ubsan.c (ubsan_instrument_return): Don't call
3992 initialize_sanitizer_builtins here.
3994 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3996 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3997 conditional expression in boolean context when only one arm is
4000 2016-10-05 Jakub Jelinek <jakub@redhat.com>
4003 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
4006 * c-common.c (c_common_reswords): Update comment for C++11.
4008 2016-10-04 Jason Merrill <jason@redhat.com>
4010 * c-common.c (make_tree_vector_from_ctor): New.
4011 * c-common.h: Declare it.
4013 2016-10-04 Jakub Jelinek <jakub@redhat.com>
4015 * c-cppbuiltin.c (c_cpp_builtins): Don't define
4016 __LIBGCC_JCR_SECTION_NAME__.
4018 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
4020 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
4021 left shift in boolean context.
4023 2016-09-29 Jakub Jelinek <jakub@redhat.com>
4025 Implement P0001R1 - C++17 removal of register storage class specifier
4026 * c.opt (Wregister): New warning.
4027 * c-opts.c (c_common_post_options): Enable -Wregister by
4030 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
4032 * c-opts.c (c_common_post_options): Remove special case for
4033 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
4036 2016-09-27 Jakub Jelinek <jakub@redhat.com>
4038 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
4041 * c-ada-spec.c (print_ada_declaration): Remove break after return.
4043 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
4045 * c-common.c: Include memmodel.h.
4047 2016-09-26 Marek Polacek <polacek@redhat.com>
4049 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
4051 2016-09-26 Marek Polacek <polacek@redhat.com>
4054 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
4055 (handle_fallthrough_attribute): New function.
4056 (attribute_fallthrough_p): New function.
4057 * c-common.h (attribute_fallthrough_p): Declare.
4059 2016-09-24 Marek Polacek <polacek@redhat.com>
4062 * c.opt (Wbool-operation): New.
4064 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
4066 * c-common.c (c_common_truthvalue_conversion): Inhibit
4067 Wint-in-bool-context warning with from_macro_definition_at.
4068 Mention the expression will always evaluate to true.
4070 2016-09-21 Martin Sebor <msebor@redhat.com>
4073 * c.opt (fprintf-return-value): Temporarily initialize to zero
4074 to unblock bootstrap failures.
4076 2016-09-21 Jakub Jelinek <jakub@redhat.com>
4079 * c.opt (Waligned-new=): Add RejectNegative.
4080 (faligned-new=): Likewise. Spelling fix - change
4081 aligned_new_threshhold to aligned_new_threshold.
4082 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
4083 to aligned_new_threshold.
4085 2016-09-20 Martin Sebor <msebor@redhat.com>
4088 * c.opt: Add -Wformat-length and -fprintf-return-value.
4090 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4093 * c.opt (Wint-in-bool-context): New warning.
4094 * c-common.c (c_common_truthvalue_conversion): Warn on integer
4095 constants in boolean context.
4097 2016-09-19 Joseph Myers <joseph@codesourcery.com>
4099 * c-common.c (max_align_t_align): Also consider alignment of
4102 2016-09-15 Jason Merrill <jason@redhat.com>
4104 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
4107 2016-09-14 Jason Merrill <jason@redhat.com>
4109 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4110 limit FIELD_DECL, either.
4112 2016-09-14 Marek Polacek <polacek@redhat.com>
4114 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
4115 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
4116 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
4118 2016-09-13 David Malcolm <dmalcolm@redhat.com>
4120 * c-common.c (warn_logical_not_parentheses): Replace
4121 rich_location::add_fixit_insert calls with add_fixit_insert_before
4122 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4124 2016-09-13 Jason Merrill <jason@redhat.com>
4125 Tom de Vries <tom@codesourcery.com>
4128 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4130 2016-09-13 Jason Merrill <jason@redhat.com>
4132 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4135 2016-09-12 Jason Merrill <jason@redhat.com>
4137 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4138 bit/byte confusion, allow large alignment for types.
4140 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4143 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4145 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4148 * c-format.c (argument_parser::check_argument_type): Add params
4149 "type_start" and "conversion_char". Use the former to generate
4150 offset_to_type_start and pass it and conversion_char to
4152 (check_format_info_main): Capture the start of the type
4153 information as "type_start", and pass it an format_char
4154 to arg_parser.check_argument_type.
4155 (check_format_types): Provide an example in the leading comment.
4156 Add params "offset_to_type_start" and "conversion_char"; pass
4157 them to format_type_warning calls.
4158 (test_get_modifier_for_format_len): Likewise.
4159 (matching_type_p): New function.
4160 (get_format_for_type): Add param "conversion_char" and move
4161 implementation into...
4162 (get_format_for_type_1): ...new function, called twice.
4163 Use new function matching_type_p rather than checking for
4164 TYPE_CANONICAL equality.
4165 (get_corrected_substring): New function.
4166 (format_type_warning): Provide an example in the leading comment.
4167 Add params "offset_to_type_start" and "conversion_char". Replace
4168 call to get_format_for_type with call to get_corrected_substring
4169 and move rejection of hints for widths/precisions there.
4170 (assert_format_for_type_streq): Add param "conversion_char".
4171 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4172 (test_get_format_for_type_printf): Add conversion chars to the
4173 tests, adding coverage for various combinations of integer
4174 vs double conversions, and for preserving octal and hexadecimal
4176 (test_get_format_for_type_scanf): Add conversion chars to the
4179 2016-09-10 Tom de Vries <tom@codesourcery.com>
4182 * c-common.c (build_va_arg): Handle more strict
4183 targetm.canonical_va_list_type. Replace first argument type error with
4186 2016-09-09 Martin Sebor <msebor@redhat.com>
4190 * c-format.c (argument_parser::find_format_char_info): Use %qc
4191 format directive unconditionally.
4193 2016-09-09 Jason Merrill <jason@redhat.com>
4195 Implement C++17 new of over-aligned types.
4196 * c.opt: Add -faligned-new and -Waligned-new.
4197 * c-common.c (max_align_t_align): Split out from...
4198 (cxx_fundamental_alignment_p): ...here.
4199 * c-common.h: Declare it.
4200 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4202 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4204 * c-cppbuiltin.c (builtin_define_type_width): New function.
4205 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4208 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4210 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4212 (substring_loc::get_location): Move to substring-locations.c,
4213 keeping implementation as...
4214 (c_get_substring_location): New function, from the above, reworked
4215 to use accessors rather than member lookup.
4216 * c-common.h (class substring_loc): Move to substring-locations.h,
4217 replacing with a forward decl.
4218 (c_get_substring_location): New decl.
4219 * c-format.c: Include "substring-locations.h".
4220 (format_warning_va): Move to substring-locations.c.
4221 (format_warning_at_substring): Likewise.
4223 2016-09-06 Martin Sebor <msebor@redhat.com>
4226 * c-format.c (check_function_format): Avoid issuing warnings for
4227 functions unless they call format functions with non-constant
4230 2016-09-06 Richard Biener <rguenther@suse.de>
4233 * c-common.c (c_common_mark_addressable_vec): Handle
4234 COMPOUND_LITERAL_EXPR.
4236 2016-09-05 Marek Polacek <polacek@redhat.com>
4239 * c-common.c (bool_promoted_to_int_p): New function.
4240 (expr_has_boolean_operands_p): New function.
4241 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4242 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4244 2016-09-04 Tom de Vries <tom@codesourcery.com>
4247 2016-08-29 Tom de Vries <tom@codesourcery.com>
4249 * c-common.c (build_va_arg): Replace first argument type error
4252 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4255 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4256 (c_finish_omp_for): Reject _Atomic qualified iterators.
4258 2016-09-01 Martin Sebor <msebor@redhat.com>
4260 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4261 size to guarantee it fits the output of the formatted function
4262 regardless of its arguments.
4264 2016-09-01 Marek Polacek <polacek@redhat.com>
4267 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4270 2016-08-29 Marek Polacek <polacek@redhat.com>
4273 * c-common.c (warn_logical_not_parentheses): Don't warn for
4274 a comparison or a logical operator.
4276 2016-08-29 Tom de Vries <tom@codesourcery.com>
4278 * c-common.c (build_va_arg): Fix type comparison assert.
4280 2016-08-29 Tom de Vries <tom@codesourcery.com>
4282 * c-common.c (build_va_arg): Replace first argument type error
4285 2016-08-29 Tom de Vries <tom@codesourcery.com>
4288 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4289 with error_mark_node as va_list instead of with illegal va_list.
4291 2016-08-25 Marek Polacek <polacek@redhat.com>
4292 David Malcolm <dmalcolm@redhat.com>
4294 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4295 * c-common.h (warn_logical_not_parentheses): Update declaration.
4297 2016-08-22 Marek Polacek <polacek@redhat.com>
4300 * c-common.c (warn_for_memset): Check type for null.
4302 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4304 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4305 _FloatNx types for suffixes for built-in functions.
4307 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4310 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4311 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4312 (RID_FLOAT128X): New enum rid values.
4313 (CASE_RID_FLOATN_NX): New macro.
4314 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4316 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4317 corresponding complex types.
4318 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4319 _FloatNx and corresponding complex types.
4320 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4321 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4322 and _FloatNx types for the widest type for determining
4323 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4324 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4325 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4327 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4329 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4332 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4334 * c-opts.c (c_diagnostic_finalizer): Update for change to
4335 diagnostic_show_locus.
4337 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4339 * c-common.c: Include "spellcheck.h".
4340 (cb_get_suggestion): New function.
4341 * c-common.h (cb_get_suggestion): New decl.
4342 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4345 2016-08-18 Marek Polacek <polacek@redhat.com>
4348 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4351 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4354 * c-common.c (substring_loc::get_range): Rename to...
4355 (substring_loc::get_location): ...this, converting param from a
4356 source_range * to a location_t *. Call
4357 get_source_location_for_substring rather than
4358 get_source_range_for_substring, and pass in m_caret_idx.
4359 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4360 (substring_loc::get_range): Replace with...
4361 (substring_loc::get_location): ...this.
4362 (substring_loc::set_caret_index): New method.
4363 (substring_loc): Add field m_caret_idx.
4364 * c-format.c (format_warning_va): Update for above changes.
4365 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4366 clashing with type name.
4367 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4368 (check_argument_type): Likewise.
4369 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4370 Use a copy when emitting warnings, setting the caret index from TYPE.
4372 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4373 Arnaud Charlet <charlet@adacore.com>
4375 * c-ada-spec.c (dump_number): New function.
4376 (handle_escape_character): Likewise.
4377 (print_ada_macros): Add handling of constant integers and strings.
4379 2016-08-12 Marek Polacek <polacek@redhat.com>
4382 * c-common.c (scalar_to_vector): Adjust fall through comment.
4383 * c-opts.c (c_common_handle_option): Likewise.
4384 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4385 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4386 fall through comment.
4387 * cilk.c (extract_free_variables): Add FALLTHRU.
4389 2016-08-10 Jason Merrill <jason@redhat.com>
4391 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4393 2016-08-09 Jason Merrill <jason@redhat.com>
4395 * c-common.c (c_common_attribute_table): vector_size affects type
4398 2016-08-09 Marek Polacek <polacek@redhat.com>
4401 * c-ada-spec.c (dump_generic_ada_node): Add return.
4403 2016-08-09 Jason Merrill <jason@redhat.com>
4405 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4406 C++17 constexpr lambdas.
4408 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4411 * c-common.h (selftest::c_format_c_tests): New declaration.
4412 (selftest::run_c_tests): New declaration.
4413 * c-format.c: Include "selftest.h.
4414 (format_warning_va): Add param "corrected_substring" and use
4415 it to add a replacement fix-it hint.
4416 (format_warning_at_substring): Likewise.
4417 (format_warning_at_char): Update for new param of
4419 (argument_parser::check_argument_type): Pass "fki" to
4421 (check_format_types): Add param "fki" and pass it to
4422 format_type_warning.
4423 (deref_n_times): New function.
4424 (get_modifier_for_format_len): New function.
4425 (selftest::test_get_modifier_for_format_len): New function.
4426 (get_format_for_type): New function.
4427 (format_type_warning): Add param "fki" and use it to attempt
4428 to provide hints for argument types when calling
4429 format_warning_at_substring.
4430 (selftest::get_info): New function.
4431 (selftest::assert_format_for_type_streq): New function.
4432 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4433 (selftest::test_get_format_for_type_printf): New function.
4434 (selftest::test_get_format_for_type_scanf): New function.
4435 (selftest::c_format_c_tests): New function.
4437 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4440 * c-format.c: Include "diagnostic.h".
4441 (location_column_from_byte_offset): Delete.
4442 (location_from_offset): Delete.
4443 (format_warning_va): New function.
4444 (format_warning_at_substring): New function.
4445 (format_warning_at_char): New function.
4446 (check_format_arg): Capture location of format_tree and pass to
4447 check_format_info_main.
4448 (argument_parser): Add fields "start_of_this_format" and
4449 "format_string_cst".
4450 (flag_chars_t::validate): Add param "format_string_cst". Convert
4451 warning_at call using location_from_offset to call to
4452 format_warning_at_char.
4453 (argument_parser::argument_parser): Add param "format_string_cst_"
4454 and use use it to initialize field "format_string_cst".
4455 Initialize new field "start_of_this_format".
4456 (argument_parser::read_format_flags): Convert warning_at call
4457 using location_from_offset to a call to format_warning_at_char.
4458 (argument_parser::read_any_format_left_precision): Likewise.
4459 (argument_parser::read_any_format_precision): Likewise.
4460 (argument_parser::read_any_other_modifier): Likewise.
4461 (argument_parser::find_format_char_info): Likewise, in three places.
4462 (argument_parser::parse_any_scan_set): Likewise, in one place.
4463 (argument_parser::handle_conversions): Likewise, in two places.
4464 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4465 and use it to make a substring_loc. Pass the latter to
4467 (check_format_info_main): Add params "fmt_param_loc" and
4468 "format_string_cst". Convert warning_at calls using
4469 location_from_offset to calls to format_warning_at_char. Pass the
4470 new params to the arg_parser ctor. Pass "format_string_cst" to
4471 flag_chars.validate. Pass "fmt_param_loc" to
4472 arg_parser.check_argument_type.
4473 (check_format_types): Convert first param from a location_t
4474 to a const substring_loc & and rename to "fmt_loc". Attempt
4475 to extract the range of the relevant parameter and pass it
4476 to format_type_warning.
4477 (format_type_warning): Convert first param from a location_t
4478 to a const substring_loc & and rename to "fmt_loc". Add
4479 params "param_range" and "type". Replace calls to warning_at
4480 with calls to format_warning_at_substring.
4482 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4484 * c-format.c (class flag_chars_t): New class.
4485 (struct length_modifier): New struct.
4486 (class argument_parser): New class.
4487 (flag_chars_t::flag_chars_t): New ctor.
4488 (flag_chars_t::has_char_p): New method.
4489 (flag_chars_t::add_char): New method.
4490 (flag_chars_t::validate): New method.
4491 (flag_chars_t::get_alloc_flag): New method.
4492 (flag_chars_t::assignment_suppression_p): New method.
4493 (argument_parser::argument_parser): New ctor.
4494 (argument_parser::read_any_dollar): New method.
4495 (argument_parser::read_format_flags): New method.
4496 (argument_parser::read_any_format_width): New method.
4497 (argument_parser::read_any_format_left_precision): New method.
4498 (argument_parser::read_any_format_precision): New method.
4499 (argument_parser::handle_alloc_chars): New method.
4500 (argument_parser::read_any_length_modifier): New method.
4501 (argument_parser::read_any_other_modifier): New method.
4502 (argument_parser::find_format_char_info): New method.
4503 (argument_parser::validate_flag_pairs): New method.
4504 (argument_parser::give_y2k_warnings): New method.
4505 (argument_parser::parse_any_scan_set): New method.
4506 (argument_parser::handle_conversions): New method.
4507 (argument_parser::check_argument_type): New method.
4508 (check_format_info_main): Introduce classes argument_parser
4509 and flag_chars_t, moving the code within the loop into methods
4510 of these classes. Make various locals "const".
4512 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4514 * c-common.c: Include "substring-locations.h".
4515 (get_cpp_ttype_from_string_type): New function.
4516 (g_string_concat_db): New global.
4517 (substring_loc::get_range): New method.
4518 * c-common.h (g_string_concat_db): New declaration.
4519 (class substring_loc): New class.
4520 * c-lex.c (lex_string): When concatenating strings, capture the
4521 locations of all tokens using a new obstack, and record the
4522 concatenation locations within g_string_concat_db.
4523 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4526 2016-07-29 Marek Polacek <polacek@redhat.com>
4529 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4530 parentheses warning.
4533 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4535 2016-07-28 Martin Liska <mliska@suse.cz>
4537 PR gcov-profile/68025
4538 * c-common.c (handle_no_profile_instrument_function_attribute):
4540 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4542 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4545 2016-07-25 Jason Merrill <jason@redhat.com>
4548 * c.opt (fconstexpr-loop-limit): New.
4550 2016-07-22 Martin Sebor <msebor@redhat.com>
4553 * c-common.c (resolve_overloaded_builtin): Avoid converting
4554 __atomic_compare_exchange_n return type to that of what its
4555 first argument points to.
4557 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4559 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4560 ~(unsigned HOST_WIDE_INT) 0.
4562 2016-07-22 Martin Liska <mliska@suse.cz>
4564 PR gcov-profile/69028
4565 PR gcov-profile/62047
4566 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4567 to the current_function_decl.
4569 2016-07-21 Jason Merrill <jason@redhat.com>
4572 * c-common.c (c_common_truthvalue_conversion): Check
4573 c_inhibit_evaluation_warnings for warning about address of
4576 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4578 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4581 2016-07-15 Jason Merrill <jason@redhat.com>
4583 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4585 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4588 * c-common.h (enum lookup_name_fuzzy_kind): Add
4589 FUZZY_LOOKUP_FUNCTION_NAME.
4591 2016-07-08 Jason Merrill <jason@redhat.com>
4593 P0145: Refining Expression Order for C++.
4594 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4597 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4600 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4602 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4604 * c-pragma.h (enum pragma_kind): Rename
4605 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4608 2016-06-29 Richard Biener <rguenther@suse.de>
4611 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4613 2016-06-24 Jason Merrill <jason@redhat.com>
4615 P0145R2: Refining Expression Order for C++.
4616 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4619 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4621 * c-common.c (check_builtin_function_arguments): Require last
4622 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4623 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4624 if the last argument is pointer to enumerated or boolean type.
4626 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4629 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4630 (lookup_name_fuzzy): New prototype.
4632 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4634 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4636 2016-06-14 Jason Merrill <jason@redhat.com>
4638 P0145R2: Refining Expression Order for C++.
4639 * c.opt (fargs-in-order): New.
4640 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4642 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4645 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4646 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4648 PR preprocessor/71183
4649 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4650 to cb_get_source_date_epoch.
4652 2016-06-10 Jakub Jelinek <jakub@redhat.com>
4655 * c.opt (Wpsabi): Add Warning flag.
4657 2016-06-10 Martin Sebor <msebor@redhat.com>
4660 * c-common.c (handle_nonnull_attribute): Accept
4661 the nonnull attribute in type-generic builtins.
4663 2016-06-09 Martin Sebor <msebor@redhat.com>
4666 * c-common.c (builtin_function_validate_nargs): Make text of error
4667 message consistent with others like it.
4669 2016-06-08 Martin Sebor <msebor@redhat.com>
4670 Jakub Jelinek <jakub@redhat.com>
4674 * c-common.c (check_builtin_function_arguments): Handle
4675 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4677 2016-06-08 Richard Biener <rguenther@suse.de>
4679 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4681 2016-06-07 Richard Biener <rguenther@suse.de>
4684 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4685 options and warn about others.
4687 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
4689 * c-common.c (get_source_date_epoch): Rename to
4690 cb_get_source_date_epoch.
4691 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4692 message when the parsing fails. Use error_at instead of fatal_error.
4693 * c-common.h (get_source_date_epoch): Rename to
4694 cb_get_source_date_epoch.
4695 * c-common.h (cb_get_source_date_epoch): Prototype.
4696 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4697 * c-common.h (c_omp_region_type): Remove trailing comma.
4698 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4699 * c-lex.c (c_lex_with_flags): Remove initialization of
4700 pfile->source_date_epoch.
4702 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4705 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4706 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4707 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4708 instead of C_OMP_CLAUSE_SPLIT_FOR.
4710 2016-05-24 Richard Biener <rguenther@suse.de>
4714 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4715 (convert_vector_to_array_for_subscript): ... this.
4716 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4717 VIEW_CONVERT_EXPR to an array type. Rename to ...
4718 (convert_vector_to_array_for_subscript): ... this.
4720 2016-05-12 Marek Polacek <polacek@redhat.com>
4723 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4724 size_in_bytes and pass LOC to it.
4726 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4729 * c.opt (Wduplicate-decl-specifier): New option.
4731 2016-05-11 Marek Polacek <polacek@redhat.com>
4734 * c-common.c (diagnose_mismatched_attributes): New function.
4735 * c-common.h (diagnose_mismatched_attributes): Declare.
4737 2016-05-04 Marek Polacek <polacek@redhat.com>
4739 * c.opt (Wdangling-else): New option.
4741 2016-05-03 Marek Polacek <polacek@redhat.com>
4744 * c-common.c (builtin_function_validate_nargs): Add location
4746 (check_builtin_function_arguments): Add location and arguments
4747 parameters. Use them.
4748 * c-common.h (check_builtin_function_arguments): Update declaration.
4750 2016-05-03 Richard Biener <rguenther@suse.de>
4752 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4753 allow call args to gimplify to SSA names.
4755 2016-05-03 Marek Polacek <polacek@redhat.com>
4757 * c-common.h (enum c_omp_region_type): Remove stray comma.
4759 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4761 * c-common.h (enum c_omp_region_type): Define.
4763 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4765 * c-common.c (shorten_compare): Use wi::to_wide.
4767 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4770 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4771 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4772 reduction clauses in acc parallel loops.
4774 2016-04-29 Marek Polacek <polacek@redhat.com>
4777 * c-common.c (warn_for_memset): Check domain before accessing it.
4779 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4782 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4783 "aligned" attribute.
4785 2016-04-28 Jason Merrill <jason@redhat.com>
4787 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4789 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
4790 Matthias Klose <doko@debian.org>
4792 * c-common.c (get_source_date_epoch): New function, gets the environment
4793 variable SOURCE_DATE_EPOCH and parses it as long long with error
4795 * c-common.h (get_source_date_epoch): Prototype.
4796 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4798 2015-04-27 Ryan Burn <contact@rnburn.com>
4802 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4803 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4805 (cilk_detect_and_unwrap): Corresponding changes.
4806 (extract_free_variables): Don't extract free variables from
4807 AGGR_INIT_EXPR slot.
4808 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4809 (cilk_recognize_spawn): Likewise.
4811 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4813 * c.opt (Wmemset-elt-size): New option.
4814 * c-common.c (warn_for_memset): New function.
4815 * c-common.h (warn_for_memset): Declare.
4817 2016-04-25 Jason Merrill <jason@redhat.com>
4819 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4821 * c-common.h: Declare it.
4822 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4824 2016-04-22 Jason Merrill <jason@redhat.com>
4826 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4828 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4831 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4832 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4834 2016-04-18 Michael Matz <matz@suse.de>
4836 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4839 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4841 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4842 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4843 to incomplete types.
4844 (dump_nested_type): Remove redundant tests and tidy up.
4845 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4846 a type which is the typedef of an original type.
4848 2016-04-15 Marek Polacek <polacek@redhat.com>
4851 * c-common.c (build_va_arg): Change two asserts into errors and return
4854 2016-04-13 Marek Polacek <polacek@redhat.com>
4857 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4858 for switch statements, too.
4860 2016-03-28 Jason Merrill <jason@redhat.com>
4862 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4864 2016-03-23 Marek Polacek <polacek@redhat.com>
4867 * c.opt (Wignored-attributes): New option.
4869 2016-03-22 David Malcolm <dmalcolm@redhat.com>
4872 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4873 diagnostic text, reversing the order of the warning and note so
4874 that they appear in source order.
4876 2016-03-17 Marek Polacek <polacek@redhat.com>
4879 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4882 2016-03-14 Jason Merrill <jason@redhat.com>
4884 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4886 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4888 2016-03-09 Richard Biener <rguenther@suse.de>
4891 * c-common.c (strict_aliasing_warning): Add back
4892 alias_sets_conflict_p check.
4894 2016-03-08 Jason Merrill <jason@redhat.com>
4896 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4898 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4901 * c-indentation.c (get_visual_column): Move code to determine next
4903 (next_tab_stop): ...this new function.
4904 (line_contains_hash_if): Delete function.
4905 (detect_preprocessor_logic): Delete function.
4906 (get_first_nws_vis_column): New function.
4907 (detect_intervening_unindent): New function.
4908 (should_warn_for_misleading_indentation): Replace call to
4909 detect_preprocessor_logic with a call to
4910 detect_intervening_unindent.
4912 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4915 * c-indentation.c (should_warn_for_misleading_indentation): When
4916 suppressing warnings about cases where the guard and body are on
4917 the same column, only use the first non-whitespace column in place
4918 of the guard token column when dealing with "else" clauses.
4919 When rejecting aligned BODY and NEXT, loosen the requirement
4920 from equality with the first non-whitespace of guard to simply
4921 that they not be indented relative to it.
4923 2016-03-04 Richard Biener <rguenther@suse.de>
4926 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4927 instead of alias_sets_conflict_p.
4929 2016-03-01 Marek Polacek <polacek@redhat.com>
4932 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4935 2016-02-22 Martin Sebor <msebor@redhat.com>
4938 * c-common.c (check_builtin_function_arguments): Validate and
4939 reject invalid arguments to __builtin_alloca_with_align.
4941 2016-02-20 Mark Wielaard <mjw@redhat.com>
4944 * c.opt (Wunused-const-variable): Turn into Alias for...
4945 (Wunused-const-variable=): New option.
4947 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4950 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4952 (c_common_init_options): ...to here.
4953 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4955 2016-02-19 Jakub Jelinek <jakub@redhat.com>
4958 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4959 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4960 flag_preprocess_only.
4962 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4965 * c.opt (Wnonnull-compare): Enable for -Wall.
4967 2016-02-15 Jakub Jelinek <jakub@redhat.com>
4970 * c-common.c (sync_resolve_size): Diagnose too few arguments
4971 even when params is non-NULL empty vector.
4973 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4976 * c.opt (fshort-double): Remove.
4978 2016-02-05 Martin Sebor <msebor@redhat.com>
4981 * c.opt (Warning options): Update -Wplacement-new to take
4982 an optional argument.
4984 2016-02-01 Jakub Jelinek <jakub@redhat.com>
4986 PR preprocessor/69543
4988 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4989 instead of loc to control_warning_option.
4991 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4993 * c.opt (fopenacc-dim=): New option.
4995 2016-01-27 Ryan Burn <contact@rnburn.com>
4998 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4999 gimplify_arg. Removed superfluous post_p argument.
5000 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
5001 superfluous post_p argument.
5002 * c-gimplify.c (c_gimplify_expr): Likewise.
5004 2016-01-26 David Malcolm <dmalcolm@redhat.com>
5007 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
5008 pp_newline_and_flush with pp_flush.
5010 2016-01-20 Martin Sebor <msebor@redhat.com>
5013 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
5014 an incompatible argument when the argument isn't a valid tree node.
5016 2016-01-18 Jason Merrill <jason@redhat.com>
5019 * c-common.c (check_function_arguments_recurse): Fold the whole
5020 COND_EXPR, not just the condition.
5022 2016-01-18 Tom de Vries <tom@codesourcery.com>
5024 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
5025 classify as loop clause.
5027 2016-01-15 Jakub Jelinek <jakub@redhat.com>
5030 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
5031 C++ FE no longer has limit on number of pragmas.
5033 2015-01-14 Ryan Burn <contact@rnburn.com>
5036 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
5037 to add missing cleanup point.
5039 2016-01-14 David Malcolm <dmalcolm@redhat.com>
5042 * c-indentation.c (get_visual_column): Add location_t param.
5043 Handle the column number being zero by effectively disabling the
5044 warning, with an "inform".
5045 (should_warn_for_misleading_indentation): Add location_t argument
5046 for all uses of get_visual_column.
5048 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
5051 * c-indentation.c (should_warn_for_misleading_indentation):
5052 Don't warn about do-while statements.
5054 2016-01-07 Martin Sebor <msebor@redhat.com>
5057 * c-common.c (sync_resolve_size): Reject first argument when it's
5060 2016-01-05 David Malcolm <dmalcolm@redhat.com>
5063 * c-indentation.c (get_visual_column): Remove default argument.
5064 (should_warn_for_misleading_indentation): For the multiline case,
5065 update call to get_visual_column for next_stmt_exploc so that it
5066 captures the location of the first non-whitespace character in the
5067 relevant line. Don't issue warnings if there is non-whitespace
5068 before the next statement.
5070 2016-01-04 Jakub Jelinek <jakub@redhat.com>
5072 Update copyright years.
5074 2015-12-21 David Malcolm <dmalcolm@redhat.com>
5076 * c-common.c (binary_op_error): Convert first param from
5077 location_t to rich_location * and use it when emitting an error.
5078 * c-common.h (binary_op_error): Convert first param from
5079 location_t to rich_location *.
5081 2015-12-16 David Malcolm <dmalcolm@redhat.com>
5083 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
5084 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
5086 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
5088 * c-common.c (c_common_attribute_table): Handle "omp declare target
5091 2015-12-14 Jakub Jelinek <jakub@redhat.com>
5094 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
5096 2014-12-12 Tobias Burnus <burnus@net-b.de>
5099 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
5100 specifiers (%d, %i,%u and %c).
5102 2015-12-10 David Malcolm <dmalcolm@redhat.com>
5104 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
5106 2015-12-08 Jakub Jelinek <jakub@redhat.com>
5110 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
5111 * c-pragma.c (handle_pragma_diagnostic): Adjust
5112 control_warning_option caller.
5114 2015-12-07 David Malcolm <dmalcolm@redhat.com>
5116 * c-common.c (c_cpp_error): Update for change to
5117 rich_location::set_range.
5119 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
5121 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
5122 shifting 1 out of the sign bit.
5124 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5126 * c-common.c (c_common_attribute_table[]): Update max arguments
5127 count for "simd" attribute.
5128 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5130 2015-12-03 Jakub Jelinek <jakub@redhat.com>
5132 PR preprocessor/57580
5133 * c-ppoutput.c (print): Change printed field to bool.
5134 Move src_file last for smaller padding.
5135 (init_pp_output): Set print.printed to false instead of 0.
5136 (scan_translation_unit): Fix up formatting. Set print.printed
5137 to true after printing something other than newline.
5138 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5139 (maybe_print_line_1): Set print.printed to false instead of 0.
5140 (print_line_1): Likewise.
5141 (do_line_change): Set print.printed to true instead of 1.
5142 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5143 dump_macro): Set print.printed to false after printing newline.
5145 2015-12-02 Jason Merrill <jason@redhat.com>
5147 * c-common.c (fold_for_warn): New.
5148 (warn_logical_operator, warn_tautological_cmp)
5149 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5151 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5152 (c_fully_fold_internal, decl_constant_value_for_optimization):
5154 * c-common.h: Don't declare decl_constant_value_for_optimization.
5156 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5159 * c-common.h (c_build_qualified_type): Add extra default
5162 2015-12-01 Julian Brown <julian@codesourcery.com>
5163 Cesar Philippidis <cesar@codesourcery.com>
5164 James Norris <James_Norris@mentor.com>
5166 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5167 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5168 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5170 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5172 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5173 (decl_sloc_common): Delete and move bulk of processing to...
5174 (decl_sloc): ...here.
5175 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5176 (dump_ada_double_name): Remove S parameter and compute the suffix.
5177 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5178 element type and deal with an anonymous one.
5179 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5180 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5181 and remove reference to QUAL_UNION_TYPE.
5182 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5183 (dump_nested_type): ...here. New function extracted from above.
5184 Generate a full declaration for anonymous element type of arrays.
5185 (print_ada_declaration): Really skip anonymous declarations. Remove
5186 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5187 Clean up processing of declarations of array types and objects.
5188 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5189 Remove obsolete code and tidy up.
5191 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5194 * c-common.c (handle_transparent_union_attribute): Update
5197 2015-11-27 Martin Liska <mliska@suse.cz>
5200 * array-notation-common.c (cilkplus_extract_an_triplets):
5201 Release vector of vectors.
5202 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5204 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5207 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5208 (print_ada_struct_decl): Likewise.
5210 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5213 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5214 * cilk.c (recognize_spawn): Determine location in a more precise
5217 2015-11-19 Jason Merrill <jason@redhat.com>
5219 * c-common.c (shorten_compare): But look through macros from
5222 2015-11-18 Jason Merrill <jason@redhat.com>
5224 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5225 non-constant operand comes from a macro.
5227 2015-11-17 Jason Merrill <jason@redhat.com>
5230 * c-common.c (warn_tautological_cmp): Fold before checking for
5233 2015-11-16 Marek Polacek <polacek@redhat.com>
5236 * c-common.c (check_case_bounds): Fold low and high cases.
5238 2015-11-16 Marek Polacek <polacek@redhat.com>
5240 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5241 * c-common.c (c_common_get_alias_set): Likewise.
5242 (handle_visibility_attribute): Likewise.
5244 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5246 * c-common.c (handle_simd_attribute): New.
5247 (struct attribute_spec): Add entry for "simd".
5248 (handle_simd_attribute): New.
5250 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5252 * c-lex.c (interpret_float): Use fold_convert.
5254 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5256 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5257 and store it on the result.
5258 * c-opts.c (c_common_init_options): Set
5259 global_dc->colorize_source_p.
5261 2015-11-12 James Norris <jnorris@codesourcery.com>
5262 Joseph Myers <joseph@codesourcery.com>
5264 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5265 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5266 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5267 PRAGMA_OACC_CLAUSE_LINK.
5269 2015-11-11 Marek Polacek <polacek@redhat.com>
5273 * c-common.c (valid_array_size_p): New function.
5274 * c-common.h (valid_array_size_p): Declare.
5276 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5279 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5281 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5283 * array-notation-common.c: Remove unused header files.
5284 * c-ada-spec.c: Likewise.
5285 * c-cilkplus.c: Likewise.
5286 * c-common.c: Likewise.
5287 * c-cppbuiltin.c: Likewise.
5288 * c-dump.c: Likewise.
5289 * c-format.c: Likewise.
5290 * c-gimplify.c: Likewise.
5291 * c-indentation.c: Likewise.
5292 * c-lex.c: Likewise.
5293 * c-omp.c: Likewise.
5294 * c-opts.c: Likewise.
5295 * c-pch.c: Likewise.
5296 * c-ppoutput.c: Likewise.
5297 * c-pragma.c: Likewise.
5298 * c-pretty-print.c: Likewise.
5299 * c-semantics.c: Likewise.
5300 * c-ubsan.c: Likewise.
5302 * stub-objc.c: Likewise.
5304 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5305 Cesar Philippidis <cesar@codesourcery.com>
5306 James Norris <jnorris@codesourcery.com>
5307 Julian Brown <julian@codesourcery.com>
5308 Nathan Sidwell <nathan@codesourcery.com>
5310 * c-pragma.c (oacc_pragmas): Add "routine".
5311 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5313 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5315 * c-common.c (c_common_attributes): Add scalar_storage_order.
5316 (handle_scalar_storage_order_attribute): New function.
5317 * c-pragma.c (global_sso): New variable.
5318 (maybe_apply_pragma_scalar_storage_order): New function.
5319 (handle_pragma_scalar_storage_order): Likewise.
5320 (init_pragma): Register scalar_storage_order.
5321 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5322 * c.opt (Wscalar-storage-order): New warning.
5323 (fsso-struct=): New option.
5325 2015-11-08 Martin Sebor <msebor@redhat.com>
5327 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5329 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5331 * c-common.c: Don't undef DEF_BUILTIN.
5333 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5335 * c-common.c (c_cpp_error): Convert parameter from location_t to
5336 rich_location *. Eliminate the "column_override" parameter and
5337 the call to diagnostic_override_column.
5338 Update the "done_lexing" clause to set range 0
5339 on the rich_location, rather than overwriting a location_t.
5340 * c-common.h (c_cpp_error): Convert parameter from location_t to
5341 rich_location *. Eliminate the "column_override" parameter.
5343 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5344 Thomas Schwinge <thomas@codesourcery.com>
5345 James Norris <jnorris@codesourcery.com>
5347 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5348 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5349 clauses with parallel and kernels and loops.
5350 * c-pragma.h (enum pragma_omp_clause): Add entries for
5351 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5352 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5353 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5355 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5357 2015-11-05 Martin Sebor <msebor@redhat.com>
5360 * c.opt (-Wplacement-new): New option.
5362 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5364 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5365 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5366 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5367 save_expr or create_tmp_var* if TEST is true.
5368 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5369 Don't call add_stmt here.
5370 (struct c_omp_check_loop_iv_data): New type.
5371 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5372 c_omp_check_loop_iv_exprs): New functions.
5373 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5375 (c_omp_declare_simd_clauses_to_numbers): Change
5376 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5377 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5378 from numbers to PARM_DECLs.
5380 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5382 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5385 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5388 * c-common.h (fold_offsetof_1): Add argument.
5389 * c-common.c (fold_offsetof_1): Diagnose more invalid
5390 offsetof expressions that reference elements past the end of
5393 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5394 Chung-Lin Tang <cltang@codesourcery.com>
5396 * c-pragma.c (oacc_pragmas): Add "atomic".
5397 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5399 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5401 * c-common.c (handle_target_clones_attribute): New.
5402 (c_common_attribute_table): Add handle_target_clones_attribute.
5403 (handle_always_inline_attribute): Add check on target_clones attribute.
5404 (handle_target_attribute): Ditto.
5406 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5408 * array-notation-common.c: Reorder #include's and remove duplicates.
5409 * c-ada-spec.c: Likewise.
5410 * c-cilkplus.c: Likewise.
5411 * c-common.c: Likewise.
5412 * c-cppbuiltin.c: Likewise.
5413 * c-dump.c: Likewise.
5414 * c-format.c: Likewise.
5415 * c-gimplify.c: Likewise.
5416 * c-indentation.c: Likewise.
5417 * c-lex.c: Likewise.
5418 * c-omp.c: Likewise.
5419 * c-opts.c: Likewise.
5420 * c-pch.c: Likewise.
5421 * c-ppoutput.c: Likewise.
5422 * c-pragma.c: Likewise.
5423 * c-pretty-print.c: Likewise.
5424 * c-semantics.c: Likewise.
5425 * c-ubsan.c: Likewise.
5427 * stub-objc.c: Likewise.
5429 2015-10-28 Jason Merrill <jason@redhat.com>
5431 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5433 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5434 James Norris <jnorris@codesourcery.com>
5435 Cesar Philippidis <cesar@codesourcery.com>
5439 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5440 * c-omp.c (c_oacc_split_loop_clauses): New function.
5442 2015-10-21 Martin Sebor <msebor@redhat.com>
5445 * c.opt: End each sentence that describes an option with a period.
5447 2015-10-20 Marek Polacek <polacek@redhat.com>
5449 * array-notation-common.c (is_cilkplus_vector_p): Define.
5450 * c-common.h (is_cilkplus_vector_p): Declare.
5452 2015-10-20 Marek Polacek <polacek@redhat.com>
5454 * c.opt (std=gnu++11): Do not describe as experimental.
5455 (std=gnu++14): Likewise.
5457 2015-10-19 Jason Merrill <jason@redhat.com>
5459 * c-cppbuiltin.c (c_cpp_builtins): Define
5460 __cpp_nontype_template_args.
5462 2015-10-19 Jason Merrill <jason@redhat.com>
5464 * c-cppbuiltin.c (c_cpp_builtins): Define
5465 __cpp_enumerator_attributes, __cpp_fold_expressions,
5466 __cpp_unicode_characters.
5468 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5469 Aldy Hernandez <aldyh@redhat.com>
5471 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5472 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5473 (c_define_builtins): Likewise.
5474 * c-common.h (enum c_omp_clause_split): Add
5475 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5476 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5477 (c_finish_omp_for): Add ORIG_DECLV argument.
5478 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5479 201511 instead of 201307.
5480 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5481 OMP_CRITICAL_CLAUSES to it.
5482 (c_finish_omp_ordered): Add CLAUSES argument, set
5483 OMP_ORDERED_CLAUSES to it.
5484 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5485 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5486 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5487 constructs and new OpenMP 4.5 clauses. Clear
5488 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5490 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5491 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5492 (enum pragma_omp_clause): Add
5493 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5494 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5496 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5498 * c-lex.c (interpret_float): Use real_equal instead of
5501 2015-10-04 Jason Merrill <jason@redhat.com>
5503 Implement N4514, C++ Extensions for Transactional Memory.
5504 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5505 (c_common_attribute_table): Add transaction_safe_dynamic.
5506 transaction_safe now affects type identity.
5507 (handle_tm_attribute): Handle transaction_safe_dynamic.
5508 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5509 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5510 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5512 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5513 * c-pretty-print.c (pp_c_attributes_display): Don't print
5514 transaction_safe in C++.
5516 2015-10-02 Marek Polacek <polacek@redhat.com>
5518 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5520 2015-10-02 Marek Polacek <polacek@redhat.com>
5523 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5524 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5525 * c.opt (Wduplicated-cond): New option.
5527 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5529 * c.opt (std=c11): Do not describe as experimental.
5530 (std=gnu11): Likewise.
5531 (std=iso9899:2011): Likewise.
5533 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5535 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5536 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5538 2015-09-25 Marek Polacek <polacek@redhat.com>
5540 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5541 (ubsan_instrument_shift): Likewise.
5543 2015-09-25 Marek Polacek <polacek@redhat.com>
5546 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5548 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5550 * c-indentation.c (should_warn_for_misleading_indentation):
5551 Compare next_stmt_vis_column with guard_line_first_nws instead
5552 of with guard_line_vis_column.
5554 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5558 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5559 options and options not valid for the current language.
5561 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5563 * c-indentation.c (should_warn_for_misleading_indentation):
5564 Float out and consolidate the calls to get_visual_column that
5565 are passed guard_exploc as an argument. Compare
5566 next_stmt_vis_column with guard_line_first_nws instead of with
5567 body_line_first_nws.
5569 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5571 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5572 Wnamespaces): New C++ warnings.
5574 2015-09-22 Jason Merrill <jason@redhat.com>
5576 * c-common.h (abi_compat_version_crosses): New.
5577 (warn_abi_version): Declare.
5578 * c-common.c: Define it.
5579 * c-opts.c (c_common_post_options): Handle it.
5580 flag_abi_compat_version defaults to 8.
5582 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5584 Complete the implementation of N4230, Nested namespace definition.
5585 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5586 __cpp_nested_namespace_definitions.
5588 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5590 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5592 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5594 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5596 * c-pragma.h (pragma_lex): Add optional loc argument.
5598 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5600 * c-format.c (check_format_arg): Adjust to use common block size in all
5603 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5605 * c-format.c (location_from_offset): Update for change in
5606 signature of location_get_source_line.
5607 * c-indentation.c (get_visual_column): Likewise.
5608 (line_contains_hash_if): Likewise.
5610 2015-09-14 Marek Polacek <polacek@redhat.com>
5612 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5613 setting various warnings.
5615 2015-09-14 Marek Polacek <polacek@redhat.com>
5617 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5620 2015-09-11 Mark Wielaard <mjw@redhat.com>
5623 * c.opt (Wunused-variable): Option from common.opt.
5624 (Wunused-const-variable): New option.
5626 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5629 * c.opt ([Wsubobject-linkage]): Add.
5631 2015-09-03 Martin Sebor <msebor@redhat.com>
5634 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5636 * c-common.c (reject_gcc_builtin): Define.
5638 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5641 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5643 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5644 cilk_gimplify_call_params_in_spawned_fn.
5645 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5646 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5649 2015-08-25 Marek Polacek <polacek@redhat.com>
5652 * c-common.c (handle_weak_attribute): Don't check whether the
5653 visibility can be changed here.
5655 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5657 * c-lex.c (c_lex_with_flags): Use explicit locations.
5659 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5661 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5662 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5664 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5667 * c-common.c (check_builtin_function_arguments): Add check
5668 for BUILT_IN_SIGNBIT argument.
5670 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5673 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5676 2015-08-17 Marek Polacek <polacek@redhat.com>
5678 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5679 with whitespaces before qualifier names.
5681 2015-08-12 Marek Polacek <polacek@redhat.com>
5684 * c-common.c (maybe_warn_shift_overflow): Properly handle
5685 left-shifting 1 into the sign bit.
5687 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5689 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5691 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5692 Braden Obrzut <admin@maniacsvault.net>
5693 Jason Merrill <jason@redhat.com>
5695 Add C++ Concepts TS support.
5696 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5697 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5698 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5699 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5700 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5701 * c.opt (fconcepts): New.
5703 2015-08-02 Martin Sebor <msebor@redhat.com>
5705 * c.opt (-Wframe-address): New warning option.
5707 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5709 * c-indentation.c (should_warn_for_misleading_indentation):
5712 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5714 * c-indentation.c (get_visual_column): Add parameter first_nws,
5715 use it. Update comment documenting the function.
5716 (is_first_nonwhitespace_on_line): Remove.
5717 (should_warn_for_misleading_indentation): Replace usage of
5718 of is_first_nonwhitespace_on_line with get_visual_column.
5720 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5722 * c-indentation.h (struct token_indent_info): Define.
5723 (get_token_indent_info): Define.
5724 (warn_for_misleading_information): Declare.
5725 * c-common.h (warn_for_misleading_information): Remove.
5726 * c-identation.c (warn_for_misleading_indentation):
5727 Change declaration to take three token_indent_infos. Adjust
5729 * c-identation.c (should_warn_for_misleading_indentation):
5730 Likewise. Bail out early if the body is a compound statement.
5731 (guard_tinfo_to_string): Define.
5733 2015-07-30 Jason Merrill <jason@redhat.com>
5735 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5736 '*' for reference decay.
5738 2015-07-30 Marek Polacek <polacek@redhat.com>
5740 * c-common.c (warn_tautological_cmp): Bail for float types.
5742 2015-07-27 Marek Polacek <polacek@redhat.com>
5745 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5747 2015-07-27 Marek Polacek <polacek@redhat.com>
5751 * c-common.c (find_array_ref_with_const_idx_r): New function.
5752 (warn_tautological_cmp): New function.
5753 * c-common.h (warn_tautological_cmp): Declare.
5754 * c.opt (Wtautological-compare): New option.
5756 2015-07-23 Marek Polacek <polacek@redhat.com>
5758 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5759 (ubsan_instrument_shift): Likewise.
5761 2015-07-23 Marek Polacek <polacek@redhat.com>
5764 * c-ubsan.c: Include gimplify.h.
5765 (ubsan_instrument_division): Unshare OP0 and OP1.
5766 (ubsan_instrument_shift): Likewise.
5768 2015-07-20 Marek Polacek <polacek@redhat.com>
5769 Richard Sandiford <richard.sandiford@arm.com>
5772 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5773 Use EXPR_LOC_OR_LOC.
5774 (maybe_warn_shift_overflow): New function.
5775 * c-common.h (maybe_warn_shift_overflow): Declare.
5776 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5777 * c.opt (Wshift-overflow): New option.
5779 2015-07-16 Martin Liska <mliska@suse.cz>
5781 * c-format.c (static void check_format_info_main): Use
5782 object_allocator instead of pool_allocator.
5783 (check_format_arg): Likewise.
5784 (check_format_info_main): Likewise.
5786 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
5788 * c-opts.c: Remove multiline #include comment.
5790 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
5792 * c-common.c: Fix double word typos.
5794 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5796 * c-ada-spec.h (cpp_operation): Revert latest change.
5797 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5798 constructors and destructors.
5800 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5802 * c-common.h: Adjust includes for flags.h changes.
5803 * stub-objc.c: Likewise.
5805 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5807 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5808 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5810 2015-07-08 Jakub Jelinek <jakub@redhat.com>
5812 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5813 are to be removed, return NULL rather than original clauses list.
5815 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5817 * array-notation-common.c: Adjust includes.
5818 * c-ada-spec.c: Likewise.
5819 * c-cilkplus.c: Likewise.
5820 * c-common.h: Likewise.
5821 * c-cppbuiltin.c: Likewise.
5822 * c-dump.c: Likewise.
5823 * c-format.c: Likewise.
5824 * c-gimplify.c: Likewise.
5825 * c-indentation.c: Likewise.
5826 * c-lex.c: Likewise.
5827 * c-omp.c: Likewise.
5828 * c-opts.c: Likewise.
5829 * c-pch.c: Likewise.
5830 * c-ppoutput.c: Likewise.
5831 * c-pragma.c: Likewise.
5832 * c-pretty-print.c: Likewise.
5833 * c-semantics.c: Likewise.
5834 * c-ubsan.c: Likewise.
5836 * stub-objc.c: Likewise.
5838 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5840 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5841 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5843 2015-07-01 Jason Merrill <jason@redhat.com>
5845 * c-common.h (D_CXX11): Rename from D_CXX0X.
5846 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5847 * c-common.c: Adjust.
5849 * c-opts.c (c_common_post_options): Default to C++14.
5851 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5853 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5855 Implement N4197 - Adding u8 character literals
5856 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
5858 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
5859 CPP_UTF8CHAR_USERDEF tokens.
5860 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
5861 and CPP_UTF8CHAR tokens.
5862 (lex_charconst): Treat CPP_UTF8CHAR token.
5864 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5867 * c-common.c (do_warn_unused_parameter): Move here.
5868 * c-common.h (do_warn_unused_parameter): Declare.
5870 2015-06-29 Marek Polacek <polacek@redhat.com>
5873 * c-common.c (check_case_bounds): Add bool * parameter. Set
5875 (c_add_case_label): Add bool * parameter. Pass it down to
5877 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5879 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5882 2015-06-27 Marek Polacek <polacek@redhat.com>
5884 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5885 or VECTOR_INTEGER_TYPE_P throughout.
5886 * c-gimplify.c: Likewise.
5888 2015-06-26 Marek Polacek <polacek@redhat.com>
5890 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5891 * c-common.c (c_fully_fold_internal): Likewise.
5892 (c_alignof_expr): Likewise.
5893 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5894 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
5895 * cilk.c (create_parm_list): Likewise.
5897 2015-06-26 Marek Polacek <polacek@redhat.com>
5899 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5901 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5903 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5904 * c-gimplify.c: Likewise.
5905 * c-pragma.c: Likewise.
5906 * c-ubsan.c: Likewise.
5909 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5911 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5914 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5916 * cilk.c: Move calls.h after tm.h in the include chain.
5918 2015-06-25 Marek Polacek <polacek@redhat.com>
5920 * array-notation-common.c: Use VAR_P throughout.
5921 * c-ada-spec.c: Likewise.
5922 * c-common.c: Likewise.
5923 * c-format.c: Likewise.
5924 * c-gimplify.c: Likewise.
5925 * c-omp.c: Likewise.
5926 * c-pragma.c: Likewise.
5927 * c-pretty-print.c: Likewise.
5930 2015-06-25 Marek Polacek <polacek@redhat.com>
5932 * cilk.c (extract_free_variables): Use is_global_var.
5934 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5936 * c-common.c: Don't include target-def.h.
5938 2015-06-23 Marek Polacek <polacek@redhat.com>
5940 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5941 when comparing INTEGER_CSTs.
5943 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5945 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5946 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5947 (dump_ada_template): Skip partially specialized types.
5949 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5951 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5954 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5956 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5957 * c-ada-spec.c: Likewise.
5958 * c-cilkplus.c: Likewise.
5959 * c-common.c: Likewise.
5960 * c-common.h: Likewise.
5961 * c-cppbuiltin.c: Likewise.
5962 * c-dump.c: Likewise.
5963 * c-format.c: Likewise.
5964 * c-gimplify.c: Likewise.
5965 * c-indentation.c: Likewise.
5966 * c-lex.c: Likewise.
5967 * c-omp.c: Likewise.
5968 * c-opts.c: Likewise.
5969 * c-pch.c: Likewise.
5970 * c-ppoutput.c: Likewise.
5971 * c-pragma.c: Likewise.
5972 * c-pretty-print.c: Likewise.
5973 * c-semantics.c: Likewise.
5974 * c-ubsan.c: Likewise.
5976 * stub-objc.c: Likewise.
5978 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5981 * c-common.c (c_common_truthvalue_conversion): Warn when
5982 converting an address of a reference to a truth value.
5984 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5986 * array-notation-common.c : Adjust include files.
5987 * c-ada-spec.c : Likewise.
5988 * c-cilkplus.c : Likewise.
5989 * c-common.c : Likewise.
5990 * c-common.h : Likewise.
5991 * c-cppbuiltin.c : Likewise.
5992 * c-dump.c : Likewise.
5993 * c-format.c : Likewise.
5994 * c-gimplify.c : Likewise.
5995 * c-indentation.c : Likewise.
5996 * c-lex.c : Likewise.
5997 * c-omp.c : Likewise.
5998 * c-opts.c : Likewise.
5999 * c-pch.c : Likewise.
6000 * c-ppoutput.c : Likewise.
6001 * c-pragma.c : Likewise.
6002 * c-pretty-print.c : Likewise.
6003 * c-semantics.c : Likewise.
6004 * c-ubsan.c : Likewise.
6005 * cilk.c : Likewise.
6006 * stub-objc.c : Likewise.
6008 2015-06-08 Marek Polacek <polacek@redhat.com>
6011 * c-format.c (location_from_offset): Return LOC if LINE is null.
6013 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
6015 * c-common.h (c_parse_final_cleanups): New prototype.
6016 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
6018 2015-06-04 Sriraman Tallam <tmsriram@google.com>
6020 * c-common.c (noplt): New attribute.
6021 (handle_noplt_attribute): New handler.
6023 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
6025 * array-notation-common.c: Adjust includes for restructured coretypes.h.
6026 * c-ada-spec.c: Likewise.
6027 * c-cilkplus.c: Likewise.
6028 * c-common.c: Likewise.
6029 * c-common.h: Likewise.
6030 * c-cppbuiltin.c: Likewise.
6031 * c-dump.c: Likewise.
6032 * c-format.c: Likewise.
6033 * c-gimplify.c: Likewise.
6034 * c-indentation.c: Likewise.
6035 * c-lex.c: Likewise.
6036 * c-omp.c: Likewise.
6037 * c-opts.c: Likewise.
6038 * c-pch.c: Likewise.
6039 * c-ppoutput.c: Likewise.
6040 * c-pragma.c: Likewise.
6041 * c-pretty-print.c: Likewise.
6042 * c-semantics.c: Likewise.
6043 * c-ubsan.c: Likewise.
6045 * stub-objc.c: Likewise.
6047 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6050 * c-indentation.c (should_warn_for_misleading_indentation): Use
6051 expand_location rather than expand_location_to_spelling_point.
6052 Don't warn if the guarding statement is more indented than the
6055 2015-06-02 David Malcolm <dmalcolm@redhat.com>
6057 * c-indentation.c (warn_for_misleading_indentation): Bail out
6058 immediately if -Wmisleading-indentation isn't enabled.
6060 2015-06-01 Martin Liska <mliska@suse.cz>
6062 * c-format.c (check_format_arg):Use new type-based pool allocator.
6063 (check_format_info_main) Likewise.
6065 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
6067 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
6068 (has_nontrivial_methods): Likewise.
6070 2015-05-25 Marek Polacek <polacek@redhat.com>
6072 * c-ubsan.c (ubsan_instrument_shift): Use type0.
6074 2015-05-22 Marek Polacek <polacek@redhat.com>
6077 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
6079 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6081 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
6082 STACK_GROWS_DOWNWARD.
6084 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
6086 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
6087 STACK_GROWS_DOWNWARD rather than if it is defined.
6089 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6092 * c-format.c (location_column_from_byte_offset): New.
6093 (location_from_offset): New.
6094 (struct format_wanted_type): Add offset_loc field.
6095 (check_format_info): Move handling of location for extra arguments
6096 closer to the point of warning.
6097 (check_format_info_main): Pass the result of location_from_offset
6099 (format_type_warning): Pass the result of location_from_offset
6102 2015-05-20 Marek Polacek <polacek@redhat.com>
6104 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
6106 2015-05-20 Marek Polacek <polacek@redhat.com>
6108 * c-ada-spec.c (dump_sloc): Use DECL_P.
6110 2015-05-20 Marek Polacek <polacek@redhat.com>
6112 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
6113 * c-common.c: Likewise.
6115 2015-05-19 David Malcolm <dmalcolm@redhat.com>
6117 * c-common.h (fe_file_change): Strengthen param from
6118 const line_map * to const line_map_ordinary *.
6119 (pp_file_change): Likewise.
6120 * c-lex.c (fe_file_change): Likewise.
6121 (cb_define): Use linemap_check_ordinary when invoking
6123 (cb_undef): Likewise.
6124 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6125 invoking cb_file_change.
6126 (c_finish_options): Likewise.
6127 (push_command_line_include): Likewise.
6128 (cb_file_change): Strengthen param "new_map" from
6129 const line_map * to const line_map_ordinary *.
6130 * c-ppoutput.c (cb_define): Likewise for local "map".
6131 (pp_file_change): Likewise for param "map" and local "from".
6133 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6135 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6137 2015-05-18 Tom de Vries <tom@codesourcery.com>
6139 * c-common.c (build_va_arg_1): New function.
6140 (build_va_arg): Add address operator to va_list operand if necessary.
6142 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6145 * c-common.c (int_safely_convertible_to_real_p): Define.
6146 (unsafe_conversion_p): Check conversions involving complex types.
6147 (conversion_warning): Add new warning message for conversions which
6148 discard imaginary component.
6149 * c-common.h: (enum conversion_safety): Add new enumerator for such
6152 2015-05-14 Marek Polacek <polacek@redhat.com>
6156 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6157 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6158 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6159 use it. If FOR_INT_CONST, require that all evaluated operands be
6162 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6164 * c-common.h (warn_for_misleading_indentation): New prototype.
6165 * c-indentation.c: New file.
6166 * c.opt (Wmisleading-indentation): New option.
6168 2015-05-12 Tom de Vries <tom@codesourcery.com>
6170 PR tree-optimization/66010
6171 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6173 2015-05-09 Jason Merrill <jason@redhat.com>
6175 * c-opts.c (c_common_post_options): Also clear
6176 cpp_opts->cpp_warn_cxx11_compat.
6178 * c-common.h (enum cxx_dialect): Add cxx_unset.
6179 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6180 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6182 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6183 (std=gnu++0x): Mark as Undocumented.
6184 (std=gnu++1y): Add deprecated message.
6186 2015-05-08 Jason Merrill <jason@redhat.com>
6188 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6191 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6193 2015-05-08 Marek Polacek <polacek@redhat.com>
6196 * c.opt (Woverride-init-side-effects): New option.
6198 2015-05-07 Marek Polacek <polacek@redhat.com>
6201 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6203 * c.opt (Wshift-negative-value): New option.
6204 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6205 when -Wextra and C99/C++11 mode.
6207 2015-05-07 Marek Polacek <polacek@redhat.com>
6208 Martin Uecker <uecker@eecs.berkeley.edu>
6210 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6211 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6213 2015-05-05 Jason Merrill <jason@redhat.com>
6215 * c.opt (Wterminate): New.
6217 2015-04-30 Marek Polacek <polacek@redhat.com>
6219 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6220 require that the non-constant be of a boolean type.
6222 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6224 * c-common.c (handle_section_attribute): Refactor to reduce
6225 nesting and distinguish between error cases.
6227 2015-04-29 Marek Polacek <polacek@redhat.com>
6230 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6233 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6235 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6236 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6237 HOST_BITS_PER_WIDE_INT.
6239 2015-04-28 Tom de Vries <tom@codesourcery.com>
6241 PR tree-optimization/65887
6242 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6244 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6245 Pierre-Marie de Rodat <derodat@adacore.com>
6247 * c-ada-spec.c (in_function): Delete.
6248 (dump_generic_ada_node): Do not change in_function and remove the
6249 redundant code dealing with it.
6250 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6251 (print_ada_methods): Output the static member functions in a nested
6252 package after the regular methods as well as associated renamings.
6254 2015-04-24 Marek Polacek <polacek@redhat.com>
6257 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6258 and OPT_Wshift_count_overflow.
6261 * c-common.c (warn_logical_operator): Warn if the operands have the
6264 2015-04-24 Marek Polacek <polacek@redhat.com>
6267 * c-common.c (warn_logical_operator): Bail if either operand comes
6268 from a macro expansion.
6270 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6273 * c-common.c (c_default_pointer_mode): Add definition.
6274 * c-common.h (c_default_pointer_mode): Add declaration.
6276 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6278 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6279 on record_builtin_type argument.
6281 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6284 * c-common.c (warn_logical_not_parentheses): Don't warn for
6287 2015-03-07 Marek Polacek <polacek@redhat.com>
6290 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6291 before trying to figure out whether we have a flexible array member.
6293 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6294 Jonathan Wakely <jwakely.gcc@gmail.com>
6296 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6298 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6301 * c-ada-spec.c (print_destructor): Remove obsolete code.
6303 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6305 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6306 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6307 DECL_TEMPLATE_RESULT emulations.
6308 (dump_ada_template)): Add guard for TYPE_METHODS.
6310 2015-02-27 Marek Polacek <polacek@redhat.com>
6313 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6315 2015-02-27 Kai Tietz <ktietz@redhat.com>
6318 * c-pragma.c (handle_pragma_weak): Do not try to create
6319 weak/alias of declarations not being function, or variable
6322 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6325 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6327 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6329 2015-02-16 Marek Polacek <polacek@redhat.com>
6332 * c-format.c (check_format_types): Handle null param.
6334 2015-02-13 Marek Polacek <polacek@redhat.com>
6337 * c-format.c (check_format_types): Don't warn about different
6338 signedness if the original value is in the range of WANTED_TYPE.
6340 2015-02-12 Jason Merrill <jason@redhat.com>
6343 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6344 to the current highest version.
6345 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6347 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6351 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6352 instead of RDIV_EXPR. Use build_binary_op instead of
6355 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6357 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6358 to pass input_location as first argument.
6360 2015-01-23 Tom de Vries <tom@codesourcery.com>
6363 * c.opt (fopenacc): Mark as LTO option.
6365 2015-01-23 Tom de Vries <tom@codesourcery.com>
6368 * c.opt (fopenmp): Mark as LTO option.
6370 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6373 * cilk.c (fill_decls_vec): Only put decls into vector v.
6374 (compare_decls): Fix up formatting.
6376 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6379 * cilk.c: Include vec.h.
6380 (struct cilk_decls): New structure.
6381 (wrapper_parm_cb): Split this function to...
6382 (fill_decls_vec): ...this...
6383 (create_parm_list): ...and this.
6384 (compare_decls): New function.
6385 (for_local_cb): Remove.
6386 (wrapper_local_cb): Ditto.
6387 (build_wrapper_type): For now first traverse and fill vector of
6388 declarations then sort it and then deal with sorted vector.
6389 (cilk_outline): Ditto.
6390 (declare_one_free_variable): Ditto.
6392 2015-01-21 Jason Merrill <jason@redhat.com>
6395 * c-format.c (check_format_arg): Call decl_constant_value.
6397 2015-01-19 Martin Liska <mliska@suse.cz>
6399 * c-common.c (handle_noicf_attribute): New function.
6401 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6402 Bernd Schmidt <bernds@codesourcery.com>
6403 James Norris <jnorris@codesourcery.com>
6404 Cesar Philippidis <cesar@codesourcery.com>
6405 Ilmir Usmanov <i.usmanov@samsung.com>
6406 Jakub Jelinek <jakub@redhat.com>
6408 * c.opt (fopenacc): New option.
6409 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6410 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6412 * c-common.h (c_finish_oacc_wait): New prototype.
6413 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6414 (c_finish_oacc_wait): New function.
6415 * c-pragma.c (oacc_pragmas): New variable.
6416 (c_pp_lookup_pragma, init_pragma): Handle it.
6417 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6418 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6419 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6420 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6421 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6422 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6423 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6424 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6425 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6426 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6427 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6428 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6429 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6430 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6431 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6432 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6433 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6434 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6435 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6436 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6437 PRAGMA_OACC_CLAUSE_WORKER.
6439 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6441 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6442 for the new option fstack-protector_explicit.
6443 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6444 (handle_stack_protect_attribute): New function.
6446 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6448 * c.opt: New option -Warray-bounds=.
6450 2015-01-09 Michael Collison <michael.collison@linaro.org>
6452 * array-notation-common.c: Include hash-set.h, machmode.h,
6453 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6454 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6455 * c-ada-spec.c: Ditto.
6456 * c-cilkplus.c: Ditto.
6457 * c-common.c: Include input.h due to flattening of tree.h.
6458 Define macro GCC_C_COMMON_C.
6459 * c-common.h: Flatten tree.h header files into c-common.h.
6460 Remove include of tree-core.h.
6461 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6462 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6463 fold-const.h, wide-int.h, and inchash.h due to
6464 flattening of tree.h.
6466 * c-format.c: Flatten tree.h header files into c-common.h.
6467 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6468 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6469 fold-const.h, wide-int.h, and inchash.h due to
6470 flattening of tree.h.
6471 * c-dump.c: Include hash-set.h, machmode.h,
6472 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6473 fold-const.h, wide-int.h, and inchash.h due to
6474 flattening of tree.h.
6475 * c-format.c: Include hash-set.h, machmode.h,
6476 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6477 fold-const.h, wide-int.h, inchash.h and real.h due to
6478 flattening of tree.h.
6479 * c-gimplify.c: Include hash-set.h, machmode.h,
6480 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6481 fold-const.h, wide-int.h, and inchash.h due to
6482 flattening of tree.h.
6488 * c-ppoutput.c: Ditto.
6489 * c-pragma.c: Ditto.
6490 * c-pretty-print.c: Ditto.
6491 * c-semantics.c: Ditto.
6493 * stub-objc.c: Ditto.
6495 2015-01-08 Jason Merrill <jason@redhat.com>
6497 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6498 do_ubsan_in_current_function.
6499 (ubsan_maybe_instrument_reference_or_call): Likewise.
6500 * c-ubsan.h: Declare it.
6502 2015-01-08 Mike Stump <mikestump@comcast.net>
6504 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6506 2015-01-07 Marek Polacek <polacek@redhat.com>
6509 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6510 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6512 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6515 * c.opt (Wsuggest-override): New option.
6517 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6519 Update copyright years.
6521 2015-01-05 Marek Polacek <polacek@redhat.com>
6524 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6526 * c-common.h (warn_array_subscript_with_type_char): Update
6529 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6531 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6532 Control macro with flag_sized_deallocation.
6534 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6536 * c.opt (Wdiscarded-array-qualifiers): New option.
6538 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6540 PR preprocessor/63831
6541 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6542 and __has_cpp_attribute here.
6543 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6544 c_common_has_attribute.
6545 * c-common.h (c_common_has_attribute): New prototype.
6546 * c-lex.c (init_c_lex): Set cb->has_attribute to
6547 c_common_has_attribute instead of cb_has_attribute.
6548 (get_token_no_padding): New function.
6549 (cb_has_attribute): Renamed to ...
6550 (c_common_has_attribute): ... this. No longer static. Use
6551 get_token_no_padding, require ()s, don't build TREE_LIST
6552 unnecessarily, fix up formatting, adjust diagnostics, call
6555 2014-12-15 Jason Merrill <jason@redhat.com>
6557 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6558 (-Wsized-deallocation): New.
6559 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6560 to on in C++14 and up.
6562 2014-12-11 Jason Merrill <jason@redhat.com>
6564 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6566 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6567 we aren't complaining about VLAs.
6569 2014-12-06 Marek Polacek <polacek@redhat.com>
6571 PR tree-optimization/64183
6572 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6573 shift-expression if it is integer_type_node. Use types_compatible_p.
6575 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6577 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6578 last argument from create_tmp_var_raw and create_tmp_var calls.
6579 * cilk.c (gimplify_cilk_spawn): Likewise.
6580 * c-omp.c (c_finish_omp_atomic): Likewise.
6582 2014-11-28 Marek Polacek <polacek@redhat.com>
6584 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6585 instead of unsigned_type_node.
6587 2014-11-28 Marek Polacek <polacek@redhat.com>
6590 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6592 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6593 expression to unsigned_type_node.
6595 2014-11-20 Mark Wielaard <mjw@redhat.com>
6598 * c-opts.c (set_std_c89): Set lang_hooks.name.
6599 (set_std_c99): Likewise.
6600 (set_std_c11): Likewise.
6601 (set_std_cxx98): Likewise.
6602 (set_std_cxx11): Likewise.
6603 (set_std_cxx14): Likewise.
6604 (set_std_cxx1z): Likewise.
6606 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6609 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6610 return type to bool.
6611 * c-common.c: Include gimple-expr.h.
6612 (convert_vector_to_pointer_for_subscript): Change return type to
6613 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6614 and copy it into a TARGET_EXPR and use that instead of *vecp
6617 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6619 Merger of git branch "gimple-classes-v2-option-3".
6620 * ChangeLog.gimple-classes: New.
6621 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6622 from being just a vec<gimple> to a vec<gbind *>.
6624 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6627 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6628 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6629 get_pointer_alignment for non-pointers. Use ptype, or if it is
6630 reference type, corresponding pointer type, as type of kind
6632 (ubsan_maybe_instrument_reference,
6633 ubsan_maybe_instrument_member_call): Adjust callers.
6635 2014-11-15 Marek Polacek <polacek@redhat.com>
6638 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6640 (extract_array_notation_exprs): Return for NULL node.
6642 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6644 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6645 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6647 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6650 * c-common.c (check_builtin_function_arguments): Handle
6651 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6653 2014-11-10 Andi Kleen <ak@linux.intel.com>
6656 * c-common.h (check_no_cilk): Declare.
6657 * cilk.c (get_error_location): New function.
6658 (check_no_cilk): Dito.
6660 2014-11-10 Andi Kleen <ak@linux.intel.com>
6662 * cilk.c (recognize_spawn): Use expression location
6665 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6667 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6669 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6671 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6672 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6673 (__cpp_range_based_for, __cpp_initializer_lists,
6674 __cpp_delegating_constructors, __cpp_nsdmi,
6675 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6676 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6677 __has_cpp_attribute.
6678 * c-lex.c (cb_has_attribute): New callback CPP function;
6679 (init_c_lex): Set has_attribute callback.
6681 2014-11-04 Richard Biener <rguenther@suse.de>
6683 * c-common.c (shorten_compare): Do not shorten mixed
6684 DFP and non-DFP compares.
6686 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6688 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6689 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6690 Commentary and rearrangement of tests.
6691 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6692 Commentary and rearrangement of tests.
6693 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
6694 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6696 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6698 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6699 enum from machine_mode.
6701 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6703 * c-common.c: Adjust include files.
6704 * c-gimplify.c: Ditto.
6706 * c-pragma.c: Ditto.
6709 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6711 * c-gimplify.c: Adjust include files.
6713 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6716 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6717 c_common_initialize_diagnostics.
6718 * c-common.h: Likewise.
6720 2014-10-24 Marek Polacek <polacek@redhat.com>
6723 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6724 print "struct"/"union"/"enum" for typedefed names.
6726 2014-10-23 Marek Polacek <polacek@redhat.com>
6728 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6731 2014-10-22 Jakub Jelinek <jakub@redhat.com>
6732 Yury Gribov <y.gribov@samsung.com>
6734 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6735 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6736 instead of flag_sanitize_recover as bool flag.
6738 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6740 * cilk.c: Revert previous change.
6742 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6745 * cilk.c: Include vec.h.
6746 (struct cilk_decls): New structure.
6747 (wrapper_parm_cb): Split this function to...
6748 (fill_decls_vec): ...this...
6749 (create_parm_list): ...and this.
6750 (compare_decls): New function.
6751 (for_local_cb): Remove.
6752 (wrapper_local_cb): Ditto.
6753 (build_wrapper_type): For now first traverse and fill vector of
6754 declarations then sort it and then deal with sorted vector.
6755 (cilk_outline): Ditto.
6756 (declare_one_free_variable): Ditto.
6758 2014-10-17 Marek Polacek <polacek@redhat.com>
6760 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6761 * c.opt (Wimplicit-int): Initialize to -1.
6763 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6765 * c-pragma.c: Adjust include files.
6766 * c-semantics.c: Likewise.
6768 2014-10-16 DJ Delorie <dj@redhat.com>
6770 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6773 2014-10-14 Jason Merrill <jason@redhat.com>
6776 * c-common.h (CPP_PREPARSED_EXPR): New.
6777 (N_CP_TTYPES): Adjust.
6779 2014-10-15 Marek Polacek <polacek@redhat.com>
6781 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6783 2014-10-14 DJ Delorie <dj@redhat.com>
6785 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6786 types, not just __int128.
6787 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6788 types, not just __int128.
6789 (cpp_atomic_builtins): Round pointer sizes up.
6790 (type_suffix): Use type precision, not specific types.
6791 * c-common.c (c_common_reswords): Remove __int128 special case.
6792 (c_common_type_for_size): Check for all __intN types, not just
6794 (c_common_type_for_mode): Likewise.
6795 (c_common_signed_or_unsigned_type): Likewise.
6796 (c_build_bitfield_integer_type): Likewise.
6797 (c_common_nodes_and_builtins): Likewise.
6798 (keyword_begins_type_specifier): Likewise.
6799 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6802 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6804 * c-common.c: Use hash_table instead of hashtab.
6806 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6808 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
6811 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
6816 * c-common.c (warn_logical_operator): Punt for vectors.
6818 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6820 Implement SD-6: SG10 Feature Test Recommendations
6821 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6822 macros and the __has_header macro.
6824 2014-09-30 Jason Merrill <jason@redhat.com>
6826 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6827 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6828 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6830 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6831 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6833 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6834 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6836 2014-09-24 Marek Polacek <polacek@redhat.com>
6840 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6842 2014-09-23 Andi Kleen <ak@linux.intel.com>
6844 * c-common.c (handle_no_reorder_attribute): New function.
6845 (c_common_attribute_table): Add no_reorder attribute.
6847 2014-09-22 Joseph Myers <joseph@codesourcery.com>
6849 * c-cppbuiltin.c (c_cpp_builtins): Define
6850 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6853 2014-09-18 Joseph Myers <joseph@codesourcery.com>
6855 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6856 for supported floating-point modes.
6858 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6860 * c.opt (Wpsabi): Use LangEnabledBy.
6861 * c-opts.c (c_common_handle_option): Do not handle here.
6863 2014-09-12 Joseph Myers <joseph@codesourcery.com>
6865 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6866 macros for floating-point modes.
6868 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
6871 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6872 __*_DENORM_MIN__ without denormals.
6874 2014-09-10 Jakub Jelinek <jakub@redhat.com>
6876 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6877 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6878 ubsan_create_data callers.
6879 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6880 index is constant or BIT_AND_EXPR with constant mask and is
6881 small enough for the bound.
6882 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6883 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6885 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6887 * c.opt: Add CppReason to various flags.
6888 (Wdate-time): Re-sort.
6889 * c-common.c: Include c-common.h earlier.
6890 (struct reason_option_codes_t): Delete.
6891 (c_option_controlling_cpp_error): Prefix global type and struct
6894 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6896 * c.opt (Wnormalized): New.
6897 (Wnormalized=): Use Enum and Reject Negative.
6898 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6900 2014-09-08 Joseph Myers <joseph@codesourcery.com>
6902 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6903 digits of floating-point modes if -fbuilding-libgcc.
6905 2014-09-05 Joseph Myers <joseph@codesourcery.com>
6907 * c-cppbuiltin.c (c_cpp_builtins): Also define
6908 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6909 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6910 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6911 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6912 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6913 __LIBGCC_STACK_GROWS_DOWNWARD__,
6914 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6915 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6916 __LIBGCC_DWARF_FRAME_REGISTERS__,
6917 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6918 __LIBGCC_STACK_POINTER_REGNUM__ and
6919 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6920 (builtin_define_with_value): Handle backslash-escaping in string
6923 2014-09-05 Richard Biener <rguenther@suse.de>
6926 * c-format.c (check_format_arg): Properly handle
6927 effectively signed POINTER_PLUS_EXPR offset.
6929 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6931 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6932 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6933 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6935 * c-opts.c (c_common_handle_option): Do not handle here.
6936 (sanitize_cpp_opts): Likewise.
6937 * c-common.c (struct reason_option_codes_t): Handle
6938 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6940 2014-09-03 Marek Polacek <polacek@redhat.com>
6942 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6944 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6945 Balaji V. Iyer <balaji.v.iyer@intel.com>
6946 Igor Zamyatin <igor.zamyatin@intel.com>
6948 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6949 * c-common.c (c_common_reswords): Added _Cilk_for.
6950 * c-common.h (enum rid): Added RID_CILK_FOR.
6951 (cilk_for_number_of_iterations): Add declaration.
6952 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6954 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6955 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6957 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6959 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6960 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6961 Wundef): Use CPP, Var and Init.
6962 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6964 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6966 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6967 * c-opts.c (c_common_handle_option): Do not handle here.
6969 2014-08-25 Jason Merrill <jason@redhat.com>
6971 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6972 -std=c++14 and -std=gnu++14, rather than the reverse.
6973 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6974 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6975 * c-common.h (cxx_dialect): Remove cxx1y.
6977 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6979 * c-common.h (enum cxx_dialect): Add cxx14.
6980 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6981 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6982 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6984 2014-08-22 Jason Merrill <jason@redhat.com>
6986 * c.opt (std=gnu++17): Fix alias.
6988 2014-08-22 Marek Polacek <polacek@redhat.com>
6991 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6992 check for vector types. Drop LHS argument.
6993 * c-common.h (warn_logical_not_parentheses): Adjust.
6995 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6997 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6998 (Wmultichar): Likewise.
6999 (Wdate-time): Use C-family languages instead of Common. Use CPP
7001 * c-opts.c (c_common_handle_option): Do not handle the above
7003 (sanitize_cpp_opts): Likewise.
7005 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
7008 * c-opts.c: Include tree-diagnostics.h.
7009 (c_diagnostic_finalizer): New.
7010 (c_common_initialize_diagnostics): Use it.
7012 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7014 PR preprocessor/51303
7015 * c-common.c (struct reason_option_codes_t option_codes):
7016 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
7018 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7022 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
7023 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
7024 (c_common_post_options): Call init_global_opts_from_cpp.
7025 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
7027 2014-08-19 Marek Polacek <polacek@redhat.com>
7030 * c-common.c (maybe_warn_bool_compare): New function.
7031 * c-common.h (maybe_warn_bool_compare): Declare.
7032 * c.opt (Wbool-compare): New option.
7034 2014-08-19 Marek Polacek <polacek@redhat.com>
7036 * c.opt (Wc99-c11-compat): New option.
7038 2014-08-19 Marek Polacek <polacek@redhat.com>
7040 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
7041 to warn_c90_c99_compat.
7042 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
7045 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
7046 Steven Bosscher <steven@gcc.gnu.org>
7049 * c-format.c: Add extra_arg_loc and format_string_loc to struct
7050 format_check_results.
7051 (check_function_format): Use true and add comment for boolean
7053 (finish_dollar_format_checking): Use explicit location when warning.
7054 (check_format_info): Likewise.
7055 (check_format_arg): Set extra_arg_loc and format_string_loc.
7056 (check_format_info_main): Use explicit location when warning.
7057 (check_format_types): Pass explicit location.
7058 (format_type_warning): Likewise.
7060 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7063 * c-format.c: Handle Fortran flags.
7065 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
7068 * array-notation-common.c (find_rank): Added handling for other
7069 types of references.
7071 2014-08-10 Marek Polacek <polacek@redhat.com>
7074 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
7075 * c.opt (Wc90-c99-compat): Add option.
7077 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
7079 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
7081 2014-08-03 Marek Polacek <polacek@redhat.com>
7083 * c-common.c (check_case_value): Add location_t parameter. Use it.
7084 (c_add_case_label): Pass loc to check_case_value.
7086 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7088 * cilk.c: Use hash_map instead of pointer_map.
7090 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
7092 * c-gimplify.c: Use hash_set instead of pointer_set.
7094 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
7097 * array-notation-common.c (extract_array_notation_exprs): Handling
7100 2014-08-01 Jakub Jelinek <jakub@redhat.com>
7102 * c-common.h (min_align_of_type): Removed prototype.
7103 * c-common.c (min_align_of_type): Removed.
7104 * c-ubsan.h (ubsan_maybe_instrument_reference,
7105 ubsan_maybe_instrument_member_call): New prototypes.
7106 * c-ubsan.c: Include stor-layout.h and builtins.h.
7107 (ubsan_maybe_instrument_reference_or_call,
7108 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
7111 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
7114 * c.opt (-Wreturn-local-addr): Move to common.opt.
7116 2014-07-30 Jason Merrill <jason@redhat.com>
7121 * c.opt (-fuse-all-virtuals): New.
7123 2014-07-30 Tom Tromey <tromey@redhat.com>
7126 * c.opt (Wdesignated-init): New option.
7127 * c-common.c (c_common_attribute_table): Add "designated_init".
7128 (handle_designated_init): New function.
7130 2014-07-24 Marek Polacek <polacek@redhat.com>
7133 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7135 2014-07-16 Dodji Seketeli <dodji@redhat.com>
7137 PR preprocessor/60723 - missing system-ness marks for macro tokens
7138 * c-ppoutput.c (struct print::prev_was_system_token): New data
7140 (init_pp_output): Initialize it.
7141 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7142 (do_line_change): Return a flag saying if a line marker was
7144 (scan_translation_unit): Detect if the system-ness of the token we
7145 are about to emit is different from the one of the previously
7146 emitted token. If so, emit a line marker. Avoid emitting useless
7147 adjacent line markers. Avoid emitting line markers for tokens
7148 originating from the expansion of built-in macros.
7149 (scan_translation_unit_directives_only): Adjust.
7151 2014-07-15 Marek Polacek <polacek@redhat.com>
7153 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7154 TYPE_MAX_VALUE is NULL.
7156 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7159 * c.opt (Wmemset-transposed-args): New warning.
7161 2014-07-10 Jason Merrill <jason@redhat.com>
7165 * c.opt (-fuse-all-virtuals): New.
7167 2014-07-09 Richard Biener <rguenther@suse.de>
7170 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7171 using unsigned arithmetic if overflow does not wrap instead of
7172 if overflow is undefined.
7174 2014-07-06 Marek Polacek <polacek@redhat.com>
7177 * c.opt (Wsizeof-array-argument): New option.
7179 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7181 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7182 comments->count <= 1, as comments->entries might be NULL.
7184 2014-07-01 Marek Polacek <polacek@redhat.com>
7186 * c.opt (Wint-conversion): New option.
7188 2014-07-01 Marek Polacek <polacek@redhat.com>
7191 * c.opt (Wincompatible-pointer-types): New option.
7193 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7196 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7197 Do not discard TYPE_QUALS of type.
7199 2014-06-26 Jason Merrill <jason@redhat.com>
7201 * c-common.h (enum cxx_dialect): Add cxx1z.
7202 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7203 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7205 2014-06-26 Teresa Johnson <tejohnson@google.com>
7207 * c-common.h (get_dump_info): Declare.
7208 * c-gimplify.c (c_genericize): Use saved dump files.
7209 * c-opts.c (c_common_parse_file): Begin and end dumps
7210 once around parsing invocation.
7211 (get_dump_info): New function.
7213 2014-06-23 Marek Polacek <polacek@redhat.com>
7214 Andrew MacLeod <amacleod@redhat.com>
7217 * c-common.c (get_atomic_generic_size): Don't segfault if the
7218 type doesn't have a size.
7220 2014-06-20 Marek Polacek <polacek@redhat.com>
7222 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7223 (ubsan_walk_array_refs_r): New function.
7224 (c_genericize): Instrument array bounds.
7225 * c-ubsan.c: Include "internal-fn.h".
7226 (ubsan_instrument_division): Mark instrumented arrays as having
7227 side effects. Adjust ubsan_type_descriptor call.
7228 (ubsan_instrument_shift): Likewise.
7229 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7230 (ubsan_instrument_bounds): New function.
7231 (ubsan_array_ref_instrumented_p): New function.
7232 (ubsan_maybe_instrument_array_ref): New function.
7233 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7234 (ubsan_array_ref_instrumented_p): Declare.
7235 (ubsan_maybe_instrument_array_ref): Declare.
7237 2014-06-20 Hale Wang <hale.wang@arm.com>
7240 * c.opt (fshort-enums): Add to LTO.
7241 * c.opt (fshort-wchar): Likewise.
7243 2014-06-16 Marek Polacek <polacek@redhat.com>
7246 * c.opt (Wswitch-bool): Add Var.
7248 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7251 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7252 #pragma omp target teams or
7253 #pragma omp {,target }teams distribute simd.
7255 2014-06-12 Jason Merrill <jason@redhat.com>
7257 * c.opt (Wabi=, fabi-compat-version): New.
7258 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7259 (c_common_post_options): Handle flag_abi_compat_version default.
7260 Disallow -fabi-compat-version=1.
7261 * c-common.h (abi_version_crosses): New.
7263 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7265 * c-common.c (handle_section_attribute): Update handling for
7266 section names that are no longer trees.
7268 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7271 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7272 (omp_pragmas): ... back here.
7274 2014-06-05 Marek Polacek <polacek@redhat.com>
7277 * c-common.c (warn_logical_not_parentheses): New function.
7278 * c-common.h (warn_logical_not_parentheses): Declare.
7279 * c.opt (Wlogical-not-parentheses): New option.
7281 2014-06-04 Marek Polacek <polacek@redhat.com>
7284 * c-common.c (check_case_bounds): Add location parameter.
7286 (c_add_case_label): Pass loc to check_case_bounds.
7288 2014-06-03 Marek Polacek <polacek@redhat.com>
7291 * c.opt (Wswitch-bool): New option.
7293 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7295 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7297 (record_types_used_by_current_var_decl): Move prototype to where
7300 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7301 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7302 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7304 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7306 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7307 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7309 * c-pretty-print.c (pp_c_void_constant): New function.
7310 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7311 (c_pretty_printer::expression): Handle VOID_CST.
7312 * cilk.c (extract_free_variables): Likewise.
7313 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7314 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7316 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7318 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7319 * c-pragma.c (push_alignment): Adjust.
7320 (handle_pragma_push_options): Likewise.
7322 2014-05-09 Marek Polacek <polacek@redhat.com>
7325 * c-common.c (check_user_alignment): Return -1 if alignment is error
7327 (handle_aligned_attribute): Don't call default_conversion on
7329 (handle_vector_size_attribute): Likewise.
7330 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7331 (handle_sentinel_attribute): Call default_conversion and allow even
7332 integral types as an argument.
7334 2014-05-08 Marek Polacek <polacek@redhat.com>
7337 * c-common.c (min_align_of_type): New function factored out from...
7338 (c_sizeof_or_alignof_type): ...here.
7339 * c-common.h (min_align_of_type): Declare.
7341 2014-05-08 Marek Polacek <polacek@redhat.com>
7344 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7345 parameter type of main.
7347 2014-05-07 DJ Delorie <dj@redhat.com>
7349 * c-cppbuiltin.c (print_bits_of_hex): New.
7350 (builtin_define_type_minmax): Print values using hex so as not to
7351 require a pre-computed list of string values.
7353 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7354 Mike Stump <mikestump@comcast.net>
7355 Richard Sandiford <rdsandiford@googlemail.com>
7357 * c-ada-spec.c: Include wide-int.h.
7358 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7359 (dump_generic_ada_node): Use wide-int interfaces.
7360 * c-common.c: Include wide-int-print.h.
7361 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7362 (pointer_int_sum): Use wide-int interfaces.
7363 (c_common_nodes_and_builtins): Use make_int_cst.
7364 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7365 (handle_alloc_size_attribute): Use wide-int interfaces.
7366 (get_nonnull_operand): Likewise.
7367 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7368 * c-lex.c: Include wide-int.h.
7369 (narrowest_unsigned_type): Take a widest_int rather than two
7371 (narrowest_signed_type): Likewise.
7372 (interpret_integer): Update accordingly. Use wide-int interfaces.
7373 (lex_charconst): Use wide-int interfaces.
7374 * c-pretty-print.c: Include wide-int.h.
7375 (pp_c_integer_constant): Use wide-int interfaces.
7376 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7377 INT_CST_LT_UNSIGNED.
7379 2014-05-06 Richard Biener <rguenther@suse.de>
7381 * c-opts.c (c_common_post_options): For -freestanding,
7382 -fno-hosted and -fno-builtin disable pattern recognition
7383 if not enabled explicitely.
7385 2014-05-02 Marek Polacek <polacek@redhat.com>
7387 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7389 2014-05-01 Marek Polacek <polacek@redhat.com>
7392 * c.opt (Wdiscarded-qualifiers): Add.
7394 2014-04-30 Marek Polacek <polacek@redhat.com>
7396 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7397 INT_MIN / -1 sanitization only for integer types.
7399 2014-04-25 Marek Polacek <polacek@redhat.com>
7402 * c-common.c (handle_noinline_attribute): Warn if the attribute
7403 conflicts with always_inline attribute.
7404 (handle_always_inline_attribute): Warn if the attribute conflicts
7405 with noinline attribute.
7407 2014-04-25 Marek Polacek <polacek@redhat.com>
7410 * c-common.c (check_main_parameter_types): Warn about variadic main.
7412 2014-04-24 Mike Stump <mikestump@comcast.net>
7414 * c.opt (Wshadow-ivar): Default to on.
7416 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7418 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7420 2014-04-23 Marek Polacek <polacek@redhat.com>
7422 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7424 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7427 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7428 if flag_sanitize_undefined_trap_on_error.
7429 (ubsan_instrument_division, ubsan_instrument_shift,
7430 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7431 if !flag_sanitize_recover.
7433 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7436 * c-common.c (registered_builtin_types): Make non-static.
7437 * c-common.h (registered_builtin_types): Declare.
7439 2014-04-14 Richard Biener <rguenther@suse.de>
7440 Marc Glisse <marc.glisse@inria.fr>
7443 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7444 apply may-alias the scalar pointer type when applicable.
7446 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7449 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7450 as possible argument for Cilk_spawn.
7452 2014-04-11 Tobias Burnus <burnus@net-b.de>
7455 * c.opt (Wformat-signedness): Add
7456 * c-format.c(check_format_types): Use it.
7458 2014-04-11 Jason Merrill <jason@redhat.com>
7461 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7462 default_conversion for an array argument.
7464 2014-04-08 Marek Polacek <polacek@redhat.com>
7467 * c-ubsan.c: Include asan.h.
7468 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7470 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7472 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7474 2014-04-02 Marek Polacek <polacek@redhat.com>
7476 * c-common.h (c_expand_expr): Remove declaration.
7478 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7481 * c-common.c (add_atomic_size_parameter): When creating new
7482 params vector, push the size argument first.
7484 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7486 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7487 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7488 ubsan_create_data callers.
7490 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7493 * c-opts.c (c_finish_options): Restore cb_file_change call to
7496 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7499 * c-pragma.c (apply_pragma_weak): Only look at
7500 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7501 DECL_ASSEMBLER_NAME_SET_P (decl).
7502 (maybe_apply_pending_pragma_weaks): Exit early if
7503 vec_safe_is_empty (pending_weaks) rather than only when
7505 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7506 set assembler name back to NULL afterwards.
7508 2014-03-11 Jason Merrill <jason@redhat.com>
7510 * c.opt: Add -std=gnu++14.
7512 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7514 * c-opts.c (c_common_post_options): Don't override
7515 -ffp-contract=fast if unsafe-math-optimizations is on.
7517 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7519 * c.opt: Enable LTO FE for fshort-double.
7521 2014-03-07 Jason Merrill <jason@redhat.com>
7523 * c.opt: Add -std=c++14.
7525 2014-03-06 Marek Polacek <polacek@redhat.com>
7528 * cilk.c (contains_cilk_spawn_stmt): New function.
7529 (contains_cilk_spawn_stmt_walker): Likewise.
7530 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7531 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7533 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7535 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7536 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7537 even when flag_preprocess_only.
7539 2014-02-26 Jason Merrill <jason@redhat.com>
7543 * c-common.c (shorten_compare): Don't check
7544 c_inhibit_evaluation_warnings.
7546 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7549 * c-common.c (c_common_nodes_and_builtins): When initializing
7550 c_uint{16,32,64}_type_node, also set corresponding
7551 uint{16,32,64}_type_node to the same value.
7554 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7555 for PRAGMA_IVDEP if flag_preprocess_only.
7557 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7560 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7561 if false, add ADD itself, rather than vice versa.
7562 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7563 copy. For SAVE_EXPR, only call merge_tlist once.
7565 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7568 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7570 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7572 (c_common_attribute_table): Add alloc_align and assume_aligned
7575 2014-02-06 Marek Polacek <polacek@redhat.com>
7578 * c-common.c (warn_for_sign_compare): Call warning_at with location
7581 2014-02-05 Marek Polacek <polacek@redhat.com>
7584 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7587 2014-02-04 Marek Polacek <polacek@redhat.com>
7590 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7593 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7597 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7598 handle_vector_size_attribute, handle_nonnull_attribute): Call
7599 default_conversion on the attribute argument.
7600 (handle_nonnull_attribute): Increment the argument number.
7602 2014-01-31 Marek Polacek <polacek@redhat.com>
7605 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7606 build_function_call_vec.
7607 (resolve_overloaded_builtin): Likewise.
7608 * c-common.h (build_function_call_vec): Adjust declaration.
7610 2014-01-30 Marek Polacek <polacek@redhat.com>
7613 * c-common.h (unsafe_conversion_p): Adjust declaration.
7614 (warnings_for_convert_and_check): Likewise.
7615 (convert_and_check): Likewise.
7616 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7617 expansion_point_location_if_in_system_header on it.
7618 (warnings_for_convert_and_check): Add location parameter. Call
7619 expansion_point_location_if_in_system_header on it. Use it.
7620 (convert_and_check): Add location parameter. Use it.
7621 (conversion_warning): Likewise.
7622 (c_add_case_label): Adjust convert_and_check calls.
7623 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7625 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7627 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7629 * c-pragma.c (init_pragma): Likewise.
7632 2014-01-23 Marek Polacek <polacek@redhat.com>
7635 * c-common.c (shorten_compare): Add location_t parameter.
7636 * c-common.h (shorten_binary_op): Adjust declaration.
7638 2014-01-23 Marek Polacek <polacek@redhat.com>
7641 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7642 * c-common.h: Declare it.
7644 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7646 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7647 * c-ada-spec.c (dump_ads): Likewise.
7648 (cpp_check): Likewise.
7649 (dump_ada_specs): Likewise.
7651 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7654 * c-common.c (handle_no_instrument_function_attribute): Allow
7655 no_instrument_function attribute in class member
7656 definition/declaration.
7658 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7661 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7662 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7663 being COMPOUND_EXPR.
7664 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7665 operand a SAVE_EXPR and second MODIFY_EXPR.
7667 2014-01-09 Jakub Jelinek <jakub@redhat.com>
7670 * c-pch.c (c_common_write_pch): Call
7671 prepare_target_option_nodes_for_pch.
7673 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7675 Update copyright years
7677 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7679 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7680 the copyright notice.
7682 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7684 * c-ada-spec.c (print_constructor): New function.
7685 (print_destructor): Retrieve the origin of the destructor.
7686 (print_ada_declaration): Revamp handling of constructors/destructors.
7688 2013-12-23 Stuart Hastings <stuart@apple.com>
7689 Bill Maddox <maddox@google.com>
7690 Jason Merrill <jason@redhat.com>
7692 * c.opt: Add -fdeclone-ctor-dtor.
7693 * c-opts.c (c_common_post_options): Default to on iff -Os.
7695 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7697 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7699 * c-pragma.h (enum pragma_cilk_clause): Remove.
7700 (enum pragma_omp_clause): Added the following fields:
7701 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7702 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7703 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7704 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7705 PRAGMA_CILK_CLAUSE_UNIFORM.
7708 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7710 * cilk.c (cilk_outline): Made this function non-static.
7711 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7712 (create_cilk_wrapper): Added a new parameter: a function pointer.
7713 (c_install_body_w_frame_cleanup): Remove
7714 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7715 * c-common.h (cilk_outline): New prototype.
7716 (gimplify_cilk_spawn): Removed two parameters.
7717 (cilk_install_body_with_frame_cleanup): New prototype.
7718 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7719 CILK_SPAWN_STMT case.
7721 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7723 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7725 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7726 (int_array_type_node): Remove.
7727 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7729 2013-12-05 Marek Polacek <polacek@redhat.com>
7732 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7733 [ADJUST_FIELD_ALIGN].
7735 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7738 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7739 and check field alignment if set.
7740 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7741 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7743 2013-12-04 Jakub Jelinek <jakub@redhat.com>
7744 Marek Polacek <polacek@redhat.com>
7746 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7747 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7749 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7752 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7755 2013-11-29 Jakub Jelinek <jakub@redhat.com>
7758 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7759 goto invalid. If it is error_mark_node, don't issue further
7762 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7764 * c.opt (Wopenmp-simd): New.
7766 2013-11-22 Jakub Jelinek <jakub@redhat.com>
7768 * c-ubsan.h (ubsan_instrument_return): New prototype.
7769 * c-ubsan.c (ubsan_instrument_return): New function.
7771 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7773 * c-common.c: Add required include files from gimple.h.
7774 * c-gimplify.c: Likewise.
7777 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7779 * c-common.c (unsafe_conversion_p): Remove use of
7780 EXPR_LOC_OR_HERE macro.
7781 (conversion_warning): Likewise.
7782 (warnings_for_convert_and_check): Likewise.
7783 (warn_for_collisions_1): Likewise.
7784 (shorten_compare): Likewise, and remove use of in_system_header
7785 macro, using the location from the former.
7786 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7787 (cb_def_pragma): Remove use of in_system_header macro.
7788 (lex_string): Likewise.
7789 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7791 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7792 Mike Stump <mikestump@comcast.net>
7793 Richard Sandiford <rdsandiford@googlemail.com>
7795 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7796 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7797 tree_fits_shwi_p or tree_fits_uhwi_p.
7798 (dump_generic_ada_node): Likewise.
7799 * c-format.c (check_format_arg): Likewise.
7800 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7802 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7804 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7806 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7809 * c-common.c (unsafe_conversion_p): Make this function
7810 return an enumeration with more detail.
7811 (conversion_warning): Use the new return type of
7812 unsafe_conversion_p to separately warn either about conversions
7813 that lower floating point number precision or about the other
7814 kinds of conversions.
7815 * c-common.h (enum conversion_safety): New enumeration.
7816 (unsafe_conversion_p): switching return type to
7817 conversion_safety enumeration.
7818 * c.opt: Adding new warning -Wfloat-conversion and
7819 enabling it with -Wconversion.
7821 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7823 * c-opts.c: Include plugin.h.
7824 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
7826 2013-11-19 Marek Polacek <polacek@redhat.com>
7828 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7830 (ubsan_instrument_shift): Likewise.
7831 (ubsan_instrument_vla): Likewise.
7833 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7835 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7836 cast to unsigned type.
7838 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7840 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7842 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7843 rather than tree_low_cst.
7845 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7847 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7848 tree_to_uhwi throughout.
7850 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7852 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7853 tree_low_cst (..., 0) with tree_to_shwi throughout.
7855 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7857 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7858 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7860 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7862 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7863 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7865 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7867 * c-cilkplus.c: New file.
7868 * c-common.c (readonly_error): Add location argument.
7869 * c-common.h (readonly_error): Same.
7870 (c_finish_cilk_clauses): Protoize.
7871 (c_check_cilk_loop): Same.
7872 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7873 Do not fail on error_mark_node.
7874 Abstract increment canonicalization to here...
7875 (c_omp_for_incr_canonicalize_ptr): New.
7876 c-pragma.c (init_pragma): Register "simd" pragma.
7877 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7878 (enum pragma_cilk_clause): New.
7880 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7882 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7883 wchar_type and host_integerp checks.
7885 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7887 * c-common.c: Likewise.
7888 * c-gimplify.c: Likewise.
7891 2013-11-14 Diego Novillo <dnovillo@google.com>
7893 * c-common.c: Include fold-const.h.
7894 Include stor-layout.h.
7896 Include stringpool.h.
7899 Include trans-mem.h.
7900 * c-cppbuiltin.c: Include stor-layout.h.
7901 Include stringpool.h.
7902 * c-format.c: Include stringpool.h.
7903 * c-lex.c: Include stringpool.h.
7904 Include stor-layout.h.
7905 * c-pragma.c: Include stringpool.h.
7908 Include gcc-symtab.h.
7909 * c-pretty-print.c: Include stor-layout.h.
7911 * cilk.c: Include stringpool.h.
7914 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7916 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7917 * c-common.c (c_common_reswords): Add __auto_type.
7918 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7920 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7922 * c-common.c: Include gimplify.h.
7923 * c-gimplify.c: Likewise.
7925 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7926 * c-ubsan.c: Don't include gimple.h.
7928 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7930 * c-common.c (c_common_reswords): Add _Thread_local.
7932 2013-11-09 Joseph Myers <joseph@codesourcery.com>
7934 * c-common.c (atomic_size_supported_p): New function.
7935 (resolve_overloaded_atomic_exchange)
7936 (resolve_overloaded_atomic_compare_exchange)
7937 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7938 Use it instead of comparing size with a local list of sizes.
7940 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
7941 Joseph Myers <joseph@codesourcery.com>
7943 * c-common.h (enum rid): Add RID_ATOMIC.
7944 * c-common.c (c_common_reswords): Add _Atomic.
7945 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7946 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7947 * c-format.c (check_format_types): Check for extra _Atomic
7948 qualifiers in format argument.
7949 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7950 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7952 2013-11-06 Tobias Burnus <burnus@net-b.de>
7954 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7956 2013-11-06 Joseph Myers <joseph@codesourcery.com>
7958 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7960 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7961 to mean lack of IEEE 754 support.
7963 2013-11-05 Tobias Burnus <burnus@net-b.de>
7965 * c.opt (-Wdate-time): New option
7966 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7968 2013-11-05 Joseph Myers <joseph@codesourcery.com>
7970 * c-cppbuiltin.c (cpp_iec_559_value): Test
7971 flag_excess_precision_cmdline not flag_excess_precision.
7973 2013-11-05 Tobias Burnus <burnus@net-b.de>
7975 * c.opt (fopenmp-simd): New option.
7976 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7977 (omp_pragmas): ... this new struct.
7978 (c_pp_lookup_pragma): Also walk omp_pragmas.
7979 (init_pragma): Init pragmas for -fopenmp-simd.
7981 2013-11-04 Marek Polacek <polacek@redhat.com>
7984 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7986 2013-11-04 Joseph Myers <joseph@codesourcery.com>
7988 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7990 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7992 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7994 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7995 (dump_ada_specs): Adjust prototype of second callback.
7996 * c-ada-spec.c (cpp_check): New global variable.
7997 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7998 (print_generic_ada_decl): Likewise.
7999 (has_static_fields): Change return type to bool and add guard.
8000 (has_nontrivial_methods): New predicate.
8001 (is_tagged_type): Change return type to bool.
8002 (separate_class_package): Call has_nontrivial_methods.
8003 (pp_ada_tree_identifier): Minor tweaks.
8004 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
8005 (dump_ada_array_domains): Likewise.
8006 (dump_ada_array_type): Likewise.
8007 (dump_template_types): Remove cpp_check parameter and do not pass it to
8008 dump_generic_ada_node.
8009 (dump_ada_template): Likewise.
8010 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
8012 (print_ada_methods): Change return type to integer. Remove cpp_check
8013 parameter and do not pass it down.
8014 (dump_nested_types): Remove cpp_check parameter and do not pass it to
8015 dump_generic_ada_node.
8016 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
8018 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
8019 down. Use has_nontrivial_methods to recognize C++ classes. Use return
8020 value of print_ada_methods.
8021 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
8022 Set cpp_check to it before invoking dump_ada_nodes.
8023 (dump_ada_specs): Likewise.
8025 2013-11-03 Marek Polacek <polacek@redhat.com>
8027 * c-ubsan.c: Don't include hash-table.h.
8028 (ubsan_instrument_vla): New function.
8029 * c-ubsan.h: Declare it.
8031 2013-10-31 David Malcolm <dmalcolm@redhat.com>
8033 Automated part of renaming of symtab_node_base to symtab_node.
8035 Patch autogenerated by rename_symtab.py from
8036 https://github.com/davidmalcolm/gcc-refactoring-scripts
8037 revision 58bb219cc090b2f4516a9297d868c245495ee622
8039 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
8040 symtab_node_base to symtab_node.
8042 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
8044 Implement C++14 digit separators.
8045 * c-lex.c (interpret_float): Remove digit separators from scratch string
8046 before building real literal.
8048 2013-10-30 Jakub Jelinek <jakub@redhat.com>
8050 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
8052 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
8054 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
8056 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
8058 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
8059 (insert_cilk_frame): New prototype.
8060 (cilk_init_builtins): Likewise.
8061 (gimplify_cilk_spawn): Likewise.
8062 (c_cilk_install_body_w_frame_cleanup): Likewise.
8063 (cilk_detect_spawn_and_unwrap): Likewise.
8064 (cilk_set_spawn_marker): Likewise.
8065 (build_cilk_sync): Likewise.
8066 (build_cilk_spawn): Likewise.
8069 2013-10-29 David Malcolm <dmalcolm@redhat.com>
8071 Patch autogenerated by refactor_symtab.py from
8072 https://github.com/davidmalcolm/gcc-refactoring-scripts
8073 revision 58bb219cc090b2f4516a9297d868c245495ee622
8075 * c-gimplify.c (c_genericize): Update for conversion of symtab types
8076 to a true class hierarchy.
8077 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
8079 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
8081 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
8083 2013-10-26 Jeff Law <law@redhat.com>
8085 * c-common.c (c_define_builtins): Remove mudflap support.
8086 * c.opt: Ignore and warn for mudflap options.
8088 2013-10-24 Tobias Burnus <burnus@net-b.de>
8091 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
8092 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
8094 2013-10-23 Jason Merrill <jason@redhat.com>
8096 * c-format.c (gcc_cxxdiag_char_table): Add %X.
8098 2013-10-11 Jakub Jelinek <jakub@redhat.com>
8100 * c-common.h (omp_clause_mask::operator !=): New method.
8101 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
8102 instead of if (mask & something) tests everywhere.
8104 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
8105 201307 instead of 201107.
8106 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
8107 (c_common_attribute_table): Add "omp declare target" and
8108 "omp declare simd" attributes.
8109 (handle_omp_declare_target_attribute,
8110 handle_omp_declare_simd_attribute): New functions.
8111 * c-omp.c: Include c-pragma.h.
8112 (c_finish_omp_taskgroup): New function.
8113 (c_finish_omp_atomic): Add swapped argument, if true,
8114 build the operation first with rhs, lhs arguments and use NOP_EXPR
8116 (c_finish_omp_for): Add code argument, pass it down to make_code.
8117 (c_omp_split_clauses): New function.
8118 (c_split_parallel_clauses): Removed.
8119 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
8120 c_omp_declare_simd_clauses_to_decls): New functions.
8121 * c-common.h (omp_clause_mask): New type.
8122 (OMP_CLAUSE_MASK_1): Define.
8123 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8124 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8125 omp_clause_mask::operator |, omp_clause_mask::operator &,
8126 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8127 omp_clause_mask::operator ==): New methods.
8128 (enum c_omp_clause_split): New.
8129 (c_finish_omp_taskgroup): New prototype.
8130 (c_finish_omp_atomic): Add swapped argument.
8131 (c_finish_omp_for): Add code argument.
8132 (c_omp_split_clauses): New prototype.
8133 (c_split_parallel_clauses): Removed.
8134 (c_omp_declare_simd_clauses_to_numbers,
8135 c_omp_declare_simd_clauses_to_decls): New prototypes.
8136 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8137 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8138 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8139 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8140 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8141 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8142 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8143 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8144 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8145 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8146 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8147 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8148 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8149 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8150 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8151 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8152 PRAGMA_OMP_CLAUSE_UNIFORM.
8154 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8156 PR tree-optimization/20318
8157 * c-common.c (handle_returns_nonnull_attribute): New function.
8158 (c_common_attribute_table): Add returns_nonnull.
8160 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8163 * c.opt (fcheck-new): Move to common.opt.
8165 2013-09-25 Marek Polacek <polacek@redhat.com>
8166 Jakub Jelinek <jakub@redhat.com>
8169 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8170 an expression if we can prove it is correct.
8171 (ubsan_instrument_division): Likewise. Remove unnecessary
8174 2013-09-18 Marek Polacek <polacek@redhat.com>
8177 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8179 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8181 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8184 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8185 fobjc-gc, freplace-objc-classes): Accept for LTO.
8187 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8189 * c-target.def: New hook
8191 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8194 * c.opt (Wdelete-incomplete): Add.
8196 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8198 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8199 (vector_types_compatible_elements_p): New function.
8200 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8202 (vector_types_compatible_elements_p): Declare.
8204 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8206 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8207 a virtual member function.
8208 (pp_simple_type_specifier): Remove.
8209 (pp_c_type_specifier): Likewise.
8210 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8211 Rename from pp_c_type_specifier. Adjust.
8212 (c_pretty_printer::c_pretty_printer): Do not assign to
8213 simple_type_specifier.
8215 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8217 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8219 (c_pretty_printer::storage_class_specifier): Likewise.
8220 (c_pretty_printer::initializer): Likewise.
8221 (pp_declaration): Remove.
8222 (pp_declaration_specifiers): Likewise.
8223 (pp_abstract_declarator): Likewise.
8224 (pp_declarator): Likewise.
8225 (pp_type_id): Likewise.
8226 (pp_statement): Likewise.
8227 (pp_constant): Likewise.
8228 (pp_id_expression): Likewise.
8229 (pp_primary_expression): Likewise.
8230 (pp_unary_expression): Likewise.
8231 (pp_multiplicative_expression): Likewise.
8232 (pp_conditional_expression): Likewise.
8233 (pp_assignment_expression): Likewise.
8234 (pp_expression): Likewise.
8235 (pp_c_type_id): Likewise.
8236 (pp_c_storage_class_specifier): Likewise.
8237 * c-pretty-print.c (pp_c_type_cast): Tidy.
8238 (pp_c_pointer): Likewise.
8239 (pp_c_type_specifier): Likewise.
8240 (pp_c_parameter_type_list): Likewise.
8241 (pp_c_function_definition): Likewise.
8242 (pp_c_init_declarator): Likewise.
8243 (pp_c_initializer_list): Likewise.
8244 (pp_c_constructor_elts): Likewise.
8245 (c_pretty_printer::direct_abstract_declarator): Likewise.
8246 (c_pretty_printer::declaration_specifiers): Likewise.
8247 (c_pretty_printer::primary_expression): Likewise.
8248 (c_pretty_printer::postfix_expression): Likewise.
8249 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8250 (c_pretty_printer::storage_class_specifier): Rename from
8251 pp_c_storage_class_specifier.
8252 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8253 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8254 storage_class_specifier, initializer, offset_list, flags.
8256 2013-08-30 Marek Polacek <polacek@redhat.com>
8258 * c-ubsan.c: New file.
8259 * c-ubsan.h: New file.
8261 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8263 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8265 (c_pretty_printer::declaration_specifiers): Likewise.
8266 (c_pretty_printer::declarator): Likewise.
8267 (c_pretty_printer::abstract_declarator): Likewise.
8268 (c_pretty_printer::direct_abstract_declarator): Likewise.
8269 (c_pretty_printer::direct_declarator): Likewise.
8270 (c_pretty_printer::function_specifier): Likewise.
8271 (pp_declaration): Adjust.
8272 (pp_declaration_specifiers): Likewise.
8273 (pp_abstract_declarator): Likewise.
8274 (pp_direct_declarator): Likewise.
8275 (pp_function_specifier): Likewise.
8276 (pp_direct_abstract_declarator): Remove as unused.
8277 (pp_c_declaration): Remove.
8278 (pp_c_declaration_specifiers): Likewise.
8279 (pp_c_declarator): Likewise.
8280 (pp_c_direct_declarator): Likewise.
8281 (pp_c_function_specifier): Likewise.
8282 (pp_c_direct_abstract_declarator): Likewise.
8283 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8284 from pp_c_abstract_declarator. Adjust.
8285 (c_pretty_printer::direct_abstract_declarator): Rename from
8286 pp_c_direct_abstract_declarator. Adjust.
8287 (c_pretty_printer::function_specifier): Rename from
8288 pp_c_function_specifier. Adjust.
8289 (c_pretty_printer::declaration_specifiers): Rename from
8290 pp_c_declaration_specifiers. Adjust.
8291 (c_pretty_printer::direct_declarator): Rename from
8292 pp_c_direct_declarator. Adjust.
8293 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8294 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8295 (c_pretty_printer::c_pretty_printer): Do not assign to
8296 declaration, declaration_specifiers, declarator,
8297 direct_declarator, direct_abstract_declarator, function_specifier.
8299 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8301 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8302 virtual member function.
8303 (c_pretty_printer::multiplicative_expression): Likewise.
8304 (c_pretty_printer::conditional_expression): Likewise.
8305 (c_pretty_printer::assignment_expression): Likewise.
8306 (c_pretty_printer::expression): Likewise.
8307 (pp_unary_expression): Adjust.
8308 (pp_multiplicative_expression): Likewise.
8309 (pp_assignment_expression): Likewise.
8310 (pp_conditional_expression): Likewise.
8311 (pp_expression): Likewise.
8312 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8313 from pp_c_unary_expression. Adjust.
8314 (c_pretty_printer::multiplicative_expression): Rename from
8315 pp_c_multiplicative_expression. Adjust.
8316 (c_pretty_printer::conditional_expression): Rename from
8317 pp_c_conditional_expression. Adjust.
8318 (c_pretty_printer::assignment_expression): Rename from
8319 pp_c_assignment_expression. Adjust.
8320 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8321 (c_pretty_printer::c_pretty_printer): Do not assign to
8322 unary_expression, multiplicative_expression,
8323 conditional_expression, expression.
8325 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8327 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8328 virtual member function.
8329 (pp_postfix_expression): Adjust.
8330 (pp_c_postfix_expression): Remove.
8331 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8332 from pp_c_postfix_expression. Adjust.
8333 (c_pretty_printer::c_pretty_printer): Do not assign to
8336 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8338 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8339 virtua member function.
8340 (pp_primary_expression): Adjust.
8341 (pp_c_primary_expression): Remove.
8342 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8343 from pp_c_primary_expression. Adjust.
8344 (pp_c_initializer_list): Use pp_primary_expression.
8345 (c_pretty_printer::c_pretty_printer): Do not assign to
8348 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8350 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8351 * c-pretty-print.c (M_): Remove.
8352 (c_pretty_printer::translate_string): Define.
8353 (pp_c_type_specifier): Use it.
8354 (pp_c_primary_expression): Likewise.
8355 (pp_c_expression): Likewise.
8357 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8359 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8361 (pp_c_id_expression): Remove.
8362 (pp_id_expression): Adjust.
8363 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8364 pp_c_id_expression. Adjust.
8365 (pp_c_postfix_expression): Use pp_id_expression.
8366 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8368 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8370 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8372 (pp_constant): Adjust.
8373 (pp_c_constant): Remove.
8374 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8375 pp_c_constant. Adjust.
8377 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8378 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8380 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8382 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8383 (c_pretty_printer::c_pretty_printer): Declare.
8384 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8385 c_pretty_printer_init. Adjust.
8386 (print_c_tree): Do not call c_pretty_printer_init.
8387 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8389 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8391 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8393 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8396 * c-common.c (pointer_int_sum): Add bool parameter.
8397 * c-common.h (pointer_int_sum): Adjust declaration.
8399 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8401 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8402 c_pretty_printer variable.
8404 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8406 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8408 (pp_c_base): Likewise. Adjust users.
8409 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8410 (pp_c_whitespace): Do not call pp_base.
8411 (pp_c_left_paren): Likewise.
8412 (pp_c_right_paren): Likewise.
8413 (pp_c_left_brace): Likewise.
8414 (pp_c_right_brace): Likewise.
8415 (pp_c_left_bracket): Likewise.
8416 (pp_c_right_bracket): Likewise.
8417 (pp_c_dot): Likewise.
8418 (pp_c_ampersand): Likewise.
8419 (pp_c_star): Likewise.
8420 (pp_c_arrow): Likewise.
8421 (pp_c_semicolon): Likewise.
8422 (pp_c_complement): Likewise.
8423 (pp_c_exclamation): Likewise.
8424 (pp_c_direct_declarator): Likewise.
8425 (pp_c_ws_string): Likewise.
8426 (pp_c_identifier): Likewise.
8427 (pp_c_statement): Likewise.
8428 (print_c_tree): Likewise.
8430 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8433 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8434 provide useful error strings.
8436 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8438 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8439 printer functions instead of pp_string or operators and punctuators.
8440 (dump_generic_ada_node): Likewise.
8441 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8442 (pp_c_relational_expression): Likewise.
8443 (pp_c_logical_or_expression): Likewise.
8445 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8447 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8448 functions instead of pp_character.
8449 (pp_ada_tree_identifier): Likewise.
8450 (dump_ada_double_name): Likewise.
8451 (dump_ada_function_declaration): Likewise.
8452 (dump_ada_array_domains): Likewise.
8453 (dump_template_types): Likewise.
8454 (dump_generic_ada_node): Likewise.
8455 (print_ada_declaration): Likewise.
8456 (print_ada_struct_decl): Likewise.
8457 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8459 2013-07-23 Tom Tromey <tromey@redhat.com>
8461 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8462 * c-common.c (c_common_reswords): Add _Generic.
8464 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8466 * c-common.c: Fix typos.
8467 * c-common.h: Likewise.
8469 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8472 * c-common.c (c_common_attribute_table): Add warn_unused.
8473 (handle_warn_unused_attribute): New.
8475 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8477 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8478 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8480 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8483 * c.opt: Add Wconditionally-supported.
8485 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8487 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8488 unused variables l_length and l_node.
8490 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8493 * c-common.c (complete_array_type): Delay folding first index
8494 like other indices. When folding, check for index overflow.
8496 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8499 * c-common.h (c_build_vec_perm_expr): New complain argument.
8500 * c-common.c (c_build_vec_perm_expr): Likewise.
8501 Use save_expr also in C++.
8503 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8505 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8506 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8507 * c-opts.c (c_common_post_options): Likewise.
8509 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8511 * array-notation-common.c (length_mismatch_in_expr): Changed the
8512 parameter type's from a dynamic array to a vec_tree. Also removed
8513 the size parameters.
8514 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8517 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8519 * c-common.h (struct cilkplus_an_parts): New structure.
8520 (struct cilkplus_an_loop_parts): Likewise.
8521 (cilkplus_extract_an_triplets): New prototype.
8522 (fix_sec_implicit_args): Likewise.
8523 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8524 (fix_sec_implicit_args): Likewise.
8526 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8528 * array-notation-common.c (find_inv_trees): Removed an unwanted
8530 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8531 enum rid to enum tree_code.
8533 2013-06-11 Jan Hubicka <jh@suse.cz>
8535 * c-common.c (handle_alias_ifunc_attribute): Do not set
8536 DECL_EXTERNAL for weakref variables.
8537 * c-pragma.c (handle_pragma_weak): Make sure aliases
8538 are not declared as external.
8540 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8542 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8543 function from c/c-array-notation.c.
8544 (is_cilkplus_reduce_builtin): Likewise.
8545 (find_rank): Likewise.
8546 (extract_array_notation_exprs): Likewise.
8547 (replace_array_notations): Likewise.
8548 (find_inv_trees): Likewise.
8549 (replace_inv_trees): Likewise.
8550 (contains_array_notation_expr): Likewise.
8551 (find_correct_array_notation_type): Likewise.
8552 * c-common.h (struct inv_list): Moved this struct from the file
8553 c/c-array-notation.c and added a new field called additional tcodes.
8554 (length_mismatch_in_expr_p): New prototype.
8555 (is_cilkplus_reduce_builtin): Likewise.
8556 (find_rank): Likewise.
8557 (extract_array_notation_exprs): Likewise.
8558 (replace_array_notation): Likewise.
8559 (find_inv_trees): Likewise.
8560 (replace_inv_trees): Likewise.
8561 (find_correct_array_notation_type): Likewise.
8563 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8565 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8566 function array_notation_init_builtins is called.
8567 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8568 * c-common.def (ARRAY_NOTATION_REF): New tree.
8569 * c-common.h (build_array_notation_expr): New function declaration.
8570 (build_array_notation_ref): Likewise.
8571 (extract_sec_implicit_index_arg): New extern declaration.
8572 (is_sec_implicit_index_fn): Likewise.
8573 (ARRAY_NOTATION_CHECK): New define.
8574 (ARRAY_NOTATION_ARRAY): Likewise.
8575 (ARRAY_NOTATION_START): Likewise.
8576 (ARRAY_NOTATION_LENGTH): Likewise.
8577 (ARRAY_NOTATION_STRIDE): Likewise.
8578 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8580 (pp_c_expression): Likewise.
8581 * c.opt (flag_enable_cilkplus): New flag.
8582 * array-notation-common.c: New file.
8584 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8587 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8589 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8591 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8594 2013-05-07 Han Shen <shenhan@google.com>
8596 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8598 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8600 * c-common.c (check_user_alignment): Emit error for negative values.
8602 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8604 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8606 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8608 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8609 __GXX_EXPERIMENTAL_CXX1Y__.
8611 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8612 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8614 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8615 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8616 to simply use OPT_Wpointer_arith.
8617 (c_sizeof_or_alignof_type): Likewise.
8619 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8621 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8623 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8625 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8626 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8629 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8631 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8633 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8635 * c-common.c (pointer_int_sum): Remove dead code.
8637 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8640 * c-common.c (handle_optimize_attribute): Don't call
8641 save_optabs_if_changed.
8643 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8646 * c-pch.c (pch_init): Free target_validity at the end.
8648 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8650 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8652 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8653 Jakub Jelinek <jakub@redhat.com>
8656 * c-common.c (handle_no_sanitize_address_attribute): New function.
8657 (c_common_attribute_table): Add no_sanitize_address attribute.
8658 (handle_no_address_safety_analysis_attribute): Add
8659 no_sanitize_address attribute, not no_address_safety_analysis
8662 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
8665 * c-common.c (handle_optimize_attribute): Call
8666 save_optabs_if_changed.
8668 2013-02-18 Jakub Jelinek <jakub@redhat.com>
8669 Steven Bosscher <steven@gcc.gnu.org>
8672 * c-opts.c (c_common_post_options): If debug info is enabled
8673 and non-dwarf*, refuse to load PCH files and when writing PCH
8676 2013-02-05 Jakub Jelinek <jakub@redhat.com>
8679 * c-common.c (handle_error_attribute): Fix condition.
8681 2013-01-30 Jakub Jelinek <jakub@redhat.com>
8684 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8686 2013-01-18 Jason Merrill <jason@redhat.com>
8689 * c.opt (-fextern-tls-init): New.
8690 * c-opts.c (c_common_post_options): Handle it.
8692 2013-01-09 Jakub Jelinek <jakub@redhat.com>
8695 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8696 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8697 and is either negative or bigger or equal to type precision
8698 of the first operand.
8700 2012-12-03 Marek Polacek <polacek@redhat.com>
8703 * c-common.c (check_user_alignment): Swap order of tests,
8704 check TREE_CODE first.
8706 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8709 * c-common.h (overflow_type): New enum.
8710 (build_userdef_literal): Add overflow_type argument.
8711 (tree_userdef_literal): Add overflow_type.
8712 (USERDEF_LITERAL_OVERFLOW): New access macro.
8713 * c-common.c (build_userdef_literal): Add overflow_type
8715 * c-lex.c (c_lex_with_flags): Add overflow_type to
8716 build_userdef_literal calls.
8717 (interpret_integer, interpret_float): Add overflow_type argument.
8719 2012-11-28 Richard Biener <rguenther@suse.de>
8722 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8723 here and use a type with proper overflow behavior for types that would
8724 need to be promoted for the arithmetic.
8726 2012-11-23 Jakub Jelinek <jakub@redhat.com>
8729 * c-common.c (handle_no_address_safety_analysis_attribute): New
8731 (c_common_attribute_table): Add no_address_safety_analysis.
8733 2012-11-16 Simon Baldwin <simonb@google.com>
8735 * c.opt: Add f[no-]canonical-system-headers.
8736 * c-opts.c (c_common_handle_option): Handle
8737 OPT_fcanonical_system_headers.
8739 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8742 * c-opts.c (c_common_handle_option): Set new flags.
8743 * c.opt: Describe new flags.
8745 2012-11-09 Jason Merrill <jason@redhat.com>
8747 * c.opt (Wabi-tag): New.
8749 2012-11-09 Andi Kleen <ak@linux.intel.com>
8752 * c-common.c (get_atomic_generic_size): Mask with
8755 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8758 * c.opt (Wformat): Make it Alias Wformat=1.
8759 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8760 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8762 (Wformat=): RejectNegative. Use LangEnabledBy.
8763 (Wnonnull): Use LangEnabledBy.
8764 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8765 * c-format.c (set_Wformat): Delete.
8766 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8767 (maybe_read_dollar_number): Likewise.
8768 (avoid_dollar_number): Likewise.
8769 (finish_dollar_format_checking): Likewise.
8770 (check_format_info): Likewise.
8771 (check_format_info_main): Likewise.
8772 (check_format_types): Likewise.
8773 (format_type_warning): Likewise.
8774 * c-common.c (int): Likewise.
8775 (check_function_sentinel): Likewise.
8776 * c-common.h (warn_format,set_Wformat): Do not declare here.
8778 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8781 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8782 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8784 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8786 (Wvariadic-macros): Init(1).
8787 * c-opts.c (c_common_handle_option): Do not handle them
8789 (c_common_post_options): Likewise.
8790 (sanitize_cpp_opts): warn_unused_macros is now
8791 cpp_warn_unused_macros.
8792 (push_command_line_include): Likewise.
8793 * c-common.c (warn_unknown_pragmas): Do not define.
8794 * c-common.h (warn_unknown_pragmas): Do not declare.
8796 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8799 * c-common.c (conversion_warning): Handle conditional expressions.
8801 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8804 * c.opt (Wreturn_local_addr): Define new option.
8806 2012-10-25 Jason Merrill <jason@redhat.com>
8808 * c.opt (Wvirtual-move-assign): New.
8810 * c.opt (Winherited-variadic-ctor): New.
8812 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
8815 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8817 2012-10-23 Joseph Myers <joseph@codesourcery.com>
8819 * c-common.h (pch_cpp_save_state): Declare.
8820 * c-target.def (c_preinclude): New hook.
8821 * c-opts.c (done_preinclude): New.
8822 (push_command_line_include): Handle default preincluded header.
8823 (cb_file_change): Call pch_cpp_save_state when calling
8824 push_command_line_include.
8825 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8826 (pch_cpp_save_state): New.
8827 (pch_init): Call pch_cpp_save_state conditionally, instead of
8828 calling cpp_save_state.
8830 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8834 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8835 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8836 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8837 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8838 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8839 * c-opts.c (c_common_handle_option): Remove explicit handling from
8841 (c_common_post_options): Likewise.
8843 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8845 * c-ada-spec.c (LOCATION_COL): Delete.
8846 (compare_location): New function.
8847 (compare_node): Use it.
8848 (compare_comment): Likewise.
8850 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8854 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8855 * c-opts.c (c_common_handle_option): Do not set them here. Add
8857 (c_common_post_options): Likewise.
8859 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8861 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8862 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8863 Remove POINTER_TYPE handling, add large unsigned handling and use
8864 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8866 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8869 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8870 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8871 locs and array of 3 trees instead of just single loc and single
8872 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8873 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8874 For *cmp* builtins that take two sources strings report warnings
8875 about first and second source, not about destination and source.
8877 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
8880 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8882 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8884 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8885 declaring something coming from another file.
8887 2012-10-10 Arnaud Charlet <charlet@adacore.com>
8890 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8892 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8895 * c-common.c (warn_about_parentheses): Add location_t parameter;
8896 use EXPR_LOC_OR_LOC.
8897 * c-common.h: Update declaration.
8899 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8902 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8903 more operations. Make error messages optional.
8904 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8905 (scalar_to_vector): Declare.
8907 2012-10-08 Jason Merrill <jason@redhat.com>
8909 * c-common.c (c_common_reswords): Add thread_local.
8911 2012-10-08 Dodji Seketeli <dodji@redhat.com>
8913 PR c++/53528 C++11 attribute support
8914 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8916 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8918 (handle_aligned_attribute): In choose strictest alignment
8919 among many. Use new check_cxx_fundamental_alignment_constraints.
8920 (handle_transparent_union_attribute): In c++11 attribute syntax,
8921 don't look through typedefs.
8923 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8925 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8926 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8929 2012-09-25 Dehao Chen <dehao@google.com>
8932 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
8933 map when read in the pch.
8935 2012-09-18 Arnaud Charlet <charlet@adacore.com>
8937 * c-ada-spec.c: Style fixes.
8939 2012-09-18 Thomas Quinot <quinot@adacore.com>
8941 * c.opt (-fada-spec-parent): Define new command line switch.
8942 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8943 is specified, generate binding spec as a child of the specified unit.
8945 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8946 Manuel López-Ibáñez <manu@gcc.gnu.org>
8949 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8951 2012-08-23 Arnaud Charlet <charlet@adacore.com>
8953 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8954 for pointers, and add missing Convention C pragma.
8955 (print_ada_struct_decl): Add missing aliased keyword.
8956 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8958 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8960 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8961 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8962 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8963 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8964 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8966 2012-08-10 Richard Guenther <rguenther@suse.de>
8968 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8970 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8972 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8973 instead of separate pp_newline and pp_flush.
8974 (print_c_tree): Likewise.
8976 2012-07-26 Richard Henderson <rth@redhat.com>
8978 * c-common.c (handle_hot_attribute): Allow labels.
8979 (handle_cold_attribute): Likewise.
8981 2012-07-20 Jakub Jelinek <jakub@redhat.com>
8984 * c-common.c (check_function_nonnull): Handle multiple nonnull
8985 attributes properly.
8987 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8989 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8990 * c-ada-spec.c: Likewise.
8991 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8993 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8995 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8996 Remove code conditional on it.
8998 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
9000 * c-gimplify.c: Do not include basic-block.h.
9001 * c-common.c: Do not include linfuncs.h.
9003 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
9005 * c-common.h: Include tree.h.
9007 2012-07-02 Jason Merrill <jason@redhat.com>
9010 * c-common.c (get_priority): Call default_conversion.
9012 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
9014 * c-pch.c (c_common_write_pch): Remove unused variables.
9016 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
9018 * cppspec.c: Moved from gcc/ to here.
9020 2012-06-27 Kai Tietz <ktietz@redhat.com>
9022 PR preprocessor/37215
9023 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
9025 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
9027 * c-common.h (c_common_print_pch_checksum): Remove.
9028 * c-pch.c: Do not include output.h.
9029 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
9030 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
9031 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
9032 (struct c_pch_header): Remove.
9033 (get_ident): Update gpch version.
9034 (pch_init): Do not print executable_checksum to asm_out_file.
9035 Do not fail if there is no asm_out_file to read back from. Set
9036 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
9037 (c_common_write_pch): Verify that nothing was written to asm_out_file
9038 since pch_init was called. Do not write a c_pch_header, and do not
9039 copy from asm_out_file to the PCH.
9040 (c_common_read_pch): Do not read a c_pch_header, and do not restore
9041 the content of asm_out_file from the PCH.
9042 (c_common_print_pch_checksum): Remove.
9043 * c-opts.c (c_common_init): Print out executable_checksum directly.
9045 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9047 * c-target.def (objc_declare_unresolved_class_reference,
9048 objc_declare_class_definition): Add new hooks.
9050 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
9052 * c-lex.c: Do not include output.h.
9053 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
9054 Remove uses of ASM_OUTPUT_IDENT.
9056 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
9059 * c-common.h (c_build_vec_perm_expr): Move decl here.
9060 * c-common.c (c_build_vec_perm_expr): Move definition
9063 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
9065 * c.opt (fconserve-space): Turn into a no-op.
9067 2012-06-04 Sterling Augustine <saugustine@google.com>
9069 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
9070 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
9071 both the start and end of the function.
9073 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9075 * c-common.c: Do not include output.h.
9076 * c-pragma.c: Likewise.
9078 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
9080 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
9081 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
9082 (lang_decl_name): Handle namespace decls.
9084 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
9086 * c-ada-spec.c: Do not include output.h.
9087 * c-semantics.c: Likewise.
9089 2012-05-29 Joseph Myers <joseph@codesourcery.com>
9091 * c-common.c: Fix typo.
9093 2012-05-29 Michael Matz <matz@suse.de>
9095 * c-common.h (c_expand_decl): Remove prototype.
9097 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9099 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
9100 * c-opts.c (c_common_handle_option): Remove code handling
9101 warn_missing_braces.
9103 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
9106 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
9109 2012-05-22 Dodji Seketeli <dodji@redhat.com>
9112 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
9114 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
9116 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
9117 * c-opts.c (c_common_handle_option): Do not handle explicitly
9118 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
9120 2012-05-16 Dodji Seketeli <dodji@redhat.com>
9122 PR preprocessor/7263
9123 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
9124 to cpp_classify_number. For diagnostics, use the precise location
9125 instead of the global input_location.
9127 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9130 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9132 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9134 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
9136 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9139 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9140 Wreorder): Use LangEnabledBy.
9141 * c-opts.c (c_common_handle_option): Do not enable them
9142 explicitly. Call lang-specific generated functions.
9143 (c_common_post_options): Do not set them here.
9145 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9147 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9148 Wmissing-field-initializers,Wmissing-parameter-type,
9149 Wold-style-declaration,Woverride-init): Use EnabledBy.
9150 * c-opts.c (c_common_post_options): Do not set here explicitly.
9152 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9155 * c-opts.c (c_common_handle_option): Use handle_generated_option
9156 to enable sub-options.
9158 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9161 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9163 2012-05-10 Richard Guenther <rguenther@suse.de>
9165 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9166 adjust commentary about TYPE_IS_SIZETYPE types.
9168 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9171 * c-common.c (warn_logical_operator): Check that argument of
9172 integer_zerop is not NULL.
9174 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9177 * c-common.c (warn_logical_operator): Do not warn if either side
9178 is already true or false.
9180 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9183 * c-common.c (expr_original_type): New.
9184 (shorten_compare): Do not warn for enumeration types.
9186 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9188 * c.opt (fpermissive): Add Var(flag_permissive).
9190 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9193 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9194 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9196 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9198 Add -Wvarargs option
9199 * c.opt (Wvarargs): Define new option.
9201 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9203 * c-common.c (check_function_arguments): Replace
9204 Wmissing-format-attribute with Wsuggest-attribute=format.
9206 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9208 * c.opt (Wsuggest-attribute=format): New. Alias of
9209 Wmissing-format-attribute.
9210 * c-format.c (decode_format_type): Replace
9211 Wmissing-format-attribute with Wsuggest-attribute=format.
9212 (check_function_format): Likewise.
9214 2012-04-27 Ollie Wild <aaw@google.com>
9216 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9217 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9218 * c.opt: Add Wliteral-suffix.
9220 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9223 * c.opt (Wpedantic): New.
9224 (pedantic): Alias Wpedantic.
9225 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9226 (c_common_post_options): Likewise.
9227 (sanitize_cpp_opts): Likewise.
9228 * c-lex.c (interpret_float): Likewise.
9229 * c-format.c (check_format_types): Likewise.
9230 * c-common.c (pointer_int_sum): Likewise.
9231 (c_sizeof_or_alignof_type): Likewise.
9232 (c_add_case_label): Likewise.
9233 (c_do_switch_warnings): Likewise.
9234 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9236 2012-04-15 Jason Merrill <jason@redhat.com>
9239 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9240 (C_STD_NAME): Distinguish between C++98 and C++11.
9242 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9245 * c-common.h (uint16_type_node): Rename into...
9246 (c_uint16_type_node): ...this.
9247 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9248 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9250 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9252 * c-common.c (warn_if_unused_value): Move definition to here.
9253 * c-common.h (warn_if_unused_value): Move declaration to here.
9255 2012-03-23 William Bader <williambader@hotmail.com>
9257 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9259 2012-03-20 Jason Merrill <jason@redhat.com>
9261 * c-common.h (enum cxx_dialect): Add cxx1y.
9262 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9264 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9265 * c-opts.c (c_common_post_options): Likewise.
9266 (set_std_cxx1y): New.
9267 (c_common_handle_option): Call it.
9268 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9270 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9273 * c.opt ([Wuseless-cast]): Add.
9275 2012-03-16 Richard Guenther <rguenther@suse.de>
9277 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9279 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9282 * c.opt (ftemplate-backtrace-limit) Add.
9284 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9286 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9288 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9289 (init_pragma): Don't register extern_prefix.
9291 2012-03-12 Richard Guenther <rguenther@suse.de>
9293 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9294 (builtin_type_for_size): Likewise.
9296 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9299 * c-common.c (sync_resolve_params): Don't decide whether to convert
9300 or not based on TYPE_SIZE comparison, convert whenever arg_type
9301 is unsigned INTEGER_TYPE.
9303 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9306 * c.opt ([Wunused-local-typedefs]): Fix description.
9308 2012-01-24 Mike Stump <mikestump@comcast.net>
9310 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9313 2012-01-18 Richard Guenther <rguenther@suse.de>
9315 * c-opts.c (c_common_post_options): Reset LTO flags if
9316 we are about to generate a PCH.
9318 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9321 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9322 use pp_unsigned_wide_integer.
9324 2012-01-10 Richard Guenther <rguenther@suse.de>
9327 * c-opts.c (c_common_handle_option): Move -Werror handling
9328 to language independent code.
9330 2012-01-05 Richard Guenther <rguenther@suse.de>
9333 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9336 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9339 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9340 of array types with an unknown bound.
9342 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9344 * c-common.c (flag_isoc99): Update comment to refer to C11.
9345 (flag_isoc1x): Change to flag_isoc11.
9346 * c-common.h (flag_isoc99): Update comment to refer to C11.
9347 (flag_isoc1x): Change to flag_isoc11.
9348 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9350 * c-opts.c (set_std_c1x): Change to set_std_c11.
9351 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9353 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9354 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9355 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9357 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9358 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9359 (std=gnu1x): Make alias of std=gnu11.
9361 2011-12-19 Jason Merrill <jason@redhat.com>
9364 * c-common.c (handle_transparent_union_attribute): Check the first
9365 field if the type is complete.
9367 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9370 * c-common.c (RID_IS_FINAL): Add.
9371 * c-common.h (RID_IS_FINAL): Add.
9373 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9375 * c.opt (fgnu-runtime): Provide full description.
9376 (fnext-runtime): Likewise.
9377 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9379 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9381 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9382 predefines in one place. Add LOCK_FREE predefines.
9383 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9386 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9389 * c-common.c (get_atomic_generic_size): Check for various error
9391 (resolve_overloaded_atomic_exchange,
9392 resolve_overloaded_atomic_compare_exchange,
9393 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9394 error_mark_node for error conditions.
9396 2011-11-08 Richard Guenther <rguenther@suse.de>
9399 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9401 2011-11-07 Richard Henderson <rth@redhat.com>
9402 Aldy Hernandez <aldyh@redhat.com>
9403 Torvald Riegel <triegel@redhat.com>
9405 Merged from transactional-memory.
9407 * c-common.c (handle_tm_wrap_attribute,
9408 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9409 (struct c_common_reswords): Added __transaction* keywords.
9410 (struct c_common_attribute_table): Added transaction* and tm_regparm
9412 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9414 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9415 find_tm_attribute): Declare.
9417 2011-11-07 Jason Merrill <jason@redhat.com>
9420 * c-common.c, c-common.h: Revert yesterday's changes.
9422 2011-11-06 Jason Merrill <jason@redhat.com>
9425 * c-common.c (decl_has_visibility_attr): Split out from...
9426 (c_determine_visibility): ...here.
9427 * c-common.h: Declare it.
9429 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9431 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9432 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9434 (check_user_alignment): New. Split out of
9435 handle_aligned_attribute. Disallow integer constants with
9436 noninteger types. Conditionally allow zero.
9437 (handle_aligned_attribute): Use check_user_alignment.
9438 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9440 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9441 Richard Henderson <rth@redhat.com>
9443 Merged from cxx-mem-model.
9445 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9446 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9447 parameters that are the same type size.
9448 (get_atomic_generic_size): New. Find size of generic
9449 atomic function parameters and do typechecking.
9450 (add_atomic_size_parameter): New. Insert size into parameter list.
9451 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9452 either __atomic_exchange_n or external library call.
9453 (resolve_overloaded_atomic_compare_exchange): Restructure
9454 __atomic_compare_exchange to either _n variant or external library call.
9455 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9456 __atomic_load_n or an external library call.
9457 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9458 __atomic_store_n or an external library call.
9459 (resolve_overloaded_builtin): Handle new __atomic builtins.
9461 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9464 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9465 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9466 <INDIRECT_REF>: Return the argument.
9467 <ARRAY_REF>: Remove special code for negative offset.
9468 Call fold_build_pointer_plus instead of size_binop.
9469 (fold_offsetof): Remove STOP_REF argument and adjust.
9470 * c-common.h (fold_offsetof_1): Declare.
9471 (fold_offsetof): Remove STOP_REF argument.
9473 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9476 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9477 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9478 Wnarrowing for C++0x and C++98.
9479 * c.opt ([Wnarrowing]): Update.
9481 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9484 * c.opt: Add Wzero-as-null-pointer-constant.
9486 2011-10-31 Jason Merrill <jason@redhat.com>
9488 * c.opt (-fdeduce-init-list): Off by default.
9491 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9492 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9494 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9496 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9499 * c.opt (fvisibility-inlines-hidden): Description change.
9501 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9503 Implement C++11 user-defined literals.
9504 * c-common.c (build_userdef_literal): New.
9505 * c-common.def: New tree code.
9506 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9507 * c-lex.c (interpret_float): Add suffix parm.
9508 (c_lex_with_flags): Build literal tokens.
9510 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9514 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9517 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9518 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9519 Wnarrowing for C++0x and C++98.
9520 * c.opt ([Wnarrowing]): Update.
9522 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9525 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9526 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9527 Wnarrowing for C++0x and C++98.
9528 * c.opt ([Wnarrowing]): Update.
9530 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9533 * c-common.c (conversion_warning): Remove code looking for
9534 artificial operands.
9536 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9539 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9540 !NO_IMPLICIT_EXTERN_C.
9542 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9544 * c-common.c (c_common_reswords): Add __bases,
9546 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9548 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9551 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9553 2011-10-15 Tom Tromey <tromey@redhat.com>
9554 Dodji Seketeli <dodji@redhat.com>
9556 * c.opt (fdebug-cpp): New option.
9557 * c-opts.c (c_common_handle_option): Handle the option.
9558 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9559 output stream in parameter. Factorized from ...
9560 (maybe_print_line): ... this. Dump location debug information when
9561 -fdebug-cpp is in effect.
9562 (print_line_1): New static function. Takes an output stream in
9563 parameter. Factorized from ...
9564 (print_line): ... here. Dump location information when -fdebug-cpp
9566 (scan_translation_unit): Dump location information when
9567 -fdebug-cpp is in effect.
9569 2011-10-15 Tom Tromey <tromey@redhat.com>
9570 Dodji Seketeli <dodji@redhat.com>
9572 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9574 * c-opts.c (c_common_handle_option)<case
9575 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9576 cases. Handle -ftrack-macro-expansion with and without argument.
9578 2011-10-15 Tom Tromey <tromey@redhat.com>
9579 Dodji Seketeli <dodji@redhat.com>
9581 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9582 (print_line, cb_define, do_line_change): Adjust to avoid touching
9583 the internals of struct line_map. Use the public API instead.
9584 * c-pch.c (c_common_read_pch): Likewise.
9585 * c-lex.c (fe_file_change): Likewise.
9587 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9590 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9592 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9595 * c-pretty-print.c (pp_c_floating_constant): Output
9596 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9598 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9600 * c-common.c (def_builtin_1): Delete old interface with two
9601 parallel arrays to hold standard builtin declarations, and replace
9602 it with a function based interface that can support creating
9603 builtins on the fly in the future. Change all uses, and poison
9604 the old names. Make sure 0 is not a legitimate builtin index.
9605 * c-omp.c (c_finish_omp_barrier): Ditto.
9606 (c_finish_omp_taskwait): Ditto.
9607 (c_finish_omp_flush): Ditto.
9609 2011-10-11 Tristan Gingold <gingold@adacore.com>
9611 * c.opt: (fallow-parameterless-variadic-functions): New.
9613 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9615 PR c++/33255 - Support -Wunused-local-typedefs warning
9616 * c-common.h (struct c_language_function::local_typedefs): New
9618 (record_locally_defined_typedef, maybe_record_typedef_use)
9619 (maybe_warn_unused_local_typedefs): Declare new functions.
9620 * c-common.c (record_locally_defined_typedef)
9621 (maybe_record_typedef_use)
9622 (maybe_warn_unused_local_typedefs): Define new functions.
9623 * c.opt: Declare new -Wunused-local-typedefs flag.
9625 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9628 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9631 2011-09-05 Richard Guenther <rguenther@suse.de>
9633 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9634 of integer_minus_one_node for empty array upper bounds.
9636 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9638 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9639 it's the first time it's being called on this main TU.
9641 2011-08-24 Richard Guenther <rguenther@suse.de>
9644 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9646 2011-08-22 Gabriel Charette <gchare@google.com>
9648 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9649 defined in cpp_init_builtins and c_cpp_builtins.
9651 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9653 * c-common.c (c_common_reswords): Add __builtin_complex.
9654 * c-common.h (RID_BUILTIN_COMPLEX): New.
9656 2011-08-18 Joseph Myers <joseph@codesourcery.com>
9658 * c-common.c (c_common_reswords): Add _Noreturn.
9659 (keyword_is_function_specifier): Handle RID_NORETURN.
9660 * c-common.h (RID_NORETURN): New.
9662 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9664 * c-common.c (unsafe_conversion_p): New function. Check if it is
9665 unsafe to convert an expression to the type.
9666 (conversion_warning): Adjust, use unsafe_conversion_p.
9667 * c-common.h (unsafe_conversion_p): New function declaration.
9669 2011-08-02 Jakub Jelinek <jakub@redhat.com>
9671 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9672 (c_finish_omp_taskyield): New prototype.
9673 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9674 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9675 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9676 or RHS1 have side-effects, evaluate those too in the right spot,
9677 if it is a decl and LHS is also a decl, error out if they
9679 (c_finish_omp_taskyield): New function.
9680 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9681 * c-pragma.c (omp_pragmas): Add taskyield.
9682 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9683 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9684 PRAGMA_OMP_CLAUSE_MERGEABLE.
9686 2011-07-25 Dodji Seketeli <dodji@redhat.com>
9688 * c-common.h (set_underlying_type): Remove parm name from
9691 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
9693 * c-pretty-print.h: Search c-common.h in c-family.
9695 2011-07-22 Jason Merrill <jason@redhat.com>
9698 * c.opt (Wnarrowing): New.
9701 * c-common.h: Declare c_linkage_bindings.
9702 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9705 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9706 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9707 as flag_isoc99 for 'restrict'.
9708 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9710 2011-07-21 Ian Lance Taylor <iant@google.com>
9713 * c-common.c (c_disable_warnings): New static function.
9714 (c_enable_warnings): New static function.
9715 (c_fully_fold_internal): Change local unused_p to bool. Call
9716 c_disable_warnings and c_enable_warnings rather than change
9717 c_inhibit_evaluation_warnings.
9719 2011-07-20 Jason Merrill <jason@redhat.com>
9721 PR c++/6709 (DR 743)
9722 PR c++/42603 (DR 950)
9723 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9724 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9725 (CPP_DECLTYPE): New.
9726 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9728 2011-07-19 Richard Guenther <rguenther@suse.de>
9730 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9731 * c-omp.c (c_finish_omp_for): Likewise.
9733 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9735 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9736 body on the next line.
9738 2011-07-08 Jason Merrill <jason@redhat.com>
9741 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9744 * c-common.c (c_apply_type_quals_to_decl): Don't check
9745 TYPE_NEEDS_CONSTRUCTING.
9747 2011-07-06 Richard Guenther <rguenther@suse.de>
9749 * c-common.c (c_common_nodes_and_builtins):
9750 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9752 2011-07-05 Richard Guenther <rguenther@suse.de>
9754 * c-common.c (c_common_nodes_and_builtins): Build all common
9757 2011-06-27 Jakub Jelinek <jakub@redhat.com>
9759 * c-common.h (c_tree_chain_next): New static inline function.
9761 * c-common.c (check_builtin_function_arguments): Handle
9762 BUILT_IN_ASSUME_ALIGNED.
9764 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
9766 * c-common.c: Add sync_ or SYNC__ to builtin names.
9767 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9769 2011-06-20 Pierre Vittet <piervit@pvittet.com>
9771 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9773 (gen_pragma_handler): New union.
9774 (internal_pragma_handler): New type.
9775 (c_register_pragma_with_data)
9776 (c_register_pragma_with_expansion_and_data): New functions.
9778 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9779 (c_register_pragma, c_register_pragma_with_expansion)
9780 (c_invoke_pragma_handler): Changed to work with
9781 internal_pragma_handler.
9782 (c_register_pragma_with_data)
9783 (c_register_pragma_with_expansion_and_data): New functions.
9785 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9787 * c-common.c: Include common/common-target.h.
9788 (handle_section_attribute): Use
9789 targetm_common.have_named_sections.
9790 * c-cppbuiltin.c: Include common/common-target.h.
9791 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9793 2011-06-10 Richard Guenther <rguenther@suse.de>
9795 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9796 to print a IDENTIFIER_NODE.
9798 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9799 Joseph Myers <joseph@codesourcery.com>
9801 * c.opt (fbuilding-libgcc): New option.
9802 * c-cppbuiltin.c (c_cpp_builtins): Define
9803 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9805 2011-06-07 Jason Merrill <jason@redhat.com>
9807 * c-common.c (max_tinst_depth): Lower default to 900.
9809 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9811 2011-06-07 Richard Guenther <rguenther@suse.de>
9813 * c-common.c (c_common_nodes_and_builtins): Do not set
9814 size_type_node or call set_sizetype.
9816 2011-06-07 Dodji Seketeli <dodji@redhat.com>
9819 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9820 type when using pointer comparison to compare types.
9822 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9824 * c.opt: Add -Wdelete-non-virtual-dtor.
9825 * c-opts.c (c_common_handle_option): Include it in -Wall.
9827 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9832 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9834 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9837 2011-05-27 Jakub Jelinek <jakub@redhat.com>
9840 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9841 C++ don't call c_common_truthvalue_conversion on void type arms.
9843 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9845 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9846 (stmt_list_stack): Define.
9847 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9848 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9850 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9852 * c-common.c (warning_candidate_p): Check for BLOCKs.
9854 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9856 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9859 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9861 * c-common.c (def_fn_type): Remove extra va_end.
9863 2011-05-23 Jason Merrill <jason@redhat.com>
9866 * c-common.c (c_common_get_narrower): New.
9867 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9869 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9871 * c-common.h (check_function_arguments): Tweak prototype of
9872 check_function_arguments.
9873 * c-common.c (check_function_arguments): Likewise. Adjust
9874 calls to check_function_nonnull, check_function_format, and
9875 check_function_sentinel.
9876 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9877 separate attributes and typelist arguments. Use
9878 FOREACH_FUNCTION_ARGS to iterate over argument types.
9880 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9882 * c-common.c (c_common_reswords): Reorder.
9883 * c-common.h (rid): Likewise.
9885 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9887 * c-common.c (def_fn_type): Don't call build_function_type, call
9888 build_function_type_array or build_varargs_function_type_array
9890 (c_common_nodes_and_builtins): Likewise.
9892 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9894 * c-common.c (c_add_case_label): Omit the loc argument to
9896 * c-common.h (build_case_label): Remove.
9897 * c-semantics.c (build_case_label): Remove.
9899 2011-05-05 Joseph Myers <joseph@codesourcery.com>
9901 * c-objc.h (objc_start_method_definition): Update prototype.
9902 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9904 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9906 * c-common.c (check_main_parameter_types): Reindent. Don't use
9907 TYPE_ARG_TYPES directly.
9908 (handle_nonnull_attribute): Likewise.
9909 (sync_resolve_params): Likewise.
9910 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9911 to check_format_string.
9912 (handle_format_attribute): Likewise.
9913 (check_format_string): Take a function type to examine instead of
9914 a type list. Use a function_arg_iterator to step through argument
9917 2011-05-04 Richard Guenther <rguenther@suse.de>
9919 * c-common.c (fix_string_type): Use size_int for index type bounds.
9920 (start_fname_decls): Do not pass NULL to build_int_cst.
9921 (c_init_attributes): Likewise.
9922 * c-lex.c (c_lex_with_flags): Likewise.
9924 2011-04-27 Jason Merrill <jason@redhat.com>
9926 * c-common.c (make_tree_vector_from_list): New.
9927 * c-common.h: Declare it.
9929 2011-04-26 Richard Guenther <rguenther@suse.de>
9931 PR preprocessor/48248
9932 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9933 for output size with -P.
9935 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9937 * c-common.c (struct c_common_resword): Add __underlying_type.
9938 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9940 2011-04-20 Jim Meyering <meyering@redhat.com>
9942 * c-format.c (init_dollar_format_checking): Remove useless
9945 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9947 * c-objc.h (objc_get_interface_ivars): Removed.
9948 (objc_detect_field_duplicates): New.
9949 * stub-objc.c: Likewise.
9951 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9953 * stub-objc.c (objc_declare_protocols): Renamed to
9954 objc_declare_protocol.
9955 * c-objc.h: Likewise.
9957 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9959 * stub-objc.c (objc_declare_class): Updated argument name.
9961 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9963 * c-common.h (c_common_init_ts): Declare.
9964 * c-common.c (c_common_init_ts): Define.
9966 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9968 * c-objc.h (objc_build_message_expr): Updated prototype.
9969 * stub-objc.c (objc_build_message_expr): Likewise.
9971 2011-04-12 Martin Jambor <mjambor@suse.cz>
9973 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9976 2011-04-11 Richard Guenther <rguenther@suse.de>
9978 * c-common.c (complete_array_type): Build a range type of
9981 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9983 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9984 (handle_type_generic_attribute): Likewise.
9986 2011-04-07 Jason Merrill <jason@redhat.com>
9989 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9990 conversion from C++0x scoped enum.
9992 2011-04-06 Joseph Myers <joseph@codesourcery.com>
9994 * c-target-def.h: New file.
9995 * c-target.def: New file.
9996 * c-target.h: New file.
9997 * c-common.c (targetcm): Don't define here.
9998 * c-common.h (default_handle_c_option): Declare.
9999 * c-format.c: Include c-target.h instead of target.h.
10000 * c-opts.c: Include c-target.h instead of target.h. Explicitly
10002 (default_handle_c_option): Move from targhooks.c.
10004 2011-03-29 Jakub Jelinek <jakub@redhat.com>
10006 PR preprocessor/48248
10007 * c-ppoutput.c (print): Add src_file field.
10008 (init_pp_output): Initialize it.
10009 (maybe_print_line): Don't optimize by adding up to 8 newlines
10010 if map->to_file and print.src_file are different file.
10011 (print_line): Update print.src_file.
10013 2011-03-25 Kai Tietz <ktietz@redhat.com>
10015 * c-ada-spec.c (compare_comment): Use filename_cmp
10016 instead of strcmp for filename.
10018 2011-03-25 Jeff Law <law@redhat.com>
10020 * c-common.c (def_fn_type): Add missing va_end.
10022 2011-03-25 Jason Merrill <jason@redhat.com>
10024 * c.opt: Add -std=c++03.
10026 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
10028 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
10030 2011-03-17 Kai Tietz <ktietz@redhat.com>
10033 * c-pretty-print.c (pp_c_specifier_qualifier_list):
10034 Display allowed attributes for function pointer types.
10035 (pp_c_attributes_display): New function to display
10036 attributes having affects_type_identity flag set to true.
10037 * c-pretty-print.h (pp_c_attributes_display): New prototype.
10039 * c-common.c (c_common_attribute_table):
10041 (c_common_format_attribute_table): Likewise.
10043 2011-03-18 Jason Merrill <jason@redhat.com>
10045 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
10046 * c-common.h: Don't declare it here.
10047 * c-common.c: Or define it here.
10048 * c-opts.c (c_common_handle_option): Or set it here.
10051 * c-common.c (handle_transparent_union_attribute): Don't
10052 make a duplicate type in C++.
10054 2011-03-15 Jason Merrill <jason@redhat.com>
10056 * c-common.c (max_constexpr_depth): New.
10057 * c-common.h: Declare it.
10058 * c-opts.c (c_common_handle_option): Set it.
10059 * c.opt (fconstexpr-depth): New option.
10061 2011-03-11 Jason Merrill <jason@redhat.com>
10063 * c-common.c (attribute_takes_identifier_p): Add missing const.
10066 * c-common.c (attribute_takes_identifier_p): Assume that an
10067 unknown attribute takes an identifier.
10069 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
10072 * c-common.c (c_type_hash): Call list_length instead of iterating
10073 through DECL_CHAIN. Rename 'i' to 'n_elements'.
10075 2011-02-19 Jakub Jelinek <jakub@redhat.com>
10078 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
10080 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
10082 * c.opt (fobjc-abi-version=) New.
10083 (fobjc-nilcheck): New.
10085 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
10088 * c-common.h (keyword_is_decl_specifier): Declare.
10089 * c-common.c (keyword_is_decl_specifier): Define.
10090 (keyword_is_function_specifier): New function.
10092 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10095 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
10096 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
10099 2011-01-26 Arnaud Charlet <charlet@adacore.com>
10101 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
10103 2011-01-26 Jakub Jelinek <jakub@redhat.com>
10106 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
10107 after init_c_lex if pch_file is set.
10109 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
10112 * c.opt (-fkeep-inline-dllexport): New switch.
10114 2011-01-12 Richard Guenther <rguenther@suse.de>
10116 PR middle-end/32511
10117 * c-common.c (handle_weak_attribute): Warn instead of error
10118 on declaring an inline function weak.
10120 2011-01-05 Tom Tromey <tromey@redhat.com>
10122 * c-common.h (lvalue_error): Update.
10123 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10126 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
10129 * c-objc.h (objc_finish_message_expr): Added argument to
10132 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10134 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10137 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10139 * c-objc.h (objc_maybe_warn_exceptions): New.
10140 * stub-objc.c (objc_maybe_warn_exceptions): New.
10142 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10144 * c-common.h (readonly_error): Declare.
10145 * c-common.c (readonly_error): Define.
10147 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10149 * c-common.h (invalid_indirection_error): Declare.
10150 * c-common.c (invalid_indirection_error): Define.
10152 2010-12-03 Richard Guenther <rguenther@suse.de>
10155 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10156 (pp_c_unary_expression): Likewise.
10157 (pp_c_expression): Likewise.
10159 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10161 * c-common.h (objc_finish_function): New.
10162 (objc_non_volatilized_type): Removed.
10163 (objc_type_quals_match): Removed.
10164 * stub-objc.c (objc_finish_function): New.
10165 (objc_non_volatilized_type): Removed.
10166 (objc_type_quals_match): Removed.
10168 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10170 * c-common.h (parse_optimize_options): Declare.
10171 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10172 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10174 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10176 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10178 * c-pch.c (O_BINARY): Don't define here.
10179 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10181 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10183 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10184 targetm.except_unwind_info.
10186 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10188 * c-opts.c (c_common_handle_option): Pass location to
10189 set_struct_debug_option.
10191 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10193 * c-common.c (visibility_options): Move from ../opts.c.
10194 * c-common.h (struct visibility_flags, visibility_options):
10196 * c-opts.c (finish_options): Rename to c_finish_options.
10197 (c_common_init): Update call to finish_options.
10199 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10202 * c-lex.c (lex_string): Check that each string in an Objective-C
10203 string concat sequence starts with either one or zero '@', and
10204 that there are no spurious '@' signs at the end.
10206 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10208 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10209 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10210 HANDLE_PRAGMA_VISIBILITY.
10211 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10212 HANDLE_PRAGMA_VISIBILITY): Don't define.
10213 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10215 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10220 * c-common.h (keyword_begins_type_specifier): Declare.
10221 (keyword_is_storage_class_specifier): Declare.
10222 (keyword_is_type_qualifier): Declare.
10223 * c-common.c (keyword_begins_type_specifier): New function.
10224 (keyword_is_storage_class_specifier): New function.
10225 (keyword_is_type_qualifier): Declare.
10227 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10230 * c-common.c (in_late_binary_op): Define.
10231 (c_common_truthvalue_conversion): Check in_late_binary_op before
10232 calling c_save_expr.
10233 * c-common.h (in_late_binary_op): Declare.
10235 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10237 * c-opts.c (c_common_handle_option): Update calls to
10238 set_struct_debug_option.
10240 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10242 * c-common.h (objc_declare_protocols): Added additional argument.
10243 * stub-objc.c (objc_declare_protocol): Same change.
10245 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10248 * c-common.h (build_real_imag_expr): Declare.
10249 * c-semantics.c (build_real_imag_expr): Define.
10251 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10253 * c-opts.c (c_common_parse_file): Take no arguments.
10254 * c-common.h (c_common_parse_file): Update prototype.
10256 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10259 * c-common.c (warning_candidate_p): Don't track non-const calls
10262 2010-11-15 Ian Lance Taylor <iant@google.com>
10264 * c-lex.c (init_c_lex): Set macro debug callbacks if
10265 flag_dump_go_spec is set.
10267 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10269 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10270 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10272 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10274 PR preprocessor/45038
10275 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10278 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10280 * c-common.h (c_family_lang_mask): Declare.
10281 * c-opts.c (c_family_lang_mask): Make extern.
10282 * c-pragma.c (handle_pragma_diagnostic): Use
10283 control_warning_option.
10285 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10287 * c-common.c (parse_optimize_options): Update call to
10289 * c-common.h (c_common_handle_option): Update prototype.
10290 * c-opts.c (c_common_handle_option): Take location_t parameter and
10291 pass it to other functions.
10293 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10295 * c-opts.c (warning_as_error_callback): Remove.
10296 (c_common_initialize_diagnostics): Don't call
10297 register_warning_as_error_callback.
10298 (c_common_handle_option): Handle -Werror=normalized= here.
10300 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10302 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10304 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10306 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10307 Remove trailing '.' from diagnostics.
10308 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10310 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10312 * c-common.c (parse_optimize_options): Pass global_dc to
10314 * c-opts.c (c_common_handle_option): Pass &global_options to
10315 set_Wstrict_aliasing.
10316 * c.opt (v): Don't mark Common or document here.
10318 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10321 * c-format.c (format_type): New type gcc_objc_string_format_type.
10322 (valid_stringptr_type_p): New.
10323 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10324 (check_format_string): Pass expected type, use
10325 valid_stringptr_type_p (), check that the format string types are
10326 consistent with the format specification.
10327 (decode_format_attr): Warn if NSString is used outside objective-c.
10328 (format_types_orig): Add NSString.
10329 (format_name): New.
10330 (format_flags): New.
10331 (check_format_arg): Handle format strings requiring an external parser.
10332 first_target_format_type: New variable.
10333 (handle_format_attribute): Set up first_target_format_type, pass the
10334 expected format arg string type to check_format_string().
10335 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10336 * stub-objc.c (objc_string_ref_type_p): New.
10337 (objc_check_format_arg): New.
10339 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10341 Fixed using the Objective-C 2.0 dot-syntax with class names.
10342 * c-common.h (objc_build_class_component_ref): New.
10343 * stub-objc.c (objc_build_class_component_ref): New.
10345 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10347 * c.opt (Wproperty-assign-default): New option.
10349 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10351 Implemented -fobjc-std=objc1 flag.
10352 * c.opt (fobjc-std=objc1): New option.
10354 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10356 Implemented format and noreturn attributes for Objective-C methods.
10357 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10358 attribute for Objective-C methods.
10360 2010-10-31 Jason Merrill <jason@redhat.com>
10362 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10365 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10367 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10368 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10369 (objc_add_property_declaration): Removed arguments for copies and
10371 (objc_build_getter_call): Renamed to
10372 objc_maybe_build_component_ref.
10373 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10374 (objc_is_property_ref): New.
10375 * c-common.c (c_common_reswords): Removed copies and ivar.
10376 * stub-objc.c (objc_add_property_declaration): Removed arguments
10377 for copies and ivar.
10378 (objc_build_getter_call): Renamed to
10379 objc_maybe_build_component_ref.
10380 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10381 (objc_is_property_ref): New.
10383 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10384 Matthew Gingell <gingell@adacore.com>
10386 * c-ada-spec.c (separate_class_package): New function.
10387 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10388 name of their enclosing package.
10389 (print_ada_declaration): Use separate_class_package.
10391 2010-10-27 Jason Merrill <jason@redhat.com>
10393 * c-common.c (c_common_reswords): Add __is_literal_type.
10394 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10396 * c-common.c (check_case_value): Remove special C++ code.
10398 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10400 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10401 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10402 and RID_LAST_PATTR.
10403 (objc_add_property_declaration): Added additional arguments.
10404 (objc_property_attribute_kind): Removed.
10405 (objc_set_property_attr): Removed.
10406 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10407 copy and nonatomic.
10408 * stub-objc.c (objc_add_property_declaration): Added additional
10410 (objc_set_property_attr): Removed.
10412 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10414 * c-common.h (objc_add_property_variable): Renamed to
10415 objc_add_property_declaration. Added location argument.
10416 * stub-objc.c (objc_add_property_variable): Same change.
10418 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10420 * c-common.h (objc_maybe_printable_name): New.
10421 * stub-objc.c (objc_maybe_printable_name): New.
10423 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10424 Andrew Pinski <pinskia@gmail.com>
10426 * c-common.h (c_common_mark_addressable_vec): Declare.
10427 * c-common.c (c_common_mark_addressable_vec): New function.
10429 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10431 * c-common.h (objc_set_method_type): Removed.
10432 (objc_add_method_declaration): Added boolean argument.
10433 (objc_start_method_definition): Same change.
10434 (objc_build_method_signature): Same change.
10435 * stub-objc.c (objc_set_method_type): Removed.
10436 (objc_add_method_declaration): Added boolean argument.
10437 (objc_start_method_definition): Same change.
10438 (objc_build_method_signature): Same change.
10440 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10442 * c-common.h (finish_file): Removed.
10443 (objc_write_global_declarations): New.
10444 * c-opts.c (c_common_parse_file): Do not call finish_file.
10445 * stub-objc.c (objc_write_global_declarations): New.
10447 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10449 Implemented parsing @synthesize and @dynamic for
10450 Objective-C/Objective-C++.
10451 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10452 (objc_add_synthesize_declaration): New.
10453 (objc_add_dynamic_declaration): New.
10454 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10455 * stub-objc.c (objc_add_synthesize_declaration): New.
10456 (objc_add_dynamic_declaration): New.
10458 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10461 * c-cppbuiltin.c (mode_has_fma): Move function here from
10462 builtins.c. Don't use the fma optab, instead just use the
10463 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10466 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10468 Merge from 'apple/trunk' branch on FSF servers.
10470 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10473 * c-common.h (objc_non_volatilized_type): New declaration
10474 * stub-objc.c (objc_non_volatilized_type): New stub.
10476 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10478 Merge from 'apple/trunk' branch on FSF servers.
10480 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10483 * c-common.h (objc_diagnose_private_ivar): New decl.
10484 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10486 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10488 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10489 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10490 (objc_ivar_visibility_kind): New enum.
10491 (objc_set_visibility): Adjust prototype to use visibility enum.
10492 * stub-objc.c (objc_set_visibility): Adjust stub to use
10495 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10497 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10498 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10499 has the appropriate fma builtins.
10500 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10502 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10504 merge from FSF apple 'trunk' branch.
10505 2006 Fariborz Jahanian <fjahanian@apple.com>
10507 Radars 4436866, 4505126, 4506903, 4517826
10508 * c-common.c (c_common_resword): Define @property and its attributes.
10509 * c-common.h: Define property attribute enum entries.
10510 (OBJC_IS_PATTR_KEYWORD): New.
10511 (objc_property_attribute_kind): New enum.
10512 Declare objc_set_property_attr (), objc_add_property_variable (),
10513 objc_build_getter_call () and objc_build_setter_call ().
10514 * stub-objc.c (objc_set_property_attr): New stub.
10515 (objc_add_property_variable): Likewise.
10516 (objc_build_getter_call): Likewise.
10517 (objc_build_setter_call) Likewise.
10519 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10521 merge from FSF apple 'trunk' branch.
10522 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10524 Radar 3803157 (method attributes)
10525 * c-common.c (handle_deprecated_attribute): Recognize
10526 objc methods as valid declarations.
10527 * c-common.h: Declare objc_method_decl ().
10528 * stub-objc.c (objc_method_decl): New stub.
10530 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10532 * c-common.c (parse_optimize_options): Call
10533 decode_cmdline_options_to_array_default_mask before
10534 decode_options. Update arguments to decode_options.
10535 * c-common.h (c_common_init_options_struct): Declare.
10536 * c-opts.c (c_common_init_options_struct): New. Split out from
10537 c_common_init_options.
10539 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10541 Implemented fast enumeration for Objective-C.
10542 * c-common.h (objc_finish_foreach_loop): New.
10543 * stub-objc.c (objc_finish_foreach_loop): New.
10545 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10547 * c-common.h (struct diagnostic_context): Don't declare here.
10548 (c_common_initialize_diagnostics): Declare using
10549 diagnostic_context typedef.
10550 * c-opts.c (c_common_handle_option): Pass global_dc to
10551 handle_generated_option.
10553 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10555 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10556 handle_generated_option.
10558 2010-10-03 Ian Lance Taylor <iant@google.com>
10560 * c.opt (-fplan9-extensions): New option.
10562 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10564 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10566 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10567 of duplicating code.
10569 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10571 * c-common.c: Add two new entries for @optional
10572 and @required keywords.
10574 merge from FSF 'apple/trunk' branch.
10575 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10578 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10579 objective-c keywords.
10580 (objc_set_method_opt): New declaration.
10581 * stub-objc.c (objc_set_method_opt): New stub.
10583 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10585 * c-common.c (handle_optimize_attribute): Pass &global_options to
10586 cl_optimization_save and cl_optimization_restore.
10587 * c-opts.c (c_common_handle_option): Pass &global_options to
10588 handle_generated_option.
10589 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10590 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10591 &global_options to cl_optimization_restore.
10593 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10595 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10596 Objective-C/Objective-C++ keywords.
10598 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10600 Merge from 'apple/trunk' branch on FSF servers.
10602 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10605 * c-common.h (objc_check_global_decl): New declaration.
10606 * stub-objc.c (objc_check_global_decl): New stub.
10608 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10610 * c.opt: Don't use VarExists.
10612 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10614 * c-common.c (c_cpp_error): Update names of diagnostic_context
10616 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10617 cl_optimization members.
10618 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10619 sanitize_cpp_opts, finish_options): Update names of cpp_options
10622 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10624 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10625 (objc_is_reserved_word): Removed.
10626 * c-common.c: Updated comments.
10627 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10628 objc_is_reserved_word.
10629 * stub-objc.c (objc_is_reserved_word): Removed.
10631 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10633 * c-common.h (objc_add_method_declaration): Adjust prototype to
10634 include attributes.
10635 (objc_start_method_definition): Likewise.
10636 (objc_build_keyword_decl): Likewise.
10637 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10638 (objc_start_method_definition): Likewise.
10639 (objc_build_keyword_decl): Likewise.
10641 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10643 * c-common.h (objc_start_class_interface): Adjust prototype.
10644 (objc_start_category_interface): Likewise.
10645 (objc_start_protocol): Likewise.
10646 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10647 (objc_start_class_interface): Likewise.
10648 (objc_start_category_interface): Likewise.
10650 2010-09-27 Ian Lance Taylor <iant@google.com>
10652 * c-common.c (c_common_attribute_table): Add no_split_stack.
10653 (handle_no_split_stack_attribute): New static function.
10655 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10657 Merge from 'apple/trunk' branch on FSF servers.
10659 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
10662 * c-common.h (objc_have_common_type): New declaration.
10663 * stub-objc.c (objc_have_common_type): New stub.
10665 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10668 * c-common.h (objc_common_type): New prototype.
10669 * stub-objc.c (objc_common_type): New stub.
10671 2010-09-24 Jan Hubicka <jh@suse.cz>
10673 * c-common.c (handle_leaf_attribute): New function.
10674 (struct attribute_spec c_common_att): Add leaf.
10676 2010-09-22 Joseph Myers <joseph@codesourcery.com>
10678 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10679 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10680 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10681 -include-barrier, -include-directory, -include-directory=,
10682 -include-directory-after, -include-directory-after=,
10683 -include-prefix, -include-prefix=, -include-with-prefix,
10684 -include-with-prefix=, -include-with-prefix-after,
10685 -include-with-prefix-after=, -include-with-prefix-before,
10686 -include-with-prefix-before=, -no-integrated-cpp,
10687 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10688 -output=, -pedantic, -pedantic-errors, -preprocess,
10689 -print-missing-file-dependencies, -trace-includes, -traditional,
10690 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10691 -user-dependencies, -verbose, -write-dependencies,
10692 -write-user-dependencies, no-integrated-cpp, traditional): New.
10694 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10697 * c-common.h (objc_start_method_definition): Return bool instead
10699 * stub-objc.c (objc_start_method_definition): Return bool instead
10702 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10705 * c-common.h (objc_get_interface_ivars): New declaration.
10706 * stub-objc.c (objc_get_interface_ivars): New stub.
10708 2010-09-15 Ian Lance Taylor <iant@google.com>
10710 * c-common.c (parse_optimize_options): Do not capitalize warning
10711 messages. Remove period at end of warning message.
10713 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10715 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10716 (handle_alias_attribute): ... here.
10717 (handle_ifunc_attribute): New.
10719 2010-09-06 Mark Mitchell <mark@codesourcery.com>
10721 * c-common.h (do_warn_double_promotion): Declare.
10722 * c-common.c (do_warn_double_promotion): Define.
10724 2010-09-05 Mark Mitchell <mark@codesourcery.com>
10726 * c.opt (Wdouble-promotion): New.
10728 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10730 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10731 fvtable-thunks, fxref): Mark no longer supported in help text.
10733 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10735 * c.opt (Wimport, fall-virtual, falt-external-templates,
10736 fdefault-inline, fenum-int-equiv, fexternal-templates,
10737 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10738 fname-mangling-version-, fnew-abi, fnonnull-objects,
10739 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10740 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10742 (fhandle-exceptions): Mark with Alias and Warn.
10743 * c-opts.c (c_common_handle_option): Don't handle options marked
10746 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10748 * c.opt (Wcomments, Werror-implicit-function-declaration,
10749 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10750 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10752 * c-common.c (option_codes): Use OPT_Wcomment instead of
10754 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10755 Don't handle options marked as aliases.
10757 2010-08-25 Richard Guenther <rguenther@suse.de>
10759 * c-common.c (c_common_get_alias_set): Remove special
10760 handling for pointers.
10762 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10764 * c-common.c: Use FOR_EACH_VEC_ELT.
10765 * c-gimplify.c: Likewise.
10766 * c-pragma.c: Likewise.
10768 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10770 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10772 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10774 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10775 instead of OPT_MDX and OPT_MMDX.
10777 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10779 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10781 2010-08-12 Joseph Myers <joseph@codesourcery.com>
10783 * c.opt (MD, MMD): Change to MDX and MMDX.
10784 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10786 2010-08-11 Joseph Myers <joseph@codesourcery.com>
10788 * c-opts.c (c_common_handle_option): Call handle_generated_option
10789 instead of handle_option.
10791 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10793 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10794 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10796 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10798 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10799 (pending_redefine_extname): Change type to a VEC.
10800 (add_to_renaming_pragma_list): Update for new type of
10801 pending_redefine_extname.
10802 (maybe_apply_renaming_pragma): Likewise.
10804 2010-08-04 Arnaud Charlet <charlet@adacore.com>
10806 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10808 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10809 decide whether a type has already been declared/seen.
10810 Do not go to the original type.
10811 (dump_nested_types): New parameter forward.
10812 Generate forward declaration if needed and mark type as visited.
10813 (print_ada_declaration): Call dump_nested_types if not already done.
10814 Mark types as visited.
10816 2010-08-03 Joseph Myers <joseph@codesourcery.com>
10818 * c.opt (-print-pch-checksum): Remove option.
10819 * c-opts.c (c_common_handle_option): Don't handle
10820 OPT_print_pch_checksum.
10822 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10824 * c-common.h (c_common_handle_option): Update prototype and return
10826 * c-opts.c (c_common_handle_option): Update prototype and return
10827 value type. Update calls to handle_option and
10828 enable_warning_as_error.
10830 2010-07-27 Jakub Jelinek <jakub@redhat.com>
10833 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10835 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10837 * c-common.h (c_common_missing_argument): Remove.
10838 * c-opts.c (c_common_missing_argument): Remove.
10839 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10840 idirafter, imacros, include, isysroot, isystem, iquote): Add
10842 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10844 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10846 * c-common.h (c_common_option_lang_mask,
10847 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10849 (c_common_init_options): Update prototype.
10850 * c-opts.c (c_common_option_lang_mask): New.
10851 (c_common_initialize_diagnostics): Split out of
10852 c_common_init_options.
10853 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10855 (c_common_init_options): Update prototype. Use decoded options in
10856 search for -lang-asm.
10858 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10860 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10861 * c-format.c: Likewise.
10863 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10865 * c-common.h: Include diagnostic-core.h. Error if already
10867 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10869 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10871 * c-common.c (IN_GCC_FRONTEND): Do not undef.
10872 Do not include expr.h
10873 (vector_mode_valid_p): Move here.
10875 2010-06-21 DJ Delorie <dj@redhat.com>
10877 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10878 allow these pragmas anywhere.
10880 2010-06-14 Jakub Jelinek <jakub@redhat.com>
10883 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10884 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10885 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10886 ggc_strdup instead of xstrdup.
10888 2010-06-10 Jakub Jelinek <jakub@redhat.com>
10890 * c-cppbuiltin.c: Include cpp-id-data.h.
10891 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10892 (lazy_hex_fp_value): New function.
10893 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10895 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10897 * c-gimplify.c: Do not include tree-flow.h
10899 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10902 * c-common.c: Rename targetm member:
10903 targetm.enum_va_list -> targetm.enum_va_list_p
10905 2010-06-28 Anatoly Sokolov <aesok@post.ru>
10907 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10909 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10911 * c-cppbuiltin.c: Do not include except.h.
10913 2010-06-24 Andi Kleen <ak@linux.intel.com>
10915 * c-common.c (warn_for_omitted_condop): New.
10916 * c-common.h (warn_for_omitted_condop): Add prototype.
10918 2010-06-21 Joseph Myers <joseph@codesourcery.com>
10920 * c.opt (lang-objc): Remove.
10921 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10923 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10925 * c-opts.c: Include "tm_p.h".
10927 2010-06-20 Joseph Myers <joseph@codesourcery.com>
10929 * c-common.c (parse_optimize_options): Update call to
10932 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10934 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10935 new type of types_used_by_cur_var_decl.
10937 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10940 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10941 for C++ standard compliance.
10943 2010-06-16 Jason Merrill <jason@redhat.com>
10945 * c.opt: Add -Wnoexcept.
10947 2010-06-16 Richard Guenther <rguenther@suse.de>
10950 * c-common.c (c_common_truthvalue_conversion): Remove
10951 premature and wrong optimization concering ADDR_EXPRs.
10953 2010-06-15 Arnaud Charlet <charlet@adacore.com>
10955 * c-ada-spec.c (dump_sloc): Remove column info.
10956 (is_simple_enum): New function.
10957 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10958 enum types when relevant.
10960 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10962 * c-common.c (conversion_warning): Warn at expression
10965 2010-06-10 Joseph Myers <joseph@codesourcery.com>
10967 * c-opts.c (c_common_handle_option): Don't handle
10970 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10972 * c-pragma.c (push_alignment): Use typed GC allocation.
10973 (handle_pragma_push_options): Likewise.
10975 * c-common.c (parse_optimize_options): Likewise.
10977 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10980 2010-06-07 Joseph Myers <joseph@codesourcery.com>
10982 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10983 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10984 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10985 flag_signed_bitfields, warn_strict_null_sentinel,
10986 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10987 flag_gen_declaration, flag_no_gnu_keywords,
10988 flag_implement_inlines, flag_implicit_templates,
10989 flag_implicit_inline_templates, flag_optional_diags,
10990 flag_elide_constructors, flag_default_inline, flag_rtti,
10991 flag_conserve_space, flag_access_control, flag_check_new,
10992 flag_new_for_scope, flag_weak, flag_working_directory,
10993 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10994 flag_enforce_eh_specs, flag_threadsafe_statics,
10995 flag_pretty_templates): Remove.
10996 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10997 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10998 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10999 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
11000 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
11001 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
11002 flag_no_gnu_keywords, flag_implement_inlines,
11003 flag_implicit_templates, flag_implicit_inline_templates,
11004 flag_optional_diags, flag_elide_constructors, flag_default_inline,
11005 flag_rtti, flag_conserve_space, flag_access_control,
11006 flag_check_new, flag_new_for_scope, flag_weak,
11007 flag_working_directory, flag_use_cxa_atexit,
11008 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
11009 flag_threadsafe_statics, flag_pretty_templates,
11010 warn_strict_null_sentinel): Remove.
11011 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
11012 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
11013 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
11014 fimplicit-inline-templates, fimplicit-templates,
11015 flax-vector-conversions, fms-extensions, fnil-receivers,
11016 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
11017 frtti, fshort-double, fshort-enums, fshort-wchar,
11018 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
11019 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
11020 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
11021 gen-decls, undef): Use Var.
11022 (fdefault-inline, foptional-diags): Document as doing nothing.
11023 * c-opts.c (c_common_handle_option): Remove cases for options now
11024 using Var. Mark ignored options as such.
11026 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
11028 * c-common.c: Moved to here from parent directory.
11029 * c-common.def: Likewise.
11030 * c-common.h: Likewise.
11031 * c-cppbuiltin.c: Likewise.
11032 * c-dump.c: Likewise.
11033 * c-format.c: Likewise.
11034 * c-format.h : Likewise.
11035 * c-gimplify.c: Likewise.
11036 * c-lex.c: Likewise.
11037 * c-omp.c: Likewise.
11039 * c-opts.c: Likewise.
11040 * c-pch.c: Likewise.
11041 * c-ppoutput.c: Likewise.
11042 * c-pragma.c: Likewise.
11043 * c-pragma.h: Likewise.
11044 * c-pretty-print.c: Likewise.
11045 * c-pretty-print.h: Likewise.
11046 * c-semantics.c: Likewise.
11047 * stub-objc.c: Likewise.
11049 * c-common.c: Include gt-c-family-c-common.h.
11050 * c-pragma.c: Include gt-c-family-c-pragma.h.
11052 Copyright (C) 2010-2020 Free Software Foundation, Inc.
11054 Copying and distribution of this file, with or without modification,
11055 are permitted in any medium without royalty provided the copyright
11056 notice and this notice are preserved.