1 2020-03-02 Marek Polacek <polacek@redhat.com>
3 PR c++/93958 - add missing -std=gnu++20.
4 * c.opt: Add -std=gnu++20.
6 2020-03-01 Martin Sebor <msebor@redhat.com>
9 * c-attribs.c (append_access_attrs): Correctly handle attribute.
10 (handle_access_attribute): Same.
12 2020-02-25 Jakub Jelinek <jakub@redhat.com>
15 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
16 "did you mean" hint in diagnostics.
18 2020-02-15 Jason Merrill <jason@redhat.com>
20 * c.opt: Add -std=c++20.
22 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
24 * c-ada-spec.c: Include bitmap.h.
25 (dump_ada_double_name): Rename into...
26 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
27 (dump_ada_array_type): Adjust to above renaming. Robustify.
28 (dump_nested_types_1): New function copied from... Add dumped_types
29 parameter and pass it down to dump_nested_type.
30 (dump_nested_types): ...this. Remove parent parameter. Just call
31 dump_nested_types_1 on an automatic bitmap.
32 (dump_nested_type): Add dumped_types parameter.
33 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
34 Adjust recursive calls and adjust to above renaming.
35 (dump_ada_declaration): Adjust call to dump_nested_types.
36 Tidy up and adjust to above renaming.
37 (dump_ada_specs): Initialize and release bitmap obstack.
39 2020-02-10 Martin Sebor <msebor@redhat.com>
42 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
44 2020-02-10 Jakub Jelinek <jakub@redhat.com>
47 * c-format.c (check_plain): Fix up last argument of strncasecmp.
48 Remove useless extra test.
50 2020-02-03 Julian Brown <julian@codesourcery.com>
51 Tobias Burnus <tobias@codesourcery.com>
53 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
55 2020-01-29 Jason Merrill <jason@redhat.com>
58 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
60 2020-01-23 Jason Merrill <jason@redhat.com>
62 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
64 2020-01-23 Martin Sebor <msebor@redhat.com>
67 * c-common.c (check_function_arguments): Avoid overlap checking
70 2020-01-22 Jason Merrill <jason@redhat.com>
72 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
74 * c-warn.c (conversion_warning): Check operands only after checking
75 the whole expression. Don't check second operand of + for sign.
77 2020-01-21 Jason Merrill <jason@redhat.com>
78 Manuel López-Ibáñez <manu@gcc.gnu.org>
80 PR c++/40752 - useless -Wconversion with short +=.
81 * c.opt (-Warith-conversion): New.
82 * c-warn.c (conversion_warning): Recurse for operands of
83 operators. Only warn about the whole expression with
86 2020-01-21 Jason Merrill <jason@redhat.com>
88 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
89 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
91 2020-01-20 Nathan Sidwell <nathan@acm.org>
94 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
96 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
98 * c-common.c (co_await, co_yield, co_return): New.
99 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
100 RID_CO_RETURN): New enumeration values.
101 (D_CXX_COROUTINES): Bit to identify coroutines are active.
102 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
103 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
104 * c.opt (fcoroutines): New command-line switch.
106 2020-01-10 David Malcolm <dmalcolm@redhat.com>
108 * c-format.c (local_event_ptr_node): New.
109 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
110 (init_dynamic_diag_info): Initialize local_event_ptr_node.
111 * c-format.h (T_EVENT_PTR): New define.
113 2020-01-10 Martin Sebor <msebor@redhat.com>
116 * c-attribs.c (append_access_attrs): Validate against the translated
117 access string rather than the human-readable representation.
119 2020-01-01 Jakub Jelinek <jakub@redhat.com>
121 Update copyright years.
123 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
125 * c-ada-spec.h (decl_sloc): Delete.
126 * c-ada-spec.c (decl_sloc): Make static.
128 2019-12-19 Julian Brown <julian@codesourcery.com>
130 * c-common.h (c_omp_map_clause_name): Add prototype.
131 * c-omp.c (c_omp_map_clause_name): New function.
132 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
133 PRAGMA_OACC_CLAUSE_DETACH.
135 2019-12-19 Julian Brown <julian@codesourcery.com>
136 Maciej W. Rozycki <macro@codesourcery.com>
137 Tobias Burnus <tobias@codesourcery.com>
138 Thomas Schwinge <thomas@codesourcery.com>
140 * c-pragma.h (pragma_omp_clause): Add
141 PRAGMA_OACC_CLAUSE_NO_CREATE.
143 2019-12-17 Martin Sebor <msebor@redhat.com>
146 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
148 2019-12-11 David Malcolm <dmalcolm@redhat.com>
150 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
152 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
154 2019-12-09 David Malcolm <dmalcolm@redhat.com>
156 * c-format.c (range_label_for_format_type_mismatch::get_text):
157 Replace label_text ctor called with true with label_text::take.
159 2019-12-09 David Malcolm <dmalcolm@redhat.com>
161 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
162 initial newline from expected outputs.
163 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
164 call to diagnostic_show_locus.
166 2019-12-06 Jakub Jelinek <jakub@redhat.com>
168 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
171 2019-12-05 Marek Polacek <polacek@redhat.com>
172 Jakub Jelinek <jakub@redhat.com>
174 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
175 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
177 2019-12-05 Marek Polacek <polacek@redhat.com>
179 PR c++/92271 - make __is_same alias for __is_same_as.
180 * c-common.c: Add __is_same, an alias for __is_same_as.
182 2019-12-03 Marek Polacek <polacek@redhat.com>
184 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
185 * c-cppbuiltin.c (c_cpp_builtins): Predefine
186 __cpp_aggregate_paren_init=201902 for -std=c++2a.
188 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
190 * c-attribs.c (handle_symver_attribute): New function
191 (c_common_attributes): Add symver.
193 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
195 * c-common.c (pointer_int_sum): Use verify_type_context to check
196 whether the target allows pointer arithmetic for the types involved.
197 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
198 to check whether the target allows sizeof and alignof operations
199 for the types involved.
201 2019-11-27 Jason Merrill <jason@redhat.com>
203 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
205 2019-11-26 Jakub Jelinek <jakub@redhat.com>
208 * c-attribs.c (handle_mode_attribute): Add mode attribute to
211 2019-11-25 Joseph Myers <joseph@codesourcery.com>
214 * c-common.c (c_common_type_for_mode): Handle decimal
215 floating-point types being NULL_TREE.
216 * c-format.c (get_format_for_type_1): Handle specified types being
218 * c-lex.c (interpret_float): Give an error for decimal
219 floating-point constants when decimal floating-point not
222 2019-11-23 Jakub Jelinek <jakub@redhat.com>
225 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
226 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
227 group warning with inform together.
228 (handle_access_attribute): Formatting fix.
230 2019-11-22 Jakub Jelinek <jakub@redhat.com>
233 * c-common.h (identifier_global_tag): Declare.
234 * c-format.c (get_pointer_to_named_type): Renamed to ...
235 (get_named_type): ... this. Use identifier_global_tag instead of
236 identifier_global_value, handle the return value being a TYPE_P.
237 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
238 to call get_named_type instead. Formatting fixes.
240 Implement P1902R1, Missing feature-test macros 2017-2019.
241 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
242 and __cpp_generic_lambdas for -std=c++2a. Define
243 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
244 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
245 __cpp_concepts for -std=c++2a.
247 2019-11-22 Martin Sebor <msebor@redhat.com>
250 * c-attribs.c (handle_access_attribute): New function.
251 (c_common_attribute_table): Add new attribute.
252 (get_argument_type): New function.
253 (append_access_attrs): New function.
254 (get_nonnull_operand): Rename...
255 (get_attribute_operand): ...to this.
256 * c-common.c (get_nonnull_operand): Rename...
257 (get_attribute_operand): ...to this.
259 2019-11-21 Joseph Myers <joseph@codesourcery.com>
261 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
264 2019-11-19 Joseph Myers <joseph@codesourcery.com>
266 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
267 warning for standard attributes mixed with fallthrough attributes.
269 2019-11-15 Joseph Myers <joseph@codesourcery.com>
271 * c-attribs.c (handle_fallthrough_attribute): Remove static.
272 * c-common.h (handle_fallthrough_attribute): Declare.
274 2019-11-15 Joseph Myers <joseph@codesourcery.com>
276 * c-attribs.c (handle_deprecated_attribute): Remove static.
277 * c-common.h (handle_deprecated_attribute): Declare.
279 2019-11-14 Joseph Myers <joseph@codesourcery.com>
281 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
284 2019-11-14 Jakub Jelinek <jakub@redhat.com>
286 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
289 * c-omp.c (c_omp_check_context_selector): Handle name lists
290 containing string literals. Don't diagnose atomic_default_mem_order
293 2019-11-13 Joseph Myers <joseph@codesourcery.com>
295 * c-cppbuiltin.c (builtin_define_float_constants): Also define
296 NORM_MAX constants. Update call to get_max_float.
297 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
300 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
302 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
303 (dump_forward_type): Do not generate a declaration for function types.
304 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
305 of the component type if it is declared in another file.
307 2019-11-12 Martin Liska <mliska@suse.cz>
309 * c-opts.c (c_common_post_options):
310 Use SET_OPTION_IF_UNSET.
312 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
313 Frederik Harwath <frederik@codesourcery.com>
316 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
318 * c-pragma.c (oacc_pragmas): Add "serial" entry.
320 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
322 * c-common.h (gnu_vector_type_p): New function.
323 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
324 vectors to satisfy gnu_vector_type_p.
325 (c_build_vec_convert): Likewise __builtin_convertvector.
326 (convert_vector_to_array_for_subscript): Likewise when applying
327 implicit vector to array conversion.
328 (scalar_to_vector): Likewise when converting vector-scalar
329 operations to vector-vector operations.
331 2019-11-08 Joseph Myers <joseph@codesourcery.com>
333 * c.opt (Wold-style-definition): Initialize to -1.
334 * c-opts.c (c_common_post_options): Set warn_old_style_definition
335 to flag_isoc2x if not set explicitly.
337 2019-11-07 Joseph Myers <joseph@codesourcery.com>
339 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
341 2019-11-05 Jason Merrill <jason@redhat.com>
343 * c-opts.c (c_common_post_options): -fconcepts-ts implies
346 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
348 * c-opts.c (c_common_post_options): Update
351 2019-11-02 Jakub Jelinek <jakub@redhat.com>
353 * c-common.h (c_omp_get_context_selector): Remove.
354 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
355 and renamed to omp_get_context_selector.
357 * c-omp.c (c_omp_mark_declare_variant): Use
358 omp_context_selector_set_compare.
360 PR c++/88335 - Implement P1073R3: Immediate functions
361 * c-common.h (enum rid): Add RID_CONSTEVAL.
362 * c-common.c (c_common_reswords): Add consteval.
364 2019-11-01 Martin Sebor <msebor@redhat.com>
370 * c-pretty-print.c (direct_abstract_declarator): Print
371 bound in zero-length arrays.
372 * c.opt (-Wzero-length-bounds): New option.
374 2019-10-30 Nathan Sidwell <nathan@acm.org>
376 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
379 2019-10-28 Martin Sebor <msebor@redhat.com>
382 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
383 even when only preprocessing.
384 * c-common.h (names_builtin_p): Declare new function.
385 * c-lex.c (init_c_lex): Set has_builtin.
386 (c_common_has_builtin): Define a new function.
387 * c-ppoutput.c (init_pp_output): Set has_builtin.
389 2019-10-24 Jakub Jelinek <jakub@redhat.com>
391 * c-common.h (c_omp_context_selector_matches): Remove.
392 * c-omp.c (c_omp_context_selector_matches): Remove.
393 * c-attribs.c (c_common_attribute_table): Add
394 "omp declare target {host,nohost,block}" attributes.
396 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
398 * c-lex.c (c_common_has_attribute): Update nodiscard value.
400 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
402 * c-common.h (user_facing_original_type_p): Declare.
403 * c-common.c: Include c-spellcheck.h.
404 (user_facing_original_type_p): New function.
406 2019-10-12 Jakub Jelinek <jakub@redhat.com>
408 * c-common.h (c_omp_mark_declare_variant,
409 c_omp_context_selector_matches): Declare.
410 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
412 (c_omp_get_context_selector): Support second argument NULL.
413 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
415 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
416 attribute, add "omp declare variant base" and
417 "omp declare variant variant" attributes.
419 2019-10-11 Joseph Myers <joseph@codesourcery.com>
421 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
422 CppReason(CPP_W_C11_C2X_COMPAT).
424 2019-10-11 Joseph Myers <joseph@codesourcery.com>
426 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
427 _Decimal64 and _Decimal128.
429 2019-10-10 Joseph Myers <joseph@codesourcery.com>
431 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
432 types if DFP not supported.
434 2019-10-10 Jakub Jelinek <jakub@redhat.com>
436 * c-common.h (c_omp_check_context_selector,
437 c_omp_get_context_selector): Declare.
438 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
439 in diagnostic message.
440 (c_omp_check_context_selector, c_omp_get_context_selector): New
442 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
444 (handle_omp_declare_variant_attribute): New function.
446 2019-10-09 Martin Sebor <msebor@redhat.com>
448 PR tree-optimization/90879
449 * c.opt (-Wstring-compare): New option.
451 2019-10-08 Andrew Sutton <asutton@lock3software.com>
452 Jason Merrill <jason@redhat.com>
454 Update the concepts implementation to conform to the C++20
455 specification, improve compile times, and generally clean up
458 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
459 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
460 * c.opt: Add -Wconcepts-ts.
461 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
462 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
463 (set_std_cxx2a): Enable concepts by default.
465 2019-10-08 Joseph Myers <joseph@codesourcery.com>
467 * c-opts.c (c_common_post_options): Set
468 -fno-fp-int-builtin-inexact for C2X.
470 2019-10-05 Jakub Jelinek <jakub@redhat.com>
472 PR c++/91369 - Implement P0784R7: constexpr new
473 * c-cppbuiltin.c (c_cpp_builtins): Predefine
474 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
476 2019-10-04 Joseph Myers <joseph@codesourcery.com>
479 * c-format.c (C_STD_VER): Handle C2x.
480 (C_STD_NAME): Likewise.
481 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
482 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
483 modifier allowed and 'p' flag.
484 * c-format.h (enum format_std_version): Add STD_C2X.
485 (struct format_char_info): Mention 'p' in comment on flags2.
487 2019-10-01 David Malcolm <dmalcolm@redhat.com>
489 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
490 calling diagnostic_show_locus, rather than destroying it afterwards.
492 2019-10-01 Jakub Jelinek <jakub@redhat.com>
495 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
496 with NULL DECL_FIELD_OFFSET.
498 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
500 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
501 has a type name, use it in preference to the __vector syntax.
503 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
505 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
506 two spaces between a comma and "...".
508 2019-09-27 Jakub Jelinek <jakub@redhat.com>
511 * c-common.h (c_omp_predefined_variable): Declare.
512 * c-omp.c (c_omp_predefined_variable): New function.
513 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
514 for predefined variables.
516 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
518 * c-common.h (build_function_call_vec): Take the original
519 function decl as an optional final parameter.
520 (check_builtin_function_arguments): Take the original function decl.
521 * c-common.c (check_builtin_function_arguments): Likewise.
522 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
523 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
525 2019-09-15 Jason Merrill <jason@redhat.com>
527 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
528 fold_for_warn in "|| mask" warning.
530 2019-09-10 Martin Liska <mliska@suse.cz>
532 * c.opt: Use newly added WarnRemoved.
534 2019-09-09 Martin Liska <mliska@suse.cz>
536 * c.opt: Update comment of removed
537 options that are preserved only for backward
540 2019-09-06 Martin Liska <mliska@suse.cz>
543 * c-common.c: Remove definition of flag_use_repository.
544 * c-common.h: Likewise.
545 * c-opts.c (c_common_handle_option):
546 Do not handle OPT_frepo option.
547 * c.opt: Mark the option with Deprecated.
549 2019-09-04 Marek Polacek <polacek@redhat.com>
551 * c.opt (fdeduce-init-list): Ignored.
553 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
556 * c.opt (Wenum-conversion): New option.
558 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
560 * c-attribs.c (handle_section_attribute): Call the
561 handle_generic_attribute target hook after performing target
562 independent processing.
563 (handle_noinit_attribute): Likewise.
565 2019-09-03 Ian Lance Taylor <iant@golang.org>
567 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
568 when using -fgo-dump-spec.
570 2019-09-02 Martin Liska <mliska@suse.cz>
573 * c-common.c (fname_as_string): Use cxx_printable_name for
574 __PRETTY_FUNCTION__ same as was used before r265711.
576 2019-08-28 Marek Polacek <polacek@redhat.com>
578 Implement P1152R4: Deprecating some uses of volatile.
580 * c-opts.c (c_common_post_options): Enable -Wvolatile by
581 default for C++2a, unless -Wno-deprecated.
582 * c.opt (Wvolatile): New warning.
584 2019-08-28 Marek Polacek <polacek@redhat.com>
586 PR c++/91360 - Implement C++20 P1143R2: constinit.
587 * c-common.c (c_common_reswords): Add constinit and __constinit.
588 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
589 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
592 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
593 * c-format.c (cxx_keywords): Add "constinit".
594 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
596 2019-08-27 Jakub Jelinek <jakub@redhat.com>
599 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
600 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
601 like COMPOUND_EXPR rather than normal expression.
603 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
606 * c-lex.c (c_lex_with_flags): Don't call
607 c_common_no_more_pch () from here.
609 2019-08-23 Jakub Jelinek <jakub@redhat.com>
612 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
613 instead of flag_excess_precision_cmdline.
614 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
615 * c-opts.c (c_common_post_options): Likewise.
617 2019-08-22 Martin Sebor <msebor@redhat.com>
620 * c-common.c (braced_list_to_string): Add argument and overload.
621 Handle flexible length arrays and unions.
623 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
625 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
626 function declarations where arguments are missing. Rename variables.
628 2019-08-15 Richard Biener <rguenther@suse.de>
630 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
631 enabled, define __SIZETYPE__.
633 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
635 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
636 exclusion with "section" attribute.
637 (attr_noinit_exclusions): New table.
638 (handle_noinit_attribute): New function.
640 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
643 * c-common.c (resolve_overloaded_builtin): Use
644 copy_decl_built_in_function.
646 2019-08-13 Martin Sebor <msebor@redhat.com>
649 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
650 (asm_fprintf_length_spec): Same.
651 * c-format.h (format_lengths): Add FMT_LEN_w.
653 2019-08-10 Jakub Jelinek <jakub@redhat.com>
655 * c-pragma.h (enum pragma_omp_clause): Add
656 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
658 2019-08-07 Jakub Jelinek <jakub@redhat.com>
660 * c-pragma.h (enum pragma_omp_clause): Add
661 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
662 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
665 2019-08-05 Marek Polacek <polacek@redhat.com>
667 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
668 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
669 default for C++2a, unless -Wno-deprecated.
670 * c.opt (Wcomma-subscript): New warning.
672 2019-07-20 Jakub Jelinek <jakub@redhat.com>
674 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
675 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
676 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
677 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
678 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
679 constructs with the loop construct.
681 2019-07-13 Jakub Jelinek <jakub@redhat.com>
684 * c-omp.c (c_omp_split_clauses): Fix a pasto in
685 OMP_CLAUSE_REDUCTION_TASK handling.
687 2019-07-12 Jakub Jelinek <jakub@redhat.com>
689 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
690 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
692 2019-07-09 Martin Sebor <msebor@redhat.com>
695 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
697 * c-pretty-print.h: Same.
699 2019-07-09 Martin Sebor <msebor@redhat.com>
702 * c-format.c (check_argument_type): Change class-key from class to
703 struct and vice versa to match convention and avoid -Wclass-is-pod
705 * c-pretty-print.h: Same.
707 2019-07-03 Martin Liska <mliska@suse.cz>
709 * c-common.c (try_to_locate_new_include_insertion_point): Remove
712 2019-07-03 Jakub Jelinek <jakub@redhat.com>
714 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
715 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
718 2019-07-02 qing zhao <qing.zhao@oracle.com>
720 PR preprocessor/90581
721 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
722 * c.opt: Add new option -fmax-include-depth.
724 2019-06-26 Jason Merrill <jason@redhat.com>
726 PR c++/55442 - memory-hog with highly recursive constexpr.
727 * c.opt (fconstexpr-loop-limit): New.
729 2019-06-25 Jakub Jelinek <jakub@redhat.com>
732 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
733 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
735 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
737 * c-common.c (c_common_nodes_and_builtins): Define
738 alternate "__intN__" name for "__intN" types.
740 2019-06-24 Jan Hubicka <jh@suse.cz>
742 * c-common.c (braced_lists_to_strings): Check that
743 type is array or integer prior checking string flag.
745 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
747 PR c++/90875 - added -Wswitch-outside-range option
748 * c.opt (Wswitch-outside-range): Added new option.
749 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
751 2019-06-21 Marek Polacek <polacek@redhat.com>
753 PR c++/90953 - ICE with -Wmissing-format-attribute.
754 * c-common.c (check_function_arguments_recurse): Use
756 (check_missing_format_attribute): Likewise.
758 2019-06-19 Marek Polacek <polacek@redhat.com>
760 PR c++/60364 - noreturn after first decl not diagnosed.
761 * c-attribs.c (handle_noreturn_attribute): No longer static.
762 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
764 * c-format.c (check_function_format): Use get_attribute_name.
766 2019-06-19 Martin Sebor <msebor@redhat.com>
769 * c-format.c (function_format_info::format_type): Adjust type.
770 (function_format_info::is_raw): New member.
771 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
772 (decode_format_attr): Adjust call to decode_format_type.
773 Avoid a redundant call to convert_format_name_to_system_name.
774 Avoid abbreviating the word "arguments" in a diagnostic.
775 (format_warning_substr): New function.
776 (avoid_dollar_number): Quote dollar sign in a diagnostic.
777 (finish_dollar_format_checking): Same.
778 (check_format_info): Same.
779 (struct baltoks_t): New.
780 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
781 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
783 (check_format_info_main): Call check_plain. Use baltoks_t. Call
784 maybe_diag_unbalanced_tokens.
785 (handle_format_attribute): Spell out the word "arguments" in
788 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
790 PR c++/90449 - add -Winaccessible-base option.
791 * c.opt (Winaccessible-base): New option.
793 2019-06-10 Jakub Jelinek <jakub@redhat.com>
795 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
796 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
797 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
798 combined/composite constructs where it is not allowed. Copy over
799 OMP_CLAUSE_REDUCTION_INSCAN.
801 2019-06-05 Martin Sebor <msebor@redhat.com>
803 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
804 (handle_alias_ifunc_attribute): Same.
805 (handle_copy_attribute): Same.
806 (handle_weakref_attribute): Same.
807 (handle_nonnull_attribute): Same.
808 * c-warn.c (warn_for_sign_compare): Same.
809 (warn_for_restrict): Same.
812 2019-06-05 Martin Sebor <msebor@redhat.com>
814 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
815 * c.opt (-Wformat-diag): Remove a spurious period.
817 2019-05-29 Jakub Jelinek <jakub@redhat.com>
820 * c-common.c (check_builtin_function_arguments)
821 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
824 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
826 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
828 2019-05-22 Martin Liska <mliska@suse.cz>
831 * c-attribs.c (handle_copy_attribute): Do not copy
832 target_clones attribute.
834 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
836 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
837 * c-ada-spec.c (print_assignment_operator): New function.
838 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
839 assignment operators declared as methods and filter out the others.
841 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
844 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
845 "omp declare target".
847 2019-05-16 Martin Sebor <msebor@redhat.com>
849 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
850 keywords, operators, and types in diagnostics.
851 (handle_scalar_storage_order_attribute): Same.
852 (handle_mode_attribute): Same.
853 (handle_visibility_attribute): Same.
854 (handle_assume_aligned_attribute): Same.
855 (handle_no_split_stack_attribute): Same.
856 * c-common.c (shorten_compare): Same.
857 (c_common_truthvalue_conversion): Same.
858 (cb_get_source_date_epoch): Same.
859 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
861 (interpret_float): Same.
862 * c-omp.c (c_finish_omp_for): Same.
863 * c-opts.c (c_common_post_options): Same.
864 * c-pch.c (c_common_pch_pragma): Same.
865 * c-pragma.c (pop_alignment): Same.
866 (handle_pragma_pack): Same.
867 (apply_pragma_weak): Same.
868 (handle_pragma_weak): Same.
869 (handle_pragma_scalar_storage_order): Same.
870 (handle_pragma_redefine_extname): Same.
871 (add_to_renaming_pragma_list): Same.
872 (maybe_apply_renaming_pragma): Same.
873 (push_visibility): Same.
874 (handle_pragma_visibility): Same.
875 (handle_pragma_optimize): Same.
876 (handle_pragma_message): Same.
877 * c-warn.c (warn_for_omitted_condop): Same.
878 (lvalue_error): Same.
880 2019-05-15 Richard Biener <rguenther@suse.de>
883 * c-common.c (c_common_mark_addressable_vec): Also mark
884 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
887 2019-05-06 Nathan Sidwell <nathan@acm.org>
889 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
891 2019-04-30 Nathan Sidwell <nathan@acm.org>
893 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
895 2019-04-30 Martin Liska <mliska@suse.cz>
897 * c-pragma.c (handle_pragma_diagnostic): Provide hints
900 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
902 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
903 the pointer target rather than the pointer itself.
905 2019-04-19 Jakub Jelinek <jakub@redhat.com>
908 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
910 (c_do_switch_warnings): Remove outside_range_p argument.
911 * c-common.c (check_case_bounds): Removed.
912 (c_add_case_label): Remove orig_type and outside_range_p arguments.
913 Don't call check_case_bounds. Fold low_value as well as high_value.
914 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
915 Check for case labels outside of range of original type here and
918 2019-04-12 Jakub Jelinek <jakub@redhat.com>
921 * c.opt (-fhandle-exceptions): Use %< and %> around option names
922 in the Warn diagnostics.
925 * c-attribs.c (handle_patchable_function_entry_attribute): Add
926 function comment. Warn if arguments of the attribute are not positive
929 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
931 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
932 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
934 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
936 * c-ada-spec.c (is_float128): New predicate extracted from...
937 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
938 <REAL_TYPE>: ...here. Call it.
940 2019-04-05 David Malcolm <dmalcolm@redhat.com>
943 * c-warn.c (check_address_or_pointer_of_packed_member): Add
944 auto_diagnostic_group. Guard inform calls by result of
947 2019-04-05 Marek Polacek <polacek@redhat.com>
949 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
950 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
953 2019-04-03 Jason Merrill <jason@redhat.com>
955 PR c++/86586 - -fcompare-debug=-Wsign-compare.
956 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
958 2019-04-01 Martin Sebor <msebor@redhat.com>
961 * c-attribs.c (handle_copy_attribute): Handle references and
962 non-constant expressions.
964 2019-03-22 Jakub Jelinek <jakub@redhat.com>
967 * c.opt (-fconstexpr-ops-limit=): New option.
969 2019-03-21 Jakub Jelinek <jakub@redhat.com>
971 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
974 2019-03-19 Martin Sebor <msebor@redhat.com>
976 PR tree-optimization/89688
977 * c-common.c (braced_list_to_string): Make static.
978 (braced_lists_to_strings): Define new function.
979 * c-common.h (braced_list_to_string): Remove.
980 (braced_lists_to_strings): Declare.
982 2019-03-12 Martin Liska <mliska@suse.cz>
984 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
986 2019-03-11 Martin Liska <mliska@suse.cz>
988 * c-opts.c (c_common_post_options): Wrap apostrophes
989 in gcc internal format with %'.
991 2019-03-11 Martin Liska <mliska@suse.cz>
993 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
994 in a string format message and fix GNU coding style.
995 * c-common.c (vector_types_convertible_p): Likewise.
996 (c_build_vec_perm_expr): Likewise.
997 * c-indentation.c (get_visual_column): Likewise.
998 * c-opts.c (c_common_handle_option): Likewise.
999 (c_common_post_options): Likewise.
1000 (sanitize_cpp_opts): Likewise.
1001 * c-pch.c (c_common_pch_pragma): Likewise.
1002 * c-pragma.c (handle_pragma_pack): Likewise.
1004 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1006 PR tree-optimization/89550
1007 * c-common.c (c_common_truthvalue_conversion): Only set
1008 TREE_NO_WARNING if warning_at returned true.
1009 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1011 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1012 Martin Sebor <msebor@gmail.com>
1014 * c.opt (Wmissing-attributes): Clean up doc string.
1016 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1019 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1020 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1023 2019-02-22 Richard Biener <rguenther@suse.de>
1025 * c-pch.c (no_checksum): Remove.
1026 (pch_init): Remove assertion that executable_checksum is not
1028 (c_common_valid_pch): Likewise.
1030 2019-02-18 Martin Sebor <msebor@redhat.com>
1033 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1035 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1038 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1039 implementing -Wtype-limits.
1041 2019-02-11 Martin Sebor <msebor@redhat.com>
1044 * c-common.c (invalid_array_size_error): New function.
1045 (valid_array_size_p): Call it. Handle size as well as type.
1046 * c-common.h (valid_constant_size_p): New function.
1047 (enum cst_size_error): New type.
1049 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1052 * known-headers.cc (get_stdlib_header_for_name): Add
1053 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1055 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1058 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1059 a C cast in pp_c_flag_gnu_v3 mode.
1061 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1064 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1065 builtin_structptr_types types even for C.
1067 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1069 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1070 when rhs is of array type correctly. Fix handling of nested structures.
1071 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1072 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1073 type casts within nested compound expressions.
1075 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1078 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1079 variable after using BIT_FIELD_REF.
1081 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1085 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1086 Remove the boolean argument.
1087 * c-warn.c (check_address_of_packed_member): Renamed to ...
1088 (check_address_or_pointer_of_packed_member): This. Also
1089 warn pointer conversion.
1090 (check_and_warn_address_of_packed_member): Renamed to ...
1091 (check_and_warn_address_or_pointer_of_packed_member): This.
1092 Also warn pointer conversion.
1093 (warn_for_address_or_pointer_of_packed_member): Remove the
1094 boolean argument. Don't check pointer conversion here.
1096 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1099 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1101 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1103 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1104 and __cpp_nontype_template_parameter_auto. Add a comment that
1105 __cpp_template_auto is deprecated.
1107 2019-01-14 Tom Honermann <tom@honermann.net>
1109 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1110 * c-common.c (c_common_reswords): Add char8_t.
1111 (fix_string_type): Use char8_t for the type of u8 string literals.
1112 (c_common_get_alias_set): char8_t doesn't alias.
1113 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1115 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1116 (keyword_begins_type_specifier): Add RID_CHAR8.
1117 * c-common.h (rid): Add RID_CHAR8.
1118 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1119 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1120 Define char8_type_node and char8_array_type_node.
1121 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1122 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1123 (c_cpp_builtins): Predefine __cpp_char8_t.
1124 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1126 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1127 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1129 * c.opt: Add the -fchar8_t command line option.
1131 2019-01-14 Martin Sebor <msebor@redhat.com>
1134 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1135 and issue errors if it fails.
1136 * c-common.h (valid_format_string_type_p): Declare.
1137 * c-format.c (valid_stringptr_type_p): Rename...
1138 (valid_format_string_type_p): ...to this and make extern.
1139 (handle_format_arg_attribute): Adjust to new name.
1140 (check_format_string): Same.
1142 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1144 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1145 Replace "may may" with "may" in warning message.
1147 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1150 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1151 (c_build_vec_convert): Declare.
1152 * c-common.c (c_build_vec_convert): New function.
1154 2019-01-04 Martin Sebor <msebor@redhat.com>
1157 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1158 Handle C++ empty throw specification and C11 _Noreturn.
1159 (has_attribute): Also handle C11 _Noreturn.
1161 2019-01-04 Martin Sebor <msebor@redhat.com>
1164 * c-attribs.c (positional_argument): Also accept enumerated types.
1166 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1168 Update copyright years.
1170 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1173 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1174 * c-warn.c (check_alignment_of_packed_member): New function.
1175 (check_address_of_packed_member): Likewise.
1176 (check_and_warn_address_of_packed_member): Likewise.
1177 (warn_for_address_or_pointer_of_packed_member): Likewise.
1178 * c.opt: Add -Wno-address-of-packed-member.
1180 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1183 * c-warn.c (get_outermost_macro_expansion): New function.
1184 (spelled_the_same_p): Use it to unwind the macro expansions, and
1185 compare the outermost macro in each nested expansion, rather than
1188 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1191 * c-common.h (warn_tautological_cmp): Convert 1st param from
1192 location_t to const op_location_t &.
1193 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1194 when testing for INTEGER_CST.
1195 (warn_tautological_bitwise_comparison): Convert 1st param from
1196 location_t to const op_location_t &; use it to build a
1197 binary_op_rich_location, and use this.
1198 (spelled_the_same_p): New function.
1199 (warn_tautological_cmp): Convert 1st param from location_t to
1200 const op_location_t &. Warn for macro expansions if
1201 spelled_the_same_p. Use binary_op_rich_location.
1203 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1207 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1208 (verify_tree): Handle location wrappers.
1209 (c_common_truthvalue_conversion): Strip any location wrapper.
1211 (fold_offsetof): Strip any location wrapper.
1212 (complete_array_type): Likewise for initial_value.
1213 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1214 index before checking for INTEGER_CST.
1215 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1216 print parentheses around location wrappers.
1217 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1218 before checking for INTEGER_CST.
1219 (warn_tautological_bitwise_comparison): Call
1220 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1221 before checking for INTEGER_CST.
1222 (readonly_error): Strip any location wrapper.
1223 (warn_array_subscript_with_type_char): Strip location wrappers
1224 before checking for INTEGER_CST. Use the location of the index if
1227 2018-12-06 Jason Merrill <jason@redhat.com>
1229 PR c++/88136 - -Wdeprecated-copy false positives
1230 * c.opt (Wdeprecated-copy-dtor): New.
1231 (Wdeprecated-copy): Move to -Wextra.
1233 2018-11-29 Martin Sebor <msebor@redhat.com>
1237 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1238 alignments to values less than the target requires.
1239 (has_attribute): For attribute aligned consider both the attribute
1240 and the alignment bits.
1241 * c-common.c (c_init_attributes): Optionally issue a warning for
1244 2018-11-28 Martin Sebor <msebor@redhat.com>
1248 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1249 or destination is an error.
1251 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1254 * c-ubsan.c: Include langhooks.h.
1255 (ubsan_instrument_division): Change gcc_assert that main variants
1256 of op0 and op1 types are equal to gcc_checking_assert that the
1257 main variants are compatible types.
1259 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1261 * c-ada-spec.c: Include stringpool.h.
1262 (has_static_fields): Return false for incomplete types.
1263 (is_tagged_type): Likewise.
1264 (has_nontrivial_methods): Likewise.
1265 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1266 (struct overloaded_name_hash): New structure.
1267 (struct overloaded_name_hasher): Likewise.
1268 (overloaded_names): New global variable.
1269 (init_overloaded_names): New static function.
1270 (overloaded_name_p): New predicate.
1271 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1272 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1273 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1274 Remove always-true condition and dump forward types.
1275 (dump_ada_specs): Delete overloaded_names.
1277 2018-11-20 Martin Sebor <msebor@redhat.com>
1279 * c-attribs.c (type_for_vector_size): New function.
1280 (type_valid_for_vector_size): Same.
1281 (handle_vector_size_attribute): Move code to the functions above
1283 (validate_attribute, has_attribute): New functions.
1284 * c-common.h (has_attribute): Declare.
1285 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1286 * c-common.c (c_common_resword): Same.
1288 2018-11-16 Jason Merrill <jason@redhat.com>
1290 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1291 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1293 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1296 * c-common.c (fix_string_type): Reject string literals larger than
1297 TYPE_MAX_VALUE (ssizetype) bytes.
1299 2018-11-15 Martin Sebor <msebor@redhat.com>
1303 * c-attribs.c (positional_argument): New function.
1304 (handle_alloc_size_attribute): Use it and simplify.
1305 (handle_alloc_align_attribute): Same.
1306 (handle_assume_aligned_attribute): Same.
1307 (handle_nonnull_attribute): Same.
1308 * c-common.c (check_function_arguments): Pass fntype to
1309 check_function_format.
1310 * c-common.h (check_function_format): Add an argument.
1311 (PosArgFlags, positional_argument): Declare new type and function.
1312 * c-format.c (decode_format_attr): Add arguments.
1313 (check_format_string, get_constant): Same.
1314 (convert_format_name_to_system_name): Adjust.
1316 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1319 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1321 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1323 P1236R1 - Signed integers are two's complement
1324 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1325 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1326 with in-range second operand well defined for -std=c++2a.
1329 * c-common.c (parse_optimize_options): Allocate option string from
1330 opts_obstack rather than as GC memory. Move the allocation after
1331 warning for invalid option.
1333 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1335 * c-common.c (c_get_substring_location): Update for renaming of
1336 get_source_location_for_substring to get_location_within_string.
1337 * c-lex.c: Replace "source_location" with "location_t".
1338 * c-opts.c: Likewise.
1339 * c-ppoutput.c: Likewise.
1341 2018-11-13 Martin Sebor <msebor@redhat.com>
1344 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1345 (handle_tls_model_attribute): Improve diagnostics.
1347 2018-11-12 Jason Merrill <jason@redhat.com>
1349 * c-cppbuiltin.c (c_cpp_builtins): Define
1350 __cpp_impl_destroying_delete.
1352 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1353 __cpp_conditional_explicit.
1355 2018-11-09 Martin Sebor <msebor@redhat.com>
1358 * c-attribs.c (handle_copy_attribute): New function.
1360 2018-11-09 Martin Sebor <msebor@redhat.com>
1363 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1365 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1367 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1368 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1369 enum omp_memory_order MEMORY_ORDER.
1370 (c_finish_omp_flush): Add MO argument.
1371 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1372 (c_finish_omp_for): Add FINAL_P argument.
1373 * c-omp.c: Include memmodel.h.
1374 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1375 OMP_TASKGROUP_CLAUSES to it.
1376 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1377 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1378 instead of OMP_ATOMIC_SEQ_CST.
1379 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1380 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1381 __atomic_thread_fence call with the given value.
1382 (check_omp_for_incr_expr): Formatting fixes.
1383 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1384 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1385 is not constant expression 1 or -1. Transform NE_EXPR loops
1386 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1387 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1389 (c_omp_split_clauses): Add support for combined
1390 #pragma omp parallel master and
1391 #pragma omp {,parallel }master taskloop{, simd} constructs.
1392 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1393 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1394 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1395 (c_omp_predetermined_sharing): Don't return
1396 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1397 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1398 PRAGMA_OMP_REQUIRES.
1399 * c-pragma.h (enum pragma_kind): Likewise.
1400 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1401 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1403 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1405 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1407 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1409 * c-format.c (local_cgraph_node_ptr_node): New variable.
1410 (gcc_dump_printf_char_table): Add entry for %C.
1411 (get_pointer_to_named_type): New function, taken from the handling
1412 code for "gimple *" from...
1413 (init_dynamic_diag_info): ...here. Add handling for
1415 * c-format.h (T_CGRAPH_NODE): New.
1417 2018-10-19 Jason Merrill <jason@redhat.com>
1419 * c-cppbuiltin.c (c_cpp_builtins): Add
1420 __cpp_nontype_template_parameter_class.
1422 2018-10-31 Nathan Sidwell <nathan@acm.org>
1424 * c-opts.c (c_finish_options): Force command line macro
1425 location. Refactor to avoid repeating main debug hook.
1426 (push_command_line_include): Clarify comment.
1428 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1430 2018-10-30 Martin Sebor <msebor@redhat.com>
1433 * c-format.c (check_format_types): Avoid diagnosing null pointer
1434 arguments to printf-family of functions.
1436 2018-10-30 Marek Polacek <polacek@redhat.com>
1438 Implement P0892R2, explicit(bool).
1439 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1441 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1443 * name-hint.h (name_hint::take_deferred): New member function.
1445 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1448 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1450 (check_function_restrict): Rename param "argarray" to
1451 "unfolded_argarray", and make a copy named "argarray", calling
1452 fold_for_warn on each argument.
1453 (check_function_arguments): Add note about responsibility for
1454 folding the arguments.
1456 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1458 * c-common.c (flag_isoc2x): New variable.
1459 * c-common.h (clk_c): Update comment to reference C2X.
1460 (flag_isoc99, flag_isoc11): Update comments to reference future
1461 standard versions in general.
1462 (flag_isoc2x): Declare.
1463 * c-opts.c (set_std_c2x): New function.
1464 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1465 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1467 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1469 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1471 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1472 (std=iso9899:2018): Document C17 as published in 2018.
1474 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1477 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1479 2018-10-11 Will Wray <wjwray@gmail.com>
1482 * c-pretty-print.h (pp_c_type_cast): Prototype.
1483 (pp_c_integer_constant): Likewise.
1484 * c-pretty-print.c (pp_c_type_cast): No longer static.
1485 (pp_c_integer_constant): Likewise.
1486 (pp_c_enumeration_constant): Fix loop termination when finding
1487 name of constant. No longer returns a value. Call
1488 pp_c_integer_constant.
1489 (c_pretty_printer::constant): Update for changes to
1490 pp_c_enumeration_constant.
1492 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1494 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1495 for no_unique_address.
1497 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1499 * c-common.c (c_option_controlling_cpp_error): Rename to...
1500 (c_option_controlling_cpp_diagnostic): ...this, and convert
1501 "reason" from int to enum.
1502 (c_cpp_error): Rename to...
1503 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1504 * c-common.h (c_cpp_error): Rename to...
1505 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1506 * c-opts.c (c_common_init_options): Update for renaming.
1508 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1511 * c-common.c (vector_types_compatible_elements_p): Use
1512 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1514 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1516 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1517 to generate constructor destructor priority warning.
1518 * c.opt (-Wprio-ctor-dtor): New option.
1520 2018-10-01 Jason Merrill <jason@redhat.com>
1522 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1524 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1526 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1527 (dump_ada_node): Add const keyword.
1529 2018-09-25 Martin Liska <mliska@suse.cz>
1531 * c-common.c (c_common_truthvalue_conversion):
1532 Remove Pascal from documentation.
1534 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1536 * c-ada-spec.c: Include diagnostic.h.
1537 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1539 2018-09-19 Marek Polacek <polacek@redhat.com>
1541 * c.opt (Wclass-conversion): New.
1543 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1545 * c-format.c (range_label_for_format_type_mismatch::get_text):
1546 Update for new param.
1548 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1550 * c-format.c (format_warning_at_char): Update for introduction of
1551 format_string_diagnostic_t.
1552 (format_type_warning): Likewise.
1554 2018-09-17 Martin Jambor <mjambor@suse.cz>
1557 * c.opt (Wabsolute-value): New.
1559 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1561 * c-common.c (complete_flexible_array_elts): New helper function.
1562 * c-common.h (complete_flexible_array_elts): Declare.
1564 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1566 * c-common.c (braced_list_to_string): Remove eval parameter.
1567 Add some more checks. Always create zero-terminated STRING_CST.
1568 * c-common.h (braced_list_to_string): Adjust prototype.
1570 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1573 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1575 (maybe_suggest_missing_token_insertion): Likewise.
1576 (maybe_add_include_fixit): Add param "override_location". If set,
1577 and source-printing is enabled, then override the rich_location's
1578 primary location with that of the insertion point for the fix-it
1579 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1580 * c-common.h (extern void maybe_add_include_fixit): Add bool
1582 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1583 for conversion of show_caret_p to a tri-state.
1584 * c-warn.c (warn_for_restrict): Likewise.
1586 (suggest_missing_header::~suggest_missing_header): Update call to
1587 maybe_add_include_fixit to suggest overriding the location, as it
1590 2018-08-27 Martin Liska <mliska@suse.cz>
1592 * c-common.c (check_function_restrict): Use new function
1593 fndecl_built_in_p and remove check for FUNCTION_DECL if
1595 (check_builtin_function_arguments): Likewise.
1596 (reject_gcc_builtin): Likewise.
1597 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1599 2018-08-26 Marek Polacek <polacek@redhat.com>
1601 PR c++/87029, Implement -Wredundant-move.
1602 * c.opt (Wredundant-move): New option.
1604 2018-08-21 Marek Polacek <polacek@redhat.com>
1606 PR c++/86981, Implement -Wpessimizing-move.
1607 * c.opt (Wpessimizing-move): New option.
1609 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1612 * c-attribs.c (common_handle_aligned_attribute): Add
1613 auto_diagnostic_group instance.
1614 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1615 * c-opts.c (c_common_post_options): Likewise.
1616 * c-warn.c (warn_logical_not_parentheses): Likewise.
1617 (warn_duplicated_cond_add_or_warn): Likewise.
1618 (warn_for_multistatement_macros): Likewise.
1620 2018-08-20 Nathan Sidwell <nathan@acm.org>
1622 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1625 2018-08-17 Nathan Sidwell <nathan@acm.org>
1627 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1629 (laxy_hex_fp_value_count): Make unsigned.
1630 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1631 manipulate the macro.
1632 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1635 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1637 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1638 (gcc_dump_printf_length_specs): New.
1639 (gcc_dump_printf_flag_pairs): New.
1640 (gcc_dump_printf_flag_specs): New.
1641 (gcc_dump_printf_char_table): New.
1642 (format_types_orig): Add entry for "gcc_dump_printf".
1643 (init_dynamic_diag_info): Set up length_char_specs and
1644 conversion_specs for gcc_dump_printf_format_type.
1645 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1647 2018-08-17 Nathan Sidwell <nathan@acm.org>
1649 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1651 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1652 * c-cppbuiltin.c: Likewise.
1654 2018-08-17 Martin Liska <mliska@suse.cz>
1656 * c.opt: Remove Warn, Init and Report for options with
1657 Ignore/Deprecated flag. Warning is done automatically for
1660 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1663 * c-common.c (selftest::c_family_tests): Call
1664 selftest::c_indentation_c_tests.
1665 * c-common.h (selftest::c_indentation_c_tests): New decl.
1666 * c-indentation.c: Include "selftest.h".
1667 (next_tab_stop): Add "tab_width" param, rather than accessing
1669 (get_visual_column): Likewise. Clarify comment. Bulletproof
1670 against reading past the end of the line.
1671 (get_first_nws_vis_column): Add "tab_width" param.
1672 (detect_intervening_unindent): Likewise.
1673 (should_warn_for_misleading_indentation): Read tab width from
1674 cpp_opts and pass around.
1675 (selftest::test_next_tab_stop): New test.
1676 (selftest::assert_get_visual_column_succeeds): New function.
1677 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1678 (selftest::assert_get_visual_column_fails): New function.
1679 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1680 (selftest::test_get_visual_column): New test.
1681 (selftest::c_indentation_c_tests): New function.
1683 2018-08-16 Nathan Sidwell <nathan@acm.org>
1685 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1686 (store_ada_macro): Likewise.
1687 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1688 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1690 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1692 * c-format.c: Include "selftest-diagnostic.h" and
1693 "gcc-rich-location.h".
1694 (format_warning_at_char): Pass NULL for new label params of
1696 (class indirection_suffix): New class.
1697 (class range_label_for_format_type_mismatch): New class.
1698 (format_type_warning): Move logic for generating "*" suffix to
1699 class indirection_suffix. Create "fmt_label" and "param_label"
1700 to show their types, and pass them to the
1701 format_warning_at_substring calls.
1702 (selftest::test_type_mismatch_range_labels): New test.
1703 (selftest::c_format_c_tests): Call it.
1705 2018-08-13 Martin Sebor <msebor@redhat.com>
1707 PR tree-optimization/71625
1708 * c-common.c (braced_list_to_string): New function.
1709 * c-common.h (braced_list_to_string): Declare it.
1711 2018-08-08 Nathan Sidwell <nathan@acm.org>
1713 * c-common.c (try_to_locate_new_include_inertion_point): Use
1714 linemap_included_from_linemap.
1715 * c-lex.c (fe_file_change): Use linemap_included_from.
1716 * c-ppoutput.c (pp_file_change): Likewise.
1718 2018-08-01 Martin Sebor <msebor@redhat.com>
1720 PR tree-optimization/86650
1721 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1722 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1723 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1724 * c-format.h (T89_G): Update to be "gimple *" rather than
1726 (local_gcall_ptr_node): Rename...
1727 (local_gimple_ptr_node): ...to this.
1729 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1731 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1732 table entries for gcc_diag_char_table, and the 'Z' entry from
1733 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1734 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1735 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1736 adding missing "Z" for this table. Remove erroneous "G" and "K"
1738 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1739 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1740 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1742 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1744 * c-common.c (speculation_safe_resolve_call): New function.
1745 (speculation_safe_resolve_params): New function.
1746 (speculation_safe_resolve_return): New function.
1747 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1748 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1749 __HAVE_SPECULATION_SAFE_VALUE.
1751 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1753 * c-common.c (c_cpp_error): Remove redundant "line_table"
1754 parameter from call to rich_location::set_range.
1755 (maybe_suggest_missing_token_insertion): Likewise.
1757 2018-07-20 Martin Sebor <msebor@redhat.com>
1760 * c.opt (-Warray-bounds): Remove redundant -Wall.
1762 2018-07-20 Martin Sebor <msebor@redhat.com>
1765 * c-common.h (c_common_handle_option): Change function argument
1767 * c-opts.c (c_common_init_options): Same.
1768 (c_common_handle_option): Same. Remove special handling of
1769 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1770 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1771 options to take a HOST_WIDE_INT argument and accept a byte-size
1773 (-Wvla-larger-than): Same.
1774 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1775 (-Wno-vla-larger-than): Same.
1777 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1779 * c-attribs.c (c_common_attribute_table): Add
1780 "omp declare target implicit" attribute.
1782 2018-07-12 Richard Biener <rguenther@suse.de>
1785 * c-attribs.c (handle_packed_attribute): Do not build a variant
1786 type with TYPE_PACKED, instead ignore the attribute if we may
1787 not apply to the original type.
1789 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1792 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1793 to contain TREE_LIST for both the original class iterator and the
1796 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1798 * c-ada-spec.c (to_ada_name): Remove index parameter.
1799 (pp_ada_tree_identifier): Likewise.
1800 (dump_ada_macros): Adjust call to to_ada_name.
1801 (struct overloaded_name_hash): Delete.
1802 (struct overloaded_name_hasher): Likewise.
1803 (overloaded_names): Likewise.
1804 (compute_overloading_index): Likewise.
1805 (dump_ada_decl_name): Do not call compute_overloading_index and
1806 adjust calls to pp_ada_tree_identifier.
1807 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1808 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1809 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1810 (dump_ada_enum_type): Remove type and display_convention parameters.
1811 Adjust calls to pp_ada_tree_identifier.
1812 (dump_ada_node): Likewise and for dump_ada_structure.
1813 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1815 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1817 (print_constructor): Adjust call to pp_ada_tree_identifier.
1818 (print_destructor): Likewise.
1819 (dump_ada_declaration): Switch to aspect syntax.
1820 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1821 parameter with nested parameter.
1822 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1823 (dump_ada_specs): Do not delete overloaded_names table.
1825 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1828 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
1831 2018-07-05 Nathan Sidwell <nathan@acm.org>
1833 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1834 NO_IMPLICIT_EXTERN_C.
1836 2018-06-28 Martin Liska <mliska@suse.cz>
1838 * cppspec.c: Include opt-suggestions.h.
1840 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1841 Thomas Schwinge <thomas@codesourcery.com>
1842 Cesar Philippidis <cesar@codesourcery.com>
1844 * c-pragma.h (enum pragma_omp_clause): Add
1845 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1846 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1848 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1851 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1854 2018-06-18 Martin Sebor <msebor@redhat.com>
1857 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1860 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1862 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1864 2018-06-13 Jason Merrill <jason@redhat.com>
1866 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1867 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1870 PR c++/86094 - wrong code with defaulted move ctor.
1871 * c-opts.c (c_common_post_options): Bump the current ABI version to
1872 13. Set warn_abi_version and flag_abi_compat_version to the current
1873 version rather than 0. Fix defaulting flag_abi_compat_version from
1876 2018-06-12 Martin Sebor <msebor@redhat.com>
1879 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1880 sizeof source and destination yields the same value.
1882 2018-06-12 Martin Liska <mliska@suse.cz>
1884 * c.opt: Make MPX-related options as Deprecated.
1886 2018-06-08 David Malcolm <dmalcolm@redhat.com>
1888 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1891 2018-06-08 Martin Liska <mliska@suse.cz>
1893 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1894 for MPX (macros, related functions, fields in cgraph_node, ...).
1895 (handle_bnd_legacy): Likewise.
1896 (handle_bnd_instrument): Likewise.
1899 2018-06-06 Jakub Jelinek <jakub@redhat.com>
1902 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1903 __cpp_transactional_memory to 201500 instead of 210500.
1905 2018-06-06 Jason Merrill <jason@redhat.com>
1907 PR c++/85710 - ICE with -Wmemset-elt-size.
1908 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1910 2018-06-01 Jason Merrill <jason@redhat.com>
1912 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1915 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1917 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1918 declaration for a typedef independently of whether the declaration of
1919 the subtype is generated.
1921 2018-05-31 Martin Sebor <msebor@redhat.com>
1924 * c.opt (-Wno-alloc-size-larger-than): New option.
1926 2018-04-22 David Pagan <dave.pagan@oracle.com>
1929 * c-opts.c (c_common_post_options): Set default for warn_return_type
1930 for C++/C++ with ObjC extensions only. For C, makes it possible to
1931 differentiate between default (no option), -Wreturn-type, and
1934 2018-05-29 Jason Merrill <jason@redhat.com>
1936 * c.opt (Winit-list-lifetime): New flag.
1938 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1940 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1941 splay_tree_delete_pointers.
1943 2018-05-26 Jakub Jelinek <jakub@redhat.com>
1946 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1947 noinline variable to workaround broken kernel headers.
1949 2018-05-18 Jason Merrill <jason@redhat.com>
1951 * c.opt (Wdeprecated-copy): New flag.
1953 2018-05-17 Martin Liska <mliska@suse.cz>
1955 * c-warn.c (overflow_warning): Do not use
1956 space in between 'G_' and '('.
1958 2018-05-09 Jason Merrill <jason@redhat.com>
1960 * c-common.c (valid_array_size_p): Add complain parameter.
1961 * c-common.h: ...which defaults to true.
1963 2018-05-11 Jakub Jelinek <jakub@redhat.com>
1966 * c-omp.c (c_omp_predetermined_sharing): Return
1967 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1969 2018-05-11 Martin Liska <mliska@suse.cz>
1972 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1975 2018-05-10 Jakub Jelinek <jakub@redhat.com>
1978 * c-common.h (fold_offsetof_1): Removed.
1979 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1980 CTX argument defaulted to ERROR_MARK.
1981 * c-common.c (fold_offsetof_1): Renamed to ...
1982 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1983 argument, convert the pointer constant to TYPE and use size_binop
1984 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1985 a pointer type. Adjust recursive calls.
1987 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1990 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1992 2018-05-07 Nathan Sidwell <nathan@acm.org>
1994 * c.opt (ffor-scope): Remove functionality, issue warning.
1996 2018-05-03 Nathan Sidwell <nathan@acm.org>
1998 * c.opt (ffriend-injection): Remove functionality, issue warning.
2000 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2003 * c-format.c (struct format_check_results): Add field
2005 (check_format_info): Initialize it, and warn if encountered.
2006 (check_format_arg): Distinguish between wide char and
2007 everything else when detecting arrays of non-char.
2009 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2011 * c-format.c (get_corrected_substring): Update for
2012 location_get_source_line returning a char_span. Use a char_span
2013 when handling the prefix of the correction.
2014 * c-indentation.c (get_visual_column): Update for
2015 location_get_source_line returning a char_span.
2016 (get_first_nws_vis_column): Likewise.
2018 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2021 * known-headers.cc (get_stdlib_header_for_name): Add various names
2022 from <assert.h>, <string.h>, and <memory.h>; add more names from
2025 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2028 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2029 get_base_address of the second operand is a VAR_P, rather than the
2030 operand itself, and use gcc_checking_assert instead of gcc_assert.
2032 2018-03-23 Marek Polacek <polacek@redhat.com>
2035 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2036 <case RDIV_EXPR>: Tweak condition.
2038 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2040 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2042 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2045 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2049 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2052 2018-03-16 Richard Biener <rguenther@suse.de>
2055 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2056 unshare the possibly folded expression.
2058 2018-03-15 Richard Biener <rguenther@suse.de>
2061 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2063 2018-03-13 Martin Sebor <msebor@redhat.com>
2065 PR tree-optimization/84725
2066 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2067 with all three narrow character types, including their qualified forms.
2069 2018-03-12 Martin Sebor <msebor@redhat.com>
2071 PR tree-optimization/83456
2072 * c-common.c (check_function_restrict): Return bool.
2073 Restore checking of bounded built-in functions.
2074 (check_function_arguments): Also return the result
2075 of warn_for_restrict.
2076 * c-common.c (check_function_restrict): Return bool.
2077 * c-warn.c (warn_for_restrict): Return bool.
2079 2018-03-02 Marek Polacek <polacek@redhat.com>
2082 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2085 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2087 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2090 2018-03-01 Marek Polacek <polacek@redhat.com>
2093 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2094 alignment in computation.
2096 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2098 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2099 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2101 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2103 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2104 (is_char_array): Take a type instead of a declaration.
2105 (dump_ada_array_type): Likewise.
2106 (is_simple_enum): Minor tweak.
2107 (dump_ada_enum_type): New function extracted from...
2108 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2109 <INTEGER_TYPE>: Remove unreachable code.
2110 <RECORD_TYPE>: Likewise. Minor tweaks.
2111 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2112 <ENUMERAL_TYPE>: New case.
2113 <RECORD_TYPE>: Factor out common code.
2114 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2115 Minor tweaks. Deal with enumeral types.
2116 (dump_ada_structure): Minor tweaks.
2118 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2120 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2121 address for incomplete structures.
2122 (dump_forward_type): Do not bail out for incomplete structures.
2123 (dump_ada_declaration): Do not special-case incomplete structures
2124 for subtypes. Dump them as null records for types.
2126 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2128 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2129 (is_char_array): Fix formatting.
2130 (dump_template_types): Likewise.
2131 (dump_generic_ada_node): Rename into...
2132 (dump_ada_node): ...this.
2133 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2134 incomplete structures and not for empty structures. Do not use it
2135 when forward declarations are needed.
2136 (dump_forward_type): New function.
2137 (dump_nested_types): Remove FORWARD parameter. Do not consider
2138 TREE_VISITED and do not generate a forward declaration. Only dump
2139 original nested types for nested declaration.
2140 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2141 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2142 <RECORD_TYPE>: Do not consider TREE_VISITED.
2143 (dump_ada_declaration): Use booleans and fix formatting throughout.
2144 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2145 Call dump_forward_type instead of dump_nested_types for a typedef.
2146 Remove superfluous check and adjust call to dump_nested_types.
2147 <POINTER_TYPE>: Call dump_forward_type and fall through.
2148 (dump_ada_struct_decl): Rename into...
2149 (dump_ada_structure): ...this. Do not special-case empty structures.
2151 2018-02-27 Martin Sebor <msebor@redhat.com>
2154 * c.opt (-Wmissing-attributes): New option.
2156 2018-02-21 Martin Liska <mliska@suse.cz>
2158 * c.opt (Wcatch-value=): Add IntegerRange.
2160 2018-02-15 Jason Merrill <jason@redhat.com>
2162 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2164 2018-02-09 Nathan Sidwell <nathan@acm.org>
2167 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2169 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2172 2018-02-09 Martin Sebor <msebor@redhat.com>
2175 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2176 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2177 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2178 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2179 (-Wuninitialized): Same.
2181 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2183 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2184 keyword for components.
2186 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2188 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2190 2018-02-02 Julia Koval <julia.koval@intel.com>
2192 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2194 2018-01-29 Marek Polacek <polacek@redhat.com>
2197 * c-format.c (check_function_format): Check current_function_decl.
2199 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2201 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2203 (LAZY_HEX_FP_VALUES_CNT): Define.
2204 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2205 values rather than just 12.
2206 (builtin_define_with_hex_fp_value): Likewise.
2208 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2211 * c.opt (-fmacro-prefix-map): New option.
2212 * c-opts.c (c_common_handle_option): Handle it.
2213 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2214 * c-ppoutput.c (init_pp_output): Likewise.
2216 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2219 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2221 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2223 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2224 Skip 'f' and 'F' characters if it is true.
2225 (store_ada_macro): Minor tweak.
2226 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2227 <CPP_WSTRING>: Likewise.
2228 <CPP_STRING>: Output '&' in the buffer if not the first string.
2229 <CPP_NUMBER>: Adjust calls to dump_number.
2231 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2234 * c-common.c: Include "selftest.h".
2235 (get_atomic_generic_size): Perform the test for integral type
2236 before the range test for any integer constant, fixing indentation
2237 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2238 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2239 (selftest::test_fold_for_warn): New function.
2240 (selftest::c_common_c_tests): New function.
2241 (selftest::c_family_tests): Call it, and
2242 selftest::c_pretty_print_c_tests.
2243 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2244 * c-format.c (check_format_arg): Convert VAR_P check to a
2246 * c-pretty-print.c: Include "selftest.h".
2247 (pp_c_cast_expression): Don't print casts for location wrappers.
2248 (selftest::assert_c_pretty_printer_output): New function.
2249 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2250 (selftest::test_location_wrappers): New function.
2251 (selftest::c_pretty_print_c_tests): New function.
2252 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2254 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2255 Alan Hayward <alan.hayward@arm.com>
2256 David Sherwood <david.sherwood@arm.com>
2258 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2260 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2261 Alan Hayward <alan.hayward@arm.com>
2262 David Sherwood <david.sherwood@arm.com>
2264 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2267 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2268 Alan Hayward <alan.hayward@arm.com>
2269 David Sherwood <david.sherwood@arm.com>
2271 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2272 (convert_vector_to_array_for_subscript): Handle polynomial
2273 TYPE_VECTOR_SUBPARTS.
2274 (c_common_type_for_mode): Check valid_vector_subparts_p.
2275 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2278 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2280 Update copyright years.
2282 2017-12-22 Mike Stump <mikestump@comcast.net>
2283 Eric Botcazou <ebotcazou@adacore.com>
2285 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2286 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2288 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2292 * c-semantics.c (only_debug_stmts_after_p): New.
2293 (pop_stmt_list): Clear side effects in debug-only stmt list.
2294 Check for single nondebug stmt followed by debug stmts only.
2296 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2299 * c-semantics.c (pop_stmt_list): Propagate side effects from
2300 single nondebug stmt to container list.
2302 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2304 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2305 conditions with typical order conditions.
2307 2017-12-18 Marek Polacek <polacek@redhat.com>
2309 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2312 2017-12-17 Martin Sebor <msebor@redhat.com>
2314 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2315 an error for attribute warn_if_not_aligned.
2317 2017-12-16 Martin Sebor <msebor@redhat.com>
2319 PR tree-optimization/78918
2320 * c-common.c (check_function_restrict): Avoid checking built-ins.
2321 * c.opt (-Wrestrict): Include in -Wall.
2323 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2325 * c-attribs.c (c_common_attribute_table,
2326 c_common_format_attribute_table): Swap affects_type_identity
2327 and handler fields, adjust comments.
2329 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2331 * c.opt (Wcast-function-type): New warning option.
2332 * c-lex.c (get_fileinfo): Avoid warning.
2333 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2335 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2338 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2339 Adjust the size of buf1 and buf2, add a new buf to avoid
2340 format-overflow warning.
2342 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2344 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2345 subsequent statement list.
2347 2017-12-07 Martin Sebor <msebor@redhat.com>
2351 * c-attribs.c (attr_aligned_exclusions): New array.
2352 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2353 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2354 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2355 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2356 (attr_warn_unused_result_exclusions): Same.
2357 (handle_hot_attribute, handle_cold_attribute): Simplify.
2358 (handle_const_attribute): Warn on function returning void.
2359 (handle_pure_attribute): Same.
2360 (handle_aligned_attribute): Diagnose conflicting attribute
2362 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2364 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2367 * c-common.c (selftest::c_family_tests): Call
2368 selftest::c_spellcheck_cc_tests.
2369 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2370 * c-spellcheck.cc: Include "selftest.h".
2371 (name_reserved_for_implementation_p): New function.
2372 (should_suggest_as_macro_p): New function.
2373 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2374 should_suggest_as_macro_p and call it.
2375 (selftest::test_name_reserved_for_implementation_p): New function.
2376 (selftest::c_spellcheck_cc_tests): New function.
2377 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2379 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2381 * c-spellcheck.cc: New file, taken from macro-handling code in
2383 * c-spellcheck.h: New file, taken from macro-handling code in
2386 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2388 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2390 (handle_simd_attribute): Don't check for "cilk simd function"
2391 attribute. Reindent, formatting changes.
2393 2017-11-30 Julia Koval <julia.koval@intel.com>
2395 * c-common.h (inv_list): Remove.
2397 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2400 * c-common.c (c_switch_covers_all_cases_p_1,
2401 c_switch_covers_all_cases_p): New functions.
2402 * c-common.h (c_switch_covers_all_cases_p): Declare.
2404 2017-11-28 Julia Koval <julia.koval@intel.com>
2405 Sebastian Peryt <sebastian.peryt@intel.com>
2407 * array-notation-common.c: Delete.
2408 * c-cilkplus.c: Ditto.
2409 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2410 * c-common.def (ARRAY_NOTATION_REF): Remove.
2411 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2412 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2413 c_validate_cilk_plus_loop, cilkplus_an_parts,
2414 cilk_ignorable_spawn_rhs_op,
2415 cilk_recognize_spawn): Remove.
2416 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2417 * c-omp.c: Remove CILK_SIMD check.
2418 * c-pragma.c: Ditto.
2419 * c-pragma.h: Remove CILK related pragmas.
2420 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2421 ARRAY_NOTATION_REF condition.
2422 (c_pretty_printer::expression): Ditto.
2423 * c.opt (fcilkplus): Remove.
2426 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2428 * c-pretty-print.c (pp_c_additive_expression,
2429 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2431 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2433 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2436 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2437 instead of tree_to_uhwi, formatting fix.
2439 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2442 * known-headers.cc: New file, based on material from c/c-decl.c.
2443 (suggest_missing_header): Copied as-is.
2444 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2445 heavily edited to add C++ support. Add some knowledge about
2446 <limits.h>, <stdint.h>, and <wchar.h>.
2447 * known-headers.h: Likewise.
2449 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2451 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2452 (lookup_name_fuzzy): Likewise. Convert return type from
2453 const char * to name_hint. Add location_t param.
2454 * name-hint.h: New header.
2456 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2460 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2462 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2464 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2465 expected publication date of C17.
2466 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2468 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2471 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2472 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2474 2017-11-10 Martin Sebor <msebor@redhat.com>
2477 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2478 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2479 * c.opt (-Wstringop-truncation): New option.
2481 2017-11-06 Martin Liska <mliska@suse.cz>
2484 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2486 * c.opt: Set default value of warn_return_type.
2488 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2490 * c-common.c (binary_op_error): Update for renaming of
2492 (c_parse_error): Likewise.
2493 * c-warn.c (warn_logical_not_parentheses): Likewise for
2494 renaming of inform_at_rich_loc.
2495 (warn_for_restrict): Likewise for renaming of
2496 warning_at_rich_loc_n.
2498 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2500 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2501 * c-opts.c (set_std_c17): New function.
2502 (c_common_init_options): Use gnu17 as default C version.
2503 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2505 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2507 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2508 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2509 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2512 2017-10-23 Marek Polacek <polacek@redhat.com>
2515 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2517 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2519 * c-common.c (check_builtin_function_arguments): Also check arguments
2520 of __builtin_alloca_with_align_and_max.
2522 2017-10-17 David Malcolm <dmalcolm@redhat.com>
2524 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2525 rather than NULL to format_warning_va.
2526 (check_format_types): Likewise when calling format_type_warning.
2527 Remove code to extract source_ranges and source_range * in favor
2528 of just a location_t.
2529 (format_type_warning): Convert source_range * param to a
2532 2017-10-13 Jakub Jelinek <jakub@redhat.com>
2534 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2537 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2539 * c-common.c (enum missing_token_insertion_kind): New enum.
2540 (get_missing_token_insertion_kind): New function.
2541 (maybe_suggest_missing_token_insertion): New function.
2542 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2544 2017-10-11 Nathan Sidwell <nathan@acm.org>
2546 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2547 (c_common_handle_option): Update incpath_kind names.
2549 2017-10-11 Martin Liska <mliska@suse.cz>
2552 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2553 Wattributes warning.
2555 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2557 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2558 operating on trees as wide_ints.
2559 * c-common.c (pointer_int_sum): Likewise.
2560 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2561 * c-warn.c (match_case_to_enum_1): Likewise.
2562 (c_do_switch_warnings): Likewise.
2563 (maybe_warn_shift_overflow): Likewise.
2565 2017-10-10 Jakub Jelinek <jakub@redhat.com>
2568 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2569 instead of wide_int::from.
2571 2017-10-06 Jakub Jelinek <jakub@redhat.com>
2574 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2575 using to_widest use wide_int with the larger of the two precisions.
2577 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2579 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2582 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2584 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2585 when combining the original unconverted comparison operands.
2587 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2589 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2592 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2594 * c-ada-spec.c (to_ada_name): Add index parameter.
2595 (pp_ada_tree_identifier): Likewise.
2596 (dump_ada_macros): Adjust call to to_ada_name.
2597 (struct overloaded_name_hash): New type.
2598 (struct overloaded_name_hasher): Likewise.
2599 (overloaded_names): New hash table.
2600 (compute_overloading_index): New function.
2601 (dump_ada_decl_name): Call it and pass the result to
2602 pp_ada_tree_identifier.
2603 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2604 (dump_ada_function_declaration): Likewise.
2605 (dump_generic_ada_node): Likewise.
2606 (print_constructor): Likewise.
2607 (print_destructor): Likewise.
2608 (dump_ada_specs): Delete overloaded_names table.
2610 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2612 * c-ada-spec.c (max_ada_macros): Move around.
2613 (store_ada_macro_index): Likewise.
2614 (source_file): Rename into...
2615 (macro_source_file): ...this.
2616 (count_ada_macro): Move around.
2617 (store_ada_macro): Likewise.
2618 (compare_macro): Likewise.
2619 (print_ada_macros): Merge in...
2620 (dump_ada_macros): ...this.
2621 (source_file_base): Rename into...
2622 (current_source_file): ...this.
2623 (print_comment): Move around.
2624 (dump_ada_nodes): Call dump_ada_declaration directly.
2625 (struct with): Change type of limited field to bool.
2626 (append_withs): Change type of limited_access parameter to bool.
2627 (pp_ada_tree_identifie): Likewise.
2628 (dump_ada_decl_nam): Likewise.
2629 (dump_generic_ada_node): Likewise. Do not print the return type.
2630 (to_ada_name): Change type of space_found parameter to bool.
2631 (dump_ada_function_declaration): Return void and change type of
2632 parameters to bool. Also print the return type for a function.
2633 (print_ada_methods): Rename into...
2634 (dump_ada_methods): ...this.
2635 (print_ada_declaration): Rename into ...
2636 (dump_ada_declaration): ...this. Do not print the return type.
2637 (print_ada_struct_decl): Rename into...
2638 (dump_ada_struct_decl): ...this.
2640 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2642 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2643 rather than DECL_INITIAL.
2644 (common_handle_aligned_attribute): Likewise.
2646 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2648 * c.opt (gen-decls): Add RejectNegative.
2650 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2651 Jakub Jelinek <jakub@redhat.com>
2653 Add support for -std=c++2a.
2654 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2655 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2656 * c-opts.c (set_std_cxx2a): New.
2657 (c_common_handle_option): Set options when -std=c++2a is enabled.
2658 (c_common_post_options): Adjust comments.
2659 (set_std_cxx14, set_std_cxx17): Likewise.
2661 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2663 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2664 message for non-uniform endianness and issue a warning in C++.
2666 2017-09-15 Jakub Jelinek <jakub@redhat.com>
2668 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2669 (Wc++17-compat): Change from undocumented alias to option.
2670 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2671 change C++1z to C++17 in description.
2672 (std=c++1z, std=gnu++1z): Change from option to undocumented
2674 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2676 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2677 * c-opts.c (set_std_cxx1z): Rename to ...
2678 (set_std_cxx17): ... this.
2679 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2680 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
2682 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2685 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2687 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2688 function alignment if warn_if_not_aligned_p is true.
2690 2017-09-12 Nathan Sidwell <nathan@acm.org>
2692 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2693 resort_sorted_fields): Move to c/c-decl.c.
2694 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2695 (struct sorted_fields_type): Move to c/c-lang.h.
2697 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
2700 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2702 2017-09-04 Marek Polacek <polacek@redhat.com>
2705 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2706 (warn_tautological_cmp): Call it.
2708 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2710 * c-opts.c (c_common_finish): Write dependency information even if
2713 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2716 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2717 (omp_pragmas_simd): ... here.
2718 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2719 create new clauses list containing just simd clause.
2721 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2722 Alan Hayward <alan.hayward@arm.com>
2723 David Sherwood <david.sherwood@arm.com>
2725 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2726 into scalar_mode_supported_p call.
2727 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2729 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2730 Alan Hayward <alan.hayward@arm.com>
2731 David Sherwood <david.sherwood@arm.com>
2733 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2734 for the mode iterator.
2736 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2737 Alan Hayward <alan.hayward@arm.com>
2738 David Sherwood <david.sherwood@arm.com>
2740 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2741 * c-common.c (c_build_vec_perm_expr): Likewise.
2743 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2744 Alan Hayward <alan.hayward@arm.com>
2745 David Sherwood <david.sherwood@arm.com>
2747 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2749 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2750 Alan Hayward <alan.hayward@arm.com>
2751 David Sherwood <david.sherwood@arm.com>
2753 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2754 before calling targetm.addr_space.valid_pointer_mode.
2756 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2757 Alan Hayward <alan.hayward@arm.com>
2758 David Sherwood <david.sherwood@arm.com>
2760 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2762 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2763 Alan Hayward <alan.hayward@arm.com>
2764 David Sherwood <david.sherwood@arm.com>
2766 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2768 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2770 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2771 Alan Hayward <alan.hayward@arm.com>
2772 David Sherwood <david.sherwood@arm.com>
2774 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2777 2017-08-29 Martin Liska <mliska@suse.cz>
2780 * c-common.c (parse_optimize_options): Add argument to function
2782 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2784 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2786 * c-lex.c (interpret_float): Use token location
2787 when building an EXCESS_PRECISION_EXPR.
2789 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2791 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2792 it to check_function_format.
2793 * c-common.h (check_function_arguments): Add vec<location_t> *
2795 (check_function_format): Likewise.
2796 * c-format.c (struct format_check_context): Add field "arglocs".
2797 (check_function_format): Add param "arglocs"; pass it to
2799 (check_format_info): Add param "arglocs"; use it to initialize
2800 new field of format_ctx.
2801 (check_format_arg): Pass format_ctx->arglocs to new param of
2802 check_format_info_main.
2803 (class argument_parser): New field "arglocs".
2804 (argument_parser::argument_parser): Add "arglocs_" param and use
2805 it to initialize new field.
2806 (argument_parser::check_argument_type): Pass new arglocs field to
2808 (check_format_info_main): Add param "arglocs", and use it when
2809 constructing arg_parser.
2810 (check_format_types): Add param "arglocs"; use it if non-NULL when
2811 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2813 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2816 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2817 (c_common_attribute_table): Add warn_if_not_aligned.
2818 (handle_aligned_attribute): Renamed to ...
2819 (common_handle_aligned_attribute): Remove argument, name, and add
2820 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2821 (handle_aligned_attribute): New.
2822 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2824 2017-08-14 Martin Sebor <msebor@redhat.com>
2827 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2828 (handle_nonstring_attribute): New function.
2830 2017-08-14 Martin Sebor <msebor@redhat.com>
2833 * c-format.h (T89_G): New macro.
2834 * c-format.c (local_gcall_ptr_node): New variable.
2835 (init_dynamic_diag_info): Initialize it.
2837 2017-08-11 Martin Liska <mliska@suse.cz>
2839 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2840 TARGET_SUPPORTS_ALIASES.
2842 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2844 * c-common.c (c_parse_error): Add rich_location * param, using it
2845 rather implicitly using input_location.
2846 * c-common.h (c_parse_error): Add rich_location * param.
2848 2017-08-09 Marek Polacek <polacek@redhat.com>
2850 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2851 (c_common_truthvalue_conversion): Likewise.
2852 * c-omp.c (c_finish_omp_atomic): Likewise.
2853 * c-common.h (build_binary_op): Update declaration.
2855 2017-08-08 Martin Liska <mliska@suse.cz>
2857 * c-ada-spec.c: Include header files.
2858 * c-ubsan.c: Likewise.
2859 * c-warn.c: Likewise.
2861 2017-08-07 Jakub Jelinek <jakub@redhat.com>
2864 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2866 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2868 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2869 (print_ada_methods): Likewise.
2870 (print_ada_declaration): Likewise.
2872 2017-08-07 Martin Liska <mliska@suse.cz>
2874 * array-notation-common.c: Add new includes.
2875 * c-format.c( handle_format_attribute): Canonicalize a format
2877 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2879 * c-pretty-print.c: Add new include.
2881 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2883 * c-ada-spec.c (has_static_fields): Look only into variables.
2884 (print_constructor): Add TYPE parameter and use it for the name.
2885 (print_destructor): Likewise.
2886 (print_ada_declaration): Adjust to new constructor/destructor names.
2887 Adjust calls to print_constructor and print_destructor.
2888 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2889 Look only into variables in the final loop.
2891 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2893 * c-ada-spec.c (has_static_fields): Look only into fields.
2894 (dump_generic_ada_node): Small tweak.
2895 (dump_nested_types): Look only into fields.
2896 (print_ada_declaration): Look only into methods. Small tweak.
2897 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2899 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2901 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2902 (dump_ada_function_declaration): Likewise.
2903 (dump_generic_ada_node): Likewise.
2904 (print_ada_declaration): Add support for const-qualified variables.
2906 2017-07-31 Martin Liska <mliska@suse.cz>
2909 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2910 Guard condition with flag_sanitize_p also with current_function_decl
2912 (ubsan_maybe_instrument_reference_or_call): Likewise.
2914 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
2916 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2918 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2920 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2922 (print_ada_declaration): Add missing guard for record types.
2924 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2927 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2928 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2929 new COMPOUND_EXPRs around the rhs of the comparison.
2931 2017-07-27 Marek Polacek <polacek@redhat.com>
2934 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2937 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2939 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2940 (handle_noipa_attribute): New function.
2942 2017-07-07 Torsten Duwe <duwe@suse.de>
2944 * c-attribs.c (c_common_attribute_table): Add entry for
2945 "patchable_function_entry".
2947 2017-07-20 Nathan Sidwell <nathan@acm.org>
2949 Remove TYPE_METHODS.
2950 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2951 dump_ada_template, print_ada_methods,
2952 print_ada_declaration): Member fns are on TYPE_FIELDS.
2954 2017-07-18 Nathan Sidwell <nathan@acm.org>
2956 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2958 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2960 * c-common.c (try_to_locate_new_include_insertion_point): New
2962 (per_file_includes_t): New typedef.
2963 (added_includes_t): New typedef.
2964 (added_includes): New variable.
2965 (maybe_add_include_fixit): New function.
2966 * c-common.h (maybe_add_include_fixit): New decl.
2968 2017-07-10 Martin Sebor <msebor@redhat.com>
2971 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2973 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2975 * c-common.c (selftest::c_family_tests): New.
2976 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2977 (selftest::c_family_tests): New decl.
2979 2017-07-04 Marek Polacek <polacek@redhat.com>
2982 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2985 2017-07-04 Marek Polacek <polacek@redhat.com>
2987 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2989 2017-06-28 Martin Liska <mliska@suse.cz>
2992 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2993 to a function declaration.
2995 2017-06-28 Martin Liska <mliska@suse.cz>
2998 * c.opt: Add IntegerRange to various options.
3000 2017-06-26 Marek Polacek <polacek@redhat.com>
3003 * c-common.h (warn_for_multistatement_macros): Declare.
3004 * c-warn.c: Include "c-family/c-indentation.h".
3005 (warn_for_multistatement_macros): New function.
3006 * c.opt (Wmultistatement-macros): New option.
3007 * c-indentation.c (guard_tinfo_to_string): No longer static.
3008 Change the parameter type to "enum rid". Handle RID_SWITCH.
3009 * c-indentation.h (guard_tinfo_to_string): Declare.
3011 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3013 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3015 2017-06-15 Martin Sebor <msebor@redhat.com>
3018 * c.opt (-Wclass-memaccess): New option.
3020 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3022 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3024 2017-06-13 Marek Polacek <polacek@redhat.com>
3027 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3030 2017-06-13 Martin Liska <mliska@suse.cz>
3033 * c-attribs.c (add_no_sanitize_value): New function.
3034 (handle_no_sanitize_attribute): Likewise.
3035 (handle_no_sanitize_address_attribute): Use the function.
3036 (handle_no_sanitize_thread_attribute): New function.
3037 (handle_no_address_safety_analysis_attribute): Use
3038 add_no_sanitize_value.
3039 (handle_no_sanitize_undefined_attribute): Likewise.
3040 * c-common.h: Declare new functions.
3041 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3042 (ubsan_instrument_shift): Likewise.
3043 (ubsan_instrument_bounds): Likewise.
3044 (ubsan_maybe_instrument_array_ref): Likewise.
3045 (ubsan_maybe_instrument_reference_or_call): Likewise.
3047 2017-06-11 Jason Merrill <jason@redhat.com>
3049 * c-ada-spec.c, c-pragma.c: Use id_equal.
3051 2017-06-04 Marek Polacek <polacek@redhat.com>
3054 * c-format.c (matching_type_p): Return false if any of the types
3055 requires structural equality.
3057 2017-06-02 Martin Sebor <msebor@redhat.com>
3060 * c-warn.c (conversion_warning): Use -Wconversion for integer
3061 conversion and -Wfloat-conversion for floating one.
3063 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3065 * c.opt (Wsizeof-pointer-div): New warning option.
3067 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3069 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3070 (Wcatch-value=1): Enable by -Wall.
3072 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3074 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3076 * c.opt (fdiagnostics-show-template-tree): New option.
3077 (felide-type): New option.
3079 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3081 * c.opt (Wcatch-value=): New C++ warning flag.
3083 2017-05-24 Nathan Sidwell <nathan@acm.org>
3085 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3086 const casts to avoid warning.
3088 2017-05-24 Martin Sebor <msebor@redhat.com>
3091 * c-common.h (unsafe_conversion_p): Add a function argument.
3092 * c-common.c (unsafe_conversion_p): Same.
3093 Add type names and values to diagnostics.
3094 (scalar_to_vector): Adjust.
3095 * c-warn.c (constant_expression_error): Add a function argument.
3096 Add type names and values to diagnostics.
3097 (conversion_warning): Add a function argument.
3098 Add type names and values to diagnostics.
3099 (warnings_for_convert_and_check): Same.
3101 2017-05-19 Jason Merrill <jason@redhat.com>
3103 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3106 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3108 * c-format.c (locus): Move out of function scope,
3111 2017-05-19 Nathan Sidwell <nathan@acm.org>
3113 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3114 (c_common_parse_file): Remove class dump handling.
3115 (get_dump_info): Likewise.
3117 2017-05-19 Richard Biener <rguenther@suse.de>
3120 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3121 to alias-set zero memory.
3123 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3125 * c-format.c (local_tree_type_node): Add GTY attribute.
3127 2017-05-18 Marek Polacek <polacek@redhat.com>
3129 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3130 (c_common_fixed_point_type_for_size): Likewise.
3131 (c_common_type_for_mode): Likewise.
3132 (shorten_compare): Likewise.
3133 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3134 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3136 2017-05-18 Marek Polacek <polacek@redhat.com>
3138 * c-common.c (self_promoting_args_p): Change the return type to bool.
3139 Use false/true instead of 0/1.
3140 * c-common.h (self_promoting_args_p): Update.
3142 2017-05-17 Marek Polacek <polacek@redhat.com>
3144 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3145 * c-warn.c: Likewise.
3147 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3149 Implement new C++ intrinsics __is_assignable and __is_constructible.
3150 * c-common.c (__is_assignable, __is_constructible): New.
3151 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3153 2017-05-17 Martin Liska <mliska@suse.cz>
3155 * c-common.h: Introduce dump_flags_t type and
3156 use it instead of int type.
3157 * c-gimplify.c (c_genericize): Likewise.
3158 * c-opts.c: Likewise.
3160 2017-05-17 Marek Polacek <polacek@redhat.com>
3162 * c-common.c (c_save_expr): Remove.
3163 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3164 * c-common.h (c_save_expr): Remove declaration.
3166 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3169 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3170 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3171 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3172 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3174 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3176 2017-05-09 Marek Polacek <polacek@redhat.com>
3179 * c-warn.c (unwrap_c_maybe_const): New.
3180 (warn_logical_operator): Call it.
3182 2017-05-09 Nathan Sidwell <nathan@acm.org>
3184 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3185 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3187 2017-05-08 Martin Sebor <msebor@redhat.com>
3189 PR translation/80280
3190 * c-format.h (struct format_flag_spec): Add new member.
3192 * c-format.c (local_tree_type_node): New global.
3193 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3194 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3195 (strfmon_flag_specs): Likewise.
3196 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3197 with distinct quoting properties.
3198 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3199 (flag_chars_t::validate): Add argument and handle bad quoting.
3200 (check_format_info_main): Handle quoting problems.
3201 (init_dynamic_diag_info): Simplify.
3203 2017-05-08 Jason Merrill <jason@redhat.com>
3205 * c-opts.c (c_common_post_options): Update defaults for
3206 flag_abi_version and flag_abi_compat_version.
3208 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3210 * c-common.c (c_cpp_error): Replace report_diagnostic
3211 with diagnostic_report_diagnostic.
3213 2017-05-04 Martin Sebor <msebor@redhat.com>
3215 PR translation/80280
3216 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3217 (handle_weakref_attribute): Same.
3219 2017-05-03 Nathan Sidwell <nathan@acm.org>
3221 Canonicalize canonical type hashing
3222 * c-common.c (complete_array_type): Use type_hash_canon.
3224 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3227 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3229 (cilk_install_body_pedigree_operations): Likewise.
3230 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3232 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3233 (cilk_install_body_pedigree_operations): Likewise.
3234 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3237 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3240 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3241 flag on non-aggregate element types.
3243 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3245 * c-common.c (c_type_hasher, type_hash_table): Remove.
3246 (c_common_get_alias_set): Remove unreachable code.
3247 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3249 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3251 * c.opt (Wextra-semi): New C++ warning flag.
3253 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3256 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3258 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3262 * c-common.c (c_common_type_for_mode): Don't handle
3263 widest_*_literal_type_node here.
3264 c_common_signed_or_unsigned_type): Likewise.
3265 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3266 to *intTI_type_node or *intDI_type_node depending on whether
3267 TImode is supported by the target or not.
3269 2017-04-10 Martin Liska <mliska@suse.cz>
3272 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3273 doing an UBSAN check.
3275 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3277 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3279 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3282 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3284 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3285 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3288 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3290 PR documentation/78732
3291 * c.opt (Wendif-labels): Fix description to refer to
3292 #else rather than #elif.
3294 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3297 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3298 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3300 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3303 * c-common.c (c_common_mark_addressable_vec): Don't set
3304 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3306 2017-03-21 Martin Sebor <msebor@redhat.com>
3309 * c-common.c (set_underlying_type): Mark type used only when
3310 original del is declared unused.
3312 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3314 PR translation/79848
3315 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3318 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3321 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3322 from inform's message, so that xgettext can locate it.
3324 2017-03-09 Marek Polacek <polacek@redhat.com>
3328 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3329 conversion to the attribute list.
3331 2017-03-09 Martin Liska <mliska@suse.cz>
3333 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3335 2017-03-03 Jason Merrill <jason@redhat.com>
3337 * c.opt (Wnoexcept-type): New.
3339 2017-03-02 Richard Biener <rguenther@suse.de>
3342 * c-common.c (c_common_mark_addressable_vec): Look through
3345 2017-02-28 Martin Liska <mliska@suse.cz>
3347 * c.opt: Replace space with tabular for options of <number>
3350 2017-02-28 Martin Liska <mliska@suse.cz>
3352 * c.opt: Fix --help=option -Q for options which are of
3355 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3358 * c-common.c (check_function_restrict): New function.
3359 (check_function_arguments): Add FNDECL argument. Call
3360 check_function_restrict if -Wrestrict.
3361 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3362 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3363 * c-common.h (check_function_arguments): Add FNDECL argument.
3364 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3366 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3368 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3369 treatment of parameters with pointer-to-tagged type and tidy up.
3370 (print_ada_methods): Remove the special treatment of C++ static member
3373 2017-02-22 Martin Liska <mliska@suse.cz>
3375 * c.opt: Replace inequality signs with square brackets
3378 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3381 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3384 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3386 * c-cppbuiltin.c (builtin_define_float_constants): Define
3387 __DECIMAL_DIG__ to the value for long double.
3389 2017-02-15 Marek Polacek <polacek@redhat.com>
3392 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3393 conversion has occured.
3395 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3397 * c-common.c (c_common_reswords): Add "__RTL".
3398 * c-common.h (enum rid): Add RID_RTL.
3400 2017-01-20 Marek Polacek <polacek@redhat.com>
3403 * c-common.h (do_warn_duplicated_branches_r): Declare.
3404 * c-gimplify.c (c_genericize): Walk the function tree calling
3405 do_warn_duplicated_branches_r.
3406 * c-warn.c (expr_from_macro_expansion_r): New.
3407 (do_warn_duplicated_branches): New.
3408 (do_warn_duplicated_branches_r): New.
3409 * c.opt (Wduplicated-branches): New option.
3411 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3414 * c-indentation.c (warn_for_misleading_indentation): Use the past
3415 subjunctive in the note.
3417 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3420 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3421 start type to integer_type.
3423 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3426 * c.opt (gen-decls): Add Driver flag.
3428 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3431 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3434 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3436 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3439 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3441 2017-01-12 Martin Sebor <msebor@redhat.com>
3443 (-Wformat-overflow): ...to this.
3445 2017-01-11 Martin Sebor <msebor@redhat.com>
3448 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3449 Also enable for LTO.
3451 2017-01-10 Jason Merrill <jason@redhat.com>
3453 Implement P0195R2, C++17 variadic using.
3454 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3456 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3458 PR translation/79019
3459 PR translation/79020
3460 * c.opt (Wnormalized=): Fix typo in description.
3462 2017-01-08 Martin Sebor <msebor@redhat.com>
3465 * c.opt (-Wformat-truncation): New option.
3467 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3469 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3470 value to unsigned short to fit in 4 hex digits without
3473 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3475 * c.opt (fsso-struct): Add 'native' value.
3477 2017-01-05 Martin Liska <mliska@suse.cz>
3480 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3483 2017-01-04 Marek Polacek <polacek@redhat.com>
3486 * c.opt (Wpointer-compare): New option.
3488 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3491 * c.opt (fsso-struct=): Add RejectNegative.
3493 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3495 Update copyright years.
3497 2016-12-29 Martin Liska <mliska@suse.cz>
3500 * c.opt (strong-eval-order): Add RejectNegative keyword.
3502 2016-12-22 Jason Merrill <jason@redhat.com>
3504 Implement P0522R0, matching of template template arguments.
3505 * c-cppbuiltin.c (c_cpp_builtins): Define
3506 __cpp_template_template_args.
3508 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3511 * c-common.c (struct nonnull_arg_ctx): New type.
3512 (check_function_nonnull): Return bool instead of void. Use
3513 nonnull_arg_ctx as context rather than just location_t.
3514 (check_nonnull_arg): Adjust for the new context type, set
3515 warned_p to true if a warning has been diagnosed.
3516 (check_function_arguments): Return bool instead of void.
3517 * c-common.h (check_function_arguments): Adjust prototype.
3519 2016-12-21 Jason Merrill <jason@redhat.com>
3521 * c.opt (-fnew-ttp-matching): New flag.
3522 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3524 2016-12-14 Martin Jambor <mjambor@suse.cz>
3526 * c-omp.c: Include omp-general.h instead of omp-low.h.
3527 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3530 2016-12-14 Martin Sebor <msebor@redhat.com>
3533 * c-common.c (check_nonnull_arg): Disable when optimization
3536 2016-12-12 Marek Polacek <polacek@redhat.com>
3539 * c-common.c (attribute_fallthrough_p): Return false for
3542 2016-12-08 Martin Sebor <msebor@redhat.com>
3545 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3547 2016-12-08 Martin Sebor <msebor@redhat.com>
3550 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3553 2016-12-07 Martin Sebor <msebor@redhat.com>
3559 * c.opt (-Wstringop-overflow): New option.
3561 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3563 * c-attribs.c (asan odr indicator): New attribute.
3564 (handle_asan_odr_indicator_attribute): New function.
3566 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3568 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3571 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3573 * c-common.c (excess_precision_mode_join): New.
3574 (c_ts18661_flt_eval_method): New.
3575 (c_c11_flt_eval_method): Likewise.
3576 (c_flt_eval_method): Likewise.
3577 * c-common.h (excess_precision_mode_join): New.
3578 (c_flt_eval_method): Likewise.
3579 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3580 (cpp_iec_559_value): Call it.
3581 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3582 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3583 __FLT_EVAL_METHOD_TS_18661_3__.
3585 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3587 * c-opts.c (c_common_post_options): Add logic to handle the default
3588 case for -fpermitted-flt-eval-methods.
3590 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
3592 * c.opt (Wexpansion-to-defined): New.
3594 2016-11-23 Jakub Jelinek <jakub@redhat.com>
3597 * c-pragma.c (handle_pragma_target): Don't replace
3598 current_target_pragma, but chainon the new args to the current one.
3600 2016-11-22 Nathan Sidwell <nathan@acm.org>
3602 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
3603 indentation and formatting.
3605 2016-11-21 Martin Sebor <msebor@redhat.com>
3607 * c.opt (-fprintf-return-value): Enable by default.
3609 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3612 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3613 * c-common.c (c_common_nodes_and_builtins): Initialize
3614 const_tm_ptr_type_node.
3616 2016-11-16 Marek Polacek <polacek@redhat.com>
3619 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3621 2016-11-14 Jakub Jelinek <jakub@redhat.com>
3623 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3625 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3626 Richard Biener <rguenther@suse.de>
3628 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3629 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3630 * c.opt (fgimple): New option.
3632 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3635 * c-common.h (warn_for_restrict): Declare.
3636 * c-warn.c: Include gcc-rich-location.h.
3637 (warn_for_restrict): New function.
3638 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3639 (gcc_cdiag_char_table): Likewise.
3640 (gcc_cxxdiag_char_table): Likewise.
3641 * c.opt (Wrestrict): New option.
3643 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3645 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3646 for nested types only if the type is a record or union and dump SLOC.
3648 2016-11-09 Jason Merrill <jason@redhat.com>
3650 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3652 2016-11-09 Jakub Jelinek <jakub@redhat.com>
3654 * c-ubsan.c (ubsan_instrument_shift): Handle split
3655 -fsanitize=shift-base and -fsanitize=shift-exponent.
3657 2016-11-07 Jason Merrill <jason@redhat.com>
3659 * c.opt (Wc++1z-compat): New.
3660 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3662 2016-11-07 Martin Liska <mliska@suse.cz>
3664 * c-warn.c (warn_for_unused_label): Save all labels used
3665 in goto or in &label.
3667 2016-11-03 Jason Merrill <jason@redhat.com>
3669 * c-cppbuiltin.c (c_cpp_builtins): Correct
3670 __cpp_inheriting_constructors.
3672 2016-11-01 Jason Merrill <jason@redhat.com>
3674 * c-cppbuiltin.c (c_cpp_builtins): Update
3675 __cpp_inheriting_constructors.
3677 * c.opt (-fnew-inheriting-ctors): New.
3678 * c-opts.c: Default to on for ABI 11+.
3680 2016-10-31 Jakub Jelinek <jakub@redhat.com>
3683 * c.opt (fext-numeric-literals): Add Var and Init.
3684 * c-opts.c (c_common_handle_option): Don't clear
3685 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3686 (c_common_post_options): Clear it here if not set
3689 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
3692 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3695 2016-10-25 Jakub Jelinek <jakub@redhat.com>
3697 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3698 * c-common.c (c_common_reswords): Add __builtin_launder.
3700 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3702 * c-common.c (c_common_truthvalue_conversion): Warn for
3703 multiplications in boolean context. Fix the quoting of '<<' and '<'
3704 in the shift warning.
3706 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3708 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3710 2016-10-20 Jason Merrill <jason@redhat.com>
3712 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3714 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3716 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3717 integer shift ops in boolean context.
3719 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
3721 * c.opt (Walloca): New.
3722 (Walloca-larger-than=): New.
3723 (Wvla-larger-than=): New.
3725 2016-10-17 Marek Polacek <polacek@redhat.com>
3727 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3728 Return immediately when finding a match.
3729 (warn_tautological_cmp): Remove a boolean variable that is no longer
3732 2016-10-17 Marek Polacek <polacek@redhat.com>
3734 * c-attribs.c: New file.
3735 * c-common.c: Move attributes handling to c-attribs.c.
3736 (get_nonnull_operand): No longer static.
3737 * c-common.h: Move the declarations from c-attribs.c to its own section.
3739 2016-10-14 Jason Merrill <jason@redhat.com>
3741 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3742 and __cpp_deduction_guides.
3744 2016-10-13 Jason Merrill <jason@redhat.com>
3746 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3748 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3750 * c-cppbuiltin.c: Include memmodel.h.
3751 * c-opts.c: Likewise.
3752 * c-pragma.c: Likewise.
3753 * c-warn.c: Likewise.
3755 2016-10-12 Jakub Jelinek <jakub@redhat.com>
3757 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3758 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3759 * c-opts.c (sanitize_cpp_opts): Initialize
3760 cpp_opts->cpp_warn_implicit_fallthrough.
3762 2016-10-11 Marek Polacek <polacek@redhat.com>
3764 * c-common.c (warning_candidate_p): Change the return type to bool
3765 and return true/false instead of 1/0.
3766 (vector_mode_valid_p): Likewise.
3768 2016-10-11 Marek Polacek <polacek@redhat.com>
3770 * c-common.c (fold_for_warn): No longer static.
3771 (bool_promoted_to_int_p): Likewise.
3772 (c_common_get_narrower): Likewise.
3773 (constant_expression_warning): Move to c-warn.c.
3774 (constant_expression_error): Likewise.
3775 (overflow_warning): Likewise.
3776 (warn_logical_operator): Likewise.
3777 (find_array_ref_with_const_idx_r): Likewise.
3778 (warn_tautological_cmp): Likewise.
3779 (expr_has_boolean_operands_p): Likewise.
3780 (warn_logical_not_parentheses): Likewise.
3781 (warn_if_unused_value): Likewise.
3782 (strict_aliasing_warning): Likewise.
3783 (sizeof_pointer_memaccess_warning): Likewise.
3784 (check_main_parameter_types): Likewise.
3785 (conversion_warning): Likewise.
3786 (warnings_for_convert_and_check): Likewise.
3787 (match_case_to_enum_1): Likewise.
3788 (match_case_to_enum): Likewise.
3789 (c_do_switch_warnings): Likewise.
3790 (warn_for_omitted_condop): Likewise.
3791 (readonly_error): Likewise.
3792 (lvalue_error): Likewise.
3793 (invalid_indirection_error): Likewise.
3794 (warn_array_subscript_with_type_char): Likewise.
3795 (warn_about_parentheses): Likewise.
3796 (warn_for_unused_label): Likewise.
3797 (warn_for_div_by_zero): Likewise.
3798 (warn_for_memset): Likewise.
3799 (warn_for_sign_compare): Likewise.
3800 (do_warn_double_promotion): Likewise.
3801 (do_warn_unused_parameter): Likewise.
3802 (record_locally_defined_typedef): Likewise.
3803 (maybe_record_typedef_use): Likewise.
3804 (maybe_warn_unused_local_typedefs): Likewise.
3805 (maybe_warn_bool_compare): Likewise.
3806 (maybe_warn_shift_overflow): Likewise.
3807 (warn_duplicated_cond_add_or_warn): Likewise.
3808 (diagnose_mismatched_attributes): Likewise.
3809 * c-common.h: Move the declarations from c-warn.c to its own section.
3810 * c-warn.c: New file.
3812 2016-10-08 Jason Merrill <jason@redhat.com>
3814 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3815 into COND_EXPR in C++.
3817 2016-10-08 Jakub Jelinek <jakub@redhat.com>
3819 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3820 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3821 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3823 2016-10-07 Jakub Jelinek <jakub@redhat.com>
3825 Implement LWG2296 helper intrinsic
3826 * c-common.h (enum rid): Add RID_ADDRESSOF.
3827 * c-common.c (c_common_reswords): Add __builtin_addressof.
3829 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3832 * c-common.c (c_common_truthvalue_conversion): Warn also for
3833 suspicious enum values in boolean context.
3835 2016-10-06 Jakub Jelinek <jakub@redhat.com>
3837 Implement P0258R2 - helper for C++17
3838 std::has_unique_object_representations trait
3839 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3840 * c-common.c (c_common_reswords): Add
3841 __has_unique_object_representations.
3843 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3846 * c-ubsan.c (ubsan_instrument_return): Don't call
3847 initialize_sanitizer_builtins here.
3849 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3851 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3852 conditional expression in boolean context when only one arm is
3855 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3858 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3861 * c-common.c (c_common_reswords): Update comment for C++11.
3863 2016-10-04 Jason Merrill <jason@redhat.com>
3865 * c-common.c (make_tree_vector_from_ctor): New.
3866 * c-common.h: Declare it.
3868 2016-10-04 Jakub Jelinek <jakub@redhat.com>
3870 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3871 __LIBGCC_JCR_SECTION_NAME__.
3873 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3875 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3876 left shift in boolean context.
3878 2016-09-29 Jakub Jelinek <jakub@redhat.com>
3880 Implement P0001R1 - C++17 removal of register storage class specifier
3881 * c.opt (Wregister): New warning.
3882 * c-opts.c (c_common_post_options): Enable -Wregister by
3885 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3887 * c-opts.c (c_common_post_options): Remove special case for
3888 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3891 2016-09-27 Jakub Jelinek <jakub@redhat.com>
3893 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3896 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3898 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3900 * c-common.c: Include memmodel.h.
3902 2016-09-26 Marek Polacek <polacek@redhat.com>
3904 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3906 2016-09-26 Marek Polacek <polacek@redhat.com>
3909 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3910 (handle_fallthrough_attribute): New function.
3911 (attribute_fallthrough_p): New function.
3912 * c-common.h (attribute_fallthrough_p): Declare.
3914 2016-09-24 Marek Polacek <polacek@redhat.com>
3917 * c.opt (Wbool-operation): New.
3919 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3921 * c-common.c (c_common_truthvalue_conversion): Inhibit
3922 Wint-in-bool-context warning with from_macro_definition_at.
3923 Mention the expression will always evaluate to true.
3925 2016-09-21 Martin Sebor <msebor@redhat.com>
3928 * c.opt (fprintf-return-value): Temporarily initialize to zero
3929 to unblock bootstrap failures.
3931 2016-09-21 Jakub Jelinek <jakub@redhat.com>
3934 * c.opt (Waligned-new=): Add RejectNegative.
3935 (faligned-new=): Likewise. Spelling fix - change
3936 aligned_new_threshhold to aligned_new_threshold.
3937 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3938 to aligned_new_threshold.
3940 2016-09-20 Martin Sebor <msebor@redhat.com>
3943 * c.opt: Add -Wformat-length and -fprintf-return-value.
3945 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3948 * c.opt (Wint-in-bool-context): New warning.
3949 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3950 constants in boolean context.
3952 2016-09-19 Joseph Myers <joseph@codesourcery.com>
3954 * c-common.c (max_align_t_align): Also consider alignment of
3957 2016-09-15 Jason Merrill <jason@redhat.com>
3959 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3962 2016-09-14 Jason Merrill <jason@redhat.com>
3964 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3965 limit FIELD_DECL, either.
3967 2016-09-14 Marek Polacek <polacek@redhat.com>
3969 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3970 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3971 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3973 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3975 * c-common.c (warn_logical_not_parentheses): Replace
3976 rich_location::add_fixit_insert calls with add_fixit_insert_before
3977 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3979 2016-09-13 Jason Merrill <jason@redhat.com>
3980 Tom de Vries <tom@codesourcery.com>
3983 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3985 2016-09-13 Jason Merrill <jason@redhat.com>
3987 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3990 2016-09-12 Jason Merrill <jason@redhat.com>
3992 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3993 bit/byte confusion, allow large alignment for types.
3995 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3998 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4000 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4003 * c-format.c (argument_parser::check_argument_type): Add params
4004 "type_start" and "conversion_char". Use the former to generate
4005 offset_to_type_start and pass it and conversion_char to
4007 (check_format_info_main): Capture the start of the type
4008 information as "type_start", and pass it an format_char
4009 to arg_parser.check_argument_type.
4010 (check_format_types): Provide an example in the leading comment.
4011 Add params "offset_to_type_start" and "conversion_char"; pass
4012 them to format_type_warning calls.
4013 (test_get_modifier_for_format_len): Likewise.
4014 (matching_type_p): New function.
4015 (get_format_for_type): Add param "conversion_char" and move
4016 implementation into...
4017 (get_format_for_type_1): ...new function, called twice.
4018 Use new function matching_type_p rather than checking for
4019 TYPE_CANONICAL equality.
4020 (get_corrected_substring): New function.
4021 (format_type_warning): Provide an example in the leading comment.
4022 Add params "offset_to_type_start" and "conversion_char". Replace
4023 call to get_format_for_type with call to get_corrected_substring
4024 and move rejection of hints for widths/precisions there.
4025 (assert_format_for_type_streq): Add param "conversion_char".
4026 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4027 (test_get_format_for_type_printf): Add conversion chars to the
4028 tests, adding coverage for various combinations of integer
4029 vs double conversions, and for preserving octal and hexadecimal
4031 (test_get_format_for_type_scanf): Add conversion chars to the
4034 2016-09-10 Tom de Vries <tom@codesourcery.com>
4037 * c-common.c (build_va_arg): Handle more strict
4038 targetm.canonical_va_list_type. Replace first argument type error with
4041 2016-09-09 Martin Sebor <msebor@redhat.com>
4045 * c-format.c (argument_parser::find_format_char_info): Use %qc
4046 format directive unconditionally.
4048 2016-09-09 Jason Merrill <jason@redhat.com>
4050 Implement C++17 new of over-aligned types.
4051 * c.opt: Add -faligned-new and -Waligned-new.
4052 * c-common.c (max_align_t_align): Split out from...
4053 (cxx_fundamental_alignment_p): ...here.
4054 * c-common.h: Declare it.
4055 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4057 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4059 * c-cppbuiltin.c (builtin_define_type_width): New function.
4060 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4063 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4065 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4067 (substring_loc::get_location): Move to substring-locations.c,
4068 keeping implementation as...
4069 (c_get_substring_location): New function, from the above, reworked
4070 to use accessors rather than member lookup.
4071 * c-common.h (class substring_loc): Move to substring-locations.h,
4072 replacing with a forward decl.
4073 (c_get_substring_location): New decl.
4074 * c-format.c: Include "substring-locations.h".
4075 (format_warning_va): Move to substring-locations.c.
4076 (format_warning_at_substring): Likewise.
4078 2016-09-06 Martin Sebor <msebor@redhat.com>
4081 * c-format.c (check_function_format): Avoid issuing warnings for
4082 functions unless they call format functions with non-constant
4085 2016-09-06 Richard Biener <rguenther@suse.de>
4088 * c-common.c (c_common_mark_addressable_vec): Handle
4089 COMPOUND_LITERAL_EXPR.
4091 2016-09-05 Marek Polacek <polacek@redhat.com>
4094 * c-common.c (bool_promoted_to_int_p): New function.
4095 (expr_has_boolean_operands_p): New function.
4096 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4097 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4099 2016-09-04 Tom de Vries <tom@codesourcery.com>
4102 2016-08-29 Tom de Vries <tom@codesourcery.com>
4104 * c-common.c (build_va_arg): Replace first argument type error
4107 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4110 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4111 (c_finish_omp_for): Reject _Atomic qualified iterators.
4113 2016-09-01 Martin Sebor <msebor@redhat.com>
4115 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4116 size to guarantee it fits the output of the formatted function
4117 regardless of its arguments.
4119 2016-09-01 Marek Polacek <polacek@redhat.com>
4122 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4125 2016-08-29 Marek Polacek <polacek@redhat.com>
4128 * c-common.c (warn_logical_not_parentheses): Don't warn for
4129 a comparison or a logical operator.
4131 2016-08-29 Tom de Vries <tom@codesourcery.com>
4133 * c-common.c (build_va_arg): Fix type comparison assert.
4135 2016-08-29 Tom de Vries <tom@codesourcery.com>
4137 * c-common.c (build_va_arg): Replace first argument type error
4140 2016-08-29 Tom de Vries <tom@codesourcery.com>
4143 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4144 with error_mark_node as va_list instead of with illegal va_list.
4146 2016-08-25 Marek Polacek <polacek@redhat.com>
4147 David Malcolm <dmalcolm@redhat.com>
4149 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4150 * c-common.h (warn_logical_not_parentheses): Update declaration.
4152 2016-08-22 Marek Polacek <polacek@redhat.com>
4155 * c-common.c (warn_for_memset): Check type for null.
4157 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4159 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4160 _FloatNx types for suffixes for built-in functions.
4162 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4165 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4166 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4167 (RID_FLOAT128X): New enum rid values.
4168 (CASE_RID_FLOATN_NX): New macro.
4169 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4171 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4172 corresponding complex types.
4173 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4174 _FloatNx and corresponding complex types.
4175 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4176 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4177 and _FloatNx types for the widest type for determining
4178 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4179 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4180 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4182 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4184 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4187 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4189 * c-opts.c (c_diagnostic_finalizer): Update for change to
4190 diagnostic_show_locus.
4192 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4194 * c-common.c: Include "spellcheck.h".
4195 (cb_get_suggestion): New function.
4196 * c-common.h (cb_get_suggestion): New decl.
4197 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4200 2016-08-18 Marek Polacek <polacek@redhat.com>
4203 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4206 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4209 * c-common.c (substring_loc::get_range): Rename to...
4210 (substring_loc::get_location): ...this, converting param from a
4211 source_range * to a location_t *. Call
4212 get_source_location_for_substring rather than
4213 get_source_range_for_substring, and pass in m_caret_idx.
4214 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4215 (substring_loc::get_range): Replace with...
4216 (substring_loc::get_location): ...this.
4217 (substring_loc::set_caret_index): New method.
4218 (substring_loc): Add field m_caret_idx.
4219 * c-format.c (format_warning_va): Update for above changes.
4220 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4221 clashing with type name.
4222 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4223 (check_argument_type): Likewise.
4224 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4225 Use a copy when emitting warnings, setting the caret index from TYPE.
4227 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4228 Arnaud Charlet <charlet@adacore.com>
4230 * c-ada-spec.c (dump_number): New function.
4231 (handle_escape_character): Likewise.
4232 (print_ada_macros): Add handling of constant integers and strings.
4234 2016-08-12 Marek Polacek <polacek@redhat.com>
4237 * c-common.c (scalar_to_vector): Adjust fall through comment.
4238 * c-opts.c (c_common_handle_option): Likewise.
4239 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4240 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4241 fall through comment.
4242 * cilk.c (extract_free_variables): Add FALLTHRU.
4244 2016-08-10 Jason Merrill <jason@redhat.com>
4246 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4248 2016-08-09 Jason Merrill <jason@redhat.com>
4250 * c-common.c (c_common_attribute_table): vector_size affects type
4253 2016-08-09 Marek Polacek <polacek@redhat.com>
4256 * c-ada-spec.c (dump_generic_ada_node): Add return.
4258 2016-08-09 Jason Merrill <jason@redhat.com>
4260 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4261 C++17 constexpr lambdas.
4263 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4266 * c-common.h (selftest::c_format_c_tests): New declaration.
4267 (selftest::run_c_tests): New declaration.
4268 * c-format.c: Include "selftest.h.
4269 (format_warning_va): Add param "corrected_substring" and use
4270 it to add a replacement fix-it hint.
4271 (format_warning_at_substring): Likewise.
4272 (format_warning_at_char): Update for new param of
4274 (argument_parser::check_argument_type): Pass "fki" to
4276 (check_format_types): Add param "fki" and pass it to
4277 format_type_warning.
4278 (deref_n_times): New function.
4279 (get_modifier_for_format_len): New function.
4280 (selftest::test_get_modifier_for_format_len): New function.
4281 (get_format_for_type): New function.
4282 (format_type_warning): Add param "fki" and use it to attempt
4283 to provide hints for argument types when calling
4284 format_warning_at_substring.
4285 (selftest::get_info): New function.
4286 (selftest::assert_format_for_type_streq): New function.
4287 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4288 (selftest::test_get_format_for_type_printf): New function.
4289 (selftest::test_get_format_for_type_scanf): New function.
4290 (selftest::c_format_c_tests): New function.
4292 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4295 * c-format.c: Include "diagnostic.h".
4296 (location_column_from_byte_offset): Delete.
4297 (location_from_offset): Delete.
4298 (format_warning_va): New function.
4299 (format_warning_at_substring): New function.
4300 (format_warning_at_char): New function.
4301 (check_format_arg): Capture location of format_tree and pass to
4302 check_format_info_main.
4303 (argument_parser): Add fields "start_of_this_format" and
4304 "format_string_cst".
4305 (flag_chars_t::validate): Add param "format_string_cst". Convert
4306 warning_at call using location_from_offset to call to
4307 format_warning_at_char.
4308 (argument_parser::argument_parser): Add param "format_string_cst_"
4309 and use use it to initialize field "format_string_cst".
4310 Initialize new field "start_of_this_format".
4311 (argument_parser::read_format_flags): Convert warning_at call
4312 using location_from_offset to a call to format_warning_at_char.
4313 (argument_parser::read_any_format_left_precision): Likewise.
4314 (argument_parser::read_any_format_precision): Likewise.
4315 (argument_parser::read_any_other_modifier): Likewise.
4316 (argument_parser::find_format_char_info): Likewise, in three places.
4317 (argument_parser::parse_any_scan_set): Likewise, in one place.
4318 (argument_parser::handle_conversions): Likewise, in two places.
4319 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4320 and use it to make a substring_loc. Pass the latter to
4322 (check_format_info_main): Add params "fmt_param_loc" and
4323 "format_string_cst". Convert warning_at calls using
4324 location_from_offset to calls to format_warning_at_char. Pass the
4325 new params to the arg_parser ctor. Pass "format_string_cst" to
4326 flag_chars.validate. Pass "fmt_param_loc" to
4327 arg_parser.check_argument_type.
4328 (check_format_types): Convert first param from a location_t
4329 to a const substring_loc & and rename to "fmt_loc". Attempt
4330 to extract the range of the relevant parameter and pass it
4331 to format_type_warning.
4332 (format_type_warning): Convert first param from a location_t
4333 to a const substring_loc & and rename to "fmt_loc". Add
4334 params "param_range" and "type". Replace calls to warning_at
4335 with calls to format_warning_at_substring.
4337 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4339 * c-format.c (class flag_chars_t): New class.
4340 (struct length_modifier): New struct.
4341 (class argument_parser): New class.
4342 (flag_chars_t::flag_chars_t): New ctor.
4343 (flag_chars_t::has_char_p): New method.
4344 (flag_chars_t::add_char): New method.
4345 (flag_chars_t::validate): New method.
4346 (flag_chars_t::get_alloc_flag): New method.
4347 (flag_chars_t::assignment_suppression_p): New method.
4348 (argument_parser::argument_parser): New ctor.
4349 (argument_parser::read_any_dollar): New method.
4350 (argument_parser::read_format_flags): New method.
4351 (argument_parser::read_any_format_width): New method.
4352 (argument_parser::read_any_format_left_precision): New method.
4353 (argument_parser::read_any_format_precision): New method.
4354 (argument_parser::handle_alloc_chars): New method.
4355 (argument_parser::read_any_length_modifier): New method.
4356 (argument_parser::read_any_other_modifier): New method.
4357 (argument_parser::find_format_char_info): New method.
4358 (argument_parser::validate_flag_pairs): New method.
4359 (argument_parser::give_y2k_warnings): New method.
4360 (argument_parser::parse_any_scan_set): New method.
4361 (argument_parser::handle_conversions): New method.
4362 (argument_parser::check_argument_type): New method.
4363 (check_format_info_main): Introduce classes argument_parser
4364 and flag_chars_t, moving the code within the loop into methods
4365 of these classes. Make various locals "const".
4367 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4369 * c-common.c: Include "substring-locations.h".
4370 (get_cpp_ttype_from_string_type): New function.
4371 (g_string_concat_db): New global.
4372 (substring_loc::get_range): New method.
4373 * c-common.h (g_string_concat_db): New declaration.
4374 (class substring_loc): New class.
4375 * c-lex.c (lex_string): When concatenating strings, capture the
4376 locations of all tokens using a new obstack, and record the
4377 concatenation locations within g_string_concat_db.
4378 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4381 2016-07-29 Marek Polacek <polacek@redhat.com>
4384 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4385 parentheses warning.
4388 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4390 2016-07-28 Martin Liska <mliska@suse.cz>
4392 PR gcov-profile/68025
4393 * c-common.c (handle_no_profile_instrument_function_attribute):
4395 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4397 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4400 2016-07-25 Jason Merrill <jason@redhat.com>
4403 * c.opt (fconstexpr-loop-limit): New.
4405 2016-07-22 Martin Sebor <msebor@redhat.com>
4408 * c-common.c (resolve_overloaded_builtin): Avoid converting
4409 __atomic_compare_exchange_n return type to that of what its
4410 first argument points to.
4412 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4414 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4415 ~(unsigned HOST_WIDE_INT) 0.
4417 2016-07-22 Martin Liska <mliska@suse.cz>
4419 PR gcov-profile/69028
4420 PR gcov-profile/62047
4421 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4422 to the current_function_decl.
4424 2016-07-21 Jason Merrill <jason@redhat.com>
4427 * c-common.c (c_common_truthvalue_conversion): Check
4428 c_inhibit_evaluation_warnings for warning about address of
4431 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4433 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4436 2016-07-15 Jason Merrill <jason@redhat.com>
4438 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4440 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4443 * c-common.h (enum lookup_name_fuzzy_kind): Add
4444 FUZZY_LOOKUP_FUNCTION_NAME.
4446 2016-07-08 Jason Merrill <jason@redhat.com>
4448 P0145: Refining Expression Order for C++.
4449 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4452 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4455 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4457 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4459 * c-pragma.h (enum pragma_kind): Rename
4460 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4463 2016-06-29 Richard Biener <rguenther@suse.de>
4466 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4468 2016-06-24 Jason Merrill <jason@redhat.com>
4470 P0145R2: Refining Expression Order for C++.
4471 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4474 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4476 * c-common.c (check_builtin_function_arguments): Require last
4477 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4478 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4479 if the last argument is pointer to enumerated or boolean type.
4481 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4484 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4485 (lookup_name_fuzzy): New prototype.
4487 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4489 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4491 2016-06-14 Jason Merrill <jason@redhat.com>
4493 P0145R2: Refining Expression Order for C++.
4494 * c.opt (fargs-in-order): New.
4495 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4497 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4500 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4501 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4503 PR preprocessor/71183
4504 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4505 to cb_get_source_date_epoch.
4507 2016-06-10 Jakub Jelinek <jakub@redhat.com>
4510 * c.opt (Wpsabi): Add Warning flag.
4512 2016-06-10 Martin Sebor <msebor@redhat.com>
4515 * c-common.c (handle_nonnull_attribute): Accept
4516 the nonnull attribute in type-generic builtins.
4518 2016-06-09 Martin Sebor <msebor@redhat.com>
4521 * c-common.c (builtin_function_validate_nargs): Make text of error
4522 message consistent with others like it.
4524 2016-06-08 Martin Sebor <msebor@redhat.com>
4525 Jakub Jelinek <jakub@redhat.com>
4529 * c-common.c (check_builtin_function_arguments): Handle
4530 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4532 2016-06-08 Richard Biener <rguenther@suse.de>
4534 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4536 2016-06-07 Richard Biener <rguenther@suse.de>
4539 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4540 options and warn about others.
4542 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
4544 * c-common.c (get_source_date_epoch): Rename to
4545 cb_get_source_date_epoch.
4546 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4547 message when the parsing fails. Use error_at instead of fatal_error.
4548 * c-common.h (get_source_date_epoch): Rename to
4549 cb_get_source_date_epoch.
4550 * c-common.h (cb_get_source_date_epoch): Prototype.
4551 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4552 * c-common.h (c_omp_region_type): Remove trailing comma.
4553 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4554 * c-lex.c (c_lex_with_flags): Remove initialization of
4555 pfile->source_date_epoch.
4557 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4560 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4561 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4562 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4563 instead of C_OMP_CLAUSE_SPLIT_FOR.
4565 2016-05-24 Richard Biener <rguenther@suse.de>
4569 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4570 (convert_vector_to_array_for_subscript): ... this.
4571 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4572 VIEW_CONVERT_EXPR to an array type. Rename to ...
4573 (convert_vector_to_array_for_subscript): ... this.
4575 2016-05-12 Marek Polacek <polacek@redhat.com>
4578 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4579 size_in_bytes and pass LOC to it.
4581 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4584 * c.opt (Wduplicate-decl-specifier): New option.
4586 2016-05-11 Marek Polacek <polacek@redhat.com>
4589 * c-common.c (diagnose_mismatched_attributes): New function.
4590 * c-common.h (diagnose_mismatched_attributes): Declare.
4592 2016-05-04 Marek Polacek <polacek@redhat.com>
4594 * c.opt (Wdangling-else): New option.
4596 2016-05-03 Marek Polacek <polacek@redhat.com>
4599 * c-common.c (builtin_function_validate_nargs): Add location
4601 (check_builtin_function_arguments): Add location and arguments
4602 parameters. Use them.
4603 * c-common.h (check_builtin_function_arguments): Update declaration.
4605 2016-05-03 Richard Biener <rguenther@suse.de>
4607 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4608 allow call args to gimplify to SSA names.
4610 2016-05-03 Marek Polacek <polacek@redhat.com>
4612 * c-common.h (enum c_omp_region_type): Remove stray comma.
4614 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4616 * c-common.h (enum c_omp_region_type): Define.
4618 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4620 * c-common.c (shorten_compare): Use wi::to_wide.
4622 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4625 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4626 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4627 reduction clauses in acc parallel loops.
4629 2016-04-29 Marek Polacek <polacek@redhat.com>
4632 * c-common.c (warn_for_memset): Check domain before accessing it.
4634 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4637 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4638 "aligned" attribute.
4640 2016-04-28 Jason Merrill <jason@redhat.com>
4642 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4644 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
4645 Matthias Klose <doko@debian.org>
4647 * c-common.c (get_source_date_epoch): New function, gets the environment
4648 variable SOURCE_DATE_EPOCH and parses it as long long with error
4650 * c-common.h (get_source_date_epoch): Prototype.
4651 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4653 2015-04-27 Ryan Burn <contact@rnburn.com>
4657 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4658 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4660 (cilk_detect_and_unwrap): Corresponding changes.
4661 (extract_free_variables): Don't extract free variables from
4662 AGGR_INIT_EXPR slot.
4663 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4664 (cilk_recognize_spawn): Likewise.
4666 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4668 * c.opt (Wmemset-elt-size): New option.
4669 * c-common.c (warn_for_memset): New function.
4670 * c-common.h (warn_for_memset): Declare.
4672 2016-04-25 Jason Merrill <jason@redhat.com>
4674 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4676 * c-common.h: Declare it.
4677 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4679 2016-04-22 Jason Merrill <jason@redhat.com>
4681 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4683 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4686 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4687 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4689 2016-04-18 Michael Matz <matz@suse.de>
4691 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4694 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4696 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4697 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4698 to incomplete types.
4699 (dump_nested_type): Remove redundant tests and tidy up.
4700 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4701 a type which is the typedef of an original type.
4703 2016-04-15 Marek Polacek <polacek@redhat.com>
4706 * c-common.c (build_va_arg): Change two asserts into errors and return
4709 2016-04-13 Marek Polacek <polacek@redhat.com>
4712 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4713 for switch statements, too.
4715 2016-03-28 Jason Merrill <jason@redhat.com>
4717 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4719 2016-03-23 Marek Polacek <polacek@redhat.com>
4722 * c.opt (Wignored-attributes): New option.
4724 2016-03-22 David Malcolm <dmalcolm@redhat.com>
4727 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4728 diagnostic text, reversing the order of the warning and note so
4729 that they appear in source order.
4731 2016-03-17 Marek Polacek <polacek@redhat.com>
4734 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4737 2016-03-14 Jason Merrill <jason@redhat.com>
4739 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4741 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4743 2016-03-09 Richard Biener <rguenther@suse.de>
4746 * c-common.c (strict_aliasing_warning): Add back
4747 alias_sets_conflict_p check.
4749 2016-03-08 Jason Merrill <jason@redhat.com>
4751 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4753 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4756 * c-indentation.c (get_visual_column): Move code to determine next
4758 (next_tab_stop): ...this new function.
4759 (line_contains_hash_if): Delete function.
4760 (detect_preprocessor_logic): Delete function.
4761 (get_first_nws_vis_column): New function.
4762 (detect_intervening_unindent): New function.
4763 (should_warn_for_misleading_indentation): Replace call to
4764 detect_preprocessor_logic with a call to
4765 detect_intervening_unindent.
4767 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4770 * c-indentation.c (should_warn_for_misleading_indentation): When
4771 suppressing warnings about cases where the guard and body are on
4772 the same column, only use the first non-whitespace column in place
4773 of the guard token column when dealing with "else" clauses.
4774 When rejecting aligned BODY and NEXT, loosen the requirement
4775 from equality with the first non-whitespace of guard to simply
4776 that they not be indented relative to it.
4778 2016-03-04 Richard Biener <rguenther@suse.de>
4781 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4782 instead of alias_sets_conflict_p.
4784 2016-03-01 Marek Polacek <polacek@redhat.com>
4787 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4790 2016-02-22 Martin Sebor <msebor@redhat.com>
4793 * c-common.c (check_builtin_function_arguments): Validate and
4794 reject invalid arguments to __builtin_alloca_with_align.
4796 2016-02-20 Mark Wielaard <mjw@redhat.com>
4799 * c.opt (Wunused-const-variable): Turn into Alias for...
4800 (Wunused-const-variable=): New option.
4802 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4805 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4807 (c_common_init_options): ...to here.
4808 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4810 2016-02-19 Jakub Jelinek <jakub@redhat.com>
4813 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4814 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4815 flag_preprocess_only.
4817 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4820 * c.opt (Wnonnull-compare): Enable for -Wall.
4822 2016-02-15 Jakub Jelinek <jakub@redhat.com>
4825 * c-common.c (sync_resolve_size): Diagnose too few arguments
4826 even when params is non-NULL empty vector.
4828 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4831 * c.opt (fshort-double): Remove.
4833 2016-02-05 Martin Sebor <msebor@redhat.com>
4836 * c.opt (Warning options): Update -Wplacement-new to take
4837 an optional argument.
4839 2016-02-01 Jakub Jelinek <jakub@redhat.com>
4841 PR preprocessor/69543
4843 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4844 instead of loc to control_warning_option.
4846 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4848 * c.opt (fopenacc-dim=): New option.
4850 2016-01-27 Ryan Burn <contact@rnburn.com>
4853 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4854 gimplify_arg. Removed superfluous post_p argument.
4855 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4856 superfluous post_p argument.
4857 * c-gimplify.c (c_gimplify_expr): Likewise.
4859 2016-01-26 David Malcolm <dmalcolm@redhat.com>
4862 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4863 pp_newline_and_flush with pp_flush.
4865 2016-01-20 Martin Sebor <msebor@redhat.com>
4868 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4869 an incompatible argument when the argument isn't a valid tree node.
4871 2016-01-18 Jason Merrill <jason@redhat.com>
4874 * c-common.c (check_function_arguments_recurse): Fold the whole
4875 COND_EXPR, not just the condition.
4877 2016-01-18 Tom de Vries <tom@codesourcery.com>
4879 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4880 classify as loop clause.
4882 2016-01-15 Jakub Jelinek <jakub@redhat.com>
4885 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4886 C++ FE no longer has limit on number of pragmas.
4888 2015-01-14 Ryan Burn <contact@rnburn.com>
4891 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
4892 to add missing cleanup point.
4894 2016-01-14 David Malcolm <dmalcolm@redhat.com>
4897 * c-indentation.c (get_visual_column): Add location_t param.
4898 Handle the column number being zero by effectively disabling the
4899 warning, with an "inform".
4900 (should_warn_for_misleading_indentation): Add location_t argument
4901 for all uses of get_visual_column.
4903 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4906 * c-indentation.c (should_warn_for_misleading_indentation):
4907 Don't warn about do-while statements.
4909 2016-01-07 Martin Sebor <msebor@redhat.com>
4912 * c-common.c (sync_resolve_size): Reject first argument when it's
4915 2016-01-05 David Malcolm <dmalcolm@redhat.com>
4918 * c-indentation.c (get_visual_column): Remove default argument.
4919 (should_warn_for_misleading_indentation): For the multiline case,
4920 update call to get_visual_column for next_stmt_exploc so that it
4921 captures the location of the first non-whitespace character in the
4922 relevant line. Don't issue warnings if there is non-whitespace
4923 before the next statement.
4925 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4927 Update copyright years.
4929 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4931 * c-common.c (binary_op_error): Convert first param from
4932 location_t to rich_location * and use it when emitting an error.
4933 * c-common.h (binary_op_error): Convert first param from
4934 location_t to rich_location *.
4936 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4938 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4939 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4941 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4943 * c-common.c (c_common_attribute_table): Handle "omp declare target
4946 2015-12-14 Jakub Jelinek <jakub@redhat.com>
4949 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4951 2014-12-12 Tobias Burnus <burnus@net-b.de>
4954 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4955 specifiers (%d, %i,%u and %c).
4957 2015-12-10 David Malcolm <dmalcolm@redhat.com>
4959 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4961 2015-12-08 Jakub Jelinek <jakub@redhat.com>
4965 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4966 * c-pragma.c (handle_pragma_diagnostic): Adjust
4967 control_warning_option caller.
4969 2015-12-07 David Malcolm <dmalcolm@redhat.com>
4971 * c-common.c (c_cpp_error): Update for change to
4972 rich_location::set_range.
4974 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
4976 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4977 shifting 1 out of the sign bit.
4979 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4981 * c-common.c (c_common_attribute_table[]): Update max arguments
4982 count for "simd" attribute.
4983 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4985 2015-12-03 Jakub Jelinek <jakub@redhat.com>
4987 PR preprocessor/57580
4988 * c-ppoutput.c (print): Change printed field to bool.
4989 Move src_file last for smaller padding.
4990 (init_pp_output): Set print.printed to false instead of 0.
4991 (scan_translation_unit): Fix up formatting. Set print.printed
4992 to true after printing something other than newline.
4993 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4994 (maybe_print_line_1): Set print.printed to false instead of 0.
4995 (print_line_1): Likewise.
4996 (do_line_change): Set print.printed to true instead of 1.
4997 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4998 dump_macro): Set print.printed to false after printing newline.
5000 2015-12-02 Jason Merrill <jason@redhat.com>
5002 * c-common.c (fold_for_warn): New.
5003 (warn_logical_operator, warn_tautological_cmp)
5004 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5006 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5007 (c_fully_fold_internal, decl_constant_value_for_optimization):
5009 * c-common.h: Don't declare decl_constant_value_for_optimization.
5011 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5014 * c-common.h (c_build_qualified_type): Add extra default
5017 2015-12-01 Julian Brown <julian@codesourcery.com>
5018 Cesar Philippidis <cesar@codesourcery.com>
5019 James Norris <James_Norris@mentor.com>
5021 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5022 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5023 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5025 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5027 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5028 (decl_sloc_common): Delete and move bulk of processing to...
5029 (decl_sloc): ...here.
5030 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5031 (dump_ada_double_name): Remove S parameter and compute the suffix.
5032 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5033 element type and deal with an anonymous one.
5034 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5035 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5036 and remove reference to QUAL_UNION_TYPE.
5037 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5038 (dump_nested_type): ...here. New function extracted from above.
5039 Generate a full declaration for anonymous element type of arrays.
5040 (print_ada_declaration): Really skip anonymous declarations. Remove
5041 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5042 Clean up processing of declarations of array types and objects.
5043 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5044 Remove obsolete code and tidy up.
5046 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5049 * c-common.c (handle_transparent_union_attribute): Update
5052 2015-11-27 Martin Liska <mliska@suse.cz>
5055 * array-notation-common.c (cilkplus_extract_an_triplets):
5056 Release vector of vectors.
5057 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5059 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5062 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5063 (print_ada_struct_decl): Likewise.
5065 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5068 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5069 * cilk.c (recognize_spawn): Determine location in a more precise
5072 2015-11-19 Jason Merrill <jason@redhat.com>
5074 * c-common.c (shorten_compare): But look through macros from
5077 2015-11-18 Jason Merrill <jason@redhat.com>
5079 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5080 non-constant operand comes from a macro.
5082 2015-11-17 Jason Merrill <jason@redhat.com>
5085 * c-common.c (warn_tautological_cmp): Fold before checking for
5088 2015-11-16 Marek Polacek <polacek@redhat.com>
5091 * c-common.c (check_case_bounds): Fold low and high cases.
5093 2015-11-16 Marek Polacek <polacek@redhat.com>
5095 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5096 * c-common.c (c_common_get_alias_set): Likewise.
5097 (handle_visibility_attribute): Likewise.
5099 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5101 * c-common.c (handle_simd_attribute): New.
5102 (struct attribute_spec): Add entry for "simd".
5103 (handle_simd_attribute): New.
5105 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5107 * c-lex.c (interpret_float): Use fold_convert.
5109 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5111 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5112 and store it on the result.
5113 * c-opts.c (c_common_init_options): Set
5114 global_dc->colorize_source_p.
5116 2015-11-12 James Norris <jnorris@codesourcery.com>
5117 Joseph Myers <joseph@codesourcery.com>
5119 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5120 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5121 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5122 PRAGMA_OACC_CLAUSE_LINK.
5124 2015-11-11 Marek Polacek <polacek@redhat.com>
5128 * c-common.c (valid_array_size_p): New function.
5129 * c-common.h (valid_array_size_p): Declare.
5131 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5134 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5136 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5138 * array-notation-common.c: Remove unused header files.
5139 * c-ada-spec.c: Likewise.
5140 * c-cilkplus.c: Likewise.
5141 * c-common.c: Likewise.
5142 * c-cppbuiltin.c: Likewise.
5143 * c-dump.c: Likewise.
5144 * c-format.c: Likewise.
5145 * c-gimplify.c: Likewise.
5146 * c-indentation.c: Likewise.
5147 * c-lex.c: Likewise.
5148 * c-omp.c: Likewise.
5149 * c-opts.c: Likewise.
5150 * c-pch.c: Likewise.
5151 * c-ppoutput.c: Likewise.
5152 * c-pragma.c: Likewise.
5153 * c-pretty-print.c: Likewise.
5154 * c-semantics.c: Likewise.
5155 * c-ubsan.c: Likewise.
5157 * stub-objc.c: Likewise.
5159 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5160 Cesar Philippidis <cesar@codesourcery.com>
5161 James Norris <jnorris@codesourcery.com>
5162 Julian Brown <julian@codesourcery.com>
5163 Nathan Sidwell <nathan@codesourcery.com>
5165 * c-pragma.c (oacc_pragmas): Add "routine".
5166 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5168 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5170 * c-common.c (c_common_attributes): Add scalar_storage_order.
5171 (handle_scalar_storage_order_attribute): New function.
5172 * c-pragma.c (global_sso): New variable.
5173 (maybe_apply_pragma_scalar_storage_order): New function.
5174 (handle_pragma_scalar_storage_order): Likewise.
5175 (init_pragma): Register scalar_storage_order.
5176 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5177 * c.opt (Wscalar-storage-order): New warning.
5178 (fsso-struct=): New option.
5180 2015-11-08 Martin Sebor <msebor@redhat.com>
5182 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5184 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5186 * c-common.c: Don't undef DEF_BUILTIN.
5188 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5190 * c-common.c (c_cpp_error): Convert parameter from location_t to
5191 rich_location *. Eliminate the "column_override" parameter and
5192 the call to diagnostic_override_column.
5193 Update the "done_lexing" clause to set range 0
5194 on the rich_location, rather than overwriting a location_t.
5195 * c-common.h (c_cpp_error): Convert parameter from location_t to
5196 rich_location *. Eliminate the "column_override" parameter.
5198 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5199 Thomas Schwinge <thomas@codesourcery.com>
5200 James Norris <jnorris@codesourcery.com>
5202 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5203 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5204 clauses with parallel and kernels and loops.
5205 * c-pragma.h (enum pragma_omp_clause): Add entries for
5206 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5207 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5208 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5210 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5212 2015-11-05 Martin Sebor <msebor@redhat.com>
5215 * c.opt (-Wplacement-new): New option.
5217 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5219 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5220 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5221 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5222 save_expr or create_tmp_var* if TEST is true.
5223 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5224 Don't call add_stmt here.
5225 (struct c_omp_check_loop_iv_data): New type.
5226 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5227 c_omp_check_loop_iv_exprs): New functions.
5228 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5230 (c_omp_declare_simd_clauses_to_numbers): Change
5231 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5232 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5233 from numbers to PARM_DECLs.
5235 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5237 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5240 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5243 * c-common.h (fold_offsetof_1): Add argument.
5244 * c-common.c (fold_offsetof_1): Diagnose more invalid
5245 offsetof expressions that reference elements past the end of
5248 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5249 Chung-Lin Tang <cltang@codesourcery.com>
5251 * c-pragma.c (oacc_pragmas): Add "atomic".
5252 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5254 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5256 * c-common.c (handle_target_clones_attribute): New.
5257 (c_common_attribute_table): Add handle_target_clones_attribute.
5258 (handle_always_inline_attribute): Add check on target_clones attribute.
5259 (handle_target_attribute): Ditto.
5261 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5263 * array-notation-common.c: Reorder #include's and remove duplicates.
5264 * c-ada-spec.c: Likewise.
5265 * c-cilkplus.c: Likewise.
5266 * c-common.c: Likewise.
5267 * c-cppbuiltin.c: Likewise.
5268 * c-dump.c: Likewise.
5269 * c-format.c: Likewise.
5270 * c-gimplify.c: Likewise.
5271 * c-indentation.c: Likewise.
5272 * c-lex.c: Likewise.
5273 * c-omp.c: Likewise.
5274 * c-opts.c: Likewise.
5275 * c-pch.c: Likewise.
5276 * c-ppoutput.c: Likewise.
5277 * c-pragma.c: Likewise.
5278 * c-pretty-print.c: Likewise.
5279 * c-semantics.c: Likewise.
5280 * c-ubsan.c: Likewise.
5282 * stub-objc.c: Likewise.
5284 2015-10-28 Jason Merrill <jason@redhat.com>
5286 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5288 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5289 James Norris <jnorris@codesourcery.com>
5290 Cesar Philippidis <cesar@codesourcery.com>
5294 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5295 * c-omp.c (c_oacc_split_loop_clauses): New function.
5297 2015-10-21 Martin Sebor <msebor@redhat.com>
5300 * c.opt: End each sentence that describes an option with a period.
5302 2015-10-20 Marek Polacek <polacek@redhat.com>
5304 * array-notation-common.c (is_cilkplus_vector_p): Define.
5305 * c-common.h (is_cilkplus_vector_p): Declare.
5307 2015-10-20 Marek Polacek <polacek@redhat.com>
5309 * c.opt (std=gnu++11): Do not describe as experimental.
5310 (std=gnu++14): Likewise.
5312 2015-10-19 Jason Merrill <jason@redhat.com>
5314 * c-cppbuiltin.c (c_cpp_builtins): Define
5315 __cpp_nontype_template_args.
5317 2015-10-19 Jason Merrill <jason@redhat.com>
5319 * c-cppbuiltin.c (c_cpp_builtins): Define
5320 __cpp_enumerator_attributes, __cpp_fold_expressions,
5321 __cpp_unicode_characters.
5323 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5324 Aldy Hernandez <aldyh@redhat.com>
5326 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5327 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5328 (c_define_builtins): Likewise.
5329 * c-common.h (enum c_omp_clause_split): Add
5330 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5331 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5332 (c_finish_omp_for): Add ORIG_DECLV argument.
5333 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5334 201511 instead of 201307.
5335 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5336 OMP_CRITICAL_CLAUSES to it.
5337 (c_finish_omp_ordered): Add CLAUSES argument, set
5338 OMP_ORDERED_CLAUSES to it.
5339 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5340 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5341 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5342 constructs and new OpenMP 4.5 clauses. Clear
5343 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5345 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5346 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5347 (enum pragma_omp_clause): Add
5348 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5349 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5351 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5353 * c-lex.c (interpret_float): Use real_equal instead of
5356 2015-10-04 Jason Merrill <jason@redhat.com>
5358 Implement N4514, C++ Extensions for Transactional Memory.
5359 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5360 (c_common_attribute_table): Add transaction_safe_dynamic.
5361 transaction_safe now affects type identity.
5362 (handle_tm_attribute): Handle transaction_safe_dynamic.
5363 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5364 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5365 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5367 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5368 * c-pretty-print.c (pp_c_attributes_display): Don't print
5369 transaction_safe in C++.
5371 2015-10-02 Marek Polacek <polacek@redhat.com>
5373 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5375 2015-10-02 Marek Polacek <polacek@redhat.com>
5378 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5379 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5380 * c.opt (Wduplicated-cond): New option.
5382 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5384 * c.opt (std=c11): Do not describe as experimental.
5385 (std=gnu11): Likewise.
5386 (std=iso9899:2011): Likewise.
5388 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5390 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5391 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5393 2015-09-25 Marek Polacek <polacek@redhat.com>
5395 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5396 (ubsan_instrument_shift): Likewise.
5398 2015-09-25 Marek Polacek <polacek@redhat.com>
5401 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5403 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5405 * c-indentation.c (should_warn_for_misleading_indentation):
5406 Compare next_stmt_vis_column with guard_line_first_nws instead
5407 of with guard_line_vis_column.
5409 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5413 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5414 options and options not valid for the current language.
5416 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5418 * c-indentation.c (should_warn_for_misleading_indentation):
5419 Float out and consolidate the calls to get_visual_column that
5420 are passed guard_exploc as an argument. Compare
5421 next_stmt_vis_column with guard_line_first_nws instead of with
5422 body_line_first_nws.
5424 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5426 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5427 Wnamespaces): New C++ warnings.
5429 2015-09-22 Jason Merrill <jason@redhat.com>
5431 * c-common.h (abi_compat_version_crosses): New.
5432 (warn_abi_version): Declare.
5433 * c-common.c: Define it.
5434 * c-opts.c (c_common_post_options): Handle it.
5435 flag_abi_compat_version defaults to 8.
5437 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5439 Complete the implementation of N4230, Nested namespace definition.
5440 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5441 __cpp_nested_namespace_definitions.
5443 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5445 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5447 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5449 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5451 * c-pragma.h (pragma_lex): Add optional loc argument.
5453 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5455 * c-format.c (check_format_arg): Adjust to use common block size in all
5458 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5460 * c-format.c (location_from_offset): Update for change in
5461 signature of location_get_source_line.
5462 * c-indentation.c (get_visual_column): Likewise.
5463 (line_contains_hash_if): Likewise.
5465 2015-09-14 Marek Polacek <polacek@redhat.com>
5467 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5468 setting various warnings.
5470 2015-09-14 Marek Polacek <polacek@redhat.com>
5472 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5475 2015-09-11 Mark Wielaard <mjw@redhat.com>
5478 * c.opt (Wunused-variable): Option from common.opt.
5479 (Wunused-const-variable): New option.
5481 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5484 * c.opt ([Wsubobject-linkage]): Add.
5486 2015-09-03 Martin Sebor <msebor@redhat.com>
5489 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5491 * c-common.c (reject_gcc_builtin): Define.
5493 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5496 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5498 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5499 cilk_gimplify_call_params_in_spawned_fn.
5500 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5501 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5504 2015-08-25 Marek Polacek <polacek@redhat.com>
5507 * c-common.c (handle_weak_attribute): Don't check whether the
5508 visibility can be changed here.
5510 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5512 * c-lex.c (c_lex_with_flags): Use explicit locations.
5514 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5516 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5517 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5519 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5522 * c-common.c (check_builtin_function_arguments): Add check
5523 for BUILT_IN_SIGNBIT argument.
5525 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5528 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5531 2015-08-17 Marek Polacek <polacek@redhat.com>
5533 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5534 with whitespaces before qualifier names.
5536 2015-08-12 Marek Polacek <polacek@redhat.com>
5539 * c-common.c (maybe_warn_shift_overflow): Properly handle
5540 left-shifting 1 into the sign bit.
5542 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5544 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5546 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5547 Braden Obrzut <admin@maniacsvault.net>
5548 Jason Merrill <jason@redhat.com>
5550 Add C++ Concepts TS support.
5551 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5552 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5553 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5554 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5555 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5556 * c.opt (fconcepts): New.
5558 2015-08-02 Martin Sebor <msebor@redhat.com>
5560 * c.opt (-Wframe-address): New warning option.
5562 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5564 * c-indentation.c (should_warn_for_misleading_indentation):
5567 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5569 * c-indentation.c (get_visual_column): Add parameter first_nws,
5570 use it. Update comment documenting the function.
5571 (is_first_nonwhitespace_on_line): Remove.
5572 (should_warn_for_misleading_indentation): Replace usage of
5573 of is_first_nonwhitespace_on_line with get_visual_column.
5575 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5577 * c-indentation.h (struct token_indent_info): Define.
5578 (get_token_indent_info): Define.
5579 (warn_for_misleading_information): Declare.
5580 * c-common.h (warn_for_misleading_information): Remove.
5581 * c-identation.c (warn_for_misleading_indentation):
5582 Change declaration to take three token_indent_infos. Adjust
5584 * c-identation.c (should_warn_for_misleading_indentation):
5585 Likewise. Bail out early if the body is a compound statement.
5586 (guard_tinfo_to_string): Define.
5588 2015-07-30 Jason Merrill <jason@redhat.com>
5590 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5591 '*' for reference decay.
5593 2015-07-30 Marek Polacek <polacek@redhat.com>
5595 * c-common.c (warn_tautological_cmp): Bail for float types.
5597 2015-07-27 Marek Polacek <polacek@redhat.com>
5600 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5602 2015-07-27 Marek Polacek <polacek@redhat.com>
5606 * c-common.c (find_array_ref_with_const_idx_r): New function.
5607 (warn_tautological_cmp): New function.
5608 * c-common.h (warn_tautological_cmp): Declare.
5609 * c.opt (Wtautological-compare): New option.
5611 2015-07-23 Marek Polacek <polacek@redhat.com>
5613 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5614 (ubsan_instrument_shift): Likewise.
5616 2015-07-23 Marek Polacek <polacek@redhat.com>
5619 * c-ubsan.c: Include gimplify.h.
5620 (ubsan_instrument_division): Unshare OP0 and OP1.
5621 (ubsan_instrument_shift): Likewise.
5623 2015-07-20 Marek Polacek <polacek@redhat.com>
5624 Richard Sandiford <richard.sandiford@arm.com>
5627 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5628 Use EXPR_LOC_OR_LOC.
5629 (maybe_warn_shift_overflow): New function.
5630 * c-common.h (maybe_warn_shift_overflow): Declare.
5631 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5632 * c.opt (Wshift-overflow): New option.
5634 2015-07-16 Martin Liska <mliska@suse.cz>
5636 * c-format.c (static void check_format_info_main): Use
5637 object_allocator instead of pool_allocator.
5638 (check_format_arg): Likewise.
5639 (check_format_info_main): Likewise.
5641 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
5643 * c-opts.c: Remove multiline #include comment.
5645 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
5647 * c-common.c: Fix double word typos.
5649 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5651 * c-ada-spec.h (cpp_operation): Revert latest change.
5652 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5653 constructors and destructors.
5655 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5657 * c-common.h: Adjust includes for flags.h changes.
5658 * stub-objc.c: Likewise.
5660 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5662 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5663 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5665 2015-07-08 Jakub Jelinek <jakub@redhat.com>
5667 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5668 are to be removed, return NULL rather than original clauses list.
5670 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5672 * array-notation-common.c: Adjust includes.
5673 * c-ada-spec.c: Likewise.
5674 * c-cilkplus.c: Likewise.
5675 * c-common.h: Likewise.
5676 * c-cppbuiltin.c: Likewise.
5677 * c-dump.c: Likewise.
5678 * c-format.c: Likewise.
5679 * c-gimplify.c: Likewise.
5680 * c-indentation.c: Likewise.
5681 * c-lex.c: Likewise.
5682 * c-omp.c: Likewise.
5683 * c-opts.c: Likewise.
5684 * c-pch.c: Likewise.
5685 * c-ppoutput.c: Likewise.
5686 * c-pragma.c: Likewise.
5687 * c-pretty-print.c: Likewise.
5688 * c-semantics.c: Likewise.
5689 * c-ubsan.c: Likewise.
5691 * stub-objc.c: Likewise.
5693 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5695 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5696 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5698 2015-07-01 Jason Merrill <jason@redhat.com>
5700 * c-common.h (D_CXX11): Rename from D_CXX0X.
5701 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5702 * c-common.c: Adjust.
5704 * c-opts.c (c_common_post_options): Default to C++14.
5706 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5708 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5710 Implement N4197 - Adding u8 character literals
5711 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
5713 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
5714 CPP_UTF8CHAR_USERDEF tokens.
5715 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
5716 and CPP_UTF8CHAR tokens.
5717 (lex_charconst): Treat CPP_UTF8CHAR token.
5719 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5722 * c-common.c (do_warn_unused_parameter): Move here.
5723 * c-common.h (do_warn_unused_parameter): Declare.
5725 2015-06-29 Marek Polacek <polacek@redhat.com>
5728 * c-common.c (check_case_bounds): Add bool * parameter. Set
5730 (c_add_case_label): Add bool * parameter. Pass it down to
5732 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5734 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5737 2015-06-27 Marek Polacek <polacek@redhat.com>
5739 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5740 or VECTOR_INTEGER_TYPE_P throughout.
5741 * c-gimplify.c: Likewise.
5743 2015-06-26 Marek Polacek <polacek@redhat.com>
5745 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5746 * c-common.c (c_fully_fold_internal): Likewise.
5747 (c_alignof_expr): Likewise.
5748 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5749 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
5750 * cilk.c (create_parm_list): Likewise.
5752 2015-06-26 Marek Polacek <polacek@redhat.com>
5754 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5756 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5758 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5759 * c-gimplify.c: Likewise.
5760 * c-pragma.c: Likewise.
5761 * c-ubsan.c: Likewise.
5764 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5766 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5769 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5771 * cilk.c: Move calls.h after tm.h in the include chain.
5773 2015-06-25 Marek Polacek <polacek@redhat.com>
5775 * array-notation-common.c: Use VAR_P throughout.
5776 * c-ada-spec.c: Likewise.
5777 * c-common.c: Likewise.
5778 * c-format.c: Likewise.
5779 * c-gimplify.c: Likewise.
5780 * c-omp.c: Likewise.
5781 * c-pragma.c: Likewise.
5782 * c-pretty-print.c: Likewise.
5785 2015-06-25 Marek Polacek <polacek@redhat.com>
5787 * cilk.c (extract_free_variables): Use is_global_var.
5789 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5791 * c-common.c: Don't include target-def.h.
5793 2015-06-23 Marek Polacek <polacek@redhat.com>
5795 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5796 when comparing INTEGER_CSTs.
5798 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5800 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5801 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5802 (dump_ada_template): Skip partially specialized types.
5804 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5806 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5809 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5811 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5812 * c-ada-spec.c: Likewise.
5813 * c-cilkplus.c: Likewise.
5814 * c-common.c: Likewise.
5815 * c-common.h: Likewise.
5816 * c-cppbuiltin.c: Likewise.
5817 * c-dump.c: Likewise.
5818 * c-format.c: Likewise.
5819 * c-gimplify.c: Likewise.
5820 * c-indentation.c: Likewise.
5821 * c-lex.c: Likewise.
5822 * c-omp.c: Likewise.
5823 * c-opts.c: Likewise.
5824 * c-pch.c: Likewise.
5825 * c-ppoutput.c: Likewise.
5826 * c-pragma.c: Likewise.
5827 * c-pretty-print.c: Likewise.
5828 * c-semantics.c: Likewise.
5829 * c-ubsan.c: Likewise.
5831 * stub-objc.c: Likewise.
5833 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5836 * c-common.c (c_common_truthvalue_conversion): Warn when
5837 converting an address of a reference to a truth value.
5839 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5841 * array-notation-common.c : Adjust include files.
5842 * c-ada-spec.c : Likewise.
5843 * c-cilkplus.c : Likewise.
5844 * c-common.c : Likewise.
5845 * c-common.h : Likewise.
5846 * c-cppbuiltin.c : Likewise.
5847 * c-dump.c : Likewise.
5848 * c-format.c : Likewise.
5849 * c-gimplify.c : Likewise.
5850 * c-indentation.c : Likewise.
5851 * c-lex.c : Likewise.
5852 * c-omp.c : Likewise.
5853 * c-opts.c : Likewise.
5854 * c-pch.c : Likewise.
5855 * c-ppoutput.c : Likewise.
5856 * c-pragma.c : Likewise.
5857 * c-pretty-print.c : Likewise.
5858 * c-semantics.c : Likewise.
5859 * c-ubsan.c : Likewise.
5860 * cilk.c : Likewise.
5861 * stub-objc.c : Likewise.
5863 2015-06-08 Marek Polacek <polacek@redhat.com>
5866 * c-format.c (location_from_offset): Return LOC if LINE is null.
5868 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5870 * c-common.h (c_parse_final_cleanups): New prototype.
5871 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5873 2015-06-04 Sriraman Tallam <tmsriram@google.com>
5875 * c-common.c (noplt): New attribute.
5876 (handle_noplt_attribute): New handler.
5878 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5880 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5881 * c-ada-spec.c: Likewise.
5882 * c-cilkplus.c: Likewise.
5883 * c-common.c: Likewise.
5884 * c-common.h: Likewise.
5885 * c-cppbuiltin.c: Likewise.
5886 * c-dump.c: Likewise.
5887 * c-format.c: Likewise.
5888 * c-gimplify.c: Likewise.
5889 * c-indentation.c: Likewise.
5890 * c-lex.c: Likewise.
5891 * c-omp.c: Likewise.
5892 * c-opts.c: Likewise.
5893 * c-pch.c: Likewise.
5894 * c-ppoutput.c: Likewise.
5895 * c-pragma.c: Likewise.
5896 * c-pretty-print.c: Likewise.
5897 * c-semantics.c: Likewise.
5898 * c-ubsan.c: Likewise.
5900 * stub-objc.c: Likewise.
5902 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5905 * c-indentation.c (should_warn_for_misleading_indentation): Use
5906 expand_location rather than expand_location_to_spelling_point.
5907 Don't warn if the guarding statement is more indented than the
5910 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5912 * c-indentation.c (warn_for_misleading_indentation): Bail out
5913 immediately if -Wmisleading-indentation isn't enabled.
5915 2015-06-01 Martin Liska <mliska@suse.cz>
5917 * c-format.c (check_format_arg):Use new type-based pool allocator.
5918 (check_format_info_main) Likewise.
5920 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5922 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5923 (has_nontrivial_methods): Likewise.
5925 2015-05-25 Marek Polacek <polacek@redhat.com>
5927 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5929 2015-05-22 Marek Polacek <polacek@redhat.com>
5932 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5934 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5936 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5937 STACK_GROWS_DOWNWARD.
5939 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5941 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5942 STACK_GROWS_DOWNWARD rather than if it is defined.
5944 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5947 * c-format.c (location_column_from_byte_offset): New.
5948 (location_from_offset): New.
5949 (struct format_wanted_type): Add offset_loc field.
5950 (check_format_info): Move handling of location for extra arguments
5951 closer to the point of warning.
5952 (check_format_info_main): Pass the result of location_from_offset
5954 (format_type_warning): Pass the result of location_from_offset
5957 2015-05-20 Marek Polacek <polacek@redhat.com>
5959 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5961 2015-05-20 Marek Polacek <polacek@redhat.com>
5963 * c-ada-spec.c (dump_sloc): Use DECL_P.
5965 2015-05-20 Marek Polacek <polacek@redhat.com>
5967 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5968 * c-common.c: Likewise.
5970 2015-05-19 David Malcolm <dmalcolm@redhat.com>
5972 * c-common.h (fe_file_change): Strengthen param from
5973 const line_map * to const line_map_ordinary *.
5974 (pp_file_change): Likewise.
5975 * c-lex.c (fe_file_change): Likewise.
5976 (cb_define): Use linemap_check_ordinary when invoking
5978 (cb_undef): Likewise.
5979 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5980 invoking cb_file_change.
5981 (c_finish_options): Likewise.
5982 (push_command_line_include): Likewise.
5983 (cb_file_change): Strengthen param "new_map" from
5984 const line_map * to const line_map_ordinary *.
5985 * c-ppoutput.c (cb_define): Likewise for local "map".
5986 (pp_file_change): Likewise for param "map" and local "from".
5988 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5990 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5992 2015-05-18 Tom de Vries <tom@codesourcery.com>
5994 * c-common.c (build_va_arg_1): New function.
5995 (build_va_arg): Add address operator to va_list operand if necessary.
5997 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6000 * c-common.c (int_safely_convertible_to_real_p): Define.
6001 (unsafe_conversion_p): Check conversions involving complex types.
6002 (conversion_warning): Add new warning message for conversions which
6003 discard imaginary component.
6004 * c-common.h: (enum conversion_safety): Add new enumerator for such
6007 2015-05-14 Marek Polacek <polacek@redhat.com>
6011 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6012 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6013 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6014 use it. If FOR_INT_CONST, require that all evaluated operands be
6017 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6019 * c-common.h (warn_for_misleading_indentation): New prototype.
6020 * c-indentation.c: New file.
6021 * c.opt (Wmisleading-indentation): New option.
6023 2015-05-12 Tom de Vries <tom@codesourcery.com>
6025 PR tree-optimization/66010
6026 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6028 2015-05-09 Jason Merrill <jason@redhat.com>
6030 * c-opts.c (c_common_post_options): Also clear
6031 cpp_opts->cpp_warn_cxx11_compat.
6033 * c-common.h (enum cxx_dialect): Add cxx_unset.
6034 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6035 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6037 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6038 (std=gnu++0x): Mark as Undocumented.
6039 (std=gnu++1y): Add deprecated message.
6041 2015-05-08 Jason Merrill <jason@redhat.com>
6043 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6046 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6048 2015-05-08 Marek Polacek <polacek@redhat.com>
6051 * c.opt (Woverride-init-side-effects): New option.
6053 2015-05-07 Marek Polacek <polacek@redhat.com>
6056 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6058 * c.opt (Wshift-negative-value): New option.
6059 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6060 when -Wextra and C99/C++11 mode.
6062 2015-05-07 Marek Polacek <polacek@redhat.com>
6063 Martin Uecker <uecker@eecs.berkeley.edu>
6065 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6066 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6068 2015-05-05 Jason Merrill <jason@redhat.com>
6070 * c.opt (Wterminate): New.
6072 2015-04-30 Marek Polacek <polacek@redhat.com>
6074 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6075 require that the non-constant be of a boolean type.
6077 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6079 * c-common.c (handle_section_attribute): Refactor to reduce
6080 nesting and distinguish between error cases.
6082 2015-04-29 Marek Polacek <polacek@redhat.com>
6085 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6088 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6090 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6091 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6092 HOST_BITS_PER_WIDE_INT.
6094 2015-04-28 Tom de Vries <tom@codesourcery.com>
6096 PR tree-optimization/65887
6097 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6099 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6100 Pierre-Marie de Rodat <derodat@adacore.com>
6102 * c-ada-spec.c (in_function): Delete.
6103 (dump_generic_ada_node): Do not change in_function and remove the
6104 redundant code dealing with it.
6105 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6106 (print_ada_methods): Output the static member functions in a nested
6107 package after the regular methods as well as associated renamings.
6109 2015-04-24 Marek Polacek <polacek@redhat.com>
6112 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6113 and OPT_Wshift_count_overflow.
6116 * c-common.c (warn_logical_operator): Warn if the operands have the
6119 2015-04-24 Marek Polacek <polacek@redhat.com>
6122 * c-common.c (warn_logical_operator): Bail if either operand comes
6123 from a macro expansion.
6125 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6128 * c-common.c (c_default_pointer_mode): Add definition.
6129 * c-common.h (c_default_pointer_mode): Add declaration.
6131 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6133 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6134 on record_builtin_type argument.
6136 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6139 * c-common.c (warn_logical_not_parentheses): Don't warn for
6142 2015-03-07 Marek Polacek <polacek@redhat.com>
6145 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6146 before trying to figure out whether we have a flexible array member.
6148 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6149 Jonathan Wakely <jwakely.gcc@gmail.com>
6151 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6153 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6156 * c-ada-spec.c (print_destructor): Remove obsolete code.
6158 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6160 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6161 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6162 DECL_TEMPLATE_RESULT emulations.
6163 (dump_ada_template)): Add guard for TYPE_METHODS.
6165 2015-02-27 Marek Polacek <polacek@redhat.com>
6168 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6170 2015-02-27 Kai Tietz <ktietz@redhat.com>
6173 * c-pragma.c (handle_pragma_weak): Do not try to create
6174 weak/alias of declarations not being function, or variable
6177 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6180 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6182 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6184 2015-02-16 Marek Polacek <polacek@redhat.com>
6187 * c-format.c (check_format_types): Handle null param.
6189 2015-02-13 Marek Polacek <polacek@redhat.com>
6192 * c-format.c (check_format_types): Don't warn about different
6193 signedness if the original value is in the range of WANTED_TYPE.
6195 2015-02-12 Jason Merrill <jason@redhat.com>
6198 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6199 to the current highest version.
6200 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6202 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6206 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6207 instead of RDIV_EXPR. Use build_binary_op instead of
6210 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6212 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6213 to pass input_location as first argument.
6215 2015-01-23 Tom de Vries <tom@codesourcery.com>
6218 * c.opt (fopenacc): Mark as LTO option.
6220 2015-01-23 Tom de Vries <tom@codesourcery.com>
6223 * c.opt (fopenmp): Mark as LTO option.
6225 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6228 * cilk.c (fill_decls_vec): Only put decls into vector v.
6229 (compare_decls): Fix up formatting.
6231 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6234 * cilk.c: Include vec.h.
6235 (struct cilk_decls): New structure.
6236 (wrapper_parm_cb): Split this function to...
6237 (fill_decls_vec): ...this...
6238 (create_parm_list): ...and this.
6239 (compare_decls): New function.
6240 (for_local_cb): Remove.
6241 (wrapper_local_cb): Ditto.
6242 (build_wrapper_type): For now first traverse and fill vector of
6243 declarations then sort it and then deal with sorted vector.
6244 (cilk_outline): Ditto.
6245 (declare_one_free_variable): Ditto.
6247 2015-01-21 Jason Merrill <jason@redhat.com>
6250 * c-format.c (check_format_arg): Call decl_constant_value.
6252 2015-01-19 Martin Liska <mliska@suse.cz>
6254 * c-common.c (handle_noicf_attribute): New function.
6256 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6257 Bernd Schmidt <bernds@codesourcery.com>
6258 James Norris <jnorris@codesourcery.com>
6259 Cesar Philippidis <cesar@codesourcery.com>
6260 Ilmir Usmanov <i.usmanov@samsung.com>
6261 Jakub Jelinek <jakub@redhat.com>
6263 * c.opt (fopenacc): New option.
6264 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6265 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6267 * c-common.h (c_finish_oacc_wait): New prototype.
6268 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6269 (c_finish_oacc_wait): New function.
6270 * c-pragma.c (oacc_pragmas): New variable.
6271 (c_pp_lookup_pragma, init_pragma): Handle it.
6272 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6273 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6274 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6275 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6276 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6277 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6278 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6279 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6280 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6281 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6282 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6283 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6284 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6285 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6286 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6287 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6288 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6289 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6290 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6291 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6292 PRAGMA_OACC_CLAUSE_WORKER.
6294 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6296 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6297 for the new option fstack-protector_explicit.
6298 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6299 (handle_stack_protect_attribute): New function.
6301 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6303 * c.opt: New option -Warray-bounds=.
6305 2015-01-09 Michael Collison <michael.collison@linaro.org>
6307 * array-notation-common.c: Include hash-set.h, machmode.h,
6308 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6309 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6310 * c-ada-spec.c: Ditto.
6311 * c-cilkplus.c: Ditto.
6312 * c-common.c: Include input.h due to flattening of tree.h.
6313 Define macro GCC_C_COMMON_C.
6314 * c-common.h: Flatten tree.h header files into c-common.h.
6315 Remove include of tree-core.h.
6316 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6317 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6318 fold-const.h, wide-int.h, and inchash.h due to
6319 flattening of tree.h.
6321 * c-format.c: Flatten tree.h header files into c-common.h.
6322 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6323 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6324 fold-const.h, wide-int.h, and inchash.h due to
6325 flattening of tree.h.
6326 * c-dump.c: Include hash-set.h, machmode.h,
6327 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6328 fold-const.h, wide-int.h, and inchash.h due to
6329 flattening of tree.h.
6330 * c-format.c: Include hash-set.h, machmode.h,
6331 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6332 fold-const.h, wide-int.h, inchash.h and real.h due to
6333 flattening of tree.h.
6334 * c-gimplify.c: Include hash-set.h, machmode.h,
6335 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6336 fold-const.h, wide-int.h, and inchash.h due to
6337 flattening of tree.h.
6343 * c-ppoutput.c: Ditto.
6344 * c-pragma.c: Ditto.
6345 * c-pretty-print.c: Ditto.
6346 * c-semantics.c: Ditto.
6348 * stub-objc.c: Ditto.
6350 2015-01-08 Jason Merrill <jason@redhat.com>
6352 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6353 do_ubsan_in_current_function.
6354 (ubsan_maybe_instrument_reference_or_call): Likewise.
6355 * c-ubsan.h: Declare it.
6357 2015-01-08 Mike Stump <mikestump@comcast.net>
6359 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6361 2015-01-07 Marek Polacek <polacek@redhat.com>
6364 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6365 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6367 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6370 * c.opt (Wsuggest-override): New option.
6372 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6374 Update copyright years.
6376 2015-01-05 Marek Polacek <polacek@redhat.com>
6379 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6381 * c-common.h (warn_array_subscript_with_type_char): Update
6384 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6386 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6387 Control macro with flag_sized_deallocation.
6389 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6391 * c.opt (Wdiscarded-array-qualifiers): New option.
6393 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6395 PR preprocessor/63831
6396 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6397 and __has_cpp_attribute here.
6398 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6399 c_common_has_attribute.
6400 * c-common.h (c_common_has_attribute): New prototype.
6401 * c-lex.c (init_c_lex): Set cb->has_attribute to
6402 c_common_has_attribute instead of cb_has_attribute.
6403 (get_token_no_padding): New function.
6404 (cb_has_attribute): Renamed to ...
6405 (c_common_has_attribute): ... this. No longer static. Use
6406 get_token_no_padding, require ()s, don't build TREE_LIST
6407 unnecessarily, fix up formatting, adjust diagnostics, call
6410 2014-12-15 Jason Merrill <jason@redhat.com>
6412 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6413 (-Wsized-deallocation): New.
6414 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6415 to on in C++14 and up.
6417 2014-12-11 Jason Merrill <jason@redhat.com>
6419 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6421 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6422 we aren't complaining about VLAs.
6424 2014-12-06 Marek Polacek <polacek@redhat.com>
6426 PR tree-optimization/64183
6427 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6428 shift-expression if it is integer_type_node. Use types_compatible_p.
6430 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6432 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6433 last argument from create_tmp_var_raw and create_tmp_var calls.
6434 * cilk.c (gimplify_cilk_spawn): Likewise.
6435 * c-omp.c (c_finish_omp_atomic): Likewise.
6437 2014-11-28 Marek Polacek <polacek@redhat.com>
6439 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6440 instead of unsigned_type_node.
6442 2014-11-28 Marek Polacek <polacek@redhat.com>
6445 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6447 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6448 expression to unsigned_type_node.
6450 2014-11-20 Mark Wielaard <mjw@redhat.com>
6453 * c-opts.c (set_std_c89): Set lang_hooks.name.
6454 (set_std_c99): Likewise.
6455 (set_std_c11): Likewise.
6456 (set_std_cxx98): Likewise.
6457 (set_std_cxx11): Likewise.
6458 (set_std_cxx14): Likewise.
6459 (set_std_cxx1z): Likewise.
6461 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6464 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6465 return type to bool.
6466 * c-common.c: Include gimple-expr.h.
6467 (convert_vector_to_pointer_for_subscript): Change return type to
6468 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6469 and copy it into a TARGET_EXPR and use that instead of *vecp
6472 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6474 Merger of git branch "gimple-classes-v2-option-3".
6475 * ChangeLog.gimple-classes: New.
6476 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6477 from being just a vec<gimple> to a vec<gbind *>.
6479 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6482 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6483 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6484 get_pointer_alignment for non-pointers. Use ptype, or if it is
6485 reference type, corresponding pointer type, as type of kind
6487 (ubsan_maybe_instrument_reference,
6488 ubsan_maybe_instrument_member_call): Adjust callers.
6490 2014-11-15 Marek Polacek <polacek@redhat.com>
6493 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6495 (extract_array_notation_exprs): Return for NULL node.
6497 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6499 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6500 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6502 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6505 * c-common.c (check_builtin_function_arguments): Handle
6506 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6508 2014-11-10 Andi Kleen <ak@linux.intel.com>
6511 * c-common.h (check_no_cilk): Declare.
6512 * cilk.c (get_error_location): New function.
6513 (check_no_cilk): Dito.
6515 2014-11-10 Andi Kleen <ak@linux.intel.com>
6517 * cilk.c (recognize_spawn): Use expression location
6520 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6522 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6524 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6526 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6527 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6528 (__cpp_range_based_for, __cpp_initializer_lists,
6529 __cpp_delegating_constructors, __cpp_nsdmi,
6530 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6531 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6532 __has_cpp_attribute.
6533 * c-lex.c (cb_has_attribute): New callback CPP function;
6534 (init_c_lex): Set has_attribute callback.
6536 2014-11-04 Richard Biener <rguenther@suse.de>
6538 * c-common.c (shorten_compare): Do not shorten mixed
6539 DFP and non-DFP compares.
6541 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6543 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6544 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6545 Commentary and rearrangement of tests.
6546 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6547 Commentary and rearrangement of tests.
6548 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
6549 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6551 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6553 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6554 enum from machine_mode.
6556 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6558 * c-common.c: Adjust include files.
6559 * c-gimplify.c: Ditto.
6561 * c-pragma.c: Ditto.
6564 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6566 * c-gimplify.c: Adjust include files.
6568 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6571 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6572 c_common_initialize_diagnostics.
6573 * c-common.h: Likewise.
6575 2014-10-24 Marek Polacek <polacek@redhat.com>
6578 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6579 print "struct"/"union"/"enum" for typedefed names.
6581 2014-10-23 Marek Polacek <polacek@redhat.com>
6583 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6586 2014-10-22 Jakub Jelinek <jakub@redhat.com>
6587 Yury Gribov <y.gribov@samsung.com>
6589 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6590 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6591 instead of flag_sanitize_recover as bool flag.
6593 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6595 * cilk.c: Revert previous change.
6597 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6600 * cilk.c: Include vec.h.
6601 (struct cilk_decls): New structure.
6602 (wrapper_parm_cb): Split this function to...
6603 (fill_decls_vec): ...this...
6604 (create_parm_list): ...and this.
6605 (compare_decls): New function.
6606 (for_local_cb): Remove.
6607 (wrapper_local_cb): Ditto.
6608 (build_wrapper_type): For now first traverse and fill vector of
6609 declarations then sort it and then deal with sorted vector.
6610 (cilk_outline): Ditto.
6611 (declare_one_free_variable): Ditto.
6613 2014-10-17 Marek Polacek <polacek@redhat.com>
6615 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6616 * c.opt (Wimplicit-int): Initialize to -1.
6618 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6620 * c-pragma.c: Adjust include files.
6621 * c-semantics.c: Likewise.
6623 2014-10-16 DJ Delorie <dj@redhat.com>
6625 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6628 2014-10-14 Jason Merrill <jason@redhat.com>
6631 * c-common.h (CPP_PREPARSED_EXPR): New.
6632 (N_CP_TTYPES): Adjust.
6634 2014-10-15 Marek Polacek <polacek@redhat.com>
6636 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6638 2014-10-14 DJ Delorie <dj@redhat.com>
6640 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6641 types, not just __int128.
6642 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6643 types, not just __int128.
6644 (cpp_atomic_builtins): Round pointer sizes up.
6645 (type_suffix): Use type precision, not specific types.
6646 * c-common.c (c_common_reswords): Remove __int128 special case.
6647 (c_common_type_for_size): Check for all __intN types, not just
6649 (c_common_type_for_mode): Likewise.
6650 (c_common_signed_or_unsigned_type): Likewise.
6651 (c_build_bitfield_integer_type): Likewise.
6652 (c_common_nodes_and_builtins): Likewise.
6653 (keyword_begins_type_specifier): Likewise.
6654 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6657 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6659 * c-common.c: Use hash_table instead of hashtab.
6661 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6663 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
6666 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
6671 * c-common.c (warn_logical_operator): Punt for vectors.
6673 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6675 Implement SD-6: SG10 Feature Test Recommendations
6676 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6677 macros and the __has_header macro.
6679 2014-09-30 Jason Merrill <jason@redhat.com>
6681 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6682 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6683 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6685 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6686 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6688 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6689 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6691 2014-09-24 Marek Polacek <polacek@redhat.com>
6695 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6697 2014-09-23 Andi Kleen <ak@linux.intel.com>
6699 * c-common.c (handle_no_reorder_attribute): New function.
6700 (c_common_attribute_table): Add no_reorder attribute.
6702 2014-09-22 Joseph Myers <joseph@codesourcery.com>
6704 * c-cppbuiltin.c (c_cpp_builtins): Define
6705 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6708 2014-09-18 Joseph Myers <joseph@codesourcery.com>
6710 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6711 for supported floating-point modes.
6713 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6715 * c.opt (Wpsabi): Use LangEnabledBy.
6716 * c-opts.c (c_common_handle_option): Do not handle here.
6718 2014-09-12 Joseph Myers <joseph@codesourcery.com>
6720 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6721 macros for floating-point modes.
6723 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
6726 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6727 __*_DENORM_MIN__ without denormals.
6729 2014-09-10 Jakub Jelinek <jakub@redhat.com>
6731 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6732 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6733 ubsan_create_data callers.
6734 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6735 index is constant or BIT_AND_EXPR with constant mask and is
6736 small enough for the bound.
6737 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6738 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6740 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6742 * c.opt: Add CppReason to various flags.
6743 (Wdate-time): Re-sort.
6744 * c-common.c: Include c-common.h earlier.
6745 (struct reason_option_codes_t): Delete.
6746 (c_option_controlling_cpp_error): Prefix global type and struct
6749 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6751 * c.opt (Wnormalized): New.
6752 (Wnormalized=): Use Enum and Reject Negative.
6753 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6755 2014-09-08 Joseph Myers <joseph@codesourcery.com>
6757 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6758 digits of floating-point modes if -fbuilding-libgcc.
6760 2014-09-05 Joseph Myers <joseph@codesourcery.com>
6762 * c-cppbuiltin.c (c_cpp_builtins): Also define
6763 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6764 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6765 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6766 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6767 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6768 __LIBGCC_STACK_GROWS_DOWNWARD__,
6769 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6770 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6771 __LIBGCC_DWARF_FRAME_REGISTERS__,
6772 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6773 __LIBGCC_STACK_POINTER_REGNUM__ and
6774 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6775 (builtin_define_with_value): Handle backslash-escaping in string
6778 2014-09-05 Richard Biener <rguenther@suse.de>
6781 * c-format.c (check_format_arg): Properly handle
6782 effectively signed POINTER_PLUS_EXPR offset.
6784 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6786 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6787 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6788 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6790 * c-opts.c (c_common_handle_option): Do not handle here.
6791 (sanitize_cpp_opts): Likewise.
6792 * c-common.c (struct reason_option_codes_t): Handle
6793 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6795 2014-09-03 Marek Polacek <polacek@redhat.com>
6797 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6799 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6800 Balaji V. Iyer <balaji.v.iyer@intel.com>
6801 Igor Zamyatin <igor.zamyatin@intel.com>
6803 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6804 * c-common.c (c_common_reswords): Added _Cilk_for.
6805 * c-common.h (enum rid): Added RID_CILK_FOR.
6806 (cilk_for_number_of_iterations): Add declaration.
6807 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6809 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6810 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6812 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6814 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6815 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6816 Wundef): Use CPP, Var and Init.
6817 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6819 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6821 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6822 * c-opts.c (c_common_handle_option): Do not handle here.
6824 2014-08-25 Jason Merrill <jason@redhat.com>
6826 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6827 -std=c++14 and -std=gnu++14, rather than the reverse.
6828 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6829 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6830 * c-common.h (cxx_dialect): Remove cxx1y.
6832 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6834 * c-common.h (enum cxx_dialect): Add cxx14.
6835 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6836 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6837 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6839 2014-08-22 Jason Merrill <jason@redhat.com>
6841 * c.opt (std=gnu++17): Fix alias.
6843 2014-08-22 Marek Polacek <polacek@redhat.com>
6846 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6847 check for vector types. Drop LHS argument.
6848 * c-common.h (warn_logical_not_parentheses): Adjust.
6850 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6852 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6853 (Wmultichar): Likewise.
6854 (Wdate-time): Use C-family languages instead of Common. Use CPP
6856 * c-opts.c (c_common_handle_option): Do not handle the above
6858 (sanitize_cpp_opts): Likewise.
6860 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6863 * c-opts.c: Include tree-diagnostics.h.
6864 (c_diagnostic_finalizer): New.
6865 (c_common_initialize_diagnostics): Use it.
6867 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6869 PR preprocessor/51303
6870 * c-common.c (struct reason_option_codes_t option_codes):
6871 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6873 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6877 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6878 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6879 (c_common_post_options): Call init_global_opts_from_cpp.
6880 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6882 2014-08-19 Marek Polacek <polacek@redhat.com>
6885 * c-common.c (maybe_warn_bool_compare): New function.
6886 * c-common.h (maybe_warn_bool_compare): Declare.
6887 * c.opt (Wbool-compare): New option.
6889 2014-08-19 Marek Polacek <polacek@redhat.com>
6891 * c.opt (Wc99-c11-compat): New option.
6893 2014-08-19 Marek Polacek <polacek@redhat.com>
6895 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6896 to warn_c90_c99_compat.
6897 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6900 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6901 Steven Bosscher <steven@gcc.gnu.org>
6904 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6905 format_check_results.
6906 (check_function_format): Use true and add comment for boolean
6908 (finish_dollar_format_checking): Use explicit location when warning.
6909 (check_format_info): Likewise.
6910 (check_format_arg): Set extra_arg_loc and format_string_loc.
6911 (check_format_info_main): Use explicit location when warning.
6912 (check_format_types): Pass explicit location.
6913 (format_type_warning): Likewise.
6915 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6918 * c-format.c: Handle Fortran flags.
6920 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6923 * array-notation-common.c (find_rank): Added handling for other
6924 types of references.
6926 2014-08-10 Marek Polacek <polacek@redhat.com>
6929 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6930 * c.opt (Wc90-c99-compat): Add option.
6932 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6934 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6936 2014-08-03 Marek Polacek <polacek@redhat.com>
6938 * c-common.c (check_case_value): Add location_t parameter. Use it.
6939 (c_add_case_label): Pass loc to check_case_value.
6941 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6943 * cilk.c: Use hash_map instead of pointer_map.
6945 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6947 * c-gimplify.c: Use hash_set instead of pointer_set.
6949 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6952 * array-notation-common.c (extract_array_notation_exprs): Handling
6955 2014-08-01 Jakub Jelinek <jakub@redhat.com>
6957 * c-common.h (min_align_of_type): Removed prototype.
6958 * c-common.c (min_align_of_type): Removed.
6959 * c-ubsan.h (ubsan_maybe_instrument_reference,
6960 ubsan_maybe_instrument_member_call): New prototypes.
6961 * c-ubsan.c: Include stor-layout.h and builtins.h.
6962 (ubsan_maybe_instrument_reference_or_call,
6963 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6966 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6969 * c.opt (-Wreturn-local-addr): Move to common.opt.
6971 2014-07-30 Jason Merrill <jason@redhat.com>
6976 * c.opt (-fuse-all-virtuals): New.
6978 2014-07-30 Tom Tromey <tromey@redhat.com>
6981 * c.opt (Wdesignated-init): New option.
6982 * c-common.c (c_common_attribute_table): Add "designated_init".
6983 (handle_designated_init): New function.
6985 2014-07-24 Marek Polacek <polacek@redhat.com>
6988 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6990 2014-07-16 Dodji Seketeli <dodji@redhat.com>
6992 PR preprocessor/60723 - missing system-ness marks for macro tokens
6993 * c-ppoutput.c (struct print::prev_was_system_token): New data
6995 (init_pp_output): Initialize it.
6996 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6997 (do_line_change): Return a flag saying if a line marker was
6999 (scan_translation_unit): Detect if the system-ness of the token we
7000 are about to emit is different from the one of the previously
7001 emitted token. If so, emit a line marker. Avoid emitting useless
7002 adjacent line markers. Avoid emitting line markers for tokens
7003 originating from the expansion of built-in macros.
7004 (scan_translation_unit_directives_only): Adjust.
7006 2014-07-15 Marek Polacek <polacek@redhat.com>
7008 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7009 TYPE_MAX_VALUE is NULL.
7011 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7014 * c.opt (Wmemset-transposed-args): New warning.
7016 2014-07-10 Jason Merrill <jason@redhat.com>
7020 * c.opt (-fuse-all-virtuals): New.
7022 2014-07-09 Richard Biener <rguenther@suse.de>
7025 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7026 using unsigned arithmetic if overflow does not wrap instead of
7027 if overflow is undefined.
7029 2014-07-06 Marek Polacek <polacek@redhat.com>
7032 * c.opt (Wsizeof-array-argument): New option.
7034 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7036 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7037 comments->count <= 1, as comments->entries might be NULL.
7039 2014-07-01 Marek Polacek <polacek@redhat.com>
7041 * c.opt (Wint-conversion): New option.
7043 2014-07-01 Marek Polacek <polacek@redhat.com>
7046 * c.opt (Wincompatible-pointer-types): New option.
7048 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7051 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7052 Do not discard TYPE_QUALS of type.
7054 2014-06-26 Jason Merrill <jason@redhat.com>
7056 * c-common.h (enum cxx_dialect): Add cxx1z.
7057 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7058 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7060 2014-06-26 Teresa Johnson <tejohnson@google.com>
7062 * c-common.h (get_dump_info): Declare.
7063 * c-gimplify.c (c_genericize): Use saved dump files.
7064 * c-opts.c (c_common_parse_file): Begin and end dumps
7065 once around parsing invocation.
7066 (get_dump_info): New function.
7068 2014-06-23 Marek Polacek <polacek@redhat.com>
7069 Andrew MacLeod <amacleod@redhat.com>
7072 * c-common.c (get_atomic_generic_size): Don't segfault if the
7073 type doesn't have a size.
7075 2014-06-20 Marek Polacek <polacek@redhat.com>
7077 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7078 (ubsan_walk_array_refs_r): New function.
7079 (c_genericize): Instrument array bounds.
7080 * c-ubsan.c: Include "internal-fn.h".
7081 (ubsan_instrument_division): Mark instrumented arrays as having
7082 side effects. Adjust ubsan_type_descriptor call.
7083 (ubsan_instrument_shift): Likewise.
7084 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7085 (ubsan_instrument_bounds): New function.
7086 (ubsan_array_ref_instrumented_p): New function.
7087 (ubsan_maybe_instrument_array_ref): New function.
7088 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7089 (ubsan_array_ref_instrumented_p): Declare.
7090 (ubsan_maybe_instrument_array_ref): Declare.
7092 2014-06-20 Hale Wang <hale.wang@arm.com>
7095 * c.opt (fshort-enums): Add to LTO.
7096 * c.opt (fshort-wchar): Likewise.
7098 2014-06-16 Marek Polacek <polacek@redhat.com>
7101 * c.opt (Wswitch-bool): Add Var.
7103 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7106 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7107 #pragma omp target teams or
7108 #pragma omp {,target }teams distribute simd.
7110 2014-06-12 Jason Merrill <jason@redhat.com>
7112 * c.opt (Wabi=, fabi-compat-version): New.
7113 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7114 (c_common_post_options): Handle flag_abi_compat_version default.
7115 Disallow -fabi-compat-version=1.
7116 * c-common.h (abi_version_crosses): New.
7118 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7120 * c-common.c (handle_section_attribute): Update handling for
7121 section names that are no longer trees.
7123 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7126 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7127 (omp_pragmas): ... back here.
7129 2014-06-05 Marek Polacek <polacek@redhat.com>
7132 * c-common.c (warn_logical_not_parentheses): New function.
7133 * c-common.h (warn_logical_not_parentheses): Declare.
7134 * c.opt (Wlogical-not-parentheses): New option.
7136 2014-06-04 Marek Polacek <polacek@redhat.com>
7139 * c-common.c (check_case_bounds): Add location parameter.
7141 (c_add_case_label): Pass loc to check_case_bounds.
7143 2014-06-03 Marek Polacek <polacek@redhat.com>
7146 * c.opt (Wswitch-bool): New option.
7148 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7150 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7152 (record_types_used_by_current_var_decl): Move prototype to where
7155 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7156 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7157 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7159 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7161 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7162 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7164 * c-pretty-print.c (pp_c_void_constant): New function.
7165 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7166 (c_pretty_printer::expression): Handle VOID_CST.
7167 * cilk.c (extract_free_variables): Likewise.
7168 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7169 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7171 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7173 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7174 * c-pragma.c (push_alignment): Adjust.
7175 (handle_pragma_push_options): Likewise.
7177 2014-05-09 Marek Polacek <polacek@redhat.com>
7180 * c-common.c (check_user_alignment): Return -1 if alignment is error
7182 (handle_aligned_attribute): Don't call default_conversion on
7184 (handle_vector_size_attribute): Likewise.
7185 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7186 (handle_sentinel_attribute): Call default_conversion and allow even
7187 integral types as an argument.
7189 2014-05-08 Marek Polacek <polacek@redhat.com>
7192 * c-common.c (min_align_of_type): New function factored out from...
7193 (c_sizeof_or_alignof_type): ...here.
7194 * c-common.h (min_align_of_type): Declare.
7196 2014-05-08 Marek Polacek <polacek@redhat.com>
7199 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7200 parameter type of main.
7202 2014-05-07 DJ Delorie <dj@redhat.com>
7204 * c-cppbuiltin.c (print_bits_of_hex): New.
7205 (builtin_define_type_minmax): Print values using hex so as not to
7206 require a pre-computed list of string values.
7208 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7209 Mike Stump <mikestump@comcast.net>
7210 Richard Sandiford <rdsandiford@googlemail.com>
7212 * c-ada-spec.c: Include wide-int.h.
7213 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7214 (dump_generic_ada_node): Use wide-int interfaces.
7215 * c-common.c: Include wide-int-print.h.
7216 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7217 (pointer_int_sum): Use wide-int interfaces.
7218 (c_common_nodes_and_builtins): Use make_int_cst.
7219 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7220 (handle_alloc_size_attribute): Use wide-int interfaces.
7221 (get_nonnull_operand): Likewise.
7222 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7223 * c-lex.c: Include wide-int.h.
7224 (narrowest_unsigned_type): Take a widest_int rather than two
7226 (narrowest_signed_type): Likewise.
7227 (interpret_integer): Update accordingly. Use wide-int interfaces.
7228 (lex_charconst): Use wide-int interfaces.
7229 * c-pretty-print.c: Include wide-int.h.
7230 (pp_c_integer_constant): Use wide-int interfaces.
7231 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7232 INT_CST_LT_UNSIGNED.
7234 2014-05-06 Richard Biener <rguenther@suse.de>
7236 * c-opts.c (c_common_post_options): For -freestanding,
7237 -fno-hosted and -fno-builtin disable pattern recognition
7238 if not enabled explicitely.
7240 2014-05-02 Marek Polacek <polacek@redhat.com>
7242 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7244 2014-05-01 Marek Polacek <polacek@redhat.com>
7247 * c.opt (Wdiscarded-qualifiers): Add.
7249 2014-04-30 Marek Polacek <polacek@redhat.com>
7251 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7252 INT_MIN / -1 sanitization only for integer types.
7254 2014-04-25 Marek Polacek <polacek@redhat.com>
7257 * c-common.c (handle_noinline_attribute): Warn if the attribute
7258 conflicts with always_inline attribute.
7259 (handle_always_inline_attribute): Warn if the attribute conflicts
7260 with noinline attribute.
7262 2014-04-25 Marek Polacek <polacek@redhat.com>
7265 * c-common.c (check_main_parameter_types): Warn about variadic main.
7267 2014-04-24 Mike Stump <mikestump@comcast.net>
7269 * c.opt (Wshadow-ivar): Default to on.
7271 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7273 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7275 2014-04-23 Marek Polacek <polacek@redhat.com>
7277 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7279 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7282 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7283 if flag_sanitize_undefined_trap_on_error.
7284 (ubsan_instrument_division, ubsan_instrument_shift,
7285 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7286 if !flag_sanitize_recover.
7288 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7291 * c-common.c (registered_builtin_types): Make non-static.
7292 * c-common.h (registered_builtin_types): Declare.
7294 2014-04-14 Richard Biener <rguenther@suse.de>
7295 Marc Glisse <marc.glisse@inria.fr>
7298 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7299 apply may-alias the scalar pointer type when applicable.
7301 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7304 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7305 as possible argument for Cilk_spawn.
7307 2014-04-11 Tobias Burnus <burnus@net-b.de>
7310 * c.opt (Wformat-signedness): Add
7311 * c-format.c(check_format_types): Use it.
7313 2014-04-11 Jason Merrill <jason@redhat.com>
7316 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7317 default_conversion for an array argument.
7319 2014-04-08 Marek Polacek <polacek@redhat.com>
7322 * c-ubsan.c: Include asan.h.
7323 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7325 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7327 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7329 2014-04-02 Marek Polacek <polacek@redhat.com>
7331 * c-common.h (c_expand_expr): Remove declaration.
7333 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7336 * c-common.c (add_atomic_size_parameter): When creating new
7337 params vector, push the size argument first.
7339 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7341 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7342 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7343 ubsan_create_data callers.
7345 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7348 * c-opts.c (c_finish_options): Restore cb_file_change call to
7351 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7354 * c-pragma.c (apply_pragma_weak): Only look at
7355 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7356 DECL_ASSEMBLER_NAME_SET_P (decl).
7357 (maybe_apply_pending_pragma_weaks): Exit early if
7358 vec_safe_is_empty (pending_weaks) rather than only when
7360 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7361 set assembler name back to NULL afterwards.
7363 2014-03-11 Jason Merrill <jason@redhat.com>
7365 * c.opt: Add -std=gnu++14.
7367 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7369 * c-opts.c (c_common_post_options): Don't override
7370 -ffp-contract=fast if unsafe-math-optimizations is on.
7372 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7374 * c.opt: Enable LTO FE for fshort-double.
7376 2014-03-07 Jason Merrill <jason@redhat.com>
7378 * c.opt: Add -std=c++14.
7380 2014-03-06 Marek Polacek <polacek@redhat.com>
7383 * cilk.c (contains_cilk_spawn_stmt): New function.
7384 (contains_cilk_spawn_stmt_walker): Likewise.
7385 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7386 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7388 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7390 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7391 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7392 even when flag_preprocess_only.
7394 2014-02-26 Jason Merrill <jason@redhat.com>
7398 * c-common.c (shorten_compare): Don't check
7399 c_inhibit_evaluation_warnings.
7401 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7404 * c-common.c (c_common_nodes_and_builtins): When initializing
7405 c_uint{16,32,64}_type_node, also set corresponding
7406 uint{16,32,64}_type_node to the same value.
7409 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7410 for PRAGMA_IVDEP if flag_preprocess_only.
7412 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7415 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7416 if false, add ADD itself, rather than vice versa.
7417 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7418 copy. For SAVE_EXPR, only call merge_tlist once.
7420 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7423 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7425 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7427 (c_common_attribute_table): Add alloc_align and assume_aligned
7430 2014-02-06 Marek Polacek <polacek@redhat.com>
7433 * c-common.c (warn_for_sign_compare): Call warning_at with location
7436 2014-02-05 Marek Polacek <polacek@redhat.com>
7439 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7442 2014-02-04 Marek Polacek <polacek@redhat.com>
7445 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7448 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7452 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7453 handle_vector_size_attribute, handle_nonnull_attribute): Call
7454 default_conversion on the attribute argument.
7455 (handle_nonnull_attribute): Increment the argument number.
7457 2014-01-31 Marek Polacek <polacek@redhat.com>
7460 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7461 build_function_call_vec.
7462 (resolve_overloaded_builtin): Likewise.
7463 * c-common.h (build_function_call_vec): Adjust declaration.
7465 2014-01-30 Marek Polacek <polacek@redhat.com>
7468 * c-common.h (unsafe_conversion_p): Adjust declaration.
7469 (warnings_for_convert_and_check): Likewise.
7470 (convert_and_check): Likewise.
7471 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7472 expansion_point_location_if_in_system_header on it.
7473 (warnings_for_convert_and_check): Add location parameter. Call
7474 expansion_point_location_if_in_system_header on it. Use it.
7475 (convert_and_check): Add location parameter. Use it.
7476 (conversion_warning): Likewise.
7477 (c_add_case_label): Adjust convert_and_check calls.
7478 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7480 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7482 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7484 * c-pragma.c (init_pragma): Likewise.
7487 2014-01-23 Marek Polacek <polacek@redhat.com>
7490 * c-common.c (shorten_compare): Add location_t parameter.
7491 * c-common.h (shorten_binary_op): Adjust declaration.
7493 2014-01-23 Marek Polacek <polacek@redhat.com>
7496 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7497 * c-common.h: Declare it.
7499 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7501 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7502 * c-ada-spec.c (dump_ads): Likewise.
7503 (cpp_check): Likewise.
7504 (dump_ada_specs): Likewise.
7506 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7509 * c-common.c (handle_no_instrument_function_attribute): Allow
7510 no_instrument_function attribute in class member
7511 definition/declaration.
7513 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7516 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7517 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7518 being COMPOUND_EXPR.
7519 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7520 operand a SAVE_EXPR and second MODIFY_EXPR.
7522 2014-01-09 Jakub Jelinek <jakub@redhat.com>
7525 * c-pch.c (c_common_write_pch): Call
7526 prepare_target_option_nodes_for_pch.
7528 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7530 Update copyright years
7532 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7534 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7535 the copyright notice.
7537 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7539 * c-ada-spec.c (print_constructor): New function.
7540 (print_destructor): Retrieve the origin of the destructor.
7541 (print_ada_declaration): Revamp handling of constructors/destructors.
7543 2013-12-23 Stuart Hastings <stuart@apple.com>
7544 Bill Maddox <maddox@google.com>
7545 Jason Merrill <jason@redhat.com>
7547 * c.opt: Add -fdeclone-ctor-dtor.
7548 * c-opts.c (c_common_post_options): Default to on iff -Os.
7550 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7552 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7554 * c-pragma.h (enum pragma_cilk_clause): Remove.
7555 (enum pragma_omp_clause): Added the following fields:
7556 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7557 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7558 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7559 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7560 PRAGMA_CILK_CLAUSE_UNIFORM.
7563 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7565 * cilk.c (cilk_outline): Made this function non-static.
7566 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7567 (create_cilk_wrapper): Added a new parameter: a function pointer.
7568 (c_install_body_w_frame_cleanup): Remove
7569 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7570 * c-common.h (cilk_outline): New prototype.
7571 (gimplify_cilk_spawn): Removed two parameters.
7572 (cilk_install_body_with_frame_cleanup): New prototype.
7573 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7574 CILK_SPAWN_STMT case.
7576 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7578 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7580 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7581 (int_array_type_node): Remove.
7582 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7584 2013-12-05 Marek Polacek <polacek@redhat.com>
7587 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7588 [ADJUST_FIELD_ALIGN].
7590 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7593 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7594 and check field alignment if set.
7595 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7596 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7598 2013-12-04 Jakub Jelinek <jakub@redhat.com>
7599 Marek Polacek <polacek@redhat.com>
7601 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7602 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7604 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7607 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7610 2013-11-29 Jakub Jelinek <jakub@redhat.com>
7613 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7614 goto invalid. If it is error_mark_node, don't issue further
7617 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7619 * c.opt (Wopenmp-simd): New.
7621 2013-11-22 Jakub Jelinek <jakub@redhat.com>
7623 * c-ubsan.h (ubsan_instrument_return): New prototype.
7624 * c-ubsan.c (ubsan_instrument_return): New function.
7626 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7628 * c-common.c: Add required include files from gimple.h.
7629 * c-gimplify.c: Likewise.
7632 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7634 * c-common.c (unsafe_conversion_p): Remove use of
7635 EXPR_LOC_OR_HERE macro.
7636 (conversion_warning): Likewise.
7637 (warnings_for_convert_and_check): Likewise.
7638 (warn_for_collisions_1): Likewise.
7639 (shorten_compare): Likewise, and remove use of in_system_header
7640 macro, using the location from the former.
7641 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7642 (cb_def_pragma): Remove use of in_system_header macro.
7643 (lex_string): Likewise.
7644 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7646 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7647 Mike Stump <mikestump@comcast.net>
7648 Richard Sandiford <rdsandiford@googlemail.com>
7650 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7651 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7652 tree_fits_shwi_p or tree_fits_uhwi_p.
7653 (dump_generic_ada_node): Likewise.
7654 * c-format.c (check_format_arg): Likewise.
7655 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7657 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7659 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7661 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7664 * c-common.c (unsafe_conversion_p): Make this function
7665 return an enumeration with more detail.
7666 (conversion_warning): Use the new return type of
7667 unsafe_conversion_p to separately warn either about conversions
7668 that lower floating point number precision or about the other
7669 kinds of conversions.
7670 * c-common.h (enum conversion_safety): New enumeration.
7671 (unsafe_conversion_p): switching return type to
7672 conversion_safety enumeration.
7673 * c.opt: Adding new warning -Wfloat-conversion and
7674 enabling it with -Wconversion.
7676 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7678 * c-opts.c: Include plugin.h.
7679 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
7681 2013-11-19 Marek Polacek <polacek@redhat.com>
7683 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7685 (ubsan_instrument_shift): Likewise.
7686 (ubsan_instrument_vla): Likewise.
7688 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7690 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7691 cast to unsigned type.
7693 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7695 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7697 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7698 rather than tree_low_cst.
7700 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7702 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7703 tree_to_uhwi throughout.
7705 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7707 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7708 tree_low_cst (..., 0) with tree_to_shwi throughout.
7710 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7712 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7713 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7715 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7717 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7718 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7720 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7722 * c-cilkplus.c: New file.
7723 * c-common.c (readonly_error): Add location argument.
7724 * c-common.h (readonly_error): Same.
7725 (c_finish_cilk_clauses): Protoize.
7726 (c_check_cilk_loop): Same.
7727 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7728 Do not fail on error_mark_node.
7729 Abstract increment canonicalization to here...
7730 (c_omp_for_incr_canonicalize_ptr): New.
7731 c-pragma.c (init_pragma): Register "simd" pragma.
7732 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7733 (enum pragma_cilk_clause): New.
7735 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7737 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7738 wchar_type and host_integerp checks.
7740 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7742 * c-common.c: Likewise.
7743 * c-gimplify.c: Likewise.
7746 2013-11-14 Diego Novillo <dnovillo@google.com>
7748 * c-common.c: Include fold-const.h.
7749 Include stor-layout.h.
7751 Include stringpool.h.
7754 Include trans-mem.h.
7755 * c-cppbuiltin.c: Include stor-layout.h.
7756 Include stringpool.h.
7757 * c-format.c: Include stringpool.h.
7758 * c-lex.c: Include stringpool.h.
7759 Include stor-layout.h.
7760 * c-pragma.c: Include stringpool.h.
7763 Include gcc-symtab.h.
7764 * c-pretty-print.c: Include stor-layout.h.
7766 * cilk.c: Include stringpool.h.
7769 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7771 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7772 * c-common.c (c_common_reswords): Add __auto_type.
7773 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7775 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7777 * c-common.c: Include gimplify.h.
7778 * c-gimplify.c: Likewise.
7780 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7781 * c-ubsan.c: Don't include gimple.h.
7783 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7785 * c-common.c (c_common_reswords): Add _Thread_local.
7787 2013-11-09 Joseph Myers <joseph@codesourcery.com>
7789 * c-common.c (atomic_size_supported_p): New function.
7790 (resolve_overloaded_atomic_exchange)
7791 (resolve_overloaded_atomic_compare_exchange)
7792 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7793 Use it instead of comparing size with a local list of sizes.
7795 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
7796 Joseph Myers <joseph@codesourcery.com>
7798 * c-common.h (enum rid): Add RID_ATOMIC.
7799 * c-common.c (c_common_reswords): Add _Atomic.
7800 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7801 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7802 * c-format.c (check_format_types): Check for extra _Atomic
7803 qualifiers in format argument.
7804 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7805 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7807 2013-11-06 Tobias Burnus <burnus@net-b.de>
7809 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7811 2013-11-06 Joseph Myers <joseph@codesourcery.com>
7813 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7815 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7816 to mean lack of IEEE 754 support.
7818 2013-11-05 Tobias Burnus <burnus@net-b.de>
7820 * c.opt (-Wdate-time): New option
7821 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7823 2013-11-05 Joseph Myers <joseph@codesourcery.com>
7825 * c-cppbuiltin.c (cpp_iec_559_value): Test
7826 flag_excess_precision_cmdline not flag_excess_precision.
7828 2013-11-05 Tobias Burnus <burnus@net-b.de>
7830 * c.opt (fopenmp-simd): New option.
7831 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7832 (omp_pragmas): ... this new struct.
7833 (c_pp_lookup_pragma): Also walk omp_pragmas.
7834 (init_pragma): Init pragmas for -fopenmp-simd.
7836 2013-11-04 Marek Polacek <polacek@redhat.com>
7839 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7841 2013-11-04 Joseph Myers <joseph@codesourcery.com>
7843 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7845 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7847 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7849 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7850 (dump_ada_specs): Adjust prototype of second callback.
7851 * c-ada-spec.c (cpp_check): New global variable.
7852 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7853 (print_generic_ada_decl): Likewise.
7854 (has_static_fields): Change return type to bool and add guard.
7855 (has_nontrivial_methods): New predicate.
7856 (is_tagged_type): Change return type to bool.
7857 (separate_class_package): Call has_nontrivial_methods.
7858 (pp_ada_tree_identifier): Minor tweaks.
7859 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7860 (dump_ada_array_domains): Likewise.
7861 (dump_ada_array_type): Likewise.
7862 (dump_template_types): Remove cpp_check parameter and do not pass it to
7863 dump_generic_ada_node.
7864 (dump_ada_template): Likewise.
7865 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7867 (print_ada_methods): Change return type to integer. Remove cpp_check
7868 parameter and do not pass it down.
7869 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7870 dump_generic_ada_node.
7871 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7873 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7874 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7875 value of print_ada_methods.
7876 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7877 Set cpp_check to it before invoking dump_ada_nodes.
7878 (dump_ada_specs): Likewise.
7880 2013-11-03 Marek Polacek <polacek@redhat.com>
7882 * c-ubsan.c: Don't include hash-table.h.
7883 (ubsan_instrument_vla): New function.
7884 * c-ubsan.h: Declare it.
7886 2013-10-31 David Malcolm <dmalcolm@redhat.com>
7888 Automated part of renaming of symtab_node_base to symtab_node.
7890 Patch autogenerated by rename_symtab.py from
7891 https://github.com/davidmalcolm/gcc-refactoring-scripts
7892 revision 58bb219cc090b2f4516a9297d868c245495ee622
7894 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7895 symtab_node_base to symtab_node.
7897 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7899 Implement C++14 digit separators.
7900 * c-lex.c (interpret_float): Remove digit separators from scratch string
7901 before building real literal.
7903 2013-10-30 Jakub Jelinek <jakub@redhat.com>
7905 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7907 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7909 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7911 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7913 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7914 (insert_cilk_frame): New prototype.
7915 (cilk_init_builtins): Likewise.
7916 (gimplify_cilk_spawn): Likewise.
7917 (c_cilk_install_body_w_frame_cleanup): Likewise.
7918 (cilk_detect_spawn_and_unwrap): Likewise.
7919 (cilk_set_spawn_marker): Likewise.
7920 (build_cilk_sync): Likewise.
7921 (build_cilk_spawn): Likewise.
7924 2013-10-29 David Malcolm <dmalcolm@redhat.com>
7926 Patch autogenerated by refactor_symtab.py from
7927 https://github.com/davidmalcolm/gcc-refactoring-scripts
7928 revision 58bb219cc090b2f4516a9297d868c245495ee622
7930 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7931 to a true class hierarchy.
7932 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7934 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7936 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7938 2013-10-26 Jeff Law <law@redhat.com>
7940 * c-common.c (c_define_builtins): Remove mudflap support.
7941 * c.opt: Ignore and warn for mudflap options.
7943 2013-10-24 Tobias Burnus <burnus@net-b.de>
7946 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7947 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7949 2013-10-23 Jason Merrill <jason@redhat.com>
7951 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7953 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7955 * c-common.h (omp_clause_mask::operator !=): New method.
7956 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7957 instead of if (mask & something) tests everywhere.
7959 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7960 201307 instead of 201107.
7961 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7962 (c_common_attribute_table): Add "omp declare target" and
7963 "omp declare simd" attributes.
7964 (handle_omp_declare_target_attribute,
7965 handle_omp_declare_simd_attribute): New functions.
7966 * c-omp.c: Include c-pragma.h.
7967 (c_finish_omp_taskgroup): New function.
7968 (c_finish_omp_atomic): Add swapped argument, if true,
7969 build the operation first with rhs, lhs arguments and use NOP_EXPR
7971 (c_finish_omp_for): Add code argument, pass it down to make_code.
7972 (c_omp_split_clauses): New function.
7973 (c_split_parallel_clauses): Removed.
7974 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7975 c_omp_declare_simd_clauses_to_decls): New functions.
7976 * c-common.h (omp_clause_mask): New type.
7977 (OMP_CLAUSE_MASK_1): Define.
7978 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7979 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7980 omp_clause_mask::operator |, omp_clause_mask::operator &,
7981 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7982 omp_clause_mask::operator ==): New methods.
7983 (enum c_omp_clause_split): New.
7984 (c_finish_omp_taskgroup): New prototype.
7985 (c_finish_omp_atomic): Add swapped argument.
7986 (c_finish_omp_for): Add code argument.
7987 (c_omp_split_clauses): New prototype.
7988 (c_split_parallel_clauses): Removed.
7989 (c_omp_declare_simd_clauses_to_numbers,
7990 c_omp_declare_simd_clauses_to_decls): New prototypes.
7991 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7992 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7993 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7994 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7995 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7996 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7997 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7998 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7999 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8000 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8001 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8002 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8003 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8004 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8005 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8006 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8007 PRAGMA_OMP_CLAUSE_UNIFORM.
8009 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8011 PR tree-optimization/20318
8012 * c-common.c (handle_returns_nonnull_attribute): New function.
8013 (c_common_attribute_table): Add returns_nonnull.
8015 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8018 * c.opt (fcheck-new): Move to common.opt.
8020 2013-09-25 Marek Polacek <polacek@redhat.com>
8021 Jakub Jelinek <jakub@redhat.com>
8024 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8025 an expression if we can prove it is correct.
8026 (ubsan_instrument_division): Likewise. Remove unnecessary
8029 2013-09-18 Marek Polacek <polacek@redhat.com>
8032 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8034 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8036 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8039 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8040 fobjc-gc, freplace-objc-classes): Accept for LTO.
8042 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8044 * c-target.def: New hook
8046 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8049 * c.opt (Wdelete-incomplete): Add.
8051 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8053 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8054 (vector_types_compatible_elements_p): New function.
8055 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8057 (vector_types_compatible_elements_p): Declare.
8059 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8061 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8062 a virtual member function.
8063 (pp_simple_type_specifier): Remove.
8064 (pp_c_type_specifier): Likewise.
8065 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8066 Rename from pp_c_type_specifier. Adjust.
8067 (c_pretty_printer::c_pretty_printer): Do not assign to
8068 simple_type_specifier.
8070 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8072 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8074 (c_pretty_printer::storage_class_specifier): Likewise.
8075 (c_pretty_printer::initializer): Likewise.
8076 (pp_declaration): Remove.
8077 (pp_declaration_specifiers): Likewise.
8078 (pp_abstract_declarator): Likewise.
8079 (pp_declarator): Likewise.
8080 (pp_type_id): Likewise.
8081 (pp_statement): Likewise.
8082 (pp_constant): Likewise.
8083 (pp_id_expression): Likewise.
8084 (pp_primary_expression): Likewise.
8085 (pp_unary_expression): Likewise.
8086 (pp_multiplicative_expression): Likewise.
8087 (pp_conditional_expression): Likewise.
8088 (pp_assignment_expression): Likewise.
8089 (pp_expression): Likewise.
8090 (pp_c_type_id): Likewise.
8091 (pp_c_storage_class_specifier): Likewise.
8092 * c-pretty-print.c (pp_c_type_cast): Tidy.
8093 (pp_c_pointer): Likewise.
8094 (pp_c_type_specifier): Likewise.
8095 (pp_c_parameter_type_list): Likewise.
8096 (pp_c_function_definition): Likewise.
8097 (pp_c_init_declarator): Likewise.
8098 (pp_c_initializer_list): Likewise.
8099 (pp_c_constructor_elts): Likewise.
8100 (c_pretty_printer::direct_abstract_declarator): Likewise.
8101 (c_pretty_printer::declaration_specifiers): Likewise.
8102 (c_pretty_printer::primary_expression): Likewise.
8103 (c_pretty_printer::postfix_expression): Likewise.
8104 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8105 (c_pretty_printer::storage_class_specifier): Rename from
8106 pp_c_storage_class_specifier.
8107 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8108 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8109 storage_class_specifier, initializer, offset_list, flags.
8111 2013-08-30 Marek Polacek <polacek@redhat.com>
8113 * c-ubsan.c: New file.
8114 * c-ubsan.h: New file.
8116 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8118 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8120 (c_pretty_printer::declaration_specifiers): Likewise.
8121 (c_pretty_printer::declarator): Likewise.
8122 (c_pretty_printer::abstract_declarator): Likewise.
8123 (c_pretty_printer::direct_abstract_declarator): Likewise.
8124 (c_pretty_printer::direct_declarator): Likewise.
8125 (c_pretty_printer::function_specifier): Likewise.
8126 (pp_declaration): Adjust.
8127 (pp_declaration_specifiers): Likewise.
8128 (pp_abstract_declarator): Likewise.
8129 (pp_direct_declarator): Likewise.
8130 (pp_function_specifier): Likewise.
8131 (pp_direct_abstract_declarator): Remove as unused.
8132 (pp_c_declaration): Remove.
8133 (pp_c_declaration_specifiers): Likewise.
8134 (pp_c_declarator): Likewise.
8135 (pp_c_direct_declarator): Likewise.
8136 (pp_c_function_specifier): Likewise.
8137 (pp_c_direct_abstract_declarator): Likewise.
8138 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8139 from pp_c_abstract_declarator. Adjust.
8140 (c_pretty_printer::direct_abstract_declarator): Rename from
8141 pp_c_direct_abstract_declarator. Adjust.
8142 (c_pretty_printer::function_specifier): Rename from
8143 pp_c_function_specifier. Adjust.
8144 (c_pretty_printer::declaration_specifiers): Rename from
8145 pp_c_declaration_specifiers. Adjust.
8146 (c_pretty_printer::direct_declarator): Rename from
8147 pp_c_direct_declarator. Adjust.
8148 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8149 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8150 (c_pretty_printer::c_pretty_printer): Do not assign to
8151 declaration, declaration_specifiers, declarator,
8152 direct_declarator, direct_abstract_declarator, function_specifier.
8154 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8156 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8157 virtual member function.
8158 (c_pretty_printer::multiplicative_expression): Likewise.
8159 (c_pretty_printer::conditional_expression): Likewise.
8160 (c_pretty_printer::assignment_expression): Likewise.
8161 (c_pretty_printer::expression): Likewise.
8162 (pp_unary_expression): Adjust.
8163 (pp_multiplicative_expression): Likewise.
8164 (pp_assignment_expression): Likewise.
8165 (pp_conditional_expression): Likewise.
8166 (pp_expression): Likewise.
8167 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8168 from pp_c_unary_expression. Adjust.
8169 (c_pretty_printer::multiplicative_expression): Rename from
8170 pp_c_multiplicative_expression. Adjust.
8171 (c_pretty_printer::conditional_expression): Rename from
8172 pp_c_conditional_expression. Adjust.
8173 (c_pretty_printer::assignment_expression): Rename from
8174 pp_c_assignment_expression. Adjust.
8175 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8176 (c_pretty_printer::c_pretty_printer): Do not assign to
8177 unary_expression, multiplicative_expression,
8178 conditional_expression, expression.
8180 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8182 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8183 virtual member function.
8184 (pp_postfix_expression): Adjust.
8185 (pp_c_postfix_expression): Remove.
8186 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8187 from pp_c_postfix_expression. Adjust.
8188 (c_pretty_printer::c_pretty_printer): Do not assign to
8191 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8193 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8194 virtua member function.
8195 (pp_primary_expression): Adjust.
8196 (pp_c_primary_expression): Remove.
8197 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8198 from pp_c_primary_expression. Adjust.
8199 (pp_c_initializer_list): Use pp_primary_expression.
8200 (c_pretty_printer::c_pretty_printer): Do not assign to
8203 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8205 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8206 * c-pretty-print.c (M_): Remove.
8207 (c_pretty_printer::translate_string): Define.
8208 (pp_c_type_specifier): Use it.
8209 (pp_c_primary_expression): Likewise.
8210 (pp_c_expression): Likewise.
8212 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8214 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8216 (pp_c_id_expression): Remove.
8217 (pp_id_expression): Adjust.
8218 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8219 pp_c_id_expression. Adjust.
8220 (pp_c_postfix_expression): Use pp_id_expression.
8221 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8223 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8225 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8227 (pp_constant): Adjust.
8228 (pp_c_constant): Remove.
8229 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8230 pp_c_constant. Adjust.
8232 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8233 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8235 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8237 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8238 (c_pretty_printer::c_pretty_printer): Declare.
8239 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8240 c_pretty_printer_init. Adjust.
8241 (print_c_tree): Do not call c_pretty_printer_init.
8242 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8244 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8246 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8248 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8251 * c-common.c (pointer_int_sum): Add bool parameter.
8252 * c-common.h (pointer_int_sum): Adjust declaration.
8254 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8256 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8257 c_pretty_printer variable.
8259 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8261 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8263 (pp_c_base): Likewise. Adjust users.
8264 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8265 (pp_c_whitespace): Do not call pp_base.
8266 (pp_c_left_paren): Likewise.
8267 (pp_c_right_paren): Likewise.
8268 (pp_c_left_brace): Likewise.
8269 (pp_c_right_brace): Likewise.
8270 (pp_c_left_bracket): Likewise.
8271 (pp_c_right_bracket): Likewise.
8272 (pp_c_dot): Likewise.
8273 (pp_c_ampersand): Likewise.
8274 (pp_c_star): Likewise.
8275 (pp_c_arrow): Likewise.
8276 (pp_c_semicolon): Likewise.
8277 (pp_c_complement): Likewise.
8278 (pp_c_exclamation): Likewise.
8279 (pp_c_direct_declarator): Likewise.
8280 (pp_c_ws_string): Likewise.
8281 (pp_c_identifier): Likewise.
8282 (pp_c_statement): Likewise.
8283 (print_c_tree): Likewise.
8285 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8288 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8289 provide useful error strings.
8291 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8293 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8294 printer functions instead of pp_string or operators and punctuators.
8295 (dump_generic_ada_node): Likewise.
8296 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8297 (pp_c_relational_expression): Likewise.
8298 (pp_c_logical_or_expression): Likewise.
8300 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8302 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8303 functions instead of pp_character.
8304 (pp_ada_tree_identifier): Likewise.
8305 (dump_ada_double_name): Likewise.
8306 (dump_ada_function_declaration): Likewise.
8307 (dump_ada_array_domains): Likewise.
8308 (dump_template_types): Likewise.
8309 (dump_generic_ada_node): Likewise.
8310 (print_ada_declaration): Likewise.
8311 (print_ada_struct_decl): Likewise.
8312 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8314 2013-07-23 Tom Tromey <tromey@redhat.com>
8316 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8317 * c-common.c (c_common_reswords): Add _Generic.
8319 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8321 * c-common.c: Fix typos.
8322 * c-common.h: Likewise.
8324 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8327 * c-common.c (c_common_attribute_table): Add warn_unused.
8328 (handle_warn_unused_attribute): New.
8330 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8332 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8333 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8335 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8338 * c.opt: Add Wconditionally-supported.
8340 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8342 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8343 unused variables l_length and l_node.
8345 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8348 * c-common.c (complete_array_type): Delay folding first index
8349 like other indices. When folding, check for index overflow.
8351 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8354 * c-common.h (c_build_vec_perm_expr): New complain argument.
8355 * c-common.c (c_build_vec_perm_expr): Likewise.
8356 Use save_expr also in C++.
8358 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8360 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8361 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8362 * c-opts.c (c_common_post_options): Likewise.
8364 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8366 * array-notation-common.c (length_mismatch_in_expr): Changed the
8367 parameter type's from a dynamic array to a vec_tree. Also removed
8368 the size parameters.
8369 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8372 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8374 * c-common.h (struct cilkplus_an_parts): New structure.
8375 (struct cilkplus_an_loop_parts): Likewise.
8376 (cilkplus_extract_an_triplets): New prototype.
8377 (fix_sec_implicit_args): Likewise.
8378 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8379 (fix_sec_implicit_args): Likewise.
8381 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8383 * array-notation-common.c (find_inv_trees): Removed an unwanted
8385 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8386 enum rid to enum tree_code.
8388 2013-06-11 Jan Hubicka <jh@suse.cz>
8390 * c-common.c (handle_alias_ifunc_attribute): Do not set
8391 DECL_EXTERNAL for weakref variables.
8392 * c-pragma.c (handle_pragma_weak): Make sure aliases
8393 are not declared as external.
8395 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8397 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8398 function from c/c-array-notation.c.
8399 (is_cilkplus_reduce_builtin): Likewise.
8400 (find_rank): Likewise.
8401 (extract_array_notation_exprs): Likewise.
8402 (replace_array_notations): Likewise.
8403 (find_inv_trees): Likewise.
8404 (replace_inv_trees): Likewise.
8405 (contains_array_notation_expr): Likewise.
8406 (find_correct_array_notation_type): Likewise.
8407 * c-common.h (struct inv_list): Moved this struct from the file
8408 c/c-array-notation.c and added a new field called additional tcodes.
8409 (length_mismatch_in_expr_p): New prototype.
8410 (is_cilkplus_reduce_builtin): Likewise.
8411 (find_rank): Likewise.
8412 (extract_array_notation_exprs): Likewise.
8413 (replace_array_notation): Likewise.
8414 (find_inv_trees): Likewise.
8415 (replace_inv_trees): Likewise.
8416 (find_correct_array_notation_type): Likewise.
8418 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8420 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8421 function array_notation_init_builtins is called.
8422 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8423 * c-common.def (ARRAY_NOTATION_REF): New tree.
8424 * c-common.h (build_array_notation_expr): New function declaration.
8425 (build_array_notation_ref): Likewise.
8426 (extract_sec_implicit_index_arg): New extern declaration.
8427 (is_sec_implicit_index_fn): Likewise.
8428 (ARRAY_NOTATION_CHECK): New define.
8429 (ARRAY_NOTATION_ARRAY): Likewise.
8430 (ARRAY_NOTATION_START): Likewise.
8431 (ARRAY_NOTATION_LENGTH): Likewise.
8432 (ARRAY_NOTATION_STRIDE): Likewise.
8433 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8435 (pp_c_expression): Likewise.
8436 * c.opt (flag_enable_cilkplus): New flag.
8437 * array-notation-common.c: New file.
8439 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8442 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8444 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8446 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8449 2013-05-07 Han Shen <shenhan@google.com>
8451 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8453 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8455 * c-common.c (check_user_alignment): Emit error for negative values.
8457 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8459 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8461 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8463 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8464 __GXX_EXPERIMENTAL_CXX1Y__.
8466 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8467 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8469 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8470 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8471 to simply use OPT_Wpointer_arith.
8472 (c_sizeof_or_alignof_type): Likewise.
8474 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8476 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8478 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8480 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8481 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8484 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8486 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8488 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8490 * c-common.c (pointer_int_sum): Remove dead code.
8492 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8495 * c-common.c (handle_optimize_attribute): Don't call
8496 save_optabs_if_changed.
8498 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8501 * c-pch.c (pch_init): Free target_validity at the end.
8503 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8505 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8507 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8508 Jakub Jelinek <jakub@redhat.com>
8511 * c-common.c (handle_no_sanitize_address_attribute): New function.
8512 (c_common_attribute_table): Add no_sanitize_address attribute.
8513 (handle_no_address_safety_analysis_attribute): Add
8514 no_sanitize_address attribute, not no_address_safety_analysis
8517 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
8520 * c-common.c (handle_optimize_attribute): Call
8521 save_optabs_if_changed.
8523 2013-02-18 Jakub Jelinek <jakub@redhat.com>
8524 Steven Bosscher <steven@gcc.gnu.org>
8527 * c-opts.c (c_common_post_options): If debug info is enabled
8528 and non-dwarf*, refuse to load PCH files and when writing PCH
8531 2013-02-05 Jakub Jelinek <jakub@redhat.com>
8534 * c-common.c (handle_error_attribute): Fix condition.
8536 2013-01-30 Jakub Jelinek <jakub@redhat.com>
8539 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8541 2013-01-18 Jason Merrill <jason@redhat.com>
8544 * c.opt (-fextern-tls-init): New.
8545 * c-opts.c (c_common_post_options): Handle it.
8547 2013-01-09 Jakub Jelinek <jakub@redhat.com>
8550 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8551 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8552 and is either negative or bigger or equal to type precision
8553 of the first operand.
8555 2012-12-03 Marek Polacek <polacek@redhat.com>
8558 * c-common.c (check_user_alignment): Swap order of tests,
8559 check TREE_CODE first.
8561 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8564 * c-common.h (overflow_type): New enum.
8565 (build_userdef_literal): Add overflow_type argument.
8566 (tree_userdef_literal): Add overflow_type.
8567 (USERDEF_LITERAL_OVERFLOW): New access macro.
8568 * c-common.c (build_userdef_literal): Add overflow_type
8570 * c-lex.c (c_lex_with_flags): Add overflow_type to
8571 build_userdef_literal calls.
8572 (interpret_integer, interpret_float): Add overflow_type argument.
8574 2012-11-28 Richard Biener <rguenther@suse.de>
8577 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8578 here and use a type with proper overflow behavior for types that would
8579 need to be promoted for the arithmetic.
8581 2012-11-23 Jakub Jelinek <jakub@redhat.com>
8584 * c-common.c (handle_no_address_safety_analysis_attribute): New
8586 (c_common_attribute_table): Add no_address_safety_analysis.
8588 2012-11-16 Simon Baldwin <simonb@google.com>
8590 * c.opt: Add f[no-]canonical-system-headers.
8591 * c-opts.c (c_common_handle_option): Handle
8592 OPT_fcanonical_system_headers.
8594 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8597 * c-opts.c (c_common_handle_option): Set new flags.
8598 * c.opt: Describe new flags.
8600 2012-11-09 Jason Merrill <jason@redhat.com>
8602 * c.opt (Wabi-tag): New.
8604 2012-11-09 Andi Kleen <ak@linux.intel.com>
8607 * c-common.c (get_atomic_generic_size): Mask with
8610 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8613 * c.opt (Wformat): Make it Alias Wformat=1.
8614 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8615 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8617 (Wformat=): RejectNegative. Use LangEnabledBy.
8618 (Wnonnull): Use LangEnabledBy.
8619 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8620 * c-format.c (set_Wformat): Delete.
8621 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8622 (maybe_read_dollar_number): Likewise.
8623 (avoid_dollar_number): Likewise.
8624 (finish_dollar_format_checking): Likewise.
8625 (check_format_info): Likewise.
8626 (check_format_info_main): Likewise.
8627 (check_format_types): Likewise.
8628 (format_type_warning): Likewise.
8629 * c-common.c (int): Likewise.
8630 (check_function_sentinel): Likewise.
8631 * c-common.h (warn_format,set_Wformat): Do not declare here.
8633 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8636 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8637 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8639 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8641 (Wvariadic-macros): Init(1).
8642 * c-opts.c (c_common_handle_option): Do not handle them
8644 (c_common_post_options): Likewise.
8645 (sanitize_cpp_opts): warn_unused_macros is now
8646 cpp_warn_unused_macros.
8647 (push_command_line_include): Likewise.
8648 * c-common.c (warn_unknown_pragmas): Do not define.
8649 * c-common.h (warn_unknown_pragmas): Do not declare.
8651 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8654 * c-common.c (conversion_warning): Handle conditional expressions.
8656 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8659 * c.opt (Wreturn_local_addr): Define new option.
8661 2012-10-25 Jason Merrill <jason@redhat.com>
8663 * c.opt (Wvirtual-move-assign): New.
8665 * c.opt (Winherited-variadic-ctor): New.
8667 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
8670 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8672 2012-10-23 Joseph Myers <joseph@codesourcery.com>
8674 * c-common.h (pch_cpp_save_state): Declare.
8675 * c-target.def (c_preinclude): New hook.
8676 * c-opts.c (done_preinclude): New.
8677 (push_command_line_include): Handle default preincluded header.
8678 (cb_file_change): Call pch_cpp_save_state when calling
8679 push_command_line_include.
8680 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8681 (pch_cpp_save_state): New.
8682 (pch_init): Call pch_cpp_save_state conditionally, instead of
8683 calling cpp_save_state.
8685 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8689 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8690 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8691 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8692 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8693 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8694 * c-opts.c (c_common_handle_option): Remove explicit handling from
8696 (c_common_post_options): Likewise.
8698 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8700 * c-ada-spec.c (LOCATION_COL): Delete.
8701 (compare_location): New function.
8702 (compare_node): Use it.
8703 (compare_comment): Likewise.
8705 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8709 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8710 * c-opts.c (c_common_handle_option): Do not set them here. Add
8712 (c_common_post_options): Likewise.
8714 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8716 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8717 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8718 Remove POINTER_TYPE handling, add large unsigned handling and use
8719 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8721 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8724 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8725 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8726 locs and array of 3 trees instead of just single loc and single
8727 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8728 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8729 For *cmp* builtins that take two sources strings report warnings
8730 about first and second source, not about destination and source.
8732 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
8735 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8737 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8739 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8740 declaring something coming from another file.
8742 2012-10-10 Arnaud Charlet <charlet@adacore.com>
8745 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8747 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8750 * c-common.c (warn_about_parentheses): Add location_t parameter;
8751 use EXPR_LOC_OR_LOC.
8752 * c-common.h: Update declaration.
8754 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8757 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8758 more operations. Make error messages optional.
8759 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8760 (scalar_to_vector): Declare.
8762 2012-10-08 Jason Merrill <jason@redhat.com>
8764 * c-common.c (c_common_reswords): Add thread_local.
8766 2012-10-08 Dodji Seketeli <dodji@redhat.com>
8768 PR c++/53528 C++11 attribute support
8769 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8771 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8773 (handle_aligned_attribute): In choose strictest alignment
8774 among many. Use new check_cxx_fundamental_alignment_constraints.
8775 (handle_transparent_union_attribute): In c++11 attribute syntax,
8776 don't look through typedefs.
8778 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8780 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8781 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8784 2012-09-25 Dehao Chen <dehao@google.com>
8787 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
8788 map when read in the pch.
8790 2012-09-18 Arnaud Charlet <charlet@adacore.com>
8792 * c-ada-spec.c: Style fixes.
8794 2012-09-18 Thomas Quinot <quinot@adacore.com>
8796 * c.opt (-fada-spec-parent): Define new command line switch.
8797 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8798 is specified, generate binding spec as a child of the specified unit.
8800 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8801 Manuel López-Ibáñez <manu@gcc.gnu.org>
8804 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8806 2012-08-23 Arnaud Charlet <charlet@adacore.com>
8808 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8809 for pointers, and add missing Convention C pragma.
8810 (print_ada_struct_decl): Add missing aliased keyword.
8811 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8813 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8815 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8816 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8817 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8818 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8819 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8821 2012-08-10 Richard Guenther <rguenther@suse.de>
8823 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8825 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8827 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8828 instead of separate pp_newline and pp_flush.
8829 (print_c_tree): Likewise.
8831 2012-07-26 Richard Henderson <rth@redhat.com>
8833 * c-common.c (handle_hot_attribute): Allow labels.
8834 (handle_cold_attribute): Likewise.
8836 2012-07-20 Jakub Jelinek <jakub@redhat.com>
8839 * c-common.c (check_function_nonnull): Handle multiple nonnull
8840 attributes properly.
8842 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8844 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8845 * c-ada-spec.c: Likewise.
8846 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8848 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8850 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8851 Remove code conditional on it.
8853 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8855 * c-gimplify.c: Do not include basic-block.h.
8856 * c-common.c: Do not include linfuncs.h.
8858 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8860 * c-common.h: Include tree.h.
8862 2012-07-02 Jason Merrill <jason@redhat.com>
8865 * c-common.c (get_priority): Call default_conversion.
8867 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
8869 * c-pch.c (c_common_write_pch): Remove unused variables.
8871 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8873 * cppspec.c: Moved from gcc/ to here.
8875 2012-06-27 Kai Tietz <ktietz@redhat.com>
8877 PR preprocessor/37215
8878 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8880 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8882 * c-common.h (c_common_print_pch_checksum): Remove.
8883 * c-pch.c: Do not include output.h.
8884 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8885 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8886 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8887 (struct c_pch_header): Remove.
8888 (get_ident): Update gpch version.
8889 (pch_init): Do not print executable_checksum to asm_out_file.
8890 Do not fail if there is no asm_out_file to read back from. Set
8891 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8892 (c_common_write_pch): Verify that nothing was written to asm_out_file
8893 since pch_init was called. Do not write a c_pch_header, and do not
8894 copy from asm_out_file to the PCH.
8895 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8896 the content of asm_out_file from the PCH.
8897 (c_common_print_pch_checksum): Remove.
8898 * c-opts.c (c_common_init): Print out executable_checksum directly.
8900 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8902 * c-target.def (objc_declare_unresolved_class_reference,
8903 objc_declare_class_definition): Add new hooks.
8905 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8907 * c-lex.c: Do not include output.h.
8908 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8909 Remove uses of ASM_OUTPUT_IDENT.
8911 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
8914 * c-common.h (c_build_vec_perm_expr): Move decl here.
8915 * c-common.c (c_build_vec_perm_expr): Move definition
8918 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8920 * c.opt (fconserve-space): Turn into a no-op.
8922 2012-06-04 Sterling Augustine <saugustine@google.com>
8924 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8925 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8926 both the start and end of the function.
8928 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8930 * c-common.c: Do not include output.h.
8931 * c-pragma.c: Likewise.
8933 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8935 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8936 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8937 (lang_decl_name): Handle namespace decls.
8939 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8941 * c-ada-spec.c: Do not include output.h.
8942 * c-semantics.c: Likewise.
8944 2012-05-29 Joseph Myers <joseph@codesourcery.com>
8946 * c-common.c: Fix typo.
8948 2012-05-29 Michael Matz <matz@suse.de>
8950 * c-common.h (c_expand_decl): Remove prototype.
8952 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8954 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8955 * c-opts.c (c_common_handle_option): Remove code handling
8956 warn_missing_braces.
8958 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8961 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8964 2012-05-22 Dodji Seketeli <dodji@redhat.com>
8967 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8969 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8971 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8972 * c-opts.c (c_common_handle_option): Do not handle explicitly
8973 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8975 2012-05-16 Dodji Seketeli <dodji@redhat.com>
8977 PR preprocessor/7263
8978 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8979 to cpp_classify_number. For diagnostics, use the precise location
8980 instead of the global input_location.
8982 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8985 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8987 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8989 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
8991 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8994 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8995 Wreorder): Use LangEnabledBy.
8996 * c-opts.c (c_common_handle_option): Do not enable them
8997 explicitly. Call lang-specific generated functions.
8998 (c_common_post_options): Do not set them here.
9000 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9002 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9003 Wmissing-field-initializers,Wmissing-parameter-type,
9004 Wold-style-declaration,Woverride-init): Use EnabledBy.
9005 * c-opts.c (c_common_post_options): Do not set here explicitly.
9007 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9010 * c-opts.c (c_common_handle_option): Use handle_generated_option
9011 to enable sub-options.
9013 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9016 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9018 2012-05-10 Richard Guenther <rguenther@suse.de>
9020 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9021 adjust commentary about TYPE_IS_SIZETYPE types.
9023 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9026 * c-common.c (warn_logical_operator): Check that argument of
9027 integer_zerop is not NULL.
9029 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9032 * c-common.c (warn_logical_operator): Do not warn if either side
9033 is already true or false.
9035 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9038 * c-common.c (expr_original_type): New.
9039 (shorten_compare): Do not warn for enumeration types.
9041 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9043 * c.opt (fpermissive): Add Var(flag_permissive).
9045 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9048 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9049 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9051 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9053 Add -Wvarargs option
9054 * c.opt (Wvarargs): Define new option.
9056 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9058 * c-common.c (check_function_arguments): Replace
9059 Wmissing-format-attribute with Wsuggest-attribute=format.
9061 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9063 * c.opt (Wsuggest-attribute=format): New. Alias of
9064 Wmissing-format-attribute.
9065 * c-format.c (decode_format_type): Replace
9066 Wmissing-format-attribute with Wsuggest-attribute=format.
9067 (check_function_format): Likewise.
9069 2012-04-27 Ollie Wild <aaw@google.com>
9071 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9072 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9073 * c.opt: Add Wliteral-suffix.
9075 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9078 * c.opt (Wpedantic): New.
9079 (pedantic): Alias Wpedantic.
9080 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9081 (c_common_post_options): Likewise.
9082 (sanitize_cpp_opts): Likewise.
9083 * c-lex.c (interpret_float): Likewise.
9084 * c-format.c (check_format_types): Likewise.
9085 * c-common.c (pointer_int_sum): Likewise.
9086 (c_sizeof_or_alignof_type): Likewise.
9087 (c_add_case_label): Likewise.
9088 (c_do_switch_warnings): Likewise.
9089 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9091 2012-04-15 Jason Merrill <jason@redhat.com>
9094 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9095 (C_STD_NAME): Distinguish between C++98 and C++11.
9097 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9100 * c-common.h (uint16_type_node): Rename into...
9101 (c_uint16_type_node): ...this.
9102 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9103 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9105 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9107 * c-common.c (warn_if_unused_value): Move definition to here.
9108 * c-common.h (warn_if_unused_value): Move declaration to here.
9110 2012-03-23 William Bader <williambader@hotmail.com>
9112 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9114 2012-03-20 Jason Merrill <jason@redhat.com>
9116 * c-common.h (enum cxx_dialect): Add cxx1y.
9117 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9119 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9120 * c-opts.c (c_common_post_options): Likewise.
9121 (set_std_cxx1y): New.
9122 (c_common_handle_option): Call it.
9123 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9125 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9128 * c.opt ([Wuseless-cast]): Add.
9130 2012-03-16 Richard Guenther <rguenther@suse.de>
9132 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9134 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9137 * c.opt (ftemplate-backtrace-limit) Add.
9139 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9141 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9143 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9144 (init_pragma): Don't register extern_prefix.
9146 2012-03-12 Richard Guenther <rguenther@suse.de>
9148 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9149 (builtin_type_for_size): Likewise.
9151 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9154 * c-common.c (sync_resolve_params): Don't decide whether to convert
9155 or not based on TYPE_SIZE comparison, convert whenever arg_type
9156 is unsigned INTEGER_TYPE.
9158 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9161 * c.opt ([Wunused-local-typedefs]): Fix description.
9163 2012-01-24 Mike Stump <mikestump@comcast.net>
9165 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9168 2012-01-18 Richard Guenther <rguenther@suse.de>
9170 * c-opts.c (c_common_post_options): Reset LTO flags if
9171 we are about to generate a PCH.
9173 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9176 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9177 use pp_unsigned_wide_integer.
9179 2012-01-10 Richard Guenther <rguenther@suse.de>
9182 * c-opts.c (c_common_handle_option): Move -Werror handling
9183 to language independent code.
9185 2012-01-05 Richard Guenther <rguenther@suse.de>
9188 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9191 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9194 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9195 of array types with an unknown bound.
9197 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9199 * c-common.c (flag_isoc99): Update comment to refer to C11.
9200 (flag_isoc1x): Change to flag_isoc11.
9201 * c-common.h (flag_isoc99): Update comment to refer to C11.
9202 (flag_isoc1x): Change to flag_isoc11.
9203 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9205 * c-opts.c (set_std_c1x): Change to set_std_c11.
9206 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9208 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9209 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9210 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9212 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9213 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9214 (std=gnu1x): Make alias of std=gnu11.
9216 2011-12-19 Jason Merrill <jason@redhat.com>
9219 * c-common.c (handle_transparent_union_attribute): Check the first
9220 field if the type is complete.
9222 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9225 * c-common.c (RID_IS_FINAL): Add.
9226 * c-common.h (RID_IS_FINAL): Add.
9228 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9230 * c.opt (fgnu-runtime): Provide full description.
9231 (fnext-runtime): Likewise.
9232 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9234 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9236 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9237 predefines in one place. Add LOCK_FREE predefines.
9238 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9241 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9244 * c-common.c (get_atomic_generic_size): Check for various error
9246 (resolve_overloaded_atomic_exchange,
9247 resolve_overloaded_atomic_compare_exchange,
9248 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9249 error_mark_node for error conditions.
9251 2011-11-08 Richard Guenther <rguenther@suse.de>
9254 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9256 2011-11-07 Richard Henderson <rth@redhat.com>
9257 Aldy Hernandez <aldyh@redhat.com>
9258 Torvald Riegel <triegel@redhat.com>
9260 Merged from transactional-memory.
9262 * c-common.c (handle_tm_wrap_attribute,
9263 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9264 (struct c_common_reswords): Added __transaction* keywords.
9265 (struct c_common_attribute_table): Added transaction* and tm_regparm
9267 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9269 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9270 find_tm_attribute): Declare.
9272 2011-11-07 Jason Merrill <jason@redhat.com>
9275 * c-common.c, c-common.h: Revert yesterday's changes.
9277 2011-11-06 Jason Merrill <jason@redhat.com>
9280 * c-common.c (decl_has_visibility_attr): Split out from...
9281 (c_determine_visibility): ...here.
9282 * c-common.h: Declare it.
9284 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9286 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9287 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9289 (check_user_alignment): New. Split out of
9290 handle_aligned_attribute. Disallow integer constants with
9291 noninteger types. Conditionally allow zero.
9292 (handle_aligned_attribute): Use check_user_alignment.
9293 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9295 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9296 Richard Henderson <rth@redhat.com>
9298 Merged from cxx-mem-model.
9300 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9301 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9302 parameters that are the same type size.
9303 (get_atomic_generic_size): New. Find size of generic
9304 atomic function parameters and do typechecking.
9305 (add_atomic_size_parameter): New. Insert size into parameter list.
9306 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9307 either __atomic_exchange_n or external library call.
9308 (resolve_overloaded_atomic_compare_exchange): Restructure
9309 __atomic_compare_exchange to either _n variant or external library call.
9310 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9311 __atomic_load_n or an external library call.
9312 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9313 __atomic_store_n or an external library call.
9314 (resolve_overloaded_builtin): Handle new __atomic builtins.
9316 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9319 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9320 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9321 <INDIRECT_REF>: Return the argument.
9322 <ARRAY_REF>: Remove special code for negative offset.
9323 Call fold_build_pointer_plus instead of size_binop.
9324 (fold_offsetof): Remove STOP_REF argument and adjust.
9325 * c-common.h (fold_offsetof_1): Declare.
9326 (fold_offsetof): Remove STOP_REF argument.
9328 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9331 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9332 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9333 Wnarrowing for C++0x and C++98.
9334 * c.opt ([Wnarrowing]): Update.
9336 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9339 * c.opt: Add Wzero-as-null-pointer-constant.
9341 2011-10-31 Jason Merrill <jason@redhat.com>
9343 * c.opt (-fdeduce-init-list): Off by default.
9346 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9347 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9349 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9351 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9354 * c.opt (fvisibility-inlines-hidden): Description change.
9356 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9358 Implement C++11 user-defined literals.
9359 * c-common.c (build_userdef_literal): New.
9360 * c-common.def: New tree code.
9361 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9362 * c-lex.c (interpret_float): Add suffix parm.
9363 (c_lex_with_flags): Build literal tokens.
9365 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9369 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9372 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9373 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9374 Wnarrowing for C++0x and C++98.
9375 * c.opt ([Wnarrowing]): Update.
9377 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9380 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9381 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9382 Wnarrowing for C++0x and C++98.
9383 * c.opt ([Wnarrowing]): Update.
9385 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9388 * c-common.c (conversion_warning): Remove code looking for
9389 artificial operands.
9391 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9394 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9395 !NO_IMPLICIT_EXTERN_C.
9397 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9399 * c-common.c (c_common_reswords): Add __bases,
9401 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9403 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9406 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9408 2011-10-15 Tom Tromey <tromey@redhat.com>
9409 Dodji Seketeli <dodji@redhat.com>
9411 * c.opt (fdebug-cpp): New option.
9412 * c-opts.c (c_common_handle_option): Handle the option.
9413 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9414 output stream in parameter. Factorized from ...
9415 (maybe_print_line): ... this. Dump location debug information when
9416 -fdebug-cpp is in effect.
9417 (print_line_1): New static function. Takes an output stream in
9418 parameter. Factorized from ...
9419 (print_line): ... here. Dump location information when -fdebug-cpp
9421 (scan_translation_unit): Dump location information when
9422 -fdebug-cpp is in effect.
9424 2011-10-15 Tom Tromey <tromey@redhat.com>
9425 Dodji Seketeli <dodji@redhat.com>
9427 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9429 * c-opts.c (c_common_handle_option)<case
9430 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9431 cases. Handle -ftrack-macro-expansion with and without argument.
9433 2011-10-15 Tom Tromey <tromey@redhat.com>
9434 Dodji Seketeli <dodji@redhat.com>
9436 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9437 (print_line, cb_define, do_line_change): Adjust to avoid touching
9438 the internals of struct line_map. Use the public API instead.
9439 * c-pch.c (c_common_read_pch): Likewise.
9440 * c-lex.c (fe_file_change): Likewise.
9442 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9445 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9447 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9450 * c-pretty-print.c (pp_c_floating_constant): Output
9451 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9453 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9455 * c-common.c (def_builtin_1): Delete old interface with two
9456 parallel arrays to hold standard builtin declarations, and replace
9457 it with a function based interface that can support creating
9458 builtins on the fly in the future. Change all uses, and poison
9459 the old names. Make sure 0 is not a legitimate builtin index.
9460 * c-omp.c (c_finish_omp_barrier): Ditto.
9461 (c_finish_omp_taskwait): Ditto.
9462 (c_finish_omp_flush): Ditto.
9464 2011-10-11 Tristan Gingold <gingold@adacore.com>
9466 * c.opt: (fallow-parameterless-variadic-functions): New.
9468 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9470 PR c++/33255 - Support -Wunused-local-typedefs warning
9471 * c-common.h (struct c_language_function::local_typedefs): New
9473 (record_locally_defined_typedef, maybe_record_typedef_use)
9474 (maybe_warn_unused_local_typedefs): Declare new functions.
9475 * c-common.c (record_locally_defined_typedef)
9476 (maybe_record_typedef_use)
9477 (maybe_warn_unused_local_typedefs): Define new functions.
9478 * c.opt: Declare new -Wunused-local-typedefs flag.
9480 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9483 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9486 2011-09-05 Richard Guenther <rguenther@suse.de>
9488 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9489 of integer_minus_one_node for empty array upper bounds.
9491 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9493 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9494 it's the first time it's being called on this main TU.
9496 2011-08-24 Richard Guenther <rguenther@suse.de>
9499 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9501 2011-08-22 Gabriel Charette <gchare@google.com>
9503 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9504 defined in cpp_init_builtins and c_cpp_builtins.
9506 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9508 * c-common.c (c_common_reswords): Add __builtin_complex.
9509 * c-common.h (RID_BUILTIN_COMPLEX): New.
9511 2011-08-18 Joseph Myers <joseph@codesourcery.com>
9513 * c-common.c (c_common_reswords): Add _Noreturn.
9514 (keyword_is_function_specifier): Handle RID_NORETURN.
9515 * c-common.h (RID_NORETURN): New.
9517 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9519 * c-common.c (unsafe_conversion_p): New function. Check if it is
9520 unsafe to convert an expression to the type.
9521 (conversion_warning): Adjust, use unsafe_conversion_p.
9522 * c-common.h (unsafe_conversion_p): New function declaration.
9524 2011-08-02 Jakub Jelinek <jakub@redhat.com>
9526 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9527 (c_finish_omp_taskyield): New prototype.
9528 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9529 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9530 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9531 or RHS1 have side-effects, evaluate those too in the right spot,
9532 if it is a decl and LHS is also a decl, error out if they
9534 (c_finish_omp_taskyield): New function.
9535 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9536 * c-pragma.c (omp_pragmas): Add taskyield.
9537 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9538 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9539 PRAGMA_OMP_CLAUSE_MERGEABLE.
9541 2011-07-25 Dodji Seketeli <dodji@redhat.com>
9543 * c-common.h (set_underlying_type): Remove parm name from
9546 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
9548 * c-pretty-print.h: Search c-common.h in c-family.
9550 2011-07-22 Jason Merrill <jason@redhat.com>
9553 * c.opt (Wnarrowing): New.
9556 * c-common.h: Declare c_linkage_bindings.
9557 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9560 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9561 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9562 as flag_isoc99 for 'restrict'.
9563 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9565 2011-07-21 Ian Lance Taylor <iant@google.com>
9568 * c-common.c (c_disable_warnings): New static function.
9569 (c_enable_warnings): New static function.
9570 (c_fully_fold_internal): Change local unused_p to bool. Call
9571 c_disable_warnings and c_enable_warnings rather than change
9572 c_inhibit_evaluation_warnings.
9574 2011-07-20 Jason Merrill <jason@redhat.com>
9576 PR c++/6709 (DR 743)
9577 PR c++/42603 (DR 950)
9578 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9579 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9580 (CPP_DECLTYPE): New.
9581 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9583 2011-07-19 Richard Guenther <rguenther@suse.de>
9585 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9586 * c-omp.c (c_finish_omp_for): Likewise.
9588 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9590 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9591 body on the next line.
9593 2011-07-08 Jason Merrill <jason@redhat.com>
9596 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9599 * c-common.c (c_apply_type_quals_to_decl): Don't check
9600 TYPE_NEEDS_CONSTRUCTING.
9602 2011-07-06 Richard Guenther <rguenther@suse.de>
9604 * c-common.c (c_common_nodes_and_builtins):
9605 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9607 2011-07-05 Richard Guenther <rguenther@suse.de>
9609 * c-common.c (c_common_nodes_and_builtins): Build all common
9612 2011-06-27 Jakub Jelinek <jakub@redhat.com>
9614 * c-common.h (c_tree_chain_next): New static inline function.
9616 * c-common.c (check_builtin_function_arguments): Handle
9617 BUILT_IN_ASSUME_ALIGNED.
9619 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
9621 * c-common.c: Add sync_ or SYNC__ to builtin names.
9622 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9624 2011-06-20 Pierre Vittet <piervit@pvittet.com>
9626 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9628 (gen_pragma_handler): New union.
9629 (internal_pragma_handler): New type.
9630 (c_register_pragma_with_data)
9631 (c_register_pragma_with_expansion_and_data): New functions.
9633 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9634 (c_register_pragma, c_register_pragma_with_expansion)
9635 (c_invoke_pragma_handler): Changed to work with
9636 internal_pragma_handler.
9637 (c_register_pragma_with_data)
9638 (c_register_pragma_with_expansion_and_data): New functions.
9640 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9642 * c-common.c: Include common/common-target.h.
9643 (handle_section_attribute): Use
9644 targetm_common.have_named_sections.
9645 * c-cppbuiltin.c: Include common/common-target.h.
9646 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9648 2011-06-10 Richard Guenther <rguenther@suse.de>
9650 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9651 to print a IDENTIFIER_NODE.
9653 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9654 Joseph Myers <joseph@codesourcery.com>
9656 * c.opt (fbuilding-libgcc): New option.
9657 * c-cppbuiltin.c (c_cpp_builtins): Define
9658 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9660 2011-06-07 Jason Merrill <jason@redhat.com>
9662 * c-common.c (max_tinst_depth): Lower default to 900.
9664 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9666 2011-06-07 Richard Guenther <rguenther@suse.de>
9668 * c-common.c (c_common_nodes_and_builtins): Do not set
9669 size_type_node or call set_sizetype.
9671 2011-06-07 Dodji Seketeli <dodji@redhat.com>
9674 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9675 type when using pointer comparison to compare types.
9677 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9679 * c.opt: Add -Wdelete-non-virtual-dtor.
9680 * c-opts.c (c_common_handle_option): Include it in -Wall.
9682 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9687 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9689 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9692 2011-05-27 Jakub Jelinek <jakub@redhat.com>
9695 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9696 C++ don't call c_common_truthvalue_conversion on void type arms.
9698 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9700 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9701 (stmt_list_stack): Define.
9702 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9703 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9705 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9707 * c-common.c (warning_candidate_p): Check for BLOCKs.
9709 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9711 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9714 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9716 * c-common.c (def_fn_type): Remove extra va_end.
9718 2011-05-23 Jason Merrill <jason@redhat.com>
9721 * c-common.c (c_common_get_narrower): New.
9722 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9724 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9726 * c-common.h (check_function_arguments): Tweak prototype of
9727 check_function_arguments.
9728 * c-common.c (check_function_arguments): Likewise. Adjust
9729 calls to check_function_nonnull, check_function_format, and
9730 check_function_sentinel.
9731 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9732 separate attributes and typelist arguments. Use
9733 FOREACH_FUNCTION_ARGS to iterate over argument types.
9735 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9737 * c-common.c (c_common_reswords): Reorder.
9738 * c-common.h (rid): Likewise.
9740 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9742 * c-common.c (def_fn_type): Don't call build_function_type, call
9743 build_function_type_array or build_varargs_function_type_array
9745 (c_common_nodes_and_builtins): Likewise.
9747 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9749 * c-common.c (c_add_case_label): Omit the loc argument to
9751 * c-common.h (build_case_label): Remove.
9752 * c-semantics.c (build_case_label): Remove.
9754 2011-05-05 Joseph Myers <joseph@codesourcery.com>
9756 * c-objc.h (objc_start_method_definition): Update prototype.
9757 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9759 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9761 * c-common.c (check_main_parameter_types): Reindent. Don't use
9762 TYPE_ARG_TYPES directly.
9763 (handle_nonnull_attribute): Likewise.
9764 (sync_resolve_params): Likewise.
9765 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9766 to check_format_string.
9767 (handle_format_attribute): Likewise.
9768 (check_format_string): Take a function type to examine instead of
9769 a type list. Use a function_arg_iterator to step through argument
9772 2011-05-04 Richard Guenther <rguenther@suse.de>
9774 * c-common.c (fix_string_type): Use size_int for index type bounds.
9775 (start_fname_decls): Do not pass NULL to build_int_cst.
9776 (c_init_attributes): Likewise.
9777 * c-lex.c (c_lex_with_flags): Likewise.
9779 2011-04-27 Jason Merrill <jason@redhat.com>
9781 * c-common.c (make_tree_vector_from_list): New.
9782 * c-common.h: Declare it.
9784 2011-04-26 Richard Guenther <rguenther@suse.de>
9786 PR preprocessor/48248
9787 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9788 for output size with -P.
9790 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9792 * c-common.c (struct c_common_resword): Add __underlying_type.
9793 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9795 2011-04-20 Jim Meyering <meyering@redhat.com>
9797 * c-format.c (init_dollar_format_checking): Remove useless
9800 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9802 * c-objc.h (objc_get_interface_ivars): Removed.
9803 (objc_detect_field_duplicates): New.
9804 * stub-objc.c: Likewise.
9806 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9808 * stub-objc.c (objc_declare_protocols): Renamed to
9809 objc_declare_protocol.
9810 * c-objc.h: Likewise.
9812 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9814 * stub-objc.c (objc_declare_class): Updated argument name.
9816 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9818 * c-common.h (c_common_init_ts): Declare.
9819 * c-common.c (c_common_init_ts): Define.
9821 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9823 * c-objc.h (objc_build_message_expr): Updated prototype.
9824 * stub-objc.c (objc_build_message_expr): Likewise.
9826 2011-04-12 Martin Jambor <mjambor@suse.cz>
9828 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9831 2011-04-11 Richard Guenther <rguenther@suse.de>
9833 * c-common.c (complete_array_type): Build a range type of
9836 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9838 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9839 (handle_type_generic_attribute): Likewise.
9841 2011-04-07 Jason Merrill <jason@redhat.com>
9844 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9845 conversion from C++0x scoped enum.
9847 2011-04-06 Joseph Myers <joseph@codesourcery.com>
9849 * c-target-def.h: New file.
9850 * c-target.def: New file.
9851 * c-target.h: New file.
9852 * c-common.c (targetcm): Don't define here.
9853 * c-common.h (default_handle_c_option): Declare.
9854 * c-format.c: Include c-target.h instead of target.h.
9855 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9857 (default_handle_c_option): Move from targhooks.c.
9859 2011-03-29 Jakub Jelinek <jakub@redhat.com>
9861 PR preprocessor/48248
9862 * c-ppoutput.c (print): Add src_file field.
9863 (init_pp_output): Initialize it.
9864 (maybe_print_line): Don't optimize by adding up to 8 newlines
9865 if map->to_file and print.src_file are different file.
9866 (print_line): Update print.src_file.
9868 2011-03-25 Kai Tietz <ktietz@redhat.com>
9870 * c-ada-spec.c (compare_comment): Use filename_cmp
9871 instead of strcmp for filename.
9873 2011-03-25 Jeff Law <law@redhat.com>
9875 * c-common.c (def_fn_type): Add missing va_end.
9877 2011-03-25 Jason Merrill <jason@redhat.com>
9879 * c.opt: Add -std=c++03.
9881 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9883 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9885 2011-03-17 Kai Tietz <ktietz@redhat.com>
9888 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9889 Display allowed attributes for function pointer types.
9890 (pp_c_attributes_display): New function to display
9891 attributes having affects_type_identity flag set to true.
9892 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9894 * c-common.c (c_common_attribute_table):
9896 (c_common_format_attribute_table): Likewise.
9898 2011-03-18 Jason Merrill <jason@redhat.com>
9900 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9901 * c-common.h: Don't declare it here.
9902 * c-common.c: Or define it here.
9903 * c-opts.c (c_common_handle_option): Or set it here.
9906 * c-common.c (handle_transparent_union_attribute): Don't
9907 make a duplicate type in C++.
9909 2011-03-15 Jason Merrill <jason@redhat.com>
9911 * c-common.c (max_constexpr_depth): New.
9912 * c-common.h: Declare it.
9913 * c-opts.c (c_common_handle_option): Set it.
9914 * c.opt (fconstexpr-depth): New option.
9916 2011-03-11 Jason Merrill <jason@redhat.com>
9918 * c-common.c (attribute_takes_identifier_p): Add missing const.
9921 * c-common.c (attribute_takes_identifier_p): Assume that an
9922 unknown attribute takes an identifier.
9924 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9927 * c-common.c (c_type_hash): Call list_length instead of iterating
9928 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9930 2011-02-19 Jakub Jelinek <jakub@redhat.com>
9933 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9935 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9937 * c.opt (fobjc-abi-version=) New.
9938 (fobjc-nilcheck): New.
9940 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9943 * c-common.h (keyword_is_decl_specifier): Declare.
9944 * c-common.c (keyword_is_decl_specifier): Define.
9945 (keyword_is_function_specifier): New function.
9947 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9950 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9951 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9954 2011-01-26 Arnaud Charlet <charlet@adacore.com>
9956 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9958 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9961 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9962 after init_c_lex if pch_file is set.
9964 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9967 * c.opt (-fkeep-inline-dllexport): New switch.
9969 2011-01-12 Richard Guenther <rguenther@suse.de>
9972 * c-common.c (handle_weak_attribute): Warn instead of error
9973 on declaring an inline function weak.
9975 2011-01-05 Tom Tromey <tromey@redhat.com>
9977 * c-common.h (lvalue_error): Update.
9978 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9981 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9984 * c-objc.h (objc_finish_message_expr): Added argument to
9987 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9989 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9992 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9994 * c-objc.h (objc_maybe_warn_exceptions): New.
9995 * stub-objc.c (objc_maybe_warn_exceptions): New.
9997 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9999 * c-common.h (readonly_error): Declare.
10000 * c-common.c (readonly_error): Define.
10002 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10004 * c-common.h (invalid_indirection_error): Declare.
10005 * c-common.c (invalid_indirection_error): Define.
10007 2010-12-03 Richard Guenther <rguenther@suse.de>
10010 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10011 (pp_c_unary_expression): Likewise.
10012 (pp_c_expression): Likewise.
10014 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10016 * c-common.h (objc_finish_function): New.
10017 (objc_non_volatilized_type): Removed.
10018 (objc_type_quals_match): Removed.
10019 * stub-objc.c (objc_finish_function): New.
10020 (objc_non_volatilized_type): Removed.
10021 (objc_type_quals_match): Removed.
10023 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10025 * c-common.h (parse_optimize_options): Declare.
10026 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10027 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10029 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10031 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10033 * c-pch.c (O_BINARY): Don't define here.
10034 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10036 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10038 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10039 targetm.except_unwind_info.
10041 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10043 * c-opts.c (c_common_handle_option): Pass location to
10044 set_struct_debug_option.
10046 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10048 * c-common.c (visibility_options): Move from ../opts.c.
10049 * c-common.h (struct visibility_flags, visibility_options):
10051 * c-opts.c (finish_options): Rename to c_finish_options.
10052 (c_common_init): Update call to finish_options.
10054 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10057 * c-lex.c (lex_string): Check that each string in an Objective-C
10058 string concat sequence starts with either one or zero '@', and
10059 that there are no spurious '@' signs at the end.
10061 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10063 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10064 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10065 HANDLE_PRAGMA_VISIBILITY.
10066 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10067 HANDLE_PRAGMA_VISIBILITY): Don't define.
10068 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10070 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10075 * c-common.h (keyword_begins_type_specifier): Declare.
10076 (keyword_is_storage_class_specifier): Declare.
10077 (keyword_is_type_qualifier): Declare.
10078 * c-common.c (keyword_begins_type_specifier): New function.
10079 (keyword_is_storage_class_specifier): New function.
10080 (keyword_is_type_qualifier): Declare.
10082 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10085 * c-common.c (in_late_binary_op): Define.
10086 (c_common_truthvalue_conversion): Check in_late_binary_op before
10087 calling c_save_expr.
10088 * c-common.h (in_late_binary_op): Declare.
10090 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10092 * c-opts.c (c_common_handle_option): Update calls to
10093 set_struct_debug_option.
10095 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10097 * c-common.h (objc_declare_protocols): Added additional argument.
10098 * stub-objc.c (objc_declare_protocol): Same change.
10100 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10103 * c-common.h (build_real_imag_expr): Declare.
10104 * c-semantics.c (build_real_imag_expr): Define.
10106 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10108 * c-opts.c (c_common_parse_file): Take no arguments.
10109 * c-common.h (c_common_parse_file): Update prototype.
10111 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10114 * c-common.c (warning_candidate_p): Don't track non-const calls
10117 2010-11-15 Ian Lance Taylor <iant@google.com>
10119 * c-lex.c (init_c_lex): Set macro debug callbacks if
10120 flag_dump_go_spec is set.
10122 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10124 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10125 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10127 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10129 PR preprocessor/45038
10130 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10133 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10135 * c-common.h (c_family_lang_mask): Declare.
10136 * c-opts.c (c_family_lang_mask): Make extern.
10137 * c-pragma.c (handle_pragma_diagnostic): Use
10138 control_warning_option.
10140 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10142 * c-common.c (parse_optimize_options): Update call to
10144 * c-common.h (c_common_handle_option): Update prototype.
10145 * c-opts.c (c_common_handle_option): Take location_t parameter and
10146 pass it to other functions.
10148 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10150 * c-opts.c (warning_as_error_callback): Remove.
10151 (c_common_initialize_diagnostics): Don't call
10152 register_warning_as_error_callback.
10153 (c_common_handle_option): Handle -Werror=normalized= here.
10155 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10157 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10159 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10161 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10162 Remove trailing '.' from diagnostics.
10163 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10165 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10167 * c-common.c (parse_optimize_options): Pass global_dc to
10169 * c-opts.c (c_common_handle_option): Pass &global_options to
10170 set_Wstrict_aliasing.
10171 * c.opt (v): Don't mark Common or document here.
10173 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10176 * c-format.c (format_type): New type gcc_objc_string_format_type.
10177 (valid_stringptr_type_p): New.
10178 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10179 (check_format_string): Pass expected type, use
10180 valid_stringptr_type_p (), check that the format string types are
10181 consistent with the format specification.
10182 (decode_format_attr): Warn if NSString is used outside objective-c.
10183 (format_types_orig): Add NSString.
10184 (format_name): New.
10185 (format_flags): New.
10186 (check_format_arg): Handle format strings requiring an external parser.
10187 first_target_format_type: New variable.
10188 (handle_format_attribute): Set up first_target_format_type, pass the
10189 expected format arg string type to check_format_string().
10190 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10191 * stub-objc.c (objc_string_ref_type_p): New.
10192 (objc_check_format_arg): New.
10194 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10196 Fixed using the Objective-C 2.0 dot-syntax with class names.
10197 * c-common.h (objc_build_class_component_ref): New.
10198 * stub-objc.c (objc_build_class_component_ref): New.
10200 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10202 * c.opt (Wproperty-assign-default): New option.
10204 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10206 Implemented -fobjc-std=objc1 flag.
10207 * c.opt (fobjc-std=objc1): New option.
10209 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10211 Implemented format and noreturn attributes for Objective-C methods.
10212 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10213 attribute for Objective-C methods.
10215 2010-10-31 Jason Merrill <jason@redhat.com>
10217 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10220 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10222 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10223 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10224 (objc_add_property_declaration): Removed arguments for copies and
10226 (objc_build_getter_call): Renamed to
10227 objc_maybe_build_component_ref.
10228 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10229 (objc_is_property_ref): New.
10230 * c-common.c (c_common_reswords): Removed copies and ivar.
10231 * stub-objc.c (objc_add_property_declaration): Removed arguments
10232 for copies and ivar.
10233 (objc_build_getter_call): Renamed to
10234 objc_maybe_build_component_ref.
10235 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10236 (objc_is_property_ref): New.
10238 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10239 Matthew Gingell <gingell@adacore.com>
10241 * c-ada-spec.c (separate_class_package): New function.
10242 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10243 name of their enclosing package.
10244 (print_ada_declaration): Use separate_class_package.
10246 2010-10-27 Jason Merrill <jason@redhat.com>
10248 * c-common.c (c_common_reswords): Add __is_literal_type.
10249 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10251 * c-common.c (check_case_value): Remove special C++ code.
10253 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10255 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10256 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10257 and RID_LAST_PATTR.
10258 (objc_add_property_declaration): Added additional arguments.
10259 (objc_property_attribute_kind): Removed.
10260 (objc_set_property_attr): Removed.
10261 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10262 copy and nonatomic.
10263 * stub-objc.c (objc_add_property_declaration): Added additional
10265 (objc_set_property_attr): Removed.
10267 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10269 * c-common.h (objc_add_property_variable): Renamed to
10270 objc_add_property_declaration. Added location argument.
10271 * stub-objc.c (objc_add_property_variable): Same change.
10273 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10275 * c-common.h (objc_maybe_printable_name): New.
10276 * stub-objc.c (objc_maybe_printable_name): New.
10278 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10279 Andrew Pinski <pinskia@gmail.com>
10281 * c-common.h (c_common_mark_addressable_vec): Declare.
10282 * c-common.c (c_common_mark_addressable_vec): New function.
10284 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10286 * c-common.h (objc_set_method_type): Removed.
10287 (objc_add_method_declaration): Added boolean argument.
10288 (objc_start_method_definition): Same change.
10289 (objc_build_method_signature): Same change.
10290 * stub-objc.c (objc_set_method_type): Removed.
10291 (objc_add_method_declaration): Added boolean argument.
10292 (objc_start_method_definition): Same change.
10293 (objc_build_method_signature): Same change.
10295 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10297 * c-common.h (finish_file): Removed.
10298 (objc_write_global_declarations): New.
10299 * c-opts.c (c_common_parse_file): Do not call finish_file.
10300 * stub-objc.c (objc_write_global_declarations): New.
10302 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10304 Implemented parsing @synthesize and @dynamic for
10305 Objective-C/Objective-C++.
10306 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10307 (objc_add_synthesize_declaration): New.
10308 (objc_add_dynamic_declaration): New.
10309 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10310 * stub-objc.c (objc_add_synthesize_declaration): New.
10311 (objc_add_dynamic_declaration): New.
10313 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10316 * c-cppbuiltin.c (mode_has_fma): Move function here from
10317 builtins.c. Don't use the fma optab, instead just use the
10318 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10321 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10323 Merge from 'apple/trunk' branch on FSF servers.
10325 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10328 * c-common.h (objc_non_volatilized_type): New declaration
10329 * stub-objc.c (objc_non_volatilized_type): New stub.
10331 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10333 Merge from 'apple/trunk' branch on FSF servers.
10335 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10338 * c-common.h (objc_diagnose_private_ivar): New decl.
10339 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10341 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10343 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10344 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10345 (objc_ivar_visibility_kind): New enum.
10346 (objc_set_visibility): Adjust prototype to use visibility enum.
10347 * stub-objc.c (objc_set_visibility): Adjust stub to use
10350 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10352 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10353 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10354 has the appropriate fma builtins.
10355 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10357 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10359 merge from FSF apple 'trunk' branch.
10360 2006 Fariborz Jahanian <fjahanian@apple.com>
10362 Radars 4436866, 4505126, 4506903, 4517826
10363 * c-common.c (c_common_resword): Define @property and its attributes.
10364 * c-common.h: Define property attribute enum entries.
10365 (OBJC_IS_PATTR_KEYWORD): New.
10366 (objc_property_attribute_kind): New enum.
10367 Declare objc_set_property_attr (), objc_add_property_variable (),
10368 objc_build_getter_call () and objc_build_setter_call ().
10369 * stub-objc.c (objc_set_property_attr): New stub.
10370 (objc_add_property_variable): Likewise.
10371 (objc_build_getter_call): Likewise.
10372 (objc_build_setter_call) Likewise.
10374 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10376 merge from FSF apple 'trunk' branch.
10377 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10379 Radar 3803157 (method attributes)
10380 * c-common.c (handle_deprecated_attribute): Recognize
10381 objc methods as valid declarations.
10382 * c-common.h: Declare objc_method_decl ().
10383 * stub-objc.c (objc_method_decl): New stub.
10385 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10387 * c-common.c (parse_optimize_options): Call
10388 decode_cmdline_options_to_array_default_mask before
10389 decode_options. Update arguments to decode_options.
10390 * c-common.h (c_common_init_options_struct): Declare.
10391 * c-opts.c (c_common_init_options_struct): New. Split out from
10392 c_common_init_options.
10394 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10396 Implemented fast enumeration for Objective-C.
10397 * c-common.h (objc_finish_foreach_loop): New.
10398 * stub-objc.c (objc_finish_foreach_loop): New.
10400 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10402 * c-common.h (struct diagnostic_context): Don't declare here.
10403 (c_common_initialize_diagnostics): Declare using
10404 diagnostic_context typedef.
10405 * c-opts.c (c_common_handle_option): Pass global_dc to
10406 handle_generated_option.
10408 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10410 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10411 handle_generated_option.
10413 2010-10-03 Ian Lance Taylor <iant@google.com>
10415 * c.opt (-fplan9-extensions): New option.
10417 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10419 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10421 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10422 of duplicating code.
10424 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10426 * c-common.c: Add two new entries for @optional
10427 and @required keywords.
10429 merge from FSF 'apple/trunk' branch.
10430 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10433 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10434 objective-c keywords.
10435 (objc_set_method_opt): New declaration.
10436 * stub-objc.c (objc_set_method_opt): New stub.
10438 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10440 * c-common.c (handle_optimize_attribute): Pass &global_options to
10441 cl_optimization_save and cl_optimization_restore.
10442 * c-opts.c (c_common_handle_option): Pass &global_options to
10443 handle_generated_option.
10444 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10445 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10446 &global_options to cl_optimization_restore.
10448 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10450 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10451 Objective-C/Objective-C++ keywords.
10453 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10455 Merge from 'apple/trunk' branch on FSF servers.
10457 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10460 * c-common.h (objc_check_global_decl): New declaration.
10461 * stub-objc.c (objc_check_global_decl): New stub.
10463 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10465 * c.opt: Don't use VarExists.
10467 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10469 * c-common.c (c_cpp_error): Update names of diagnostic_context
10471 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10472 cl_optimization members.
10473 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10474 sanitize_cpp_opts, finish_options): Update names of cpp_options
10477 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10479 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10480 (objc_is_reserved_word): Removed.
10481 * c-common.c: Updated comments.
10482 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10483 objc_is_reserved_word.
10484 * stub-objc.c (objc_is_reserved_word): Removed.
10486 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10488 * c-common.h (objc_add_method_declaration): Adjust prototype to
10489 include attributes.
10490 (objc_start_method_definition): Likewise.
10491 (objc_build_keyword_decl): Likewise.
10492 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10493 (objc_start_method_definition): Likewise.
10494 (objc_build_keyword_decl): Likewise.
10496 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10498 * c-common.h (objc_start_class_interface): Adjust prototype.
10499 (objc_start_category_interface): Likewise.
10500 (objc_start_protocol): Likewise.
10501 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10502 (objc_start_class_interface): Likewise.
10503 (objc_start_category_interface): Likewise.
10505 2010-09-27 Ian Lance Taylor <iant@google.com>
10507 * c-common.c (c_common_attribute_table): Add no_split_stack.
10508 (handle_no_split_stack_attribute): New static function.
10510 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10512 Merge from 'apple/trunk' branch on FSF servers.
10514 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
10517 * c-common.h (objc_have_common_type): New declaration.
10518 * stub-objc.c (objc_have_common_type): New stub.
10520 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10523 * c-common.h (objc_common_type): New prototype.
10524 * stub-objc.c (objc_common_type): New stub.
10526 2010-09-24 Jan Hubicka <jh@suse.cz>
10528 * c-common.c (handle_leaf_attribute): New function.
10529 (struct attribute_spec c_common_att): Add leaf.
10531 2010-09-22 Joseph Myers <joseph@codesourcery.com>
10533 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10534 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10535 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10536 -include-barrier, -include-directory, -include-directory=,
10537 -include-directory-after, -include-directory-after=,
10538 -include-prefix, -include-prefix=, -include-with-prefix,
10539 -include-with-prefix=, -include-with-prefix-after,
10540 -include-with-prefix-after=, -include-with-prefix-before,
10541 -include-with-prefix-before=, -no-integrated-cpp,
10542 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10543 -output=, -pedantic, -pedantic-errors, -preprocess,
10544 -print-missing-file-dependencies, -trace-includes, -traditional,
10545 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10546 -user-dependencies, -verbose, -write-dependencies,
10547 -write-user-dependencies, no-integrated-cpp, traditional): New.
10549 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10552 * c-common.h (objc_start_method_definition): Return bool instead
10554 * stub-objc.c (objc_start_method_definition): Return bool instead
10557 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10560 * c-common.h (objc_get_interface_ivars): New declaration.
10561 * stub-objc.c (objc_get_interface_ivars): New stub.
10563 2010-09-15 Ian Lance Taylor <iant@google.com>
10565 * c-common.c (parse_optimize_options): Do not capitalize warning
10566 messages. Remove period at end of warning message.
10568 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10570 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10571 (handle_alias_attribute): ... here.
10572 (handle_ifunc_attribute): New.
10574 2010-09-06 Mark Mitchell <mark@codesourcery.com>
10576 * c-common.h (do_warn_double_promotion): Declare.
10577 * c-common.c (do_warn_double_promotion): Define.
10579 2010-09-05 Mark Mitchell <mark@codesourcery.com>
10581 * c.opt (Wdouble-promotion): New.
10583 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10585 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10586 fvtable-thunks, fxref): Mark no longer supported in help text.
10588 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10590 * c.opt (Wimport, fall-virtual, falt-external-templates,
10591 fdefault-inline, fenum-int-equiv, fexternal-templates,
10592 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10593 fname-mangling-version-, fnew-abi, fnonnull-objects,
10594 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10595 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10597 (fhandle-exceptions): Mark with Alias and Warn.
10598 * c-opts.c (c_common_handle_option): Don't handle options marked
10601 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10603 * c.opt (Wcomments, Werror-implicit-function-declaration,
10604 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10605 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10607 * c-common.c (option_codes): Use OPT_Wcomment instead of
10609 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10610 Don't handle options marked as aliases.
10612 2010-08-25 Richard Guenther <rguenther@suse.de>
10614 * c-common.c (c_common_get_alias_set): Remove special
10615 handling for pointers.
10617 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10619 * c-common.c: Use FOR_EACH_VEC_ELT.
10620 * c-gimplify.c: Likewise.
10621 * c-pragma.c: Likewise.
10623 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10625 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10627 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10629 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10630 instead of OPT_MDX and OPT_MMDX.
10632 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10634 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10636 2010-08-12 Joseph Myers <joseph@codesourcery.com>
10638 * c.opt (MD, MMD): Change to MDX and MMDX.
10639 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10641 2010-08-11 Joseph Myers <joseph@codesourcery.com>
10643 * c-opts.c (c_common_handle_option): Call handle_generated_option
10644 instead of handle_option.
10646 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10648 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10649 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10651 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10653 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10654 (pending_redefine_extname): Change type to a VEC.
10655 (add_to_renaming_pragma_list): Update for new type of
10656 pending_redefine_extname.
10657 (maybe_apply_renaming_pragma): Likewise.
10659 2010-08-04 Arnaud Charlet <charlet@adacore.com>
10661 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10663 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10664 decide whether a type has already been declared/seen.
10665 Do not go to the original type.
10666 (dump_nested_types): New parameter forward.
10667 Generate forward declaration if needed and mark type as visited.
10668 (print_ada_declaration): Call dump_nested_types if not already done.
10669 Mark types as visited.
10671 2010-08-03 Joseph Myers <joseph@codesourcery.com>
10673 * c.opt (-print-pch-checksum): Remove option.
10674 * c-opts.c (c_common_handle_option): Don't handle
10675 OPT_print_pch_checksum.
10677 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10679 * c-common.h (c_common_handle_option): Update prototype and return
10681 * c-opts.c (c_common_handle_option): Update prototype and return
10682 value type. Update calls to handle_option and
10683 enable_warning_as_error.
10685 2010-07-27 Jakub Jelinek <jakub@redhat.com>
10688 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10690 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10692 * c-common.h (c_common_missing_argument): Remove.
10693 * c-opts.c (c_common_missing_argument): Remove.
10694 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10695 idirafter, imacros, include, isysroot, isystem, iquote): Add
10697 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10699 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10701 * c-common.h (c_common_option_lang_mask,
10702 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10704 (c_common_init_options): Update prototype.
10705 * c-opts.c (c_common_option_lang_mask): New.
10706 (c_common_initialize_diagnostics): Split out of
10707 c_common_init_options.
10708 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10710 (c_common_init_options): Update prototype. Use decoded options in
10711 search for -lang-asm.
10713 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10715 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10716 * c-format.c: Likewise.
10718 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10720 * c-common.h: Include diagnostic-core.h. Error if already
10722 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10724 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10726 * c-common.c (IN_GCC_FRONTEND): Do not undef.
10727 Do not include expr.h
10728 (vector_mode_valid_p): Move here.
10730 2010-06-21 DJ Delorie <dj@redhat.com>
10732 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10733 allow these pragmas anywhere.
10735 2010-06-14 Jakub Jelinek <jakub@redhat.com>
10738 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10739 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10740 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10741 ggc_strdup instead of xstrdup.
10743 2010-06-10 Jakub Jelinek <jakub@redhat.com>
10745 * c-cppbuiltin.c: Include cpp-id-data.h.
10746 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10747 (lazy_hex_fp_value): New function.
10748 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10750 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10752 * c-gimplify.c: Do not include tree-flow.h
10754 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10757 * c-common.c: Rename targetm member:
10758 targetm.enum_va_list -> targetm.enum_va_list_p
10760 2010-06-28 Anatoly Sokolov <aesok@post.ru>
10762 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10764 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10766 * c-cppbuiltin.c: Do not include except.h.
10768 2010-06-24 Andi Kleen <ak@linux.intel.com>
10770 * c-common.c (warn_for_omitted_condop): New.
10771 * c-common.h (warn_for_omitted_condop): Add prototype.
10773 2010-06-21 Joseph Myers <joseph@codesourcery.com>
10775 * c.opt (lang-objc): Remove.
10776 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10778 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10780 * c-opts.c: Include "tm_p.h".
10782 2010-06-20 Joseph Myers <joseph@codesourcery.com>
10784 * c-common.c (parse_optimize_options): Update call to
10787 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10789 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10790 new type of types_used_by_cur_var_decl.
10792 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10795 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10796 for C++ standard compliance.
10798 2010-06-16 Jason Merrill <jason@redhat.com>
10800 * c.opt: Add -Wnoexcept.
10802 2010-06-16 Richard Guenther <rguenther@suse.de>
10805 * c-common.c (c_common_truthvalue_conversion): Remove
10806 premature and wrong optimization concering ADDR_EXPRs.
10808 2010-06-15 Arnaud Charlet <charlet@adacore.com>
10810 * c-ada-spec.c (dump_sloc): Remove column info.
10811 (is_simple_enum): New function.
10812 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10813 enum types when relevant.
10815 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10817 * c-common.c (conversion_warning): Warn at expression
10820 2010-06-10 Joseph Myers <joseph@codesourcery.com>
10822 * c-opts.c (c_common_handle_option): Don't handle
10825 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10827 * c-pragma.c (push_alignment): Use typed GC allocation.
10828 (handle_pragma_push_options): Likewise.
10830 * c-common.c (parse_optimize_options): Likewise.
10832 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10835 2010-06-07 Joseph Myers <joseph@codesourcery.com>
10837 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10838 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10839 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10840 flag_signed_bitfields, warn_strict_null_sentinel,
10841 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10842 flag_gen_declaration, flag_no_gnu_keywords,
10843 flag_implement_inlines, flag_implicit_templates,
10844 flag_implicit_inline_templates, flag_optional_diags,
10845 flag_elide_constructors, flag_default_inline, flag_rtti,
10846 flag_conserve_space, flag_access_control, flag_check_new,
10847 flag_new_for_scope, flag_weak, flag_working_directory,
10848 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10849 flag_enforce_eh_specs, flag_threadsafe_statics,
10850 flag_pretty_templates): Remove.
10851 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10852 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10853 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10854 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10855 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10856 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10857 flag_no_gnu_keywords, flag_implement_inlines,
10858 flag_implicit_templates, flag_implicit_inline_templates,
10859 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10860 flag_rtti, flag_conserve_space, flag_access_control,
10861 flag_check_new, flag_new_for_scope, flag_weak,
10862 flag_working_directory, flag_use_cxa_atexit,
10863 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10864 flag_threadsafe_statics, flag_pretty_templates,
10865 warn_strict_null_sentinel): Remove.
10866 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10867 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10868 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10869 fimplicit-inline-templates, fimplicit-templates,
10870 flax-vector-conversions, fms-extensions, fnil-receivers,
10871 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10872 frtti, fshort-double, fshort-enums, fshort-wchar,
10873 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10874 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10875 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10876 gen-decls, undef): Use Var.
10877 (fdefault-inline, foptional-diags): Document as doing nothing.
10878 * c-opts.c (c_common_handle_option): Remove cases for options now
10879 using Var. Mark ignored options as such.
10881 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10883 * c-common.c: Moved to here from parent directory.
10884 * c-common.def: Likewise.
10885 * c-common.h: Likewise.
10886 * c-cppbuiltin.c: Likewise.
10887 * c-dump.c: Likewise.
10888 * c-format.c: Likewise.
10889 * c-format.h : Likewise.
10890 * c-gimplify.c: Likewise.
10891 * c-lex.c: Likewise.
10892 * c-omp.c: Likewise.
10894 * c-opts.c: Likewise.
10895 * c-pch.c: Likewise.
10896 * c-ppoutput.c: Likewise.
10897 * c-pragma.c: Likewise.
10898 * c-pragma.h: Likewise.
10899 * c-pretty-print.c: Likewise.
10900 * c-pretty-print.h: Likewise.
10901 * c-semantics.c: Likewise.
10902 * stub-objc.c: Likewise.
10904 * c-common.c: Include gt-c-family-c-common.h.
10905 * c-pragma.c: Include gt-c-family-c-pragma.h.
10907 Copyright (C) 2010-2020 Free Software Foundation, Inc.
10909 Copying and distribution of this file, with or without modification,
10910 are permitted in any medium without royalty provided the copyright
10911 notice and this notice are preserved.