1 2019-02-11 Martin Sebor <msebor@redhat.com>
4 * c-common.c (invalid_array_size_error): New function.
5 (valid_array_size_p): Call it. Handle size as well as type.
6 * c-common.h (valid_constant_size_p): New function.
7 (enum cst_size_error): New type.
9 2019-01-31 David Malcolm <dmalcolm@redhat.com>
12 * known-headers.cc (get_stdlib_header_for_name): Add
13 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
15 2019-01-31 Jakub Jelinek <jakub@redhat.com>
18 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
19 a C cast in pp_c_flag_gnu_v3 mode.
21 2019-01-29 Jakub Jelinek <jakub@redhat.com>
24 * c-common.c (c_common_nodes_and_builtins): Build type variants for
25 builtin_structptr_types types even for C.
27 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
29 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
30 when rhs is of array type correctly. Fix handling of nested structures.
31 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
32 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
33 type casts within nested compound expressions.
35 2019-01-22 Jakub Jelinek <jakub@redhat.com>
38 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
39 variable after using BIT_FIELD_REF.
41 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
45 * c-common.h (warn_for_address_or_pointer_of_packed_member):
46 Remove the boolean argument.
47 * c-warn.c (check_address_of_packed_member): Renamed to ...
48 (check_address_or_pointer_of_packed_member): This. Also
49 warn pointer conversion.
50 (check_and_warn_address_of_packed_member): Renamed to ...
51 (check_and_warn_address_or_pointer_of_packed_member): This.
52 Also warn pointer conversion.
53 (warn_for_address_or_pointer_of_packed_member): Remove the
54 boolean argument. Don't check pointer conversion here.
56 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
59 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
61 2019-01-14 Jakub Jelinek <jakub@redhat.com>
63 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
64 and __cpp_nontype_template_parameter_auto. Add a comment that
65 __cpp_template_auto is deprecated.
67 2019-01-14 Tom Honermann <tom@honermann.net>
69 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
70 * c-common.c (c_common_reswords): Add char8_t.
71 (fix_string_type): Use char8_t for the type of u8 string literals.
72 (c_common_get_alias_set): char8_t doesn't alias.
73 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
75 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
76 (keyword_begins_type_specifier): Add RID_CHAR8.
77 * c-common.h (rid): Add RID_CHAR8.
78 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
79 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
80 Define char8_type_node and char8_array_type_node.
81 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
82 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
83 (c_cpp_builtins): Predefine __cpp_char8_t.
84 * c-lex.c (lex_string): Use char8_array_type_node as the type of
86 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
87 * c-opts.c: If not otherwise specified, enable -fchar8_t when
89 * c.opt: Add the -fchar8_t command line option.
91 2019-01-14 Martin Sebor <msebor@redhat.com>
94 * c-attribs.c (positional_argument): Call valid_format_string_type_p
95 and issue errors if it fails.
96 * c-common.h (valid_format_string_type_p): Declare.
97 * c-format.c (valid_stringptr_type_p): Rename...
98 (valid_format_string_type_p): ...to this and make extern.
99 (handle_format_arg_attribute): Adjust to new name.
100 (check_format_string): Same.
102 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
104 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
105 Replace "may may" with "may" in warning message.
107 2019-01-07 Jakub Jelinek <jakub@redhat.com>
110 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
111 (c_build_vec_convert): Declare.
112 * c-common.c (c_build_vec_convert): New function.
114 2019-01-04 Martin Sebor <msebor@redhat.com>
117 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
118 Handle C++ empty throw specification and C11 _Noreturn.
119 (has_attribute): Also handle C11 _Noreturn.
121 2019-01-04 Martin Sebor <msebor@redhat.com>
124 * c-attribs.c (positional_argument): Also accept enumerated types.
126 2019-01-01 Jakub Jelinek <jakub@redhat.com>
128 Update copyright years.
130 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
133 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
134 * c-warn.c (check_alignment_of_packed_member): New function.
135 (check_address_of_packed_member): Likewise.
136 (check_and_warn_address_of_packed_member): Likewise.
137 (warn_for_address_or_pointer_of_packed_member): Likewise.
138 * c.opt: Add -Wno-address-of-packed-member.
140 2018-12-20 David Malcolm <dmalcolm@redhat.com>
143 * c-warn.c (get_outermost_macro_expansion): New function.
144 (spelled_the_same_p): Use it to unwind the macro expansions, and
145 compare the outermost macro in each nested expansion, rather than
148 2018-12-19 David Malcolm <dmalcolm@redhat.com>
151 * c-common.h (warn_tautological_cmp): Convert 1st param from
152 location_t to const op_location_t &.
153 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
154 when testing for INTEGER_CST.
155 (warn_tautological_bitwise_comparison): Convert 1st param from
156 location_t to const op_location_t &; use it to build a
157 binary_op_rich_location, and use this.
158 (spelled_the_same_p): New function.
159 (warn_tautological_cmp): Convert 1st param from location_t to
160 const op_location_t &. Warn for macro expansions if
161 spelled_the_same_p. Use binary_op_rich_location.
163 2018-12-19 David Malcolm <dmalcolm@redhat.com>
167 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
168 (verify_tree): Handle location wrappers.
169 (c_common_truthvalue_conversion): Strip any location wrapper.
171 (fold_offsetof): Strip any location wrapper.
172 (complete_array_type): Likewise for initial_value.
173 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
174 index before checking for INTEGER_CST.
175 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
176 print parentheses around location wrappers.
177 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
178 before checking for INTEGER_CST.
179 (warn_tautological_bitwise_comparison): Call
180 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
181 before checking for INTEGER_CST.
182 (readonly_error): Strip any location wrapper.
183 (warn_array_subscript_with_type_char): Strip location wrappers
184 before checking for INTEGER_CST. Use the location of the index if
187 2018-12-06 Jason Merrill <jason@redhat.com>
189 PR c++/88136 - -Wdeprecated-copy false positives
190 * c.opt (Wdeprecated-copy-dtor): New.
191 (Wdeprecated-copy): Move to -Wextra.
193 2018-11-29 Martin Sebor <msebor@redhat.com>
197 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
198 alignments to values less than the target requires.
199 (has_attribute): For attribute aligned consider both the attribute
200 and the alignment bits.
201 * c-common.c (c_init_attributes): Optionally issue a warning for
204 2018-11-28 Martin Sebor <msebor@redhat.com>
208 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
209 or destination is an error.
211 2018-11-28 Jakub Jelinek <jakub@redhat.com>
214 * c-ubsan.c: Include langhooks.h.
215 (ubsan_instrument_division): Change gcc_assert that main variants
216 of op0 and op1 types are equal to gcc_checking_assert that the
217 main variants are compatible types.
219 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
221 * c-ada-spec.c: Include stringpool.h.
222 (has_static_fields): Return false for incomplete types.
223 (is_tagged_type): Likewise.
224 (has_nontrivial_methods): Likewise.
225 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
226 (struct overloaded_name_hash): New structure.
227 (struct overloaded_name_hasher): Likewise.
228 (overloaded_names): New global variable.
229 (init_overloaded_names): New static function.
230 (overloaded_name_p): New predicate.
231 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
232 on the TYPE_STUB_DECL of the original type of a typedef, if any.
233 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
234 Remove always-true condition and dump forward types.
235 (dump_ada_specs): Delete overloaded_names.
237 2018-11-20 Martin Sebor <msebor@redhat.com>
239 * c-attribs.c (type_for_vector_size): New function.
240 (type_valid_for_vector_size): Same.
241 (handle_vector_size_attribute): Move code to the functions above
243 (validate_attribute, has_attribute): New functions.
244 * c-common.h (has_attribute): Declare.
245 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
246 * c-common.c (c_common_resword): Same.
248 2018-11-16 Jason Merrill <jason@redhat.com>
250 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
251 * c-attribs.c (attr_cold_hot_exclusions): Make public.
253 2018-11-16 Jakub Jelinek <jakub@redhat.com>
256 * c-common.c (fix_string_type): Reject string literals larger than
257 TYPE_MAX_VALUE (ssizetype) bytes.
259 2018-11-15 Martin Sebor <msebor@redhat.com>
263 * c-attribs.c (positional_argument): New function.
264 (handle_alloc_size_attribute): Use it and simplify.
265 (handle_alloc_align_attribute): Same.
266 (handle_assume_aligned_attribute): Same.
267 (handle_nonnull_attribute): Same.
268 * c-common.c (check_function_arguments): Pass fntype to
269 check_function_format.
270 * c-common.h (check_function_format): Add an argument.
271 (PosArgFlags, positional_argument): Declare new type and function.
272 * c-format.c (decode_format_attr): Add arguments.
273 (check_format_string, get_constant): Same.
274 (convert_format_name_to_system_name): Adjust.
276 2018-11-15 David Malcolm <dmalcolm@redhat.com>
279 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
281 2018-11-14 Jakub Jelinek <jakub@redhat.com>
283 P1236R1 - Signed integers are two's complement
284 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
285 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
286 with in-range second operand well defined for -std=c++2a.
289 * c-common.c (parse_optimize_options): Allocate option string from
290 opts_obstack rather than as GC memory. Move the allocation after
291 warning for invalid option.
293 2018-11-13 David Malcolm <dmalcolm@redhat.com>
295 * c-common.c (c_get_substring_location): Update for renaming of
296 get_source_location_for_substring to get_location_within_string.
297 * c-lex.c: Replace "source_location" with "location_t".
298 * c-opts.c: Likewise.
299 * c-ppoutput.c: Likewise.
301 2018-11-13 Martin Sebor <msebor@redhat.com>
304 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
305 (handle_tls_model_attribute): Improve diagnostics.
307 2018-11-12 Jason Merrill <jason@redhat.com>
309 * c-cppbuiltin.c (c_cpp_builtins): Define
310 __cpp_impl_destroying_delete.
312 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
313 __cpp_conditional_explicit.
315 2018-11-09 Martin Sebor <msebor@redhat.com>
318 * c-attribs.c (handle_copy_attribute): New function.
320 2018-11-09 Martin Sebor <msebor@redhat.com>
323 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
325 2018-11-08 Jakub Jelinek <jakub@redhat.com>
327 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
328 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
329 enum omp_memory_order MEMORY_ORDER.
330 (c_finish_omp_flush): Add MO argument.
331 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
332 (c_finish_omp_for): Add FINAL_P argument.
333 * c-omp.c: Include memmodel.h.
334 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
335 OMP_TASKGROUP_CLAUSES to it.
336 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
337 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
338 instead of OMP_ATOMIC_SEQ_CST.
339 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
340 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
341 __atomic_thread_fence call with the given value.
342 (check_omp_for_incr_expr): Formatting fixes.
343 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
344 even in OpenMP loops, diagnose if NE_EXPR and incr expression
345 is not constant expression 1 or -1. Transform NE_EXPR loops
346 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
347 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
349 (c_omp_split_clauses): Add support for combined
350 #pragma omp parallel master and
351 #pragma omp {,parallel }master taskloop{, simd} constructs.
352 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
353 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
354 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
355 (c_omp_predetermined_sharing): Don't return
356 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
357 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
359 * c-pragma.h (enum pragma_kind): Likewise.
360 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
361 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
363 2018-11-08 David Malcolm <dmalcolm@redhat.com>
365 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
367 2018-11-08 David Malcolm <dmalcolm@redhat.com>
369 * c-format.c (local_cgraph_node_ptr_node): New variable.
370 (gcc_dump_printf_char_table): Add entry for %C.
371 (get_pointer_to_named_type): New function, taken from the handling
372 code for "gimple *" from...
373 (init_dynamic_diag_info): ...here. Add handling for
375 * c-format.h (T_CGRAPH_NODE): New.
377 2018-10-19 Jason Merrill <jason@redhat.com>
379 * c-cppbuiltin.c (c_cpp_builtins): Add
380 __cpp_nontype_template_parameter_class.
382 2018-10-31 Nathan Sidwell <nathan@acm.org>
384 * c-opts.c (c_finish_options): Force command line macro
385 location. Refactor to avoid repeating main debug hook.
386 (push_command_line_include): Clarify comment.
388 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
390 2018-10-30 Martin Sebor <msebor@redhat.com>
393 * c-format.c (check_format_types): Avoid diagnosing null pointer
394 arguments to printf-family of functions.
396 2018-10-30 Marek Polacek <polacek@redhat.com>
398 Implement P0892R2, explicit(bool).
399 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
401 2018-10-29 David Malcolm <dmalcolm@redhat.com>
403 * name-hint.h (name_hint::take_deferred): New member function.
405 2018-10-29 David Malcolm <dmalcolm@redhat.com>
408 * c-common.c (check_function_sentinel): Call fold_for_warn on the
410 (check_function_restrict): Rename param "argarray" to
411 "unfolded_argarray", and make a copy named "argarray", calling
412 fold_for_warn on each argument.
413 (check_function_arguments): Add note about responsibility for
414 folding the arguments.
416 2018-10-17 Joseph Myers <joseph@codesourcery.com>
418 * c-common.c (flag_isoc2x): New variable.
419 * c-common.h (clk_c): Update comment to reference C2X.
420 (flag_isoc99, flag_isoc11): Update comments to reference future
421 standard versions in general.
422 (flag_isoc2x): Declare.
423 * c-opts.c (set_std_c2x): New function.
424 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
425 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
427 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
429 2018-10-17 Joseph Myers <joseph@codesourcery.com>
431 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
432 (std=iso9899:2018): Document C17 as published in 2018.
434 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
437 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
439 2018-10-11 Will Wray <wjwray@gmail.com>
442 * c-pretty-print.h (pp_c_type_cast): Prototype.
443 (pp_c_integer_constant): Likewise.
444 * c-pretty-print.c (pp_c_type_cast): No longer static.
445 (pp_c_integer_constant): Likewise.
446 (pp_c_enumeration_constant): Fix loop termination when finding
447 name of constant. No longer returns a value. Call
448 pp_c_integer_constant.
449 (c_pretty_printer::constant): Update for changes to
450 pp_c_enumeration_constant.
452 2018-10-11 Jakub Jelinek <jakub@redhat.com>
454 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
455 for no_unique_address.
457 2018-10-09 David Malcolm <dmalcolm@redhat.com>
459 * c-common.c (c_option_controlling_cpp_error): Rename to...
460 (c_option_controlling_cpp_diagnostic): ...this, and convert
461 "reason" from int to enum.
462 (c_cpp_error): Rename to...
463 (c_cpp_diagnostic): ...this, converting level and reason to enums.
464 * c-common.h (c_cpp_error): Rename to...
465 (c_cpp_diagnostic): ...this, converting level and reason to enums.
466 * c-opts.c (c_common_init_options): Update for renaming.
468 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
471 * c-common.c (vector_types_compatible_elements_p): Use
472 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
474 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
476 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
477 to generate constructor destructor priority warning.
478 * c.opt (-Wprio-ctor-dtor): New option.
480 2018-10-01 Jason Merrill <jason@redhat.com>
482 * c-lex.c (c_common_has_attribute): Add no_unique_address.
484 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
486 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
487 (dump_ada_node): Add const keyword.
489 2018-09-25 Martin Liska <mliska@suse.cz>
491 * c-common.c (c_common_truthvalue_conversion):
492 Remove Pascal from documentation.
494 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
496 * c-ada-spec.c: Include diagnostic.h.
497 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
499 2018-09-19 Marek Polacek <polacek@redhat.com>
501 * c.opt (Wclass-conversion): New.
503 2018-09-17 David Malcolm <dmalcolm@redhat.com>
505 * c-format.c (range_label_for_format_type_mismatch::get_text):
506 Update for new param.
508 2018-09-17 David Malcolm <dmalcolm@redhat.com>
510 * c-format.c (format_warning_at_char): Update for introduction of
511 format_string_diagnostic_t.
512 (format_type_warning): Likewise.
514 2018-09-17 Martin Jambor <mjambor@suse.cz>
517 * c.opt (Wabsolute-value): New.
519 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
521 * c-common.c (complete_flexible_array_elts): New helper function.
522 * c-common.h (complete_flexible_array_elts): Declare.
524 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
526 * c-common.c (braced_list_to_string): Remove eval parameter.
527 Add some more checks. Always create zero-terminated STRING_CST.
528 * c-common.h (braced_list_to_string): Adjust prototype.
530 2018-08-27 David Malcolm <dmalcolm@redhat.com>
533 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
535 (maybe_suggest_missing_token_insertion): Likewise.
536 (maybe_add_include_fixit): Add param "override_location". If set,
537 and source-printing is enabled, then override the rich_location's
538 primary location with that of the insertion point for the fix-it
539 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
540 * c-common.h (extern void maybe_add_include_fixit): Add bool
542 * c-format.c (selftest::test_type_mismatch_range_labels): Update
543 for conversion of show_caret_p to a tri-state.
544 * c-warn.c (warn_for_restrict): Likewise.
546 (suggest_missing_header::~suggest_missing_header): Update call to
547 maybe_add_include_fixit to suggest overriding the location, as it
550 2018-08-27 Martin Liska <mliska@suse.cz>
552 * c-common.c (check_function_restrict): Use new function
553 fndecl_built_in_p and remove check for FUNCTION_DECL if
555 (check_builtin_function_arguments): Likewise.
556 (reject_gcc_builtin): Likewise.
557 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
559 2018-08-26 Marek Polacek <polacek@redhat.com>
561 PR c++/87029, Implement -Wredundant-move.
562 * c.opt (Wredundant-move): New option.
564 2018-08-21 Marek Polacek <polacek@redhat.com>
566 PR c++/86981, Implement -Wpessimizing-move.
567 * c.opt (Wpessimizing-move): New option.
569 2018-08-20 David Malcolm <dmalcolm@redhat.com>
572 * c-attribs.c (common_handle_aligned_attribute): Add
573 auto_diagnostic_group instance.
574 * c-indentation.c (warn_for_misleading_indentation): Likewise.
575 * c-opts.c (c_common_post_options): Likewise.
576 * c-warn.c (warn_logical_not_parentheses): Likewise.
577 (warn_duplicated_cond_add_or_warn): Likewise.
578 (warn_for_multistatement_macros): Likewise.
580 2018-08-20 Nathan Sidwell <nathan@acm.org>
582 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
585 2018-08-17 Nathan Sidwell <nathan@acm.org>
587 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
589 (laxy_hex_fp_value_count): Make unsigned.
590 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
591 manipulate the macro.
592 (builtin_defin_with_hex_fp_value): Adjust callback name, use
595 2018-08-17 David Malcolm <dmalcolm@redhat.com>
597 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
598 (gcc_dump_printf_length_specs): New.
599 (gcc_dump_printf_flag_pairs): New.
600 (gcc_dump_printf_flag_specs): New.
601 (gcc_dump_printf_char_table): New.
602 (format_types_orig): Add entry for "gcc_dump_printf".
603 (init_dynamic_diag_info): Set up length_char_specs and
604 conversion_specs for gcc_dump_printf_format_type.
605 (handle_format_attribute): Handle gcc_dump_printf_format_type.
607 2018-08-17 Nathan Sidwell <nathan@acm.org>
609 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
611 * c-ada-spec.c: Don't #include "cpp-id-data.h"
612 * c-cppbuiltin.c: Likewise.
614 2018-08-17 Martin Liska <mliska@suse.cz>
616 * c.opt: Remove Warn, Init and Report for options with
617 Ignore/Deprecated flag. Warning is done automatically for
620 2018-08-16 David Malcolm <dmalcolm@redhat.com>
623 * c-common.c (selftest::c_family_tests): Call
624 selftest::c_indentation_c_tests.
625 * c-common.h (selftest::c_indentation_c_tests): New decl.
626 * c-indentation.c: Include "selftest.h".
627 (next_tab_stop): Add "tab_width" param, rather than accessing
629 (get_visual_column): Likewise. Clarify comment. Bulletproof
630 against reading past the end of the line.
631 (get_first_nws_vis_column): Add "tab_width" param.
632 (detect_intervening_unindent): Likewise.
633 (should_warn_for_misleading_indentation): Read tab width from
634 cpp_opts and pass around.
635 (selftest::test_next_tab_stop): New test.
636 (selftest::assert_get_visual_column_succeeds): New function.
637 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
638 (selftest::assert_get_visual_column_fails): New function.
639 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
640 (selftest::test_get_visual_column): New test.
641 (selftest::c_indentation_c_tests): New function.
643 2018-08-16 Nathan Sidwell <nathan@acm.org>
645 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
646 (store_ada_macro): Likewise.
647 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
648 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
650 2018-08-15 David Malcolm <dmalcolm@redhat.com>
652 * c-format.c: Include "selftest-diagnostic.h" and
653 "gcc-rich-location.h".
654 (format_warning_at_char): Pass NULL for new label params of
656 (class indirection_suffix): New class.
657 (class range_label_for_format_type_mismatch): New class.
658 (format_type_warning): Move logic for generating "*" suffix to
659 class indirection_suffix. Create "fmt_label" and "param_label"
660 to show their types, and pass them to the
661 format_warning_at_substring calls.
662 (selftest::test_type_mismatch_range_labels): New test.
663 (selftest::c_format_c_tests): Call it.
665 2018-08-13 Martin Sebor <msebor@redhat.com>
667 PR tree-optimization/71625
668 * c-common.c (braced_list_to_string): New function.
669 * c-common.h (braced_list_to_string): Declare it.
671 2018-08-08 Nathan Sidwell <nathan@acm.org>
673 * c-common.c (try_to_locate_new_include_inertion_point): Use
674 linemap_included_from_linemap.
675 * c-lex.c (fe_file_change): Use linemap_included_from.
676 * c-ppoutput.c (pp_file_change): Likewise.
678 2018-08-01 Martin Sebor <msebor@redhat.com>
680 PR tree-optimization/86650
681 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
682 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
683 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
684 * c-format.h (T89_G): Update to be "gimple *" rather than
686 (local_gcall_ptr_node): Rename...
687 (local_gimple_ptr_node): ...to this.
689 2018-07-31 David Malcolm <dmalcolm@redhat.com>
691 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
692 table entries for gcc_diag_char_table, and the 'Z' entry from
693 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
694 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
695 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
696 adding missing "Z" for this table. Remove erroneous "G" and "K"
698 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
699 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
700 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
702 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
704 * c-common.c (speculation_safe_resolve_call): New function.
705 (speculation_safe_resolve_params): New function.
706 (speculation_safe_resolve_return): New function.
707 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
708 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
709 __HAVE_SPECULATION_SAFE_VALUE.
711 2018-07-20 David Malcolm <dmalcolm@redhat.com>
713 * c-common.c (c_cpp_error): Remove redundant "line_table"
714 parameter from call to rich_location::set_range.
715 (maybe_suggest_missing_token_insertion): Likewise.
717 2018-07-20 Martin Sebor <msebor@redhat.com>
720 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
722 2018-07-20 Martin Sebor <msebor@redhat.com>
725 * c-common.h (c_common_handle_option): Change function argument
727 * c-opts.c (c_common_init_options): Same.
728 (c_common_handle_option): Same. Remove special handling of
729 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
730 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
731 options to take a HOST_WIDE_INT argument and accept a byte-size
733 (-Wvla-larger-than): Same.
734 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
735 (-Wno-vla-larger-than): Same.
737 2018-07-12 Jakub Jelinek <jakub@redhat.com>
739 * c-attribs.c (c_common_attribute_table): Add
740 "omp declare target implicit" attribute.
742 2018-07-12 Richard Biener <rguenther@suse.de>
745 * c-attribs.c (handle_packed_attribute): Do not build a variant
746 type with TYPE_PACKED, instead ignore the attribute if we may
747 not apply to the original type.
749 2018-07-10 Jakub Jelinek <jakub@redhat.com>
752 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
753 to contain TREE_LIST for both the original class iterator and the
756 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
758 * c-ada-spec.c (to_ada_name): Remove index parameter.
759 (pp_ada_tree_identifier): Likewise.
760 (dump_ada_macros): Adjust call to to_ada_name.
761 (struct overloaded_name_hash): Delete.
762 (struct overloaded_name_hasher): Likewise.
763 (overloaded_names): Likewise.
764 (compute_overloading_index): Likewise.
765 (dump_ada_decl_name): Do not call compute_overloading_index and
766 adjust calls to pp_ada_tree_identifier.
767 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
768 (dump_ada_import): Add spc parameter and switch to aspect syntax.
769 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
770 (dump_ada_enum_type): Remove type and display_convention parameters.
771 Adjust calls to pp_ada_tree_identifier.
772 (dump_ada_node): Likewise and for dump_ada_structure.
773 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
775 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
777 (print_constructor): Adjust call to pp_ada_tree_identifier.
778 (print_destructor): Likewise.
779 (dump_ada_declaration): Switch to aspect syntax.
780 (dump_ada_structure): Likewise and tidy up. Replace display_convention
781 parameter with nested parameter.
782 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
783 (dump_ada_specs): Do not delete overloaded_names table.
785 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
788 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
791 2018-07-05 Nathan Sidwell <nathan@acm.org>
793 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
794 NO_IMPLICIT_EXTERN_C.
796 2018-06-28 Martin Liska <mliska@suse.cz>
798 * cppspec.c: Include opt-suggestions.h.
800 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
801 Thomas Schwinge <thomas@codesourcery.com>
802 Cesar Philippidis <cesar@codesourcery.com>
804 * c-pragma.h (enum pragma_omp_clause): Add
805 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
806 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
808 2018-06-20 Jakub Jelinek <jakub@redhat.com>
811 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
814 2018-06-18 Martin Sebor <msebor@redhat.com>
817 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
820 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
822 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
824 2018-06-13 Jason Merrill <jason@redhat.com>
826 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
827 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
830 PR c++/86094 - wrong code with defaulted move ctor.
831 * c-opts.c (c_common_post_options): Bump the current ABI version to
832 13. Set warn_abi_version and flag_abi_compat_version to the current
833 version rather than 0. Fix defaulting flag_abi_compat_version from
836 2018-06-12 Martin Sebor <msebor@redhat.com>
839 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
840 sizeof source and destination yields the same value.
842 2018-06-12 Martin Liska <mliska@suse.cz>
844 * c.opt: Make MPX-related options as Deprecated.
846 2018-06-08 David Malcolm <dmalcolm@redhat.com>
848 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
851 2018-06-08 Martin Liska <mliska@suse.cz>
853 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
854 for MPX (macros, related functions, fields in cgraph_node, ...).
855 (handle_bnd_legacy): Likewise.
856 (handle_bnd_instrument): Likewise.
859 2018-06-06 Jakub Jelinek <jakub@redhat.com>
862 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
863 __cpp_transactional_memory to 201500 instead of 210500.
865 2018-06-06 Jason Merrill <jason@redhat.com>
867 PR c++/85710 - ICE with -Wmemset-elt-size.
868 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
870 2018-06-01 Jason Merrill <jason@redhat.com>
872 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
875 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
877 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
878 declaration for a typedef independently of whether the declaration of
879 the subtype is generated.
881 2018-05-31 Martin Sebor <msebor@redhat.com>
884 * c.opt (-Wno-alloc-size-larger-than): New option.
886 2018-04-22 David Pagan <dave.pagan@oracle.com>
889 * c-opts.c (c_common_post_options): Set default for warn_return_type
890 for C++/C++ with ObjC extensions only. For C, makes it possible to
891 differentiate between default (no option), -Wreturn-type, and
894 2018-05-29 Jason Merrill <jason@redhat.com>
896 * c.opt (Winit-list-lifetime): New flag.
898 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
900 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
901 splay_tree_delete_pointers.
903 2018-05-26 Jakub Jelinek <jakub@redhat.com>
906 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
907 noinline variable to workaround broken kernel headers.
909 2018-05-18 Jason Merrill <jason@redhat.com>
911 * c.opt (Wdeprecated-copy): New flag.
913 2018-05-17 Martin Liska <mliska@suse.cz>
915 * c-warn.c (overflow_warning): Do not use
916 space in between 'G_' and '('.
918 2018-05-09 Jason Merrill <jason@redhat.com>
920 * c-common.c (valid_array_size_p): Add complain parameter.
921 * c-common.h: ...which defaults to true.
923 2018-05-11 Jakub Jelinek <jakub@redhat.com>
926 * c-omp.c (c_omp_predetermined_sharing): Return
927 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
929 2018-05-11 Martin Liska <mliska@suse.cz>
932 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
935 2018-05-10 Jakub Jelinek <jakub@redhat.com>
938 * c-common.h (fold_offsetof_1): Removed.
939 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
940 CTX argument defaulted to ERROR_MARK.
941 * c-common.c (fold_offsetof_1): Renamed to ...
942 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
943 argument, convert the pointer constant to TYPE and use size_binop
944 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
945 a pointer type. Adjust recursive calls.
947 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
950 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
952 2018-05-07 Nathan Sidwell <nathan@acm.org>
954 * c.opt (ffor-scope): Remove functionality, issue warning.
956 2018-05-03 Nathan Sidwell <nathan@acm.org>
958 * c.opt (ffriend-injection): Remove functionality, issue warning.
960 2018-05-01 David Malcolm <dmalcolm@redhat.com>
963 * c-format.c (struct format_check_results): Add field
965 (check_format_info): Initialize it, and warn if encountered.
966 (check_format_arg): Distinguish between wide char and
967 everything else when detecting arrays of non-char.
969 2018-04-30 David Malcolm <dmalcolm@redhat.com>
971 * c-format.c (get_corrected_substring): Update for
972 location_get_source_line returning a char_span. Use a char_span
973 when handling the prefix of the correction.
974 * c-indentation.c (get_visual_column): Update for
975 location_get_source_line returning a char_span.
976 (get_first_nws_vis_column): Likewise.
978 2018-03-29 David Malcolm <dmalcolm@redhat.com>
981 * known-headers.cc (get_stdlib_header_for_name): Add various names
982 from <assert.h>, <string.h>, and <memory.h>; add more names from
985 2018-03-27 Jakub Jelinek <jakub@redhat.com>
988 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
989 get_base_address of the second operand is a VAR_P, rather than the
990 operand itself, and use gcc_checking_assert instead of gcc_assert.
992 2018-03-23 Marek Polacek <polacek@redhat.com>
995 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
996 <case RDIV_EXPR>: Tweak condition.
998 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1000 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1002 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1005 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1009 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1012 2018-03-16 Richard Biener <rguenther@suse.de>
1015 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1016 unshare the possibly folded expression.
1018 2018-03-15 Richard Biener <rguenther@suse.de>
1021 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1023 2018-03-13 Martin Sebor <msebor@redhat.com>
1025 PR tree-optimization/84725
1026 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1027 with all three narrow character types, including their qualified forms.
1029 2018-03-12 Martin Sebor <msebor@redhat.com>
1031 PR tree-optimization/83456
1032 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1033 Restore checking of bounded built-in functions.
1034 (check_function_arguments): Also return the result
1035 of warn_for_restrict.
1036 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1037 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1039 2018-03-02 Marek Polacek <polacek@redhat.com>
1042 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1045 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1047 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1050 2018-03-01 Marek Polacek <polacek@redhat.com>
1053 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1054 alignment in computation.
1056 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1058 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1059 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1061 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1063 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1064 (is_char_array): Take a type instead of a declaration.
1065 (dump_ada_array_type): Likewise.
1066 (is_simple_enum): Minor tweak.
1067 (dump_ada_enum_type): New function extracted from...
1068 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1069 <INTEGER_TYPE>: Remove unreachable code.
1070 <RECORD_TYPE>: Likewise. Minor tweaks.
1071 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1072 <ENUMERAL_TYPE>: New case.
1073 <RECORD_TYPE>: Factor out common code.
1074 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1075 Minor tweaks. Deal with enumeral types.
1076 (dump_ada_structure): Minor tweaks.
1078 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1080 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1081 address for incomplete structures.
1082 (dump_forward_type): Do not bail out for incomplete structures.
1083 (dump_ada_declaration): Do not special-case incomplete structures
1084 for subtypes. Dump them as null records for types.
1086 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1088 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1089 (is_char_array): Fix formatting.
1090 (dump_template_types): Likewise.
1091 (dump_generic_ada_node): Rename into...
1092 (dump_ada_node): ...this.
1093 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1094 incomplete structures and not for empty structures. Do not use it
1095 when forward declarations are needed.
1096 (dump_forward_type): New function.
1097 (dump_nested_types): Remove FORWARD parameter. Do not consider
1098 TREE_VISITED and do not generate a forward declaration. Only dump
1099 original nested types for nested declaration.
1100 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1101 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1102 <RECORD_TYPE>: Do not consider TREE_VISITED.
1103 (dump_ada_declaration): Use booleans and fix formatting throughout.
1104 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1105 Call dump_forward_type instead of dump_nested_types for a typedef.
1106 Remove superfluous check and adjust call to dump_nested_types.
1107 <POINTER_TYPE>: Call dump_forward_type and fall through.
1108 (dump_ada_struct_decl): Rename into...
1109 (dump_ada_structure): ...this. Do not special-case empty structures.
1111 2018-02-27 Martin Sebor <msebor@redhat.com>
1114 * c.opt (-Wmissing-attributes): New option.
1116 2018-02-21 Martin Liska <mliska@suse.cz>
1118 * c.opt (Wcatch-value=): Add IntegerRange.
1120 2018-02-15 Jason Merrill <jason@redhat.com>
1122 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1124 2018-02-09 Nathan Sidwell <nathan@acm.org>
1127 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1129 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1132 2018-02-09 Martin Sebor <msebor@redhat.com>
1135 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1136 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1137 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1138 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1139 (-Wuninitialized): Same.
1141 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1143 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1144 keyword for components.
1146 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1148 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1150 2018-02-02 Julia Koval <julia.koval@intel.com>
1152 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1154 2018-01-29 Marek Polacek <polacek@redhat.com>
1157 * c-format.c (check_function_format): Check current_function_decl.
1159 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1161 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1163 (LAZY_HEX_FP_VALUES_CNT): Define.
1164 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1165 values rather than just 12.
1166 (builtin_define_with_hex_fp_value): Likewise.
1168 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1171 * c.opt (-fmacro-prefix-map): New option.
1172 * c-opts.c (c_common_handle_option): Handle it.
1173 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1174 * c-ppoutput.c (init_pp_output): Likewise.
1176 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1179 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1181 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1183 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1184 Skip 'f' and 'F' characters if it is true.
1185 (store_ada_macro): Minor tweak.
1186 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1187 <CPP_WSTRING>: Likewise.
1188 <CPP_STRING>: Output '&' in the buffer if not the first string.
1189 <CPP_NUMBER>: Adjust calls to dump_number.
1191 2018-01-10 David Malcolm <dmalcolm@redhat.com>
1194 * c-common.c: Include "selftest.h".
1195 (get_atomic_generic_size): Perform the test for integral type
1196 before the range test for any integer constant, fixing indentation
1197 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1198 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1199 (selftest::test_fold_for_warn): New function.
1200 (selftest::c_common_c_tests): New function.
1201 (selftest::c_family_tests): Call it, and
1202 selftest::c_pretty_print_c_tests.
1203 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1204 * c-format.c (check_format_arg): Convert VAR_P check to a
1206 * c-pretty-print.c: Include "selftest.h".
1207 (pp_c_cast_expression): Don't print casts for location wrappers.
1208 (selftest::assert_c_pretty_printer_output): New function.
1209 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1210 (selftest::test_location_wrappers): New function.
1211 (selftest::c_pretty_print_c_tests): New function.
1212 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1215 Alan Hayward <alan.hayward@arm.com>
1216 David Sherwood <david.sherwood@arm.com>
1218 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1221 Alan Hayward <alan.hayward@arm.com>
1222 David Sherwood <david.sherwood@arm.com>
1224 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1228 Alan Hayward <alan.hayward@arm.com>
1229 David Sherwood <david.sherwood@arm.com>
1231 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1232 (convert_vector_to_array_for_subscript): Handle polynomial
1233 TYPE_VECTOR_SUBPARTS.
1234 (c_common_type_for_mode): Check valid_vector_subparts_p.
1235 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1238 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1240 Update copyright years.
1242 2017-12-22 Mike Stump <mikestump@comcast.net>
1243 Eric Botcazou <ebotcazou@adacore.com>
1245 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1246 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1248 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
1252 * c-semantics.c (only_debug_stmts_after_p): New.
1253 (pop_stmt_list): Clear side effects in debug-only stmt list.
1254 Check for single nondebug stmt followed by debug stmts only.
1256 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
1259 * c-semantics.c (pop_stmt_list): Propagate side effects from
1260 single nondebug stmt to container list.
1262 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1264 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1265 conditions with typical order conditions.
1267 2017-12-18 Marek Polacek <polacek@redhat.com>
1269 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1272 2017-12-17 Martin Sebor <msebor@redhat.com>
1274 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1275 an error for attribute warn_if_not_aligned.
1277 2017-12-16 Martin Sebor <msebor@redhat.com>
1279 PR tree-optimization/78918
1280 * c-common.c (check_function_restrict): Avoid checking built-ins.
1281 * c.opt (-Wrestrict): Include in -Wall.
1283 2017-12-15 Jakub Jelinek <jakub@redhat.com>
1285 * c-attribs.c (c_common_attribute_table,
1286 c_common_format_attribute_table): Swap affects_type_identity
1287 and handler fields, adjust comments.
1289 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1291 * c.opt (Wcast-function-type): New warning option.
1292 * c-lex.c (get_fileinfo): Avoid warning.
1293 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1295 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
1298 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1299 Adjust the size of buf1 and buf2, add a new buf to avoid
1300 format-overflow warning.
1302 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1304 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1305 subsequent statement list.
1307 2017-12-07 Martin Sebor <msebor@redhat.com>
1311 * c-attribs.c (attr_aligned_exclusions): New array.
1312 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1313 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1314 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1315 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1316 (attr_warn_unused_result_exclusions): Same.
1317 (handle_hot_attribute, handle_cold_attribute): Simplify.
1318 (handle_const_attribute): Warn on function returning void.
1319 (handle_pure_attribute): Same.
1320 (handle_aligned_attribute): Diagnose conflicting attribute
1322 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1324 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1327 * c-common.c (selftest::c_family_tests): Call
1328 selftest::c_spellcheck_cc_tests.
1329 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1330 * c-spellcheck.cc: Include "selftest.h".
1331 (name_reserved_for_implementation_p): New function.
1332 (should_suggest_as_macro_p): New function.
1333 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1334 should_suggest_as_macro_p and call it.
1335 (selftest::test_name_reserved_for_implementation_p): New function.
1336 (selftest::c_spellcheck_cc_tests): New function.
1337 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1339 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1341 * c-spellcheck.cc: New file, taken from macro-handling code in
1343 * c-spellcheck.h: New file, taken from macro-handling code in
1346 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1348 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1350 (handle_simd_attribute): Don't check for "cilk simd function"
1351 attribute. Reindent, formatting changes.
1353 2017-11-30 Julia Koval <julia.koval@intel.com>
1355 * c-common.h (inv_list): Remove.
1357 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1360 * c-common.c (c_switch_covers_all_cases_p_1,
1361 c_switch_covers_all_cases_p): New functions.
1362 * c-common.h (c_switch_covers_all_cases_p): Declare.
1364 2017-11-28 Julia Koval <julia.koval@intel.com>
1365 Sebastian Peryt <sebastian.peryt@intel.com>
1367 * array-notation-common.c: Delete.
1368 * c-cilkplus.c: Ditto.
1369 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1370 * c-common.def (ARRAY_NOTATION_REF): Remove.
1371 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1372 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1373 c_validate_cilk_plus_loop, cilkplus_an_parts,
1374 cilk_ignorable_spawn_rhs_op,
1375 cilk_recognize_spawn): Remove.
1376 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1377 * c-omp.c: Remove CILK_SIMD check.
1378 * c-pragma.c: Ditto.
1379 * c-pragma.h: Remove CILK related pragmas.
1380 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1381 ARRAY_NOTATION_REF condition.
1382 (c_pretty_printer::expression): Ditto.
1383 * c.opt (fcilkplus): Remove.
1386 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1388 * c-pretty-print.c (pp_c_additive_expression,
1389 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1391 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1393 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1396 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1397 instead of tree_to_uhwi, formatting fix.
1399 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1402 * known-headers.cc: New file, based on material from c/c-decl.c.
1403 (suggest_missing_header): Copied as-is.
1404 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1405 heavily edited to add C++ support. Add some knowledge about
1406 <limits.h>, <stdint.h>, and <wchar.h>.
1407 * known-headers.h: Likewise.
1409 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1411 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1412 (lookup_name_fuzzy): Likewise. Convert return type from
1413 const char * to name_hint. Add location_t param.
1414 * name-hint.h: New header.
1416 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1420 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1422 2017-11-16 Joseph Myers <joseph@codesourcery.com>
1424 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1425 expected publication date of C17.
1426 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1428 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1431 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1432 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1434 2017-11-10 Martin Sebor <msebor@redhat.com>
1437 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1438 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1439 * c.opt (-Wstringop-truncation): New option.
1441 2017-11-06 Martin Liska <mliska@suse.cz>
1444 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1446 * c.opt: Set default value of warn_return_type.
1448 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1450 * c-common.c (binary_op_error): Update for renaming of
1452 (c_parse_error): Likewise.
1453 * c-warn.c (warn_logical_not_parentheses): Likewise for
1454 renaming of inform_at_rich_loc.
1455 (warn_for_restrict): Likewise for renaming of
1456 warning_at_rich_loc_n.
1458 2017-10-30 Joseph Myers <joseph@codesourcery.com>
1460 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1461 * c-opts.c (set_std_c17): New function.
1462 (c_common_init_options): Use gnu17 as default C version.
1463 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1465 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1467 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1468 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1469 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1472 2017-10-23 Marek Polacek <polacek@redhat.com>
1475 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1477 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1479 * c-common.c (check_builtin_function_arguments): Also check arguments
1480 of __builtin_alloca_with_align_and_max.
1482 2017-10-17 David Malcolm <dmalcolm@redhat.com>
1484 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1485 rather than NULL to format_warning_va.
1486 (check_format_types): Likewise when calling format_type_warning.
1487 Remove code to extract source_ranges and source_range * in favor
1488 of just a location_t.
1489 (format_type_warning): Convert source_range * param to a
1492 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1494 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1497 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1499 * c-common.c (enum missing_token_insertion_kind): New enum.
1500 (get_missing_token_insertion_kind): New function.
1501 (maybe_suggest_missing_token_insertion): New function.
1502 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1504 2017-10-11 Nathan Sidwell <nathan@acm.org>
1506 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1507 (c_common_handle_option): Update incpath_kind names.
1509 2017-10-11 Martin Liska <mliska@suse.cz>
1512 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1513 Wattributes warning.
1515 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1517 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1518 operating on trees as wide_ints.
1519 * c-common.c (pointer_int_sum): Likewise.
1520 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1521 * c-warn.c (match_case_to_enum_1): Likewise.
1522 (c_do_switch_warnings): Likewise.
1523 (maybe_warn_shift_overflow): Likewise.
1525 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1528 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1529 instead of wide_int::from.
1531 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1534 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1535 using to_widest use wide_int with the larger of the two precisions.
1537 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1539 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1542 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1544 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1545 when combining the original unconverted comparison operands.
1547 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1549 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1552 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1554 * c-ada-spec.c (to_ada_name): Add index parameter.
1555 (pp_ada_tree_identifier): Likewise.
1556 (dump_ada_macros): Adjust call to to_ada_name.
1557 (struct overloaded_name_hash): New type.
1558 (struct overloaded_name_hasher): Likewise.
1559 (overloaded_names): New hash table.
1560 (compute_overloading_index): New function.
1561 (dump_ada_decl_name): Call it and pass the result to
1562 pp_ada_tree_identifier.
1563 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1564 (dump_ada_function_declaration): Likewise.
1565 (dump_generic_ada_node): Likewise.
1566 (print_constructor): Likewise.
1567 (print_destructor): Likewise.
1568 (dump_ada_specs): Delete overloaded_names table.
1570 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1572 * c-ada-spec.c (max_ada_macros): Move around.
1573 (store_ada_macro_index): Likewise.
1574 (source_file): Rename into...
1575 (macro_source_file): ...this.
1576 (count_ada_macro): Move around.
1577 (store_ada_macro): Likewise.
1578 (compare_macro): Likewise.
1579 (print_ada_macros): Merge in...
1580 (dump_ada_macros): ...this.
1581 (source_file_base): Rename into...
1582 (current_source_file): ...this.
1583 (print_comment): Move around.
1584 (dump_ada_nodes): Call dump_ada_declaration directly.
1585 (struct with): Change type of limited field to bool.
1586 (append_withs): Change type of limited_access parameter to bool.
1587 (pp_ada_tree_identifie): Likewise.
1588 (dump_ada_decl_nam): Likewise.
1589 (dump_generic_ada_node): Likewise. Do not print the return type.
1590 (to_ada_name): Change type of space_found parameter to bool.
1591 (dump_ada_function_declaration): Return void and change type of
1592 parameters to bool. Also print the return type for a function.
1593 (print_ada_methods): Rename into...
1594 (dump_ada_methods): ...this.
1595 (print_ada_declaration): Rename into ...
1596 (dump_ada_declaration): ...this. Do not print the return type.
1597 (print_ada_struct_decl): Rename into...
1598 (dump_ada_struct_decl): ...this.
1600 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1602 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1603 rather than DECL_INITIAL.
1604 (common_handle_aligned_attribute): Likewise.
1606 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1608 * c.opt (gen-decls): Add RejectNegative.
1610 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1611 Jakub Jelinek <jakub@redhat.com>
1613 Add support for -std=c++2a.
1614 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1615 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1616 * c-opts.c (set_std_cxx2a): New.
1617 (c_common_handle_option): Set options when -std=c++2a is enabled.
1618 (c_common_post_options): Adjust comments.
1619 (set_std_cxx14, set_std_cxx17): Likewise.
1621 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1623 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1624 message for non-uniform endianness and issue a warning in C++.
1626 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1628 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1629 (Wc++17-compat): Change from undocumented alias to option.
1630 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1631 change C++1z to C++17 in description.
1632 (std=c++1z, std=gnu++1z): Change from option to undocumented
1634 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1636 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1637 * c-opts.c (set_std_cxx1z): Rename to ...
1638 (set_std_cxx17): ... this.
1639 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1640 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1642 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1645 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1647 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1648 function alignment if warn_if_not_aligned_p is true.
1650 2017-09-12 Nathan Sidwell <nathan@acm.org>
1652 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1653 resort_sorted_fields): Move to c/c-decl.c.
1654 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1655 (struct sorted_fields_type): Move to c/c-lang.h.
1657 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1660 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1662 2017-09-04 Marek Polacek <polacek@redhat.com>
1665 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1666 (warn_tautological_cmp): Call it.
1668 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1670 * c-opts.c (c_common_finish): Write dependency information even if
1673 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1676 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1677 (omp_pragmas_simd): ... here.
1678 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1679 create new clauses list containing just simd clause.
1681 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1682 Alan Hayward <alan.hayward@arm.com>
1683 David Sherwood <david.sherwood@arm.com>
1685 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1686 into scalar_mode_supported_p call.
1687 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1689 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1690 Alan Hayward <alan.hayward@arm.com>
1691 David Sherwood <david.sherwood@arm.com>
1693 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1694 for the mode iterator.
1696 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1697 Alan Hayward <alan.hayward@arm.com>
1698 David Sherwood <david.sherwood@arm.com>
1700 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1701 * c-common.c (c_build_vec_perm_expr): Likewise.
1703 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1704 Alan Hayward <alan.hayward@arm.com>
1705 David Sherwood <david.sherwood@arm.com>
1707 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1709 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1710 Alan Hayward <alan.hayward@arm.com>
1711 David Sherwood <david.sherwood@arm.com>
1713 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1714 before calling targetm.addr_space.valid_pointer_mode.
1716 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1717 Alan Hayward <alan.hayward@arm.com>
1718 David Sherwood <david.sherwood@arm.com>
1720 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1722 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1723 Alan Hayward <alan.hayward@arm.com>
1724 David Sherwood <david.sherwood@arm.com>
1726 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1728 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1730 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1731 Alan Hayward <alan.hayward@arm.com>
1732 David Sherwood <david.sherwood@arm.com>
1734 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1737 2017-08-29 Martin Liska <mliska@suse.cz>
1740 * c-common.c (parse_optimize_options): Add argument to function
1742 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1744 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1746 * c-lex.c (interpret_float): Use token location
1747 when building an EXCESS_PRECISION_EXPR.
1749 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1751 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1752 it to check_function_format.
1753 * c-common.h (check_function_arguments): Add vec<location_t> *
1755 (check_function_format): Likewise.
1756 * c-format.c (struct format_check_context): Add field "arglocs".
1757 (check_function_format): Add param "arglocs"; pass it to
1759 (check_format_info): Add param "arglocs"; use it to initialize
1760 new field of format_ctx.
1761 (check_format_arg): Pass format_ctx->arglocs to new param of
1762 check_format_info_main.
1763 (class argument_parser): New field "arglocs".
1764 (argument_parser::argument_parser): Add "arglocs_" param and use
1765 it to initialize new field.
1766 (argument_parser::check_argument_type): Pass new arglocs field to
1768 (check_format_info_main): Add param "arglocs", and use it when
1769 constructing arg_parser.
1770 (check_format_types): Add param "arglocs"; use it if non-NULL when
1771 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1773 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1776 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1777 (c_common_attribute_table): Add warn_if_not_aligned.
1778 (handle_aligned_attribute): Renamed to ...
1779 (common_handle_aligned_attribute): Remove argument, name, and add
1780 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1781 (handle_aligned_attribute): New.
1782 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1784 2017-08-14 Martin Sebor <msebor@redhat.com>
1787 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1788 (handle_nonstring_attribute): New function.
1790 2017-08-14 Martin Sebor <msebor@redhat.com>
1793 * c-format.h (T89_G): New macro.
1794 * c-format.c (local_gcall_ptr_node): New variable.
1795 (init_dynamic_diag_info): Initialize it.
1797 2017-08-11 Martin Liska <mliska@suse.cz>
1799 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1800 TARGET_SUPPORTS_ALIASES.
1802 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1804 * c-common.c (c_parse_error): Add rich_location * param, using it
1805 rather implicitly using input_location.
1806 * c-common.h (c_parse_error): Add rich_location * param.
1808 2017-08-09 Marek Polacek <polacek@redhat.com>
1810 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1811 (c_common_truthvalue_conversion): Likewise.
1812 * c-omp.c (c_finish_omp_atomic): Likewise.
1813 * c-common.h (build_binary_op): Update declaration.
1815 2017-08-08 Martin Liska <mliska@suse.cz>
1817 * c-ada-spec.c: Include header files.
1818 * c-ubsan.c: Likewise.
1819 * c-warn.c: Likewise.
1821 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1824 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1826 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1828 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1829 (print_ada_methods): Likewise.
1830 (print_ada_declaration): Likewise.
1832 2017-08-07 Martin Liska <mliska@suse.cz>
1834 * array-notation-common.c: Add new includes.
1835 * c-format.c( handle_format_attribute): Canonicalize a format
1837 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1839 * c-pretty-print.c: Add new include.
1841 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1843 * c-ada-spec.c (has_static_fields): Look only into variables.
1844 (print_constructor): Add TYPE parameter and use it for the name.
1845 (print_destructor): Likewise.
1846 (print_ada_declaration): Adjust to new constructor/destructor names.
1847 Adjust calls to print_constructor and print_destructor.
1848 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1849 Look only into variables in the final loop.
1851 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1853 * c-ada-spec.c (has_static_fields): Look only into fields.
1854 (dump_generic_ada_node): Small tweak.
1855 (dump_nested_types): Look only into fields.
1856 (print_ada_declaration): Look only into methods. Small tweak.
1857 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1859 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1861 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1862 (dump_ada_function_declaration): Likewise.
1863 (dump_generic_ada_node): Likewise.
1864 (print_ada_declaration): Add support for const-qualified variables.
1866 2017-07-31 Martin Liska <mliska@suse.cz>
1869 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1870 Guard condition with flag_sanitize_p also with current_function_decl
1872 (ubsan_maybe_instrument_reference_or_call): Likewise.
1874 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1876 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1878 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1880 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1882 (print_ada_declaration): Add missing guard for record types.
1884 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1887 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1888 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1889 new COMPOUND_EXPRs around the rhs of the comparison.
1891 2017-07-27 Marek Polacek <polacek@redhat.com>
1894 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1897 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1899 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1900 (handle_noipa_attribute): New function.
1902 2017-07-07 Torsten Duwe <duwe@suse.de>
1904 * c-attribs.c (c_common_attribute_table): Add entry for
1905 "patchable_function_entry".
1907 2017-07-20 Nathan Sidwell <nathan@acm.org>
1909 Remove TYPE_METHODS.
1910 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1911 dump_ada_template, print_ada_methods,
1912 print_ada_declaration): Member fns are on TYPE_FIELDS.
1914 2017-07-18 Nathan Sidwell <nathan@acm.org>
1916 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1918 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1920 * c-common.c (try_to_locate_new_include_insertion_point): New
1922 (per_file_includes_t): New typedef.
1923 (added_includes_t): New typedef.
1924 (added_includes): New variable.
1925 (maybe_add_include_fixit): New function.
1926 * c-common.h (maybe_add_include_fixit): New decl.
1928 2017-07-10 Martin Sebor <msebor@redhat.com>
1931 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1933 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1935 * c-common.c (selftest::c_family_tests): New.
1936 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1937 (selftest::c_family_tests): New decl.
1939 2017-07-04 Marek Polacek <polacek@redhat.com>
1942 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1945 2017-07-04 Marek Polacek <polacek@redhat.com>
1947 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1949 2017-06-28 Martin Liska <mliska@suse.cz>
1952 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1953 to a function declaration.
1955 2017-06-28 Martin Liska <mliska@suse.cz>
1958 * c.opt: Add IntegerRange to various options.
1960 2017-06-26 Marek Polacek <polacek@redhat.com>
1963 * c-common.h (warn_for_multistatement_macros): Declare.
1964 * c-warn.c: Include "c-family/c-indentation.h".
1965 (warn_for_multistatement_macros): New function.
1966 * c.opt (Wmultistatement-macros): New option.
1967 * c-indentation.c (guard_tinfo_to_string): No longer static.
1968 Change the parameter type to "enum rid". Handle RID_SWITCH.
1969 * c-indentation.h (guard_tinfo_to_string): Declare.
1971 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1973 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1975 2017-06-15 Martin Sebor <msebor@redhat.com>
1978 * c.opt (-Wclass-memaccess): New option.
1980 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1982 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1984 2017-06-13 Marek Polacek <polacek@redhat.com>
1987 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1990 2017-06-13 Martin Liska <mliska@suse.cz>
1993 * c-attribs.c (add_no_sanitize_value): New function.
1994 (handle_no_sanitize_attribute): Likewise.
1995 (handle_no_sanitize_address_attribute): Use the function.
1996 (handle_no_sanitize_thread_attribute): New function.
1997 (handle_no_address_safety_analysis_attribute): Use
1998 add_no_sanitize_value.
1999 (handle_no_sanitize_undefined_attribute): Likewise.
2000 * c-common.h: Declare new functions.
2001 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2002 (ubsan_instrument_shift): Likewise.
2003 (ubsan_instrument_bounds): Likewise.
2004 (ubsan_maybe_instrument_array_ref): Likewise.
2005 (ubsan_maybe_instrument_reference_or_call): Likewise.
2007 2017-06-11 Jason Merrill <jason@redhat.com>
2009 * c-ada-spec.c, c-pragma.c: Use id_equal.
2011 2017-06-04 Marek Polacek <polacek@redhat.com>
2014 * c-format.c (matching_type_p): Return false if any of the types
2015 requires structural equality.
2017 2017-06-02 Martin Sebor <msebor@redhat.com>
2020 * c-warn.c (conversion_warning): Use -Wconversion for integer
2021 conversion and -Wfloat-conversion for floating one.
2023 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2025 * c.opt (Wsizeof-pointer-div): New warning option.
2027 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2029 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2030 (Wcatch-value=1): Enable by -Wall.
2032 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2034 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2036 * c.opt (fdiagnostics-show-template-tree): New option.
2037 (felide-type): New option.
2039 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2041 * c.opt (Wcatch-value=): New C++ warning flag.
2043 2017-05-24 Nathan Sidwell <nathan@acm.org>
2045 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2046 const casts to avoid warning.
2048 2017-05-24 Martin Sebor <msebor@redhat.com>
2051 * c-common.h (unsafe_conversion_p): Add a function argument.
2052 * c-common.c (unsafe_conversion_p): Same.
2053 Add type names and values to diagnostics.
2054 (scalar_to_vector): Adjust.
2055 * c-warn.c (constant_expression_error): Add a function argument.
2056 Add type names and values to diagnostics.
2057 (conversion_warning): Add a function argument.
2058 Add type names and values to diagnostics.
2059 (warnings_for_convert_and_check): Same.
2061 2017-05-19 Jason Merrill <jason@redhat.com>
2063 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2066 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2068 * c-format.c (locus): Move out of function scope,
2071 2017-05-19 Nathan Sidwell <nathan@acm.org>
2073 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2074 (c_common_parse_file): Remove class dump handling.
2075 (get_dump_info): Likewise.
2077 2017-05-19 Richard Biener <rguenther@suse.de>
2080 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2081 to alias-set zero memory.
2083 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2085 * c-format.c (local_tree_type_node): Add GTY attribute.
2087 2017-05-18 Marek Polacek <polacek@redhat.com>
2089 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2090 (c_common_fixed_point_type_for_size): Likewise.
2091 (c_common_type_for_mode): Likewise.
2092 (shorten_compare): Likewise.
2093 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2094 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2096 2017-05-18 Marek Polacek <polacek@redhat.com>
2098 * c-common.c (self_promoting_args_p): Change the return type to bool.
2099 Use false/true instead of 0/1.
2100 * c-common.h (self_promoting_args_p): Update.
2102 2017-05-17 Marek Polacek <polacek@redhat.com>
2104 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2105 * c-warn.c: Likewise.
2107 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2109 Implement new C++ intrinsics __is_assignable and __is_constructible.
2110 * c-common.c (__is_assignable, __is_constructible): New.
2111 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2113 2017-05-17 Martin Liska <mliska@suse.cz>
2115 * c-common.h: Introduce dump_flags_t type and
2116 use it instead of int type.
2117 * c-gimplify.c (c_genericize): Likewise.
2118 * c-opts.c: Likewise.
2120 2017-05-17 Marek Polacek <polacek@redhat.com>
2122 * c-common.c (c_save_expr): Remove.
2123 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2124 * c-common.h (c_save_expr): Remove declaration.
2126 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2129 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2130 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2131 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2132 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2134 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2136 2017-05-09 Marek Polacek <polacek@redhat.com>
2139 * c-warn.c (unwrap_c_maybe_const): New.
2140 (warn_logical_operator): Call it.
2142 2017-05-09 Nathan Sidwell <nathan@acm.org>
2144 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2145 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2147 2017-05-08 Martin Sebor <msebor@redhat.com>
2149 PR translation/80280
2150 * c-format.h (struct format_flag_spec): Add new member.
2152 * c-format.c (local_tree_type_node): New global.
2153 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2154 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2155 (strfmon_flag_specs): Likewise.
2156 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2157 with distinct quoting properties.
2158 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2159 (flag_chars_t::validate): Add argument and handle bad quoting.
2160 (check_format_info_main): Handle quoting problems.
2161 (init_dynamic_diag_info): Simplify.
2163 2017-05-08 Jason Merrill <jason@redhat.com>
2165 * c-opts.c (c_common_post_options): Update defaults for
2166 flag_abi_version and flag_abi_compat_version.
2168 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2170 * c-common.c (c_cpp_error): Replace report_diagnostic
2171 with diagnostic_report_diagnostic.
2173 2017-05-04 Martin Sebor <msebor@redhat.com>
2175 PR translation/80280
2176 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2177 (handle_weakref_attribute): Same.
2179 2017-05-03 Nathan Sidwell <nathan@acm.org>
2181 Canonicalize canonical type hashing
2182 * c-common.c (complete_array_type): Use type_hash_canon.
2184 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2187 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2189 (cilk_install_body_pedigree_operations): Likewise.
2190 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2192 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2193 (cilk_install_body_pedigree_operations): Likewise.
2194 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2197 2017-04-27 Jakub Jelinek <jakub@redhat.com>
2200 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2201 flag on non-aggregate element types.
2203 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2205 * c-common.c (c_type_hasher, type_hash_table): Remove.
2206 (c_common_get_alias_set): Remove unreachable code.
2207 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2209 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2211 * c.opt (Wextra-semi): New C++ warning flag.
2213 2017-04-20 Jakub Jelinek <jakub@redhat.com>
2216 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2218 2017-04-18 Jakub Jelinek <jakub@redhat.com>
2222 * c-common.c (c_common_type_for_mode): Don't handle
2223 widest_*_literal_type_node here.
2224 c_common_signed_or_unsigned_type): Likewise.
2225 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2226 to *intTI_type_node or *intDI_type_node depending on whether
2227 TImode is supported by the target or not.
2229 2017-04-10 Martin Liska <mliska@suse.cz>
2232 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2233 doing an UBSAN check.
2235 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2237 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2239 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2242 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2244 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2245 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2248 2017-03-31 David Malcolm <dmalcolm@redhat.com>
2250 PR documentation/78732
2251 * c.opt (Wendif-labels): Fix description to refer to
2252 #else rather than #elif.
2254 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2257 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2258 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2260 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2263 * c-common.c (c_common_mark_addressable_vec): Don't set
2264 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2266 2017-03-21 Martin Sebor <msebor@redhat.com>
2269 * c-common.c (set_underlying_type): Mark type used only when
2270 original del is declared unused.
2272 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2274 PR translation/79848
2275 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2278 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2281 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2282 from inform's message, so that xgettext can locate it.
2284 2017-03-09 Marek Polacek <polacek@redhat.com>
2288 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2289 conversion to the attribute list.
2291 2017-03-09 Martin Liska <mliska@suse.cz>
2293 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2295 2017-03-03 Jason Merrill <jason@redhat.com>
2297 * c.opt (Wnoexcept-type): New.
2299 2017-03-02 Richard Biener <rguenther@suse.de>
2302 * c-common.c (c_common_mark_addressable_vec): Look through
2305 2017-02-28 Martin Liska <mliska@suse.cz>
2307 * c.opt: Replace space with tabular for options of <number>
2310 2017-02-28 Martin Liska <mliska@suse.cz>
2312 * c.opt: Fix --help=option -Q for options which are of
2315 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2318 * c-common.c (check_function_restrict): New function.
2319 (check_function_arguments): Add FNDECL argument. Call
2320 check_function_restrict if -Wrestrict.
2321 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2322 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2323 * c-common.h (check_function_arguments): Add FNDECL argument.
2324 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2326 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2328 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2329 treatment of parameters with pointer-to-tagged type and tidy up.
2330 (print_ada_methods): Remove the special treatment of C++ static member
2333 2017-02-22 Martin Liska <mliska@suse.cz>
2335 * c.opt: Replace inequality signs with square brackets
2338 2017-02-21 Jakub Jelinek <jakub@redhat.com>
2341 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2344 2017-02-17 Joseph Myers <joseph@codesourcery.com>
2346 * c-cppbuiltin.c (builtin_define_float_constants): Define
2347 __DECIMAL_DIG__ to the value for long double.
2349 2017-02-15 Marek Polacek <polacek@redhat.com>
2352 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2353 conversion has occured.
2355 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2357 * c-common.c (c_common_reswords): Add "__RTL".
2358 * c-common.h (enum rid): Add RID_RTL.
2360 2017-01-20 Marek Polacek <polacek@redhat.com>
2363 * c-common.h (do_warn_duplicated_branches_r): Declare.
2364 * c-gimplify.c (c_genericize): Walk the function tree calling
2365 do_warn_duplicated_branches_r.
2366 * c-warn.c (expr_from_macro_expansion_r): New.
2367 (do_warn_duplicated_branches): New.
2368 (do_warn_duplicated_branches_r): New.
2369 * c.opt (Wduplicated-branches): New option.
2371 2017-01-17 David Malcolm <dmalcolm@redhat.com>
2374 * c-indentation.c (warn_for_misleading_indentation): Use the past
2375 subjunctive in the note.
2377 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
2380 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2381 start type to integer_type.
2383 2017-01-16 Jakub Jelinek <jakub@redhat.com>
2386 * c.opt (gen-decls): Add Driver flag.
2388 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2391 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2394 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2396 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2399 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2401 2017-01-12 Martin Sebor <msebor@redhat.com>
2403 (-Wformat-overflow): ...to this.
2405 2017-01-11 Martin Sebor <msebor@redhat.com>
2408 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2409 Also enable for LTO.
2411 2017-01-10 Jason Merrill <jason@redhat.com>
2413 Implement P0195R2, C++17 variadic using.
2414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2416 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2418 PR translation/79019
2419 PR translation/79020
2420 * c.opt (Wnormalized=): Fix typo in description.
2422 2017-01-08 Martin Sebor <msebor@redhat.com>
2425 * c.opt (-Wformat-truncation): New option.
2427 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2429 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2430 value to unsigned short to fit in 4 hex digits without
2433 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2435 * c.opt (fsso-struct): Add 'native' value.
2437 2017-01-05 Martin Liska <mliska@suse.cz>
2440 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2443 2017-01-04 Marek Polacek <polacek@redhat.com>
2446 * c.opt (Wpointer-compare): New option.
2448 2017-01-04 Jakub Jelinek <jakub@redhat.com>
2451 * c.opt (fsso-struct=): Add RejectNegative.
2453 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2455 Update copyright years.
2457 2016-12-29 Martin Liska <mliska@suse.cz>
2460 * c.opt (strong-eval-order): Add RejectNegative keyword.
2462 2016-12-22 Jason Merrill <jason@redhat.com>
2464 Implement P0522R0, matching of template template arguments.
2465 * c-cppbuiltin.c (c_cpp_builtins): Define
2466 __cpp_template_template_args.
2468 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2471 * c-common.c (struct nonnull_arg_ctx): New type.
2472 (check_function_nonnull): Return bool instead of void. Use
2473 nonnull_arg_ctx as context rather than just location_t.
2474 (check_nonnull_arg): Adjust for the new context type, set
2475 warned_p to true if a warning has been diagnosed.
2476 (check_function_arguments): Return bool instead of void.
2477 * c-common.h (check_function_arguments): Adjust prototype.
2479 2016-12-21 Jason Merrill <jason@redhat.com>
2481 * c.opt (-fnew-ttp-matching): New flag.
2482 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2484 2016-12-14 Martin Jambor <mjambor@suse.cz>
2486 * c-omp.c: Include omp-general.h instead of omp-low.h.
2487 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2490 2016-12-14 Martin Sebor <msebor@redhat.com>
2493 * c-common.c (check_nonnull_arg): Disable when optimization
2496 2016-12-12 Marek Polacek <polacek@redhat.com>
2499 * c-common.c (attribute_fallthrough_p): Return false for
2502 2016-12-08 Martin Sebor <msebor@redhat.com>
2505 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2507 2016-12-08 Martin Sebor <msebor@redhat.com>
2510 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2513 2016-12-07 Martin Sebor <msebor@redhat.com>
2519 * c.opt (-Wstringop-overflow): New option.
2521 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2523 * c-attribs.c (asan odr indicator): New attribute.
2524 (handle_asan_odr_indicator_attribute): New function.
2526 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2528 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2531 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2533 * c-common.c (excess_precision_mode_join): New.
2534 (c_ts18661_flt_eval_method): New.
2535 (c_c11_flt_eval_method): Likewise.
2536 (c_flt_eval_method): Likewise.
2537 * c-common.h (excess_precision_mode_join): New.
2538 (c_flt_eval_method): Likewise.
2539 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2540 (cpp_iec_559_value): Call it.
2541 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2542 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2543 __FLT_EVAL_METHOD_TS_18661_3__.
2545 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2547 * c-opts.c (c_common_post_options): Add logic to handle the default
2548 case for -fpermitted-flt-eval-methods.
2550 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2552 * c.opt (Wexpansion-to-defined): New.
2554 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2557 * c-pragma.c (handle_pragma_target): Don't replace
2558 current_target_pragma, but chainon the new args to the current one.
2560 2016-11-22 Nathan Sidwell <nathan@acm.org>
2562 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2563 indentation and formatting.
2565 2016-11-21 Martin Sebor <msebor@redhat.com>
2567 * c.opt (-fprintf-return-value): Enable by default.
2569 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2572 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2573 * c-common.c (c_common_nodes_and_builtins): Initialize
2574 const_tm_ptr_type_node.
2576 2016-11-16 Marek Polacek <polacek@redhat.com>
2579 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2581 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2583 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2585 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2586 Richard Biener <rguenther@suse.de>
2588 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2589 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2590 * c.opt (fgimple): New option.
2592 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2595 * c-common.h (warn_for_restrict): Declare.
2596 * c-warn.c: Include gcc-rich-location.h.
2597 (warn_for_restrict): New function.
2598 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2599 (gcc_cdiag_char_table): Likewise.
2600 (gcc_cxxdiag_char_table): Likewise.
2601 * c.opt (Wrestrict): New option.
2603 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2605 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2606 for nested types only if the type is a record or union and dump SLOC.
2608 2016-11-09 Jason Merrill <jason@redhat.com>
2610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2612 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2614 * c-ubsan.c (ubsan_instrument_shift): Handle split
2615 -fsanitize=shift-base and -fsanitize=shift-exponent.
2617 2016-11-07 Jason Merrill <jason@redhat.com>
2619 * c.opt (Wc++1z-compat): New.
2620 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2622 2016-11-07 Martin Liska <mliska@suse.cz>
2624 * c-warn.c (warn_for_unused_label): Save all labels used
2625 in goto or in &label.
2627 2016-11-03 Jason Merrill <jason@redhat.com>
2629 * c-cppbuiltin.c (c_cpp_builtins): Correct
2630 __cpp_inheriting_constructors.
2632 2016-11-01 Jason Merrill <jason@redhat.com>
2634 * c-cppbuiltin.c (c_cpp_builtins): Update
2635 __cpp_inheriting_constructors.
2637 * c.opt (-fnew-inheriting-ctors): New.
2638 * c-opts.c: Default to on for ABI 11+.
2640 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2643 * c.opt (fext-numeric-literals): Add Var and Init.
2644 * c-opts.c (c_common_handle_option): Don't clear
2645 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2646 (c_common_post_options): Clear it here if not set
2649 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2652 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2655 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2657 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2658 * c-common.c (c_common_reswords): Add __builtin_launder.
2660 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2662 * c-common.c (c_common_truthvalue_conversion): Warn for
2663 multiplications in boolean context. Fix the quoting of '<<' and '<'
2664 in the shift warning.
2666 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2668 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2670 2016-10-20 Jason Merrill <jason@redhat.com>
2672 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2674 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2676 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2677 integer shift ops in boolean context.
2679 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2681 * c.opt (Walloca): New.
2682 (Walloca-larger-than=): New.
2683 (Wvla-larger-than=): New.
2685 2016-10-17 Marek Polacek <polacek@redhat.com>
2687 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2688 Return immediately when finding a match.
2689 (warn_tautological_cmp): Remove a boolean variable that is no longer
2692 2016-10-17 Marek Polacek <polacek@redhat.com>
2694 * c-attribs.c: New file.
2695 * c-common.c: Move attributes handling to c-attribs.c.
2696 (get_nonnull_operand): No longer static.
2697 * c-common.h: Move the declarations from c-attribs.c to its own section.
2699 2016-10-14 Jason Merrill <jason@redhat.com>
2701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2702 and __cpp_deduction_guides.
2704 2016-10-13 Jason Merrill <jason@redhat.com>
2706 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2708 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2710 * c-cppbuiltin.c: Include memmodel.h.
2711 * c-opts.c: Likewise.
2712 * c-pragma.c: Likewise.
2713 * c-warn.c: Likewise.
2715 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2717 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2718 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2719 * c-opts.c (sanitize_cpp_opts): Initialize
2720 cpp_opts->cpp_warn_implicit_fallthrough.
2722 2016-10-11 Marek Polacek <polacek@redhat.com>
2724 * c-common.c (warning_candidate_p): Change the return type to bool
2725 and return true/false instead of 1/0.
2726 (vector_mode_valid_p): Likewise.
2728 2016-10-11 Marek Polacek <polacek@redhat.com>
2730 * c-common.c (fold_for_warn): No longer static.
2731 (bool_promoted_to_int_p): Likewise.
2732 (c_common_get_narrower): Likewise.
2733 (constant_expression_warning): Move to c-warn.c.
2734 (constant_expression_error): Likewise.
2735 (overflow_warning): Likewise.
2736 (warn_logical_operator): Likewise.
2737 (find_array_ref_with_const_idx_r): Likewise.
2738 (warn_tautological_cmp): Likewise.
2739 (expr_has_boolean_operands_p): Likewise.
2740 (warn_logical_not_parentheses): Likewise.
2741 (warn_if_unused_value): Likewise.
2742 (strict_aliasing_warning): Likewise.
2743 (sizeof_pointer_memaccess_warning): Likewise.
2744 (check_main_parameter_types): Likewise.
2745 (conversion_warning): Likewise.
2746 (warnings_for_convert_and_check): Likewise.
2747 (match_case_to_enum_1): Likewise.
2748 (match_case_to_enum): Likewise.
2749 (c_do_switch_warnings): Likewise.
2750 (warn_for_omitted_condop): Likewise.
2751 (readonly_error): Likewise.
2752 (lvalue_error): Likewise.
2753 (invalid_indirection_error): Likewise.
2754 (warn_array_subscript_with_type_char): Likewise.
2755 (warn_about_parentheses): Likewise.
2756 (warn_for_unused_label): Likewise.
2757 (warn_for_div_by_zero): Likewise.
2758 (warn_for_memset): Likewise.
2759 (warn_for_sign_compare): Likewise.
2760 (do_warn_double_promotion): Likewise.
2761 (do_warn_unused_parameter): Likewise.
2762 (record_locally_defined_typedef): Likewise.
2763 (maybe_record_typedef_use): Likewise.
2764 (maybe_warn_unused_local_typedefs): Likewise.
2765 (maybe_warn_bool_compare): Likewise.
2766 (maybe_warn_shift_overflow): Likewise.
2767 (warn_duplicated_cond_add_or_warn): Likewise.
2768 (diagnose_mismatched_attributes): Likewise.
2769 * c-common.h: Move the declarations from c-warn.c to its own section.
2770 * c-warn.c: New file.
2772 2016-10-08 Jason Merrill <jason@redhat.com>
2774 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2775 into COND_EXPR in C++.
2777 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2779 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2780 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2781 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2783 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2785 Implement LWG2296 helper intrinsic
2786 * c-common.h (enum rid): Add RID_ADDRESSOF.
2787 * c-common.c (c_common_reswords): Add __builtin_addressof.
2789 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2792 * c-common.c (c_common_truthvalue_conversion): Warn also for
2793 suspicious enum values in boolean context.
2795 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2797 Implement P0258R2 - helper for C++17
2798 std::has_unique_object_representations trait
2799 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2800 * c-common.c (c_common_reswords): Add
2801 __has_unique_object_representations.
2803 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2806 * c-ubsan.c (ubsan_instrument_return): Don't call
2807 initialize_sanitizer_builtins here.
2809 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2811 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2812 conditional expression in boolean context when only one arm is
2815 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2818 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2821 * c-common.c (c_common_reswords): Update comment for C++11.
2823 2016-10-04 Jason Merrill <jason@redhat.com>
2825 * c-common.c (make_tree_vector_from_ctor): New.
2826 * c-common.h: Declare it.
2828 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2830 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2831 __LIBGCC_JCR_SECTION_NAME__.
2833 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2835 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2836 left shift in boolean context.
2838 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2840 Implement P0001R1 - C++17 removal of register storage class specifier
2841 * c.opt (Wregister): New warning.
2842 * c-opts.c (c_common_post_options): Enable -Wregister by
2845 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2847 * c-opts.c (c_common_post_options): Remove special case for
2848 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2851 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2853 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2856 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2858 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2860 * c-common.c: Include memmodel.h.
2862 2016-09-26 Marek Polacek <polacek@redhat.com>
2864 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2866 2016-09-26 Marek Polacek <polacek@redhat.com>
2869 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2870 (handle_fallthrough_attribute): New function.
2871 (attribute_fallthrough_p): New function.
2872 * c-common.h (attribute_fallthrough_p): Declare.
2874 2016-09-24 Marek Polacek <polacek@redhat.com>
2877 * c.opt (Wbool-operation): New.
2879 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2881 * c-common.c (c_common_truthvalue_conversion): Inhibit
2882 Wint-in-bool-context warning with from_macro_definition_at.
2883 Mention the expression will always evaluate to true.
2885 2016-09-21 Martin Sebor <msebor@redhat.com>
2888 * c.opt (fprintf-return-value): Temporarily initialize to zero
2889 to unblock bootstrap failures.
2891 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2894 * c.opt (Waligned-new=): Add RejectNegative.
2895 (faligned-new=): Likewise. Spelling fix - change
2896 aligned_new_threshhold to aligned_new_threshold.
2897 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2898 to aligned_new_threshold.
2900 2016-09-20 Martin Sebor <msebor@redhat.com>
2903 * c.opt: Add -Wformat-length and -fprintf-return-value.
2905 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2908 * c.opt (Wint-in-bool-context): New warning.
2909 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2910 constants in boolean context.
2912 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2914 * c-common.c (max_align_t_align): Also consider alignment of
2917 2016-09-15 Jason Merrill <jason@redhat.com>
2919 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2922 2016-09-14 Jason Merrill <jason@redhat.com>
2924 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2925 limit FIELD_DECL, either.
2927 2016-09-14 Marek Polacek <polacek@redhat.com>
2929 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2930 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2931 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2933 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2935 * c-common.c (warn_logical_not_parentheses): Replace
2936 rich_location::add_fixit_insert calls with add_fixit_insert_before
2937 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2939 2016-09-13 Jason Merrill <jason@redhat.com>
2940 Tom de Vries <tom@codesourcery.com>
2943 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2945 2016-09-13 Jason Merrill <jason@redhat.com>
2947 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2950 2016-09-12 Jason Merrill <jason@redhat.com>
2952 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2953 bit/byte confusion, allow large alignment for types.
2955 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2958 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2960 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2963 * c-format.c (argument_parser::check_argument_type): Add params
2964 "type_start" and "conversion_char". Use the former to generate
2965 offset_to_type_start and pass it and conversion_char to
2967 (check_format_info_main): Capture the start of the type
2968 information as "type_start", and pass it an format_char
2969 to arg_parser.check_argument_type.
2970 (check_format_types): Provide an example in the leading comment.
2971 Add params "offset_to_type_start" and "conversion_char"; pass
2972 them to format_type_warning calls.
2973 (test_get_modifier_for_format_len): Likewise.
2974 (matching_type_p): New function.
2975 (get_format_for_type): Add param "conversion_char" and move
2976 implementation into...
2977 (get_format_for_type_1): ...new function, called twice.
2978 Use new function matching_type_p rather than checking for
2979 TYPE_CANONICAL equality.
2980 (get_corrected_substring): New function.
2981 (format_type_warning): Provide an example in the leading comment.
2982 Add params "offset_to_type_start" and "conversion_char". Replace
2983 call to get_format_for_type with call to get_corrected_substring
2984 and move rejection of hints for widths/precisions there.
2985 (assert_format_for_type_streq): Add param "conversion_char".
2986 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2987 (test_get_format_for_type_printf): Add conversion chars to the
2988 tests, adding coverage for various combinations of integer
2989 vs double conversions, and for preserving octal and hexadecimal
2991 (test_get_format_for_type_scanf): Add conversion chars to the
2994 2016-09-10 Tom de Vries <tom@codesourcery.com>
2997 * c-common.c (build_va_arg): Handle more strict
2998 targetm.canonical_va_list_type. Replace first argument type error with
3001 2016-09-09 Martin Sebor <msebor@redhat.com>
3005 * c-format.c (argument_parser::find_format_char_info): Use %qc
3006 format directive unconditionally.
3008 2016-09-09 Jason Merrill <jason@redhat.com>
3010 Implement C++17 new of over-aligned types.
3011 * c.opt: Add -faligned-new and -Waligned-new.
3012 * c-common.c (max_align_t_align): Split out from...
3013 (cxx_fundamental_alignment_p): ...here.
3014 * c-common.h: Declare it.
3015 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3017 2016-09-09 Joseph Myers <joseph@codesourcery.com>
3019 * c-cppbuiltin.c (builtin_define_type_width): New function.
3020 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3023 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3025 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3027 (substring_loc::get_location): Move to substring-locations.c,
3028 keeping implementation as...
3029 (c_get_substring_location): New function, from the above, reworked
3030 to use accessors rather than member lookup.
3031 * c-common.h (class substring_loc): Move to substring-locations.h,
3032 replacing with a forward decl.
3033 (c_get_substring_location): New decl.
3034 * c-format.c: Include "substring-locations.h".
3035 (format_warning_va): Move to substring-locations.c.
3036 (format_warning_at_substring): Likewise.
3038 2016-09-06 Martin Sebor <msebor@redhat.com>
3041 * c-format.c (check_function_format): Avoid issuing warnings for
3042 functions unless they call format functions with non-constant
3045 2016-09-06 Richard Biener <rguenther@suse.de>
3048 * c-common.c (c_common_mark_addressable_vec): Handle
3049 COMPOUND_LITERAL_EXPR.
3051 2016-09-05 Marek Polacek <polacek@redhat.com>
3054 * c-common.c (bool_promoted_to_int_p): New function.
3055 (expr_has_boolean_operands_p): New function.
3056 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3057 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3059 2016-09-04 Tom de Vries <tom@codesourcery.com>
3062 2016-08-29 Tom de Vries <tom@codesourcery.com>
3064 * c-common.c (build_va_arg): Replace first argument type error
3067 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3070 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3071 (c_finish_omp_for): Reject _Atomic qualified iterators.
3073 2016-09-01 Martin Sebor <msebor@redhat.com>
3075 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3076 size to guarantee it fits the output of the formatted function
3077 regardless of its arguments.
3079 2016-09-01 Marek Polacek <polacek@redhat.com>
3082 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3085 2016-08-29 Marek Polacek <polacek@redhat.com>
3088 * c-common.c (warn_logical_not_parentheses): Don't warn for
3089 a comparison or a logical operator.
3091 2016-08-29 Tom de Vries <tom@codesourcery.com>
3093 * c-common.c (build_va_arg): Fix type comparison assert.
3095 2016-08-29 Tom de Vries <tom@codesourcery.com>
3097 * c-common.c (build_va_arg): Replace first argument type error
3100 2016-08-29 Tom de Vries <tom@codesourcery.com>
3103 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3104 with error_mark_node as va_list instead of with illegal va_list.
3106 2016-08-25 Marek Polacek <polacek@redhat.com>
3107 David Malcolm <dmalcolm@redhat.com>
3109 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3110 * c-common.h (warn_logical_not_parentheses): Update declaration.
3112 2016-08-22 Marek Polacek <polacek@redhat.com>
3115 * c-common.c (warn_for_memset): Check type for null.
3117 2016-08-22 Joseph Myers <joseph@codesourcery.com>
3119 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
3120 _FloatNx types for suffixes for built-in functions.
3122 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3125 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3126 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3127 (RID_FLOAT128X): New enum rid values.
3128 (CASE_RID_FLOATN_NX): New macro.
3129 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3131 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3132 corresponding complex types.
3133 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3134 _FloatNx and corresponding complex types.
3135 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3136 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3137 and _FloatNx types for the widest type for determining
3138 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3139 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3140 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3142 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3144 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3147 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3149 * c-opts.c (c_diagnostic_finalizer): Update for change to
3150 diagnostic_show_locus.
3152 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3154 * c-common.c: Include "spellcheck.h".
3155 (cb_get_suggestion): New function.
3156 * c-common.h (cb_get_suggestion): New decl.
3157 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3160 2016-08-18 Marek Polacek <polacek@redhat.com>
3163 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3166 2016-08-16 David Malcolm <dmalcolm@redhat.com>
3169 * c-common.c (substring_loc::get_range): Rename to...
3170 (substring_loc::get_location): ...this, converting param from a
3171 source_range * to a location_t *. Call
3172 get_source_location_for_substring rather than
3173 get_source_range_for_substring, and pass in m_caret_idx.
3174 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3175 (substring_loc::get_range): Replace with...
3176 (substring_loc::get_location): ...this.
3177 (substring_loc::set_caret_index): New method.
3178 (substring_loc): Add field m_caret_idx.
3179 * c-format.c (format_warning_va): Update for above changes.
3180 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3181 clashing with type name.
3182 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3183 (check_argument_type): Likewise.
3184 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3185 Use a copy when emitting warnings, setting the caret index from TYPE.
3187 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
3188 Arnaud Charlet <charlet@adacore.com>
3190 * c-ada-spec.c (dump_number): New function.
3191 (handle_escape_character): Likewise.
3192 (print_ada_macros): Add handling of constant integers and strings.
3194 2016-08-12 Marek Polacek <polacek@redhat.com>
3197 * c-common.c (scalar_to_vector): Adjust fall through comment.
3198 * c-opts.c (c_common_handle_option): Likewise.
3199 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3200 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3201 fall through comment.
3202 * cilk.c (extract_free_variables): Add FALLTHRU.
3204 2016-08-10 Jason Merrill <jason@redhat.com>
3206 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3208 2016-08-09 Jason Merrill <jason@redhat.com>
3210 * c-common.c (c_common_attribute_table): vector_size affects type
3213 2016-08-09 Marek Polacek <polacek@redhat.com>
3216 * c-ada-spec.c (dump_generic_ada_node): Add return.
3218 2016-08-09 Jason Merrill <jason@redhat.com>
3220 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3221 C++17 constexpr lambdas.
3223 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3226 * c-common.h (selftest::c_format_c_tests): New declaration.
3227 (selftest::run_c_tests): New declaration.
3228 * c-format.c: Include "selftest.h.
3229 (format_warning_va): Add param "corrected_substring" and use
3230 it to add a replacement fix-it hint.
3231 (format_warning_at_substring): Likewise.
3232 (format_warning_at_char): Update for new param of
3234 (argument_parser::check_argument_type): Pass "fki" to
3236 (check_format_types): Add param "fki" and pass it to
3237 format_type_warning.
3238 (deref_n_times): New function.
3239 (get_modifier_for_format_len): New function.
3240 (selftest::test_get_modifier_for_format_len): New function.
3241 (get_format_for_type): New function.
3242 (format_type_warning): Add param "fki" and use it to attempt
3243 to provide hints for argument types when calling
3244 format_warning_at_substring.
3245 (selftest::get_info): New function.
3246 (selftest::assert_format_for_type_streq): New function.
3247 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3248 (selftest::test_get_format_for_type_printf): New function.
3249 (selftest::test_get_format_for_type_scanf): New function.
3250 (selftest::c_format_c_tests): New function.
3252 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3255 * c-format.c: Include "diagnostic.h".
3256 (location_column_from_byte_offset): Delete.
3257 (location_from_offset): Delete.
3258 (format_warning_va): New function.
3259 (format_warning_at_substring): New function.
3260 (format_warning_at_char): New function.
3261 (check_format_arg): Capture location of format_tree and pass to
3262 check_format_info_main.
3263 (argument_parser): Add fields "start_of_this_format" and
3264 "format_string_cst".
3265 (flag_chars_t::validate): Add param "format_string_cst". Convert
3266 warning_at call using location_from_offset to call to
3267 format_warning_at_char.
3268 (argument_parser::argument_parser): Add param "format_string_cst_"
3269 and use use it to initialize field "format_string_cst".
3270 Initialize new field "start_of_this_format".
3271 (argument_parser::read_format_flags): Convert warning_at call
3272 using location_from_offset to a call to format_warning_at_char.
3273 (argument_parser::read_any_format_left_precision): Likewise.
3274 (argument_parser::read_any_format_precision): Likewise.
3275 (argument_parser::read_any_other_modifier): Likewise.
3276 (argument_parser::find_format_char_info): Likewise, in three places.
3277 (argument_parser::parse_any_scan_set): Likewise, in one place.
3278 (argument_parser::handle_conversions): Likewise, in two places.
3279 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3280 and use it to make a substring_loc. Pass the latter to
3282 (check_format_info_main): Add params "fmt_param_loc" and
3283 "format_string_cst". Convert warning_at calls using
3284 location_from_offset to calls to format_warning_at_char. Pass the
3285 new params to the arg_parser ctor. Pass "format_string_cst" to
3286 flag_chars.validate. Pass "fmt_param_loc" to
3287 arg_parser.check_argument_type.
3288 (check_format_types): Convert first param from a location_t
3289 to a const substring_loc & and rename to "fmt_loc". Attempt
3290 to extract the range of the relevant parameter and pass it
3291 to format_type_warning.
3292 (format_type_warning): Convert first param from a location_t
3293 to a const substring_loc & and rename to "fmt_loc". Add
3294 params "param_range" and "type". Replace calls to warning_at
3295 with calls to format_warning_at_substring.
3297 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3299 * c-format.c (class flag_chars_t): New class.
3300 (struct length_modifier): New struct.
3301 (class argument_parser): New class.
3302 (flag_chars_t::flag_chars_t): New ctor.
3303 (flag_chars_t::has_char_p): New method.
3304 (flag_chars_t::add_char): New method.
3305 (flag_chars_t::validate): New method.
3306 (flag_chars_t::get_alloc_flag): New method.
3307 (flag_chars_t::assignment_suppression_p): New method.
3308 (argument_parser::argument_parser): New ctor.
3309 (argument_parser::read_any_dollar): New method.
3310 (argument_parser::read_format_flags): New method.
3311 (argument_parser::read_any_format_width): New method.
3312 (argument_parser::read_any_format_left_precision): New method.
3313 (argument_parser::read_any_format_precision): New method.
3314 (argument_parser::handle_alloc_chars): New method.
3315 (argument_parser::read_any_length_modifier): New method.
3316 (argument_parser::read_any_other_modifier): New method.
3317 (argument_parser::find_format_char_info): New method.
3318 (argument_parser::validate_flag_pairs): New method.
3319 (argument_parser::give_y2k_warnings): New method.
3320 (argument_parser::parse_any_scan_set): New method.
3321 (argument_parser::handle_conversions): New method.
3322 (argument_parser::check_argument_type): New method.
3323 (check_format_info_main): Introduce classes argument_parser
3324 and flag_chars_t, moving the code within the loop into methods
3325 of these classes. Make various locals "const".
3327 2016-08-05 David Malcolm <dmalcolm@redhat.com>
3329 * c-common.c: Include "substring-locations.h".
3330 (get_cpp_ttype_from_string_type): New function.
3331 (g_string_concat_db): New global.
3332 (substring_loc::get_range): New method.
3333 * c-common.h (g_string_concat_db): New declaration.
3334 (class substring_loc): New class.
3335 * c-lex.c (lex_string): When concatenating strings, capture the
3336 locations of all tokens using a new obstack, and record the
3337 concatenation locations within g_string_concat_db.
3338 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3341 2016-07-29 Marek Polacek <polacek@redhat.com>
3344 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3345 parentheses warning.
3348 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3350 2016-07-28 Martin Liska <mliska@suse.cz>
3352 PR gcov-profile/68025
3353 * c-common.c (handle_no_profile_instrument_function_attribute):
3355 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3357 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3360 2016-07-25 Jason Merrill <jason@redhat.com>
3363 * c.opt (fconstexpr-loop-limit): New.
3365 2016-07-22 Martin Sebor <msebor@redhat.com>
3368 * c-common.c (resolve_overloaded_builtin): Avoid converting
3369 __atomic_compare_exchange_n return type to that of what its
3370 first argument points to.
3372 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3374 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3375 ~(unsigned HOST_WIDE_INT) 0.
3377 2016-07-22 Martin Liska <mliska@suse.cz>
3379 PR gcov-profile/69028
3380 PR gcov-profile/62047
3381 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3382 to the current_function_decl.
3384 2016-07-21 Jason Merrill <jason@redhat.com>
3387 * c-common.c (c_common_truthvalue_conversion): Check
3388 c_inhibit_evaluation_warnings for warning about address of
3391 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3393 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3396 2016-07-15 Jason Merrill <jason@redhat.com>
3398 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3400 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3403 * c-common.h (enum lookup_name_fuzzy_kind): Add
3404 FUZZY_LOOKUP_FUNCTION_NAME.
3406 2016-07-08 Jason Merrill <jason@redhat.com>
3408 P0145: Refining Expression Order for C++.
3409 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3412 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3417 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3419 * c-pragma.h (enum pragma_kind): Rename
3420 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3423 2016-06-29 Richard Biener <rguenther@suse.de>
3426 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3428 2016-06-24 Jason Merrill <jason@redhat.com>
3430 P0145R2: Refining Expression Order for C++.
3431 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3434 2016-06-24 Jakub Jelinek <jakub@redhat.com>
3436 * c-common.c (check_builtin_function_arguments): Require last
3437 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3438 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3439 if the last argument is pointer to enumerated or boolean type.
3441 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3444 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3445 (lookup_name_fuzzy): New prototype.
3447 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
3449 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3451 2016-06-14 Jason Merrill <jason@redhat.com>
3453 P0145R2: Refining Expression Order for C++.
3454 * c.opt (fargs-in-order): New.
3455 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3457 2016-06-13 Jakub Jelinek <jakub@redhat.com>
3460 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3461 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3463 PR preprocessor/71183
3464 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3465 to cb_get_source_date_epoch.
3467 2016-06-10 Jakub Jelinek <jakub@redhat.com>
3470 * c.opt (Wpsabi): Add Warning flag.
3472 2016-06-10 Martin Sebor <msebor@redhat.com>
3475 * c-common.c (handle_nonnull_attribute): Accept
3476 the nonnull attribute in type-generic builtins.
3478 2016-06-09 Martin Sebor <msebor@redhat.com>
3481 * c-common.c (builtin_function_validate_nargs): Make text of error
3482 message consistent with others like it.
3484 2016-06-08 Martin Sebor <msebor@redhat.com>
3485 Jakub Jelinek <jakub@redhat.com>
3489 * c-common.c (check_builtin_function_arguments): Handle
3490 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3492 2016-06-08 Richard Biener <rguenther@suse.de>
3494 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3496 2016-06-07 Richard Biener <rguenther@suse.de>
3499 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3500 options and warn about others.
3502 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3504 * c-common.c (get_source_date_epoch): Rename to
3505 cb_get_source_date_epoch.
3506 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3507 message when the parsing fails. Use error_at instead of fatal_error.
3508 * c-common.h (get_source_date_epoch): Rename to
3509 cb_get_source_date_epoch.
3510 * c-common.h (cb_get_source_date_epoch): Prototype.
3511 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3512 * c-common.h (c_omp_region_type): Remove trailing comma.
3513 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3514 * c-lex.c (c_lex_with_flags): Remove initialization of
3515 pfile->source_date_epoch.
3517 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3520 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3521 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3522 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3523 instead of C_OMP_CLAUSE_SPLIT_FOR.
3525 2016-05-24 Richard Biener <rguenther@suse.de>
3529 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3530 (convert_vector_to_array_for_subscript): ... this.
3531 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3532 VIEW_CONVERT_EXPR to an array type. Rename to ...
3533 (convert_vector_to_array_for_subscript): ... this.
3535 2016-05-12 Marek Polacek <polacek@redhat.com>
3538 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3539 size_in_bytes and pass LOC to it.
3541 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3544 * c.opt (Wduplicate-decl-specifier): New option.
3546 2016-05-11 Marek Polacek <polacek@redhat.com>
3549 * c-common.c (diagnose_mismatched_attributes): New function.
3550 * c-common.h (diagnose_mismatched_attributes): Declare.
3552 2016-05-04 Marek Polacek <polacek@redhat.com>
3554 * c.opt (Wdangling-else): New option.
3556 2016-05-03 Marek Polacek <polacek@redhat.com>
3559 * c-common.c (builtin_function_validate_nargs): Add location
3561 (check_builtin_function_arguments): Add location and arguments
3562 parameters. Use them.
3563 * c-common.h (check_builtin_function_arguments): Update declaration.
3565 2016-05-03 Richard Biener <rguenther@suse.de>
3567 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3568 allow call args to gimplify to SSA names.
3570 2016-05-03 Marek Polacek <polacek@redhat.com>
3572 * c-common.h (enum c_omp_region_type): Remove stray comma.
3574 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3576 * c-common.h (enum c_omp_region_type): Define.
3578 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3580 * c-common.c (shorten_compare): Use wi::to_wide.
3582 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3585 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3586 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3587 reduction clauses in acc parallel loops.
3589 2016-04-29 Marek Polacek <polacek@redhat.com>
3592 * c-common.c (warn_for_memset): Check domain before accessing it.
3594 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3597 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3598 "aligned" attribute.
3600 2016-04-28 Jason Merrill <jason@redhat.com>
3602 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3604 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3605 Matthias Klose <doko@debian.org>
3607 * c-common.c (get_source_date_epoch): New function, gets the environment
3608 variable SOURCE_DATE_EPOCH and parses it as long long with error
3610 * c-common.h (get_source_date_epoch): Prototype.
3611 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3613 2015-04-27 Ryan Burn <contact@rnburn.com>
3617 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3618 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3620 (cilk_detect_and_unwrap): Corresponding changes.
3621 (extract_free_variables): Don't extract free variables from
3622 AGGR_INIT_EXPR slot.
3623 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3624 (cilk_recognize_spawn): Likewise.
3626 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3628 * c.opt (Wmemset-elt-size): New option.
3629 * c-common.c (warn_for_memset): New function.
3630 * c-common.h (warn_for_memset): Declare.
3632 2016-04-25 Jason Merrill <jason@redhat.com>
3634 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3636 * c-common.h: Declare it.
3637 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3639 2016-04-22 Jason Merrill <jason@redhat.com>
3641 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3643 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3646 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3647 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3649 2016-04-18 Michael Matz <matz@suse.de>
3651 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3654 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3656 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3657 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3658 to incomplete types.
3659 (dump_nested_type): Remove redundant tests and tidy up.
3660 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3661 a type which is the typedef of an original type.
3663 2016-04-15 Marek Polacek <polacek@redhat.com>
3666 * c-common.c (build_va_arg): Change two asserts into errors and return
3669 2016-04-13 Marek Polacek <polacek@redhat.com>
3672 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3673 for switch statements, too.
3675 2016-03-28 Jason Merrill <jason@redhat.com>
3677 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3679 2016-03-23 Marek Polacek <polacek@redhat.com>
3682 * c.opt (Wignored-attributes): New option.
3684 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3687 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3688 diagnostic text, reversing the order of the warning and note so
3689 that they appear in source order.
3691 2016-03-17 Marek Polacek <polacek@redhat.com>
3694 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3697 2016-03-14 Jason Merrill <jason@redhat.com>
3699 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3701 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3703 2016-03-09 Richard Biener <rguenther@suse.de>
3706 * c-common.c (strict_aliasing_warning): Add back
3707 alias_sets_conflict_p check.
3709 2016-03-08 Jason Merrill <jason@redhat.com>
3711 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3713 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3716 * c-indentation.c (get_visual_column): Move code to determine next
3718 (next_tab_stop): ...this new function.
3719 (line_contains_hash_if): Delete function.
3720 (detect_preprocessor_logic): Delete function.
3721 (get_first_nws_vis_column): New function.
3722 (detect_intervening_unindent): New function.
3723 (should_warn_for_misleading_indentation): Replace call to
3724 detect_preprocessor_logic with a call to
3725 detect_intervening_unindent.
3727 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3730 * c-indentation.c (should_warn_for_misleading_indentation): When
3731 suppressing warnings about cases where the guard and body are on
3732 the same column, only use the first non-whitespace column in place
3733 of the guard token column when dealing with "else" clauses.
3734 When rejecting aligned BODY and NEXT, loosen the requirement
3735 from equality with the first non-whitespace of guard to simply
3736 that they not be indented relative to it.
3738 2016-03-04 Richard Biener <rguenther@suse.de>
3741 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3742 instead of alias_sets_conflict_p.
3744 2016-03-01 Marek Polacek <polacek@redhat.com>
3747 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3750 2016-02-22 Martin Sebor <msebor@redhat.com>
3753 * c-common.c (check_builtin_function_arguments): Validate and
3754 reject invalid arguments to __builtin_alloca_with_align.
3756 2016-02-20 Mark Wielaard <mjw@redhat.com>
3759 * c.opt (Wunused-const-variable): Turn into Alias for...
3760 (Wunused-const-variable=): New option.
3762 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3765 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3767 (c_common_init_options): ...to here.
3768 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3770 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3773 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3774 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3775 flag_preprocess_only.
3777 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3780 * c.opt (Wnonnull-compare): Enable for -Wall.
3782 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3785 * c-common.c (sync_resolve_size): Diagnose too few arguments
3786 even when params is non-NULL empty vector.
3788 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3791 * c.opt (fshort-double): Remove.
3793 2016-02-05 Martin Sebor <msebor@redhat.com>
3796 * c.opt (Warning options): Update -Wplacement-new to take
3797 an optional argument.
3799 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3801 PR preprocessor/69543
3803 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3804 instead of loc to control_warning_option.
3806 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3808 * c.opt (fopenacc-dim=): New option.
3810 2016-01-27 Ryan Burn <contact@rnburn.com>
3813 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3814 gimplify_arg. Removed superfluous post_p argument.
3815 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3816 superfluous post_p argument.
3817 * c-gimplify.c (c_gimplify_expr): Likewise.
3819 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3822 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3823 pp_newline_and_flush with pp_flush.
3825 2016-01-20 Martin Sebor <msebor@redhat.com>
3828 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3829 an incompatible argument when the argument isn't a valid tree node.
3831 2016-01-18 Jason Merrill <jason@redhat.com>
3834 * c-common.c (check_function_arguments_recurse): Fold the whole
3835 COND_EXPR, not just the condition.
3837 2016-01-18 Tom de Vries <tom@codesourcery.com>
3839 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3840 classify as loop clause.
3842 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3845 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3846 C++ FE no longer has limit on number of pragmas.
3848 2015-01-14 Ryan Burn <contact@rnburn.com>
3851 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3852 to add missing cleanup point.
3854 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3857 * c-indentation.c (get_visual_column): Add location_t param.
3858 Handle the column number being zero by effectively disabling the
3859 warning, with an "inform".
3860 (should_warn_for_misleading_indentation): Add location_t argument
3861 for all uses of get_visual_column.
3863 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3866 * c-indentation.c (should_warn_for_misleading_indentation):
3867 Don't warn about do-while statements.
3869 2016-01-07 Martin Sebor <msebor@redhat.com>
3872 * c-common.c (sync_resolve_size): Reject first argument when it's
3875 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3878 * c-indentation.c (get_visual_column): Remove default argument.
3879 (should_warn_for_misleading_indentation): For the multiline case,
3880 update call to get_visual_column for next_stmt_exploc so that it
3881 captures the location of the first non-whitespace character in the
3882 relevant line. Don't issue warnings if there is non-whitespace
3883 before the next statement.
3885 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3887 Update copyright years.
3889 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3891 * c-common.c (binary_op_error): Convert first param from
3892 location_t to rich_location * and use it when emitting an error.
3893 * c-common.h (binary_op_error): Convert first param from
3894 location_t to rich_location *.
3896 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3898 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3899 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3901 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3903 * c-common.c (c_common_attribute_table): Handle "omp declare target
3906 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3909 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3911 2014-12-12 Tobias Burnus <burnus@net-b.de>
3914 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3915 specifiers (%d, %i,%u and %c).
3917 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3919 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3921 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3925 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3926 * c-pragma.c (handle_pragma_diagnostic): Adjust
3927 control_warning_option caller.
3929 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3931 * c-common.c (c_cpp_error): Update for change to
3932 rich_location::set_range.
3934 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3936 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3937 shifting 1 out of the sign bit.
3939 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3941 * c-common.c (c_common_attribute_table[]): Update max arguments
3942 count for "simd" attribute.
3943 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3945 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3947 PR preprocessor/57580
3948 * c-ppoutput.c (print): Change printed field to bool.
3949 Move src_file last for smaller padding.
3950 (init_pp_output): Set print.printed to false instead of 0.
3951 (scan_translation_unit): Fix up formatting. Set print.printed
3952 to true after printing something other than newline.
3953 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3954 (maybe_print_line_1): Set print.printed to false instead of 0.
3955 (print_line_1): Likewise.
3956 (do_line_change): Set print.printed to true instead of 1.
3957 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3958 dump_macro): Set print.printed to false after printing newline.
3960 2015-12-02 Jason Merrill <jason@redhat.com>
3962 * c-common.c (fold_for_warn): New.
3963 (warn_logical_operator, warn_tautological_cmp)
3964 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3966 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3967 (c_fully_fold_internal, decl_constant_value_for_optimization):
3969 * c-common.h: Don't declare decl_constant_value_for_optimization.
3971 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3974 * c-common.h (c_build_qualified_type): Add extra default
3977 2015-12-01 Julian Brown <julian@codesourcery.com>
3978 Cesar Philippidis <cesar@codesourcery.com>
3979 James Norris <James_Norris@mentor.com>
3981 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3982 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3983 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3985 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3987 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3988 (decl_sloc_common): Delete and move bulk of processing to...
3989 (decl_sloc): ...here.
3990 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3991 (dump_ada_double_name): Remove S parameter and compute the suffix.
3992 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3993 element type and deal with an anonymous one.
3994 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3995 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3996 and remove reference to QUAL_UNION_TYPE.
3997 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3998 (dump_nested_type): ...here. New function extracted from above.
3999 Generate a full declaration for anonymous element type of arrays.
4000 (print_ada_declaration): Really skip anonymous declarations. Remove
4001 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4002 Clean up processing of declarations of array types and objects.
4003 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4004 Remove obsolete code and tidy up.
4006 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4009 * c-common.c (handle_transparent_union_attribute): Update
4012 2015-11-27 Martin Liska <mliska@suse.cz>
4015 * array-notation-common.c (cilkplus_extract_an_triplets):
4016 Release vector of vectors.
4017 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4019 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4022 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4023 (print_ada_struct_decl): Likewise.
4025 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4028 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4029 * cilk.c (recognize_spawn): Determine location in a more precise
4032 2015-11-19 Jason Merrill <jason@redhat.com>
4034 * c-common.c (shorten_compare): But look through macros from
4037 2015-11-18 Jason Merrill <jason@redhat.com>
4039 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4040 non-constant operand comes from a macro.
4042 2015-11-17 Jason Merrill <jason@redhat.com>
4045 * c-common.c (warn_tautological_cmp): Fold before checking for
4048 2015-11-16 Marek Polacek <polacek@redhat.com>
4051 * c-common.c (check_case_bounds): Fold low and high cases.
4053 2015-11-16 Marek Polacek <polacek@redhat.com>
4055 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4056 * c-common.c (c_common_get_alias_set): Likewise.
4057 (handle_visibility_attribute): Likewise.
4059 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4061 * c-common.c (handle_simd_attribute): New.
4062 (struct attribute_spec): Add entry for "simd".
4063 (handle_simd_attribute): New.
4065 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
4067 * c-lex.c (interpret_float): Use fold_convert.
4069 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4071 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4072 and store it on the result.
4073 * c-opts.c (c_common_init_options): Set
4074 global_dc->colorize_source_p.
4076 2015-11-12 James Norris <jnorris@codesourcery.com>
4077 Joseph Myers <joseph@codesourcery.com>
4079 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
4080 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4081 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4082 PRAGMA_OACC_CLAUSE_LINK.
4084 2015-11-11 Marek Polacek <polacek@redhat.com>
4088 * c-common.c (valid_array_size_p): New function.
4089 * c-common.h (valid_array_size_p): Declare.
4091 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4094 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4096 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4098 * array-notation-common.c: Remove unused header files.
4099 * c-ada-spec.c: Likewise.
4100 * c-cilkplus.c: Likewise.
4101 * c-common.c: Likewise.
4102 * c-cppbuiltin.c: Likewise.
4103 * c-dump.c: Likewise.
4104 * c-format.c: Likewise.
4105 * c-gimplify.c: Likewise.
4106 * c-indentation.c: Likewise.
4107 * c-lex.c: Likewise.
4108 * c-omp.c: Likewise.
4109 * c-opts.c: Likewise.
4110 * c-pch.c: Likewise.
4111 * c-ppoutput.c: Likewise.
4112 * c-pragma.c: Likewise.
4113 * c-pretty-print.c: Likewise.
4114 * c-semantics.c: Likewise.
4115 * c-ubsan.c: Likewise.
4117 * stub-objc.c: Likewise.
4119 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4120 Cesar Philippidis <cesar@codesourcery.com>
4121 James Norris <jnorris@codesourcery.com>
4122 Julian Brown <julian@codesourcery.com>
4123 Nathan Sidwell <nathan@codesourcery.com>
4125 * c-pragma.c (oacc_pragmas): Add "routine".
4126 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4128 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4130 * c-common.c (c_common_attributes): Add scalar_storage_order.
4131 (handle_scalar_storage_order_attribute): New function.
4132 * c-pragma.c (global_sso): New variable.
4133 (maybe_apply_pragma_scalar_storage_order): New function.
4134 (handle_pragma_scalar_storage_order): Likewise.
4135 (init_pragma): Register scalar_storage_order.
4136 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4137 * c.opt (Wscalar-storage-order): New warning.
4138 (fsso-struct=): New option.
4140 2015-11-08 Martin Sebor <msebor@redhat.com>
4142 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4144 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4146 * c-common.c: Don't undef DEF_BUILTIN.
4148 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4150 * c-common.c (c_cpp_error): Convert parameter from location_t to
4151 rich_location *. Eliminate the "column_override" parameter and
4152 the call to diagnostic_override_column.
4153 Update the "done_lexing" clause to set range 0
4154 on the rich_location, rather than overwriting a location_t.
4155 * c-common.h (c_cpp_error): Convert parameter from location_t to
4156 rich_location *. Eliminate the "column_override" parameter.
4158 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4159 Thomas Schwinge <thomas@codesourcery.com>
4160 James Norris <jnorris@codesourcery.com>
4162 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4163 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4164 clauses with parallel and kernels and loops.
4165 * c-pragma.h (enum pragma_omp_clause): Add entries for
4166 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4167 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4168 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4170 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4172 2015-11-05 Martin Sebor <msebor@redhat.com>
4175 * c.opt (-Wplacement-new): New option.
4177 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4179 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4180 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4181 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4182 save_expr or create_tmp_var* if TEST is true.
4183 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4184 Don't call add_stmt here.
4185 (struct c_omp_check_loop_iv_data): New type.
4186 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4187 c_omp_check_loop_iv_exprs): New functions.
4188 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4190 (c_omp_declare_simd_clauses_to_numbers): Change
4191 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4192 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4193 from numbers to PARM_DECLs.
4195 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4197 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4200 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
4203 * c-common.h (fold_offsetof_1): Add argument.
4204 * c-common.c (fold_offsetof_1): Diagnose more invalid
4205 offsetof expressions that reference elements past the end of
4208 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4209 Chung-Lin Tang <cltang@codesourcery.com>
4211 * c-pragma.c (oacc_pragmas): Add "atomic".
4212 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4214 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4216 * c-common.c (handle_target_clones_attribute): New.
4217 (c_common_attribute_table): Add handle_target_clones_attribute.
4218 (handle_always_inline_attribute): Add check on target_clones attribute.
4219 (handle_target_attribute): Ditto.
4221 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4223 * array-notation-common.c: Reorder #include's and remove duplicates.
4224 * c-ada-spec.c: Likewise.
4225 * c-cilkplus.c: Likewise.
4226 * c-common.c: Likewise.
4227 * c-cppbuiltin.c: Likewise.
4228 * c-dump.c: Likewise.
4229 * c-format.c: Likewise.
4230 * c-gimplify.c: Likewise.
4231 * c-indentation.c: Likewise.
4232 * c-lex.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-opts.c: Likewise.
4235 * c-pch.c: Likewise.
4236 * c-ppoutput.c: Likewise.
4237 * c-pragma.c: Likewise.
4238 * c-pretty-print.c: Likewise.
4239 * c-semantics.c: Likewise.
4240 * c-ubsan.c: Likewise.
4242 * stub-objc.c: Likewise.
4244 2015-10-28 Jason Merrill <jason@redhat.com>
4246 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4248 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4249 James Norris <jnorris@codesourcery.com>
4250 Cesar Philippidis <cesar@codesourcery.com>
4254 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4255 * c-omp.c (c_oacc_split_loop_clauses): New function.
4257 2015-10-21 Martin Sebor <msebor@redhat.com>
4260 * c.opt: End each sentence that describes an option with a period.
4262 2015-10-20 Marek Polacek <polacek@redhat.com>
4264 * array-notation-common.c (is_cilkplus_vector_p): Define.
4265 * c-common.h (is_cilkplus_vector_p): Declare.
4267 2015-10-20 Marek Polacek <polacek@redhat.com>
4269 * c.opt (std=gnu++11): Do not describe as experimental.
4270 (std=gnu++14): Likewise.
4272 2015-10-19 Jason Merrill <jason@redhat.com>
4274 * c-cppbuiltin.c (c_cpp_builtins): Define
4275 __cpp_nontype_template_args.
4277 2015-10-19 Jason Merrill <jason@redhat.com>
4279 * c-cppbuiltin.c (c_cpp_builtins): Define
4280 __cpp_enumerator_attributes, __cpp_fold_expressions,
4281 __cpp_unicode_characters.
4283 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4284 Aldy Hernandez <aldyh@redhat.com>
4286 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4287 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4288 (c_define_builtins): Likewise.
4289 * c-common.h (enum c_omp_clause_split): Add
4290 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4291 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4292 (c_finish_omp_for): Add ORIG_DECLV argument.
4293 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4294 201511 instead of 201307.
4295 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4296 OMP_CRITICAL_CLAUSES to it.
4297 (c_finish_omp_ordered): Add CLAUSES argument, set
4298 OMP_ORDERED_CLAUSES to it.
4299 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4300 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4301 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4302 constructs and new OpenMP 4.5 clauses. Clear
4303 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4305 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4306 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4307 (enum pragma_omp_clause): Add
4308 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4309 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4311 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4313 * c-lex.c (interpret_float): Use real_equal instead of
4316 2015-10-04 Jason Merrill <jason@redhat.com>
4318 Implement N4514, C++ Extensions for Transactional Memory.
4319 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4320 (c_common_attribute_table): Add transaction_safe_dynamic.
4321 transaction_safe now affects type identity.
4322 (handle_tm_attribute): Handle transaction_safe_dynamic.
4323 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4324 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4325 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4327 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4328 * c-pretty-print.c (pp_c_attributes_display): Don't print
4329 transaction_safe in C++.
4331 2015-10-02 Marek Polacek <polacek@redhat.com>
4333 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4335 2015-10-02 Marek Polacek <polacek@redhat.com>
4338 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4339 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4340 * c.opt (Wduplicated-cond): New option.
4342 2015-10-01 Joseph Myers <joseph@codesourcery.com>
4344 * c.opt (std=c11): Do not describe as experimental.
4345 (std=gnu11): Likewise.
4346 (std=iso9899:2011): Likewise.
4348 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4350 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4351 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4353 2015-09-25 Marek Polacek <polacek@redhat.com>
4355 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4356 (ubsan_instrument_shift): Likewise.
4358 2015-09-25 Marek Polacek <polacek@redhat.com>
4361 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4363 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4365 * c-indentation.c (should_warn_for_misleading_indentation):
4366 Compare next_stmt_vis_column with guard_line_first_nws instead
4367 of with guard_line_vis_column.
4369 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4373 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4374 options and options not valid for the current language.
4376 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4378 * c-indentation.c (should_warn_for_misleading_indentation):
4379 Float out and consolidate the calls to get_visual_column that
4380 are passed guard_exploc as an argument. Compare
4381 next_stmt_vis_column with guard_line_first_nws instead of with
4382 body_line_first_nws.
4384 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4386 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4387 Wnamespaces): New C++ warnings.
4389 2015-09-22 Jason Merrill <jason@redhat.com>
4391 * c-common.h (abi_compat_version_crosses): New.
4392 (warn_abi_version): Declare.
4393 * c-common.c: Define it.
4394 * c-opts.c (c_common_post_options): Handle it.
4395 flag_abi_compat_version defaults to 8.
4397 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4399 Complete the implementation of N4230, Nested namespace definition.
4400 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4401 __cpp_nested_namespace_definitions.
4403 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4405 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4407 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4409 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4411 * c-pragma.h (pragma_lex): Add optional loc argument.
4413 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4415 * c-format.c (check_format_arg): Adjust to use common block size in all
4418 2015-09-15 David Malcolm <dmalcolm@redhat.com>
4420 * c-format.c (location_from_offset): Update for change in
4421 signature of location_get_source_line.
4422 * c-indentation.c (get_visual_column): Likewise.
4423 (line_contains_hash_if): Likewise.
4425 2015-09-14 Marek Polacek <polacek@redhat.com>
4427 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4428 setting various warnings.
4430 2015-09-14 Marek Polacek <polacek@redhat.com>
4432 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4435 2015-09-11 Mark Wielaard <mjw@redhat.com>
4438 * c.opt (Wunused-variable): Option from common.opt.
4439 (Wunused-const-variable): New option.
4441 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4444 * c.opt ([Wsubobject-linkage]): Add.
4446 2015-09-03 Martin Sebor <msebor@redhat.com>
4449 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4451 * c-common.c (reject_gcc_builtin): Define.
4453 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4456 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4458 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4459 cilk_gimplify_call_params_in_spawned_fn.
4460 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4461 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4464 2015-08-25 Marek Polacek <polacek@redhat.com>
4467 * c-common.c (handle_weak_attribute): Don't check whether the
4468 visibility can be changed here.
4470 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4472 * c-lex.c (c_lex_with_flags): Use explicit locations.
4474 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4476 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4477 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4479 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4482 * c-common.c (check_builtin_function_arguments): Add check
4483 for BUILT_IN_SIGNBIT argument.
4485 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4488 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4491 2015-08-17 Marek Polacek <polacek@redhat.com>
4493 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4494 with whitespaces before qualifier names.
4496 2015-08-12 Marek Polacek <polacek@redhat.com>
4499 * c-common.c (maybe_warn_shift_overflow): Properly handle
4500 left-shifting 1 into the sign bit.
4502 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4504 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4506 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4507 Braden Obrzut <admin@maniacsvault.net>
4508 Jason Merrill <jason@redhat.com>
4510 Add C++ Concepts TS support.
4511 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4512 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4513 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4515 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4516 * c.opt (fconcepts): New.
4518 2015-08-02 Martin Sebor <msebor@redhat.com>
4520 * c.opt (-Wframe-address): New warning option.
4522 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4524 * c-indentation.c (should_warn_for_misleading_indentation):
4527 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4529 * c-indentation.c (get_visual_column): Add parameter first_nws,
4530 use it. Update comment documenting the function.
4531 (is_first_nonwhitespace_on_line): Remove.
4532 (should_warn_for_misleading_indentation): Replace usage of
4533 of is_first_nonwhitespace_on_line with get_visual_column.
4535 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4537 * c-indentation.h (struct token_indent_info): Define.
4538 (get_token_indent_info): Define.
4539 (warn_for_misleading_information): Declare.
4540 * c-common.h (warn_for_misleading_information): Remove.
4541 * c-identation.c (warn_for_misleading_indentation):
4542 Change declaration to take three token_indent_infos. Adjust
4544 * c-identation.c (should_warn_for_misleading_indentation):
4545 Likewise. Bail out early if the body is a compound statement.
4546 (guard_tinfo_to_string): Define.
4548 2015-07-30 Jason Merrill <jason@redhat.com>
4550 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4551 '*' for reference decay.
4553 2015-07-30 Marek Polacek <polacek@redhat.com>
4555 * c-common.c (warn_tautological_cmp): Bail for float types.
4557 2015-07-27 Marek Polacek <polacek@redhat.com>
4560 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4562 2015-07-27 Marek Polacek <polacek@redhat.com>
4566 * c-common.c (find_array_ref_with_const_idx_r): New function.
4567 (warn_tautological_cmp): New function.
4568 * c-common.h (warn_tautological_cmp): Declare.
4569 * c.opt (Wtautological-compare): New option.
4571 2015-07-23 Marek Polacek <polacek@redhat.com>
4573 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4574 (ubsan_instrument_shift): Likewise.
4576 2015-07-23 Marek Polacek <polacek@redhat.com>
4579 * c-ubsan.c: Include gimplify.h.
4580 (ubsan_instrument_division): Unshare OP0 and OP1.
4581 (ubsan_instrument_shift): Likewise.
4583 2015-07-20 Marek Polacek <polacek@redhat.com>
4584 Richard Sandiford <richard.sandiford@arm.com>
4587 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4588 Use EXPR_LOC_OR_LOC.
4589 (maybe_warn_shift_overflow): New function.
4590 * c-common.h (maybe_warn_shift_overflow): Declare.
4591 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4592 * c.opt (Wshift-overflow): New option.
4594 2015-07-16 Martin Liska <mliska@suse.cz>
4596 * c-format.c (static void check_format_info_main): Use
4597 object_allocator instead of pool_allocator.
4598 (check_format_arg): Likewise.
4599 (check_format_info_main): Likewise.
4601 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4603 * c-opts.c: Remove multiline #include comment.
4605 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4607 * c-common.c: Fix double word typos.
4609 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4611 * c-ada-spec.h (cpp_operation): Revert latest change.
4612 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4613 constructors and destructors.
4615 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4617 * c-common.h: Adjust includes for flags.h changes.
4618 * stub-objc.c: Likewise.
4620 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4622 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4623 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4625 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4627 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4628 are to be removed, return NULL rather than original clauses list.
4630 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4632 * array-notation-common.c: Adjust includes.
4633 * c-ada-spec.c: Likewise.
4634 * c-cilkplus.c: Likewise.
4635 * c-common.h: Likewise.
4636 * c-cppbuiltin.c: Likewise.
4637 * c-dump.c: Likewise.
4638 * c-format.c: Likewise.
4639 * c-gimplify.c: Likewise.
4640 * c-indentation.c: Likewise.
4641 * c-lex.c: Likewise.
4642 * c-omp.c: Likewise.
4643 * c-opts.c: Likewise.
4644 * c-pch.c: Likewise.
4645 * c-ppoutput.c: Likewise.
4646 * c-pragma.c: Likewise.
4647 * c-pretty-print.c: Likewise.
4648 * c-semantics.c: Likewise.
4649 * c-ubsan.c: Likewise.
4651 * stub-objc.c: Likewise.
4653 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4655 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4656 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4658 2015-07-01 Jason Merrill <jason@redhat.com>
4660 * c-common.h (D_CXX11): Rename from D_CXX0X.
4661 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4662 * c-common.c: Adjust.
4664 * c-opts.c (c_common_post_options): Default to C++14.
4666 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4668 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4670 Implement N4197 - Adding u8 character literals
4671 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4673 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4674 CPP_UTF8CHAR_USERDEF tokens.
4675 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4676 and CPP_UTF8CHAR tokens.
4677 (lex_charconst): Treat CPP_UTF8CHAR token.
4679 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4682 * c-common.c (do_warn_unused_parameter): Move here.
4683 * c-common.h (do_warn_unused_parameter): Declare.
4685 2015-06-29 Marek Polacek <polacek@redhat.com>
4688 * c-common.c (check_case_bounds): Add bool * parameter. Set
4690 (c_add_case_label): Add bool * parameter. Pass it down to
4692 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4694 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4697 2015-06-27 Marek Polacek <polacek@redhat.com>
4699 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4700 or VECTOR_INTEGER_TYPE_P throughout.
4701 * c-gimplify.c: Likewise.
4703 2015-06-26 Marek Polacek <polacek@redhat.com>
4705 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4706 * c-common.c (c_fully_fold_internal): Likewise.
4707 (c_alignof_expr): Likewise.
4708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4709 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4710 * cilk.c (create_parm_list): Likewise.
4712 2015-06-26 Marek Polacek <polacek@redhat.com>
4714 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4716 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4718 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4719 * c-gimplify.c: Likewise.
4720 * c-pragma.c: Likewise.
4721 * c-ubsan.c: Likewise.
4724 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4726 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4729 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4731 * cilk.c: Move calls.h after tm.h in the include chain.
4733 2015-06-25 Marek Polacek <polacek@redhat.com>
4735 * array-notation-common.c: Use VAR_P throughout.
4736 * c-ada-spec.c: Likewise.
4737 * c-common.c: Likewise.
4738 * c-format.c: Likewise.
4739 * c-gimplify.c: Likewise.
4740 * c-omp.c: Likewise.
4741 * c-pragma.c: Likewise.
4742 * c-pretty-print.c: Likewise.
4745 2015-06-25 Marek Polacek <polacek@redhat.com>
4747 * cilk.c (extract_free_variables): Use is_global_var.
4749 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4751 * c-common.c: Don't include target-def.h.
4753 2015-06-23 Marek Polacek <polacek@redhat.com>
4755 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4756 when comparing INTEGER_CSTs.
4758 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4760 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4761 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4762 (dump_ada_template): Skip partially specialized types.
4764 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4766 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4769 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4771 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4772 * c-ada-spec.c: Likewise.
4773 * c-cilkplus.c: Likewise.
4774 * c-common.c: Likewise.
4775 * c-common.h: Likewise.
4776 * c-cppbuiltin.c: Likewise.
4777 * c-dump.c: Likewise.
4778 * c-format.c: Likewise.
4779 * c-gimplify.c: Likewise.
4780 * c-indentation.c: Likewise.
4781 * c-lex.c: Likewise.
4782 * c-omp.c: Likewise.
4783 * c-opts.c: Likewise.
4784 * c-pch.c: Likewise.
4785 * c-ppoutput.c: Likewise.
4786 * c-pragma.c: Likewise.
4787 * c-pretty-print.c: Likewise.
4788 * c-semantics.c: Likewise.
4789 * c-ubsan.c: Likewise.
4791 * stub-objc.c: Likewise.
4793 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4796 * c-common.c (c_common_truthvalue_conversion): Warn when
4797 converting an address of a reference to a truth value.
4799 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4801 * array-notation-common.c : Adjust include files.
4802 * c-ada-spec.c : Likewise.
4803 * c-cilkplus.c : Likewise.
4804 * c-common.c : Likewise.
4805 * c-common.h : Likewise.
4806 * c-cppbuiltin.c : Likewise.
4807 * c-dump.c : Likewise.
4808 * c-format.c : Likewise.
4809 * c-gimplify.c : Likewise.
4810 * c-indentation.c : Likewise.
4811 * c-lex.c : Likewise.
4812 * c-omp.c : Likewise.
4813 * c-opts.c : Likewise.
4814 * c-pch.c : Likewise.
4815 * c-ppoutput.c : Likewise.
4816 * c-pragma.c : Likewise.
4817 * c-pretty-print.c : Likewise.
4818 * c-semantics.c : Likewise.
4819 * c-ubsan.c : Likewise.
4820 * cilk.c : Likewise.
4821 * stub-objc.c : Likewise.
4823 2015-06-08 Marek Polacek <polacek@redhat.com>
4826 * c-format.c (location_from_offset): Return LOC if LINE is null.
4828 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4830 * c-common.h (c_parse_final_cleanups): New prototype.
4831 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4833 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4835 * c-common.c (noplt): New attribute.
4836 (handle_noplt_attribute): New handler.
4838 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4840 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4841 * c-ada-spec.c: Likewise.
4842 * c-cilkplus.c: Likewise.
4843 * c-common.c: Likewise.
4844 * c-common.h: Likewise.
4845 * c-cppbuiltin.c: Likewise.
4846 * c-dump.c: Likewise.
4847 * c-format.c: Likewise.
4848 * c-gimplify.c: Likewise.
4849 * c-indentation.c: Likewise.
4850 * c-lex.c: Likewise.
4851 * c-omp.c: Likewise.
4852 * c-opts.c: Likewise.
4853 * c-pch.c: Likewise.
4854 * c-ppoutput.c: Likewise.
4855 * c-pragma.c: Likewise.
4856 * c-pretty-print.c: Likewise.
4857 * c-semantics.c: Likewise.
4858 * c-ubsan.c: Likewise.
4860 * stub-objc.c: Likewise.
4862 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4865 * c-indentation.c (should_warn_for_misleading_indentation): Use
4866 expand_location rather than expand_location_to_spelling_point.
4867 Don't warn if the guarding statement is more indented than the
4870 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4872 * c-indentation.c (warn_for_misleading_indentation): Bail out
4873 immediately if -Wmisleading-indentation isn't enabled.
4875 2015-06-01 Martin Liska <mliska@suse.cz>
4877 * c-format.c (check_format_arg):Use new type-based pool allocator.
4878 (check_format_info_main) Likewise.
4880 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4882 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4883 (has_nontrivial_methods): Likewise.
4885 2015-05-25 Marek Polacek <polacek@redhat.com>
4887 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4889 2015-05-22 Marek Polacek <polacek@redhat.com>
4892 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4894 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4896 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4897 STACK_GROWS_DOWNWARD.
4899 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4901 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4902 STACK_GROWS_DOWNWARD rather than if it is defined.
4904 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4907 * c-format.c (location_column_from_byte_offset): New.
4908 (location_from_offset): New.
4909 (struct format_wanted_type): Add offset_loc field.
4910 (check_format_info): Move handling of location for extra arguments
4911 closer to the point of warning.
4912 (check_format_info_main): Pass the result of location_from_offset
4914 (format_type_warning): Pass the result of location_from_offset
4917 2015-05-20 Marek Polacek <polacek@redhat.com>
4919 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4921 2015-05-20 Marek Polacek <polacek@redhat.com>
4923 * c-ada-spec.c (dump_sloc): Use DECL_P.
4925 2015-05-20 Marek Polacek <polacek@redhat.com>
4927 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4928 * c-common.c: Likewise.
4930 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4932 * c-common.h (fe_file_change): Strengthen param from
4933 const line_map * to const line_map_ordinary *.
4934 (pp_file_change): Likewise.
4935 * c-lex.c (fe_file_change): Likewise.
4936 (cb_define): Use linemap_check_ordinary when invoking
4938 (cb_undef): Likewise.
4939 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4940 invoking cb_file_change.
4941 (c_finish_options): Likewise.
4942 (push_command_line_include): Likewise.
4943 (cb_file_change): Strengthen param "new_map" from
4944 const line_map * to const line_map_ordinary *.
4945 * c-ppoutput.c (cb_define): Likewise for local "map".
4946 (pp_file_change): Likewise for param "map" and local "from".
4948 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4950 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4952 2015-05-18 Tom de Vries <tom@codesourcery.com>
4954 * c-common.c (build_va_arg_1): New function.
4955 (build_va_arg): Add address operator to va_list operand if necessary.
4957 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4960 * c-common.c (int_safely_convertible_to_real_p): Define.
4961 (unsafe_conversion_p): Check conversions involving complex types.
4962 (conversion_warning): Add new warning message for conversions which
4963 discard imaginary component.
4964 * c-common.h: (enum conversion_safety): Add new enumerator for such
4967 2015-05-14 Marek Polacek <polacek@redhat.com>
4971 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4972 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4973 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4974 use it. If FOR_INT_CONST, require that all evaluated operands be
4977 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4979 * c-common.h (warn_for_misleading_indentation): New prototype.
4980 * c-indentation.c: New file.
4981 * c.opt (Wmisleading-indentation): New option.
4983 2015-05-12 Tom de Vries <tom@codesourcery.com>
4985 PR tree-optimization/66010
4986 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4988 2015-05-09 Jason Merrill <jason@redhat.com>
4990 * c-opts.c (c_common_post_options): Also clear
4991 cpp_opts->cpp_warn_cxx11_compat.
4993 * c-common.h (enum cxx_dialect): Add cxx_unset.
4994 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4995 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4997 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4998 (std=gnu++0x): Mark as Undocumented.
4999 (std=gnu++1y): Add deprecated message.
5001 2015-05-08 Jason Merrill <jason@redhat.com>
5003 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5006 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5008 2015-05-08 Marek Polacek <polacek@redhat.com>
5011 * c.opt (Woverride-init-side-effects): New option.
5013 2015-05-07 Marek Polacek <polacek@redhat.com>
5016 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5018 * c.opt (Wshift-negative-value): New option.
5019 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5020 when -Wextra and C99/C++11 mode.
5022 2015-05-07 Marek Polacek <polacek@redhat.com>
5023 Martin Uecker <uecker@eecs.berkeley.edu>
5025 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5026 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5028 2015-05-05 Jason Merrill <jason@redhat.com>
5030 * c.opt (Wterminate): New.
5032 2015-04-30 Marek Polacek <polacek@redhat.com>
5034 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5035 require that the non-constant be of a boolean type.
5037 2015-04-29 Josh Triplett <josh@joshtriplett.org>
5039 * c-common.c (handle_section_attribute): Refactor to reduce
5040 nesting and distinguish between error cases.
5042 2015-04-29 Marek Polacek <polacek@redhat.com>
5045 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5048 2015-04-29 Jakub Jelinek <jakub@redhat.com>
5050 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5051 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5052 HOST_BITS_PER_WIDE_INT.
5054 2015-04-28 Tom de Vries <tom@codesourcery.com>
5056 PR tree-optimization/65887
5057 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5059 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
5060 Pierre-Marie de Rodat <derodat@adacore.com>
5062 * c-ada-spec.c (in_function): Delete.
5063 (dump_generic_ada_node): Do not change in_function and remove the
5064 redundant code dealing with it.
5065 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5066 (print_ada_methods): Output the static member functions in a nested
5067 package after the regular methods as well as associated renamings.
5069 2015-04-24 Marek Polacek <polacek@redhat.com>
5072 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5073 and OPT_Wshift_count_overflow.
5076 * c-common.c (warn_logical_operator): Warn if the operands have the
5079 2015-04-24 Marek Polacek <polacek@redhat.com>
5082 * c-common.c (warn_logical_operator): Bail if either operand comes
5083 from a macro expansion.
5085 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5088 * c-common.c (c_default_pointer_mode): Add definition.
5089 * c-common.h (c_default_pointer_mode): Add declaration.
5091 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5093 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5094 on record_builtin_type argument.
5096 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5099 * c-common.c (warn_logical_not_parentheses): Don't warn for
5102 2015-03-07 Marek Polacek <polacek@redhat.com>
5105 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5106 before trying to figure out whether we have a flexible array member.
5108 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
5109 Jonathan Wakely <jwakely.gcc@gmail.com>
5111 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5113 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5116 * c-ada-spec.c (print_destructor): Remove obsolete code.
5118 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5120 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5121 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5122 DECL_TEMPLATE_RESULT emulations.
5123 (dump_ada_template)): Add guard for TYPE_METHODS.
5125 2015-02-27 Marek Polacek <polacek@redhat.com>
5128 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5130 2015-02-27 Kai Tietz <ktietz@redhat.com>
5133 * c-pragma.c (handle_pragma_weak): Do not try to create
5134 weak/alias of declarations not being function, or variable
5137 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5140 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5142 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5144 2015-02-16 Marek Polacek <polacek@redhat.com>
5147 * c-format.c (check_format_types): Handle null param.
5149 2015-02-13 Marek Polacek <polacek@redhat.com>
5152 * c-format.c (check_format_types): Don't warn about different
5153 signedness if the original value is in the range of WANTED_TYPE.
5155 2015-02-12 Jason Merrill <jason@redhat.com>
5158 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5159 to the current highest version.
5160 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5162 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5166 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5167 instead of RDIV_EXPR. Use build_binary_op instead of
5170 2015-01-30 Joseph Myers <joseph@codesourcery.com>
5172 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5173 to pass input_location as first argument.
5175 2015-01-23 Tom de Vries <tom@codesourcery.com>
5178 * c.opt (fopenacc): Mark as LTO option.
5180 2015-01-23 Tom de Vries <tom@codesourcery.com>
5183 * c.opt (fopenmp): Mark as LTO option.
5185 2015-01-21 Jakub Jelinek <jakub@redhat.com>
5188 * cilk.c (fill_decls_vec): Only put decls into vector v.
5189 (compare_decls): Fix up formatting.
5191 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5194 * cilk.c: Include vec.h.
5195 (struct cilk_decls): New structure.
5196 (wrapper_parm_cb): Split this function to...
5197 (fill_decls_vec): ...this...
5198 (create_parm_list): ...and this.
5199 (compare_decls): New function.
5200 (for_local_cb): Remove.
5201 (wrapper_local_cb): Ditto.
5202 (build_wrapper_type): For now first traverse and fill vector of
5203 declarations then sort it and then deal with sorted vector.
5204 (cilk_outline): Ditto.
5205 (declare_one_free_variable): Ditto.
5207 2015-01-21 Jason Merrill <jason@redhat.com>
5210 * c-format.c (check_format_arg): Call decl_constant_value.
5212 2015-01-19 Martin Liska <mliska@suse.cz>
5214 * c-common.c (handle_noicf_attribute): New function.
5216 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5217 Bernd Schmidt <bernds@codesourcery.com>
5218 James Norris <jnorris@codesourcery.com>
5219 Cesar Philippidis <cesar@codesourcery.com>
5220 Ilmir Usmanov <i.usmanov@samsung.com>
5221 Jakub Jelinek <jakub@redhat.com>
5223 * c.opt (fopenacc): New option.
5224 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5225 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5227 * c-common.h (c_finish_oacc_wait): New prototype.
5228 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5229 (c_finish_oacc_wait): New function.
5230 * c-pragma.c (oacc_pragmas): New variable.
5231 (c_pp_lookup_pragma, init_pragma): Handle it.
5232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5233 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5234 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5235 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5236 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5237 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5238 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5239 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5240 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5241 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5242 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5243 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5244 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5245 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5246 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5247 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5248 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5249 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5250 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5251 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5252 PRAGMA_OACC_CLAUSE_WORKER.
5254 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5256 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5257 for the new option fstack-protector_explicit.
5258 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5259 (handle_stack_protect_attribute): New function.
5261 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
5263 * c.opt: New option -Warray-bounds=.
5265 2015-01-09 Michael Collison <michael.collison@linaro.org>
5267 * array-notation-common.c: Include hash-set.h, machmode.h,
5268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5269 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5270 * c-ada-spec.c: Ditto.
5271 * c-cilkplus.c: Ditto.
5272 * c-common.c: Include input.h due to flattening of tree.h.
5273 Define macro GCC_C_COMMON_C.
5274 * c-common.h: Flatten tree.h header files into c-common.h.
5275 Remove include of tree-core.h.
5276 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5277 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5278 fold-const.h, wide-int.h, and inchash.h due to
5279 flattening of tree.h.
5281 * c-format.c: Flatten tree.h header files into c-common.h.
5282 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5283 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5284 fold-const.h, wide-int.h, and inchash.h due to
5285 flattening of tree.h.
5286 * c-dump.c: Include hash-set.h, machmode.h,
5287 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5288 fold-const.h, wide-int.h, and inchash.h due to
5289 flattening of tree.h.
5290 * c-format.c: Include hash-set.h, machmode.h,
5291 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5292 fold-const.h, wide-int.h, inchash.h and real.h due to
5293 flattening of tree.h.
5294 * c-gimplify.c: Include hash-set.h, machmode.h,
5295 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5296 fold-const.h, wide-int.h, and inchash.h due to
5297 flattening of tree.h.
5303 * c-ppoutput.c: Ditto.
5304 * c-pragma.c: Ditto.
5305 * c-pretty-print.c: Ditto.
5306 * c-semantics.c: Ditto.
5308 * stub-objc.c: Ditto.
5310 2015-01-08 Jason Merrill <jason@redhat.com>
5312 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5313 do_ubsan_in_current_function.
5314 (ubsan_maybe_instrument_reference_or_call): Likewise.
5315 * c-ubsan.h: Declare it.
5317 2015-01-08 Mike Stump <mikestump@comcast.net>
5319 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5321 2015-01-07 Marek Polacek <polacek@redhat.com>
5324 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5325 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5327 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5330 * c.opt (Wsuggest-override): New option.
5332 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5334 Update copyright years.
5336 2015-01-05 Marek Polacek <polacek@redhat.com>
5339 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5341 * c-common.h (warn_array_subscript_with_type_char): Update
5344 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5346 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5347 Control macro with flag_sized_deallocation.
5349 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5351 * c.opt (Wdiscarded-array-qualifiers): New option.
5353 2014-12-19 Jakub Jelinek <jakub@redhat.com>
5355 PR preprocessor/63831
5356 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5357 and __has_cpp_attribute here.
5358 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5359 c_common_has_attribute.
5360 * c-common.h (c_common_has_attribute): New prototype.
5361 * c-lex.c (init_c_lex): Set cb->has_attribute to
5362 c_common_has_attribute instead of cb_has_attribute.
5363 (get_token_no_padding): New function.
5364 (cb_has_attribute): Renamed to ...
5365 (c_common_has_attribute): ... this. No longer static. Use
5366 get_token_no_padding, require ()s, don't build TREE_LIST
5367 unnecessarily, fix up formatting, adjust diagnostics, call
5370 2014-12-15 Jason Merrill <jason@redhat.com>
5372 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5373 (-Wsized-deallocation): New.
5374 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5375 to on in C++14 and up.
5377 2014-12-11 Jason Merrill <jason@redhat.com>
5379 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5382 we aren't complaining about VLAs.
5384 2014-12-06 Marek Polacek <polacek@redhat.com>
5386 PR tree-optimization/64183
5387 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5388 shift-expression if it is integer_type_node. Use types_compatible_p.
5390 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5392 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5393 last argument from create_tmp_var_raw and create_tmp_var calls.
5394 * cilk.c (gimplify_cilk_spawn): Likewise.
5395 * c-omp.c (c_finish_omp_atomic): Likewise.
5397 2014-11-28 Marek Polacek <polacek@redhat.com>
5399 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5400 instead of unsigned_type_node.
5402 2014-11-28 Marek Polacek <polacek@redhat.com>
5405 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5407 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5408 expression to unsigned_type_node.
5410 2014-11-20 Mark Wielaard <mjw@redhat.com>
5413 * c-opts.c (set_std_c89): Set lang_hooks.name.
5414 (set_std_c99): Likewise.
5415 (set_std_c11): Likewise.
5416 (set_std_cxx98): Likewise.
5417 (set_std_cxx11): Likewise.
5418 (set_std_cxx14): Likewise.
5419 (set_std_cxx1z): Likewise.
5421 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5424 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5425 return type to bool.
5426 * c-common.c: Include gimple-expr.h.
5427 (convert_vector_to_pointer_for_subscript): Change return type to
5428 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5429 and copy it into a TARGET_EXPR and use that instead of *vecp
5432 2014-11-19 David Malcolm <dmalcolm@redhat.com>
5434 Merger of git branch "gimple-classes-v2-option-3".
5435 * ChangeLog.gimple-classes: New.
5436 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5437 from being just a vec<gimple> to a vec<gbind *>.
5439 2014-11-18 Jakub Jelinek <jakub@redhat.com>
5442 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5443 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5444 get_pointer_alignment for non-pointers. Use ptype, or if it is
5445 reference type, corresponding pointer type, as type of kind
5447 (ubsan_maybe_instrument_reference,
5448 ubsan_maybe_instrument_member_call): Adjust callers.
5450 2014-11-15 Marek Polacek <polacek@redhat.com>
5453 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5455 (extract_array_notation_exprs): Return for NULL node.
5457 2014-11-12 Joseph Myers <joseph@codesourcery.com>
5459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5460 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5462 2014-11-12 Jakub Jelinek <jakub@redhat.com>
5465 * c-common.c (check_builtin_function_arguments): Handle
5466 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5468 2014-11-10 Andi Kleen <ak@linux.intel.com>
5471 * c-common.h (check_no_cilk): Declare.
5472 * cilk.c (get_error_location): New function.
5473 (check_no_cilk): Dito.
5475 2014-11-10 Andi Kleen <ak@linux.intel.com>
5477 * cilk.c (recognize_spawn): Use expression location
5480 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5482 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5484 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5486 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5487 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5488 (__cpp_range_based_for, __cpp_initializer_lists,
5489 __cpp_delegating_constructors, __cpp_nsdmi,
5490 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5491 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5492 __has_cpp_attribute.
5493 * c-lex.c (cb_has_attribute): New callback CPP function;
5494 (init_c_lex): Set has_attribute callback.
5496 2014-11-04 Richard Biener <rguenther@suse.de>
5498 * c-common.c (shorten_compare): Do not shorten mixed
5499 DFP and non-DFP compares.
5501 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5503 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5504 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5505 Commentary and rearrangement of tests.
5506 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5507 Commentary and rearrangement of tests.
5508 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5509 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5511 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5513 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5514 enum from machine_mode.
5516 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5518 * c-common.c: Adjust include files.
5519 * c-gimplify.c: Ditto.
5521 * c-pragma.c: Ditto.
5524 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5526 * c-gimplify.c: Adjust include files.
5528 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5531 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5532 c_common_initialize_diagnostics.
5533 * c-common.h: Likewise.
5535 2014-10-24 Marek Polacek <polacek@redhat.com>
5538 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5539 print "struct"/"union"/"enum" for typedefed names.
5541 2014-10-23 Marek Polacek <polacek@redhat.com>
5543 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5546 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5547 Yury Gribov <y.gribov@samsung.com>
5549 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5550 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5551 instead of flag_sanitize_recover as bool flag.
5553 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5555 * cilk.c: Revert previous change.
5557 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5560 * cilk.c: Include vec.h.
5561 (struct cilk_decls): New structure.
5562 (wrapper_parm_cb): Split this function to...
5563 (fill_decls_vec): ...this...
5564 (create_parm_list): ...and this.
5565 (compare_decls): New function.
5566 (for_local_cb): Remove.
5567 (wrapper_local_cb): Ditto.
5568 (build_wrapper_type): For now first traverse and fill vector of
5569 declarations then sort it and then deal with sorted vector.
5570 (cilk_outline): Ditto.
5571 (declare_one_free_variable): Ditto.
5573 2014-10-17 Marek Polacek <polacek@redhat.com>
5575 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5576 * c.opt (Wimplicit-int): Initialize to -1.
5578 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5580 * c-pragma.c: Adjust include files.
5581 * c-semantics.c: Likewise.
5583 2014-10-16 DJ Delorie <dj@redhat.com>
5585 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5588 2014-10-14 Jason Merrill <jason@redhat.com>
5591 * c-common.h (CPP_PREPARSED_EXPR): New.
5592 (N_CP_TTYPES): Adjust.
5594 2014-10-15 Marek Polacek <polacek@redhat.com>
5596 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5598 2014-10-14 DJ Delorie <dj@redhat.com>
5600 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5601 types, not just __int128.
5602 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5603 types, not just __int128.
5604 (cpp_atomic_builtins): Round pointer sizes up.
5605 (type_suffix): Use type precision, not specific types.
5606 * c-common.c (c_common_reswords): Remove __int128 special case.
5607 (c_common_type_for_size): Check for all __intN types, not just
5609 (c_common_type_for_mode): Likewise.
5610 (c_common_signed_or_unsigned_type): Likewise.
5611 (c_build_bitfield_integer_type): Likewise.
5612 (c_common_nodes_and_builtins): Likewise.
5613 (keyword_begins_type_specifier): Likewise.
5614 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5617 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5619 * c-common.c: Use hash_table instead of hashtab.
5621 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5623 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5626 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5631 * c-common.c (warn_logical_operator): Punt for vectors.
5633 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5635 Implement SD-6: SG10 Feature Test Recommendations
5636 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5637 macros and the __has_header macro.
5639 2014-09-30 Jason Merrill <jason@redhat.com>
5641 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5642 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5643 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5645 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5646 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5648 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5649 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5651 2014-09-24 Marek Polacek <polacek@redhat.com>
5655 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5657 2014-09-23 Andi Kleen <ak@linux.intel.com>
5659 * c-common.c (handle_no_reorder_attribute): New function.
5660 (c_common_attribute_table): Add no_reorder attribute.
5662 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5664 * c-cppbuiltin.c (c_cpp_builtins): Define
5665 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5668 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5670 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5671 for supported floating-point modes.
5673 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5675 * c.opt (Wpsabi): Use LangEnabledBy.
5676 * c-opts.c (c_common_handle_option): Do not handle here.
5678 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5680 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5681 macros for floating-point modes.
5683 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5686 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5687 __*_DENORM_MIN__ without denormals.
5689 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5691 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5692 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5693 ubsan_create_data callers.
5694 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5695 index is constant or BIT_AND_EXPR with constant mask and is
5696 small enough for the bound.
5697 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5698 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5700 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5702 * c.opt: Add CppReason to various flags.
5703 (Wdate-time): Re-sort.
5704 * c-common.c: Include c-common.h earlier.
5705 (struct reason_option_codes_t): Delete.
5706 (c_option_controlling_cpp_error): Prefix global type and struct
5709 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5711 * c.opt (Wnormalized): New.
5712 (Wnormalized=): Use Enum and Reject Negative.
5713 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5715 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5717 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5718 digits of floating-point modes if -fbuilding-libgcc.
5720 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5722 * c-cppbuiltin.c (c_cpp_builtins): Also define
5723 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5724 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5725 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5726 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5727 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5728 __LIBGCC_STACK_GROWS_DOWNWARD__,
5729 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5730 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5731 __LIBGCC_DWARF_FRAME_REGISTERS__,
5732 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5733 __LIBGCC_STACK_POINTER_REGNUM__ and
5734 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5735 (builtin_define_with_value): Handle backslash-escaping in string
5738 2014-09-05 Richard Biener <rguenther@suse.de>
5741 * c-format.c (check_format_arg): Properly handle
5742 effectively signed POINTER_PLUS_EXPR offset.
5744 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5746 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5747 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5748 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5750 * c-opts.c (c_common_handle_option): Do not handle here.
5751 (sanitize_cpp_opts): Likewise.
5752 * c-common.c (struct reason_option_codes_t): Handle
5753 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5755 2014-09-03 Marek Polacek <polacek@redhat.com>
5757 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5759 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5760 Balaji V. Iyer <balaji.v.iyer@intel.com>
5761 Igor Zamyatin <igor.zamyatin@intel.com>
5763 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5764 * c-common.c (c_common_reswords): Added _Cilk_for.
5765 * c-common.h (enum rid): Added RID_CILK_FOR.
5766 (cilk_for_number_of_iterations): Add declaration.
5767 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5769 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5770 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5772 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5774 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5775 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5776 Wundef): Use CPP, Var and Init.
5777 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5779 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5781 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5782 * c-opts.c (c_common_handle_option): Do not handle here.
5784 2014-08-25 Jason Merrill <jason@redhat.com>
5786 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5787 -std=c++14 and -std=gnu++14, rather than the reverse.
5788 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5789 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5790 * c-common.h (cxx_dialect): Remove cxx1y.
5792 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5794 * c-common.h (enum cxx_dialect): Add cxx14.
5795 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5796 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5797 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5799 2014-08-22 Jason Merrill <jason@redhat.com>
5801 * c.opt (std=gnu++17): Fix alias.
5803 2014-08-22 Marek Polacek <polacek@redhat.com>
5806 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5807 check for vector types. Drop LHS argument.
5808 * c-common.h (warn_logical_not_parentheses): Adjust.
5810 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5812 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5813 (Wmultichar): Likewise.
5814 (Wdate-time): Use C-family languages instead of Common. Use CPP
5816 * c-opts.c (c_common_handle_option): Do not handle the above
5818 (sanitize_cpp_opts): Likewise.
5820 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5823 * c-opts.c: Include tree-diagnostics.h.
5824 (c_diagnostic_finalizer): New.
5825 (c_common_initialize_diagnostics): Use it.
5827 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5829 PR preprocessor/51303
5830 * c-common.c (struct reason_option_codes_t option_codes):
5831 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5833 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5837 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5838 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5839 (c_common_post_options): Call init_global_opts_from_cpp.
5840 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5842 2014-08-19 Marek Polacek <polacek@redhat.com>
5845 * c-common.c (maybe_warn_bool_compare): New function.
5846 * c-common.h (maybe_warn_bool_compare): Declare.
5847 * c.opt (Wbool-compare): New option.
5849 2014-08-19 Marek Polacek <polacek@redhat.com>
5851 * c.opt (Wc99-c11-compat): New option.
5853 2014-08-19 Marek Polacek <polacek@redhat.com>
5855 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5856 to warn_c90_c99_compat.
5857 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5860 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5861 Steven Bosscher <steven@gcc.gnu.org>
5864 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5865 format_check_results.
5866 (check_function_format): Use true and add comment for boolean
5868 (finish_dollar_format_checking): Use explicit location when warning.
5869 (check_format_info): Likewise.
5870 (check_format_arg): Set extra_arg_loc and format_string_loc.
5871 (check_format_info_main): Use explicit location when warning.
5872 (check_format_types): Pass explicit location.
5873 (format_type_warning): Likewise.
5875 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5878 * c-format.c: Handle Fortran flags.
5880 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5883 * array-notation-common.c (find_rank): Added handling for other
5884 types of references.
5886 2014-08-10 Marek Polacek <polacek@redhat.com>
5889 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5890 * c.opt (Wc90-c99-compat): Add option.
5892 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5894 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5896 2014-08-03 Marek Polacek <polacek@redhat.com>
5898 * c-common.c (check_case_value): Add location_t parameter. Use it.
5899 (c_add_case_label): Pass loc to check_case_value.
5901 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5903 * cilk.c: Use hash_map instead of pointer_map.
5905 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5907 * c-gimplify.c: Use hash_set instead of pointer_set.
5909 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5912 * array-notation-common.c (extract_array_notation_exprs): Handling
5915 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5917 * c-common.h (min_align_of_type): Removed prototype.
5918 * c-common.c (min_align_of_type): Removed.
5919 * c-ubsan.h (ubsan_maybe_instrument_reference,
5920 ubsan_maybe_instrument_member_call): New prototypes.
5921 * c-ubsan.c: Include stor-layout.h and builtins.h.
5922 (ubsan_maybe_instrument_reference_or_call,
5923 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5926 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5929 * c.opt (-Wreturn-local-addr): Move to common.opt.
5931 2014-07-30 Jason Merrill <jason@redhat.com>
5936 * c.opt (-fuse-all-virtuals): New.
5938 2014-07-30 Tom Tromey <tromey@redhat.com>
5941 * c.opt (Wdesignated-init): New option.
5942 * c-common.c (c_common_attribute_table): Add "designated_init".
5943 (handle_designated_init): New function.
5945 2014-07-24 Marek Polacek <polacek@redhat.com>
5948 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5950 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5952 PR preprocessor/60723 - missing system-ness marks for macro tokens
5953 * c-ppoutput.c (struct print::prev_was_system_token): New data
5955 (init_pp_output): Initialize it.
5956 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5957 (do_line_change): Return a flag saying if a line marker was
5959 (scan_translation_unit): Detect if the system-ness of the token we
5960 are about to emit is different from the one of the previously
5961 emitted token. If so, emit a line marker. Avoid emitting useless
5962 adjacent line markers. Avoid emitting line markers for tokens
5963 originating from the expansion of built-in macros.
5964 (scan_translation_unit_directives_only): Adjust.
5966 2014-07-15 Marek Polacek <polacek@redhat.com>
5968 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5969 TYPE_MAX_VALUE is NULL.
5971 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5974 * c.opt (Wmemset-transposed-args): New warning.
5976 2014-07-10 Jason Merrill <jason@redhat.com>
5980 * c.opt (-fuse-all-virtuals): New.
5982 2014-07-09 Richard Biener <rguenther@suse.de>
5985 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5986 using unsigned arithmetic if overflow does not wrap instead of
5987 if overflow is undefined.
5989 2014-07-06 Marek Polacek <polacek@redhat.com>
5992 * c.opt (Wsizeof-array-argument): New option.
5994 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5996 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5997 comments->count <= 1, as comments->entries might be NULL.
5999 2014-07-01 Marek Polacek <polacek@redhat.com>
6001 * c.opt (Wint-conversion): New option.
6003 2014-07-01 Marek Polacek <polacek@redhat.com>
6006 * c.opt (Wincompatible-pointer-types): New option.
6008 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6011 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6012 Do not discard TYPE_QUALS of type.
6014 2014-06-26 Jason Merrill <jason@redhat.com>
6016 * c-common.h (enum cxx_dialect): Add cxx1z.
6017 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6018 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6020 2014-06-26 Teresa Johnson <tejohnson@google.com>
6022 * c-common.h (get_dump_info): Declare.
6023 * c-gimplify.c (c_genericize): Use saved dump files.
6024 * c-opts.c (c_common_parse_file): Begin and end dumps
6025 once around parsing invocation.
6026 (get_dump_info): New function.
6028 2014-06-23 Marek Polacek <polacek@redhat.com>
6029 Andrew MacLeod <amacleod@redhat.com>
6032 * c-common.c (get_atomic_generic_size): Don't segfault if the
6033 type doesn't have a size.
6035 2014-06-20 Marek Polacek <polacek@redhat.com>
6037 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6038 (ubsan_walk_array_refs_r): New function.
6039 (c_genericize): Instrument array bounds.
6040 * c-ubsan.c: Include "internal-fn.h".
6041 (ubsan_instrument_division): Mark instrumented arrays as having
6042 side effects. Adjust ubsan_type_descriptor call.
6043 (ubsan_instrument_shift): Likewise.
6044 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6045 (ubsan_instrument_bounds): New function.
6046 (ubsan_array_ref_instrumented_p): New function.
6047 (ubsan_maybe_instrument_array_ref): New function.
6048 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6049 (ubsan_array_ref_instrumented_p): Declare.
6050 (ubsan_maybe_instrument_array_ref): Declare.
6052 2014-06-20 Hale Wang <hale.wang@arm.com>
6055 * c.opt (fshort-enums): Add to LTO.
6056 * c.opt (fshort-wchar): Likewise.
6058 2014-06-16 Marek Polacek <polacek@redhat.com>
6061 * c.opt (Wswitch-bool): Add Var.
6063 2014-06-12 Jakub Jelinek <jakub@redhat.com>
6066 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6067 #pragma omp target teams or
6068 #pragma omp {,target }teams distribute simd.
6070 2014-06-12 Jason Merrill <jason@redhat.com>
6072 * c.opt (Wabi=, fabi-compat-version): New.
6073 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6074 (c_common_post_options): Handle flag_abi_compat_version default.
6075 Disallow -fabi-compat-version=1.
6076 * c-common.h (abi_version_crosses): New.
6078 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
6080 * c-common.c (handle_section_attribute): Update handling for
6081 section names that are no longer trees.
6083 2014-06-10 Jakub Jelinek <jakub@redhat.com>
6086 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6087 (omp_pragmas): ... back here.
6089 2014-06-05 Marek Polacek <polacek@redhat.com>
6092 * c-common.c (warn_logical_not_parentheses): New function.
6093 * c-common.h (warn_logical_not_parentheses): Declare.
6094 * c.opt (Wlogical-not-parentheses): New option.
6096 2014-06-04 Marek Polacek <polacek@redhat.com>
6099 * c-common.c (check_case_bounds): Add location parameter.
6101 (c_add_case_label): Pass loc to check_case_bounds.
6103 2014-06-03 Marek Polacek <polacek@redhat.com>
6106 * c.opt (Wswitch-bool): New option.
6108 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6110 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6112 (record_types_used_by_current_var_decl): Move prototype to where
6115 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6116 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6117 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6119 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6121 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6122 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6124 * c-pretty-print.c (pp_c_void_constant): New function.
6125 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6126 (c_pretty_printer::expression): Handle VOID_CST.
6127 * cilk.c (extract_free_variables): Likewise.
6128 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6129 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6131 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6133 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6134 * c-pragma.c (push_alignment): Adjust.
6135 (handle_pragma_push_options): Likewise.
6137 2014-05-09 Marek Polacek <polacek@redhat.com>
6140 * c-common.c (check_user_alignment): Return -1 if alignment is error
6142 (handle_aligned_attribute): Don't call default_conversion on
6144 (handle_vector_size_attribute): Likewise.
6145 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6146 (handle_sentinel_attribute): Call default_conversion and allow even
6147 integral types as an argument.
6149 2014-05-08 Marek Polacek <polacek@redhat.com>
6152 * c-common.c (min_align_of_type): New function factored out from...
6153 (c_sizeof_or_alignof_type): ...here.
6154 * c-common.h (min_align_of_type): Declare.
6156 2014-05-08 Marek Polacek <polacek@redhat.com>
6159 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6160 parameter type of main.
6162 2014-05-07 DJ Delorie <dj@redhat.com>
6164 * c-cppbuiltin.c (print_bits_of_hex): New.
6165 (builtin_define_type_minmax): Print values using hex so as not to
6166 require a pre-computed list of string values.
6168 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6169 Mike Stump <mikestump@comcast.net>
6170 Richard Sandiford <rdsandiford@googlemail.com>
6172 * c-ada-spec.c: Include wide-int.h.
6173 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6174 (dump_generic_ada_node): Use wide-int interfaces.
6175 * c-common.c: Include wide-int-print.h.
6176 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6177 (pointer_int_sum): Use wide-int interfaces.
6178 (c_common_nodes_and_builtins): Use make_int_cst.
6179 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6180 (handle_alloc_size_attribute): Use wide-int interfaces.
6181 (get_nonnull_operand): Likewise.
6182 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6183 * c-lex.c: Include wide-int.h.
6184 (narrowest_unsigned_type): Take a widest_int rather than two
6186 (narrowest_signed_type): Likewise.
6187 (interpret_integer): Update accordingly. Use wide-int interfaces.
6188 (lex_charconst): Use wide-int interfaces.
6189 * c-pretty-print.c: Include wide-int.h.
6190 (pp_c_integer_constant): Use wide-int interfaces.
6191 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6192 INT_CST_LT_UNSIGNED.
6194 2014-05-06 Richard Biener <rguenther@suse.de>
6196 * c-opts.c (c_common_post_options): For -freestanding,
6197 -fno-hosted and -fno-builtin disable pattern recognition
6198 if not enabled explicitely.
6200 2014-05-02 Marek Polacek <polacek@redhat.com>
6202 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6204 2014-05-01 Marek Polacek <polacek@redhat.com>
6207 * c.opt (Wdiscarded-qualifiers): Add.
6209 2014-04-30 Marek Polacek <polacek@redhat.com>
6211 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6212 INT_MIN / -1 sanitization only for integer types.
6214 2014-04-25 Marek Polacek <polacek@redhat.com>
6217 * c-common.c (handle_noinline_attribute): Warn if the attribute
6218 conflicts with always_inline attribute.
6219 (handle_always_inline_attribute): Warn if the attribute conflicts
6220 with noinline attribute.
6222 2014-04-25 Marek Polacek <polacek@redhat.com>
6225 * c-common.c (check_main_parameter_types): Warn about variadic main.
6227 2014-04-24 Mike Stump <mikestump@comcast.net>
6229 * c.opt (Wshadow-ivar): Default to on.
6231 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6233 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6235 2014-04-23 Marek Polacek <polacek@redhat.com>
6237 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6239 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6242 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6243 if flag_sanitize_undefined_trap_on_error.
6244 (ubsan_instrument_division, ubsan_instrument_shift,
6245 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6246 if !flag_sanitize_recover.
6248 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
6251 * c-common.c (registered_builtin_types): Make non-static.
6252 * c-common.h (registered_builtin_types): Declare.
6254 2014-04-14 Richard Biener <rguenther@suse.de>
6255 Marc Glisse <marc.glisse@inria.fr>
6258 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6259 apply may-alias the scalar pointer type when applicable.
6261 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6264 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6265 as possible argument for Cilk_spawn.
6267 2014-04-11 Tobias Burnus <burnus@net-b.de>
6270 * c.opt (Wformat-signedness): Add
6271 * c-format.c(check_format_types): Use it.
6273 2014-04-11 Jason Merrill <jason@redhat.com>
6276 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6277 default_conversion for an array argument.
6279 2014-04-08 Marek Polacek <polacek@redhat.com>
6282 * c-ubsan.c: Include asan.h.
6283 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6285 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6287 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6289 2014-04-02 Marek Polacek <polacek@redhat.com>
6291 * c-common.h (c_expand_expr): Remove declaration.
6293 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6296 * c-common.c (add_atomic_size_parameter): When creating new
6297 params vector, push the size argument first.
6299 2014-03-26 Jakub Jelinek <jakub@redhat.com>
6301 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6302 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6303 ubsan_create_data callers.
6305 2014-03-22 Jakub Jelinek <jakub@redhat.com>
6308 * c-opts.c (c_finish_options): Restore cb_file_change call to
6311 2014-03-13 Jakub Jelinek <jakub@redhat.com>
6314 * c-pragma.c (apply_pragma_weak): Only look at
6315 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6316 DECL_ASSEMBLER_NAME_SET_P (decl).
6317 (maybe_apply_pending_pragma_weaks): Exit early if
6318 vec_safe_is_empty (pending_weaks) rather than only when
6320 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6321 set assembler name back to NULL afterwards.
6323 2014-03-11 Jason Merrill <jason@redhat.com>
6325 * c.opt: Add -std=gnu++14.
6327 2014-03-11 Ian Bolton <ian.bolton@arm.com>
6329 * c-opts.c (c_common_post_options): Don't override
6330 -ffp-contract=fast if unsafe-math-optimizations is on.
6332 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
6334 * c.opt: Enable LTO FE for fshort-double.
6336 2014-03-07 Jason Merrill <jason@redhat.com>
6338 * c.opt: Add -std=c++14.
6340 2014-03-06 Marek Polacek <polacek@redhat.com>
6343 * cilk.c (contains_cilk_spawn_stmt): New function.
6344 (contains_cilk_spawn_stmt_walker): Likewise.
6345 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6346 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6348 2014-03-03 Jakub Jelinek <jakub@redhat.com>
6350 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6351 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6352 even when flag_preprocess_only.
6354 2014-02-26 Jason Merrill <jason@redhat.com>
6358 * c-common.c (shorten_compare): Don't check
6359 c_inhibit_evaluation_warnings.
6361 2014-02-19 Jakub Jelinek <jakub@redhat.com>
6364 * c-common.c (c_common_nodes_and_builtins): When initializing
6365 c_uint{16,32,64}_type_node, also set corresponding
6366 uint{16,32,64}_type_node to the same value.
6369 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6370 for PRAGMA_IVDEP if flag_preprocess_only.
6372 2014-02-12 Jakub Jelinek <jakub@redhat.com>
6375 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6376 if false, add ADD itself, rather than vice versa.
6377 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6378 copy. For SAVE_EXPR, only call merge_tlist once.
6380 2014-02-08 Jakub Jelinek <jakub@redhat.com>
6383 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6385 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6387 (c_common_attribute_table): Add alloc_align and assume_aligned
6390 2014-02-06 Marek Polacek <polacek@redhat.com>
6393 * c-common.c (warn_for_sign_compare): Call warning_at with location
6396 2014-02-05 Marek Polacek <polacek@redhat.com>
6399 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6402 2014-02-04 Marek Polacek <polacek@redhat.com>
6405 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6408 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
6412 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6413 handle_vector_size_attribute, handle_nonnull_attribute): Call
6414 default_conversion on the attribute argument.
6415 (handle_nonnull_attribute): Increment the argument number.
6417 2014-01-31 Marek Polacek <polacek@redhat.com>
6420 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6421 build_function_call_vec.
6422 (resolve_overloaded_builtin): Likewise.
6423 * c-common.h (build_function_call_vec): Adjust declaration.
6425 2014-01-30 Marek Polacek <polacek@redhat.com>
6428 * c-common.h (unsafe_conversion_p): Adjust declaration.
6429 (warnings_for_convert_and_check): Likewise.
6430 (convert_and_check): Likewise.
6431 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6432 expansion_point_location_if_in_system_header on it.
6433 (warnings_for_convert_and_check): Add location parameter. Call
6434 expansion_point_location_if_in_system_header on it. Use it.
6435 (convert_and_check): Add location parameter. Use it.
6436 (conversion_warning): Likewise.
6437 (c_add_case_label): Adjust convert_and_check calls.
6438 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6440 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6442 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6444 * c-pragma.c (init_pragma): Likewise.
6447 2014-01-23 Marek Polacek <polacek@redhat.com>
6450 * c-common.c (shorten_compare): Add location_t parameter.
6451 * c-common.h (shorten_binary_op): Adjust declaration.
6453 2014-01-23 Marek Polacek <polacek@redhat.com>
6456 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6457 * c-common.h: Declare it.
6459 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6461 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6462 * c-ada-spec.c (dump_ads): Likewise.
6463 (cpp_check): Likewise.
6464 (dump_ada_specs): Likewise.
6466 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
6469 * c-common.c (handle_no_instrument_function_attribute): Allow
6470 no_instrument_function attribute in class member
6471 definition/declaration.
6473 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6476 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6477 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6478 being COMPOUND_EXPR.
6479 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6480 operand a SAVE_EXPR and second MODIFY_EXPR.
6482 2014-01-09 Jakub Jelinek <jakub@redhat.com>
6485 * c-pch.c (c_common_write_pch): Call
6486 prepare_target_option_nodes_for_pch.
6488 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6490 Update copyright years
6492 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6494 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6495 the copyright notice.
6497 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6499 * c-ada-spec.c (print_constructor): New function.
6500 (print_destructor): Retrieve the origin of the destructor.
6501 (print_ada_declaration): Revamp handling of constructors/destructors.
6503 2013-12-23 Stuart Hastings <stuart@apple.com>
6504 Bill Maddox <maddox@google.com>
6505 Jason Merrill <jason@redhat.com>
6507 * c.opt: Add -fdeclone-ctor-dtor.
6508 * c-opts.c (c_common_post_options): Default to on iff -Os.
6510 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6512 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6514 * c-pragma.h (enum pragma_cilk_clause): Remove.
6515 (enum pragma_omp_clause): Added the following fields:
6516 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6517 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6518 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6519 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6520 PRAGMA_CILK_CLAUSE_UNIFORM.
6523 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6525 * cilk.c (cilk_outline): Made this function non-static.
6526 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6527 (create_cilk_wrapper): Added a new parameter: a function pointer.
6528 (c_install_body_w_frame_cleanup): Remove
6529 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6530 * c-common.h (cilk_outline): New prototype.
6531 (gimplify_cilk_spawn): Removed two parameters.
6532 (cilk_install_body_with_frame_cleanup): New prototype.
6533 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6534 CILK_SPAWN_STMT case.
6536 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6538 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6540 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6541 (int_array_type_node): Remove.
6542 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6544 2013-12-05 Marek Polacek <polacek@redhat.com>
6547 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6548 [ADJUST_FIELD_ALIGN].
6550 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6553 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6554 and check field alignment if set.
6555 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6556 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6558 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6559 Marek Polacek <polacek@redhat.com>
6561 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6562 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6564 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6567 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6570 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6573 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6574 goto invalid. If it is error_mark_node, don't issue further
6577 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6579 * c.opt (Wopenmp-simd): New.
6581 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6583 * c-ubsan.h (ubsan_instrument_return): New prototype.
6584 * c-ubsan.c (ubsan_instrument_return): New function.
6586 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6588 * c-common.c: Add required include files from gimple.h.
6589 * c-gimplify.c: Likewise
6592 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6594 * c-common.c (unsafe_conversion_p): Remove use of
6595 EXPR_LOC_OR_HERE macro.
6596 (conversion_warning): Likewise.
6597 (warnings_for_convert_and_check): Likewise.
6598 (warn_for_collisions_1): Likewise.
6599 (shorten_compare): Likewise, and remove use of in_system_header
6600 macro, using the location from the former.
6601 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6602 (cb_def_pragma): Remove use of in_system_header macro.
6603 (lex_string): Likewise.
6604 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6606 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6607 Mike Stump <mikestump@comcast.net>
6608 Richard Sandiford <rdsandiford@googlemail.com>
6610 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6611 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6612 tree_fits_shwi_p or tree_fits_uhwi_p.
6613 (dump_generic_ada_node): Likewise.
6614 * c-format.c (check_format_arg): Likewise.
6615 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6617 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6619 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6621 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6624 * c-common.c (unsafe_conversion_p): Make this function
6625 return an enumeration with more detail.
6626 (conversion_warning): Use the new return type of
6627 unsafe_conversion_p to separately warn either about conversions
6628 that lower floating point number precision or about the other
6629 kinds of conversions.
6630 * c-common.h (enum conversion_safety): New enumeration.
6631 (unsafe_conversion_p): switching return type to
6632 conversion_safety enumeration.
6633 * c.opt: Adding new warning -Wfloat-conversion and
6634 enabling it with -Wconversion.
6636 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6638 * c-opts.c: Include plugin.h.
6639 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6641 2013-11-19 Marek Polacek <polacek@redhat.com>
6643 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6645 (ubsan_instrument_shift): Likewise.
6646 (ubsan_instrument_vla): Likewise.
6648 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6650 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6651 cast to unsigned type.
6653 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6655 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6657 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6658 rather than tree_low_cst.
6660 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6662 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6663 tree_to_uhwi throughout.
6665 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6667 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6668 tree_low_cst (..., 0) with tree_to_shwi throughout.
6670 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6672 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6673 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6675 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6677 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6678 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6680 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6682 * c-cilkplus.c: New file.
6683 * c-common.c (readonly_error): Add location argument.
6684 * c-common.h (readonly_error): Same.
6685 (c_finish_cilk_clauses): Protoize.
6686 (c_check_cilk_loop): Same.
6687 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6688 Do not fail on error_mark_node.
6689 Abstract increment canonicalization to here...
6690 (c_omp_for_incr_canonicalize_ptr): New.
6691 c-pragma.c (init_pragma): Register "simd" pragma.
6692 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6693 (enum pragma_cilk_clause): New.
6695 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6697 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6698 wchar_type and host_integerp checks.
6700 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6702 * c-common.c: Likewise.
6703 * c-gimplify.c: Likewise.
6706 2013-11-14 Diego Novillo <dnovillo@google.com>
6708 * c-common.c: Include fold-const.h.
6709 Include stor-layout.h.
6711 Include stringpool.h.
6714 Include trans-mem.h.
6715 * c-cppbuiltin.c: Include stor-layout.h.
6716 Include stringpool.h.
6717 * c-format.c: Include stringpool.h.
6718 * c-lex.c: Include stringpool.h.
6719 Include stor-layout.h.
6720 * c-pragma.c: Include stringpool.h.
6723 Include gcc-symtab.h.
6724 * c-pretty-print.c: Include stor-layout.h.
6726 * cilk.c: Include stringpool.h.
6729 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6731 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6732 * c-common.c (c_common_reswords): Add __auto_type.
6733 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6735 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6737 * c-common.c: Include gimplify.h.
6738 * c-gimplify.c: Likewise.
6740 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6741 * c-ubsan.c: Don't include gimple.h.
6743 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6745 * c-common.c (c_common_reswords): Add _Thread_local.
6747 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6749 * c-common.c (atomic_size_supported_p): New function.
6750 (resolve_overloaded_atomic_exchange)
6751 (resolve_overloaded_atomic_compare_exchange)
6752 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6753 Use it instead of comparing size with a local list of sizes.
6755 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6756 Joseph Myers <joseph@codesourcery.com>
6758 * c-common.h (enum rid): Add RID_ATOMIC.
6759 * c-common.c (c_common_reswords): Add _Atomic.
6760 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6761 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6762 * c-format.c (check_format_types): Check for extra _Atomic
6763 qualifiers in format argument.
6764 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6765 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6767 2013-11-06 Tobias Burnus <burnus@net-b.de>
6769 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6771 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6773 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6775 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6776 to mean lack of IEEE 754 support.
6778 2013-11-05 Tobias Burnus <burnus@net-b.de>
6780 * c.opt (-Wdate-time): New option
6781 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6783 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6785 * c-cppbuiltin.c (cpp_iec_559_value): Test
6786 flag_excess_precision_cmdline not flag_excess_precision.
6788 2013-11-05 Tobias Burnus <burnus@net-b.de>
6790 * c.opt (fopenmp-simd): New option.
6791 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6792 (omp_pragmas): ... this new struct.
6793 (c_pp_lookup_pragma): Also walk omp_pragmas.
6794 (init_pragma): Init pragmas for -fopenmp-simd.
6796 2013-11-04 Marek Polacek <polacek@redhat.com>
6799 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6801 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6803 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6805 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6807 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6809 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6810 (dump_ada_specs): Adjust prototype of second callback.
6811 * c-ada-spec.c (cpp_check): New global variable.
6812 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6813 (print_generic_ada_decl): Likewise.
6814 (has_static_fields): Change return type to bool and add guard.
6815 (has_nontrivial_methods): New predicate.
6816 (is_tagged_type): Change return type to bool.
6817 (separate_class_package): Call has_nontrivial_methods.
6818 (pp_ada_tree_identifier): Minor tweaks.
6819 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6820 (dump_ada_array_domains): Likewise.
6821 (dump_ada_array_type): Likewise.
6822 (dump_template_types): Remove cpp_check parameter and do not pass it to
6823 dump_generic_ada_node.
6824 (dump_ada_template): Likewise.
6825 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6827 (print_ada_methods): Change return type to integer. Remove cpp_check
6828 parameter and do not pass it down.
6829 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6830 dump_generic_ada_node.
6831 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6833 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6834 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6835 value of print_ada_methods.
6836 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6837 Set cpp_check to it before invoking dump_ada_nodes.
6838 (dump_ada_specs): Likewise.
6840 2013-11-03 Marek Polacek <polacek@redhat.com>
6842 * c-ubsan.c: Don't include hash-table.h.
6843 (ubsan_instrument_vla): New function.
6844 * c-ubsan.h: Declare it.
6846 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6848 Automated part of renaming of symtab_node_base to symtab_node.
6850 Patch autogenerated by rename_symtab.py from
6851 https://github.com/davidmalcolm/gcc-refactoring-scripts
6852 revision 58bb219cc090b2f4516a9297d868c245495ee622
6854 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6855 symtab_node_base to symtab_node.
6857 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6859 Implement C++14 digit separators.
6860 * c-lex.c (interpret_float): Remove digit separators from scratch string
6861 before building real literal.
6863 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6865 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6867 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6869 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6871 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6873 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6874 (insert_cilk_frame): New prototype.
6875 (cilk_init_builtins): Likewise.
6876 (gimplify_cilk_spawn): Likewise.
6877 (c_cilk_install_body_w_frame_cleanup): Likewise.
6878 (cilk_detect_spawn_and_unwrap): Likewise.
6879 (cilk_set_spawn_marker): Likewise.
6880 (build_cilk_sync): Likewise.
6881 (build_cilk_spawn): Likewise.
6884 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6886 Patch autogenerated by refactor_symtab.py from
6887 https://github.com/davidmalcolm/gcc-refactoring-scripts
6888 revision 58bb219cc090b2f4516a9297d868c245495ee622
6890 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6891 to a true class hierarchy.
6892 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6894 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6896 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6898 2013-10-26 Jeff Law <law@redhat.com>
6900 * c-common.c (c_define_builtins): Remove mudflap support.
6901 * c.opt: Ignore and warn for mudflap options.
6903 2013-10-24 Tobias Burnus <burnus@net-b.de>
6906 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6907 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6909 2013-10-23 Jason Merrill <jason@redhat.com>
6911 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6913 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6915 * c-common.h (omp_clause_mask::operator !=): New method.
6916 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6917 instead of if (mask & something) tests everywhere.
6919 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6920 201307 instead of 201107.
6921 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6922 (c_common_attribute_table): Add "omp declare target" and
6923 "omp declare simd" attributes.
6924 (handle_omp_declare_target_attribute,
6925 handle_omp_declare_simd_attribute): New functions.
6926 * c-omp.c: Include c-pragma.h.
6927 (c_finish_omp_taskgroup): New function.
6928 (c_finish_omp_atomic): Add swapped argument, if true,
6929 build the operation first with rhs, lhs arguments and use NOP_EXPR
6931 (c_finish_omp_for): Add code argument, pass it down to make_code.
6932 (c_omp_split_clauses): New function.
6933 (c_split_parallel_clauses): Removed.
6934 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6935 c_omp_declare_simd_clauses_to_decls): New functions.
6936 * c-common.h (omp_clause_mask): New type.
6937 (OMP_CLAUSE_MASK_1): Define.
6938 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6939 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6940 omp_clause_mask::operator |, omp_clause_mask::operator &,
6941 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6942 omp_clause_mask::operator ==): New methods.
6943 (enum c_omp_clause_split): New.
6944 (c_finish_omp_taskgroup): New prototype.
6945 (c_finish_omp_atomic): Add swapped argument.
6946 (c_finish_omp_for): Add code argument.
6947 (c_omp_split_clauses): New prototype.
6948 (c_split_parallel_clauses): Removed.
6949 (c_omp_declare_simd_clauses_to_numbers,
6950 c_omp_declare_simd_clauses_to_decls): New prototypes.
6951 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6953 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6954 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6955 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6956 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6957 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6958 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6959 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6960 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6961 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6962 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6963 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6964 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6965 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6966 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6967 PRAGMA_OMP_CLAUSE_UNIFORM.
6969 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6971 PR tree-optimization/20318
6972 * c-common.c (handle_returns_nonnull_attribute): New function.
6973 (c_common_attribute_table): Add returns_nonnull.
6975 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6978 * c.opt (fcheck-new): Move to common.opt.
6980 2013-09-25 Marek Polacek <polacek@redhat.com>
6981 Jakub Jelinek <jakub@redhat.com>
6984 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6985 an expression if we can prove it is correct.
6986 (ubsan_instrument_division): Likewise. Remove unnecessary
6989 2013-09-18 Marek Polacek <polacek@redhat.com>
6992 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6994 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6996 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6999 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7000 fobjc-gc, freplace-objc-classes): Accept for LTO.
7002 2013-09-13 Jacek Caban <jacek@codeweavers.com>
7004 * c-target.def: New hook
7006 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7009 * c.opt (Wdelete-incomplete): Add.
7011 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7013 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7014 (vector_types_compatible_elements_p): New function.
7015 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7017 (vector_types_compatible_elements_p): Declare.
7019 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7021 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7022 a virtual member function.
7023 (pp_simple_type_specifier): Remove.
7024 (pp_c_type_specifier): Likewise.
7025 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7026 Rename from pp_c_type_specifier. Adjust.
7027 (c_pretty_printer::c_pretty_printer): Do not assign to
7028 simple_type_specifier.
7030 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7032 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7034 (c_pretty_printer::storage_class_specifier): Likewise.
7035 (c_pretty_printer::initializer): Likewise.
7036 (pp_declaration): Remove.
7037 (pp_declaration_specifiers): Likewise.
7038 (pp_abstract_declarator): Likewise.
7039 (pp_declarator): Likewise.
7040 (pp_type_id): Likewise.
7041 (pp_statement): Likewise.
7042 (pp_constant): Likewise.
7043 (pp_id_expression): Likewise.
7044 (pp_primary_expression): Likewise.
7045 (pp_unary_expression): Likewise.
7046 (pp_multiplicative_expression): Likewise.
7047 (pp_conditional_expression): Likewise.
7048 (pp_assignment_expression): Likewise.
7049 (pp_expression): Likewise.
7050 (pp_c_type_id): Likewise.
7051 (pp_c_storage_class_specifier): Likewise.
7052 * c-pretty-print.c (pp_c_type_cast): Tidy.
7053 (pp_c_pointer): Likewise.
7054 (pp_c_type_specifier): Likewise.
7055 (pp_c_parameter_type_list): Likewise.
7056 (pp_c_function_definition): Likewise.
7057 (pp_c_init_declarator): Likewise.
7058 (pp_c_initializer_list): Likewise.
7059 (pp_c_constructor_elts): Likewise.
7060 (c_pretty_printer::direct_abstract_declarator): Likewise.
7061 (c_pretty_printer::declaration_specifiers): Likewise.
7062 (c_pretty_printer::primary_expression): Likewise.
7063 (c_pretty_printer::postfix_expression): Likewise.
7064 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7065 (c_pretty_printer::storage_class_specifier): Rename from
7066 pp_c_storage_class_specifier.
7067 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7068 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7069 storage_class_specifier, initializer, offset_list, flags.
7071 2013-08-30 Marek Polacek <polacek@redhat.com>
7073 * c-ubsan.c: New file.
7074 * c-ubsan.h: New file.
7076 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7078 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7080 (c_pretty_printer::declaration_specifiers): Likewise.
7081 (c_pretty_printer::declarator): Likewise.
7082 (c_pretty_printer::abstract_declarator): Likewise.
7083 (c_pretty_printer::direct_abstract_declarator): Likewise.
7084 (c_pretty_printer::direct_declarator): Likewise.
7085 (c_pretty_printer::function_specifier): Likewise.
7086 (pp_declaration): Adjust.
7087 (pp_declaration_specifiers): Likewise.
7088 (pp_abstract_declarator): Likewise.
7089 (pp_direct_declarator): Likewise.
7090 (pp_function_specifier): Likewise.
7091 (pp_direct_abstract_declarator): Remove as unused.
7092 (pp_c_declaration): Remove.
7093 (pp_c_declaration_specifiers): Likewise.
7094 (pp_c_declarator): Likewise.
7095 (pp_c_direct_declarator): Likewise.
7096 (pp_c_function_specifier): Likewise.
7097 (pp_c_direct_abstract_declarator): Likewise.
7098 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7099 from pp_c_abstract_declarator. Adjust.
7100 (c_pretty_printer::direct_abstract_declarator): Rename from
7101 pp_c_direct_abstract_declarator. Adjust.
7102 (c_pretty_printer::function_specifier): Rename from
7103 pp_c_function_specifier. Adjust.
7104 (c_pretty_printer::declaration_specifiers): Rename from
7105 pp_c_declaration_specifiers. Adjust.
7106 (c_pretty_printer::direct_declarator): Rename from
7107 pp_c_direct_declarator. Adjust.
7108 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7109 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7110 (c_pretty_printer::c_pretty_printer): Do not assign to
7111 declaration, declaration_specifiers, declarator,
7112 direct_declarator, direct_abstract_declarator, function_specifier.
7114 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7116 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7117 virtual member function.
7118 (c_pretty_printer::multiplicative_expression): Likewise.
7119 (c_pretty_printer::conditional_expression): Likewise.
7120 (c_pretty_printer::assignment_expression): Likewise.
7121 (c_pretty_printer::expression): Likewise.
7122 (pp_unary_expression): Adjust.
7123 (pp_multiplicative_expression): Likewise.
7124 (pp_assignment_expression): Likewise.
7125 (pp_conditional_expression): Likewise.
7126 (pp_expression): Likewise.
7127 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7128 from pp_c_unary_expression. Adjust.
7129 (c_pretty_printer::multiplicative_expression): Rename from
7130 pp_c_multiplicative_expression. Adjust.
7131 (c_pretty_printer::conditional_expression): Rename from
7132 pp_c_conditional_expression. Adjust.
7133 (c_pretty_printer::assignment_expression): Rename from
7134 pp_c_assignment_expression. Adjust.
7135 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7136 (c_pretty_printer::c_pretty_printer): Do not assign to
7137 unary_expression, multiplicative_expression,
7138 conditional_expression, expression.
7140 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7142 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7143 virtual member function.
7144 (pp_postfix_expression): Adjust.
7145 (pp_c_postfix_expression): Remove.
7146 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7147 from pp_c_postfix_expression. Adjust.
7148 (c_pretty_printer::c_pretty_printer): Do not assign to
7151 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7153 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7154 virtua member function.
7155 (pp_primary_expression): Adjust.
7156 (pp_c_primary_expression): Remove.
7157 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7158 from pp_c_primary_expression. Adjust.
7159 (pp_c_initializer_list): Use pp_primary_expression.
7160 (c_pretty_printer::c_pretty_printer): Do not assign to
7163 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7165 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7166 * c-pretty-print.c (M_): Remove.
7167 (c_pretty_printer::translate_string): Define.
7168 (pp_c_type_specifier): Use it.
7169 (pp_c_primary_expression): Likewise.
7170 (pp_c_expression): Likewise.
7172 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7174 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7176 (pp_c_id_expression): Remove.
7177 (pp_id_expression): Adjust.
7178 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7179 pp_c_id_expression. Adjust.
7180 (pp_c_postfix_expression): Use pp_id_expression.
7181 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7183 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7185 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7187 (pp_constant): Adjust.
7188 (pp_c_constant): Remove.
7189 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7190 pp_c_constant. Adjust.
7192 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7193 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7195 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7197 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7198 (c_pretty_printer::c_pretty_printer): Declare.
7199 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7200 c_pretty_printer_init. Adjust.
7201 (print_c_tree): Do not call c_pretty_printer_init.
7202 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7204 2013-08-09 Arnaud Charlet <charlet@adacore.com>
7206 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7208 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7211 * c-common.c (pointer_int_sum): Add bool parameter.
7212 * c-common.h (pointer_int_sum): Adjust declaration.
7214 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7216 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7217 c_pretty_printer variable.
7219 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7221 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7223 (pp_c_base): Likewise. Adjust users.
7224 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7225 (pp_c_whitespace): Do not call pp_base.
7226 (pp_c_left_paren): Likewise.
7227 (pp_c_right_paren): Likewise.
7228 (pp_c_left_brace): Likewise.
7229 (pp_c_right_brace): Likewise.
7230 (pp_c_left_bracket): Likewise.
7231 (pp_c_right_bracket): Likewise.
7232 (pp_c_dot): Likewise.
7233 (pp_c_ampersand): Likewise.
7234 (pp_c_star): Likewise.
7235 (pp_c_arrow): Likewise.
7236 (pp_c_semicolon): Likewise.
7237 (pp_c_complement): Likewise.
7238 (pp_c_exclamation): Likewise.
7239 (pp_c_direct_declarator): Likewise.
7240 (pp_c_ws_string): Likewise.
7241 (pp_c_identifier): Likewise.
7242 (pp_c_statement): Likewise.
7243 (print_c_tree): Likewise.
7245 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7248 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7249 provide useful error strings.
7251 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7253 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7254 printer functions instead of pp_string or operators and punctuators.
7255 (dump_generic_ada_node): Likewise.
7256 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7257 (pp_c_relational_expression): Likewise.
7258 (pp_c_logical_or_expression): Likewise.
7260 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7262 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7263 functions instead of pp_character.
7264 (pp_ada_tree_identifier): Likewise.
7265 (dump_ada_double_name): Likewise.
7266 (dump_ada_function_declaration): Likewise.
7267 (dump_ada_array_domains): Likewise.
7268 (dump_template_types): Likewise.
7269 (dump_generic_ada_node): Likewise.
7270 (print_ada_declaration): Likewise.
7271 (print_ada_struct_decl): Likewise.
7272 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7274 2013-07-23 Tom Tromey <tromey@redhat.com>
7276 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7277 * c-common.c (c_common_reswords): Add _Generic.
7279 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
7281 * c-common.c: Fix typos.
7282 * c-common.h: Likewise.
7284 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
7287 * c-common.c (c_common_attribute_table): Add warn_unused.
7288 (handle_warn_unused_attribute): New.
7290 2013-07-10 Jakub Jelinek <jakub@redhat.com>
7292 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7293 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7295 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7298 * c.opt: Add Wconditionally-supported.
7300 2013-07-08 Graham Stott <graham.stott@btinternet.com>
7302 * array-notation-common.c (length_mismatch_in_expr_p): Delete
7303 unused variables l_length and l_node.
7305 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7308 * c-common.c (complete_array_type): Delay folding first index
7309 like other indices. When folding, check for index overflow.
7311 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
7314 * c-common.h (c_build_vec_perm_expr): New complain argument.
7315 * c-common.c (c_build_vec_perm_expr): Likewise.
7316 Use save_expr also in C++.
7318 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7320 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7321 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7322 * c-opts.c (c_common_post_options): Likewise.
7324 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7326 * array-notation-common.c (length_mismatch_in_expr): Changed the
7327 parameter type's from a dynamic array to a vec_tree. Also removed
7328 the size parameters.
7329 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7332 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7334 * c-common.h (struct cilkplus_an_parts): New structure.
7335 (struct cilkplus_an_loop_parts): Likewise.
7336 (cilkplus_extract_an_triplets): New prototype.
7337 (fix_sec_implicit_args): Likewise.
7338 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7339 (fix_sec_implicit_args): Likewise.
7341 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7343 * array-notation-common.c (find_inv_trees): Removed an unwanted
7345 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7346 enum rid to enum tree_code.
7348 2013-06-11 Jan Hubicka <jh@suse.cz>
7350 * c-common.c (handle_alias_ifunc_attribute): Do not set
7351 DECL_EXTERNAL for weakref variables.
7352 * c-pragma.c (handle_pragma_weak): Make sure aliases
7353 are not declared as external.
7355 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7357 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7358 function from c/c-array-notation.c.
7359 (is_cilkplus_reduce_builtin): Likewise.
7360 (find_rank): Likewise.
7361 (extract_array_notation_exprs): Likewise.
7362 (replace_array_notations): Likewise.
7363 (find_inv_trees): Likewise.
7364 (replace_inv_trees): Likewise.
7365 (contains_array_notation_expr): Likewise.
7366 (find_correct_array_notation_type): Likewise.
7367 * c-common.h (struct inv_list): Moved this struct from the file
7368 c/c-array-notation.c and added a new field called additional tcodes.
7369 (length_mismatch_in_expr_p): New prototype.
7370 (is_cilkplus_reduce_builtin): Likewise.
7371 (find_rank): Likewise.
7372 (extract_array_notation_exprs): Likewise.
7373 (replace_array_notation): Likewise.
7374 (find_inv_trees): Likewise.
7375 (replace_inv_trees): Likewise.
7376 (find_correct_array_notation_type): Likewise.
7378 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7380 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7381 function array_notation_init_builtins is called.
7382 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7383 * c-common.def (ARRAY_NOTATION_REF): New tree.
7384 * c-common.h (build_array_notation_expr): New function declaration.
7385 (build_array_notation_ref): Likewise.
7386 (extract_sec_implicit_index_arg): New extern declaration.
7387 (is_sec_implicit_index_fn): Likewise.
7388 (ARRAY_NOTATION_CHECK): New define.
7389 (ARRAY_NOTATION_ARRAY): Likewise.
7390 (ARRAY_NOTATION_START): Likewise.
7391 (ARRAY_NOTATION_LENGTH): Likewise.
7392 (ARRAY_NOTATION_STRIDE): Likewise.
7393 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7395 (pp_c_expression): Likewise.
7396 * c.opt (flag_enable_cilkplus): New flag.
7397 * array-notation-common.c: New file.
7399 2013-05-14 Jakub Jelinek <jakub@redhat.com>
7402 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7404 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
7406 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7409 2013-05-07 Han Shen <shenhan@google.com>
7411 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7413 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7415 * c-common.c (check_user_alignment): Emit error for negative values.
7417 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7419 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7421 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7423 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7424 __GXX_EXPERIMENTAL_CXX1Y__.
7426 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7427 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
7429 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7430 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7431 to simply use OPT_Wpointer_arith.
7432 (c_sizeof_or_alignof_type): Likewise.
7434 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7436 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7438 2013-04-12 Jakub Jelinek <jakub@redhat.com>
7440 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7441 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7444 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7446 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7448 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7450 * c-common.c (pointer_int_sum): Remove dead code.
7452 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7455 * c-common.c (handle_optimize_attribute): Don't call
7456 save_optabs_if_changed.
7458 2013-03-05 Jakub Jelinek <jakub@redhat.com>
7461 * c-pch.c (pch_init): Free target_validity at the end.
7463 2013-03-04 Jakub Jelinek <jakub@redhat.com>
7465 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7467 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7468 Jakub Jelinek <jakub@redhat.com>
7471 * c-common.c (handle_no_sanitize_address_attribute): New function.
7472 (c_common_attribute_table): Add no_sanitize_address attribute.
7473 (handle_no_address_safety_analysis_attribute): Add
7474 no_sanitize_address attribute, not no_address_safety_analysis
7477 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
7480 * c-common.c (handle_optimize_attribute): Call
7481 save_optabs_if_changed.
7483 2013-02-18 Jakub Jelinek <jakub@redhat.com>
7484 Steven Bosscher <steven@gcc.gnu.org>
7487 * c-opts.c (c_common_post_options): If debug info is enabled
7488 and non-dwarf*, refuse to load PCH files and when writing PCH
7491 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7494 * c-common.c (handle_error_attribute): Fix condition.
7496 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7499 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7501 2013-01-18 Jason Merrill <jason@redhat.com>
7504 * c.opt (-fextern-tls-init): New.
7505 * c-opts.c (c_common_post_options): Handle it.
7507 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7510 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7511 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7512 and is either negative or bigger or equal to type precision
7513 of the first operand.
7515 2012-12-03 Marek Polacek <polacek@redhat.com>
7518 * c-common.c (check_user_alignment): Swap order of tests,
7519 check TREE_CODE first.
7521 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7524 * c-common.h (overflow_type): New enum.
7525 (build_userdef_literal): Add overflow_type argument.
7526 (tree_userdef_literal): Add overflow_type.
7527 (USERDEF_LITERAL_OVERFLOW): New access macro.
7528 * c-common.c (build_userdef_literal): Add overflow_type
7530 * c-lex.c (c_lex_with_flags): Add overflow_type to
7531 build_userdef_literal calls.
7532 (interpret_integer, interpret_float): Add overflow_type argument.
7534 2012-11-28 Richard Biener <rguenther@suse.de>
7537 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7538 here and use a type with proper overflow behavior for types that would
7539 need to be promoted for the arithmetic.
7541 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7544 * c-common.c (handle_no_address_safety_analysis_attribute): New
7546 (c_common_attribute_table): Add no_address_safety_analysis.
7548 2012-11-16 Simon Baldwin <simonb@google.com>
7550 * c.opt: Add f[no-]canonical-system-headers.
7551 * c-opts.c (c_common_handle_option): Handle
7552 OPT_fcanonical_system_headers.
7554 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7557 * c-opts.c (c_common_handle_option): Set new flags.
7558 * c.opt: Describe new flags.
7560 2012-11-09 Jason Merrill <jason@redhat.com>
7562 * c.opt (Wabi-tag): New.
7564 2012-11-09 Andi Kleen <ak@linux.intel.com>
7567 * c-common.c (get_atomic_generic_size): Mask with
7570 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7573 * c.opt (Wformat): Make it Alias Wformat=1.
7574 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7575 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7577 (Wformat=): RejectNegative. Use LangEnabledBy.
7578 (Wnonnull): Use LangEnabledBy.
7579 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7580 * c-format.c (set_Wformat): Delete.
7581 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7582 (maybe_read_dollar_number): Likewise.
7583 (avoid_dollar_number): Likewise.
7584 (finish_dollar_format_checking): Likewise.
7585 (check_format_info): Likewise.
7586 (check_format_info_main): Likewise.
7587 (check_format_types): Likewise.
7588 (format_type_warning): Likewise.
7589 * c-common.c (int): Likewise.
7590 (check_function_sentinel): Likewise.
7591 * c-common.h (warn_format,set_Wformat): Do not declare here.
7593 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7596 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7597 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7599 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7601 (Wvariadic-macros): Init(1).
7602 * c-opts.c (c_common_handle_option): Do not handle them
7604 (c_common_post_options): Likewise.
7605 (sanitize_cpp_opts): warn_unused_macros is now
7606 cpp_warn_unused_macros.
7607 (push_command_line_include): Likewise.
7608 * c-common.c (warn_unknown_pragmas): Do not define.
7609 * c-common.h (warn_unknown_pragmas): Do not declare.
7611 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7614 * c-common.c (conversion_warning): Handle conditional expressions.
7616 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7619 * c.opt (Wreturn_local_addr): Define new option.
7621 2012-10-25 Jason Merrill <jason@redhat.com>
7623 * c.opt (Wvirtual-move-assign): New.
7625 * c.opt (Winherited-variadic-ctor): New.
7627 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7630 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7632 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7634 * c-common.h (pch_cpp_save_state): Declare.
7635 * c-target.def (c_preinclude): New hook.
7636 * c-opts.c (done_preinclude): New.
7637 (push_command_line_include): Handle default preincluded header.
7638 (cb_file_change): Call pch_cpp_save_state when calling
7639 push_command_line_include.
7640 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7641 (pch_cpp_save_state): New.
7642 (pch_init): Call pch_cpp_save_state conditionally, instead of
7643 calling cpp_save_state.
7645 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7649 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7650 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7651 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7652 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7653 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7654 * c-opts.c (c_common_handle_option): Remove explicit handling from
7656 (c_common_post_options): Likewise.
7658 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7660 * c-ada-spec.c (LOCATION_COL): Delete.
7661 (compare_location): New function.
7662 (compare_node): Use it.
7663 (compare_comment): Likewise.
7665 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7669 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7670 * c-opts.c (c_common_handle_option): Do not set them here. Add
7672 (c_common_post_options): Likewise.
7674 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7676 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7677 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7678 Remove POINTER_TYPE handling, add large unsigned handling and use
7679 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7681 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7684 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7685 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7686 locs and array of 3 trees instead of just single loc and single
7687 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7688 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7689 For *cmp* builtins that take two sources strings report warnings
7690 about first and second source, not about destination and source.
7692 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7695 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7697 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7699 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7700 declaring something coming from another file.
7702 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7705 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7707 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7710 * c-common.c (warn_about_parentheses): Add location_t parameter;
7711 use EXPR_LOC_OR_LOC.
7712 * c-common.h: Update declaration.
7714 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7717 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7718 more operations. Make error messages optional.
7719 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7720 (scalar_to_vector): Declare.
7722 2012-10-08 Jason Merrill <jason@redhat.com>
7724 * c-common.c (c_common_reswords): Add thread_local.
7726 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7728 PR c++/53528 C++11 attribute support
7729 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7731 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7733 (handle_aligned_attribute): In choose strictest alignment
7734 among many. Use new check_cxx_fundamental_alignment_constraints.
7735 (handle_transparent_union_attribute): In c++11 attribute syntax,
7736 don't look through typedefs.
7738 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7740 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7741 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7744 2012-09-25 Dehao Chen <dehao@google.com>
7747 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7748 map when read in the pch.
7750 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7752 * c-ada-spec.c: Style fixes.
7754 2012-09-18 Thomas Quinot <quinot@adacore.com>
7756 * c.opt (-fada-spec-parent): Define new command line switch.
7757 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7758 is specified, generate binding spec as a child of the specified unit.
7760 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7761 Manuel López-Ibáñez <manu@gcc.gnu.org>
7764 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7766 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7768 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7769 for pointers, and add missing Convention C pragma.
7770 (print_ada_struct_decl): Add missing aliased keyword.
7771 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7773 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7775 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7776 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7777 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7778 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7779 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7781 2012-08-10 Richard Guenther <rguenther@suse.de>
7783 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7785 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7787 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7788 instead of separate pp_newline and pp_flush.
7789 (print_c_tree): Likewise.
7791 2012-07-26 Richard Henderson <rth@redhat.com>
7793 * c-common.c (handle_hot_attribute): Allow labels.
7794 (handle_cold_attribute): Likewise.
7796 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7799 * c-common.c (check_function_nonnull): Handle multiple nonnull
7800 attributes properly.
7802 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7804 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7805 * c-ada-spec.c: Likewise.
7806 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7808 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7810 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7811 Remove code conditional on it.
7813 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7815 * c-gimplify.c: Do not include basic-block.h.
7816 * c-common.c: Do not include linfuncs.h.
7818 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7820 * c-common.h: Include tree.h.
7822 2012-07-02 Jason Merrill <jason@redhat.com>
7825 * c-common.c (get_priority): Call default_conversion.
7827 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7829 * c-pch.c (c_common_write_pch): Remove unused variables.
7831 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7833 * cppspec.c: Moved from gcc/ to here.
7835 2012-06-27 Kai Tietz <ktietz@redhat.com>
7837 PR preprocessor/37215
7838 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7840 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7842 * c-common.h (c_common_print_pch_checksum): Remove.
7843 * c-pch.c: Do not include output.h.
7844 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7845 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7846 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7847 (struct c_pch_header): Remove.
7848 (get_ident): Update gpch version.
7849 (pch_init): Do not print executable_checksum to asm_out_file.
7850 Do not fail if there is no asm_out_file to read back from. Set
7851 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7852 (c_common_write_pch): Verify that nothing was written to asm_out_file
7853 since pch_init was called. Do not write a c_pch_header, and do not
7854 copy from asm_out_file to the PCH.
7855 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7856 the content of asm_out_file from the PCH.
7857 (c_common_print_pch_checksum): Remove.
7858 * c-opts.c (c_common_init): Print out executable_checksum directly.
7860 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7862 * c-target.def (objc_declare_unresolved_class_reference,
7863 objc_declare_class_definition): Add new hooks.
7865 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7867 * c-lex.c: Do not include output.h.
7868 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7869 Remove uses of ASM_OUTPUT_IDENT.
7871 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7874 * c-common.h (c_build_vec_perm_expr): Move decl here.
7875 * c-common.c (c_build_vec_perm_expr): Move definition
7878 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7880 * c.opt (fconserve-space): Turn into a no-op.
7882 2012-06-04 Sterling Augustine <saugustine@google.com>
7884 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7885 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7886 both the start and end of the function.
7888 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7890 * c-common.c: Do not include output.h.
7891 * c-pragma.c: Likewise.
7893 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7895 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7896 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7897 (lang_decl_name): Handle namespace decls.
7899 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7901 * c-ada-spec.c: Do not include output.h.
7902 * c-semantics.c: Likewise.
7904 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7906 * c-common.c: Fix typo.
7908 2012-05-29 Michael Matz <matz@suse.de>
7910 * c-common.h (c_expand_decl): Remove prototype.
7912 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7914 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7915 * c-opts.c (c_common_handle_option): Remove code handling
7916 warn_missing_braces.
7918 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7921 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7924 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7927 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7929 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7931 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7932 * c-opts.c (c_common_handle_option): Do not handle explicitly
7933 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7935 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7937 PR preprocessor/7263
7938 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7939 to cpp_classify_number. For diagnostics, use the precise location
7940 instead of the global input_location.
7942 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7945 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7947 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7949 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7951 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7954 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7955 Wreorder): Use LangEnabledBy.
7956 * c-opts.c (c_common_handle_option): Do not enable them
7957 explicitly. Call lang-specific generated functions.
7958 (c_common_post_options): Do not set them here.
7960 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7962 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7963 Wmissing-field-initializers,Wmissing-parameter-type,
7964 Wold-style-declaration,Woverride-init): Use EnabledBy.
7965 * c-opts.c (c_common_post_options): Do not set here explicitly.
7967 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7970 * c-opts.c (c_common_handle_option): Use handle_generated_option
7971 to enable sub-options.
7973 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7976 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7978 2012-05-10 Richard Guenther <rguenther@suse.de>
7980 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7981 adjust commentary about TYPE_IS_SIZETYPE types.
7983 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7986 * c-common.c (warn_logical_operator): Check that argument of
7987 integer_zerop is not NULL.
7989 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7992 * c-common.c (warn_logical_operator): Do not warn if either side
7993 is already true or false.
7995 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7998 * c-common.c (expr_original_type): New.
7999 (shorten_compare): Do not warn for enumeration types.
8001 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8003 * c.opt (fpermissive): Add Var(flag_permissive).
8005 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
8008 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8009 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8011 2012-04-30 Dodji Seketeli <dodji@redhat.com>
8013 Add -Wvarargs option
8014 * c.opt (Wvarargs): Define new option.
8016 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8018 * c-common.c (check_function_arguments): Replace
8019 Wmissing-format-attribute with Wsuggest-attribute=format.
8021 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8023 * c.opt (Wsuggest-attribute=format): New. Alias of
8024 Wmissing-format-attribute.
8025 * c-format.c (decode_format_type): Replace
8026 Wmissing-format-attribute with Wsuggest-attribute=format.
8027 (check_function_format): Likewise.
8029 2012-04-27 Ollie Wild <aaw@google.com>
8031 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8032 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8033 * c.opt: Add Wliteral-suffix.
8035 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8038 * c.opt (Wpedantic): New.
8039 (pedantic): Alias Wpedantic.
8040 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8041 (c_common_post_options): Likewise.
8042 (sanitize_cpp_opts): Likewise.
8043 * c-lex.c (interpret_float): Likewise.
8044 * c-format.c (check_format_types): Likewise.
8045 * c-common.c (pointer_int_sum): Likewise.
8046 (c_sizeof_or_alignof_type): Likewise.
8047 (c_add_case_label): Likewise.
8048 (c_do_switch_warnings): Likewise.
8049 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8051 2012-04-15 Jason Merrill <jason@redhat.com>
8054 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8055 (C_STD_NAME): Distinguish between C++98 and C++11.
8057 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8060 * c-common.h (uint16_type_node): Rename into...
8061 (c_uint16_type_node): ...this.
8062 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8063 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8065 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8067 * c-common.c (warn_if_unused_value): Move definition to here.
8068 * c-common.h (warn_if_unused_value): Move declaration to here.
8070 2012-03-23 William Bader <williambader@hotmail.com>
8072 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8074 2012-03-20 Jason Merrill <jason@redhat.com>
8076 * c-common.h (enum cxx_dialect): Add cxx1y.
8077 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8079 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8080 * c-opts.c (c_common_post_options): Likewise.
8081 (set_std_cxx1y): New.
8082 (c_common_handle_option): Call it.
8083 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8085 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8088 * c.opt ([Wuseless-cast]): Add.
8090 2012-03-16 Richard Guenther <rguenther@suse.de>
8092 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8094 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8097 * c.opt (ftemplate-backtrace-limit) Add.
8099 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8101 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8103 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8104 (init_pragma): Don't register extern_prefix.
8106 2012-03-12 Richard Guenther <rguenther@suse.de>
8108 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8109 (builtin_type_for_size): Likewise.
8111 2012-02-13 Jakub Jelinek <jakub@redhat.com>
8114 * c-common.c (sync_resolve_params): Don't decide whether to convert
8115 or not based on TYPE_SIZE comparison, convert whenever arg_type
8116 is unsigned INTEGER_TYPE.
8118 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8121 * c.opt ([Wunused-local-typedefs]): Fix description.
8123 2012-01-24 Mike Stump <mikestump@comcast.net>
8125 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8128 2012-01-18 Richard Guenther <rguenther@suse.de>
8130 * c-opts.c (c_common_post_options): Reset LTO flags if
8131 we are about to generate a PCH.
8133 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8136 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8137 use pp_unsigned_wide_integer.
8139 2012-01-10 Richard Guenther <rguenther@suse.de>
8142 * c-opts.c (c_common_handle_option): Move -Werror handling
8143 to language independent code.
8145 2012-01-05 Richard Guenther <rguenther@suse.de>
8148 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8151 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8154 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8155 of array types with an unknown bound.
8157 2011-12-20 Joseph Myers <joseph@codesourcery.com>
8159 * c-common.c (flag_isoc99): Update comment to refer to C11.
8160 (flag_isoc1x): Change to flag_isoc11.
8161 * c-common.h (flag_isoc99): Update comment to refer to C11.
8162 (flag_isoc1x): Change to flag_isoc11.
8163 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8165 * c-opts.c (set_std_c1x): Change to set_std_c11.
8166 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8168 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8169 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8170 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8172 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8173 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8174 (std=gnu1x): Make alias of std=gnu11.
8176 2011-12-19 Jason Merrill <jason@redhat.com>
8179 * c-common.c (handle_transparent_union_attribute): Check the first
8180 field if the type is complete.
8182 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8185 * c-common.c (RID_IS_FINAL): Add.
8186 * c-common.h (RID_IS_FINAL): Add.
8188 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8190 * c.opt (fgnu-runtime): Provide full description.
8191 (fnext-runtime): Likewise.
8192 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8194 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
8196 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8197 predefines in one place. Add LOCK_FREE predefines.
8198 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8201 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
8204 * c-common.c (get_atomic_generic_size): Check for various error
8206 (resolve_overloaded_atomic_exchange,
8207 resolve_overloaded_atomic_compare_exchange,
8208 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8209 error_mark_node for error conditions.
8211 2011-11-08 Richard Guenther <rguenther@suse.de>
8216 2011-11-07 Richard Henderson <rth@redhat.com>
8217 Aldy Hernandez <aldyh@redhat.com>
8218 Torvald Riegel <triegel@redhat.com>
8220 Merged from transactional-memory.
8222 * c-common.c (handle_tm_wrap_attribute,
8223 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8224 (struct c_common_reswords): Added __transaction* keywords.
8225 (struct c_common_attribute_table): Added transaction* and tm_regparm
8227 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8229 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8230 find_tm_attribute): Declare.
8232 2011-11-07 Jason Merrill <jason@redhat.com>
8235 * c-common.c, c-common.h: Revert yesterday's changes.
8237 2011-11-06 Jason Merrill <jason@redhat.com>
8240 * c-common.c (decl_has_visibility_attr): Split out from...
8241 (c_determine_visibility): ...here.
8242 * c-common.h: Declare it.
8244 2011-11-06 Joseph Myers <joseph@codesourcery.com>
8246 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8247 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8249 (check_user_alignment): New. Split out of
8250 handle_aligned_attribute. Disallow integer constants with
8251 noninteger types. Conditionally allow zero.
8252 (handle_aligned_attribute): Use check_user_alignment.
8253 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8255 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
8256 Richard Henderson <rth@redhat.com>
8258 Merged from cxx-mem-model.
8260 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
8261 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
8262 parameters that are the same type size.
8263 (get_atomic_generic_size): New. Find size of generic
8264 atomic function parameters and do typechecking.
8265 (add_atomic_size_parameter): New. Insert size into parameter list.
8266 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8267 either __atomic_exchange_n or external library call.
8268 (resolve_overloaded_atomic_compare_exchange): Restructure
8269 __atomic_compare_exchange to either _n variant or external library call.
8270 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
8271 __atomic_load_n or an external library call.
8272 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8273 __atomic_store_n or an external library call.
8274 (resolve_overloaded_builtin): Handle new __atomic builtins.
8276 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8279 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8280 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8281 <INDIRECT_REF>: Return the argument.
8282 <ARRAY_REF>: Remove special code for negative offset.
8283 Call fold_build_pointer_plus instead of size_binop.
8284 (fold_offsetof): Remove STOP_REF argument and adjust.
8285 * c-common.h (fold_offsetof_1): Declare.
8286 (fold_offsetof): Remove STOP_REF argument.
8288 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8291 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8292 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8293 Wnarrowing for C++0x and C++98.
8294 * c.opt ([Wnarrowing]): Update.
8296 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8299 * c.opt: Add Wzero-as-null-pointer-constant.
8301 2011-10-31 Jason Merrill <jason@redhat.com>
8303 * c.opt (-fdeduce-init-list): Off by default.
8306 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8307 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8309 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8311 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8314 * c.opt (fvisibility-inlines-hidden): Description change.
8316 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8318 Implement C++11 user-defined literals.
8319 * c-common.c (build_userdef_literal): New.
8320 * c-common.def: New tree code.
8321 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8322 * c-lex.c (interpret_float): Add suffix parm.
8323 (c_lex_with_flags): Build literal tokens.
8325 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8329 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8332 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8333 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8334 Wnarrowing for C++0x and C++98.
8335 * c.opt ([Wnarrowing]): Update.
8337 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8340 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8341 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8342 Wnarrowing for C++0x and C++98.
8343 * c.opt ([Wnarrowing]): Update.
8345 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8348 * c-common.c (conversion_warning): Remove code looking for
8349 artificial operands.
8351 2011-10-18 Dodji Seketeli <dodji@redhat.com>
8354 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
8355 !NO_IMPLICIT_EXTERN_C.
8357 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
8359 * c-common.c (c_common_reswords): Add __bases,
8361 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8363 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8366 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8368 2011-10-15 Tom Tromey <tromey@redhat.com>
8369 Dodji Seketeli <dodji@redhat.com>
8371 * c.opt (fdebug-cpp): New option.
8372 * c-opts.c (c_common_handle_option): Handle the option.
8373 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8374 output stream in parameter. Factorized from ...
8375 (maybe_print_line): ... this. Dump location debug information when
8376 -fdebug-cpp is in effect.
8377 (print_line_1): New static function. Takes an output stream in
8378 parameter. Factorized from ...
8379 (print_line): ... here. Dump location information when -fdebug-cpp
8381 (scan_translation_unit): Dump location information when
8382 -fdebug-cpp is in effect.
8384 2011-10-15 Tom Tromey <tromey@redhat.com>
8385 Dodji Seketeli <dodji@redhat.com>
8387 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8389 * c-opts.c (c_common_handle_option)<case
8390 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8391 cases. Handle -ftrack-macro-expansion with and without argument.
8393 2011-10-15 Tom Tromey <tromey@redhat.com>
8394 Dodji Seketeli <dodji@redhat.com>
8396 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8397 (print_line, cb_define, do_line_change): Adjust to avoid touching
8398 the internals of struct line_map. Use the public API instead.
8399 * c-pch.c (c_common_read_pch): Likewise.
8400 * c-lex.c (fe_file_change): Likewise.
8402 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8405 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8407 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8410 * c-pretty-print.c (pp_c_floating_constant): Output
8411 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8413 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8415 * c-common.c (def_builtin_1): Delete old interface with two
8416 parallel arrays to hold standard builtin declarations, and replace
8417 it with a function based interface that can support creating
8418 builtins on the fly in the future. Change all uses, and poison
8419 the old names. Make sure 0 is not a legitimate builtin index.
8420 * c-omp.c (c_finish_omp_barrier): Ditto.
8421 (c_finish_omp_taskwait): Ditto.
8422 (c_finish_omp_flush): Ditto.
8424 2011-10-11 Tristan Gingold <gingold@adacore.com>
8426 * c.opt: (fallow-parameterless-variadic-functions): New.
8428 2011-09-08 Dodji Seketeli <dodji@redhat.com>
8430 PR c++/33255 - Support -Wunused-local-typedefs warning
8431 * c-common.h (struct c_language_function::local_typedefs): New
8433 (record_locally_defined_typedef, maybe_record_typedef_use)
8434 (maybe_warn_unused_local_typedefs): Declare new functions.
8435 * c-common.c (record_locally_defined_typedef)
8436 (maybe_record_typedef_use)
8437 (maybe_warn_unused_local_typedefs): Define new functions.
8438 * c.opt: Declare new -Wunused-local-typedefs flag.
8440 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8443 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8446 2011-09-05 Richard Guenther <rguenther@suse.de>
8448 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8449 of integer_minus_one_node for empty array upper bounds.
8451 2011-08-28 Dodji Seketeli <dodji@redhat.com>
8453 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8454 it's the first time it's being called on this main TU.
8456 2011-08-24 Richard Guenther <rguenther@suse.de>
8459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8461 2011-08-22 Gabriel Charette <gchare@google.com>
8463 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8464 defined in cpp_init_builtins and c_cpp_builtins.
8466 2011-08-19 Joseph Myers <joseph@codesourcery.com>
8468 * c-common.c (c_common_reswords): Add __builtin_complex.
8469 * c-common.h (RID_BUILTIN_COMPLEX): New.
8471 2011-08-18 Joseph Myers <joseph@codesourcery.com>
8473 * c-common.c (c_common_reswords): Add _Noreturn.
8474 (keyword_is_function_specifier): Handle RID_NORETURN.
8475 * c-common.h (RID_NORETURN): New.
8477 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8479 * c-common.c (unsafe_conversion_p): New function. Check if it is
8480 unsafe to convert an expression to the type.
8481 (conversion_warning): Adjust, use unsafe_conversion_p.
8482 * c-common.h (unsafe_conversion_p): New function declaration.
8484 2011-08-02 Jakub Jelinek <jakub@redhat.com>
8486 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8487 (c_finish_omp_taskyield): New prototype.
8488 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8489 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8490 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8491 or RHS1 have side-effects, evaluate those too in the right spot,
8492 if it is a decl and LHS is also a decl, error out if they
8494 (c_finish_omp_taskyield): New function.
8495 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8496 * c-pragma.c (omp_pragmas): Add taskyield.
8497 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8498 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8499 PRAGMA_OMP_CLAUSE_MERGEABLE.
8501 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8503 * c-common.h (set_underlying_type): Remove parm name from
8506 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8508 * c-pretty-print.h: Search c-common.h in c-family.
8510 2011-07-22 Jason Merrill <jason@redhat.com>
8513 * c.opt (Wnarrowing): New.
8516 * c-common.h: Declare c_linkage_bindings.
8517 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8520 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8521 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8522 as flag_isoc99 for 'restrict'.
8523 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8525 2011-07-21 Ian Lance Taylor <iant@google.com>
8528 * c-common.c (c_disable_warnings): New static function.
8529 (c_enable_warnings): New static function.
8530 (c_fully_fold_internal): Change local unused_p to bool. Call
8531 c_disable_warnings and c_enable_warnings rather than change
8532 c_inhibit_evaluation_warnings.
8534 2011-07-20 Jason Merrill <jason@redhat.com>
8536 PR c++/6709 (DR 743)
8537 PR c++/42603 (DR 950)
8538 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8539 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8540 (CPP_DECLTYPE): New.
8541 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8543 2011-07-19 Richard Guenther <rguenther@suse.de>
8545 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8546 * c-omp.c (c_finish_omp_for): Likewise.
8548 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8550 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8551 body on the next line.
8553 2011-07-08 Jason Merrill <jason@redhat.com>
8556 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8559 * c-common.c (c_apply_type_quals_to_decl): Don't check
8560 TYPE_NEEDS_CONSTRUCTING.
8562 2011-07-06 Richard Guenther <rguenther@suse.de>
8564 * c-common.c (c_common_nodes_and_builtins):
8565 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8567 2011-07-05 Richard Guenther <rguenther@suse.de>
8569 * c-common.c (c_common_nodes_and_builtins): Build all common
8572 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8574 * c-common.h (c_tree_chain_next): New static inline function.
8576 * c-common.c (check_builtin_function_arguments): Handle
8577 BUILT_IN_ASSUME_ALIGNED.
8579 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8581 * c-common.c: Add sync_ or SYNC__ to builtin names.
8582 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8584 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8586 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8588 (gen_pragma_handler): New union.
8589 (internal_pragma_handler): New type.
8590 (c_register_pragma_with_data)
8591 (c_register_pragma_with_expansion_and_data): New functions.
8593 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8594 (c_register_pragma, c_register_pragma_with_expansion)
8595 (c_invoke_pragma_handler): Changed to work with
8596 internal_pragma_handler.
8597 (c_register_pragma_with_data)
8598 (c_register_pragma_with_expansion_and_data): New functions.
8600 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8602 * c-common.c: Include common/common-target.h.
8603 (handle_section_attribute): Use
8604 targetm_common.have_named_sections.
8605 * c-cppbuiltin.c: Include common/common-target.h.
8606 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8608 2011-06-10 Richard Guenther <rguenther@suse.de>
8610 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8611 to print a IDENTIFIER_NODE.
8613 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8614 Joseph Myers <joseph@codesourcery.com>
8616 * c.opt (fbuilding-libgcc): New option.
8617 * c-cppbuiltin.c (c_cpp_builtins): Define
8618 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8620 2011-06-07 Jason Merrill <jason@redhat.com>
8622 * c-common.c (max_tinst_depth): Lower default to 900.
8624 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8626 2011-06-07 Richard Guenther <rguenther@suse.de>
8628 * c-common.c (c_common_nodes_and_builtins): Do not set
8629 size_type_node or call set_sizetype.
8631 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8634 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8635 type when using pointer comparison to compare types.
8637 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8639 * c.opt: Add -Wdelete-non-virtual-dtor.
8640 * c-opts.c (c_common_handle_option): Include it in -Wall.
8642 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8647 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8649 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8652 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8655 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8656 C++ don't call c_common_truthvalue_conversion on void type arms.
8658 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8660 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8661 (stmt_list_stack): Define.
8662 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8663 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8665 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8667 * c-common.c (warning_candidate_p): Check for BLOCKs.
8669 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8671 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8674 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8676 * c-common.c (def_fn_type): Remove extra va_end.
8678 2011-05-23 Jason Merrill <jason@redhat.com>
8681 * c-common.c (c_common_get_narrower): New.
8682 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8684 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8686 * c-common.h (check_function_arguments): Tweak prototype of
8687 check_function_arguments.
8688 * c-common.c (check_function_arguments): Likewise. Adjust
8689 calls to check_function_nonnull, check_function_format, and
8690 check_function_sentinel.
8691 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8692 separate attributes and typelist arguments. Use
8693 FOREACH_FUNCTION_ARGS to iterate over argument types.
8695 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8697 * c-common.c (c_common_reswords): Reorder.
8698 * c-common.h (rid): Likewise.
8700 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8702 * c-common.c (def_fn_type): Don't call build_function_type, call
8703 build_function_type_array or build_varargs_function_type_array
8705 (c_common_nodes_and_builtins): Likewise.
8707 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8709 * c-common.c (c_add_case_label): Omit the loc argument to
8711 * c-common.h (build_case_label): Remove.
8712 * c-semantics.c (build_case_label): Remove.
8714 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8716 * c-objc.h (objc_start_method_definition): Update prototype.
8717 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8719 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8721 * c-common.c (check_main_parameter_types): Reindent. Don't use
8722 TYPE_ARG_TYPES directly.
8723 (handle_nonnull_attribute): Likewise.
8724 (sync_resolve_params): Likewise.
8725 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8726 to check_format_string.
8727 (handle_format_attribute): Likewise.
8728 (check_format_string): Take a function type to examine instead of
8729 a type list. Use a function_arg_iterator to step through argument
8732 2011-05-04 Richard Guenther <rguenther@suse.de>
8734 * c-common.c (fix_string_type): Use size_int for index type bounds.
8735 (start_fname_decls): Do not pass NULL to build_int_cst.
8736 (c_init_attributes): Likewise.
8737 * c-lex.c (c_lex_with_flags): Likewise.
8739 2011-04-27 Jason Merrill <jason@redhat.com>
8741 * c-common.c (make_tree_vector_from_list): New.
8742 * c-common.h: Declare it.
8744 2011-04-26 Richard Guenther <rguenther@suse.de>
8746 PR preprocessor/48248
8747 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8748 for output size with -P.
8750 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8752 * c-common.c (struct c_common_resword): Add __underlying_type.
8753 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8755 2011-04-20 Jim Meyering <meyering@redhat.com>
8757 * c-format.c (init_dollar_format_checking): Remove useless
8760 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8762 * c-objc.h (objc_get_interface_ivars): Removed.
8763 (objc_detect_field_duplicates): New.
8764 * stub-objc.c: Likewise.
8766 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8768 * stub-objc.c (objc_declare_protocols): Renamed to
8769 objc_declare_protocol.
8770 * c-objc.h: Likewise.
8772 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8774 * stub-objc.c (objc_declare_class): Updated argument name.
8776 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8778 * c-common.h (c_common_init_ts): Declare.
8779 * c-common.c (c_common_init_ts): Define.
8781 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8783 * c-objc.h (objc_build_message_expr): Updated prototype.
8784 * stub-objc.c (objc_build_message_expr): Likewise.
8786 2011-04-12 Martin Jambor <mjambor@suse.cz>
8788 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8791 2011-04-11 Richard Guenther <rguenther@suse.de>
8793 * c-common.c (complete_array_type): Build a range type of
8796 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8798 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8799 (handle_type_generic_attribute): Likewise.
8801 2011-04-07 Jason Merrill <jason@redhat.com>
8804 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8805 conversion from C++0x scoped enum.
8807 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8809 * c-target-def.h: New file.
8810 * c-target.def: New file.
8811 * c-target.h: New file.
8812 * c-common.c (targetcm): Don't define here.
8813 * c-common.h (default_handle_c_option): Declare.
8814 * c-format.c: Include c-target.h instead of target.h.
8815 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8817 (default_handle_c_option): Move from targhooks.c.
8819 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8821 PR preprocessor/48248
8822 * c-ppoutput.c (print): Add src_file field.
8823 (init_pp_output): Initialize it.
8824 (maybe_print_line): Don't optimize by adding up to 8 newlines
8825 if map->to_file and print.src_file are different file.
8826 (print_line): Update print.src_file.
8828 2011-03-25 Kai Tietz <ktietz@redhat.com>
8830 * c-ada-spec.c (compare_comment): Use filename_cmp
8831 instead of strcmp for filename.
8833 2011-03-25 Jeff Law <law@redhat.com>
8835 * c-common.c (def_fn_type): Add missing va_end.
8837 2011-03-25 Jason Merrill <jason@redhat.com>
8839 * c.opt: Add -std=c++03.
8841 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8843 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8845 2011-03-17 Kai Tietz <ktietz@redhat.com>
8848 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8849 Display allowed attributes for function pointer types.
8850 (pp_c_attributes_display): New function to display
8851 attributes having affects_type_identity flag set to true.
8852 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8854 * c-common.c (c_common_attribute_table):
8856 (c_common_format_attribute_table): Likewise.
8858 2011-03-18 Jason Merrill <jason@redhat.com>
8860 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8861 * c-common.h: Don't declare it here.
8862 * c-common.c: Or define it here.
8863 * c-opts.c (c_common_handle_option): Or set it here.
8866 * c-common.c (handle_transparent_union_attribute): Don't
8867 make a duplicate type in C++.
8869 2011-03-15 Jason Merrill <jason@redhat.com>
8871 * c-common.c (max_constexpr_depth): New.
8872 * c-common.h: Declare it.
8873 * c-opts.c (c_common_handle_option): Set it.
8874 * c.opt (fconstexpr-depth): New option.
8876 2011-03-11 Jason Merrill <jason@redhat.com>
8878 * c-common.c (attribute_takes_identifier_p): Add missing const.
8881 * c-common.c (attribute_takes_identifier_p): Assume that an
8882 unknown attribute takes an identifier.
8884 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8887 * c-common.c (c_type_hash): Call list_length instead of iterating
8888 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8890 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8893 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8895 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8897 * c.opt (fobjc-abi-version=) New.
8898 (fobjc-nilcheck): New.
8900 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8903 * c-common.h (keyword_is_decl_specifier): Declare.
8904 * c-common.c (keyword_is_decl_specifier): Define.
8905 (keyword_is_function_specifier): New function.
8907 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8910 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8911 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8914 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8916 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8918 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8921 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8922 after init_c_lex if pch_file is set.
8924 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8927 * c.opt (-fkeep-inline-dllexport): New switch.
8929 2011-01-12 Richard Guenther <rguenther@suse.de>
8932 * c-common.c (handle_weak_attribute): Warn instead of error
8933 on declaring an inline function weak.
8935 2011-01-05 Tom Tromey <tromey@redhat.com>
8937 * c-common.h (lvalue_error): Update.
8938 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8941 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8944 * c-objc.h (objc_finish_message_expr): Added argument to
8947 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8949 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8952 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8954 * c-objc.h (objc_maybe_warn_exceptions): New.
8955 * stub-objc.c (objc_maybe_warn_exceptions): New.
8957 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8959 * c-common.h (readonly_error): Declare.
8960 * c-common.c (readonly_error): Define.
8962 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8964 * c-common.h (invalid_indirection_error): Declare.
8965 * c-common.c (invalid_indirection_error): Define.
8967 2010-12-03 Richard Guenther <rguenther@suse.de>
8970 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8971 (pp_c_unary_expression): Likewise.
8972 (pp_c_expression): Likewise.
8974 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8976 * c-common.h (objc_finish_function): New.
8977 (objc_non_volatilized_type): Removed.
8978 (objc_type_quals_match): Removed.
8979 * stub-objc.c (objc_finish_function): New.
8980 (objc_non_volatilized_type): Removed.
8981 (objc_type_quals_match): Removed.
8983 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8985 * c-common.h (parse_optimize_options): Declare.
8986 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8987 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8989 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8991 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8993 * c-pch.c (O_BINARY): Don't define here.
8994 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8996 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8998 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8999 targetm.except_unwind_info.
9001 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9003 * c-opts.c (c_common_handle_option): Pass location to
9004 set_struct_debug_option.
9006 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9008 * c-common.c (visibility_options): Move from ../opts.c.
9009 * c-common.h (struct visibility_flags, visibility_options):
9011 * c-opts.c (finish_options): Rename to c_finish_options.
9012 (c_common_init): Update call to finish_options.
9014 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9017 * c-lex.c (lex_string): Check that each string in an Objective-C
9018 string concat sequence starts with either one or zero '@', and
9019 that there are no spurious '@' signs at the end.
9021 2010-11-20 Joseph Myers <joseph@codesourcery.com>
9023 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9024 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9025 HANDLE_PRAGMA_VISIBILITY.
9026 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9027 HANDLE_PRAGMA_VISIBILITY): Don't define.
9028 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9030 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9035 * c-common.h (keyword_begins_type_specifier): Declare.
9036 (keyword_is_storage_class_specifier): Declare.
9037 (keyword_is_type_qualifier): Declare.
9038 * c-common.c (keyword_begins_type_specifier): New function.
9039 (keyword_is_storage_class_specifier): New function.
9040 (keyword_is_type_qualifier): Declare.
9042 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9045 * c-common.c (in_late_binary_op): Define.
9046 (c_common_truthvalue_conversion): Check in_late_binary_op before
9047 calling c_save_expr.
9048 * c-common.h (in_late_binary_op): Declare.
9050 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9052 * c-opts.c (c_common_handle_option): Update calls to
9053 set_struct_debug_option.
9055 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9057 * c-common.h (objc_declare_protocols): Added additional argument.
9058 * stub-objc.c (objc_declare_protocol): Same change.
9060 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9063 * c-common.h (build_real_imag_expr): Declare.
9064 * c-semantics.c (build_real_imag_expr): Define.
9066 2010-11-17 Joseph Myers <joseph@codesourcery.com>
9068 * c-opts.c (c_common_parse_file): Take no arguments.
9069 * c-common.h (c_common_parse_file): Update prototype.
9071 2010-11-16 Jakub Jelinek <jakub@redhat.com>
9074 * c-common.c (warning_candidate_p): Don't track non-const calls
9077 2010-11-15 Ian Lance Taylor <iant@google.com>
9079 * c-lex.c (init_c_lex): Set macro debug callbacks if
9080 flag_dump_go_spec is set.
9082 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9084 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9085 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9087 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9089 PR preprocessor/45038
9090 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9093 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9095 * c-common.h (c_family_lang_mask): Declare.
9096 * c-opts.c (c_family_lang_mask): Make extern.
9097 * c-pragma.c (handle_pragma_diagnostic): Use
9098 control_warning_option.
9100 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9102 * c-common.c (parse_optimize_options): Update call to
9104 * c-common.h (c_common_handle_option): Update prototype.
9105 * c-opts.c (c_common_handle_option): Take location_t parameter and
9106 pass it to other functions.
9108 2010-11-11 Joseph Myers <joseph@codesourcery.com>
9110 * c-opts.c (warning_as_error_callback): Remove.
9111 (c_common_initialize_diagnostics): Don't call
9112 register_warning_as_error_callback.
9113 (c_common_handle_option): Handle -Werror=normalized= here.
9115 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9117 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9119 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9121 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9122 Remove trailing '.' from diagnostics.
9123 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9125 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9127 * c-common.c (parse_optimize_options): Pass global_dc to
9129 * c-opts.c (c_common_handle_option): Pass &global_options to
9130 set_Wstrict_aliasing.
9131 * c.opt (v): Don't mark Common or document here.
9133 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9136 * c-format.c (format_type): New type gcc_objc_string_format_type.
9137 (valid_stringptr_type_p): New.
9138 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9139 (check_format_string): Pass expected type, use
9140 valid_stringptr_type_p (), check that the format string types are
9141 consistent with the format specification.
9142 (decode_format_attr): Warn if NSString is used outside objective-c.
9143 (format_types_orig): Add NSString.
9145 (format_flags): New.
9146 (check_format_arg): Handle format strings requiring an external parser.
9147 first_target_format_type: New variable.
9148 (handle_format_attribute): Set up first_target_format_type, pass the
9149 expected format arg string type to check_format_string().
9150 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9151 * stub-objc.c (objc_string_ref_type_p): New.
9152 (objc_check_format_arg): New.
9154 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9156 Fixed using the Objective-C 2.0 dot-syntax with class names.
9157 * c-common.h (objc_build_class_component_ref): New.
9158 * stub-objc.c (objc_build_class_component_ref): New.
9160 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9162 * c.opt (Wproperty-assign-default): New option.
9164 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9166 Implemented -fobjc-std=objc1 flag.
9167 * c.opt (fobjc-std=objc1): New option.
9169 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9171 Implemented format and noreturn attributes for Objective-C methods.
9172 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9173 attribute for Objective-C methods.
9175 2010-10-31 Jason Merrill <jason@redhat.com>
9177 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9180 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9182 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9183 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9184 (objc_add_property_declaration): Removed arguments for copies and
9186 (objc_build_getter_call): Renamed to
9187 objc_maybe_build_component_ref.
9188 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9189 (objc_is_property_ref): New.
9190 * c-common.c (c_common_reswords): Removed copies and ivar.
9191 * stub-objc.c (objc_add_property_declaration): Removed arguments
9192 for copies and ivar.
9193 (objc_build_getter_call): Renamed to
9194 objc_maybe_build_component_ref.
9195 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9196 (objc_is_property_ref): New.
9198 2010-10-29 Arnaud Charlet <charlet@adacore.com>
9199 Matthew Gingell <gingell@adacore.com>
9201 * c-ada-spec.c (separate_class_package): New function.
9202 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9203 name of their enclosing package.
9204 (print_ada_declaration): Use separate_class_package.
9206 2010-10-27 Jason Merrill <jason@redhat.com>
9208 * c-common.c (c_common_reswords): Add __is_literal_type.
9209 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9211 * c-common.c (check_case_value): Remove special C++ code.
9213 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9215 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9216 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9218 (objc_add_property_declaration): Added additional arguments.
9219 (objc_property_attribute_kind): Removed.
9220 (objc_set_property_attr): Removed.
9221 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9223 * stub-objc.c (objc_add_property_declaration): Added additional
9225 (objc_set_property_attr): Removed.
9227 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9229 * c-common.h (objc_add_property_variable): Renamed to
9230 objc_add_property_declaration. Added location argument.
9231 * stub-objc.c (objc_add_property_variable): Same change.
9233 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9235 * c-common.h (objc_maybe_printable_name): New.
9236 * stub-objc.c (objc_maybe_printable_name): New.
9238 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9239 Andrew Pinski <pinskia@gmail.com>
9241 * c-common.h (c_common_mark_addressable_vec): Declare.
9242 * c-common.c (c_common_mark_addressable_vec): New function.
9244 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9246 * c-common.h (objc_set_method_type): Removed.
9247 (objc_add_method_declaration): Added boolean argument.
9248 (objc_start_method_definition): Same change.
9249 (objc_build_method_signature): Same change.
9250 * stub-objc.c (objc_set_method_type): Removed.
9251 (objc_add_method_declaration): Added boolean argument.
9252 (objc_start_method_definition): Same change.
9253 (objc_build_method_signature): Same change.
9255 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9257 * c-common.h (finish_file): Removed.
9258 (objc_write_global_declarations): New.
9259 * c-opts.c (c_common_parse_file): Do not call finish_file.
9260 * stub-objc.c (objc_write_global_declarations): New.
9262 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9264 Implemented parsing @synthesize and @dynamic for
9265 Objective-C/Objective-C++.
9266 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9267 (objc_add_synthesize_declaration): New.
9268 (objc_add_dynamic_declaration): New.
9269 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9270 * stub-objc.c (objc_add_synthesize_declaration): New.
9271 (objc_add_dynamic_declaration): New.
9273 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9276 * c-cppbuiltin.c (mode_has_fma): Move function here from
9277 builtins.c. Don't use the fma optab, instead just use the
9278 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9281 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9283 Merge from 'apple/trunk' branch on FSF servers.
9285 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
9288 * c-common.h (objc_non_volatilized_type): New declaration
9289 * stub-objc.c (objc_non_volatilized_type): New stub.
9291 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9293 Merge from 'apple/trunk' branch on FSF servers.
9295 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
9298 * c-common.h (objc_diagnose_private_ivar): New decl.
9299 * stub-objc.c (objc_diagnose_private_ivar): New stub.
9301 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9303 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9304 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9305 (objc_ivar_visibility_kind): New enum.
9306 (objc_set_visibility): Adjust prototype to use visibility enum.
9307 * stub-objc.c (objc_set_visibility): Adjust stub to use
9310 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9312 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9313 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9314 has the appropriate fma builtins.
9315 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9317 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9319 merge from FSF apple 'trunk' branch.
9320 2006 Fariborz Jahanian <fjahanian@apple.com>
9322 Radars 4436866, 4505126, 4506903, 4517826
9323 * c-common.c (c_common_resword): Define @property and its attributes.
9324 * c-common.h: Define property attribute enum entries.
9325 (OBJC_IS_PATTR_KEYWORD): New.
9326 (objc_property_attribute_kind): New enum.
9327 Declare objc_set_property_attr (), objc_add_property_variable (),
9328 objc_build_getter_call () and objc_build_setter_call ().
9329 * stub-objc.c (objc_set_property_attr): New stub.
9330 (objc_add_property_variable): Likewise.
9331 (objc_build_getter_call): Likewise.
9332 (objc_build_setter_call) Likewise.
9334 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9336 merge from FSF apple 'trunk' branch.
9337 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
9339 Radar 3803157 (method attributes)
9340 * c-common.c (handle_deprecated_attribute): Recognize
9341 objc methods as valid declarations.
9342 * c-common.h: Declare objc_method_decl ().
9343 * stub-objc.c (objc_method_decl): New stub.
9345 2010-10-08 Joseph Myers <joseph@codesourcery.com>
9347 * c-common.c (parse_optimize_options): Call
9348 decode_cmdline_options_to_array_default_mask before
9349 decode_options. Update arguments to decode_options.
9350 * c-common.h (c_common_init_options_struct): Declare.
9351 * c-opts.c (c_common_init_options_struct): New. Split out from
9352 c_common_init_options.
9354 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9356 Implemented fast enumeration for Objective-C.
9357 * c-common.h (objc_finish_foreach_loop): New.
9358 * stub-objc.c (objc_finish_foreach_loop): New.
9360 2010-10-05 Joseph Myers <joseph@codesourcery.com>
9362 * c-common.h (struct diagnostic_context): Don't declare here.
9363 (c_common_initialize_diagnostics): Declare using
9364 diagnostic_context typedef.
9365 * c-opts.c (c_common_handle_option): Pass global_dc to
9366 handle_generated_option.
9368 2010-10-04 Joseph Myers <joseph@codesourcery.com>
9370 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9371 handle_generated_option.
9373 2010-10-03 Ian Lance Taylor <iant@google.com>
9375 * c.opt (-fplan9-extensions): New option.
9377 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9379 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9381 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9382 of duplicating code.
9384 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9386 * c-common.c: Add two new entries for @optional
9387 and @required keywords.
9389 merge from FSF 'apple/trunk' branch.
9390 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
9393 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9394 objective-c keywords.
9395 (objc_set_method_opt): New declaration.
9396 * stub-objc.c (objc_set_method_opt): New stub.
9398 2010-09-30 Joseph Myers <joseph@codesourcery.com>
9400 * c-common.c (handle_optimize_attribute): Pass &global_options to
9401 cl_optimization_save and cl_optimization_restore.
9402 * c-opts.c (c_common_handle_option): Pass &global_options to
9403 handle_generated_option.
9404 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9405 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9406 &global_options to cl_optimization_restore.
9408 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9410 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9411 Objective-C/Objective-C++ keywords.
9413 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9415 Merge from 'apple/trunk' branch on FSF servers.
9417 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
9420 * c-common.h (objc_check_global_decl): New declaration.
9421 * stub-objc.c (objc_check_global_decl): New stub.
9423 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9425 * c.opt: Don't use VarExists.
9427 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9429 * c-common.c (c_cpp_error): Update names of diagnostic_context
9431 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9432 cl_optimization members.
9433 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9434 sanitize_cpp_opts, finish_options): Update names of cpp_options
9437 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9439 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9440 (objc_is_reserved_word): Removed.
9441 * c-common.c: Updated comments.
9442 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9443 objc_is_reserved_word.
9444 * stub-objc.c (objc_is_reserved_word): Removed.
9446 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9448 * c-common.h (objc_add_method_declaration): Adjust prototype to
9450 (objc_start_method_definition): Likewise.
9451 (objc_build_keyword_decl): Likewise.
9452 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9453 (objc_start_method_definition): Likewise.
9454 (objc_build_keyword_decl): Likewise.
9456 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9458 * c-common.h (objc_start_class_interface): Adjust prototype.
9459 (objc_start_category_interface): Likewise.
9460 (objc_start_protocol): Likewise.
9461 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9462 (objc_start_class_interface): Likewise.
9463 (objc_start_category_interface): Likewise.
9465 2010-09-27 Ian Lance Taylor <iant@google.com>
9467 * c-common.c (c_common_attribute_table): Add no_split_stack.
9468 (handle_no_split_stack_attribute): New static function.
9470 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9472 Merge from 'apple/trunk' branch on FSF servers.
9474 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
9477 * c-common.h (objc_have_common_type): New declaration.
9478 * stub-objc.c (objc_have_common_type): New stub.
9480 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9483 * c-common.h (objc_common_type): New prototype.
9484 * stub-objc.c (objc_common_type): New stub.
9486 2010-09-24 Jan Hubicka <jh@suse.cz>
9488 * c-common.c (handle_leaf_attribute): New function.
9489 (struct attribute_spec c_common_att): Add leaf.
9491 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9493 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9494 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9495 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9496 -include-barrier, -include-directory, -include-directory=,
9497 -include-directory-after, -include-directory-after=,
9498 -include-prefix, -include-prefix=, -include-with-prefix,
9499 -include-with-prefix=, -include-with-prefix-after,
9500 -include-with-prefix-after=, -include-with-prefix-before,
9501 -include-with-prefix-before=, -no-integrated-cpp,
9502 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9503 -output=, -pedantic, -pedantic-errors, -preprocess,
9504 -print-missing-file-dependencies, -trace-includes, -traditional,
9505 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9506 -user-dependencies, -verbose, -write-dependencies,
9507 -write-user-dependencies, no-integrated-cpp, traditional): New.
9509 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9512 * c-common.h (objc_start_method_definition): Return bool instead
9514 * stub-objc.c (objc_start_method_definition): Return bool instead
9517 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9520 * c-common.h (objc_get_interface_ivars): New declaration.
9521 * stub-objc.c (objc_get_interface_ivars): New stub.
9523 2010-09-15 Ian Lance Taylor <iant@google.com>
9525 * c-common.c (parse_optimize_options): Do not capitalize warning
9526 messages. Remove period at end of warning message.
9528 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9530 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9531 (handle_alias_attribute): ... here.
9532 (handle_ifunc_attribute): New.
9534 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9536 * c-common.h (do_warn_double_promotion): Declare.
9537 * c-common.c (do_warn_double_promotion): Define.
9539 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9541 * c.opt (Wdouble-promotion): New.
9543 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9545 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9546 fvtable-thunks, fxref): Mark no longer supported in help text.
9548 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9550 * c.opt (Wimport, fall-virtual, falt-external-templates,
9551 fdefault-inline, fenum-int-equiv, fexternal-templates,
9552 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9553 fname-mangling-version-, fnew-abi, fnonnull-objects,
9554 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9555 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9557 (fhandle-exceptions): Mark with Alias and Warn.
9558 * c-opts.c (c_common_handle_option): Don't handle options marked
9561 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9563 * c.opt (Wcomments, Werror-implicit-function-declaration,
9564 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9565 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9567 * c-common.c (option_codes): Use OPT_Wcomment instead of
9569 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9570 Don't handle options marked as aliases.
9572 2010-08-25 Richard Guenther <rguenther@suse.de>
9574 * c-common.c (c_common_get_alias_set): Remove special
9575 handling for pointers.
9577 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9579 * c-common.c: Use FOR_EACH_VEC_ELT.
9580 * c-gimplify.c: Likewise.
9581 * c-pragma.c: Likewise.
9583 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9585 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9587 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9589 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9590 instead of OPT_MDX and OPT_MMDX.
9592 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9594 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9596 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9598 * c.opt (MD, MMD): Change to MDX and MMDX.
9599 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9601 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9603 * c-opts.c (c_common_handle_option): Call handle_generated_option
9604 instead of handle_option.
9606 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9608 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9609 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9611 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9613 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9614 (pending_redefine_extname): Change type to a VEC.
9615 (add_to_renaming_pragma_list): Update for new type of
9616 pending_redefine_extname.
9617 (maybe_apply_renaming_pragma): Likewise.
9619 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9621 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9623 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9624 decide whether a type has already been declared/seen.
9625 Do not go to the original type.
9626 (dump_nested_types): New parameter forward.
9627 Generate forward declaration if needed and mark type as visited.
9628 (print_ada_declaration): Call dump_nested_types if not already done.
9629 Mark types as visited.
9631 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9633 * c.opt (-print-pch-checksum): Remove option.
9634 * c-opts.c (c_common_handle_option): Don't handle
9635 OPT_print_pch_checksum.
9637 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9639 * c-common.h (c_common_handle_option): Update prototype and return
9641 * c-opts.c (c_common_handle_option): Update prototype and return
9642 value type. Update calls to handle_option and
9643 enable_warning_as_error.
9645 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9648 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9650 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9652 * c-common.h (c_common_missing_argument): Remove.
9653 * c-opts.c (c_common_missing_argument): Remove.
9654 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9655 idirafter, imacros, include, isysroot, isystem, iquote): Add
9657 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9659 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9661 * c-common.h (c_common_option_lang_mask,
9662 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9664 (c_common_init_options): Update prototype.
9665 * c-opts.c (c_common_option_lang_mask): New.
9666 (c_common_initialize_diagnostics): Split out of
9667 c_common_init_options.
9668 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9670 (c_common_init_options): Update prototype. Use decoded options in
9671 search for -lang-asm.
9673 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9675 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9676 * c-format.c: Likewise.
9678 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9680 * c-common.h: Include diagnostic-core.h. Error if already
9682 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9684 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9686 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9687 Do not include expr.h
9688 (vector_mode_valid_p): Move here.
9690 2010-06-21 DJ Delorie <dj@redhat.com>
9692 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9693 allow these pragmas anywhere.
9695 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9698 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9699 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9700 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9701 ggc_strdup instead of xstrdup.
9703 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9705 * c-cppbuiltin.c: Include cpp-id-data.h.
9706 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9707 (lazy_hex_fp_value): New function.
9708 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9710 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9712 * c-gimplify.c: Do not include tree-flow.h
9714 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9717 * c-common.c: Rename targetm member:
9718 targetm.enum_va_list -> targetm.enum_va_list_p
9720 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9722 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9724 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9726 * c-cppbuiltin.c: Do not include except.h.
9728 2010-06-24 Andi Kleen <ak@linux.intel.com>
9730 * c-common.c (warn_for_omitted_condop): New.
9731 * c-common.h (warn_for_omitted_condop): Add prototype.
9733 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9735 * c.opt (lang-objc): Remove.
9736 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9738 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9740 * c-opts.c: Include "tm_p.h".
9742 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9744 * c-common.c (parse_optimize_options): Update call to
9747 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9749 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9750 new type of types_used_by_cur_var_decl.
9752 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9755 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9756 for C++ standard compliance.
9758 2010-06-16 Jason Merrill <jason@redhat.com>
9760 * c.opt: Add -Wnoexcept.
9762 2010-06-16 Richard Guenther <rguenther@suse.de>
9765 * c-common.c (c_common_truthvalue_conversion): Remove
9766 premature and wrong optimization concering ADDR_EXPRs.
9768 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9770 * c-ada-spec.c (dump_sloc): Remove column info.
9771 (is_simple_enum): New function.
9772 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9773 enum types when relevant.
9775 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9777 * c-common.c (conversion_warning): Warn at expression
9780 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9782 * c-opts.c (c_common_handle_option): Don't handle
9785 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9787 * c-pragma.c (push_alignment): Use typed GC allocation.
9788 (handle_pragma_push_options): Likewise.
9790 * c-common.c (parse_optimize_options): Likewise.
9792 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9795 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9797 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9798 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9799 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9800 flag_signed_bitfields, warn_strict_null_sentinel,
9801 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9802 flag_gen_declaration, flag_no_gnu_keywords,
9803 flag_implement_inlines, flag_implicit_templates,
9804 flag_implicit_inline_templates, flag_optional_diags,
9805 flag_elide_constructors, flag_default_inline, flag_rtti,
9806 flag_conserve_space, flag_access_control, flag_check_new,
9807 flag_new_for_scope, flag_weak, flag_working_directory,
9808 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9809 flag_enforce_eh_specs, flag_threadsafe_statics,
9810 flag_pretty_templates): Remove.
9811 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9812 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9813 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9814 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9815 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9816 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9817 flag_no_gnu_keywords, flag_implement_inlines,
9818 flag_implicit_templates, flag_implicit_inline_templates,
9819 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9820 flag_rtti, flag_conserve_space, flag_access_control,
9821 flag_check_new, flag_new_for_scope, flag_weak,
9822 flag_working_directory, flag_use_cxa_atexit,
9823 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9824 flag_threadsafe_statics, flag_pretty_templates,
9825 warn_strict_null_sentinel): Remove.
9826 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9827 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9828 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9829 fimplicit-inline-templates, fimplicit-templates,
9830 flax-vector-conversions, fms-extensions, fnil-receivers,
9831 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9832 frtti, fshort-double, fshort-enums, fshort-wchar,
9833 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9834 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9835 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9836 gen-decls, undef): Use Var.
9837 (fdefault-inline, foptional-diags): Document as doing nothing.
9838 * c-opts.c (c_common_handle_option): Remove cases for options now
9839 using Var. Mark ignored options as such.
9841 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9843 * c-common.c: Moved to here from parent directory.
9844 * c-common.def: Likewise.
9845 * c-common.h: Likewise.
9846 * c-cppbuiltin.c: Likewise.
9847 * c-dump.c: Likewise.
9848 * c-format.c: Likewise.
9849 * c-format.h : Likewise.
9850 * c-gimplify.c: Likewise.
9851 * c-lex.c: Likewise.
9852 * c-omp.c: Likewise.
9854 * c-opts.c: Likewise.
9855 * c-pch.c: Likewise.
9856 * c-ppoutput.c: Likewise.
9857 * c-pragma.c: Likewise.
9858 * c-pragma.h: Likewise.
9859 * c-pretty-print.c: Likewise.
9860 * c-pretty-print.h: Likewise.
9861 * c-semantics.c: Likewise.
9862 * stub-objc.c: Likewise.
9864 * c-common.c: Include gt-c-family-c-common.h.
9865 * c-pragma.c: Include gt-c-family-c-pragma.h.
9867 Copyright (C) 2010-2019 Free Software Foundation, Inc.
9869 Copying and distribution of this file, with or without modification,
9870 are permitted in any medium without royalty provided the copyright
9871 notice and this notice are preserved.