1 2022-11-15 Lewis Hyatt <lhyatt@gmail.com>
3 * c-opts.cc (c_finish_options): Use special_fname_builtin () rather
4 than a hard-coded string.
6 2022-11-15 Jakub Jelinek <jakub@redhat.com>
8 * c-cppbuiltin.cc (c_cpp_builtins): Bump C++23
9 __cpp_multidimensional_subscript macro value to 202211L.
11 2022-11-15 Patrick Palka <ppalka@redhat.com>
14 * c-lex.cc (c_common_has_attribute): Return 1 for init_priority
15 iff SUPPORTS_INIT_PRIORITY.
17 2022-11-14 Martin Liska <mliska@suse.cz>
20 2022-11-09 Martin Liska <mliska@suse.cz>
22 * c-target.def: Port to RST.
24 2022-11-12 Joseph Myers <joseph@codesourcery.com>
26 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY.
28 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
31 * c-pragma.cc (handle_pragma_ignore): New function.
32 (init_pragma): Register region and endregion pragmas.
34 2022-11-09 Martin Liska <mliska@suse.cz>
36 * c-target.def: Port to RST.
38 2022-11-05 Lewis Hyatt <lhyatt@gmail.com>
41 * c-ppoutput.cc (adjust_for_newlines): Update comment.
43 2022-11-03 Jason Merrill <jason@redhat.com>
45 * c-opts.cc (c_common_post_options): -fconcepts no longer implies
46 -fconcepts-ts before C++20.
48 2022-10-28 Joseph Myers <joseph@codesourcery.com>
50 * c-common.cc (def_fn_type): Call build_function_type for
51 zero-argument variable-argument function.
52 (c_common_nodes_and_builtins): Build default_function_type with
54 * c.opt (fallow-parameterless-variadic-functions): Mark as ignored
57 2022-10-28 Joseph Myers <joseph@codesourcery.com>
60 * c-common.h (ENUM_UNDERLYING_TYPE, ENUM_FIXED_UNDERLYING_TYPE_P):
61 New. Moved from cp/cp-tree.h.
62 * c-warn.cc (warnings_for_convert_and_check): Do not consider
63 conversions to enum with underlying type bool to overflow.
65 2022-10-26 Marek Polacek <polacek@redhat.com>
68 * c.opt (Wdangling-reference): New.
70 2022-10-19 Joseph Myers <joseph@codesourcery.com>
72 * c-format.h (enum format_lengths): Add FMT_LEN_w8, FMT_LEN_w16,
73 FMT_LEN_w32, FMT_LEN_w64, FMT_LEN_wf8, FMT_LEN_wf16, FMT_LEN_wf32
75 (NOARGUMENTS, NOLENGTHS): Update definitions.
76 (T_I8, T2X_I8, T_I16, T2X_I16, T_I32, T2X_I32, T_I64, T2X_I64)
77 (T_U8, T2X_U8, T_U16, T2X_U16, T_U32, T2X_U32, T_U64, T2X_U64)
78 (T_IF8, T2X_IF8, T_IF16, T2X_IF16, T_IF32, T2X_IF32, T_IF64)
79 (T2X_IF64, T_UF8, T2X_UF8, T_UF16, T2X_UF16, T_UF32, T2X_UF32)
80 (T_UF64, T2X_UF64): New macros.
81 * c-format.cc (printf_length_specs, scanf_length_specs): Add wN
82 and wfN length modifiers.
83 (print_char_table, scan_char_table): Add entries using wN and wfN
86 2022-10-18 Joseph Myers <joseph@codesourcery.com>
89 * c-common.cc (c_common_type_for_size): Add fallback to
90 widest_unsigned_literal_type_node or
91 widest_integer_literal_type_node for precision that may not
92 exactly match the precision of those types.
94 2022-10-14 Jakub Jelinek <jakub@redhat.com>
96 * c-cppbuiltin.cc (c_cpp_builtins): If bfloat16_type_node,
97 predefine __BFLT16_*__ macros and for C++23 also
98 __STDCPP_BFLOAT16_T__. Predefine bfloat16_type_node related
99 macros for -fbuilding-libgcc.
100 * c-lex.cc (interpret_float): Handle CPP_N_BFLOAT16.
102 2022-10-14 Jakub Jelinek <jakub@redhat.com>
106 * c-common.def (EXCESS_PRECISION_EXPR): Remove comment part about
107 the tree being specific to C/ObjC.
108 * c-opts.cc (c_common_post_options): Handle flag_excess_precision
109 in C++ the same as in C.
110 * c-lex.cc (interpret_float): Set const_type to excess_precision ()
113 2022-10-13 Joseph Myers <joseph@codesourcery.com>
115 * c-cppbuiltin.cc (builtin_define_float_constants): Do not use
116 value 2 for *_IS_IEC_60559.
118 2022-10-12 Lewis Hyatt <lhyatt@gmail.com>
120 PR preprocessor/60014
121 PR preprocessor/60723
122 * c-ppoutput.cc (class token_streamer): Remove member
123 line_marker_emitted to...
124 (token_streamer::stream): ...a local variable here. Set
125 print.prev_was_system_token on all code paths.
127 2022-10-10 Nathan Sidwell <nathan@acm.org>
129 * c-opts.cc (c_common_post_options): Bump abi to 18.
131 2022-10-10 Marek Polacek <polacek@redhat.com>
134 * c-pretty-print.cc (pp_c_specifier_qualifier_list): Print only GNU
136 (c_pretty_printer::direct_abstract_declarator): Print the standard [[]]
138 (pp_c_attributes): Remove.
139 (pp_c_attributes_display): Print the [[]] form if appropriate. Use
140 get_attribute_name. Don't print a trailing space when printing the
142 * c-pretty-print.h (pp_c_attributes): Remove.
144 2022-10-07 Qing Zhao <qing.zhao@oracle.com>
146 * c-attribs.cc (handle_strict_flex_array_attribute): New function.
147 (c_common_attribute_table): New item for strict_flex_array.
148 * c.opt: (fstrict-flex-arrays): New option.
149 (fstrict-flex-arrays=): New option.
151 2022-10-07 Martin Liska <mliska@suse.cz>
153 * name-hint.h: Use std::move.
155 2022-10-07 Jakub Jelinek <jakub@redhat.com>
157 * c-common.cc (attribute_fallthrough_p): Lookup fallthrough attribute
158 only in gnu namespace or as standard attribute, treat fallthrough
159 attributes in other namespaces like any other unknown attribute.
161 2022-10-06 Joseph Myers <joseph@codesourcery.com>
163 * c-common.cc (c_common_reswords): Mark typeof as D_EXT11. Add
165 * c-common.h (enum rid): Add RID_TYPEOF_UNQUAL.
166 (D_EXT11): New macro. Values of subsequent macros updated.
168 2022-10-06 Jakub Jelinek <jakub@redhat.com>
171 * c-attribs.cc (handle_assume_attribute): New function.
172 (c_common_attribute_table): Add entry for assume attribute.
173 * c-lex.cc (c_common_has_attribute): Handle
174 __have_cpp_attribute (assume).
176 2022-10-04 Jakub Jelinek <jakub@redhat.com>
178 * c-omp.cc (c_omp_directives): Uncomment begin declare target
181 2022-10-03 Patrick Palka <ppalka@redhat.com>
183 * c-common.cc (c_common_reswords): Use RID_IS_SAME instead of
186 2022-10-03 Joseph Myers <joseph@codesourcery.com>
188 * c-cppbuiltin.cc (builtin_define_float_constants): Do not
189 special-case __*_EPSILON__ setting for IBM long double for C2x.
191 2022-09-30 Patrick Palka <ppalka@redhat.com>
193 * c-common.cc (c_common_reswords): Use cp/cp-trait.def to handle
195 * c-common.h (enum rid): Likewise.
197 2022-09-29 Joseph Myers <joseph@codesourcery.com>
199 * c-lex.cc (c_common_has_attribute): Handle noreturn attribute for
202 2022-09-29 Patrick Palka <ppalka@redhat.com>
204 * c-common.cc (c_common_reswords): Add __remove_cv,
205 __remove_reference and __remove_cvref.
206 * c-common.h (enum rid): Add RID_REMOVE_CV, RID_REMOVE_REFERENCE
207 and RID_REMOVE_CVREF.
209 2022-09-27 Marek Polacek <polacek@redhat.com>
213 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
215 2022-09-27 Marek Polacek <polacek@redhat.com>
217 * c-format.cc (c_keywords): Drop nothrow.
219 2022-09-27 Jakub Jelinek <jakub@redhat.com>
222 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
223 __cpp_static_call_operator=202207L for C++23.
225 2022-09-27 Jakub Jelinek <jakub@redhat.com>
227 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
228 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
229 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
230 * c-pragma.cc (omp_pragmas): Add assumes and begin.
231 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
232 (omp_pragmas_simd): Add assume.
233 * c-common.h (c_omp_directives): Declare.
234 * c-omp.cc (omp_directives): Rename to ...
235 (c_omp_directives): ... this. No longer static. Uncomment
236 assume, assumes, begin assumes and end assumes entries.
237 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
239 (c_omp_categorize_directive): Adjust for omp_directives to
240 c_omp_directives renaming.
242 2022-09-27 Jakub Jelinek <jakub@redhat.com>
246 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
247 _Float{32,64,128}x flags from D_CONLY to 0.
248 (shorten_binary_op): Punt if common_type returns error_mark_node.
249 (shorten_compare): Likewise.
250 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
251 and _Float{32,64,128}x builtin types if available. For C++
252 clear float128t_type_node.
253 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
254 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
255 * c-lex.cc (interpret_float): For q/Q suffixes prefer
256 float128t_type_node over float128_type_node. Allow
257 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
258 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
259 with pedwarn. Don't call excess_precision_type for C++.
261 2022-09-26 Marek Polacek <polacek@redhat.com>
264 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
267 2022-09-23 Marek Polacek <polacek@redhat.com>
270 * c-common.cc (c_common_reswords): Add __is_convertible and
271 __is_nothrow_convertible.
272 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
273 RID_IS_NOTHROW_CONVERTIBLE.
275 2022-09-22 David Malcolm <dmalcolm@redhat.com>
278 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
279 values that don't fit in uhwi.
281 2022-09-15 Richard Biener <rguenther@suse.de>
283 * c-common.h (build_void_list_node): Remove.
284 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
287 2022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
289 * c-format.cc (convert_format_name_to_system_name): Fix warning.
291 2022-09-07 Joseph Myers <joseph@codesourcery.com>
293 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
294 for alignas, alignof, bool, false, static_assert, thread_local and
297 2022-09-07 Jakub Jelinek <jakub@redhat.com>
299 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
300 " in comments" from description.
301 (Wunicode): New option.
303 2022-09-06 Jakub Jelinek <jakub@redhat.com>
306 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
308 2022-09-03 Jakub Jelinek <jakub@redhat.com>
310 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
311 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
312 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
313 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
315 2022-09-02 David Malcolm <dmalcolm@redhat.com>
318 * c-common.h (check_for_xor_used_as_pow): New decl.
319 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
320 * c-warn.cc (check_for_xor_used_as_pow): New.
321 * c.opt (Wxor-used-as-pow): New.
323 2022-09-01 Jason Merrill <jason@redhat.com>
325 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
327 (braced_list_to_string): Check for char-sized elements.
329 2022-09-01 Jakub Jelinek <jakub@redhat.com>
332 * c.opt (-Winvalid-utf8): New warning.
333 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
334 Set cpp_opts->cpp_input_charset_explicit.
335 (c_common_post_options): If -finput-charset=UTF-8 is explicit
336 in C++23, enable -Winvalid-utf8 by default and if -pedantic
337 or -pedantic-errors, make it a pedwarn.
339 2022-08-31 Joseph Myers <joseph@codesourcery.com>
341 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
343 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
345 * c-common.h (do_case, c_add_case_label): Update declarations.
346 * c-lex.cc (c_common_has_attribute): For C, produce a result of
347 201910 for fallthrough and 202106 for maybe_unused.
349 2022-08-26 Marek Polacek <polacek@redhat.com>
352 * c.opt (Wself-move): New option.
354 2022-08-26 Jakub Jelinek <jakub@redhat.com>
356 * c-common.cc (check_builtin_function_arguments): Handle
357 BUILT_IN_ISSIGNALING.
359 2022-08-26 Jakub Jelinek <jakub@redhat.com>
362 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
363 __cpp_named_character_escapes to 202207L.
365 2022-08-25 Marek Polacek <polacek@redhat.com>
367 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
368 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
369 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
370 (struct c_common_resword): Resize the disable member.
372 (nullptr_node): Define.
373 (nullptr_type_node): Define.
374 (NULLPTR_TYPE_P): Define.
375 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
377 (c_pretty_printer::direct_abstract_declarator): Likewise.
378 (c_pretty_printer::constant): Likewise.
380 2022-08-16 Tom Honermann <tom@honermann.net>
383 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
384 diagnostics in C++20 and later.
385 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
387 2022-08-11 Marek Polacek <polacek@redhat.com>
390 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
391 suppress_warning here.
393 2022-08-08 Tom Honermann <tom@honermann.net>
395 PR preprocessor/106426
396 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
397 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
399 2022-08-08 Tom Honermann <tom@honermann.net>
401 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
402 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
404 * c-opts.cc (c_common_post_options): Set flag_char8_t if
407 2022-07-31 Lewis Hyatt <lhyatt@gmail.com>
410 * c-common.h: Rename global done_lexing to
411 override_libcpp_locations.
412 * c-common.cc (c_cpp_diagnostic): Likewise.
413 * c-opts.cc (c_common_finish): Set override_libcpp_locations
414 (formerly done_lexing) immediately prior to calling cpp_finish ().
416 2022-07-27 Lewis Hyatt <lhyatt@gmail.com>
418 * c-ppoutput.cc (token_streamer::stream): Update input_location
419 prior to streaming each token.
421 2022-07-23 Immad Mir <mirimmad@outlook.com>
423 * c-attribs.cc: (c_common_attribute_table): add three new attributes
424 namely: fd_arg, fd_arg_read and fd_arg_write.
425 (handle_fd_arg_attribute): New.
427 2022-07-15 Marek Polacek <polacek@redhat.com>
430 * c-common.cc (c_common_reswords): Add
431 __reference_constructs_from_temporary and
432 __reference_converts_from_temporary.
433 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
434 RID_REF_CONVERTS_FROM_TEMPORARY.
436 2022-07-15 Jonathan Wakely <jwakely@redhat.com>
438 * c-format.cc (class range_label_for_format_type_mismatch):
439 Adjust to new label_text API.
441 2022-07-11 Lewis Hyatt <lhyatt@gmail.com>
443 PR preprocessor/106252
444 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
445 option argument prior to verifying the option was found.
447 2022-07-07 David Malcolm <dmalcolm@redhat.com>
449 * c-format.cc (range_label_for_format_type_mismatch::get_text):
450 Update for removal of label_text::maybe_free in favor of automatic
453 2022-07-06 Lewis Hyatt <lhyatt@gmail.com>
455 PR preprocessor/53920
457 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
458 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
459 (c_pp_stream_token): Declare.
460 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
462 (should_output_pragmas): ...here. New function.
463 (token_streamer::stream): Support handling early pragmas.
464 (do_line_change): Likewise.
465 (c_pp_stream_token): New function.
466 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
467 (pragma_diagnostic_lex_normal): New function. Moved logic for
468 interpreting GCC diagnostic pragmas here.
469 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
470 directly from libcpp.
471 (handle_pragma_diagnostic): Refactor into helper function...
472 (handle_pragma_diagnostic_impl): ...here. New function.
473 (handle_pragma_diagnostic_early): New function.
474 (handle_pragma_diagnostic_early_pp): New function.
475 (struct pragma_ns_name): Renamed to...
476 (struct pragma_pp_data): ...this. Add new "early_handler" member.
477 (c_register_pragma_1): Support early pragmas in the preprocessor.
478 (c_register_pragma_with_early_handler): New function.
479 (c_register_pragma): Support the new early handlers in struct
480 internal_pragma_handler.
481 (c_register_pragma_with_data): Likewise.
482 (c_register_pragma_with_expansion): Likewise.
483 (c_register_pragma_with_expansion_and_data): Likewise.
484 (c_invoke_early_pragma_handler): New function.
485 (c_pp_invoke_early_pragma_handler): New function.
486 (init_pragma): Add early pragma support for diagnostic pragmas.
487 * c-pragma.h (struct internal_pragma_handler): Add new early handler
489 (c_register_pragma_with_early_handler): Declare.
490 (c_invoke_early_pragma_handler): Declare.
491 (c_pp_invoke_early_pragma_handler): Declare.
493 2022-07-05 Marek Polacek <polacek@redhat.com>
496 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
499 2022-07-01 Marek Polacek <polacek@redhat.com>
502 * c-common.h (enum rid): Update RID_LAST_CXX20.
504 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
506 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
509 2022-06-24 Jason Merrill <jason@redhat.com>
513 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
515 2022-06-18 Jakub Jelinek <jakub@redhat.com>
517 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
518 Use flag_sanitize_trap & SANITIZE_??? instead of
519 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
520 and flag_sanitize_trap differs for them, emit __builtin_trap only
521 for the comparison where trap is requested.
522 (ubsan_instrument_vla, ubsan_instrument_return): Use
523 lag_sanitize_trap & SANITIZE_??? instead of
524 flag_sanitize_undefined_trap_on_error.
526 2022-06-13 Jason Merrill <jason@redhat.com>
528 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
530 2022-05-27 Marek Polacek <polacek@redhat.com>
533 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
535 2022-05-27 Jakub Jelinek <jakub@redhat.com>
537 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
539 2022-05-20 David Malcolm <dmalcolm@redhat.com>
541 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
543 * c-pretty-print.h: Likewise.
545 2022-05-18 Marek Polacek <polacek@redhat.com>
548 * c.opt (Wenum-int-mismatch): New.
550 2022-05-18 Marek Polacek <polacek@redhat.com>
553 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
554 enumerator when it was marked with attribute unused.
556 2022-05-18 Eric Botcazou <ebotcazou@adacore.com>
558 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
559 floating-point complex types.
560 <POINTER_TYPE>: Do not use limited_with clause if the designated
561 type is a scalar type.
563 2022-05-17 Jakub Jelinek <jakub@redhat.com>
565 * c-omp.cc (c_finish_omp_depobj): Handle
566 OMP_CLAUSE_DEPEND_INOUTSET.
568 2022-05-16 Jason Merrill <jason@redhat.com>
571 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
574 2022-05-16 Martin Liska <mliska@suse.cz>
576 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
577 (c_common_nodes_and_builtins): Likewise.
578 * c-format.cc (check_tokens): Likewise.
579 (check_plain): Likewise.
580 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
581 (init_pragma): Likewise.
582 * known-headers.cc (get_string_macro_hint): Likewise.
583 (get_stdlib_header_for_name): Likewise.
584 * c-attribs.cc: Likewise.
586 2022-05-13 Richard Biener <rguenther@suse.de>
588 * c-omp.cc: Remove gimple-fold.h include.
590 2022-05-12 Jakub Jelinek <jakub@redhat.com>
592 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
593 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
594 if null_pointer_node.
596 2022-05-11 Martin Liska <mliska@suse.cz>
599 * c-opts.cc (c_common_handle_option): Change option name.
600 * c.opt: Remove Joined and use Separate option.
602 2022-05-09 Alex Coplan <alex.coplan@arm.com>
604 * c-common.h (get_dump_info): Delete.
605 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
606 from the global dump_manager instead of the (now obsolete)
608 * c-opts.cc (original_dump_file): Delete.
609 (original_dump_flags): Delete.
610 (c_common_parse_file): Switch to using global dump_manager to
611 manage the original dump file; fix leak of dump file.
612 (get_dump_info): Delete.
614 2022-05-07 Marek Polacek <polacek@redhat.com>
618 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
619 with FN being either a function declaration or function type. Use
620 maybe_adjust_arg_pos_for_attribute.
621 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
622 check_function_format.
623 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
624 (positional_argument): Adjust.
625 * c-format.cc (get_constant): Rename to ...
626 (validate_constant): ... this. Take EXPR by reference. Return bool
628 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
629 return value of validate_constant.
630 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
631 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
632 (check_function_format): Adjust a parameter name.
633 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
635 2022-05-04 Marek Polacek <polacek@redhat.com>
637 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
640 2022-04-30 Jason Merrill <jason@redhat.com>
643 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
645 * c-common.cc (set_underlying_type): Add assert.
647 2022-04-26 Patrick Palka <ppalka@redhat.com>
650 * c-common.cc (verify_tree) [restart]: Move up to before the
653 2022-04-11 Jakub Jelinek <jakub@redhat.com>
656 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
657 and __int%d__ builtin types, initialize corresponding ridpointers
660 2022-03-30 Marek Polacek <polacek@redhat.com>
663 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
664 conversion_warning when OP1 is null.
666 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
668 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
669 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
672 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
674 * c.opt (Wuse-after-free): Remove.
676 2022-03-30 Thomas Schwinge <thomas@codesourcery.com>
678 * c.opt (Warray-bounds): Remove.
680 2022-03-26 Thomas Schwinge <thomas@codesourcery.com>
682 * c.opt: Properly quote comment.
684 2022-03-25 Eric Botcazou <ebotcazou@adacore.com>
686 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
687 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
688 the referenced type instead. Deal with the anonymous original type
689 of a typedef'ed type. In the actual access case, follow the chain
690 of external subtypes.
691 <TYPE_DECL>: Tidy up control flow.
693 2022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
695 * c-ada-spec.cc: Change array length
697 2022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
699 * c-common.cc (c_family_tests): Call the new tests.
700 * c-common.h (c_diagnostic_tests): Declare.
701 (c_opt_problem_cc_tests): Likewise.
703 2022-03-19 Jakub Jelinek <jakub@redhat.com>
706 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
707 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
710 2022-03-16 Christophe Lyon <christophe.lyon@arm.com>
711 Roger Sayle <roger@nextmovesoftware.com>
714 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
716 2022-03-16 Patrick Palka <ppalka@redhat.com>
719 * c.opt: Add -ffold-simple-inlines.
721 2022-03-13 Tobias Burnus <tobias@codesourcery.com>
723 * c-target.def (check_string_object_format_arg): Fix description typo.
725 2022-03-12 Thomas Schwinge <thomas@codesourcery.com>
728 * c-common.h (c_omp_map_clause_name): Remove.
729 * c-omp.cc (c_omp_map_clause_name): Remove.
731 2022-03-09 Jakub Jelinek <jakub@redhat.com>
734 * c-opts.cc (c_common_post_options): Don't enable
735 -Wshift-negative-value from -Wextra for C++20 or later.
736 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
737 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
738 instead of TYPE_UNSIGNED.
740 2022-03-07 Jakub Jelinek <jakub@redhat.com>
742 * c-attribs.cc: Fix up duplicated word issue in a comment.
744 2022-03-01 Martin Liska <mliska@suse.cz>
747 * c-attribs.cc (handle_target_clones_attribute): Use
748 get_target_clone_attr_len and report warning soon.
750 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
752 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
753 (handle_pragma_weak): Likewise.
754 (handle_pragma_scalar_storage_order): Likewise.
755 (handle_pragma_redefine_extname): Likewise.
756 (handle_pragma_visibility): Likewise.
757 (handle_pragma_diagnostic): Likewise.
758 (handle_pragma_target): Likewise.
759 (handle_pragma_optimize): Likewise.
760 (handle_pragma_push_options): Likewise.
761 (handle_pragma_pop_options): Likewise.
762 (handle_pragma_reset_options): Likewise.
763 (handle_pragma_message): Likewise.
764 (handle_pragma_float_const_decimal64): Likewise.
766 2022-02-16 Jakub Jelinek <jakub@redhat.com>
769 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
770 build_binary_op with LT_EXPR and only if that doesn't return
771 error_mark_node call build_modify_expr.
773 2022-02-16 Jakub Jelinek <jakub@redhat.com>
776 * c-common.cc (shorten_compare): Convert original arguments to
777 the original *restype_ptr when mixing binary and decimal float.
779 2022-02-14 Richard Biener <rguenther@suse.de>
782 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
783 internal function calls.
785 2022-02-11 Richard Biener <rguenther@suse.de>
787 * c-attribs.cc (c_common_attribute_table): Add entry for
789 (handle_vector_mask_attribute): New.
791 2022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
793 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
794 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
795 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
797 2022-02-09 Jason Merrill <jason@redhat.com>
799 * c-cppbuiltin.cc (c_cpp_builtins): Update values
800 of __cpp_constexpr and __cpp_concepts for C++20.
802 2022-01-24 Marek Polacek <polacek@redhat.com>
804 PR preprocessor/104030
805 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
807 2022-01-21 Jakub Jelinek <jakub@redhat.com>
810 * c-common.h (check_function_arguments_recurse): Add for_format
812 * c-common.cc (check_function_nonnull): Pass false to
813 check_function_arguments_recurse's last argument.
814 (check_function_arguments_recurse): Add for_format argument,
815 if true, don't stop on warning_suppressed_p.
816 * c-format.cc (check_format_info): Pass true to
817 check_function_arguments_recurse's last argument.
819 2022-01-19 David Malcolm <dmalcolm@redhat.com>
821 * c-common.cc (c_common_c_tests): Rename to...
822 (c_common_cc_tests): ...this.
823 (c_family_tests): Update calls for .c to .cc renaming.
824 * c-common.h (c_format_c_tests): Rename to...
825 (c_format_cc_tests): ...this.
826 (c_indentation_c_tests): Rename to...
827 (c_indentation_cc_tests): ...this.
828 (c_pretty_print_c_tests): Rename to...
829 (c_pretty_print_cc_tests): ...this.
830 * c-format.cc (c_format_c_tests): Rename to...
831 (c_format_cc_tests): ...this.
832 * c-indentation.cc (c_indentation_c_tests): Rename to...
833 (c_indentation_cc_tests): ...this.
834 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
835 (c_pretty_print_cc_tests): ...this.
837 2022-01-17 Martin Liska <mliska@suse.cz>
839 * c-ada-spec.cc: Rename .c names to .cc.
840 * c-ada-spec.h: Likewise.
841 * c-common.cc (c_build_vec_convert): Likewise.
842 (warning_candidate_p): Likewise.
843 * c-common.h (enum rid): Likewise.
844 (build_real_imag_expr): Likewise.
845 (finish_label_address_expr): Likewise.
846 (c_get_substring_location): Likewise.
847 (c_build_bind_expr): Likewise.
848 (conflict_marker_get_final_tok_kind): Likewise.
849 (c_parse_error): Likewise.
850 (check_missing_format_attribute): Likewise.
851 (invalid_array_size_error): Likewise.
852 (warn_for_multistatement_macros): Likewise.
853 (build_attr_access_from_parms): Likewise.
854 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
855 * c-format.cc: Likewise.
856 * c-gimplify.cc (c_gimplify_expr): Likewise.
857 * c-indentation.h: Likewise.
858 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
859 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
860 * c-opts.cc (c_common_post_options): Likewise.
861 (set_std_cxx23): Likewise.
862 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
863 * c-pretty-print.h: Likewise.
865 2022-01-17 Martin Liska <mliska@suse.cz>
867 * c-ada-spec.c: Moved to...
868 * c-ada-spec.cc: ...here.
869 * c-attribs.c: Moved to...
870 * c-attribs.cc: ...here.
871 * c-common.c: Moved to...
872 * c-common.cc: ...here.
873 * c-cppbuiltin.c: Moved to...
874 * c-cppbuiltin.cc: ...here.
875 * c-dump.c: Moved to...
876 * c-dump.cc: ...here.
877 * c-format.c: Moved to...
878 * c-format.cc: ...here.
879 * c-gimplify.c: Moved to...
880 * c-gimplify.cc: ...here.
881 * c-indentation.c: Moved to...
882 * c-indentation.cc: ...here.
883 * c-lex.c: Moved to...
885 * c-omp.c: Moved to...
887 * c-opts.c: Moved to...
888 * c-opts.cc: ...here.
889 * c-pch.c: Moved to...
891 * c-ppoutput.c: Moved to...
892 * c-ppoutput.cc: ...here.
893 * c-pragma.c: Moved to...
894 * c-pragma.cc: ...here.
895 * c-pretty-print.c: Moved to...
896 * c-pretty-print.cc: ...here.
897 * c-semantics.c: Moved to...
898 * c-semantics.cc: ...here.
899 * c-ubsan.c: Moved to...
900 * c-ubsan.cc: ...here.
901 * c-warn.c: Moved to...
902 * c-warn.cc: ...here.
903 * cppspec.c: Moved to...
904 * cppspec.cc: ...here.
905 * stub-objc.c: Moved to...
906 * stub-objc.cc: ...here.
908 2022-01-15 Martin Sebor <msebor@redhat.com>
911 * c.opt (-Wdangling-pointer): New option.
913 2022-01-15 Martin Sebor <msebor@redhat.com>
915 PR tree-optimization/80532
916 * c.opt (-Wuse-after-free): New options.
918 2022-01-14 David Malcolm <dmalcolm@redhat.com>
920 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
921 (handle_tainted_args_attribute): New.
923 2022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
924 Jason Merrill <jason@redhat.com>
927 * c.opt: Added -Wmissing-template-keyword.
929 2022-01-13 Richard Biener <rguenther@suse.de>
932 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
934 2022-01-12 Martin Liska <mliska@suse.cz>
937 * c-attribs.c (handle_optimize_attribute): Do not call
938 cl_optimization_compare if we seen an error.
940 2022-01-11 Jakub Jelinek <jakub@redhat.com>
944 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
947 2022-01-10 Richard Biener <rguenther@suse.de>
950 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
951 in a TARGET_EXPR to force a temporary.
953 2022-01-06 Marek Polacek <polacek@redhat.com>
956 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
958 (handle_pragma_diagnostic): Likewise.
960 2022-01-03 Marek Polacek <polacek@redhat.com>
963 * c-format.c (check_tokens): Accept "decl-specifier*".
965 2022-01-03 Jakub Jelinek <jakub@redhat.com>
968 * c-attribs.c (handle_non_overlapping_attribute): New function.
969 (c_common_attribute_table): Add "non overlapping" attribute.
971 2021-12-30 Jakub Jelinek <jakub@redhat.com>
974 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
975 cpp_define_unused/cpp_undef calls with forced token locations
978 2021-12-27 Patrick Palka <ppalka@redhat.com>
981 * c-common.c (pointer_int_sum): When quiet, return
982 error_mark_node for an incomplete pointed-to type and don't
983 call size_in_bytes_loc.
985 2021-12-17 Jason Merrill <jason@redhat.com>
988 * c-opts.c (c_common_post_options): Update defaults.
990 2021-12-16 Martin Liska <mliska@suse.cz>
993 * c-pragma.c (handle_pragma_pop_options): Do not check
994 global options modification when an error is seen in parsing
995 of options (pragmas or attributes).
997 2021-12-12 Jonathan Wakely <jwakely@redhat.com>
999 * known-headers.cc: Define INCLUDE_MEMORY instead of
1001 * name-hint.h: Likewise.
1002 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
1004 2021-12-09 Jakub Jelinek <jakub@redhat.com>
1007 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
1008 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
1010 2021-12-03 Jakub Jelinek <jakub@redhat.com>
1013 * c-pch.c (struct c_pch_validity): Remove pch_init member.
1014 (pch_init): Don't initialize v.pch_init.
1015 (c_common_valid_pch): Don't warn and punt if .text addresses change.
1017 2021-12-01 Jason Merrill <jason@redhat.com>
1020 * c.opt: Add -fconstexpr-fp-except.
1022 2021-11-29 Richard Biener <rguenther@suse.de>
1024 * c-format.c (check_format_string): Remove spurious
1027 2021-11-29 Richard Biener <rguenther@suse.de>
1029 * c-opts.c (c_common_post_options): Remove unreachable return.
1030 * c-pragma.c (handle_pragma_target): Likewise.
1031 (handle_pragma_optimize): Likewise.
1033 2021-11-25 Jakub Jelinek <jakub@redhat.com>
1036 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
1037 default for C++23 regardless of warn_deprecated.
1038 * c-cppbuiltin.c (c_cpp_builtins): Predefine
1039 __cpp_multidimensional_subscript=202110L for C++23.
1041 2021-11-23 Martin Sebor <msebor@redhat.com>
1044 * c.opt: Add -Winfinite-recursion.
1046 2021-11-19 Martin Sebor <msebor@redhat.com>
1050 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
1051 and improve handling tof defined symbols.
1053 2021-11-19 Martin Liska <mliska@suse.cz>
1056 2021-11-18 Martin Liska <mliska@suse.cz>
1058 * c-gimplify.c (genericize_c_loop): Use option directly.
1060 2021-11-18 Matthias Kretz <m.kretz@gsi.de>
1062 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
1063 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
1065 2021-11-18 Martin Liska <mliska@suse.cz>
1067 * c-gimplify.c (genericize_c_loop): Use option directly.
1069 2021-11-17 Martin Uecker <uecker@gcc.gnu.org>
1073 * c-common.c (pointer_int_sum): Make sure pointer expressions
1074 are evaluated first when the size expression depends on for
1075 variably-modified types.
1077 2021-11-17 Marek Polacek <polacek@redhat.com>
1079 PR preprocessor/103026
1080 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
1082 2021-11-16 Jason Merrill <jason@redhat.com>
1084 * c-common.c (release_tree_vector): Only cache vecs smaller than
1087 2021-11-15 Jason Merrill <jason@redhat.com>
1089 * c.opt: Add -fimplicit-constexpr.
1090 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
1091 * c-opts.c (c_common_post_options): Disable below C++14.
1093 2021-11-15 Jakub Jelinek <jakub@redhat.com>
1095 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
1096 Duplicate to both OMP_TARGET and OMP_TEAMS.
1098 2021-11-10 Marek Polacek <polacek@redhat.com>
1101 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
1104 2021-11-09 David Malcolm <dmalcolm@redhat.com>
1106 * c-pragma.c (GCC_BAD_AT): New macro.
1107 (GCC_BAD2_AT): New macro.
1108 (handle_pragma_pack): Use the location of the pertinent token when
1109 issuing diagnostics about invalid constants/actions, and trailing
1111 (handle_pragma_target): Likewise for non-string "GCC option".
1112 (handle_pragma_message): Likewise for trailing junk.
1114 2021-11-03 Joseph Myers <joseph@codesourcery.com>
1117 * c-common.c (convert_and_check): Add argument init_const. Call
1118 convert_init if init_const.
1119 * c-common.h (convert_and_check): Update prototype.
1120 (convert_init): New prototype.
1122 2021-11-01 David Malcolm <dmalcolm@redhat.com>
1124 * c-lex.c (c_lex_with_flags): When complaining about non-printable
1125 CPP_OTHER tokens, set the "escape on output" flag.
1127 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1129 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
1131 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
1132 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
1134 2021-10-27 Jakub Jelinek <jakub@redhat.com>
1137 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
1138 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
1139 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
1140 conversions temporarily clear the 3rd bit from d->kind while walking
1142 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
1143 if possibly non-rectangular.
1145 2021-10-21 Jakub Jelinek <jakub@redhat.com>
1148 * c-omp.c (c_omp_predefined_variable): Return true also for
1149 ubsan_create_data created artificial variables.
1151 2021-10-14 Joseph Myers <joseph@codesourcery.com>
1153 * c-format.c (printf_length_specs, scanf_length_specs)
1154 (print_char_table, scan_char_table): Support DFP formats for C2X.
1155 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
1156 (T2X_D32, T2X_D64, T2X_D128): New macros.
1158 2021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
1160 * c-omp.c (c_omp_check_context_selector): Rename to
1161 omp_check_context_selector and move to omp-general.c.
1162 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
1163 move to omp-general.c.
1165 2021-10-12 Joseph Myers <joseph@codesourcery.com>
1167 * c-format.c (print_char_table): Add %b and %B formats.
1168 (scan_char_table): Add %b format.
1169 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
1170 (T2X_UPD, T2X_UIM): New macros.
1172 2021-10-12 Jakub Jelinek <jakub@redhat.com>
1174 * c-omp.c (c_finish_omp_atomic): Use
1175 clear_padding_type_may_have_padding_p.
1177 2021-10-08 Martin Liska <mliska@suse.cz>
1179 * c-opts.c (c_common_post_options): Use new macro
1182 2021-10-07 Martin Liska <mliska@suse.cz>
1184 * c-common.c (parse_optimize_options): Make
1185 save_opt_decoded_options a pointer type.
1187 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1189 PR tree-optimization/102571
1190 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
1191 padding, but the non-padding bits are contiguous set of bytes
1192 by adjusting the memcmp call arguments instead of emitting
1193 __builtin_clear_padding and then comparing all the type's bytes.
1195 2021-10-06 Jakub Jelinek <jakub@redhat.com>
1198 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
1199 __cpp_constexpr to 202110L rather than 201907L.
1201 2021-10-04 Marek Polacek <polacek@redhat.com>
1204 * c-common.h (do_warn_array_compare): Declare.
1205 * c-warn.c (do_warn_array_compare): New.
1206 * c.opt (Warray-compare): New option.
1208 2021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1210 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1211 NULL, this is not needed.
1213 2021-10-01 Martin Sebor <msebor@redhat.com>
1216 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1217 Check and perform warning suppression.
1218 (c_common_truthvalue_conversion): Enhance warning suppression.
1220 2021-10-01 Martin Liska <mliska@suse.cz>
1223 * c-common.c (parse_optimize_options): decoded_options[0] is
1224 used for program name, so merged_decoded_options should also
1227 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1228 Richard Biener <rguenther@suse.de>
1231 * c-ubsan.c (ubsan_instrument_division): Check the right
1232 flag_sanitize_recover bit, depending on which sanitization
1233 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1234 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1235 and SANITIZE_DIVIDE is enabled, neither check is known
1236 to be false and flag_sanitize_recover bits for those two
1237 aren't the same, emit both __ubsan_handle_divrem_overflow
1238 and __ubsan_handle_divrem_overflow_abort calls.
1240 2021-10-01 Martin Liska <mliska@suse.cz>
1242 * c-common.c (parse_optimize_options): Combine optimize
1243 options with what was provided on the command line.
1245 2021-10-01 Jakub Jelinek <jakub@redhat.com>
1247 * c-omp.c (c_omp_split_clauses): Also copy
1248 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1250 2021-09-27 Martin Liska <mliska@suse.cz>
1252 * c-opts.c (c_common_init_options_struct): Set also
1253 x_flag_default_complex_method.
1255 2021-09-22 Jakub Jelinek <jakub@redhat.com>
1257 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1259 2021-09-20 Matthias Kretz <m.kretz@gsi.de>
1261 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1262 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1263 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1264 __ROUNDING_MATH__ according to the new optimization flags.
1266 2021-09-18 Jakub Jelinek <jakub@redhat.com>
1268 * c-omp.c (c_omp_split_clauses): Split order clause also to
1269 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1271 2021-09-17 Jakub Jelinek <jakub@redhat.com>
1273 * c-omp.c (c_finish_omp_atomic): Avoid creating
1274 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1275 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1276 had NULL initializer. When omitting operands after v = x,
1277 use type of v rather than type of x. Fix type of vtmp
1280 2021-09-13 Jason Merrill <jason@redhat.com>
1282 * c.opt: Add -Winterference-size.
1283 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1284 and __GCC_CONSTRUCTIVE_SIZE.
1286 2021-09-10 Jakub Jelinek <jakub@redhat.com>
1288 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1289 * c-omp.c: Include gimple-fold.h.
1290 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1293 2021-09-09 qing zhao <qing.zhao@oracle.com>
1295 * c-attribs.c (handle_uninitialized_attribute): New function.
1296 (c_common_attribute_table): Add "uninitialized" attribute.
1298 2021-09-08 liuhongt <hongtao.liu@intel.com>
1300 * c-common.c (excess_precision_mode_join): Update below comments.
1301 (c_ts18661_flt_eval_method): Set excess_precision_type to
1302 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1303 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1304 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1305 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1307 2021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1309 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1311 2021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1313 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1314 and -gnatwu warning for the package specification.
1316 2021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1318 * c-attribs.c (handle_unavailable_attribute): New.
1320 2021-08-30 Jason Merrill <jason@redhat.com>
1322 * c.opt: Add -Wmissing-requires.
1324 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1327 * c-opts.c (c_common_input_charset_cb): New function.
1328 (c_common_post_options): Call new function
1329 diagnostic_initialize_input_context().
1331 2021-08-20 Tobias Burnus <tobias@codesourcery.com>
1333 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1334 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1335 "di" and "u", respecitively; fill with BADLEN to match
1337 (get_init_dynamic_hwi): Split off from ...
1338 (init_dynamic_diag_info): ... here. Call it.
1339 (init_dynamic_gfc_info): Call it.
1341 2021-08-20 Jakub Jelinek <jakub@redhat.com>
1343 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1344 * c-pragma.c (omp_pragmas): Add error directive.
1345 * c-omp.c (omp_directives): Uncomment error directive entry.
1347 2021-08-18 Jakub Jelinek <jakub@redhat.com>
1349 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1350 * c-pragma.c (omp_pragmas): Add nothing directive.
1351 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1353 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1356 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1357 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1359 2021-08-17 Matt Jacobson <mhjacobson@me.com>
1361 * c-opts.c (c_common_post_options): Default to
1362 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1364 2021-08-17 Jakub Jelinek <jakub@redhat.com>
1366 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1367 * c-pragma.c (omp_pragmas): Add scope construct.
1368 * c-omp.c (omp_directives): Uncomment scope directive entry.
1370 2021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1372 * c-cppbuiltin.c (c_cpp_builtins): Define
1373 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1375 2021-08-12 Jakub Jelinek <jakub@redhat.com>
1377 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1378 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1379 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1380 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1382 (c_finish_omp_masked): Declare.
1383 * c-omp.c (c_finish_omp_masked): New function.
1384 (c_omp_split_clauses): Handle combined masked constructs.
1386 2021-07-30 Jakub Jelinek <jakub@redhat.com>
1389 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1390 * c-common.c (c_common_reswords): Add
1391 __is_pointer_interconvertible_base_of.
1393 2021-07-29 Richard Biener <rguenther@suse.de>
1396 * c-common.c (c_common_mark_addressable_vec): Look through
1397 C_MAYBE_CONST_EXPR even if not at the toplevel.
1399 2021-07-27 Martin Sebor <msebor@redhat.com>
1402 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1404 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1406 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1407 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1410 2021-07-23 Jakub Jelinek <jakub@redhat.com>
1412 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1413 PRAGMA_OMP__LAST_ enumerators.
1415 2021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1416 Joseph Myers <joseph@codesourcery.com>
1417 Cesar Philippidis <cesar@codesourcery.com>
1419 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1421 2021-07-20 Martin Sebor <msebor@redhat.com>
1423 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1425 * c-common.h (c_build_shufflevector): Same.
1427 2021-07-16 Andrew Pinski <apinski@marvell.com>
1430 * c-common.c (parse_optimize_options): Use the correct
1433 2021-07-15 Martin Sebor <msebor@redhat.com>
1437 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1439 2021-07-14 Jason Merrill <jason@redhat.com>
1441 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1443 2021-07-06 Martin Sebor <msebor@redhat.com>
1445 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1446 (gcc_cdiag_char_table): Same.
1447 (gcc_cxxdiag_char_table): Same.
1449 2021-07-02 Jakub Jelinek <jakub@redhat.com>
1451 * c-common.h (enum c_omp_directive_kind): New enum.
1452 (struct c_omp_directive): New type.
1453 (c_omp_categorize_directive): Declare.
1454 * c-omp.c (omp_directives): New variable.
1455 (c_omp_categorize_directive): New function.
1457 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1459 * c-ada-spec.c (packed_layout): New global variable.
1460 (dump_ada_declaration): Set it upon seeing a packed record type.
1461 Do not put the "aliased" keyword if it is set.
1462 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1464 2021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1466 * c-ada-spec.c (check_name): Rename into...
1467 (check_type_name_conflict): ...this. Minor tweak.
1468 (dump_ada_function_declaration): Adjust to above renaming.
1469 (dump_ada_array_domains): Fix oversight.
1470 (dump_ada_declaration): Call check_type_name_conflict for variables.
1472 2021-06-25 Martin Sebor <msebor@redhat.com>
1474 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1475 (c_common_truthvalue_conversion): Replace direct uses of
1476 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1478 (check_function_arguments_recurse): Same.
1479 * c-gimplify.c (c_gimplify_expr): Same.
1480 * c-warn.c (overflow_warning): Same.
1481 (warn_logical_operator): Same.
1482 (warn_if_unused_value): Same.
1483 (do_warn_unused_parameter): Same.
1485 2021-06-24 Jakub Jelinek <jakub@redhat.com>
1487 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1489 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1490 combined target constructs also add map (always, tofrom:) clause.
1492 2021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1494 * c-attribs.c (common_handle_aligned_attribute): Remove short
1495 circuit and dead code.
1497 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1500 * known-headers.cc (get_stdlib_header_for_name): Add known
1501 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1504 2021-06-12 Jason Merrill <jason@redhat.com>
1506 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1508 2021-06-11 Jakub Jelinek <jakub@redhat.com>
1511 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1512 -std=c++2b for P1938R3 consteval if support.
1514 2021-06-09 Jason Merrill <jason@redhat.com>
1517 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1520 2021-06-07 Martin Liska <mliska@suse.cz>
1522 * c-target.def: Split long lines and replace them
1525 2021-06-04 Martin Sebor <msebor@redhat.com>
1528 * c-attribs.c (positional_argument): Bail on erroneous types.
1530 2021-06-04 Martin Sebor <msebor@redhat.com>
1532 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1533 for element presence.
1535 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1537 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1538 (dump_ada_decl_name): Likewise.
1539 (dump_anonymous_type_name): Remove parent parameter and adjust.
1540 (dump_sloc): Minor tweak.
1541 (dump_ada_array_type): Remove type parameter and adjust.
1542 (dump_ada_enum_type): Remove parent parameter and adjust.
1543 (dump_ada_node): Adjust calls to above functions.
1544 (dumped_anonymous_types): New global variable.
1545 (dump_nested_types_1): Rename into...
1546 (dump_nested_types): ...this.
1547 (dump_nested_type): Remove parent and dumped_types parameters.
1548 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1549 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1550 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1552 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1554 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1555 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1557 2021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1559 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1560 (htable_t): New typedef.
1561 (overloaded_names): Use it.
1562 (add_name): New function.
1563 (init_overloaded_names): Use add_name to populate the table and add
1564 special cases for sigaction and stat.
1565 (overloaded_name_p): Rename into...
1566 (overloading_index): ...this. Do not initialize overloaded_names table
1567 here. Return the index or zero.
1568 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1569 but add an overloading suffix instead.
1570 (dump_ada_specs): Initialize overloaded_names tables here.
1572 2021-06-01 Martin Liska <mliska@suse.cz>
1575 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1576 to a situation where we are not in processing of an optimize
1578 * c-pragma.c (handle_pragma_pop_options): Restore target
1581 2021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1584 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1586 2021-05-31 Richard Biener <rguenther@suse.de>
1589 * c-common.c: Include tree-vector-builder.h and
1591 (c_common_reswords): Add __builtin_shufflevector.
1592 (c_build_shufflevector): New funtion.
1593 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1594 (c_build_shufflevector): Declare.
1596 2021-05-28 Jakub Jelinek <jakub@redhat.com>
1599 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1600 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1602 2021-05-28 Tobias Burnus <tobias@codesourcery.com>
1604 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1606 2021-05-25 Martin Liska <mliska@suse.cz>
1608 PR tree-optimization/92860
1610 * c-attribs.c (handle_optimize_attribute): Save target node
1611 before calling parse_optimize_options and save it in case
1613 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1614 (handle_pragma_pop_options): Likewise here.
1616 2021-05-25 Martin Liska <mliska@suse.cz>
1618 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1620 2021-05-25 Jakub Jelinek <jakub@redhat.com>
1623 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1624 combined with simd and not with taskloop or for.
1626 2021-05-21 Jakub Jelinek <jakub@redhat.com>
1629 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1630 on firstprivate clause copy going to target construct, and for
1631 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1633 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
1635 * c.opt (Wc++11-extensions, Wc++14-extensions)
1636 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1639 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1641 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1643 2021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1645 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1646 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1647 (pch_init): Renamed member.
1648 (c_common_valid_pch): Adjust access to debug_type_names.
1650 2021-05-19 Martin Sebor <msebor@redhat.com>
1653 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1656 2021-05-18 Richard Biener <rguenther@suse.de>
1659 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1660 Reword existing nunit diagnostic.
1662 2021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1664 * c-common.c (braced_list_to_string): Return CTOR unchanged
1665 if host and target character sizes don't match.
1667 2021-05-14 Martin Liska <mliska@suse.cz>
1669 * c.opt: Add Warning keyword for 2 options.
1671 2021-05-13 Martin Liska <mliska@suse.cz>
1673 PR middle-end/100504
1674 * c-attribs.c (handle_target_clones_attribute): Expect a string
1675 argument to target_clone argument.
1677 2021-05-11 Joseph Myers <joseph@codesourcery.com>
1679 * c-lex.c (interpret_float): Handle digit separators for C2X.
1681 2021-05-10 Martin Liska <mliska@suse.cz>
1683 * c-ada-spec.c (print_destructor): Use startswith
1684 function instead of strncmp.
1685 (dump_ada_declaration): Likewise.
1686 * c-common.c (disable_builtin_function): Likewise.
1687 (def_builtin_1): Likewise.
1688 * c-format.c (check_tokens): Likewise.
1689 (check_plain): Likewise.
1690 (convert_format_name_to_system_name): Likewise.
1692 2021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1694 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1697 2021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1698 Nathan Sidwell <nathan@codesourcery.com>
1699 Tom de Vries <vries@codesourcery.com>
1700 Julian Brown <julian@codesourcery.com>
1701 Kwok Cheung Yeung <kcy@codesourcery.com>
1703 * c.opt (Wopenacc-parallelism): New.
1705 2021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1707 * c.opt (fopenacc-kernels=): Remove.
1709 2021-04-08 Jakub Jelinek <jakub@redhat.com>
1711 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1712 occured -> occurred.
1713 (check_alignment_of_packed_member): Fix a comment typo,
1715 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1716 and onless -> unless.
1717 (warn_parm_array_mismatch): Fix comment typos, declaratation
1718 -> declaration and woud -> would. Fix up comment indentation.
1720 2021-04-08 Martin Sebor <msebor@redhat.com>
1723 * c.opt (Wmismatched-new-delete): Correct spelling.
1725 2021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1727 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1728 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1729 enumeral types use again the type name for the enumeration constants.
1730 (dump_ada_node): Adjust call to dump_ada_enum_type.
1731 (dump_nested_type): Likewise.
1733 2021-04-01 Jason Merrill <jason@redhat.com>
1736 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1738 2021-03-25 Jakub Jelinek <jakub@redhat.com>
1741 * c-warn.c (do_warn_duplicated_branches): Pass also
1742 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1744 2021-03-20 Jakub Jelinek <jakub@redhat.com>
1747 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1749 2021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1751 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1752 after entering the separate class package, if any.
1754 2021-03-04 Richard Biener <rguenther@suse.de>
1756 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1759 2021-03-04 Jakub Jelinek <jakub@redhat.com>
1762 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1763 (token_streamer::stream) Likewise.
1764 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1767 2021-03-03 Jakub Jelinek <jakub@redhat.com>
1770 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1771 instead of mark_addressable. Fix a comment typo -
1772 neutrallly -> neutrally.
1774 2021-02-28 Jakub Jelinek <jakub@redhat.com>
1777 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1778 message - refernced -> referenced. Remove superfluous space before
1779 closing paren of function calls.
1781 2021-02-25 Nathan Sidwell <nathan@acm.org>
1784 * c.opt (-flang-info-module-cmi): Renamed option.
1786 2021-02-19 Nathan Sidwell <nathan@acm.org>
1788 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1790 2021-02-18 H.J. Lu <hjl.tools@gmail.com>
1793 * c-attribs.c (c_common_attribute_table): Add the "retain"
1795 (handle_retain_attribute): New function.
1797 2021-02-16 Marek Polacek <polacek@redhat.com>
1800 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1801 alignment argument is non-negative. Tweak a warning message.
1803 2021-02-12 Martin Sebor <msebor@redhat.com>
1806 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1807 print_generic_expr_to_str.
1809 2021-02-10 Richard Biener <rguenther@suse.de>
1811 * c-common.c (parse_optimize_options): Free decoded_options.
1813 2021-02-04 emsr <3dw4rd@verizon.net>
1815 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1817 2021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1819 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1820 * c-lex.c (interpret_integer): Set node type for size literal.
1822 2021-01-28 Jakub Jelinek <jakub@redhat.com>
1824 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1825 draft from description.
1826 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1828 2021-01-26 Paul Fee <paul.f.fee@gmail.com>
1830 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1831 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1833 * c-opts.c (set_std_cxx23): New.
1834 (c_common_handle_option): Set options when -std=c++23 is enabled.
1835 (c_common_post_options): Adjust comments.
1836 (set_std_cxx20): Likewise.
1838 2021-01-25 Martin Sebor <msebor@redhat.com>
1841 * c-common.c (check_nonnull_arg): Adjust warning text.
1843 2021-01-17 Martin Sebor <msebor@redhat.com>
1845 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1846 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1848 2021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1850 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1851 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1853 2021-01-15 Jakub Jelinek <jakub@redhat.com>
1855 PR tree-optimization/98597
1856 * c-pretty-print.c: Include options.h.
1857 (c_fold_indirect_ref_for_warn): New function.
1858 (print_mem_ref): Use it. If it returns something that has compatible
1859 type and is TBAA compatible with zero offset, print it and return,
1860 otherwise print it using offsetof syntax or array ref syntax. Fix up
1861 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1862 argument has pointer to array type. Print pointers using the standard
1865 2021-01-12 Martin Sebor <msebor@redhat.com>
1869 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1870 has pointer type. Remove redundant code. Avoid calling
1871 gimple_canonical_types_compatible_p.
1873 2021-01-07 Martin Sebor <msebor@redhat.com>
1876 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1877 Avoid assuming acces type's size is constant. Correct condition
1878 guarding the printing of a parenthesis.
1880 2021-01-06 Martin Sebor <msebor@redhat.com>
1883 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1884 SSA_NAMEs print VLA names and GIMPLE defining statements.
1885 (print_mem_ref): New function.
1886 (c_pretty_printer::unary_expression): Call it.
1888 2021-01-06 Richard Biener <rguenther@suse.de>
1890 PR tree-optimization/95582
1891 * c-attribs.c (c_common_attribute_table): Add entry for
1892 signed_bool_precision.
1893 (handle_signed_bool_precision_attribute): New.
1895 2020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1897 * c.opt: Add -stdlib= option and enumerations for
1898 libstdc++ and libc++.
1900 2020-12-16 Martin Liska <mliska@suse.cz>
1902 * c.opt: Remove usage of Report.
1904 2020-12-14 Martin Sebor <msebor@redhat.com>
1909 * c-attribs.c (maybe_add_noinline): New function.
1910 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1911 Implicitly add attribute noinline to functions not declared inline
1914 2020-12-09 Tobias Burnus <tobias@codesourcery.com>
1916 * c-pragma.c (omp_pragmas): Add 'allocate'.
1917 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1919 2020-12-08 Jakub Jelinek <jakub@redhat.com>
1922 * c-pragma.c (omp_pragmas): Remove "master".
1923 (omp_pragmas_simd): Add "master".
1925 2020-12-07 Marek Polacek <polacek@redhat.com>
1928 * c-common.c (verify_tree_lim_r): New function.
1929 (verify_sequence_points): Use it. Use nullptr instead of 0.
1931 2020-12-03 Martin Sebor <msebor@redhat.com>
1935 * c-attribs.c (handle_dealloc_attribute): New function.
1936 (handle_malloc_attribute): Handle argument forms of attribute.
1937 * c.opt (-Wmismatched-dealloc): New option.
1938 (-Wmismatched-new-delete): New option.
1940 2020-12-03 Jakub Jelinek <jakub@redhat.com>
1943 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1944 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1946 2020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1948 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1949 {__GNUC_EXECUTION_CHARSET_NAME} and
1950 _WIDE_EXECUTION_CHARSET_NAME} macros.
1952 2020-12-01 Nathan Sidwell <nathan@acm.org>
1954 * c-common.c (module, import, export): New internal tokens (with
1956 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1958 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1959 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1961 2020-12-01 Nathan Sidwell <nathan@acm.org>
1963 * c-opts.c (c_common_init_options): Ask for module dependencies.
1964 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1965 * c-pch.c (c_common_valid_pch): ... does not play with C++
1967 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1969 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1970 (fmodule-only, fmodule-mapper, fmodule-lazy)
1971 (fmodule-version-ignore, Winvalid-imported-macros)
1972 (flang-info-include-translate, flang-info-include-translate-not):
1975 2020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1977 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1978 (dump_ada_structure): Also deal with convention, unchecked union and
1979 bit-field for nested types. In the latter case, print an Alignment
1980 aspect along with the Pack aspect.
1982 2020-11-25 Martin Sebor <msebor@redhat.com>
1985 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1988 2020-11-24 Martin Sebor <msebor@redhat.com>
1990 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1992 2020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1994 * c-attribs.c (handle_special_var_sec_attribute): New.
1995 (handle_noinit_attribute): Remove.
1996 (attr_noinit_exclusions): Rename to...
1997 (attr_section_exclusions): ...this, and add "persistent" attribute
1999 (c_common_attribute_table): Add "persistent" attribute.
2001 2020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
2003 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
2004 Treat opaque types like other types.
2005 (c_pretty_printer::direct_abstract_declarator): Opaque types are
2008 2020-11-20 Martin Sebor <msebor@redhat.com>
2010 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
2011 with fewer arguments.
2013 2020-11-20 Martin Sebor <msebor@redhat.com>
2016 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
2017 Error out on invalid modes.
2019 2020-11-20 Jakub Jelinek <jakub@redhat.com>
2022 * c-common.c (check_builtin_function_arguments): Handle
2023 BUILT_IN_CLEAR_PADDING.
2025 2020-11-18 Nathan Sidwell <nathan@acm.org>
2027 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
2029 2020-11-17 Nathan Sidwell <nathan@acm.org>
2031 * c-common.h (enum c_tree_index): Reorder to place lazy fields
2032 after newly-added CTI_MODULE_HWM.
2034 2020-11-17 Joseph Myers <joseph@codesourcery.com>
2036 * c-cppbuiltin.c (builtin_define_float_constants): Define
2037 "*_IS_IEC_60559__" macros.
2039 2020-11-17 Nathan Sidwell <nathan@acm.org>
2041 * c-lex.c: #include "langhooks.h".
2042 (cb_undef): Maybe call preprocess_undef lang hook.
2043 * c-opts.c (c_common_post_options): Maybe call preprocess_options
2045 (push_command_line_include): Maybe call preprocess_main_file lang
2047 (cb_file_change): Likewise.
2048 * c-ppoutput.c: #include "langhooks.h.
2049 (scan_translation_unit): Maybe call preprocess_token lang hook.
2050 (class do_streamer): New, derive from token_streamer.
2051 (directives_only_cb): Data pointer is do_streamer, call
2052 preprocess_token lang hook.
2053 (scan_translation_unit_directives_only): Use do_streamer.
2054 (print_line_1): Move src_line recording to after string output.
2055 (cb_undef): Maybe call preprocess_undef lang hook.
2057 2020-11-17 Nathan Sidwell <nathan@acm.org>
2059 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
2060 code duplicating that functionality.
2062 2020-11-17 Jakub Jelinek <jakub@redhat.com>
2065 * c-common.c (check_builtin_function_arguments)
2066 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
2067 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
2068 for more builtins and argument positions.
2070 2020-11-16 Iain Sandoe <iain@sandoe.co.uk>
2073 * stub-objc.c: Include c-common.h to declare enum rid.
2075 2020-11-13 Jakub Jelinek <jakub@redhat.com>
2078 * c-cppbuiltin.c: Include configargs.h.
2079 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
2080 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
2083 2020-11-13 Gergö Barany <gergo@codesourcery.com>
2084 Thomas Schwinge <thomas@codesourcery.com>
2086 * c.opt (fopenacc-kernels): Add.
2088 2020-11-13 Jason Merrill <jason@redhat.com>
2090 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
2092 2020-11-13 Piotr H. Dabrowski <phd@phd.re>
2095 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
2097 2020-11-13 Martin Liska <mliska@suse.cz>
2099 * c-attribs.c (build_attr_access_from_parms): Format properly.
2101 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2104 * c-common.c (c_common_reswords): null_unspecified, nullable,
2105 nonnull, null_resettable: New keywords.
2106 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
2107 RID_NONNULL, RID_NULL_RESETTABLE: New.
2108 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
2109 ranges accepted for property attributes.
2110 * c-attribs.c (handle_objc_nullability_attribute): New.
2111 * c-objc.h (enum objc_property_attribute_group): Add
2112 OBJC_PROPATTR_GROUP_NULLABLE.
2113 (enum objc_property_attribute_kind):Add
2114 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
2115 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
2117 2020-11-13 Iain Sandoe <iain@sandoe.co.uk>
2120 * c-attribs.c (handle_objc_root_class_attribute): New
2121 * c-objc.h (objc_start_class_interface): Add a location
2122 value for the position of the class name.
2123 * c.opt: Add Wobjc-root-class.
2124 * stub-objc.c (objc_start_class_interface): Add a location
2125 value for the position of the class name.
2127 2020-11-12 Joseph Myers <joseph@codesourcery.com>
2129 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
2130 Allow scope for C. Handle standard attributes for C. Do not
2131 accept unscoped attributes if std_syntax and not handled as
2132 standard attributes.
2133 * c-common.h (c_common_has_attribute): Update prototype.
2135 2020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
2138 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
2139 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
2141 2020-11-11 Patrick Palka <ppalka@redhat.com>
2144 * c-opts.c (c_common_post_options): Update latest_abi_version.
2146 2020-11-10 Jakub Jelinek <jakub@redhat.com>
2149 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
2151 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
2152 recursively and just return true instead of warning if it is true.
2153 Handle COMPLEX_EXPR.
2155 2020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
2157 * c-common.h (c_omp_adjust_map_clauses): New declaration.
2158 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
2159 (c_omp_adjust_map_clauses): New function.
2161 2020-11-09 Marek Polacek <polacek@redhat.com>
2164 * c-common.c (attribute_fallthrough_p): Tweak the warning
2167 2020-11-09 Patrick Palka <ppalka@redhat.com>
2169 * c-pragma.c (handle_pragma_diagnostic): Split the
2170 unknown-option -Wpragmas diagnostic into a warning and a
2171 subsequent note containing a spelling suggestion. Avoid
2172 computing the suggestion if -Wpragmas warnings are being
2175 2020-11-09 Patrick Palka <ppalka@redhat.com>
2178 * c-indentation.c (get_visual_column): Remove location_t
2179 parameter. Move the column-tracking diagnostic code from here
2181 (should_warn_for_misleading_indentation): ... here, before the
2182 early exit for when the loci are not all distinct. Don't pass a
2183 location_t argument to get_visual_column.
2184 (assert_get_visual_column_succeeds): Don't pass a location_t
2185 argument to get_visual_column.
2186 (assert_get_visual_column_fails): Likewise.
2188 2020-11-08 Iain Sandoe <iain@sandoe.co.uk>
2190 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
2191 of keywords accepted in @property attribute contexts.
2192 * c-objc.h (enum objc_property_attribute_group): Add
2193 OBJC_PROPATTR_GROUP_CLASS.
2194 (enum objc_property_attribute_kind): Add
2195 OBJC_PROPERTY_ATTR_CLASS.
2197 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2199 * c-common.c (c_common_reswords): Add 'atomic' property
2201 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
2202 property attributes.
2204 2020-11-07 Iain Sandoe <iain@sandoe.co.uk>
2206 * c-attribs.c (handle_nsobject_attribute): New.
2207 * c.opt: Add WNSObject-attribute.
2209 2020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2211 * c-objc.h (enum objc_property_attribute_group): New
2212 (enum objc_property_attribute_kind): New.
2213 (OBJC_PROPATTR_GROUP_MASK): New.
2214 (struct property_attribute_info): Small class encapsulating
2215 parser output from property attributes.
2216 (objc_prop_attr_kind_for_rid): New
2217 (objc_add_property_declaration): Simplify interface.
2218 * stub-objc.c (enum rid): Dummy type.
2219 (objc_add_property_declaration): Simplify interface.
2220 (objc_prop_attr_kind_for_rid): New.
2222 2020-11-06 Nathan Sidwell <nathan@acm.org>
2224 * c-ada-spec.c (collect_ada_nodes): Rename
2225 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2226 (collect_ada_node): Likewise.
2227 (dump_forward_type): Likewise.
2228 * c-common.c (set_underlying_type): Rename
2229 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2230 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2232 2020-11-06 Jakub Jelinek <jakub@redhat.com>
2234 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2236 2020-11-05 Marek Polacek <polacek@redhat.com>
2239 * c.opt (Wexceptions): New option.
2241 2020-11-05 Marek Polacek <polacek@redhat.com>
2244 * c.opt (Wvexing-parse): New option.
2246 2020-11-04 Jakub Jelinek <jakub@redhat.com>
2249 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2250 underlying decl to clear in the allocate_head bitmap.
2252 2020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2254 * c-objc.h (objc_non_constant_expr_p): New.
2255 * stub-objc.c (objc_non_constant_expr_p): New.
2257 2020-11-03 Nathan Sidwell <nathan@acm.org>
2259 * c.opt (MQ,MT): Reword description to be make-agnostic.
2261 2020-11-02 Nathan Sidwell <nathan@acm.org>
2263 * c-opts.c (c_common_post_options): Move var decl to its
2264 initialization point.
2266 2020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2268 * c-lex.c (c_lex_with_flags): When combining '@' with a
2269 keyword for Objective-C, combine the location ranges too.
2271 2020-10-30 Qing Zhao <qing.zhao@oracle.com>
2272 H.J.Lu <hjl.tools@gmail.com>
2274 * c-attribs.c (c_common_attribute_table): Add new attribute
2275 zero_call_used_regs.
2276 (handle_zero_call_used_regs_attribute): New function.
2278 2020-10-28 Marek Polacek <polacek@redhat.com>
2281 * c-opts.c (c_common_post_options): In C++20, turn on
2282 -Wdeprecated-enum-enum-conversion and
2283 -Wdeprecated-enum-float-conversion.
2284 * c.opt (Wdeprecated-enum-enum-conversion,
2285 Wdeprecated-enum-float-conversion): New options.
2286 (Wenum-conversion): Allow for C++ too.
2288 2020-10-28 Jakub Jelinek <jakub@redhat.com>
2290 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2291 * c-omp.c: Include bitmap.h.
2292 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2294 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2296 * c-common.c (__is_nothrow_assignable): New.
2297 (__is_nothrow_constructible): Likewise.
2298 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2299 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2301 2020-10-23 Jan Hubicka <hubicka@ucw.cz>
2303 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2305 2020-10-23 Marek Polacek <polacek@redhat.com>
2308 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2309 (c_common_init_ts): Likewise.
2310 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2311 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2312 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2313 (maybe_warn_sizeof_array_div): New function.
2314 * c.opt (Wsizeof-array-div): New option.
2316 2020-10-23 Martin Sebor <msebor@redhat.com>
2319 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2321 2020-10-22 Martin Liska <mliska@suse.cz>
2324 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2325 (handle_stack_protect_attribute): Add error message for a
2326 no_stack_protector function.
2328 2020-10-22 Martin Liska <mliska@suse.cz>
2330 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2332 2020-10-22 Jan Hubicka <hubicka@ucw.cz>
2334 * c-gimplify.c: Include tree-nested.h
2335 (c_genericize): Update for new nested function info.
2337 2020-10-14 Martin Sebor <msebor@redhat.com>
2340 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2341 bounds in an extra list.
2343 2020-10-05 Richard Biener <rguenther@suse.de>
2344 Jakub Jelinek <jakub@redhat.com>
2347 * c-pretty-print.c: Include langhooks.h.
2348 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2350 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2352 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2354 2020-09-30 Martin Sebor <msebor@redhat.com>
2357 * c-attribs.c (append_access_attr): Use the function declaration
2358 location for a warning about an attribute access argument.
2360 2020-09-29 Marek Polacek <polacek@redhat.com>
2363 * c.opt (Wrange-loop-construct): New option.
2365 2020-09-23 Martin Sebor <msebor@redhat.com>
2368 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2370 2020-09-23 Marek Polacek <polacek@redhat.com>
2373 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2374 after loops and other structured control constructs have been lowered.
2376 2020-09-22 Jakub Jelinek <jakub@redhat.com>
2378 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2379 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2381 2020-09-21 Marek Polacek <polacek@redhat.com>
2383 * c.opt (Wctad-maybe-unsupported): New option.
2385 2020-09-19 Martin Sebor <msebor@redhat.com>
2388 * c-common.h (warn_parm_array_mismatch): Declare new function.
2389 (has_attribute): Move declaration of an existing function.
2390 (build_attr_access_from_parms): Declare new function.
2391 * c-warn.c (parm_array_as_string): Define new function.
2392 (plus_one): Define new function.
2393 (warn_parm_ptrarray_mismatch): Define new function.
2394 (warn_parm_array_mismatch): Define new function.
2395 (vla_bound_parm_decl): New function.
2396 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2397 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2399 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2400 them in brackets here. Also print [static]. Strip extraneous
2401 expressions from VLA bounds.
2403 2020-09-19 Martin Sebor <msebor@redhat.com>
2406 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2407 (handle_argspec_attribute): New function.
2408 (get_argument, get_argument_type): New functions.
2409 (append_access_attrs): Add overload. Handle internal attribute
2410 representation in addition to external.
2411 (handle_access_attribute): Handle internal attribute representation
2412 in addition to external.
2413 (build_attr_access_from_parms): New function.
2415 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2417 * c-gimplify.c (genericize_c_loop): Rewrite to match
2418 c_finish_loop in c-typeck.c.
2420 2020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2422 * c-common.c (c_block_may_fallthrough): New, split from
2423 cxx_block_may_fallthrough in the cp front end.
2424 (c_common_init_ts): Move handling of loop and switch-related
2425 statements here from the cp front end.
2426 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2428 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2429 * c-common.h (c_block_may_fallthru): Declare.
2430 (bc_state_t): Move here from cp front end.
2431 (save_bc_state, restore_bc_state): Declare.
2432 (c_genericize_control_stmt): Declare.
2433 (WHILE_COND, WHILE_BODY): Likewise.
2434 (DO_COND, DO_BODY): Likewise.
2435 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2436 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2437 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2438 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2439 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2440 * c-dump.c (dump_stmt): Copy from cp front end.
2441 (c_dump_tree): Move code to handle structured loop and switch
2442 tree nodes here from cp front end.
2443 * c-gimplify.c: Adjust includes.
2444 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2446 (save_bc_state, restore_bc_state): New functions using old code
2448 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2449 (genericize_c_loop): Move from cp front end.
2450 (genericize_for_stmt, genericize_while_stmt): Likewise.
2451 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2452 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2453 (genericize_omp_for_stmt): Likewise.
2454 (c_genericize_control_stmt): New function using code split from
2456 (c_genericize_control_r): New.
2457 (c_genericize): Call walk_tree with c_genericize_control_r.
2458 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2459 structured loop and switch tree nodes here from cp front end.
2461 2020-09-17 Patrick Palka <ppalka@redhat.com>
2464 * c-indentation.c (should_warn_for_misleading_indentation): Move
2465 declarations of local variables closer to their first use.
2466 Handle virtual token locations by resolving them to their
2467 respective macro expansion points. If all three tokens are
2468 produced from the same macro expansion, then instead use their
2469 loci within the macro definition.
2471 2020-09-16 Martin Sebor <msebor@redhat.com>
2475 * c-attribs.c (validate_attr_args): New function.
2476 (validate_attr_arg): Same.
2477 (handle_section_attribute): Call it. Introduce a local variable.
2478 (handle_alloc_size_attribute): Same.
2479 (handle_alloc_align_attribute): Same.
2481 2020-09-14 Jakub Jelinek <jakub@redhat.com>
2483 * c-attribs.c (handle_optimize_attribute): Adjust
2484 cl_optimization_save, cl_optimization_restore and
2485 build_optimization_node callers.
2486 * c-pragma.c (handle_pragma_optimize): Adjust
2487 build_optimization_node caller.
2488 (handle_pragma_push_options): Adjust
2489 build_optimization_node and build_target_option_node callers.
2490 (handle_pragma_pop_options, handle_pragma_reset_options):
2491 Adjust cl_optimization_restore callers.
2493 2020-08-28 Martin Sebor <msebor@redhat.com>
2495 * c.opt (Wstringop-overread): New option.
2497 2020-08-11 Jakub Jelinek <jakub@redhat.com>
2500 * c-common.c (get_atomic_generic_size): Require that first argument's
2501 type points to a complete type and use tree_fits_uhwi_p instead of
2502 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2504 2020-07-31 Martin Sebor <msebor@redhat.com>
2507 * c-common.c (check_function_arguments_recurse): Return early when
2508 no-warning bit is set.
2510 2020-07-31 Richard Biener <rguenther@suse.de>
2513 * c-common.h (c_common_finalize_early_debug): Declare.
2514 * c-common.c: Include debug.h.
2515 (c_common_finalize_early_debug): finalize_early_debug langhook
2516 implementation generating debug for extern declarations.
2518 2020-07-27 Nathan Sidwell <nathan@acm.org>
2520 * c-common.c (try_to_locate_new_include_insertion_point): Use
2521 strcmp, not pointer equality.
2523 2020-07-25 Martin Sebor <msebor@redhat.com>
2526 * c-common.c (check_nonnull_arg): Print note only when warning was
2529 2020-07-22 Tobias Burnus <tobias@codesourcery.com>
2531 * c-omp.c (c_finish_omp_critical): Check for no name but
2532 nonzero hint provided.
2534 2020-07-20 Jason Merrill <jason@redhat.com>
2536 * c-cppbuiltin.c (c_cpp_builtins): Update
2537 __cpp_nontype_template_args for C++20.
2539 2020-07-20 Martin Sebor <msebor@redhat.com>
2542 * c.opt: Remove stray text.
2544 2020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2547 * c-indentation.c (should_warn_for_misleading_indentation): Get
2548 global tabstop from the new source.
2549 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2550 is now a common option.
2553 2020-07-08 Eric Botcazou <ebotcazou@adacore.com>
2555 * c.opt (Wscalar-storage-order): Add explicit variable.
2557 2020-07-07 Nathan Sidwell <nathan@acm.org>
2559 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2561 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2562 maps. Force token position to line_table's highest line.
2563 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2564 (cb_define): Always increment source line.
2566 2020-07-06 Martin Sebor <msebor@redhat.com>
2569 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2570 to stub lambda objects with null this pointer.
2571 (check_nonnull_arg): Handle C++ nullptr.
2573 2020-07-02 Jason Merrill <jason@redhat.com>
2574 Jakub Jelinek <jakub@redhat.com>
2576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2578 2020-06-30 Jakub Jelinek <jakub@redhat.com>
2581 * c-common.c (check_function_arguments_recurse): Don't crash on
2582 calls to internal functions.
2584 2020-06-28 Martin Sebor <msebor@redhat.com>
2587 * c-common.c (struct nonnull_arg_ctx): Add members.
2588 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2589 C++ member functions specially. Consider the this pointer implicitly
2591 (check_nonnull_arg): Use location of argument when available.
2592 (check_function_arguments): Use nonnull_arg_ctx as argument.
2594 2020-06-27 Jakub Jelinek <jakub@redhat.com>
2597 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2598 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2599 smaller precision intop operands separately.
2601 2020-06-26 Marek Polacek <polacek@redhat.com>
2603 * c-opts.c (c_common_init_options): Default to gnu++17.
2605 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
2608 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2611 2020-06-16 Jakub Jelinek <jakub@redhat.com>
2613 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2614 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2616 (c_omp_is_loop_iterator): New function.
2617 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2618 if outer loop iterator is present. Perform duplicate checking through
2619 hash_set in the function rather than expecting caller to do that.
2620 Pass NULL instead of d->ppset to walk_tree_1.
2621 (c_omp_check_nonrect_loop_iv): New function.
2622 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2623 non-rectangular loop forms, diagnose multiple associated loops with
2624 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2625 (c_omp_check_loop_iv_exprs): Likewise.
2627 2020-06-10 Martin Liska <mliska@suse.cz>
2629 PR tree-optimization/92860
2630 * c-attribs.c (handle_optimize_attribute):
2631 Save global options and compare it after parsing of function
2633 * c-pragma.c (opt_stack::saved_global_options): New field.
2634 (handle_pragma_push_options): Save global_options.
2635 (handle_pragma_pop_options): Compare them after pop.
2637 2020-06-09 Jakub Jelinek <jakub@redhat.com>
2640 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2641 case when MEM_REF's first argument has type pointer to incomplete type.
2643 2020-06-05 Jason Merrill <jason@redhat.com>
2645 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2646 operand to POINTER_PLUS_EXPR.
2648 2020-06-04 Martin Sebor <msebor@redhat.com>
2652 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2653 (handle_access_attribute): Same.
2655 2020-06-03 Mark Wielaard <mark@klomp.org>
2657 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2659 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2660 New function declaration.
2662 2020-06-03 Mark Wielaard <mark@klomp.org>
2664 * known-headers.cc (get_string_macro_hint): New function.
2665 (get_stdlib_header_for_name): Use get_string_macro_hint.
2666 (get_c_stdlib_header_for_string_macro_name): New function.
2667 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2668 New function declaration.
2670 2020-06-03 Tobias Burnus <tobias@codesourcery.com>
2672 * c-common.h (c_omp_predetermined_mapping): Declare.
2673 * c-omp.c (c_omp_predetermined_mapping): New.
2675 2020-05-22 Mark Wielaard <mark@klomp.org>
2677 * known-headers.cc (get_stdlib_header_for_name): Add a new
2678 stdlib_hint array for stdbool and stdint.
2680 2020-05-22 Mark Wielaard <mark@klomp.org>
2682 * known-headers.cc (get_stdlib_header_for_name): Return
2683 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2686 2020-05-20 Nathan Sidwell <nathan@acm.org>
2688 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2690 * c-common.c (try_to_locate_new_include_insertion_point): Use
2691 strcmp to compare filenames.
2692 * c-lex.c (init_c_lex): Move declaration to initialization.
2693 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2694 deferred count loop.
2696 2020-05-15 Jason Merrill <jason@redhat.com>
2698 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2700 2020-05-13 Jason Merrill <jason@redhat.com>
2702 * c.opt (std=c++20): Make c++2a the alias.
2703 (std=gnu++20): Likewise.
2704 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2706 * c-cppbuiltin.c: Adjust.
2707 * c-ubsan.c: Adjust.
2710 2020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2712 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2714 2020-05-08 Nathan Sidwell <nathan@acm.org>
2716 Reimplement directives only processing.
2717 * c-ppoutput.c (token_streamer): Ne.
2718 (directives_only_cb): New. Swallow ...
2719 (print_lines_directives_only): ... this.
2720 (scan_translation_unit_directives_only): Reimplment using the
2721 published interface.
2723 2020-05-07 Marek Polacek <polacek@redhat.com>
2725 * c-format.c (badwords): Add "nonstatic".
2727 202-05-07 Jakub Jelinek <jakub@redhat.com>
2730 * c-common.c (speculation_safe_value_resolve_params): Return false if
2731 error_operand_p (val2).
2732 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2733 Remove extraneous semicolon.
2735 2020-05-06 qing zhao <qing.zhao@oracle.com>
2738 * c-indentation.c (get_visual_column): Add a hint to use the new
2739 -flarge-source-files option.
2741 2020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2743 * c-attribs.c (handle_vector_size_attribute): Add attribute
2744 nonnull for argument args in order to silence warning of
2745 uninitialized variable usage. Since this is local to the
2746 compilation unit and thus cannot be checked at call sides by the
2747 compiler, added an assert statement in order to verify this.
2749 2020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2752 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2753 value to USHRT_MAX (65535).
2755 2020-04-29 Jakub Jelinek <jakub@redhat.com>
2757 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2759 2020-04-27 Jakub Jelinek <jakub@redhat.com>
2762 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2763 fncode == BUILT_IN_NONE before initialization of first_param.
2765 2020-04-23 Marek Polacek <polacek@redhat.com>
2768 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2771 2020-04-14 Patrick Palka <ppalka@redhat.com>
2774 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2775 ampersand if it's an rvalue reference type.
2777 2020-04-13 Martin Sebor <msebor@redhat.com>
2780 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2781 printing array bound for flexible array members.
2783 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2785 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2788 2020-04-02 Richard Biener <rguenther@suse.de>
2791 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2792 for -O2 and C++11 or newer.
2794 2020-03-28 Patrick Palka <ppalka@redhat.com>
2796 * c.opt: Add -fconcepts-diagnostics-depth.
2798 2020-03-27 Martin Sebor <msebor@redhat.com>
2801 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2802 to decl_attributes. Make handling of different kinds of entities
2805 2020-03-27 Martin Sebor <msebor@redhat.com>
2808 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2811 2020-03-23 Jakub Jelinek <jakub@redhat.com>
2814 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2815 result being COMPOUND_EXPRs, skip to ultimate rhs.
2817 2020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2820 * c-common.c (c_common_type_for_mode): Before using a registered
2821 built-in type, check that the vectorness of the type matches
2822 the vectorness of the mode.
2824 2020-03-17 Jakub Jelinek <jakub@redhat.com>
2826 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2827 issue in a diagnostic message.
2829 2020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2831 * c.opt: Avoid redundancy in the help text.
2833 2020-03-02 Marek Polacek <polacek@redhat.com>
2835 PR c++/93958 - add missing -std=gnu++20.
2836 * c.opt: Add -std=gnu++20.
2838 2020-03-01 Martin Sebor <msebor@redhat.com>
2841 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2842 (handle_access_attribute): Same.
2844 2020-02-25 Jakub Jelinek <jakub@redhat.com>
2847 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2848 "did you mean" hint in diagnostics.
2850 2020-02-15 Jason Merrill <jason@redhat.com>
2852 * c.opt: Add -std=c++20.
2854 2020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2856 * c-ada-spec.c: Include bitmap.h.
2857 (dump_ada_double_name): Rename into...
2858 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2859 (dump_ada_array_type): Adjust to above renaming. Robustify.
2860 (dump_nested_types_1): New function copied from... Add dumped_types
2861 parameter and pass it down to dump_nested_type.
2862 (dump_nested_types): ...this. Remove parent parameter. Just call
2863 dump_nested_types_1 on an automatic bitmap.
2864 (dump_nested_type): Add dumped_types parameter.
2865 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2866 Adjust recursive calls and adjust to above renaming.
2867 (dump_ada_declaration): Adjust call to dump_nested_types.
2868 Tidy up and adjust to above renaming.
2869 (dump_ada_specs): Initialize and release bitmap obstack.
2871 2020-02-10 Martin Sebor <msebor@redhat.com>
2874 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2876 2020-02-10 Jakub Jelinek <jakub@redhat.com>
2879 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2880 Remove useless extra test.
2882 2020-02-03 Julian Brown <julian@codesourcery.com>
2883 Tobias Burnus <tobias@codesourcery.com>
2885 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2887 2020-01-29 Jason Merrill <jason@redhat.com>
2890 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2892 2020-01-23 Jason Merrill <jason@redhat.com>
2894 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2896 2020-01-23 Martin Sebor <msebor@redhat.com>
2899 * c-common.c (check_function_arguments): Avoid overlap checking
2900 of sprintf functions.
2902 2020-01-22 Jason Merrill <jason@redhat.com>
2904 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2906 * c-warn.c (conversion_warning): Check operands only after checking
2907 the whole expression. Don't check second operand of + for sign.
2909 2020-01-21 Jason Merrill <jason@redhat.com>
2910 Manuel López-Ibáñez <manu@gcc.gnu.org>
2912 PR c++/40752 - useless -Wconversion with short +=.
2913 * c.opt (-Warith-conversion): New.
2914 * c-warn.c (conversion_warning): Recurse for operands of
2915 operators. Only warn about the whole expression with
2918 2020-01-21 Jason Merrill <jason@redhat.com>
2920 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2921 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2923 2020-01-20 Nathan Sidwell <nathan@acm.org>
2925 PR preprocessor/80005
2926 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2928 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2930 * c-common.c (co_await, co_yield, co_return): New.
2931 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2932 RID_CO_RETURN): New enumeration values.
2933 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2934 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2935 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2936 * c.opt (fcoroutines): New command-line switch.
2938 2020-01-10 David Malcolm <dmalcolm@redhat.com>
2940 * c-format.c (local_event_ptr_node): New.
2941 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2942 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2943 * c-format.h (T_EVENT_PTR): New define.
2945 2020-01-10 Martin Sebor <msebor@redhat.com>
2948 * c-attribs.c (append_access_attrs): Validate against the translated
2949 access string rather than the human-readable representation.
2951 2020-01-01 Jakub Jelinek <jakub@redhat.com>
2953 Update copyright years.
2955 2019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2957 * c-ada-spec.h (decl_sloc): Delete.
2958 * c-ada-spec.c (decl_sloc): Make static.
2960 2019-12-19 Julian Brown <julian@codesourcery.com>
2962 * c-common.h (c_omp_map_clause_name): Add prototype.
2963 * c-omp.c (c_omp_map_clause_name): New function.
2964 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2965 PRAGMA_OACC_CLAUSE_DETACH.
2967 2019-12-19 Julian Brown <julian@codesourcery.com>
2968 Maciej W. Rozycki <macro@codesourcery.com>
2969 Tobias Burnus <tobias@codesourcery.com>
2970 Thomas Schwinge <thomas@codesourcery.com>
2972 * c-pragma.h (pragma_omp_clause): Add
2973 PRAGMA_OACC_CLAUSE_NO_CREATE.
2975 2019-12-17 Martin Sebor <msebor@redhat.com>
2978 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2980 2019-12-11 David Malcolm <dmalcolm@redhat.com>
2982 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2984 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2986 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2988 * c-format.c (range_label_for_format_type_mismatch::get_text):
2989 Replace label_text ctor called with true with label_text::take.
2991 2019-12-09 David Malcolm <dmalcolm@redhat.com>
2993 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2994 initial newline from expected outputs.
2995 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2996 call to diagnostic_show_locus.
2998 2019-12-06 Jakub Jelinek <jakub@redhat.com>
3000 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
3003 2019-12-05 Marek Polacek <polacek@redhat.com>
3004 Jakub Jelinek <jakub@redhat.com>
3006 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
3007 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
3009 2019-12-05 Marek Polacek <polacek@redhat.com>
3011 PR c++/92271 - make __is_same alias for __is_same_as.
3012 * c-common.c: Add __is_same, an alias for __is_same_as.
3014 2019-12-03 Marek Polacek <polacek@redhat.com>
3016 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
3017 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3018 __cpp_aggregate_paren_init=201902 for -std=c++2a.
3020 2019-11-30 Jan Hubicka <hubicka@ucw.cz>
3022 * c-attribs.c (handle_symver_attribute): New function
3023 (c_common_attributes): Add symver.
3025 2019-11-30 Richard Sandiford <richard.sandiford@arm.com>
3027 * c-common.c (pointer_int_sum): Use verify_type_context to check
3028 whether the target allows pointer arithmetic for the types involved.
3029 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
3030 to check whether the target allows sizeof and alignof operations
3031 for the types involved.
3033 2019-11-27 Jason Merrill <jason@redhat.com>
3035 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
3037 2019-11-26 Jakub Jelinek <jakub@redhat.com>
3040 * c-attribs.c (handle_mode_attribute): Add mode attribute to
3043 2019-11-25 Joseph Myers <joseph@codesourcery.com>
3046 * c-common.c (c_common_type_for_mode): Handle decimal
3047 floating-point types being NULL_TREE.
3048 * c-format.c (get_format_for_type_1): Handle specified types being
3050 * c-lex.c (interpret_float): Give an error for decimal
3051 floating-point constants when decimal floating-point not
3054 2019-11-23 Jakub Jelinek <jakub@redhat.com>
3057 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
3058 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
3059 group warning with inform together.
3060 (handle_access_attribute): Formatting fix.
3062 2019-11-22 Jakub Jelinek <jakub@redhat.com>
3065 * c-common.h (identifier_global_tag): Declare.
3066 * c-format.c (get_pointer_to_named_type): Renamed to ...
3067 (get_named_type): ... this. Use identifier_global_tag instead of
3068 identifier_global_value, handle the return value being a TYPE_P.
3069 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
3070 to call get_named_type instead. Formatting fixes.
3072 Implement P1902R1, Missing feature-test macros 2017-2019.
3073 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
3074 and __cpp_generic_lambdas for -std=c++2a. Define
3075 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
3076 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
3077 __cpp_concepts for -std=c++2a.
3079 2019-11-22 Martin Sebor <msebor@redhat.com>
3082 * c-attribs.c (handle_access_attribute): New function.
3083 (c_common_attribute_table): Add new attribute.
3084 (get_argument_type): New function.
3085 (append_access_attrs): New function.
3086 (get_nonnull_operand): Rename...
3087 (get_attribute_operand): ...to this.
3088 * c-common.c (get_nonnull_operand): Rename...
3089 (get_attribute_operand): ...to this.
3091 2019-11-21 Joseph Myers <joseph@codesourcery.com>
3093 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
3096 2019-11-19 Joseph Myers <joseph@codesourcery.com>
3098 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
3099 warning for standard attributes mixed with fallthrough attributes.
3101 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3103 * c-attribs.c (handle_fallthrough_attribute): Remove static.
3104 * c-common.h (handle_fallthrough_attribute): Declare.
3106 2019-11-15 Joseph Myers <joseph@codesourcery.com>
3108 * c-attribs.c (handle_deprecated_attribute): Remove static.
3109 * c-common.h (handle_deprecated_attribute): Declare.
3111 2019-11-14 Joseph Myers <joseph@codesourcery.com>
3113 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
3116 2019-11-14 Jakub Jelinek <jakub@redhat.com>
3118 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
3121 * c-omp.c (c_omp_check_context_selector): Handle name lists
3122 containing string literals. Don't diagnose atomic_default_mem_order
3123 with multiple props.
3125 2019-11-13 Joseph Myers <joseph@codesourcery.com>
3127 * c-cppbuiltin.c (builtin_define_float_constants): Also define
3128 NORM_MAX constants. Update call to get_max_float.
3129 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
3132 2019-11-13 Eric Botcazou <ebotcazou@adacore.com>
3134 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
3135 (dump_forward_type): Do not generate a declaration for function types.
3136 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
3137 of the component type if it is declared in another file.
3139 2019-11-12 Martin Liska <mliska@suse.cz>
3141 * c-opts.c (c_common_post_options):
3142 Use SET_OPTION_IF_UNSET.
3144 2019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
3145 Frederik Harwath <frederik@codesourcery.com>
3148 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
3150 * c-pragma.c (oacc_pragmas): Add "serial" entry.
3152 2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
3154 * c-common.h (gnu_vector_type_p): New function.
3155 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
3156 vectors to satisfy gnu_vector_type_p.
3157 (c_build_vec_convert): Likewise __builtin_convertvector.
3158 (convert_vector_to_array_for_subscript): Likewise when applying
3159 implicit vector to array conversion.
3160 (scalar_to_vector): Likewise when converting vector-scalar
3161 operations to vector-vector operations.
3163 2019-11-08 Joseph Myers <joseph@codesourcery.com>
3165 * c.opt (Wold-style-definition): Initialize to -1.
3166 * c-opts.c (c_common_post_options): Set warn_old_style_definition
3167 to flag_isoc2x if not set explicitly.
3169 2019-11-07 Joseph Myers <joseph@codesourcery.com>
3171 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
3173 2019-11-05 Jason Merrill <jason@redhat.com>
3175 * c-opts.c (c_common_post_options): -fconcepts-ts implies
3178 2019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
3180 * c-opts.c (c_common_post_options): Update
3183 2019-11-02 Jakub Jelinek <jakub@redhat.com>
3185 * c-common.h (c_omp_get_context_selector): Remove.
3186 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
3187 and renamed to omp_get_context_selector.
3189 * c-omp.c (c_omp_mark_declare_variant): Use
3190 omp_context_selector_set_compare.
3192 PR c++/88335 - Implement P1073R3: Immediate functions
3193 * c-common.h (enum rid): Add RID_CONSTEVAL.
3194 * c-common.c (c_common_reswords): Add consteval.
3196 2019-11-01 Martin Sebor <msebor@redhat.com>
3202 * c-pretty-print.c (direct_abstract_declarator): Print
3203 bound in zero-length arrays.
3204 * c.opt (-Wzero-length-bounds): New option.
3206 2019-10-30 Nathan Sidwell <nathan@acm.org>
3208 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3211 2019-10-28 Martin Sebor <msebor@redhat.com>
3214 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3215 even when only preprocessing.
3216 * c-common.h (names_builtin_p): Declare new function.
3217 * c-lex.c (init_c_lex): Set has_builtin.
3218 (c_common_has_builtin): Define a new function.
3219 * c-ppoutput.c (init_pp_output): Set has_builtin.
3221 2019-10-24 Jakub Jelinek <jakub@redhat.com>
3223 * c-common.h (c_omp_context_selector_matches): Remove.
3224 * c-omp.c (c_omp_context_selector_matches): Remove.
3225 * c-attribs.c (c_common_attribute_table): Add
3226 "omp declare target {host,nohost,block}" attributes.
3228 2019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3230 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3232 2019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3234 * c-common.h (user_facing_original_type_p): Declare.
3235 * c-common.c: Include c-spellcheck.h.
3236 (user_facing_original_type_p): New function.
3238 2019-10-12 Jakub Jelinek <jakub@redhat.com>
3240 * c-common.h (c_omp_mark_declare_variant,
3241 c_omp_context_selector_matches): Declare.
3242 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3244 (c_omp_get_context_selector): Support second argument NULL.
3245 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3247 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3248 attribute, add "omp declare variant base" and
3249 "omp declare variant variant" attributes.
3251 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3253 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3254 CppReason(CPP_W_C11_C2X_COMPAT).
3256 2019-10-11 Joseph Myers <joseph@codesourcery.com>
3258 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3259 _Decimal64 and _Decimal128.
3261 2019-10-10 Joseph Myers <joseph@codesourcery.com>
3263 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3264 types if DFP not supported.
3266 2019-10-10 Jakub Jelinek <jakub@redhat.com>
3268 * c-common.h (c_omp_check_context_selector,
3269 c_omp_get_context_selector): Declare.
3270 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3271 in diagnostic message.
3272 (c_omp_check_context_selector, c_omp_get_context_selector): New
3274 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3276 (handle_omp_declare_variant_attribute): New function.
3278 2019-10-09 Martin Sebor <msebor@redhat.com>
3280 PR tree-optimization/90879
3281 * c.opt (-Wstring-compare): New option.
3283 2019-10-08 Andrew Sutton <asutton@lock3software.com>
3284 Jason Merrill <jason@redhat.com>
3286 Update the concepts implementation to conform to the C++20
3287 specification, improve compile times, and generally clean up
3290 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3291 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3292 * c.opt: Add -Wconcepts-ts.
3293 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3294 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3295 (set_std_cxx2a): Enable concepts by default.
3297 2019-10-08 Joseph Myers <joseph@codesourcery.com>
3299 * c-opts.c (c_common_post_options): Set
3300 -fno-fp-int-builtin-inexact for C2X.
3302 2019-10-05 Jakub Jelinek <jakub@redhat.com>
3304 PR c++/91369 - Implement P0784R7: constexpr new
3305 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3306 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3308 2019-10-04 Joseph Myers <joseph@codesourcery.com>
3311 * c-format.c (C_STD_VER): Handle C2x.
3312 (C_STD_NAME): Likewise.
3313 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3314 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3315 modifier allowed and 'p' flag.
3316 * c-format.h (enum format_std_version): Add STD_C2X.
3317 (struct format_char_info): Mention 'p' in comment on flags2.
3319 2019-10-01 David Malcolm <dmalcolm@redhat.com>
3321 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3322 calling diagnostic_show_locus, rather than destroying it afterwards.
3324 2019-10-01 Jakub Jelinek <jakub@redhat.com>
3327 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3328 with NULL DECL_FIELD_OFFSET.
3330 2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3332 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3333 has a type name, use it in preference to the __vector syntax.
3335 2019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3337 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3338 two spaces between a comma and "...".
3340 2019-09-27 Jakub Jelinek <jakub@redhat.com>
3343 * c-common.h (c_omp_predefined_variable): Declare.
3344 * c-omp.c (c_omp_predefined_variable): New function.
3345 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3346 for predefined variables.
3348 2019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3350 * c-common.h (build_function_call_vec): Take the original
3351 function decl as an optional final parameter.
3352 (check_builtin_function_arguments): Take the original function decl.
3353 * c-common.c (check_builtin_function_arguments): Likewise.
3354 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3355 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3357 2019-09-15 Jason Merrill <jason@redhat.com>
3359 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3360 fold_for_warn in "|| mask" warning.
3362 2019-09-10 Martin Liska <mliska@suse.cz>
3364 * c.opt: Use newly added WarnRemoved.
3366 2019-09-09 Martin Liska <mliska@suse.cz>
3368 * c.opt: Update comment of removed
3369 options that are preserved only for backward
3372 2019-09-06 Martin Liska <mliska@suse.cz>
3375 * c-common.c: Remove definition of flag_use_repository.
3376 * c-common.h: Likewise.
3377 * c-opts.c (c_common_handle_option):
3378 Do not handle OPT_frepo option.
3379 * c.opt: Mark the option with Deprecated.
3381 2019-09-04 Marek Polacek <polacek@redhat.com>
3383 * c.opt (fdeduce-init-list): Ignored.
3385 2019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3388 * c.opt (Wenum-conversion): New option.
3390 2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3392 * c-attribs.c (handle_section_attribute): Call the
3393 handle_generic_attribute target hook after performing target
3394 independent processing.
3395 (handle_noinit_attribute): Likewise.
3397 2019-09-03 Ian Lance Taylor <iant@golang.org>
3399 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3400 when using -fgo-dump-spec.
3402 2019-09-02 Martin Liska <mliska@suse.cz>
3405 * c-common.c (fname_as_string): Use cxx_printable_name for
3406 __PRETTY_FUNCTION__ same as was used before r265711.
3408 2019-08-28 Marek Polacek <polacek@redhat.com>
3410 Implement P1152R4: Deprecating some uses of volatile.
3412 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3413 default for C++2a, unless -Wno-deprecated.
3414 * c.opt (Wvolatile): New warning.
3416 2019-08-28 Marek Polacek <polacek@redhat.com>
3418 PR c++/91360 - Implement C++20 P1143R2: constinit.
3419 * c-common.c (c_common_reswords): Add constinit and __constinit.
3420 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3421 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3424 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3425 * c-format.c (cxx_keywords): Add "constinit".
3426 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3428 2019-08-27 Jakub Jelinek <jakub@redhat.com>
3431 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3432 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3433 like COMPOUND_EXPR rather than normal expression.
3435 2019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3438 * c-lex.c (c_lex_with_flags): Don't call
3439 c_common_no_more_pch () from here.
3441 2019-08-23 Jakub Jelinek <jakub@redhat.com>
3444 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3445 instead of flag_excess_precision_cmdline.
3446 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3447 * c-opts.c (c_common_post_options): Likewise.
3449 2019-08-22 Martin Sebor <msebor@redhat.com>
3452 * c-common.c (braced_list_to_string): Add argument and overload.
3453 Handle flexible length arrays and unions.
3455 2019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3457 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3458 function declarations where arguments are missing. Rename variables.
3460 2019-08-15 Richard Biener <rguenther@suse.de>
3462 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3463 enabled, define __SIZETYPE__.
3465 2019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3467 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3468 exclusion with "section" attribute.
3469 (attr_noinit_exclusions): New table.
3470 (handle_noinit_attribute): New function.
3472 2019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3475 * c-common.c (resolve_overloaded_builtin): Use
3476 copy_decl_built_in_function.
3478 2019-08-13 Martin Sebor <msebor@redhat.com>
3481 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3482 (asm_fprintf_length_spec): Same.
3483 * c-format.h (format_lengths): Add FMT_LEN_w.
3485 2019-08-10 Jakub Jelinek <jakub@redhat.com>
3487 * c-pragma.h (enum pragma_omp_clause): Add
3488 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3490 2019-08-07 Jakub Jelinek <jakub@redhat.com>
3492 * c-pragma.h (enum pragma_omp_clause): Add
3493 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3494 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3497 2019-08-05 Marek Polacek <polacek@redhat.com>
3499 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3500 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3501 default for C++2a, unless -Wno-deprecated.
3502 * c.opt (Wcomma-subscript): New warning.
3504 2019-07-20 Jakub Jelinek <jakub@redhat.com>
3506 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3507 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3508 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3509 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3510 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3511 constructs with the loop construct.
3513 2019-07-13 Jakub Jelinek <jakub@redhat.com>
3516 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3517 OMP_CLAUSE_REDUCTION_TASK handling.
3519 2019-07-12 Jakub Jelinek <jakub@redhat.com>
3521 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3522 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3524 2019-07-09 Martin Sebor <msebor@redhat.com>
3527 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
3528 and others to class.
3529 * c-pretty-print.h: Same.
3531 2019-07-09 Martin Sebor <msebor@redhat.com>
3534 * c-format.c (check_argument_type): Change class-key from class to
3535 struct and vice versa to match convention and avoid -Wclass-is-pod
3536 and -Wstruct-no-pod.
3537 * c-pretty-print.h: Same.
3539 2019-07-03 Martin Liska <mliska@suse.cz>
3541 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3544 2019-07-03 Jakub Jelinek <jakub@redhat.com>
3546 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3547 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3550 2019-07-02 qing zhao <qing.zhao@oracle.com>
3552 PR preprocessor/90581
3553 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3554 * c.opt: Add new option -fmax-include-depth.
3556 2019-06-26 Jason Merrill <jason@redhat.com>
3558 PR c++/55442 - memory-hog with highly recursive constexpr.
3559 * c.opt (fconstexpr-loop-limit): New.
3561 2019-06-25 Jakub Jelinek <jakub@redhat.com>
3564 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3565 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3567 2019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3569 * c-common.c (c_common_nodes_and_builtins): Define
3570 alternate "__intN__" name for "__intN" types.
3572 2019-06-24 Jan Hubicka <jh@suse.cz>
3574 * c-common.c (braced_lists_to_strings): Check that
3575 type is array or integer prior checking string flag.
3577 2019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3579 PR c++/90875 - added -Wswitch-outside-range option
3580 * c.opt (Wswitch-outside-range): Added new option.
3581 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3583 2019-06-21 Marek Polacek <polacek@redhat.com>
3585 PR c++/90953 - ICE with -Wmissing-format-attribute.
3586 * c-common.c (check_function_arguments_recurse): Use
3588 (check_missing_format_attribute): Likewise.
3590 2019-06-19 Marek Polacek <polacek@redhat.com>
3592 PR c++/60364 - noreturn after first decl not diagnosed.
3593 * c-attribs.c (handle_noreturn_attribute): No longer static.
3594 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3596 * c-format.c (check_function_format): Use get_attribute_name.
3598 2019-06-19 Martin Sebor <msebor@redhat.com>
3600 PR translation/90156
3601 * c-format.c (function_format_info::format_type): Adjust type.
3602 (function_format_info::is_raw): New member.
3603 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3604 (decode_format_attr): Adjust call to decode_format_type.
3605 Avoid a redundant call to convert_format_name_to_system_name.
3606 Avoid abbreviating the word "arguments" in a diagnostic.
3607 (format_warning_substr): New function.
3608 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3609 (finish_dollar_format_checking): Same.
3610 (check_format_info): Same.
3611 (struct baltoks_t): New.
3612 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3613 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3615 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3616 maybe_diag_unbalanced_tokens.
3617 (handle_format_attribute): Spell out the word "arguments" in
3620 2019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3622 PR c++/90449 - add -Winaccessible-base option.
3623 * c.opt (Winaccessible-base): New option.
3625 2019-06-10 Jakub Jelinek <jakub@redhat.com>
3627 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3628 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3629 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3630 combined/composite constructs where it is not allowed. Copy over
3631 OMP_CLAUSE_REDUCTION_INSCAN.
3633 2019-06-05 Martin Sebor <msebor@redhat.com>
3635 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3636 (handle_alias_ifunc_attribute): Same.
3637 (handle_copy_attribute): Same.
3638 (handle_weakref_attribute): Same.
3639 (handle_nonnull_attribute): Same.
3640 * c-warn.c (warn_for_sign_compare): Same.
3641 (warn_for_restrict): Same.
3644 2019-06-05 Martin Sebor <msebor@redhat.com>
3646 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3647 * c.opt (-Wformat-diag): Remove a spurious period.
3649 2019-05-29 Jakub Jelinek <jakub@redhat.com>
3652 * c-common.c (check_builtin_function_arguments)
3653 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3656 2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3658 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3660 2019-05-22 Martin Liska <mliska@suse.cz>
3663 * c-attribs.c (handle_copy_attribute): Do not copy
3664 target_clones attribute.
3666 2019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3668 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3669 * c-ada-spec.c (print_assignment_operator): New function.
3670 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3671 assignment operators declared as methods and filter out the others.
3673 2019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3676 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3677 "omp declare target".
3679 2019-05-16 Martin Sebor <msebor@redhat.com>
3681 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3682 keywords, operators, and types in diagnostics.
3683 (handle_scalar_storage_order_attribute): Same.
3684 (handle_mode_attribute): Same.
3685 (handle_visibility_attribute): Same.
3686 (handle_assume_aligned_attribute): Same.
3687 (handle_no_split_stack_attribute): Same.
3688 * c-common.c (shorten_compare): Same.
3689 (c_common_truthvalue_conversion): Same.
3690 (cb_get_source_date_epoch): Same.
3691 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3693 (interpret_float): Same.
3694 * c-omp.c (c_finish_omp_for): Same.
3695 * c-opts.c (c_common_post_options): Same.
3696 * c-pch.c (c_common_pch_pragma): Same.
3697 * c-pragma.c (pop_alignment): Same.
3698 (handle_pragma_pack): Same.
3699 (apply_pragma_weak): Same.
3700 (handle_pragma_weak): Same.
3701 (handle_pragma_scalar_storage_order): Same.
3702 (handle_pragma_redefine_extname): Same.
3703 (add_to_renaming_pragma_list): Same.
3704 (maybe_apply_renaming_pragma): Same.
3705 (push_visibility): Same.
3706 (handle_pragma_visibility): Same.
3707 (handle_pragma_optimize): Same.
3708 (handle_pragma_message): Same.
3709 * c-warn.c (warn_for_omitted_condop): Same.
3710 (lvalue_error): Same.
3712 2019-05-15 Richard Biener <rguenther@suse.de>
3715 * c-common.c (c_common_mark_addressable_vec): Also mark
3716 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3719 2019-05-06 Nathan Sidwell <nathan@acm.org>
3721 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3723 2019-04-30 Nathan Sidwell <nathan@acm.org>
3725 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3727 2019-04-30 Martin Liska <mliska@suse.cz>
3729 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3730 for unknown options.
3732 2019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3734 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3735 the pointer target rather than the pointer itself.
3737 2019-04-19 Jakub Jelinek <jakub@redhat.com>
3740 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3742 (c_do_switch_warnings): Remove outside_range_p argument.
3743 * c-common.c (check_case_bounds): Removed.
3744 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3745 Don't call check_case_bounds. Fold low_value as well as high_value.
3746 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3747 Check for case labels outside of range of original type here and
3750 2019-04-12 Jakub Jelinek <jakub@redhat.com>
3752 PR translation/90041
3753 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3754 in the Warn diagnostics.
3757 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3758 function comment. Warn if arguments of the attribute are not positive
3761 2019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3763 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3764 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3766 2019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3768 * c-ada-spec.c (is_float128): New predicate extracted from...
3769 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3770 <REAL_TYPE>: ...here. Call it.
3772 2019-04-05 David Malcolm <dmalcolm@redhat.com>
3775 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3776 auto_diagnostic_group. Guard inform calls by result of
3779 2019-04-05 Marek Polacek <polacek@redhat.com>
3781 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
3782 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3785 2019-04-03 Jason Merrill <jason@redhat.com>
3787 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3788 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3790 2019-04-01 Martin Sebor <msebor@redhat.com>
3793 * c-attribs.c (handle_copy_attribute): Handle references and
3794 non-constant expressions.
3796 2019-03-22 Jakub Jelinek <jakub@redhat.com>
3799 * c.opt (-fconstexpr-ops-limit=): New option.
3801 2019-03-21 Jakub Jelinek <jakub@redhat.com>
3803 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3806 2019-03-19 Martin Sebor <msebor@redhat.com>
3808 PR tree-optimization/89688
3809 * c-common.c (braced_list_to_string): Make static.
3810 (braced_lists_to_strings): Define new function.
3811 * c-common.h (braced_list_to_string): Remove.
3812 (braced_lists_to_strings): Declare.
3814 2019-03-12 Martin Liska <mliska@suse.cz>
3816 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3818 2019-03-11 Martin Liska <mliska@suse.cz>
3820 * c-opts.c (c_common_post_options): Wrap apostrophes
3821 in gcc internal format with %'.
3823 2019-03-11 Martin Liska <mliska@suse.cz>
3825 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3826 in a string format message and fix GNU coding style.
3827 * c-common.c (vector_types_convertible_p): Likewise.
3828 (c_build_vec_perm_expr): Likewise.
3829 * c-indentation.c (get_visual_column): Likewise.
3830 * c-opts.c (c_common_handle_option): Likewise.
3831 (c_common_post_options): Likewise.
3832 (sanitize_cpp_opts): Likewise.
3833 * c-pch.c (c_common_pch_pragma): Likewise.
3834 * c-pragma.c (handle_pragma_pack): Likewise.
3836 2019-03-08 Jakub Jelinek <jakub@redhat.com>
3838 PR tree-optimization/89550
3839 * c-common.c (c_common_truthvalue_conversion): Only set
3840 TREE_NO_WARNING if warning_at returned true.
3841 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3843 2019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3844 Martin Sebor <msebor@gmail.com>
3846 * c.opt (Wmissing-attributes): Clean up doc string.
3848 2019-02-25 Jakub Jelinek <jakub@redhat.com>
3851 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3852 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3855 2019-02-22 Richard Biener <rguenther@suse.de>
3857 * c-pch.c (no_checksum): Remove.
3858 (pch_init): Remove assertion that executable_checksum is not
3860 (c_common_valid_pch): Likewise.
3862 2019-02-18 Martin Sebor <msebor@redhat.com>
3865 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3867 2019-02-16 David Malcolm <dmalcolm@redhat.com>
3870 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3871 implementing -Wtype-limits.
3873 2019-02-11 Martin Sebor <msebor@redhat.com>
3876 * c-common.c (invalid_array_size_error): New function.
3877 (valid_array_size_p): Call it. Handle size as well as type.
3878 * c-common.h (valid_constant_size_p): New function.
3879 (enum cst_size_error): New type.
3881 2019-01-31 David Malcolm <dmalcolm@redhat.com>
3884 * known-headers.cc (get_stdlib_header_for_name): Add
3885 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3887 2019-01-31 Jakub Jelinek <jakub@redhat.com>
3890 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3891 a C cast in pp_c_flag_gnu_v3 mode.
3893 2019-01-29 Jakub Jelinek <jakub@redhat.com>
3896 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3897 builtin_structptr_types types even for C.
3899 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3901 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3902 when rhs is of array type correctly. Fix handling of nested structures.
3903 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3904 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3905 type casts within nested compound expressions.
3907 2019-01-22 Jakub Jelinek <jakub@redhat.com>
3910 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3911 variable after using BIT_FIELD_REF.
3913 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3917 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3918 Remove the boolean argument.
3919 * c-warn.c (check_address_of_packed_member): Renamed to ...
3920 (check_address_or_pointer_of_packed_member): This. Also
3921 warn pointer conversion.
3922 (check_and_warn_address_of_packed_member): Renamed to ...
3923 (check_and_warn_address_or_pointer_of_packed_member): This.
3924 Also warn pointer conversion.
3925 (warn_for_address_or_pointer_of_packed_member): Remove the
3926 boolean argument. Don't check pointer conversion here.
3928 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3931 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3933 2019-01-14 Jakub Jelinek <jakub@redhat.com>
3935 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3936 and __cpp_nontype_template_parameter_auto. Add a comment that
3937 __cpp_template_auto is deprecated.
3939 2019-01-14 Tom Honermann <tom@honermann.net>
3941 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3942 * c-common.c (c_common_reswords): Add char8_t.
3943 (fix_string_type): Use char8_t for the type of u8 string literals.
3944 (c_common_get_alias_set): char8_t doesn't alias.
3945 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3947 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3948 (keyword_begins_type_specifier): Add RID_CHAR8.
3949 * c-common.h (rid): Add RID_CHAR8.
3950 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3951 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3952 Define char8_type_node and char8_array_type_node.
3953 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3954 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3955 (c_cpp_builtins): Predefine __cpp_char8_t.
3956 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3958 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3959 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3961 * c.opt: Add the -fchar8_t command line option.
3963 2019-01-14 Martin Sebor <msebor@redhat.com>
3966 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3967 and issue errors if it fails.
3968 * c-common.h (valid_format_string_type_p): Declare.
3969 * c-format.c (valid_stringptr_type_p): Rename...
3970 (valid_format_string_type_p): ...to this and make extern.
3971 (handle_format_arg_attribute): Adjust to new name.
3972 (check_format_string): Same.
3974 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3976 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3977 Replace "may may" with "may" in warning message.
3979 2019-01-07 Jakub Jelinek <jakub@redhat.com>
3982 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3983 (c_build_vec_convert): Declare.
3984 * c-common.c (c_build_vec_convert): New function.
3986 2019-01-04 Martin Sebor <msebor@redhat.com>
3989 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3990 Handle C++ empty throw specification and C11 _Noreturn.
3991 (has_attribute): Also handle C11 _Noreturn.
3993 2019-01-04 Martin Sebor <msebor@redhat.com>
3996 * c-attribs.c (positional_argument): Also accept enumerated types.
3998 2019-01-01 Jakub Jelinek <jakub@redhat.com>
4000 Update copyright years.
4002 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
4005 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
4006 * c-warn.c (check_alignment_of_packed_member): New function.
4007 (check_address_of_packed_member): Likewise.
4008 (check_and_warn_address_of_packed_member): Likewise.
4009 (warn_for_address_or_pointer_of_packed_member): Likewise.
4010 * c.opt: Add -Wno-address-of-packed-member.
4012 2018-12-20 David Malcolm <dmalcolm@redhat.com>
4015 * c-warn.c (get_outermost_macro_expansion): New function.
4016 (spelled_the_same_p): Use it to unwind the macro expansions, and
4017 compare the outermost macro in each nested expansion, rather than
4020 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4023 * c-common.h (warn_tautological_cmp): Convert 1st param from
4024 location_t to const op_location_t &.
4025 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
4026 when testing for INTEGER_CST.
4027 (warn_tautological_bitwise_comparison): Convert 1st param from
4028 location_t to const op_location_t &; use it to build a
4029 binary_op_rich_location, and use this.
4030 (spelled_the_same_p): New function.
4031 (warn_tautological_cmp): Convert 1st param from location_t to
4032 const op_location_t &. Warn for macro expansions if
4033 spelled_the_same_p. Use binary_op_rich_location.
4035 2018-12-19 David Malcolm <dmalcolm@redhat.com>
4039 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
4040 (verify_tree): Handle location wrappers.
4041 (c_common_truthvalue_conversion): Strip any location wrapper.
4043 (fold_offsetof): Strip any location wrapper.
4044 (complete_array_type): Likewise for initial_value.
4045 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
4046 index before checking for INTEGER_CST.
4047 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
4048 print parentheses around location wrappers.
4049 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
4050 before checking for INTEGER_CST.
4051 (warn_tautological_bitwise_comparison): Call
4052 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
4053 before checking for INTEGER_CST.
4054 (readonly_error): Strip any location wrapper.
4055 (warn_array_subscript_with_type_char): Strip location wrappers
4056 before checking for INTEGER_CST. Use the location of the index if
4059 2018-12-06 Jason Merrill <jason@redhat.com>
4061 PR c++/88136 - -Wdeprecated-copy false positives
4062 * c.opt (Wdeprecated-copy-dtor): New.
4063 (Wdeprecated-copy): Move to -Wextra.
4065 2018-11-29 Martin Sebor <msebor@redhat.com>
4069 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
4070 alignments to values less than the target requires.
4071 (has_attribute): For attribute aligned consider both the attribute
4072 and the alignment bits.
4073 * c-common.c (c_init_attributes): Optionally issue a warning for
4076 2018-11-28 Martin Sebor <msebor@redhat.com>
4080 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
4081 or destination is an error.
4083 2018-11-28 Jakub Jelinek <jakub@redhat.com>
4086 * c-ubsan.c: Include langhooks.h.
4087 (ubsan_instrument_division): Change gcc_assert that main variants
4088 of op0 and op1 types are equal to gcc_checking_assert that the
4089 main variants are compatible types.
4091 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
4093 * c-ada-spec.c: Include stringpool.h.
4094 (has_static_fields): Return false for incomplete types.
4095 (is_tagged_type): Likewise.
4096 (has_nontrivial_methods): Likewise.
4097 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
4098 (struct overloaded_name_hash): New structure.
4099 (struct overloaded_name_hasher): Likewise.
4100 (overloaded_names): New global variable.
4101 (init_overloaded_names): New static function.
4102 (overloaded_name_p): New predicate.
4103 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
4104 on the TYPE_STUB_DECL of the original type of a typedef, if any.
4105 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
4106 Remove always-true condition and dump forward types.
4107 (dump_ada_specs): Delete overloaded_names.
4109 2018-11-20 Martin Sebor <msebor@redhat.com>
4111 * c-attribs.c (type_for_vector_size): New function.
4112 (type_valid_for_vector_size): Same.
4113 (handle_vector_size_attribute): Move code to the functions above
4115 (validate_attribute, has_attribute): New functions.
4116 * c-common.h (has_attribute): Declare.
4117 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
4118 * c-common.c (c_common_resword): Same.
4120 2018-11-16 Jason Merrill <jason@redhat.com>
4122 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
4123 * c-attribs.c (attr_cold_hot_exclusions): Make public.
4125 2018-11-16 Jakub Jelinek <jakub@redhat.com>
4128 * c-common.c (fix_string_type): Reject string literals larger than
4129 TYPE_MAX_VALUE (ssizetype) bytes.
4131 2018-11-15 Martin Sebor <msebor@redhat.com>
4135 * c-attribs.c (positional_argument): New function.
4136 (handle_alloc_size_attribute): Use it and simplify.
4137 (handle_alloc_align_attribute): Same.
4138 (handle_assume_aligned_attribute): Same.
4139 (handle_nonnull_attribute): Same.
4140 * c-common.c (check_function_arguments): Pass fntype to
4141 check_function_format.
4142 * c-common.h (check_function_format): Add an argument.
4143 (PosArgFlags, positional_argument): Declare new type and function.
4144 * c-format.c (decode_format_attr): Add arguments.
4145 (check_format_string, get_constant): Same.
4146 (convert_format_name_to_system_name): Adjust.
4148 2018-11-15 David Malcolm <dmalcolm@redhat.com>
4151 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
4153 2018-11-14 Jakub Jelinek <jakub@redhat.com>
4155 P1236R1 - Signed integers are two's complement
4156 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
4157 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
4158 with in-range second operand well defined for -std=c++2a.
4161 * c-common.c (parse_optimize_options): Allocate option string from
4162 opts_obstack rather than as GC memory. Move the allocation after
4163 warning for invalid option.
4165 2018-11-13 David Malcolm <dmalcolm@redhat.com>
4167 * c-common.c (c_get_substring_location): Update for renaming of
4168 get_source_location_for_substring to get_location_within_string.
4169 * c-lex.c: Replace "source_location" with "location_t".
4170 * c-opts.c: Likewise.
4171 * c-ppoutput.c: Likewise.
4173 2018-11-13 Martin Sebor <msebor@redhat.com>
4176 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
4177 (handle_tls_model_attribute): Improve diagnostics.
4179 2018-11-12 Jason Merrill <jason@redhat.com>
4181 * c-cppbuiltin.c (c_cpp_builtins): Define
4182 __cpp_impl_destroying_delete.
4184 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
4185 __cpp_conditional_explicit.
4187 2018-11-09 Martin Sebor <msebor@redhat.com>
4190 * c-attribs.c (handle_copy_attribute): New function.
4192 2018-11-09 Martin Sebor <msebor@redhat.com>
4195 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
4197 2018-11-08 Jakub Jelinek <jakub@redhat.com>
4199 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
4200 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4201 enum omp_memory_order MEMORY_ORDER.
4202 (c_finish_omp_flush): Add MO argument.
4203 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
4204 (c_finish_omp_for): Add FINAL_P argument.
4205 * c-omp.c: Include memmodel.h.
4206 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
4207 OMP_TASKGROUP_CLAUSES to it.
4208 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4209 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4210 instead of OMP_ATOMIC_SEQ_CST.
4211 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4212 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4213 __atomic_thread_fence call with the given value.
4214 (check_omp_for_incr_expr): Formatting fixes.
4215 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4216 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4217 is not constant expression 1 or -1. Transform NE_EXPR loops
4218 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4219 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4221 (c_omp_split_clauses): Add support for combined
4222 #pragma omp parallel master and
4223 #pragma omp {,parallel }master taskloop{, simd} constructs.
4224 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4225 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4226 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4227 (c_omp_predetermined_sharing): Don't return
4228 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4229 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4230 PRAGMA_OMP_REQUIRES.
4231 * c-pragma.h (enum pragma_kind): Likewise.
4232 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4233 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4235 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4237 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4239 2018-11-08 David Malcolm <dmalcolm@redhat.com>
4241 * c-format.c (local_cgraph_node_ptr_node): New variable.
4242 (gcc_dump_printf_char_table): Add entry for %C.
4243 (get_pointer_to_named_type): New function, taken from the handling
4244 code for "gimple *" from...
4245 (init_dynamic_diag_info): ...here. Add handling for
4247 * c-format.h (T_CGRAPH_NODE): New.
4249 2018-10-19 Jason Merrill <jason@redhat.com>
4251 * c-cppbuiltin.c (c_cpp_builtins): Add
4252 __cpp_nontype_template_parameter_class.
4254 2018-10-31 Nathan Sidwell <nathan@acm.org>
4256 * c-opts.c (c_finish_options): Force command line macro
4257 location. Refactor to avoid repeating main debug hook.
4258 (push_command_line_include): Clarify comment.
4260 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4262 2018-10-30 Martin Sebor <msebor@redhat.com>
4265 * c-format.c (check_format_types): Avoid diagnosing null pointer
4266 arguments to printf-family of functions.
4268 2018-10-30 Marek Polacek <polacek@redhat.com>
4270 Implement P0892R2, explicit(bool).
4271 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4273 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4275 * name-hint.h (name_hint::take_deferred): New member function.
4277 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4280 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4282 (check_function_restrict): Rename param "argarray" to
4283 "unfolded_argarray", and make a copy named "argarray", calling
4284 fold_for_warn on each argument.
4285 (check_function_arguments): Add note about responsibility for
4286 folding the arguments.
4288 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4290 * c-common.c (flag_isoc2x): New variable.
4291 * c-common.h (clk_c): Update comment to reference C2X.
4292 (flag_isoc99, flag_isoc11): Update comments to reference future
4293 standard versions in general.
4294 (flag_isoc2x): Declare.
4295 * c-opts.c (set_std_c2x): New function.
4296 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4297 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4299 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4301 2018-10-17 Joseph Myers <joseph@codesourcery.com>
4303 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4304 (std=iso9899:2018): Document C17 as published in 2018.
4306 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4309 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4311 2018-10-11 Will Wray <wjwray@gmail.com>
4314 * c-pretty-print.h (pp_c_type_cast): Prototype.
4315 (pp_c_integer_constant): Likewise.
4316 * c-pretty-print.c (pp_c_type_cast): No longer static.
4317 (pp_c_integer_constant): Likewise.
4318 (pp_c_enumeration_constant): Fix loop termination when finding
4319 name of constant. No longer returns a value. Call
4320 pp_c_integer_constant.
4321 (c_pretty_printer::constant): Update for changes to
4322 pp_c_enumeration_constant.
4324 2018-10-11 Jakub Jelinek <jakub@redhat.com>
4326 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4327 for no_unique_address.
4329 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4331 * c-common.c (c_option_controlling_cpp_error): Rename to...
4332 (c_option_controlling_cpp_diagnostic): ...this, and convert
4333 "reason" from int to enum.
4334 (c_cpp_error): Rename to...
4335 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4336 * c-common.h (c_cpp_error): Rename to...
4337 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4338 * c-opts.c (c_common_init_options): Update for renaming.
4340 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4343 * c-common.c (vector_types_compatible_elements_p): Use
4344 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4346 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4348 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4349 to generate constructor destructor priority warning.
4350 * c.opt (-Wprio-ctor-dtor): New option.
4352 2018-10-01 Jason Merrill <jason@redhat.com>
4354 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4356 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4358 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4359 (dump_ada_node): Add const keyword.
4361 2018-09-25 Martin Liska <mliska@suse.cz>
4363 * c-common.c (c_common_truthvalue_conversion):
4364 Remove Pascal from documentation.
4366 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4368 * c-ada-spec.c: Include diagnostic.h.
4369 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4371 2018-09-19 Marek Polacek <polacek@redhat.com>
4373 * c.opt (Wclass-conversion): New.
4375 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4377 * c-format.c (range_label_for_format_type_mismatch::get_text):
4378 Update for new param.
4380 2018-09-17 David Malcolm <dmalcolm@redhat.com>
4382 * c-format.c (format_warning_at_char): Update for introduction of
4383 format_string_diagnostic_t.
4384 (format_type_warning): Likewise.
4386 2018-09-17 Martin Jambor <mjambor@suse.cz>
4389 * c.opt (Wabsolute-value): New.
4391 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4393 * c-common.c (complete_flexible_array_elts): New helper function.
4394 * c-common.h (complete_flexible_array_elts): Declare.
4396 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4398 * c-common.c (braced_list_to_string): Remove eval parameter.
4399 Add some more checks. Always create zero-terminated STRING_CST.
4400 * c-common.h (braced_list_to_string): Adjust prototype.
4402 2018-08-27 David Malcolm <dmalcolm@redhat.com>
4405 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4407 (maybe_suggest_missing_token_insertion): Likewise.
4408 (maybe_add_include_fixit): Add param "override_location". If set,
4409 and source-printing is enabled, then override the rich_location's
4410 primary location with that of the insertion point for the fix-it
4411 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4412 * c-common.h (extern void maybe_add_include_fixit): Add bool
4414 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4415 for conversion of show_caret_p to a tri-state.
4416 * c-warn.c (warn_for_restrict): Likewise.
4418 (suggest_missing_header::~suggest_missing_header): Update call to
4419 maybe_add_include_fixit to suggest overriding the location, as it
4422 2018-08-27 Martin Liska <mliska@suse.cz>
4424 * c-common.c (check_function_restrict): Use new function
4425 fndecl_built_in_p and remove check for FUNCTION_DECL if
4427 (check_builtin_function_arguments): Likewise.
4428 (reject_gcc_builtin): Likewise.
4429 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4431 2018-08-26 Marek Polacek <polacek@redhat.com>
4433 PR c++/87029, Implement -Wredundant-move.
4434 * c.opt (Wredundant-move): New option.
4436 2018-08-21 Marek Polacek <polacek@redhat.com>
4438 PR c++/86981, Implement -Wpessimizing-move.
4439 * c.opt (Wpessimizing-move): New option.
4441 2018-08-20 David Malcolm <dmalcolm@redhat.com>
4444 * c-attribs.c (common_handle_aligned_attribute): Add
4445 auto_diagnostic_group instance.
4446 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4447 * c-opts.c (c_common_post_options): Likewise.
4448 * c-warn.c (warn_logical_not_parentheses): Likewise.
4449 (warn_duplicated_cond_add_or_warn): Likewise.
4450 (warn_for_multistatement_macros): Likewise.
4452 2018-08-20 Nathan Sidwell <nathan@acm.org>
4454 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4457 2018-08-17 Nathan Sidwell <nathan@acm.org>
4459 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4461 (laxy_hex_fp_value_count): Make unsigned.
4462 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4463 manipulate the macro.
4464 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4467 2018-08-17 David Malcolm <dmalcolm@redhat.com>
4469 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4470 (gcc_dump_printf_length_specs): New.
4471 (gcc_dump_printf_flag_pairs): New.
4472 (gcc_dump_printf_flag_specs): New.
4473 (gcc_dump_printf_char_table): New.
4474 (format_types_orig): Add entry for "gcc_dump_printf".
4475 (init_dynamic_diag_info): Set up length_char_specs and
4476 conversion_specs for gcc_dump_printf_format_type.
4477 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4479 2018-08-17 Nathan Sidwell <nathan@acm.org>
4481 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4483 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4484 * c-cppbuiltin.c: Likewise.
4486 2018-08-17 Martin Liska <mliska@suse.cz>
4488 * c.opt: Remove Warn, Init and Report for options with
4489 Ignore/Deprecated flag. Warning is done automatically for
4492 2018-08-16 David Malcolm <dmalcolm@redhat.com>
4495 * c-common.c (selftest::c_family_tests): Call
4496 selftest::c_indentation_c_tests.
4497 * c-common.h (selftest::c_indentation_c_tests): New decl.
4498 * c-indentation.c: Include "selftest.h".
4499 (next_tab_stop): Add "tab_width" param, rather than accessing
4501 (get_visual_column): Likewise. Clarify comment. Bulletproof
4502 against reading past the end of the line.
4503 (get_first_nws_vis_column): Add "tab_width" param.
4504 (detect_intervening_unindent): Likewise.
4505 (should_warn_for_misleading_indentation): Read tab width from
4506 cpp_opts and pass around.
4507 (selftest::test_next_tab_stop): New test.
4508 (selftest::assert_get_visual_column_succeeds): New function.
4509 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4510 (selftest::assert_get_visual_column_fails): New function.
4511 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4512 (selftest::test_get_visual_column): New test.
4513 (selftest::c_indentation_c_tests): New function.
4515 2018-08-16 Nathan Sidwell <nathan@acm.org>
4517 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4518 (store_ada_macro): Likewise.
4519 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4520 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4522 2018-08-15 David Malcolm <dmalcolm@redhat.com>
4524 * c-format.c: Include "selftest-diagnostic.h" and
4525 "gcc-rich-location.h".
4526 (format_warning_at_char): Pass NULL for new label params of
4528 (class indirection_suffix): New class.
4529 (class range_label_for_format_type_mismatch): New class.
4530 (format_type_warning): Move logic for generating "*" suffix to
4531 class indirection_suffix. Create "fmt_label" and "param_label"
4532 to show their types, and pass them to the
4533 format_warning_at_substring calls.
4534 (selftest::test_type_mismatch_range_labels): New test.
4535 (selftest::c_format_c_tests): Call it.
4537 2018-08-13 Martin Sebor <msebor@redhat.com>
4539 PR tree-optimization/71625
4540 * c-common.c (braced_list_to_string): New function.
4541 * c-common.h (braced_list_to_string): Declare it.
4543 2018-08-08 Nathan Sidwell <nathan@acm.org>
4545 * c-common.c (try_to_locate_new_include_inertion_point): Use
4546 linemap_included_from_linemap.
4547 * c-lex.c (fe_file_change): Use linemap_included_from.
4548 * c-ppoutput.c (pp_file_change): Likewise.
4550 2018-08-01 Martin Sebor <msebor@redhat.com>
4552 PR tree-optimization/86650
4553 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
4554 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4555 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4556 * c-format.h (T89_G): Update to be "gimple *" rather than
4558 (local_gcall_ptr_node): Rename...
4559 (local_gimple_ptr_node): ...to this.
4561 2018-07-31 David Malcolm <dmalcolm@redhat.com>
4563 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4564 table entries for gcc_diag_char_table, and the 'Z' entry from
4565 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4566 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4567 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4568 adding missing "Z" for this table. Remove erroneous "G" and "K"
4570 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4571 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4572 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4574 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
4576 * c-common.c (speculation_safe_resolve_call): New function.
4577 (speculation_safe_resolve_params): New function.
4578 (speculation_safe_resolve_return): New function.
4579 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4580 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4581 __HAVE_SPECULATION_SAFE_VALUE.
4583 2018-07-20 David Malcolm <dmalcolm@redhat.com>
4585 * c-common.c (c_cpp_error): Remove redundant "line_table"
4586 parameter from call to rich_location::set_range.
4587 (maybe_suggest_missing_token_insertion): Likewise.
4589 2018-07-20 Martin Sebor <msebor@redhat.com>
4592 * c.opt (-Warray-bounds): Remove redundant -Wall.
4594 2018-07-20 Martin Sebor <msebor@redhat.com>
4597 * c-common.h (c_common_handle_option): Change function argument
4599 * c-opts.c (c_common_init_options): Same.
4600 (c_common_handle_option): Same. Remove special handling of
4601 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4602 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4603 options to take a HOST_WIDE_INT argument and accept a byte-size
4605 (-Wvla-larger-than): Same.
4606 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4607 (-Wno-vla-larger-than): Same.
4609 2018-07-12 Jakub Jelinek <jakub@redhat.com>
4611 * c-attribs.c (c_common_attribute_table): Add
4612 "omp declare target implicit" attribute.
4614 2018-07-12 Richard Biener <rguenther@suse.de>
4617 * c-attribs.c (handle_packed_attribute): Do not build a variant
4618 type with TYPE_PACKED, instead ignore the attribute if we may
4619 not apply to the original type.
4621 2018-07-10 Jakub Jelinek <jakub@redhat.com>
4624 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4625 to contain TREE_LIST for both the original class iterator and the
4628 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4630 * c-ada-spec.c (to_ada_name): Remove index parameter.
4631 (pp_ada_tree_identifier): Likewise.
4632 (dump_ada_macros): Adjust call to to_ada_name.
4633 (struct overloaded_name_hash): Delete.
4634 (struct overloaded_name_hasher): Likewise.
4635 (overloaded_names): Likewise.
4636 (compute_overloading_index): Likewise.
4637 (dump_ada_decl_name): Do not call compute_overloading_index and
4638 adjust calls to pp_ada_tree_identifier.
4639 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4640 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4641 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4642 (dump_ada_enum_type): Remove type and display_convention parameters.
4643 Adjust calls to pp_ada_tree_identifier.
4644 (dump_ada_node): Likewise and for dump_ada_structure.
4645 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4647 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4649 (print_constructor): Adjust call to pp_ada_tree_identifier.
4650 (print_destructor): Likewise.
4651 (dump_ada_declaration): Switch to aspect syntax.
4652 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4653 parameter with nested parameter.
4654 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4655 (dump_ada_specs): Do not delete overloaded_names table.
4657 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
4660 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
4663 2018-07-05 Nathan Sidwell <nathan@acm.org>
4665 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4666 NO_IMPLICIT_EXTERN_C.
4668 2018-06-28 Martin Liska <mliska@suse.cz>
4670 * cppspec.c: Include opt-suggestions.h.
4672 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4673 Thomas Schwinge <thomas@codesourcery.com>
4674 Cesar Philippidis <cesar@codesourcery.com>
4676 * c-pragma.h (enum pragma_omp_clause): Add
4677 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4678 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4680 2018-06-20 Jakub Jelinek <jakub@redhat.com>
4683 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4686 2018-06-18 Martin Sebor <msebor@redhat.com>
4689 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4692 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4694 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4696 2018-06-13 Jason Merrill <jason@redhat.com>
4698 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4699 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4702 PR c++/86094 - wrong code with defaulted move ctor.
4703 * c-opts.c (c_common_post_options): Bump the current ABI version to
4704 13. Set warn_abi_version and flag_abi_compat_version to the current
4705 version rather than 0. Fix defaulting flag_abi_compat_version from
4708 2018-06-12 Martin Sebor <msebor@redhat.com>
4711 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4712 sizeof source and destination yields the same value.
4714 2018-06-12 Martin Liska <mliska@suse.cz>
4716 * c.opt: Make MPX-related options as Deprecated.
4718 2018-06-08 David Malcolm <dmalcolm@redhat.com>
4720 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4723 2018-06-08 Martin Liska <mliska@suse.cz>
4725 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4726 for MPX (macros, related functions, fields in cgraph_node, ...).
4727 (handle_bnd_legacy): Likewise.
4728 (handle_bnd_instrument): Likewise.
4731 2018-06-06 Jakub Jelinek <jakub@redhat.com>
4734 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4735 __cpp_transactional_memory to 201500 instead of 210500.
4737 2018-06-06 Jason Merrill <jason@redhat.com>
4739 PR c++/85710 - ICE with -Wmemset-elt-size.
4740 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4742 2018-06-01 Jason Merrill <jason@redhat.com>
4744 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4747 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4749 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4750 declaration for a typedef independently of whether the declaration of
4751 the subtype is generated.
4753 2018-05-31 Martin Sebor <msebor@redhat.com>
4756 * c.opt (-Wno-alloc-size-larger-than): New option.
4758 2018-04-22 David Pagan <dave.pagan@oracle.com>
4761 * c-opts.c (c_common_post_options): Set default for warn_return_type
4762 for C++/C++ with ObjC extensions only. For C, makes it possible to
4763 differentiate between default (no option), -Wreturn-type, and
4766 2018-05-29 Jason Merrill <jason@redhat.com>
4768 * c.opt (Winit-list-lifetime): New flag.
4770 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4772 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4773 splay_tree_delete_pointers.
4775 2018-05-26 Jakub Jelinek <jakub@redhat.com>
4778 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4779 noinline variable to workaround broken kernel headers.
4781 2018-05-18 Jason Merrill <jason@redhat.com>
4783 * c.opt (Wdeprecated-copy): New flag.
4785 2018-05-17 Martin Liska <mliska@suse.cz>
4787 * c-warn.c (overflow_warning): Do not use
4788 space in between 'G_' and '('.
4790 2018-05-09 Jason Merrill <jason@redhat.com>
4792 * c-common.c (valid_array_size_p): Add complain parameter.
4793 * c-common.h: ...which defaults to true.
4795 2018-05-11 Jakub Jelinek <jakub@redhat.com>
4798 * c-omp.c (c_omp_predetermined_sharing): Return
4799 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4801 2018-05-11 Martin Liska <mliska@suse.cz>
4804 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4807 2018-05-10 Jakub Jelinek <jakub@redhat.com>
4810 * c-common.h (fold_offsetof_1): Removed.
4811 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4812 CTX argument defaulted to ERROR_MARK.
4813 * c-common.c (fold_offsetof_1): Renamed to ...
4814 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4815 argument, convert the pointer constant to TYPE and use size_binop
4816 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4817 a pointer type. Adjust recursive calls.
4819 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4822 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4824 2018-05-07 Nathan Sidwell <nathan@acm.org>
4826 * c.opt (ffor-scope): Remove functionality, issue warning.
4828 2018-05-03 Nathan Sidwell <nathan@acm.org>
4830 * c.opt (ffriend-injection): Remove functionality, issue warning.
4832 2018-05-01 David Malcolm <dmalcolm@redhat.com>
4835 * c-format.c (struct format_check_results): Add field
4837 (check_format_info): Initialize it, and warn if encountered.
4838 (check_format_arg): Distinguish between wide char and
4839 everything else when detecting arrays of non-char.
4841 2018-04-30 David Malcolm <dmalcolm@redhat.com>
4843 * c-format.c (get_corrected_substring): Update for
4844 location_get_source_line returning a char_span. Use a char_span
4845 when handling the prefix of the correction.
4846 * c-indentation.c (get_visual_column): Update for
4847 location_get_source_line returning a char_span.
4848 (get_first_nws_vis_column): Likewise.
4850 2018-03-29 David Malcolm <dmalcolm@redhat.com>
4853 * known-headers.cc (get_stdlib_header_for_name): Add various names
4854 from <assert.h>, <string.h>, and <memory.h>; add more names from
4857 2018-03-27 Jakub Jelinek <jakub@redhat.com>
4860 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4861 get_base_address of the second operand is a VAR_P, rather than the
4862 operand itself, and use gcc_checking_assert instead of gcc_assert.
4864 2018-03-23 Marek Polacek <polacek@redhat.com>
4867 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4868 <case RDIV_EXPR>: Tweak condition.
4870 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4872 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4874 2018-03-16 Jakub Jelinek <jakub@redhat.com>
4877 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4881 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4884 2018-03-16 Richard Biener <rguenther@suse.de>
4887 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4888 unshare the possibly folded expression.
4890 2018-03-15 Richard Biener <rguenther@suse.de>
4893 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4895 2018-03-13 Martin Sebor <msebor@redhat.com>
4897 PR tree-optimization/84725
4898 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4899 with all three narrow character types, including their qualified forms.
4901 2018-03-12 Martin Sebor <msebor@redhat.com>
4903 PR tree-optimization/83456
4904 * c-common.c (check_function_restrict): Return bool.
4905 Restore checking of bounded built-in functions.
4906 (check_function_arguments): Also return the result
4907 of warn_for_restrict.
4908 * c-common.c (check_function_restrict): Return bool.
4909 * c-warn.c (warn_for_restrict): Return bool.
4911 2018-03-02 Marek Polacek <polacek@redhat.com>
4914 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4917 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4919 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4922 2018-03-01 Marek Polacek <polacek@redhat.com>
4925 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4926 alignment in computation.
4928 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4930 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4931 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4933 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4935 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4936 (is_char_array): Take a type instead of a declaration.
4937 (dump_ada_array_type): Likewise.
4938 (is_simple_enum): Minor tweak.
4939 (dump_ada_enum_type): New function extracted from...
4940 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4941 <INTEGER_TYPE>: Remove unreachable code.
4942 <RECORD_TYPE>: Likewise. Minor tweaks.
4943 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4944 <ENUMERAL_TYPE>: New case.
4945 <RECORD_TYPE>: Factor out common code.
4946 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4947 Minor tweaks. Deal with enumeral types.
4948 (dump_ada_structure): Minor tweaks.
4950 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4952 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4953 address for incomplete structures.
4954 (dump_forward_type): Do not bail out for incomplete structures.
4955 (dump_ada_declaration): Do not special-case incomplete structures
4956 for subtypes. Dump them as null records for types.
4958 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4960 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4961 (is_char_array): Fix formatting.
4962 (dump_template_types): Likewise.
4963 (dump_generic_ada_node): Rename into...
4964 (dump_ada_node): ...this.
4965 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4966 incomplete structures and not for empty structures. Do not use it
4967 when forward declarations are needed.
4968 (dump_forward_type): New function.
4969 (dump_nested_types): Remove FORWARD parameter. Do not consider
4970 TREE_VISITED and do not generate a forward declaration. Only dump
4971 original nested types for nested declaration.
4972 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4973 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4974 <RECORD_TYPE>: Do not consider TREE_VISITED.
4975 (dump_ada_declaration): Use booleans and fix formatting throughout.
4976 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4977 Call dump_forward_type instead of dump_nested_types for a typedef.
4978 Remove superfluous check and adjust call to dump_nested_types.
4979 <POINTER_TYPE>: Call dump_forward_type and fall through.
4980 (dump_ada_struct_decl): Rename into...
4981 (dump_ada_structure): ...this. Do not special-case empty structures.
4983 2018-02-27 Martin Sebor <msebor@redhat.com>
4986 * c.opt (-Wmissing-attributes): New option.
4988 2018-02-21 Martin Liska <mliska@suse.cz>
4990 * c.opt (Wcatch-value=): Add IntegerRange.
4992 2018-02-15 Jason Merrill <jason@redhat.com>
4994 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4996 2018-02-09 Nathan Sidwell <nathan@acm.org>
4999 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
5001 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
5004 2018-02-09 Martin Sebor <msebor@redhat.com>
5007 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
5008 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
5009 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
5010 (-Wstrict-overflow, -Wsuggest-attribute): Same.
5011 (-Wuninitialized): Same.
5013 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
5015 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
5016 keyword for components.
5018 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
5020 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
5022 2018-02-02 Julia Koval <julia.koval@intel.com>
5024 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
5026 2018-01-29 Marek Polacek <polacek@redhat.com>
5029 * c-format.c (check_function_format): Check current_function_decl.
5031 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5033 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
5035 (LAZY_HEX_FP_VALUES_CNT): Define.
5036 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
5037 values rather than just 12.
5038 (builtin_define_with_hex_fp_value): Likewise.
5040 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
5043 * c.opt (-fmacro-prefix-map): New option.
5044 * c-opts.c (c_common_handle_option): Handle it.
5045 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
5046 * c-ppoutput.c (init_pp_output): Likewise.
5048 2018-01-17 David Malcolm <dmalcolm@redhat.com>
5051 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
5053 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
5055 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
5056 Skip 'f' and 'F' characters if it is true.
5057 (store_ada_macro): Minor tweak.
5058 (dump_ada_macros) <CPP_COMMENT>: Likewise.
5059 <CPP_WSTRING>: Likewise.
5060 <CPP_STRING>: Output '&' in the buffer if not the first string.
5061 <CPP_NUMBER>: Adjust calls to dump_number.
5063 2018-01-10 David Malcolm <dmalcolm@redhat.com>
5066 * c-common.c: Include "selftest.h".
5067 (get_atomic_generic_size): Perform the test for integral type
5068 before the range test for any integer constant, fixing indentation
5069 of braces. Call fold_for_warn before testing for an INTEGER_CST.
5070 (reject_gcc_builtin): Strip any location wrapper from EXPR.
5071 (selftest::test_fold_for_warn): New function.
5072 (selftest::c_common_c_tests): New function.
5073 (selftest::c_family_tests): Call it, and
5074 selftest::c_pretty_print_c_tests.
5075 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
5076 * c-format.c (check_format_arg): Convert VAR_P check to a
5078 * c-pretty-print.c: Include "selftest.h".
5079 (pp_c_cast_expression): Don't print casts for location wrappers.
5080 (selftest::assert_c_pretty_printer_output): New function.
5081 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
5082 (selftest::test_location_wrappers): New function.
5083 (selftest::c_pretty_print_c_tests): New function.
5084 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
5086 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5087 Alan Hayward <alan.hayward@arm.com>
5088 David Sherwood <david.sherwood@arm.com>
5090 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
5092 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5093 Alan Hayward <alan.hayward@arm.com>
5094 David Sherwood <david.sherwood@arm.com>
5096 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
5099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5100 Alan Hayward <alan.hayward@arm.com>
5101 David Sherwood <david.sherwood@arm.com>
5103 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
5104 (convert_vector_to_array_for_subscript): Handle polynomial
5105 TYPE_VECTOR_SUBPARTS.
5106 (c_common_type_for_mode): Check valid_vector_subparts_p.
5107 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
5110 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5112 Update copyright years.
5114 2017-12-22 Mike Stump <mikestump@comcast.net>
5115 Eric Botcazou <ebotcazou@adacore.com>
5117 * c-pragma.c (init_pragma): Register pragma GCC unroll.
5118 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
5120 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
5124 * c-semantics.c (only_debug_stmts_after_p): New.
5125 (pop_stmt_list): Clear side effects in debug-only stmt list.
5126 Check for single nondebug stmt followed by debug stmts only.
5128 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
5131 * c-semantics.c (pop_stmt_list): Propagate side effects from
5132 single nondebug stmt to container list.
5134 2017-12-19 Jakub Jelinek <jakub@redhat.com>
5136 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
5137 conditions with typical order conditions.
5139 2017-12-18 Marek Polacek <polacek@redhat.com>
5141 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
5144 2017-12-17 Martin Sebor <msebor@redhat.com>
5146 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
5147 an error for attribute warn_if_not_aligned.
5149 2017-12-16 Martin Sebor <msebor@redhat.com>
5151 PR tree-optimization/78918
5152 * c-common.c (check_function_restrict): Avoid checking built-ins.
5153 * c.opt (-Wrestrict): Include in -Wall.
5155 2017-12-15 Jakub Jelinek <jakub@redhat.com>
5157 * c-attribs.c (c_common_attribute_table,
5158 c_common_format_attribute_table): Swap affects_type_identity
5159 and handler fields, adjust comments.
5161 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5163 * c.opt (Wcast-function-type): New warning option.
5164 * c-lex.c (get_fileinfo): Avoid warning.
5165 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
5167 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
5170 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
5171 Adjust the size of buf1 and buf2, add a new buf to avoid
5172 format-overflow warning.
5174 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
5176 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
5177 subsequent statement list.
5179 2017-12-07 Martin Sebor <msebor@redhat.com>
5183 * c-attribs.c (attr_aligned_exclusions): New array.
5184 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
5185 (attr_common_exclusions, attr_const_pure_exclusions): Same.
5186 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
5187 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
5188 (attr_warn_unused_result_exclusions): Same.
5189 (handle_hot_attribute, handle_cold_attribute): Simplify.
5190 (handle_const_attribute): Warn on function returning void.
5191 (handle_pure_attribute): Same.
5192 (handle_aligned_attribute): Diagnose conflicting attribute
5194 * c-warn.c (diagnose_mismatched_attributes): Simplify.
5196 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5199 * c-common.c (selftest::c_family_tests): Call
5200 selftest::c_spellcheck_cc_tests.
5201 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
5202 * c-spellcheck.cc: Include "selftest.h".
5203 (name_reserved_for_implementation_p): New function.
5204 (should_suggest_as_macro_p): New function.
5205 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
5206 should_suggest_as_macro_p and call it.
5207 (selftest::test_name_reserved_for_implementation_p): New function.
5208 (selftest::c_spellcheck_cc_tests): New function.
5209 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5211 2017-12-06 David Malcolm <dmalcolm@redhat.com>
5213 * c-spellcheck.cc: New file, taken from macro-handling code in
5215 * c-spellcheck.h: New file, taken from macro-handling code in
5218 2017-12-01 Jakub Jelinek <jakub@redhat.com>
5220 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5222 (handle_simd_attribute): Don't check for "cilk simd function"
5223 attribute. Reindent, formatting changes.
5225 2017-11-30 Julia Koval <julia.koval@intel.com>
5227 * c-common.h (inv_list): Remove.
5229 2017-11-28 Jakub Jelinek <jakub@redhat.com>
5232 * c-common.c (c_switch_covers_all_cases_p_1,
5233 c_switch_covers_all_cases_p): New functions.
5234 * c-common.h (c_switch_covers_all_cases_p): Declare.
5236 2017-11-28 Julia Koval <julia.koval@intel.com>
5237 Sebastian Peryt <sebastian.peryt@intel.com>
5239 * array-notation-common.c: Delete.
5240 * c-cilkplus.c: Ditto.
5241 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5242 * c-common.def (ARRAY_NOTATION_REF): Remove.
5243 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5244 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5245 c_validate_cilk_plus_loop, cilkplus_an_parts,
5246 cilk_ignorable_spawn_rhs_op,
5247 cilk_recognize_spawn): Remove.
5248 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5249 * c-omp.c: Remove CILK_SIMD check.
5250 * c-pragma.c: Ditto.
5251 * c-pragma.h: Remove CILK related pragmas.
5252 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5253 ARRAY_NOTATION_REF condition.
5254 (c_pretty_printer::expression): Ditto.
5255 * c.opt (fcilkplus): Remove.
5258 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
5260 * c-pretty-print.c (pp_c_additive_expression,
5261 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5263 2017-11-21 Jakub Jelinek <jakub@redhat.com>
5265 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5268 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5269 instead of tree_to_uhwi, formatting fix.
5271 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5274 * known-headers.cc: New file, based on material from c/c-decl.c.
5275 (suggest_missing_header): Copied as-is.
5276 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5277 heavily edited to add C++ support. Add some knowledge about
5278 <limits.h>, <stdint.h>, and <wchar.h>.
5279 * known-headers.h: Likewise.
5281 2017-11-20 David Malcolm <dmalcolm@redhat.com>
5283 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5284 (lookup_name_fuzzy): Likewise. Convert return type from
5285 const char * to name_hint. Add location_t param.
5286 * name-hint.h: New header.
5288 2017-11-19 Jakub Jelinek <jakub@redhat.com>
5292 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5294 2017-11-16 Joseph Myers <joseph@codesourcery.com>
5296 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5297 expected publication date of C17.
5298 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5300 2017-11-15 Joseph Myers <joseph@codesourcery.com>
5303 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5304 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5306 2017-11-10 Martin Sebor <msebor@redhat.com>
5309 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5310 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5311 * c.opt (-Wstringop-truncation): New option.
5313 2017-11-06 Martin Liska <mliska@suse.cz>
5316 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5318 * c.opt: Set default value of warn_return_type.
5320 2017-10-31 David Malcolm <dmalcolm@redhat.com>
5322 * c-common.c (binary_op_error): Update for renaming of
5324 (c_parse_error): Likewise.
5325 * c-warn.c (warn_logical_not_parentheses): Likewise for
5326 renaming of inform_at_rich_loc.
5327 (warn_for_restrict): Likewise for renaming of
5328 warning_at_rich_loc_n.
5330 2017-10-30 Joseph Myers <joseph@codesourcery.com>
5332 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5333 * c-opts.c (set_std_c17): New function.
5334 (c_common_init_options): Use gnu17 as default C version.
5335 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5337 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5339 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5340 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5341 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5344 2017-10-23 Marek Polacek <polacek@redhat.com>
5347 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5349 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5351 * c-common.c (check_builtin_function_arguments): Also check arguments
5352 of __builtin_alloca_with_align_and_max.
5354 2017-10-17 David Malcolm <dmalcolm@redhat.com>
5356 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5357 rather than NULL to format_warning_va.
5358 (check_format_types): Likewise when calling format_type_warning.
5359 Remove code to extract source_ranges and source_range * in favor
5360 of just a location_t.
5361 (format_type_warning): Convert source_range * param to a
5364 2017-10-13 Jakub Jelinek <jakub@redhat.com>
5366 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5369 2017-10-12 David Malcolm <dmalcolm@redhat.com>
5371 * c-common.c (enum missing_token_insertion_kind): New enum.
5372 (get_missing_token_insertion_kind): New function.
5373 (maybe_suggest_missing_token_insertion): New function.
5374 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5376 2017-10-11 Nathan Sidwell <nathan@acm.org>
5378 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5379 (c_common_handle_option): Update incpath_kind names.
5381 2017-10-11 Martin Liska <mliska@suse.cz>
5384 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5385 Wattributes warning.
5387 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5389 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5390 operating on trees as wide_ints.
5391 * c-common.c (pointer_int_sum): Likewise.
5392 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5393 * c-warn.c (match_case_to_enum_1): Likewise.
5394 (c_do_switch_warnings): Likewise.
5395 (maybe_warn_shift_overflow): Likewise.
5397 2017-10-10 Jakub Jelinek <jakub@redhat.com>
5400 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5401 instead of wide_int::from.
5403 2017-10-06 Jakub Jelinek <jakub@redhat.com>
5406 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5407 using to_widest use wide_int with the larger of the two precisions.
5409 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5411 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5414 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5416 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5417 when combining the original unconverted comparison operands.
5419 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5421 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5424 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5426 * c-ada-spec.c (to_ada_name): Add index parameter.
5427 (pp_ada_tree_identifier): Likewise.
5428 (dump_ada_macros): Adjust call to to_ada_name.
5429 (struct overloaded_name_hash): New type.
5430 (struct overloaded_name_hasher): Likewise.
5431 (overloaded_names): New hash table.
5432 (compute_overloading_index): New function.
5433 (dump_ada_decl_name): Call it and pass the result to
5434 pp_ada_tree_identifier.
5435 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5436 (dump_ada_function_declaration): Likewise.
5437 (dump_generic_ada_node): Likewise.
5438 (print_constructor): Likewise.
5439 (print_destructor): Likewise.
5440 (dump_ada_specs): Delete overloaded_names table.
5442 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5444 * c-ada-spec.c (max_ada_macros): Move around.
5445 (store_ada_macro_index): Likewise.
5446 (source_file): Rename into...
5447 (macro_source_file): ...this.
5448 (count_ada_macro): Move around.
5449 (store_ada_macro): Likewise.
5450 (compare_macro): Likewise.
5451 (print_ada_macros): Merge in...
5452 (dump_ada_macros): ...this.
5453 (source_file_base): Rename into...
5454 (current_source_file): ...this.
5455 (print_comment): Move around.
5456 (dump_ada_nodes): Call dump_ada_declaration directly.
5457 (struct with): Change type of limited field to bool.
5458 (append_withs): Change type of limited_access parameter to bool.
5459 (pp_ada_tree_identifie): Likewise.
5460 (dump_ada_decl_nam): Likewise.
5461 (dump_generic_ada_node): Likewise. Do not print the return type.
5462 (to_ada_name): Change type of space_found parameter to bool.
5463 (dump_ada_function_declaration): Return void and change type of
5464 parameters to bool. Also print the return type for a function.
5465 (print_ada_methods): Rename into...
5466 (dump_ada_methods): ...this.
5467 (print_ada_declaration): Rename into ...
5468 (dump_ada_declaration): ...this. Do not print the return type.
5469 (print_ada_struct_decl): Rename into...
5470 (dump_ada_struct_decl): ...this.
5472 2017-09-29 Jakub Jelinek <jakub@redhat.com>
5474 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5475 rather than DECL_INITIAL.
5476 (common_handle_aligned_attribute): Likewise.
5478 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
5480 * c.opt (gen-decls): Add RejectNegative.
5482 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5483 Jakub Jelinek <jakub@redhat.com>
5485 Add support for -std=c++2a.
5486 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5487 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5488 * c-opts.c (set_std_cxx2a): New.
5489 (c_common_handle_option): Set options when -std=c++2a is enabled.
5490 (c_common_post_options): Adjust comments.
5491 (set_std_cxx14, set_std_cxx17): Likewise.
5493 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5495 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5496 message for non-uniform endianness and issue a warning in C++.
5498 2017-09-15 Jakub Jelinek <jakub@redhat.com>
5500 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5501 (Wc++17-compat): Change from undocumented alias to option.
5502 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5503 change C++1z to C++17 in description.
5504 (std=c++1z, std=gnu++1z): Change from option to undocumented
5506 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5508 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5509 * c-opts.c (set_std_cxx1z): Rename to ...
5510 (set_std_cxx17): ... this.
5511 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5512 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
5514 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5517 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5519 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5520 function alignment if warn_if_not_aligned_p is true.
5522 2017-09-12 Nathan Sidwell <nathan@acm.org>
5524 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5525 resort_sorted_fields): Move to c/c-decl.c.
5526 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5527 (struct sorted_fields_type): Move to c/c-lang.h.
5529 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
5532 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5534 2017-09-04 Marek Polacek <polacek@redhat.com>
5537 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5538 (warn_tautological_cmp): Call it.
5540 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
5542 * c-opts.c (c_common_finish): Write dependency information even if
5545 2017-09-01 Jakub Jelinek <jakub@redhat.com>
5548 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5549 (omp_pragmas_simd): ... here.
5550 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5551 create new clauses list containing just simd clause.
5553 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5554 Alan Hayward <alan.hayward@arm.com>
5555 David Sherwood <david.sherwood@arm.com>
5557 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5558 into scalar_mode_supported_p call.
5559 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5561 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5562 Alan Hayward <alan.hayward@arm.com>
5563 David Sherwood <david.sherwood@arm.com>
5565 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5566 for the mode iterator.
5568 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5569 Alan Hayward <alan.hayward@arm.com>
5570 David Sherwood <david.sherwood@arm.com>
5572 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5573 * c-common.c (c_build_vec_perm_expr): Likewise.
5575 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5576 Alan Hayward <alan.hayward@arm.com>
5577 David Sherwood <david.sherwood@arm.com>
5579 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5581 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5582 Alan Hayward <alan.hayward@arm.com>
5583 David Sherwood <david.sherwood@arm.com>
5585 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5586 before calling targetm.addr_space.valid_pointer_mode.
5588 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5589 Alan Hayward <alan.hayward@arm.com>
5590 David Sherwood <david.sherwood@arm.com>
5592 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5594 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5595 Alan Hayward <alan.hayward@arm.com>
5596 David Sherwood <david.sherwood@arm.com>
5598 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5600 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5602 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5603 Alan Hayward <alan.hayward@arm.com>
5604 David Sherwood <david.sherwood@arm.com>
5606 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5609 2017-08-29 Martin Liska <mliska@suse.cz>
5612 * c-common.c (parse_optimize_options): Add argument to function
5614 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5616 2017-08-24 David Malcolm <dmalcolm@redhat.com>
5618 * c-lex.c (interpret_float): Use token location
5619 when building an EXCESS_PRECISION_EXPR.
5621 2017-08-21 David Malcolm <dmalcolm@redhat.com>
5623 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5624 it to check_function_format.
5625 * c-common.h (check_function_arguments): Add vec<location_t> *
5627 (check_function_format): Likewise.
5628 * c-format.c (struct format_check_context): Add field "arglocs".
5629 (check_function_format): Add param "arglocs"; pass it to
5631 (check_format_info): Add param "arglocs"; use it to initialize
5632 new field of format_ctx.
5633 (check_format_arg): Pass format_ctx->arglocs to new param of
5634 check_format_info_main.
5635 (class argument_parser): New field "arglocs".
5636 (argument_parser::argument_parser): Add "arglocs_" param and use
5637 it to initialize new field.
5638 (argument_parser::check_argument_type): Pass new arglocs field to
5640 (check_format_info_main): Add param "arglocs", and use it when
5641 constructing arg_parser.
5642 (check_format_types): Add param "arglocs"; use it if non-NULL when
5643 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5645 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5648 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5649 (c_common_attribute_table): Add warn_if_not_aligned.
5650 (handle_aligned_attribute): Renamed to ...
5651 (common_handle_aligned_attribute): Remove argument, name, and add
5652 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5653 (handle_aligned_attribute): New.
5654 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5656 2017-08-14 Martin Sebor <msebor@redhat.com>
5659 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5660 (handle_nonstring_attribute): New function.
5662 2017-08-14 Martin Sebor <msebor@redhat.com>
5665 * c-format.h (T89_G): New macro.
5666 * c-format.c (local_gcall_ptr_node): New variable.
5667 (init_dynamic_diag_info): Initialize it.
5669 2017-08-11 Martin Liska <mliska@suse.cz>
5671 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5672 TARGET_SUPPORTS_ALIASES.
5674 2017-08-10 David Malcolm <dmalcolm@redhat.com>
5676 * c-common.c (c_parse_error): Add rich_location * param, using it
5677 rather implicitly using input_location.
5678 * c-common.h (c_parse_error): Add rich_location * param.
5680 2017-08-09 Marek Polacek <polacek@redhat.com>
5682 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5683 (c_common_truthvalue_conversion): Likewise.
5684 * c-omp.c (c_finish_omp_atomic): Likewise.
5685 * c-common.h (build_binary_op): Update declaration.
5687 2017-08-08 Martin Liska <mliska@suse.cz>
5689 * c-ada-spec.c: Include header files.
5690 * c-ubsan.c: Likewise.
5691 * c-warn.c: Likewise.
5693 2017-08-07 Jakub Jelinek <jakub@redhat.com>
5696 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5698 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5700 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5701 (print_ada_methods): Likewise.
5702 (print_ada_declaration): Likewise.
5704 2017-08-07 Martin Liska <mliska@suse.cz>
5706 * array-notation-common.c: Add new includes.
5707 * c-format.c( handle_format_attribute): Canonicalize a format
5709 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5711 * c-pretty-print.c: Add new include.
5713 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5715 * c-ada-spec.c (has_static_fields): Look only into variables.
5716 (print_constructor): Add TYPE parameter and use it for the name.
5717 (print_destructor): Likewise.
5718 (print_ada_declaration): Adjust to new constructor/destructor names.
5719 Adjust calls to print_constructor and print_destructor.
5720 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5721 Look only into variables in the final loop.
5723 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5725 * c-ada-spec.c (has_static_fields): Look only into fields.
5726 (dump_generic_ada_node): Small tweak.
5727 (dump_nested_types): Look only into fields.
5728 (print_ada_declaration): Look only into methods. Small tweak.
5729 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5731 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5733 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5734 (dump_ada_function_declaration): Likewise.
5735 (dump_generic_ada_node): Likewise.
5736 (print_ada_declaration): Add support for const-qualified variables.
5738 2017-07-31 Martin Liska <mliska@suse.cz>
5741 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5742 Guard condition with flag_sanitize_p also with current_function_decl
5744 (ubsan_maybe_instrument_reference_or_call): Likewise.
5746 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
5748 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5750 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5752 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5754 (print_ada_declaration): Add missing guard for record types.
5756 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5759 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5760 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5761 new COMPOUND_EXPRs around the rhs of the comparison.
5763 2017-07-27 Marek Polacek <polacek@redhat.com>
5766 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5769 2017-07-27 Jakub Jelinek <jakub@redhat.com>
5771 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5772 (handle_noipa_attribute): New function.
5774 2017-07-07 Torsten Duwe <duwe@suse.de>
5776 * c-attribs.c (c_common_attribute_table): Add entry for
5777 "patchable_function_entry".
5779 2017-07-20 Nathan Sidwell <nathan@acm.org>
5781 Remove TYPE_METHODS.
5782 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5783 dump_ada_template, print_ada_methods,
5784 print_ada_declaration): Member fns are on TYPE_FIELDS.
5786 2017-07-18 Nathan Sidwell <nathan@acm.org>
5788 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5790 2017-07-14 David Malcolm <dmalcolm@redhat.com>
5792 * c-common.c (try_to_locate_new_include_insertion_point): New
5794 (per_file_includes_t): New typedef.
5795 (added_includes_t): New typedef.
5796 (added_includes): New variable.
5797 (maybe_add_include_fixit): New function.
5798 * c-common.h (maybe_add_include_fixit): New decl.
5800 2017-07-10 Martin Sebor <msebor@redhat.com>
5803 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5805 2017-07-06 David Malcolm <dmalcolm@redhat.com>
5807 * c-common.c (selftest::c_family_tests): New.
5808 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5809 (selftest::c_family_tests): New decl.
5811 2017-07-04 Marek Polacek <polacek@redhat.com>
5814 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5817 2017-07-04 Marek Polacek <polacek@redhat.com>
5819 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5821 2017-06-28 Martin Liska <mliska@suse.cz>
5824 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5825 to a function declaration.
5827 2017-06-28 Martin Liska <mliska@suse.cz>
5830 * c.opt: Add IntegerRange to various options.
5832 2017-06-26 Marek Polacek <polacek@redhat.com>
5835 * c-common.h (warn_for_multistatement_macros): Declare.
5836 * c-warn.c: Include "c-family/c-indentation.h".
5837 (warn_for_multistatement_macros): New function.
5838 * c.opt (Wmultistatement-macros): New option.
5839 * c-indentation.c (guard_tinfo_to_string): No longer static.
5840 Change the parameter type to "enum rid". Handle RID_SWITCH.
5841 * c-indentation.h (guard_tinfo_to_string): Declare.
5843 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
5845 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5847 2017-06-15 Martin Sebor <msebor@redhat.com>
5850 * c.opt (-Wclass-memaccess): New option.
5852 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5854 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5856 2017-06-13 Marek Polacek <polacek@redhat.com>
5859 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5862 2017-06-13 Martin Liska <mliska@suse.cz>
5865 * c-attribs.c (add_no_sanitize_value): New function.
5866 (handle_no_sanitize_attribute): Likewise.
5867 (handle_no_sanitize_address_attribute): Use the function.
5868 (handle_no_sanitize_thread_attribute): New function.
5869 (handle_no_address_safety_analysis_attribute): Use
5870 add_no_sanitize_value.
5871 (handle_no_sanitize_undefined_attribute): Likewise.
5872 * c-common.h: Declare new functions.
5873 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5874 (ubsan_instrument_shift): Likewise.
5875 (ubsan_instrument_bounds): Likewise.
5876 (ubsan_maybe_instrument_array_ref): Likewise.
5877 (ubsan_maybe_instrument_reference_or_call): Likewise.
5879 2017-06-11 Jason Merrill <jason@redhat.com>
5881 * c-ada-spec.c, c-pragma.c: Use id_equal.
5883 2017-06-04 Marek Polacek <polacek@redhat.com>
5886 * c-format.c (matching_type_p): Return false if any of the types
5887 requires structural equality.
5889 2017-06-02 Martin Sebor <msebor@redhat.com>
5892 * c-warn.c (conversion_warning): Use -Wconversion for integer
5893 conversion and -Wfloat-conversion for floating one.
5895 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5897 * c.opt (Wsizeof-pointer-div): New warning option.
5899 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5901 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5902 (Wcatch-value=1): Enable by -Wall.
5904 2017-05-30 David Malcolm <dmalcolm@redhat.com>
5906 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5908 * c.opt (fdiagnostics-show-template-tree): New option.
5909 (felide-type): New option.
5911 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5913 * c.opt (Wcatch-value=): New C++ warning flag.
5915 2017-05-24 Nathan Sidwell <nathan@acm.org>
5917 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5918 const casts to avoid warning.
5920 2017-05-24 Martin Sebor <msebor@redhat.com>
5923 * c-common.h (unsafe_conversion_p): Add a function argument.
5924 * c-common.c (unsafe_conversion_p): Same.
5925 Add type names and values to diagnostics.
5926 (scalar_to_vector): Adjust.
5927 * c-warn.c (constant_expression_error): Add a function argument.
5928 Add type names and values to diagnostics.
5929 (conversion_warning): Add a function argument.
5930 Add type names and values to diagnostics.
5931 (warnings_for_convert_and_check): Same.
5933 2017-05-19 Jason Merrill <jason@redhat.com>
5935 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5938 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5940 * c-format.c (locus): Move out of function scope,
5943 2017-05-19 Nathan Sidwell <nathan@acm.org>
5945 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5946 (c_common_parse_file): Remove class dump handling.
5947 (get_dump_info): Likewise.
5949 2017-05-19 Richard Biener <rguenther@suse.de>
5952 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5953 to alias-set zero memory.
5955 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5957 * c-format.c (local_tree_type_node): Add GTY attribute.
5959 2017-05-18 Marek Polacek <polacek@redhat.com>
5961 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5962 (c_common_fixed_point_type_for_size): Likewise.
5963 (c_common_type_for_mode): Likewise.
5964 (shorten_compare): Likewise.
5965 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5966 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5968 2017-05-18 Marek Polacek <polacek@redhat.com>
5970 * c-common.c (self_promoting_args_p): Change the return type to bool.
5971 Use false/true instead of 0/1.
5972 * c-common.h (self_promoting_args_p): Update.
5974 2017-05-17 Marek Polacek <polacek@redhat.com>
5976 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5977 * c-warn.c: Likewise.
5979 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5981 Implement new C++ intrinsics __is_assignable and __is_constructible.
5982 * c-common.c (__is_assignable, __is_constructible): New.
5983 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5985 2017-05-17 Martin Liska <mliska@suse.cz>
5987 * c-common.h: Introduce dump_flags_t type and
5988 use it instead of int type.
5989 * c-gimplify.c (c_genericize): Likewise.
5990 * c-opts.c: Likewise.
5992 2017-05-17 Marek Polacek <polacek@redhat.com>
5994 * c-common.c (c_save_expr): Remove.
5995 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5996 * c-common.h (c_save_expr): Remove declaration.
5998 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
6001 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
6002 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
6003 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
6004 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
6006 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
6008 2017-05-09 Marek Polacek <polacek@redhat.com>
6011 * c-warn.c (unwrap_c_maybe_const): New.
6012 (warn_logical_operator): Call it.
6014 2017-05-09 Nathan Sidwell <nathan@acm.org>
6016 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
6017 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
6019 2017-05-08 Martin Sebor <msebor@redhat.com>
6021 PR translation/80280
6022 * c-format.h (struct format_flag_spec): Add new member.
6024 * c-format.c (local_tree_type_node): New global.
6025 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
6026 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
6027 (strfmon_flag_specs): Likewise.
6028 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
6029 with distinct quoting properties.
6030 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
6031 (flag_chars_t::validate): Add argument and handle bad quoting.
6032 (check_format_info_main): Handle quoting problems.
6033 (init_dynamic_diag_info): Simplify.
6035 2017-05-08 Jason Merrill <jason@redhat.com>
6037 * c-opts.c (c_common_post_options): Update defaults for
6038 flag_abi_version and flag_abi_compat_version.
6040 2017-05-05 David Malcolm <dmalcolm@redhat.com>
6042 * c-common.c (c_cpp_error): Replace report_diagnostic
6043 with diagnostic_report_diagnostic.
6045 2017-05-04 Martin Sebor <msebor@redhat.com>
6047 PR translation/80280
6048 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
6049 (handle_weakref_attribute): Same.
6051 2017-05-03 Nathan Sidwell <nathan@acm.org>
6053 Canonicalize canonical type hashing
6054 * c-common.c (complete_array_type): Use type_hash_canon.
6056 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
6059 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
6061 (cilk_install_body_pedigree_operations): Likewise.
6062 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
6064 (cilk_gimplify_call_params_in_spawned_fn): Remove.
6065 (cilk_install_body_pedigree_operations): Likewise.
6066 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
6069 2017-04-27 Jakub Jelinek <jakub@redhat.com>
6072 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
6073 flag on non-aggregate element types.
6075 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
6077 * c-common.c (c_type_hasher, type_hash_table): Remove.
6078 (c_common_get_alias_set): Remove unreachable code.
6079 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
6081 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
6083 * c.opt (Wextra-semi): New C++ warning flag.
6085 2017-04-20 Jakub Jelinek <jakub@redhat.com>
6088 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
6090 2017-04-18 Jakub Jelinek <jakub@redhat.com>
6094 * c-common.c (c_common_type_for_mode): Don't handle
6095 widest_*_literal_type_node here.
6096 c_common_signed_or_unsigned_type): Likewise.
6097 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
6098 to *intTI_type_node or *intDI_type_node depending on whether
6099 TImode is supported by the target or not.
6101 2017-04-10 Martin Liska <mliska@suse.cz>
6104 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
6105 doing an UBSAN check.
6107 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
6109 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
6111 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6114 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
6116 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
6117 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
6120 2017-03-31 David Malcolm <dmalcolm@redhat.com>
6122 PR documentation/78732
6123 * c.opt (Wendif-labels): Fix description to refer to
6124 #else rather than #elif.
6126 2017-03-31 Jakub Jelinek <jakub@redhat.com>
6129 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
6130 * c-common.c (c_common_reswords): Add __is_aggregate trait.
6132 2017-03-27 Jakub Jelinek <jakub@redhat.com>
6135 * c-common.c (c_common_mark_addressable_vec): Don't set
6136 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
6138 2017-03-21 Martin Sebor <msebor@redhat.com>
6141 * c-common.c (set_underlying_type): Mark type used only when
6142 original del is declared unused.
6144 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6146 PR translation/79848
6147 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
6150 2017-03-10 David Malcolm <dmalcolm@redhat.com>
6153 * c-indentation.c (warn_for_misleading_indentation): Remove parens
6154 from inform's message, so that xgettext can locate it.
6156 2017-03-09 Marek Polacek <polacek@redhat.com>
6160 * c-attribs.c (handle_nonnull_attribute): Save the result of default
6161 conversion to the attribute list.
6163 2017-03-09 Martin Liska <mliska@suse.cz>
6165 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
6167 2017-03-03 Jason Merrill <jason@redhat.com>
6169 * c.opt (Wnoexcept-type): New.
6171 2017-03-02 Richard Biener <rguenther@suse.de>
6174 * c-common.c (c_common_mark_addressable_vec): Look through
6177 2017-02-28 Martin Liska <mliska@suse.cz>
6179 * c.opt: Replace space with tabular for options of <number>
6182 2017-02-28 Martin Liska <mliska@suse.cz>
6184 * c.opt: Fix --help=option -Q for options which are of
6187 2017-02-24 Jakub Jelinek <jakub@redhat.com>
6190 * c-common.c (check_function_restrict): New function.
6191 (check_function_arguments): Add FNDECL argument. Call
6192 check_function_restrict if -Wrestrict.
6193 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
6194 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
6195 * c-common.h (check_function_arguments): Add FNDECL argument.
6196 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
6198 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
6200 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
6201 treatment of parameters with pointer-to-tagged type and tidy up.
6202 (print_ada_methods): Remove the special treatment of C++ static member
6205 2017-02-22 Martin Liska <mliska@suse.cz>
6207 * c.opt: Replace inequality signs with square brackets
6210 2017-02-21 Jakub Jelinek <jakub@redhat.com>
6213 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6216 2017-02-17 Joseph Myers <joseph@codesourcery.com>
6218 * c-cppbuiltin.c (builtin_define_float_constants): Define
6219 __DECIMAL_DIG__ to the value for long double.
6221 2017-02-15 Marek Polacek <polacek@redhat.com>
6224 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6225 conversion has occured.
6227 2017-01-24 David Malcolm <dmalcolm@redhat.com>
6229 * c-common.c (c_common_reswords): Add "__RTL".
6230 * c-common.h (enum rid): Add RID_RTL.
6232 2017-01-20 Marek Polacek <polacek@redhat.com>
6235 * c-common.h (do_warn_duplicated_branches_r): Declare.
6236 * c-gimplify.c (c_genericize): Walk the function tree calling
6237 do_warn_duplicated_branches_r.
6238 * c-warn.c (expr_from_macro_expansion_r): New.
6239 (do_warn_duplicated_branches): New.
6240 (do_warn_duplicated_branches_r): New.
6241 * c.opt (Wduplicated-branches): New option.
6243 2017-01-17 David Malcolm <dmalcolm@redhat.com>
6246 * c-indentation.c (warn_for_misleading_indentation): Use the past
6247 subjunctive in the note.
6249 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
6252 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6253 start type to integer_type.
6255 2017-01-16 Jakub Jelinek <jakub@redhat.com>
6258 * c.opt (gen-decls): Add Driver flag.
6260 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6263 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6266 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6268 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6271 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6273 2017-01-12 Martin Sebor <msebor@redhat.com>
6275 (-Wformat-overflow): ...to this.
6277 2017-01-11 Martin Sebor <msebor@redhat.com>
6280 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6281 Also enable for LTO.
6283 2017-01-10 Jason Merrill <jason@redhat.com>
6285 Implement P0195R2, C++17 variadic using.
6286 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6288 2017-01-09 Jakub Jelinek <jakub@redhat.com>
6290 PR translation/79019
6291 PR translation/79020
6292 * c.opt (Wnormalized=): Fix typo in description.
6294 2017-01-08 Martin Sebor <msebor@redhat.com>
6297 * c.opt (-Wformat-truncation): New option.
6299 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
6301 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6302 value to unsigned short to fit in 4 hex digits without
6305 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6307 * c.opt (fsso-struct): Add 'native' value.
6309 2017-01-05 Martin Liska <mliska@suse.cz>
6312 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6315 2017-01-04 Marek Polacek <polacek@redhat.com>
6318 * c.opt (Wpointer-compare): New option.
6320 2017-01-04 Jakub Jelinek <jakub@redhat.com>
6323 * c.opt (fsso-struct=): Add RejectNegative.
6325 2017-01-01 Jakub Jelinek <jakub@redhat.com>
6327 Update copyright years.
6329 2016-12-29 Martin Liska <mliska@suse.cz>
6332 * c.opt (strong-eval-order): Add RejectNegative keyword.
6334 2016-12-22 Jason Merrill <jason@redhat.com>
6336 Implement P0522R0, matching of template template arguments.
6337 * c-cppbuiltin.c (c_cpp_builtins): Define
6338 __cpp_template_template_args.
6340 2016-12-21 Jakub Jelinek <jakub@redhat.com>
6343 * c-common.c (struct nonnull_arg_ctx): New type.
6344 (check_function_nonnull): Return bool instead of void. Use
6345 nonnull_arg_ctx as context rather than just location_t.
6346 (check_nonnull_arg): Adjust for the new context type, set
6347 warned_p to true if a warning has been diagnosed.
6348 (check_function_arguments): Return bool instead of void.
6349 * c-common.h (check_function_arguments): Adjust prototype.
6351 2016-12-21 Jason Merrill <jason@redhat.com>
6353 * c.opt (-fnew-ttp-matching): New flag.
6354 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6356 2016-12-14 Martin Jambor <mjambor@suse.cz>
6358 * c-omp.c: Include omp-general.h instead of omp-low.h.
6359 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6362 2016-12-14 Martin Sebor <msebor@redhat.com>
6365 * c-common.c (check_nonnull_arg): Disable when optimization
6368 2016-12-12 Marek Polacek <polacek@redhat.com>
6371 * c-common.c (attribute_fallthrough_p): Return false for
6374 2016-12-08 Martin Sebor <msebor@redhat.com>
6377 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6379 2016-12-08 Martin Sebor <msebor@redhat.com>
6382 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6385 2016-12-07 Martin Sebor <msebor@redhat.com>
6391 * c.opt (-Wstringop-overflow): New option.
6393 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6395 * c-attribs.c (asan odr indicator): New attribute.
6396 (handle_asan_odr_indicator_attribute): New function.
6398 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6400 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6403 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6405 * c-common.c (excess_precision_mode_join): New.
6406 (c_ts18661_flt_eval_method): New.
6407 (c_c11_flt_eval_method): Likewise.
6408 (c_flt_eval_method): Likewise.
6409 * c-common.h (excess_precision_mode_join): New.
6410 (c_flt_eval_method): Likewise.
6411 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6412 (cpp_iec_559_value): Call it.
6413 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6414 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6415 __FLT_EVAL_METHOD_TS_18661_3__.
6417 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6419 * c-opts.c (c_common_post_options): Add logic to handle the default
6420 case for -fpermitted-flt-eval-methods.
6422 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
6424 * c.opt (Wexpansion-to-defined): New.
6426 2016-11-23 Jakub Jelinek <jakub@redhat.com>
6429 * c-pragma.c (handle_pragma_target): Don't replace
6430 current_target_pragma, but chainon the new args to the current one.
6432 2016-11-22 Nathan Sidwell <nathan@acm.org>
6434 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
6435 indentation and formatting.
6437 2016-11-21 Martin Sebor <msebor@redhat.com>
6439 * c.opt (-fprintf-return-value): Enable by default.
6441 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6444 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6445 * c-common.c (c_common_nodes_and_builtins): Initialize
6446 const_tm_ptr_type_node.
6448 2016-11-16 Marek Polacek <polacek@redhat.com>
6451 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6453 2016-11-14 Jakub Jelinek <jakub@redhat.com>
6455 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6457 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
6458 Richard Biener <rguenther@suse.de>
6460 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6461 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6462 * c.opt (fgimple): New option.
6464 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6467 * c-common.h (warn_for_restrict): Declare.
6468 * c-warn.c: Include gcc-rich-location.h.
6469 (warn_for_restrict): New function.
6470 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6471 (gcc_cdiag_char_table): Likewise.
6472 (gcc_cxxdiag_char_table): Likewise.
6473 * c.opt (Wrestrict): New option.
6475 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6477 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6478 for nested types only if the type is a record or union and dump SLOC.
6480 2016-11-09 Jason Merrill <jason@redhat.com>
6482 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6484 2016-11-09 Jakub Jelinek <jakub@redhat.com>
6486 * c-ubsan.c (ubsan_instrument_shift): Handle split
6487 -fsanitize=shift-base and -fsanitize=shift-exponent.
6489 2016-11-07 Jason Merrill <jason@redhat.com>
6491 * c.opt (Wc++1z-compat): New.
6492 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6494 2016-11-07 Martin Liska <mliska@suse.cz>
6496 * c-warn.c (warn_for_unused_label): Save all labels used
6497 in goto or in &label.
6499 2016-11-03 Jason Merrill <jason@redhat.com>
6501 * c-cppbuiltin.c (c_cpp_builtins): Correct
6502 __cpp_inheriting_constructors.
6504 2016-11-01 Jason Merrill <jason@redhat.com>
6506 * c-cppbuiltin.c (c_cpp_builtins): Update
6507 __cpp_inheriting_constructors.
6509 * c.opt (-fnew-inheriting-ctors): New.
6510 * c-opts.c: Default to on for ABI 11+.
6512 2016-10-31 Jakub Jelinek <jakub@redhat.com>
6515 * c.opt (fext-numeric-literals): Add Var and Init.
6516 * c-opts.c (c_common_handle_option): Don't clear
6517 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6518 (c_common_post_options): Clear it here if not set
6521 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
6524 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6527 2016-10-25 Jakub Jelinek <jakub@redhat.com>
6529 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6530 * c-common.c (c_common_reswords): Add __builtin_launder.
6532 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6534 * c-common.c (c_common_truthvalue_conversion): Warn for
6535 multiplications in boolean context. Fix the quoting of '<<' and '<'
6536 in the shift warning.
6538 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6540 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6542 2016-10-20 Jason Merrill <jason@redhat.com>
6544 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6546 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6548 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6549 integer shift ops in boolean context.
6551 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
6553 * c.opt (Walloca): New.
6554 (Walloca-larger-than=): New.
6555 (Wvla-larger-than=): New.
6557 2016-10-17 Marek Polacek <polacek@redhat.com>
6559 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6560 Return immediately when finding a match.
6561 (warn_tautological_cmp): Remove a boolean variable that is no longer
6564 2016-10-17 Marek Polacek <polacek@redhat.com>
6566 * c-attribs.c: New file.
6567 * c-common.c: Move attributes handling to c-attribs.c.
6568 (get_nonnull_operand): No longer static.
6569 * c-common.h: Move the declarations from c-attribs.c to its own section.
6571 2016-10-14 Jason Merrill <jason@redhat.com>
6573 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6574 and __cpp_deduction_guides.
6576 2016-10-13 Jason Merrill <jason@redhat.com>
6578 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6580 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6582 * c-cppbuiltin.c: Include memmodel.h.
6583 * c-opts.c: Likewise.
6584 * c-pragma.c: Likewise.
6585 * c-warn.c: Likewise.
6587 2016-10-12 Jakub Jelinek <jakub@redhat.com>
6589 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6590 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6591 * c-opts.c (sanitize_cpp_opts): Initialize
6592 cpp_opts->cpp_warn_implicit_fallthrough.
6594 2016-10-11 Marek Polacek <polacek@redhat.com>
6596 * c-common.c (warning_candidate_p): Change the return type to bool
6597 and return true/false instead of 1/0.
6598 (vector_mode_valid_p): Likewise.
6600 2016-10-11 Marek Polacek <polacek@redhat.com>
6602 * c-common.c (fold_for_warn): No longer static.
6603 (bool_promoted_to_int_p): Likewise.
6604 (c_common_get_narrower): Likewise.
6605 (constant_expression_warning): Move to c-warn.c.
6606 (constant_expression_error): Likewise.
6607 (overflow_warning): Likewise.
6608 (warn_logical_operator): Likewise.
6609 (find_array_ref_with_const_idx_r): Likewise.
6610 (warn_tautological_cmp): Likewise.
6611 (expr_has_boolean_operands_p): Likewise.
6612 (warn_logical_not_parentheses): Likewise.
6613 (warn_if_unused_value): Likewise.
6614 (strict_aliasing_warning): Likewise.
6615 (sizeof_pointer_memaccess_warning): Likewise.
6616 (check_main_parameter_types): Likewise.
6617 (conversion_warning): Likewise.
6618 (warnings_for_convert_and_check): Likewise.
6619 (match_case_to_enum_1): Likewise.
6620 (match_case_to_enum): Likewise.
6621 (c_do_switch_warnings): Likewise.
6622 (warn_for_omitted_condop): Likewise.
6623 (readonly_error): Likewise.
6624 (lvalue_error): Likewise.
6625 (invalid_indirection_error): Likewise.
6626 (warn_array_subscript_with_type_char): Likewise.
6627 (warn_about_parentheses): Likewise.
6628 (warn_for_unused_label): Likewise.
6629 (warn_for_div_by_zero): Likewise.
6630 (warn_for_memset): Likewise.
6631 (warn_for_sign_compare): Likewise.
6632 (do_warn_double_promotion): Likewise.
6633 (do_warn_unused_parameter): Likewise.
6634 (record_locally_defined_typedef): Likewise.
6635 (maybe_record_typedef_use): Likewise.
6636 (maybe_warn_unused_local_typedefs): Likewise.
6637 (maybe_warn_bool_compare): Likewise.
6638 (maybe_warn_shift_overflow): Likewise.
6639 (warn_duplicated_cond_add_or_warn): Likewise.
6640 (diagnose_mismatched_attributes): Likewise.
6641 * c-common.h: Move the declarations from c-warn.c to its own section.
6642 * c-warn.c: New file.
6644 2016-10-08 Jason Merrill <jason@redhat.com>
6646 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6647 into COND_EXPR in C++.
6649 2016-10-08 Jakub Jelinek <jakub@redhat.com>
6651 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6652 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6653 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6655 2016-10-07 Jakub Jelinek <jakub@redhat.com>
6657 Implement LWG2296 helper intrinsic
6658 * c-common.h (enum rid): Add RID_ADDRESSOF.
6659 * c-common.c (c_common_reswords): Add __builtin_addressof.
6661 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6664 * c-common.c (c_common_truthvalue_conversion): Warn also for
6665 suspicious enum values in boolean context.
6667 2016-10-06 Jakub Jelinek <jakub@redhat.com>
6669 Implement P0258R2 - helper for C++17
6670 std::has_unique_object_representations trait
6671 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6672 * c-common.c (c_common_reswords): Add
6673 __has_unique_object_representations.
6675 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6678 * c-ubsan.c (ubsan_instrument_return): Don't call
6679 initialize_sanitizer_builtins here.
6681 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6683 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6684 conditional expression in boolean context when only one arm is
6687 2016-10-05 Jakub Jelinek <jakub@redhat.com>
6690 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6693 * c-common.c (c_common_reswords): Update comment for C++11.
6695 2016-10-04 Jason Merrill <jason@redhat.com>
6697 * c-common.c (make_tree_vector_from_ctor): New.
6698 * c-common.h: Declare it.
6700 2016-10-04 Jakub Jelinek <jakub@redhat.com>
6702 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6703 __LIBGCC_JCR_SECTION_NAME__.
6705 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6707 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6708 left shift in boolean context.
6710 2016-09-29 Jakub Jelinek <jakub@redhat.com>
6712 Implement P0001R1 - C++17 removal of register storage class specifier
6713 * c.opt (Wregister): New warning.
6714 * c-opts.c (c_common_post_options): Enable -Wregister by
6717 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6719 * c-opts.c (c_common_post_options): Remove special case for
6720 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6723 2016-09-27 Jakub Jelinek <jakub@redhat.com>
6725 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6728 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6730 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6732 * c-common.c: Include memmodel.h.
6734 2016-09-26 Marek Polacek <polacek@redhat.com>
6736 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6738 2016-09-26 Marek Polacek <polacek@redhat.com>
6741 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6742 (handle_fallthrough_attribute): New function.
6743 (attribute_fallthrough_p): New function.
6744 * c-common.h (attribute_fallthrough_p): Declare.
6746 2016-09-24 Marek Polacek <polacek@redhat.com>
6749 * c.opt (Wbool-operation): New.
6751 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6753 * c-common.c (c_common_truthvalue_conversion): Inhibit
6754 Wint-in-bool-context warning with from_macro_definition_at.
6755 Mention the expression will always evaluate to true.
6757 2016-09-21 Martin Sebor <msebor@redhat.com>
6760 * c.opt (fprintf-return-value): Temporarily initialize to zero
6761 to unblock bootstrap failures.
6763 2016-09-21 Jakub Jelinek <jakub@redhat.com>
6766 * c.opt (Waligned-new=): Add RejectNegative.
6767 (faligned-new=): Likewise. Spelling fix - change
6768 aligned_new_threshhold to aligned_new_threshold.
6769 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6770 to aligned_new_threshold.
6772 2016-09-20 Martin Sebor <msebor@redhat.com>
6775 * c.opt: Add -Wformat-length and -fprintf-return-value.
6777 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6780 * c.opt (Wint-in-bool-context): New warning.
6781 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6782 constants in boolean context.
6784 2016-09-19 Joseph Myers <joseph@codesourcery.com>
6786 * c-common.c (max_align_t_align): Also consider alignment of
6789 2016-09-15 Jason Merrill <jason@redhat.com>
6791 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6794 2016-09-14 Jason Merrill <jason@redhat.com>
6796 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6797 limit FIELD_DECL, either.
6799 2016-09-14 Marek Polacek <polacek@redhat.com>
6801 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6802 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6803 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6805 2016-09-13 David Malcolm <dmalcolm@redhat.com>
6807 * c-common.c (warn_logical_not_parentheses): Replace
6808 rich_location::add_fixit_insert calls with add_fixit_insert_before
6809 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6811 2016-09-13 Jason Merrill <jason@redhat.com>
6812 Tom de Vries <tom@codesourcery.com>
6815 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6817 2016-09-13 Jason Merrill <jason@redhat.com>
6819 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6822 2016-09-12 Jason Merrill <jason@redhat.com>
6824 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6825 bit/byte confusion, allow large alignment for types.
6827 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6830 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6832 2016-09-12 David Malcolm <dmalcolm@redhat.com>
6835 * c-format.c (argument_parser::check_argument_type): Add params
6836 "type_start" and "conversion_char". Use the former to generate
6837 offset_to_type_start and pass it and conversion_char to
6839 (check_format_info_main): Capture the start of the type
6840 information as "type_start", and pass it an format_char
6841 to arg_parser.check_argument_type.
6842 (check_format_types): Provide an example in the leading comment.
6843 Add params "offset_to_type_start" and "conversion_char"; pass
6844 them to format_type_warning calls.
6845 (test_get_modifier_for_format_len): Likewise.
6846 (matching_type_p): New function.
6847 (get_format_for_type): Add param "conversion_char" and move
6848 implementation into...
6849 (get_format_for_type_1): ...new function, called twice.
6850 Use new function matching_type_p rather than checking for
6851 TYPE_CANONICAL equality.
6852 (get_corrected_substring): New function.
6853 (format_type_warning): Provide an example in the leading comment.
6854 Add params "offset_to_type_start" and "conversion_char". Replace
6855 call to get_format_for_type with call to get_corrected_substring
6856 and move rejection of hints for widths/precisions there.
6857 (assert_format_for_type_streq): Add param "conversion_char".
6858 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6859 (test_get_format_for_type_printf): Add conversion chars to the
6860 tests, adding coverage for various combinations of integer
6861 vs double conversions, and for preserving octal and hexadecimal
6863 (test_get_format_for_type_scanf): Add conversion chars to the
6866 2016-09-10 Tom de Vries <tom@codesourcery.com>
6869 * c-common.c (build_va_arg): Handle more strict
6870 targetm.canonical_va_list_type. Replace first argument type error with
6873 2016-09-09 Martin Sebor <msebor@redhat.com>
6877 * c-format.c (argument_parser::find_format_char_info): Use %qc
6878 format directive unconditionally.
6880 2016-09-09 Jason Merrill <jason@redhat.com>
6882 Implement C++17 new of over-aligned types.
6883 * c.opt: Add -faligned-new and -Waligned-new.
6884 * c-common.c (max_align_t_align): Split out from...
6885 (cxx_fundamental_alignment_p): ...here.
6886 * c-common.h: Declare it.
6887 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6889 2016-09-09 Joseph Myers <joseph@codesourcery.com>
6891 * c-cppbuiltin.c (builtin_define_type_width): New function.
6892 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6895 2016-09-07 David Malcolm <dmalcolm@redhat.com>
6897 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6899 (substring_loc::get_location): Move to substring-locations.c,
6900 keeping implementation as...
6901 (c_get_substring_location): New function, from the above, reworked
6902 to use accessors rather than member lookup.
6903 * c-common.h (class substring_loc): Move to substring-locations.h,
6904 replacing with a forward decl.
6905 (c_get_substring_location): New decl.
6906 * c-format.c: Include "substring-locations.h".
6907 (format_warning_va): Move to substring-locations.c.
6908 (format_warning_at_substring): Likewise.
6910 2016-09-06 Martin Sebor <msebor@redhat.com>
6913 * c-format.c (check_function_format): Avoid issuing warnings for
6914 functions unless they call format functions with non-constant
6917 2016-09-06 Richard Biener <rguenther@suse.de>
6920 * c-common.c (c_common_mark_addressable_vec): Handle
6921 COMPOUND_LITERAL_EXPR.
6923 2016-09-05 Marek Polacek <polacek@redhat.com>
6926 * c-common.c (bool_promoted_to_int_p): New function.
6927 (expr_has_boolean_operands_p): New function.
6928 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6929 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6931 2016-09-04 Tom de Vries <tom@codesourcery.com>
6934 2016-08-29 Tom de Vries <tom@codesourcery.com>
6936 * c-common.c (build_va_arg): Replace first argument type error
6939 2016-09-02 Jakub Jelinek <jakub@redhat.com>
6942 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6943 (c_finish_omp_for): Reject _Atomic qualified iterators.
6945 2016-09-01 Martin Sebor <msebor@redhat.com>
6947 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6948 size to guarantee it fits the output of the formatted function
6949 regardless of its arguments.
6951 2016-09-01 Marek Polacek <polacek@redhat.com>
6954 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6957 2016-08-29 Marek Polacek <polacek@redhat.com>
6960 * c-common.c (warn_logical_not_parentheses): Don't warn for
6961 a comparison or a logical operator.
6963 2016-08-29 Tom de Vries <tom@codesourcery.com>
6965 * c-common.c (build_va_arg): Fix type comparison assert.
6967 2016-08-29 Tom de Vries <tom@codesourcery.com>
6969 * c-common.c (build_va_arg): Replace first argument type error
6972 2016-08-29 Tom de Vries <tom@codesourcery.com>
6975 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6976 with error_mark_node as va_list instead of with illegal va_list.
6978 2016-08-25 Marek Polacek <polacek@redhat.com>
6979 David Malcolm <dmalcolm@redhat.com>
6981 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6982 * c-common.h (warn_logical_not_parentheses): Update declaration.
6984 2016-08-22 Marek Polacek <polacek@redhat.com>
6987 * c-common.c (warn_for_memset): Check type for null.
6989 2016-08-22 Joseph Myers <joseph@codesourcery.com>
6991 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6992 _FloatNx types for suffixes for built-in functions.
6994 2016-08-19 Joseph Myers <joseph@codesourcery.com>
6997 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6998 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6999 (RID_FLOAT128X): New enum rid values.
7000 (CASE_RID_FLOATN_NX): New macro.
7001 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
7003 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
7004 corresponding complex types.
7005 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
7006 _FloatNx and corresponding complex types.
7007 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
7008 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
7009 and _FloatNx types for the widest type for determining
7010 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
7011 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
7012 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
7014 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
7016 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
7019 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7021 * c-opts.c (c_diagnostic_finalizer): Update for change to
7022 diagnostic_show_locus.
7024 2016-08-18 David Malcolm <dmalcolm@redhat.com>
7026 * c-common.c: Include "spellcheck.h".
7027 (cb_get_suggestion): New function.
7028 * c-common.h (cb_get_suggestion): New decl.
7029 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
7032 2016-08-18 Marek Polacek <polacek@redhat.com>
7035 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
7038 2016-08-16 David Malcolm <dmalcolm@redhat.com>
7041 * c-common.c (substring_loc::get_range): Rename to...
7042 (substring_loc::get_location): ...this, converting param from a
7043 source_range * to a location_t *. Call
7044 get_source_location_for_substring rather than
7045 get_source_range_for_substring, and pass in m_caret_idx.
7046 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
7047 (substring_loc::get_range): Replace with...
7048 (substring_loc::get_location): ...this.
7049 (substring_loc::set_caret_index): New method.
7050 (substring_loc): Add field m_caret_idx.
7051 * c-format.c (format_warning_va): Update for above changes.
7052 Rename local "substring_loc" to "fmt_substring_loc" to avoid
7053 clashing with type name.
7054 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
7055 (check_argument_type): Likewise.
7056 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
7057 Use a copy when emitting warnings, setting the caret index from TYPE.
7059 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
7060 Arnaud Charlet <charlet@adacore.com>
7062 * c-ada-spec.c (dump_number): New function.
7063 (handle_escape_character): Likewise.
7064 (print_ada_macros): Add handling of constant integers and strings.
7066 2016-08-12 Marek Polacek <polacek@redhat.com>
7069 * c-common.c (scalar_to_vector): Adjust fall through comment.
7070 * c-opts.c (c_common_handle_option): Likewise.
7071 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
7072 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
7073 fall through comment.
7074 * cilk.c (extract_free_variables): Add FALLTHRU.
7076 2016-08-10 Jason Merrill <jason@redhat.com>
7078 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
7080 2016-08-09 Jason Merrill <jason@redhat.com>
7082 * c-common.c (c_common_attribute_table): vector_size affects type
7085 2016-08-09 Marek Polacek <polacek@redhat.com>
7088 * c-ada-spec.c (dump_generic_ada_node): Add return.
7090 2016-08-09 Jason Merrill <jason@redhat.com>
7092 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
7093 C++17 constexpr lambdas.
7095 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7098 * c-common.h (selftest::c_format_c_tests): New declaration.
7099 (selftest::run_c_tests): New declaration.
7100 * c-format.c: Include "selftest.h.
7101 (format_warning_va): Add param "corrected_substring" and use
7102 it to add a replacement fix-it hint.
7103 (format_warning_at_substring): Likewise.
7104 (format_warning_at_char): Update for new param of
7106 (argument_parser::check_argument_type): Pass "fki" to
7108 (check_format_types): Add param "fki" and pass it to
7109 format_type_warning.
7110 (deref_n_times): New function.
7111 (get_modifier_for_format_len): New function.
7112 (selftest::test_get_modifier_for_format_len): New function.
7113 (get_format_for_type): New function.
7114 (format_type_warning): Add param "fki" and use it to attempt
7115 to provide hints for argument types when calling
7116 format_warning_at_substring.
7117 (selftest::get_info): New function.
7118 (selftest::assert_format_for_type_streq): New function.
7119 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
7120 (selftest::test_get_format_for_type_printf): New function.
7121 (selftest::test_get_format_for_type_scanf): New function.
7122 (selftest::c_format_c_tests): New function.
7124 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7127 * c-format.c: Include "diagnostic.h".
7128 (location_column_from_byte_offset): Delete.
7129 (location_from_offset): Delete.
7130 (format_warning_va): New function.
7131 (format_warning_at_substring): New function.
7132 (format_warning_at_char): New function.
7133 (check_format_arg): Capture location of format_tree and pass to
7134 check_format_info_main.
7135 (argument_parser): Add fields "start_of_this_format" and
7136 "format_string_cst".
7137 (flag_chars_t::validate): Add param "format_string_cst". Convert
7138 warning_at call using location_from_offset to call to
7139 format_warning_at_char.
7140 (argument_parser::argument_parser): Add param "format_string_cst_"
7141 and use use it to initialize field "format_string_cst".
7142 Initialize new field "start_of_this_format".
7143 (argument_parser::read_format_flags): Convert warning_at call
7144 using location_from_offset to a call to format_warning_at_char.
7145 (argument_parser::read_any_format_left_precision): Likewise.
7146 (argument_parser::read_any_format_precision): Likewise.
7147 (argument_parser::read_any_other_modifier): Likewise.
7148 (argument_parser::find_format_char_info): Likewise, in three places.
7149 (argument_parser::parse_any_scan_set): Likewise, in one place.
7150 (argument_parser::handle_conversions): Likewise, in two places.
7151 (argument_parser::check_argument_type): Add param "fmt_param_loc"
7152 and use it to make a substring_loc. Pass the latter to
7154 (check_format_info_main): Add params "fmt_param_loc" and
7155 "format_string_cst". Convert warning_at calls using
7156 location_from_offset to calls to format_warning_at_char. Pass the
7157 new params to the arg_parser ctor. Pass "format_string_cst" to
7158 flag_chars.validate. Pass "fmt_param_loc" to
7159 arg_parser.check_argument_type.
7160 (check_format_types): Convert first param from a location_t
7161 to a const substring_loc & and rename to "fmt_loc". Attempt
7162 to extract the range of the relevant parameter and pass it
7163 to format_type_warning.
7164 (format_type_warning): Convert first param from a location_t
7165 to a const substring_loc & and rename to "fmt_loc". Add
7166 params "param_range" and "type". Replace calls to warning_at
7167 with calls to format_warning_at_substring.
7169 2016-08-08 David Malcolm <dmalcolm@redhat.com>
7171 * c-format.c (class flag_chars_t): New class.
7172 (struct length_modifier): New struct.
7173 (class argument_parser): New class.
7174 (flag_chars_t::flag_chars_t): New ctor.
7175 (flag_chars_t::has_char_p): New method.
7176 (flag_chars_t::add_char): New method.
7177 (flag_chars_t::validate): New method.
7178 (flag_chars_t::get_alloc_flag): New method.
7179 (flag_chars_t::assignment_suppression_p): New method.
7180 (argument_parser::argument_parser): New ctor.
7181 (argument_parser::read_any_dollar): New method.
7182 (argument_parser::read_format_flags): New method.
7183 (argument_parser::read_any_format_width): New method.
7184 (argument_parser::read_any_format_left_precision): New method.
7185 (argument_parser::read_any_format_precision): New method.
7186 (argument_parser::handle_alloc_chars): New method.
7187 (argument_parser::read_any_length_modifier): New method.
7188 (argument_parser::read_any_other_modifier): New method.
7189 (argument_parser::find_format_char_info): New method.
7190 (argument_parser::validate_flag_pairs): New method.
7191 (argument_parser::give_y2k_warnings): New method.
7192 (argument_parser::parse_any_scan_set): New method.
7193 (argument_parser::handle_conversions): New method.
7194 (argument_parser::check_argument_type): New method.
7195 (check_format_info_main): Introduce classes argument_parser
7196 and flag_chars_t, moving the code within the loop into methods
7197 of these classes. Make various locals "const".
7199 2016-08-05 David Malcolm <dmalcolm@redhat.com>
7201 * c-common.c: Include "substring-locations.h".
7202 (get_cpp_ttype_from_string_type): New function.
7203 (g_string_concat_db): New global.
7204 (substring_loc::get_range): New method.
7205 * c-common.h (g_string_concat_db): New declaration.
7206 (class substring_loc): New class.
7207 * c-lex.c (lex_string): When concatenating strings, capture the
7208 locations of all tokens using a new obstack, and record the
7209 concatenation locations within g_string_concat_db.
7210 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7213 2016-07-29 Marek Polacek <polacek@redhat.com>
7216 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7217 parentheses warning.
7220 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7222 2016-07-28 Martin Liska <mliska@suse.cz>
7224 PR gcov-profile/68025
7225 * c-common.c (handle_no_profile_instrument_function_attribute):
7227 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7229 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7232 2016-07-25 Jason Merrill <jason@redhat.com>
7235 * c.opt (fconstexpr-loop-limit): New.
7237 2016-07-22 Martin Sebor <msebor@redhat.com>
7240 * c-common.c (resolve_overloaded_builtin): Avoid converting
7241 __atomic_compare_exchange_n return type to that of what its
7242 first argument points to.
7244 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
7246 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7247 ~(unsigned HOST_WIDE_INT) 0.
7249 2016-07-22 Martin Liska <mliska@suse.cz>
7251 PR gcov-profile/69028
7252 PR gcov-profile/62047
7253 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7254 to the current_function_decl.
7256 2016-07-21 Jason Merrill <jason@redhat.com>
7259 * c-common.c (c_common_truthvalue_conversion): Check
7260 c_inhibit_evaluation_warnings for warning about address of
7263 2016-07-20 David Malcolm <dmalcolm@redhat.com>
7265 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7268 2016-07-15 Jason Merrill <jason@redhat.com>
7270 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7272 2016-07-15 Jakub Jelinek <jakub@redhat.com>
7275 * c-common.h (enum lookup_name_fuzzy_kind): Add
7276 FUZZY_LOOKUP_FUNCTION_NAME.
7278 2016-07-08 Jason Merrill <jason@redhat.com>
7280 P0145: Refining Expression Order for C++.
7281 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7284 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7287 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7289 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7291 * c-pragma.h (enum pragma_kind): Rename
7292 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7295 2016-06-29 Richard Biener <rguenther@suse.de>
7298 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7300 2016-06-24 Jason Merrill <jason@redhat.com>
7302 P0145R2: Refining Expression Order for C++.
7303 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7306 2016-06-24 Jakub Jelinek <jakub@redhat.com>
7308 * c-common.c (check_builtin_function_arguments): Require last
7309 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7310 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7311 if the last argument is pointer to enumerated or boolean type.
7313 2016-06-22 David Malcolm <dmalcolm@redhat.com>
7316 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7317 (lookup_name_fuzzy): New prototype.
7319 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
7321 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7323 2016-06-14 Jason Merrill <jason@redhat.com>
7325 P0145R2: Refining Expression Order for C++.
7326 * c.opt (fargs-in-order): New.
7327 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7329 2016-06-13 Jakub Jelinek <jakub@redhat.com>
7332 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7333 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7335 PR preprocessor/71183
7336 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7337 to cb_get_source_date_epoch.
7339 2016-06-10 Jakub Jelinek <jakub@redhat.com>
7342 * c.opt (Wpsabi): Add Warning flag.
7344 2016-06-10 Martin Sebor <msebor@redhat.com>
7347 * c-common.c (handle_nonnull_attribute): Accept
7348 the nonnull attribute in type-generic builtins.
7350 2016-06-09 Martin Sebor <msebor@redhat.com>
7353 * c-common.c (builtin_function_validate_nargs): Make text of error
7354 message consistent with others like it.
7356 2016-06-08 Martin Sebor <msebor@redhat.com>
7357 Jakub Jelinek <jakub@redhat.com>
7361 * c-common.c (check_builtin_function_arguments): Handle
7362 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7364 2016-06-08 Richard Biener <rguenther@suse.de>
7366 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7368 2016-06-07 Richard Biener <rguenther@suse.de>
7371 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7372 options and warn about others.
7374 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
7376 * c-common.c (get_source_date_epoch): Rename to
7377 cb_get_source_date_epoch.
7378 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7379 message when the parsing fails. Use error_at instead of fatal_error.
7380 * c-common.h (get_source_date_epoch): Rename to
7381 cb_get_source_date_epoch.
7382 * c-common.h (cb_get_source_date_epoch): Prototype.
7383 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7384 * c-common.h (c_omp_region_type): Remove trailing comma.
7385 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7386 * c-lex.c (c_lex_with_flags): Remove initialization of
7387 pfile->source_date_epoch.
7389 2016-05-30 Jakub Jelinek <jakub@redhat.com>
7392 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7393 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7394 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7395 instead of C_OMP_CLAUSE_SPLIT_FOR.
7397 2016-05-24 Richard Biener <rguenther@suse.de>
7401 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7402 (convert_vector_to_array_for_subscript): ... this.
7403 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7404 VIEW_CONVERT_EXPR to an array type. Rename to ...
7405 (convert_vector_to_array_for_subscript): ... this.
7407 2016-05-12 Marek Polacek <polacek@redhat.com>
7410 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7411 size_in_bytes and pass LOC to it.
7413 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7416 * c.opt (Wduplicate-decl-specifier): New option.
7418 2016-05-11 Marek Polacek <polacek@redhat.com>
7421 * c-common.c (diagnose_mismatched_attributes): New function.
7422 * c-common.h (diagnose_mismatched_attributes): Declare.
7424 2016-05-04 Marek Polacek <polacek@redhat.com>
7426 * c.opt (Wdangling-else): New option.
7428 2016-05-03 Marek Polacek <polacek@redhat.com>
7431 * c-common.c (builtin_function_validate_nargs): Add location
7433 (check_builtin_function_arguments): Add location and arguments
7434 parameters. Use them.
7435 * c-common.h (check_builtin_function_arguments): Update declaration.
7437 2016-05-03 Richard Biener <rguenther@suse.de>
7439 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7440 allow call args to gimplify to SSA names.
7442 2016-05-03 Marek Polacek <polacek@redhat.com>
7444 * c-common.h (enum c_omp_region_type): Remove stray comma.
7446 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7448 * c-common.h (enum c_omp_region_type): Define.
7450 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7452 * c-common.c (shorten_compare): Use wi::to_wide.
7454 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7457 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7458 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7459 reduction clauses in acc parallel loops.
7461 2016-04-29 Marek Polacek <polacek@redhat.com>
7464 * c-common.c (warn_for_memset): Check domain before accessing it.
7466 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7469 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7470 "aligned" attribute.
7472 2016-04-28 Jason Merrill <jason@redhat.com>
7474 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7476 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
7477 Matthias Klose <doko@debian.org>
7479 * c-common.c (get_source_date_epoch): New function, gets the environment
7480 variable SOURCE_DATE_EPOCH and parses it as long long with error
7482 * c-common.h (get_source_date_epoch): Prototype.
7483 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7485 2015-04-27 Ryan Burn <contact@rnburn.com>
7489 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7490 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7492 (cilk_detect_and_unwrap): Corresponding changes.
7493 (extract_free_variables): Don't extract free variables from
7494 AGGR_INIT_EXPR slot.
7495 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7496 (cilk_recognize_spawn): Likewise.
7498 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7500 * c.opt (Wmemset-elt-size): New option.
7501 * c-common.c (warn_for_memset): New function.
7502 * c-common.h (warn_for_memset): Declare.
7504 2016-04-25 Jason Merrill <jason@redhat.com>
7506 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7508 * c-common.h: Declare it.
7509 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7511 2016-04-22 Jason Merrill <jason@redhat.com>
7513 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7515 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7518 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7519 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7521 2016-04-18 Michael Matz <matz@suse.de>
7523 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7526 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7528 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7529 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7530 to incomplete types.
7531 (dump_nested_type): Remove redundant tests and tidy up.
7532 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7533 a type which is the typedef of an original type.
7535 2016-04-15 Marek Polacek <polacek@redhat.com>
7538 * c-common.c (build_va_arg): Change two asserts into errors and return
7541 2016-04-13 Marek Polacek <polacek@redhat.com>
7544 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7545 for switch statements, too.
7547 2016-03-28 Jason Merrill <jason@redhat.com>
7549 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7551 2016-03-23 Marek Polacek <polacek@redhat.com>
7554 * c.opt (Wignored-attributes): New option.
7556 2016-03-22 David Malcolm <dmalcolm@redhat.com>
7559 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7560 diagnostic text, reversing the order of the warning and note so
7561 that they appear in source order.
7563 2016-03-17 Marek Polacek <polacek@redhat.com>
7566 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7569 2016-03-14 Jason Merrill <jason@redhat.com>
7571 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7573 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7575 2016-03-09 Richard Biener <rguenther@suse.de>
7578 * c-common.c (strict_aliasing_warning): Add back
7579 alias_sets_conflict_p check.
7581 2016-03-08 Jason Merrill <jason@redhat.com>
7583 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7585 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7588 * c-indentation.c (get_visual_column): Move code to determine next
7590 (next_tab_stop): ...this new function.
7591 (line_contains_hash_if): Delete function.
7592 (detect_preprocessor_logic): Delete function.
7593 (get_first_nws_vis_column): New function.
7594 (detect_intervening_unindent): New function.
7595 (should_warn_for_misleading_indentation): Replace call to
7596 detect_preprocessor_logic with a call to
7597 detect_intervening_unindent.
7599 2016-03-04 David Malcolm <dmalcolm@redhat.com>
7602 * c-indentation.c (should_warn_for_misleading_indentation): When
7603 suppressing warnings about cases where the guard and body are on
7604 the same column, only use the first non-whitespace column in place
7605 of the guard token column when dealing with "else" clauses.
7606 When rejecting aligned BODY and NEXT, loosen the requirement
7607 from equality with the first non-whitespace of guard to simply
7608 that they not be indented relative to it.
7610 2016-03-04 Richard Biener <rguenther@suse.de>
7613 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7614 instead of alias_sets_conflict_p.
7616 2016-03-01 Marek Polacek <polacek@redhat.com>
7619 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7622 2016-02-22 Martin Sebor <msebor@redhat.com>
7625 * c-common.c (check_builtin_function_arguments): Validate and
7626 reject invalid arguments to __builtin_alloca_with_align.
7628 2016-02-20 Mark Wielaard <mjw@redhat.com>
7631 * c.opt (Wunused-const-variable): Turn into Alias for...
7632 (Wunused-const-variable=): New option.
7634 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7637 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7639 (c_common_init_options): ...to here.
7640 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7642 2016-02-19 Jakub Jelinek <jakub@redhat.com>
7645 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7646 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7647 flag_preprocess_only.
7649 2016-02-16 Jakub Jelinek <jakub@redhat.com>
7652 * c.opt (Wnonnull-compare): Enable for -Wall.
7654 2016-02-15 Jakub Jelinek <jakub@redhat.com>
7657 * c-common.c (sync_resolve_size): Diagnose too few arguments
7658 even when params is non-NULL empty vector.
7660 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7663 * c.opt (fshort-double): Remove.
7665 2016-02-05 Martin Sebor <msebor@redhat.com>
7668 * c.opt (Warning options): Update -Wplacement-new to take
7669 an optional argument.
7671 2016-02-01 Jakub Jelinek <jakub@redhat.com>
7673 PR preprocessor/69543
7675 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7676 instead of loc to control_warning_option.
7678 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7680 * c.opt (fopenacc-dim=): New option.
7682 2016-01-27 Ryan Burn <contact@rnburn.com>
7685 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7686 gimplify_arg. Removed superfluous post_p argument.
7687 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7688 superfluous post_p argument.
7689 * c-gimplify.c (c_gimplify_expr): Likewise.
7691 2016-01-26 David Malcolm <dmalcolm@redhat.com>
7694 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7695 pp_newline_and_flush with pp_flush.
7697 2016-01-20 Martin Sebor <msebor@redhat.com>
7700 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7701 an incompatible argument when the argument isn't a valid tree node.
7703 2016-01-18 Jason Merrill <jason@redhat.com>
7706 * c-common.c (check_function_arguments_recurse): Fold the whole
7707 COND_EXPR, not just the condition.
7709 2016-01-18 Tom de Vries <tom@codesourcery.com>
7711 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7712 classify as loop clause.
7714 2016-01-15 Jakub Jelinek <jakub@redhat.com>
7717 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7718 C++ FE no longer has limit on number of pragmas.
7720 2015-01-14 Ryan Burn <contact@rnburn.com>
7723 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
7724 to add missing cleanup point.
7726 2016-01-14 David Malcolm <dmalcolm@redhat.com>
7729 * c-indentation.c (get_visual_column): Add location_t param.
7730 Handle the column number being zero by effectively disabling the
7731 warning, with an "inform".
7732 (should_warn_for_misleading_indentation): Add location_t argument
7733 for all uses of get_visual_column.
7735 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7738 * c-indentation.c (should_warn_for_misleading_indentation):
7739 Don't warn about do-while statements.
7741 2016-01-07 Martin Sebor <msebor@redhat.com>
7744 * c-common.c (sync_resolve_size): Reject first argument when it's
7747 2016-01-05 David Malcolm <dmalcolm@redhat.com>
7750 * c-indentation.c (get_visual_column): Remove default argument.
7751 (should_warn_for_misleading_indentation): For the multiline case,
7752 update call to get_visual_column for next_stmt_exploc so that it
7753 captures the location of the first non-whitespace character in the
7754 relevant line. Don't issue warnings if there is non-whitespace
7755 before the next statement.
7757 2016-01-04 Jakub Jelinek <jakub@redhat.com>
7759 Update copyright years.
7761 2015-12-21 David Malcolm <dmalcolm@redhat.com>
7763 * c-common.c (binary_op_error): Convert first param from
7764 location_t to rich_location * and use it when emitting an error.
7765 * c-common.h (binary_op_error): Convert first param from
7766 location_t to rich_location *.
7768 2015-12-16 David Malcolm <dmalcolm@redhat.com>
7770 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7771 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7773 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7775 * c-common.c (c_common_attribute_table): Handle "omp declare target
7778 2015-12-14 Jakub Jelinek <jakub@redhat.com>
7781 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7783 2014-12-12 Tobias Burnus <burnus@net-b.de>
7786 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7787 specifiers (%d, %i,%u and %c).
7789 2015-12-10 David Malcolm <dmalcolm@redhat.com>
7791 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7793 2015-12-08 Jakub Jelinek <jakub@redhat.com>
7797 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7798 * c-pragma.c (handle_pragma_diagnostic): Adjust
7799 control_warning_option caller.
7801 2015-12-07 David Malcolm <dmalcolm@redhat.com>
7803 * c-common.c (c_cpp_error): Update for change to
7804 rich_location::set_range.
7806 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
7808 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7809 shifting 1 out of the sign bit.
7811 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7813 * c-common.c (c_common_attribute_table[]): Update max arguments
7814 count for "simd" attribute.
7815 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7817 2015-12-03 Jakub Jelinek <jakub@redhat.com>
7819 PR preprocessor/57580
7820 * c-ppoutput.c (print): Change printed field to bool.
7821 Move src_file last for smaller padding.
7822 (init_pp_output): Set print.printed to false instead of 0.
7823 (scan_translation_unit): Fix up formatting. Set print.printed
7824 to true after printing something other than newline.
7825 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7826 (maybe_print_line_1): Set print.printed to false instead of 0.
7827 (print_line_1): Likewise.
7828 (do_line_change): Set print.printed to true instead of 1.
7829 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7830 dump_macro): Set print.printed to false after printing newline.
7832 2015-12-02 Jason Merrill <jason@redhat.com>
7834 * c-common.c (fold_for_warn): New.
7835 (warn_logical_operator, warn_tautological_cmp)
7836 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7838 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7839 (c_fully_fold_internal, decl_constant_value_for_optimization):
7841 * c-common.h: Don't declare decl_constant_value_for_optimization.
7843 2015-12-02 Joseph Myers <joseph@codesourcery.com>
7846 * c-common.h (c_build_qualified_type): Add extra default
7849 2015-12-01 Julian Brown <julian@codesourcery.com>
7850 Cesar Philippidis <cesar@codesourcery.com>
7851 James Norris <James_Norris@mentor.com>
7853 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7854 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7855 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7857 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7859 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7860 (decl_sloc_common): Delete and move bulk of processing to...
7861 (decl_sloc): ...here.
7862 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7863 (dump_ada_double_name): Remove S parameter and compute the suffix.
7864 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7865 element type and deal with an anonymous one.
7866 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7867 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7868 and remove reference to QUAL_UNION_TYPE.
7869 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7870 (dump_nested_type): ...here. New function extracted from above.
7871 Generate a full declaration for anonymous element type of arrays.
7872 (print_ada_declaration): Really skip anonymous declarations. Remove
7873 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7874 Clean up processing of declarations of array types and objects.
7875 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7876 Remove obsolete code and tidy up.
7878 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
7881 * c-common.c (handle_transparent_union_attribute): Update
7884 2015-11-27 Martin Liska <mliska@suse.cz>
7887 * array-notation-common.c (cilkplus_extract_an_triplets):
7888 Release vector of vectors.
7889 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7891 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7894 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7895 (print_ada_struct_decl): Likewise.
7897 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7900 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7901 * cilk.c (recognize_spawn): Determine location in a more precise
7904 2015-11-19 Jason Merrill <jason@redhat.com>
7906 * c-common.c (shorten_compare): But look through macros from
7909 2015-11-18 Jason Merrill <jason@redhat.com>
7911 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7912 non-constant operand comes from a macro.
7914 2015-11-17 Jason Merrill <jason@redhat.com>
7917 * c-common.c (warn_tautological_cmp): Fold before checking for
7920 2015-11-16 Marek Polacek <polacek@redhat.com>
7923 * c-common.c (check_case_bounds): Fold low and high cases.
7925 2015-11-16 Marek Polacek <polacek@redhat.com>
7927 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7928 * c-common.c (c_common_get_alias_set): Likewise.
7929 (handle_visibility_attribute): Likewise.
7931 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7933 * c-common.c (handle_simd_attribute): New.
7934 (struct attribute_spec): Add entry for "simd".
7935 (handle_simd_attribute): New.
7937 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
7939 * c-lex.c (interpret_float): Use fold_convert.
7941 2015-11-13 David Malcolm <dmalcolm@redhat.com>
7943 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7944 and store it on the result.
7945 * c-opts.c (c_common_init_options): Set
7946 global_dc->colorize_source_p.
7948 2015-11-12 James Norris <jnorris@codesourcery.com>
7949 Joseph Myers <joseph@codesourcery.com>
7951 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
7952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7953 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7954 PRAGMA_OACC_CLAUSE_LINK.
7956 2015-11-11 Marek Polacek <polacek@redhat.com>
7960 * c-common.c (valid_array_size_p): New function.
7961 * c-common.h (valid_array_size_p): Declare.
7963 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
7966 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7968 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
7970 * array-notation-common.c: Remove unused header files.
7971 * c-ada-spec.c: Likewise.
7972 * c-cilkplus.c: Likewise.
7973 * c-common.c: Likewise.
7974 * c-cppbuiltin.c: Likewise.
7975 * c-dump.c: Likewise.
7976 * c-format.c: Likewise.
7977 * c-gimplify.c: Likewise.
7978 * c-indentation.c: Likewise.
7979 * c-lex.c: Likewise.
7980 * c-omp.c: Likewise.
7981 * c-opts.c: Likewise.
7982 * c-pch.c: Likewise.
7983 * c-ppoutput.c: Likewise.
7984 * c-pragma.c: Likewise.
7985 * c-pretty-print.c: Likewise.
7986 * c-semantics.c: Likewise.
7987 * c-ubsan.c: Likewise.
7989 * stub-objc.c: Likewise.
7991 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7992 Cesar Philippidis <cesar@codesourcery.com>
7993 James Norris <jnorris@codesourcery.com>
7994 Julian Brown <julian@codesourcery.com>
7995 Nathan Sidwell <nathan@codesourcery.com>
7997 * c-pragma.c (oacc_pragmas): Add "routine".
7998 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
8000 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
8002 * c-common.c (c_common_attributes): Add scalar_storage_order.
8003 (handle_scalar_storage_order_attribute): New function.
8004 * c-pragma.c (global_sso): New variable.
8005 (maybe_apply_pragma_scalar_storage_order): New function.
8006 (handle_pragma_scalar_storage_order): Likewise.
8007 (init_pragma): Register scalar_storage_order.
8008 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
8009 * c.opt (Wscalar-storage-order): New warning.
8010 (fsso-struct=): New option.
8012 2015-11-08 Martin Sebor <msebor@redhat.com>
8014 * c.opt (Wplacement-new): Add a period to the end of a sentence.
8016 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
8018 * c-common.c: Don't undef DEF_BUILTIN.
8020 2015-11-06 David Malcolm <dmalcolm@redhat.com>
8022 * c-common.c (c_cpp_error): Convert parameter from location_t to
8023 rich_location *. Eliminate the "column_override" parameter and
8024 the call to diagnostic_override_column.
8025 Update the "done_lexing" clause to set range 0
8026 on the rich_location, rather than overwriting a location_t.
8027 * c-common.h (c_cpp_error): Convert parameter from location_t to
8028 rich_location *. Eliminate the "column_override" parameter.
8030 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
8031 Thomas Schwinge <thomas@codesourcery.com>
8032 James Norris <jnorris@codesourcery.com>
8034 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
8035 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
8036 clauses with parallel and kernels and loops.
8037 * c-pragma.h (enum pragma_omp_clause): Add entries for
8038 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
8039 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
8040 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
8042 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
8044 2015-11-05 Martin Sebor <msebor@redhat.com>
8047 * c.opt (-Wplacement-new): New option.
8049 2015-11-05 Jakub Jelinek <jakub@redhat.com>
8051 * c-common.h (c_finish_omp_atomic): Add TEST argument.
8052 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
8053 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
8054 save_expr or create_tmp_var* if TEST is true.
8055 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
8056 Don't call add_stmt here.
8057 (struct c_omp_check_loop_iv_data): New type.
8058 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
8059 c_omp_check_loop_iv_exprs): New functions.
8060 (c_omp_split_clauses): Adjust for lastprivate being allowed on
8062 (c_omp_declare_simd_clauses_to_numbers): Change
8063 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
8064 (c_omp_declare_simd_clauses_to_decls): Similarly change those
8065 from numbers to PARM_DECLs.
8067 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
8069 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
8072 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
8075 * c-common.h (fold_offsetof_1): Add argument.
8076 * c-common.c (fold_offsetof_1): Diagnose more invalid
8077 offsetof expressions that reference elements past the end of
8080 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
8081 Chung-Lin Tang <cltang@codesourcery.com>
8083 * c-pragma.c (oacc_pragmas): Add "atomic".
8084 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
8086 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
8088 * c-common.c (handle_target_clones_attribute): New.
8089 (c_common_attribute_table): Add handle_target_clones_attribute.
8090 (handle_always_inline_attribute): Add check on target_clones attribute.
8091 (handle_target_attribute): Ditto.
8093 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
8095 * array-notation-common.c: Reorder #include's and remove duplicates.
8096 * c-ada-spec.c: Likewise.
8097 * c-cilkplus.c: Likewise.
8098 * c-common.c: Likewise.
8099 * c-cppbuiltin.c: Likewise.
8100 * c-dump.c: Likewise.
8101 * c-format.c: Likewise.
8102 * c-gimplify.c: Likewise.
8103 * c-indentation.c: Likewise.
8104 * c-lex.c: Likewise.
8105 * c-omp.c: Likewise.
8106 * c-opts.c: Likewise.
8107 * c-pch.c: Likewise.
8108 * c-ppoutput.c: Likewise.
8109 * c-pragma.c: Likewise.
8110 * c-pretty-print.c: Likewise.
8111 * c-semantics.c: Likewise.
8112 * c-ubsan.c: Likewise.
8114 * stub-objc.c: Likewise.
8116 2015-10-28 Jason Merrill <jason@redhat.com>
8118 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
8120 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
8121 James Norris <jnorris@codesourcery.com>
8122 Cesar Philippidis <cesar@codesourcery.com>
8126 * c-common.h (c_oacc_split_loop_clauses): Declare function.
8127 * c-omp.c (c_oacc_split_loop_clauses): New function.
8129 2015-10-21 Martin Sebor <msebor@redhat.com>
8132 * c.opt: End each sentence that describes an option with a period.
8134 2015-10-20 Marek Polacek <polacek@redhat.com>
8136 * array-notation-common.c (is_cilkplus_vector_p): Define.
8137 * c-common.h (is_cilkplus_vector_p): Declare.
8139 2015-10-20 Marek Polacek <polacek@redhat.com>
8141 * c.opt (std=gnu++11): Do not describe as experimental.
8142 (std=gnu++14): Likewise.
8144 2015-10-19 Jason Merrill <jason@redhat.com>
8146 * c-cppbuiltin.c (c_cpp_builtins): Define
8147 __cpp_nontype_template_args.
8149 2015-10-19 Jason Merrill <jason@redhat.com>
8151 * c-cppbuiltin.c (c_cpp_builtins): Define
8152 __cpp_enumerator_attributes, __cpp_fold_expressions,
8153 __cpp_unicode_characters.
8155 2015-10-13 Jakub Jelinek <jakub@redhat.com>
8156 Aldy Hernandez <aldyh@redhat.com>
8158 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
8159 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
8160 (c_define_builtins): Likewise.
8161 * c-common.h (enum c_omp_clause_split): Add
8162 C_OMP_CLAUSE_SPLIT_TASKLOOP.
8163 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
8164 (c_finish_omp_for): Add ORIG_DECLV argument.
8165 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
8166 201511 instead of 201307.
8167 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
8168 OMP_CRITICAL_CLAUSES to it.
8169 (c_finish_omp_ordered): Add CLAUSES argument, set
8170 OMP_ORDERED_CLAUSES to it.
8171 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
8172 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
8173 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
8174 constructs and new OpenMP 4.5 clauses. Clear
8175 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
8177 * c-pragma.c (omp_pragmas_simd): Add taskloop.
8178 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
8179 (enum pragma_omp_clause): Add
8180 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
8181 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
8183 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
8185 * c-lex.c (interpret_float): Use real_equal instead of
8188 2015-10-04 Jason Merrill <jason@redhat.com>
8190 Implement N4514, C++ Extensions for Transactional Memory.
8191 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
8192 (c_common_attribute_table): Add transaction_safe_dynamic.
8193 transaction_safe now affects type identity.
8194 (handle_tm_attribute): Handle transaction_safe_dynamic.
8195 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
8196 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
8197 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
8199 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
8200 * c-pretty-print.c (pp_c_attributes_display): Don't print
8201 transaction_safe in C++.
8203 2015-10-02 Marek Polacek <polacek@redhat.com>
8205 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
8207 2015-10-02 Marek Polacek <polacek@redhat.com>
8210 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8211 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8212 * c.opt (Wduplicated-cond): New option.
8214 2015-10-01 Joseph Myers <joseph@codesourcery.com>
8216 * c.opt (std=c11): Do not describe as experimental.
8217 (std=gnu11): Likewise.
8218 (std=iso9899:2011): Likewise.
8220 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8222 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8223 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8225 2015-09-25 Marek Polacek <polacek@redhat.com>
8227 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8228 (ubsan_instrument_shift): Likewise.
8230 2015-09-25 Marek Polacek <polacek@redhat.com>
8233 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8235 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8237 * c-indentation.c (should_warn_for_misleading_indentation):
8238 Compare next_stmt_vis_column with guard_line_first_nws instead
8239 of with guard_line_vis_column.
8241 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8245 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8246 options and options not valid for the current language.
8248 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8250 * c-indentation.c (should_warn_for_misleading_indentation):
8251 Float out and consolidate the calls to get_visual_column that
8252 are passed guard_exploc as an argument. Compare
8253 next_stmt_vis_column with guard_line_first_nws instead of with
8254 body_line_first_nws.
8256 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8258 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8259 Wnamespaces): New C++ warnings.
8261 2015-09-22 Jason Merrill <jason@redhat.com>
8263 * c-common.h (abi_compat_version_crosses): New.
8264 (warn_abi_version): Declare.
8265 * c-common.c: Define it.
8266 * c-opts.c (c_common_post_options): Handle it.
8267 flag_abi_compat_version defaults to 8.
8269 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8271 Complete the implementation of N4230, Nested namespace definition.
8272 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8273 __cpp_nested_namespace_definitions.
8275 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8277 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8279 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8281 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8283 * c-pragma.h (pragma_lex): Add optional loc argument.
8285 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8287 * c-format.c (check_format_arg): Adjust to use common block size in all
8290 2015-09-15 David Malcolm <dmalcolm@redhat.com>
8292 * c-format.c (location_from_offset): Update for change in
8293 signature of location_get_source_line.
8294 * c-indentation.c (get_visual_column): Likewise.
8295 (line_contains_hash_if): Likewise.
8297 2015-09-14 Marek Polacek <polacek@redhat.com>
8299 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8300 setting various warnings.
8302 2015-09-14 Marek Polacek <polacek@redhat.com>
8304 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8307 2015-09-11 Mark Wielaard <mjw@redhat.com>
8310 * c.opt (Wunused-variable): Option from common.opt.
8311 (Wunused-const-variable): New option.
8313 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8316 * c.opt ([Wsubobject-linkage]): Add.
8318 2015-09-03 Martin Sebor <msebor@redhat.com>
8321 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8323 * c-common.c (reject_gcc_builtin): Define.
8325 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8328 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8330 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8331 cilk_gimplify_call_params_in_spawned_fn.
8332 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8333 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8336 2015-08-25 Marek Polacek <polacek@redhat.com>
8339 * c-common.c (handle_weak_attribute): Don't check whether the
8340 visibility can be changed here.
8342 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8344 * c-lex.c (c_lex_with_flags): Use explicit locations.
8346 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8348 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8349 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8351 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8354 * c-common.c (check_builtin_function_arguments): Add check
8355 for BUILT_IN_SIGNBIT argument.
8357 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8360 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8363 2015-08-17 Marek Polacek <polacek@redhat.com>
8365 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8366 with whitespaces before qualifier names.
8368 2015-08-12 Marek Polacek <polacek@redhat.com>
8371 * c-common.c (maybe_warn_shift_overflow): Properly handle
8372 left-shifting 1 into the sign bit.
8374 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8376 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8378 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8379 Braden Obrzut <admin@maniacsvault.net>
8380 Jason Merrill <jason@redhat.com>
8382 Add C++ Concepts TS support.
8383 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8384 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8385 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8386 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8387 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8388 * c.opt (fconcepts): New.
8390 2015-08-02 Martin Sebor <msebor@redhat.com>
8392 * c.opt (-Wframe-address): New warning option.
8394 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8396 * c-indentation.c (should_warn_for_misleading_indentation):
8399 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8401 * c-indentation.c (get_visual_column): Add parameter first_nws,
8402 use it. Update comment documenting the function.
8403 (is_first_nonwhitespace_on_line): Remove.
8404 (should_warn_for_misleading_indentation): Replace usage of
8405 of is_first_nonwhitespace_on_line with get_visual_column.
8407 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8409 * c-indentation.h (struct token_indent_info): Define.
8410 (get_token_indent_info): Define.
8411 (warn_for_misleading_information): Declare.
8412 * c-common.h (warn_for_misleading_information): Remove.
8413 * c-identation.c (warn_for_misleading_indentation):
8414 Change declaration to take three token_indent_infos. Adjust
8416 * c-identation.c (should_warn_for_misleading_indentation):
8417 Likewise. Bail out early if the body is a compound statement.
8418 (guard_tinfo_to_string): Define.
8420 2015-07-30 Jason Merrill <jason@redhat.com>
8422 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8423 '*' for reference decay.
8425 2015-07-30 Marek Polacek <polacek@redhat.com>
8427 * c-common.c (warn_tautological_cmp): Bail for float types.
8429 2015-07-27 Marek Polacek <polacek@redhat.com>
8432 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8434 2015-07-27 Marek Polacek <polacek@redhat.com>
8438 * c-common.c (find_array_ref_with_const_idx_r): New function.
8439 (warn_tautological_cmp): New function.
8440 * c-common.h (warn_tautological_cmp): Declare.
8441 * c.opt (Wtautological-compare): New option.
8443 2015-07-23 Marek Polacek <polacek@redhat.com>
8445 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8446 (ubsan_instrument_shift): Likewise.
8448 2015-07-23 Marek Polacek <polacek@redhat.com>
8451 * c-ubsan.c: Include gimplify.h.
8452 (ubsan_instrument_division): Unshare OP0 and OP1.
8453 (ubsan_instrument_shift): Likewise.
8455 2015-07-20 Marek Polacek <polacek@redhat.com>
8456 Richard Sandiford <richard.sandiford@arm.com>
8459 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8460 Use EXPR_LOC_OR_LOC.
8461 (maybe_warn_shift_overflow): New function.
8462 * c-common.h (maybe_warn_shift_overflow): Declare.
8463 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8464 * c.opt (Wshift-overflow): New option.
8466 2015-07-16 Martin Liska <mliska@suse.cz>
8468 * c-format.c (static void check_format_info_main): Use
8469 object_allocator instead of pool_allocator.
8470 (check_format_arg): Likewise.
8471 (check_format_info_main): Likewise.
8473 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
8475 * c-opts.c: Remove multiline #include comment.
8477 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
8479 * c-common.c: Fix double word typos.
8481 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8483 * c-ada-spec.h (cpp_operation): Revert latest change.
8484 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8485 constructors and destructors.
8487 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
8489 * c-common.h: Adjust includes for flags.h changes.
8490 * stub-objc.c: Likewise.
8492 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8494 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8495 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8497 2015-07-08 Jakub Jelinek <jakub@redhat.com>
8499 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8500 are to be removed, return NULL rather than original clauses list.
8502 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
8504 * array-notation-common.c: Adjust includes.
8505 * c-ada-spec.c: Likewise.
8506 * c-cilkplus.c: Likewise.
8507 * c-common.h: Likewise.
8508 * c-cppbuiltin.c: Likewise.
8509 * c-dump.c: Likewise.
8510 * c-format.c: Likewise.
8511 * c-gimplify.c: Likewise.
8512 * c-indentation.c: Likewise.
8513 * c-lex.c: Likewise.
8514 * c-omp.c: Likewise.
8515 * c-opts.c: Likewise.
8516 * c-pch.c: Likewise.
8517 * c-ppoutput.c: Likewise.
8518 * c-pragma.c: Likewise.
8519 * c-pretty-print.c: Likewise.
8520 * c-semantics.c: Likewise.
8521 * c-ubsan.c: Likewise.
8523 * stub-objc.c: Likewise.
8525 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8527 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8528 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8530 2015-07-01 Jason Merrill <jason@redhat.com>
8532 * c-common.h (D_CXX11): Rename from D_CXX0X.
8533 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8534 * c-common.c: Adjust.
8536 * c-opts.c (c_common_post_options): Default to C++14.
8538 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8540 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8542 Implement N4197 - Adding u8 character literals
8543 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
8545 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
8546 CPP_UTF8CHAR_USERDEF tokens.
8547 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
8548 and CPP_UTF8CHAR tokens.
8549 (lex_charconst): Treat CPP_UTF8CHAR token.
8551 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8554 * c-common.c (do_warn_unused_parameter): Move here.
8555 * c-common.h (do_warn_unused_parameter): Declare.
8557 2015-06-29 Marek Polacek <polacek@redhat.com>
8560 * c-common.c (check_case_bounds): Add bool * parameter. Set
8562 (c_add_case_label): Add bool * parameter. Pass it down to
8564 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8566 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8569 2015-06-27 Marek Polacek <polacek@redhat.com>
8571 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8572 or VECTOR_INTEGER_TYPE_P throughout.
8573 * c-gimplify.c: Likewise.
8575 2015-06-26 Marek Polacek <polacek@redhat.com>
8577 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8578 * c-common.c (c_fully_fold_internal): Likewise.
8579 (c_alignof_expr): Likewise.
8580 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8581 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8582 * cilk.c (create_parm_list): Likewise.
8584 2015-06-26 Marek Polacek <polacek@redhat.com>
8586 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8588 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8590 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8591 * c-gimplify.c: Likewise.
8592 * c-pragma.c: Likewise.
8593 * c-ubsan.c: Likewise.
8596 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8598 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8601 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
8603 * cilk.c: Move calls.h after tm.h in the include chain.
8605 2015-06-25 Marek Polacek <polacek@redhat.com>
8607 * array-notation-common.c: Use VAR_P throughout.
8608 * c-ada-spec.c: Likewise.
8609 * c-common.c: Likewise.
8610 * c-format.c: Likewise.
8611 * c-gimplify.c: Likewise.
8612 * c-omp.c: Likewise.
8613 * c-pragma.c: Likewise.
8614 * c-pretty-print.c: Likewise.
8617 2015-06-25 Marek Polacek <polacek@redhat.com>
8619 * cilk.c (extract_free_variables): Use is_global_var.
8621 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8623 * c-common.c: Don't include target-def.h.
8625 2015-06-23 Marek Polacek <polacek@redhat.com>
8627 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8628 when comparing INTEGER_CSTs.
8630 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8632 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8633 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8634 (dump_ada_template): Skip partially specialized types.
8636 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8638 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8641 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
8643 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8644 * c-ada-spec.c: Likewise.
8645 * c-cilkplus.c: Likewise.
8646 * c-common.c: Likewise.
8647 * c-common.h: Likewise.
8648 * c-cppbuiltin.c: Likewise.
8649 * c-dump.c: Likewise.
8650 * c-format.c: Likewise.
8651 * c-gimplify.c: Likewise.
8652 * c-indentation.c: Likewise.
8653 * c-lex.c: Likewise.
8654 * c-omp.c: Likewise.
8655 * c-opts.c: Likewise.
8656 * c-pch.c: Likewise.
8657 * c-ppoutput.c: Likewise.
8658 * c-pragma.c: Likewise.
8659 * c-pretty-print.c: Likewise.
8660 * c-semantics.c: Likewise.
8661 * c-ubsan.c: Likewise.
8663 * stub-objc.c: Likewise.
8665 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8668 * c-common.c (c_common_truthvalue_conversion): Warn when
8669 converting an address of a reference to a truth value.
8671 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
8673 * array-notation-common.c : Adjust include files.
8674 * c-ada-spec.c : Likewise.
8675 * c-cilkplus.c : Likewise.
8676 * c-common.c : Likewise.
8677 * c-common.h : Likewise.
8678 * c-cppbuiltin.c : Likewise.
8679 * c-dump.c : Likewise.
8680 * c-format.c : Likewise.
8681 * c-gimplify.c : Likewise.
8682 * c-indentation.c : Likewise.
8683 * c-lex.c : Likewise.
8684 * c-omp.c : Likewise.
8685 * c-opts.c : Likewise.
8686 * c-pch.c : Likewise.
8687 * c-ppoutput.c : Likewise.
8688 * c-pragma.c : Likewise.
8689 * c-pretty-print.c : Likewise.
8690 * c-semantics.c : Likewise.
8691 * c-ubsan.c : Likewise.
8692 * cilk.c : Likewise.
8693 * stub-objc.c : Likewise.
8695 2015-06-08 Marek Polacek <polacek@redhat.com>
8698 * c-format.c (location_from_offset): Return LOC if LINE is null.
8700 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
8702 * c-common.h (c_parse_final_cleanups): New prototype.
8703 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8705 2015-06-04 Sriraman Tallam <tmsriram@google.com>
8707 * c-common.c (noplt): New attribute.
8708 (handle_noplt_attribute): New handler.
8710 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
8712 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8713 * c-ada-spec.c: Likewise.
8714 * c-cilkplus.c: Likewise.
8715 * c-common.c: Likewise.
8716 * c-common.h: Likewise.
8717 * c-cppbuiltin.c: Likewise.
8718 * c-dump.c: Likewise.
8719 * c-format.c: Likewise.
8720 * c-gimplify.c: Likewise.
8721 * c-indentation.c: Likewise.
8722 * c-lex.c: Likewise.
8723 * c-omp.c: Likewise.
8724 * c-opts.c: Likewise.
8725 * c-pch.c: Likewise.
8726 * c-ppoutput.c: Likewise.
8727 * c-pragma.c: Likewise.
8728 * c-pretty-print.c: Likewise.
8729 * c-semantics.c: Likewise.
8730 * c-ubsan.c: Likewise.
8732 * stub-objc.c: Likewise.
8734 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8737 * c-indentation.c (should_warn_for_misleading_indentation): Use
8738 expand_location rather than expand_location_to_spelling_point.
8739 Don't warn if the guarding statement is more indented than the
8742 2015-06-02 David Malcolm <dmalcolm@redhat.com>
8744 * c-indentation.c (warn_for_misleading_indentation): Bail out
8745 immediately if -Wmisleading-indentation isn't enabled.
8747 2015-06-01 Martin Liska <mliska@suse.cz>
8749 * c-format.c (check_format_arg):Use new type-based pool allocator.
8750 (check_format_info_main) Likewise.
8752 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8754 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8755 (has_nontrivial_methods): Likewise.
8757 2015-05-25 Marek Polacek <polacek@redhat.com>
8759 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8761 2015-05-22 Marek Polacek <polacek@redhat.com>
8764 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8766 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8768 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8769 STACK_GROWS_DOWNWARD.
8771 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
8773 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8774 STACK_GROWS_DOWNWARD rather than if it is defined.
8776 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8779 * c-format.c (location_column_from_byte_offset): New.
8780 (location_from_offset): New.
8781 (struct format_wanted_type): Add offset_loc field.
8782 (check_format_info): Move handling of location for extra arguments
8783 closer to the point of warning.
8784 (check_format_info_main): Pass the result of location_from_offset
8786 (format_type_warning): Pass the result of location_from_offset
8789 2015-05-20 Marek Polacek <polacek@redhat.com>
8791 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8793 2015-05-20 Marek Polacek <polacek@redhat.com>
8795 * c-ada-spec.c (dump_sloc): Use DECL_P.
8797 2015-05-20 Marek Polacek <polacek@redhat.com>
8799 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8800 * c-common.c: Likewise.
8802 2015-05-19 David Malcolm <dmalcolm@redhat.com>
8804 * c-common.h (fe_file_change): Strengthen param from
8805 const line_map * to const line_map_ordinary *.
8806 (pp_file_change): Likewise.
8807 * c-lex.c (fe_file_change): Likewise.
8808 (cb_define): Use linemap_check_ordinary when invoking
8810 (cb_undef): Likewise.
8811 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8812 invoking cb_file_change.
8813 (c_finish_options): Likewise.
8814 (push_command_line_include): Likewise.
8815 (cb_file_change): Strengthen param "new_map" from
8816 const line_map * to const line_map_ordinary *.
8817 * c-ppoutput.c (cb_define): Likewise for local "map".
8818 (pp_file_change): Likewise for param "map" and local "from".
8820 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8822 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8824 2015-05-18 Tom de Vries <tom@codesourcery.com>
8826 * c-common.c (build_va_arg_1): New function.
8827 (build_va_arg): Add address operator to va_list operand if necessary.
8829 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8832 * c-common.c (int_safely_convertible_to_real_p): Define.
8833 (unsafe_conversion_p): Check conversions involving complex types.
8834 (conversion_warning): Add new warning message for conversions which
8835 discard imaginary component.
8836 * c-common.h: (enum conversion_safety): Add new enumerator for such
8839 2015-05-14 Marek Polacek <polacek@redhat.com>
8843 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8844 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8845 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8846 use it. If FOR_INT_CONST, require that all evaluated operands be
8849 2015-05-12 David Malcolm <dmalcolm@redhat.com>
8851 * c-common.h (warn_for_misleading_indentation): New prototype.
8852 * c-indentation.c: New file.
8853 * c.opt (Wmisleading-indentation): New option.
8855 2015-05-12 Tom de Vries <tom@codesourcery.com>
8857 PR tree-optimization/66010
8858 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8860 2015-05-09 Jason Merrill <jason@redhat.com>
8862 * c-opts.c (c_common_post_options): Also clear
8863 cpp_opts->cpp_warn_cxx11_compat.
8865 * c-common.h (enum cxx_dialect): Add cxx_unset.
8866 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8867 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8869 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8870 (std=gnu++0x): Mark as Undocumented.
8871 (std=gnu++1y): Add deprecated message.
8873 2015-05-08 Jason Merrill <jason@redhat.com>
8875 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8878 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8880 2015-05-08 Marek Polacek <polacek@redhat.com>
8883 * c.opt (Woverride-init-side-effects): New option.
8885 2015-05-07 Marek Polacek <polacek@redhat.com>
8888 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8890 * c.opt (Wshift-negative-value): New option.
8891 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8892 when -Wextra and C99/C++11 mode.
8894 2015-05-07 Marek Polacek <polacek@redhat.com>
8895 Martin Uecker <uecker@eecs.berkeley.edu>
8897 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8898 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8900 2015-05-05 Jason Merrill <jason@redhat.com>
8902 * c.opt (Wterminate): New.
8904 2015-04-30 Marek Polacek <polacek@redhat.com>
8906 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8907 require that the non-constant be of a boolean type.
8909 2015-04-29 Josh Triplett <josh@joshtriplett.org>
8911 * c-common.c (handle_section_attribute): Refactor to reduce
8912 nesting and distinguish between error cases.
8914 2015-04-29 Marek Polacek <polacek@redhat.com>
8917 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8920 2015-04-29 Jakub Jelinek <jakub@redhat.com>
8922 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8923 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8924 HOST_BITS_PER_WIDE_INT.
8926 2015-04-28 Tom de Vries <tom@codesourcery.com>
8928 PR tree-optimization/65887
8929 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8931 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8932 Pierre-Marie de Rodat <derodat@adacore.com>
8934 * c-ada-spec.c (in_function): Delete.
8935 (dump_generic_ada_node): Do not change in_function and remove the
8936 redundant code dealing with it.
8937 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8938 (print_ada_methods): Output the static member functions in a nested
8939 package after the regular methods as well as associated renamings.
8941 2015-04-24 Marek Polacek <polacek@redhat.com>
8944 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8945 and OPT_Wshift_count_overflow.
8948 * c-common.c (warn_logical_operator): Warn if the operands have the
8951 2015-04-24 Marek Polacek <polacek@redhat.com>
8954 * c-common.c (warn_logical_operator): Bail if either operand comes
8955 from a macro expansion.
8957 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8960 * c-common.c (c_default_pointer_mode): Add definition.
8961 * c-common.h (c_default_pointer_mode): Add declaration.
8963 2015-03-11 Jakub Jelinek <jakub@redhat.com>
8965 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8966 on record_builtin_type argument.
8968 2015-03-10 Jakub Jelinek <jakub@redhat.com>
8971 * c-common.c (warn_logical_not_parentheses): Don't warn for
8974 2015-03-07 Marek Polacek <polacek@redhat.com>
8977 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8978 before trying to figure out whether we have a flexible array member.
8980 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8981 Jonathan Wakely <jwakely.gcc@gmail.com>
8983 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8985 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8988 * c-ada-spec.c (print_destructor): Remove obsolete code.
8990 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8992 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8993 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8994 DECL_TEMPLATE_RESULT emulations.
8995 (dump_ada_template)): Add guard for TYPE_METHODS.
8997 2015-02-27 Marek Polacek <polacek@redhat.com>
9000 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
9002 2015-02-27 Kai Tietz <ktietz@redhat.com>
9005 * c-pragma.c (handle_pragma_weak): Do not try to create
9006 weak/alias of declarations not being function, or variable
9009 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
9012 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9014 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
9016 2015-02-16 Marek Polacek <polacek@redhat.com>
9019 * c-format.c (check_format_types): Handle null param.
9021 2015-02-13 Marek Polacek <polacek@redhat.com>
9024 * c-format.c (check_format_types): Don't warn about different
9025 signedness if the original value is in the range of WANTED_TYPE.
9027 2015-02-12 Jason Merrill <jason@redhat.com>
9030 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
9031 to the current highest version.
9032 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
9034 2015-02-04 Jakub Jelinek <jakub@redhat.com>
9038 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
9039 instead of RDIV_EXPR. Use build_binary_op instead of
9042 2015-01-30 Joseph Myers <joseph@codesourcery.com>
9044 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
9045 to pass input_location as first argument.
9047 2015-01-23 Tom de Vries <tom@codesourcery.com>
9050 * c.opt (fopenacc): Mark as LTO option.
9052 2015-01-23 Tom de Vries <tom@codesourcery.com>
9055 * c.opt (fopenmp): Mark as LTO option.
9057 2015-01-21 Jakub Jelinek <jakub@redhat.com>
9060 * cilk.c (fill_decls_vec): Only put decls into vector v.
9061 (compare_decls): Fix up formatting.
9063 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
9066 * cilk.c: Include vec.h.
9067 (struct cilk_decls): New structure.
9068 (wrapper_parm_cb): Split this function to...
9069 (fill_decls_vec): ...this...
9070 (create_parm_list): ...and this.
9071 (compare_decls): New function.
9072 (for_local_cb): Remove.
9073 (wrapper_local_cb): Ditto.
9074 (build_wrapper_type): For now first traverse and fill vector of
9075 declarations then sort it and then deal with sorted vector.
9076 (cilk_outline): Ditto.
9077 (declare_one_free_variable): Ditto.
9079 2015-01-21 Jason Merrill <jason@redhat.com>
9082 * c-format.c (check_format_arg): Call decl_constant_value.
9084 2015-01-19 Martin Liska <mliska@suse.cz>
9086 * c-common.c (handle_noicf_attribute): New function.
9088 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
9089 Bernd Schmidt <bernds@codesourcery.com>
9090 James Norris <jnorris@codesourcery.com>
9091 Cesar Philippidis <cesar@codesourcery.com>
9092 Ilmir Usmanov <i.usmanov@samsung.com>
9093 Jakub Jelinek <jakub@redhat.com>
9095 * c.opt (fopenacc): New option.
9096 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
9097 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
9099 * c-common.h (c_finish_oacc_wait): New prototype.
9100 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
9101 (c_finish_oacc_wait): New function.
9102 * c-pragma.c (oacc_pragmas): New variable.
9103 (c_pp_lookup_pragma, init_pragma): Handle it.
9104 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
9105 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
9106 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
9107 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
9108 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
9109 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
9110 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
9111 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
9112 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
9113 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
9114 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
9115 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
9116 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
9117 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
9118 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
9119 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
9120 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
9121 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
9122 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
9123 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
9124 PRAGMA_OACC_CLAUSE_WORKER.
9126 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
9128 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
9129 for the new option fstack-protector_explicit.
9130 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
9131 (handle_stack_protect_attribute): New function.
9133 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
9135 * c.opt: New option -Warray-bounds=.
9137 2015-01-09 Michael Collison <michael.collison@linaro.org>
9139 * array-notation-common.c: Include hash-set.h, machmode.h,
9140 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9141 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
9142 * c-ada-spec.c: Ditto.
9143 * c-cilkplus.c: Ditto.
9144 * c-common.c: Include input.h due to flattening of tree.h.
9145 Define macro GCC_C_COMMON_C.
9146 * c-common.h: Flatten tree.h header files into c-common.h.
9147 Remove include of tree-core.h.
9148 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9149 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9150 fold-const.h, wide-int.h, and inchash.h due to
9151 flattening of tree.h.
9153 * c-format.c: Flatten tree.h header files into c-common.h.
9154 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
9155 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9156 fold-const.h, wide-int.h, and inchash.h due to
9157 flattening of tree.h.
9158 * c-dump.c: Include hash-set.h, machmode.h,
9159 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9160 fold-const.h, wide-int.h, and inchash.h due to
9161 flattening of tree.h.
9162 * c-format.c: Include hash-set.h, machmode.h,
9163 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9164 fold-const.h, wide-int.h, inchash.h and real.h due to
9165 flattening of tree.h.
9166 * c-gimplify.c: Include hash-set.h, machmode.h,
9167 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
9168 fold-const.h, wide-int.h, and inchash.h due to
9169 flattening of tree.h.
9175 * c-ppoutput.c: Ditto.
9176 * c-pragma.c: Ditto.
9177 * c-pretty-print.c: Ditto.
9178 * c-semantics.c: Ditto.
9180 * stub-objc.c: Ditto.
9182 2015-01-08 Jason Merrill <jason@redhat.com>
9184 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
9185 do_ubsan_in_current_function.
9186 (ubsan_maybe_instrument_reference_or_call): Likewise.
9187 * c-ubsan.h: Declare it.
9189 2015-01-08 Mike Stump <mikestump@comcast.net>
9191 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
9193 2015-01-07 Marek Polacek <polacek@redhat.com>
9196 * c-common.c (c_fully_fold_internal): Warn for division and modulo
9197 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
9199 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
9202 * c.opt (Wsuggest-override): New option.
9204 2015-01-05 Jakub Jelinek <jakub@redhat.com>
9206 Update copyright years.
9208 2015-01-05 Marek Polacek <polacek@redhat.com>
9211 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9213 * c-common.h (warn_array_subscript_with_type_char): Update
9216 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9218 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9219 Control macro with flag_sized_deallocation.
9221 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
9223 * c.opt (Wdiscarded-array-qualifiers): New option.
9225 2014-12-19 Jakub Jelinek <jakub@redhat.com>
9227 PR preprocessor/63831
9228 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9229 and __has_cpp_attribute here.
9230 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9231 c_common_has_attribute.
9232 * c-common.h (c_common_has_attribute): New prototype.
9233 * c-lex.c (init_c_lex): Set cb->has_attribute to
9234 c_common_has_attribute instead of cb_has_attribute.
9235 (get_token_no_padding): New function.
9236 (cb_has_attribute): Renamed to ...
9237 (c_common_has_attribute): ... this. No longer static. Use
9238 get_token_no_padding, require ()s, don't build TREE_LIST
9239 unnecessarily, fix up formatting, adjust diagnostics, call
9242 2014-12-15 Jason Merrill <jason@redhat.com>
9244 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9245 (-Wsized-deallocation): New.
9246 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9247 to on in C++14 and up.
9249 2014-12-11 Jason Merrill <jason@redhat.com>
9251 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9253 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9254 we aren't complaining about VLAs.
9256 2014-12-06 Marek Polacek <polacek@redhat.com>
9258 PR tree-optimization/64183
9259 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9260 shift-expression if it is integer_type_node. Use types_compatible_p.
9262 2014-11-29 Jakub Jelinek <jakub@redhat.com>
9264 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9265 last argument from create_tmp_var_raw and create_tmp_var calls.
9266 * cilk.c (gimplify_cilk_spawn): Likewise.
9267 * c-omp.c (c_finish_omp_atomic): Likewise.
9269 2014-11-28 Marek Polacek <polacek@redhat.com>
9271 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9272 instead of unsigned_type_node.
9274 2014-11-28 Marek Polacek <polacek@redhat.com>
9277 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9279 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9280 expression to unsigned_type_node.
9282 2014-11-20 Mark Wielaard <mjw@redhat.com>
9285 * c-opts.c (set_std_c89): Set lang_hooks.name.
9286 (set_std_c99): Likewise.
9287 (set_std_c11): Likewise.
9288 (set_std_cxx98): Likewise.
9289 (set_std_cxx11): Likewise.
9290 (set_std_cxx14): Likewise.
9291 (set_std_cxx1z): Likewise.
9293 2014-11-21 Jakub Jelinek <jakub@redhat.com>
9296 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9297 return type to bool.
9298 * c-common.c: Include gimple-expr.h.
9299 (convert_vector_to_pointer_for_subscript): Change return type to
9300 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9301 and copy it into a TARGET_EXPR and use that instead of *vecp
9304 2014-11-19 David Malcolm <dmalcolm@redhat.com>
9306 Merger of git branch "gimple-classes-v2-option-3".
9307 * ChangeLog.gimple-classes: New.
9308 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9309 from being just a vec<gimple> to a vec<gbind *>.
9311 2014-11-18 Jakub Jelinek <jakub@redhat.com>
9314 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9315 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9316 get_pointer_alignment for non-pointers. Use ptype, or if it is
9317 reference type, corresponding pointer type, as type of kind
9319 (ubsan_maybe_instrument_reference,
9320 ubsan_maybe_instrument_member_call): Adjust callers.
9322 2014-11-15 Marek Polacek <polacek@redhat.com>
9325 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9327 (extract_array_notation_exprs): Return for NULL node.
9329 2014-11-12 Joseph Myers <joseph@codesourcery.com>
9331 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9332 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9334 2014-11-12 Jakub Jelinek <jakub@redhat.com>
9337 * c-common.c (check_builtin_function_arguments): Handle
9338 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9340 2014-11-10 Andi Kleen <ak@linux.intel.com>
9343 * c-common.h (check_no_cilk): Declare.
9344 * cilk.c (get_error_location): New function.
9345 (check_no_cilk): Dito.
9347 2014-11-10 Andi Kleen <ak@linux.intel.com>
9349 * cilk.c (recognize_spawn): Use expression location
9352 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9354 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9356 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9358 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9359 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9360 (__cpp_range_based_for, __cpp_initializer_lists,
9361 __cpp_delegating_constructors, __cpp_nsdmi,
9362 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9363 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9364 __has_cpp_attribute.
9365 * c-lex.c (cb_has_attribute): New callback CPP function;
9366 (init_c_lex): Set has_attribute callback.
9368 2014-11-04 Richard Biener <rguenther@suse.de>
9370 * c-common.c (shorten_compare): Do not shorten mixed
9371 DFP and non-DFP compares.
9373 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9375 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9376 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9377 Commentary and rearrangement of tests.
9378 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9379 Commentary and rearrangement of tests.
9380 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
9381 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9383 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9385 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9386 enum from machine_mode.
9388 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
9390 * c-common.c: Adjust include files.
9391 * c-gimplify.c: Ditto.
9393 * c-pragma.c: Ditto.
9396 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
9398 * c-gimplify.c: Adjust include files.
9400 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9403 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9404 c_common_initialize_diagnostics.
9405 * c-common.h: Likewise.
9407 2014-10-24 Marek Polacek <polacek@redhat.com>
9410 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9411 print "struct"/"union"/"enum" for typedefed names.
9413 2014-10-23 Marek Polacek <polacek@redhat.com>
9415 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9418 2014-10-22 Jakub Jelinek <jakub@redhat.com>
9419 Yury Gribov <y.gribov@samsung.com>
9421 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9422 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9423 instead of flag_sanitize_recover as bool flag.
9425 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9427 * cilk.c: Revert previous change.
9429 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9432 * cilk.c: Include vec.h.
9433 (struct cilk_decls): New structure.
9434 (wrapper_parm_cb): Split this function to...
9435 (fill_decls_vec): ...this...
9436 (create_parm_list): ...and this.
9437 (compare_decls): New function.
9438 (for_local_cb): Remove.
9439 (wrapper_local_cb): Ditto.
9440 (build_wrapper_type): For now first traverse and fill vector of
9441 declarations then sort it and then deal with sorted vector.
9442 (cilk_outline): Ditto.
9443 (declare_one_free_variable): Ditto.
9445 2014-10-17 Marek Polacek <polacek@redhat.com>
9447 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9448 * c.opt (Wimplicit-int): Initialize to -1.
9450 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
9452 * c-pragma.c: Adjust include files.
9453 * c-semantics.c: Likewise.
9455 2014-10-16 DJ Delorie <dj@redhat.com>
9457 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9460 2014-10-14 Jason Merrill <jason@redhat.com>
9463 * c-common.h (CPP_PREPARSED_EXPR): New.
9464 (N_CP_TTYPES): Adjust.
9466 2014-10-15 Marek Polacek <polacek@redhat.com>
9468 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9470 2014-10-14 DJ Delorie <dj@redhat.com>
9472 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9473 types, not just __int128.
9474 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9475 types, not just __int128.
9476 (cpp_atomic_builtins): Round pointer sizes up.
9477 (type_suffix): Use type precision, not specific types.
9478 * c-common.c (c_common_reswords): Remove __int128 special case.
9479 (c_common_type_for_size): Check for all __intN types, not just
9481 (c_common_type_for_mode): Likewise.
9482 (c_common_signed_or_unsigned_type): Likewise.
9483 (c_build_bitfield_integer_type): Likewise.
9484 (c_common_nodes_and_builtins): Likewise.
9485 (keyword_begins_type_specifier): Likewise.
9486 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9489 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9491 * c-common.c: Use hash_table instead of hashtab.
9493 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9495 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
9498 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
9503 * c-common.c (warn_logical_operator): Punt for vectors.
9505 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9507 Implement SD-6: SG10 Feature Test Recommendations
9508 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9509 macros and the __has_header macro.
9511 2014-09-30 Jason Merrill <jason@redhat.com>
9513 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9514 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9515 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9517 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9518 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9520 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9521 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9523 2014-09-24 Marek Polacek <polacek@redhat.com>
9527 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9529 2014-09-23 Andi Kleen <ak@linux.intel.com>
9531 * c-common.c (handle_no_reorder_attribute): New function.
9532 (c_common_attribute_table): Add no_reorder attribute.
9534 2014-09-22 Joseph Myers <joseph@codesourcery.com>
9536 * c-cppbuiltin.c (c_cpp_builtins): Define
9537 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9540 2014-09-18 Joseph Myers <joseph@codesourcery.com>
9542 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9543 for supported floating-point modes.
9545 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9547 * c.opt (Wpsabi): Use LangEnabledBy.
9548 * c-opts.c (c_common_handle_option): Do not handle here.
9550 2014-09-12 Joseph Myers <joseph@codesourcery.com>
9552 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9553 macros for floating-point modes.
9555 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
9558 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9559 __*_DENORM_MIN__ without denormals.
9561 2014-09-10 Jakub Jelinek <jakub@redhat.com>
9563 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9564 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9565 ubsan_create_data callers.
9566 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9567 index is constant or BIT_AND_EXPR with constant mask and is
9568 small enough for the bound.
9569 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9570 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9572 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9574 * c.opt: Add CppReason to various flags.
9575 (Wdate-time): Re-sort.
9576 * c-common.c: Include c-common.h earlier.
9577 (struct reason_option_codes_t): Delete.
9578 (c_option_controlling_cpp_error): Prefix global type and struct
9581 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9583 * c.opt (Wnormalized): New.
9584 (Wnormalized=): Use Enum and Reject Negative.
9585 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9587 2014-09-08 Joseph Myers <joseph@codesourcery.com>
9589 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9590 digits of floating-point modes if -fbuilding-libgcc.
9592 2014-09-05 Joseph Myers <joseph@codesourcery.com>
9594 * c-cppbuiltin.c (c_cpp_builtins): Also define
9595 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9596 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9597 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9598 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9599 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9600 __LIBGCC_STACK_GROWS_DOWNWARD__,
9601 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9602 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9603 __LIBGCC_DWARF_FRAME_REGISTERS__,
9604 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9605 __LIBGCC_STACK_POINTER_REGNUM__ and
9606 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9607 (builtin_define_with_value): Handle backslash-escaping in string
9610 2014-09-05 Richard Biener <rguenther@suse.de>
9613 * c-format.c (check_format_arg): Properly handle
9614 effectively signed POINTER_PLUS_EXPR offset.
9616 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9618 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9619 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9620 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9622 * c-opts.c (c_common_handle_option): Do not handle here.
9623 (sanitize_cpp_opts): Likewise.
9624 * c-common.c (struct reason_option_codes_t): Handle
9625 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9627 2014-09-03 Marek Polacek <polacek@redhat.com>
9629 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9631 2014-09-02 Jakub Jelinek <jakub@redhat.com>
9632 Balaji V. Iyer <balaji.v.iyer@intel.com>
9633 Igor Zamyatin <igor.zamyatin@intel.com>
9635 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9636 * c-common.c (c_common_reswords): Added _Cilk_for.
9637 * c-common.h (enum rid): Added RID_CILK_FOR.
9638 (cilk_for_number_of_iterations): Add declaration.
9639 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9641 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9642 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9644 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9646 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9647 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9648 Wundef): Use CPP, Var and Init.
9649 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9651 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9653 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9654 * c-opts.c (c_common_handle_option): Do not handle here.
9656 2014-08-25 Jason Merrill <jason@redhat.com>
9658 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9659 -std=c++14 and -std=gnu++14, rather than the reverse.
9660 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9661 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9662 * c-common.h (cxx_dialect): Remove cxx1y.
9664 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9666 * c-common.h (enum cxx_dialect): Add cxx14.
9667 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9668 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9669 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9671 2014-08-22 Jason Merrill <jason@redhat.com>
9673 * c.opt (std=gnu++17): Fix alias.
9675 2014-08-22 Marek Polacek <polacek@redhat.com>
9678 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9679 check for vector types. Drop LHS argument.
9680 * c-common.h (warn_logical_not_parentheses): Adjust.
9682 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9684 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9685 (Wmultichar): Likewise.
9686 (Wdate-time): Use C-family languages instead of Common. Use CPP
9688 * c-opts.c (c_common_handle_option): Do not handle the above
9690 (sanitize_cpp_opts): Likewise.
9692 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9695 * c-opts.c: Include tree-diagnostics.h.
9696 (c_diagnostic_finalizer): New.
9697 (c_common_initialize_diagnostics): Use it.
9699 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9701 PR preprocessor/51303
9702 * c-common.c (struct reason_option_codes_t option_codes):
9703 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9705 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9709 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9710 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9711 (c_common_post_options): Call init_global_opts_from_cpp.
9712 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9714 2014-08-19 Marek Polacek <polacek@redhat.com>
9717 * c-common.c (maybe_warn_bool_compare): New function.
9718 * c-common.h (maybe_warn_bool_compare): Declare.
9719 * c.opt (Wbool-compare): New option.
9721 2014-08-19 Marek Polacek <polacek@redhat.com>
9723 * c.opt (Wc99-c11-compat): New option.
9725 2014-08-19 Marek Polacek <polacek@redhat.com>
9727 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9728 to warn_c90_c99_compat.
9729 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9732 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9733 Steven Bosscher <steven@gcc.gnu.org>
9736 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9737 format_check_results.
9738 (check_function_format): Use true and add comment for boolean
9740 (finish_dollar_format_checking): Use explicit location when warning.
9741 (check_format_info): Likewise.
9742 (check_format_arg): Set extra_arg_loc and format_string_loc.
9743 (check_format_info_main): Use explicit location when warning.
9744 (check_format_types): Pass explicit location.
9745 (format_type_warning): Likewise.
9747 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9750 * c-format.c: Handle Fortran flags.
9752 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9755 * array-notation-common.c (find_rank): Added handling for other
9756 types of references.
9758 2014-08-10 Marek Polacek <polacek@redhat.com>
9761 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9762 * c.opt (Wc90-c99-compat): Add option.
9764 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9766 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9768 2014-08-03 Marek Polacek <polacek@redhat.com>
9770 * c-common.c (check_case_value): Add location_t parameter. Use it.
9771 (c_add_case_label): Pass loc to check_case_value.
9773 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9775 * cilk.c: Use hash_map instead of pointer_map.
9777 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9779 * c-gimplify.c: Use hash_set instead of pointer_set.
9781 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9784 * array-notation-common.c (extract_array_notation_exprs): Handling
9787 2014-08-01 Jakub Jelinek <jakub@redhat.com>
9789 * c-common.h (min_align_of_type): Removed prototype.
9790 * c-common.c (min_align_of_type): Removed.
9791 * c-ubsan.h (ubsan_maybe_instrument_reference,
9792 ubsan_maybe_instrument_member_call): New prototypes.
9793 * c-ubsan.c: Include stor-layout.h and builtins.h.
9794 (ubsan_maybe_instrument_reference_or_call,
9795 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9798 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
9801 * c.opt (-Wreturn-local-addr): Move to common.opt.
9803 2014-07-30 Jason Merrill <jason@redhat.com>
9808 * c.opt (-fuse-all-virtuals): New.
9810 2014-07-30 Tom Tromey <tromey@redhat.com>
9813 * c.opt (Wdesignated-init): New option.
9814 * c-common.c (c_common_attribute_table): Add "designated_init".
9815 (handle_designated_init): New function.
9817 2014-07-24 Marek Polacek <polacek@redhat.com>
9820 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9822 2014-07-16 Dodji Seketeli <dodji@redhat.com>
9824 PR preprocessor/60723 - missing system-ness marks for macro tokens
9825 * c-ppoutput.c (struct print::prev_was_system_token): New data
9827 (init_pp_output): Initialize it.
9828 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9829 (do_line_change): Return a flag saying if a line marker was
9831 (scan_translation_unit): Detect if the system-ness of the token we
9832 are about to emit is different from the one of the previously
9833 emitted token. If so, emit a line marker. Avoid emitting useless
9834 adjacent line markers. Avoid emitting line markers for tokens
9835 originating from the expansion of built-in macros.
9836 (scan_translation_unit_directives_only): Adjust.
9838 2014-07-15 Marek Polacek <polacek@redhat.com>
9840 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9841 TYPE_MAX_VALUE is NULL.
9843 2014-07-14 Jakub Jelinek <jakub@redhat.com>
9846 * c.opt (Wmemset-transposed-args): New warning.
9848 2014-07-10 Jason Merrill <jason@redhat.com>
9852 * c.opt (-fuse-all-virtuals): New.
9854 2014-07-09 Richard Biener <rguenther@suse.de>
9857 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9858 using unsigned arithmetic if overflow does not wrap instead of
9859 if overflow is undefined.
9861 2014-07-06 Marek Polacek <polacek@redhat.com>
9864 * c.opt (Wsizeof-array-argument): New option.
9866 2014-07-03 Jakub Jelinek <jakub@redhat.com>
9868 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
9869 comments->count <= 1, as comments->entries might be NULL.
9871 2014-07-01 Marek Polacek <polacek@redhat.com>
9873 * c.opt (Wint-conversion): New option.
9875 2014-07-01 Marek Polacek <polacek@redhat.com>
9878 * c.opt (Wincompatible-pointer-types): New option.
9880 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9883 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9884 Do not discard TYPE_QUALS of type.
9886 2014-06-26 Jason Merrill <jason@redhat.com>
9888 * c-common.h (enum cxx_dialect): Add cxx1z.
9889 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9890 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9892 2014-06-26 Teresa Johnson <tejohnson@google.com>
9894 * c-common.h (get_dump_info): Declare.
9895 * c-gimplify.c (c_genericize): Use saved dump files.
9896 * c-opts.c (c_common_parse_file): Begin and end dumps
9897 once around parsing invocation.
9898 (get_dump_info): New function.
9900 2014-06-23 Marek Polacek <polacek@redhat.com>
9901 Andrew MacLeod <amacleod@redhat.com>
9904 * c-common.c (get_atomic_generic_size): Don't segfault if the
9905 type doesn't have a size.
9907 2014-06-20 Marek Polacek <polacek@redhat.com>
9909 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9910 (ubsan_walk_array_refs_r): New function.
9911 (c_genericize): Instrument array bounds.
9912 * c-ubsan.c: Include "internal-fn.h".
9913 (ubsan_instrument_division): Mark instrumented arrays as having
9914 side effects. Adjust ubsan_type_descriptor call.
9915 (ubsan_instrument_shift): Likewise.
9916 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9917 (ubsan_instrument_bounds): New function.
9918 (ubsan_array_ref_instrumented_p): New function.
9919 (ubsan_maybe_instrument_array_ref): New function.
9920 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9921 (ubsan_array_ref_instrumented_p): Declare.
9922 (ubsan_maybe_instrument_array_ref): Declare.
9924 2014-06-20 Hale Wang <hale.wang@arm.com>
9927 * c.opt (fshort-enums): Add to LTO.
9928 * c.opt (fshort-wchar): Likewise.
9930 2014-06-16 Marek Polacek <polacek@redhat.com>
9933 * c.opt (Wswitch-bool): Add Var.
9935 2014-06-12 Jakub Jelinek <jakub@redhat.com>
9938 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9939 #pragma omp target teams or
9940 #pragma omp {,target }teams distribute simd.
9942 2014-06-12 Jason Merrill <jason@redhat.com>
9944 * c.opt (Wabi=, fabi-compat-version): New.
9945 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9946 (c_common_post_options): Handle flag_abi_compat_version default.
9947 Disallow -fabi-compat-version=1.
9948 * c-common.h (abi_version_crosses): New.
9950 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
9952 * c-common.c (handle_section_attribute): Update handling for
9953 section names that are no longer trees.
9955 2014-06-10 Jakub Jelinek <jakub@redhat.com>
9958 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9959 (omp_pragmas): ... back here.
9961 2014-06-05 Marek Polacek <polacek@redhat.com>
9964 * c-common.c (warn_logical_not_parentheses): New function.
9965 * c-common.h (warn_logical_not_parentheses): Declare.
9966 * c.opt (Wlogical-not-parentheses): New option.
9968 2014-06-04 Marek Polacek <polacek@redhat.com>
9971 * c-common.c (check_case_bounds): Add location parameter.
9973 (c_add_case_label): Pass loc to check_case_bounds.
9975 2014-06-03 Marek Polacek <polacek@redhat.com>
9978 * c.opt (Wswitch-bool): New option.
9980 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9982 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9984 (record_types_used_by_current_var_decl): Move prototype to where
9987 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9988 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9989 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9991 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9993 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9994 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9996 * c-pretty-print.c (pp_c_void_constant): New function.
9997 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9998 (c_pretty_printer::expression): Handle VOID_CST.
9999 * cilk.c (extract_free_variables): Likewise.
10000 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
10001 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
10003 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
10005 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
10006 * c-pragma.c (push_alignment): Adjust.
10007 (handle_pragma_push_options): Likewise.
10009 2014-05-09 Marek Polacek <polacek@redhat.com>
10012 * c-common.c (check_user_alignment): Return -1 if alignment is error
10014 (handle_aligned_attribute): Don't call default_conversion on
10016 (handle_vector_size_attribute): Likewise.
10017 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
10018 (handle_sentinel_attribute): Call default_conversion and allow even
10019 integral types as an argument.
10021 2014-05-08 Marek Polacek <polacek@redhat.com>
10024 * c-common.c (min_align_of_type): New function factored out from...
10025 (c_sizeof_or_alignof_type): ...here.
10026 * c-common.h (min_align_of_type): Declare.
10028 2014-05-08 Marek Polacek <polacek@redhat.com>
10031 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
10032 parameter type of main.
10034 2014-05-07 DJ Delorie <dj@redhat.com>
10036 * c-cppbuiltin.c (print_bits_of_hex): New.
10037 (builtin_define_type_minmax): Print values using hex so as not to
10038 require a pre-computed list of string values.
10040 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
10041 Mike Stump <mikestump@comcast.net>
10042 Richard Sandiford <rdsandiford@googlemail.com>
10044 * c-ada-spec.c: Include wide-int.h.
10045 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
10046 (dump_generic_ada_node): Use wide-int interfaces.
10047 * c-common.c: Include wide-int-print.h.
10048 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
10049 (pointer_int_sum): Use wide-int interfaces.
10050 (c_common_nodes_and_builtins): Use make_int_cst.
10051 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
10052 (handle_alloc_size_attribute): Use wide-int interfaces.
10053 (get_nonnull_operand): Likewise.
10054 * c-format.c (get_constant): Use tree_fits_uhwi_p.
10055 * c-lex.c: Include wide-int.h.
10056 (narrowest_unsigned_type): Take a widest_int rather than two
10058 (narrowest_signed_type): Likewise.
10059 (interpret_integer): Update accordingly. Use wide-int interfaces.
10060 (lex_charconst): Use wide-int interfaces.
10061 * c-pretty-print.c: Include wide-int.h.
10062 (pp_c_integer_constant): Use wide-int interfaces.
10063 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
10064 INT_CST_LT_UNSIGNED.
10066 2014-05-06 Richard Biener <rguenther@suse.de>
10068 * c-opts.c (c_common_post_options): For -freestanding,
10069 -fno-hosted and -fno-builtin disable pattern recognition
10070 if not enabled explicitely.
10072 2014-05-02 Marek Polacek <polacek@redhat.com>
10074 * c.opt (Wsizeof-pointer-memaccess): Describe option.
10076 2014-05-01 Marek Polacek <polacek@redhat.com>
10079 * c.opt (Wdiscarded-qualifiers): Add.
10081 2014-04-30 Marek Polacek <polacek@redhat.com>
10083 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
10084 INT_MIN / -1 sanitization only for integer types.
10086 2014-04-25 Marek Polacek <polacek@redhat.com>
10089 * c-common.c (handle_noinline_attribute): Warn if the attribute
10090 conflicts with always_inline attribute.
10091 (handle_always_inline_attribute): Warn if the attribute conflicts
10092 with noinline attribute.
10094 2014-04-25 Marek Polacek <polacek@redhat.com>
10097 * c-common.c (check_main_parameter_types): Warn about variadic main.
10099 2014-04-24 Mike Stump <mikestump@comcast.net>
10101 * c.opt (Wshadow-ivar): Default to on.
10103 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
10105 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
10107 2014-04-23 Marek Polacek <polacek@redhat.com>
10109 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
10111 2014-04-22 Jakub Jelinek <jakub@redhat.com>
10114 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
10115 if flag_sanitize_undefined_trap_on_error.
10116 (ubsan_instrument_division, ubsan_instrument_shift,
10117 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
10118 if !flag_sanitize_recover.
10120 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
10123 * c-common.c (registered_builtin_types): Make non-static.
10124 * c-common.h (registered_builtin_types): Declare.
10126 2014-04-14 Richard Biener <rguenther@suse.de>
10127 Marc Glisse <marc.glisse@inria.fr>
10130 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
10131 apply may-alias the scalar pointer type when applicable.
10133 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
10135 PR middle-end/60467
10136 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
10137 as possible argument for Cilk_spawn.
10139 2014-04-11 Tobias Burnus <burnus@net-b.de>
10142 * c.opt (Wformat-signedness): Add
10143 * c-format.c(check_format_types): Use it.
10145 2014-04-11 Jason Merrill <jason@redhat.com>
10148 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
10149 default_conversion for an array argument.
10151 2014-04-08 Marek Polacek <polacek@redhat.com>
10154 * c-ubsan.c: Include asan.h.
10155 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
10157 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
10159 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
10161 2014-04-02 Marek Polacek <polacek@redhat.com>
10163 * c-common.h (c_expand_expr): Remove declaration.
10165 2014-03-28 Jakub Jelinek <jakub@redhat.com>
10168 * c-common.c (add_atomic_size_parameter): When creating new
10169 params vector, push the size argument first.
10171 2014-03-26 Jakub Jelinek <jakub@redhat.com>
10173 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
10174 ubsan_instrument_vla, ubsan_instrument_return): Adjust
10175 ubsan_create_data callers.
10177 2014-03-22 Jakub Jelinek <jakub@redhat.com>
10180 * c-opts.c (c_finish_options): Restore cb_file_change call to
10183 2014-03-13 Jakub Jelinek <jakub@redhat.com>
10185 PR middle-end/36282
10186 * c-pragma.c (apply_pragma_weak): Only look at
10187 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
10188 DECL_ASSEMBLER_NAME_SET_P (decl).
10189 (maybe_apply_pending_pragma_weaks): Exit early if
10190 vec_safe_is_empty (pending_weaks) rather than only when
10192 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
10193 set assembler name back to NULL afterwards.
10195 2014-03-11 Jason Merrill <jason@redhat.com>
10197 * c.opt: Add -std=gnu++14.
10199 2014-03-11 Ian Bolton <ian.bolton@arm.com>
10201 * c-opts.c (c_common_post_options): Don't override
10202 -ffp-contract=fast if unsafe-math-optimizations is on.
10204 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
10206 * c.opt: Enable LTO FE for fshort-double.
10208 2014-03-07 Jason Merrill <jason@redhat.com>
10210 * c.opt: Add -std=c++14.
10212 2014-03-06 Marek Polacek <polacek@redhat.com>
10215 * cilk.c (contains_cilk_spawn_stmt): New function.
10216 (contains_cilk_spawn_stmt_walker): Likewise.
10217 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10218 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10220 2014-03-03 Jakub Jelinek <jakub@redhat.com>
10222 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10223 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10224 even when flag_preprocess_only.
10226 2014-02-26 Jason Merrill <jason@redhat.com>
10230 * c-common.c (shorten_compare): Don't check
10231 c_inhibit_evaluation_warnings.
10233 2014-02-19 Jakub Jelinek <jakub@redhat.com>
10236 * c-common.c (c_common_nodes_and_builtins): When initializing
10237 c_uint{16,32,64}_type_node, also set corresponding
10238 uint{16,32,64}_type_node to the same value.
10241 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10242 for PRAGMA_IVDEP if flag_preprocess_only.
10244 2014-02-12 Jakub Jelinek <jakub@redhat.com>
10247 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10248 if false, add ADD itself, rather than vice versa.
10249 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10250 copy. For SAVE_EXPR, only call merge_tlist once.
10252 2014-02-08 Jakub Jelinek <jakub@redhat.com>
10254 PR middle-end/60092
10255 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10257 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10259 (c_common_attribute_table): Add alloc_align and assume_aligned
10262 2014-02-06 Marek Polacek <polacek@redhat.com>
10265 * c-common.c (warn_for_sign_compare): Call warning_at with location
10266 instead of warning.
10268 2014-02-05 Marek Polacek <polacek@redhat.com>
10271 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10274 2014-02-04 Marek Polacek <polacek@redhat.com>
10277 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10280 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
10284 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10285 handle_vector_size_attribute, handle_nonnull_attribute): Call
10286 default_conversion on the attribute argument.
10287 (handle_nonnull_attribute): Increment the argument number.
10289 2014-01-31 Marek Polacek <polacek@redhat.com>
10292 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10293 build_function_call_vec.
10294 (resolve_overloaded_builtin): Likewise.
10295 * c-common.h (build_function_call_vec): Adjust declaration.
10297 2014-01-30 Marek Polacek <polacek@redhat.com>
10300 * c-common.h (unsafe_conversion_p): Adjust declaration.
10301 (warnings_for_convert_and_check): Likewise.
10302 (convert_and_check): Likewise.
10303 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10304 expansion_point_location_if_in_system_header on it.
10305 (warnings_for_convert_and_check): Add location parameter. Call
10306 expansion_point_location_if_in_system_header on it. Use it.
10307 (convert_and_check): Add location parameter. Use it.
10308 (conversion_warning): Likewise.
10309 (c_add_case_label): Adjust convert_and_check calls.
10310 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10312 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10314 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10316 * c-pragma.c (init_pragma): Likewise.
10319 2014-01-23 Marek Polacek <polacek@redhat.com>
10322 * c-common.c (shorten_compare): Add location_t parameter.
10323 * c-common.h (shorten_binary_op): Adjust declaration.
10325 2014-01-23 Marek Polacek <polacek@redhat.com>
10328 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10329 * c-common.h: Declare it.
10331 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10333 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10334 * c-ada-spec.c (dump_ads): Likewise.
10335 (cpp_check): Likewise.
10336 (dump_ada_specs): Likewise.
10338 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
10341 * c-common.c (handle_no_instrument_function_attribute): Allow
10342 no_instrument_function attribute in class member
10343 definition/declaration.
10345 2014-01-15 Jakub Jelinek <jakub@redhat.com>
10348 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10349 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10350 being COMPOUND_EXPR.
10351 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10352 operand a SAVE_EXPR and second MODIFY_EXPR.
10354 2014-01-09 Jakub Jelinek <jakub@redhat.com>
10357 * c-pch.c (c_common_write_pch): Call
10358 prepare_target_option_nodes_for_pch.
10360 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10362 Update copyright years
10364 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10366 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10367 the copyright notice.
10369 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10371 * c-ada-spec.c (print_constructor): New function.
10372 (print_destructor): Retrieve the origin of the destructor.
10373 (print_ada_declaration): Revamp handling of constructors/destructors.
10375 2013-12-23 Stuart Hastings <stuart@apple.com>
10376 Bill Maddox <maddox@google.com>
10377 Jason Merrill <jason@redhat.com>
10379 * c.opt: Add -fdeclone-ctor-dtor.
10380 * c-opts.c (c_common_post_options): Default to on iff -Os.
10382 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10384 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10386 * c-pragma.h (enum pragma_cilk_clause): Remove.
10387 (enum pragma_omp_clause): Added the following fields:
10388 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10389 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10390 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10391 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10392 PRAGMA_CILK_CLAUSE_UNIFORM.
10395 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10397 * cilk.c (cilk_outline): Made this function non-static.
10398 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10399 (create_cilk_wrapper): Added a new parameter: a function pointer.
10400 (c_install_body_w_frame_cleanup): Remove
10401 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10402 * c-common.h (cilk_outline): New prototype.
10403 (gimplify_cilk_spawn): Removed two parameters.
10404 (cilk_install_body_with_frame_cleanup): New prototype.
10405 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10406 CILK_SPAWN_STMT case.
10408 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10410 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10412 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10413 (int_array_type_node): Remove.
10414 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10416 2013-12-05 Marek Polacek <polacek@redhat.com>
10419 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10420 [ADJUST_FIELD_ALIGN].
10422 2013-12-04 Joseph Myers <joseph@codesourcery.com>
10425 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10426 and check field alignment if set.
10427 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10428 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10430 2013-12-04 Jakub Jelinek <jakub@redhat.com>
10431 Marek Polacek <polacek@redhat.com>
10433 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10434 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10436 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10439 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10442 2013-11-29 Jakub Jelinek <jakub@redhat.com>
10445 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10446 goto invalid. If it is error_mark_node, don't issue further
10449 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10451 * c.opt (Wopenmp-simd): New.
10453 2013-11-22 Jakub Jelinek <jakub@redhat.com>
10455 * c-ubsan.h (ubsan_instrument_return): New prototype.
10456 * c-ubsan.c (ubsan_instrument_return): New function.
10458 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
10460 * c-common.c: Add required include files from gimple.h.
10461 * c-gimplify.c: Likewise.
10462 * cilk.c: Likewise.
10464 2013-11-22 David Malcolm <dmalcolm@redhat.com>
10466 * c-common.c (unsafe_conversion_p): Remove use of
10467 EXPR_LOC_OR_HERE macro.
10468 (conversion_warning): Likewise.
10469 (warnings_for_convert_and_check): Likewise.
10470 (warn_for_collisions_1): Likewise.
10471 (shorten_compare): Likewise, and remove use of in_system_header
10472 macro, using the location from the former.
10473 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10474 (cb_def_pragma): Remove use of in_system_header macro.
10475 (lex_string): Likewise.
10476 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10478 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10479 Mike Stump <mikestump@comcast.net>
10480 Richard Sandiford <rdsandiford@googlemail.com>
10482 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10483 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10484 tree_fits_shwi_p or tree_fits_uhwi_p.
10485 (dump_generic_ada_node): Likewise.
10486 * c-format.c (check_format_arg): Likewise.
10487 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10489 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10491 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10493 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10496 * c-common.c (unsafe_conversion_p): Make this function
10497 return an enumeration with more detail.
10498 (conversion_warning): Use the new return type of
10499 unsafe_conversion_p to separately warn either about conversions
10500 that lower floating point number precision or about the other
10501 kinds of conversions.
10502 * c-common.h (enum conversion_safety): New enumeration.
10503 (unsafe_conversion_p): switching return type to
10504 conversion_safety enumeration.
10505 * c.opt: Adding new warning -Wfloat-conversion and
10506 enabling it with -Wconversion.
10508 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10510 * c-opts.c: Include plugin.h.
10511 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
10513 2013-11-19 Marek Polacek <polacek@redhat.com>
10515 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10517 (ubsan_instrument_shift): Likewise.
10518 (ubsan_instrument_vla): Likewise.
10520 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10522 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10523 cast to unsigned type.
10525 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10527 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10529 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10530 rather than tree_low_cst.
10532 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10534 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10535 tree_to_uhwi throughout.
10537 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10539 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10540 tree_low_cst (..., 0) with tree_to_shwi throughout.
10542 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10544 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10545 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10547 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10549 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10550 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10552 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
10554 * c-cilkplus.c: New file.
10555 * c-common.c (readonly_error): Add location argument.
10556 * c-common.h (readonly_error): Same.
10557 (c_finish_cilk_clauses): Protoize.
10558 (c_check_cilk_loop): Same.
10559 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10560 Do not fail on error_mark_node.
10561 Abstract increment canonicalization to here...
10562 (c_omp_for_incr_canonicalize_ptr): New.
10563 c-pragma.c (init_pragma): Register "simd" pragma.
10564 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10565 (enum pragma_cilk_clause): New.
10567 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10569 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10570 wchar_type and host_integerp checks.
10572 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
10574 * c-common.c: Likewise.
10575 * c-gimplify.c: Likewise.
10576 * cilk.c: Likewise.
10578 2013-11-14 Diego Novillo <dnovillo@google.com>
10580 * c-common.c: Include fold-const.h.
10581 Include stor-layout.h.
10583 Include stringpool.h.
10586 Include trans-mem.h.
10587 * c-cppbuiltin.c: Include stor-layout.h.
10588 Include stringpool.h.
10589 * c-format.c: Include stringpool.h.
10590 * c-lex.c: Include stringpool.h.
10591 Include stor-layout.h.
10592 * c-pragma.c: Include stringpool.h.
10595 Include gcc-symtab.h.
10596 * c-pretty-print.c: Include stor-layout.h.
10598 * cilk.c: Include stringpool.h.
10601 2013-11-13 Joseph Myers <joseph@codesourcery.com>
10603 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10604 * c-common.c (c_common_reswords): Add __auto_type.
10605 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10607 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
10609 * c-common.c: Include gimplify.h.
10610 * c-gimplify.c: Likewise.
10611 * cilk.c: Likewise.
10612 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10613 * c-ubsan.c: Don't include gimple.h.
10615 2013-11-12 Joseph Myers <joseph@codesourcery.com>
10617 * c-common.c (c_common_reswords): Add _Thread_local.
10619 2013-11-09 Joseph Myers <joseph@codesourcery.com>
10621 * c-common.c (atomic_size_supported_p): New function.
10622 (resolve_overloaded_atomic_exchange)
10623 (resolve_overloaded_atomic_compare_exchange)
10624 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10625 Use it instead of comparing size with a local list of sizes.
10627 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
10628 Joseph Myers <joseph@codesourcery.com>
10630 * c-common.h (enum rid): Add RID_ATOMIC.
10631 * c-common.c (c_common_reswords): Add _Atomic.
10632 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10633 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10634 * c-format.c (check_format_types): Check for extra _Atomic
10635 qualifiers in format argument.
10636 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10637 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10639 2013-11-06 Tobias Burnus <burnus@net-b.de>
10641 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10643 2013-11-06 Joseph Myers <joseph@codesourcery.com>
10645 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10647 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10648 to mean lack of IEEE 754 support.
10650 2013-11-05 Tobias Burnus <burnus@net-b.de>
10652 * c.opt (-Wdate-time): New option
10653 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10655 2013-11-05 Joseph Myers <joseph@codesourcery.com>
10657 * c-cppbuiltin.c (cpp_iec_559_value): Test
10658 flag_excess_precision_cmdline not flag_excess_precision.
10660 2013-11-05 Tobias Burnus <burnus@net-b.de>
10662 * c.opt (fopenmp-simd): New option.
10663 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10664 (omp_pragmas): ... this new struct.
10665 (c_pp_lookup_pragma): Also walk omp_pragmas.
10666 (init_pragma): Init pragmas for -fopenmp-simd.
10668 2013-11-04 Marek Polacek <polacek@redhat.com>
10671 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10673 2013-11-04 Joseph Myers <joseph@codesourcery.com>
10675 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10677 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10679 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10681 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10682 (dump_ada_specs): Adjust prototype of second callback.
10683 * c-ada-spec.c (cpp_check): New global variable.
10684 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10685 (print_generic_ada_decl): Likewise.
10686 (has_static_fields): Change return type to bool and add guard.
10687 (has_nontrivial_methods): New predicate.
10688 (is_tagged_type): Change return type to bool.
10689 (separate_class_package): Call has_nontrivial_methods.
10690 (pp_ada_tree_identifier): Minor tweaks.
10691 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10692 (dump_ada_array_domains): Likewise.
10693 (dump_ada_array_type): Likewise.
10694 (dump_template_types): Remove cpp_check parameter and do not pass it to
10695 dump_generic_ada_node.
10696 (dump_ada_template): Likewise.
10697 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10699 (print_ada_methods): Change return type to integer. Remove cpp_check
10700 parameter and do not pass it down.
10701 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10702 dump_generic_ada_node.
10703 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10705 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10706 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10707 value of print_ada_methods.
10708 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10709 Set cpp_check to it before invoking dump_ada_nodes.
10710 (dump_ada_specs): Likewise.
10712 2013-11-03 Marek Polacek <polacek@redhat.com>
10714 * c-ubsan.c: Don't include hash-table.h.
10715 (ubsan_instrument_vla): New function.
10716 * c-ubsan.h: Declare it.
10718 2013-10-31 David Malcolm <dmalcolm@redhat.com>
10720 Automated part of renaming of symtab_node_base to symtab_node.
10722 Patch autogenerated by rename_symtab.py from
10723 https://github.com/davidmalcolm/gcc-refactoring-scripts
10724 revision 58bb219cc090b2f4516a9297d868c245495ee622
10726 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10727 symtab_node_base to symtab_node.
10729 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10731 Implement C++14 digit separators.
10732 * c-lex.c (interpret_float): Remove digit separators from scratch string
10733 before building real literal.
10735 2013-10-30 Jakub Jelinek <jakub@redhat.com>
10737 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10739 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10741 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10743 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10745 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10746 (insert_cilk_frame): New prototype.
10747 (cilk_init_builtins): Likewise.
10748 (gimplify_cilk_spawn): Likewise.
10749 (c_cilk_install_body_w_frame_cleanup): Likewise.
10750 (cilk_detect_spawn_and_unwrap): Likewise.
10751 (cilk_set_spawn_marker): Likewise.
10752 (build_cilk_sync): Likewise.
10753 (build_cilk_spawn): Likewise.
10754 * cilk.c: New file.
10756 2013-10-29 David Malcolm <dmalcolm@redhat.com>
10758 Patch autogenerated by refactor_symtab.py from
10759 https://github.com/davidmalcolm/gcc-refactoring-scripts
10760 revision 58bb219cc090b2f4516a9297d868c245495ee622
10762 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10763 to a true class hierarchy.
10764 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10766 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10768 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10770 2013-10-26 Jeff Law <law@redhat.com>
10772 * c-common.c (c_define_builtins): Remove mudflap support.
10773 * c.opt: Ignore and warn for mudflap options.
10775 2013-10-24 Tobias Burnus <burnus@net-b.de>
10778 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10779 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10781 2013-10-23 Jason Merrill <jason@redhat.com>
10783 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10785 2013-10-11 Jakub Jelinek <jakub@redhat.com>
10787 * c-common.h (omp_clause_mask::operator !=): New method.
10788 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10789 instead of if (mask & something) tests everywhere.
10791 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10792 201307 instead of 201107.
10793 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10794 (c_common_attribute_table): Add "omp declare target" and
10795 "omp declare simd" attributes.
10796 (handle_omp_declare_target_attribute,
10797 handle_omp_declare_simd_attribute): New functions.
10798 * c-omp.c: Include c-pragma.h.
10799 (c_finish_omp_taskgroup): New function.
10800 (c_finish_omp_atomic): Add swapped argument, if true,
10801 build the operation first with rhs, lhs arguments and use NOP_EXPR
10803 (c_finish_omp_for): Add code argument, pass it down to make_code.
10804 (c_omp_split_clauses): New function.
10805 (c_split_parallel_clauses): Removed.
10806 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10807 c_omp_declare_simd_clauses_to_decls): New functions.
10808 * c-common.h (omp_clause_mask): New type.
10809 (OMP_CLAUSE_MASK_1): Define.
10810 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10811 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10812 omp_clause_mask::operator |, omp_clause_mask::operator &,
10813 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10814 omp_clause_mask::operator ==): New methods.
10815 (enum c_omp_clause_split): New.
10816 (c_finish_omp_taskgroup): New prototype.
10817 (c_finish_omp_atomic): Add swapped argument.
10818 (c_finish_omp_for): Add code argument.
10819 (c_omp_split_clauses): New prototype.
10820 (c_split_parallel_clauses): Removed.
10821 (c_omp_declare_simd_clauses_to_numbers,
10822 c_omp_declare_simd_clauses_to_decls): New prototypes.
10823 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10824 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10825 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10826 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10827 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10828 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10829 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10830 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10831 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10832 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10833 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10834 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10835 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10836 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10837 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10838 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10839 PRAGMA_OMP_CLAUSE_UNIFORM.
10841 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
10843 PR tree-optimization/20318
10844 * c-common.c (handle_returns_nonnull_attribute): New function.
10845 (c_common_attribute_table): Add returns_nonnull.
10847 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
10850 * c.opt (fcheck-new): Move to common.opt.
10852 2013-09-25 Marek Polacek <polacek@redhat.com>
10853 Jakub Jelinek <jakub@redhat.com>
10856 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10857 an expression if we can prove it is correct.
10858 (ubsan_instrument_division): Likewise. Remove unnecessary
10861 2013-09-18 Marek Polacek <polacek@redhat.com>
10864 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10866 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10868 2013-09-14 Iain Sandoe <iain@codesourcery.com>
10871 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10872 fobjc-gc, freplace-objc-classes): Accept for LTO.
10874 2013-09-13 Jacek Caban <jacek@codeweavers.com>
10876 * c-target.def: New hook
10878 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10881 * c.opt (Wdelete-incomplete): Add.
10883 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10885 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10886 (vector_types_compatible_elements_p): New function.
10887 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10889 (vector_types_compatible_elements_p): Declare.
10891 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10893 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10894 a virtual member function.
10895 (pp_simple_type_specifier): Remove.
10896 (pp_c_type_specifier): Likewise.
10897 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10898 Rename from pp_c_type_specifier. Adjust.
10899 (c_pretty_printer::c_pretty_printer): Do not assign to
10900 simple_type_specifier.
10902 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10904 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10906 (c_pretty_printer::storage_class_specifier): Likewise.
10907 (c_pretty_printer::initializer): Likewise.
10908 (pp_declaration): Remove.
10909 (pp_declaration_specifiers): Likewise.
10910 (pp_abstract_declarator): Likewise.
10911 (pp_declarator): Likewise.
10912 (pp_type_id): Likewise.
10913 (pp_statement): Likewise.
10914 (pp_constant): Likewise.
10915 (pp_id_expression): Likewise.
10916 (pp_primary_expression): Likewise.
10917 (pp_unary_expression): Likewise.
10918 (pp_multiplicative_expression): Likewise.
10919 (pp_conditional_expression): Likewise.
10920 (pp_assignment_expression): Likewise.
10921 (pp_expression): Likewise.
10922 (pp_c_type_id): Likewise.
10923 (pp_c_storage_class_specifier): Likewise.
10924 * c-pretty-print.c (pp_c_type_cast): Tidy.
10925 (pp_c_pointer): Likewise.
10926 (pp_c_type_specifier): Likewise.
10927 (pp_c_parameter_type_list): Likewise.
10928 (pp_c_function_definition): Likewise.
10929 (pp_c_init_declarator): Likewise.
10930 (pp_c_initializer_list): Likewise.
10931 (pp_c_constructor_elts): Likewise.
10932 (c_pretty_printer::direct_abstract_declarator): Likewise.
10933 (c_pretty_printer::declaration_specifiers): Likewise.
10934 (c_pretty_printer::primary_expression): Likewise.
10935 (c_pretty_printer::postfix_expression): Likewise.
10936 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10937 (c_pretty_printer::storage_class_specifier): Rename from
10938 pp_c_storage_class_specifier.
10939 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10940 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10941 storage_class_specifier, initializer, offset_list, flags.
10943 2013-08-30 Marek Polacek <polacek@redhat.com>
10945 * c-ubsan.c: New file.
10946 * c-ubsan.h: New file.
10948 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10950 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10952 (c_pretty_printer::declaration_specifiers): Likewise.
10953 (c_pretty_printer::declarator): Likewise.
10954 (c_pretty_printer::abstract_declarator): Likewise.
10955 (c_pretty_printer::direct_abstract_declarator): Likewise.
10956 (c_pretty_printer::direct_declarator): Likewise.
10957 (c_pretty_printer::function_specifier): Likewise.
10958 (pp_declaration): Adjust.
10959 (pp_declaration_specifiers): Likewise.
10960 (pp_abstract_declarator): Likewise.
10961 (pp_direct_declarator): Likewise.
10962 (pp_function_specifier): Likewise.
10963 (pp_direct_abstract_declarator): Remove as unused.
10964 (pp_c_declaration): Remove.
10965 (pp_c_declaration_specifiers): Likewise.
10966 (pp_c_declarator): Likewise.
10967 (pp_c_direct_declarator): Likewise.
10968 (pp_c_function_specifier): Likewise.
10969 (pp_c_direct_abstract_declarator): Likewise.
10970 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10971 from pp_c_abstract_declarator. Adjust.
10972 (c_pretty_printer::direct_abstract_declarator): Rename from
10973 pp_c_direct_abstract_declarator. Adjust.
10974 (c_pretty_printer::function_specifier): Rename from
10975 pp_c_function_specifier. Adjust.
10976 (c_pretty_printer::declaration_specifiers): Rename from
10977 pp_c_declaration_specifiers. Adjust.
10978 (c_pretty_printer::direct_declarator): Rename from
10979 pp_c_direct_declarator. Adjust.
10980 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10981 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10982 (c_pretty_printer::c_pretty_printer): Do not assign to
10983 declaration, declaration_specifiers, declarator,
10984 direct_declarator, direct_abstract_declarator, function_specifier.
10986 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10988 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10989 virtual member function.
10990 (c_pretty_printer::multiplicative_expression): Likewise.
10991 (c_pretty_printer::conditional_expression): Likewise.
10992 (c_pretty_printer::assignment_expression): Likewise.
10993 (c_pretty_printer::expression): Likewise.
10994 (pp_unary_expression): Adjust.
10995 (pp_multiplicative_expression): Likewise.
10996 (pp_assignment_expression): Likewise.
10997 (pp_conditional_expression): Likewise.
10998 (pp_expression): Likewise.
10999 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
11000 from pp_c_unary_expression. Adjust.
11001 (c_pretty_printer::multiplicative_expression): Rename from
11002 pp_c_multiplicative_expression. Adjust.
11003 (c_pretty_printer::conditional_expression): Rename from
11004 pp_c_conditional_expression. Adjust.
11005 (c_pretty_printer::assignment_expression): Rename from
11006 pp_c_assignment_expression. Adjust.
11007 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
11008 (c_pretty_printer::c_pretty_printer): Do not assign to
11009 unary_expression, multiplicative_expression,
11010 conditional_expression, expression.
11012 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11014 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
11015 virtual member function.
11016 (pp_postfix_expression): Adjust.
11017 (pp_c_postfix_expression): Remove.
11018 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
11019 from pp_c_postfix_expression. Adjust.
11020 (c_pretty_printer::c_pretty_printer): Do not assign to
11021 postfix_expression.
11023 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11025 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
11026 virtua member function.
11027 (pp_primary_expression): Adjust.
11028 (pp_c_primary_expression): Remove.
11029 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
11030 from pp_c_primary_expression. Adjust.
11031 (pp_c_initializer_list): Use pp_primary_expression.
11032 (c_pretty_printer::c_pretty_printer): Do not assign to
11033 primary_expression.
11035 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
11037 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
11038 * c-pretty-print.c (M_): Remove.
11039 (c_pretty_printer::translate_string): Define.
11040 (pp_c_type_specifier): Use it.
11041 (pp_c_primary_expression): Likewise.
11042 (pp_c_expression): Likewise.
11044 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11046 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
11048 (pp_c_id_expression): Remove.
11049 (pp_id_expression): Adjust.
11050 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
11051 pp_c_id_expression. Adjust.
11052 (pp_c_postfix_expression): Use pp_id_expression.
11053 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
11055 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
11057 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
11059 (pp_constant): Adjust.
11060 (pp_c_constant): Remove.
11061 * c-pretty-print.c (c_pretty_printer::constant): Rename from
11062 pp_c_constant. Adjust.
11064 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
11065 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
11067 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11069 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
11070 (c_pretty_printer::c_pretty_printer): Declare.
11071 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
11072 c_pretty_printer_init. Adjust.
11073 (print_c_tree): Do not call c_pretty_printer_init.
11074 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
11076 2013-08-09 Arnaud Charlet <charlet@adacore.com>
11078 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
11080 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
11083 * c-common.c (pointer_int_sum): Add bool parameter.
11084 * c-common.h (pointer_int_sum): Adjust declaration.
11086 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
11088 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
11089 c_pretty_printer variable.
11091 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
11093 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
11095 (pp_c_base): Likewise. Adjust users.
11096 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
11097 (pp_c_whitespace): Do not call pp_base.
11098 (pp_c_left_paren): Likewise.
11099 (pp_c_right_paren): Likewise.
11100 (pp_c_left_brace): Likewise.
11101 (pp_c_right_brace): Likewise.
11102 (pp_c_left_bracket): Likewise.
11103 (pp_c_right_bracket): Likewise.
11104 (pp_c_dot): Likewise.
11105 (pp_c_ampersand): Likewise.
11106 (pp_c_star): Likewise.
11107 (pp_c_arrow): Likewise.
11108 (pp_c_semicolon): Likewise.
11109 (pp_c_complement): Likewise.
11110 (pp_c_exclamation): Likewise.
11111 (pp_c_direct_declarator): Likewise.
11112 (pp_c_ws_string): Likewise.
11113 (pp_c_identifier): Likewise.
11114 (pp_c_statement): Likewise.
11115 (print_c_tree): Likewise.
11117 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
11120 * c-common.c (c_parse_error): Catch user-defined literal tokens and
11121 provide useful error strings.
11123 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11125 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
11126 printer functions instead of pp_string or operators and punctuators.
11127 (dump_generic_ada_node): Likewise.
11128 * c-pretty-print.c (pp_c_type_specifier): Likewise.
11129 (pp_c_relational_expression): Likewise.
11130 (pp_c_logical_or_expression): Likewise.
11132 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
11134 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
11135 functions instead of pp_character.
11136 (pp_ada_tree_identifier): Likewise.
11137 (dump_ada_double_name): Likewise.
11138 (dump_ada_function_declaration): Likewise.
11139 (dump_ada_array_domains): Likewise.
11140 (dump_template_types): Likewise.
11141 (dump_generic_ada_node): Likewise.
11142 (print_ada_declaration): Likewise.
11143 (print_ada_struct_decl): Likewise.
11144 * c-pretty-print.c (pp_c_integer_constant): Likewise.
11146 2013-07-23 Tom Tromey <tromey@redhat.com>
11148 * c-common.h (enum rid) <RID_GENERIC>: New constant.
11149 * c-common.c (c_common_reswords): Add _Generic.
11151 2013-07-21 OndÅ
\99ej BÃlka <neleai@seznam.cz>
11153 * c-common.c: Fix typos.
11154 * c-common.h: Likewise.
11156 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
11159 * c-common.c (c_common_attribute_table): Add warn_unused.
11160 (handle_warn_unused_attribute): New.
11162 2013-07-10 Jakub Jelinek <jakub@redhat.com>
11164 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
11165 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
11167 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
11170 * c.opt: Add Wconditionally-supported.
11172 2013-07-08 Graham Stott <graham.stott@btinternet.com>
11174 * array-notation-common.c (length_mismatch_in_expr_p): Delete
11175 unused variables l_length and l_node.
11177 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
11180 * c-common.c (complete_array_type): Delay folding first index
11181 like other indices. When folding, check for index overflow.
11183 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
11186 * c-common.h (c_build_vec_perm_expr): New complain argument.
11187 * c-common.c (c_build_vec_perm_expr): Likewise.
11188 Use save_expr also in C++.
11190 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
11192 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
11193 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11194 * c-opts.c (c_common_post_options): Likewise.
11196 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11198 * array-notation-common.c (length_mismatch_in_expr): Changed the
11199 parameter type's from a dynamic array to a vec_tree. Also removed
11200 the size parameters.
11201 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
11204 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
11206 * c-common.h (struct cilkplus_an_parts): New structure.
11207 (struct cilkplus_an_loop_parts): Likewise.
11208 (cilkplus_extract_an_triplets): New prototype.
11209 (fix_sec_implicit_args): Likewise.
11210 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11211 (fix_sec_implicit_args): Likewise.
11213 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11215 * array-notation-common.c (find_inv_trees): Removed an unwanted
11217 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11218 enum rid to enum tree_code.
11220 2013-06-11 Jan Hubicka <jh@suse.cz>
11222 * c-common.c (handle_alias_ifunc_attribute): Do not set
11223 DECL_EXTERNAL for weakref variables.
11224 * c-pragma.c (handle_pragma_weak): Make sure aliases
11225 are not declared as external.
11227 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11229 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11230 function from c/c-array-notation.c.
11231 (is_cilkplus_reduce_builtin): Likewise.
11232 (find_rank): Likewise.
11233 (extract_array_notation_exprs): Likewise.
11234 (replace_array_notations): Likewise.
11235 (find_inv_trees): Likewise.
11236 (replace_inv_trees): Likewise.
11237 (contains_array_notation_expr): Likewise.
11238 (find_correct_array_notation_type): Likewise.
11239 * c-common.h (struct inv_list): Moved this struct from the file
11240 c/c-array-notation.c and added a new field called additional tcodes.
11241 (length_mismatch_in_expr_p): New prototype.
11242 (is_cilkplus_reduce_builtin): Likewise.
11243 (find_rank): Likewise.
11244 (extract_array_notation_exprs): Likewise.
11245 (replace_array_notation): Likewise.
11246 (find_inv_trees): Likewise.
11247 (replace_inv_trees): Likewise.
11248 (find_correct_array_notation_type): Likewise.
11250 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11252 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11253 function array_notation_init_builtins is called.
11254 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11255 * c-common.def (ARRAY_NOTATION_REF): New tree.
11256 * c-common.h (build_array_notation_expr): New function declaration.
11257 (build_array_notation_ref): Likewise.
11258 (extract_sec_implicit_index_arg): New extern declaration.
11259 (is_sec_implicit_index_fn): Likewise.
11260 (ARRAY_NOTATION_CHECK): New define.
11261 (ARRAY_NOTATION_ARRAY): Likewise.
11262 (ARRAY_NOTATION_START): Likewise.
11263 (ARRAY_NOTATION_LENGTH): Likewise.
11264 (ARRAY_NOTATION_STRIDE): Likewise.
11265 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11266 ARRAY_NOTATION_REF.
11267 (pp_c_expression): Likewise.
11268 * c.opt (flag_enable_cilkplus): New flag.
11269 * array-notation-common.c: New file.
11271 2013-05-14 Jakub Jelinek <jakub@redhat.com>
11274 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11276 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
11278 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11281 2013-05-07 Han Shen <shenhan@google.com>
11283 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11285 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11287 * c-common.c (check_user_alignment): Emit error for negative values.
11289 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11291 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11293 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11295 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11296 __GXX_EXPERIMENTAL_CXX1Y__.
11298 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11299 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
11301 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11302 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11303 to simply use OPT_Wpointer_arith.
11304 (c_sizeof_or_alignof_type): Likewise.
11306 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11308 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11310 2013-04-12 Jakub Jelinek <jakub@redhat.com>
11312 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11313 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11316 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11318 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11320 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11322 * c-common.c (pointer_int_sum): Remove dead code.
11324 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11326 PR middle-end/56524
11327 * c-common.c (handle_optimize_attribute): Don't call
11328 save_optabs_if_changed.
11330 2013-03-05 Jakub Jelinek <jakub@redhat.com>
11332 PR middle-end/56461
11333 * c-pch.c (pch_init): Free target_validity at the end.
11335 2013-03-04 Jakub Jelinek <jakub@redhat.com>
11337 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11339 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11340 Jakub Jelinek <jakub@redhat.com>
11343 * c-common.c (handle_no_sanitize_address_attribute): New function.
11344 (c_common_attribute_table): Add no_sanitize_address attribute.
11345 (handle_no_address_safety_analysis_attribute): Add
11346 no_sanitize_address attribute, not no_address_safety_analysis
11349 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
11352 * c-common.c (handle_optimize_attribute): Call
11353 save_optabs_if_changed.
11355 2013-02-18 Jakub Jelinek <jakub@redhat.com>
11356 Steven Bosscher <steven@gcc.gnu.org>
11359 * c-opts.c (c_common_post_options): If debug info is enabled
11360 and non-dwarf*, refuse to load PCH files and when writing PCH
11363 2013-02-05 Jakub Jelinek <jakub@redhat.com>
11365 PR middle-end/56167
11366 * c-common.c (handle_error_attribute): Fix condition.
11368 2013-01-30 Jakub Jelinek <jakub@redhat.com>
11371 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11373 2013-01-18 Jason Merrill <jason@redhat.com>
11376 * c.opt (-fextern-tls-init): New.
11377 * c-opts.c (c_common_post_options): Handle it.
11379 2013-01-09 Jakub Jelinek <jakub@redhat.com>
11382 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11383 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11384 and is either negative or bigger or equal to type precision
11385 of the first operand.
11387 2012-12-03 Marek Polacek <polacek@redhat.com>
11390 * c-common.c (check_user_alignment): Swap order of tests,
11391 check TREE_CODE first.
11393 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11396 * c-common.h (overflow_type): New enum.
11397 (build_userdef_literal): Add overflow_type argument.
11398 (tree_userdef_literal): Add overflow_type.
11399 (USERDEF_LITERAL_OVERFLOW): New access macro.
11400 * c-common.c (build_userdef_literal): Add overflow_type
11402 * c-lex.c (c_lex_with_flags): Add overflow_type to
11403 build_userdef_literal calls.
11404 (interpret_integer, interpret_float): Add overflow_type argument.
11406 2012-11-28 Richard Biener <rguenther@suse.de>
11409 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11410 here and use a type with proper overflow behavior for types that would
11411 need to be promoted for the arithmetic.
11413 2012-11-23 Jakub Jelinek <jakub@redhat.com>
11416 * c-common.c (handle_no_address_safety_analysis_attribute): New
11418 (c_common_attribute_table): Add no_address_safety_analysis.
11420 2012-11-16 Simon Baldwin <simonb@google.com>
11422 * c.opt: Add f[no-]canonical-system-headers.
11423 * c-opts.c (c_common_handle_option): Handle
11424 OPT_fcanonical_system_headers.
11426 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11429 * c-opts.c (c_common_handle_option): Set new flags.
11430 * c.opt: Describe new flags.
11432 2012-11-09 Jason Merrill <jason@redhat.com>
11434 * c.opt (Wabi-tag): New.
11436 2012-11-09 Andi Kleen <ak@linux.intel.com>
11439 * c-common.c (get_atomic_generic_size): Mask with
11442 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11445 * c.opt (Wformat): Make it Alias Wformat=1.
11446 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11447 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11449 (Wformat=): RejectNegative. Use LangEnabledBy.
11450 (Wnonnull): Use LangEnabledBy.
11451 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11452 * c-format.c (set_Wformat): Delete.
11453 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
11454 (maybe_read_dollar_number): Likewise.
11455 (avoid_dollar_number): Likewise.
11456 (finish_dollar_format_checking): Likewise.
11457 (check_format_info): Likewise.
11458 (check_format_info_main): Likewise.
11459 (check_format_types): Likewise.
11460 (format_type_warning): Likewise.
11461 * c-common.c (int): Likewise.
11462 (check_function_sentinel): Likewise.
11463 * c-common.h (warn_format,set_Wformat): Do not declare here.
11465 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11468 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11469 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11471 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11473 (Wvariadic-macros): Init(1).
11474 * c-opts.c (c_common_handle_option): Do not handle them
11476 (c_common_post_options): Likewise.
11477 (sanitize_cpp_opts): warn_unused_macros is now
11478 cpp_warn_unused_macros.
11479 (push_command_line_include): Likewise.
11480 * c-common.c (warn_unknown_pragmas): Do not define.
11481 * c-common.h (warn_unknown_pragmas): Do not declare.
11483 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11486 * c-common.c (conversion_warning): Handle conditional expressions.
11488 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11491 * c.opt (Wreturn_local_addr): Define new option.
11493 2012-10-25 Jason Merrill <jason@redhat.com>
11495 * c.opt (Wvirtual-move-assign): New.
11497 * c.opt (Winherited-variadic-ctor): New.
11499 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
11502 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11504 2012-10-23 Joseph Myers <joseph@codesourcery.com>
11506 * c-common.h (pch_cpp_save_state): Declare.
11507 * c-target.def (c_preinclude): New hook.
11508 * c-opts.c (done_preinclude): New.
11509 (push_command_line_include): Handle default preincluded header.
11510 (cb_file_change): Call pch_cpp_save_state when calling
11511 push_command_line_include.
11512 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11513 (pch_cpp_save_state): New.
11514 (pch_init): Call pch_cpp_save_state conditionally, instead of
11515 calling cpp_save_state.
11517 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11521 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11522 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11523 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11524 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11525 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11526 * c-opts.c (c_common_handle_option): Remove explicit handling from
11528 (c_common_post_options): Likewise.
11530 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11532 * c-ada-spec.c (LOCATION_COL): Delete.
11533 (compare_location): New function.
11534 (compare_node): Use it.
11535 (compare_comment): Likewise.
11537 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11541 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11542 * c-opts.c (c_common_handle_option): Do not set them here. Add
11544 (c_common_post_options): Likewise.
11546 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11548 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11549 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11550 Remove POINTER_TYPE handling, add large unsigned handling and use
11551 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11553 2012-10-12 Jakub Jelinek <jakub@redhat.com>
11556 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11557 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11558 locs and array of 3 trees instead of just single loc and single
11559 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11560 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11561 For *cmp* builtins that take two sources strings report warnings
11562 about first and second source, not about destination and source.
11564 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
11567 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11569 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11571 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11572 declaring something coming from another file.
11574 2012-10-10 Arnaud Charlet <charlet@adacore.com>
11577 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11579 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11582 * c-common.c (warn_about_parentheses): Add location_t parameter;
11583 use EXPR_LOC_OR_LOC.
11584 * c-common.h: Update declaration.
11586 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
11589 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11590 more operations. Make error messages optional.
11591 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11592 (scalar_to_vector): Declare.
11594 2012-10-08 Jason Merrill <jason@redhat.com>
11596 * c-common.c (c_common_reswords): Add thread_local.
11598 2012-10-08 Dodji Seketeli <dodji@redhat.com>
11600 PR c++/53528 C++11 attribute support
11601 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11603 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11605 (handle_aligned_attribute): In choose strictest alignment
11606 among many. Use new check_cxx_fundamental_alignment_constraints.
11607 (handle_transparent_union_attribute): In c++11 attribute syntax,
11608 don't look through typedefs.
11610 2012-10-04 Arnaud Charlet <charlet@adacore.com>
11612 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11613 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11616 2012-09-25 Dehao Chen <dehao@google.com>
11618 PR middle-end/54645
11619 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
11620 map when read in the pch.
11622 2012-09-18 Arnaud Charlet <charlet@adacore.com>
11624 * c-ada-spec.c: Style fixes.
11626 2012-09-18 Thomas Quinot <quinot@adacore.com>
11628 * c.opt (-fada-spec-parent): Define new command line switch.
11629 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11630 is specified, generate binding spec as a child of the specified unit.
11632 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11633 Manuel López-Ibáñez <manu@gcc.gnu.org>
11636 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11638 2012-08-23 Arnaud Charlet <charlet@adacore.com>
11640 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11641 for pointers, and add missing Convention C pragma.
11642 (print_ada_struct_decl): Add missing aliased keyword.
11643 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11645 2012-08-17 Jakub Jelinek <jakub@redhat.com>
11647 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11648 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11649 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11650 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11651 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11653 2012-08-10 Richard Guenther <rguenther@suse.de>
11655 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11657 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11659 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11660 instead of separate pp_newline and pp_flush.
11661 (print_c_tree): Likewise.
11663 2012-07-26 Richard Henderson <rth@redhat.com>
11665 * c-common.c (handle_hot_attribute): Allow labels.
11666 (handle_cold_attribute): Likewise.
11668 2012-07-20 Jakub Jelinek <jakub@redhat.com>
11671 * c-common.c (check_function_nonnull): Handle multiple nonnull
11672 attributes properly.
11674 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11676 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11677 * c-ada-spec.c: Likewise.
11678 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11680 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11682 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11683 Remove code conditional on it.
11685 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11687 * c-gimplify.c: Do not include basic-block.h.
11688 * c-common.c: Do not include linfuncs.h.
11690 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11692 * c-common.h: Include tree.h.
11694 2012-07-02 Jason Merrill <jason@redhat.com>
11697 * c-common.c (get_priority): Call default_conversion.
11699 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
11701 * c-pch.c (c_common_write_pch): Remove unused variables.
11703 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11705 * cppspec.c: Moved from gcc/ to here.
11707 2012-06-27 Kai Tietz <ktietz@redhat.com>
11709 PR preprocessor/37215
11710 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11712 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11714 * c-common.h (c_common_print_pch_checksum): Remove.
11715 * c-pch.c: Do not include output.h.
11716 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11717 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11718 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11719 (struct c_pch_header): Remove.
11720 (get_ident): Update gpch version.
11721 (pch_init): Do not print executable_checksum to asm_out_file.
11722 Do not fail if there is no asm_out_file to read back from. Set
11723 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11724 (c_common_write_pch): Verify that nothing was written to asm_out_file
11725 since pch_init was called. Do not write a c_pch_header, and do not
11726 copy from asm_out_file to the PCH.
11727 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11728 the content of asm_out_file from the PCH.
11729 (c_common_print_pch_checksum): Remove.
11730 * c-opts.c (c_common_init): Print out executable_checksum directly.
11732 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11734 * c-target.def (objc_declare_unresolved_class_reference,
11735 objc_declare_class_definition): Add new hooks.
11737 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11739 * c-lex.c: Do not include output.h.
11740 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11741 Remove uses of ASM_OUTPUT_IDENT.
11743 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
11746 * c-common.h (c_build_vec_perm_expr): Move decl here.
11747 * c-common.c (c_build_vec_perm_expr): Move definition
11750 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11752 * c.opt (fconserve-space): Turn into a no-op.
11754 2012-06-04 Sterling Augustine <saugustine@google.com>
11756 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11757 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11758 both the start and end of the function.
11760 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11762 * c-common.c: Do not include output.h.
11763 * c-pragma.c: Likewise.
11765 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11767 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11768 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11769 (lang_decl_name): Handle namespace decls.
11771 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11773 * c-ada-spec.c: Do not include output.h.
11774 * c-semantics.c: Likewise.
11776 2012-05-29 Joseph Myers <joseph@codesourcery.com>
11778 * c-common.c: Fix typo.
11780 2012-05-29 Michael Matz <matz@suse.de>
11782 * c-common.h (c_expand_decl): Remove prototype.
11784 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11786 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11787 * c-opts.c (c_common_handle_option): Remove code handling
11788 warn_missing_braces.
11790 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11793 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11796 2012-05-22 Dodji Seketeli <dodji@redhat.com>
11799 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11801 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11803 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11804 * c-opts.c (c_common_handle_option): Do not handle explicitly
11805 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11807 2012-05-16 Dodji Seketeli <dodji@redhat.com>
11809 PR preprocessor/7263
11810 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
11811 to cpp_classify_number. For diagnostics, use the precise location
11812 instead of the global input_location.
11814 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11817 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11819 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11821 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
11823 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11826 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11827 Wreorder): Use LangEnabledBy.
11828 * c-opts.c (c_common_handle_option): Do not enable them
11829 explicitly. Call lang-specific generated functions.
11830 (c_common_post_options): Do not set them here.
11832 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11834 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11835 Wmissing-field-initializers,Wmissing-parameter-type,
11836 Wold-style-declaration,Woverride-init): Use EnabledBy.
11837 * c-opts.c (c_common_post_options): Do not set here explicitly.
11839 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11842 * c-opts.c (c_common_handle_option): Use handle_generated_option
11843 to enable sub-options.
11845 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11848 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11850 2012-05-10 Richard Guenther <rguenther@suse.de>
11852 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11853 adjust commentary about TYPE_IS_SIZETYPE types.
11855 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11858 * c-common.c (warn_logical_operator): Check that argument of
11859 integer_zerop is not NULL.
11861 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11864 * c-common.c (warn_logical_operator): Do not warn if either side
11865 is already true or false.
11867 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11870 * c-common.c (expr_original_type): New.
11871 (shorten_compare): Do not warn for enumeration types.
11873 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11875 * c.opt (fpermissive): Add Var(flag_permissive).
11877 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
11880 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11881 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11883 2012-04-30 Dodji Seketeli <dodji@redhat.com>
11885 Add -Wvarargs option
11886 * c.opt (Wvarargs): Define new option.
11888 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11890 * c-common.c (check_function_arguments): Replace
11891 Wmissing-format-attribute with Wsuggest-attribute=format.
11893 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11895 * c.opt (Wsuggest-attribute=format): New. Alias of
11896 Wmissing-format-attribute.
11897 * c-format.c (decode_format_type): Replace
11898 Wmissing-format-attribute with Wsuggest-attribute=format.
11899 (check_function_format): Likewise.
11901 2012-04-27 Ollie Wild <aaw@google.com>
11903 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11904 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11905 * c.opt: Add Wliteral-suffix.
11907 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11910 * c.opt (Wpedantic): New.
11911 (pedantic): Alias Wpedantic.
11912 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11913 (c_common_post_options): Likewise.
11914 (sanitize_cpp_opts): Likewise.
11915 * c-lex.c (interpret_float): Likewise.
11916 * c-format.c (check_format_types): Likewise.
11917 * c-common.c (pointer_int_sum): Likewise.
11918 (c_sizeof_or_alignof_type): Likewise.
11919 (c_add_case_label): Likewise.
11920 (c_do_switch_warnings): Likewise.
11921 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11923 2012-04-15 Jason Merrill <jason@redhat.com>
11926 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11927 (C_STD_NAME): Distinguish between C++98 and C++11.
11929 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11932 * c-common.h (uint16_type_node): Rename into...
11933 (c_uint16_type_node): ...this.
11934 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11935 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11937 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11939 * c-common.c (warn_if_unused_value): Move definition to here.
11940 * c-common.h (warn_if_unused_value): Move declaration to here.
11942 2012-03-23 William Bader <williambader@hotmail.com>
11944 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11946 2012-03-20 Jason Merrill <jason@redhat.com>
11948 * c-common.h (enum cxx_dialect): Add cxx1y.
11949 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11951 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11952 * c-opts.c (c_common_post_options): Likewise.
11953 (set_std_cxx1y): New.
11954 (c_common_handle_option): Call it.
11955 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11957 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11960 * c.opt ([Wuseless-cast]): Add.
11962 2012-03-16 Richard Guenther <rguenther@suse.de>
11964 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11966 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11969 * c.opt (ftemplate-backtrace-limit) Add.
11971 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11973 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11975 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11976 (init_pragma): Don't register extern_prefix.
11978 2012-03-12 Richard Guenther <rguenther@suse.de>
11980 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11981 (builtin_type_for_size): Likewise.
11983 2012-02-13 Jakub Jelinek <jakub@redhat.com>
11986 * c-common.c (sync_resolve_params): Don't decide whether to convert
11987 or not based on TYPE_SIZE comparison, convert whenever arg_type
11988 is unsigned INTEGER_TYPE.
11990 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11993 * c.opt ([Wunused-local-typedefs]): Fix description.
11995 2012-01-24 Mike Stump <mikestump@comcast.net>
11997 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
12000 2012-01-18 Richard Guenther <rguenther@suse.de>
12002 * c-opts.c (c_common_post_options): Reset LTO flags if
12003 we are about to generate a PCH.
12005 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
12008 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
12009 use pp_unsigned_wide_integer.
12011 2012-01-10 Richard Guenther <rguenther@suse.de>
12013 PR middle-end/51806
12014 * c-opts.c (c_common_handle_option): Move -Werror handling
12015 to language independent code.
12017 2012-01-05 Richard Guenther <rguenther@suse.de>
12019 PR middle-end/51764
12020 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
12023 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
12026 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
12027 of array types with an unknown bound.
12029 2011-12-20 Joseph Myers <joseph@codesourcery.com>
12031 * c-common.c (flag_isoc99): Update comment to refer to C11.
12032 (flag_isoc1x): Change to flag_isoc11.
12033 * c-common.h (flag_isoc99): Update comment to refer to C11.
12034 (flag_isoc1x): Change to flag_isoc11.
12035 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
12037 * c-opts.c (set_std_c1x): Change to set_std_c11.
12038 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
12040 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
12041 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
12042 * c.opt (std=c1x): Change to std=c11. Document as non-draft
12044 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
12045 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
12046 (std=gnu1x): Make alias of std=gnu11.
12048 2011-12-19 Jason Merrill <jason@redhat.com>
12051 * c-common.c (handle_transparent_union_attribute): Check the first
12052 field if the type is complete.
12054 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
12057 * c-common.c (RID_IS_FINAL): Add.
12058 * c-common.h (RID_IS_FINAL): Add.
12060 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
12062 * c.opt (fgnu-runtime): Provide full description.
12063 (fnext-runtime): Likewise.
12064 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
12066 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
12068 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
12069 predefines in one place. Add LOCK_FREE predefines.
12070 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
12073 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
12076 * c-common.c (get_atomic_generic_size): Check for various error
12078 (resolve_overloaded_atomic_exchange,
12079 resolve_overloaded_atomic_compare_exchange,
12080 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
12081 error_mark_node for error conditions.
12083 2011-11-08 Richard Guenther <rguenther@suse.de>
12085 PR middle-end/51010
12086 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
12088 2011-11-07 Richard Henderson <rth@redhat.com>
12089 Aldy Hernandez <aldyh@redhat.com>
12090 Torvald Riegel <triegel@redhat.com>
12092 Merged from transactional-memory.
12094 * c-common.c (handle_tm_wrap_attribute,
12095 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
12096 (struct c_common_reswords): Added __transaction* keywords.
12097 (struct c_common_attribute_table): Added transaction* and tm_regparm
12099 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
12101 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
12102 find_tm_attribute): Declare.
12104 2011-11-07 Jason Merrill <jason@redhat.com>
12107 * c-common.c, c-common.h: Revert yesterday's changes.
12109 2011-11-06 Jason Merrill <jason@redhat.com>
12112 * c-common.c (decl_has_visibility_attr): Split out from...
12113 (c_determine_visibility): ...here.
12114 * c-common.h: Declare it.
12116 2011-11-06 Joseph Myers <joseph@codesourcery.com>
12118 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
12119 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
12121 (check_user_alignment): New. Split out of
12122 handle_aligned_attribute. Disallow integer constants with
12123 noninteger types. Conditionally allow zero.
12124 (handle_aligned_attribute): Use check_user_alignment.
12125 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
12127 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
12128 Richard Henderson <rth@redhat.com>
12130 Merged from cxx-mem-model.
12132 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
12133 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
12134 parameters that are the same type size.
12135 (get_atomic_generic_size): New. Find size of generic
12136 atomic function parameters and do typechecking.
12137 (add_atomic_size_parameter): New. Insert size into parameter list.
12138 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
12139 either __atomic_exchange_n or external library call.
12140 (resolve_overloaded_atomic_compare_exchange): Restructure
12141 __atomic_compare_exchange to either _n variant or external library call.
12142 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
12143 __atomic_load_n or an external library call.
12144 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
12145 __atomic_store_n or an external library call.
12146 (resolve_overloaded_builtin): Handle new __atomic builtins.
12148 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
12151 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
12152 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
12153 <INDIRECT_REF>: Return the argument.
12154 <ARRAY_REF>: Remove special code for negative offset.
12155 Call fold_build_pointer_plus instead of size_binop.
12156 (fold_offsetof): Remove STOP_REF argument and adjust.
12157 * c-common.h (fold_offsetof_1): Declare.
12158 (fold_offsetof): Remove STOP_REF argument.
12160 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
12163 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12164 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12165 Wnarrowing for C++0x and C++98.
12166 * c.opt ([Wnarrowing]): Update.
12168 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
12171 * c.opt: Add Wzero-as-null-pointer-constant.
12173 2011-10-31 Jason Merrill <jason@redhat.com>
12175 * c.opt (-fdeduce-init-list): Off by default.
12178 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
12179 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
12180 and -Wc++11-compat.
12181 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
12183 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
12186 * c.opt (fvisibility-inlines-hidden): Description change.
12188 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
12190 Implement C++11 user-defined literals.
12191 * c-common.c (build_userdef_literal): New.
12192 * c-common.def: New tree code.
12193 * c-common.h (tree_userdef_literal): New tree struct and accessors.
12194 * c-lex.c (interpret_float): Add suffix parm.
12195 (c_lex_with_flags): Build literal tokens.
12197 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12201 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12204 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12205 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12206 Wnarrowing for C++0x and C++98.
12207 * c.opt ([Wnarrowing]): Update.
12209 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12212 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12213 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12214 Wnarrowing for C++0x and C++98.
12215 * c.opt ([Wnarrowing]): Update.
12217 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12220 * c-common.c (conversion_warning): Remove code looking for
12221 artificial operands.
12223 2011-10-18 Dodji Seketeli <dodji@redhat.com>
12226 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
12227 !NO_IMPLICIT_EXTERN_C.
12229 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
12231 * c-common.c (c_common_reswords): Add __bases,
12233 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12235 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12238 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12240 2011-10-15 Tom Tromey <tromey@redhat.com>
12241 Dodji Seketeli <dodji@redhat.com>
12243 * c.opt (fdebug-cpp): New option.
12244 * c-opts.c (c_common_handle_option): Handle the option.
12245 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12246 output stream in parameter. Factorized from ...
12247 (maybe_print_line): ... this. Dump location debug information when
12248 -fdebug-cpp is in effect.
12249 (print_line_1): New static function. Takes an output stream in
12250 parameter. Factorized from ...
12251 (print_line): ... here. Dump location information when -fdebug-cpp
12253 (scan_translation_unit): Dump location information when
12254 -fdebug-cpp is in effect.
12256 2011-10-15 Tom Tromey <tromey@redhat.com>
12257 Dodji Seketeli <dodji@redhat.com>
12259 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12261 * c-opts.c (c_common_handle_option)<case
12262 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12263 cases. Handle -ftrack-macro-expansion with and without argument.
12265 2011-10-15 Tom Tromey <tromey@redhat.com>
12266 Dodji Seketeli <dodji@redhat.com>
12268 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12269 (print_line, cb_define, do_line_change): Adjust to avoid touching
12270 the internals of struct line_map. Use the public API instead.
12271 * c-pch.c (c_common_read_pch): Likewise.
12272 * c-lex.c (fe_file_change): Likewise.
12274 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12277 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12279 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12282 * c-pretty-print.c (pp_c_floating_constant): Output
12283 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12285 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12287 * c-common.c (def_builtin_1): Delete old interface with two
12288 parallel arrays to hold standard builtin declarations, and replace
12289 it with a function based interface that can support creating
12290 builtins on the fly in the future. Change all uses, and poison
12291 the old names. Make sure 0 is not a legitimate builtin index.
12292 * c-omp.c (c_finish_omp_barrier): Ditto.
12293 (c_finish_omp_taskwait): Ditto.
12294 (c_finish_omp_flush): Ditto.
12296 2011-10-11 Tristan Gingold <gingold@adacore.com>
12298 * c.opt: (fallow-parameterless-variadic-functions): New.
12300 2011-09-08 Dodji Seketeli <dodji@redhat.com>
12302 PR c++/33255 - Support -Wunused-local-typedefs warning
12303 * c-common.h (struct c_language_function::local_typedefs): New
12305 (record_locally_defined_typedef, maybe_record_typedef_use)
12306 (maybe_warn_unused_local_typedefs): Declare new functions.
12307 * c-common.c (record_locally_defined_typedef)
12308 (maybe_record_typedef_use)
12309 (maybe_warn_unused_local_typedefs): Define new functions.
12310 * c.opt: Declare new -Wunused-local-typedefs flag.
12312 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12314 PR middle-end/50266
12315 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12318 2011-09-05 Richard Guenther <rguenther@suse.de>
12320 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12321 of integer_minus_one_node for empty array upper bounds.
12323 2011-08-28 Dodji Seketeli <dodji@redhat.com>
12325 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12326 it's the first time it's being called on this main TU.
12328 2011-08-24 Richard Guenther <rguenther@suse.de>
12331 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12333 2011-08-22 Gabriel Charette <gchare@google.com>
12335 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12336 defined in cpp_init_builtins and c_cpp_builtins.
12338 2011-08-19 Joseph Myers <joseph@codesourcery.com>
12340 * c-common.c (c_common_reswords): Add __builtin_complex.
12341 * c-common.h (RID_BUILTIN_COMPLEX): New.
12343 2011-08-18 Joseph Myers <joseph@codesourcery.com>
12345 * c-common.c (c_common_reswords): Add _Noreturn.
12346 (keyword_is_function_specifier): Handle RID_NORETURN.
12347 * c-common.h (RID_NORETURN): New.
12349 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12351 * c-common.c (unsafe_conversion_p): New function. Check if it is
12352 unsafe to convert an expression to the type.
12353 (conversion_warning): Adjust, use unsafe_conversion_p.
12354 * c-common.h (unsafe_conversion_p): New function declaration.
12356 2011-08-02 Jakub Jelinek <jakub@redhat.com>
12358 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12359 (c_finish_omp_taskyield): New prototype.
12360 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12361 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12362 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12363 or RHS1 have side-effects, evaluate those too in the right spot,
12364 if it is a decl and LHS is also a decl, error out if they
12366 (c_finish_omp_taskyield): New function.
12367 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12368 * c-pragma.c (omp_pragmas): Add taskyield.
12369 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12370 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12371 PRAGMA_OMP_CLAUSE_MERGEABLE.
12373 2011-07-25 Dodji Seketeli <dodji@redhat.com>
12375 * c-common.h (set_underlying_type): Remove parm name from
12378 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
12380 * c-pretty-print.h: Search c-common.h in c-family.
12382 2011-07-22 Jason Merrill <jason@redhat.com>
12385 * c.opt (Wnarrowing): New.
12388 * c-common.h: Declare c_linkage_bindings.
12389 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12392 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12393 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12394 as flag_isoc99 for 'restrict'.
12395 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12397 2011-07-21 Ian Lance Taylor <iant@google.com>
12399 PR middle-end/49705
12400 * c-common.c (c_disable_warnings): New static function.
12401 (c_enable_warnings): New static function.
12402 (c_fully_fold_internal): Change local unused_p to bool. Call
12403 c_disable_warnings and c_enable_warnings rather than change
12404 c_inhibit_evaluation_warnings.
12406 2011-07-20 Jason Merrill <jason@redhat.com>
12408 PR c++/6709 (DR 743)
12409 PR c++/42603 (DR 950)
12410 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12411 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12412 (CPP_DECLTYPE): New.
12413 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12415 2011-07-19 Richard Guenther <rguenther@suse.de>
12417 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12418 * c-omp.c (c_finish_omp_for): Likewise.
12420 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12422 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12423 body on the next line.
12425 2011-07-08 Jason Merrill <jason@redhat.com>
12428 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12431 * c-common.c (c_apply_type_quals_to_decl): Don't check
12432 TYPE_NEEDS_CONSTRUCTING.
12434 2011-07-06 Richard Guenther <rguenther@suse.de>
12436 * c-common.c (c_common_nodes_and_builtins):
12437 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12439 2011-07-05 Richard Guenther <rguenther@suse.de>
12441 * c-common.c (c_common_nodes_and_builtins): Build all common
12444 2011-06-27 Jakub Jelinek <jakub@redhat.com>
12446 * c-common.h (c_tree_chain_next): New static inline function.
12448 * c-common.c (check_builtin_function_arguments): Handle
12449 BUILT_IN_ASSUME_ALIGNED.
12451 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
12453 * c-common.c: Add sync_ or SYNC__ to builtin names.
12454 * c-omp.c: Add sync_ or SYNC__ to builtin names.
12456 2011-06-20 Pierre Vittet <piervit@pvittet.com>
12458 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12460 (gen_pragma_handler): New union.
12461 (internal_pragma_handler): New type.
12462 (c_register_pragma_with_data)
12463 (c_register_pragma_with_expansion_and_data): New functions.
12465 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12466 (c_register_pragma, c_register_pragma_with_expansion)
12467 (c_invoke_pragma_handler): Changed to work with
12468 internal_pragma_handler.
12469 (c_register_pragma_with_data)
12470 (c_register_pragma_with_expansion_and_data): New functions.
12472 2011-06-14 Joseph Myers <joseph@codesourcery.com>
12474 * c-common.c: Include common/common-target.h.
12475 (handle_section_attribute): Use
12476 targetm_common.have_named_sections.
12477 * c-cppbuiltin.c: Include common/common-target.h.
12478 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12480 2011-06-10 Richard Guenther <rguenther@suse.de>
12482 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12483 to print a IDENTIFIER_NODE.
12485 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12486 Joseph Myers <joseph@codesourcery.com>
12488 * c.opt (fbuilding-libgcc): New option.
12489 * c-cppbuiltin.c (c_cpp_builtins): Define
12490 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12492 2011-06-07 Jason Merrill <jason@redhat.com>
12494 * c-common.c (max_tinst_depth): Lower default to 900.
12496 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12498 2011-06-07 Richard Guenther <rguenther@suse.de>
12500 * c-common.c (c_common_nodes_and_builtins): Do not set
12501 size_type_node or call set_sizetype.
12503 2011-06-07 Dodji Seketeli <dodji@redhat.com>
12506 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
12507 type when using pointer comparison to compare types.
12509 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12511 * c.opt: Add -Wdelete-non-virtual-dtor.
12512 * c-opts.c (c_common_handle_option): Include it in -Wall.
12514 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12519 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12521 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12524 2011-05-27 Jakub Jelinek <jakub@redhat.com>
12527 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12528 C++ don't call c_common_truthvalue_conversion on void type arms.
12530 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12532 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12533 (stmt_list_stack): Define.
12534 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12535 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12537 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12539 * c-common.c (warning_candidate_p): Check for BLOCKs.
12541 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12543 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12546 2011-05-25 Jakub Jelinek <jakub@redhat.com>
12548 * c-common.c (def_fn_type): Remove extra va_end.
12550 2011-05-23 Jason Merrill <jason@redhat.com>
12553 * c-common.c (c_common_get_narrower): New.
12554 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12556 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12558 * c-common.h (check_function_arguments): Tweak prototype of
12559 check_function_arguments.
12560 * c-common.c (check_function_arguments): Likewise. Adjust
12561 calls to check_function_nonnull, check_function_format, and
12562 check_function_sentinel.
12563 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12564 separate attributes and typelist arguments. Use
12565 FOREACH_FUNCTION_ARGS to iterate over argument types.
12567 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12569 * c-common.c (c_common_reswords): Reorder.
12570 * c-common.h (rid): Likewise.
12572 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12574 * c-common.c (def_fn_type): Don't call build_function_type, call
12575 build_function_type_array or build_varargs_function_type_array
12577 (c_common_nodes_and_builtins): Likewise.
12579 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12581 * c-common.c (c_add_case_label): Omit the loc argument to
12583 * c-common.h (build_case_label): Remove.
12584 * c-semantics.c (build_case_label): Remove.
12586 2011-05-05 Joseph Myers <joseph@codesourcery.com>
12588 * c-objc.h (objc_start_method_definition): Update prototype.
12589 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12591 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12593 * c-common.c (check_main_parameter_types): Reindent. Don't use
12594 TYPE_ARG_TYPES directly.
12595 (handle_nonnull_attribute): Likewise.
12596 (sync_resolve_params): Likewise.
12597 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12598 to check_format_string.
12599 (handle_format_attribute): Likewise.
12600 (check_format_string): Take a function type to examine instead of
12601 a type list. Use a function_arg_iterator to step through argument
12604 2011-05-04 Richard Guenther <rguenther@suse.de>
12606 * c-common.c (fix_string_type): Use size_int for index type bounds.
12607 (start_fname_decls): Do not pass NULL to build_int_cst.
12608 (c_init_attributes): Likewise.
12609 * c-lex.c (c_lex_with_flags): Likewise.
12611 2011-04-27 Jason Merrill <jason@redhat.com>
12613 * c-common.c (make_tree_vector_from_list): New.
12614 * c-common.h: Declare it.
12616 2011-04-26 Richard Guenther <rguenther@suse.de>
12618 PR preprocessor/48248
12619 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12620 for output size with -P.
12622 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12624 * c-common.c (struct c_common_resword): Add __underlying_type.
12625 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12627 2011-04-20 Jim Meyering <meyering@redhat.com>
12629 * c-format.c (init_dollar_format_checking): Remove useless
12632 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12634 * c-objc.h (objc_get_interface_ivars): Removed.
12635 (objc_detect_field_duplicates): New.
12636 * stub-objc.c: Likewise.
12638 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12640 * stub-objc.c (objc_declare_protocols): Renamed to
12641 objc_declare_protocol.
12642 * c-objc.h: Likewise.
12644 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12646 * stub-objc.c (objc_declare_class): Updated argument name.
12648 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12650 * c-common.h (c_common_init_ts): Declare.
12651 * c-common.c (c_common_init_ts): Define.
12653 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12655 * c-objc.h (objc_build_message_expr): Updated prototype.
12656 * stub-objc.c (objc_build_message_expr): Likewise.
12658 2011-04-12 Martin Jambor <mjambor@suse.cz>
12660 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12663 2011-04-11 Richard Guenther <rguenther@suse.de>
12665 * c-common.c (complete_array_type): Build a range type of
12668 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12670 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12671 (handle_type_generic_attribute): Likewise.
12673 2011-04-07 Jason Merrill <jason@redhat.com>
12676 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12677 conversion from C++0x scoped enum.
12679 2011-04-06 Joseph Myers <joseph@codesourcery.com>
12681 * c-target-def.h: New file.
12682 * c-target.def: New file.
12683 * c-target.h: New file.
12684 * c-common.c (targetcm): Don't define here.
12685 * c-common.h (default_handle_c_option): Declare.
12686 * c-format.c: Include c-target.h instead of target.h.
12687 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12689 (default_handle_c_option): Move from targhooks.c.
12691 2011-03-29 Jakub Jelinek <jakub@redhat.com>
12693 PR preprocessor/48248
12694 * c-ppoutput.c (print): Add src_file field.
12695 (init_pp_output): Initialize it.
12696 (maybe_print_line): Don't optimize by adding up to 8 newlines
12697 if map->to_file and print.src_file are different file.
12698 (print_line): Update print.src_file.
12700 2011-03-25 Kai Tietz <ktietz@redhat.com>
12702 * c-ada-spec.c (compare_comment): Use filename_cmp
12703 instead of strcmp for filename.
12705 2011-03-25 Jeff Law <law@redhat.com>
12707 * c-common.c (def_fn_type): Add missing va_end.
12709 2011-03-25 Jason Merrill <jason@redhat.com>
12711 * c.opt: Add -std=c++03.
12713 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12715 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12717 2011-03-17 Kai Tietz <ktietz@redhat.com>
12720 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12721 Display allowed attributes for function pointer types.
12722 (pp_c_attributes_display): New function to display
12723 attributes having affects_type_identity flag set to true.
12724 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12726 * c-common.c (c_common_attribute_table):
12728 (c_common_format_attribute_table): Likewise.
12730 2011-03-18 Jason Merrill <jason@redhat.com>
12732 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12733 * c-common.h: Don't declare it here.
12734 * c-common.c: Or define it here.
12735 * c-opts.c (c_common_handle_option): Or set it here.
12738 * c-common.c (handle_transparent_union_attribute): Don't
12739 make a duplicate type in C++.
12741 2011-03-15 Jason Merrill <jason@redhat.com>
12743 * c-common.c (max_constexpr_depth): New.
12744 * c-common.h: Declare it.
12745 * c-opts.c (c_common_handle_option): Set it.
12746 * c.opt (fconstexpr-depth): New option.
12748 2011-03-11 Jason Merrill <jason@redhat.com>
12750 * c-common.c (attribute_takes_identifier_p): Add missing const.
12753 * c-common.c (attribute_takes_identifier_p): Assume that an
12754 unknown attribute takes an identifier.
12756 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12759 * c-common.c (c_type_hash): Call list_length instead of iterating
12760 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12762 2011-02-19 Jakub Jelinek <jakub@redhat.com>
12765 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12767 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12769 * c.opt (fobjc-abi-version=) New.
12770 (fobjc-nilcheck): New.
12772 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12775 * c-common.h (keyword_is_decl_specifier): Declare.
12776 * c-common.c (keyword_is_decl_specifier): Define.
12777 (keyword_is_function_specifier): New function.
12779 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12782 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12783 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12786 2011-01-26 Arnaud Charlet <charlet@adacore.com>
12788 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12790 2011-01-26 Jakub Jelinek <jakub@redhat.com>
12793 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12794 after init_c_lex if pch_file is set.
12796 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12799 * c.opt (-fkeep-inline-dllexport): New switch.
12801 2011-01-12 Richard Guenther <rguenther@suse.de>
12803 PR middle-end/32511
12804 * c-common.c (handle_weak_attribute): Warn instead of error
12805 on declaring an inline function weak.
12807 2011-01-05 Tom Tromey <tromey@redhat.com>
12809 * c-common.h (lvalue_error): Update.
12810 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12813 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
12816 * c-objc.h (objc_finish_message_expr): Added argument to
12819 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12821 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12824 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12826 * c-objc.h (objc_maybe_warn_exceptions): New.
12827 * stub-objc.c (objc_maybe_warn_exceptions): New.
12829 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12831 * c-common.h (readonly_error): Declare.
12832 * c-common.c (readonly_error): Define.
12834 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12836 * c-common.h (invalid_indirection_error): Declare.
12837 * c-common.c (invalid_indirection_error): Define.
12839 2010-12-03 Richard Guenther <rguenther@suse.de>
12842 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12843 (pp_c_unary_expression): Likewise.
12844 (pp_c_expression): Likewise.
12846 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12848 * c-common.h (objc_finish_function): New.
12849 (objc_non_volatilized_type): Removed.
12850 (objc_type_quals_match): Removed.
12851 * stub-objc.c (objc_finish_function): New.
12852 (objc_non_volatilized_type): Removed.
12853 (objc_type_quals_match): Removed.
12855 2010-11-30 Joseph Myers <joseph@codesourcery.com>
12857 * c-common.h (parse_optimize_options): Declare.
12858 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12859 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12861 2010-11-29 Joseph Myers <joseph@codesourcery.com>
12863 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12865 * c-pch.c (O_BINARY): Don't define here.
12866 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12868 2010-11-25 Joseph Myers <joseph@codesourcery.com>
12870 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12871 targetm.except_unwind_info.
12873 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12875 * c-opts.c (c_common_handle_option): Pass location to
12876 set_struct_debug_option.
12878 2010-11-23 Joseph Myers <joseph@codesourcery.com>
12880 * c-common.c (visibility_options): Move from ../opts.c.
12881 * c-common.h (struct visibility_flags, visibility_options):
12883 * c-opts.c (finish_options): Rename to c_finish_options.
12884 (c_common_init): Update call to finish_options.
12886 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12889 * c-lex.c (lex_string): Check that each string in an Objective-C
12890 string concat sequence starts with either one or zero '@', and
12891 that there are no spurious '@' signs at the end.
12893 2010-11-20 Joseph Myers <joseph@codesourcery.com>
12895 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12896 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12897 HANDLE_PRAGMA_VISIBILITY.
12898 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12899 HANDLE_PRAGMA_VISIBILITY): Don't define.
12900 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12902 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12907 * c-common.h (keyword_begins_type_specifier): Declare.
12908 (keyword_is_storage_class_specifier): Declare.
12909 (keyword_is_type_qualifier): Declare.
12910 * c-common.c (keyword_begins_type_specifier): New function.
12911 (keyword_is_storage_class_specifier): New function.
12912 (keyword_is_type_qualifier): Declare.
12914 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12917 * c-common.c (in_late_binary_op): Define.
12918 (c_common_truthvalue_conversion): Check in_late_binary_op before
12919 calling c_save_expr.
12920 * c-common.h (in_late_binary_op): Declare.
12922 2010-11-19 Joseph Myers <joseph@codesourcery.com>
12924 * c-opts.c (c_common_handle_option): Update calls to
12925 set_struct_debug_option.
12927 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12929 * c-common.h (objc_declare_protocols): Added additional argument.
12930 * stub-objc.c (objc_declare_protocol): Same change.
12932 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12935 * c-common.h (build_real_imag_expr): Declare.
12936 * c-semantics.c (build_real_imag_expr): Define.
12938 2010-11-17 Joseph Myers <joseph@codesourcery.com>
12940 * c-opts.c (c_common_parse_file): Take no arguments.
12941 * c-common.h (c_common_parse_file): Update prototype.
12943 2010-11-16 Jakub Jelinek <jakub@redhat.com>
12946 * c-common.c (warning_candidate_p): Don't track non-const calls
12949 2010-11-15 Ian Lance Taylor <iant@google.com>
12951 * c-lex.c (init_c_lex): Set macro debug callbacks if
12952 flag_dump_go_spec is set.
12954 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12956 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12957 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12959 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12961 PR preprocessor/45038
12962 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12965 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12967 * c-common.h (c_family_lang_mask): Declare.
12968 * c-opts.c (c_family_lang_mask): Make extern.
12969 * c-pragma.c (handle_pragma_diagnostic): Use
12970 control_warning_option.
12972 2010-11-12 Joseph Myers <joseph@codesourcery.com>
12974 * c-common.c (parse_optimize_options): Update call to
12976 * c-common.h (c_common_handle_option): Update prototype.
12977 * c-opts.c (c_common_handle_option): Take location_t parameter and
12978 pass it to other functions.
12980 2010-11-11 Joseph Myers <joseph@codesourcery.com>
12982 * c-opts.c (warning_as_error_callback): Remove.
12983 (c_common_initialize_diagnostics): Don't call
12984 register_warning_as_error_callback.
12985 (c_common_handle_option): Handle -Werror=normalized= here.
12987 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12989 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12991 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12993 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12994 Remove trailing '.' from diagnostics.
12995 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12997 2010-11-10 Joseph Myers <joseph@codesourcery.com>
12999 * c-common.c (parse_optimize_options): Pass global_dc to
13001 * c-opts.c (c_common_handle_option): Pass &global_options to
13002 set_Wstrict_aliasing.
13003 * c.opt (v): Don't mark Common or document here.
13005 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
13008 * c-format.c (format_type): New type gcc_objc_string_format_type.
13009 (valid_stringptr_type_p): New.
13010 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
13011 (check_format_string): Pass expected type, use
13012 valid_stringptr_type_p (), check that the format string types are
13013 consistent with the format specification.
13014 (decode_format_attr): Warn if NSString is used outside objective-c.
13015 (format_types_orig): Add NSString.
13016 (format_name): New.
13017 (format_flags): New.
13018 (check_format_arg): Handle format strings requiring an external parser.
13019 first_target_format_type: New variable.
13020 (handle_format_attribute): Set up first_target_format_type, pass the
13021 expected format arg string type to check_format_string().
13022 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
13023 * stub-objc.c (objc_string_ref_type_p): New.
13024 (objc_check_format_arg): New.
13026 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
13028 Fixed using the Objective-C 2.0 dot-syntax with class names.
13029 * c-common.h (objc_build_class_component_ref): New.
13030 * stub-objc.c (objc_build_class_component_ref): New.
13032 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13034 * c.opt (Wproperty-assign-default): New option.
13036 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
13038 Implemented -fobjc-std=objc1 flag.
13039 * c.opt (fobjc-std=objc1): New option.
13041 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
13043 Implemented format and noreturn attributes for Objective-C methods.
13044 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
13045 attribute for Objective-C methods.
13047 2010-10-31 Jason Merrill <jason@redhat.com>
13049 * c-common.c (conversion_warning, warn_for_collisions_1): Use
13052 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
13054 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
13055 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
13056 (objc_add_property_declaration): Removed arguments for copies and
13058 (objc_build_getter_call): Renamed to
13059 objc_maybe_build_component_ref.
13060 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13061 (objc_is_property_ref): New.
13062 * c-common.c (c_common_reswords): Removed copies and ivar.
13063 * stub-objc.c (objc_add_property_declaration): Removed arguments
13064 for copies and ivar.
13065 (objc_build_getter_call): Renamed to
13066 objc_maybe_build_component_ref.
13067 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
13068 (objc_is_property_ref): New.
13070 2010-10-29 Arnaud Charlet <charlet@adacore.com>
13071 Matthew Gingell <gingell@adacore.com>
13073 * c-ada-spec.c (separate_class_package): New function.
13074 (pp_ada_tree_identifier): Prefix references to C++ classes with the
13075 name of their enclosing package.
13076 (print_ada_declaration): Use separate_class_package.
13078 2010-10-27 Jason Merrill <jason@redhat.com>
13080 * c-common.c (c_common_reswords): Add __is_literal_type.
13081 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
13083 * c-common.c (check_case_value): Remove special C++ code.
13085 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13087 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
13088 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
13089 and RID_LAST_PATTR.
13090 (objc_add_property_declaration): Added additional arguments.
13091 (objc_property_attribute_kind): Removed.
13092 (objc_set_property_attr): Removed.
13093 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
13094 copy and nonatomic.
13095 * stub-objc.c (objc_add_property_declaration): Added additional
13097 (objc_set_property_attr): Removed.
13099 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
13101 * c-common.h (objc_add_property_variable): Renamed to
13102 objc_add_property_declaration. Added location argument.
13103 * stub-objc.c (objc_add_property_variable): Same change.
13105 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
13107 * c-common.h (objc_maybe_printable_name): New.
13108 * stub-objc.c (objc_maybe_printable_name): New.
13110 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
13111 Andrew Pinski <pinskia@gmail.com>
13113 * c-common.h (c_common_mark_addressable_vec): Declare.
13114 * c-common.c (c_common_mark_addressable_vec): New function.
13116 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13118 * c-common.h (objc_set_method_type): Removed.
13119 (objc_add_method_declaration): Added boolean argument.
13120 (objc_start_method_definition): Same change.
13121 (objc_build_method_signature): Same change.
13122 * stub-objc.c (objc_set_method_type): Removed.
13123 (objc_add_method_declaration): Added boolean argument.
13124 (objc_start_method_definition): Same change.
13125 (objc_build_method_signature): Same change.
13127 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
13129 * c-common.h (finish_file): Removed.
13130 (objc_write_global_declarations): New.
13131 * c-opts.c (c_common_parse_file): Do not call finish_file.
13132 * stub-objc.c (objc_write_global_declarations): New.
13134 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13136 Implemented parsing @synthesize and @dynamic for
13137 Objective-C/Objective-C++.
13138 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
13139 (objc_add_synthesize_declaration): New.
13140 (objc_add_dynamic_declaration): New.
13141 * c-common.c (c_common_reswords): Add synthesize and dynamic.
13142 * stub-objc.c (objc_add_synthesize_declaration): New.
13143 (objc_add_dynamic_declaration): New.
13145 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
13148 * c-cppbuiltin.c (mode_has_fma): Move function here from
13149 builtins.c. Don't use the fma optab, instead just use the
13150 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
13153 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
13155 Merge from 'apple/trunk' branch on FSF servers.
13157 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
13160 * c-common.h (objc_non_volatilized_type): New declaration
13161 * stub-objc.c (objc_non_volatilized_type): New stub.
13163 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
13165 Merge from 'apple/trunk' branch on FSF servers.
13167 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
13170 * c-common.h (objc_diagnose_private_ivar): New decl.
13171 * stub-objc.c (objc_diagnose_private_ivar): New stub.
13173 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
13175 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
13176 * c-common.h (enum rid): Add RID_AT_PACKAGE.
13177 (objc_ivar_visibility_kind): New enum.
13178 (objc_set_visibility): Adjust prototype to use visibility enum.
13179 * stub-objc.c (objc_set_visibility): Adjust stub to use
13182 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
13184 * c-cppbuiltin.c (builtin_define_float_constants): Emit
13185 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
13186 has the appropriate fma builtins.
13187 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
13189 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
13191 merge from FSF apple 'trunk' branch.
13192 2006 Fariborz Jahanian <fjahanian@apple.com>
13194 Radars 4436866, 4505126, 4506903, 4517826
13195 * c-common.c (c_common_resword): Define @property and its attributes.
13196 * c-common.h: Define property attribute enum entries.
13197 (OBJC_IS_PATTR_KEYWORD): New.
13198 (objc_property_attribute_kind): New enum.
13199 Declare objc_set_property_attr (), objc_add_property_variable (),
13200 objc_build_getter_call () and objc_build_setter_call ().
13201 * stub-objc.c (objc_set_property_attr): New stub.
13202 (objc_add_property_variable): Likewise.
13203 (objc_build_getter_call): Likewise.
13204 (objc_build_setter_call) Likewise.
13206 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
13208 merge from FSF apple 'trunk' branch.
13209 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
13211 Radar 3803157 (method attributes)
13212 * c-common.c (handle_deprecated_attribute): Recognize
13213 objc methods as valid declarations.
13214 * c-common.h: Declare objc_method_decl ().
13215 * stub-objc.c (objc_method_decl): New stub.
13217 2010-10-08 Joseph Myers <joseph@codesourcery.com>
13219 * c-common.c (parse_optimize_options): Call
13220 decode_cmdline_options_to_array_default_mask before
13221 decode_options. Update arguments to decode_options.
13222 * c-common.h (c_common_init_options_struct): Declare.
13223 * c-opts.c (c_common_init_options_struct): New. Split out from
13224 c_common_init_options.
13226 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13228 Implemented fast enumeration for Objective-C.
13229 * c-common.h (objc_finish_foreach_loop): New.
13230 * stub-objc.c (objc_finish_foreach_loop): New.
13232 2010-10-05 Joseph Myers <joseph@codesourcery.com>
13234 * c-common.h (struct diagnostic_context): Don't declare here.
13235 (c_common_initialize_diagnostics): Declare using
13236 diagnostic_context typedef.
13237 * c-opts.c (c_common_handle_option): Pass global_dc to
13238 handle_generated_option.
13240 2010-10-04 Joseph Myers <joseph@codesourcery.com>
13242 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13243 handle_generated_option.
13245 2010-10-03 Ian Lance Taylor <iant@google.com>
13247 * c.opt (-fplan9-extensions): New option.
13249 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13251 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13253 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13254 of duplicating code.
13256 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13258 * c-common.c: Add two new entries for @optional
13259 and @required keywords.
13261 merge from FSF 'apple/trunk' branch.
13262 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
13265 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13266 objective-c keywords.
13267 (objc_set_method_opt): New declaration.
13268 * stub-objc.c (objc_set_method_opt): New stub.
13270 2010-09-30 Joseph Myers <joseph@codesourcery.com>
13272 * c-common.c (handle_optimize_attribute): Pass &global_options to
13273 cl_optimization_save and cl_optimization_restore.
13274 * c-opts.c (c_common_handle_option): Pass &global_options to
13275 handle_generated_option.
13276 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13277 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13278 &global_options to cl_optimization_restore.
13280 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13282 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13283 Objective-C/Objective-C++ keywords.
13285 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13287 Merge from 'apple/trunk' branch on FSF servers.
13289 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
13292 * c-common.h (objc_check_global_decl): New declaration.
13293 * stub-objc.c (objc_check_global_decl): New stub.
13295 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13297 * c.opt: Don't use VarExists.
13299 2010-09-29 Joseph Myers <joseph@codesourcery.com>
13301 * c-common.c (c_cpp_error): Update names of diagnostic_context
13303 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13304 cl_optimization members.
13305 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13306 sanitize_cpp_opts, finish_options): Update names of cpp_options
13309 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13311 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13312 (objc_is_reserved_word): Removed.
13313 * c-common.c: Updated comments.
13314 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13315 objc_is_reserved_word.
13316 * stub-objc.c (objc_is_reserved_word): Removed.
13318 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13320 * c-common.h (objc_add_method_declaration): Adjust prototype to
13321 include attributes.
13322 (objc_start_method_definition): Likewise.
13323 (objc_build_keyword_decl): Likewise.
13324 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13325 (objc_start_method_definition): Likewise.
13326 (objc_build_keyword_decl): Likewise.
13328 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13330 * c-common.h (objc_start_class_interface): Adjust prototype.
13331 (objc_start_category_interface): Likewise.
13332 (objc_start_protocol): Likewise.
13333 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13334 (objc_start_class_interface): Likewise.
13335 (objc_start_category_interface): Likewise.
13337 2010-09-27 Ian Lance Taylor <iant@google.com>
13339 * c-common.c (c_common_attribute_table): Add no_split_stack.
13340 (handle_no_split_stack_attribute): New static function.
13342 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13344 Merge from 'apple/trunk' branch on FSF servers.
13346 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
13349 * c-common.h (objc_have_common_type): New declaration.
13350 * stub-objc.c (objc_have_common_type): New stub.
13352 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13355 * c-common.h (objc_common_type): New prototype.
13356 * stub-objc.c (objc_common_type): New stub.
13358 2010-09-24 Jan Hubicka <jh@suse.cz>
13360 * c-common.c (handle_leaf_attribute): New function.
13361 (struct attribute_spec c_common_att): Add leaf.
13363 2010-09-22 Joseph Myers <joseph@codesourcery.com>
13365 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13366 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13367 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13368 -include-barrier, -include-directory, -include-directory=,
13369 -include-directory-after, -include-directory-after=,
13370 -include-prefix, -include-prefix=, -include-with-prefix,
13371 -include-with-prefix=, -include-with-prefix-after,
13372 -include-with-prefix-after=, -include-with-prefix-before,
13373 -include-with-prefix-before=, -no-integrated-cpp,
13374 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13375 -output=, -pedantic, -pedantic-errors, -preprocess,
13376 -print-missing-file-dependencies, -trace-includes, -traditional,
13377 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13378 -user-dependencies, -verbose, -write-dependencies,
13379 -write-user-dependencies, no-integrated-cpp, traditional): New.
13381 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13384 * c-common.h (objc_start_method_definition): Return bool instead
13386 * stub-objc.c (objc_start_method_definition): Return bool instead
13389 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13392 * c-common.h (objc_get_interface_ivars): New declaration.
13393 * stub-objc.c (objc_get_interface_ivars): New stub.
13395 2010-09-15 Ian Lance Taylor <iant@google.com>
13397 * c-common.c (parse_optimize_options): Do not capitalize warning
13398 messages. Remove period at end of warning message.
13400 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13402 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13403 (handle_alias_attribute): ... here.
13404 (handle_ifunc_attribute): New.
13406 2010-09-06 Mark Mitchell <mark@codesourcery.com>
13408 * c-common.h (do_warn_double_promotion): Declare.
13409 * c-common.c (do_warn_double_promotion): Define.
13411 2010-09-05 Mark Mitchell <mark@codesourcery.com>
13413 * c.opt (Wdouble-promotion): New.
13415 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13417 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13418 fvtable-thunks, fxref): Mark no longer supported in help text.
13420 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13422 * c.opt (Wimport, fall-virtual, falt-external-templates,
13423 fdefault-inline, fenum-int-equiv, fexternal-templates,
13424 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13425 fname-mangling-version-, fnew-abi, fnonnull-objects,
13426 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13427 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13429 (fhandle-exceptions): Mark with Alias and Warn.
13430 * c-opts.c (c_common_handle_option): Don't handle options marked
13433 2010-09-02 Joseph Myers <joseph@codesourcery.com>
13435 * c.opt (Wcomments, Werror-implicit-function-declaration,
13436 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13437 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13439 * c-common.c (option_codes): Use OPT_Wcomment instead of
13441 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13442 Don't handle options marked as aliases.
13444 2010-08-25 Richard Guenther <rguenther@suse.de>
13446 * c-common.c (c_common_get_alias_set): Remove special
13447 handling for pointers.
13449 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13451 * c-common.c: Use FOR_EACH_VEC_ELT.
13452 * c-gimplify.c: Likewise.
13453 * c-pragma.c: Likewise.
13455 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13457 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13459 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13461 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13462 instead of OPT_MDX and OPT_MMDX.
13464 2010-08-16 Joseph Myers <joseph@codesourcery.com>
13466 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13468 2010-08-12 Joseph Myers <joseph@codesourcery.com>
13470 * c.opt (MD, MMD): Change to MDX and MMDX.
13471 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13473 2010-08-11 Joseph Myers <joseph@codesourcery.com>
13475 * c-opts.c (c_common_handle_option): Call handle_generated_option
13476 instead of handle_option.
13478 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13480 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13481 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13483 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13485 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13486 (pending_redefine_extname): Change type to a VEC.
13487 (add_to_renaming_pragma_list): Update for new type of
13488 pending_redefine_extname.
13489 (maybe_apply_renaming_pragma): Likewise.
13491 2010-08-04 Arnaud Charlet <charlet@adacore.com>
13493 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13495 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13496 decide whether a type has already been declared/seen.
13497 Do not go to the original type.
13498 (dump_nested_types): New parameter forward.
13499 Generate forward declaration if needed and mark type as visited.
13500 (print_ada_declaration): Call dump_nested_types if not already done.
13501 Mark types as visited.
13503 2010-08-03 Joseph Myers <joseph@codesourcery.com>
13505 * c.opt (-print-pch-checksum): Remove option.
13506 * c-opts.c (c_common_handle_option): Don't handle
13507 OPT_print_pch_checksum.
13509 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13511 * c-common.h (c_common_handle_option): Update prototype and return
13513 * c-opts.c (c_common_handle_option): Update prototype and return
13514 value type. Update calls to handle_option and
13515 enable_warning_as_error.
13517 2010-07-27 Jakub Jelinek <jakub@redhat.com>
13520 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13522 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13524 * c-common.h (c_common_missing_argument): Remove.
13525 * c-opts.c (c_common_missing_argument): Remove.
13526 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13527 idirafter, imacros, include, isysroot, isystem, iquote): Add
13529 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13531 2010-07-27 Joseph Myers <joseph@codesourcery.com>
13533 * c-common.h (c_common_option_lang_mask,
13534 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13536 (c_common_init_options): Update prototype.
13537 * c-opts.c (c_common_option_lang_mask): New.
13538 (c_common_initialize_diagnostics): Split out of
13539 c_common_init_options.
13540 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13542 (c_common_init_options): Update prototype. Use decoded options in
13543 search for -lang-asm.
13545 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13547 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13548 * c-format.c: Likewise.
13550 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13552 * c-common.h: Include diagnostic-core.h. Error if already
13554 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13556 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13558 * c-common.c (IN_GCC_FRONTEND): Do not undef.
13559 Do not include expr.h
13560 (vector_mode_valid_p): Move here.
13562 2010-06-21 DJ Delorie <dj@redhat.com>
13564 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13565 allow these pragmas anywhere.
13567 2010-06-14 Jakub Jelinek <jakub@redhat.com>
13570 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13571 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13572 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13573 ggc_strdup instead of xstrdup.
13575 2010-06-10 Jakub Jelinek <jakub@redhat.com>
13577 * c-cppbuiltin.c: Include cpp-id-data.h.
13578 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13579 (lazy_hex_fp_value): New function.
13580 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13582 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13584 * c-gimplify.c: Do not include tree-flow.h
13586 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13589 * c-common.c: Rename targetm member:
13590 targetm.enum_va_list -> targetm.enum_va_list_p
13592 2010-06-28 Anatoly Sokolov <aesok@post.ru>
13594 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13596 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13598 * c-cppbuiltin.c: Do not include except.h.
13600 2010-06-24 Andi Kleen <ak@linux.intel.com>
13602 * c-common.c (warn_for_omitted_condop): New.
13603 * c-common.h (warn_for_omitted_condop): Add prototype.
13605 2010-06-21 Joseph Myers <joseph@codesourcery.com>
13607 * c.opt (lang-objc): Remove.
13608 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13610 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13612 * c-opts.c: Include "tm_p.h".
13614 2010-06-20 Joseph Myers <joseph@codesourcery.com>
13616 * c-common.c (parse_optimize_options): Update call to
13619 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13621 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13622 new type of types_used_by_cur_var_decl.
13624 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13627 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13628 for C++ standard compliance.
13630 2010-06-16 Jason Merrill <jason@redhat.com>
13632 * c.opt: Add -Wnoexcept.
13634 2010-06-16 Richard Guenther <rguenther@suse.de>
13637 * c-common.c (c_common_truthvalue_conversion): Remove
13638 premature and wrong optimization concering ADDR_EXPRs.
13640 2010-06-15 Arnaud Charlet <charlet@adacore.com>
13642 * c-ada-spec.c (dump_sloc): Remove column info.
13643 (is_simple_enum): New function.
13644 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13645 enum types when relevant.
13647 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13649 * c-common.c (conversion_warning): Warn at expression
13652 2010-06-10 Joseph Myers <joseph@codesourcery.com>
13654 * c-opts.c (c_common_handle_option): Don't handle
13657 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13659 * c-pragma.c (push_alignment): Use typed GC allocation.
13660 (handle_pragma_push_options): Likewise.
13662 * c-common.c (parse_optimize_options): Likewise.
13664 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13667 2010-06-07 Joseph Myers <joseph@codesourcery.com>
13669 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13670 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13671 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13672 flag_signed_bitfields, warn_strict_null_sentinel,
13673 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13674 flag_gen_declaration, flag_no_gnu_keywords,
13675 flag_implement_inlines, flag_implicit_templates,
13676 flag_implicit_inline_templates, flag_optional_diags,
13677 flag_elide_constructors, flag_default_inline, flag_rtti,
13678 flag_conserve_space, flag_access_control, flag_check_new,
13679 flag_new_for_scope, flag_weak, flag_working_directory,
13680 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13681 flag_enforce_eh_specs, flag_threadsafe_statics,
13682 flag_pretty_templates): Remove.
13683 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13684 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13685 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13686 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13687 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13688 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13689 flag_no_gnu_keywords, flag_implement_inlines,
13690 flag_implicit_templates, flag_implicit_inline_templates,
13691 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13692 flag_rtti, flag_conserve_space, flag_access_control,
13693 flag_check_new, flag_new_for_scope, flag_weak,
13694 flag_working_directory, flag_use_cxa_atexit,
13695 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13696 flag_threadsafe_statics, flag_pretty_templates,
13697 warn_strict_null_sentinel): Remove.
13698 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13699 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13700 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13701 fimplicit-inline-templates, fimplicit-templates,
13702 flax-vector-conversions, fms-extensions, fnil-receivers,
13703 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13704 frtti, fshort-double, fshort-enums, fshort-wchar,
13705 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13706 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13707 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13708 gen-decls, undef): Use Var.
13709 (fdefault-inline, foptional-diags): Document as doing nothing.
13710 * c-opts.c (c_common_handle_option): Remove cases for options now
13711 using Var. Mark ignored options as such.
13713 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13715 * c-common.c: Moved to here from parent directory.
13716 * c-common.def: Likewise.
13717 * c-common.h: Likewise.
13718 * c-cppbuiltin.c: Likewise.
13719 * c-dump.c: Likewise.
13720 * c-format.c: Likewise.
13721 * c-format.h : Likewise.
13722 * c-gimplify.c: Likewise.
13723 * c-lex.c: Likewise.
13724 * c-omp.c: Likewise.
13726 * c-opts.c: Likewise.
13727 * c-pch.c: Likewise.
13728 * c-ppoutput.c: Likewise.
13729 * c-pragma.c: Likewise.
13730 * c-pragma.h: Likewise.
13731 * c-pretty-print.c: Likewise.
13732 * c-pretty-print.h: Likewise.
13733 * c-semantics.c: Likewise.
13734 * stub-objc.c: Likewise.
13736 * c-common.c: Include gt-c-family-c-common.h.
13737 * c-pragma.c: Include gt-c-family-c-pragma.h.
13739 Copyright (C) 2010-2022 Free Software Foundation, Inc.
13741 Copying and distribution of this file, with or without modification,
13742 are permitted in any medium without royalty provided the copyright
13743 notice and this notice are preserved.