1 2020-03-23 Jakub Jelinek <jakub@redhat.com>
4 * c-warn.c (warnings_for_convert_and_check): For expr and/or
5 result being COMPOUND_EXPRs, skip to ultimate rhs.
7 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
10 * c-common.c (c_common_type_for_mode): Before using a registered
11 built-in type, check that the vectorness of the type matches
12 the vectorness of the mode.
14 2020-03-17 Jakub Jelinek <jakub@redhat.com>
16 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
17 issue in a diagnostic message.
19 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
21 * c.opt: Avoid redundancy in the help text.
23 2020-03-02 Marek Polacek <polacek@redhat.com>
25 PR c++/93958 - add missing -std=gnu++20.
26 * c.opt: Add -std=gnu++20.
28 2020-03-01 Martin Sebor <msebor@redhat.com>
31 * c-attribs.c (append_access_attrs): Correctly handle attribute.
32 (handle_access_attribute): Same.
34 2020-02-25 Jakub Jelinek <jakub@redhat.com>
37 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
38 "did you mean" hint in diagnostics.
40 2020-02-15 Jason Merrill <jason@redhat.com>
42 * c.opt: Add -std=c++20.
44 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
46 * c-ada-spec.c: Include bitmap.h.
47 (dump_ada_double_name): Rename into...
48 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
49 (dump_ada_array_type): Adjust to above renaming. Robustify.
50 (dump_nested_types_1): New function copied from... Add dumped_types
51 parameter and pass it down to dump_nested_type.
52 (dump_nested_types): ...this. Remove parent parameter. Just call
53 dump_nested_types_1 on an automatic bitmap.
54 (dump_nested_type): Add dumped_types parameter.
55 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
56 Adjust recursive calls and adjust to above renaming.
57 (dump_ada_declaration): Adjust call to dump_nested_types.
58 Tidy up and adjust to above renaming.
59 (dump_ada_specs): Initialize and release bitmap obstack.
61 2020-02-10 Martin Sebor <msebor@redhat.com>
64 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
66 2020-02-10 Jakub Jelinek <jakub@redhat.com>
69 * c-format.c (check_plain): Fix up last argument of strncasecmp.
70 Remove useless extra test.
72 2020-02-03 Julian Brown <julian@codesourcery.com>
73 Tobias Burnus <tobias@codesourcery.com>
75 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
77 2020-01-29 Jason Merrill <jason@redhat.com>
80 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
82 2020-01-23 Jason Merrill <jason@redhat.com>
84 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
86 2020-01-23 Martin Sebor <msebor@redhat.com>
89 * c-common.c (check_function_arguments): Avoid overlap checking
92 2020-01-22 Jason Merrill <jason@redhat.com>
94 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
96 * c-warn.c (conversion_warning): Check operands only after checking
97 the whole expression. Don't check second operand of + for sign.
99 2020-01-21 Jason Merrill <jason@redhat.com>
100 Manuel López-Ibáñez <manu@gcc.gnu.org>
102 PR c++/40752 - useless -Wconversion with short +=.
103 * c.opt (-Warith-conversion): New.
104 * c-warn.c (conversion_warning): Recurse for operands of
105 operators. Only warn about the whole expression with
108 2020-01-21 Jason Merrill <jason@redhat.com>
110 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
111 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
113 2020-01-20 Nathan Sidwell <nathan@acm.org>
115 PR preprocessor/80005
116 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
118 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
120 * c-common.c (co_await, co_yield, co_return): New.
121 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
122 RID_CO_RETURN): New enumeration values.
123 (D_CXX_COROUTINES): Bit to identify coroutines are active.
124 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
125 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
126 * c.opt (fcoroutines): New command-line switch.
128 2020-01-10 David Malcolm <dmalcolm@redhat.com>
130 * c-format.c (local_event_ptr_node): New.
131 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
132 (init_dynamic_diag_info): Initialize local_event_ptr_node.
133 * c-format.h (T_EVENT_PTR): New define.
135 2020-01-10 Martin Sebor <msebor@redhat.com>
138 * c-attribs.c (append_access_attrs): Validate against the translated
139 access string rather than the human-readable representation.
141 2020-01-01 Jakub Jelinek <jakub@redhat.com>
143 Update copyright years.
145 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
147 * c-ada-spec.h (decl_sloc): Delete.
148 * c-ada-spec.c (decl_sloc): Make static.
150 2019-12-19 Julian Brown <julian@codesourcery.com>
152 * c-common.h (c_omp_map_clause_name): Add prototype.
153 * c-omp.c (c_omp_map_clause_name): New function.
154 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
155 PRAGMA_OACC_CLAUSE_DETACH.
157 2019-12-19 Julian Brown <julian@codesourcery.com>
158 Maciej W. Rozycki <macro@codesourcery.com>
159 Tobias Burnus <tobias@codesourcery.com>
160 Thomas Schwinge <thomas@codesourcery.com>
162 * c-pragma.h (pragma_omp_clause): Add
163 PRAGMA_OACC_CLAUSE_NO_CREATE.
165 2019-12-17 Martin Sebor <msebor@redhat.com>
168 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
170 2019-12-11 David Malcolm <dmalcolm@redhat.com>
172 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
174 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
176 2019-12-09 David Malcolm <dmalcolm@redhat.com>
178 * c-format.c (range_label_for_format_type_mismatch::get_text):
179 Replace label_text ctor called with true with label_text::take.
181 2019-12-09 David Malcolm <dmalcolm@redhat.com>
183 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
184 initial newline from expected outputs.
185 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
186 call to diagnostic_show_locus.
188 2019-12-06 Jakub Jelinek <jakub@redhat.com>
190 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
193 2019-12-05 Marek Polacek <polacek@redhat.com>
194 Jakub Jelinek <jakub@redhat.com>
196 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
197 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
199 2019-12-05 Marek Polacek <polacek@redhat.com>
201 PR c++/92271 - make __is_same alias for __is_same_as.
202 * c-common.c: Add __is_same, an alias for __is_same_as.
204 2019-12-03 Marek Polacek <polacek@redhat.com>
206 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
207 * c-cppbuiltin.c (c_cpp_builtins): Predefine
208 __cpp_aggregate_paren_init=201902 for -std=c++2a.
210 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
212 * c-attribs.c (handle_symver_attribute): New function
213 (c_common_attributes): Add symver.
215 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
217 * c-common.c (pointer_int_sum): Use verify_type_context to check
218 whether the target allows pointer arithmetic for the types involved.
219 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
220 to check whether the target allows sizeof and alignof operations
221 for the types involved.
223 2019-11-27 Jason Merrill <jason@redhat.com>
225 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
227 2019-11-26 Jakub Jelinek <jakub@redhat.com>
230 * c-attribs.c (handle_mode_attribute): Add mode attribute to
233 2019-11-25 Joseph Myers <joseph@codesourcery.com>
236 * c-common.c (c_common_type_for_mode): Handle decimal
237 floating-point types being NULL_TREE.
238 * c-format.c (get_format_for_type_1): Handle specified types being
240 * c-lex.c (interpret_float): Give an error for decimal
241 floating-point constants when decimal floating-point not
244 2019-11-23 Jakub Jelinek <jakub@redhat.com>
247 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
248 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
249 group warning with inform together.
250 (handle_access_attribute): Formatting fix.
252 2019-11-22 Jakub Jelinek <jakub@redhat.com>
255 * c-common.h (identifier_global_tag): Declare.
256 * c-format.c (get_pointer_to_named_type): Renamed to ...
257 (get_named_type): ... this. Use identifier_global_tag instead of
258 identifier_global_value, handle the return value being a TYPE_P.
259 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
260 to call get_named_type instead. Formatting fixes.
262 Implement P1902R1, Missing feature-test macros 2017-2019.
263 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
264 and __cpp_generic_lambdas for -std=c++2a. Define
265 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
266 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
267 __cpp_concepts for -std=c++2a.
269 2019-11-22 Martin Sebor <msebor@redhat.com>
272 * c-attribs.c (handle_access_attribute): New function.
273 (c_common_attribute_table): Add new attribute.
274 (get_argument_type): New function.
275 (append_access_attrs): New function.
276 (get_nonnull_operand): Rename...
277 (get_attribute_operand): ...to this.
278 * c-common.c (get_nonnull_operand): Rename...
279 (get_attribute_operand): ...to this.
281 2019-11-21 Joseph Myers <joseph@codesourcery.com>
283 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
286 2019-11-19 Joseph Myers <joseph@codesourcery.com>
288 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
289 warning for standard attributes mixed with fallthrough attributes.
291 2019-11-15 Joseph Myers <joseph@codesourcery.com>
293 * c-attribs.c (handle_fallthrough_attribute): Remove static.
294 * c-common.h (handle_fallthrough_attribute): Declare.
296 2019-11-15 Joseph Myers <joseph@codesourcery.com>
298 * c-attribs.c (handle_deprecated_attribute): Remove static.
299 * c-common.h (handle_deprecated_attribute): Declare.
301 2019-11-14 Joseph Myers <joseph@codesourcery.com>
303 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
306 2019-11-14 Jakub Jelinek <jakub@redhat.com>
308 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
311 * c-omp.c (c_omp_check_context_selector): Handle name lists
312 containing string literals. Don't diagnose atomic_default_mem_order
315 2019-11-13 Joseph Myers <joseph@codesourcery.com>
317 * c-cppbuiltin.c (builtin_define_float_constants): Also define
318 NORM_MAX constants. Update call to get_max_float.
319 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
322 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
324 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
325 (dump_forward_type): Do not generate a declaration for function types.
326 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
327 of the component type if it is declared in another file.
329 2019-11-12 Martin Liska <mliska@suse.cz>
331 * c-opts.c (c_common_post_options):
332 Use SET_OPTION_IF_UNSET.
334 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
335 Frederik Harwath <frederik@codesourcery.com>
338 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
340 * c-pragma.c (oacc_pragmas): Add "serial" entry.
342 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
344 * c-common.h (gnu_vector_type_p): New function.
345 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
346 vectors to satisfy gnu_vector_type_p.
347 (c_build_vec_convert): Likewise __builtin_convertvector.
348 (convert_vector_to_array_for_subscript): Likewise when applying
349 implicit vector to array conversion.
350 (scalar_to_vector): Likewise when converting vector-scalar
351 operations to vector-vector operations.
353 2019-11-08 Joseph Myers <joseph@codesourcery.com>
355 * c.opt (Wold-style-definition): Initialize to -1.
356 * c-opts.c (c_common_post_options): Set warn_old_style_definition
357 to flag_isoc2x if not set explicitly.
359 2019-11-07 Joseph Myers <joseph@codesourcery.com>
361 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
363 2019-11-05 Jason Merrill <jason@redhat.com>
365 * c-opts.c (c_common_post_options): -fconcepts-ts implies
368 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
370 * c-opts.c (c_common_post_options): Update
373 2019-11-02 Jakub Jelinek <jakub@redhat.com>
375 * c-common.h (c_omp_get_context_selector): Remove.
376 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
377 and renamed to omp_get_context_selector.
379 * c-omp.c (c_omp_mark_declare_variant): Use
380 omp_context_selector_set_compare.
382 PR c++/88335 - Implement P1073R3: Immediate functions
383 * c-common.h (enum rid): Add RID_CONSTEVAL.
384 * c-common.c (c_common_reswords): Add consteval.
386 2019-11-01 Martin Sebor <msebor@redhat.com>
392 * c-pretty-print.c (direct_abstract_declarator): Print
393 bound in zero-length arrays.
394 * c.opt (-Wzero-length-bounds): New option.
396 2019-10-30 Nathan Sidwell <nathan@acm.org>
398 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
401 2019-10-28 Martin Sebor <msebor@redhat.com>
404 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
405 even when only preprocessing.
406 * c-common.h (names_builtin_p): Declare new function.
407 * c-lex.c (init_c_lex): Set has_builtin.
408 (c_common_has_builtin): Define a new function.
409 * c-ppoutput.c (init_pp_output): Set has_builtin.
411 2019-10-24 Jakub Jelinek <jakub@redhat.com>
413 * c-common.h (c_omp_context_selector_matches): Remove.
414 * c-omp.c (c_omp_context_selector_matches): Remove.
415 * c-attribs.c (c_common_attribute_table): Add
416 "omp declare target {host,nohost,block}" attributes.
418 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
420 * c-lex.c (c_common_has_attribute): Update nodiscard value.
422 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
424 * c-common.h (user_facing_original_type_p): Declare.
425 * c-common.c: Include c-spellcheck.h.
426 (user_facing_original_type_p): New function.
428 2019-10-12 Jakub Jelinek <jakub@redhat.com>
430 * c-common.h (c_omp_mark_declare_variant,
431 c_omp_context_selector_matches): Declare.
432 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
434 (c_omp_get_context_selector): Support second argument NULL.
435 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
437 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
438 attribute, add "omp declare variant base" and
439 "omp declare variant variant" attributes.
441 2019-10-11 Joseph Myers <joseph@codesourcery.com>
443 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
444 CppReason(CPP_W_C11_C2X_COMPAT).
446 2019-10-11 Joseph Myers <joseph@codesourcery.com>
448 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
449 _Decimal64 and _Decimal128.
451 2019-10-10 Joseph Myers <joseph@codesourcery.com>
453 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
454 types if DFP not supported.
456 2019-10-10 Jakub Jelinek <jakub@redhat.com>
458 * c-common.h (c_omp_check_context_selector,
459 c_omp_get_context_selector): Declare.
460 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
461 in diagnostic message.
462 (c_omp_check_context_selector, c_omp_get_context_selector): New
464 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
466 (handle_omp_declare_variant_attribute): New function.
468 2019-10-09 Martin Sebor <msebor@redhat.com>
470 PR tree-optimization/90879
471 * c.opt (-Wstring-compare): New option.
473 2019-10-08 Andrew Sutton <asutton@lock3software.com>
474 Jason Merrill <jason@redhat.com>
476 Update the concepts implementation to conform to the C++20
477 specification, improve compile times, and generally clean up
480 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
481 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
482 * c.opt: Add -Wconcepts-ts.
483 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
484 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
485 (set_std_cxx2a): Enable concepts by default.
487 2019-10-08 Joseph Myers <joseph@codesourcery.com>
489 * c-opts.c (c_common_post_options): Set
490 -fno-fp-int-builtin-inexact for C2X.
492 2019-10-05 Jakub Jelinek <jakub@redhat.com>
494 PR c++/91369 - Implement P0784R7: constexpr new
495 * c-cppbuiltin.c (c_cpp_builtins): Predefine
496 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
498 2019-10-04 Joseph Myers <joseph@codesourcery.com>
501 * c-format.c (C_STD_VER): Handle C2x.
502 (C_STD_NAME): Likewise.
503 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
504 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
505 modifier allowed and 'p' flag.
506 * c-format.h (enum format_std_version): Add STD_C2X.
507 (struct format_char_info): Mention 'p' in comment on flags2.
509 2019-10-01 David Malcolm <dmalcolm@redhat.com>
511 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
512 calling diagnostic_show_locus, rather than destroying it afterwards.
514 2019-10-01 Jakub Jelinek <jakub@redhat.com>
517 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
518 with NULL DECL_FIELD_OFFSET.
520 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
522 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
523 has a type name, use it in preference to the __vector syntax.
525 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
527 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
528 two spaces between a comma and "...".
530 2019-09-27 Jakub Jelinek <jakub@redhat.com>
533 * c-common.h (c_omp_predefined_variable): Declare.
534 * c-omp.c (c_omp_predefined_variable): New function.
535 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
536 for predefined variables.
538 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
540 * c-common.h (build_function_call_vec): Take the original
541 function decl as an optional final parameter.
542 (check_builtin_function_arguments): Take the original function decl.
543 * c-common.c (check_builtin_function_arguments): Likewise.
544 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
545 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
547 2019-09-15 Jason Merrill <jason@redhat.com>
549 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
550 fold_for_warn in "|| mask" warning.
552 2019-09-10 Martin Liska <mliska@suse.cz>
554 * c.opt: Use newly added WarnRemoved.
556 2019-09-09 Martin Liska <mliska@suse.cz>
558 * c.opt: Update comment of removed
559 options that are preserved only for backward
562 2019-09-06 Martin Liska <mliska@suse.cz>
565 * c-common.c: Remove definition of flag_use_repository.
566 * c-common.h: Likewise.
567 * c-opts.c (c_common_handle_option):
568 Do not handle OPT_frepo option.
569 * c.opt: Mark the option with Deprecated.
571 2019-09-04 Marek Polacek <polacek@redhat.com>
573 * c.opt (fdeduce-init-list): Ignored.
575 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
578 * c.opt (Wenum-conversion): New option.
580 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
582 * c-attribs.c (handle_section_attribute): Call the
583 handle_generic_attribute target hook after performing target
584 independent processing.
585 (handle_noinit_attribute): Likewise.
587 2019-09-03 Ian Lance Taylor <iant@golang.org>
589 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
590 when using -fgo-dump-spec.
592 2019-09-02 Martin Liska <mliska@suse.cz>
595 * c-common.c (fname_as_string): Use cxx_printable_name for
596 __PRETTY_FUNCTION__ same as was used before r265711.
598 2019-08-28 Marek Polacek <polacek@redhat.com>
600 Implement P1152R4: Deprecating some uses of volatile.
602 * c-opts.c (c_common_post_options): Enable -Wvolatile by
603 default for C++2a, unless -Wno-deprecated.
604 * c.opt (Wvolatile): New warning.
606 2019-08-28 Marek Polacek <polacek@redhat.com>
608 PR c++/91360 - Implement C++20 P1143R2: constinit.
609 * c-common.c (c_common_reswords): Add constinit and __constinit.
610 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
611 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
614 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
615 * c-format.c (cxx_keywords): Add "constinit".
616 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
618 2019-08-27 Jakub Jelinek <jakub@redhat.com>
621 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
622 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
623 like COMPOUND_EXPR rather than normal expression.
625 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
628 * c-lex.c (c_lex_with_flags): Don't call
629 c_common_no_more_pch () from here.
631 2019-08-23 Jakub Jelinek <jakub@redhat.com>
634 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
635 instead of flag_excess_precision_cmdline.
636 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
637 * c-opts.c (c_common_post_options): Likewise.
639 2019-08-22 Martin Sebor <msebor@redhat.com>
642 * c-common.c (braced_list_to_string): Add argument and overload.
643 Handle flexible length arrays and unions.
645 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
647 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
648 function declarations where arguments are missing. Rename variables.
650 2019-08-15 Richard Biener <rguenther@suse.de>
652 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
653 enabled, define __SIZETYPE__.
655 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
657 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
658 exclusion with "section" attribute.
659 (attr_noinit_exclusions): New table.
660 (handle_noinit_attribute): New function.
662 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
665 * c-common.c (resolve_overloaded_builtin): Use
666 copy_decl_built_in_function.
668 2019-08-13 Martin Sebor <msebor@redhat.com>
671 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
672 (asm_fprintf_length_spec): Same.
673 * c-format.h (format_lengths): Add FMT_LEN_w.
675 2019-08-10 Jakub Jelinek <jakub@redhat.com>
677 * c-pragma.h (enum pragma_omp_clause): Add
678 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
680 2019-08-07 Jakub Jelinek <jakub@redhat.com>
682 * c-pragma.h (enum pragma_omp_clause): Add
683 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
684 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
687 2019-08-05 Marek Polacek <polacek@redhat.com>
689 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
690 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
691 default for C++2a, unless -Wno-deprecated.
692 * c.opt (Wcomma-subscript): New warning.
694 2019-07-20 Jakub Jelinek <jakub@redhat.com>
696 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
697 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
698 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
699 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
700 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
701 constructs with the loop construct.
703 2019-07-13 Jakub Jelinek <jakub@redhat.com>
706 * c-omp.c (c_omp_split_clauses): Fix a pasto in
707 OMP_CLAUSE_REDUCTION_TASK handling.
709 2019-07-12 Jakub Jelinek <jakub@redhat.com>
711 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
712 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
714 2019-07-09 Martin Sebor <msebor@redhat.com>
717 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
719 * c-pretty-print.h: Same.
721 2019-07-09 Martin Sebor <msebor@redhat.com>
724 * c-format.c (check_argument_type): Change class-key from class to
725 struct and vice versa to match convention and avoid -Wclass-is-pod
727 * c-pretty-print.h: Same.
729 2019-07-03 Martin Liska <mliska@suse.cz>
731 * c-common.c (try_to_locate_new_include_insertion_point): Remove
734 2019-07-03 Jakub Jelinek <jakub@redhat.com>
736 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
737 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
740 2019-07-02 qing zhao <qing.zhao@oracle.com>
742 PR preprocessor/90581
743 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
744 * c.opt: Add new option -fmax-include-depth.
746 2019-06-26 Jason Merrill <jason@redhat.com>
748 PR c++/55442 - memory-hog with highly recursive constexpr.
749 * c.opt (fconstexpr-loop-limit): New.
751 2019-06-25 Jakub Jelinek <jakub@redhat.com>
754 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
755 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
757 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
759 * c-common.c (c_common_nodes_and_builtins): Define
760 alternate "__intN__" name for "__intN" types.
762 2019-06-24 Jan Hubicka <jh@suse.cz>
764 * c-common.c (braced_lists_to_strings): Check that
765 type is array or integer prior checking string flag.
767 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
769 PR c++/90875 - added -Wswitch-outside-range option
770 * c.opt (Wswitch-outside-range): Added new option.
771 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
773 2019-06-21 Marek Polacek <polacek@redhat.com>
775 PR c++/90953 - ICE with -Wmissing-format-attribute.
776 * c-common.c (check_function_arguments_recurse): Use
778 (check_missing_format_attribute): Likewise.
780 2019-06-19 Marek Polacek <polacek@redhat.com>
782 PR c++/60364 - noreturn after first decl not diagnosed.
783 * c-attribs.c (handle_noreturn_attribute): No longer static.
784 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
786 * c-format.c (check_function_format): Use get_attribute_name.
788 2019-06-19 Martin Sebor <msebor@redhat.com>
791 * c-format.c (function_format_info::format_type): Adjust type.
792 (function_format_info::is_raw): New member.
793 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
794 (decode_format_attr): Adjust call to decode_format_type.
795 Avoid a redundant call to convert_format_name_to_system_name.
796 Avoid abbreviating the word "arguments" in a diagnostic.
797 (format_warning_substr): New function.
798 (avoid_dollar_number): Quote dollar sign in a diagnostic.
799 (finish_dollar_format_checking): Same.
800 (check_format_info): Same.
801 (struct baltoks_t): New.
802 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
803 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
805 (check_format_info_main): Call check_plain. Use baltoks_t. Call
806 maybe_diag_unbalanced_tokens.
807 (handle_format_attribute): Spell out the word "arguments" in
810 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
812 PR c++/90449 - add -Winaccessible-base option.
813 * c.opt (Winaccessible-base): New option.
815 2019-06-10 Jakub Jelinek <jakub@redhat.com>
817 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
818 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
819 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
820 combined/composite constructs where it is not allowed. Copy over
821 OMP_CLAUSE_REDUCTION_INSCAN.
823 2019-06-05 Martin Sebor <msebor@redhat.com>
825 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
826 (handle_alias_ifunc_attribute): Same.
827 (handle_copy_attribute): Same.
828 (handle_weakref_attribute): Same.
829 (handle_nonnull_attribute): Same.
830 * c-warn.c (warn_for_sign_compare): Same.
831 (warn_for_restrict): Same.
834 2019-06-05 Martin Sebor <msebor@redhat.com>
836 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
837 * c.opt (-Wformat-diag): Remove a spurious period.
839 2019-05-29 Jakub Jelinek <jakub@redhat.com>
842 * c-common.c (check_builtin_function_arguments)
843 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
846 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
848 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
850 2019-05-22 Martin Liska <mliska@suse.cz>
853 * c-attribs.c (handle_copy_attribute): Do not copy
854 target_clones attribute.
856 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
858 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
859 * c-ada-spec.c (print_assignment_operator): New function.
860 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
861 assignment operators declared as methods and filter out the others.
863 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
866 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
867 "omp declare target".
869 2019-05-16 Martin Sebor <msebor@redhat.com>
871 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
872 keywords, operators, and types in diagnostics.
873 (handle_scalar_storage_order_attribute): Same.
874 (handle_mode_attribute): Same.
875 (handle_visibility_attribute): Same.
876 (handle_assume_aligned_attribute): Same.
877 (handle_no_split_stack_attribute): Same.
878 * c-common.c (shorten_compare): Same.
879 (c_common_truthvalue_conversion): Same.
880 (cb_get_source_date_epoch): Same.
881 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
883 (interpret_float): Same.
884 * c-omp.c (c_finish_omp_for): Same.
885 * c-opts.c (c_common_post_options): Same.
886 * c-pch.c (c_common_pch_pragma): Same.
887 * c-pragma.c (pop_alignment): Same.
888 (handle_pragma_pack): Same.
889 (apply_pragma_weak): Same.
890 (handle_pragma_weak): Same.
891 (handle_pragma_scalar_storage_order): Same.
892 (handle_pragma_redefine_extname): Same.
893 (add_to_renaming_pragma_list): Same.
894 (maybe_apply_renaming_pragma): Same.
895 (push_visibility): Same.
896 (handle_pragma_visibility): Same.
897 (handle_pragma_optimize): Same.
898 (handle_pragma_message): Same.
899 * c-warn.c (warn_for_omitted_condop): Same.
900 (lvalue_error): Same.
902 2019-05-15 Richard Biener <rguenther@suse.de>
905 * c-common.c (c_common_mark_addressable_vec): Also mark
906 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
909 2019-05-06 Nathan Sidwell <nathan@acm.org>
911 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
913 2019-04-30 Nathan Sidwell <nathan@acm.org>
915 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
917 2019-04-30 Martin Liska <mliska@suse.cz>
919 * c-pragma.c (handle_pragma_diagnostic): Provide hints
922 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
924 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
925 the pointer target rather than the pointer itself.
927 2019-04-19 Jakub Jelinek <jakub@redhat.com>
930 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
932 (c_do_switch_warnings): Remove outside_range_p argument.
933 * c-common.c (check_case_bounds): Removed.
934 (c_add_case_label): Remove orig_type and outside_range_p arguments.
935 Don't call check_case_bounds. Fold low_value as well as high_value.
936 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
937 Check for case labels outside of range of original type here and
940 2019-04-12 Jakub Jelinek <jakub@redhat.com>
943 * c.opt (-fhandle-exceptions): Use %< and %> around option names
944 in the Warn diagnostics.
947 * c-attribs.c (handle_patchable_function_entry_attribute): Add
948 function comment. Warn if arguments of the attribute are not positive
951 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
953 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
954 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
956 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
958 * c-ada-spec.c (is_float128): New predicate extracted from...
959 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
960 <REAL_TYPE>: ...here. Call it.
962 2019-04-05 David Malcolm <dmalcolm@redhat.com>
965 * c-warn.c (check_address_or_pointer_of_packed_member): Add
966 auto_diagnostic_group. Guard inform calls by result of
969 2019-04-05 Marek Polacek <polacek@redhat.com>
971 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
972 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
975 2019-04-03 Jason Merrill <jason@redhat.com>
977 PR c++/86586 - -fcompare-debug=-Wsign-compare.
978 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
980 2019-04-01 Martin Sebor <msebor@redhat.com>
983 * c-attribs.c (handle_copy_attribute): Handle references and
984 non-constant expressions.
986 2019-03-22 Jakub Jelinek <jakub@redhat.com>
989 * c.opt (-fconstexpr-ops-limit=): New option.
991 2019-03-21 Jakub Jelinek <jakub@redhat.com>
993 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
996 2019-03-19 Martin Sebor <msebor@redhat.com>
998 PR tree-optimization/89688
999 * c-common.c (braced_list_to_string): Make static.
1000 (braced_lists_to_strings): Define new function.
1001 * c-common.h (braced_list_to_string): Remove.
1002 (braced_lists_to_strings): Declare.
1004 2019-03-12 Martin Liska <mliska@suse.cz>
1006 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
1008 2019-03-11 Martin Liska <mliska@suse.cz>
1010 * c-opts.c (c_common_post_options): Wrap apostrophes
1011 in gcc internal format with %'.
1013 2019-03-11 Martin Liska <mliska@suse.cz>
1015 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
1016 in a string format message and fix GNU coding style.
1017 * c-common.c (vector_types_convertible_p): Likewise.
1018 (c_build_vec_perm_expr): Likewise.
1019 * c-indentation.c (get_visual_column): Likewise.
1020 * c-opts.c (c_common_handle_option): Likewise.
1021 (c_common_post_options): Likewise.
1022 (sanitize_cpp_opts): Likewise.
1023 * c-pch.c (c_common_pch_pragma): Likewise.
1024 * c-pragma.c (handle_pragma_pack): Likewise.
1026 2019-03-08 Jakub Jelinek <jakub@redhat.com>
1028 PR tree-optimization/89550
1029 * c-common.c (c_common_truthvalue_conversion): Only set
1030 TREE_NO_WARNING if warning_at returned true.
1031 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
1033 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1034 Martin Sebor <msebor@gmail.com>
1036 * c.opt (Wmissing-attributes): Clean up doc string.
1038 2019-02-25 Jakub Jelinek <jakub@redhat.com>
1041 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1042 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1045 2019-02-22 Richard Biener <rguenther@suse.de>
1047 * c-pch.c (no_checksum): Remove.
1048 (pch_init): Remove assertion that executable_checksum is not
1050 (c_common_valid_pch): Likewise.
1052 2019-02-18 Martin Sebor <msebor@redhat.com>
1055 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1057 2019-02-16 David Malcolm <dmalcolm@redhat.com>
1060 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1061 implementing -Wtype-limits.
1063 2019-02-11 Martin Sebor <msebor@redhat.com>
1066 * c-common.c (invalid_array_size_error): New function.
1067 (valid_array_size_p): Call it. Handle size as well as type.
1068 * c-common.h (valid_constant_size_p): New function.
1069 (enum cst_size_error): New type.
1071 2019-01-31 David Malcolm <dmalcolm@redhat.com>
1074 * known-headers.cc (get_stdlib_header_for_name): Add
1075 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1077 2019-01-31 Jakub Jelinek <jakub@redhat.com>
1080 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1081 a C cast in pp_c_flag_gnu_v3 mode.
1083 2019-01-29 Jakub Jelinek <jakub@redhat.com>
1086 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1087 builtin_structptr_types types even for C.
1089 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1091 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1092 when rhs is of array type correctly. Fix handling of nested structures.
1093 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1094 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1095 type casts within nested compound expressions.
1097 2019-01-22 Jakub Jelinek <jakub@redhat.com>
1100 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1101 variable after using BIT_FIELD_REF.
1103 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1107 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1108 Remove the boolean argument.
1109 * c-warn.c (check_address_of_packed_member): Renamed to ...
1110 (check_address_or_pointer_of_packed_member): This. Also
1111 warn pointer conversion.
1112 (check_and_warn_address_of_packed_member): Renamed to ...
1113 (check_and_warn_address_or_pointer_of_packed_member): This.
1114 Also warn pointer conversion.
1115 (warn_for_address_or_pointer_of_packed_member): Remove the
1116 boolean argument. Don't check pointer conversion here.
1118 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1121 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1123 2019-01-14 Jakub Jelinek <jakub@redhat.com>
1125 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1126 and __cpp_nontype_template_parameter_auto. Add a comment that
1127 __cpp_template_auto is deprecated.
1129 2019-01-14 Tom Honermann <tom@honermann.net>
1131 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1132 * c-common.c (c_common_reswords): Add char8_t.
1133 (fix_string_type): Use char8_t for the type of u8 string literals.
1134 (c_common_get_alias_set): char8_t doesn't alias.
1135 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1137 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1138 (keyword_begins_type_specifier): Add RID_CHAR8.
1139 * c-common.h (rid): Add RID_CHAR8.
1140 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1141 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1142 Define char8_type_node and char8_array_type_node.
1143 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1144 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1145 (c_cpp_builtins): Predefine __cpp_char8_t.
1146 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1148 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1149 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1151 * c.opt: Add the -fchar8_t command line option.
1153 2019-01-14 Martin Sebor <msebor@redhat.com>
1156 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1157 and issue errors if it fails.
1158 * c-common.h (valid_format_string_type_p): Declare.
1159 * c-format.c (valid_stringptr_type_p): Rename...
1160 (valid_format_string_type_p): ...to this and make extern.
1161 (handle_format_arg_attribute): Adjust to new name.
1162 (check_format_string): Same.
1164 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1166 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1167 Replace "may may" with "may" in warning message.
1169 2019-01-07 Jakub Jelinek <jakub@redhat.com>
1172 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1173 (c_build_vec_convert): Declare.
1174 * c-common.c (c_build_vec_convert): New function.
1176 2019-01-04 Martin Sebor <msebor@redhat.com>
1179 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1180 Handle C++ empty throw specification and C11 _Noreturn.
1181 (has_attribute): Also handle C11 _Noreturn.
1183 2019-01-04 Martin Sebor <msebor@redhat.com>
1186 * c-attribs.c (positional_argument): Also accept enumerated types.
1188 2019-01-01 Jakub Jelinek <jakub@redhat.com>
1190 Update copyright years.
1192 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1195 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1196 * c-warn.c (check_alignment_of_packed_member): New function.
1197 (check_address_of_packed_member): Likewise.
1198 (check_and_warn_address_of_packed_member): Likewise.
1199 (warn_for_address_or_pointer_of_packed_member): Likewise.
1200 * c.opt: Add -Wno-address-of-packed-member.
1202 2018-12-20 David Malcolm <dmalcolm@redhat.com>
1205 * c-warn.c (get_outermost_macro_expansion): New function.
1206 (spelled_the_same_p): Use it to unwind the macro expansions, and
1207 compare the outermost macro in each nested expansion, rather than
1210 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1213 * c-common.h (warn_tautological_cmp): Convert 1st param from
1214 location_t to const op_location_t &.
1215 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1216 when testing for INTEGER_CST.
1217 (warn_tautological_bitwise_comparison): Convert 1st param from
1218 location_t to const op_location_t &; use it to build a
1219 binary_op_rich_location, and use this.
1220 (spelled_the_same_p): New function.
1221 (warn_tautological_cmp): Convert 1st param from location_t to
1222 const op_location_t &. Warn for macro expansions if
1223 spelled_the_same_p. Use binary_op_rich_location.
1225 2018-12-19 David Malcolm <dmalcolm@redhat.com>
1229 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1230 (verify_tree): Handle location wrappers.
1231 (c_common_truthvalue_conversion): Strip any location wrapper.
1233 (fold_offsetof): Strip any location wrapper.
1234 (complete_array_type): Likewise for initial_value.
1235 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1236 index before checking for INTEGER_CST.
1237 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1238 print parentheses around location wrappers.
1239 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1240 before checking for INTEGER_CST.
1241 (warn_tautological_bitwise_comparison): Call
1242 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1243 before checking for INTEGER_CST.
1244 (readonly_error): Strip any location wrapper.
1245 (warn_array_subscript_with_type_char): Strip location wrappers
1246 before checking for INTEGER_CST. Use the location of the index if
1249 2018-12-06 Jason Merrill <jason@redhat.com>
1251 PR c++/88136 - -Wdeprecated-copy false positives
1252 * c.opt (Wdeprecated-copy-dtor): New.
1253 (Wdeprecated-copy): Move to -Wextra.
1255 2018-11-29 Martin Sebor <msebor@redhat.com>
1259 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1260 alignments to values less than the target requires.
1261 (has_attribute): For attribute aligned consider both the attribute
1262 and the alignment bits.
1263 * c-common.c (c_init_attributes): Optionally issue a warning for
1266 2018-11-28 Martin Sebor <msebor@redhat.com>
1270 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1271 or destination is an error.
1273 2018-11-28 Jakub Jelinek <jakub@redhat.com>
1276 * c-ubsan.c: Include langhooks.h.
1277 (ubsan_instrument_division): Change gcc_assert that main variants
1278 of op0 and op1 types are equal to gcc_checking_assert that the
1279 main variants are compatible types.
1281 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1283 * c-ada-spec.c: Include stringpool.h.
1284 (has_static_fields): Return false for incomplete types.
1285 (is_tagged_type): Likewise.
1286 (has_nontrivial_methods): Likewise.
1287 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1288 (struct overloaded_name_hash): New structure.
1289 (struct overloaded_name_hasher): Likewise.
1290 (overloaded_names): New global variable.
1291 (init_overloaded_names): New static function.
1292 (overloaded_name_p): New predicate.
1293 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1294 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1295 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1296 Remove always-true condition and dump forward types.
1297 (dump_ada_specs): Delete overloaded_names.
1299 2018-11-20 Martin Sebor <msebor@redhat.com>
1301 * c-attribs.c (type_for_vector_size): New function.
1302 (type_valid_for_vector_size): Same.
1303 (handle_vector_size_attribute): Move code to the functions above
1305 (validate_attribute, has_attribute): New functions.
1306 * c-common.h (has_attribute): Declare.
1307 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1308 * c-common.c (c_common_resword): Same.
1310 2018-11-16 Jason Merrill <jason@redhat.com>
1312 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1313 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1315 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1318 * c-common.c (fix_string_type): Reject string literals larger than
1319 TYPE_MAX_VALUE (ssizetype) bytes.
1321 2018-11-15 Martin Sebor <msebor@redhat.com>
1325 * c-attribs.c (positional_argument): New function.
1326 (handle_alloc_size_attribute): Use it and simplify.
1327 (handle_alloc_align_attribute): Same.
1328 (handle_assume_aligned_attribute): Same.
1329 (handle_nonnull_attribute): Same.
1330 * c-common.c (check_function_arguments): Pass fntype to
1331 check_function_format.
1332 * c-common.h (check_function_format): Add an argument.
1333 (PosArgFlags, positional_argument): Declare new type and function.
1334 * c-format.c (decode_format_attr): Add arguments.
1335 (check_format_string, get_constant): Same.
1336 (convert_format_name_to_system_name): Adjust.
1338 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1341 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1343 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1345 P1236R1 - Signed integers are two's complement
1346 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1347 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1348 with in-range second operand well defined for -std=c++2a.
1351 * c-common.c (parse_optimize_options): Allocate option string from
1352 opts_obstack rather than as GC memory. Move the allocation after
1353 warning for invalid option.
1355 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1357 * c-common.c (c_get_substring_location): Update for renaming of
1358 get_source_location_for_substring to get_location_within_string.
1359 * c-lex.c: Replace "source_location" with "location_t".
1360 * c-opts.c: Likewise.
1361 * c-ppoutput.c: Likewise.
1363 2018-11-13 Martin Sebor <msebor@redhat.com>
1366 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1367 (handle_tls_model_attribute): Improve diagnostics.
1369 2018-11-12 Jason Merrill <jason@redhat.com>
1371 * c-cppbuiltin.c (c_cpp_builtins): Define
1372 __cpp_impl_destroying_delete.
1374 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1375 __cpp_conditional_explicit.
1377 2018-11-09 Martin Sebor <msebor@redhat.com>
1380 * c-attribs.c (handle_copy_attribute): New function.
1382 2018-11-09 Martin Sebor <msebor@redhat.com>
1385 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1387 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1389 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1390 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1391 enum omp_memory_order MEMORY_ORDER.
1392 (c_finish_omp_flush): Add MO argument.
1393 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1394 (c_finish_omp_for): Add FINAL_P argument.
1395 * c-omp.c: Include memmodel.h.
1396 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1397 OMP_TASKGROUP_CLAUSES to it.
1398 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1399 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1400 instead of OMP_ATOMIC_SEQ_CST.
1401 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1402 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1403 __atomic_thread_fence call with the given value.
1404 (check_omp_for_incr_expr): Formatting fixes.
1405 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1406 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1407 is not constant expression 1 or -1. Transform NE_EXPR loops
1408 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1409 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1411 (c_omp_split_clauses): Add support for combined
1412 #pragma omp parallel master and
1413 #pragma omp {,parallel }master taskloop{, simd} constructs.
1414 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1415 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1416 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1417 (c_omp_predetermined_sharing): Don't return
1418 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1419 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1420 PRAGMA_OMP_REQUIRES.
1421 * c-pragma.h (enum pragma_kind): Likewise.
1422 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1423 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1425 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1427 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1429 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1431 * c-format.c (local_cgraph_node_ptr_node): New variable.
1432 (gcc_dump_printf_char_table): Add entry for %C.
1433 (get_pointer_to_named_type): New function, taken from the handling
1434 code for "gimple *" from...
1435 (init_dynamic_diag_info): ...here. Add handling for
1437 * c-format.h (T_CGRAPH_NODE): New.
1439 2018-10-19 Jason Merrill <jason@redhat.com>
1441 * c-cppbuiltin.c (c_cpp_builtins): Add
1442 __cpp_nontype_template_parameter_class.
1444 2018-10-31 Nathan Sidwell <nathan@acm.org>
1446 * c-opts.c (c_finish_options): Force command line macro
1447 location. Refactor to avoid repeating main debug hook.
1448 (push_command_line_include): Clarify comment.
1450 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1452 2018-10-30 Martin Sebor <msebor@redhat.com>
1455 * c-format.c (check_format_types): Avoid diagnosing null pointer
1456 arguments to printf-family of functions.
1458 2018-10-30 Marek Polacek <polacek@redhat.com>
1460 Implement P0892R2, explicit(bool).
1461 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1463 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1465 * name-hint.h (name_hint::take_deferred): New member function.
1467 2018-10-29 David Malcolm <dmalcolm@redhat.com>
1470 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1472 (check_function_restrict): Rename param "argarray" to
1473 "unfolded_argarray", and make a copy named "argarray", calling
1474 fold_for_warn on each argument.
1475 (check_function_arguments): Add note about responsibility for
1476 folding the arguments.
1478 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1480 * c-common.c (flag_isoc2x): New variable.
1481 * c-common.h (clk_c): Update comment to reference C2X.
1482 (flag_isoc99, flag_isoc11): Update comments to reference future
1483 standard versions in general.
1484 (flag_isoc2x): Declare.
1485 * c-opts.c (set_std_c2x): New function.
1486 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1487 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1489 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1491 2018-10-17 Joseph Myers <joseph@codesourcery.com>
1493 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1494 (std=iso9899:2018): Document C17 as published in 2018.
1496 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1499 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1501 2018-10-11 Will Wray <wjwray@gmail.com>
1504 * c-pretty-print.h (pp_c_type_cast): Prototype.
1505 (pp_c_integer_constant): Likewise.
1506 * c-pretty-print.c (pp_c_type_cast): No longer static.
1507 (pp_c_integer_constant): Likewise.
1508 (pp_c_enumeration_constant): Fix loop termination when finding
1509 name of constant. No longer returns a value. Call
1510 pp_c_integer_constant.
1511 (c_pretty_printer::constant): Update for changes to
1512 pp_c_enumeration_constant.
1514 2018-10-11 Jakub Jelinek <jakub@redhat.com>
1516 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1517 for no_unique_address.
1519 2018-10-09 David Malcolm <dmalcolm@redhat.com>
1521 * c-common.c (c_option_controlling_cpp_error): Rename to...
1522 (c_option_controlling_cpp_diagnostic): ...this, and convert
1523 "reason" from int to enum.
1524 (c_cpp_error): Rename to...
1525 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1526 * c-common.h (c_cpp_error): Rename to...
1527 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1528 * c-opts.c (c_common_init_options): Update for renaming.
1530 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1533 * c-common.c (vector_types_compatible_elements_p): Use
1534 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1536 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1538 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1539 to generate constructor destructor priority warning.
1540 * c.opt (-Wprio-ctor-dtor): New option.
1542 2018-10-01 Jason Merrill <jason@redhat.com>
1544 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1546 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1548 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1549 (dump_ada_node): Add const keyword.
1551 2018-09-25 Martin Liska <mliska@suse.cz>
1553 * c-common.c (c_common_truthvalue_conversion):
1554 Remove Pascal from documentation.
1556 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1558 * c-ada-spec.c: Include diagnostic.h.
1559 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1561 2018-09-19 Marek Polacek <polacek@redhat.com>
1563 * c.opt (Wclass-conversion): New.
1565 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1567 * c-format.c (range_label_for_format_type_mismatch::get_text):
1568 Update for new param.
1570 2018-09-17 David Malcolm <dmalcolm@redhat.com>
1572 * c-format.c (format_warning_at_char): Update for introduction of
1573 format_string_diagnostic_t.
1574 (format_type_warning): Likewise.
1576 2018-09-17 Martin Jambor <mjambor@suse.cz>
1579 * c.opt (Wabsolute-value): New.
1581 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1583 * c-common.c (complete_flexible_array_elts): New helper function.
1584 * c-common.h (complete_flexible_array_elts): Declare.
1586 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1588 * c-common.c (braced_list_to_string): Remove eval parameter.
1589 Add some more checks. Always create zero-terminated STRING_CST.
1590 * c-common.h (braced_list_to_string): Adjust prototype.
1592 2018-08-27 David Malcolm <dmalcolm@redhat.com>
1595 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1597 (maybe_suggest_missing_token_insertion): Likewise.
1598 (maybe_add_include_fixit): Add param "override_location". If set,
1599 and source-printing is enabled, then override the rich_location's
1600 primary location with that of the insertion point for the fix-it
1601 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1602 * c-common.h (extern void maybe_add_include_fixit): Add bool
1604 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1605 for conversion of show_caret_p to a tri-state.
1606 * c-warn.c (warn_for_restrict): Likewise.
1608 (suggest_missing_header::~suggest_missing_header): Update call to
1609 maybe_add_include_fixit to suggest overriding the location, as it
1612 2018-08-27 Martin Liska <mliska@suse.cz>
1614 * c-common.c (check_function_restrict): Use new function
1615 fndecl_built_in_p and remove check for FUNCTION_DECL if
1617 (check_builtin_function_arguments): Likewise.
1618 (reject_gcc_builtin): Likewise.
1619 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1621 2018-08-26 Marek Polacek <polacek@redhat.com>
1623 PR c++/87029, Implement -Wredundant-move.
1624 * c.opt (Wredundant-move): New option.
1626 2018-08-21 Marek Polacek <polacek@redhat.com>
1628 PR c++/86981, Implement -Wpessimizing-move.
1629 * c.opt (Wpessimizing-move): New option.
1631 2018-08-20 David Malcolm <dmalcolm@redhat.com>
1634 * c-attribs.c (common_handle_aligned_attribute): Add
1635 auto_diagnostic_group instance.
1636 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1637 * c-opts.c (c_common_post_options): Likewise.
1638 * c-warn.c (warn_logical_not_parentheses): Likewise.
1639 (warn_duplicated_cond_add_or_warn): Likewise.
1640 (warn_for_multistatement_macros): Likewise.
1642 2018-08-20 Nathan Sidwell <nathan@acm.org>
1644 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1647 2018-08-17 Nathan Sidwell <nathan@acm.org>
1649 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1651 (laxy_hex_fp_value_count): Make unsigned.
1652 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1653 manipulate the macro.
1654 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1657 2018-08-17 David Malcolm <dmalcolm@redhat.com>
1659 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1660 (gcc_dump_printf_length_specs): New.
1661 (gcc_dump_printf_flag_pairs): New.
1662 (gcc_dump_printf_flag_specs): New.
1663 (gcc_dump_printf_char_table): New.
1664 (format_types_orig): Add entry for "gcc_dump_printf".
1665 (init_dynamic_diag_info): Set up length_char_specs and
1666 conversion_specs for gcc_dump_printf_format_type.
1667 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1669 2018-08-17 Nathan Sidwell <nathan@acm.org>
1671 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1673 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1674 * c-cppbuiltin.c: Likewise.
1676 2018-08-17 Martin Liska <mliska@suse.cz>
1678 * c.opt: Remove Warn, Init and Report for options with
1679 Ignore/Deprecated flag. Warning is done automatically for
1682 2018-08-16 David Malcolm <dmalcolm@redhat.com>
1685 * c-common.c (selftest::c_family_tests): Call
1686 selftest::c_indentation_c_tests.
1687 * c-common.h (selftest::c_indentation_c_tests): New decl.
1688 * c-indentation.c: Include "selftest.h".
1689 (next_tab_stop): Add "tab_width" param, rather than accessing
1691 (get_visual_column): Likewise. Clarify comment. Bulletproof
1692 against reading past the end of the line.
1693 (get_first_nws_vis_column): Add "tab_width" param.
1694 (detect_intervening_unindent): Likewise.
1695 (should_warn_for_misleading_indentation): Read tab width from
1696 cpp_opts and pass around.
1697 (selftest::test_next_tab_stop): New test.
1698 (selftest::assert_get_visual_column_succeeds): New function.
1699 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1700 (selftest::assert_get_visual_column_fails): New function.
1701 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1702 (selftest::test_get_visual_column): New test.
1703 (selftest::c_indentation_c_tests): New function.
1705 2018-08-16 Nathan Sidwell <nathan@acm.org>
1707 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1708 (store_ada_macro): Likewise.
1709 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1710 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1712 2018-08-15 David Malcolm <dmalcolm@redhat.com>
1714 * c-format.c: Include "selftest-diagnostic.h" and
1715 "gcc-rich-location.h".
1716 (format_warning_at_char): Pass NULL for new label params of
1718 (class indirection_suffix): New class.
1719 (class range_label_for_format_type_mismatch): New class.
1720 (format_type_warning): Move logic for generating "*" suffix to
1721 class indirection_suffix. Create "fmt_label" and "param_label"
1722 to show their types, and pass them to the
1723 format_warning_at_substring calls.
1724 (selftest::test_type_mismatch_range_labels): New test.
1725 (selftest::c_format_c_tests): Call it.
1727 2018-08-13 Martin Sebor <msebor@redhat.com>
1729 PR tree-optimization/71625
1730 * c-common.c (braced_list_to_string): New function.
1731 * c-common.h (braced_list_to_string): Declare it.
1733 2018-08-08 Nathan Sidwell <nathan@acm.org>
1735 * c-common.c (try_to_locate_new_include_inertion_point): Use
1736 linemap_included_from_linemap.
1737 * c-lex.c (fe_file_change): Use linemap_included_from.
1738 * c-ppoutput.c (pp_file_change): Likewise.
1740 2018-08-01 Martin Sebor <msebor@redhat.com>
1742 PR tree-optimization/86650
1743 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1744 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1745 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1746 * c-format.h (T89_G): Update to be "gimple *" rather than
1748 (local_gcall_ptr_node): Rename...
1749 (local_gimple_ptr_node): ...to this.
1751 2018-07-31 David Malcolm <dmalcolm@redhat.com>
1753 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1754 table entries for gcc_diag_char_table, and the 'Z' entry from
1755 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1756 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1757 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1758 adding missing "Z" for this table. Remove erroneous "G" and "K"
1760 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1761 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1762 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1764 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
1766 * c-common.c (speculation_safe_resolve_call): New function.
1767 (speculation_safe_resolve_params): New function.
1768 (speculation_safe_resolve_return): New function.
1769 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1770 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1771 __HAVE_SPECULATION_SAFE_VALUE.
1773 2018-07-20 David Malcolm <dmalcolm@redhat.com>
1775 * c-common.c (c_cpp_error): Remove redundant "line_table"
1776 parameter from call to rich_location::set_range.
1777 (maybe_suggest_missing_token_insertion): Likewise.
1779 2018-07-20 Martin Sebor <msebor@redhat.com>
1782 * c.opt (-Warray-bounds): Remove redundant -Wall.
1784 2018-07-20 Martin Sebor <msebor@redhat.com>
1787 * c-common.h (c_common_handle_option): Change function argument
1789 * c-opts.c (c_common_init_options): Same.
1790 (c_common_handle_option): Same. Remove special handling of
1791 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1792 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1793 options to take a HOST_WIDE_INT argument and accept a byte-size
1795 (-Wvla-larger-than): Same.
1796 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1797 (-Wno-vla-larger-than): Same.
1799 2018-07-12 Jakub Jelinek <jakub@redhat.com>
1801 * c-attribs.c (c_common_attribute_table): Add
1802 "omp declare target implicit" attribute.
1804 2018-07-12 Richard Biener <rguenther@suse.de>
1807 * c-attribs.c (handle_packed_attribute): Do not build a variant
1808 type with TYPE_PACKED, instead ignore the attribute if we may
1809 not apply to the original type.
1811 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1814 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1815 to contain TREE_LIST for both the original class iterator and the
1818 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1820 * c-ada-spec.c (to_ada_name): Remove index parameter.
1821 (pp_ada_tree_identifier): Likewise.
1822 (dump_ada_macros): Adjust call to to_ada_name.
1823 (struct overloaded_name_hash): Delete.
1824 (struct overloaded_name_hasher): Likewise.
1825 (overloaded_names): Likewise.
1826 (compute_overloading_index): Likewise.
1827 (dump_ada_decl_name): Do not call compute_overloading_index and
1828 adjust calls to pp_ada_tree_identifier.
1829 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1830 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1831 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1832 (dump_ada_enum_type): Remove type and display_convention parameters.
1833 Adjust calls to pp_ada_tree_identifier.
1834 (dump_ada_node): Likewise and for dump_ada_structure.
1835 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1837 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1839 (print_constructor): Adjust call to pp_ada_tree_identifier.
1840 (print_destructor): Likewise.
1841 (dump_ada_declaration): Switch to aspect syntax.
1842 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1843 parameter with nested parameter.
1844 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1845 (dump_ada_specs): Do not delete overloaded_names table.
1847 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
1850 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
1853 2018-07-05 Nathan Sidwell <nathan@acm.org>
1855 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1856 NO_IMPLICIT_EXTERN_C.
1858 2018-06-28 Martin Liska <mliska@suse.cz>
1860 * cppspec.c: Include opt-suggestions.h.
1862 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1863 Thomas Schwinge <thomas@codesourcery.com>
1864 Cesar Philippidis <cesar@codesourcery.com>
1866 * c-pragma.h (enum pragma_omp_clause): Add
1867 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1868 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1870 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1873 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1876 2018-06-18 Martin Sebor <msebor@redhat.com>
1879 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1882 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1884 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1886 2018-06-13 Jason Merrill <jason@redhat.com>
1888 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1889 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1892 PR c++/86094 - wrong code with defaulted move ctor.
1893 * c-opts.c (c_common_post_options): Bump the current ABI version to
1894 13. Set warn_abi_version and flag_abi_compat_version to the current
1895 version rather than 0. Fix defaulting flag_abi_compat_version from
1898 2018-06-12 Martin Sebor <msebor@redhat.com>
1901 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1902 sizeof source and destination yields the same value.
1904 2018-06-12 Martin Liska <mliska@suse.cz>
1906 * c.opt: Make MPX-related options as Deprecated.
1908 2018-06-08 David Malcolm <dmalcolm@redhat.com>
1910 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1913 2018-06-08 Martin Liska <mliska@suse.cz>
1915 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1916 for MPX (macros, related functions, fields in cgraph_node, ...).
1917 (handle_bnd_legacy): Likewise.
1918 (handle_bnd_instrument): Likewise.
1921 2018-06-06 Jakub Jelinek <jakub@redhat.com>
1924 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1925 __cpp_transactional_memory to 201500 instead of 210500.
1927 2018-06-06 Jason Merrill <jason@redhat.com>
1929 PR c++/85710 - ICE with -Wmemset-elt-size.
1930 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1932 2018-06-01 Jason Merrill <jason@redhat.com>
1934 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1937 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1939 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1940 declaration for a typedef independently of whether the declaration of
1941 the subtype is generated.
1943 2018-05-31 Martin Sebor <msebor@redhat.com>
1946 * c.opt (-Wno-alloc-size-larger-than): New option.
1948 2018-04-22 David Pagan <dave.pagan@oracle.com>
1951 * c-opts.c (c_common_post_options): Set default for warn_return_type
1952 for C++/C++ with ObjC extensions only. For C, makes it possible to
1953 differentiate between default (no option), -Wreturn-type, and
1956 2018-05-29 Jason Merrill <jason@redhat.com>
1958 * c.opt (Winit-list-lifetime): New flag.
1960 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1962 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1963 splay_tree_delete_pointers.
1965 2018-05-26 Jakub Jelinek <jakub@redhat.com>
1968 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1969 noinline variable to workaround broken kernel headers.
1971 2018-05-18 Jason Merrill <jason@redhat.com>
1973 * c.opt (Wdeprecated-copy): New flag.
1975 2018-05-17 Martin Liska <mliska@suse.cz>
1977 * c-warn.c (overflow_warning): Do not use
1978 space in between 'G_' and '('.
1980 2018-05-09 Jason Merrill <jason@redhat.com>
1982 * c-common.c (valid_array_size_p): Add complain parameter.
1983 * c-common.h: ...which defaults to true.
1985 2018-05-11 Jakub Jelinek <jakub@redhat.com>
1988 * c-omp.c (c_omp_predetermined_sharing): Return
1989 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1991 2018-05-11 Martin Liska <mliska@suse.cz>
1994 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1997 2018-05-10 Jakub Jelinek <jakub@redhat.com>
2000 * c-common.h (fold_offsetof_1): Removed.
2001 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
2002 CTX argument defaulted to ERROR_MARK.
2003 * c-common.c (fold_offsetof_1): Renamed to ...
2004 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
2005 argument, convert the pointer constant to TYPE and use size_binop
2006 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
2007 a pointer type. Adjust recursive calls.
2009 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
2012 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
2014 2018-05-07 Nathan Sidwell <nathan@acm.org>
2016 * c.opt (ffor-scope): Remove functionality, issue warning.
2018 2018-05-03 Nathan Sidwell <nathan@acm.org>
2020 * c.opt (ffriend-injection): Remove functionality, issue warning.
2022 2018-05-01 David Malcolm <dmalcolm@redhat.com>
2025 * c-format.c (struct format_check_results): Add field
2027 (check_format_info): Initialize it, and warn if encountered.
2028 (check_format_arg): Distinguish between wide char and
2029 everything else when detecting arrays of non-char.
2031 2018-04-30 David Malcolm <dmalcolm@redhat.com>
2033 * c-format.c (get_corrected_substring): Update for
2034 location_get_source_line returning a char_span. Use a char_span
2035 when handling the prefix of the correction.
2036 * c-indentation.c (get_visual_column): Update for
2037 location_get_source_line returning a char_span.
2038 (get_first_nws_vis_column): Likewise.
2040 2018-03-29 David Malcolm <dmalcolm@redhat.com>
2043 * known-headers.cc (get_stdlib_header_for_name): Add various names
2044 from <assert.h>, <string.h>, and <memory.h>; add more names from
2047 2018-03-27 Jakub Jelinek <jakub@redhat.com>
2050 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2051 get_base_address of the second operand is a VAR_P, rather than the
2052 operand itself, and use gcc_checking_assert instead of gcc_assert.
2054 2018-03-23 Marek Polacek <polacek@redhat.com>
2057 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2058 <case RDIV_EXPR>: Tweak condition.
2060 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2062 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2064 2018-03-16 Jakub Jelinek <jakub@redhat.com>
2067 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2071 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2074 2018-03-16 Richard Biener <rguenther@suse.de>
2077 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2078 unshare the possibly folded expression.
2080 2018-03-15 Richard Biener <rguenther@suse.de>
2083 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2085 2018-03-13 Martin Sebor <msebor@redhat.com>
2087 PR tree-optimization/84725
2088 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2089 with all three narrow character types, including their qualified forms.
2091 2018-03-12 Martin Sebor <msebor@redhat.com>
2093 PR tree-optimization/83456
2094 * c-common.c (check_function_restrict): Return bool.
2095 Restore checking of bounded built-in functions.
2096 (check_function_arguments): Also return the result
2097 of warn_for_restrict.
2098 * c-common.c (check_function_restrict): Return bool.
2099 * c-warn.c (warn_for_restrict): Return bool.
2101 2018-03-02 Marek Polacek <polacek@redhat.com>
2104 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2107 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2109 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2112 2018-03-01 Marek Polacek <polacek@redhat.com>
2115 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2116 alignment in computation.
2118 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2120 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2121 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2123 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2125 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2126 (is_char_array): Take a type instead of a declaration.
2127 (dump_ada_array_type): Likewise.
2128 (is_simple_enum): Minor tweak.
2129 (dump_ada_enum_type): New function extracted from...
2130 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2131 <INTEGER_TYPE>: Remove unreachable code.
2132 <RECORD_TYPE>: Likewise. Minor tweaks.
2133 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2134 <ENUMERAL_TYPE>: New case.
2135 <RECORD_TYPE>: Factor out common code.
2136 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2137 Minor tweaks. Deal with enumeral types.
2138 (dump_ada_structure): Minor tweaks.
2140 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2142 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2143 address for incomplete structures.
2144 (dump_forward_type): Do not bail out for incomplete structures.
2145 (dump_ada_declaration): Do not special-case incomplete structures
2146 for subtypes. Dump them as null records for types.
2148 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2150 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2151 (is_char_array): Fix formatting.
2152 (dump_template_types): Likewise.
2153 (dump_generic_ada_node): Rename into...
2154 (dump_ada_node): ...this.
2155 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2156 incomplete structures and not for empty structures. Do not use it
2157 when forward declarations are needed.
2158 (dump_forward_type): New function.
2159 (dump_nested_types): Remove FORWARD parameter. Do not consider
2160 TREE_VISITED and do not generate a forward declaration. Only dump
2161 original nested types for nested declaration.
2162 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2163 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2164 <RECORD_TYPE>: Do not consider TREE_VISITED.
2165 (dump_ada_declaration): Use booleans and fix formatting throughout.
2166 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2167 Call dump_forward_type instead of dump_nested_types for a typedef.
2168 Remove superfluous check and adjust call to dump_nested_types.
2169 <POINTER_TYPE>: Call dump_forward_type and fall through.
2170 (dump_ada_struct_decl): Rename into...
2171 (dump_ada_structure): ...this. Do not special-case empty structures.
2173 2018-02-27 Martin Sebor <msebor@redhat.com>
2176 * c.opt (-Wmissing-attributes): New option.
2178 2018-02-21 Martin Liska <mliska@suse.cz>
2180 * c.opt (Wcatch-value=): Add IntegerRange.
2182 2018-02-15 Jason Merrill <jason@redhat.com>
2184 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2186 2018-02-09 Nathan Sidwell <nathan@acm.org>
2189 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2191 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2194 2018-02-09 Martin Sebor <msebor@redhat.com>
2197 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2198 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2199 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2200 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2201 (-Wuninitialized): Same.
2203 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2205 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2206 keyword for components.
2208 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2210 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2212 2018-02-02 Julia Koval <julia.koval@intel.com>
2214 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2216 2018-01-29 Marek Polacek <polacek@redhat.com>
2219 * c-format.c (check_function_format): Check current_function_decl.
2221 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2223 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2225 (LAZY_HEX_FP_VALUES_CNT): Define.
2226 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2227 values rather than just 12.
2228 (builtin_define_with_hex_fp_value): Likewise.
2230 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2233 * c.opt (-fmacro-prefix-map): New option.
2234 * c-opts.c (c_common_handle_option): Handle it.
2235 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2236 * c-ppoutput.c (init_pp_output): Likewise.
2238 2018-01-17 David Malcolm <dmalcolm@redhat.com>
2241 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2243 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2245 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2246 Skip 'f' and 'F' characters if it is true.
2247 (store_ada_macro): Minor tweak.
2248 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2249 <CPP_WSTRING>: Likewise.
2250 <CPP_STRING>: Output '&' in the buffer if not the first string.
2251 <CPP_NUMBER>: Adjust calls to dump_number.
2253 2018-01-10 David Malcolm <dmalcolm@redhat.com>
2256 * c-common.c: Include "selftest.h".
2257 (get_atomic_generic_size): Perform the test for integral type
2258 before the range test for any integer constant, fixing indentation
2259 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2260 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2261 (selftest::test_fold_for_warn): New function.
2262 (selftest::c_common_c_tests): New function.
2263 (selftest::c_family_tests): Call it, and
2264 selftest::c_pretty_print_c_tests.
2265 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2266 * c-format.c (check_format_arg): Convert VAR_P check to a
2268 * c-pretty-print.c: Include "selftest.h".
2269 (pp_c_cast_expression): Don't print casts for location wrappers.
2270 (selftest::assert_c_pretty_printer_output): New function.
2271 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2272 (selftest::test_location_wrappers): New function.
2273 (selftest::c_pretty_print_c_tests): New function.
2274 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2277 Alan Hayward <alan.hayward@arm.com>
2278 David Sherwood <david.sherwood@arm.com>
2280 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2282 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2283 Alan Hayward <alan.hayward@arm.com>
2284 David Sherwood <david.sherwood@arm.com>
2286 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2289 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2290 Alan Hayward <alan.hayward@arm.com>
2291 David Sherwood <david.sherwood@arm.com>
2293 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2294 (convert_vector_to_array_for_subscript): Handle polynomial
2295 TYPE_VECTOR_SUBPARTS.
2296 (c_common_type_for_mode): Check valid_vector_subparts_p.
2297 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2300 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2302 Update copyright years.
2304 2017-12-22 Mike Stump <mikestump@comcast.net>
2305 Eric Botcazou <ebotcazou@adacore.com>
2307 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2308 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2310 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
2314 * c-semantics.c (only_debug_stmts_after_p): New.
2315 (pop_stmt_list): Clear side effects in debug-only stmt list.
2316 Check for single nondebug stmt followed by debug stmts only.
2318 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
2321 * c-semantics.c (pop_stmt_list): Propagate side effects from
2322 single nondebug stmt to container list.
2324 2017-12-19 Jakub Jelinek <jakub@redhat.com>
2326 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2327 conditions with typical order conditions.
2329 2017-12-18 Marek Polacek <polacek@redhat.com>
2331 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2334 2017-12-17 Martin Sebor <msebor@redhat.com>
2336 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2337 an error for attribute warn_if_not_aligned.
2339 2017-12-16 Martin Sebor <msebor@redhat.com>
2341 PR tree-optimization/78918
2342 * c-common.c (check_function_restrict): Avoid checking built-ins.
2343 * c.opt (-Wrestrict): Include in -Wall.
2345 2017-12-15 Jakub Jelinek <jakub@redhat.com>
2347 * c-attribs.c (c_common_attribute_table,
2348 c_common_format_attribute_table): Swap affects_type_identity
2349 and handler fields, adjust comments.
2351 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2353 * c.opt (Wcast-function-type): New warning option.
2354 * c-lex.c (get_fileinfo): Avoid warning.
2355 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2357 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
2360 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2361 Adjust the size of buf1 and buf2, add a new buf to avoid
2362 format-overflow warning.
2364 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
2366 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2367 subsequent statement list.
2369 2017-12-07 Martin Sebor <msebor@redhat.com>
2373 * c-attribs.c (attr_aligned_exclusions): New array.
2374 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2375 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2376 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2377 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2378 (attr_warn_unused_result_exclusions): Same.
2379 (handle_hot_attribute, handle_cold_attribute): Simplify.
2380 (handle_const_attribute): Warn on function returning void.
2381 (handle_pure_attribute): Same.
2382 (handle_aligned_attribute): Diagnose conflicting attribute
2384 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2386 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2389 * c-common.c (selftest::c_family_tests): Call
2390 selftest::c_spellcheck_cc_tests.
2391 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2392 * c-spellcheck.cc: Include "selftest.h".
2393 (name_reserved_for_implementation_p): New function.
2394 (should_suggest_as_macro_p): New function.
2395 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2396 should_suggest_as_macro_p and call it.
2397 (selftest::test_name_reserved_for_implementation_p): New function.
2398 (selftest::c_spellcheck_cc_tests): New function.
2399 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2401 2017-12-06 David Malcolm <dmalcolm@redhat.com>
2403 * c-spellcheck.cc: New file, taken from macro-handling code in
2405 * c-spellcheck.h: New file, taken from macro-handling code in
2408 2017-12-01 Jakub Jelinek <jakub@redhat.com>
2410 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2412 (handle_simd_attribute): Don't check for "cilk simd function"
2413 attribute. Reindent, formatting changes.
2415 2017-11-30 Julia Koval <julia.koval@intel.com>
2417 * c-common.h (inv_list): Remove.
2419 2017-11-28 Jakub Jelinek <jakub@redhat.com>
2422 * c-common.c (c_switch_covers_all_cases_p_1,
2423 c_switch_covers_all_cases_p): New functions.
2424 * c-common.h (c_switch_covers_all_cases_p): Declare.
2426 2017-11-28 Julia Koval <julia.koval@intel.com>
2427 Sebastian Peryt <sebastian.peryt@intel.com>
2429 * array-notation-common.c: Delete.
2430 * c-cilkplus.c: Ditto.
2431 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2432 * c-common.def (ARRAY_NOTATION_REF): Remove.
2433 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2434 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2435 c_validate_cilk_plus_loop, cilkplus_an_parts,
2436 cilk_ignorable_spawn_rhs_op,
2437 cilk_recognize_spawn): Remove.
2438 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2439 * c-omp.c: Remove CILK_SIMD check.
2440 * c-pragma.c: Ditto.
2441 * c-pragma.h: Remove CILK related pragmas.
2442 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2443 ARRAY_NOTATION_REF condition.
2444 (c_pretty_printer::expression): Ditto.
2445 * c.opt (fcilkplus): Remove.
2448 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
2450 * c-pretty-print.c (pp_c_additive_expression,
2451 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2453 2017-11-21 Jakub Jelinek <jakub@redhat.com>
2455 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2458 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2459 instead of tree_to_uhwi, formatting fix.
2461 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2464 * known-headers.cc: New file, based on material from c/c-decl.c.
2465 (suggest_missing_header): Copied as-is.
2466 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2467 heavily edited to add C++ support. Add some knowledge about
2468 <limits.h>, <stdint.h>, and <wchar.h>.
2469 * known-headers.h: Likewise.
2471 2017-11-20 David Malcolm <dmalcolm@redhat.com>
2473 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2474 (lookup_name_fuzzy): Likewise. Convert return type from
2475 const char * to name_hint. Add location_t param.
2476 * name-hint.h: New header.
2478 2017-11-19 Jakub Jelinek <jakub@redhat.com>
2482 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2484 2017-11-16 Joseph Myers <joseph@codesourcery.com>
2486 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2487 expected publication date of C17.
2488 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2490 2017-11-15 Joseph Myers <joseph@codesourcery.com>
2493 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2494 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2496 2017-11-10 Martin Sebor <msebor@redhat.com>
2499 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2500 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2501 * c.opt (-Wstringop-truncation): New option.
2503 2017-11-06 Martin Liska <mliska@suse.cz>
2506 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2508 * c.opt: Set default value of warn_return_type.
2510 2017-10-31 David Malcolm <dmalcolm@redhat.com>
2512 * c-common.c (binary_op_error): Update for renaming of
2514 (c_parse_error): Likewise.
2515 * c-warn.c (warn_logical_not_parentheses): Likewise for
2516 renaming of inform_at_rich_loc.
2517 (warn_for_restrict): Likewise for renaming of
2518 warning_at_rich_loc_n.
2520 2017-10-30 Joseph Myers <joseph@codesourcery.com>
2522 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2523 * c-opts.c (set_std_c17): New function.
2524 (c_common_init_options): Use gnu17 as default C version.
2525 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2527 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2529 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2530 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2531 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2534 2017-10-23 Marek Polacek <polacek@redhat.com>
2537 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2539 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2541 * c-common.c (check_builtin_function_arguments): Also check arguments
2542 of __builtin_alloca_with_align_and_max.
2544 2017-10-17 David Malcolm <dmalcolm@redhat.com>
2546 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2547 rather than NULL to format_warning_va.
2548 (check_format_types): Likewise when calling format_type_warning.
2549 Remove code to extract source_ranges and source_range * in favor
2550 of just a location_t.
2551 (format_type_warning): Convert source_range * param to a
2554 2017-10-13 Jakub Jelinek <jakub@redhat.com>
2556 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2559 2017-10-12 David Malcolm <dmalcolm@redhat.com>
2561 * c-common.c (enum missing_token_insertion_kind): New enum.
2562 (get_missing_token_insertion_kind): New function.
2563 (maybe_suggest_missing_token_insertion): New function.
2564 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2566 2017-10-11 Nathan Sidwell <nathan@acm.org>
2568 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2569 (c_common_handle_option): Update incpath_kind names.
2571 2017-10-11 Martin Liska <mliska@suse.cz>
2574 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2575 Wattributes warning.
2577 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2579 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2580 operating on trees as wide_ints.
2581 * c-common.c (pointer_int_sum): Likewise.
2582 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2583 * c-warn.c (match_case_to_enum_1): Likewise.
2584 (c_do_switch_warnings): Likewise.
2585 (maybe_warn_shift_overflow): Likewise.
2587 2017-10-10 Jakub Jelinek <jakub@redhat.com>
2590 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2591 instead of wide_int::from.
2593 2017-10-06 Jakub Jelinek <jakub@redhat.com>
2596 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2597 using to_widest use wide_int with the larger of the two precisions.
2599 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2601 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2604 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2606 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2607 when combining the original unconverted comparison operands.
2609 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2611 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2614 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2616 * c-ada-spec.c (to_ada_name): Add index parameter.
2617 (pp_ada_tree_identifier): Likewise.
2618 (dump_ada_macros): Adjust call to to_ada_name.
2619 (struct overloaded_name_hash): New type.
2620 (struct overloaded_name_hasher): Likewise.
2621 (overloaded_names): New hash table.
2622 (compute_overloading_index): New function.
2623 (dump_ada_decl_name): Call it and pass the result to
2624 pp_ada_tree_identifier.
2625 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2626 (dump_ada_function_declaration): Likewise.
2627 (dump_generic_ada_node): Likewise.
2628 (print_constructor): Likewise.
2629 (print_destructor): Likewise.
2630 (dump_ada_specs): Delete overloaded_names table.
2632 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2634 * c-ada-spec.c (max_ada_macros): Move around.
2635 (store_ada_macro_index): Likewise.
2636 (source_file): Rename into...
2637 (macro_source_file): ...this.
2638 (count_ada_macro): Move around.
2639 (store_ada_macro): Likewise.
2640 (compare_macro): Likewise.
2641 (print_ada_macros): Merge in...
2642 (dump_ada_macros): ...this.
2643 (source_file_base): Rename into...
2644 (current_source_file): ...this.
2645 (print_comment): Move around.
2646 (dump_ada_nodes): Call dump_ada_declaration directly.
2647 (struct with): Change type of limited field to bool.
2648 (append_withs): Change type of limited_access parameter to bool.
2649 (pp_ada_tree_identifie): Likewise.
2650 (dump_ada_decl_nam): Likewise.
2651 (dump_generic_ada_node): Likewise. Do not print the return type.
2652 (to_ada_name): Change type of space_found parameter to bool.
2653 (dump_ada_function_declaration): Return void and change type of
2654 parameters to bool. Also print the return type for a function.
2655 (print_ada_methods): Rename into...
2656 (dump_ada_methods): ...this.
2657 (print_ada_declaration): Rename into ...
2658 (dump_ada_declaration): ...this. Do not print the return type.
2659 (print_ada_struct_decl): Rename into...
2660 (dump_ada_struct_decl): ...this.
2662 2017-09-29 Jakub Jelinek <jakub@redhat.com>
2664 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2665 rather than DECL_INITIAL.
2666 (common_handle_aligned_attribute): Likewise.
2668 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
2670 * c.opt (gen-decls): Add RejectNegative.
2672 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2673 Jakub Jelinek <jakub@redhat.com>
2675 Add support for -std=c++2a.
2676 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2677 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2678 * c-opts.c (set_std_cxx2a): New.
2679 (c_common_handle_option): Set options when -std=c++2a is enabled.
2680 (c_common_post_options): Adjust comments.
2681 (set_std_cxx14, set_std_cxx17): Likewise.
2683 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2685 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2686 message for non-uniform endianness and issue a warning in C++.
2688 2017-09-15 Jakub Jelinek <jakub@redhat.com>
2690 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2691 (Wc++17-compat): Change from undocumented alias to option.
2692 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2693 change C++1z to C++17 in description.
2694 (std=c++1z, std=gnu++1z): Change from option to undocumented
2696 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2698 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2699 * c-opts.c (set_std_cxx1z): Rename to ...
2700 (set_std_cxx17): ... this.
2701 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2702 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
2704 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2707 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2709 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2710 function alignment if warn_if_not_aligned_p is true.
2712 2017-09-12 Nathan Sidwell <nathan@acm.org>
2714 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2715 resort_sorted_fields): Move to c/c-decl.c.
2716 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2717 (struct sorted_fields_type): Move to c/c-lang.h.
2719 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
2722 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2724 2017-09-04 Marek Polacek <polacek@redhat.com>
2727 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2728 (warn_tautological_cmp): Call it.
2730 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2732 * c-opts.c (c_common_finish): Write dependency information even if
2735 2017-09-01 Jakub Jelinek <jakub@redhat.com>
2738 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2739 (omp_pragmas_simd): ... here.
2740 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2741 create new clauses list containing just simd clause.
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-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2748 into scalar_mode_supported_p call.
2749 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2751 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2752 Alan Hayward <alan.hayward@arm.com>
2753 David Sherwood <david.sherwood@arm.com>
2755 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2756 for the mode iterator.
2758 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2759 Alan Hayward <alan.hayward@arm.com>
2760 David Sherwood <david.sherwood@arm.com>
2762 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2763 * c-common.c (c_build_vec_perm_expr): Likewise.
2765 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2766 Alan Hayward <alan.hayward@arm.com>
2767 David Sherwood <david.sherwood@arm.com>
2769 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2771 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2772 Alan Hayward <alan.hayward@arm.com>
2773 David Sherwood <david.sherwood@arm.com>
2775 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2776 before calling targetm.addr_space.valid_pointer_mode.
2778 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2779 Alan Hayward <alan.hayward@arm.com>
2780 David Sherwood <david.sherwood@arm.com>
2782 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2784 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2785 Alan Hayward <alan.hayward@arm.com>
2786 David Sherwood <david.sherwood@arm.com>
2788 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2790 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2792 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2793 Alan Hayward <alan.hayward@arm.com>
2794 David Sherwood <david.sherwood@arm.com>
2796 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2799 2017-08-29 Martin Liska <mliska@suse.cz>
2802 * c-common.c (parse_optimize_options): Add argument to function
2804 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2806 2017-08-24 David Malcolm <dmalcolm@redhat.com>
2808 * c-lex.c (interpret_float): Use token location
2809 when building an EXCESS_PRECISION_EXPR.
2811 2017-08-21 David Malcolm <dmalcolm@redhat.com>
2813 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2814 it to check_function_format.
2815 * c-common.h (check_function_arguments): Add vec<location_t> *
2817 (check_function_format): Likewise.
2818 * c-format.c (struct format_check_context): Add field "arglocs".
2819 (check_function_format): Add param "arglocs"; pass it to
2821 (check_format_info): Add param "arglocs"; use it to initialize
2822 new field of format_ctx.
2823 (check_format_arg): Pass format_ctx->arglocs to new param of
2824 check_format_info_main.
2825 (class argument_parser): New field "arglocs".
2826 (argument_parser::argument_parser): Add "arglocs_" param and use
2827 it to initialize new field.
2828 (argument_parser::check_argument_type): Pass new arglocs field to
2830 (check_format_info_main): Add param "arglocs", and use it when
2831 constructing arg_parser.
2832 (check_format_types): Add param "arglocs"; use it if non-NULL when
2833 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2835 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2838 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2839 (c_common_attribute_table): Add warn_if_not_aligned.
2840 (handle_aligned_attribute): Renamed to ...
2841 (common_handle_aligned_attribute): Remove argument, name, and add
2842 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2843 (handle_aligned_attribute): New.
2844 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2846 2017-08-14 Martin Sebor <msebor@redhat.com>
2849 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2850 (handle_nonstring_attribute): New function.
2852 2017-08-14 Martin Sebor <msebor@redhat.com>
2855 * c-format.h (T89_G): New macro.
2856 * c-format.c (local_gcall_ptr_node): New variable.
2857 (init_dynamic_diag_info): Initialize it.
2859 2017-08-11 Martin Liska <mliska@suse.cz>
2861 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2862 TARGET_SUPPORTS_ALIASES.
2864 2017-08-10 David Malcolm <dmalcolm@redhat.com>
2866 * c-common.c (c_parse_error): Add rich_location * param, using it
2867 rather implicitly using input_location.
2868 * c-common.h (c_parse_error): Add rich_location * param.
2870 2017-08-09 Marek Polacek <polacek@redhat.com>
2872 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2873 (c_common_truthvalue_conversion): Likewise.
2874 * c-omp.c (c_finish_omp_atomic): Likewise.
2875 * c-common.h (build_binary_op): Update declaration.
2877 2017-08-08 Martin Liska <mliska@suse.cz>
2879 * c-ada-spec.c: Include header files.
2880 * c-ubsan.c: Likewise.
2881 * c-warn.c: Likewise.
2883 2017-08-07 Jakub Jelinek <jakub@redhat.com>
2886 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2888 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2890 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2891 (print_ada_methods): Likewise.
2892 (print_ada_declaration): Likewise.
2894 2017-08-07 Martin Liska <mliska@suse.cz>
2896 * array-notation-common.c: Add new includes.
2897 * c-format.c( handle_format_attribute): Canonicalize a format
2899 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2901 * c-pretty-print.c: Add new include.
2903 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2905 * c-ada-spec.c (has_static_fields): Look only into variables.
2906 (print_constructor): Add TYPE parameter and use it for the name.
2907 (print_destructor): Likewise.
2908 (print_ada_declaration): Adjust to new constructor/destructor names.
2909 Adjust calls to print_constructor and print_destructor.
2910 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2911 Look only into variables in the final loop.
2913 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2915 * c-ada-spec.c (has_static_fields): Look only into fields.
2916 (dump_generic_ada_node): Small tweak.
2917 (dump_nested_types): Look only into fields.
2918 (print_ada_declaration): Look only into methods. Small tweak.
2919 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2921 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2923 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2924 (dump_ada_function_declaration): Likewise.
2925 (dump_generic_ada_node): Likewise.
2926 (print_ada_declaration): Add support for const-qualified variables.
2928 2017-07-31 Martin Liska <mliska@suse.cz>
2931 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2932 Guard condition with flag_sanitize_p also with current_function_decl
2934 (ubsan_maybe_instrument_reference_or_call): Likewise.
2936 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
2938 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2940 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2942 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2944 (print_ada_declaration): Add missing guard for record types.
2946 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2949 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2950 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2951 new COMPOUND_EXPRs around the rhs of the comparison.
2953 2017-07-27 Marek Polacek <polacek@redhat.com>
2956 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2959 2017-07-27 Jakub Jelinek <jakub@redhat.com>
2961 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2962 (handle_noipa_attribute): New function.
2964 2017-07-07 Torsten Duwe <duwe@suse.de>
2966 * c-attribs.c (c_common_attribute_table): Add entry for
2967 "patchable_function_entry".
2969 2017-07-20 Nathan Sidwell <nathan@acm.org>
2971 Remove TYPE_METHODS.
2972 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2973 dump_ada_template, print_ada_methods,
2974 print_ada_declaration): Member fns are on TYPE_FIELDS.
2976 2017-07-18 Nathan Sidwell <nathan@acm.org>
2978 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2980 2017-07-14 David Malcolm <dmalcolm@redhat.com>
2982 * c-common.c (try_to_locate_new_include_insertion_point): New
2984 (per_file_includes_t): New typedef.
2985 (added_includes_t): New typedef.
2986 (added_includes): New variable.
2987 (maybe_add_include_fixit): New function.
2988 * c-common.h (maybe_add_include_fixit): New decl.
2990 2017-07-10 Martin Sebor <msebor@redhat.com>
2993 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2995 2017-07-06 David Malcolm <dmalcolm@redhat.com>
2997 * c-common.c (selftest::c_family_tests): New.
2998 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2999 (selftest::c_family_tests): New decl.
3001 2017-07-04 Marek Polacek <polacek@redhat.com>
3004 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
3007 2017-07-04 Marek Polacek <polacek@redhat.com>
3009 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
3011 2017-06-28 Martin Liska <mliska@suse.cz>
3014 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
3015 to a function declaration.
3017 2017-06-28 Martin Liska <mliska@suse.cz>
3020 * c.opt: Add IntegerRange to various options.
3022 2017-06-26 Marek Polacek <polacek@redhat.com>
3025 * c-common.h (warn_for_multistatement_macros): Declare.
3026 * c-warn.c: Include "c-family/c-indentation.h".
3027 (warn_for_multistatement_macros): New function.
3028 * c.opt (Wmultistatement-macros): New option.
3029 * c-indentation.c (guard_tinfo_to_string): No longer static.
3030 Change the parameter type to "enum rid". Handle RID_SWITCH.
3031 * c-indentation.h (guard_tinfo_to_string): Declare.
3033 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
3035 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3037 2017-06-15 Martin Sebor <msebor@redhat.com>
3040 * c.opt (-Wclass-memaccess): New option.
3042 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3044 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3046 2017-06-13 Marek Polacek <polacek@redhat.com>
3049 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3052 2017-06-13 Martin Liska <mliska@suse.cz>
3055 * c-attribs.c (add_no_sanitize_value): New function.
3056 (handle_no_sanitize_attribute): Likewise.
3057 (handle_no_sanitize_address_attribute): Use the function.
3058 (handle_no_sanitize_thread_attribute): New function.
3059 (handle_no_address_safety_analysis_attribute): Use
3060 add_no_sanitize_value.
3061 (handle_no_sanitize_undefined_attribute): Likewise.
3062 * c-common.h: Declare new functions.
3063 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3064 (ubsan_instrument_shift): Likewise.
3065 (ubsan_instrument_bounds): Likewise.
3066 (ubsan_maybe_instrument_array_ref): Likewise.
3067 (ubsan_maybe_instrument_reference_or_call): Likewise.
3069 2017-06-11 Jason Merrill <jason@redhat.com>
3071 * c-ada-spec.c, c-pragma.c: Use id_equal.
3073 2017-06-04 Marek Polacek <polacek@redhat.com>
3076 * c-format.c (matching_type_p): Return false if any of the types
3077 requires structural equality.
3079 2017-06-02 Martin Sebor <msebor@redhat.com>
3082 * c-warn.c (conversion_warning): Use -Wconversion for integer
3083 conversion and -Wfloat-conversion for floating one.
3085 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3087 * c.opt (Wsizeof-pointer-div): New warning option.
3089 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3091 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3092 (Wcatch-value=1): Enable by -Wall.
3094 2017-05-30 David Malcolm <dmalcolm@redhat.com>
3096 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3098 * c.opt (fdiagnostics-show-template-tree): New option.
3099 (felide-type): New option.
3101 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3103 * c.opt (Wcatch-value=): New C++ warning flag.
3105 2017-05-24 Nathan Sidwell <nathan@acm.org>
3107 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3108 const casts to avoid warning.
3110 2017-05-24 Martin Sebor <msebor@redhat.com>
3113 * c-common.h (unsafe_conversion_p): Add a function argument.
3114 * c-common.c (unsafe_conversion_p): Same.
3115 Add type names and values to diagnostics.
3116 (scalar_to_vector): Adjust.
3117 * c-warn.c (constant_expression_error): Add a function argument.
3118 Add type names and values to diagnostics.
3119 (conversion_warning): Add a function argument.
3120 Add type names and values to diagnostics.
3121 (warnings_for_convert_and_check): Same.
3123 2017-05-19 Jason Merrill <jason@redhat.com>
3125 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3128 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3130 * c-format.c (locus): Move out of function scope,
3133 2017-05-19 Nathan Sidwell <nathan@acm.org>
3135 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3136 (c_common_parse_file): Remove class dump handling.
3137 (get_dump_info): Likewise.
3139 2017-05-19 Richard Biener <rguenther@suse.de>
3142 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3143 to alias-set zero memory.
3145 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3147 * c-format.c (local_tree_type_node): Add GTY attribute.
3149 2017-05-18 Marek Polacek <polacek@redhat.com>
3151 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3152 (c_common_fixed_point_type_for_size): Likewise.
3153 (c_common_type_for_mode): Likewise.
3154 (shorten_compare): Likewise.
3155 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3156 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3158 2017-05-18 Marek Polacek <polacek@redhat.com>
3160 * c-common.c (self_promoting_args_p): Change the return type to bool.
3161 Use false/true instead of 0/1.
3162 * c-common.h (self_promoting_args_p): Update.
3164 2017-05-17 Marek Polacek <polacek@redhat.com>
3166 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3167 * c-warn.c: Likewise.
3169 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3171 Implement new C++ intrinsics __is_assignable and __is_constructible.
3172 * c-common.c (__is_assignable, __is_constructible): New.
3173 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3175 2017-05-17 Martin Liska <mliska@suse.cz>
3177 * c-common.h: Introduce dump_flags_t type and
3178 use it instead of int type.
3179 * c-gimplify.c (c_genericize): Likewise.
3180 * c-opts.c: Likewise.
3182 2017-05-17 Marek Polacek <polacek@redhat.com>
3184 * c-common.c (c_save_expr): Remove.
3185 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3186 * c-common.h (c_save_expr): Remove declaration.
3188 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3191 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3192 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3193 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3194 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3196 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3198 2017-05-09 Marek Polacek <polacek@redhat.com>
3201 * c-warn.c (unwrap_c_maybe_const): New.
3202 (warn_logical_operator): Call it.
3204 2017-05-09 Nathan Sidwell <nathan@acm.org>
3206 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3207 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3209 2017-05-08 Martin Sebor <msebor@redhat.com>
3211 PR translation/80280
3212 * c-format.h (struct format_flag_spec): Add new member.
3214 * c-format.c (local_tree_type_node): New global.
3215 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3216 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3217 (strfmon_flag_specs): Likewise.
3218 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3219 with distinct quoting properties.
3220 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3221 (flag_chars_t::validate): Add argument and handle bad quoting.
3222 (check_format_info_main): Handle quoting problems.
3223 (init_dynamic_diag_info): Simplify.
3225 2017-05-08 Jason Merrill <jason@redhat.com>
3227 * c-opts.c (c_common_post_options): Update defaults for
3228 flag_abi_version and flag_abi_compat_version.
3230 2017-05-05 David Malcolm <dmalcolm@redhat.com>
3232 * c-common.c (c_cpp_error): Replace report_diagnostic
3233 with diagnostic_report_diagnostic.
3235 2017-05-04 Martin Sebor <msebor@redhat.com>
3237 PR translation/80280
3238 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3239 (handle_weakref_attribute): Same.
3241 2017-05-03 Nathan Sidwell <nathan@acm.org>
3243 Canonicalize canonical type hashing
3244 * c-common.c (complete_array_type): Use type_hash_canon.
3246 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3249 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3251 (cilk_install_body_pedigree_operations): Likewise.
3252 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3254 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3255 (cilk_install_body_pedigree_operations): Likewise.
3256 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3259 2017-04-27 Jakub Jelinek <jakub@redhat.com>
3262 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3263 flag on non-aggregate element types.
3265 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3267 * c-common.c (c_type_hasher, type_hash_table): Remove.
3268 (c_common_get_alias_set): Remove unreachable code.
3269 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3271 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3273 * c.opt (Wextra-semi): New C++ warning flag.
3275 2017-04-20 Jakub Jelinek <jakub@redhat.com>
3278 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3280 2017-04-18 Jakub Jelinek <jakub@redhat.com>
3284 * c-common.c (c_common_type_for_mode): Don't handle
3285 widest_*_literal_type_node here.
3286 c_common_signed_or_unsigned_type): Likewise.
3287 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3288 to *intTI_type_node or *intDI_type_node depending on whether
3289 TImode is supported by the target or not.
3291 2017-04-10 Martin Liska <mliska@suse.cz>
3294 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3295 doing an UBSAN check.
3297 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
3299 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3301 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3304 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3306 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3307 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3310 2017-03-31 David Malcolm <dmalcolm@redhat.com>
3312 PR documentation/78732
3313 * c.opt (Wendif-labels): Fix description to refer to
3314 #else rather than #elif.
3316 2017-03-31 Jakub Jelinek <jakub@redhat.com>
3319 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3320 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3322 2017-03-27 Jakub Jelinek <jakub@redhat.com>
3325 * c-common.c (c_common_mark_addressable_vec): Don't set
3326 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3328 2017-03-21 Martin Sebor <msebor@redhat.com>
3331 * c-common.c (set_underlying_type): Mark type used only when
3332 original del is declared unused.
3334 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3336 PR translation/79848
3337 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3340 2017-03-10 David Malcolm <dmalcolm@redhat.com>
3343 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3344 from inform's message, so that xgettext can locate it.
3346 2017-03-09 Marek Polacek <polacek@redhat.com>
3350 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3351 conversion to the attribute list.
3353 2017-03-09 Martin Liska <mliska@suse.cz>
3355 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3357 2017-03-03 Jason Merrill <jason@redhat.com>
3359 * c.opt (Wnoexcept-type): New.
3361 2017-03-02 Richard Biener <rguenther@suse.de>
3364 * c-common.c (c_common_mark_addressable_vec): Look through
3367 2017-02-28 Martin Liska <mliska@suse.cz>
3369 * c.opt: Replace space with tabular for options of <number>
3372 2017-02-28 Martin Liska <mliska@suse.cz>
3374 * c.opt: Fix --help=option -Q for options which are of
3377 2017-02-24 Jakub Jelinek <jakub@redhat.com>
3380 * c-common.c (check_function_restrict): New function.
3381 (check_function_arguments): Add FNDECL argument. Call
3382 check_function_restrict if -Wrestrict.
3383 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3384 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3385 * c-common.h (check_function_arguments): Add FNDECL argument.
3386 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3388 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3390 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3391 treatment of parameters with pointer-to-tagged type and tidy up.
3392 (print_ada_methods): Remove the special treatment of C++ static member
3395 2017-02-22 Martin Liska <mliska@suse.cz>
3397 * c.opt: Replace inequality signs with square brackets
3400 2017-02-21 Jakub Jelinek <jakub@redhat.com>
3403 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3406 2017-02-17 Joseph Myers <joseph@codesourcery.com>
3408 * c-cppbuiltin.c (builtin_define_float_constants): Define
3409 __DECIMAL_DIG__ to the value for long double.
3411 2017-02-15 Marek Polacek <polacek@redhat.com>
3414 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3415 conversion has occured.
3417 2017-01-24 David Malcolm <dmalcolm@redhat.com>
3419 * c-common.c (c_common_reswords): Add "__RTL".
3420 * c-common.h (enum rid): Add RID_RTL.
3422 2017-01-20 Marek Polacek <polacek@redhat.com>
3425 * c-common.h (do_warn_duplicated_branches_r): Declare.
3426 * c-gimplify.c (c_genericize): Walk the function tree calling
3427 do_warn_duplicated_branches_r.
3428 * c-warn.c (expr_from_macro_expansion_r): New.
3429 (do_warn_duplicated_branches): New.
3430 (do_warn_duplicated_branches_r): New.
3431 * c.opt (Wduplicated-branches): New option.
3433 2017-01-17 David Malcolm <dmalcolm@redhat.com>
3436 * c-indentation.c (warn_for_misleading_indentation): Use the past
3437 subjunctive in the note.
3439 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
3442 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3443 start type to integer_type.
3445 2017-01-16 Jakub Jelinek <jakub@redhat.com>
3448 * c.opt (gen-decls): Add Driver flag.
3450 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3453 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3456 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3458 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3461 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3463 2017-01-12 Martin Sebor <msebor@redhat.com>
3465 (-Wformat-overflow): ...to this.
3467 2017-01-11 Martin Sebor <msebor@redhat.com>
3470 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3471 Also enable for LTO.
3473 2017-01-10 Jason Merrill <jason@redhat.com>
3475 Implement P0195R2, C++17 variadic using.
3476 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3478 2017-01-09 Jakub Jelinek <jakub@redhat.com>
3480 PR translation/79019
3481 PR translation/79020
3482 * c.opt (Wnormalized=): Fix typo in description.
3484 2017-01-08 Martin Sebor <msebor@redhat.com>
3487 * c.opt (-Wformat-truncation): New option.
3489 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
3491 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3492 value to unsigned short to fit in 4 hex digits without
3495 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3497 * c.opt (fsso-struct): Add 'native' value.
3499 2017-01-05 Martin Liska <mliska@suse.cz>
3502 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3505 2017-01-04 Marek Polacek <polacek@redhat.com>
3508 * c.opt (Wpointer-compare): New option.
3510 2017-01-04 Jakub Jelinek <jakub@redhat.com>
3513 * c.opt (fsso-struct=): Add RejectNegative.
3515 2017-01-01 Jakub Jelinek <jakub@redhat.com>
3517 Update copyright years.
3519 2016-12-29 Martin Liska <mliska@suse.cz>
3522 * c.opt (strong-eval-order): Add RejectNegative keyword.
3524 2016-12-22 Jason Merrill <jason@redhat.com>
3526 Implement P0522R0, matching of template template arguments.
3527 * c-cppbuiltin.c (c_cpp_builtins): Define
3528 __cpp_template_template_args.
3530 2016-12-21 Jakub Jelinek <jakub@redhat.com>
3533 * c-common.c (struct nonnull_arg_ctx): New type.
3534 (check_function_nonnull): Return bool instead of void. Use
3535 nonnull_arg_ctx as context rather than just location_t.
3536 (check_nonnull_arg): Adjust for the new context type, set
3537 warned_p to true if a warning has been diagnosed.
3538 (check_function_arguments): Return bool instead of void.
3539 * c-common.h (check_function_arguments): Adjust prototype.
3541 2016-12-21 Jason Merrill <jason@redhat.com>
3543 * c.opt (-fnew-ttp-matching): New flag.
3544 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3546 2016-12-14 Martin Jambor <mjambor@suse.cz>
3548 * c-omp.c: Include omp-general.h instead of omp-low.h.
3549 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3552 2016-12-14 Martin Sebor <msebor@redhat.com>
3555 * c-common.c (check_nonnull_arg): Disable when optimization
3558 2016-12-12 Marek Polacek <polacek@redhat.com>
3561 * c-common.c (attribute_fallthrough_p): Return false for
3564 2016-12-08 Martin Sebor <msebor@redhat.com>
3567 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3569 2016-12-08 Martin Sebor <msebor@redhat.com>
3572 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3575 2016-12-07 Martin Sebor <msebor@redhat.com>
3581 * c.opt (-Wstringop-overflow): New option.
3583 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3585 * c-attribs.c (asan odr indicator): New attribute.
3586 (handle_asan_odr_indicator_attribute): New function.
3588 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3590 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3593 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3595 * c-common.c (excess_precision_mode_join): New.
3596 (c_ts18661_flt_eval_method): New.
3597 (c_c11_flt_eval_method): Likewise.
3598 (c_flt_eval_method): Likewise.
3599 * c-common.h (excess_precision_mode_join): New.
3600 (c_flt_eval_method): Likewise.
3601 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3602 (cpp_iec_559_value): Call it.
3603 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3604 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3605 __FLT_EVAL_METHOD_TS_18661_3__.
3607 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3609 * c-opts.c (c_common_post_options): Add logic to handle the default
3610 case for -fpermitted-flt-eval-methods.
3612 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
3614 * c.opt (Wexpansion-to-defined): New.
3616 2016-11-23 Jakub Jelinek <jakub@redhat.com>
3619 * c-pragma.c (handle_pragma_target): Don't replace
3620 current_target_pragma, but chainon the new args to the current one.
3622 2016-11-22 Nathan Sidwell <nathan@acm.org>
3624 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
3625 indentation and formatting.
3627 2016-11-21 Martin Sebor <msebor@redhat.com>
3629 * c.opt (-fprintf-return-value): Enable by default.
3631 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3634 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3635 * c-common.c (c_common_nodes_and_builtins): Initialize
3636 const_tm_ptr_type_node.
3638 2016-11-16 Marek Polacek <polacek@redhat.com>
3641 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3643 2016-11-14 Jakub Jelinek <jakub@redhat.com>
3645 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3647 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
3648 Richard Biener <rguenther@suse.de>
3650 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3651 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3652 * c.opt (fgimple): New option.
3654 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3657 * c-common.h (warn_for_restrict): Declare.
3658 * c-warn.c: Include gcc-rich-location.h.
3659 (warn_for_restrict): New function.
3660 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3661 (gcc_cdiag_char_table): Likewise.
3662 (gcc_cxxdiag_char_table): Likewise.
3663 * c.opt (Wrestrict): New option.
3665 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3667 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3668 for nested types only if the type is a record or union and dump SLOC.
3670 2016-11-09 Jason Merrill <jason@redhat.com>
3672 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3674 2016-11-09 Jakub Jelinek <jakub@redhat.com>
3676 * c-ubsan.c (ubsan_instrument_shift): Handle split
3677 -fsanitize=shift-base and -fsanitize=shift-exponent.
3679 2016-11-07 Jason Merrill <jason@redhat.com>
3681 * c.opt (Wc++1z-compat): New.
3682 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3684 2016-11-07 Martin Liska <mliska@suse.cz>
3686 * c-warn.c (warn_for_unused_label): Save all labels used
3687 in goto or in &label.
3689 2016-11-03 Jason Merrill <jason@redhat.com>
3691 * c-cppbuiltin.c (c_cpp_builtins): Correct
3692 __cpp_inheriting_constructors.
3694 2016-11-01 Jason Merrill <jason@redhat.com>
3696 * c-cppbuiltin.c (c_cpp_builtins): Update
3697 __cpp_inheriting_constructors.
3699 * c.opt (-fnew-inheriting-ctors): New.
3700 * c-opts.c: Default to on for ABI 11+.
3702 2016-10-31 Jakub Jelinek <jakub@redhat.com>
3705 * c.opt (fext-numeric-literals): Add Var and Init.
3706 * c-opts.c (c_common_handle_option): Don't clear
3707 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3708 (c_common_post_options): Clear it here if not set
3711 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
3714 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3717 2016-10-25 Jakub Jelinek <jakub@redhat.com>
3719 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3720 * c-common.c (c_common_reswords): Add __builtin_launder.
3722 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3724 * c-common.c (c_common_truthvalue_conversion): Warn for
3725 multiplications in boolean context. Fix the quoting of '<<' and '<'
3726 in the shift warning.
3728 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3730 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3732 2016-10-20 Jason Merrill <jason@redhat.com>
3734 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3736 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3738 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3739 integer shift ops in boolean context.
3741 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
3743 * c.opt (Walloca): New.
3744 (Walloca-larger-than=): New.
3745 (Wvla-larger-than=): New.
3747 2016-10-17 Marek Polacek <polacek@redhat.com>
3749 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3750 Return immediately when finding a match.
3751 (warn_tautological_cmp): Remove a boolean variable that is no longer
3754 2016-10-17 Marek Polacek <polacek@redhat.com>
3756 * c-attribs.c: New file.
3757 * c-common.c: Move attributes handling to c-attribs.c.
3758 (get_nonnull_operand): No longer static.
3759 * c-common.h: Move the declarations from c-attribs.c to its own section.
3761 2016-10-14 Jason Merrill <jason@redhat.com>
3763 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3764 and __cpp_deduction_guides.
3766 2016-10-13 Jason Merrill <jason@redhat.com>
3768 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3770 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3772 * c-cppbuiltin.c: Include memmodel.h.
3773 * c-opts.c: Likewise.
3774 * c-pragma.c: Likewise.
3775 * c-warn.c: Likewise.
3777 2016-10-12 Jakub Jelinek <jakub@redhat.com>
3779 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3780 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3781 * c-opts.c (sanitize_cpp_opts): Initialize
3782 cpp_opts->cpp_warn_implicit_fallthrough.
3784 2016-10-11 Marek Polacek <polacek@redhat.com>
3786 * c-common.c (warning_candidate_p): Change the return type to bool
3787 and return true/false instead of 1/0.
3788 (vector_mode_valid_p): Likewise.
3790 2016-10-11 Marek Polacek <polacek@redhat.com>
3792 * c-common.c (fold_for_warn): No longer static.
3793 (bool_promoted_to_int_p): Likewise.
3794 (c_common_get_narrower): Likewise.
3795 (constant_expression_warning): Move to c-warn.c.
3796 (constant_expression_error): Likewise.
3797 (overflow_warning): Likewise.
3798 (warn_logical_operator): Likewise.
3799 (find_array_ref_with_const_idx_r): Likewise.
3800 (warn_tautological_cmp): Likewise.
3801 (expr_has_boolean_operands_p): Likewise.
3802 (warn_logical_not_parentheses): Likewise.
3803 (warn_if_unused_value): Likewise.
3804 (strict_aliasing_warning): Likewise.
3805 (sizeof_pointer_memaccess_warning): Likewise.
3806 (check_main_parameter_types): Likewise.
3807 (conversion_warning): Likewise.
3808 (warnings_for_convert_and_check): Likewise.
3809 (match_case_to_enum_1): Likewise.
3810 (match_case_to_enum): Likewise.
3811 (c_do_switch_warnings): Likewise.
3812 (warn_for_omitted_condop): Likewise.
3813 (readonly_error): Likewise.
3814 (lvalue_error): Likewise.
3815 (invalid_indirection_error): Likewise.
3816 (warn_array_subscript_with_type_char): Likewise.
3817 (warn_about_parentheses): Likewise.
3818 (warn_for_unused_label): Likewise.
3819 (warn_for_div_by_zero): Likewise.
3820 (warn_for_memset): Likewise.
3821 (warn_for_sign_compare): Likewise.
3822 (do_warn_double_promotion): Likewise.
3823 (do_warn_unused_parameter): Likewise.
3824 (record_locally_defined_typedef): Likewise.
3825 (maybe_record_typedef_use): Likewise.
3826 (maybe_warn_unused_local_typedefs): Likewise.
3827 (maybe_warn_bool_compare): Likewise.
3828 (maybe_warn_shift_overflow): Likewise.
3829 (warn_duplicated_cond_add_or_warn): Likewise.
3830 (diagnose_mismatched_attributes): Likewise.
3831 * c-common.h: Move the declarations from c-warn.c to its own section.
3832 * c-warn.c: New file.
3834 2016-10-08 Jason Merrill <jason@redhat.com>
3836 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3837 into COND_EXPR in C++.
3839 2016-10-08 Jakub Jelinek <jakub@redhat.com>
3841 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3842 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3843 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3845 2016-10-07 Jakub Jelinek <jakub@redhat.com>
3847 Implement LWG2296 helper intrinsic
3848 * c-common.h (enum rid): Add RID_ADDRESSOF.
3849 * c-common.c (c_common_reswords): Add __builtin_addressof.
3851 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3854 * c-common.c (c_common_truthvalue_conversion): Warn also for
3855 suspicious enum values in boolean context.
3857 2016-10-06 Jakub Jelinek <jakub@redhat.com>
3859 Implement P0258R2 - helper for C++17
3860 std::has_unique_object_representations trait
3861 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3862 * c-common.c (c_common_reswords): Add
3863 __has_unique_object_representations.
3865 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3868 * c-ubsan.c (ubsan_instrument_return): Don't call
3869 initialize_sanitizer_builtins here.
3871 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3873 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3874 conditional expression in boolean context when only one arm is
3877 2016-10-05 Jakub Jelinek <jakub@redhat.com>
3880 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3883 * c-common.c (c_common_reswords): Update comment for C++11.
3885 2016-10-04 Jason Merrill <jason@redhat.com>
3887 * c-common.c (make_tree_vector_from_ctor): New.
3888 * c-common.h: Declare it.
3890 2016-10-04 Jakub Jelinek <jakub@redhat.com>
3892 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3893 __LIBGCC_JCR_SECTION_NAME__.
3895 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3897 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3898 left shift in boolean context.
3900 2016-09-29 Jakub Jelinek <jakub@redhat.com>
3902 Implement P0001R1 - C++17 removal of register storage class specifier
3903 * c.opt (Wregister): New warning.
3904 * c-opts.c (c_common_post_options): Enable -Wregister by
3907 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3909 * c-opts.c (c_common_post_options): Remove special case for
3910 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3913 2016-09-27 Jakub Jelinek <jakub@redhat.com>
3915 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3918 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3920 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3922 * c-common.c: Include memmodel.h.
3924 2016-09-26 Marek Polacek <polacek@redhat.com>
3926 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3928 2016-09-26 Marek Polacek <polacek@redhat.com>
3931 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3932 (handle_fallthrough_attribute): New function.
3933 (attribute_fallthrough_p): New function.
3934 * c-common.h (attribute_fallthrough_p): Declare.
3936 2016-09-24 Marek Polacek <polacek@redhat.com>
3939 * c.opt (Wbool-operation): New.
3941 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3943 * c-common.c (c_common_truthvalue_conversion): Inhibit
3944 Wint-in-bool-context warning with from_macro_definition_at.
3945 Mention the expression will always evaluate to true.
3947 2016-09-21 Martin Sebor <msebor@redhat.com>
3950 * c.opt (fprintf-return-value): Temporarily initialize to zero
3951 to unblock bootstrap failures.
3953 2016-09-21 Jakub Jelinek <jakub@redhat.com>
3956 * c.opt (Waligned-new=): Add RejectNegative.
3957 (faligned-new=): Likewise. Spelling fix - change
3958 aligned_new_threshhold to aligned_new_threshold.
3959 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3960 to aligned_new_threshold.
3962 2016-09-20 Martin Sebor <msebor@redhat.com>
3965 * c.opt: Add -Wformat-length and -fprintf-return-value.
3967 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3970 * c.opt (Wint-in-bool-context): New warning.
3971 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3972 constants in boolean context.
3974 2016-09-19 Joseph Myers <joseph@codesourcery.com>
3976 * c-common.c (max_align_t_align): Also consider alignment of
3979 2016-09-15 Jason Merrill <jason@redhat.com>
3981 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3984 2016-09-14 Jason Merrill <jason@redhat.com>
3986 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3987 limit FIELD_DECL, either.
3989 2016-09-14 Marek Polacek <polacek@redhat.com>
3991 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3992 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3993 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3995 2016-09-13 David Malcolm <dmalcolm@redhat.com>
3997 * c-common.c (warn_logical_not_parentheses): Replace
3998 rich_location::add_fixit_insert calls with add_fixit_insert_before
3999 and add_fixit_insert_after, eliminating the "next_loc" calculation.
4001 2016-09-13 Jason Merrill <jason@redhat.com>
4002 Tom de Vries <tom@codesourcery.com>
4005 * c-common.c (set_underlying_type): Don't treat array as builtin type.
4007 2016-09-13 Jason Merrill <jason@redhat.com>
4009 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
4012 2016-09-12 Jason Merrill <jason@redhat.com>
4014 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
4015 bit/byte confusion, allow large alignment for types.
4017 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
4020 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
4022 2016-09-12 David Malcolm <dmalcolm@redhat.com>
4025 * c-format.c (argument_parser::check_argument_type): Add params
4026 "type_start" and "conversion_char". Use the former to generate
4027 offset_to_type_start and pass it and conversion_char to
4029 (check_format_info_main): Capture the start of the type
4030 information as "type_start", and pass it an format_char
4031 to arg_parser.check_argument_type.
4032 (check_format_types): Provide an example in the leading comment.
4033 Add params "offset_to_type_start" and "conversion_char"; pass
4034 them to format_type_warning calls.
4035 (test_get_modifier_for_format_len): Likewise.
4036 (matching_type_p): New function.
4037 (get_format_for_type): Add param "conversion_char" and move
4038 implementation into...
4039 (get_format_for_type_1): ...new function, called twice.
4040 Use new function matching_type_p rather than checking for
4041 TYPE_CANONICAL equality.
4042 (get_corrected_substring): New function.
4043 (format_type_warning): Provide an example in the leading comment.
4044 Add params "offset_to_type_start" and "conversion_char". Replace
4045 call to get_format_for_type with call to get_corrected_substring
4046 and move rejection of hints for widths/precisions there.
4047 (assert_format_for_type_streq): Add param "conversion_char".
4048 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4049 (test_get_format_for_type_printf): Add conversion chars to the
4050 tests, adding coverage for various combinations of integer
4051 vs double conversions, and for preserving octal and hexadecimal
4053 (test_get_format_for_type_scanf): Add conversion chars to the
4056 2016-09-10 Tom de Vries <tom@codesourcery.com>
4059 * c-common.c (build_va_arg): Handle more strict
4060 targetm.canonical_va_list_type. Replace first argument type error with
4063 2016-09-09 Martin Sebor <msebor@redhat.com>
4067 * c-format.c (argument_parser::find_format_char_info): Use %qc
4068 format directive unconditionally.
4070 2016-09-09 Jason Merrill <jason@redhat.com>
4072 Implement C++17 new of over-aligned types.
4073 * c.opt: Add -faligned-new and -Waligned-new.
4074 * c-common.c (max_align_t_align): Split out from...
4075 (cxx_fundamental_alignment_p): ...here.
4076 * c-common.h: Declare it.
4077 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4079 2016-09-09 Joseph Myers <joseph@codesourcery.com>
4081 * c-cppbuiltin.c (builtin_define_type_width): New function.
4082 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4085 2016-09-07 David Malcolm <dmalcolm@redhat.com>
4087 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4089 (substring_loc::get_location): Move to substring-locations.c,
4090 keeping implementation as...
4091 (c_get_substring_location): New function, from the above, reworked
4092 to use accessors rather than member lookup.
4093 * c-common.h (class substring_loc): Move to substring-locations.h,
4094 replacing with a forward decl.
4095 (c_get_substring_location): New decl.
4096 * c-format.c: Include "substring-locations.h".
4097 (format_warning_va): Move to substring-locations.c.
4098 (format_warning_at_substring): Likewise.
4100 2016-09-06 Martin Sebor <msebor@redhat.com>
4103 * c-format.c (check_function_format): Avoid issuing warnings for
4104 functions unless they call format functions with non-constant
4107 2016-09-06 Richard Biener <rguenther@suse.de>
4110 * c-common.c (c_common_mark_addressable_vec): Handle
4111 COMPOUND_LITERAL_EXPR.
4113 2016-09-05 Marek Polacek <polacek@redhat.com>
4116 * c-common.c (bool_promoted_to_int_p): New function.
4117 (expr_has_boolean_operands_p): New function.
4118 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4119 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4121 2016-09-04 Tom de Vries <tom@codesourcery.com>
4124 2016-08-29 Tom de Vries <tom@codesourcery.com>
4126 * c-common.c (build_va_arg): Replace first argument type error
4129 2016-09-02 Jakub Jelinek <jakub@redhat.com>
4132 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4133 (c_finish_omp_for): Reject _Atomic qualified iterators.
4135 2016-09-01 Martin Sebor <msebor@redhat.com>
4137 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4138 size to guarantee it fits the output of the formatted function
4139 regardless of its arguments.
4141 2016-09-01 Marek Polacek <polacek@redhat.com>
4144 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4147 2016-08-29 Marek Polacek <polacek@redhat.com>
4150 * c-common.c (warn_logical_not_parentheses): Don't warn for
4151 a comparison or a logical operator.
4153 2016-08-29 Tom de Vries <tom@codesourcery.com>
4155 * c-common.c (build_va_arg): Fix type comparison assert.
4157 2016-08-29 Tom de Vries <tom@codesourcery.com>
4159 * c-common.c (build_va_arg): Replace first argument type error
4162 2016-08-29 Tom de Vries <tom@codesourcery.com>
4165 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4166 with error_mark_node as va_list instead of with illegal va_list.
4168 2016-08-25 Marek Polacek <polacek@redhat.com>
4169 David Malcolm <dmalcolm@redhat.com>
4171 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4172 * c-common.h (warn_logical_not_parentheses): Update declaration.
4174 2016-08-22 Marek Polacek <polacek@redhat.com>
4177 * c-common.c (warn_for_memset): Check type for null.
4179 2016-08-22 Joseph Myers <joseph@codesourcery.com>
4181 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
4182 _FloatNx types for suffixes for built-in functions.
4184 2016-08-19 Joseph Myers <joseph@codesourcery.com>
4187 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4188 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4189 (RID_FLOAT128X): New enum rid values.
4190 (CASE_RID_FLOATN_NX): New macro.
4191 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4193 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4194 corresponding complex types.
4195 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4196 _FloatNx and corresponding complex types.
4197 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4198 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4199 and _FloatNx types for the widest type for determining
4200 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4201 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4202 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4204 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4206 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4209 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4211 * c-opts.c (c_diagnostic_finalizer): Update for change to
4212 diagnostic_show_locus.
4214 2016-08-18 David Malcolm <dmalcolm@redhat.com>
4216 * c-common.c: Include "spellcheck.h".
4217 (cb_get_suggestion): New function.
4218 * c-common.h (cb_get_suggestion): New decl.
4219 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4222 2016-08-18 Marek Polacek <polacek@redhat.com>
4225 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4228 2016-08-16 David Malcolm <dmalcolm@redhat.com>
4231 * c-common.c (substring_loc::get_range): Rename to...
4232 (substring_loc::get_location): ...this, converting param from a
4233 source_range * to a location_t *. Call
4234 get_source_location_for_substring rather than
4235 get_source_range_for_substring, and pass in m_caret_idx.
4236 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4237 (substring_loc::get_range): Replace with...
4238 (substring_loc::get_location): ...this.
4239 (substring_loc::set_caret_index): New method.
4240 (substring_loc): Add field m_caret_idx.
4241 * c-format.c (format_warning_va): Update for above changes.
4242 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4243 clashing with type name.
4244 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4245 (check_argument_type): Likewise.
4246 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4247 Use a copy when emitting warnings, setting the caret index from TYPE.
4249 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
4250 Arnaud Charlet <charlet@adacore.com>
4252 * c-ada-spec.c (dump_number): New function.
4253 (handle_escape_character): Likewise.
4254 (print_ada_macros): Add handling of constant integers and strings.
4256 2016-08-12 Marek Polacek <polacek@redhat.com>
4259 * c-common.c (scalar_to_vector): Adjust fall through comment.
4260 * c-opts.c (c_common_handle_option): Likewise.
4261 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4262 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4263 fall through comment.
4264 * cilk.c (extract_free_variables): Add FALLTHRU.
4266 2016-08-10 Jason Merrill <jason@redhat.com>
4268 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4270 2016-08-09 Jason Merrill <jason@redhat.com>
4272 * c-common.c (c_common_attribute_table): vector_size affects type
4275 2016-08-09 Marek Polacek <polacek@redhat.com>
4278 * c-ada-spec.c (dump_generic_ada_node): Add return.
4280 2016-08-09 Jason Merrill <jason@redhat.com>
4282 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4283 C++17 constexpr lambdas.
4285 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4288 * c-common.h (selftest::c_format_c_tests): New declaration.
4289 (selftest::run_c_tests): New declaration.
4290 * c-format.c: Include "selftest.h.
4291 (format_warning_va): Add param "corrected_substring" and use
4292 it to add a replacement fix-it hint.
4293 (format_warning_at_substring): Likewise.
4294 (format_warning_at_char): Update for new param of
4296 (argument_parser::check_argument_type): Pass "fki" to
4298 (check_format_types): Add param "fki" and pass it to
4299 format_type_warning.
4300 (deref_n_times): New function.
4301 (get_modifier_for_format_len): New function.
4302 (selftest::test_get_modifier_for_format_len): New function.
4303 (get_format_for_type): New function.
4304 (format_type_warning): Add param "fki" and use it to attempt
4305 to provide hints for argument types when calling
4306 format_warning_at_substring.
4307 (selftest::get_info): New function.
4308 (selftest::assert_format_for_type_streq): New function.
4309 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4310 (selftest::test_get_format_for_type_printf): New function.
4311 (selftest::test_get_format_for_type_scanf): New function.
4312 (selftest::c_format_c_tests): New function.
4314 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4317 * c-format.c: Include "diagnostic.h".
4318 (location_column_from_byte_offset): Delete.
4319 (location_from_offset): Delete.
4320 (format_warning_va): New function.
4321 (format_warning_at_substring): New function.
4322 (format_warning_at_char): New function.
4323 (check_format_arg): Capture location of format_tree and pass to
4324 check_format_info_main.
4325 (argument_parser): Add fields "start_of_this_format" and
4326 "format_string_cst".
4327 (flag_chars_t::validate): Add param "format_string_cst". Convert
4328 warning_at call using location_from_offset to call to
4329 format_warning_at_char.
4330 (argument_parser::argument_parser): Add param "format_string_cst_"
4331 and use use it to initialize field "format_string_cst".
4332 Initialize new field "start_of_this_format".
4333 (argument_parser::read_format_flags): Convert warning_at call
4334 using location_from_offset to a call to format_warning_at_char.
4335 (argument_parser::read_any_format_left_precision): Likewise.
4336 (argument_parser::read_any_format_precision): Likewise.
4337 (argument_parser::read_any_other_modifier): Likewise.
4338 (argument_parser::find_format_char_info): Likewise, in three places.
4339 (argument_parser::parse_any_scan_set): Likewise, in one place.
4340 (argument_parser::handle_conversions): Likewise, in two places.
4341 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4342 and use it to make a substring_loc. Pass the latter to
4344 (check_format_info_main): Add params "fmt_param_loc" and
4345 "format_string_cst". Convert warning_at calls using
4346 location_from_offset to calls to format_warning_at_char. Pass the
4347 new params to the arg_parser ctor. Pass "format_string_cst" to
4348 flag_chars.validate. Pass "fmt_param_loc" to
4349 arg_parser.check_argument_type.
4350 (check_format_types): Convert first param from a location_t
4351 to a const substring_loc & and rename to "fmt_loc". Attempt
4352 to extract the range of the relevant parameter and pass it
4353 to format_type_warning.
4354 (format_type_warning): Convert first param from a location_t
4355 to a const substring_loc & and rename to "fmt_loc". Add
4356 params "param_range" and "type". Replace calls to warning_at
4357 with calls to format_warning_at_substring.
4359 2016-08-08 David Malcolm <dmalcolm@redhat.com>
4361 * c-format.c (class flag_chars_t): New class.
4362 (struct length_modifier): New struct.
4363 (class argument_parser): New class.
4364 (flag_chars_t::flag_chars_t): New ctor.
4365 (flag_chars_t::has_char_p): New method.
4366 (flag_chars_t::add_char): New method.
4367 (flag_chars_t::validate): New method.
4368 (flag_chars_t::get_alloc_flag): New method.
4369 (flag_chars_t::assignment_suppression_p): New method.
4370 (argument_parser::argument_parser): New ctor.
4371 (argument_parser::read_any_dollar): New method.
4372 (argument_parser::read_format_flags): New method.
4373 (argument_parser::read_any_format_width): New method.
4374 (argument_parser::read_any_format_left_precision): New method.
4375 (argument_parser::read_any_format_precision): New method.
4376 (argument_parser::handle_alloc_chars): New method.
4377 (argument_parser::read_any_length_modifier): New method.
4378 (argument_parser::read_any_other_modifier): New method.
4379 (argument_parser::find_format_char_info): New method.
4380 (argument_parser::validate_flag_pairs): New method.
4381 (argument_parser::give_y2k_warnings): New method.
4382 (argument_parser::parse_any_scan_set): New method.
4383 (argument_parser::handle_conversions): New method.
4384 (argument_parser::check_argument_type): New method.
4385 (check_format_info_main): Introduce classes argument_parser
4386 and flag_chars_t, moving the code within the loop into methods
4387 of these classes. Make various locals "const".
4389 2016-08-05 David Malcolm <dmalcolm@redhat.com>
4391 * c-common.c: Include "substring-locations.h".
4392 (get_cpp_ttype_from_string_type): New function.
4393 (g_string_concat_db): New global.
4394 (substring_loc::get_range): New method.
4395 * c-common.h (g_string_concat_db): New declaration.
4396 (class substring_loc): New class.
4397 * c-lex.c (lex_string): When concatenating strings, capture the
4398 locations of all tokens using a new obstack, and record the
4399 concatenation locations within g_string_concat_db.
4400 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4403 2016-07-29 Marek Polacek <polacek@redhat.com>
4406 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4407 parentheses warning.
4410 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4412 2016-07-28 Martin Liska <mliska@suse.cz>
4414 PR gcov-profile/68025
4415 * c-common.c (handle_no_profile_instrument_function_attribute):
4417 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4419 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4422 2016-07-25 Jason Merrill <jason@redhat.com>
4425 * c.opt (fconstexpr-loop-limit): New.
4427 2016-07-22 Martin Sebor <msebor@redhat.com>
4430 * c-common.c (resolve_overloaded_builtin): Avoid converting
4431 __atomic_compare_exchange_n return type to that of what its
4432 first argument points to.
4434 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
4436 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4437 ~(unsigned HOST_WIDE_INT) 0.
4439 2016-07-22 Martin Liska <mliska@suse.cz>
4441 PR gcov-profile/69028
4442 PR gcov-profile/62047
4443 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4444 to the current_function_decl.
4446 2016-07-21 Jason Merrill <jason@redhat.com>
4449 * c-common.c (c_common_truthvalue_conversion): Check
4450 c_inhibit_evaluation_warnings for warning about address of
4453 2016-07-20 David Malcolm <dmalcolm@redhat.com>
4455 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4458 2016-07-15 Jason Merrill <jason@redhat.com>
4460 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4462 2016-07-15 Jakub Jelinek <jakub@redhat.com>
4465 * c-common.h (enum lookup_name_fuzzy_kind): Add
4466 FUZZY_LOOKUP_FUNCTION_NAME.
4468 2016-07-08 Jason Merrill <jason@redhat.com>
4470 P0145: Refining Expression Order for C++.
4471 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4474 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4477 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4479 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4481 * c-pragma.h (enum pragma_kind): Rename
4482 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4485 2016-06-29 Richard Biener <rguenther@suse.de>
4488 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4490 2016-06-24 Jason Merrill <jason@redhat.com>
4492 P0145R2: Refining Expression Order for C++.
4493 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4496 2016-06-24 Jakub Jelinek <jakub@redhat.com>
4498 * c-common.c (check_builtin_function_arguments): Require last
4499 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4500 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4501 if the last argument is pointer to enumerated or boolean type.
4503 2016-06-22 David Malcolm <dmalcolm@redhat.com>
4506 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4507 (lookup_name_fuzzy): New prototype.
4509 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
4511 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4513 2016-06-14 Jason Merrill <jason@redhat.com>
4515 P0145R2: Refining Expression Order for C++.
4516 * c.opt (fargs-in-order): New.
4517 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4519 2016-06-13 Jakub Jelinek <jakub@redhat.com>
4522 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4523 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4525 PR preprocessor/71183
4526 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4527 to cb_get_source_date_epoch.
4529 2016-06-10 Jakub Jelinek <jakub@redhat.com>
4532 * c.opt (Wpsabi): Add Warning flag.
4534 2016-06-10 Martin Sebor <msebor@redhat.com>
4537 * c-common.c (handle_nonnull_attribute): Accept
4538 the nonnull attribute in type-generic builtins.
4540 2016-06-09 Martin Sebor <msebor@redhat.com>
4543 * c-common.c (builtin_function_validate_nargs): Make text of error
4544 message consistent with others like it.
4546 2016-06-08 Martin Sebor <msebor@redhat.com>
4547 Jakub Jelinek <jakub@redhat.com>
4551 * c-common.c (check_builtin_function_arguments): Handle
4552 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4554 2016-06-08 Richard Biener <rguenther@suse.de>
4556 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4558 2016-06-07 Richard Biener <rguenther@suse.de>
4561 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4562 options and warn about others.
4564 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
4566 * c-common.c (get_source_date_epoch): Rename to
4567 cb_get_source_date_epoch.
4568 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4569 message when the parsing fails. Use error_at instead of fatal_error.
4570 * c-common.h (get_source_date_epoch): Rename to
4571 cb_get_source_date_epoch.
4572 * c-common.h (cb_get_source_date_epoch): Prototype.
4573 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4574 * c-common.h (c_omp_region_type): Remove trailing comma.
4575 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4576 * c-lex.c (c_lex_with_flags): Remove initialization of
4577 pfile->source_date_epoch.
4579 2016-05-30 Jakub Jelinek <jakub@redhat.com>
4582 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4583 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4584 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4585 instead of C_OMP_CLAUSE_SPLIT_FOR.
4587 2016-05-24 Richard Biener <rguenther@suse.de>
4591 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4592 (convert_vector_to_array_for_subscript): ... this.
4593 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4594 VIEW_CONVERT_EXPR to an array type. Rename to ...
4595 (convert_vector_to_array_for_subscript): ... this.
4597 2016-05-12 Marek Polacek <polacek@redhat.com>
4600 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4601 size_in_bytes and pass LOC to it.
4603 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4606 * c.opt (Wduplicate-decl-specifier): New option.
4608 2016-05-11 Marek Polacek <polacek@redhat.com>
4611 * c-common.c (diagnose_mismatched_attributes): New function.
4612 * c-common.h (diagnose_mismatched_attributes): Declare.
4614 2016-05-04 Marek Polacek <polacek@redhat.com>
4616 * c.opt (Wdangling-else): New option.
4618 2016-05-03 Marek Polacek <polacek@redhat.com>
4621 * c-common.c (builtin_function_validate_nargs): Add location
4623 (check_builtin_function_arguments): Add location and arguments
4624 parameters. Use them.
4625 * c-common.h (check_builtin_function_arguments): Update declaration.
4627 2016-05-03 Richard Biener <rguenther@suse.de>
4629 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4630 allow call args to gimplify to SSA names.
4632 2016-05-03 Marek Polacek <polacek@redhat.com>
4634 * c-common.h (enum c_omp_region_type): Remove stray comma.
4636 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4638 * c-common.h (enum c_omp_region_type): Define.
4640 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4642 * c-common.c (shorten_compare): Use wi::to_wide.
4644 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4647 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4648 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4649 reduction clauses in acc parallel loops.
4651 2016-04-29 Marek Polacek <polacek@redhat.com>
4654 * c-common.c (warn_for_memset): Check domain before accessing it.
4656 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4659 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4660 "aligned" attribute.
4662 2016-04-28 Jason Merrill <jason@redhat.com>
4664 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4666 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
4667 Matthias Klose <doko@debian.org>
4669 * c-common.c (get_source_date_epoch): New function, gets the environment
4670 variable SOURCE_DATE_EPOCH and parses it as long long with error
4672 * c-common.h (get_source_date_epoch): Prototype.
4673 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4675 2015-04-27 Ryan Burn <contact@rnburn.com>
4679 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4680 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4682 (cilk_detect_and_unwrap): Corresponding changes.
4683 (extract_free_variables): Don't extract free variables from
4684 AGGR_INIT_EXPR slot.
4685 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4686 (cilk_recognize_spawn): Likewise.
4688 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4690 * c.opt (Wmemset-elt-size): New option.
4691 * c-common.c (warn_for_memset): New function.
4692 * c-common.h (warn_for_memset): Declare.
4694 2016-04-25 Jason Merrill <jason@redhat.com>
4696 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4698 * c-common.h: Declare it.
4699 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4701 2016-04-22 Jason Merrill <jason@redhat.com>
4703 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4705 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4708 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4709 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4711 2016-04-18 Michael Matz <matz@suse.de>
4713 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4716 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4718 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4719 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4720 to incomplete types.
4721 (dump_nested_type): Remove redundant tests and tidy up.
4722 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4723 a type which is the typedef of an original type.
4725 2016-04-15 Marek Polacek <polacek@redhat.com>
4728 * c-common.c (build_va_arg): Change two asserts into errors and return
4731 2016-04-13 Marek Polacek <polacek@redhat.com>
4734 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4735 for switch statements, too.
4737 2016-03-28 Jason Merrill <jason@redhat.com>
4739 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4741 2016-03-23 Marek Polacek <polacek@redhat.com>
4744 * c.opt (Wignored-attributes): New option.
4746 2016-03-22 David Malcolm <dmalcolm@redhat.com>
4749 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4750 diagnostic text, reversing the order of the warning and note so
4751 that they appear in source order.
4753 2016-03-17 Marek Polacek <polacek@redhat.com>
4756 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4759 2016-03-14 Jason Merrill <jason@redhat.com>
4761 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4763 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4765 2016-03-09 Richard Biener <rguenther@suse.de>
4768 * c-common.c (strict_aliasing_warning): Add back
4769 alias_sets_conflict_p check.
4771 2016-03-08 Jason Merrill <jason@redhat.com>
4773 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4775 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4778 * c-indentation.c (get_visual_column): Move code to determine next
4780 (next_tab_stop): ...this new function.
4781 (line_contains_hash_if): Delete function.
4782 (detect_preprocessor_logic): Delete function.
4783 (get_first_nws_vis_column): New function.
4784 (detect_intervening_unindent): New function.
4785 (should_warn_for_misleading_indentation): Replace call to
4786 detect_preprocessor_logic with a call to
4787 detect_intervening_unindent.
4789 2016-03-04 David Malcolm <dmalcolm@redhat.com>
4792 * c-indentation.c (should_warn_for_misleading_indentation): When
4793 suppressing warnings about cases where the guard and body are on
4794 the same column, only use the first non-whitespace column in place
4795 of the guard token column when dealing with "else" clauses.
4796 When rejecting aligned BODY and NEXT, loosen the requirement
4797 from equality with the first non-whitespace of guard to simply
4798 that they not be indented relative to it.
4800 2016-03-04 Richard Biener <rguenther@suse.de>
4803 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4804 instead of alias_sets_conflict_p.
4806 2016-03-01 Marek Polacek <polacek@redhat.com>
4809 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4812 2016-02-22 Martin Sebor <msebor@redhat.com>
4815 * c-common.c (check_builtin_function_arguments): Validate and
4816 reject invalid arguments to __builtin_alloca_with_align.
4818 2016-02-20 Mark Wielaard <mjw@redhat.com>
4821 * c.opt (Wunused-const-variable): Turn into Alias for...
4822 (Wunused-const-variable=): New option.
4824 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4827 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4829 (c_common_init_options): ...to here.
4830 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4832 2016-02-19 Jakub Jelinek <jakub@redhat.com>
4835 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4836 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4837 flag_preprocess_only.
4839 2016-02-16 Jakub Jelinek <jakub@redhat.com>
4842 * c.opt (Wnonnull-compare): Enable for -Wall.
4844 2016-02-15 Jakub Jelinek <jakub@redhat.com>
4847 * c-common.c (sync_resolve_size): Diagnose too few arguments
4848 even when params is non-NULL empty vector.
4850 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4853 * c.opt (fshort-double): Remove.
4855 2016-02-05 Martin Sebor <msebor@redhat.com>
4858 * c.opt (Warning options): Update -Wplacement-new to take
4859 an optional argument.
4861 2016-02-01 Jakub Jelinek <jakub@redhat.com>
4863 PR preprocessor/69543
4865 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4866 instead of loc to control_warning_option.
4868 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4870 * c.opt (fopenacc-dim=): New option.
4872 2016-01-27 Ryan Burn <contact@rnburn.com>
4875 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4876 gimplify_arg. Removed superfluous post_p argument.
4877 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4878 superfluous post_p argument.
4879 * c-gimplify.c (c_gimplify_expr): Likewise.
4881 2016-01-26 David Malcolm <dmalcolm@redhat.com>
4884 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4885 pp_newline_and_flush with pp_flush.
4887 2016-01-20 Martin Sebor <msebor@redhat.com>
4890 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4891 an incompatible argument when the argument isn't a valid tree node.
4893 2016-01-18 Jason Merrill <jason@redhat.com>
4896 * c-common.c (check_function_arguments_recurse): Fold the whole
4897 COND_EXPR, not just the condition.
4899 2016-01-18 Tom de Vries <tom@codesourcery.com>
4901 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4902 classify as loop clause.
4904 2016-01-15 Jakub Jelinek <jakub@redhat.com>
4907 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4908 C++ FE no longer has limit on number of pragmas.
4910 2015-01-14 Ryan Burn <contact@rnburn.com>
4913 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
4914 to add missing cleanup point.
4916 2016-01-14 David Malcolm <dmalcolm@redhat.com>
4919 * c-indentation.c (get_visual_column): Add location_t param.
4920 Handle the column number being zero by effectively disabling the
4921 warning, with an "inform".
4922 (should_warn_for_misleading_indentation): Add location_t argument
4923 for all uses of get_visual_column.
4925 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4928 * c-indentation.c (should_warn_for_misleading_indentation):
4929 Don't warn about do-while statements.
4931 2016-01-07 Martin Sebor <msebor@redhat.com>
4934 * c-common.c (sync_resolve_size): Reject first argument when it's
4937 2016-01-05 David Malcolm <dmalcolm@redhat.com>
4940 * c-indentation.c (get_visual_column): Remove default argument.
4941 (should_warn_for_misleading_indentation): For the multiline case,
4942 update call to get_visual_column for next_stmt_exploc so that it
4943 captures the location of the first non-whitespace character in the
4944 relevant line. Don't issue warnings if there is non-whitespace
4945 before the next statement.
4947 2016-01-04 Jakub Jelinek <jakub@redhat.com>
4949 Update copyright years.
4951 2015-12-21 David Malcolm <dmalcolm@redhat.com>
4953 * c-common.c (binary_op_error): Convert first param from
4954 location_t to rich_location * and use it when emitting an error.
4955 * c-common.h (binary_op_error): Convert first param from
4956 location_t to rich_location *.
4958 2015-12-16 David Malcolm <dmalcolm@redhat.com>
4960 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4961 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4963 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4965 * c-common.c (c_common_attribute_table): Handle "omp declare target
4968 2015-12-14 Jakub Jelinek <jakub@redhat.com>
4971 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4973 2014-12-12 Tobias Burnus <burnus@net-b.de>
4976 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4977 specifiers (%d, %i,%u and %c).
4979 2015-12-10 David Malcolm <dmalcolm@redhat.com>
4981 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4983 2015-12-08 Jakub Jelinek <jakub@redhat.com>
4987 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4988 * c-pragma.c (handle_pragma_diagnostic): Adjust
4989 control_warning_option caller.
4991 2015-12-07 David Malcolm <dmalcolm@redhat.com>
4993 * c-common.c (c_cpp_error): Update for change to
4994 rich_location::set_range.
4996 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
4998 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4999 shifting 1 out of the sign bit.
5001 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
5003 * c-common.c (c_common_attribute_table[]): Update max arguments
5004 count for "simd" attribute.
5005 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
5007 2015-12-03 Jakub Jelinek <jakub@redhat.com>
5009 PR preprocessor/57580
5010 * c-ppoutput.c (print): Change printed field to bool.
5011 Move src_file last for smaller padding.
5012 (init_pp_output): Set print.printed to false instead of 0.
5013 (scan_translation_unit): Fix up formatting. Set print.printed
5014 to true after printing something other than newline.
5015 (scan_translation_unit_trad): Set print.printed to true instead of 1.
5016 (maybe_print_line_1): Set print.printed to false instead of 0.
5017 (print_line_1): Likewise.
5018 (do_line_change): Set print.printed to true instead of 1.
5019 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
5020 dump_macro): Set print.printed to false after printing newline.
5022 2015-12-02 Jason Merrill <jason@redhat.com>
5024 * c-common.c (fold_for_warn): New.
5025 (warn_logical_operator, warn_tautological_cmp)
5026 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
5028 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
5029 (c_fully_fold_internal, decl_constant_value_for_optimization):
5031 * c-common.h: Don't declare decl_constant_value_for_optimization.
5033 2015-12-02 Joseph Myers <joseph@codesourcery.com>
5036 * c-common.h (c_build_qualified_type): Add extra default
5039 2015-12-01 Julian Brown <julian@codesourcery.com>
5040 Cesar Philippidis <cesar@codesourcery.com>
5041 James Norris <James_Norris@mentor.com>
5043 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5044 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5045 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5047 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5049 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5050 (decl_sloc_common): Delete and move bulk of processing to...
5051 (decl_sloc): ...here.
5052 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5053 (dump_ada_double_name): Remove S parameter and compute the suffix.
5054 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5055 element type and deal with an anonymous one.
5056 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5057 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5058 and remove reference to QUAL_UNION_TYPE.
5059 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5060 (dump_nested_type): ...here. New function extracted from above.
5061 Generate a full declaration for anonymous element type of arrays.
5062 (print_ada_declaration): Really skip anonymous declarations. Remove
5063 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5064 Clean up processing of declarations of array types and objects.
5065 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5066 Remove obsolete code and tidy up.
5068 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
5071 * c-common.c (handle_transparent_union_attribute): Update
5074 2015-11-27 Martin Liska <mliska@suse.cz>
5077 * array-notation-common.c (cilkplus_extract_an_triplets):
5078 Release vector of vectors.
5079 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5081 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5084 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5085 (print_ada_struct_decl): Likewise.
5087 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5090 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5091 * cilk.c (recognize_spawn): Determine location in a more precise
5094 2015-11-19 Jason Merrill <jason@redhat.com>
5096 * c-common.c (shorten_compare): But look through macros from
5099 2015-11-18 Jason Merrill <jason@redhat.com>
5101 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5102 non-constant operand comes from a macro.
5104 2015-11-17 Jason Merrill <jason@redhat.com>
5107 * c-common.c (warn_tautological_cmp): Fold before checking for
5110 2015-11-16 Marek Polacek <polacek@redhat.com>
5113 * c-common.c (check_case_bounds): Fold low and high cases.
5115 2015-11-16 Marek Polacek <polacek@redhat.com>
5117 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5118 * c-common.c (c_common_get_alias_set): Likewise.
5119 (handle_visibility_attribute): Likewise.
5121 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5123 * c-common.c (handle_simd_attribute): New.
5124 (struct attribute_spec): Add entry for "simd".
5125 (handle_simd_attribute): New.
5127 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
5129 * c-lex.c (interpret_float): Use fold_convert.
5131 2015-11-13 David Malcolm <dmalcolm@redhat.com>
5133 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5134 and store it on the result.
5135 * c-opts.c (c_common_init_options): Set
5136 global_dc->colorize_source_p.
5138 2015-11-12 James Norris <jnorris@codesourcery.com>
5139 Joseph Myers <joseph@codesourcery.com>
5141 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
5142 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5143 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5144 PRAGMA_OACC_CLAUSE_LINK.
5146 2015-11-11 Marek Polacek <polacek@redhat.com>
5150 * c-common.c (valid_array_size_p): New function.
5151 * c-common.h (valid_array_size_p): Declare.
5153 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
5156 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5158 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
5160 * array-notation-common.c: Remove unused header files.
5161 * c-ada-spec.c: Likewise.
5162 * c-cilkplus.c: Likewise.
5163 * c-common.c: Likewise.
5164 * c-cppbuiltin.c: Likewise.
5165 * c-dump.c: Likewise.
5166 * c-format.c: Likewise.
5167 * c-gimplify.c: Likewise.
5168 * c-indentation.c: Likewise.
5169 * c-lex.c: Likewise.
5170 * c-omp.c: Likewise.
5171 * c-opts.c: Likewise.
5172 * c-pch.c: Likewise.
5173 * c-ppoutput.c: Likewise.
5174 * c-pragma.c: Likewise.
5175 * c-pretty-print.c: Likewise.
5176 * c-semantics.c: Likewise.
5177 * c-ubsan.c: Likewise.
5179 * stub-objc.c: Likewise.
5181 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5182 Cesar Philippidis <cesar@codesourcery.com>
5183 James Norris <jnorris@codesourcery.com>
5184 Julian Brown <julian@codesourcery.com>
5185 Nathan Sidwell <nathan@codesourcery.com>
5187 * c-pragma.c (oacc_pragmas): Add "routine".
5188 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5190 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5192 * c-common.c (c_common_attributes): Add scalar_storage_order.
5193 (handle_scalar_storage_order_attribute): New function.
5194 * c-pragma.c (global_sso): New variable.
5195 (maybe_apply_pragma_scalar_storage_order): New function.
5196 (handle_pragma_scalar_storage_order): Likewise.
5197 (init_pragma): Register scalar_storage_order.
5198 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5199 * c.opt (Wscalar-storage-order): New warning.
5200 (fsso-struct=): New option.
5202 2015-11-08 Martin Sebor <msebor@redhat.com>
5204 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5206 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5208 * c-common.c: Don't undef DEF_BUILTIN.
5210 2015-11-06 David Malcolm <dmalcolm@redhat.com>
5212 * c-common.c (c_cpp_error): Convert parameter from location_t to
5213 rich_location *. Eliminate the "column_override" parameter and
5214 the call to diagnostic_override_column.
5215 Update the "done_lexing" clause to set range 0
5216 on the rich_location, rather than overwriting a location_t.
5217 * c-common.h (c_cpp_error): Convert parameter from location_t to
5218 rich_location *. Eliminate the "column_override" parameter.
5220 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5221 Thomas Schwinge <thomas@codesourcery.com>
5222 James Norris <jnorris@codesourcery.com>
5224 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5225 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5226 clauses with parallel and kernels and loops.
5227 * c-pragma.h (enum pragma_omp_clause): Add entries for
5228 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5229 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5230 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5232 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5234 2015-11-05 Martin Sebor <msebor@redhat.com>
5237 * c.opt (-Wplacement-new): New option.
5239 2015-11-05 Jakub Jelinek <jakub@redhat.com>
5241 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5242 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5243 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5244 save_expr or create_tmp_var* if TEST is true.
5245 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5246 Don't call add_stmt here.
5247 (struct c_omp_check_loop_iv_data): New type.
5248 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5249 c_omp_check_loop_iv_exprs): New functions.
5250 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5252 (c_omp_declare_simd_clauses_to_numbers): Change
5253 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5254 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5255 from numbers to PARM_DECLs.
5257 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5259 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5262 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
5265 * c-common.h (fold_offsetof_1): Add argument.
5266 * c-common.c (fold_offsetof_1): Diagnose more invalid
5267 offsetof expressions that reference elements past the end of
5270 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5271 Chung-Lin Tang <cltang@codesourcery.com>
5273 * c-pragma.c (oacc_pragmas): Add "atomic".
5274 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5276 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5278 * c-common.c (handle_target_clones_attribute): New.
5279 (c_common_attribute_table): Add handle_target_clones_attribute.
5280 (handle_always_inline_attribute): Add check on target_clones attribute.
5281 (handle_target_attribute): Ditto.
5283 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
5285 * array-notation-common.c: Reorder #include's and remove duplicates.
5286 * c-ada-spec.c: Likewise.
5287 * c-cilkplus.c: Likewise.
5288 * c-common.c: Likewise.
5289 * c-cppbuiltin.c: Likewise.
5290 * c-dump.c: Likewise.
5291 * c-format.c: Likewise.
5292 * c-gimplify.c: Likewise.
5293 * c-indentation.c: Likewise.
5294 * c-lex.c: Likewise.
5295 * c-omp.c: Likewise.
5296 * c-opts.c: Likewise.
5297 * c-pch.c: Likewise.
5298 * c-ppoutput.c: Likewise.
5299 * c-pragma.c: Likewise.
5300 * c-pretty-print.c: Likewise.
5301 * c-semantics.c: Likewise.
5302 * c-ubsan.c: Likewise.
5304 * stub-objc.c: Likewise.
5306 2015-10-28 Jason Merrill <jason@redhat.com>
5308 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5310 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5311 James Norris <jnorris@codesourcery.com>
5312 Cesar Philippidis <cesar@codesourcery.com>
5316 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5317 * c-omp.c (c_oacc_split_loop_clauses): New function.
5319 2015-10-21 Martin Sebor <msebor@redhat.com>
5322 * c.opt: End each sentence that describes an option with a period.
5324 2015-10-20 Marek Polacek <polacek@redhat.com>
5326 * array-notation-common.c (is_cilkplus_vector_p): Define.
5327 * c-common.h (is_cilkplus_vector_p): Declare.
5329 2015-10-20 Marek Polacek <polacek@redhat.com>
5331 * c.opt (std=gnu++11): Do not describe as experimental.
5332 (std=gnu++14): Likewise.
5334 2015-10-19 Jason Merrill <jason@redhat.com>
5336 * c-cppbuiltin.c (c_cpp_builtins): Define
5337 __cpp_nontype_template_args.
5339 2015-10-19 Jason Merrill <jason@redhat.com>
5341 * c-cppbuiltin.c (c_cpp_builtins): Define
5342 __cpp_enumerator_attributes, __cpp_fold_expressions,
5343 __cpp_unicode_characters.
5345 2015-10-13 Jakub Jelinek <jakub@redhat.com>
5346 Aldy Hernandez <aldyh@redhat.com>
5348 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5349 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5350 (c_define_builtins): Likewise.
5351 * c-common.h (enum c_omp_clause_split): Add
5352 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5353 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5354 (c_finish_omp_for): Add ORIG_DECLV argument.
5355 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5356 201511 instead of 201307.
5357 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5358 OMP_CRITICAL_CLAUSES to it.
5359 (c_finish_omp_ordered): Add CLAUSES argument, set
5360 OMP_ORDERED_CLAUSES to it.
5361 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5362 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5363 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5364 constructs and new OpenMP 4.5 clauses. Clear
5365 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5367 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5368 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5369 (enum pragma_omp_clause): Add
5370 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5371 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5373 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5375 * c-lex.c (interpret_float): Use real_equal instead of
5378 2015-10-04 Jason Merrill <jason@redhat.com>
5380 Implement N4514, C++ Extensions for Transactional Memory.
5381 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5382 (c_common_attribute_table): Add transaction_safe_dynamic.
5383 transaction_safe now affects type identity.
5384 (handle_tm_attribute): Handle transaction_safe_dynamic.
5385 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5386 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5387 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5389 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5390 * c-pretty-print.c (pp_c_attributes_display): Don't print
5391 transaction_safe in C++.
5393 2015-10-02 Marek Polacek <polacek@redhat.com>
5395 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5397 2015-10-02 Marek Polacek <polacek@redhat.com>
5400 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5401 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5402 * c.opt (Wduplicated-cond): New option.
5404 2015-10-01 Joseph Myers <joseph@codesourcery.com>
5406 * c.opt (std=c11): Do not describe as experimental.
5407 (std=gnu11): Likewise.
5408 (std=iso9899:2011): Likewise.
5410 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5412 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5413 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5415 2015-09-25 Marek Polacek <polacek@redhat.com>
5417 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5418 (ubsan_instrument_shift): Likewise.
5420 2015-09-25 Marek Polacek <polacek@redhat.com>
5423 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5425 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5427 * c-indentation.c (should_warn_for_misleading_indentation):
5428 Compare next_stmt_vis_column with guard_line_first_nws instead
5429 of with guard_line_vis_column.
5431 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5435 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5436 options and options not valid for the current language.
5438 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5440 * c-indentation.c (should_warn_for_misleading_indentation):
5441 Float out and consolidate the calls to get_visual_column that
5442 are passed guard_exploc as an argument. Compare
5443 next_stmt_vis_column with guard_line_first_nws instead of with
5444 body_line_first_nws.
5446 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5448 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5449 Wnamespaces): New C++ warnings.
5451 2015-09-22 Jason Merrill <jason@redhat.com>
5453 * c-common.h (abi_compat_version_crosses): New.
5454 (warn_abi_version): Declare.
5455 * c-common.c: Define it.
5456 * c-opts.c (c_common_post_options): Handle it.
5457 flag_abi_compat_version defaults to 8.
5459 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5461 Complete the implementation of N4230, Nested namespace definition.
5462 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5463 __cpp_nested_namespace_definitions.
5465 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5467 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5469 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5471 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5473 * c-pragma.h (pragma_lex): Add optional loc argument.
5475 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5477 * c-format.c (check_format_arg): Adjust to use common block size in all
5480 2015-09-15 David Malcolm <dmalcolm@redhat.com>
5482 * c-format.c (location_from_offset): Update for change in
5483 signature of location_get_source_line.
5484 * c-indentation.c (get_visual_column): Likewise.
5485 (line_contains_hash_if): Likewise.
5487 2015-09-14 Marek Polacek <polacek@redhat.com>
5489 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5490 setting various warnings.
5492 2015-09-14 Marek Polacek <polacek@redhat.com>
5494 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5497 2015-09-11 Mark Wielaard <mjw@redhat.com>
5500 * c.opt (Wunused-variable): Option from common.opt.
5501 (Wunused-const-variable): New option.
5503 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5506 * c.opt ([Wsubobject-linkage]): Add.
5508 2015-09-03 Martin Sebor <msebor@redhat.com>
5511 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5513 * c-common.c (reject_gcc_builtin): Define.
5515 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5518 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5520 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5521 cilk_gimplify_call_params_in_spawned_fn.
5522 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5523 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5526 2015-08-25 Marek Polacek <polacek@redhat.com>
5529 * c-common.c (handle_weak_attribute): Don't check whether the
5530 visibility can be changed here.
5532 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5534 * c-lex.c (c_lex_with_flags): Use explicit locations.
5536 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5538 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5539 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5541 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5544 * c-common.c (check_builtin_function_arguments): Add check
5545 for BUILT_IN_SIGNBIT argument.
5547 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5550 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5553 2015-08-17 Marek Polacek <polacek@redhat.com>
5555 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5556 with whitespaces before qualifier names.
5558 2015-08-12 Marek Polacek <polacek@redhat.com>
5561 * c-common.c (maybe_warn_shift_overflow): Properly handle
5562 left-shifting 1 into the sign bit.
5564 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5566 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5568 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5569 Braden Obrzut <admin@maniacsvault.net>
5570 Jason Merrill <jason@redhat.com>
5572 Add C++ Concepts TS support.
5573 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5574 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5575 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5577 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5578 * c.opt (fconcepts): New.
5580 2015-08-02 Martin Sebor <msebor@redhat.com>
5582 * c.opt (-Wframe-address): New warning option.
5584 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5586 * c-indentation.c (should_warn_for_misleading_indentation):
5589 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5591 * c-indentation.c (get_visual_column): Add parameter first_nws,
5592 use it. Update comment documenting the function.
5593 (is_first_nonwhitespace_on_line): Remove.
5594 (should_warn_for_misleading_indentation): Replace usage of
5595 of is_first_nonwhitespace_on_line with get_visual_column.
5597 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5599 * c-indentation.h (struct token_indent_info): Define.
5600 (get_token_indent_info): Define.
5601 (warn_for_misleading_information): Declare.
5602 * c-common.h (warn_for_misleading_information): Remove.
5603 * c-identation.c (warn_for_misleading_indentation):
5604 Change declaration to take three token_indent_infos. Adjust
5606 * c-identation.c (should_warn_for_misleading_indentation):
5607 Likewise. Bail out early if the body is a compound statement.
5608 (guard_tinfo_to_string): Define.
5610 2015-07-30 Jason Merrill <jason@redhat.com>
5612 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5613 '*' for reference decay.
5615 2015-07-30 Marek Polacek <polacek@redhat.com>
5617 * c-common.c (warn_tautological_cmp): Bail for float types.
5619 2015-07-27 Marek Polacek <polacek@redhat.com>
5622 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5624 2015-07-27 Marek Polacek <polacek@redhat.com>
5628 * c-common.c (find_array_ref_with_const_idx_r): New function.
5629 (warn_tautological_cmp): New function.
5630 * c-common.h (warn_tautological_cmp): Declare.
5631 * c.opt (Wtautological-compare): New option.
5633 2015-07-23 Marek Polacek <polacek@redhat.com>
5635 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5636 (ubsan_instrument_shift): Likewise.
5638 2015-07-23 Marek Polacek <polacek@redhat.com>
5641 * c-ubsan.c: Include gimplify.h.
5642 (ubsan_instrument_division): Unshare OP0 and OP1.
5643 (ubsan_instrument_shift): Likewise.
5645 2015-07-20 Marek Polacek <polacek@redhat.com>
5646 Richard Sandiford <richard.sandiford@arm.com>
5649 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5650 Use EXPR_LOC_OR_LOC.
5651 (maybe_warn_shift_overflow): New function.
5652 * c-common.h (maybe_warn_shift_overflow): Declare.
5653 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5654 * c.opt (Wshift-overflow): New option.
5656 2015-07-16 Martin Liska <mliska@suse.cz>
5658 * c-format.c (static void check_format_info_main): Use
5659 object_allocator instead of pool_allocator.
5660 (check_format_arg): Likewise.
5661 (check_format_info_main): Likewise.
5663 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
5665 * c-opts.c: Remove multiline #include comment.
5667 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
5669 * c-common.c: Fix double word typos.
5671 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5673 * c-ada-spec.h (cpp_operation): Revert latest change.
5674 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5675 constructors and destructors.
5677 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
5679 * c-common.h: Adjust includes for flags.h changes.
5680 * stub-objc.c: Likewise.
5682 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5684 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5685 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5687 2015-07-08 Jakub Jelinek <jakub@redhat.com>
5689 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5690 are to be removed, return NULL rather than original clauses list.
5692 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
5694 * array-notation-common.c: Adjust includes.
5695 * c-ada-spec.c: Likewise.
5696 * c-cilkplus.c: Likewise.
5697 * c-common.h: Likewise.
5698 * c-cppbuiltin.c: Likewise.
5699 * c-dump.c: Likewise.
5700 * c-format.c: Likewise.
5701 * c-gimplify.c: Likewise.
5702 * c-indentation.c: Likewise.
5703 * c-lex.c: Likewise.
5704 * c-omp.c: Likewise.
5705 * c-opts.c: Likewise.
5706 * c-pch.c: Likewise.
5707 * c-ppoutput.c: Likewise.
5708 * c-pragma.c: Likewise.
5709 * c-pretty-print.c: Likewise.
5710 * c-semantics.c: Likewise.
5711 * c-ubsan.c: Likewise.
5713 * stub-objc.c: Likewise.
5715 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5717 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5718 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5720 2015-07-01 Jason Merrill <jason@redhat.com>
5722 * c-common.h (D_CXX11): Rename from D_CXX0X.
5723 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5724 * c-common.c: Adjust.
5726 * c-opts.c (c_common_post_options): Default to C++14.
5728 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5730 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5732 Implement N4197 - Adding u8 character literals
5733 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
5735 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
5736 CPP_UTF8CHAR_USERDEF tokens.
5737 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
5738 and CPP_UTF8CHAR tokens.
5739 (lex_charconst): Treat CPP_UTF8CHAR token.
5741 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5744 * c-common.c (do_warn_unused_parameter): Move here.
5745 * c-common.h (do_warn_unused_parameter): Declare.
5747 2015-06-29 Marek Polacek <polacek@redhat.com>
5750 * c-common.c (check_case_bounds): Add bool * parameter. Set
5752 (c_add_case_label): Add bool * parameter. Pass it down to
5754 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5756 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5759 2015-06-27 Marek Polacek <polacek@redhat.com>
5761 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5762 or VECTOR_INTEGER_TYPE_P throughout.
5763 * c-gimplify.c: Likewise.
5765 2015-06-26 Marek Polacek <polacek@redhat.com>
5767 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5768 * c-common.c (c_fully_fold_internal): Likewise.
5769 (c_alignof_expr): Likewise.
5770 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5771 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
5772 * cilk.c (create_parm_list): Likewise.
5774 2015-06-26 Marek Polacek <polacek@redhat.com>
5776 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5778 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5780 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5781 * c-gimplify.c: Likewise.
5782 * c-pragma.c: Likewise.
5783 * c-ubsan.c: Likewise.
5786 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5788 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5791 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
5793 * cilk.c: Move calls.h after tm.h in the include chain.
5795 2015-06-25 Marek Polacek <polacek@redhat.com>
5797 * array-notation-common.c: Use VAR_P throughout.
5798 * c-ada-spec.c: Likewise.
5799 * c-common.c: Likewise.
5800 * c-format.c: Likewise.
5801 * c-gimplify.c: Likewise.
5802 * c-omp.c: Likewise.
5803 * c-pragma.c: Likewise.
5804 * c-pretty-print.c: Likewise.
5807 2015-06-25 Marek Polacek <polacek@redhat.com>
5809 * cilk.c (extract_free_variables): Use is_global_var.
5811 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5813 * c-common.c: Don't include target-def.h.
5815 2015-06-23 Marek Polacek <polacek@redhat.com>
5817 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5818 when comparing INTEGER_CSTs.
5820 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5822 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5823 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5824 (dump_ada_template): Skip partially specialized types.
5826 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5828 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5831 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
5833 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5834 * c-ada-spec.c: Likewise.
5835 * c-cilkplus.c: Likewise.
5836 * c-common.c: Likewise.
5837 * c-common.h: Likewise.
5838 * c-cppbuiltin.c: Likewise.
5839 * c-dump.c: Likewise.
5840 * c-format.c: Likewise.
5841 * c-gimplify.c: Likewise.
5842 * c-indentation.c: Likewise.
5843 * c-lex.c: Likewise.
5844 * c-omp.c: Likewise.
5845 * c-opts.c: Likewise.
5846 * c-pch.c: Likewise.
5847 * c-ppoutput.c: Likewise.
5848 * c-pragma.c: Likewise.
5849 * c-pretty-print.c: Likewise.
5850 * c-semantics.c: Likewise.
5851 * c-ubsan.c: Likewise.
5853 * stub-objc.c: Likewise.
5855 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5858 * c-common.c (c_common_truthvalue_conversion): Warn when
5859 converting an address of a reference to a truth value.
5861 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
5863 * array-notation-common.c : Adjust include files.
5864 * c-ada-spec.c : Likewise.
5865 * c-cilkplus.c : Likewise.
5866 * c-common.c : Likewise.
5867 * c-common.h : Likewise.
5868 * c-cppbuiltin.c : Likewise.
5869 * c-dump.c : Likewise.
5870 * c-format.c : Likewise.
5871 * c-gimplify.c : Likewise.
5872 * c-indentation.c : Likewise.
5873 * c-lex.c : Likewise.
5874 * c-omp.c : Likewise.
5875 * c-opts.c : Likewise.
5876 * c-pch.c : Likewise.
5877 * c-ppoutput.c : Likewise.
5878 * c-pragma.c : Likewise.
5879 * c-pretty-print.c : Likewise.
5880 * c-semantics.c : Likewise.
5881 * c-ubsan.c : Likewise.
5882 * cilk.c : Likewise.
5883 * stub-objc.c : Likewise.
5885 2015-06-08 Marek Polacek <polacek@redhat.com>
5888 * c-format.c (location_from_offset): Return LOC if LINE is null.
5890 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
5892 * c-common.h (c_parse_final_cleanups): New prototype.
5893 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5895 2015-06-04 Sriraman Tallam <tmsriram@google.com>
5897 * c-common.c (noplt): New attribute.
5898 (handle_noplt_attribute): New handler.
5900 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
5902 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5903 * c-ada-spec.c: Likewise.
5904 * c-cilkplus.c: Likewise.
5905 * c-common.c: Likewise.
5906 * c-common.h: Likewise.
5907 * c-cppbuiltin.c: Likewise.
5908 * c-dump.c: Likewise.
5909 * c-format.c: Likewise.
5910 * c-gimplify.c: Likewise.
5911 * c-indentation.c: Likewise.
5912 * c-lex.c: Likewise.
5913 * c-omp.c: Likewise.
5914 * c-opts.c: Likewise.
5915 * c-pch.c: Likewise.
5916 * c-ppoutput.c: Likewise.
5917 * c-pragma.c: Likewise.
5918 * c-pretty-print.c: Likewise.
5919 * c-semantics.c: Likewise.
5920 * c-ubsan.c: Likewise.
5922 * stub-objc.c: Likewise.
5924 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5927 * c-indentation.c (should_warn_for_misleading_indentation): Use
5928 expand_location rather than expand_location_to_spelling_point.
5929 Don't warn if the guarding statement is more indented than the
5932 2015-06-02 David Malcolm <dmalcolm@redhat.com>
5934 * c-indentation.c (warn_for_misleading_indentation): Bail out
5935 immediately if -Wmisleading-indentation isn't enabled.
5937 2015-06-01 Martin Liska <mliska@suse.cz>
5939 * c-format.c (check_format_arg):Use new type-based pool allocator.
5940 (check_format_info_main) Likewise.
5942 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5944 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5945 (has_nontrivial_methods): Likewise.
5947 2015-05-25 Marek Polacek <polacek@redhat.com>
5949 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5951 2015-05-22 Marek Polacek <polacek@redhat.com>
5954 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5956 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5958 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5959 STACK_GROWS_DOWNWARD.
5961 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
5963 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5964 STACK_GROWS_DOWNWARD rather than if it is defined.
5966 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5969 * c-format.c (location_column_from_byte_offset): New.
5970 (location_from_offset): New.
5971 (struct format_wanted_type): Add offset_loc field.
5972 (check_format_info): Move handling of location for extra arguments
5973 closer to the point of warning.
5974 (check_format_info_main): Pass the result of location_from_offset
5976 (format_type_warning): Pass the result of location_from_offset
5979 2015-05-20 Marek Polacek <polacek@redhat.com>
5981 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5983 2015-05-20 Marek Polacek <polacek@redhat.com>
5985 * c-ada-spec.c (dump_sloc): Use DECL_P.
5987 2015-05-20 Marek Polacek <polacek@redhat.com>
5989 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5990 * c-common.c: Likewise.
5992 2015-05-19 David Malcolm <dmalcolm@redhat.com>
5994 * c-common.h (fe_file_change): Strengthen param from
5995 const line_map * to const line_map_ordinary *.
5996 (pp_file_change): Likewise.
5997 * c-lex.c (fe_file_change): Likewise.
5998 (cb_define): Use linemap_check_ordinary when invoking
6000 (cb_undef): Likewise.
6001 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
6002 invoking cb_file_change.
6003 (c_finish_options): Likewise.
6004 (push_command_line_include): Likewise.
6005 (cb_file_change): Strengthen param "new_map" from
6006 const line_map * to const line_map_ordinary *.
6007 * c-ppoutput.c (cb_define): Likewise for local "map".
6008 (pp_file_change): Likewise for param "map" and local "from".
6010 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
6012 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
6014 2015-05-18 Tom de Vries <tom@codesourcery.com>
6016 * c-common.c (build_va_arg_1): New function.
6017 (build_va_arg): Add address operator to va_list operand if necessary.
6019 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
6022 * c-common.c (int_safely_convertible_to_real_p): Define.
6023 (unsafe_conversion_p): Check conversions involving complex types.
6024 (conversion_warning): Add new warning message for conversions which
6025 discard imaginary component.
6026 * c-common.h: (enum conversion_safety): Add new enumerator for such
6029 2015-05-14 Marek Polacek <polacek@redhat.com>
6033 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6034 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6035 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6036 use it. If FOR_INT_CONST, require that all evaluated operands be
6039 2015-05-12 David Malcolm <dmalcolm@redhat.com>
6041 * c-common.h (warn_for_misleading_indentation): New prototype.
6042 * c-indentation.c: New file.
6043 * c.opt (Wmisleading-indentation): New option.
6045 2015-05-12 Tom de Vries <tom@codesourcery.com>
6047 PR tree-optimization/66010
6048 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6050 2015-05-09 Jason Merrill <jason@redhat.com>
6052 * c-opts.c (c_common_post_options): Also clear
6053 cpp_opts->cpp_warn_cxx11_compat.
6055 * c-common.h (enum cxx_dialect): Add cxx_unset.
6056 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6057 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6059 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6060 (std=gnu++0x): Mark as Undocumented.
6061 (std=gnu++1y): Add deprecated message.
6063 2015-05-08 Jason Merrill <jason@redhat.com>
6065 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6068 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6070 2015-05-08 Marek Polacek <polacek@redhat.com>
6073 * c.opt (Woverride-init-side-effects): New option.
6075 2015-05-07 Marek Polacek <polacek@redhat.com>
6078 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6080 * c.opt (Wshift-negative-value): New option.
6081 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6082 when -Wextra and C99/C++11 mode.
6084 2015-05-07 Marek Polacek <polacek@redhat.com>
6085 Martin Uecker <uecker@eecs.berkeley.edu>
6087 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6088 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6090 2015-05-05 Jason Merrill <jason@redhat.com>
6092 * c.opt (Wterminate): New.
6094 2015-04-30 Marek Polacek <polacek@redhat.com>
6096 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6097 require that the non-constant be of a boolean type.
6099 2015-04-29 Josh Triplett <josh@joshtriplett.org>
6101 * c-common.c (handle_section_attribute): Refactor to reduce
6102 nesting and distinguish between error cases.
6104 2015-04-29 Marek Polacek <polacek@redhat.com>
6107 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6110 2015-04-29 Jakub Jelinek <jakub@redhat.com>
6112 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6113 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6114 HOST_BITS_PER_WIDE_INT.
6116 2015-04-28 Tom de Vries <tom@codesourcery.com>
6118 PR tree-optimization/65887
6119 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6121 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
6122 Pierre-Marie de Rodat <derodat@adacore.com>
6124 * c-ada-spec.c (in_function): Delete.
6125 (dump_generic_ada_node): Do not change in_function and remove the
6126 redundant code dealing with it.
6127 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6128 (print_ada_methods): Output the static member functions in a nested
6129 package after the regular methods as well as associated renamings.
6131 2015-04-24 Marek Polacek <polacek@redhat.com>
6134 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6135 and OPT_Wshift_count_overflow.
6138 * c-common.c (warn_logical_operator): Warn if the operands have the
6141 2015-04-24 Marek Polacek <polacek@redhat.com>
6144 * c-common.c (warn_logical_operator): Bail if either operand comes
6145 from a macro expansion.
6147 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6150 * c-common.c (c_default_pointer_mode): Add definition.
6151 * c-common.h (c_default_pointer_mode): Add declaration.
6153 2015-03-11 Jakub Jelinek <jakub@redhat.com>
6155 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6156 on record_builtin_type argument.
6158 2015-03-10 Jakub Jelinek <jakub@redhat.com>
6161 * c-common.c (warn_logical_not_parentheses): Don't warn for
6164 2015-03-07 Marek Polacek <polacek@redhat.com>
6167 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6168 before trying to figure out whether we have a flexible array member.
6170 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
6171 Jonathan Wakely <jwakely.gcc@gmail.com>
6173 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6175 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6178 * c-ada-spec.c (print_destructor): Remove obsolete code.
6180 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6182 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6183 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6184 DECL_TEMPLATE_RESULT emulations.
6185 (dump_ada_template)): Add guard for TYPE_METHODS.
6187 2015-02-27 Marek Polacek <polacek@redhat.com>
6190 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6192 2015-02-27 Kai Tietz <ktietz@redhat.com>
6195 * c-pragma.c (handle_pragma_weak): Do not try to create
6196 weak/alias of declarations not being function, or variable
6199 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6202 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6204 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6206 2015-02-16 Marek Polacek <polacek@redhat.com>
6209 * c-format.c (check_format_types): Handle null param.
6211 2015-02-13 Marek Polacek <polacek@redhat.com>
6214 * c-format.c (check_format_types): Don't warn about different
6215 signedness if the original value is in the range of WANTED_TYPE.
6217 2015-02-12 Jason Merrill <jason@redhat.com>
6220 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6221 to the current highest version.
6222 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6224 2015-02-04 Jakub Jelinek <jakub@redhat.com>
6228 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6229 instead of RDIV_EXPR. Use build_binary_op instead of
6232 2015-01-30 Joseph Myers <joseph@codesourcery.com>
6234 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6235 to pass input_location as first argument.
6237 2015-01-23 Tom de Vries <tom@codesourcery.com>
6240 * c.opt (fopenacc): Mark as LTO option.
6242 2015-01-23 Tom de Vries <tom@codesourcery.com>
6245 * c.opt (fopenmp): Mark as LTO option.
6247 2015-01-21 Jakub Jelinek <jakub@redhat.com>
6250 * cilk.c (fill_decls_vec): Only put decls into vector v.
6251 (compare_decls): Fix up formatting.
6253 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6256 * cilk.c: Include vec.h.
6257 (struct cilk_decls): New structure.
6258 (wrapper_parm_cb): Split this function to...
6259 (fill_decls_vec): ...this...
6260 (create_parm_list): ...and this.
6261 (compare_decls): New function.
6262 (for_local_cb): Remove.
6263 (wrapper_local_cb): Ditto.
6264 (build_wrapper_type): For now first traverse and fill vector of
6265 declarations then sort it and then deal with sorted vector.
6266 (cilk_outline): Ditto.
6267 (declare_one_free_variable): Ditto.
6269 2015-01-21 Jason Merrill <jason@redhat.com>
6272 * c-format.c (check_format_arg): Call decl_constant_value.
6274 2015-01-19 Martin Liska <mliska@suse.cz>
6276 * c-common.c (handle_noicf_attribute): New function.
6278 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6279 Bernd Schmidt <bernds@codesourcery.com>
6280 James Norris <jnorris@codesourcery.com>
6281 Cesar Philippidis <cesar@codesourcery.com>
6282 Ilmir Usmanov <i.usmanov@samsung.com>
6283 Jakub Jelinek <jakub@redhat.com>
6285 * c.opt (fopenacc): New option.
6286 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6287 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6289 * c-common.h (c_finish_oacc_wait): New prototype.
6290 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6291 (c_finish_oacc_wait): New function.
6292 * c-pragma.c (oacc_pragmas): New variable.
6293 (c_pp_lookup_pragma, init_pragma): Handle it.
6294 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6295 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6296 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6297 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6298 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6299 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6300 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6301 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6302 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6303 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6304 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6305 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6306 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6307 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6308 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6309 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6310 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6311 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6312 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6313 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6314 PRAGMA_OACC_CLAUSE_WORKER.
6316 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
6318 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6319 for the new option fstack-protector_explicit.
6320 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6321 (handle_stack_protect_attribute): New function.
6323 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
6325 * c.opt: New option -Warray-bounds=.
6327 2015-01-09 Michael Collison <michael.collison@linaro.org>
6329 * array-notation-common.c: Include hash-set.h, machmode.h,
6330 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6331 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6332 * c-ada-spec.c: Ditto.
6333 * c-cilkplus.c: Ditto.
6334 * c-common.c: Include input.h due to flattening of tree.h.
6335 Define macro GCC_C_COMMON_C.
6336 * c-common.h: Flatten tree.h header files into c-common.h.
6337 Remove include of tree-core.h.
6338 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6339 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6340 fold-const.h, wide-int.h, and inchash.h due to
6341 flattening of tree.h.
6343 * c-format.c: Flatten tree.h header files into c-common.h.
6344 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6345 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6346 fold-const.h, wide-int.h, and inchash.h due to
6347 flattening of tree.h.
6348 * c-dump.c: Include hash-set.h, machmode.h,
6349 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6350 fold-const.h, wide-int.h, and inchash.h due to
6351 flattening of tree.h.
6352 * c-format.c: Include hash-set.h, machmode.h,
6353 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6354 fold-const.h, wide-int.h, inchash.h and real.h due to
6355 flattening of tree.h.
6356 * c-gimplify.c: Include hash-set.h, machmode.h,
6357 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6358 fold-const.h, wide-int.h, and inchash.h due to
6359 flattening of tree.h.
6365 * c-ppoutput.c: Ditto.
6366 * c-pragma.c: Ditto.
6367 * c-pretty-print.c: Ditto.
6368 * c-semantics.c: Ditto.
6370 * stub-objc.c: Ditto.
6372 2015-01-08 Jason Merrill <jason@redhat.com>
6374 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6375 do_ubsan_in_current_function.
6376 (ubsan_maybe_instrument_reference_or_call): Likewise.
6377 * c-ubsan.h: Declare it.
6379 2015-01-08 Mike Stump <mikestump@comcast.net>
6381 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6383 2015-01-07 Marek Polacek <polacek@redhat.com>
6386 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6387 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6389 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6392 * c.opt (Wsuggest-override): New option.
6394 2015-01-05 Jakub Jelinek <jakub@redhat.com>
6396 Update copyright years.
6398 2015-01-05 Marek Polacek <polacek@redhat.com>
6401 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6403 * c-common.h (warn_array_subscript_with_type_char): Update
6406 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6408 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6409 Control macro with flag_sized_deallocation.
6411 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
6413 * c.opt (Wdiscarded-array-qualifiers): New option.
6415 2014-12-19 Jakub Jelinek <jakub@redhat.com>
6417 PR preprocessor/63831
6418 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6419 and __has_cpp_attribute here.
6420 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6421 c_common_has_attribute.
6422 * c-common.h (c_common_has_attribute): New prototype.
6423 * c-lex.c (init_c_lex): Set cb->has_attribute to
6424 c_common_has_attribute instead of cb_has_attribute.
6425 (get_token_no_padding): New function.
6426 (cb_has_attribute): Renamed to ...
6427 (c_common_has_attribute): ... this. No longer static. Use
6428 get_token_no_padding, require ()s, don't build TREE_LIST
6429 unnecessarily, fix up formatting, adjust diagnostics, call
6432 2014-12-15 Jason Merrill <jason@redhat.com>
6434 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6435 (-Wsized-deallocation): New.
6436 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6437 to on in C++14 and up.
6439 2014-12-11 Jason Merrill <jason@redhat.com>
6441 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6443 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6444 we aren't complaining about VLAs.
6446 2014-12-06 Marek Polacek <polacek@redhat.com>
6448 PR tree-optimization/64183
6449 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6450 shift-expression if it is integer_type_node. Use types_compatible_p.
6452 2014-11-29 Jakub Jelinek <jakub@redhat.com>
6454 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6455 last argument from create_tmp_var_raw and create_tmp_var calls.
6456 * cilk.c (gimplify_cilk_spawn): Likewise.
6457 * c-omp.c (c_finish_omp_atomic): Likewise.
6459 2014-11-28 Marek Polacek <polacek@redhat.com>
6461 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6462 instead of unsigned_type_node.
6464 2014-11-28 Marek Polacek <polacek@redhat.com>
6467 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6469 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6470 expression to unsigned_type_node.
6472 2014-11-20 Mark Wielaard <mjw@redhat.com>
6475 * c-opts.c (set_std_c89): Set lang_hooks.name.
6476 (set_std_c99): Likewise.
6477 (set_std_c11): Likewise.
6478 (set_std_cxx98): Likewise.
6479 (set_std_cxx11): Likewise.
6480 (set_std_cxx14): Likewise.
6481 (set_std_cxx1z): Likewise.
6483 2014-11-21 Jakub Jelinek <jakub@redhat.com>
6486 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6487 return type to bool.
6488 * c-common.c: Include gimple-expr.h.
6489 (convert_vector_to_pointer_for_subscript): Change return type to
6490 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6491 and copy it into a TARGET_EXPR and use that instead of *vecp
6494 2014-11-19 David Malcolm <dmalcolm@redhat.com>
6496 Merger of git branch "gimple-classes-v2-option-3".
6497 * ChangeLog.gimple-classes: New.
6498 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6499 from being just a vec<gimple> to a vec<gbind *>.
6501 2014-11-18 Jakub Jelinek <jakub@redhat.com>
6504 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6505 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6506 get_pointer_alignment for non-pointers. Use ptype, or if it is
6507 reference type, corresponding pointer type, as type of kind
6509 (ubsan_maybe_instrument_reference,
6510 ubsan_maybe_instrument_member_call): Adjust callers.
6512 2014-11-15 Marek Polacek <polacek@redhat.com>
6515 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6517 (extract_array_notation_exprs): Return for NULL node.
6519 2014-11-12 Joseph Myers <joseph@codesourcery.com>
6521 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6522 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6524 2014-11-12 Jakub Jelinek <jakub@redhat.com>
6527 * c-common.c (check_builtin_function_arguments): Handle
6528 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6530 2014-11-10 Andi Kleen <ak@linux.intel.com>
6533 * c-common.h (check_no_cilk): Declare.
6534 * cilk.c (get_error_location): New function.
6535 (check_no_cilk): Dito.
6537 2014-11-10 Andi Kleen <ak@linux.intel.com>
6539 * cilk.c (recognize_spawn): Use expression location
6542 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6544 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6546 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6548 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6549 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6550 (__cpp_range_based_for, __cpp_initializer_lists,
6551 __cpp_delegating_constructors, __cpp_nsdmi,
6552 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6553 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6554 __has_cpp_attribute.
6555 * c-lex.c (cb_has_attribute): New callback CPP function;
6556 (init_c_lex): Set has_attribute callback.
6558 2014-11-04 Richard Biener <rguenther@suse.de>
6560 * c-common.c (shorten_compare): Do not shorten mixed
6561 DFP and non-DFP compares.
6563 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6565 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6566 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6567 Commentary and rearrangement of tests.
6568 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6569 Commentary and rearrangement of tests.
6570 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
6571 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6573 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6575 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6576 enum from machine_mode.
6578 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
6580 * c-common.c: Adjust include files.
6581 * c-gimplify.c: Ditto.
6583 * c-pragma.c: Ditto.
6586 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
6588 * c-gimplify.c: Adjust include files.
6590 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6593 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6594 c_common_initialize_diagnostics.
6595 * c-common.h: Likewise.
6597 2014-10-24 Marek Polacek <polacek@redhat.com>
6600 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6601 print "struct"/"union"/"enum" for typedefed names.
6603 2014-10-23 Marek Polacek <polacek@redhat.com>
6605 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6608 2014-10-22 Jakub Jelinek <jakub@redhat.com>
6609 Yury Gribov <y.gribov@samsung.com>
6611 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6612 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6613 instead of flag_sanitize_recover as bool flag.
6615 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6617 * cilk.c: Revert previous change.
6619 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6622 * cilk.c: Include vec.h.
6623 (struct cilk_decls): New structure.
6624 (wrapper_parm_cb): Split this function to...
6625 (fill_decls_vec): ...this...
6626 (create_parm_list): ...and this.
6627 (compare_decls): New function.
6628 (for_local_cb): Remove.
6629 (wrapper_local_cb): Ditto.
6630 (build_wrapper_type): For now first traverse and fill vector of
6631 declarations then sort it and then deal with sorted vector.
6632 (cilk_outline): Ditto.
6633 (declare_one_free_variable): Ditto.
6635 2014-10-17 Marek Polacek <polacek@redhat.com>
6637 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6638 * c.opt (Wimplicit-int): Initialize to -1.
6640 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
6642 * c-pragma.c: Adjust include files.
6643 * c-semantics.c: Likewise.
6645 2014-10-16 DJ Delorie <dj@redhat.com>
6647 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6650 2014-10-14 Jason Merrill <jason@redhat.com>
6653 * c-common.h (CPP_PREPARSED_EXPR): New.
6654 (N_CP_TTYPES): Adjust.
6656 2014-10-15 Marek Polacek <polacek@redhat.com>
6658 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6660 2014-10-14 DJ Delorie <dj@redhat.com>
6662 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6663 types, not just __int128.
6664 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6665 types, not just __int128.
6666 (cpp_atomic_builtins): Round pointer sizes up.
6667 (type_suffix): Use type precision, not specific types.
6668 * c-common.c (c_common_reswords): Remove __int128 special case.
6669 (c_common_type_for_size): Check for all __intN types, not just
6671 (c_common_type_for_mode): Likewise.
6672 (c_common_signed_or_unsigned_type): Likewise.
6673 (c_build_bitfield_integer_type): Likewise.
6674 (c_common_nodes_and_builtins): Likewise.
6675 (keyword_begins_type_specifier): Likewise.
6676 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6679 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6681 * c-common.c: Use hash_table instead of hashtab.
6683 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6685 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
6688 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
6693 * c-common.c (warn_logical_operator): Punt for vectors.
6695 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6697 Implement SD-6: SG10 Feature Test Recommendations
6698 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6699 macros and the __has_header macro.
6701 2014-09-30 Jason Merrill <jason@redhat.com>
6703 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6704 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6705 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6707 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6708 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6710 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6711 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6713 2014-09-24 Marek Polacek <polacek@redhat.com>
6717 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6719 2014-09-23 Andi Kleen <ak@linux.intel.com>
6721 * c-common.c (handle_no_reorder_attribute): New function.
6722 (c_common_attribute_table): Add no_reorder attribute.
6724 2014-09-22 Joseph Myers <joseph@codesourcery.com>
6726 * c-cppbuiltin.c (c_cpp_builtins): Define
6727 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6730 2014-09-18 Joseph Myers <joseph@codesourcery.com>
6732 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6733 for supported floating-point modes.
6735 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6737 * c.opt (Wpsabi): Use LangEnabledBy.
6738 * c-opts.c (c_common_handle_option): Do not handle here.
6740 2014-09-12 Joseph Myers <joseph@codesourcery.com>
6742 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6743 macros for floating-point modes.
6745 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
6748 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6749 __*_DENORM_MIN__ without denormals.
6751 2014-09-10 Jakub Jelinek <jakub@redhat.com>
6753 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6754 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6755 ubsan_create_data callers.
6756 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6757 index is constant or BIT_AND_EXPR with constant mask and is
6758 small enough for the bound.
6759 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6760 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6762 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6764 * c.opt: Add CppReason to various flags.
6765 (Wdate-time): Re-sort.
6766 * c-common.c: Include c-common.h earlier.
6767 (struct reason_option_codes_t): Delete.
6768 (c_option_controlling_cpp_error): Prefix global type and struct
6771 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6773 * c.opt (Wnormalized): New.
6774 (Wnormalized=): Use Enum and Reject Negative.
6775 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6777 2014-09-08 Joseph Myers <joseph@codesourcery.com>
6779 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6780 digits of floating-point modes if -fbuilding-libgcc.
6782 2014-09-05 Joseph Myers <joseph@codesourcery.com>
6784 * c-cppbuiltin.c (c_cpp_builtins): Also define
6785 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6786 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6787 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6788 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6789 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6790 __LIBGCC_STACK_GROWS_DOWNWARD__,
6791 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6792 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6793 __LIBGCC_DWARF_FRAME_REGISTERS__,
6794 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6795 __LIBGCC_STACK_POINTER_REGNUM__ and
6796 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6797 (builtin_define_with_value): Handle backslash-escaping in string
6800 2014-09-05 Richard Biener <rguenther@suse.de>
6803 * c-format.c (check_format_arg): Properly handle
6804 effectively signed POINTER_PLUS_EXPR offset.
6806 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6808 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6809 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6810 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6812 * c-opts.c (c_common_handle_option): Do not handle here.
6813 (sanitize_cpp_opts): Likewise.
6814 * c-common.c (struct reason_option_codes_t): Handle
6815 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6817 2014-09-03 Marek Polacek <polacek@redhat.com>
6819 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6821 2014-09-02 Jakub Jelinek <jakub@redhat.com>
6822 Balaji V. Iyer <balaji.v.iyer@intel.com>
6823 Igor Zamyatin <igor.zamyatin@intel.com>
6825 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6826 * c-common.c (c_common_reswords): Added _Cilk_for.
6827 * c-common.h (enum rid): Added RID_CILK_FOR.
6828 (cilk_for_number_of_iterations): Add declaration.
6829 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6831 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6832 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6834 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6836 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6837 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6838 Wundef): Use CPP, Var and Init.
6839 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6841 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6843 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6844 * c-opts.c (c_common_handle_option): Do not handle here.
6846 2014-08-25 Jason Merrill <jason@redhat.com>
6848 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6849 -std=c++14 and -std=gnu++14, rather than the reverse.
6850 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6851 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6852 * c-common.h (cxx_dialect): Remove cxx1y.
6854 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6856 * c-common.h (enum cxx_dialect): Add cxx14.
6857 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6858 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6859 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6861 2014-08-22 Jason Merrill <jason@redhat.com>
6863 * c.opt (std=gnu++17): Fix alias.
6865 2014-08-22 Marek Polacek <polacek@redhat.com>
6868 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6869 check for vector types. Drop LHS argument.
6870 * c-common.h (warn_logical_not_parentheses): Adjust.
6872 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6874 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6875 (Wmultichar): Likewise.
6876 (Wdate-time): Use C-family languages instead of Common. Use CPP
6878 * c-opts.c (c_common_handle_option): Do not handle the above
6880 (sanitize_cpp_opts): Likewise.
6882 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6885 * c-opts.c: Include tree-diagnostics.h.
6886 (c_diagnostic_finalizer): New.
6887 (c_common_initialize_diagnostics): Use it.
6889 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6891 PR preprocessor/51303
6892 * c-common.c (struct reason_option_codes_t option_codes):
6893 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6895 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6899 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6900 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6901 (c_common_post_options): Call init_global_opts_from_cpp.
6902 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6904 2014-08-19 Marek Polacek <polacek@redhat.com>
6907 * c-common.c (maybe_warn_bool_compare): New function.
6908 * c-common.h (maybe_warn_bool_compare): Declare.
6909 * c.opt (Wbool-compare): New option.
6911 2014-08-19 Marek Polacek <polacek@redhat.com>
6913 * c.opt (Wc99-c11-compat): New option.
6915 2014-08-19 Marek Polacek <polacek@redhat.com>
6917 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6918 to warn_c90_c99_compat.
6919 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6922 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6923 Steven Bosscher <steven@gcc.gnu.org>
6926 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6927 format_check_results.
6928 (check_function_format): Use true and add comment for boolean
6930 (finish_dollar_format_checking): Use explicit location when warning.
6931 (check_format_info): Likewise.
6932 (check_format_arg): Set extra_arg_loc and format_string_loc.
6933 (check_format_info_main): Use explicit location when warning.
6934 (check_format_types): Pass explicit location.
6935 (format_type_warning): Likewise.
6937 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6940 * c-format.c: Handle Fortran flags.
6942 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6945 * array-notation-common.c (find_rank): Added handling for other
6946 types of references.
6948 2014-08-10 Marek Polacek <polacek@redhat.com>
6951 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6952 * c.opt (Wc90-c99-compat): Add option.
6954 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6956 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6958 2014-08-03 Marek Polacek <polacek@redhat.com>
6960 * c-common.c (check_case_value): Add location_t parameter. Use it.
6961 (c_add_case_label): Pass loc to check_case_value.
6963 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6965 * cilk.c: Use hash_map instead of pointer_map.
6967 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6969 * c-gimplify.c: Use hash_set instead of pointer_set.
6971 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6974 * array-notation-common.c (extract_array_notation_exprs): Handling
6977 2014-08-01 Jakub Jelinek <jakub@redhat.com>
6979 * c-common.h (min_align_of_type): Removed prototype.
6980 * c-common.c (min_align_of_type): Removed.
6981 * c-ubsan.h (ubsan_maybe_instrument_reference,
6982 ubsan_maybe_instrument_member_call): New prototypes.
6983 * c-ubsan.c: Include stor-layout.h and builtins.h.
6984 (ubsan_maybe_instrument_reference_or_call,
6985 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6988 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
6991 * c.opt (-Wreturn-local-addr): Move to common.opt.
6993 2014-07-30 Jason Merrill <jason@redhat.com>
6998 * c.opt (-fuse-all-virtuals): New.
7000 2014-07-30 Tom Tromey <tromey@redhat.com>
7003 * c.opt (Wdesignated-init): New option.
7004 * c-common.c (c_common_attribute_table): Add "designated_init".
7005 (handle_designated_init): New function.
7007 2014-07-24 Marek Polacek <polacek@redhat.com>
7010 * c-opts.c (c_finish_options): If -imacros is in effect, return.
7012 2014-07-16 Dodji Seketeli <dodji@redhat.com>
7014 PR preprocessor/60723 - missing system-ness marks for macro tokens
7015 * c-ppoutput.c (struct print::prev_was_system_token): New data
7017 (init_pp_output): Initialize it.
7018 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
7019 (do_line_change): Return a flag saying if a line marker was
7021 (scan_translation_unit): Detect if the system-ness of the token we
7022 are about to emit is different from the one of the previously
7023 emitted token. If so, emit a line marker. Avoid emitting useless
7024 adjacent line markers. Avoid emitting line markers for tokens
7025 originating from the expansion of built-in macros.
7026 (scan_translation_unit_directives_only): Adjust.
7028 2014-07-15 Marek Polacek <polacek@redhat.com>
7030 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
7031 TYPE_MAX_VALUE is NULL.
7033 2014-07-14 Jakub Jelinek <jakub@redhat.com>
7036 * c.opt (Wmemset-transposed-args): New warning.
7038 2014-07-10 Jason Merrill <jason@redhat.com>
7042 * c.opt (-fuse-all-virtuals): New.
7044 2014-07-09 Richard Biener <rguenther@suse.de>
7047 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7048 using unsigned arithmetic if overflow does not wrap instead of
7049 if overflow is undefined.
7051 2014-07-06 Marek Polacek <polacek@redhat.com>
7054 * c.opt (Wsizeof-array-argument): New option.
7056 2014-07-03 Jakub Jelinek <jakub@redhat.com>
7058 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
7059 comments->count <= 1, as comments->entries might be NULL.
7061 2014-07-01 Marek Polacek <polacek@redhat.com>
7063 * c.opt (Wint-conversion): New option.
7065 2014-07-01 Marek Polacek <polacek@redhat.com>
7068 * c.opt (Wincompatible-pointer-types): New option.
7070 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7073 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7074 Do not discard TYPE_QUALS of type.
7076 2014-06-26 Jason Merrill <jason@redhat.com>
7078 * c-common.h (enum cxx_dialect): Add cxx1z.
7079 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7080 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7082 2014-06-26 Teresa Johnson <tejohnson@google.com>
7084 * c-common.h (get_dump_info): Declare.
7085 * c-gimplify.c (c_genericize): Use saved dump files.
7086 * c-opts.c (c_common_parse_file): Begin and end dumps
7087 once around parsing invocation.
7088 (get_dump_info): New function.
7090 2014-06-23 Marek Polacek <polacek@redhat.com>
7091 Andrew MacLeod <amacleod@redhat.com>
7094 * c-common.c (get_atomic_generic_size): Don't segfault if the
7095 type doesn't have a size.
7097 2014-06-20 Marek Polacek <polacek@redhat.com>
7099 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7100 (ubsan_walk_array_refs_r): New function.
7101 (c_genericize): Instrument array bounds.
7102 * c-ubsan.c: Include "internal-fn.h".
7103 (ubsan_instrument_division): Mark instrumented arrays as having
7104 side effects. Adjust ubsan_type_descriptor call.
7105 (ubsan_instrument_shift): Likewise.
7106 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7107 (ubsan_instrument_bounds): New function.
7108 (ubsan_array_ref_instrumented_p): New function.
7109 (ubsan_maybe_instrument_array_ref): New function.
7110 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7111 (ubsan_array_ref_instrumented_p): Declare.
7112 (ubsan_maybe_instrument_array_ref): Declare.
7114 2014-06-20 Hale Wang <hale.wang@arm.com>
7117 * c.opt (fshort-enums): Add to LTO.
7118 * c.opt (fshort-wchar): Likewise.
7120 2014-06-16 Marek Polacek <polacek@redhat.com>
7123 * c.opt (Wswitch-bool): Add Var.
7125 2014-06-12 Jakub Jelinek <jakub@redhat.com>
7128 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7129 #pragma omp target teams or
7130 #pragma omp {,target }teams distribute simd.
7132 2014-06-12 Jason Merrill <jason@redhat.com>
7134 * c.opt (Wabi=, fabi-compat-version): New.
7135 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7136 (c_common_post_options): Handle flag_abi_compat_version default.
7137 Disallow -fabi-compat-version=1.
7138 * c-common.h (abi_version_crosses): New.
7140 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
7142 * c-common.c (handle_section_attribute): Update handling for
7143 section names that are no longer trees.
7145 2014-06-10 Jakub Jelinek <jakub@redhat.com>
7148 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7149 (omp_pragmas): ... back here.
7151 2014-06-05 Marek Polacek <polacek@redhat.com>
7154 * c-common.c (warn_logical_not_parentheses): New function.
7155 * c-common.h (warn_logical_not_parentheses): Declare.
7156 * c.opt (Wlogical-not-parentheses): New option.
7158 2014-06-04 Marek Polacek <polacek@redhat.com>
7161 * c-common.c (check_case_bounds): Add location parameter.
7163 (c_add_case_label): Pass loc to check_case_bounds.
7165 2014-06-03 Marek Polacek <polacek@redhat.com>
7168 * c.opt (Wswitch-bool): New option.
7170 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7172 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7174 (record_types_used_by_current_var_decl): Move prototype to where
7177 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7178 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7179 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7181 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7183 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7184 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7186 * c-pretty-print.c (pp_c_void_constant): New function.
7187 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7188 (c_pretty_printer::expression): Handle VOID_CST.
7189 * cilk.c (extract_free_variables): Likewise.
7190 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7191 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7193 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7195 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7196 * c-pragma.c (push_alignment): Adjust.
7197 (handle_pragma_push_options): Likewise.
7199 2014-05-09 Marek Polacek <polacek@redhat.com>
7202 * c-common.c (check_user_alignment): Return -1 if alignment is error
7204 (handle_aligned_attribute): Don't call default_conversion on
7206 (handle_vector_size_attribute): Likewise.
7207 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7208 (handle_sentinel_attribute): Call default_conversion and allow even
7209 integral types as an argument.
7211 2014-05-08 Marek Polacek <polacek@redhat.com>
7214 * c-common.c (min_align_of_type): New function factored out from...
7215 (c_sizeof_or_alignof_type): ...here.
7216 * c-common.h (min_align_of_type): Declare.
7218 2014-05-08 Marek Polacek <polacek@redhat.com>
7221 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7222 parameter type of main.
7224 2014-05-07 DJ Delorie <dj@redhat.com>
7226 * c-cppbuiltin.c (print_bits_of_hex): New.
7227 (builtin_define_type_minmax): Print values using hex so as not to
7228 require a pre-computed list of string values.
7230 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7231 Mike Stump <mikestump@comcast.net>
7232 Richard Sandiford <rdsandiford@googlemail.com>
7234 * c-ada-spec.c: Include wide-int.h.
7235 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7236 (dump_generic_ada_node): Use wide-int interfaces.
7237 * c-common.c: Include wide-int-print.h.
7238 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7239 (pointer_int_sum): Use wide-int interfaces.
7240 (c_common_nodes_and_builtins): Use make_int_cst.
7241 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7242 (handle_alloc_size_attribute): Use wide-int interfaces.
7243 (get_nonnull_operand): Likewise.
7244 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7245 * c-lex.c: Include wide-int.h.
7246 (narrowest_unsigned_type): Take a widest_int rather than two
7248 (narrowest_signed_type): Likewise.
7249 (interpret_integer): Update accordingly. Use wide-int interfaces.
7250 (lex_charconst): Use wide-int interfaces.
7251 * c-pretty-print.c: Include wide-int.h.
7252 (pp_c_integer_constant): Use wide-int interfaces.
7253 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7254 INT_CST_LT_UNSIGNED.
7256 2014-05-06 Richard Biener <rguenther@suse.de>
7258 * c-opts.c (c_common_post_options): For -freestanding,
7259 -fno-hosted and -fno-builtin disable pattern recognition
7260 if not enabled explicitely.
7262 2014-05-02 Marek Polacek <polacek@redhat.com>
7264 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7266 2014-05-01 Marek Polacek <polacek@redhat.com>
7269 * c.opt (Wdiscarded-qualifiers): Add.
7271 2014-04-30 Marek Polacek <polacek@redhat.com>
7273 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7274 INT_MIN / -1 sanitization only for integer types.
7276 2014-04-25 Marek Polacek <polacek@redhat.com>
7279 * c-common.c (handle_noinline_attribute): Warn if the attribute
7280 conflicts with always_inline attribute.
7281 (handle_always_inline_attribute): Warn if the attribute conflicts
7282 with noinline attribute.
7284 2014-04-25 Marek Polacek <polacek@redhat.com>
7287 * c-common.c (check_main_parameter_types): Warn about variadic main.
7289 2014-04-24 Mike Stump <mikestump@comcast.net>
7291 * c.opt (Wshadow-ivar): Default to on.
7293 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7295 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7297 2014-04-23 Marek Polacek <polacek@redhat.com>
7299 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7301 2014-04-22 Jakub Jelinek <jakub@redhat.com>
7304 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7305 if flag_sanitize_undefined_trap_on_error.
7306 (ubsan_instrument_division, ubsan_instrument_shift,
7307 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7308 if !flag_sanitize_recover.
7310 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
7313 * c-common.c (registered_builtin_types): Make non-static.
7314 * c-common.h (registered_builtin_types): Declare.
7316 2014-04-14 Richard Biener <rguenther@suse.de>
7317 Marc Glisse <marc.glisse@inria.fr>
7320 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7321 apply may-alias the scalar pointer type when applicable.
7323 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7326 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7327 as possible argument for Cilk_spawn.
7329 2014-04-11 Tobias Burnus <burnus@net-b.de>
7332 * c.opt (Wformat-signedness): Add
7333 * c-format.c(check_format_types): Use it.
7335 2014-04-11 Jason Merrill <jason@redhat.com>
7338 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7339 default_conversion for an array argument.
7341 2014-04-08 Marek Polacek <polacek@redhat.com>
7344 * c-ubsan.c: Include asan.h.
7345 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7347 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7349 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7351 2014-04-02 Marek Polacek <polacek@redhat.com>
7353 * c-common.h (c_expand_expr): Remove declaration.
7355 2014-03-28 Jakub Jelinek <jakub@redhat.com>
7358 * c-common.c (add_atomic_size_parameter): When creating new
7359 params vector, push the size argument first.
7361 2014-03-26 Jakub Jelinek <jakub@redhat.com>
7363 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7364 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7365 ubsan_create_data callers.
7367 2014-03-22 Jakub Jelinek <jakub@redhat.com>
7370 * c-opts.c (c_finish_options): Restore cb_file_change call to
7373 2014-03-13 Jakub Jelinek <jakub@redhat.com>
7376 * c-pragma.c (apply_pragma_weak): Only look at
7377 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7378 DECL_ASSEMBLER_NAME_SET_P (decl).
7379 (maybe_apply_pending_pragma_weaks): Exit early if
7380 vec_safe_is_empty (pending_weaks) rather than only when
7382 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7383 set assembler name back to NULL afterwards.
7385 2014-03-11 Jason Merrill <jason@redhat.com>
7387 * c.opt: Add -std=gnu++14.
7389 2014-03-11 Ian Bolton <ian.bolton@arm.com>
7391 * c-opts.c (c_common_post_options): Don't override
7392 -ffp-contract=fast if unsafe-math-optimizations is on.
7394 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
7396 * c.opt: Enable LTO FE for fshort-double.
7398 2014-03-07 Jason Merrill <jason@redhat.com>
7400 * c.opt: Add -std=c++14.
7402 2014-03-06 Marek Polacek <polacek@redhat.com>
7405 * cilk.c (contains_cilk_spawn_stmt): New function.
7406 (contains_cilk_spawn_stmt_walker): Likewise.
7407 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7408 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7410 2014-03-03 Jakub Jelinek <jakub@redhat.com>
7412 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7413 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7414 even when flag_preprocess_only.
7416 2014-02-26 Jason Merrill <jason@redhat.com>
7420 * c-common.c (shorten_compare): Don't check
7421 c_inhibit_evaluation_warnings.
7423 2014-02-19 Jakub Jelinek <jakub@redhat.com>
7426 * c-common.c (c_common_nodes_and_builtins): When initializing
7427 c_uint{16,32,64}_type_node, also set corresponding
7428 uint{16,32,64}_type_node to the same value.
7431 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7432 for PRAGMA_IVDEP if flag_preprocess_only.
7434 2014-02-12 Jakub Jelinek <jakub@redhat.com>
7437 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7438 if false, add ADD itself, rather than vice versa.
7439 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7440 copy. For SAVE_EXPR, only call merge_tlist once.
7442 2014-02-08 Jakub Jelinek <jakub@redhat.com>
7445 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7447 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7449 (c_common_attribute_table): Add alloc_align and assume_aligned
7452 2014-02-06 Marek Polacek <polacek@redhat.com>
7455 * c-common.c (warn_for_sign_compare): Call warning_at with location
7458 2014-02-05 Marek Polacek <polacek@redhat.com>
7461 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7464 2014-02-04 Marek Polacek <polacek@redhat.com>
7467 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7470 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
7474 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7475 handle_vector_size_attribute, handle_nonnull_attribute): Call
7476 default_conversion on the attribute argument.
7477 (handle_nonnull_attribute): Increment the argument number.
7479 2014-01-31 Marek Polacek <polacek@redhat.com>
7482 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7483 build_function_call_vec.
7484 (resolve_overloaded_builtin): Likewise.
7485 * c-common.h (build_function_call_vec): Adjust declaration.
7487 2014-01-30 Marek Polacek <polacek@redhat.com>
7490 * c-common.h (unsafe_conversion_p): Adjust declaration.
7491 (warnings_for_convert_and_check): Likewise.
7492 (convert_and_check): Likewise.
7493 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7494 expansion_point_location_if_in_system_header on it.
7495 (warnings_for_convert_and_check): Add location parameter. Call
7496 expansion_point_location_if_in_system_header on it. Use it.
7497 (convert_and_check): Add location parameter. Use it.
7498 (conversion_warning): Likewise.
7499 (c_add_case_label): Adjust convert_and_check calls.
7500 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7502 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7504 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7506 * c-pragma.c (init_pragma): Likewise.
7509 2014-01-23 Marek Polacek <polacek@redhat.com>
7512 * c-common.c (shorten_compare): Add location_t parameter.
7513 * c-common.h (shorten_binary_op): Adjust declaration.
7515 2014-01-23 Marek Polacek <polacek@redhat.com>
7518 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7519 * c-common.h: Declare it.
7521 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7523 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7524 * c-ada-spec.c (dump_ads): Likewise.
7525 (cpp_check): Likewise.
7526 (dump_ada_specs): Likewise.
7528 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
7531 * c-common.c (handle_no_instrument_function_attribute): Allow
7532 no_instrument_function attribute in class member
7533 definition/declaration.
7535 2014-01-15 Jakub Jelinek <jakub@redhat.com>
7538 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7539 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7540 being COMPOUND_EXPR.
7541 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7542 operand a SAVE_EXPR and second MODIFY_EXPR.
7544 2014-01-09 Jakub Jelinek <jakub@redhat.com>
7547 * c-pch.c (c_common_write_pch): Call
7548 prepare_target_option_nodes_for_pch.
7550 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7552 Update copyright years
7554 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7556 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7557 the copyright notice.
7559 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7561 * c-ada-spec.c (print_constructor): New function.
7562 (print_destructor): Retrieve the origin of the destructor.
7563 (print_ada_declaration): Revamp handling of constructors/destructors.
7565 2013-12-23 Stuart Hastings <stuart@apple.com>
7566 Bill Maddox <maddox@google.com>
7567 Jason Merrill <jason@redhat.com>
7569 * c.opt: Add -fdeclone-ctor-dtor.
7570 * c-opts.c (c_common_post_options): Default to on iff -Os.
7572 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7574 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7576 * c-pragma.h (enum pragma_cilk_clause): Remove.
7577 (enum pragma_omp_clause): Added the following fields:
7578 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7579 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7580 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7581 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7582 PRAGMA_CILK_CLAUSE_UNIFORM.
7585 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7587 * cilk.c (cilk_outline): Made this function non-static.
7588 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7589 (create_cilk_wrapper): Added a new parameter: a function pointer.
7590 (c_install_body_w_frame_cleanup): Remove
7591 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7592 * c-common.h (cilk_outline): New prototype.
7593 (gimplify_cilk_spawn): Removed two parameters.
7594 (cilk_install_body_with_frame_cleanup): New prototype.
7595 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7596 CILK_SPAWN_STMT case.
7598 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7600 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7602 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7603 (int_array_type_node): Remove.
7604 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7606 2013-12-05 Marek Polacek <polacek@redhat.com>
7609 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7610 [ADJUST_FIELD_ALIGN].
7612 2013-12-04 Joseph Myers <joseph@codesourcery.com>
7615 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7616 and check field alignment if set.
7617 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7618 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7620 2013-12-04 Jakub Jelinek <jakub@redhat.com>
7621 Marek Polacek <polacek@redhat.com>
7623 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7624 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7626 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7629 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7632 2013-11-29 Jakub Jelinek <jakub@redhat.com>
7635 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7636 goto invalid. If it is error_mark_node, don't issue further
7639 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7641 * c.opt (Wopenmp-simd): New.
7643 2013-11-22 Jakub Jelinek <jakub@redhat.com>
7645 * c-ubsan.h (ubsan_instrument_return): New prototype.
7646 * c-ubsan.c (ubsan_instrument_return): New function.
7648 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
7650 * c-common.c: Add required include files from gimple.h.
7651 * c-gimplify.c: Likewise.
7654 2013-11-22 David Malcolm <dmalcolm@redhat.com>
7656 * c-common.c (unsafe_conversion_p): Remove use of
7657 EXPR_LOC_OR_HERE macro.
7658 (conversion_warning): Likewise.
7659 (warnings_for_convert_and_check): Likewise.
7660 (warn_for_collisions_1): Likewise.
7661 (shorten_compare): Likewise, and remove use of in_system_header
7662 macro, using the location from the former.
7663 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7664 (cb_def_pragma): Remove use of in_system_header macro.
7665 (lex_string): Likewise.
7666 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7668 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7669 Mike Stump <mikestump@comcast.net>
7670 Richard Sandiford <rdsandiford@googlemail.com>
7672 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7673 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7674 tree_fits_shwi_p or tree_fits_uhwi_p.
7675 (dump_generic_ada_node): Likewise.
7676 * c-format.c (check_format_arg): Likewise.
7677 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7679 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7681 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7683 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7686 * c-common.c (unsafe_conversion_p): Make this function
7687 return an enumeration with more detail.
7688 (conversion_warning): Use the new return type of
7689 unsafe_conversion_p to separately warn either about conversions
7690 that lower floating point number precision or about the other
7691 kinds of conversions.
7692 * c-common.h (enum conversion_safety): New enumeration.
7693 (unsafe_conversion_p): switching return type to
7694 conversion_safety enumeration.
7695 * c.opt: Adding new warning -Wfloat-conversion and
7696 enabling it with -Wconversion.
7698 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7700 * c-opts.c: Include plugin.h.
7701 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
7703 2013-11-19 Marek Polacek <polacek@redhat.com>
7705 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7707 (ubsan_instrument_shift): Likewise.
7708 (ubsan_instrument_vla): Likewise.
7710 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7712 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7713 cast to unsigned type.
7715 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7717 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7719 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7720 rather than tree_low_cst.
7722 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7724 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7725 tree_to_uhwi throughout.
7727 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7729 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7730 tree_low_cst (..., 0) with tree_to_shwi throughout.
7732 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7734 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7735 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7737 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7739 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7740 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7742 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
7744 * c-cilkplus.c: New file.
7745 * c-common.c (readonly_error): Add location argument.
7746 * c-common.h (readonly_error): Same.
7747 (c_finish_cilk_clauses): Protoize.
7748 (c_check_cilk_loop): Same.
7749 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7750 Do not fail on error_mark_node.
7751 Abstract increment canonicalization to here...
7752 (c_omp_for_incr_canonicalize_ptr): New.
7753 c-pragma.c (init_pragma): Register "simd" pragma.
7754 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7755 (enum pragma_cilk_clause): New.
7757 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7759 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7760 wchar_type and host_integerp checks.
7762 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
7764 * c-common.c: Likewise.
7765 * c-gimplify.c: Likewise.
7768 2013-11-14 Diego Novillo <dnovillo@google.com>
7770 * c-common.c: Include fold-const.h.
7771 Include stor-layout.h.
7773 Include stringpool.h.
7776 Include trans-mem.h.
7777 * c-cppbuiltin.c: Include stor-layout.h.
7778 Include stringpool.h.
7779 * c-format.c: Include stringpool.h.
7780 * c-lex.c: Include stringpool.h.
7781 Include stor-layout.h.
7782 * c-pragma.c: Include stringpool.h.
7785 Include gcc-symtab.h.
7786 * c-pretty-print.c: Include stor-layout.h.
7788 * cilk.c: Include stringpool.h.
7791 2013-11-13 Joseph Myers <joseph@codesourcery.com>
7793 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7794 * c-common.c (c_common_reswords): Add __auto_type.
7795 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7797 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
7799 * c-common.c: Include gimplify.h.
7800 * c-gimplify.c: Likewise.
7802 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7803 * c-ubsan.c: Don't include gimple.h.
7805 2013-11-12 Joseph Myers <joseph@codesourcery.com>
7807 * c-common.c (c_common_reswords): Add _Thread_local.
7809 2013-11-09 Joseph Myers <joseph@codesourcery.com>
7811 * c-common.c (atomic_size_supported_p): New function.
7812 (resolve_overloaded_atomic_exchange)
7813 (resolve_overloaded_atomic_compare_exchange)
7814 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7815 Use it instead of comparing size with a local list of sizes.
7817 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
7818 Joseph Myers <joseph@codesourcery.com>
7820 * c-common.h (enum rid): Add RID_ATOMIC.
7821 * c-common.c (c_common_reswords): Add _Atomic.
7822 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7823 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7824 * c-format.c (check_format_types): Check for extra _Atomic
7825 qualifiers in format argument.
7826 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7827 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7829 2013-11-06 Tobias Burnus <burnus@net-b.de>
7831 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7833 2013-11-06 Joseph Myers <joseph@codesourcery.com>
7835 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7837 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7838 to mean lack of IEEE 754 support.
7840 2013-11-05 Tobias Burnus <burnus@net-b.de>
7842 * c.opt (-Wdate-time): New option
7843 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7845 2013-11-05 Joseph Myers <joseph@codesourcery.com>
7847 * c-cppbuiltin.c (cpp_iec_559_value): Test
7848 flag_excess_precision_cmdline not flag_excess_precision.
7850 2013-11-05 Tobias Burnus <burnus@net-b.de>
7852 * c.opt (fopenmp-simd): New option.
7853 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7854 (omp_pragmas): ... this new struct.
7855 (c_pp_lookup_pragma): Also walk omp_pragmas.
7856 (init_pragma): Init pragmas for -fopenmp-simd.
7858 2013-11-04 Marek Polacek <polacek@redhat.com>
7861 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7863 2013-11-04 Joseph Myers <joseph@codesourcery.com>
7865 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7867 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7869 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7871 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7872 (dump_ada_specs): Adjust prototype of second callback.
7873 * c-ada-spec.c (cpp_check): New global variable.
7874 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7875 (print_generic_ada_decl): Likewise.
7876 (has_static_fields): Change return type to bool and add guard.
7877 (has_nontrivial_methods): New predicate.
7878 (is_tagged_type): Change return type to bool.
7879 (separate_class_package): Call has_nontrivial_methods.
7880 (pp_ada_tree_identifier): Minor tweaks.
7881 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7882 (dump_ada_array_domains): Likewise.
7883 (dump_ada_array_type): Likewise.
7884 (dump_template_types): Remove cpp_check parameter and do not pass it to
7885 dump_generic_ada_node.
7886 (dump_ada_template): Likewise.
7887 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7889 (print_ada_methods): Change return type to integer. Remove cpp_check
7890 parameter and do not pass it down.
7891 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7892 dump_generic_ada_node.
7893 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7895 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7896 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7897 value of print_ada_methods.
7898 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7899 Set cpp_check to it before invoking dump_ada_nodes.
7900 (dump_ada_specs): Likewise.
7902 2013-11-03 Marek Polacek <polacek@redhat.com>
7904 * c-ubsan.c: Don't include hash-table.h.
7905 (ubsan_instrument_vla): New function.
7906 * c-ubsan.h: Declare it.
7908 2013-10-31 David Malcolm <dmalcolm@redhat.com>
7910 Automated part of renaming of symtab_node_base to symtab_node.
7912 Patch autogenerated by rename_symtab.py from
7913 https://github.com/davidmalcolm/gcc-refactoring-scripts
7914 revision 58bb219cc090b2f4516a9297d868c245495ee622
7916 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7917 symtab_node_base to symtab_node.
7919 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7921 Implement C++14 digit separators.
7922 * c-lex.c (interpret_float): Remove digit separators from scratch string
7923 before building real literal.
7925 2013-10-30 Jakub Jelinek <jakub@redhat.com>
7927 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7929 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7931 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7933 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7935 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7936 (insert_cilk_frame): New prototype.
7937 (cilk_init_builtins): Likewise.
7938 (gimplify_cilk_spawn): Likewise.
7939 (c_cilk_install_body_w_frame_cleanup): Likewise.
7940 (cilk_detect_spawn_and_unwrap): Likewise.
7941 (cilk_set_spawn_marker): Likewise.
7942 (build_cilk_sync): Likewise.
7943 (build_cilk_spawn): Likewise.
7946 2013-10-29 David Malcolm <dmalcolm@redhat.com>
7948 Patch autogenerated by refactor_symtab.py from
7949 https://github.com/davidmalcolm/gcc-refactoring-scripts
7950 revision 58bb219cc090b2f4516a9297d868c245495ee622
7952 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7953 to a true class hierarchy.
7954 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7956 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7958 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7960 2013-10-26 Jeff Law <law@redhat.com>
7962 * c-common.c (c_define_builtins): Remove mudflap support.
7963 * c.opt: Ignore and warn for mudflap options.
7965 2013-10-24 Tobias Burnus <burnus@net-b.de>
7968 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7969 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7971 2013-10-23 Jason Merrill <jason@redhat.com>
7973 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7975 2013-10-11 Jakub Jelinek <jakub@redhat.com>
7977 * c-common.h (omp_clause_mask::operator !=): New method.
7978 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7979 instead of if (mask & something) tests everywhere.
7981 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7982 201307 instead of 201107.
7983 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7984 (c_common_attribute_table): Add "omp declare target" and
7985 "omp declare simd" attributes.
7986 (handle_omp_declare_target_attribute,
7987 handle_omp_declare_simd_attribute): New functions.
7988 * c-omp.c: Include c-pragma.h.
7989 (c_finish_omp_taskgroup): New function.
7990 (c_finish_omp_atomic): Add swapped argument, if true,
7991 build the operation first with rhs, lhs arguments and use NOP_EXPR
7993 (c_finish_omp_for): Add code argument, pass it down to make_code.
7994 (c_omp_split_clauses): New function.
7995 (c_split_parallel_clauses): Removed.
7996 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7997 c_omp_declare_simd_clauses_to_decls): New functions.
7998 * c-common.h (omp_clause_mask): New type.
7999 (OMP_CLAUSE_MASK_1): Define.
8000 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
8001 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
8002 omp_clause_mask::operator |, omp_clause_mask::operator &,
8003 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
8004 omp_clause_mask::operator ==): New methods.
8005 (enum c_omp_clause_split): New.
8006 (c_finish_omp_taskgroup): New prototype.
8007 (c_finish_omp_atomic): Add swapped argument.
8008 (c_finish_omp_for): Add code argument.
8009 (c_omp_split_clauses): New prototype.
8010 (c_split_parallel_clauses): Removed.
8011 (c_omp_declare_simd_clauses_to_numbers,
8012 c_omp_declare_simd_clauses_to_decls): New prototypes.
8013 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
8014 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
8015 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
8016 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
8017 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
8018 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
8019 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
8020 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
8021 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
8022 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
8023 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
8024 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
8025 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
8026 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
8027 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
8028 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
8029 PRAGMA_OMP_CLAUSE_UNIFORM.
8031 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
8033 PR tree-optimization/20318
8034 * c-common.c (handle_returns_nonnull_attribute): New function.
8035 (c_common_attribute_table): Add returns_nonnull.
8037 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
8040 * c.opt (fcheck-new): Move to common.opt.
8042 2013-09-25 Marek Polacek <polacek@redhat.com>
8043 Jakub Jelinek <jakub@redhat.com>
8046 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8047 an expression if we can prove it is correct.
8048 (ubsan_instrument_division): Likewise. Remove unnecessary
8051 2013-09-18 Marek Polacek <polacek@redhat.com>
8054 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8056 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8058 2013-09-14 Iain Sandoe <iain@codesourcery.com>
8061 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8062 fobjc-gc, freplace-objc-classes): Accept for LTO.
8064 2013-09-13 Jacek Caban <jacek@codeweavers.com>
8066 * c-target.def: New hook
8068 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8071 * c.opt (Wdelete-incomplete): Add.
8073 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8075 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8076 (vector_types_compatible_elements_p): New function.
8077 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8079 (vector_types_compatible_elements_p): Declare.
8081 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8083 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8084 a virtual member function.
8085 (pp_simple_type_specifier): Remove.
8086 (pp_c_type_specifier): Likewise.
8087 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8088 Rename from pp_c_type_specifier. Adjust.
8089 (c_pretty_printer::c_pretty_printer): Do not assign to
8090 simple_type_specifier.
8092 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8094 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8096 (c_pretty_printer::storage_class_specifier): Likewise.
8097 (c_pretty_printer::initializer): Likewise.
8098 (pp_declaration): Remove.
8099 (pp_declaration_specifiers): Likewise.
8100 (pp_abstract_declarator): Likewise.
8101 (pp_declarator): Likewise.
8102 (pp_type_id): Likewise.
8103 (pp_statement): Likewise.
8104 (pp_constant): Likewise.
8105 (pp_id_expression): Likewise.
8106 (pp_primary_expression): Likewise.
8107 (pp_unary_expression): Likewise.
8108 (pp_multiplicative_expression): Likewise.
8109 (pp_conditional_expression): Likewise.
8110 (pp_assignment_expression): Likewise.
8111 (pp_expression): Likewise.
8112 (pp_c_type_id): Likewise.
8113 (pp_c_storage_class_specifier): Likewise.
8114 * c-pretty-print.c (pp_c_type_cast): Tidy.
8115 (pp_c_pointer): Likewise.
8116 (pp_c_type_specifier): Likewise.
8117 (pp_c_parameter_type_list): Likewise.
8118 (pp_c_function_definition): Likewise.
8119 (pp_c_init_declarator): Likewise.
8120 (pp_c_initializer_list): Likewise.
8121 (pp_c_constructor_elts): Likewise.
8122 (c_pretty_printer::direct_abstract_declarator): Likewise.
8123 (c_pretty_printer::declaration_specifiers): Likewise.
8124 (c_pretty_printer::primary_expression): Likewise.
8125 (c_pretty_printer::postfix_expression): Likewise.
8126 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8127 (c_pretty_printer::storage_class_specifier): Rename from
8128 pp_c_storage_class_specifier.
8129 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8130 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8131 storage_class_specifier, initializer, offset_list, flags.
8133 2013-08-30 Marek Polacek <polacek@redhat.com>
8135 * c-ubsan.c: New file.
8136 * c-ubsan.h: New file.
8138 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8140 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8142 (c_pretty_printer::declaration_specifiers): Likewise.
8143 (c_pretty_printer::declarator): Likewise.
8144 (c_pretty_printer::abstract_declarator): Likewise.
8145 (c_pretty_printer::direct_abstract_declarator): Likewise.
8146 (c_pretty_printer::direct_declarator): Likewise.
8147 (c_pretty_printer::function_specifier): Likewise.
8148 (pp_declaration): Adjust.
8149 (pp_declaration_specifiers): Likewise.
8150 (pp_abstract_declarator): Likewise.
8151 (pp_direct_declarator): Likewise.
8152 (pp_function_specifier): Likewise.
8153 (pp_direct_abstract_declarator): Remove as unused.
8154 (pp_c_declaration): Remove.
8155 (pp_c_declaration_specifiers): Likewise.
8156 (pp_c_declarator): Likewise.
8157 (pp_c_direct_declarator): Likewise.
8158 (pp_c_function_specifier): Likewise.
8159 (pp_c_direct_abstract_declarator): Likewise.
8160 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8161 from pp_c_abstract_declarator. Adjust.
8162 (c_pretty_printer::direct_abstract_declarator): Rename from
8163 pp_c_direct_abstract_declarator. Adjust.
8164 (c_pretty_printer::function_specifier): Rename from
8165 pp_c_function_specifier. Adjust.
8166 (c_pretty_printer::declaration_specifiers): Rename from
8167 pp_c_declaration_specifiers. Adjust.
8168 (c_pretty_printer::direct_declarator): Rename from
8169 pp_c_direct_declarator. Adjust.
8170 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8171 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8172 (c_pretty_printer::c_pretty_printer): Do not assign to
8173 declaration, declaration_specifiers, declarator,
8174 direct_declarator, direct_abstract_declarator, function_specifier.
8176 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8178 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8179 virtual member function.
8180 (c_pretty_printer::multiplicative_expression): Likewise.
8181 (c_pretty_printer::conditional_expression): Likewise.
8182 (c_pretty_printer::assignment_expression): Likewise.
8183 (c_pretty_printer::expression): Likewise.
8184 (pp_unary_expression): Adjust.
8185 (pp_multiplicative_expression): Likewise.
8186 (pp_assignment_expression): Likewise.
8187 (pp_conditional_expression): Likewise.
8188 (pp_expression): Likewise.
8189 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8190 from pp_c_unary_expression. Adjust.
8191 (c_pretty_printer::multiplicative_expression): Rename from
8192 pp_c_multiplicative_expression. Adjust.
8193 (c_pretty_printer::conditional_expression): Rename from
8194 pp_c_conditional_expression. Adjust.
8195 (c_pretty_printer::assignment_expression): Rename from
8196 pp_c_assignment_expression. Adjust.
8197 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8198 (c_pretty_printer::c_pretty_printer): Do not assign to
8199 unary_expression, multiplicative_expression,
8200 conditional_expression, expression.
8202 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8204 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8205 virtual member function.
8206 (pp_postfix_expression): Adjust.
8207 (pp_c_postfix_expression): Remove.
8208 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8209 from pp_c_postfix_expression. Adjust.
8210 (c_pretty_printer::c_pretty_printer): Do not assign to
8213 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8215 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8216 virtua member function.
8217 (pp_primary_expression): Adjust.
8218 (pp_c_primary_expression): Remove.
8219 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8220 from pp_c_primary_expression. Adjust.
8221 (pp_c_initializer_list): Use pp_primary_expression.
8222 (c_pretty_printer::c_pretty_printer): Do not assign to
8225 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8227 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8228 * c-pretty-print.c (M_): Remove.
8229 (c_pretty_printer::translate_string): Define.
8230 (pp_c_type_specifier): Use it.
8231 (pp_c_primary_expression): Likewise.
8232 (pp_c_expression): Likewise.
8234 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8236 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8238 (pp_c_id_expression): Remove.
8239 (pp_id_expression): Adjust.
8240 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8241 pp_c_id_expression. Adjust.
8242 (pp_c_postfix_expression): Use pp_id_expression.
8243 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8245 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8247 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8249 (pp_constant): Adjust.
8250 (pp_c_constant): Remove.
8251 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8252 pp_c_constant. Adjust.
8254 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8255 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8257 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8259 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8260 (c_pretty_printer::c_pretty_printer): Declare.
8261 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8262 c_pretty_printer_init. Adjust.
8263 (print_c_tree): Do not call c_pretty_printer_init.
8264 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8266 2013-08-09 Arnaud Charlet <charlet@adacore.com>
8268 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8270 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8273 * c-common.c (pointer_int_sum): Add bool parameter.
8274 * c-common.h (pointer_int_sum): Adjust declaration.
8276 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8278 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8279 c_pretty_printer variable.
8281 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8283 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8285 (pp_c_base): Likewise. Adjust users.
8286 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8287 (pp_c_whitespace): Do not call pp_base.
8288 (pp_c_left_paren): Likewise.
8289 (pp_c_right_paren): Likewise.
8290 (pp_c_left_brace): Likewise.
8291 (pp_c_right_brace): Likewise.
8292 (pp_c_left_bracket): Likewise.
8293 (pp_c_right_bracket): Likewise.
8294 (pp_c_dot): Likewise.
8295 (pp_c_ampersand): Likewise.
8296 (pp_c_star): Likewise.
8297 (pp_c_arrow): Likewise.
8298 (pp_c_semicolon): Likewise.
8299 (pp_c_complement): Likewise.
8300 (pp_c_exclamation): Likewise.
8301 (pp_c_direct_declarator): Likewise.
8302 (pp_c_ws_string): Likewise.
8303 (pp_c_identifier): Likewise.
8304 (pp_c_statement): Likewise.
8305 (print_c_tree): Likewise.
8307 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8310 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8311 provide useful error strings.
8313 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8315 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8316 printer functions instead of pp_string or operators and punctuators.
8317 (dump_generic_ada_node): Likewise.
8318 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8319 (pp_c_relational_expression): Likewise.
8320 (pp_c_logical_or_expression): Likewise.
8322 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8324 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8325 functions instead of pp_character.
8326 (pp_ada_tree_identifier): Likewise.
8327 (dump_ada_double_name): Likewise.
8328 (dump_ada_function_declaration): Likewise.
8329 (dump_ada_array_domains): Likewise.
8330 (dump_template_types): Likewise.
8331 (dump_generic_ada_node): Likewise.
8332 (print_ada_declaration): Likewise.
8333 (print_ada_struct_decl): Likewise.
8334 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8336 2013-07-23 Tom Tromey <tromey@redhat.com>
8338 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8339 * c-common.c (c_common_reswords): Add _Generic.
8341 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
8343 * c-common.c: Fix typos.
8344 * c-common.h: Likewise.
8346 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
8349 * c-common.c (c_common_attribute_table): Add warn_unused.
8350 (handle_warn_unused_attribute): New.
8352 2013-07-10 Jakub Jelinek <jakub@redhat.com>
8354 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8355 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8357 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8360 * c.opt: Add Wconditionally-supported.
8362 2013-07-08 Graham Stott <graham.stott@btinternet.com>
8364 * array-notation-common.c (length_mismatch_in_expr_p): Delete
8365 unused variables l_length and l_node.
8367 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
8370 * c-common.c (complete_array_type): Delay folding first index
8371 like other indices. When folding, check for index overflow.
8373 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
8376 * c-common.h (c_build_vec_perm_expr): New complain argument.
8377 * c-common.c (c_build_vec_perm_expr): Likewise.
8378 Use save_expr also in C++.
8380 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8382 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8383 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8384 * c-opts.c (c_common_post_options): Likewise.
8386 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8388 * array-notation-common.c (length_mismatch_in_expr): Changed the
8389 parameter type's from a dynamic array to a vec_tree. Also removed
8390 the size parameters.
8391 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8394 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8396 * c-common.h (struct cilkplus_an_parts): New structure.
8397 (struct cilkplus_an_loop_parts): Likewise.
8398 (cilkplus_extract_an_triplets): New prototype.
8399 (fix_sec_implicit_args): Likewise.
8400 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8401 (fix_sec_implicit_args): Likewise.
8403 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8405 * array-notation-common.c (find_inv_trees): Removed an unwanted
8407 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8408 enum rid to enum tree_code.
8410 2013-06-11 Jan Hubicka <jh@suse.cz>
8412 * c-common.c (handle_alias_ifunc_attribute): Do not set
8413 DECL_EXTERNAL for weakref variables.
8414 * c-pragma.c (handle_pragma_weak): Make sure aliases
8415 are not declared as external.
8417 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8419 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8420 function from c/c-array-notation.c.
8421 (is_cilkplus_reduce_builtin): Likewise.
8422 (find_rank): Likewise.
8423 (extract_array_notation_exprs): Likewise.
8424 (replace_array_notations): Likewise.
8425 (find_inv_trees): Likewise.
8426 (replace_inv_trees): Likewise.
8427 (contains_array_notation_expr): Likewise.
8428 (find_correct_array_notation_type): Likewise.
8429 * c-common.h (struct inv_list): Moved this struct from the file
8430 c/c-array-notation.c and added a new field called additional tcodes.
8431 (length_mismatch_in_expr_p): New prototype.
8432 (is_cilkplus_reduce_builtin): Likewise.
8433 (find_rank): Likewise.
8434 (extract_array_notation_exprs): Likewise.
8435 (replace_array_notation): Likewise.
8436 (find_inv_trees): Likewise.
8437 (replace_inv_trees): Likewise.
8438 (find_correct_array_notation_type): Likewise.
8440 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8442 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8443 function array_notation_init_builtins is called.
8444 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8445 * c-common.def (ARRAY_NOTATION_REF): New tree.
8446 * c-common.h (build_array_notation_expr): New function declaration.
8447 (build_array_notation_ref): Likewise.
8448 (extract_sec_implicit_index_arg): New extern declaration.
8449 (is_sec_implicit_index_fn): Likewise.
8450 (ARRAY_NOTATION_CHECK): New define.
8451 (ARRAY_NOTATION_ARRAY): Likewise.
8452 (ARRAY_NOTATION_START): Likewise.
8453 (ARRAY_NOTATION_LENGTH): Likewise.
8454 (ARRAY_NOTATION_STRIDE): Likewise.
8455 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8457 (pp_c_expression): Likewise.
8458 * c.opt (flag_enable_cilkplus): New flag.
8459 * array-notation-common.c: New file.
8461 2013-05-14 Jakub Jelinek <jakub@redhat.com>
8464 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8466 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
8468 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8471 2013-05-07 Han Shen <shenhan@google.com>
8473 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8475 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8477 * c-common.c (check_user_alignment): Emit error for negative values.
8479 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8481 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8483 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8485 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8486 __GXX_EXPERIMENTAL_CXX1Y__.
8488 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8489 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
8491 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8492 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8493 to simply use OPT_Wpointer_arith.
8494 (c_sizeof_or_alignof_type): Likewise.
8496 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8498 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8500 2013-04-12 Jakub Jelinek <jakub@redhat.com>
8502 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8503 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8506 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8508 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8510 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8512 * c-common.c (pointer_int_sum): Remove dead code.
8514 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8517 * c-common.c (handle_optimize_attribute): Don't call
8518 save_optabs_if_changed.
8520 2013-03-05 Jakub Jelinek <jakub@redhat.com>
8523 * c-pch.c (pch_init): Free target_validity at the end.
8525 2013-03-04 Jakub Jelinek <jakub@redhat.com>
8527 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8529 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8530 Jakub Jelinek <jakub@redhat.com>
8533 * c-common.c (handle_no_sanitize_address_attribute): New function.
8534 (c_common_attribute_table): Add no_sanitize_address attribute.
8535 (handle_no_address_safety_analysis_attribute): Add
8536 no_sanitize_address attribute, not no_address_safety_analysis
8539 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
8542 * c-common.c (handle_optimize_attribute): Call
8543 save_optabs_if_changed.
8545 2013-02-18 Jakub Jelinek <jakub@redhat.com>
8546 Steven Bosscher <steven@gcc.gnu.org>
8549 * c-opts.c (c_common_post_options): If debug info is enabled
8550 and non-dwarf*, refuse to load PCH files and when writing PCH
8553 2013-02-05 Jakub Jelinek <jakub@redhat.com>
8556 * c-common.c (handle_error_attribute): Fix condition.
8558 2013-01-30 Jakub Jelinek <jakub@redhat.com>
8561 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8563 2013-01-18 Jason Merrill <jason@redhat.com>
8566 * c.opt (-fextern-tls-init): New.
8567 * c-opts.c (c_common_post_options): Handle it.
8569 2013-01-09 Jakub Jelinek <jakub@redhat.com>
8572 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8573 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8574 and is either negative or bigger or equal to type precision
8575 of the first operand.
8577 2012-12-03 Marek Polacek <polacek@redhat.com>
8580 * c-common.c (check_user_alignment): Swap order of tests,
8581 check TREE_CODE first.
8583 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8586 * c-common.h (overflow_type): New enum.
8587 (build_userdef_literal): Add overflow_type argument.
8588 (tree_userdef_literal): Add overflow_type.
8589 (USERDEF_LITERAL_OVERFLOW): New access macro.
8590 * c-common.c (build_userdef_literal): Add overflow_type
8592 * c-lex.c (c_lex_with_flags): Add overflow_type to
8593 build_userdef_literal calls.
8594 (interpret_integer, interpret_float): Add overflow_type argument.
8596 2012-11-28 Richard Biener <rguenther@suse.de>
8599 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8600 here and use a type with proper overflow behavior for types that would
8601 need to be promoted for the arithmetic.
8603 2012-11-23 Jakub Jelinek <jakub@redhat.com>
8606 * c-common.c (handle_no_address_safety_analysis_attribute): New
8608 (c_common_attribute_table): Add no_address_safety_analysis.
8610 2012-11-16 Simon Baldwin <simonb@google.com>
8612 * c.opt: Add f[no-]canonical-system-headers.
8613 * c-opts.c (c_common_handle_option): Handle
8614 OPT_fcanonical_system_headers.
8616 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8619 * c-opts.c (c_common_handle_option): Set new flags.
8620 * c.opt: Describe new flags.
8622 2012-11-09 Jason Merrill <jason@redhat.com>
8624 * c.opt (Wabi-tag): New.
8626 2012-11-09 Andi Kleen <ak@linux.intel.com>
8629 * c-common.c (get_atomic_generic_size): Mask with
8632 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8635 * c.opt (Wformat): Make it Alias Wformat=1.
8636 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8637 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8639 (Wformat=): RejectNegative. Use LangEnabledBy.
8640 (Wnonnull): Use LangEnabledBy.
8641 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8642 * c-format.c (set_Wformat): Delete.
8643 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8644 (maybe_read_dollar_number): Likewise.
8645 (avoid_dollar_number): Likewise.
8646 (finish_dollar_format_checking): Likewise.
8647 (check_format_info): Likewise.
8648 (check_format_info_main): Likewise.
8649 (check_format_types): Likewise.
8650 (format_type_warning): Likewise.
8651 * c-common.c (int): Likewise.
8652 (check_function_sentinel): Likewise.
8653 * c-common.h (warn_format,set_Wformat): Do not declare here.
8655 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8658 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8659 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8661 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8663 (Wvariadic-macros): Init(1).
8664 * c-opts.c (c_common_handle_option): Do not handle them
8666 (c_common_post_options): Likewise.
8667 (sanitize_cpp_opts): warn_unused_macros is now
8668 cpp_warn_unused_macros.
8669 (push_command_line_include): Likewise.
8670 * c-common.c (warn_unknown_pragmas): Do not define.
8671 * c-common.h (warn_unknown_pragmas): Do not declare.
8673 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8676 * c-common.c (conversion_warning): Handle conditional expressions.
8678 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8681 * c.opt (Wreturn_local_addr): Define new option.
8683 2012-10-25 Jason Merrill <jason@redhat.com>
8685 * c.opt (Wvirtual-move-assign): New.
8687 * c.opt (Winherited-variadic-ctor): New.
8689 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
8692 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8694 2012-10-23 Joseph Myers <joseph@codesourcery.com>
8696 * c-common.h (pch_cpp_save_state): Declare.
8697 * c-target.def (c_preinclude): New hook.
8698 * c-opts.c (done_preinclude): New.
8699 (push_command_line_include): Handle default preincluded header.
8700 (cb_file_change): Call pch_cpp_save_state when calling
8701 push_command_line_include.
8702 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8703 (pch_cpp_save_state): New.
8704 (pch_init): Call pch_cpp_save_state conditionally, instead of
8705 calling cpp_save_state.
8707 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8711 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8712 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8713 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8714 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8715 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8716 * c-opts.c (c_common_handle_option): Remove explicit handling from
8718 (c_common_post_options): Likewise.
8720 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8722 * c-ada-spec.c (LOCATION_COL): Delete.
8723 (compare_location): New function.
8724 (compare_node): Use it.
8725 (compare_comment): Likewise.
8727 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8731 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8732 * c-opts.c (c_common_handle_option): Do not set them here. Add
8734 (c_common_post_options): Likewise.
8736 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8738 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8739 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8740 Remove POINTER_TYPE handling, add large unsigned handling and use
8741 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8743 2012-10-12 Jakub Jelinek <jakub@redhat.com>
8746 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8747 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8748 locs and array of 3 trees instead of just single loc and single
8749 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8750 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8751 For *cmp* builtins that take two sources strings report warnings
8752 about first and second source, not about destination and source.
8754 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
8757 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8759 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8761 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8762 declaring something coming from another file.
8764 2012-10-10 Arnaud Charlet <charlet@adacore.com>
8767 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8769 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8772 * c-common.c (warn_about_parentheses): Add location_t parameter;
8773 use EXPR_LOC_OR_LOC.
8774 * c-common.h: Update declaration.
8776 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
8779 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8780 more operations. Make error messages optional.
8781 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8782 (scalar_to_vector): Declare.
8784 2012-10-08 Jason Merrill <jason@redhat.com>
8786 * c-common.c (c_common_reswords): Add thread_local.
8788 2012-10-08 Dodji Seketeli <dodji@redhat.com>
8790 PR c++/53528 C++11 attribute support
8791 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8793 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8795 (handle_aligned_attribute): In choose strictest alignment
8796 among many. Use new check_cxx_fundamental_alignment_constraints.
8797 (handle_transparent_union_attribute): In c++11 attribute syntax,
8798 don't look through typedefs.
8800 2012-10-04 Arnaud Charlet <charlet@adacore.com>
8802 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8803 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8806 2012-09-25 Dehao Chen <dehao@google.com>
8809 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
8810 map when read in the pch.
8812 2012-09-18 Arnaud Charlet <charlet@adacore.com>
8814 * c-ada-spec.c: Style fixes.
8816 2012-09-18 Thomas Quinot <quinot@adacore.com>
8818 * c.opt (-fada-spec-parent): Define new command line switch.
8819 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8820 is specified, generate binding spec as a child of the specified unit.
8822 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8823 Manuel López-Ibáñez <manu@gcc.gnu.org>
8826 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8828 2012-08-23 Arnaud Charlet <charlet@adacore.com>
8830 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8831 for pointers, and add missing Convention C pragma.
8832 (print_ada_struct_decl): Add missing aliased keyword.
8833 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8835 2012-08-17 Jakub Jelinek <jakub@redhat.com>
8837 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8838 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8839 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8840 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8841 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8843 2012-08-10 Richard Guenther <rguenther@suse.de>
8845 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8847 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8849 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8850 instead of separate pp_newline and pp_flush.
8851 (print_c_tree): Likewise.
8853 2012-07-26 Richard Henderson <rth@redhat.com>
8855 * c-common.c (handle_hot_attribute): Allow labels.
8856 (handle_cold_attribute): Likewise.
8858 2012-07-20 Jakub Jelinek <jakub@redhat.com>
8861 * c-common.c (check_function_nonnull): Handle multiple nonnull
8862 attributes properly.
8864 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8866 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8867 * c-ada-spec.c: Likewise.
8868 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8870 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8872 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8873 Remove code conditional on it.
8875 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8877 * c-gimplify.c: Do not include basic-block.h.
8878 * c-common.c: Do not include linfuncs.h.
8880 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8882 * c-common.h: Include tree.h.
8884 2012-07-02 Jason Merrill <jason@redhat.com>
8887 * c-common.c (get_priority): Call default_conversion.
8889 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
8891 * c-pch.c (c_common_write_pch): Remove unused variables.
8893 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8895 * cppspec.c: Moved from gcc/ to here.
8897 2012-06-27 Kai Tietz <ktietz@redhat.com>
8899 PR preprocessor/37215
8900 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8902 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8904 * c-common.h (c_common_print_pch_checksum): Remove.
8905 * c-pch.c: Do not include output.h.
8906 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8907 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8908 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8909 (struct c_pch_header): Remove.
8910 (get_ident): Update gpch version.
8911 (pch_init): Do not print executable_checksum to asm_out_file.
8912 Do not fail if there is no asm_out_file to read back from. Set
8913 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8914 (c_common_write_pch): Verify that nothing was written to asm_out_file
8915 since pch_init was called. Do not write a c_pch_header, and do not
8916 copy from asm_out_file to the PCH.
8917 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8918 the content of asm_out_file from the PCH.
8919 (c_common_print_pch_checksum): Remove.
8920 * c-opts.c (c_common_init): Print out executable_checksum directly.
8922 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8924 * c-target.def (objc_declare_unresolved_class_reference,
8925 objc_declare_class_definition): Add new hooks.
8927 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8929 * c-lex.c: Do not include output.h.
8930 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8931 Remove uses of ASM_OUTPUT_IDENT.
8933 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
8936 * c-common.h (c_build_vec_perm_expr): Move decl here.
8937 * c-common.c (c_build_vec_perm_expr): Move definition
8940 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8942 * c.opt (fconserve-space): Turn into a no-op.
8944 2012-06-04 Sterling Augustine <saugustine@google.com>
8946 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8947 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8948 both the start and end of the function.
8950 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8952 * c-common.c: Do not include output.h.
8953 * c-pragma.c: Likewise.
8955 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8957 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8958 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8959 (lang_decl_name): Handle namespace decls.
8961 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8963 * c-ada-spec.c: Do not include output.h.
8964 * c-semantics.c: Likewise.
8966 2012-05-29 Joseph Myers <joseph@codesourcery.com>
8968 * c-common.c: Fix typo.
8970 2012-05-29 Michael Matz <matz@suse.de>
8972 * c-common.h (c_expand_decl): Remove prototype.
8974 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8976 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8977 * c-opts.c (c_common_handle_option): Remove code handling
8978 warn_missing_braces.
8980 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8983 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8986 2012-05-22 Dodji Seketeli <dodji@redhat.com>
8989 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8991 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8993 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8994 * c-opts.c (c_common_handle_option): Do not handle explicitly
8995 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8997 2012-05-16 Dodji Seketeli <dodji@redhat.com>
8999 PR preprocessor/7263
9000 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
9001 to cpp_classify_number. For diagnostics, use the precise location
9002 instead of the global input_location.
9004 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9007 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
9009 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
9011 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
9013 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
9016 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
9017 Wreorder): Use LangEnabledBy.
9018 * c-opts.c (c_common_handle_option): Do not enable them
9019 explicitly. Call lang-specific generated functions.
9020 (c_common_post_options): Do not set them here.
9022 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
9024 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
9025 Wmissing-field-initializers,Wmissing-parameter-type,
9026 Wold-style-declaration,Woverride-init): Use EnabledBy.
9027 * c-opts.c (c_common_post_options): Do not set here explicitly.
9029 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9032 * c-opts.c (c_common_handle_option): Use handle_generated_option
9033 to enable sub-options.
9035 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9038 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9040 2012-05-10 Richard Guenther <rguenther@suse.de>
9042 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9043 adjust commentary about TYPE_IS_SIZETYPE types.
9045 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9048 * c-common.c (warn_logical_operator): Check that argument of
9049 integer_zerop is not NULL.
9051 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9054 * c-common.c (warn_logical_operator): Do not warn if either side
9055 is already true or false.
9057 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9060 * c-common.c (expr_original_type): New.
9061 (shorten_compare): Do not warn for enumeration types.
9063 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9065 * c.opt (fpermissive): Add Var(flag_permissive).
9067 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
9070 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9071 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9073 2012-04-30 Dodji Seketeli <dodji@redhat.com>
9075 Add -Wvarargs option
9076 * c.opt (Wvarargs): Define new option.
9078 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9080 * c-common.c (check_function_arguments): Replace
9081 Wmissing-format-attribute with Wsuggest-attribute=format.
9083 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9085 * c.opt (Wsuggest-attribute=format): New. Alias of
9086 Wmissing-format-attribute.
9087 * c-format.c (decode_format_type): Replace
9088 Wmissing-format-attribute with Wsuggest-attribute=format.
9089 (check_function_format): Likewise.
9091 2012-04-27 Ollie Wild <aaw@google.com>
9093 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9094 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9095 * c.opt: Add Wliteral-suffix.
9097 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9100 * c.opt (Wpedantic): New.
9101 (pedantic): Alias Wpedantic.
9102 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9103 (c_common_post_options): Likewise.
9104 (sanitize_cpp_opts): Likewise.
9105 * c-lex.c (interpret_float): Likewise.
9106 * c-format.c (check_format_types): Likewise.
9107 * c-common.c (pointer_int_sum): Likewise.
9108 (c_sizeof_or_alignof_type): Likewise.
9109 (c_add_case_label): Likewise.
9110 (c_do_switch_warnings): Likewise.
9111 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9113 2012-04-15 Jason Merrill <jason@redhat.com>
9116 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9117 (C_STD_NAME): Distinguish between C++98 and C++11.
9119 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9122 * c-common.h (uint16_type_node): Rename into...
9123 (c_uint16_type_node): ...this.
9124 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9125 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9127 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9129 * c-common.c (warn_if_unused_value): Move definition to here.
9130 * c-common.h (warn_if_unused_value): Move declaration to here.
9132 2012-03-23 William Bader <williambader@hotmail.com>
9134 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9136 2012-03-20 Jason Merrill <jason@redhat.com>
9138 * c-common.h (enum cxx_dialect): Add cxx1y.
9139 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9141 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9142 * c-opts.c (c_common_post_options): Likewise.
9143 (set_std_cxx1y): New.
9144 (c_common_handle_option): Call it.
9145 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9147 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9150 * c.opt ([Wuseless-cast]): Add.
9152 2012-03-16 Richard Guenther <rguenther@suse.de>
9154 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9156 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9159 * c.opt (ftemplate-backtrace-limit) Add.
9161 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9163 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9165 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9166 (init_pragma): Don't register extern_prefix.
9168 2012-03-12 Richard Guenther <rguenther@suse.de>
9170 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9171 (builtin_type_for_size): Likewise.
9173 2012-02-13 Jakub Jelinek <jakub@redhat.com>
9176 * c-common.c (sync_resolve_params): Don't decide whether to convert
9177 or not based on TYPE_SIZE comparison, convert whenever arg_type
9178 is unsigned INTEGER_TYPE.
9180 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9183 * c.opt ([Wunused-local-typedefs]): Fix description.
9185 2012-01-24 Mike Stump <mikestump@comcast.net>
9187 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9190 2012-01-18 Richard Guenther <rguenther@suse.de>
9192 * c-opts.c (c_common_post_options): Reset LTO flags if
9193 we are about to generate a PCH.
9195 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9198 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9199 use pp_unsigned_wide_integer.
9201 2012-01-10 Richard Guenther <rguenther@suse.de>
9204 * c-opts.c (c_common_handle_option): Move -Werror handling
9205 to language independent code.
9207 2012-01-05 Richard Guenther <rguenther@suse.de>
9210 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9213 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9216 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9217 of array types with an unknown bound.
9219 2011-12-20 Joseph Myers <joseph@codesourcery.com>
9221 * c-common.c (flag_isoc99): Update comment to refer to C11.
9222 (flag_isoc1x): Change to flag_isoc11.
9223 * c-common.h (flag_isoc99): Update comment to refer to C11.
9224 (flag_isoc1x): Change to flag_isoc11.
9225 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9227 * c-opts.c (set_std_c1x): Change to set_std_c11.
9228 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9230 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9231 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9232 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9234 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9235 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9236 (std=gnu1x): Make alias of std=gnu11.
9238 2011-12-19 Jason Merrill <jason@redhat.com>
9241 * c-common.c (handle_transparent_union_attribute): Check the first
9242 field if the type is complete.
9244 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9247 * c-common.c (RID_IS_FINAL): Add.
9248 * c-common.h (RID_IS_FINAL): Add.
9250 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9252 * c.opt (fgnu-runtime): Provide full description.
9253 (fnext-runtime): Likewise.
9254 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9256 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
9258 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9259 predefines in one place. Add LOCK_FREE predefines.
9260 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9263 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
9266 * c-common.c (get_atomic_generic_size): Check for various error
9268 (resolve_overloaded_atomic_exchange,
9269 resolve_overloaded_atomic_compare_exchange,
9270 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9271 error_mark_node for error conditions.
9273 2011-11-08 Richard Guenther <rguenther@suse.de>
9276 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
9278 2011-11-07 Richard Henderson <rth@redhat.com>
9279 Aldy Hernandez <aldyh@redhat.com>
9280 Torvald Riegel <triegel@redhat.com>
9282 Merged from transactional-memory.
9284 * c-common.c (handle_tm_wrap_attribute,
9285 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9286 (struct c_common_reswords): Added __transaction* keywords.
9287 (struct c_common_attribute_table): Added transaction* and tm_regparm
9289 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9291 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9292 find_tm_attribute): Declare.
9294 2011-11-07 Jason Merrill <jason@redhat.com>
9297 * c-common.c, c-common.h: Revert yesterday's changes.
9299 2011-11-06 Jason Merrill <jason@redhat.com>
9302 * c-common.c (decl_has_visibility_attr): Split out from...
9303 (c_determine_visibility): ...here.
9304 * c-common.h: Declare it.
9306 2011-11-06 Joseph Myers <joseph@codesourcery.com>
9308 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9309 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9311 (check_user_alignment): New. Split out of
9312 handle_aligned_attribute. Disallow integer constants with
9313 noninteger types. Conditionally allow zero.
9314 (handle_aligned_attribute): Use check_user_alignment.
9315 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9317 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
9318 Richard Henderson <rth@redhat.com>
9320 Merged from cxx-mem-model.
9322 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9323 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
9324 parameters that are the same type size.
9325 (get_atomic_generic_size): New. Find size of generic
9326 atomic function parameters and do typechecking.
9327 (add_atomic_size_parameter): New. Insert size into parameter list.
9328 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9329 either __atomic_exchange_n or external library call.
9330 (resolve_overloaded_atomic_compare_exchange): Restructure
9331 __atomic_compare_exchange to either _n variant or external library call.
9332 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
9333 __atomic_load_n or an external library call.
9334 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9335 __atomic_store_n or an external library call.
9336 (resolve_overloaded_builtin): Handle new __atomic builtins.
9338 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9341 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9342 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9343 <INDIRECT_REF>: Return the argument.
9344 <ARRAY_REF>: Remove special code for negative offset.
9345 Call fold_build_pointer_plus instead of size_binop.
9346 (fold_offsetof): Remove STOP_REF argument and adjust.
9347 * c-common.h (fold_offsetof_1): Declare.
9348 (fold_offsetof): Remove STOP_REF argument.
9350 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9353 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9354 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9355 Wnarrowing for C++0x and C++98.
9356 * c.opt ([Wnarrowing]): Update.
9358 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9361 * c.opt: Add Wzero-as-null-pointer-constant.
9363 2011-10-31 Jason Merrill <jason@redhat.com>
9365 * c.opt (-fdeduce-init-list): Off by default.
9368 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9369 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9371 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9373 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9376 * c.opt (fvisibility-inlines-hidden): Description change.
9378 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9380 Implement C++11 user-defined literals.
9381 * c-common.c (build_userdef_literal): New.
9382 * c-common.def: New tree code.
9383 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9384 * c-lex.c (interpret_float): Add suffix parm.
9385 (c_lex_with_flags): Build literal tokens.
9387 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9391 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9394 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9395 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9396 Wnarrowing for C++0x and C++98.
9397 * c.opt ([Wnarrowing]): Update.
9399 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9402 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9403 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9404 Wnarrowing for C++0x and C++98.
9405 * c.opt ([Wnarrowing]): Update.
9407 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9410 * c-common.c (conversion_warning): Remove code looking for
9411 artificial operands.
9413 2011-10-18 Dodji Seketeli <dodji@redhat.com>
9416 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9417 !NO_IMPLICIT_EXTERN_C.
9419 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
9421 * c-common.c (c_common_reswords): Add __bases,
9423 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9425 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9428 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9430 2011-10-15 Tom Tromey <tromey@redhat.com>
9431 Dodji Seketeli <dodji@redhat.com>
9433 * c.opt (fdebug-cpp): New option.
9434 * c-opts.c (c_common_handle_option): Handle the option.
9435 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9436 output stream in parameter. Factorized from ...
9437 (maybe_print_line): ... this. Dump location debug information when
9438 -fdebug-cpp is in effect.
9439 (print_line_1): New static function. Takes an output stream in
9440 parameter. Factorized from ...
9441 (print_line): ... here. Dump location information when -fdebug-cpp
9443 (scan_translation_unit): Dump location information when
9444 -fdebug-cpp is in effect.
9446 2011-10-15 Tom Tromey <tromey@redhat.com>
9447 Dodji Seketeli <dodji@redhat.com>
9449 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9451 * c-opts.c (c_common_handle_option)<case
9452 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9453 cases. Handle -ftrack-macro-expansion with and without argument.
9455 2011-10-15 Tom Tromey <tromey@redhat.com>
9456 Dodji Seketeli <dodji@redhat.com>
9458 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9459 (print_line, cb_define, do_line_change): Adjust to avoid touching
9460 the internals of struct line_map. Use the public API instead.
9461 * c-pch.c (c_common_read_pch): Likewise.
9462 * c-lex.c (fe_file_change): Likewise.
9464 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9467 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9469 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9472 * c-pretty-print.c (pp_c_floating_constant): Output
9473 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9475 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9477 * c-common.c (def_builtin_1): Delete old interface with two
9478 parallel arrays to hold standard builtin declarations, and replace
9479 it with a function based interface that can support creating
9480 builtins on the fly in the future. Change all uses, and poison
9481 the old names. Make sure 0 is not a legitimate builtin index.
9482 * c-omp.c (c_finish_omp_barrier): Ditto.
9483 (c_finish_omp_taskwait): Ditto.
9484 (c_finish_omp_flush): Ditto.
9486 2011-10-11 Tristan Gingold <gingold@adacore.com>
9488 * c.opt: (fallow-parameterless-variadic-functions): New.
9490 2011-09-08 Dodji Seketeli <dodji@redhat.com>
9492 PR c++/33255 - Support -Wunused-local-typedefs warning
9493 * c-common.h (struct c_language_function::local_typedefs): New
9495 (record_locally_defined_typedef, maybe_record_typedef_use)
9496 (maybe_warn_unused_local_typedefs): Declare new functions.
9497 * c-common.c (record_locally_defined_typedef)
9498 (maybe_record_typedef_use)
9499 (maybe_warn_unused_local_typedefs): Define new functions.
9500 * c.opt: Declare new -Wunused-local-typedefs flag.
9502 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9505 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9508 2011-09-05 Richard Guenther <rguenther@suse.de>
9510 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9511 of integer_minus_one_node for empty array upper bounds.
9513 2011-08-28 Dodji Seketeli <dodji@redhat.com>
9515 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9516 it's the first time it's being called on this main TU.
9518 2011-08-24 Richard Guenther <rguenther@suse.de>
9521 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9523 2011-08-22 Gabriel Charette <gchare@google.com>
9525 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9526 defined in cpp_init_builtins and c_cpp_builtins.
9528 2011-08-19 Joseph Myers <joseph@codesourcery.com>
9530 * c-common.c (c_common_reswords): Add __builtin_complex.
9531 * c-common.h (RID_BUILTIN_COMPLEX): New.
9533 2011-08-18 Joseph Myers <joseph@codesourcery.com>
9535 * c-common.c (c_common_reswords): Add _Noreturn.
9536 (keyword_is_function_specifier): Handle RID_NORETURN.
9537 * c-common.h (RID_NORETURN): New.
9539 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9541 * c-common.c (unsafe_conversion_p): New function. Check if it is
9542 unsafe to convert an expression to the type.
9543 (conversion_warning): Adjust, use unsafe_conversion_p.
9544 * c-common.h (unsafe_conversion_p): New function declaration.
9546 2011-08-02 Jakub Jelinek <jakub@redhat.com>
9548 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9549 (c_finish_omp_taskyield): New prototype.
9550 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9551 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9552 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9553 or RHS1 have side-effects, evaluate those too in the right spot,
9554 if it is a decl and LHS is also a decl, error out if they
9556 (c_finish_omp_taskyield): New function.
9557 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9558 * c-pragma.c (omp_pragmas): Add taskyield.
9559 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9560 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9561 PRAGMA_OMP_CLAUSE_MERGEABLE.
9563 2011-07-25 Dodji Seketeli <dodji@redhat.com>
9565 * c-common.h (set_underlying_type): Remove parm name from
9568 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
9570 * c-pretty-print.h: Search c-common.h in c-family.
9572 2011-07-22 Jason Merrill <jason@redhat.com>
9575 * c.opt (Wnarrowing): New.
9578 * c-common.h: Declare c_linkage_bindings.
9579 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9582 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9583 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9584 as flag_isoc99 for 'restrict'.
9585 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9587 2011-07-21 Ian Lance Taylor <iant@google.com>
9590 * c-common.c (c_disable_warnings): New static function.
9591 (c_enable_warnings): New static function.
9592 (c_fully_fold_internal): Change local unused_p to bool. Call
9593 c_disable_warnings and c_enable_warnings rather than change
9594 c_inhibit_evaluation_warnings.
9596 2011-07-20 Jason Merrill <jason@redhat.com>
9598 PR c++/6709 (DR 743)
9599 PR c++/42603 (DR 950)
9600 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9601 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9602 (CPP_DECLTYPE): New.
9603 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9605 2011-07-19 Richard Guenther <rguenther@suse.de>
9607 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9608 * c-omp.c (c_finish_omp_for): Likewise.
9610 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9612 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9613 body on the next line.
9615 2011-07-08 Jason Merrill <jason@redhat.com>
9618 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9621 * c-common.c (c_apply_type_quals_to_decl): Don't check
9622 TYPE_NEEDS_CONSTRUCTING.
9624 2011-07-06 Richard Guenther <rguenther@suse.de>
9626 * c-common.c (c_common_nodes_and_builtins):
9627 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9629 2011-07-05 Richard Guenther <rguenther@suse.de>
9631 * c-common.c (c_common_nodes_and_builtins): Build all common
9634 2011-06-27 Jakub Jelinek <jakub@redhat.com>
9636 * c-common.h (c_tree_chain_next): New static inline function.
9638 * c-common.c (check_builtin_function_arguments): Handle
9639 BUILT_IN_ASSUME_ALIGNED.
9641 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
9643 * c-common.c: Add sync_ or SYNC__ to builtin names.
9644 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9646 2011-06-20 Pierre Vittet <piervit@pvittet.com>
9648 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9650 (gen_pragma_handler): New union.
9651 (internal_pragma_handler): New type.
9652 (c_register_pragma_with_data)
9653 (c_register_pragma_with_expansion_and_data): New functions.
9655 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9656 (c_register_pragma, c_register_pragma_with_expansion)
9657 (c_invoke_pragma_handler): Changed to work with
9658 internal_pragma_handler.
9659 (c_register_pragma_with_data)
9660 (c_register_pragma_with_expansion_and_data): New functions.
9662 2011-06-14 Joseph Myers <joseph@codesourcery.com>
9664 * c-common.c: Include common/common-target.h.
9665 (handle_section_attribute): Use
9666 targetm_common.have_named_sections.
9667 * c-cppbuiltin.c: Include common/common-target.h.
9668 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9670 2011-06-10 Richard Guenther <rguenther@suse.de>
9672 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9673 to print a IDENTIFIER_NODE.
9675 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9676 Joseph Myers <joseph@codesourcery.com>
9678 * c.opt (fbuilding-libgcc): New option.
9679 * c-cppbuiltin.c (c_cpp_builtins): Define
9680 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9682 2011-06-07 Jason Merrill <jason@redhat.com>
9684 * c-common.c (max_tinst_depth): Lower default to 900.
9686 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9688 2011-06-07 Richard Guenther <rguenther@suse.de>
9690 * c-common.c (c_common_nodes_and_builtins): Do not set
9691 size_type_node or call set_sizetype.
9693 2011-06-07 Dodji Seketeli <dodji@redhat.com>
9696 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9697 type when using pointer comparison to compare types.
9699 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9701 * c.opt: Add -Wdelete-non-virtual-dtor.
9702 * c-opts.c (c_common_handle_option): Include it in -Wall.
9704 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9709 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9711 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9714 2011-05-27 Jakub Jelinek <jakub@redhat.com>
9717 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9718 C++ don't call c_common_truthvalue_conversion on void type arms.
9720 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9722 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9723 (stmt_list_stack): Define.
9724 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9725 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9727 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9729 * c-common.c (warning_candidate_p): Check for BLOCKs.
9731 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9733 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9736 2011-05-25 Jakub Jelinek <jakub@redhat.com>
9738 * c-common.c (def_fn_type): Remove extra va_end.
9740 2011-05-23 Jason Merrill <jason@redhat.com>
9743 * c-common.c (c_common_get_narrower): New.
9744 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9746 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9748 * c-common.h (check_function_arguments): Tweak prototype of
9749 check_function_arguments.
9750 * c-common.c (check_function_arguments): Likewise. Adjust
9751 calls to check_function_nonnull, check_function_format, and
9752 check_function_sentinel.
9753 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9754 separate attributes and typelist arguments. Use
9755 FOREACH_FUNCTION_ARGS to iterate over argument types.
9757 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9759 * c-common.c (c_common_reswords): Reorder.
9760 * c-common.h (rid): Likewise.
9762 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9764 * c-common.c (def_fn_type): Don't call build_function_type, call
9765 build_function_type_array or build_varargs_function_type_array
9767 (c_common_nodes_and_builtins): Likewise.
9769 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9771 * c-common.c (c_add_case_label): Omit the loc argument to
9773 * c-common.h (build_case_label): Remove.
9774 * c-semantics.c (build_case_label): Remove.
9776 2011-05-05 Joseph Myers <joseph@codesourcery.com>
9778 * c-objc.h (objc_start_method_definition): Update prototype.
9779 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9781 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9783 * c-common.c (check_main_parameter_types): Reindent. Don't use
9784 TYPE_ARG_TYPES directly.
9785 (handle_nonnull_attribute): Likewise.
9786 (sync_resolve_params): Likewise.
9787 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9788 to check_format_string.
9789 (handle_format_attribute): Likewise.
9790 (check_format_string): Take a function type to examine instead of
9791 a type list. Use a function_arg_iterator to step through argument
9794 2011-05-04 Richard Guenther <rguenther@suse.de>
9796 * c-common.c (fix_string_type): Use size_int for index type bounds.
9797 (start_fname_decls): Do not pass NULL to build_int_cst.
9798 (c_init_attributes): Likewise.
9799 * c-lex.c (c_lex_with_flags): Likewise.
9801 2011-04-27 Jason Merrill <jason@redhat.com>
9803 * c-common.c (make_tree_vector_from_list): New.
9804 * c-common.h: Declare it.
9806 2011-04-26 Richard Guenther <rguenther@suse.de>
9808 PR preprocessor/48248
9809 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9810 for output size with -P.
9812 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9814 * c-common.c (struct c_common_resword): Add __underlying_type.
9815 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9817 2011-04-20 Jim Meyering <meyering@redhat.com>
9819 * c-format.c (init_dollar_format_checking): Remove useless
9822 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9824 * c-objc.h (objc_get_interface_ivars): Removed.
9825 (objc_detect_field_duplicates): New.
9826 * stub-objc.c: Likewise.
9828 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9830 * stub-objc.c (objc_declare_protocols): Renamed to
9831 objc_declare_protocol.
9832 * c-objc.h: Likewise.
9834 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9836 * stub-objc.c (objc_declare_class): Updated argument name.
9838 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9840 * c-common.h (c_common_init_ts): Declare.
9841 * c-common.c (c_common_init_ts): Define.
9843 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9845 * c-objc.h (objc_build_message_expr): Updated prototype.
9846 * stub-objc.c (objc_build_message_expr): Likewise.
9848 2011-04-12 Martin Jambor <mjambor@suse.cz>
9850 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9853 2011-04-11 Richard Guenther <rguenther@suse.de>
9855 * c-common.c (complete_array_type): Build a range type of
9858 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9860 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9861 (handle_type_generic_attribute): Likewise.
9863 2011-04-07 Jason Merrill <jason@redhat.com>
9866 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9867 conversion from C++0x scoped enum.
9869 2011-04-06 Joseph Myers <joseph@codesourcery.com>
9871 * c-target-def.h: New file.
9872 * c-target.def: New file.
9873 * c-target.h: New file.
9874 * c-common.c (targetcm): Don't define here.
9875 * c-common.h (default_handle_c_option): Declare.
9876 * c-format.c: Include c-target.h instead of target.h.
9877 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9879 (default_handle_c_option): Move from targhooks.c.
9881 2011-03-29 Jakub Jelinek <jakub@redhat.com>
9883 PR preprocessor/48248
9884 * c-ppoutput.c (print): Add src_file field.
9885 (init_pp_output): Initialize it.
9886 (maybe_print_line): Don't optimize by adding up to 8 newlines
9887 if map->to_file and print.src_file are different file.
9888 (print_line): Update print.src_file.
9890 2011-03-25 Kai Tietz <ktietz@redhat.com>
9892 * c-ada-spec.c (compare_comment): Use filename_cmp
9893 instead of strcmp for filename.
9895 2011-03-25 Jeff Law <law@redhat.com>
9897 * c-common.c (def_fn_type): Add missing va_end.
9899 2011-03-25 Jason Merrill <jason@redhat.com>
9901 * c.opt: Add -std=c++03.
9903 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9905 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9907 2011-03-17 Kai Tietz <ktietz@redhat.com>
9910 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9911 Display allowed attributes for function pointer types.
9912 (pp_c_attributes_display): New function to display
9913 attributes having affects_type_identity flag set to true.
9914 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9916 * c-common.c (c_common_attribute_table):
9918 (c_common_format_attribute_table): Likewise.
9920 2011-03-18 Jason Merrill <jason@redhat.com>
9922 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9923 * c-common.h: Don't declare it here.
9924 * c-common.c: Or define it here.
9925 * c-opts.c (c_common_handle_option): Or set it here.
9928 * c-common.c (handle_transparent_union_attribute): Don't
9929 make a duplicate type in C++.
9931 2011-03-15 Jason Merrill <jason@redhat.com>
9933 * c-common.c (max_constexpr_depth): New.
9934 * c-common.h: Declare it.
9935 * c-opts.c (c_common_handle_option): Set it.
9936 * c.opt (fconstexpr-depth): New option.
9938 2011-03-11 Jason Merrill <jason@redhat.com>
9940 * c-common.c (attribute_takes_identifier_p): Add missing const.
9943 * c-common.c (attribute_takes_identifier_p): Assume that an
9944 unknown attribute takes an identifier.
9946 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9949 * c-common.c (c_type_hash): Call list_length instead of iterating
9950 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9952 2011-02-19 Jakub Jelinek <jakub@redhat.com>
9955 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9957 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9959 * c.opt (fobjc-abi-version=) New.
9960 (fobjc-nilcheck): New.
9962 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9965 * c-common.h (keyword_is_decl_specifier): Declare.
9966 * c-common.c (keyword_is_decl_specifier): Define.
9967 (keyword_is_function_specifier): New function.
9969 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9972 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9973 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9976 2011-01-26 Arnaud Charlet <charlet@adacore.com>
9978 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9980 2011-01-26 Jakub Jelinek <jakub@redhat.com>
9983 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9984 after init_c_lex if pch_file is set.
9986 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9989 * c.opt (-fkeep-inline-dllexport): New switch.
9991 2011-01-12 Richard Guenther <rguenther@suse.de>
9994 * c-common.c (handle_weak_attribute): Warn instead of error
9995 on declaring an inline function weak.
9997 2011-01-05 Tom Tromey <tromey@redhat.com>
9999 * c-common.h (lvalue_error): Update.
10000 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
10003 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
10006 * c-objc.h (objc_finish_message_expr): Added argument to
10009 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
10011 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
10014 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
10016 * c-objc.h (objc_maybe_warn_exceptions): New.
10017 * stub-objc.c (objc_maybe_warn_exceptions): New.
10019 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
10021 * c-common.h (readonly_error): Declare.
10022 * c-common.c (readonly_error): Define.
10024 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
10026 * c-common.h (invalid_indirection_error): Declare.
10027 * c-common.c (invalid_indirection_error): Define.
10029 2010-12-03 Richard Guenther <rguenther@suse.de>
10032 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10033 (pp_c_unary_expression): Likewise.
10034 (pp_c_expression): Likewise.
10036 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10038 * c-common.h (objc_finish_function): New.
10039 (objc_non_volatilized_type): Removed.
10040 (objc_type_quals_match): Removed.
10041 * stub-objc.c (objc_finish_function): New.
10042 (objc_non_volatilized_type): Removed.
10043 (objc_type_quals_match): Removed.
10045 2010-11-30 Joseph Myers <joseph@codesourcery.com>
10047 * c-common.h (parse_optimize_options): Declare.
10048 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10049 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10051 2010-11-29 Joseph Myers <joseph@codesourcery.com>
10053 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10055 * c-pch.c (O_BINARY): Don't define here.
10056 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10058 2010-11-25 Joseph Myers <joseph@codesourcery.com>
10060 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10061 targetm.except_unwind_info.
10063 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10065 * c-opts.c (c_common_handle_option): Pass location to
10066 set_struct_debug_option.
10068 2010-11-23 Joseph Myers <joseph@codesourcery.com>
10070 * c-common.c (visibility_options): Move from ../opts.c.
10071 * c-common.h (struct visibility_flags, visibility_options):
10073 * c-opts.c (finish_options): Rename to c_finish_options.
10074 (c_common_init): Update call to finish_options.
10076 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10079 * c-lex.c (lex_string): Check that each string in an Objective-C
10080 string concat sequence starts with either one or zero '@', and
10081 that there are no spurious '@' signs at the end.
10083 2010-11-20 Joseph Myers <joseph@codesourcery.com>
10085 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10086 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10087 HANDLE_PRAGMA_VISIBILITY.
10088 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10089 HANDLE_PRAGMA_VISIBILITY): Don't define.
10090 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10092 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10097 * c-common.h (keyword_begins_type_specifier): Declare.
10098 (keyword_is_storage_class_specifier): Declare.
10099 (keyword_is_type_qualifier): Declare.
10100 * c-common.c (keyword_begins_type_specifier): New function.
10101 (keyword_is_storage_class_specifier): New function.
10102 (keyword_is_type_qualifier): Declare.
10104 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10107 * c-common.c (in_late_binary_op): Define.
10108 (c_common_truthvalue_conversion): Check in_late_binary_op before
10109 calling c_save_expr.
10110 * c-common.h (in_late_binary_op): Declare.
10112 2010-11-19 Joseph Myers <joseph@codesourcery.com>
10114 * c-opts.c (c_common_handle_option): Update calls to
10115 set_struct_debug_option.
10117 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10119 * c-common.h (objc_declare_protocols): Added additional argument.
10120 * stub-objc.c (objc_declare_protocol): Same change.
10122 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10125 * c-common.h (build_real_imag_expr): Declare.
10126 * c-semantics.c (build_real_imag_expr): Define.
10128 2010-11-17 Joseph Myers <joseph@codesourcery.com>
10130 * c-opts.c (c_common_parse_file): Take no arguments.
10131 * c-common.h (c_common_parse_file): Update prototype.
10133 2010-11-16 Jakub Jelinek <jakub@redhat.com>
10136 * c-common.c (warning_candidate_p): Don't track non-const calls
10139 2010-11-15 Ian Lance Taylor <iant@google.com>
10141 * c-lex.c (init_c_lex): Set macro debug callbacks if
10142 flag_dump_go_spec is set.
10144 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10146 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10147 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10149 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10151 PR preprocessor/45038
10152 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10155 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10157 * c-common.h (c_family_lang_mask): Declare.
10158 * c-opts.c (c_family_lang_mask): Make extern.
10159 * c-pragma.c (handle_pragma_diagnostic): Use
10160 control_warning_option.
10162 2010-11-12 Joseph Myers <joseph@codesourcery.com>
10164 * c-common.c (parse_optimize_options): Update call to
10166 * c-common.h (c_common_handle_option): Update prototype.
10167 * c-opts.c (c_common_handle_option): Take location_t parameter and
10168 pass it to other functions.
10170 2010-11-11 Joseph Myers <joseph@codesourcery.com>
10172 * c-opts.c (warning_as_error_callback): Remove.
10173 (c_common_initialize_diagnostics): Don't call
10174 register_warning_as_error_callback.
10175 (c_common_handle_option): Handle -Werror=normalized= here.
10177 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10179 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10181 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10183 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10184 Remove trailing '.' from diagnostics.
10185 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10187 2010-11-10 Joseph Myers <joseph@codesourcery.com>
10189 * c-common.c (parse_optimize_options): Pass global_dc to
10191 * c-opts.c (c_common_handle_option): Pass &global_options to
10192 set_Wstrict_aliasing.
10193 * c.opt (v): Don't mark Common or document here.
10195 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10198 * c-format.c (format_type): New type gcc_objc_string_format_type.
10199 (valid_stringptr_type_p): New.
10200 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
10201 (check_format_string): Pass expected type, use
10202 valid_stringptr_type_p (), check that the format string types are
10203 consistent with the format specification.
10204 (decode_format_attr): Warn if NSString is used outside objective-c.
10205 (format_types_orig): Add NSString.
10206 (format_name): New.
10207 (format_flags): New.
10208 (check_format_arg): Handle format strings requiring an external parser.
10209 first_target_format_type: New variable.
10210 (handle_format_attribute): Set up first_target_format_type, pass the
10211 expected format arg string type to check_format_string().
10212 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
10213 * stub-objc.c (objc_string_ref_type_p): New.
10214 (objc_check_format_arg): New.
10216 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10218 Fixed using the Objective-C 2.0 dot-syntax with class names.
10219 * c-common.h (objc_build_class_component_ref): New.
10220 * stub-objc.c (objc_build_class_component_ref): New.
10222 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10224 * c.opt (Wproperty-assign-default): New option.
10226 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10228 Implemented -fobjc-std=objc1 flag.
10229 * c.opt (fobjc-std=objc1): New option.
10231 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10233 Implemented format and noreturn attributes for Objective-C methods.
10234 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10235 attribute for Objective-C methods.
10237 2010-10-31 Jason Merrill <jason@redhat.com>
10239 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10242 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10244 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10245 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10246 (objc_add_property_declaration): Removed arguments for copies and
10248 (objc_build_getter_call): Renamed to
10249 objc_maybe_build_component_ref.
10250 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10251 (objc_is_property_ref): New.
10252 * c-common.c (c_common_reswords): Removed copies and ivar.
10253 * stub-objc.c (objc_add_property_declaration): Removed arguments
10254 for copies and ivar.
10255 (objc_build_getter_call): Renamed to
10256 objc_maybe_build_component_ref.
10257 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10258 (objc_is_property_ref): New.
10260 2010-10-29 Arnaud Charlet <charlet@adacore.com>
10261 Matthew Gingell <gingell@adacore.com>
10263 * c-ada-spec.c (separate_class_package): New function.
10264 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10265 name of their enclosing package.
10266 (print_ada_declaration): Use separate_class_package.
10268 2010-10-27 Jason Merrill <jason@redhat.com>
10270 * c-common.c (c_common_reswords): Add __is_literal_type.
10271 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10273 * c-common.c (check_case_value): Remove special C++ code.
10275 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10277 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10278 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10279 and RID_LAST_PATTR.
10280 (objc_add_property_declaration): Added additional arguments.
10281 (objc_property_attribute_kind): Removed.
10282 (objc_set_property_attr): Removed.
10283 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10284 copy and nonatomic.
10285 * stub-objc.c (objc_add_property_declaration): Added additional
10287 (objc_set_property_attr): Removed.
10289 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10291 * c-common.h (objc_add_property_variable): Renamed to
10292 objc_add_property_declaration. Added location argument.
10293 * stub-objc.c (objc_add_property_variable): Same change.
10295 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10297 * c-common.h (objc_maybe_printable_name): New.
10298 * stub-objc.c (objc_maybe_printable_name): New.
10300 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10301 Andrew Pinski <pinskia@gmail.com>
10303 * c-common.h (c_common_mark_addressable_vec): Declare.
10304 * c-common.c (c_common_mark_addressable_vec): New function.
10306 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10308 * c-common.h (objc_set_method_type): Removed.
10309 (objc_add_method_declaration): Added boolean argument.
10310 (objc_start_method_definition): Same change.
10311 (objc_build_method_signature): Same change.
10312 * stub-objc.c (objc_set_method_type): Removed.
10313 (objc_add_method_declaration): Added boolean argument.
10314 (objc_start_method_definition): Same change.
10315 (objc_build_method_signature): Same change.
10317 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10319 * c-common.h (finish_file): Removed.
10320 (objc_write_global_declarations): New.
10321 * c-opts.c (c_common_parse_file): Do not call finish_file.
10322 * stub-objc.c (objc_write_global_declarations): New.
10324 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10326 Implemented parsing @synthesize and @dynamic for
10327 Objective-C/Objective-C++.
10328 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10329 (objc_add_synthesize_declaration): New.
10330 (objc_add_dynamic_declaration): New.
10331 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10332 * stub-objc.c (objc_add_synthesize_declaration): New.
10333 (objc_add_dynamic_declaration): New.
10335 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10338 * c-cppbuiltin.c (mode_has_fma): Move function here from
10339 builtins.c. Don't use the fma optab, instead just use the
10340 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10343 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10345 Merge from 'apple/trunk' branch on FSF servers.
10347 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
10350 * c-common.h (objc_non_volatilized_type): New declaration
10351 * stub-objc.c (objc_non_volatilized_type): New stub.
10353 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10355 Merge from 'apple/trunk' branch on FSF servers.
10357 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
10360 * c-common.h (objc_diagnose_private_ivar): New decl.
10361 * stub-objc.c (objc_diagnose_private_ivar): New stub.
10363 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10365 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10366 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10367 (objc_ivar_visibility_kind): New enum.
10368 (objc_set_visibility): Adjust prototype to use visibility enum.
10369 * stub-objc.c (objc_set_visibility): Adjust stub to use
10372 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10374 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10375 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10376 has the appropriate fma builtins.
10377 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10379 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10381 merge from FSF apple 'trunk' branch.
10382 2006 Fariborz Jahanian <fjahanian@apple.com>
10384 Radars 4436866, 4505126, 4506903, 4517826
10385 * c-common.c (c_common_resword): Define @property and its attributes.
10386 * c-common.h: Define property attribute enum entries.
10387 (OBJC_IS_PATTR_KEYWORD): New.
10388 (objc_property_attribute_kind): New enum.
10389 Declare objc_set_property_attr (), objc_add_property_variable (),
10390 objc_build_getter_call () and objc_build_setter_call ().
10391 * stub-objc.c (objc_set_property_attr): New stub.
10392 (objc_add_property_variable): Likewise.
10393 (objc_build_getter_call): Likewise.
10394 (objc_build_setter_call) Likewise.
10396 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10398 merge from FSF apple 'trunk' branch.
10399 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
10401 Radar 3803157 (method attributes)
10402 * c-common.c (handle_deprecated_attribute): Recognize
10403 objc methods as valid declarations.
10404 * c-common.h: Declare objc_method_decl ().
10405 * stub-objc.c (objc_method_decl): New stub.
10407 2010-10-08 Joseph Myers <joseph@codesourcery.com>
10409 * c-common.c (parse_optimize_options): Call
10410 decode_cmdline_options_to_array_default_mask before
10411 decode_options. Update arguments to decode_options.
10412 * c-common.h (c_common_init_options_struct): Declare.
10413 * c-opts.c (c_common_init_options_struct): New. Split out from
10414 c_common_init_options.
10416 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10418 Implemented fast enumeration for Objective-C.
10419 * c-common.h (objc_finish_foreach_loop): New.
10420 * stub-objc.c (objc_finish_foreach_loop): New.
10422 2010-10-05 Joseph Myers <joseph@codesourcery.com>
10424 * c-common.h (struct diagnostic_context): Don't declare here.
10425 (c_common_initialize_diagnostics): Declare using
10426 diagnostic_context typedef.
10427 * c-opts.c (c_common_handle_option): Pass global_dc to
10428 handle_generated_option.
10430 2010-10-04 Joseph Myers <joseph@codesourcery.com>
10432 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10433 handle_generated_option.
10435 2010-10-03 Ian Lance Taylor <iant@google.com>
10437 * c.opt (-fplan9-extensions): New option.
10439 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10441 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10443 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10444 of duplicating code.
10446 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10448 * c-common.c: Add two new entries for @optional
10449 and @required keywords.
10451 merge from FSF 'apple/trunk' branch.
10452 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
10455 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10456 objective-c keywords.
10457 (objc_set_method_opt): New declaration.
10458 * stub-objc.c (objc_set_method_opt): New stub.
10460 2010-09-30 Joseph Myers <joseph@codesourcery.com>
10462 * c-common.c (handle_optimize_attribute): Pass &global_options to
10463 cl_optimization_save and cl_optimization_restore.
10464 * c-opts.c (c_common_handle_option): Pass &global_options to
10465 handle_generated_option.
10466 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10467 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10468 &global_options to cl_optimization_restore.
10470 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10472 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10473 Objective-C/Objective-C++ keywords.
10475 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10477 Merge from 'apple/trunk' branch on FSF servers.
10479 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
10482 * c-common.h (objc_check_global_decl): New declaration.
10483 * stub-objc.c (objc_check_global_decl): New stub.
10485 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10487 * c.opt: Don't use VarExists.
10489 2010-09-29 Joseph Myers <joseph@codesourcery.com>
10491 * c-common.c (c_cpp_error): Update names of diagnostic_context
10493 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10494 cl_optimization members.
10495 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10496 sanitize_cpp_opts, finish_options): Update names of cpp_options
10499 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10501 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10502 (objc_is_reserved_word): Removed.
10503 * c-common.c: Updated comments.
10504 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10505 objc_is_reserved_word.
10506 * stub-objc.c (objc_is_reserved_word): Removed.
10508 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10510 * c-common.h (objc_add_method_declaration): Adjust prototype to
10511 include attributes.
10512 (objc_start_method_definition): Likewise.
10513 (objc_build_keyword_decl): Likewise.
10514 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10515 (objc_start_method_definition): Likewise.
10516 (objc_build_keyword_decl): Likewise.
10518 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10520 * c-common.h (objc_start_class_interface): Adjust prototype.
10521 (objc_start_category_interface): Likewise.
10522 (objc_start_protocol): Likewise.
10523 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10524 (objc_start_class_interface): Likewise.
10525 (objc_start_category_interface): Likewise.
10527 2010-09-27 Ian Lance Taylor <iant@google.com>
10529 * c-common.c (c_common_attribute_table): Add no_split_stack.
10530 (handle_no_split_stack_attribute): New static function.
10532 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10534 Merge from 'apple/trunk' branch on FSF servers.
10536 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
10539 * c-common.h (objc_have_common_type): New declaration.
10540 * stub-objc.c (objc_have_common_type): New stub.
10542 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10545 * c-common.h (objc_common_type): New prototype.
10546 * stub-objc.c (objc_common_type): New stub.
10548 2010-09-24 Jan Hubicka <jh@suse.cz>
10550 * c-common.c (handle_leaf_attribute): New function.
10551 (struct attribute_spec c_common_att): Add leaf.
10553 2010-09-22 Joseph Myers <joseph@codesourcery.com>
10555 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10556 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10557 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10558 -include-barrier, -include-directory, -include-directory=,
10559 -include-directory-after, -include-directory-after=,
10560 -include-prefix, -include-prefix=, -include-with-prefix,
10561 -include-with-prefix=, -include-with-prefix-after,
10562 -include-with-prefix-after=, -include-with-prefix-before,
10563 -include-with-prefix-before=, -no-integrated-cpp,
10564 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10565 -output=, -pedantic, -pedantic-errors, -preprocess,
10566 -print-missing-file-dependencies, -trace-includes, -traditional,
10567 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10568 -user-dependencies, -verbose, -write-dependencies,
10569 -write-user-dependencies, no-integrated-cpp, traditional): New.
10571 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10574 * c-common.h (objc_start_method_definition): Return bool instead
10576 * stub-objc.c (objc_start_method_definition): Return bool instead
10579 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10582 * c-common.h (objc_get_interface_ivars): New declaration.
10583 * stub-objc.c (objc_get_interface_ivars): New stub.
10585 2010-09-15 Ian Lance Taylor <iant@google.com>
10587 * c-common.c (parse_optimize_options): Do not capitalize warning
10588 messages. Remove period at end of warning message.
10590 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10592 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10593 (handle_alias_attribute): ... here.
10594 (handle_ifunc_attribute): New.
10596 2010-09-06 Mark Mitchell <mark@codesourcery.com>
10598 * c-common.h (do_warn_double_promotion): Declare.
10599 * c-common.c (do_warn_double_promotion): Define.
10601 2010-09-05 Mark Mitchell <mark@codesourcery.com>
10603 * c.opt (Wdouble-promotion): New.
10605 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10607 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10608 fvtable-thunks, fxref): Mark no longer supported in help text.
10610 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10612 * c.opt (Wimport, fall-virtual, falt-external-templates,
10613 fdefault-inline, fenum-int-equiv, fexternal-templates,
10614 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10615 fname-mangling-version-, fnew-abi, fnonnull-objects,
10616 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10617 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10619 (fhandle-exceptions): Mark with Alias and Warn.
10620 * c-opts.c (c_common_handle_option): Don't handle options marked
10623 2010-09-02 Joseph Myers <joseph@codesourcery.com>
10625 * c.opt (Wcomments, Werror-implicit-function-declaration,
10626 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10627 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10629 * c-common.c (option_codes): Use OPT_Wcomment instead of
10631 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10632 Don't handle options marked as aliases.
10634 2010-08-25 Richard Guenther <rguenther@suse.de>
10636 * c-common.c (c_common_get_alias_set): Remove special
10637 handling for pointers.
10639 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10641 * c-common.c: Use FOR_EACH_VEC_ELT.
10642 * c-gimplify.c: Likewise.
10643 * c-pragma.c: Likewise.
10645 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10647 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10649 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10651 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10652 instead of OPT_MDX and OPT_MMDX.
10654 2010-08-16 Joseph Myers <joseph@codesourcery.com>
10656 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10658 2010-08-12 Joseph Myers <joseph@codesourcery.com>
10660 * c.opt (MD, MMD): Change to MDX and MMDX.
10661 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10663 2010-08-11 Joseph Myers <joseph@codesourcery.com>
10665 * c-opts.c (c_common_handle_option): Call handle_generated_option
10666 instead of handle_option.
10668 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10670 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10671 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10673 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10675 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10676 (pending_redefine_extname): Change type to a VEC.
10677 (add_to_renaming_pragma_list): Update for new type of
10678 pending_redefine_extname.
10679 (maybe_apply_renaming_pragma): Likewise.
10681 2010-08-04 Arnaud Charlet <charlet@adacore.com>
10683 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10685 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10686 decide whether a type has already been declared/seen.
10687 Do not go to the original type.
10688 (dump_nested_types): New parameter forward.
10689 Generate forward declaration if needed and mark type as visited.
10690 (print_ada_declaration): Call dump_nested_types if not already done.
10691 Mark types as visited.
10693 2010-08-03 Joseph Myers <joseph@codesourcery.com>
10695 * c.opt (-print-pch-checksum): Remove option.
10696 * c-opts.c (c_common_handle_option): Don't handle
10697 OPT_print_pch_checksum.
10699 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10701 * c-common.h (c_common_handle_option): Update prototype and return
10703 * c-opts.c (c_common_handle_option): Update prototype and return
10704 value type. Update calls to handle_option and
10705 enable_warning_as_error.
10707 2010-07-27 Jakub Jelinek <jakub@redhat.com>
10710 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10712 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10714 * c-common.h (c_common_missing_argument): Remove.
10715 * c-opts.c (c_common_missing_argument): Remove.
10716 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10717 idirafter, imacros, include, isysroot, isystem, iquote): Add
10719 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10721 2010-07-27 Joseph Myers <joseph@codesourcery.com>
10723 * c-common.h (c_common_option_lang_mask,
10724 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10726 (c_common_init_options): Update prototype.
10727 * c-opts.c (c_common_option_lang_mask): New.
10728 (c_common_initialize_diagnostics): Split out of
10729 c_common_init_options.
10730 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10732 (c_common_init_options): Update prototype. Use decoded options in
10733 search for -lang-asm.
10735 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10737 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10738 * c-format.c: Likewise.
10740 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10742 * c-common.h: Include diagnostic-core.h. Error if already
10744 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10746 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10748 * c-common.c (IN_GCC_FRONTEND): Do not undef.
10749 Do not include expr.h
10750 (vector_mode_valid_p): Move here.
10752 2010-06-21 DJ Delorie <dj@redhat.com>
10754 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10755 allow these pragmas anywhere.
10757 2010-06-14 Jakub Jelinek <jakub@redhat.com>
10760 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10761 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10762 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10763 ggc_strdup instead of xstrdup.
10765 2010-06-10 Jakub Jelinek <jakub@redhat.com>
10767 * c-cppbuiltin.c: Include cpp-id-data.h.
10768 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10769 (lazy_hex_fp_value): New function.
10770 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10772 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10774 * c-gimplify.c: Do not include tree-flow.h
10776 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10779 * c-common.c: Rename targetm member:
10780 targetm.enum_va_list -> targetm.enum_va_list_p
10782 2010-06-28 Anatoly Sokolov <aesok@post.ru>
10784 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10786 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10788 * c-cppbuiltin.c: Do not include except.h.
10790 2010-06-24 Andi Kleen <ak@linux.intel.com>
10792 * c-common.c (warn_for_omitted_condop): New.
10793 * c-common.h (warn_for_omitted_condop): Add prototype.
10795 2010-06-21 Joseph Myers <joseph@codesourcery.com>
10797 * c.opt (lang-objc): Remove.
10798 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10800 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10802 * c-opts.c: Include "tm_p.h".
10804 2010-06-20 Joseph Myers <joseph@codesourcery.com>
10806 * c-common.c (parse_optimize_options): Update call to
10809 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10811 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10812 new type of types_used_by_cur_var_decl.
10814 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10817 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10818 for C++ standard compliance.
10820 2010-06-16 Jason Merrill <jason@redhat.com>
10822 * c.opt: Add -Wnoexcept.
10824 2010-06-16 Richard Guenther <rguenther@suse.de>
10827 * c-common.c (c_common_truthvalue_conversion): Remove
10828 premature and wrong optimization concering ADDR_EXPRs.
10830 2010-06-15 Arnaud Charlet <charlet@adacore.com>
10832 * c-ada-spec.c (dump_sloc): Remove column info.
10833 (is_simple_enum): New function.
10834 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10835 enum types when relevant.
10837 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10839 * c-common.c (conversion_warning): Warn at expression
10842 2010-06-10 Joseph Myers <joseph@codesourcery.com>
10844 * c-opts.c (c_common_handle_option): Don't handle
10847 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10849 * c-pragma.c (push_alignment): Use typed GC allocation.
10850 (handle_pragma_push_options): Likewise.
10852 * c-common.c (parse_optimize_options): Likewise.
10854 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10857 2010-06-07 Joseph Myers <joseph@codesourcery.com>
10859 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10860 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10861 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10862 flag_signed_bitfields, warn_strict_null_sentinel,
10863 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10864 flag_gen_declaration, flag_no_gnu_keywords,
10865 flag_implement_inlines, flag_implicit_templates,
10866 flag_implicit_inline_templates, flag_optional_diags,
10867 flag_elide_constructors, flag_default_inline, flag_rtti,
10868 flag_conserve_space, flag_access_control, flag_check_new,
10869 flag_new_for_scope, flag_weak, flag_working_directory,
10870 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10871 flag_enforce_eh_specs, flag_threadsafe_statics,
10872 flag_pretty_templates): Remove.
10873 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10874 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10875 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10876 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10877 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10878 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10879 flag_no_gnu_keywords, flag_implement_inlines,
10880 flag_implicit_templates, flag_implicit_inline_templates,
10881 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10882 flag_rtti, flag_conserve_space, flag_access_control,
10883 flag_check_new, flag_new_for_scope, flag_weak,
10884 flag_working_directory, flag_use_cxa_atexit,
10885 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10886 flag_threadsafe_statics, flag_pretty_templates,
10887 warn_strict_null_sentinel): Remove.
10888 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10889 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10890 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10891 fimplicit-inline-templates, fimplicit-templates,
10892 flax-vector-conversions, fms-extensions, fnil-receivers,
10893 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10894 frtti, fshort-double, fshort-enums, fshort-wchar,
10895 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10896 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10897 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10898 gen-decls, undef): Use Var.
10899 (fdefault-inline, foptional-diags): Document as doing nothing.
10900 * c-opts.c (c_common_handle_option): Remove cases for options now
10901 using Var. Mark ignored options as such.
10903 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10905 * c-common.c: Moved to here from parent directory.
10906 * c-common.def: Likewise.
10907 * c-common.h: Likewise.
10908 * c-cppbuiltin.c: Likewise.
10909 * c-dump.c: Likewise.
10910 * c-format.c: Likewise.
10911 * c-format.h : Likewise.
10912 * c-gimplify.c: Likewise.
10913 * c-lex.c: Likewise.
10914 * c-omp.c: Likewise.
10916 * c-opts.c: Likewise.
10917 * c-pch.c: Likewise.
10918 * c-ppoutput.c: Likewise.
10919 * c-pragma.c: Likewise.
10920 * c-pragma.h: Likewise.
10921 * c-pretty-print.c: Likewise.
10922 * c-pretty-print.h: Likewise.
10923 * c-semantics.c: Likewise.
10924 * stub-objc.c: Likewise.
10926 * c-common.c: Include gt-c-family-c-common.h.
10927 * c-pragma.c: Include gt-c-family-c-pragma.h.
10929 Copyright (C) 2010-2020 Free Software Foundation, Inc.
10931 Copying and distribution of this file, with or without modification,
10932 are permitted in any medium without royalty provided the copyright
10933 notice and this notice are preserved.