]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
libstdc++: Add test for type traits not having friend access
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
279c6715
GA
12022-09-22 David Malcolm <dmalcolm@redhat.com>
2
3 PR c/106830
4 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
5 values that don't fit in uhwi.
6
d0fc05e8
GA
72022-09-15 Richard Biener <rguenther@suse.de>
8
9 * c-common.h (build_void_list_node): Remove.
10 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
11 void_list_node.
12
861d1a11
GA
132022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
14
15 * c-format.cc (convert_format_name_to_system_name): Fix warning.
16
fe2a8ce9
GA
172022-09-07 Joseph Myers <joseph@codesourcery.com>
18
19 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
20 for alignas, alignof, bool, false, static_assert, thread_local and
21 true.
22
232022-09-07 Jakub Jelinek <jakub@redhat.com>
24
25 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
26 " in comments" from description.
27 (Wunicode): New option.
28
25aeb922
GA
292022-09-06 Jakub Jelinek <jakub@redhat.com>
30
31 PR c/106836
32 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
33
83f2f228
GA
342022-09-03 Jakub Jelinek <jakub@redhat.com>
35
36 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
37 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
38 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
39 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
40
c64b0947
GA
412022-09-02 David Malcolm <dmalcolm@redhat.com>
42
43 PR c/90885
44 * c-common.h (check_for_xor_used_as_pow): New decl.
45 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
46 * c-warn.cc (check_for_xor_used_as_pow): New.
47 * c.opt (Wxor-used-as-pow): New.
48
bb0a1556
GA
492022-09-01 Jason Merrill <jason@redhat.com>
50
51 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
52 char8_t.
53 (braced_list_to_string): Check for char-sized elements.
54
552022-09-01 Jakub Jelinek <jakub@redhat.com>
56
57 PR c++/106655
58 * c.opt (-Winvalid-utf8): New warning.
59 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
60 Set cpp_opts->cpp_input_charset_explicit.
61 (c_common_post_options): If -finput-charset=UTF-8 is explicit
62 in C++23, enable -Winvalid-utf8 by default and if -pedantic
63 or -pedantic-errors, make it a pedwarn.
64
542c60c4
GA
652022-08-31 Joseph Myers <joseph@codesourcery.com>
66
67 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
68 for LABEL_DECL.
69 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
70 decl_attributes.
71 * c-common.h (do_case, c_add_case_label): Update declarations.
72 * c-lex.cc (c_common_has_attribute): For C, produce a result of
73 201910 for fallthrough and 202106 for maybe_unused.
74
16f542d6
GA
752022-08-26 Marek Polacek <polacek@redhat.com>
76
77 PR c++/81159
78 * c.opt (Wself-move): New option.
79
802022-08-26 Jakub Jelinek <jakub@redhat.com>
81
82 * c-common.cc (check_builtin_function_arguments): Handle
83 BUILT_IN_ISSIGNALING.
84
852022-08-26 Jakub Jelinek <jakub@redhat.com>
86
87 PR c++/106648
88 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
89 __cpp_named_character_escapes to 202207L.
90
5d4389dc
GA
912022-08-25 Marek Polacek <polacek@redhat.com>
92
93 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
94 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
95 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
96 (struct c_common_resword): Resize the disable member.
97 (D_C2X): Add.
98 (nullptr_node): Define.
99 (nullptr_type_node): Define.
100 (NULLPTR_TYPE_P): Define.
101 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
102 NULLPTR_TYPE.
103 (c_pretty_printer::direct_abstract_declarator): Likewise.
104 (c_pretty_printer::constant): Likewise.
105
47a61e65
GA
1062022-08-16 Tom Honermann <tom@honermann.net>
107
108 PR c++/106423
109 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
110 diagnostics in C++20 and later.
111 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
112
5cd525f0
GA
1132022-08-11 Marek Polacek <polacek@redhat.com>
114
115 PR middle-end/102633
116 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
117 suppress_warning here.
118
5f17badb
GA
1192022-08-08 Tom Honermann <tom@honermann.net>
120
121 PR preprocessor/106426
122 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
123 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
124
1252022-08-08 Tom Honermann <tom@honermann.net>
126
127 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
128 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
129 enabled.
130 * c-opts.cc (c_common_post_options): Set flag_char8_t if
131 targeting C2x.
132
4a7274dd
GA
1332022-07-31 Lewis Hyatt <lhyatt@gmail.com>
134
135 PR c++/66290
136 * c-common.h: Rename global done_lexing to
137 override_libcpp_locations.
138 * c-common.cc (c_cpp_diagnostic): Likewise.
139 * c-opts.cc (c_common_finish): Set override_libcpp_locations
140 (formerly done_lexing) immediately prior to calling cpp_finish ().
141
1e2c5f4c
GA
1422022-07-27 Lewis Hyatt <lhyatt@gmail.com>
143
144 * c-ppoutput.cc (token_streamer::stream): Update input_location
145 prior to streaming each token.
146
0e6fa997
GA
1472022-07-23 Immad Mir <mirimmad@outlook.com>
148
149 * c-attribs.cc: (c_common_attribute_table): add three new attributes
150 namely: fd_arg, fd_arg_read and fd_arg_write.
151 (handle_fd_arg_attribute): New.
152
bdc7b765
GA
1532022-07-15 Marek Polacek <polacek@redhat.com>
154
155 PR c++/104477
156 * c-common.cc (c_common_reswords): Add
157 __reference_constructs_from_temporary and
158 __reference_converts_from_temporary.
159 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
160 RID_REF_CONVERTS_FROM_TEMPORARY.
161
1622022-07-15 Jonathan Wakely <jwakely@redhat.com>
163
164 * c-format.cc (class range_label_for_format_type_mismatch):
165 Adjust to new label_text API.
166
c72d4714
GA
1672022-07-11 Lewis Hyatt <lhyatt@gmail.com>
168
169 PR preprocessor/106252
170 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
171 option argument prior to verifying the option was found.
172
6345c414
GA
1732022-07-07 David Malcolm <dmalcolm@redhat.com>
174
175 * c-format.cc (range_label_for_format_type_mismatch::get_text):
176 Update for removal of label_text::maybe_free in favor of automatic
177 memory management.
178
4bc92c3b
GA
1792022-07-06 Lewis Hyatt <lhyatt@gmail.com>
180
181 PR preprocessor/53920
182 PR c++/53431
183 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
184 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
185 (c_pp_stream_token): Declare.
186 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
187 pragmas to...
188 (should_output_pragmas): ...here. New function.
189 (token_streamer::stream): Support handling early pragmas.
190 (do_line_change): Likewise.
191 (c_pp_stream_token): New function.
192 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
193 (pragma_diagnostic_lex_normal): New function. Moved logic for
194 interpreting GCC diagnostic pragmas here.
195 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
196 directly from libcpp.
197 (handle_pragma_diagnostic): Refactor into helper function...
198 (handle_pragma_diagnostic_impl): ...here. New function.
199 (handle_pragma_diagnostic_early): New function.
200 (handle_pragma_diagnostic_early_pp): New function.
201 (struct pragma_ns_name): Renamed to...
202 (struct pragma_pp_data): ...this. Add new "early_handler" member.
203 (c_register_pragma_1): Support early pragmas in the preprocessor.
204 (c_register_pragma_with_early_handler): New function.
205 (c_register_pragma): Support the new early handlers in struct
206 internal_pragma_handler.
207 (c_register_pragma_with_data): Likewise.
208 (c_register_pragma_with_expansion): Likewise.
209 (c_register_pragma_with_expansion_and_data): Likewise.
210 (c_invoke_early_pragma_handler): New function.
211 (c_pp_invoke_early_pragma_handler): New function.
212 (init_pragma): Add early pragma support for diagnostic pragmas.
213 * c-pragma.h (struct internal_pragma_handler): Add new early handler
214 members.
215 (c_register_pragma_with_early_handler): Declare.
216 (c_invoke_early_pragma_handler): Declare.
217 (c_pp_invoke_early_pragma_handler): Declare.
218
d1f3a3ff
GA
2192022-07-05 Marek Polacek <polacek@redhat.com>
220
221 PR c++/105626
222 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
223 u8 strings.
224
ed974488
GA
2252022-07-01 Marek Polacek <polacek@redhat.com>
226
227 PR c++/106111
228 * c-common.h (enum rid): Update RID_LAST_CXX20.
229
976196b3
GA
2302022-06-30 Jonathan Wakely <jwakely@redhat.com>
231
232 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
233 names.
234
84c2131d
GA
2352022-06-24 Jason Merrill <jason@redhat.com>
236
237 PR c++/87729
238 PR c++/20423
239 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
240
4390e7bf
GA
2412022-06-18 Jakub Jelinek <jakub@redhat.com>
242
243 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
244 Use flag_sanitize_trap & SANITIZE_??? instead of
245 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
246 and flag_sanitize_trap differs for them, emit __builtin_trap only
247 for the comparison where trap is requested.
248 (ubsan_instrument_vla, ubsan_instrument_return): Use
249 lag_sanitize_trap & SANITIZE_??? instead of
250 flag_sanitize_undefined_trap_on_error.
251
c3642271
GA
2522022-06-13 Jason Merrill <jason@redhat.com>
253
254 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
255
d9176e64
GA
2562022-05-27 Marek Polacek <polacek@redhat.com>
257
258 PR c/90658
259 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
260
2612022-05-27 Jakub Jelinek <jakub@redhat.com>
262
263 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
264
57f2ce6a
GA
2652022-05-20 David Malcolm <dmalcolm@redhat.com>
266
267 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
268 and "override".
269 * c-pretty-print.h: Likewise.
270
1cda629f
GA
2712022-05-18 Marek Polacek <polacek@redhat.com>
272
273 PR c/105131
274 * c.opt (Wenum-int-mismatch): New.
275
2762022-05-18 Marek Polacek <polacek@redhat.com>
277
278 PR c++/105497
279 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
280 enumerator when it was marked with attribute unused.
281
2822022-05-18 Eric Botcazou <ebotcazou@adacore.com>
283
284 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
285 floating-point complex types.
286 <POINTER_TYPE>: Do not use limited_with clause if the designated
287 type is a scalar type.
288
3d9439b1
GA
2892022-05-17 Jakub Jelinek <jakub@redhat.com>
290
291 * c-omp.cc (c_finish_omp_depobj): Handle
292 OMP_CLAUSE_DEPEND_INOUTSET.
293
702bd11f
GA
2942022-05-16 Jason Merrill <jason@redhat.com>
295
296 PR c/105492
297 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
298 here.
299
3002022-05-16 Martin Liska <mliska@suse.cz>
301
302 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
303 (c_common_nodes_and_builtins): Likewise.
304 * c-format.cc (check_tokens): Likewise.
305 (check_plain): Likewise.
306 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
307 (init_pragma): Likewise.
308 * known-headers.cc (get_string_macro_hint): Likewise.
309 (get_stdlib_header_for_name): Likewise.
310 * c-attribs.cc: Likewise.
311
9df4ffe4
GA
3122022-05-13 Richard Biener <rguenther@suse.de>
313
314 * c-omp.cc: Remove gimple-fold.h include.
315
49ace834
GA
3162022-05-12 Jakub Jelinek <jakub@redhat.com>
317
318 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
319 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
320 if null_pointer_node.
321
d0d513b5
GA
3222022-05-11 Martin Liska <mliska@suse.cz>
323
324 PR target/105355
325 * c-opts.cc (c_common_handle_option): Change option name.
326 * c.opt: Remove Joined and use Separate option.
327
bd022ff9
GA
3282022-05-09 Alex Coplan <alex.coplan@arm.com>
329
330 * c-common.h (get_dump_info): Delete.
331 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
332 from the global dump_manager instead of the (now obsolete)
333 get_dump_info.
334 * c-opts.cc (original_dump_file): Delete.
335 (original_dump_flags): Delete.
336 (c_common_parse_file): Switch to using global dump_manager to
337 manage the original dump file; fix leak of dump file.
338 (get_dump_info): Delete.
339
a1947c92
GA
3402022-05-07 Marek Polacek <polacek@redhat.com>
341
342 PR c++/101833
343 PR c++/47634
344 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
345 with FN being either a function declaration or function type. Use
346 maybe_adjust_arg_pos_for_attribute.
347 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
348 check_function_format.
349 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
350 (positional_argument): Adjust.
351 * c-format.cc (get_constant): Rename to ...
352 (validate_constant): ... this. Take EXPR by reference. Return bool
353 instead of tree.
354 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
355 return value of validate_constant.
356 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
357 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
358 (check_function_format): Adjust a parameter name.
359 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
360
3e7db517
GA
3612022-05-04 Marek Polacek <polacek@redhat.com>
362
363 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
364 char to int.
365
95874f95
GA
3662022-04-30 Jason Merrill <jason@redhat.com>
367
368 PR c/100545
369 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
370 and typedef.
371 * c-common.cc (set_underlying_type): Add assert.
372
01ad093b
GA
3732022-04-26 Patrick Palka <ppalka@redhat.com>
374
375 PR c++/105304
376 * c-common.cc (verify_tree) [restart]: Move up to before the
377 NULL test.
378
da066c42
GA
3792022-04-11 Jakub Jelinek <jakub@redhat.com>
380
381 PR c++/105186
382 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
383 and __int%d__ builtin types, initialize corresponding ridpointers
384 entry.
385
150ab50f
GA
3862022-03-30 Marek Polacek <polacek@redhat.com>
387
388 PR c++/101030
389 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
390 conversion_warning when OP1 is null.
391
3922022-03-30 Thomas Schwinge <thomas@codesourcery.com>
393
394 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
395 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
396 option properties.
397
3982022-03-30 Thomas Schwinge <thomas@codesourcery.com>
399
400 * c.opt (Wuse-after-free): Remove.
401
4022022-03-30 Thomas Schwinge <thomas@codesourcery.com>
403
404 * c.opt (Warray-bounds): Remove.
405
d2906412
GA
4062022-03-26 Thomas Schwinge <thomas@codesourcery.com>
407
408 * c.opt: Properly quote comment.
409
31e989a2
GA
4102022-03-25 Eric Botcazou <ebotcazou@adacore.com>
411
412 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
413 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
414 the referenced type instead. Deal with the anonymous original type
415 of a typedef'ed type. In the actual access case, follow the chain
416 of external subtypes.
417 <TYPE_DECL>: Tidy up control flow.
418
d156bb87
GA
4192022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
420
421 * c-ada-spec.cc: Change array length
422
d7f00da1
GA
4232022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
424
425 * c-common.cc (c_family_tests): Call the new tests.
426 * c-common.h (c_diagnostic_tests): Declare.
427 (c_opt_problem_cc_tests): Likewise.
428
4292022-03-19 Jakub Jelinek <jakub@redhat.com>
430
431 PR c++/101515
432 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
433 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
434 be printed.
435
9fc8f278
GA
4362022-03-16 Christophe Lyon <christophe.lyon@arm.com>
437 Roger Sayle <roger@nextmovesoftware.com>
438
439 PR c/98198
440 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
441
4422022-03-16 Patrick Palka <ppalka@redhat.com>
443
444 PR c++/96780
445 * c.opt: Add -ffold-simple-inlines.
446
b9756c08
GA
4472022-03-13 Tobias Burnus <tobias@codesourcery.com>
448
449 * c-target.def (check_string_object_format_arg): Fix description typo.
450
57eeedda
GA
4512022-03-12 Thomas Schwinge <thomas@codesourcery.com>
452
453 PR other/65095
454 * c-common.h (c_omp_map_clause_name): Remove.
455 * c-omp.cc (c_omp_map_clause_name): Remove.
456
8cc4f9cd
GA
4572022-03-09 Jakub Jelinek <jakub@redhat.com>
458
459 PR c/104711
460 * c-opts.cc (c_common_post_options): Don't enable
461 -Wshift-negative-value from -Wextra for C++20 or later.
462 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
463 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
464 instead of TYPE_UNSIGNED.
465
e6533e2e
GA
4662022-03-07 Jakub Jelinek <jakub@redhat.com>
467
468 * c-attribs.cc: Fix up duplicated word issue in a comment.
469
12d4552e
GA
4702022-03-01 Martin Liska <mliska@suse.cz>
471
472 PR ipa/104533
473 * c-attribs.cc (handle_target_clones_attribute): Use
474 get_target_clone_attr_len and report warning soon.
475
0bdb0498
GA
4762022-02-17 Jonathan Wakely <jwakely@redhat.com>
477
478 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
479 (handle_pragma_weak): Likewise.
480 (handle_pragma_scalar_storage_order): Likewise.
481 (handle_pragma_redefine_extname): Likewise.
482 (handle_pragma_visibility): Likewise.
483 (handle_pragma_diagnostic): Likewise.
484 (handle_pragma_target): Likewise.
485 (handle_pragma_optimize): Likewise.
486 (handle_pragma_push_options): Likewise.
487 (handle_pragma_pop_options): Likewise.
488 (handle_pragma_reset_options): Likewise.
489 (handle_pragma_message): Likewise.
490 (handle_pragma_float_const_decimal64): Likewise.
491
cb3afcd2
GA
4922022-02-16 Jakub Jelinek <jakub@redhat.com>
493
494 PR c/104531
495 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
496 build_binary_op with LT_EXPR and only if that doesn't return
497 error_mark_node call build_modify_expr.
498
4992022-02-16 Jakub Jelinek <jakub@redhat.com>
500
501 PR c/104510
502 * c-common.cc (shorten_compare): Convert original arguments to
503 the original *restype_ptr when mixing binary and decimal float.
504
1f8a09d2
GA
5052022-02-14 Richard Biener <rguenther@suse.de>
506
507 PR c/104505
508 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
509 internal function calls.
510
e8d68f0a
GA
5112022-02-11 Richard Biener <rguenther@suse.de>
512
513 * c-attribs.cc (c_common_attribute_table): Add entry for
514 vector_mask.
515 (handle_vector_mask_attribute): New.
516
a645583d
GA
5172022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
518
519 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
520 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
521 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
522
3adf509f
GA
5232022-02-09 Jason Merrill <jason@redhat.com>
524
525 * c-cppbuiltin.cc (c_cpp_builtins): Update values
526 of __cpp_constexpr and __cpp_concepts for C++20.
527
bb99171b
GA
5282022-01-24 Marek Polacek <polacek@redhat.com>
529
530 PR preprocessor/104030
531 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
532
9dd44357
GA
5332022-01-21 Jakub Jelinek <jakub@redhat.com>
534
535 PR c++/104148
536 * c-common.h (check_function_arguments_recurse): Add for_format
537 arg.
538 * c-common.cc (check_function_nonnull): Pass false to
539 check_function_arguments_recurse's last argument.
540 (check_function_arguments_recurse): Add for_format argument,
541 if true, don't stop on warning_suppressed_p.
542 * c-format.cc (check_format_info): Pass true to
543 check_function_arguments_recurse's last argument.
544
fe1ad141
GA
5452022-01-19 David Malcolm <dmalcolm@redhat.com>
546
547 * c-common.cc (c_common_c_tests): Rename to...
548 (c_common_cc_tests): ...this.
549 (c_family_tests): Update calls for .c to .cc renaming.
550 * c-common.h (c_format_c_tests): Rename to...
551 (c_format_cc_tests): ...this.
552 (c_indentation_c_tests): Rename to...
553 (c_indentation_cc_tests): ...this.
554 (c_pretty_print_c_tests): Rename to...
555 (c_pretty_print_cc_tests): ...this.
556 * c-format.cc (c_format_c_tests): Rename to...
557 (c_format_cc_tests): ...this.
558 * c-indentation.cc (c_indentation_c_tests): Rename to...
559 (c_indentation_cc_tests): ...this.
560 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
561 (c_pretty_print_cc_tests): ...this.
562
fc829782
GA
5632022-01-17 Martin Liska <mliska@suse.cz>
564
565 * c-ada-spec.cc: Rename .c names to .cc.
566 * c-ada-spec.h: Likewise.
567 * c-common.cc (c_build_vec_convert): Likewise.
568 (warning_candidate_p): Likewise.
569 * c-common.h (enum rid): Likewise.
570 (build_real_imag_expr): Likewise.
571 (finish_label_address_expr): Likewise.
572 (c_get_substring_location): Likewise.
573 (c_build_bind_expr): Likewise.
574 (conflict_marker_get_final_tok_kind): Likewise.
575 (c_parse_error): Likewise.
576 (check_missing_format_attribute): Likewise.
577 (invalid_array_size_error): Likewise.
578 (warn_for_multistatement_macros): Likewise.
579 (build_attr_access_from_parms): Likewise.
580 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
581 * c-format.cc: Likewise.
582 * c-gimplify.cc (c_gimplify_expr): Likewise.
583 * c-indentation.h: Likewise.
584 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
585 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
586 * c-opts.cc (c_common_post_options): Likewise.
587 (set_std_cxx23): Likewise.
588 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
589 * c-pretty-print.h: Likewise.
590
5912022-01-17 Martin Liska <mliska@suse.cz>
592
593 * c-ada-spec.c: Moved to...
594 * c-ada-spec.cc: ...here.
595 * c-attribs.c: Moved to...
596 * c-attribs.cc: ...here.
597 * c-common.c: Moved to...
598 * c-common.cc: ...here.
599 * c-cppbuiltin.c: Moved to...
600 * c-cppbuiltin.cc: ...here.
601 * c-dump.c: Moved to...
602 * c-dump.cc: ...here.
603 * c-format.c: Moved to...
604 * c-format.cc: ...here.
605 * c-gimplify.c: Moved to...
606 * c-gimplify.cc: ...here.
607 * c-indentation.c: Moved to...
608 * c-indentation.cc: ...here.
609 * c-lex.c: Moved to...
610 * c-lex.cc: ...here.
611 * c-omp.c: Moved to...
612 * c-omp.cc: ...here.
613 * c-opts.c: Moved to...
614 * c-opts.cc: ...here.
615 * c-pch.c: Moved to...
616 * c-pch.cc: ...here.
617 * c-ppoutput.c: Moved to...
618 * c-ppoutput.cc: ...here.
619 * c-pragma.c: Moved to...
620 * c-pragma.cc: ...here.
621 * c-pretty-print.c: Moved to...
622 * c-pretty-print.cc: ...here.
623 * c-semantics.c: Moved to...
624 * c-semantics.cc: ...here.
625 * c-ubsan.c: Moved to...
626 * c-ubsan.cc: ...here.
627 * c-warn.c: Moved to...
628 * c-warn.cc: ...here.
629 * cppspec.c: Moved to...
630 * cppspec.cc: ...here.
631 * stub-objc.c: Moved to...
632 * stub-objc.cc: ...here.
633
9248ee41
GA
6342022-01-15 Martin Sebor <msebor@redhat.com>
635
636 PR c/63272
637 * c.opt (-Wdangling-pointer): New option.
638
6392022-01-15 Martin Sebor <msebor@redhat.com>
640
641 PR tree-optimization/80532
642 * c.opt (-Wuse-after-free): New options.
643
617db51d
GA
6442022-01-14 David Malcolm <dmalcolm@redhat.com>
645
646 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
647 (handle_tainted_args_attribute): New.
648
ad3f0d08
GA
6492022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
650 Jason Merrill <jason@redhat.com>
651
652 PR c++/70417
653 * c.opt: Added -Wmissing-template-keyword.
654
6552022-01-13 Richard Biener <rguenther@suse.de>
656
657 PR c/104002
658 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
659
02a8a01b
GA
6602022-01-12 Martin Liska <mliska@suse.cz>
661
662 PR target/103804
663 * c-attribs.c (handle_optimize_attribute): Do not call
664 cl_optimization_compare if we seen an error.
665
01a254e3
GA
6662022-01-11 Jakub Jelinek <jakub@redhat.com>
667
668 PR c/101537
669 PR c/103881
670 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
671 and BIT_XOR_EXPR.
672
d9450aa0
GA
6732022-01-10 Richard Biener <rguenther@suse.de>
674
675 PR middle-end/101530
676 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
677 in a TARGET_EXPR to force a temporary.
678
11ce8d04
GA
6792022-01-06 Marek Polacek <polacek@redhat.com>
680
681 PR c++/103758
682 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
683 diagnostic messages.
684 (handle_pragma_diagnostic): Likewise.
685
a4ae8c37
GA
6862022-01-03 Marek Polacek <polacek@redhat.com>
687
688 PR c++/103758
689 * c-format.c (check_tokens): Accept "decl-specifier*".
690
6912022-01-03 Jakub Jelinek <jakub@redhat.com>
692
693 PR c++/103600
694 * c-attribs.c (handle_non_overlapping_attribute): New function.
695 (c_common_attribute_table): Add "non overlapping" attribute.
696
84790a9d
GA
6972021-12-30 Jakub Jelinek <jakub@redhat.com>
698
699 PR c++/103012
700 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
701 cpp_define_unused/cpp_undef calls with forced token locations
702 BUILTINS_LOCATION.
703
d1e111da
GA
7042021-12-27 Patrick Palka <ppalka@redhat.com>
705
706 PR c++/103700
707 * c-common.c (pointer_int_sum): When quiet, return
708 error_mark_node for an incomplete pointed-to type and don't
709 call size_in_bytes_loc.
710
2554e2da
GA
7112021-12-17 Jason Merrill <jason@redhat.com>
712
713 PR c++/103681
714 * c-opts.c (c_common_post_options): Update defaults.
715
774269aa
GA
7162021-12-16 Martin Liska <mliska@suse.cz>
717
718 PR target/103709
719 * c-pragma.c (handle_pragma_pop_options): Do not check
720 global options modification when an error is seen in parsing
721 of options (pragmas or attributes).
722
c8dcf64b
GA
7232021-12-12 Jonathan Wakely <jwakely@redhat.com>
724
725 * known-headers.cc: Define INCLUDE_MEMORY instead of
726 INCLUDE_UNIQUE_PTR.
727 * name-hint.h: Likewise.
728 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
729
4b4839e3
GA
7302021-12-09 Jakub Jelinek <jakub@redhat.com>
731
732 PR pch/71934
733 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
734 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
735
03a9bd05
GA
7362021-12-03 Jakub Jelinek <jakub@redhat.com>
737
738 PR pch/71934
739 * c-pch.c (struct c_pch_validity): Remove pch_init member.
740 (pch_init): Don't initialize v.pch_init.
741 (c_common_valid_pch): Don't warn and punt if .text addresses change.
742
40fa651e
GA
7432021-12-01 Jason Merrill <jason@redhat.com>
744
745 PR c++/103310
746 * c.opt: Add -fconstexpr-fp-except.
747
87cd82c8
GA
7482021-11-29 Richard Biener <rguenther@suse.de>
749
750 * c-format.c (check_format_string): Remove spurious
751 gcc_unreachable.
752
7532021-11-29 Richard Biener <rguenther@suse.de>
754
755 * c-opts.c (c_common_post_options): Remove unreachable return.
756 * c-pragma.c (handle_pragma_target): Likewise.
757 (handle_pragma_optimize): Likewise.
758
091ccc06
GA
7592021-11-25 Jakub Jelinek <jakub@redhat.com>
760
761 PR c++/102611
762 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
763 default for C++23 regardless of warn_deprecated.
764 * c-cppbuiltin.c (c_cpp_builtins): Predefine
765 __cpp_multidimensional_subscript=202110L for C++23.
766
e1d43592
GA
7672021-11-23 Martin Sebor <msebor@redhat.com>
768
769 PR middle-end/88232
770 * c.opt: Add -Winfinite-recursion.
771
9c077398
GA
7722021-11-19 Martin Sebor <msebor@redhat.com>
773
774 PR c++/33925
775 PR c/102867
776 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
777 and improve handling tof defined symbols.
778
7792021-11-19 Martin Liska <mliska@suse.cz>
780
781 Revert:
782 2021-11-18 Martin Liska <mliska@suse.cz>
783
784 * c-gimplify.c (genericize_c_loop): Use option directly.
785
483092d3
GA
7862021-11-18 Matthias Kretz <m.kretz@gsi.de>
787
788 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
789 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
790
7912021-11-18 Martin Liska <mliska@suse.cz>
792
793 * c-gimplify.c (genericize_c_loop): Use option directly.
794
280d2838
GA
7952021-11-17 Martin Uecker <uecker@gcc.gnu.org>
796
797 PR c/91038
798 PR c/29970
799 * c-common.c (pointer_int_sum): Make sure pointer expressions
800 are evaluated first when the size expression depends on for
801 variably-modified types.
802
8032021-11-17 Marek Polacek <polacek@redhat.com>
804
805 PR preprocessor/103026
806 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
807
6b1695f4
GA
8082021-11-16 Jason Merrill <jason@redhat.com>
809
810 * c-common.c (release_tree_vector): Only cache vecs smaller than
811 16 elements.
812
e2b57363
GA
8132021-11-15 Jason Merrill <jason@redhat.com>
814
815 * c.opt: Add -fimplicit-constexpr.
816 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
817 * c-opts.c (c_common_post_options): Disable below C++14.
818
8192021-11-15 Jakub Jelinek <jakub@redhat.com>
820
821 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
822 Duplicate to both OMP_TARGET and OMP_TEAMS.
823
8d36a0d2
GA
8242021-11-10 Marek Polacek <polacek@redhat.com>
825
826 PR c++/101940
827 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
828 ignored_attributes.
829
c9b1334e
GA
8302021-11-09 David Malcolm <dmalcolm@redhat.com>
831
832 * c-pragma.c (GCC_BAD_AT): New macro.
833 (GCC_BAD2_AT): New macro.
834 (handle_pragma_pack): Use the location of the pertinent token when
835 issuing diagnostics about invalid constants/actions, and trailing
836 junk.
837 (handle_pragma_target): Likewise for non-string "GCC option".
838 (handle_pragma_message): Likewise for trailing junk.
839
18ae471f
GA
8402021-11-03 Joseph Myers <joseph@codesourcery.com>
841
842 PR c/103031
843 * c-common.c (convert_and_check): Add argument init_const. Call
844 convert_init if init_const.
845 * c-common.h (convert_and_check): Update prototype.
846 (convert_init): New prototype.
847
cf82e8d9
GA
8482021-11-01 David Malcolm <dmalcolm@redhat.com>
849
850 * c-lex.c (c_lex_with_flags): When complaining about non-printable
851 CPP_OTHER tokens, set the "escape on output" flag.
852
04a2cf3f
GA
8532021-10-27 Jakub Jelinek <jakub@redhat.com>
854
855 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
856 POINTER_PLUS_EXPR.
857 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
858 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
859
8602021-10-27 Jakub Jelinek <jakub@redhat.com>
861
862 PR c++/102854
863 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
864 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
865 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
866 conversions temporarily clear the 3rd bit from d->kind while walking
867 subtrees.
868 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
869 if possibly non-rectangular.
870
ae5c5406
GA
8712021-10-21 Jakub Jelinek <jakub@redhat.com>
872
873 PR middle-end/64888
874 * c-omp.c (c_omp_predefined_variable): Return true also for
875 ubsan_create_data created artificial variables.
876
5d5885c9
GA
8772021-10-14 Joseph Myers <joseph@codesourcery.com>
878
879 * c-format.c (printf_length_specs, scanf_length_specs)
880 (print_char_table, scan_char_table): Support DFP formats for C2X.
881 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
882 (T2X_D32, T2X_D64, T2X_D128): New macros.
883
8842021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
885
886 * c-omp.c (c_omp_check_context_selector): Rename to
887 omp_check_context_selector and move to omp-general.c.
888 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
889 move to omp-general.c.
890
52055987
GA
8912021-10-12 Joseph Myers <joseph@codesourcery.com>
892
893 * c-format.c (print_char_table): Add %b and %B formats.
894 (scan_char_table): Add %b format.
895 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
896 (T2X_UPD, T2X_UIM): New macros.
897
8982021-10-12 Jakub Jelinek <jakub@redhat.com>
899
900 * c-omp.c (c_finish_omp_atomic): Use
901 clear_padding_type_may_have_padding_p.
902
ce6eec39
GA
9032021-10-08 Martin Liska <mliska@suse.cz>
904
905 * c-opts.c (c_common_post_options): Use new macro
906 OPTION_SET_P.
907
50e20ee6
GA
9082021-10-07 Martin Liska <mliska@suse.cz>
909
910 * c-common.c (parse_optimize_options): Make
911 save_opt_decoded_options a pointer type.
912
57c7ec62
GA
9132021-10-06 Jakub Jelinek <jakub@redhat.com>
914
915 PR tree-optimization/102571
916 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
917 padding, but the non-padding bits are contiguous set of bytes
918 by adjusting the memcmp call arguments instead of emitting
919 __builtin_clear_padding and then comparing all the type's bytes.
920
9212021-10-06 Jakub Jelinek <jakub@redhat.com>
922
923 PR c++/102612
924 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
925 __cpp_constexpr to 202110L rather than 201907L.
926
da9c5f78
GA
9272021-10-04 Marek Polacek <polacek@redhat.com>
928
929 PR c++/97573
930 * c-common.h (do_warn_array_compare): Declare.
931 * c-warn.c (do_warn_array_compare): New.
932 * c.opt (Warray-compare): New option.
933
e3e07b89
GA
9342021-10-02 Iain Sandoe <iain@sandoe.co.uk>
935
936 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
937 NULL, this is not needed.
938
9d116bcc
GA
9392021-10-01 Martin Sebor <msebor@redhat.com>
940
941 PR c/102103
942 * c-common.c (decl_with_nonnull_addr_p): Handle members.
943 Check and perform warning suppression.
944 (c_common_truthvalue_conversion): Enhance warning suppression.
945
9462021-10-01 Martin Liska <mliska@suse.cz>
947
948 PR target/102552
949 * c-common.c (parse_optimize_options): decoded_options[0] is
950 used for program name, so merged_decoded_options should also
951 respect that.
952
9532021-10-01 Jakub Jelinek <jakub@redhat.com>
954 Richard Biener <rguenther@suse.de>
955
956 PR sanitizer/102515
957 * c-ubsan.c (ubsan_instrument_division): Check the right
958 flag_sanitize_recover bit, depending on which sanitization
959 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
960 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
961 and SANITIZE_DIVIDE is enabled, neither check is known
962 to be false and flag_sanitize_recover bits for those two
963 aren't the same, emit both __ubsan_handle_divrem_overflow
964 and __ubsan_handle_divrem_overflow_abort calls.
965
9662021-10-01 Martin Liska <mliska@suse.cz>
967
968 * c-common.c (parse_optimize_options): Combine optimize
969 options with what was provided on the command line.
970
9712021-10-01 Jakub Jelinek <jakub@redhat.com>
972
973 * c-omp.c (c_omp_split_clauses): Also copy
974 OMP_CLAUSE_ORDER_REPRODUCIBLE.
975
cf966403
GA
9762021-09-27 Martin Liska <mliska@suse.cz>
977
978 * c-opts.c (c_common_init_options_struct): Set also
979 x_flag_default_complex_method.
980
e4777439
GA
9812021-09-22 Jakub Jelinek <jakub@redhat.com>
982
983 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
984
62498024
GA
9852021-09-20 Matthias Kretz <m.kretz@gsi.de>
986
987 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
988 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
989 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
990 __ROUNDING_MATH__ according to the new optimization flags.
991
cf74e7b5
GA
9922021-09-18 Jakub Jelinek <jakub@redhat.com>
993
994 * c-omp.c (c_omp_split_clauses): Split order clause also to
995 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
996
0a4cb439
GA
9972021-09-17 Jakub Jelinek <jakub@redhat.com>
998
999 * c-omp.c (c_finish_omp_atomic): Avoid creating
1000 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1001 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1002 had NULL initializer. When omitting operands after v = x,
1003 use type of v rather than type of x. Fix type of vtmp
1004 TARGET_EXPR.
1005
07985c47
GA
10062021-09-13 Jason Merrill <jason@redhat.com>
1007
1008 * c.opt: Add -Winterference-size.
1009 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1010 and __GCC_CONSTRUCTIVE_SIZE.
1011
a26206ec
GA
10122021-09-10 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1015 * c-omp.c: Include gimple-fold.h.
1016 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1017 OpenMP 5.1 atomics.
1018
f84e2f0b
GA
10192021-09-09 qing zhao <qing.zhao@oracle.com>
1020
1021 * c-attribs.c (handle_uninitialized_attribute): New function.
1022 (c_common_attribute_table): Add "uninitialized" attribute.
1023
b6db7cd4
GA
10242021-09-08 liuhongt <hongtao.liu@intel.com>
1025
1026 * c-common.c (excess_precision_mode_join): Update below comments.
1027 (c_ts18661_flt_eval_method): Set excess_precision_type to
1028 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1029 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1030 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1031 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1032
b2748138
GA
10332021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1034
1035 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1036
7b739540
GA
10372021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1038
1039 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1040 and -gnatwu warning for the package specification.
1041
e11c6046
GA
10422021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1043
1044 * c-attribs.c (handle_unavailable_attribute): New.
1045
1e2f030b
GA
10462021-08-30 Jason Merrill <jason@redhat.com>
1047
1048 * c.opt: Add -Wmissing-requires.
1049
85d77ac4
GA
10502021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1051
1052 PR other/93067
1053 * c-opts.c (c_common_input_charset_cb): New function.
1054 (c_common_post_options): Call new function
1055 diagnostic_initialize_input_context().
1056
7c9e1645
GA
10572021-08-20 Tobias Burnus <tobias@codesourcery.com>
1058
1059 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1060 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1061 "di" and "u", respecitively; fill with BADLEN to match
1062 size of 'types'.
1063 (get_init_dynamic_hwi): Split off from ...
1064 (init_dynamic_diag_info): ... here. Call it.
1065 (init_dynamic_gfc_info): Call it.
1066
10672021-08-20 Jakub Jelinek <jakub@redhat.com>
1068
1069 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1070 * c-pragma.c (omp_pragmas): Add error directive.
1071 * c-omp.c (omp_directives): Uncomment error directive entry.
1072
6e529985
GA
10732021-08-18 Jakub Jelinek <jakub@redhat.com>
1074
1075 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1076 * c-pragma.c (omp_pragmas): Add nothing directive.
1077 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1078
2d14d64b
GA
10792021-08-17 Jakub Jelinek <jakub@redhat.com>
1080
1081 PR c++/101539
1082 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1083 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1084
10852021-08-17 Matt Jacobson <mhjacobson@me.com>
1086
1087 * c-opts.c (c_common_post_options): Default to
1088 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1089
10902021-08-17 Jakub Jelinek <jakub@redhat.com>
1091
1092 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1093 * c-pragma.c (omp_pragmas): Add scope construct.
1094 * c-omp.c (omp_directives): Uncomment scope directive entry.
1095
9d1d9fc8
GA
10962021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1097
1098 * c-cppbuiltin.c (c_cpp_builtins): Define
1099 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1100
72be20e2
GA
11012021-08-12 Jakub Jelinek <jakub@redhat.com>
1102
1103 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1104 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1105 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1106 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1107 enumerator.
1108 (c_finish_omp_masked): Declare.
1109 * c-omp.c (c_finish_omp_masked): New function.
1110 (c_omp_split_clauses): Handle combined masked constructs.
1111
4d17ca1b
GA
11122021-07-30 Jakub Jelinek <jakub@redhat.com>
1113
1114 PR c++/101539
1115 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1116 * c-common.c (c_common_reswords): Add
1117 __is_pointer_interconvertible_base_of.
1118
11192021-07-29 Richard Biener <rguenther@suse.de>
1120
1121 PR c/101512
1122 * c-common.c (c_common_mark_addressable_vec): Look through
1123 C_MAYBE_CONST_EXPR even if not at the toplevel.
1124
af3f12e6
GA
11252021-07-27 Martin Sebor <msebor@redhat.com>
1126
1127 PR c/101585
1128 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1129
ead235f6
GA
11302021-07-23 Jakub Jelinek <jakub@redhat.com>
1131
1132 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1133 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1134 and later.
1135
11362021-07-23 Jakub Jelinek <jakub@redhat.com>
1137
1138 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1139 PRAGMA_OMP__LAST_ enumerators.
1140
419c6c68
GA
11412021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1142 Joseph Myers <joseph@codesourcery.com>
1143 Cesar Philippidis <cesar@codesourcery.com>
1144
1145 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1146
92d45509
GA
11472021-07-20 Martin Sebor <msebor@redhat.com>
1148
1149 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1150 by-const-reference.
1151 * c-common.h (c_build_shufflevector): Same.
1152
87277b6a
GA
11532021-07-16 Andrew Pinski <apinski@marvell.com>
1154
1155 PR c/101453
1156 * c-common.c (parse_optimize_options): Use the correct
1157 size for buffer.
1158
d97d71a1
GA
11592021-07-15 Martin Sebor <msebor@redhat.com>
1160
1161 PR c/101289
1162 PR c/97548
1163 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1164
c4fee1c6
GA
11652021-07-14 Jason Merrill <jason@redhat.com>
1166
1167 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1168
6fba0eea
GA
11692021-07-06 Martin Sebor <msebor@redhat.com>
1170
1171 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1172 (gcc_cdiag_char_table): Same.
1173 (gcc_cxxdiag_char_table): Same.
1174
7a60a6e8
GA
11752021-07-02 Jakub Jelinek <jakub@redhat.com>
1176
1177 * c-common.h (enum c_omp_directive_kind): New enum.
1178 (struct c_omp_directive): New type.
1179 (c_omp_categorize_directive): Declare.
1180 * c-omp.c (omp_directives): New variable.
1181 (c_omp_categorize_directive): New function.
1182
bea7c16a
GA
11832021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1184
1185 * c-ada-spec.c (packed_layout): New global variable.
1186 (dump_ada_declaration): Set it upon seeing a packed record type.
1187 Do not put the "aliased" keyword if it is set.
1188 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1189
11902021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1191
1192 * c-ada-spec.c (check_name): Rename into...
1193 (check_type_name_conflict): ...this. Minor tweak.
1194 (dump_ada_function_declaration): Adjust to above renaming.
1195 (dump_ada_array_domains): Fix oversight.
1196 (dump_ada_declaration): Call check_type_name_conflict for variables.
1197
90708f87
GA
11982021-06-25 Martin Sebor <msebor@redhat.com>
1199
1200 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1201 (c_common_truthvalue_conversion): Replace direct uses of
1202 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1203 copy_no_warning.
1204 (check_function_arguments_recurse): Same.
1205 * c-gimplify.c (c_gimplify_expr): Same.
1206 * c-warn.c (overflow_warning): Same.
1207 (warn_logical_operator): Same.
1208 (warn_if_unused_value): Same.
1209 (do_warn_unused_parameter): Same.
1210
9aa8327e
GA
12112021-06-24 Jakub Jelinek <jakub@redhat.com>
1212
1213 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1214 C_ORT_OMP_TARGET.
1215 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1216 combined target constructs also add map (always, tofrom:) clause.
1217
ede6c356
GA
12182021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1219
1220 * c-attribs.c (common_handle_aligned_attribute): Remove short
1221 circuit and dead code.
1222
8dc48181
GA
12232021-06-14 Jonathan Wakely <jwakely@redhat.com>
1224
1225 PR c++/101052
1226 * known-headers.cc (get_stdlib_header_for_name): Add known
1227 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1228 exit, and getenv.
1229
8b8c3912
GA
12302021-06-12 Jason Merrill <jason@redhat.com>
1231
1232 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1233
f16f65f8
GA
12342021-06-11 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR c++/100974
1237 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1238 -std=c++2b for P1938R3 consteval if support.
1239
4f625f47
GA
12402021-06-09 Jason Merrill <jason@redhat.com>
1241
1242 PR c++/100879
1243 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1244 warning.
1245
438aac59
GA
12462021-06-07 Martin Liska <mliska@suse.cz>
1247
1248 * c-target.def: Split long lines and replace them
1249 with '\n\'.
1250
600f90cb
GA
12512021-06-04 Martin Sebor <msebor@redhat.com>
1252
1253 PR c/100783
1254 * c-attribs.c (positional_argument): Bail on erroneous types.
1255
12562021-06-04 Martin Sebor <msebor@redhat.com>
1257
1258 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1259 for element presence.
1260
440c8a0a
GA
12612021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1262
1263 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1264 (dump_ada_decl_name): Likewise.
1265 (dump_anonymous_type_name): Remove parent parameter and adjust.
1266 (dump_sloc): Minor tweak.
1267 (dump_ada_array_type): Remove type parameter and adjust.
1268 (dump_ada_enum_type): Remove parent parameter and adjust.
1269 (dump_ada_node): Adjust calls to above functions.
1270 (dumped_anonymous_types): New global variable.
1271 (dump_nested_types_1): Rename into...
1272 (dump_nested_types): ...this.
1273 (dump_nested_type): Remove parent and dumped_types parameters.
1274 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1275 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1276 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1277
12782021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1279
1280 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1281 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1282
12832021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1284
1285 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1286 (htable_t): New typedef.
1287 (overloaded_names): Use it.
1288 (add_name): New function.
1289 (init_overloaded_names): Use add_name to populate the table and add
1290 special cases for sigaction and stat.
1291 (overloaded_name_p): Rename into...
1292 (overloading_index): ...this. Do not initialize overloaded_names table
1293 here. Return the index or zero.
1294 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1295 but add an overloading suffix instead.
1296 (dump_ada_specs): Initialize overloaded_names tables here.
1297
b75978d1
GA
12982021-06-01 Martin Liska <mliska@suse.cz>
1299
1300 PR other/100759
1301 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1302 to a situation where we are not in processing of an optimize
1303 pragma.
1304 * c-pragma.c (handle_pragma_pop_options): Restore target
1305 options.
1306
ee682192
GA
13072021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1308
1309 PR testsuite/100749
1310 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1311
13122021-05-31 Richard Biener <rguenther@suse.de>
1313
1314 PR c++/88601
1315 * c-common.c: Include tree-vector-builder.h and
1316 vec-perm-indices.h.
1317 (c_common_reswords): Add __builtin_shufflevector.
1318 (c_build_shufflevector): New funtion.
1319 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1320 (c_build_shufflevector): Declare.
1321
48166757
GA
13222021-05-28 Jakub Jelinek <jakub@redhat.com>
1323
1324 PR middle-end/99928
1325 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1326 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1327
13282021-05-28 Tobias Burnus <tobias@codesourcery.com>
1329
1330 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1331
2bc6dace
GA
13322021-05-25 Martin Liska <mliska@suse.cz>
1333
1334 PR tree-optimization/92860
1335 PR target/99592
1336 * c-attribs.c (handle_optimize_attribute): Save target node
1337 before calling parse_optimize_options and save it in case
1338 it changes.
1339 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1340 (handle_pragma_pop_options): Likewise here.
1341
13422021-05-25 Martin Liska <mliska@suse.cz>
1343
1344 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1345
13462021-05-25 Jakub Jelinek <jakub@redhat.com>
1347
1348 PR middle-end/99928
1349 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1350 combined with simd and not with taskloop or for.
1351
2832d51b
GA
13522021-05-21 Jakub Jelinek <jakub@redhat.com>
1353
1354 PR middle-end/99928
1355 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1356 on firstprivate clause copy going to target construct, and for
1357 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1358
ea34e2ed
GA
13592021-05-20 Jonathan Wakely <jwakely@redhat.com>
1360
1361 * c.opt (Wc++11-extensions, Wc++14-extensions)
1362 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1363 options.
1364
13652021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1366
1367 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1368
13692021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1370
1371 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1372 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1373 (pch_init): Renamed member.
1374 (c_common_valid_pch): Adjust access to debug_type_names.
1375
65f32e5d
GA
13762021-05-19 Martin Sebor <msebor@redhat.com>
1377
1378 PR c/100619
1379 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1380 bounds.
1381
a8daf9a1
GA
13822021-05-18 Richard Biener <rguenther@suse.de>
1383
1384 PR c/100547
1385 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1386 Reword existing nunit diagnostic.
1387
a7ffc1ef
GA
13882021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1389
1390 * c-common.c (braced_list_to_string): Return CTOR unchanged
1391 if host and target character sizes don't match.
1392
87a7d10c
GA
13932021-05-14 Martin Liska <mliska@suse.cz>
1394
1395 * c.opt: Add Warning keyword for 2 options.
1396
f9af11c7
GA
13972021-05-13 Martin Liska <mliska@suse.cz>
1398
1399 PR middle-end/100504
1400 * c-attribs.c (handle_target_clones_attribute): Expect a string
1401 argument to target_clone argument.
1402
037e3661
GA
14032021-05-11 Joseph Myers <joseph@codesourcery.com>
1404
1405 * c-lex.c (interpret_float): Handle digit separators for C2X.
1406
aa891c56
GA
14072021-05-10 Martin Liska <mliska@suse.cz>
1408
1409 * c-ada-spec.c (print_destructor): Use startswith
1410 function instead of strncmp.
1411 (dump_ada_declaration): Likewise.
1412 * c-common.c (disable_builtin_function): Likewise.
1413 (def_builtin_1): Likewise.
1414 * c-format.c (check_tokens): Likewise.
1415 (check_plain): Likewise.
1416 (convert_format_name_to_system_name): Likewise.
1417
e4ff4ffb
GA
14182021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1419
1420 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1421 complex divide
1422
c0fa3f2f
GA
14232021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1424 Nathan Sidwell <nathan@codesourcery.com>
1425 Tom de Vries <vries@codesourcery.com>
1426 Julian Brown <julian@codesourcery.com>
1427 Kwok Cheung Yeung <kcy@codesourcery.com>
1428
1429 * c.opt (Wopenacc-parallelism): New.
1430
6e81e015
GA
14312021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1432
1433 * c.opt (fopenacc-kernels=): Remove.
1434
019a9220
GA
14352021-04-08 Jakub Jelinek <jakub@redhat.com>
1436
1437 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1438 occured -> occurred.
1439 (check_alignment_of_packed_member): Fix a comment typo,
1440 memeber -> member.
1441 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1442 and onless -> unless.
1443 (warn_parm_array_mismatch): Fix comment typos, declaratation
1444 -> declaration and woud -> would. Fix up comment indentation.
1445
14462021-04-08 Martin Sebor <msebor@redhat.com>
1447
1448 PR middle-end/99883
1449 * c.opt (Wmismatched-new-delete): Correct spelling.
1450
b1da9916
GA
14512021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1452
1453 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1454 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1455 enumeral types use again the type name for the enumeration constants.
1456 (dump_ada_node): Adjust call to dump_ada_enum_type.
1457 (dump_nested_type): Likewise.
1458
f1607029
GA
14592021-04-01 Jason Merrill <jason@redhat.com>
1460
1461 PR c++/98481
1462 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1463
4493b1c1
GA
14642021-03-25 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c++/99565
1467 * c-warn.c (do_warn_duplicated_branches): Pass also
1468 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1469
6af7b307
GA
14702021-03-20 Jakub Jelinek <jakub@redhat.com>
1471
1472 PR debug/99230
1473 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1474
ceae9533
GA
14752021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1476
1477 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1478 after entering the separate class package, if any.
1479
67f10d28
GA
14802021-03-04 Richard Biener <rguenther@suse.de>
1481
1482 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1483 Handle ERROR_MARK.
1484
14852021-03-04 Jakub Jelinek <jakub@redhat.com>
1486
1487 PR c/99325
1488 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1489 (token_streamer::stream) Likewise.
1490 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1491 UNKNOWN_LOCATION.
1492
f3641ac7
GA
14932021-03-03 Jakub Jelinek <jakub@redhat.com>
1494
1495 PR c/99324
1496 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1497 instead of mark_addressable. Fix a comment typo -
1498 neutrallly -> neutrally.
1499
2c83c3fb
GA
15002021-02-28 Jakub Jelinek <jakub@redhat.com>
1501
1502 PR c/99304
1503 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1504 message - refernced -> referenced. Remove superfluous space before
1505 closing paren of function calls.
1506
daa68844
GA
15072021-02-25 Nathan Sidwell <nathan@acm.org>
1508
1509 PR c++/99166
1510 * c.opt (-flang-info-module-cmi): Renamed option.
1511
50352c6c
GA
15122021-02-19 Nathan Sidwell <nathan@acm.org>
1513
1514 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1515
bf81237e
GA
15162021-02-18 H.J. Lu <hjl.tools@gmail.com>
1517
1518 PR target/99113
1519 * c-attribs.c (c_common_attribute_table): Add the "retain"
1520 attribute.
1521 (handle_retain_attribute): New function.
1522
0e804ce3
GA
15232021-02-16 Marek Polacek <polacek@redhat.com>
1524
1525 PR c++/99062
1526 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1527 alignment argument is non-negative. Tweak a warning message.
1528
fab095da
GA
15292021-02-12 Martin Sebor <msebor@redhat.com>
1530
1531 PR c/99055
1532 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1533 print_generic_expr_to_str.
1534
4b37c3ea
GA
15352021-02-10 Richard Biener <rguenther@suse.de>
1536
1537 * c-common.c (parse_optimize_options): Free decoded_options.
1538
a19dd5e6
GA
15392021-02-04 emsr <3dw4rd@verizon.net>
1540
1541 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1542
9faaa807
GA
15432021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1544
1545 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1546 * c-lex.c (interpret_integer): Set node type for size literal.
1547
85d04a2e
GA
15482021-01-28 Jakub Jelinek <jakub@redhat.com>
1549
1550 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1551 draft from description.
1552 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1553
e62bb7f0
GA
15542021-01-26 Paul Fee <paul.f.fee@gmail.com>
1555
1556 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1557 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1558 and -std=gnu++2b
1559 * c-opts.c (set_std_cxx23): New.
1560 (c_common_handle_option): Set options when -std=c++23 is enabled.
1561 (c_common_post_options): Adjust comments.
1562 (set_std_cxx20): Likewise.
1563
161e4c08
GA
15642021-01-25 Martin Sebor <msebor@redhat.com>
1565
1566 PR c++/98646
1567 * c-common.c (check_nonnull_arg): Adjust warning text.
1568
4c9bcd5c
GA
15692021-01-17 Martin Sebor <msebor@redhat.com>
1570
1571 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1572 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1573
59cf67d1
GA
15742021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1575
1576 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1577 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1578
2f7f0d32
GA
15792021-01-15 Jakub Jelinek <jakub@redhat.com>
1580
1581 PR tree-optimization/98597
1582 * c-pretty-print.c: Include options.h.
1583 (c_fold_indirect_ref_for_warn): New function.
1584 (print_mem_ref): Use it. If it returns something that has compatible
1585 type and is TBAA compatible with zero offset, print it and return,
1586 otherwise print it using offsetof syntax or array ref syntax. Fix up
1587 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1588 argument has pointer to array type. Print pointers using the standard
1589 formatting.
1590
6851dda2
GA
15912021-01-12 Martin Sebor <msebor@redhat.com>
1592
1593 PR c/98597
1594 PR c/98592
1595 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1596 has pointer type. Remove redundant code. Avoid calling
1597 gimple_canonical_types_compatible_p.
1598
7d187e4f
GA
15992021-01-07 Martin Sebor <msebor@redhat.com>
1600
1601 PR middle-end/98578
1602 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1603 Avoid assuming acces type's size is constant. Correct condition
1604 guarding the printing of a parenthesis.
1605
942ae5be
GA
16062021-01-06 Martin Sebor <msebor@redhat.com>
1607
1608 PR c++/95768
1609 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1610 SSA_NAMEs print VLA names and GIMPLE defining statements.
1611 (print_mem_ref): New function.
1612 (c_pretty_printer::unary_expression): Call it.
1613
16142021-01-06 Richard Biener <rguenther@suse.de>
1615
1616 PR tree-optimization/95582
1617 * c-attribs.c (c_common_attribute_table): Add entry for
1618 signed_bool_precision.
1619 (handle_signed_bool_precision_attribute): New.
1620
8daa719b
GA
16212020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1622
1623 * c.opt: Add -stdlib= option and enumerations for
1624 libstdc++ and libc++.
1625
eefe499f
GA
16262020-12-16 Martin Liska <mliska@suse.cz>
1627
1628 * c.opt: Remove usage of Report.
1629
d52945ce
GA
16302020-12-14 Martin Sebor <msebor@redhat.com>
1631
1632 PR middle-end/98166
1633 PR c++/57111
1634 PR middle-end/98160
1635 * c-attribs.c (maybe_add_noinline): New function.
1636 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1637 Implicitly add attribute noinline to functions not declared inline
1638 and warn on those.
1639
ca2bd949
GA
16402020-12-09 Tobias Burnus <tobias@codesourcery.com>
1641
1642 * c-pragma.c (omp_pragmas): Add 'allocate'.
1643 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1644
f6e8e279
GA
16452020-12-08 Jakub Jelinek <jakub@redhat.com>
1646
1647 PR c++/98187
1648 * c-pragma.c (omp_pragmas): Remove "master".
1649 (omp_pragmas_simd): Add "master".
1650
bc8a7013
GA
16512020-12-07 Marek Polacek <polacek@redhat.com>
1652
1653 PR c++/98126
1654 * c-common.c (verify_tree_lim_r): New function.
1655 (verify_sequence_points): Use it. Use nullptr instead of 0.
1656
b8dd0ef7
GA
16572020-12-03 Martin Sebor <msebor@redhat.com>
1658
1659 PR c++/90629
1660 PR middle-end/94527
1661 * c-attribs.c (handle_dealloc_attribute): New function.
1662 (handle_malloc_attribute): Handle argument forms of attribute.
1663 * c.opt (-Wmismatched-dealloc): New option.
1664 (-Wmismatched-new-delete): New option.
1665
16662020-12-03 Jakub Jelinek <jakub@redhat.com>
1667
1668 PR libstdc++/93121
1669 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1670 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1671
e0f5e792
GA
16722020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1673
1674 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1675 {__GNUC_EXECUTION_CHARSET_NAME} and
1676 _WIDE_EXECUTION_CHARSET_NAME} macros.
1677
16782020-12-01 Nathan Sidwell <nathan@acm.org>
1679
1680 * c-common.c (module, import, export): New internal tokens (with
1681 trailing space).
1682 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1683 them.
1684 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1685 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1686
16872020-12-01 Nathan Sidwell <nathan@acm.org>
1688
1689 * c-opts.c (c_common_init_options): Ask for module dependencies.
1690 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1691 * c-pch.c (c_common_valid_pch): ... does not play with C++
1692 modules.
1693 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1694 options.
1695 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1696 (fmodule-only, fmodule-mapper, fmodule-lazy)
1697 (fmodule-version-ignore, Winvalid-imported-macros)
1698 (flang-info-include-translate, flang-info-include-translate-not):
1699 New options
1700
5fbf0ecb
GA
17012020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1702
1703 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1704 (dump_ada_structure): Also deal with convention, unchecked union and
1705 bit-field for nested types. In the latter case, print an Alignment
1706 aspect along with the Pack aspect.
1707
360258da
GA
17082020-11-25 Martin Sebor <msebor@redhat.com>
1709
1710 PR bootstrap/94982
1711 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1712 -Wformat-diag.
1713
1e2c9a27
GA
17142020-11-24 Martin Sebor <msebor@redhat.com>
1715
1716 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1717
8e6198d0
GA
17182020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1719
1720 * c-attribs.c (handle_special_var_sec_attribute): New.
1721 (handle_noinit_attribute): Remove.
1722 (attr_noinit_exclusions): Rename to...
1723 (attr_section_exclusions): ...this, and add "persistent" attribute
1724 exclusion.
1725 (c_common_attribute_table): Add "persistent" attribute.
1726
7a97e2fc
GA
17272020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1728
1729 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1730 Treat opaque types like other types.
1731 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1732 supported types.
1733
82e5048e
GA
17342020-11-20 Martin Sebor <msebor@redhat.com>
1735
1736 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1737 with fewer arguments.
1738
17392020-11-20 Martin Sebor <msebor@redhat.com>
1740
1741 PR middle-end/97879
1742 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1743 Error out on invalid modes.
1744
17452020-11-20 Jakub Jelinek <jakub@redhat.com>
1746
1747 PR libstdc++/88101
1748 * c-common.c (check_builtin_function_arguments): Handle
1749 BUILT_IN_CLEAR_PADDING.
1750
25bb75f8
GA
17512020-11-18 Nathan Sidwell <nathan@acm.org>
1752
1753 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1754
4dabb037
GA
17552020-11-17 Nathan Sidwell <nathan@acm.org>
1756
1757 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1758 after newly-added CTI_MODULE_HWM.
1759
17602020-11-17 Joseph Myers <joseph@codesourcery.com>
1761
1762 * c-cppbuiltin.c (builtin_define_float_constants): Define
1763 "*_IS_IEC_60559__" macros.
1764
17652020-11-17 Nathan Sidwell <nathan@acm.org>
1766
1767 * c-lex.c: #include "langhooks.h".
1768 (cb_undef): Maybe call preprocess_undef lang hook.
1769 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1770 lang hook.
1771 (push_command_line_include): Maybe call preprocess_main_file lang
1772 hook.
1773 (cb_file_change): Likewise.
1774 * c-ppoutput.c: #include "langhooks.h.
1775 (scan_translation_unit): Maybe call preprocess_token lang hook.
1776 (class do_streamer): New, derive from token_streamer.
1777 (directives_only_cb): Data pointer is do_streamer, call
1778 preprocess_token lang hook.
1779 (scan_translation_unit_directives_only): Use do_streamer.
1780 (print_line_1): Move src_line recording to after string output.
1781 (cb_undef): Maybe call preprocess_undef lang hook.
1782
17832020-11-17 Nathan Sidwell <nathan@acm.org>
1784
1785 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1786 code duplicating that functionality.
1787
17882020-11-17 Jakub Jelinek <jakub@redhat.com>
1789
1790 PR c/90628
1791 * c-common.c (check_builtin_function_arguments)
1792 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1793 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1794 for more builtins and argument positions.
1795
29c5d9ce
GA
17962020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1797
1798 PR objc/97854
1799 * stub-objc.c: Include c-common.h to declare enum rid.
1800
77f67db2
GA
18012020-11-13 Jakub Jelinek <jakub@redhat.com>
1802
1803 PR c++/63287
1804 * c-cppbuiltin.c: Include configargs.h.
1805 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1806 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1807 "single".
1808
18092020-11-13 Gergö Barany <gergo@codesourcery.com>
1810 Thomas Schwinge <thomas@codesourcery.com>
1811
1812 * c.opt (fopenacc-kernels): Add.
1813
18142020-11-13 Jason Merrill <jason@redhat.com>
1815
1816 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1817
18182020-11-13 Piotr H. Dabrowski <phd@phd.re>
1819
1820 PR c++/91318
1821 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1822
18232020-11-13 Martin Liska <mliska@suse.cz>
1824
1825 * c-attribs.c (build_attr_access_from_parms): Format properly.
1826
18272020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1828
1829 PR objc/90707
1830 * c-common.c (c_common_reswords): null_unspecified, nullable,
1831 nonnull, null_resettable: New keywords.
1832 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1833 RID_NONNULL, RID_NULL_RESETTABLE: New.
1834 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1835 ranges accepted for property attributes.
1836 * c-attribs.c (handle_objc_nullability_attribute): New.
1837 * c-objc.h (enum objc_property_attribute_group): Add
1838 OBJC_PROPATTR_GROUP_NULLABLE.
1839 (enum objc_property_attribute_kind):Add
1840 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1841 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1842
18432020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1844
1845 PR objc/77404
1846 * c-attribs.c (handle_objc_root_class_attribute): New
1847 * c-objc.h (objc_start_class_interface): Add a location
1848 value for the position of the class name.
1849 * c.opt: Add Wobjc-root-class.
1850 * stub-objc.c (objc_start_class_interface): Add a location
1851 value for the position of the class name.
1852
a5a11525
GA
18532020-11-12 Joseph Myers <joseph@codesourcery.com>
1854
1855 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1856 Allow scope for C. Handle standard attributes for C. Do not
1857 accept unscoped attributes if std_syntax and not handled as
1858 standard attributes.
1859 * c-common.h (c_common_has_attribute): Update prototype.
1860
18612020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1862
1863 PR pch/86674
1864 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1865 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1866
0f5f9ed5
GA
18672020-11-11 Patrick Palka <ppalka@redhat.com>
1868
1869 PR c++/88115
1870 * c-opts.c (c_common_post_options): Update latest_abi_version.
1871
bb622641
GA
18722020-11-10 Jakub Jelinek <jakub@redhat.com>
1873
1874 PR c/97748
1875 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1876 to false.
1877 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1878 recursively and just return true instead of warning if it is true.
1879 Handle COMPLEX_EXPR.
1880
18812020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1882
1883 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1884 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1885 (c_omp_adjust_map_clauses): New function.
1886
2bee28dd
GA
18872020-11-09 Marek Polacek <polacek@redhat.com>
1888
1889 DR 1914
1890 * c-common.c (attribute_fallthrough_p): Tweak the warning
1891 message.
1892
18932020-11-09 Patrick Palka <ppalka@redhat.com>
1894
1895 * c-pragma.c (handle_pragma_diagnostic): Split the
1896 unknown-option -Wpragmas diagnostic into a warning and a
1897 subsequent note containing a spelling suggestion. Avoid
1898 computing the suggestion if -Wpragmas warnings are being
1899 suppressed.
1900
19012020-11-09 Patrick Palka <ppalka@redhat.com>
1902
1903 PR testsuite/97117
1904 * c-indentation.c (get_visual_column): Remove location_t
1905 parameter. Move the column-tracking diagnostic code from here
1906 to ...
1907 (should_warn_for_misleading_indentation): ... here, before the
1908 early exit for when the loci are not all distinct. Don't pass a
1909 location_t argument to get_visual_column.
1910 (assert_get_visual_column_succeeds): Don't pass a location_t
1911 argument to get_visual_column.
1912 (assert_get_visual_column_fails): Likewise.
1913
fb95de7a
GA
19142020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1915
1916 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1917 of keywords accepted in @property attribute contexts.
1918 * c-objc.h (enum objc_property_attribute_group): Add
1919 OBJC_PROPATTR_GROUP_CLASS.
1920 (enum objc_property_attribute_kind): Add
1921 OBJC_PROPERTY_ATTR_CLASS.
1922
2da7ee05
GA
19232020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1924
1925 * c-common.c (c_common_reswords): Add 'atomic' property
1926 attribute.
1927 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1928 property attributes.
1929
19302020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1931
1932 * c-attribs.c (handle_nsobject_attribute): New.
1933 * c.opt: Add WNSObject-attribute.
1934
44cab2d8
GA
19352020-11-06 Iain Sandoe <iain@sandoe.co.uk>
1936
1937 * c-objc.h (enum objc_property_attribute_group): New
1938 (enum objc_property_attribute_kind): New.
1939 (OBJC_PROPATTR_GROUP_MASK): New.
1940 (struct property_attribute_info): Small class encapsulating
1941 parser output from property attributes.
1942 (objc_prop_attr_kind_for_rid): New
1943 (objc_add_property_declaration): Simplify interface.
1944 * stub-objc.c (enum rid): Dummy type.
1945 (objc_add_property_declaration): Simplify interface.
1946 (objc_prop_attr_kind_for_rid): New.
1947
19482020-11-06 Nathan Sidwell <nathan@acm.org>
1949
1950 * c-ada-spec.c (collect_ada_nodes): Rename
1951 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1952 (collect_ada_node): Likewise.
1953 (dump_forward_type): Likewise.
1954 * c-common.c (set_underlying_type): Rename
1955 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
1956 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
1957
19582020-11-06 Jakub Jelinek <jakub@redhat.com>
1959
1960 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
1961
0cfd9109
GA
19622020-11-05 Marek Polacek <polacek@redhat.com>
1963
1964 PR c++/97675
1965 * c.opt (Wexceptions): New option.
1966
19672020-11-05 Marek Polacek <polacek@redhat.com>
1968
1969 PR c++/25814
1970 * c.opt (Wvexing-parse): New option.
1971
35c125cb
GA
19722020-11-04 Jakub Jelinek <jakub@redhat.com>
1973
1974 PR c++/97670
1975 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
1976 underlying decl to clear in the allocate_head bitmap.
1977
19782020-11-04 Iain Sandoe <iain@sandoe.co.uk>
1979
1980 * c-objc.h (objc_non_constant_expr_p): New.
1981 * stub-objc.c (objc_non_constant_expr_p): New.
1982
fd2325ea
GA
19832020-11-03 Nathan Sidwell <nathan@acm.org>
1984
1985 * c.opt (MQ,MT): Reword description to be make-agnostic.
1986
88ce3d5f
GA
19872020-11-02 Nathan Sidwell <nathan@acm.org>
1988
1989 * c-opts.c (c_common_post_options): Move var decl to its
1990 initialization point.
1991
19922020-11-01 Iain Sandoe <iain@sandoe.co.uk>
1993
1994 * c-lex.c (c_lex_with_flags): When combining '@' with a
1995 keyword for Objective-C, combine the location ranges too.
1996
19972020-10-30 Qing Zhao <qing.zhao@oracle.com>
1998 H.J.Lu <hjl.tools@gmail.com>
1999
2000 * c-attribs.c (c_common_attribute_table): Add new attribute
2001 zero_call_used_regs.
2002 (handle_zero_call_used_regs_attribute): New function.
2003
e93aae4a
GA
20042020-10-28 Marek Polacek <polacek@redhat.com>
2005
2006 PR c++/97573
2007 * c-opts.c (c_common_post_options): In C++20, turn on
2008 -Wdeprecated-enum-enum-conversion and
2009 -Wdeprecated-enum-float-conversion.
2010 * c.opt (Wdeprecated-enum-enum-conversion,
2011 Wdeprecated-enum-float-conversion): New options.
2012 (Wenum-conversion): Allow for C++ too.
2013
20142020-10-28 Jakub Jelinek <jakub@redhat.com>
2015
2016 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2017 * c-omp.c: Include bitmap.h.
2018 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2019
f19e7c8d
GA
20202020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2021
2022 * c-common.c (__is_nothrow_assignable): New.
2023 (__is_nothrow_constructible): Likewise.
2024 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2025 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2026
efe71fcc
GA
20272020-10-23 Jan Hubicka <hubicka@ucw.cz>
2028
2029 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2030
20312020-10-23 Marek Polacek <polacek@redhat.com>
2032
2033 PR c++/91741
2034 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2035 (c_common_init_ts): Likewise.
2036 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2037 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2038 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2039 (maybe_warn_sizeof_array_div): New function.
2040 * c.opt (Wsizeof-array-div): New option.
2041
20422020-10-23 Martin Sebor <msebor@redhat.com>
2043
2044 PR c/97463
2045 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2046
56ddd5e2
GA
20472020-10-22 Martin Liska <mliska@suse.cz>
2048
2049 PR c/94722
2050 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2051 (handle_stack_protect_attribute): Add error message for a
2052 no_stack_protector function.
2053
20542020-10-22 Martin Liska <mliska@suse.cz>
2055
2056 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2057
20582020-10-22 Jan Hubicka <hubicka@ucw.cz>
2059
2060 * c-gimplify.c: Include tree-nested.h
2061 (c_genericize): Update for new nested function info.
2062
b2698c21
GA
20632020-10-14 Martin Sebor <msebor@redhat.com>
2064
2065 PR c/97413
2066 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2067 bounds in an extra list.
2068
7e9282ae
GA
20692020-10-05 Richard Biener <rguenther@suse.de>
2070 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c++/97197
2073 * c-pretty-print.c: Include langhooks.h.
2074 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2075 expression.
2076 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2077 unary_expression.
2078 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2079
660bfe61
GA
20802020-09-30 Martin Sebor <msebor@redhat.com>
2081
2082 PR middle-end/97189
2083 * c-attribs.c (append_access_attr): Use the function declaration
2084 location for a warning about an attribute access argument.
2085
93bca37c
GA
20862020-09-29 Marek Polacek <polacek@redhat.com>
2087
2088 PR c++/94695
2089 * c.opt (Wrange-loop-construct): New option.
2090
82b77dee
GA
20912020-09-23 Martin Sebor <msebor@redhat.com>
2092
2093 PR c/97131
2094 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2095
20962020-09-23 Marek Polacek <polacek@redhat.com>
2097
2098 PR c/97125
2099 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2100 after loops and other structured control constructs have been lowered.
2101
521d2711
GA
21022020-09-22 Jakub Jelinek <jakub@redhat.com>
2103
2104 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2105 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2106
44135373
GA
21072020-09-21 Marek Polacek <polacek@redhat.com>
2108
2109 * c.opt (Wctad-maybe-unsupported): New option.
2110
2fe5b7d1
GA
21112020-09-19 Martin Sebor <msebor@redhat.com>
2112
2113 PR c/50584
2114 * c-common.h (warn_parm_array_mismatch): Declare new function.
2115 (has_attribute): Move declaration of an existing function.
2116 (build_attr_access_from_parms): Declare new function.
2117 * c-warn.c (parm_array_as_string): Define new function.
2118 (plus_one): Define new function.
2119 (warn_parm_ptrarray_mismatch): Define new function.
2120 (warn_parm_array_mismatch): Define new function.
2121 (vla_bound_parm_decl): New function.
2122 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2123 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2124 qualifiers here...
2125 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2126 them in brackets here. Also print [static]. Strip extraneous
2127 expressions from VLA bounds.
2128
21292020-09-19 Martin Sebor <msebor@redhat.com>
2130
2131 PR c/50584
2132 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2133 (handle_argspec_attribute): New function.
2134 (get_argument, get_argument_type): New functions.
2135 (append_access_attrs): Add overload. Handle internal attribute
2136 representation in addition to external.
2137 (handle_access_attribute): Handle internal attribute representation
2138 in addition to external.
2139 (build_attr_access_from_parms): New function.
2140
21412020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2142
2143 * c-gimplify.c (genericize_c_loop): Rewrite to match
2144 c_finish_loop in c-typeck.c.
2145
21462020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2147
2148 * c-common.c (c_block_may_fallthrough): New, split from
2149 cxx_block_may_fallthrough in the cp front end.
2150 (c_common_init_ts): Move handling of loop and switch-related
2151 statements here from the cp front end.
2152 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2153 cp front end.
2154 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2155 * c-common.h (c_block_may_fallthru): Declare.
2156 (bc_state_t): Move here from cp front end.
2157 (save_bc_state, restore_bc_state): Declare.
2158 (c_genericize_control_stmt): Declare.
2159 (WHILE_COND, WHILE_BODY): Likewise.
2160 (DO_COND, DO_BODY): Likewise.
2161 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2162 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2163 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2164 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2165 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2166 * c-dump.c (dump_stmt): Copy from cp front end.
2167 (c_dump_tree): Move code to handle structured loop and switch
2168 tree nodes here from cp front end.
2169 * c-gimplify.c: Adjust includes.
2170 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2171 cp front end.
2172 (save_bc_state, restore_bc_state): New functions using old code
2173 from cp front end.
2174 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2175 (genericize_c_loop): Move from cp front end.
2176 (genericize_for_stmt, genericize_while_stmt): Likewise.
2177 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2178 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2179 (genericize_omp_for_stmt): Likewise.
2180 (c_genericize_control_stmt): New function using code split from
2181 cp front end.
2182 (c_genericize_control_r): New.
2183 (c_genericize): Call walk_tree with c_genericize_control_r.
2184 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2185 structured loop and switch tree nodes here from cp front end.
2186
2aad20c0
GA
21872020-09-17 Patrick Palka <ppalka@redhat.com>
2188
2189 PR c/80076
2190 * c-indentation.c (should_warn_for_misleading_indentation): Move
2191 declarations of local variables closer to their first use.
2192 Handle virtual token locations by resolving them to their
2193 respective macro expansion points. If all three tokens are
2194 produced from the same macro expansion, then instead use their
2195 loci within the macro definition.
2196
ecde1b0a
GA
21972020-09-16 Martin Sebor <msebor@redhat.com>
2198
2199 PR c/78666
2200 PR c/96126
2201 * c-attribs.c (validate_attr_args): New function.
2202 (validate_attr_arg): Same.
2203 (handle_section_attribute): Call it. Introduce a local variable.
2204 (handle_alloc_size_attribute): Same.
2205 (handle_alloc_align_attribute): Same.
2206
50a71cd0
GA
22072020-09-14 Jakub Jelinek <jakub@redhat.com>
2208
2209 * c-attribs.c (handle_optimize_attribute): Adjust
2210 cl_optimization_save, cl_optimization_restore and
2211 build_optimization_node callers.
2212 * c-pragma.c (handle_pragma_optimize): Adjust
2213 build_optimization_node caller.
2214 (handle_pragma_push_options): Adjust
2215 build_optimization_node and build_target_option_node callers.
2216 (handle_pragma_pop_options, handle_pragma_reset_options):
2217 Adjust cl_optimization_restore callers.
2218
8f7ea26a
GA
22192020-08-28 Martin Sebor <msebor@redhat.com>
2220
2221 * c.opt (Wstringop-overread): New option.
2222
a6493809
GA
22232020-08-11 Jakub Jelinek <jakub@redhat.com>
2224
2225 PR c/96545
2226 * c-common.c (get_atomic_generic_size): Require that first argument's
2227 type points to a complete type and use tree_fits_uhwi_p instead of
2228 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2229
48cc2e46
GA
22302020-07-31 Martin Sebor <msebor@redhat.com>
2231
2232 PR c++/96003
2233 * c-common.c (check_function_arguments_recurse): Return early when
2234 no-warning bit is set.
2235
22362020-07-31 Richard Biener <rguenther@suse.de>
2237
2238 PR debug/96383
2239 * c-common.h (c_common_finalize_early_debug): Declare.
2240 * c-common.c: Include debug.h.
2241 (c_common_finalize_early_debug): finalize_early_debug langhook
2242 implementation generating debug for extern declarations.
2243
e71dab87
GA
22442020-07-27 Nathan Sidwell <nathan@acm.org>
2245
2246 * c-common.c (try_to_locate_new_include_insertion_point): Use
2247 strcmp, not pointer equality.
2248
ae2e0bc1
GA
22492020-07-25 Martin Sebor <msebor@redhat.com>
2250
2251 PR c++/96310
2252 * c-common.c (check_nonnull_arg): Print note only when warning was
2253 issued.
2254
3ea9abca
GA
22552020-07-22 Tobias Burnus <tobias@codesourcery.com>
2256
2257 * c-omp.c (c_finish_omp_critical): Check for no name but
2258 nonzero hint provided.
2259
0933f508
GA
22602020-07-20 Jason Merrill <jason@redhat.com>
2261
2262 * c-cppbuiltin.c (c_cpp_builtins): Update
2263 __cpp_nontype_template_args for C++20.
2264
22652020-07-20 Martin Sebor <msebor@redhat.com>
2266
2267 PR c/96249
2268 * c.opt: Remove stray text.
2269
8ca07a30
GA
22702020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2271
2272 PR other/86904
2273 * c-indentation.c (should_warn_for_misleading_indentation): Get
2274 global tabstop from the new source.
2275 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2276 is now a common option.
2277 * c.opt: Likewise.
2278
a82c4c4c 22792020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2280
2281 * c.opt (Wscalar-storage-order): Add explicit variable.
2282
f60ee68d
GA
22832020-07-07 Nathan Sidwell <nathan@acm.org>
2284
2285 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2286 cpp_read_main_file.
2287 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2288 maps. Force token position to line_table's highest line.
2289 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2290 (cb_define): Always increment source line.
2291
4077d74c
GA
22922020-07-06 Martin Sebor <msebor@redhat.com>
2293
2294 PR c++/95984
2295 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2296 to stub lambda objects with null this pointer.
2297 (check_nonnull_arg): Handle C++ nullptr.
2298
b5f24739
GA
22992020-07-02 Jason Merrill <jason@redhat.com>
2300 Jakub Jelinek <jakub@redhat.com>
2301
2302 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2303
46fbb6c6
GA
23042020-06-30 Jakub Jelinek <jakub@redhat.com>
2305
2306 PR c++/95963
2307 * c-common.c (check_function_arguments_recurse): Don't crash on
2308 calls to internal functions.
2309
69273534
GA
23102020-06-28 Martin Sebor <msebor@redhat.com>
2311
2312 PR c++/86568
2313 * c-common.c (struct nonnull_arg_ctx): Add members.
2314 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2315 C++ member functions specially. Consider the this pointer implicitly
2316 nonnull.
2317 (check_nonnull_arg): Use location of argument when available.
2318 (check_function_arguments): Use nonnull_arg_ctx as argument.
2319
9a33c41f
GA
23202020-06-27 Jakub Jelinek <jakub@redhat.com>
2321
2322 PR middle-end/95903
2323 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2324 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2325 smaller precision intop operands separately.
2326
c9c05f73
GA
23272020-06-26 Marek Polacek <polacek@redhat.com>
2328
2329 * c-opts.c (c_common_init_options): Default to gnu++17.
2330
aff95ee7
GA
23312020-06-17 Jonathan Wakely <jwakely@redhat.com>
2332
bd0a89dc 2333 PR c/95378
aff95ee7
GA
2334 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2335 pointer arguments.
2336
56638b9b
GA
23372020-06-16 Jakub Jelinek <jakub@redhat.com>
2338
2339 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2340 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2341 idx members.
2342 (c_omp_is_loop_iterator): New function.
2343 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2344 if outer loop iterator is present. Perform duplicate checking through
2345 hash_set in the function rather than expecting caller to do that.
2346 Pass NULL instead of d->ppset to walk_tree_1.
2347 (c_omp_check_nonrect_loop_iv): New function.
2348 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2349 non-rectangular loop forms, diagnose multiple associated loops with
2350 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2351 (c_omp_check_loop_iv_exprs): Likewise.
2352
ec6ffbb9
GA
23532020-06-10 Martin Liska <mliska@suse.cz>
2354
2355 PR tree-optimization/92860
2356 * c-attribs.c (handle_optimize_attribute):
2357 Save global options and compare it after parsing of function
2358 attribute.
2359 * c-pragma.c (opt_stack::saved_global_options): New field.
2360 (handle_pragma_push_options): Save global_options.
2361 (handle_pragma_pop_options): Compare them after pop.
2362
b952c2cf
GA
23632020-06-09 Jakub Jelinek <jakub@redhat.com>
2364
2365 PR c/95580
2366 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2367 case when MEM_REF's first argument has type pointer to incomplete type.
2368
1a59f3db
GA
23692020-06-05 Jason Merrill <jason@redhat.com>
2370
2371 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2372 operand to POINTER_PLUS_EXPR.
2373
3add3425
GA
23742020-06-04 Martin Sebor <msebor@redhat.com>
2375
2376 PR middle-end/10138
2377 PR middle-end/95136
2378 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2379 (handle_access_attribute): Same.
2380
9a5b7438
GA
23812020-06-03 Mark Wielaard <mark@klomp.org>
2382
2383 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2384 New function.
2385 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2386 New function declaration.
2387
23882020-06-03 Mark Wielaard <mark@klomp.org>
2389
2390 * known-headers.cc (get_string_macro_hint): New function.
2391 (get_stdlib_header_for_name): Use get_string_macro_hint.
2392 (get_c_stdlib_header_for_string_macro_name): New function.
2393 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2394 New function declaration.
2395
23962020-06-03 Tobias Burnus <tobias@codesourcery.com>
2397
2398 * c-common.h (c_omp_predetermined_mapping): Declare.
2399 * c-omp.c (c_omp_predetermined_mapping): New.
2400
af114c38
MW
24012020-05-22 Mark Wielaard <mark@klomp.org>
2402
2403 * known-headers.cc (get_stdlib_header_for_name): Add a new
2404 stdlib_hint array for stdbool and stdint.
2405
45c50b6a
MW
24062020-05-22 Mark Wielaard <mark@klomp.org>
2407
2408 * known-headers.cc (get_stdlib_header_for_name): Return
2409 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2410 flag_isoc99.
2411
c22027a0
NS
24122020-05-20 Nathan Sidwell <nathan@acm.org>
2413
38a4db21
NS
2414 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2415
c22027a0
NS
2416 * c-common.c (try_to_locate_new_include_insertion_point): Use
2417 strcmp to compare filenames.
2418 * c-lex.c (init_c_lex): Move declaration to initialization.
2419 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2420 deferred count loop.
2421
29f0e90d
JM
24222020-05-15 Jason Merrill <jason@redhat.com>
2423
2424 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2425
b04445d4
JM
24262020-05-13 Jason Merrill <jason@redhat.com>
2427
2428 * c.opt (std=c++20): Make c++2a the alias.
2429 (std=gnu++20): Likewise.
2430 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2431 * c-opts.c: Adjust.
2432 * c-cppbuiltin.c: Adjust.
2433 * c-ubsan.c: Adjust.
2434 * c-warn.c: Adjust.
2435
11dd3be5
EB
24362020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2437
2438 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2439
b224c376
NS
24402020-05-08 Nathan Sidwell <nathan@acm.org>
2441
2442 Reimplement directives only processing.
2443 * c-ppoutput.c (token_streamer): Ne.
2444 (directives_only_cb): New. Swallow ...
2445 (print_lines_directives_only): ... this.
2446 (scan_translation_unit_directives_only): Reimplment using the
2447 published interface.
2448
f1d94677
MP
24492020-05-07 Marek Polacek <polacek@redhat.com>
2450
2451 * c-format.c (badwords): Add "nonstatic".
2452
9b95bb52
JJ
2453202-05-07 Jakub Jelinek <jakub@redhat.com>
2454
2455 PR c/94968
2456 * c-common.c (speculation_safe_value_resolve_params): Return false if
2457 error_operand_p (val2).
2458 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2459 Remove extraneous semicolon.
2460
530b4409 24612020-05-06 qing zhao <qing.zhao@oracle.com>
2462
2463 PR c/94230
2464 * c-indentation.c (get_visual_column): Add a hint to use the new
2465 -flarge-source-files option.
2466
b776bdca
SSF
24672020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2468
2469 * c-attribs.c (handle_vector_size_attribute): Add attribute
2470 nonnull for argument args in order to silence warning of
2471 uninitialized variable usage. Since this is local to the
2472 compilation unit and thus cannot be checked at call sides by the
2473 compiler, added an assert statement in order to verify this.
2474
6607bdd9
L
24752020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2476
2477 PR target/93492
2478 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2479 value to USHRT_MAX (65535).
2480
691eeb65
JJ
24812020-04-29 Jakub Jelinek <jakub@redhat.com>
2482
2483 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2484
26d76be7
JJ
24852020-04-27 Jakub Jelinek <jakub@redhat.com>
2486
2487 PR c/94755
2488 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2489 fncode == BUILT_IN_NONE before initialization of first_param.
2490
7291b2ed
MP
24912020-04-23 Marek Polacek <polacek@redhat.com>
2492
2493 PR c++/94733
2494 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2495 TREE_PURPOSE.
2496
58a29af8
PP
24972020-04-14 Patrick Palka <ppalka@redhat.com>
2498
2499 PR c++/85278
2500 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2501 ampersand if it's an rvalue reference type.
2502
09f04139
MS
25032020-04-13 Martin Sebor <msebor@redhat.com>
2504
2505 PR c/92326
2506 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2507 printing array bound for flexible array members.
2508
ee26baf4
IS
25092020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2510
2511 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2512 define, per n4861.
2513
75efe9cb
RB
25142020-04-02 Richard Biener <rguenther@suse.de>
2515
2516 PR c/94392
2517 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2518 for -O2 and C++11 or newer.
2519
75defde9
PP
25202020-03-28 Patrick Palka <ppalka@redhat.com>
2521
2522 * c.opt: Add -fconcepts-diagnostics-depth.
2523
52f24a9e
MS
25242020-03-27 Martin Sebor <msebor@redhat.com>
2525
2526 PR c++/94346
2527 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2528 to decl_attributes. Make handling of different kinds of entities
2529 more robust.
2530
ccacf77b
MS
25312020-03-27 Martin Sebor <msebor@redhat.com>
2532
2533 PR c++/94098
2534 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2535 here.
2536
ca6c7225
JJ
25372020-03-23 Jakub Jelinek <jakub@redhat.com>
2538
2539 PR c++/91993
2540 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2541 result being COMPOUND_EXPRs, skip to ultimate rhs.
2542
1aa22b19
RS
25432020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2544
2545 PR middle-end/94072
2546 * c-common.c (c_common_type_for_mode): Before using a registered
2547 built-in type, check that the vectorness of the type matches
2548 the vectorness of the mode.
2549
700d4cb0
JJ
25502020-03-17 Jakub Jelinek <jakub@redhat.com>
2551
2552 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2553 issue in a diagnostic message.
2554
b408e010
LH
25552020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2556
2557 * c.opt: Avoid redundancy in the help text.
2558
e78e50d5
MP
25592020-03-02 Marek Polacek <polacek@redhat.com>
2560
2561 PR c++/93958 - add missing -std=gnu++20.
2562 * c.opt: Add -std=gnu++20.
2563
649e1741
MS
25642020-03-01 Martin Sebor <msebor@redhat.com>
2565
2566 PR c++/92721
2567 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2568 (handle_access_attribute): Same.
2569
7b60f3ba
JJ
25702020-02-25 Jakub Jelinek <jakub@redhat.com>
2571
2572 PR c/93858
2573 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2574 "did you mean" hint in diagnostics.
2575
fb260504
JM
25762020-02-15 Jason Merrill <jason@redhat.com>
2577
2578 * c.opt: Add -std=c++20.
2579
1d757b09
EB
25802020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2581
2582 * c-ada-spec.c: Include bitmap.h.
2583 (dump_ada_double_name): Rename into...
2584 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2585 (dump_ada_array_type): Adjust to above renaming. Robustify.
2586 (dump_nested_types_1): New function copied from... Add dumped_types
2587 parameter and pass it down to dump_nested_type.
2588 (dump_nested_types): ...this. Remove parent parameter. Just call
2589 dump_nested_types_1 on an automatic bitmap.
2590 (dump_nested_type): Add dumped_types parameter.
2591 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2592 Adjust recursive calls and adjust to above renaming.
2593 (dump_ada_declaration): Adjust call to dump_nested_types.
2594 Tidy up and adjust to above renaming.
2595 (dump_ada_specs): Initialize and release bitmap obstack.
2596
0cc575e4
MS
25972020-02-10 Martin Sebor <msebor@redhat.com>
2598
2599 PR c/93640
2600 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2601
a59aa302
JJ
26022020-02-10 Jakub Jelinek <jakub@redhat.com>
2603
2604 PR other/93641
2605 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2606 Remove useless extra test.
2607
e464fc90
TB
26082020-02-03 Julian Brown <julian@codesourcery.com>
2609 Tobias Burnus <tobias@codesourcery.com>
2610
2611 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2612
e3b6c052
JM
26132020-01-29 Jason Merrill <jason@redhat.com>
2614
2615 PR c++/89357
2616 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2617
6d00f052
JM
26182020-01-23 Jason Merrill <jason@redhat.com>
2619
2620 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2621
8a990ffa
MS
26222020-01-23 Martin Sebor <msebor@redhat.com>
2623
2624 PR c/84919
2625 * c-common.c (check_function_arguments): Avoid overlap checking
2626 of sprintf functions.
2627
55b7df8b
JM
26282020-01-22 Jason Merrill <jason@redhat.com>
2629
2630 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2631 PR c++/40752
2632 * c-warn.c (conversion_warning): Check operands only after checking
2633 the whole expression. Don't check second operand of + for sign.
2634
c77074d0
JM
26352020-01-21 Jason Merrill <jason@redhat.com>
2636 Manuel López-Ibáñez <manu@gcc.gnu.org>
2637
2638 PR c++/40752 - useless -Wconversion with short +=.
2639 * c.opt (-Warith-conversion): New.
2640 * c-warn.c (conversion_warning): Recurse for operands of
2641 operators. Only warn about the whole expression with
2642 -Warith-conversion.
2643
731dbfc3
JM
26442020-01-21 Jason Merrill <jason@redhat.com>
2645
2646 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2647 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2648
ad1a3914
NS
26492020-01-20 Nathan Sidwell <nathan@acm.org>
2650
2651 PR preprocessor/80005
2652 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2653
49789fd0
IS
26542020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2655
2656 * c-common.c (co_await, co_yield, co_return): New.
2657 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2658 RID_CO_RETURN): New enumeration values.
2659 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2660 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2661 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2662 * c.opt (fcoroutines): New command-line switch.
2663
4bc1899b
DM
26642020-01-10 David Malcolm <dmalcolm@redhat.com>
2665
2666 * c-format.c (local_event_ptr_node): New.
2667 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2668 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2669 * c-format.h (T_EVENT_PTR): New define.
2670
f25e33fa
MS
26712020-01-10 Martin Sebor <msebor@redhat.com>
2672
2673 PR c/93132
2674 * c-attribs.c (append_access_attrs): Validate against the translated
2675 access string rather than the human-readable representation.
2676
8d9254fc
JJ
26772020-01-01 Jakub Jelinek <jakub@redhat.com>
2678
2679 Update copyright years.
2680
39292e25
EB
26812019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2682
2683 * c-ada-spec.h (decl_sloc): Delete.
2684 * c-ada-spec.c (decl_sloc): Make static.
2685
519d7496
JB
26862019-12-19 Julian Brown <julian@codesourcery.com>
2687
2688 * c-common.h (c_omp_map_clause_name): Add prototype.
2689 * c-omp.c (c_omp_map_clause_name): New function.
2690 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2691 PRAGMA_OACC_CLAUSE_DETACH.
2692
a6163563
JB
26932019-12-19 Julian Brown <julian@codesourcery.com>
2694 Maciej W. Rozycki <macro@codesourcery.com>
2695 Tobias Burnus <tobias@codesourcery.com>
2696 Thomas Schwinge <thomas@codesourcery.com>
2697
2698 * c-pragma.h (pragma_omp_clause): Add
2699 PRAGMA_OACC_CLAUSE_NO_CREATE.
2700
e8f1ade2
MS
27012019-12-17 Martin Sebor <msebor@redhat.com>
2702
2703 PR c++/61339
2704 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2705
368877a1
DM
27062019-12-11 David Malcolm <dmalcolm@redhat.com>
2707
2708 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2709 implementation.
2710 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2711
d68f5d45
DM
27122019-12-09 David Malcolm <dmalcolm@redhat.com>
2713
2714 * c-format.c (range_label_for_format_type_mismatch::get_text):
2715 Replace label_text ctor called with true with label_text::take.
2716
d3e28653
DM
27172019-12-09 David Malcolm <dmalcolm@redhat.com>
2718
2719 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2720 initial newline from expected outputs.
2721 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2722 call to diagnostic_show_locus.
2723
abd6d8cc
JJ
27242019-12-06 Jakub Jelinek <jakub@redhat.com>
2725
2726 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2727 now.
2728
7906797e
MP
27292019-12-05 Marek Polacek <polacek@redhat.com>
2730 Jakub Jelinek <jakub@redhat.com>
2731
2732 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2733 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2734
5c04da88
MP
27352019-12-05 Marek Polacek <polacek@redhat.com>
2736
2737 PR c++/92271 - make __is_same alias for __is_same_as.
2738 * c-common.c: Add __is_same, an alias for __is_same_as.
2739
43aae289
MP
27402019-12-03 Marek Polacek <polacek@redhat.com>
2741
2742 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2743 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2744 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2745
d7ddfbcb
JH
27462019-11-30 Jan Hubicka <hubicka@ucw.cz>
2747
2748 * c-attribs.c (handle_symver_attribute): New function
2749 (c_common_attributes): Add symver.
2750
65ef05d0
RS
27512019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2752
2753 * c-common.c (pointer_int_sum): Use verify_type_context to check
2754 whether the target allows pointer arithmetic for the types involved.
2755 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2756 to check whether the target allows sizeof and alignof operations
2757 for the types involved.
2758
1a291106
JM
27592019-11-27 Jason Merrill <jason@redhat.com>
2760
2761 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2762
05d6cb1a
JJ
27632019-11-26 Jakub Jelinek <jakub@redhat.com>
2764
2765 PR c++/61414
2766 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2767 ENUMERAL_TYPEs.
2768
5b8d9367
JM
27692019-11-25 Joseph Myers <joseph@codesourcery.com>
2770
2771 PR c/91985
2772 * c-common.c (c_common_type_for_mode): Handle decimal
2773 floating-point types being NULL_TREE.
2774 * c-format.c (get_format_for_type_1): Handle specified types being
2775 NULL_TREE.
2776 * c-lex.c (interpret_float): Give an error for decimal
2777 floating-point constants when decimal floating-point not
2778 supported.
2779
1fbf51cb
JJ
27802019-11-23 Jakub Jelinek <jakub@redhat.com>
2781
2782 PR middle-end/83859
2783 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2784 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2785 group warning with inform together.
2786 (handle_access_attribute): Formatting fix.
2787
761df906
JJ
27882019-11-22 Jakub Jelinek <jakub@redhat.com>
2789
bdaf8be1
JJ
2790 PR c/90677
2791 * c-common.h (identifier_global_tag): Declare.
2792 * c-format.c (get_pointer_to_named_type): Renamed to ...
2793 (get_named_type): ... this. Use identifier_global_tag instead of
2794 identifier_global_value, handle the return value being a TYPE_P.
2795 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2796 to call get_named_type instead. Formatting fixes.
2797
c2ecce6d 2798 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2799 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2800 and __cpp_generic_lambdas for -std=c++2a. Define
2801 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2802 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2803 __cpp_concepts for -std=c++2a.
2804
54aa6b58
MS
28052019-11-22 Martin Sebor <msebor@redhat.com>
2806
2807 PR middle-end/83859
2808 * c-attribs.c (handle_access_attribute): New function.
2809 (c_common_attribute_table): Add new attribute.
2810 (get_argument_type): New function.
2811 (append_access_attrs): New function.
2812 (get_nonnull_operand): Rename...
2813 (get_attribute_operand): ...to this.
2814 * c-common.c (get_nonnull_operand): Rename...
2815 (get_attribute_operand): ...to this.
2816
6c80b1b5
JM
28172019-11-21 Joseph Myers <joseph@codesourcery.com>
2818
2819 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2820 of warning.
2821
192961ff
JM
28222019-11-19 Joseph Myers <joseph@codesourcery.com>
2823
2824 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2825 warning for standard attributes mixed with fallthrough attributes.
2826
f8aea5e3
JM
28272019-11-15 Joseph Myers <joseph@codesourcery.com>
2828
2829 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2830 * c-common.h (handle_fallthrough_attribute): Declare.
2831
2cc94aa8
JM
28322019-11-15 Joseph Myers <joseph@codesourcery.com>
2833
2834 * c-attribs.c (handle_deprecated_attribute): Remove static.
2835 * c-common.h (handle_deprecated_attribute): Declare.
2836
7c5890cc
JM
28372019-11-14 Joseph Myers <joseph@codesourcery.com>
2838
2839 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2840 char for C.
2841
b2417b59
JJ
28422019-11-14 Jakub Jelinek <jakub@redhat.com>
2843
d0ec7c93
JJ
2844 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2845 valid vendors.
2846
b2417b59
JJ
2847 * c-omp.c (c_omp_check_context_selector): Handle name lists
2848 containing string literals. Don't diagnose atomic_default_mem_order
2849 with multiple props.
2850
00be2a5f
JM
28512019-11-13 Joseph Myers <joseph@codesourcery.com>
2852
2853 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2854 NORM_MAX constants. Update call to get_max_float.
2855 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2856 constants.
2857
2dbad62d
EB
28582019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2859
2860 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2861 (dump_forward_type): Do not generate a declaration for function types.
2862 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2863 of the component type if it is declared in another file.
2864
6ed76044
ML
28652019-11-12 Martin Liska <mliska@suse.cz>
2866
2867 * c-opts.c (c_common_post_options):
2868 Use SET_OPTION_IF_UNSET.
2869
62aee289
MR
28702019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2871 Frederik Harwath <frederik@codesourcery.com>
2872
2873 gcc/c-family/
2874 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2875 constant.
2876 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2877
f486280c
RS
28782019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2879
2880 * c-common.h (gnu_vector_type_p): New function.
2881 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2882 vectors to satisfy gnu_vector_type_p.
2883 (c_build_vec_convert): Likewise __builtin_convertvector.
2884 (convert_vector_to_array_for_subscript): Likewise when applying
2885 implicit vector to array conversion.
2886 (scalar_to_vector): Likewise when converting vector-scalar
2887 operations to vector-vector operations.
2888
017c6491
JM
28892019-11-08 Joseph Myers <joseph@codesourcery.com>
2890
2891 * c.opt (Wold-style-definition): Initialize to -1.
2892 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2893 to flag_isoc2x if not set explicitly.
2894
c01bd174
JM
28952019-11-07 Joseph Myers <joseph@codesourcery.com>
2896
2897 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2898
0df65305
JM
28992019-11-05 Jason Merrill <jason@redhat.com>
2900
2901 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2902 -fconcepts.
2903
e0c866dd
KK
29042019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2905
2906 * c-opts.c (c_common_post_options): Update
2907 latest_abi_version.
2908
f968ef9b
JJ
29092019-11-02 Jakub Jelinek <jakub@redhat.com>
2910
d0c464d2
JJ
2911 * c-common.h (c_omp_get_context_selector): Remove.
2912 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2913 and renamed to omp_get_context_selector.
2914
917dd789
JJ
2915 * c-omp.c (c_omp_mark_declare_variant): Use
2916 omp_context_selector_set_compare.
2917
f968ef9b
JJ
2918 PR c++/88335 - Implement P1073R3: Immediate functions
2919 * c-common.h (enum rid): Add RID_CONSTEVAL.
2920 * c-common.c (c_common_reswords): Add consteval.
2921
5f6705b7
JJ
29222019-11-01 Martin Sebor <msebor@redhat.com>
2923
2924 PR middle-end/91679
2925 PR middle-end/91647
2926 PR middle-end/91463
2927 PR middle-end/92312
2928 * c-pretty-print.c (direct_abstract_declarator): Print
2929 bound in zero-length arrays.
2930 * c.opt (-Wzero-length-bounds): New option.
2931
43f1814c
NS
29322019-10-30 Nathan Sidwell <nathan@acm.org>
2933
2934 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
2935 macros.
2936
ad1539d5
MS
29372019-10-28 Martin Sebor <msebor@redhat.com>
2938
2939 PR c/66970
2940 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
2941 even when only preprocessing.
2942 * c-common.h (names_builtin_p): Declare new function.
2943 * c-lex.c (init_c_lex): Set has_builtin.
2944 (c_common_has_builtin): Define a new function.
2945 * c-ppoutput.c (init_pp_output): Set has_builtin.
2946
135df52c
JJ
29472019-10-24 Jakub Jelinek <jakub@redhat.com>
2948
2949 * c-common.h (c_omp_context_selector_matches): Remove.
2950 * c-omp.c (c_omp_context_selector_matches): Remove.
2951 * c-attribs.c (c_common_attribute_table): Add
2952 "omp declare target {host,nohost,block}" attributes.
2953
8ad0c477
JM
29542019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
2955
2956 * c-lex.c (c_common_has_attribute): Update nodiscard value.
2957
56898e43
RS
29582019-10-14 Richard Sandiford <richard.sandiford@arm.com>
2959
2960 * c-common.h (user_facing_original_type_p): Declare.
2961 * c-common.c: Include c-spellcheck.h.
2962 (user_facing_original_type_p): New function.
2963
20de9568
JJ
29642019-10-12 Jakub Jelinek <jakub@redhat.com>
2965
2966 * c-common.h (c_omp_mark_declare_variant,
2967 c_omp_context_selector_matches): Declare.
2968 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
2969 and hsa-common.h.
2970 (c_omp_get_context_selector): Support second argument NULL.
2971 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
2972 functions.
2973 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
2974 attribute, add "omp declare variant base" and
2975 "omp declare variant variant" attributes.
2976
175a85b2
JM
29772019-10-11 Joseph Myers <joseph@codesourcery.com>
2978
2979 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
2980 CppReason(CPP_W_C11_C2X_COMPAT).
2981
fe2bc27c
JM
29822019-10-11 Joseph Myers <joseph@codesourcery.com>
2983
2984 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
2985 _Decimal64 and _Decimal128.
2986
27dfdc0f
JM
29872019-10-10 Joseph Myers <joseph@codesourcery.com>
2988
2989 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
2990 types if DFP not supported.
2991
94e7f906
JJ
29922019-10-10 Jakub Jelinek <jakub@redhat.com>
2993
2994 * c-common.h (c_omp_check_context_selector,
2995 c_omp_get_context_selector): Declare.
2996 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
2997 in diagnostic message.
2998 (c_omp_check_context_selector, c_omp_get_context_selector): New
2999 functions.
3000 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3001 attribute.
3002 (handle_omp_declare_variant_attribute): New function.
3003
a7160771
MS
30042019-10-09 Martin Sebor <msebor@redhat.com>
3005
3006 PR tree-optimization/90879
3007 * c.opt (-Wstring-compare): New option.
3008
cb57504a
JM
30092019-10-08 Andrew Sutton <asutton@lock3software.com>
3010 Jason Merrill <jason@redhat.com>
3011
3012 Update the concepts implementation to conform to the C++20
3013 specification, improve compile times, and generally clean up
3014 the implementation.
3015
3016 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3017 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3018 * c.opt: Add -Wconcepts-ts.
3019 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3020 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3021 (set_std_cxx2a): Enable concepts by default.
3022
fbb2a6dc
JM
30232019-10-08 Joseph Myers <joseph@codesourcery.com>
3024
3025 * c-opts.c (c_common_post_options): Set
3026 -fno-fp-int-builtin-inexact for C2X.
3027
8e007055
JJ
30282019-10-05 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR c++/91369 - Implement P0784R7: constexpr new
3031 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3032 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3033
843f104d
JM
30342019-10-04 Joseph Myers <joseph@codesourcery.com>
3035
3036 PR c/82752
3037 * c-format.c (C_STD_VER): Handle C2x.
3038 (C_STD_NAME): Likewise.
3039 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3040 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3041 modifier allowed and 'p' flag.
3042 * c-format.h (enum format_std_version): Add STD_C2X.
3043 (struct format_char_info): Mention 'p' in comment on flags2.
3044
e9c9a142
DM
30452019-10-01 David Malcolm <dmalcolm@redhat.com>
3046
3047 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3048 calling diagnostic_show_locus, rather than destroying it afterwards.
3049
7552c36a
JJ
30502019-10-01 Jakub Jelinek <jakub@redhat.com>
3051
3052 PR c++/91925
3053 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3054 with NULL DECL_FIELD_OFFSET.
3055
8209db25
RS
30562019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3057
3058 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3059 has a type name, use it in preference to the __vector syntax.
3060
9343bf99
RS
30612019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3062
3063 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3064 two spaces between a comma and "...".
3065
59bc434a
JJ
30662019-09-27 Jakub Jelinek <jakub@redhat.com>
3067
3068 PR c++/88203
3069 * c-common.h (c_omp_predefined_variable): Declare.
3070 * c-omp.c (c_omp_predefined_variable): New function.
3071 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3072 for predefined variables.
3073
c6447c20
RS
30742019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3075
3076 * c-common.h (build_function_call_vec): Take the original
3077 function decl as an optional final parameter.
3078 (check_builtin_function_arguments): Take the original function decl.
3079 * c-common.c (check_builtin_function_arguments): Likewise.
3080 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3081 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3082
c4438114
JM
30832019-09-15 Jason Merrill <jason@redhat.com>
3084
3085 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3086 fold_for_warn in "|| mask" warning.
3087
68a57628
ML
30882019-09-10 Martin Liska <mliska@suse.cz>
3089
3090 * c.opt: Use newly added WarnRemoved.
3091
f48ef52e
ML
30922019-09-09 Martin Liska <mliska@suse.cz>
3093
3094 * c.opt: Update comment of removed
3095 options that are preserved only for backward
3096 compatibility.
3097
67f6e649
ML
30982019-09-06 Martin Liska <mliska@suse.cz>
3099
3100 PR c++/91125
3101 * c-common.c: Remove definition of flag_use_repository.
3102 * c-common.h: Likewise.
3103 * c-opts.c (c_common_handle_option):
3104 Do not handle OPT_frepo option.
3105 * c.opt: Mark the option with Deprecated.
3106
db9d2274
MP
31072019-09-04 Marek Polacek <polacek@redhat.com>
3108
3109 * c.opt (fdeduce-init-list): Ignored.
3110
68e2c199
PK
31112019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3112
3113 PR c/78736
3114 * c.opt (Wenum-conversion): New option.
3115
7a4418a5
JL
31162019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3117
3118 * c-attribs.c (handle_section_attribute): Call the
3119 handle_generic_attribute target hook after performing target
3120 independent processing.
3121 (handle_noinit_attribute): Likewise.
3122
5f76ab15
ILT
31232019-09-03 Ian Lance Taylor <iant@golang.org>
3124
3125 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3126 when using -fgo-dump-spec.
3127
ae0d3f6a
ML
31282019-09-02 Martin Liska <mliska@suse.cz>
3129
3130 PR c++/91155
3131 * c-common.c (fname_as_string): Use cxx_printable_name for
3132 __PRETTY_FUNCTION__ same as was used before r265711.
3133
8a902edb
MP
31342019-08-28 Marek Polacek <polacek@redhat.com>
3135
3136 Implement P1152R4: Deprecating some uses of volatile.
3137 PR c++/91361
3138 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3139 default for C++2a, unless -Wno-deprecated.
3140 * c.opt (Wvolatile): New warning.
3141
4742dbe7
MP
31422019-08-28 Marek Polacek <polacek@redhat.com>
3143
3144 PR c++/91360 - Implement C++20 P1143R2: constinit.
3145 * c-common.c (c_common_reswords): Add constinit and __constinit.
3146 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3147 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3148 RID_LAST_CXX20.
3149 (D_CXX20): Define.
3150 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3151 * c-format.c (cxx_keywords): Add "constinit".
3152 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3153
6a074892
JJ
31542019-08-27 Jakub Jelinek <jakub@redhat.com>
3155
3156 PR c++/91415
3157 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3158 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3159 like COMPOUND_EXPR rather than normal expression.
3160
22f8849d
IS
31612019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3162
3163 PR pch/61250
3164 * c-lex.c (c_lex_with_flags): Don't call
3165 c_common_no_more_pch () from here.
3166
df375b03
JJ
31672019-08-23 Jakub Jelinek <jakub@redhat.com>
3168
3169 PR middle-end/91283
3170 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3171 instead of flag_excess_precision_cmdline.
3172 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3173 * c-opts.c (c_common_post_options): Likewise.
3174
14b7950f
MS
31752019-08-22 Martin Sebor <msebor@redhat.com>
3176
3177 PR middle-end/91490
3178 * c-common.c (braced_list_to_string): Add argument and overload.
3179 Handle flexible length arrays and unions.
3180
8bb2ee59
EB
31812019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3182
3183 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3184 function declarations where arguments are missing. Rename variables.
3185
21c1e205
RB
31862019-08-15 Richard Biener <rguenther@suse.de>
3187
3188 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3189 enabled, define __SIZETYPE__.
3190
f0033821
CL
31912019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3192
3193 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3194 exclusion with "section" attribute.
3195 (attr_noinit_exclusions): New table.
3196 (handle_noinit_attribute): New function.
3197
4d732405
RS
31982019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3199
3200 PR middle-end/91421
3201 * c-common.c (resolve_overloaded_builtin): Use
3202 copy_decl_built_in_function.
3203
51ad8481
MS
32042019-08-13 Martin Sebor <msebor@redhat.com>
3205
3206 PR c/80619
3207 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3208 (asm_fprintf_length_spec): Same.
3209 * c-format.h (format_lengths): Add FMT_LEN_w.
3210
77eb117f
JJ
32112019-08-10 Jakub Jelinek <jakub@redhat.com>
3212
3213 * c-pragma.h (enum pragma_omp_clause): Add
3214 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3215
398e3feb
JJ
32162019-08-07 Jakub Jelinek <jakub@redhat.com>
3217
3218 * c-pragma.h (enum pragma_omp_clause): Add
3219 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3220 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3221 enumeration value.
3222
ab574db6
MP
32232019-08-05 Marek Polacek <polacek@redhat.com>
3224
3225 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3226 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3227 default for C++2a, unless -Wno-deprecated.
3228 * c.opt (Wcomma-subscript): New warning.
3229
554a530f
JJ
32302019-07-20 Jakub Jelinek <jakub@redhat.com>
3231
3232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3233 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3234 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3235 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3236 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3237 constructs with the loop construct.
3238
1a888209
JJ
32392019-07-13 Jakub Jelinek <jakub@redhat.com>
3240
3241 PR c/91149
3242 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3243 OMP_CLAUSE_REDUCTION_TASK handling.
3244
1fdd6f04
JJ
32452019-07-12 Jakub Jelinek <jakub@redhat.com>
3246
3247 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3248 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3249
99b1c316
MS
32502019-07-09 Martin Sebor <msebor@redhat.com>
3251
3252 PR c++/61339
1fdd6f04 3253 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3254 and others to class.
3255 * c-pretty-print.h: Same.
3256
6c1dae73
MS
32572019-07-09 Martin Sebor <msebor@redhat.com>
3258
3259 PR c++/61339
3260 * c-format.c (check_argument_type): Change class-key from class to
3261 struct and vice versa to match convention and avoid -Wclass-is-pod
3262 and -Wstruct-no-pod.
3263 * c-pretty-print.h: Same.
3264
8ba6ea87
ML
32652019-07-03 Martin Liska <mliska@suse.cz>
3266
3267 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3268 dead assignemts.
3269
83eb9522
JJ
32702019-07-03 Jakub Jelinek <jakub@redhat.com>
3271
3272 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3273 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3274 with OMP_PARALLEL.
3275
1c6ffbab
QZ
32762019-07-02 qing zhao <qing.zhao@oracle.com>
3277
3278 PR preprocessor/90581
3279 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3280 * c.opt: Add new option -fmax-include-depth.
3281
7ffc7de5
JM
32822019-06-26 Jason Merrill <jason@redhat.com>
3283
3284 PR c++/55442 - memory-hog with highly recursive constexpr.
3285 * c.opt (fconstexpr-loop-limit): New.
3286
361af3e4
JJ
32872019-06-25 Jakub Jelinek <jakub@redhat.com>
3288
3289 PR sanitizer/90954
3290 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3291 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3292
ab20d992
JJ
32932019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3294
3295 * c-common.c (c_common_nodes_and_builtins): Define
3296 alternate "__intN__" name for "__intN" types.
3297
f4af4019
JH
32982019-06-24 Jan Hubicka <jh@suse.cz>
3299
3300 * c-common.c (braced_lists_to_strings): Check that
3301 type is array or integer prior checking string flag.
3302
da9e9b57
MB
33032019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3304
3305 PR c++/90875 - added -Wswitch-outside-range option
3306 * c.opt (Wswitch-outside-range): Added new option.
3307 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3308
3f3d6a6f
MP
33092019-06-21 Marek Polacek <polacek@redhat.com>
3310
3311 PR c++/90953 - ICE with -Wmissing-format-attribute.
3312 * c-common.c (check_function_arguments_recurse): Use
3313 get_attribute_name.
3314 (check_missing_format_attribute): Likewise.
3315
1bf32c11
MP
33162019-06-19 Marek Polacek <polacek@redhat.com>
3317
3318 PR c++/60364 - noreturn after first decl not diagnosed.
3319 * c-attribs.c (handle_noreturn_attribute): No longer static.
3320 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3321 Declare.
3322 * c-format.c (check_function_format): Use get_attribute_name.
3323
a04c0734
MS
33242019-06-19 Martin Sebor <msebor@redhat.com>
3325
3326 PR translation/90156
3327 * c-format.c (function_format_info::format_type): Adjust type.
3328 (function_format_info::is_raw): New member.
3329 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3330 (decode_format_attr): Adjust call to decode_format_type.
3331 Avoid a redundant call to convert_format_name_to_system_name.
3332 Avoid abbreviating the word "arguments" in a diagnostic.
3333 (format_warning_substr): New function.
3334 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3335 (finish_dollar_format_checking): Same.
3336 (check_format_info): Same.
3337 (struct baltoks_t): New.
3338 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3339 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3340 functions.
3341 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3342 maybe_diag_unbalanced_tokens.
3343 (handle_format_attribute): Spell out the word "arguments" in
3344 a diagnostic.
3345
d3786ebb
MB
33462019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3347
3348 PR c++/90449 - add -Winaccessible-base option.
3349 * c.opt (Winaccessible-base): New option.
3350
bf38f7e9
JJ
33512019-06-10 Jakub Jelinek <jakub@redhat.com>
3352
3353 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3354 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3355 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3356 combined/composite constructs where it is not allowed. Copy over
3357 OMP_CLAUSE_REDUCTION_INSCAN.
3358
0ecf545c
MS
33592019-06-05 Martin Sebor <msebor@redhat.com>
3360
3361 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3362 (handle_alias_ifunc_attribute): Same.
3363 (handle_copy_attribute): Same.
3364 (handle_weakref_attribute): Same.
3365 (handle_nonnull_attribute): Same.
3366 * c-warn.c (warn_for_sign_compare): Same.
3367 (warn_for_restrict): Same.
3368 * c.opt: Same.
3369
36b34127
MS
33702019-06-05 Martin Sebor <msebor@redhat.com>
3371
3372 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3373 * c.opt (-Wformat-diag): Remove a spurious period.
3374
357a352f
JJ
33752019-05-29 Jakub Jelinek <jakub@redhat.com>
3376
3377 PR c/90628
3378 * c-common.c (check_builtin_function_arguments)
3379 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3380 as last argument.
3381
2b8235ea
EB
33822019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3383
3384 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3385
6d86ddc4
ML
33862019-05-22 Martin Liska <mliska@suse.cz>
3387
3388 PR lto/90500
3389 * c-attribs.c (handle_copy_attribute): Do not copy
3390 target_clones attribute.
3391
419ba5b9
EB
33922019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3393
3394 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3395 * c-ada-spec.c (print_assignment_operator): New function.
3396 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3397 assignment operators declared as methods and filter out the others.
3398
e03436e7
TS
33992019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3400
3401 PR c/89433
3402 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3403 "omp declare target".
3404
a9c697b8
MS
34052019-05-16 Martin Sebor <msebor@redhat.com>
3406
ab20d992
JJ
3407 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3408 keywords, operators, and types in diagnostics.
3409 (handle_scalar_storage_order_attribute): Same.
3410 (handle_mode_attribute): Same.
3411 (handle_visibility_attribute): Same.
3412 (handle_assume_aligned_attribute): Same.
3413 (handle_no_split_stack_attribute): Same.
3414 * c-common.c (shorten_compare): Same.
3415 (c_common_truthvalue_conversion): Same.
3416 (cb_get_source_date_epoch): Same.
3417 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3418 in diagnostics.
3419 (interpret_float): Same.
3420 * c-omp.c (c_finish_omp_for): Same.
3421 * c-opts.c (c_common_post_options): Same.
3422 * c-pch.c (c_common_pch_pragma): Same.
3423 * c-pragma.c (pop_alignment): Same.
3424 (handle_pragma_pack): Same.
3425 (apply_pragma_weak): Same.
3426 (handle_pragma_weak): Same.
3427 (handle_pragma_scalar_storage_order): Same.
3428 (handle_pragma_redefine_extname): Same.
3429 (add_to_renaming_pragma_list): Same.
3430 (maybe_apply_renaming_pragma): Same.
3431 (push_visibility): Same.
3432 (handle_pragma_visibility): Same.
3433 (handle_pragma_optimize): Same.
3434 (handle_pragma_message): Same.
3435 * c-warn.c (warn_for_omitted_condop): Same.
3436 (lvalue_error): Same.
a9c697b8 3437
6b943512
RB
34382019-05-15 Richard Biener <rguenther@suse.de>
3439
3440 PR c/90474
3441 * c-common.c (c_common_mark_addressable_vec): Also mark
3442 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3443 c_mark_addressable.
ab20d992 3444
b744fc85
NS
34452019-05-06 Nathan Sidwell <nathan@acm.org>
3446
3447 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3448
598f50d7
NS
34492019-04-30 Nathan Sidwell <nathan@acm.org>
3450
3451 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3452
5bcc5a3b
ML
34532019-04-30 Martin Liska <mliska@suse.cz>
3454
3455 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3456 for unknown options.
3457
e78a87f7
RS
34582019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3459
3460 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3461 the pointer target rather than the pointer itself.
3462
c280b7ee
JJ
34632019-04-19 Jakub Jelinek <jakub@redhat.com>
3464
3465 PR c/89888
3466 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3467 arguments.
3468 (c_do_switch_warnings): Remove outside_range_p argument.
3469 * c-common.c (check_case_bounds): Removed.
3470 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3471 Don't call check_case_bounds. Fold low_value as well as high_value.
3472 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3473 Check for case labels outside of range of original type here and
3474 adjust them.
3475
8e8225e6
JJ
34762019-04-12 Jakub Jelinek <jakub@redhat.com>
3477
63b8a166
JJ
3478 PR translation/90041
3479 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3480 in the Warn diagnostics.
3481
8e8225e6
JJ
3482 PR c/89946
3483 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3484 function comment. Warn if arguments of the attribute are not positive
3485 integer constants.
3486
53a3f614
EB
34872019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3488
3489 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3490 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3491
22be5873
EB
34922019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3493
3494 * c-ada-spec.c (is_float128): New predicate extracted from...
3495 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3496 <REAL_TYPE>: ...here. Call it.
3497
34facf20
DM
34982019-04-05 David Malcolm <dmalcolm@redhat.com>
3499
3500 PR c/89985
3501 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3502 auto_diagnostic_group. Guard inform calls by result of
3503 warning_at call.
3504
05564120
MP
35052019-04-05 Marek Polacek <polacek@redhat.com>
3506
ab20d992 3507 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3508 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3509 of RHS.
3510
7a506c3c
JM
35112019-04-03 Jason Merrill <jason@redhat.com>
3512
3513 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3514 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3515
ddeae8c8
MS
35162019-04-01 Martin Sebor <msebor@redhat.com>
3517
3518 PR c/89685
3519 * c-attribs.c (handle_copy_attribute): Handle references and
3520 non-constant expressions.
3521
a15ffa22
JJ
35222019-03-22 Jakub Jelinek <jakub@redhat.com>
3523
3524 PR c++/87481
3525 * c.opt (-fconstexpr-ops-limit=): New option.
3526
36a3a7a3
JJ
35272019-03-21 Jakub Jelinek <jakub@redhat.com>
3528
3529 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3530 template param.
3531
bec1da64
MS
35322019-03-19 Martin Sebor <msebor@redhat.com>
3533
3534 PR tree-optimization/89688
3535 * c-common.c (braced_list_to_string): Make static.
3536 (braced_lists_to_strings): Define new function.
3537 * c-common.h (braced_list_to_string): Remove.
3538 (braced_lists_to_strings): Declare.
3539
1fe61adf
ML
35402019-03-12 Martin Liska <mliska@suse.cz>
3541
3542 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3543
93964ebd
ML
35442019-03-11 Martin Liska <mliska@suse.cz>
3545
3546 * c-opts.c (c_common_post_options): Wrap apostrophes
3547 in gcc internal format with %'.
3548
a3f9f006
ML
35492019-03-11 Martin Liska <mliska@suse.cz>
3550
3551 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3552 in a string format message and fix GNU coding style.
3553 * c-common.c (vector_types_convertible_p): Likewise.
3554 (c_build_vec_perm_expr): Likewise.
3555 * c-indentation.c (get_visual_column): Likewise.
3556 * c-opts.c (c_common_handle_option): Likewise.
3557 (c_common_post_options): Likewise.
3558 (sanitize_cpp_opts): Likewise.
3559 * c-pch.c (c_common_pch_pragma): Likewise.
3560 * c-pragma.c (handle_pragma_pack): Likewise.
3561
1db01ff9
JJ
35622019-03-08 Jakub Jelinek <jakub@redhat.com>
3563
3564 PR tree-optimization/89550
3565 * c-common.c (c_common_truthvalue_conversion): Only set
3566 TREE_NO_WARNING if warning_at returned true.
3567 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3568
ba790e6f
JJ
35692019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3570 Martin Sebor <msebor@gmail.com>
3571
3572 * c.opt (Wmissing-attributes): Clean up doc string.
3573
7da73ba7
JJ
35742019-02-25 Jakub Jelinek <jakub@redhat.com>
3575
3576 PR c/89495
3577 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3578 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3579 checking.
3580
921bb9d1
RB
35812019-02-22 Richard Biener <rguenther@suse.de>
3582
3583 * c-pch.c (no_checksum): Remove.
3584 (pch_init): Remove assertion that executable_checksum is not
3585 all zero.
3586 (c_common_valid_pch): Likewise.
3587
e2ebb05c
MS
35882019-02-18 Martin Sebor <msebor@redhat.com>
3589
3590 PR middle-end/89294
3591 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3592
3fe53000
DM
35932019-02-16 David Malcolm <dmalcolm@redhat.com>
3594
3595 PR c++/88680
3596 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3597 implementing -Wtype-limits.
3598
28a8cef1
MS
35992019-02-11 Martin Sebor <msebor@redhat.com>
3600
3601 PR c++/87996
3602 * c-common.c (invalid_array_size_error): New function.
3603 (valid_array_size_p): Call it. Handle size as well as type.
3604 * c-common.h (valid_constant_size_p): New function.
3605 (enum cst_size_error): New type.
3606
ec2be203
DM
36072019-01-31 David Malcolm <dmalcolm@redhat.com>
3608
3609 PR c/89122
3610 * known-headers.cc (get_stdlib_header_for_name): Add
3611 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3612
8936f047
JJ
36132019-01-31 Jakub Jelinek <jakub@redhat.com>
3614
3615 PR libstdc++/88170
3616 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3617 a C cast in pp_c_flag_gnu_v3 mode.
3618
6a335b96
JJ
36192019-01-29 Jakub Jelinek <jakub@redhat.com>
3620
3621 PR c/86125
3622 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3623 builtin_structptr_types types even for C.
3624
2a06eba5
BE
36252019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3626
3627 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3628 when rhs is of array type correctly. Fix handling of nested structures.
3629 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3630 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3631 type casts within nested compound expressions.
3632
18a23298
JJ
36332019-01-22 Jakub Jelinek <jakub@redhat.com>
3634
3635 PR middle-end/88968
3636 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3637 variable after using BIT_FIELD_REF.
3638
420183d9
L
36392019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3640
3641 PR c/51628
3642 PR c/88664
3643 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3644 Remove the boolean argument.
3645 * c-warn.c (check_address_of_packed_member): Renamed to ...
3646 (check_address_or_pointer_of_packed_member): This. Also
3647 warn pointer conversion.
3648 (check_and_warn_address_of_packed_member): Renamed to ...
3649 (check_and_warn_address_or_pointer_of_packed_member): This.
3650 Also warn pointer conversion.
3651 (warn_for_address_or_pointer_of_packed_member): Remove the
3652 boolean argument. Don't check pointer conversion here.
3653
99063eee
RS
36542019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3655
3656 PR inline-asm/52813
3657 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3658
a30d0196
JJ
36592019-01-14 Jakub Jelinek <jakub@redhat.com>
3660
3661 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3662 and __cpp_nontype_template_parameter_auto. Add a comment that
3663 __cpp_template_auto is deprecated.
3664
2d91f79d
TH
36652019-01-14 Tom Honermann <tom@honermann.net>
3666
3667 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3668 * c-common.c (c_common_reswords): Add char8_t.
3669 (fix_string_type): Use char8_t for the type of u8 string literals.
3670 (c_common_get_alias_set): char8_t doesn't alias.
3671 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3672 C++.
3673 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3674 (keyword_begins_type_specifier): Add RID_CHAR8.
3675 * c-common.h (rid): Add RID_CHAR8.
3676 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3677 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3678 Define char8_type_node and char8_array_type_node.
3679 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3680 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3681 (c_cpp_builtins): Predefine __cpp_char8_t.
3682 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3683 CPP_UTF8STRING.
3684 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3685 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3686 targeting C++2a.
3687 * c.opt: Add the -fchar8_t command line option.
3688
23db6ced
MS
36892019-01-14 Martin Sebor <msebor@redhat.com>
3690
3691 PR target/88638
3692 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3693 and issue errors if it fails.
3694 * c-common.h (valid_format_string_type_p): Declare.
3695 * c-format.c (valid_stringptr_type_p): Rename...
3696 (valid_format_string_type_p): ...to this and make extern.
3697 (handle_format_arg_attribute): Adjust to new name.
3698 (check_format_string): Same.
3699
234c3818
L
37002019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3701
3702 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3703 Replace "may may" with "may" in warning message.
3704
d8fcab68
JJ
37052019-01-07 Jakub Jelinek <jakub@redhat.com>
3706
3707 PR c++/85052
3708 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3709 (c_build_vec_convert): Declare.
3710 * c-common.c (c_build_vec_convert): New function.
3711
29d24852
MS
37122019-01-04 Martin Sebor <msebor@redhat.com>
3713
3714 PR c/88546
3715 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3716 Handle C++ empty throw specification and C11 _Noreturn.
3717 (has_attribute): Also handle C11 _Noreturn.
3718
9069a4c9
MS
37192019-01-04 Martin Sebor <msebor@redhat.com>
3720
3721 PR c/88363
3722 * c-attribs.c (positional_argument): Also accept enumerated types.
3723
a5544970
JJ
37242019-01-01 Jakub Jelinek <jakub@redhat.com>
3725
3726 Update copyright years.
3727
da77eace
L
37282018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3729
3730 PR c/51628
3731 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3732 * c-warn.c (check_alignment_of_packed_member): New function.
3733 (check_address_of_packed_member): Likewise.
3734 (check_and_warn_address_of_packed_member): Likewise.
3735 (warn_for_address_or_pointer_of_packed_member): Likewise.
3736 * c.opt: Add -Wno-address-of-packed-member.
3737
573767d4
DM
37382018-12-20 David Malcolm <dmalcolm@redhat.com>
3739
3740 PR c++/87504
3741 * c-warn.c (get_outermost_macro_expansion): New function.
3742 (spelled_the_same_p): Use it to unwind the macro expansions, and
3743 compare the outermost macro in each nested expansion, rather than
3744 the innermost.
3745
a14feb3c
DM
37462018-12-19 David Malcolm <dmalcolm@redhat.com>
3747
3748 PR c++/87504
3749 * c-common.h (warn_tautological_cmp): Convert 1st param from
3750 location_t to const op_location_t &.
3751 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3752 when testing for INTEGER_CST.
3753 (warn_tautological_bitwise_comparison): Convert 1st param from
3754 location_t to const op_location_t &; use it to build a
3755 binary_op_rich_location, and use this.
3756 (spelled_the_same_p): New function.
3757 (warn_tautological_cmp): Convert 1st param from location_t to
3758 const op_location_t &. Warn for macro expansions if
3759 spelled_the_same_p. Use binary_op_rich_location.
3760
dfd7fdca
DM
37612018-12-19 David Malcolm <dmalcolm@redhat.com>
3762
3763 PR c++/43064
3764 PR c++/43486
3765 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3766 (verify_tree): Handle location wrappers.
3767 (c_common_truthvalue_conversion): Strip any location wrapper.
3768 Handle CONST_DECL.
3769 (fold_offsetof): Strip any location wrapper.
3770 (complete_array_type): Likewise for initial_value.
3771 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3772 index before checking for INTEGER_CST.
3773 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3774 print parentheses around location wrappers.
3775 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3776 before checking for INTEGER_CST.
3777 (warn_tautological_bitwise_comparison): Call
3778 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3779 before checking for INTEGER_CST.
3780 (readonly_error): Strip any location wrapper.
3781 (warn_array_subscript_with_type_char): Strip location wrappers
3782 before checking for INTEGER_CST. Use the location of the index if
3783 available.
3784
5c8b3702
JM
37852018-12-06 Jason Merrill <jason@redhat.com>
3786
3787 PR c++/88136 - -Wdeprecated-copy false positives
3788 * c.opt (Wdeprecated-copy-dtor): New.
3789 (Wdeprecated-copy): Move to -Wextra.
3790
673670da
MS
37912018-11-29 Martin Sebor <msebor@redhat.com>
3792
3793 PR c/88172
3794 PR testsuite/88208
3795 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3796 alignments to values less than the target requires.
3797 (has_attribute): For attribute aligned consider both the attribute
3798 and the alignment bits.
3799 * c-common.c (c_init_attributes): Optionally issue a warning for
3800 zero alignment.
3801
04864ec8
MS
38022018-11-28 Martin Sebor <msebor@redhat.com>
3803
3804 PR c/88065
3805 PR c/87297
3806 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3807 or destination is an error.
3808
ace83db0
JJ
38092018-11-28 Jakub Jelinek <jakub@redhat.com>
3810
3811 PR c++/88215
3812 * c-ubsan.c: Include langhooks.h.
3813 (ubsan_instrument_division): Change gcc_assert that main variants
3814 of op0 and op1 types are equal to gcc_checking_assert that the
3815 main variants are compatible types.
3816
da193a27
EB
38172018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3818
3819 * c-ada-spec.c: Include stringpool.h.
3820 (has_static_fields): Return false for incomplete types.
3821 (is_tagged_type): Likewise.
3822 (has_nontrivial_methods): Likewise.
3823 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3824 (struct overloaded_name_hash): New structure.
3825 (struct overloaded_name_hasher): Likewise.
3826 (overloaded_names): New global variable.
3827 (init_overloaded_names): New static function.
3828 (overloaded_name_p): New predicate.
3829 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3830 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3831 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3832 Remove always-true condition and dump forward types.
3833 (dump_ada_specs): Delete overloaded_names.
3834
98f08eb8
MS
38352018-11-20 Martin Sebor <msebor@redhat.com>
3836
3837 * c-attribs.c (type_for_vector_size): New function.
3838 (type_valid_for_vector_size): Same.
3839 (handle_vector_size_attribute): Move code to the functions above
3840 and call them.
3841 (validate_attribute, has_attribute): New functions.
3842 * c-common.h (has_attribute): Declare.
3843 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3844 * c-common.c (c_common_resword): Same.
3845
2674fa47
JM
38462018-11-16 Jason Merrill <jason@redhat.com>
3847
3848 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3849 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3850
258b3854
JJ
38512018-11-16 Jakub Jelinek <jakub@redhat.com>
3852
3853 PR middle-end/87854
3854 * c-common.c (fix_string_type): Reject string literals larger than
3855 TYPE_MAX_VALUE (ssizetype) bytes.
3856
1d249509
MS
38572018-11-15 Martin Sebor <msebor@redhat.com>
3858
3859 PR c++/87541
3860 PR c++/87542
3861 * c-attribs.c (positional_argument): New function.
3862 (handle_alloc_size_attribute): Use it and simplify.
3863 (handle_alloc_align_attribute): Same.
3864 (handle_assume_aligned_attribute): Same.
3865 (handle_nonnull_attribute): Same.
3866 * c-common.c (check_function_arguments): Pass fntype to
3867 check_function_format.
3868 * c-common.h (check_function_format): Add an argument.
3869 (PosArgFlags, positional_argument): Declare new type and function.
3870 * c-format.c (decode_format_attr): Add arguments.
3871 (check_format_string, get_constant): Same.
3872 (convert_format_name_to_system_name): Adjust.
3873
478dd60d
DM
38742018-11-15 David Malcolm <dmalcolm@redhat.com>
3875
3876 PR other/19165
3877 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3878
8cca0163
JJ
38792018-11-14 Jakub Jelinek <jakub@redhat.com>
3880
8ee09943
JJ
3881 P1236R1 - Signed integers are two's complement
3882 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3883 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3884 with in-range second operand well defined for -std=c++2a.
3885
8cca0163
JJ
3886 PR other/88007
3887 * c-common.c (parse_optimize_options): Allocate option string from
3888 opts_obstack rather than as GC memory. Move the allocation after
3889 warning for invalid option.
3890
620e594b
DM
38912018-11-13 David Malcolm <dmalcolm@redhat.com>
3892
3893 * c-common.c (c_get_substring_location): Update for renaming of
3894 get_source_location_for_substring to get_location_within_string.
3895 * c-lex.c: Replace "source_location" with "location_t".
3896 * c-opts.c: Likewise.
3897 * c-ppoutput.c: Likewise.
3898
f9731de3
MS
38992018-11-13 Martin Sebor <msebor@redhat.com>
3900
3901 PR middle-end/81824
3902 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3903 (handle_tls_model_attribute): Improve diagnostics.
3904
e4bd6d5e
JM
39052018-11-12 Jason Merrill <jason@redhat.com>
3906
a6bb6b07
JM
3907 * c-cppbuiltin.c (c_cpp_builtins): Define
3908 __cpp_impl_destroying_delete.
3909
e4bd6d5e
JM
3910 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3911 __cpp_conditional_explicit.
3912
79a2c428
MS
39132018-11-09 Martin Sebor <msebor@redhat.com>
3914
3915 PR middle-end/81824
3916 * c-attribs.c (handle_copy_attribute): New function.
3917
4c7bd361
MS
39182018-11-09 Martin Sebor <msebor@redhat.com>
3919
3920 PR c/87795
3921 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3922
28567c40
JJ
39232018-11-08 Jakub Jelinek <jakub@redhat.com>
3924
3925 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3926 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3927 enum omp_memory_order MEMORY_ORDER.
3928 (c_finish_omp_flush): Add MO argument.
3929 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3930 (c_finish_omp_for): Add FINAL_P argument.
3931 * c-omp.c: Include memmodel.h.
3932 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3933 OMP_TASKGROUP_CLAUSES to it.
3934 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3935 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
3936 instead of OMP_ATOMIC_SEQ_CST.
3937 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
3938 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
3939 __atomic_thread_fence call with the given value.
3940 (check_omp_for_incr_expr): Formatting fixes.
3941 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
3942 even in OpenMP loops, diagnose if NE_EXPR and incr expression
3943 is not constant expression 1 or -1. Transform NE_EXPR loops
3944 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
3945 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
3946 loops too.
3947 (c_omp_split_clauses): Add support for combined
3948 #pragma omp parallel master and
3949 #pragma omp {,parallel }master taskloop{, simd} constructs.
3950 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
3951 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
3952 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
3953 (c_omp_predetermined_sharing): Don't return
3954 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
3955 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
3956 PRAGMA_OMP_REQUIRES.
3957 * c-pragma.h (enum pragma_kind): Likewise.
3958 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
3959 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
3960
204839e7
DM
39612018-11-08 David Malcolm <dmalcolm@redhat.com>
3962
3963 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
3964
d8010ee4
DM
39652018-11-08 David Malcolm <dmalcolm@redhat.com>
3966
3967 * c-format.c (local_cgraph_node_ptr_node): New variable.
3968 (gcc_dump_printf_char_table): Add entry for %C.
3969 (get_pointer_to_named_type): New function, taken from the handling
3970 code for "gimple *" from...
3971 (init_dynamic_diag_info): ...here. Add handling for
3972 "cgraph_node *".
3973 * c-format.h (T_CGRAPH_NODE): New.
3974
4be5c72c
JM
39752018-10-19 Jason Merrill <jason@redhat.com>
3976
3977 * c-cppbuiltin.c (c_cpp_builtins): Add
3978 __cpp_nontype_template_parameter_class.
3979
f3f6029d
NS
39802018-10-31 Nathan Sidwell <nathan@acm.org>
3981
ab5324fb
NS
3982 * c-opts.c (c_finish_options): Force command line macro
3983 location. Refactor to avoid repeating main debug hook.
3984 (push_command_line_include): Clarify comment.
3985
f3f6029d
NS
3986 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
3987
91e3ec29
MS
39882018-10-30 Martin Sebor <msebor@redhat.com>
3989
3990 PR middle-end/87041
3991 * c-format.c (check_format_types): Avoid diagnosing null pointer
3992 arguments to printf-family of functions.
3993
b5ff4f5c
MP
39942018-10-30 Marek Polacek <polacek@redhat.com>
3995
3996 Implement P0892R2, explicit(bool).
3997 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
3998
7e2de6df
DM
39992018-10-29 David Malcolm <dmalcolm@redhat.com>
4000
4001 * name-hint.h (name_hint::take_deferred): New member function.
4002
b2bf438c
DM
40032018-10-29 David Malcolm <dmalcolm@redhat.com>
4004
4005 PR c++/56856
4006 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4007 argument.
4008 (check_function_restrict): Rename param "argarray" to
4009 "unfolded_argarray", and make a copy named "argarray", calling
4010 fold_for_warn on each argument.
4011 (check_function_arguments): Add note about responsibility for
4012 folding the arguments.
4013
9f936c86
JM
40142018-10-17 Joseph Myers <joseph@codesourcery.com>
4015
4016 * c-common.c (flag_isoc2x): New variable.
4017 * c-common.h (clk_c): Update comment to reference C2X.
4018 (flag_isoc99, flag_isoc11): Update comments to reference future
4019 standard versions in general.
4020 (flag_isoc2x): Declare.
4021 * c-opts.c (set_std_c2x): New function.
4022 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4023 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4024 flag_isoc2x to 0.
4025 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4026
7a8a92c4
JM
40272018-10-17 Joseph Myers <joseph@codesourcery.com>
4028
4029 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4030 (std=iso9899:2018): Document C17 as published in 2018.
4031
4dc003ff
CL
40322018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4033
4034 PR c++/87364
4035 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4036
79371671
WW
40372018-10-11 Will Wray <wjwray@gmail.com>
4038
4039 PR c++/87364
4040 * c-pretty-print.h (pp_c_type_cast): Prototype.
4041 (pp_c_integer_constant): Likewise.
4042 * c-pretty-print.c (pp_c_type_cast): No longer static.
4043 (pp_c_integer_constant): Likewise.
4044 (pp_c_enumeration_constant): Fix loop termination when finding
4045 name of constant. No longer returns a value. Call
4046 pp_c_integer_constant.
4047 (c_pretty_printer::constant): Update for changes to
4048 pp_c_enumeration_constant.
4049
46c62690
JJ
40502018-10-11 Jakub Jelinek <jakub@redhat.com>
4051
4052 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4053 for no_unique_address.
4054
c24300ba
DM
40552018-10-09 David Malcolm <dmalcolm@redhat.com>
4056
4057 * c-common.c (c_option_controlling_cpp_error): Rename to...
4058 (c_option_controlling_cpp_diagnostic): ...this, and convert
4059 "reason" from int to enum.
4060 (c_cpp_error): Rename to...
4061 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4062 * c-common.h (c_cpp_error): Rename to...
4063 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4064 * c-opts.c (c_common_init_options): Update for renaming.
4065
8656dafa
RS
40662018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4067
4068 PR c/87286
4069 * c-common.c (vector_types_compatible_elements_p): Use
4070 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4071
8cff0652
VK
40722018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4073
4074 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4075 to generate constructor destructor priority warning.
4076 * c.opt (-Wprio-ctor-dtor): New option.
4077
bedf03a2
JM
40782018-10-01 Jason Merrill <jason@redhat.com>
4079
4080 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4081
6cc430c1
EB
40822018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4083
4084 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4085 (dump_ada_node): Add const keyword.
4086
87677ac7
ML
40872018-09-25 Martin Liska <mliska@suse.cz>
4088
4089 * c-common.c (c_common_truthvalue_conversion):
4090 Remove Pascal from documentation.
4091
518196cb
EB
40922018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4093
4094 * c-ada-spec.c: Include diagnostic.h.
4095 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4096
a599af84
MP
40972018-09-19 Marek Polacek <polacek@redhat.com>
4098
4099 * c.opt (Wclass-conversion): New.
4100
9c4a4b3c
DM
41012018-09-17 David Malcolm <dmalcolm@redhat.com>
4102
4103 * c-format.c (range_label_for_format_type_mismatch::get_text):
4104 Update for new param.
4105
c896ecfe
DM
41062018-09-17 David Malcolm <dmalcolm@redhat.com>
4107
4108 * c-format.c (format_warning_at_char): Update for introduction of
4109 format_string_diagnostic_t.
4110 (format_type_warning): Likewise.
4111
80c6d1f4
MJ
41122018-09-17 Martin Jambor <mjambor@suse.cz>
4113
4114 PR c/63886
4115 * c.opt (Wabsolute-value): New.
4116
6d900107
BE
41172018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4118
4119 * c-common.c (complete_flexible_array_elts): New helper function.
4120 * c-common.h (complete_flexible_array_elts): Declare.
4121
b5764229
BE
41222018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4123
4124 * c-common.c (braced_list_to_string): Remove eval parameter.
4125 Add some more checks. Always create zero-terminated STRING_CST.
4126 * c-common.h (braced_list_to_string): Adjust prototype.
4127
85204e23
DM
41282018-08-27 David Malcolm <dmalcolm@redhat.com>
4129
4130 PR 87091
4131 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4132 to a tri-state.
4133 (maybe_suggest_missing_token_insertion): Likewise.
4134 (maybe_add_include_fixit): Add param "override_location". If set,
4135 and source-printing is enabled, then override the rich_location's
4136 primary location with that of the insertion point for the fix-it
4137 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4138 * c-common.h (extern void maybe_add_include_fixit): Add bool
4139 param.
4140 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4141 for conversion of show_caret_p to a tri-state.
4142 * c-warn.c (warn_for_restrict): Likewise.
4143 * known-headers.cc
4144 (suggest_missing_header::~suggest_missing_header): Update call to
4145 maybe_add_include_fixit to suggest overriding the location, as it
4146 is for a note.
4147
3d78e008
ML
41482018-08-27 Martin Liska <mliska@suse.cz>
4149
4150 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4151 fndecl_built_in_p and remove check for FUNCTION_DECL if
4152 possible.
3d78e008
ML
4153 (check_builtin_function_arguments): Likewise.
4154 (reject_gcc_builtin): Likewise.
4155 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4156
b5be6d0c
MP
41572018-08-26 Marek Polacek <polacek@redhat.com>
4158
4159 PR c++/87029, Implement -Wredundant-move.
4160 * c.opt (Wredundant-move): New option.
4161
79ca9c35
MP
41622018-08-21 Marek Polacek <polacek@redhat.com>
4163
4164 PR c++/86981, Implement -Wpessimizing-move.
4165 * c.opt (Wpessimizing-move): New option.
4166
097f82ec
DM
41672018-08-20 David Malcolm <dmalcolm@redhat.com>
4168
4169 PR other/84889
4170 * c-attribs.c (common_handle_aligned_attribute): Add
4171 auto_diagnostic_group instance.
4172 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4173 * c-opts.c (c_common_post_options): Likewise.
4174 * c-warn.c (warn_logical_not_parentheses): Likewise.
4175 (warn_duplicated_cond_add_or_warn): Likewise.
4176 (warn_for_multistatement_macros): Likewise.
4177
3fb558b1
NS
41782018-08-20 Nathan Sidwell <nathan@acm.org>
4179
4180 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4181 access.
4182
800c0e98
NS
41832018-08-17 Nathan Sidwell <nathan@acm.org>
4184
4185 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4186 field.
4187 (laxy_hex_fp_value_count): Make unsigned.
4188 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4189 manipulate the macro.
4190 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4191 cpp_define_lazily.
4192
6f795a92
DM
41932018-08-17 David Malcolm <dmalcolm@redhat.com>
4194
4195 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4196 (gcc_dump_printf_length_specs): New.
4197 (gcc_dump_printf_flag_pairs): New.
4198 (gcc_dump_printf_flag_specs): New.
4199 (gcc_dump_printf_char_table): New.
4200 (format_types_orig): Add entry for "gcc_dump_printf".
4201 (init_dynamic_diag_info): Set up length_char_specs and
4202 conversion_specs for gcc_dump_printf_format_type.
4203 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4204
c5d725c0
NS
42052018-08-17 Nathan Sidwell <nathan@acm.org>
4206
10f04917
NS
4207 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4208
c5d725c0
NS
4209 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4210 * c-cppbuiltin.c: Likewise.
4211
c0c12356
ML
42122018-08-17 Martin Liska <mliska@suse.cz>
4213
4214 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4215 Ignore/Deprecated flag. Warning is done automatically for
4216 Deprecated flags.
c0c12356 4217
10fcc142
DM
42182018-08-16 David Malcolm <dmalcolm@redhat.com>
4219
4220 PR c++/70693
4221 * c-common.c (selftest::c_family_tests): Call
4222 selftest::c_indentation_c_tests.
4223 * c-common.h (selftest::c_indentation_c_tests): New decl.
4224 * c-indentation.c: Include "selftest.h".
4225 (next_tab_stop): Add "tab_width" param, rather than accessing
4226 cpp_opts.
4227 (get_visual_column): Likewise. Clarify comment. Bulletproof
4228 against reading past the end of the line.
4229 (get_first_nws_vis_column): Add "tab_width" param.
4230 (detect_intervening_unindent): Likewise.
4231 (should_warn_for_misleading_indentation): Read tab width from
4232 cpp_opts and pass around.
4233 (selftest::test_next_tab_stop): New test.
4234 (selftest::assert_get_visual_column_succeeds): New function.
4235 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4236 (selftest::assert_get_visual_column_fails): New function.
4237 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4238 (selftest::test_get_visual_column): New test.
4239 (selftest::c_indentation_c_tests): New function.
4240
3f6677f4
NS
42412018-08-16 Nathan Sidwell <nathan@acm.org>
4242
4243 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4244 (store_ada_macro): Likewise.
4245 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4246 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4247
96e6ae57
DM
42482018-08-15 David Malcolm <dmalcolm@redhat.com>
4249
4250 * c-format.c: Include "selftest-diagnostic.h" and
4251 "gcc-rich-location.h".
4252 (format_warning_at_char): Pass NULL for new label params of
4253 format_warning_va.
4254 (class indirection_suffix): New class.
4255 (class range_label_for_format_type_mismatch): New class.
4256 (format_type_warning): Move logic for generating "*" suffix to
4257 class indirection_suffix. Create "fmt_label" and "param_label"
4258 to show their types, and pass them to the
4259 format_warning_at_substring calls.
4260 (selftest::test_type_mismatch_range_labels): New test.
4261 (selftest::c_format_c_tests): Call it.
4262
23aa9f7c
MS
42632018-08-13 Martin Sebor <msebor@redhat.com>
4264
4265 PR tree-optimization/71625
4266 * c-common.c (braced_list_to_string): New function.
4267 * c-common.h (braced_list_to_string): Declare it.
4268
f10a9135
NS
42692018-08-08 Nathan Sidwell <nathan@acm.org>
4270
4271 * c-common.c (try_to_locate_new_include_inertion_point): Use
4272 linemap_included_from_linemap.
4273 * c-lex.c (fe_file_change): Use linemap_included_from.
4274 * c-ppoutput.c (pp_file_change): Likewise.
4275
8a45b051
MS
42762018-08-01 Martin Sebor <msebor@redhat.com>
4277
4278 PR tree-optimization/86650
ab20d992 4279 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4280 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4281 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4282 * c-format.h (T89_G): Update to be "gimple *" rather than
4283 "gcall *".
4284 (local_gcall_ptr_node): Rename...
4285 (local_gimple_ptr_node): ...to this.
4286
e540ccc0
DM
42872018-07-31 David Malcolm <dmalcolm@redhat.com>
4288
4289 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4290 table entries for gcc_diag_char_table, and the 'Z' entry from
4291 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4292 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4293 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4294 adding missing "Z" for this table. Remove erroneous "G" and "K"
4295 entries.
4296 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4297 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4298 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4299
425fc685
RE
43002018-07-31 Richard Earnshaw <rearnsha@arm.com>
4301
4302 * c-common.c (speculation_safe_resolve_call): New function.
4303 (speculation_safe_resolve_params): New function.
4304 (speculation_safe_resolve_return): New function.
4305 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4306 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4307 __HAVE_SPECULATION_SAFE_VALUE.
4308
181463c2
DM
43092018-07-20 David Malcolm <dmalcolm@redhat.com>
4310
4311 * c-common.c (c_cpp_error): Remove redundant "line_table"
4312 parameter from call to rich_location::set_range.
4313 (maybe_suggest_missing_token_insertion): Likewise.
4314
0d7f9065
MS
43152018-07-20 Martin Sebor <msebor@redhat.com>
4316
4317 PR middle-end/82063
ab20d992 4318 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4319
00abf86c
MS
43202018-07-20 Martin Sebor <msebor@redhat.com>
4321
4322 PR middle-end/82063
4323 * c-common.h (c_common_handle_option): Change function argument
4324 to HOST_WIDE_INT.
4325 * c-opts.c (c_common_init_options): Same.
4326 (c_common_handle_option): Same. Remove special handling of
4327 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4328 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4329 options to take a HOST_WIDE_INT argument and accept a byte-size
4330 suffix. Initialize.
4331 (-Wvla-larger-than): Same.
4332 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4333 (-Wno-vla-larger-than): Same.
4334
9b452033
JJ
43352018-07-12 Jakub Jelinek <jakub@redhat.com>
4336
4337 * c-attribs.c (c_common_attribute_table): Add
4338 "omp declare target implicit" attribute.
4339
cd0762f3
RB
43402018-07-12 Richard Biener <rguenther@suse.de>
4341
4342 PR c/86453
4343 * c-attribs.c (handle_packed_attribute): Do not build a variant
4344 type with TYPE_PACKED, instead ignore the attribute if we may
4345 not apply to the original type.
4346
0b27c3ed
JJ
43472018-07-10 Jakub Jelinek <jakub@redhat.com>
4348
4349 PR c++/86443
4350 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4351 to contain TREE_LIST for both the original class iterator and the
4352 "last" helper var.
4353
e730a0ef
EB
43542018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4355
4356 * c-ada-spec.c (to_ada_name): Remove index parameter.
4357 (pp_ada_tree_identifier): Likewise.
4358 (dump_ada_macros): Adjust call to to_ada_name.
4359 (struct overloaded_name_hash): Delete.
4360 (struct overloaded_name_hasher): Likewise.
4361 (overloaded_names): Likewise.
4362 (compute_overloading_index): Likewise.
4363 (dump_ada_decl_name): Do not call compute_overloading_index and
4364 adjust calls to pp_ada_tree_identifier.
4365 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4366 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4367 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4368 (dump_ada_enum_type): Remove type and display_convention parameters.
4369 Adjust calls to pp_ada_tree_identifier.
4370 (dump_ada_node): Likewise and for dump_ada_structure.
4371 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4372 and tidy up.
4373 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4374 syntax.
4375 (print_constructor): Adjust call to pp_ada_tree_identifier.
4376 (print_destructor): Likewise.
4377 (dump_ada_declaration): Switch to aspect syntax.
4378 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4379 parameter with nested parameter.
4380 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4381 (dump_ada_specs): Do not delete overloaded_names table.
4382
8de583fc
PB
43832018-07-06 Peter Bergner <bergner@linux.ibm.com>
4384
4385 PR target/86324
e730a0ef 4386 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4387 target hook.
4388
09cff37b
NS
43892018-07-05 Nathan Sidwell <nathan@acm.org>
4390
4391 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4392 NO_IMPLICIT_EXTERN_C.
4393
98086b2b
ML
43942018-06-28 Martin Liska <mliska@suse.cz>
4395
4396 * cppspec.c: Include opt-suggestions.h.
4397
ab20d992
JJ
43982018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4399 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4400 Cesar Philippidis <cesar@codesourcery.com>
4401
4402 * c-pragma.h (enum pragma_omp_clause): Add
4403 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4404 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4405
f41b7612
JJ
44062018-06-20 Jakub Jelinek <jakub@redhat.com>
4407
4408 PR c++/86210
4409 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4410 comment.
4411
4252ccd7
MS
44122018-06-18 Martin Sebor <msebor@redhat.com>
4413
4414 PR middle-end/85602
4415 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4416 nonstring.
4417
e197e64e
KV
44182018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4419
4420 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4421
34a7a230
JM
44222018-06-13 Jason Merrill <jason@redhat.com>
4423
5cef3733
JM
4424 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4425 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4426 handling.
4427
34a7a230
JM
4428 PR c++/86094 - wrong code with defaulted move ctor.
4429 * c-opts.c (c_common_post_options): Bump the current ABI version to
4430 13. Set warn_abi_version and flag_abi_compat_version to the current
4431 version rather than 0. Fix defaulting flag_abi_compat_version from
4432 warn_abi_version.
4433
bb0f14ae
MS
44342018-06-12 Martin Sebor <msebor@redhat.com>
4435
4436 PR c/85931
4437 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4438 sizeof source and destination yields the same value.
4439
3713f2e2
ML
44402018-06-12 Martin Liska <mliska@suse.cz>
4441
4442 * c.opt: Make MPX-related options as Deprecated.
4443
4af78ef8
DM
44442018-06-08 David Malcolm <dmalcolm@redhat.com>
4445
4446 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4447 rather than 0.
4448
31db0fe0
ML
44492018-06-08 Martin Liska <mliska@suse.cz>
4450
4451 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4452 for MPX (macros, related functions, fields in cgraph_node, ...).
4453 (handle_bnd_legacy): Likewise.
4454 (handle_bnd_instrument): Likewise.
4455 * c.opt: Likewise.
4456
fe16acf2
JJ
44572018-06-06 Jakub Jelinek <jakub@redhat.com>
4458
4459 PR c++/86068
4460 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4461 __cpp_transactional_memory to 201500 instead of 210500.
4462
4dbdb49b
JM
44632018-06-06 Jason Merrill <jason@redhat.com>
4464
4465 PR c++/85710 - ICE with -Wmemset-elt-size.
4466 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4467
f8ad043f
JM
44682018-06-01 Jason Merrill <jason@redhat.com>
4469
4470 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4471 201703.
4472
abc24d93
EB
44732018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4474
4475 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4476 declaration for a typedef independently of whether the declaration of
4477 the subtype is generated.
4478
d258f4aa
MS
44792018-05-31 Martin Sebor <msebor@redhat.com>
4480
4481 PR c/82063
4482 * c.opt (-Wno-alloc-size-larger-than): New option.
4483
b67b9225
DP
44842018-04-22 David Pagan <dave.pagan@oracle.com>
4485
4486 PR c/55976
4487 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4488 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4489 differentiate between default (no option), -Wreturn-type, and
4490 -Wno-return-type.
4491
04eb9c55
JM
44922018-05-29 Jason Merrill <jason@redhat.com>
4493
4494 * c.opt (Winit-list-lifetime): New flag.
4495
b0c31bc6
BE
44962018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4497
4498 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4499 splay_tree_delete_pointers.
4500
44284983
JJ
45012018-05-26 Jakub Jelinek <jakub@redhat.com>
4502
4503 PR bootstrap/85921
4504 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4505 noinline variable to workaround broken kernel headers.
4506
b46b715d
JM
45072018-05-18 Jason Merrill <jason@redhat.com>
4508
4509 * c.opt (Wdeprecated-copy): New flag.
4510
40659769
ML
45112018-05-17 Martin Liska <mliska@suse.cz>
4512
4513 * c-warn.c (overflow_warning): Do not use
4514 space in between 'G_' and '('.
4515
403962ea
JM
45162018-05-09 Jason Merrill <jason@redhat.com>
4517
4518 * c-common.c (valid_array_size_p): Add complain parameter.
4519 * c-common.h: ...which defaults to true.
4520
1c9ee609
JJ
45212018-05-11 Jakub Jelinek <jakub@redhat.com>
4522
4523 PR c/85696
4524 * c-omp.c (c_omp_predetermined_sharing): Return
4525 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4526
19916065
ML
45272018-05-11 Martin Liska <mliska@suse.cz>
4528
92a285c1 4529 PR sanitizer/85556
19916065
ML
4530 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4531 TREE_LIST values.
4532
79e7b1fe
JJ
45332018-05-10 Jakub Jelinek <jakub@redhat.com>
4534
4535 PR c++/85662
4536 * c-common.h (fold_offsetof_1): Removed.
4537 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4538 CTX argument defaulted to ERROR_MARK.
4539 * c-common.c (fold_offsetof_1): Renamed to ...
4540 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4541 argument, convert the pointer constant to TYPE and use size_binop
4542 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4543 a pointer type. Adjust recursive calls.
4544
86c12f76
EB
45452018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4546
4547 PR c++/85400
4548 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4549
ee336e84
NS
45502018-05-07 Nathan Sidwell <nathan@acm.org>
4551
4552 * c.opt (ffor-scope): Remove functionality, issue warning.
4553
6c072e21
NS
45542018-05-03 Nathan Sidwell <nathan@acm.org>
4555
4556 * c.opt (ffriend-injection): Remove functionality, issue warning.
4557
2cc7d3a7
DM
45582018-05-01 David Malcolm <dmalcolm@redhat.com>
4559
4560 PR c/84258
4561 * c-format.c (struct format_check_results): Add field
4562 "number_non_char".
4563 (check_format_info): Initialize it, and warn if encountered.
4564 (check_format_arg): Distinguish between wide char and
4565 everything else when detecting arrays of non-char.
4566
7761dfbe
DM
45672018-04-30 David Malcolm <dmalcolm@redhat.com>
4568
4569 * c-format.c (get_corrected_substring): Update for
4570 location_get_source_line returning a char_span. Use a char_span
4571 when handling the prefix of the correction.
4572 * c-indentation.c (get_visual_column): Update for
4573 location_get_source_line returning a char_span.
4574 (get_first_nws_vis_column): Likewise.
4575
62e98ef1
DM
45762018-03-29 David Malcolm <dmalcolm@redhat.com>
4577
4578 PR c++/84269
4579 * known-headers.cc (get_stdlib_header_for_name): Add various names
4580 from <assert.h>, <string.h>, and <memory.h>; add more names from
4581 <stdio.h>.
4582
a7dea617
JJ
45832018-03-27 Jakub Jelinek <jakub@redhat.com>
4584
4585 PR c++/85061
4586 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4587 get_base_address of the second operand is a VAR_P, rather than the
4588 operand itself, and use gcc_checking_assert instead of gcc_assert.
4589
889a3a30
MP
45902018-03-23 Marek Polacek <polacek@redhat.com>
4591
4592 PR c++/85045
4593 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4594 <case RDIV_EXPR>: Tweak condition.
4595
452154b9
EB
45962018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4597
4598 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4599
63ecb626
JJ
46002018-03-16 Jakub Jelinek <jakub@redhat.com>
4601
ce811fc4
JJ
4602 PR c/84909
4603 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4604 diagnostics.
4605
63ecb626
JJ
4606 PR c/84910
4607 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4608 diagnostics.
4609
a1295eec
RB
46102018-03-16 Richard Biener <rguenther@suse.de>
4611
4612 PR c/84873
4613 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4614 unshare the possibly folded expression.
4615
919674fb
RB
46162018-03-15 Richard Biener <rguenther@suse.de>
4617
4618 PR c/84873
4619 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4620
f99309b2
MS
46212018-03-13 Martin Sebor <msebor@redhat.com>
4622
4623 PR tree-optimization/84725
4624 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4625 with all three narrow character types, including their qualified forms.
4626
e9b9fa4c
MS
46272018-03-12 Martin Sebor <msebor@redhat.com>
4628
4629 PR tree-optimization/83456
ab20d992 4630 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4631 Restore checking of bounded built-in functions.
4632 (check_function_arguments): Also return the result
4633 of warn_for_restrict.
ab20d992
JJ
4634 * c-common.c (check_function_restrict): Return bool.
4635 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4636
0805d020
MP
46372018-03-02 Marek Polacek <polacek@redhat.com>
4638
4639 PR c++/84171
4640 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4641 is erroneous.
4642
ed2a2f08
TS
46432018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4644
4645 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4646 function".
4647
90abdde0
MP
46482018-03-01 Marek Polacek <polacek@redhat.com>
4649
4650 PR c++/84639
4651 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4652 alignment in computation.
4653
c6db43fa
EB
46542018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4655
4656 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4657 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4658
9e25c7ed
EB
46592018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4660
4661 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4662 (is_char_array): Take a type instead of a declaration.
4663 (dump_ada_array_type): Likewise.
4664 (is_simple_enum): Minor tweak.
4665 (dump_ada_enum_type): New function extracted from...
4666 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4667 <INTEGER_TYPE>: Remove unreachable code.
4668 <RECORD_TYPE>: Likewise. Minor tweaks.
4669 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4670 <ENUMERAL_TYPE>: New case.
4671 <RECORD_TYPE>: Factor out common code.
4672 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4673 Minor tweaks. Deal with enumeral types.
4674 (dump_ada_structure): Minor tweaks.
4675
09de3550
EB
46762018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4677
4678 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4679 address for incomplete structures.
4680 (dump_forward_type): Do not bail out for incomplete structures.
4681 (dump_ada_declaration): Do not special-case incomplete structures
4682 for subtypes. Dump them as null records for types.
4683
095d8d4b
EB
46842018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4685
4686 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4687 (is_char_array): Fix formatting.
4688 (dump_template_types): Likewise.
4689 (dump_generic_ada_node): Rename into...
4690 (dump_ada_node): ...this.
4691 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4692 incomplete structures and not for empty structures. Do not use it
4693 when forward declarations are needed.
4694 (dump_forward_type): New function.
4695 (dump_nested_types): Remove FORWARD parameter. Do not consider
4696 TREE_VISITED and do not generate a forward declaration. Only dump
4697 original nested types for nested declaration.
4698 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4699 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4700 <RECORD_TYPE>: Do not consider TREE_VISITED.
4701 (dump_ada_declaration): Use booleans and fix formatting throughout.
4702 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4703 Call dump_forward_type instead of dump_nested_types for a typedef.
4704 Remove superfluous check and adjust call to dump_nested_types.
4705 <POINTER_TYPE>: Call dump_forward_type and fall through.
4706 (dump_ada_struct_decl): Rename into...
4707 (dump_ada_structure): ...this. Do not special-case empty structures.
4708
d4cfd486
MS
47092018-02-27 Martin Sebor <msebor@redhat.com>
4710
4711 PR c++/83871
4712 * c.opt (-Wmissing-attributes): New option.
4713
b22dbd03
ML
47142018-02-21 Martin Liska <mliska@suse.cz>
4715
4716 * c.opt (Wcatch-value=): Add IntegerRange.
4717
883dfe2a
JM
47182018-02-15 Jason Merrill <jason@redhat.com>
4719
4720 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4721
0444aa9c
NS
47222018-02-09 Nathan Sidwell <nathan@acm.org>
4723
4724 PR c/84293
4725 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4726 arg.
4727 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4728 arg. Adjust.
4729
cea71f0a
MS
47302018-02-09 Martin Sebor <msebor@redhat.com>
4731
4732 PR lto/84212
4733 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4734 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4735 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4736 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4737 (-Wuninitialized): Same.
4738
8c8b7be5
EB
47392018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4740
4741 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4742 keyword for components.
4743
7c30b12a
PC
47442018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4745
4746 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4747
eece7fe5
JK
47482018-02-02 Julia Koval <julia.koval@intel.com>
4749
4750 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4751
7d07a93a
MP
47522018-01-29 Marek Polacek <polacek@redhat.com>
4753
4754 PR c/83966
4755 * c-format.c (check_function_format): Check current_function_decl.
4756
53723269
JJ
47572018-01-27 Jakub Jelinek <jakub@redhat.com>
4758
4759 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4760 argument.
4761 (LAZY_HEX_FP_VALUES_CNT): Define.
4762 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4763 values rather than just 12.
4764 (builtin_define_with_hex_fp_value): Likewise.
4765
7365279f
BK
47662018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4767
92a285c1
ML
4768 PR other/70268
4769 * c.opt (-fmacro-prefix-map): New option.
4770 * c-opts.c (c_common_handle_option): Handle it.
4771 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4772 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4773
bb9869d5
DM
47742018-01-17 David Malcolm <dmalcolm@redhat.com>
4775
4776 PR c++/83814
4777 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4778
68dc87c3
EB
47792018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4780
4781 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4782 Skip 'f' and 'F' characters if it is true.
4783 (store_ada_macro): Minor tweak.
4784 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4785 <CPP_WSTRING>: Likewise.
4786 <CPP_STRING>: Output '&' in the buffer if not the first string.
4787 <CPP_NUMBER>: Adjust calls to dump_number.
4788
9a004410
DM
47892018-01-10 David Malcolm <dmalcolm@redhat.com>
4790
4791 PR c++/43486
4792 * c-common.c: Include "selftest.h".
4793 (get_atomic_generic_size): Perform the test for integral type
4794 before the range test for any integer constant, fixing indentation
4795 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4796 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4797 (selftest::test_fold_for_warn): New function.
4798 (selftest::c_common_c_tests): New function.
4799 (selftest::c_family_tests): Call it, and
4800 selftest::c_pretty_print_c_tests.
4801 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4802 * c-format.c (check_format_arg): Convert VAR_P check to a
4803 fold_for_warn.
4804 * c-pretty-print.c: Include "selftest.h".
4805 (pp_c_cast_expression): Don't print casts for location wrappers.
4806 (selftest::assert_c_pretty_printer_output): New function.
4807 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4808 (selftest::test_location_wrappers): New function.
4809 (selftest::c_pretty_print_c_tests): New function.
4810 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4811
5c0caeb3
RS
48122018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4813 Alan Hayward <alan.hayward@arm.com>
4814 David Sherwood <david.sherwood@arm.com>
4815
4816 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4817
73a699ae
RS
48182018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4819 Alan Hayward <alan.hayward@arm.com>
4820 David Sherwood <david.sherwood@arm.com>
4821
4822 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4823 as polynomial.
4824
928686b1
RS
48252018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4826 Alan Hayward <alan.hayward@arm.com>
4827 David Sherwood <david.sherwood@arm.com>
4828
4829 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4830 (convert_vector_to_array_for_subscript): Handle polynomial
4831 TYPE_VECTOR_SUBPARTS.
4832 (c_common_type_for_mode): Check valid_vector_subparts_p.
4833 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4834 VECTOR_CST_NELTS.
4835
85ec4feb
JJ
48362018-01-03 Jakub Jelinek <jakub@redhat.com>
4837
4838 Update copyright years.
4839
170a8bd6 48402017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4841 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4842
4843 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4844 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4845
ab20d992 48462017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4847
4848 PR debug/83527
4849 PR debug/83419
4850 * c-semantics.c (only_debug_stmts_after_p): New.
4851 (pop_stmt_list): Clear side effects in debug-only stmt list.
4852 Check for single nondebug stmt followed by debug stmts only.
4853
c12d20d4
AO
48542017-12-21 Alexandre Oliva <aoliva@redhat.com>
4855
4856 PR debug/83419
4857 * c-semantics.c (pop_stmt_list): Propagate side effects from
4858 single nondebug stmt to container list.
4859
01512446
JJ
48602017-12-19 Jakub Jelinek <jakub@redhat.com>
4861
4862 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4863 conditions with typical order conditions.
4864
82cfbd01
MP
48652017-12-18 Marek Polacek <polacek@redhat.com>
4866
4867 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4868 not in effect.
4869
99da11ec
MS
48702017-12-17 Martin Sebor <msebor@redhat.com>
4871
4872 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4873 an error for attribute warn_if_not_aligned.
4874
cc8bea0a
MS
48752017-12-16 Martin Sebor <msebor@redhat.com>
4876
4877 PR tree-optimization/78918
4878 * c-common.c (check_function_restrict): Avoid checking built-ins.
4879 * c.opt (-Wrestrict): Include in -Wall.
4880
4849deb1
JJ
48812017-12-15 Jakub Jelinek <jakub@redhat.com>
4882
4883 * c-attribs.c (c_common_attribute_table,
4884 c_common_format_attribute_table): Swap affects_type_identity
4885 and handler fields, adjust comments.
4886
c65e18d3
BE
48872017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4888
4889 * c.opt (Wcast-function-type): New warning option.
4890 * c-lex.c (get_fileinfo): Avoid warning.
4891 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4892
2004617a
QZ
48932017-12-14 Qing Zhao <qing.zhao@oracle.com>
4894
7365279f 4895 PR middle_end/79538
2004617a
QZ
4896 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4897 Adjust the size of buf1 and buf2, add a new buf to avoid
4898 format-overflow warning.
4899
ab20d992 49002017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4901
4902 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4903 subsequent statement list.
4904
5d9ae53d
MS
49052017-12-07 Martin Sebor <msebor@redhat.com>
4906
4907 PR c/81544
4908 PR c/81566
4909 * c-attribs.c (attr_aligned_exclusions): New array.
4910 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4911 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4912 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4913 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4914 (attr_warn_unused_result_exclusions): Same.
4915 (handle_hot_attribute, handle_cold_attribute): Simplify.
4916 (handle_const_attribute): Warn on function returning void.
4917 (handle_pure_attribute): Same.
4918 (handle_aligned_attribute): Diagnose conflicting attribute
4919 specifications.
4920 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4921
c79144f8
DM
49222017-12-06 David Malcolm <dmalcolm@redhat.com>
4923
4924 PR c/83236
4925 * c-common.c (selftest::c_family_tests): Call
4926 selftest::c_spellcheck_cc_tests.
4927 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4928 * c-spellcheck.cc: Include "selftest.h".
4929 (name_reserved_for_implementation_p): New function.
4930 (should_suggest_as_macro_p): New function.
4931 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4932 should_suggest_as_macro_p and call it.
4933 (selftest::test_name_reserved_for_implementation_p): New function.
4934 (selftest::c_spellcheck_cc_tests): New function.
4935 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
4936
613bc14f
DM
49372017-12-06 David Malcolm <dmalcolm@redhat.com>
4938
4939 * c-spellcheck.cc: New file, taken from macro-handling code in
4940 spellcheck-tree.c.
4941 * c-spellcheck.h: New file, taken from macro-handling code in
4942 spellcheck-tree.h.
4943
e76c7157
JJ
49442017-12-01 Jakub Jelinek <jakub@redhat.com>
4945
4946 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
4947 attribute.
4948 (handle_simd_attribute): Don't check for "cilk simd function"
4949 attribute. Reindent, formatting changes.
4950
b0da4034
JK
49512017-11-30 Julia Koval <julia.koval@intel.com>
4952
4953 * c-common.h (inv_list): Remove.
4954
058f0b9e
JJ
49552017-11-28 Jakub Jelinek <jakub@redhat.com>
4956
4957 PR sanitizer/81275
4958 * c-common.c (c_switch_covers_all_cases_p_1,
4959 c_switch_covers_all_cases_p): New functions.
4960 * c-common.h (c_switch_covers_all_cases_p): Declare.
4961
5e9d6aa4 49622017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 4963 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
4964
4965 * array-notation-common.c: Delete.
4966 * c-cilkplus.c: Ditto.
4967 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
4968 * c-common.def (ARRAY_NOTATION_REF): Remove.
4969 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
4970 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
4971 c_validate_cilk_plus_loop, cilkplus_an_parts,
4972 cilk_ignorable_spawn_rhs_op,
4973 cilk_recognize_spawn): Remove.
4974 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
4975 * c-omp.c: Remove CILK_SIMD check.
4976 * c-pragma.c: Ditto.
4977 * c-pragma.h: Remove CILK related pragmas.
4978 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
4979 ARRAY_NOTATION_REF condition.
4980 (c_pretty_printer::expression): Ditto.
4981 * c.opt (fcilkplus): Remove.
4982 * cilk.c: Delete.
4983
1af4ebf5
MG
49842017-11-21 Marc Glisse <marc.glisse@inria.fr>
4985
4986 * c-pretty-print.c (pp_c_additive_expression,
4987 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
4988
d44ed508
JJ
49892017-11-21 Jakub Jelinek <jakub@redhat.com>
4990
7d2f0f9b
JJ
4991 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
4992
d44ed508
JJ
4993 PR c++/83059
4994 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
4995 instead of tree_to_uhwi, formatting fix.
4996
26edace6
DM
49972017-11-20 David Malcolm <dmalcolm@redhat.com>
4998
4999 PR c/81404
5000 * known-headers.cc: New file, based on material from c/c-decl.c.
5001 (suggest_missing_header): Copied as-is.
5002 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5003 heavily edited to add C++ support. Add some knowledge about
5004 <limits.h>, <stdint.h>, and <wchar.h>.
5005 * known-headers.h: Likewise.
5006
6c7a259b
DM
50072017-11-20 David Malcolm <dmalcolm@redhat.com>
5008
5009 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5010 (lookup_name_fuzzy): Likewise. Convert return type from
5011 const char * to name_hint. Add location_t param.
5012 * name-hint.h: New header.
5013
f9c59f7e
JJ
50142017-11-19 Jakub Jelinek <jakub@redhat.com>
5015
5016 PR c/66618
5017 PR c/69960
5018 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5019
1e39313a
JM
50202017-11-16 Joseph Myers <joseph@codesourcery.com>
5021
5022 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5023 expected publication date of C17.
5024 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5025
3ca0dc60
JM
50262017-11-15 Joseph Myers <joseph@codesourcery.com>
5027
5028 PR c/81156
5029 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5030 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5031
025d57f0
MS
50322017-11-10 Martin Sebor <msebor@redhat.com>
5033
5034 PR c/81117
5035 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5036 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5037 * c.opt (-Wstringop-truncation): New option.
5038
1b6fa695
ML
50392017-11-06 Martin Liska <mliska@suse.cz>
5040
5041 PR middle-end/82404
5042 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5043 FE.
5044 * c.opt: Set default value of warn_return_type.
5045
64a5912c
DM
50462017-10-31 David Malcolm <dmalcolm@redhat.com>
5047
5048 * c-common.c (binary_op_error): Update for renaming of
5049 error_at_rich_loc.
5050 (c_parse_error): Likewise.
5051 * c-warn.c (warn_logical_not_parentheses): Likewise for
5052 renaming of inform_at_rich_loc.
5053 (warn_for_restrict): Likewise for renaming of
5054 warning_at_rich_loc_n.
5055
c76dc9c3
JM
50562017-10-30 Joseph Myers <joseph@codesourcery.com>
5057
5058 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5059 * c-opts.c (set_std_c17): New function.
5060 (c_common_init_options): Use gnu17 as default C version.
5061 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5062
ee5fd23a
MM
50632017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5064
5065 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5066 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5067 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5068 __FP_FAST_FMA<N>X.
5069
d1047465
MP
50702017-10-23 Marek Polacek <polacek@redhat.com>
5071
5072 PR c/82681
5073 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5074
9e878cf1
EB
50752017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5076
5077 * c-common.c (check_builtin_function_arguments): Also check arguments
5078 of __builtin_alloca_with_align_and_max.
5079
89b6abbb
DM
50802017-10-17 David Malcolm <dmalcolm@redhat.com>
5081
5082 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5083 rather than NULL to format_warning_va.
5084 (check_format_types): Likewise when calling format_type_warning.
5085 Remove code to extract source_ranges and source_range * in favor
5086 of just a location_t.
5087 (format_type_warning): Convert source_range * param to a
5088 location_t.
5089
39382c09
JJ
50902017-10-13 Jakub Jelinek <jakub@redhat.com>
5091
5092 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5093 [LR]SHIFT_EXPR.
5094
62e1c678
DM
50952017-10-12 David Malcolm <dmalcolm@redhat.com>
5096
5097 * c-common.c (enum missing_token_insertion_kind): New enum.
5098 (get_missing_token_insertion_kind): New function.
5099 (maybe_suggest_missing_token_insertion): New function.
5100 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5101
b90c9338
NS
51022017-10-11 Nathan Sidwell <nathan@acm.org>
5103
5104 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5105 (c_common_handle_option): Update incpath_kind names.
5106
3a266bcd
ML
51072017-10-11 Martin Liska <mliska@suse.cz>
5108
5109 PR sanitizer/82490
5110 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5111 Wattributes warning.
5112
8e6cdc90
RS
51132017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5114
5115 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5116 operating on trees as wide_ints.
5117 * c-common.c (pointer_int_sum): Likewise.
5118 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5119 * c-warn.c (match_case_to_enum_1): Likewise.
5120 (c_do_switch_warnings): Likewise.
5121 (maybe_warn_shift_overflow): Likewise.
5122
802b38c9
JJ
51232017-10-10 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR c/82437
5126 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5127 instead of wide_int::from.
5128
4e34b338
JJ
51292017-10-06 Jakub Jelinek <jakub@redhat.com>
5130
5131 PR c/82437
5132 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5133 using to_widest use wide_int with the larger of the two precisions.
5134
4bc4b2b4
BE
51352017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5136
5137 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5138 functions.
5139
a1488398
RS
51402017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5141
5142 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5143 when combining the original unconverted comparison operands.
5144
01c9fb68
JJ
51452017-09-29 Jakub Jelinek <jakub@redhat.com>
5146
5147 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5148 attribute.
5149
6e3e8419
EB
51502017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5151
5152 * c-ada-spec.c (to_ada_name): Add index parameter.
5153 (pp_ada_tree_identifier): Likewise.
5154 (dump_ada_macros): Adjust call to to_ada_name.
5155 (struct overloaded_name_hash): New type.
5156 (struct overloaded_name_hasher): Likewise.
5157 (overloaded_names): New hash table.
5158 (compute_overloading_index): New function.
5159 (dump_ada_decl_name): Call it and pass the result to
5160 pp_ada_tree_identifier.
5161 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5162 (dump_ada_function_declaration): Likewise.
5163 (dump_generic_ada_node): Likewise.
5164 (print_constructor): Likewise.
5165 (print_destructor): Likewise.
5166 (dump_ada_specs): Delete overloaded_names table.
5167
79310774
EB
51682017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5169
5170 * c-ada-spec.c (max_ada_macros): Move around.
5171 (store_ada_macro_index): Likewise.
5172 (source_file): Rename into...
5173 (macro_source_file): ...this.
5174 (count_ada_macro): Move around.
5175 (store_ada_macro): Likewise.
5176 (compare_macro): Likewise.
5177 (print_ada_macros): Merge in...
5178 (dump_ada_macros): ...this.
5179 (source_file_base): Rename into...
5180 (current_source_file): ...this.
5181 (print_comment): Move around.
5182 (dump_ada_nodes): Call dump_ada_declaration directly.
5183 (struct with): Change type of limited field to bool.
5184 (append_withs): Change type of limited_access parameter to bool.
5185 (pp_ada_tree_identifie): Likewise.
5186 (dump_ada_decl_nam): Likewise.
5187 (dump_generic_ada_node): Likewise. Do not print the return type.
5188 (to_ada_name): Change type of space_found parameter to bool.
5189 (dump_ada_function_declaration): Return void and change type of
5190 parameters to bool. Also print the return type for a function.
5191 (print_ada_methods): Rename into...
5192 (dump_ada_methods): ...this.
5193 (print_ada_declaration): Rename into ...
5194 (dump_ada_declaration): ...this. Do not print the return type.
5195 (print_ada_struct_decl): Rename into...
5196 (dump_ada_struct_decl): ...this.
5197
7d386d45
JJ
51982017-09-29 Jakub Jelinek <jakub@redhat.com>
5199
5200 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5201 rather than DECL_INITIAL.
5202 (common_handle_aligned_attribute): Likewise.
5203
ab20d992 52042017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5205
5206 * c.opt (gen-decls): Add RejectNegative.
5207
026a79f7
AS
52082017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5209 Jakub Jelinek <jakub@redhat.com>
5210
5211 Add support for -std=c++2a.
5212 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5213 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5214 * c-opts.c (set_std_cxx2a): New.
5215 (c_common_handle_option): Set options when -std=c++2a is enabled.
5216 (c_common_post_options): Adjust comments.
5217 (set_std_cxx14, set_std_cxx17): Likewise.
5218
4a8ca690
EB
52192017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5220
5221 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5222 message for non-uniform endianness and issue a warning in C++.
5223
7b936140
JJ
52242017-09-15 Jakub Jelinek <jakub@redhat.com>
5225
5226 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5227 (Wc++17-compat): Change from undocumented alias to option.
5228 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5229 change C++1z to C++17 in description.
5230 (std=c++1z, std=gnu++1z): Change from option to undocumented
5231 deprecated alias.
5232 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5233 Adjust description.
5234 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5235 * c-opts.c (set_std_cxx1z): Rename to ...
5236 (set_std_cxx17): ... this.
5237 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5238 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5239 caller.
7b936140
JJ
5240 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5241 comments.
5242
12263f13
L
52432017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5244
5245 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5246 function alignment if warn_if_not_aligned_p is true.
5247
6836632e
NS
52482017-09-12 Nathan Sidwell <nathan@acm.org>
5249
5250 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5251 resort_sorted_fields): Move to c/c-decl.c.
5252 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5253 (struct sorted_fields_type): Move to c/c-lang.h.
5254
019bf9ad
JW
52552017-09-09 Jonathan Wakely <jwakely@redhat.com>
5256
5257 PR c++/81852
5258 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5259
bc7fe952
MP
52602017-09-04 Marek Polacek <polacek@redhat.com>
5261
5262 PR c/81783
5263 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5264 (warn_tautological_cmp): Call it.
5265
ab20d992 52662017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5267
5268 * c-opts.c (c_common_finish): Write dependency information even if
5269 there are errors.
5270
d2e05fcb
JJ
52712017-09-01 Jakub Jelinek <jakub@redhat.com>
5272
5273 PR c/81887
5274 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5275 (omp_pragmas_simd): ... here.
5276 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5277 create new clauses list containing just simd clause.
5278
18e2a8b8
RS
52792017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5280 Alan Hayward <alan.hayward@arm.com>
5281 David Sherwood <david.sherwood@arm.com>
5282
5283 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5284 into scalar_mode_supported_p call.
5285 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5286
16d22000
RS
52872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5288 Alan Hayward <alan.hayward@arm.com>
5289 David Sherwood <david.sherwood@arm.com>
5290
5291 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5292 for the mode iterator.
5293
b397965c
RS
52942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5295 Alan Hayward <alan.hayward@arm.com>
5296 David Sherwood <david.sherwood@arm.com>
5297
5298 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5299 * c-common.c (c_build_vec_perm_expr): Likewise.
5300
357b7604
RS
53012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5302 Alan Hayward <alan.hayward@arm.com>
5303 David Sherwood <david.sherwood@arm.com>
5304
5305 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5306
e05c94ba
RS
53072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5308 Alan Hayward <alan.hayward@arm.com>
5309 David Sherwood <david.sherwood@arm.com>
5310
5311 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5312 before calling targetm.addr_space.valid_pointer_mode.
5313
5c20c4af
RS
53142017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5315 Alan Hayward <alan.hayward@arm.com>
5316 David Sherwood <david.sherwood@arm.com>
5317
5318 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5319
c94843d2 53202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5321 Alan Hayward <alan.hayward@arm.com>
5322 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5323
5324 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5325 iterators.
5326 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5327
4e10a5a7
RS
53282017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5329 Alan Hayward <alan.hayward@arm.com>
5330 David Sherwood <david.sherwood@arm.com>
5331
5332 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5333 case statements.
5334
130fcab0
ML
53352017-08-29 Martin Liska <mliska@suse.cz>
5336
5337 PR other/39851
5338 * c-common.c (parse_optimize_options): Add argument to function
5339 call.
5340 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5341
14e18d71
DM
53422017-08-24 David Malcolm <dmalcolm@redhat.com>
5343
5344 * c-lex.c (interpret_float): Use token location
5345 when building an EXCESS_PRECISION_EXPR.
5346
2f687306
DM
53472017-08-21 David Malcolm <dmalcolm@redhat.com>
5348
5349 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5350 it to check_function_format.
5351 * c-common.h (check_function_arguments): Add vec<location_t> *
5352 param.
5353 (check_function_format): Likewise.
5354 * c-format.c (struct format_check_context): Add field "arglocs".
5355 (check_function_format): Add param "arglocs"; pass it to
5356 check_format_info.
ab20d992 5357 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5358 new field of format_ctx.
5359 (check_format_arg): Pass format_ctx->arglocs to new param of
5360 check_format_info_main.
5361 (class argument_parser): New field "arglocs".
5362 (argument_parser::argument_parser): Add "arglocs_" param and use
5363 it to initialize new field.
5364 (argument_parser::check_argument_type): Pass new arglocs field to
5365 check_format_types.
5366 (check_format_info_main): Add param "arglocs", and use it when
5367 constructing arg_parser.
5368 (check_format_types): Add param "arglocs"; use it if non-NULL when
5369 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5370
00aa1fa2
L
53712017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5372
5373 PR c/53037
5374 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5375 (c_common_attribute_table): Add warn_if_not_aligned.
5376 (handle_aligned_attribute): Renamed to ...
5377 (common_handle_aligned_attribute): Remove argument, name, and add
5378 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5379 (handle_aligned_attribute): New.
5380 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5381
27be025d
MS
53822017-08-14 Martin Sebor <msebor@redhat.com>
5383
5384 PR c/81117
5385 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5386 (handle_nonstring_attribute): New function.
5387
da67acb9
MS
53882017-08-14 Martin Sebor <msebor@redhat.com>
5389
5390 PR c/81117
5391 * c-format.h (T89_G): New macro.
5392 * c-format.c (local_gcall_ptr_node): New variable.
5393 (init_dynamic_diag_info): Initialize it.
5394
a8b522b4
ML
53952017-08-11 Martin Liska <mliska@suse.cz>
5396
5397 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5398 TARGET_SUPPORTS_ALIASES.
5399
32129a17
DM
54002017-08-10 David Malcolm <dmalcolm@redhat.com>
5401
5402 * c-common.c (c_parse_error): Add rich_location * param, using it
5403 rather implicitly using input_location.
5404 * c-common.h (c_parse_error): Add rich_location * param.
5405
30af3a2b
MP
54062017-08-09 Marek Polacek <polacek@redhat.com>
5407
5408 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5409 (c_common_truthvalue_conversion): Likewise.
5410 * c-omp.c (c_finish_omp_atomic): Likewise.
5411 * c-common.h (build_binary_op): Update declaration.
5412
314e6352
ML
54132017-08-08 Martin Liska <mliska@suse.cz>
5414
5415 * c-ada-spec.c: Include header files.
5416 * c-ubsan.c: Likewise.
5417 * c-warn.c: Likewise.
5418
56b5041c
JJ
54192017-08-07 Jakub Jelinek <jakub@redhat.com>
5420
5421 PR c/69389
5422 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5423
db440138
EB
54242017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5425
5426 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5427 (print_ada_methods): Likewise.
5428 (print_ada_declaration): Likewise.
5429
577eec56
ML
54302017-08-07 Martin Liska <mliska@suse.cz>
5431
5432 * array-notation-common.c: Add new includes.
5433 * c-format.c( handle_format_attribute): Canonicalize a format
5434 function name.
5435 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5436 attribute.
5437 * c-pretty-print.c: Add new include.
5438
b854df3c
EB
54392017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5440
5441 * c-ada-spec.c (has_static_fields): Look only into variables.
5442 (print_constructor): Add TYPE parameter and use it for the name.
5443 (print_destructor): Likewise.
5444 (print_ada_declaration): Adjust to new constructor/destructor names.
5445 Adjust calls to print_constructor and print_destructor.
5446 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5447 Look only into variables in the final loop.
5448
9f2cb25e
EB
54492017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5450
5451 * c-ada-spec.c (has_static_fields): Look only into fields.
5452 (dump_generic_ada_node): Small tweak.
5453 (dump_nested_types): Look only into fields.
5454 (print_ada_declaration): Look only into methods. Small tweak.
5455 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5456
f4bcd9eb
EB
54572017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5458
5459 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5460 (dump_ada_function_declaration): Likewise.
5461 (dump_generic_ada_node): Likewise.
5462 (print_ada_declaration): Add support for const-qualified variables.
5463
f34ebeb2
ML
54642017-07-31 Martin Liska <mliska@suse.cz>
5465
5466 PR sanitize/81530
5467 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5468 Guard condition with flag_sanitize_p also with current_function_decl
5469 non-null equality.
5470 (ubsan_maybe_instrument_reference_or_call): Likewise.
5471
218e5d04
UB
54722017-07-30 Uros Bizjak <ubizjak@gmail.com>
5473
5474 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5475
942047f2
EB
54762017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5477
5478 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5479 for enumeral types.
5480 (print_ada_declaration): Add missing guard for record types.
5481
a40ff0ae
JJ
54822017-07-27 Jakub Jelinek <jakub@redhat.com>
5483
5484 PR c/45784
5485 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5486 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5487 new COMPOUND_EXPRs around the rhs of the comparison.
5488
06bd22f6
MP
54892017-07-27 Marek Polacek <polacek@redhat.com>
5490
5491 PR c/81417
5492 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5493 the types.
5494
036ea399
JJ
54952017-07-27 Jakub Jelinek <jakub@redhat.com>
5496
5497 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5498 (handle_noipa_attribute): New function.
5499
417ca011
TD
55002017-07-07 Torsten Duwe <duwe@suse.de>
5501
5502 * c-attribs.c (c_common_attribute_table): Add entry for
5503 "patchable_function_entry".
5504
5aaa8fb4
NS
55052017-07-20 Nathan Sidwell <nathan@acm.org>
5506
5507 Remove TYPE_METHODS.
5508 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5509 dump_ada_template, print_ada_methods,
5510 print_ada_declaration): Member fns are on TYPE_FIELDS.
5511
ff22eb12
NS
55122017-07-18 Nathan Sidwell <nathan@acm.org>
5513
5514 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5515
eea77d1f
DM
55162017-07-14 David Malcolm <dmalcolm@redhat.com>
5517
5518 * c-common.c (try_to_locate_new_include_insertion_point): New
5519 function.
5520 (per_file_includes_t): New typedef.
5521 (added_includes_t): New typedef.
5522 (added_includes): New variable.
5523 (maybe_add_include_fixit): New function.
5524 * c-common.h (maybe_add_include_fixit): New decl.
5525
281ac396
MS
55262017-07-10 Martin Sebor <msebor@redhat.com>
5527
5528 PR other/81345
5529 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5530
b6f43128
DM
55312017-07-06 David Malcolm <dmalcolm@redhat.com>
5532
5533 * c-common.c (selftest::c_family_tests): New.
5534 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5535 (selftest::c_family_tests): New decl.
5536
efbf55b0
MP
55372017-07-04 Marek Polacek <polacek@redhat.com>
5538
5539 PR c/81231
5540 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5541 types.
5542
6c86bd88
MP
55432017-07-04 Marek Polacek <polacek@redhat.com>
5544
5545 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5546
17a7218b
ML
55472017-06-28 Martin Liska <mliska@suse.cz>
5548
5549 PR ipa/81128
5550 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5551 to a function declaration.
5552
63010089
ML
55532017-06-28 Martin Liska <mliska@suse.cz>
5554
5555 PR driver/79659
5556 * c.opt: Add IntegerRange to various options.
5557
3e2becc4
MP
55582017-06-26 Marek Polacek <polacek@redhat.com>
5559
5560 PR c/80116
5561 * c-common.h (warn_for_multistatement_macros): Declare.
5562 * c-warn.c: Include "c-family/c-indentation.h".
5563 (warn_for_multistatement_macros): New function.
5564 * c.opt (Wmultistatement-macros): New option.
5565 * c-indentation.c (guard_tinfo_to_string): No longer static.
5566 Change the parameter type to "enum rid". Handle RID_SWITCH.
5567 * c-indentation.h (guard_tinfo_to_string): Declare.
5568
2db9b7cd
MG
55692017-06-23 Marc Glisse <marc.glisse@inria.fr>
5570
5571 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5572
c3684b7b
MS
55732017-06-15 Martin Sebor <msebor@redhat.com>
5574
5575 PR c++/80560
5576 * c.opt (-Wclass-memaccess): New option.
5577
e72c4afd
BK
55782017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5579
5580 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5581
8a516588
MP
55822017-06-13 Marek Polacek <polacek@redhat.com>
5583
5584 PR objc/80949
5585 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5586 branches is null.
5587
45b2222a
ML
55882017-06-13 Martin Liska <mliska@suse.cz>
5589
5590 PR sanitize/78204
5591 * c-attribs.c (add_no_sanitize_value): New function.
5592 (handle_no_sanitize_attribute): Likewise.
5593 (handle_no_sanitize_address_attribute): Use the function.
5594 (handle_no_sanitize_thread_attribute): New function.
5595 (handle_no_address_safety_analysis_attribute): Use
5596 add_no_sanitize_value.
5597 (handle_no_sanitize_undefined_attribute): Likewise.
5598 * c-common.h: Declare new functions.
5599 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5600 (ubsan_instrument_shift): Likewise.
5601 (ubsan_instrument_bounds): Likewise.
5602 (ubsan_maybe_instrument_array_ref): Likewise.
5603 (ubsan_maybe_instrument_reference_or_call): Likewise.
5604
a01f151f
JM
56052017-06-11 Jason Merrill <jason@redhat.com>
5606
5607 * c-ada-spec.c, c-pragma.c: Use id_equal.
5608
3de4ac6d
MP
56092017-06-04 Marek Polacek <polacek@redhat.com>
5610
5611 PR c/80919
5612 * c-format.c (matching_type_p): Return false if any of the types
5613 requires structural equality.
5614
2474f48f
MS
56152017-06-02 Martin Sebor <msebor@redhat.com>
5616
5617 PR c/80892
5618 * c-warn.c (conversion_warning): Use -Wconversion for integer
5619 conversion and -Wfloat-conversion for floating one.
5620
40ffd95f
BE
56212017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5622
5623 * c.opt (Wsizeof-pointer-div): New warning option.
5624
3fa4634c
VR
56252017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5626
5627 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5628 (Wcatch-value=1): Enable by -Wall.
5629
f012c8ef
DM
56302017-05-30 David Malcolm <dmalcolm@redhat.com>
5631
5632 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5633 format_chars.
5634 * c.opt (fdiagnostics-show-template-tree): New option.
5635 (felide-type): New option.
5636
63dbcd13
VR
56372017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5638
5639 * c.opt (Wcatch-value=): New C++ warning flag.
5640
be136b5c
NS
56412017-05-24 Nathan Sidwell <nathan@acm.org>
5642
5643 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5644 const casts to avoid warning.
5645
3cd211af
MS
56462017-05-24 Martin Sebor <msebor@redhat.com>
5647
5648 PR c/80731
5649 * c-common.h (unsafe_conversion_p): Add a function argument.
5650 * c-common.c (unsafe_conversion_p): Same.
5651 Add type names and values to diagnostics.
5652 (scalar_to_vector): Adjust.
5653 * c-warn.c (constant_expression_error): Add a function argument.
5654 Add type names and values to diagnostics.
5655 (conversion_warning): Add a function argument.
5656 Add type names and values to diagnostics.
5657 (warnings_for_convert_and_check): Same.
5658
1ff7be5a
JM
56592017-05-19 Jason Merrill <jason@redhat.com>
5660
5661 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5662 enumerators.
5663
ff502317
BE
56642017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5665
5666 * c-format.c (locus): Move out of function scope,
5667 add GTY attribute.
5668
2a8a8d7b
NS
56692017-05-19 Nathan Sidwell <nathan@acm.org>
5670
5671 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5672 (c_common_parse_file): Remove class dump handling.
5673 (get_dump_info): Likewise.
5674
39aac208
RB
56752017-05-19 Richard Biener <rguenther@suse.de>
5676
5677 PR c++/80593
5678 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5679 to alias-set zero memory.
5680
6ecd2339
BE
56812017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5682
5683 * c-format.c (local_tree_type_node): Add GTY attribute.
5684
6574d78e
MP
56852017-05-18 Marek Polacek <polacek@redhat.com>
5686
5687 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5688 (c_common_fixed_point_type_for_size): Likewise.
5689 (c_common_type_for_mode): Likewise.
5690 (shorten_compare): Likewise.
5691 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5692 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5693
e3455240
MP
56942017-05-18 Marek Polacek <polacek@redhat.com>
5695
5696 * c-common.c (self_promoting_args_p): Change the return type to bool.
5697 Use false/true instead of 0/1.
5698 * c-common.h (self_promoting_args_p): Update.
5699
3fa8871b
MP
57002017-05-17 Marek Polacek <polacek@redhat.com>
5701
5702 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5703 * c-warn.c: Likewise.
5704
b42cc3ca
VV
57052017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5706
5707 Implement new C++ intrinsics __is_assignable and __is_constructible.
5708 * c-common.c (__is_assignable, __is_constructible): New.
5709 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5710
1a817418
ML
57112017-05-17 Martin Liska <mliska@suse.cz>
5712
5713 * c-common.h: Introduce dump_flags_t type and
5714 use it instead of int type.
5715 * c-gimplify.c (c_genericize): Likewise.
5716 * c-opts.c: Likewise.
5717
b2fa0a8b
MP
57182017-05-17 Marek Polacek <polacek@redhat.com>
5719
5720 * c-common.c (c_save_expr): Remove.
5721 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5722 * c-common.h (c_save_expr): Remove declaration.
5723
31c2d57d
VR
57242017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5725
5726 PR c/35441
5727 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5728 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5729 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5730 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5731 RDIV_EXPR.
5732 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5733
684f84de
MP
57342017-05-09 Marek Polacek <polacek@redhat.com>
5735
5736 PR c/80525
5737 * c-warn.c (unwrap_c_maybe_const): New.
5738 (warn_logical_operator): Call it.
5739
641da50a
NS
57402017-05-09 Nathan Sidwell <nathan@acm.org>
5741
5742 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5743 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5744
631238ac
MS
57452017-05-08 Martin Sebor <msebor@redhat.com>
5746
5747 PR translation/80280
5748 * c-format.h (struct format_flag_spec): Add new member.
5749 (T89_T): New macro.
5750 * c-format.c (local_tree_type_node): New global.
5751 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5752 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5753 (strfmon_flag_specs): Likewise.
5754 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5755 with distinct quoting properties.
5756 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5757 (flag_chars_t::validate): Add argument and handle bad quoting.
5758 (check_format_info_main): Handle quoting problems.
5759 (init_dynamic_diag_info): Simplify.
5760
49f0c04c
JM
57612017-05-08 Jason Merrill <jason@redhat.com>
5762
5763 * c-opts.c (c_common_post_options): Update defaults for
5764 flag_abi_version and flag_abi_compat_version.
5765
56d35585
DM
57662017-05-05 David Malcolm <dmalcolm@redhat.com>
5767
5768 * c-common.c (c_cpp_error): Replace report_diagnostic
5769 with diagnostic_report_diagnostic.
5770
0f2c4a8f
MS
57712017-05-04 Martin Sebor <msebor@redhat.com>
5772
5773 PR translation/80280
5774 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5775 (handle_weakref_attribute): Same.
5776
6fe63fb4
NS
57772017-05-03 Nathan Sidwell <nathan@acm.org>
5778
5779 Canonicalize canonical type hashing
5780 * c-common.c (complete_array_type): Use type_hash_canon.
5781
815d9cc6
XR
57822017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5783
92a285c1 5784 PR c++/80038
815d9cc6
XR
5785 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5786 prototype.
5787 (cilk_install_body_pedigree_operations): Likewise.
5788 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5789 detatched.
5790 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5791 (cilk_install_body_pedigree_operations): Likewise.
5792 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5793 unwrapping.
5794
f8a36447
JJ
57952017-04-27 Jakub Jelinek <jakub@redhat.com>
5796
5797 PR c++/80534
5798 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5799 flag on non-aggregate element types.
5800
7c145456
BE
58012017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5802
5803 * c-common.c (c_type_hasher, type_hash_table): Remove.
5804 (c_common_get_alias_set): Remove unreachable code.
5805 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5806
c3cbcd45
VR
58072017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5808
5809 * c.opt (Wextra-semi): New C++ warning flag.
5810
8a59d466
JJ
58112017-04-20 Jakub Jelinek <jakub@redhat.com>
5812
5813 PR middle-end/80423
5814 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5815
8487c9a5
JJ
58162017-04-18 Jakub Jelinek <jakub@redhat.com>
5817
5818 PR middle-end/79788
5819 PR middle-end/80375
5820 * c-common.c (c_common_type_for_mode): Don't handle
5821 widest_*_literal_type_node here.
5822 c_common_signed_or_unsigned_type): Likewise.
5823 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5824 to *intTI_type_node or *intDI_type_node depending on whether
5825 TImode is supported by the target or not.
5826
3ee0fb02
ML
58272017-04-10 Martin Liska <mliska@suse.cz>
5828
5829 PR sanitizer/80350
5830 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5831 doing an UBSAN check.
5832
5764ee3c
JW
58332017-04-03 Jonathan Wakely <jwakely@redhat.com>
5834
5835 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5836
6f3af356
JJ
58372017-03-31 Jakub Jelinek <jakub@redhat.com>
5838
5839 PR c++/79572
5840 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5841 tree *.
5842 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5843 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5844 REFERENCE_TYPE.
5845
f6a7a9d5
DM
58462017-03-31 David Malcolm <dmalcolm@redhat.com>
5847
5848 PR documentation/78732
5849 * c.opt (Wendif-labels): Fix description to refer to
5850 #else rather than #elif.
5851
af88f557
JJ
58522017-03-31 Jakub Jelinek <jakub@redhat.com>
5853
5854 PR libstdc++/80251
5855 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5856 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5857
a9e4a1a5
JJ
58582017-03-27 Jakub Jelinek <jakub@redhat.com>
5859
5860 PR middle-end/80162
5861 * c-common.c (c_common_mark_addressable_vec): Don't set
5862 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5863
3f01b620
MS
58642017-03-21 Martin Sebor <msebor@redhat.com>
5865
5866 PR c++/79548
5867 * c-common.c (set_underlying_type): Mark type used only when
5868 original del is declared unused.
5869
2f6f187a
DM
58702017-03-10 David Malcolm <dmalcolm@redhat.com>
5871
5872 PR translation/79848
5873 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5874 "%qs".
5875
a02fa805
DM
58762017-03-10 David Malcolm <dmalcolm@redhat.com>
5877
5878 PR c/79921
5879 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5880 from inform's message, so that xgettext can locate it.
5881
822a132c
MP
58822017-03-09 Marek Polacek <polacek@redhat.com>
5883
5884 PR c++/79962
5885 PR c++/79984
5886 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5887 conversion to the attribute list.
5888
bba81f1c
ML
58892017-03-09 Martin Liska <mliska@suse.cz>
5890
5891 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5892
108154ff
JM
58932017-03-03 Jason Merrill <jason@redhat.com>
5894
5895 * c.opt (Wnoexcept-type): New.
5896
eb0e7c34
RB
58972017-03-02 Richard Biener <rguenther@suse.de>
5898
5899 PR c/79756
5900 * c-common.c (c_common_mark_addressable_vec): Look through
5901 C_MAYBE_CONST_EXPR.
5902
9453ba0a
ML
59032017-02-28 Martin Liska <mliska@suse.cz>
5904
5905 * c.opt: Replace space with tabular for options of <number>
5906 type.
5907
6a825afe
ML
59082017-02-28 Martin Liska <mliska@suse.cz>
5909
5910 * c.opt: Fix --help=option -Q for options which are of
5911 an enum type.
5912
4227c9ad
JJ
59132017-02-24 Jakub Jelinek <jakub@redhat.com>
5914
5915 PR c++/79588
5916 * c-common.c (check_function_restrict): New function.
5917 (check_function_arguments): Add FNDECL argument. Call
5918 check_function_restrict if -Wrestrict.
5919 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5920 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5921 * c-common.h (check_function_arguments): Add FNDECL argument.
5922 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5923
59909673
EB
59242017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5925
5926 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5927 treatment of parameters with pointer-to-tagged type and tidy up.
5928 (print_ada_methods): Remove the special treatment of C++ static member
5929 functions.
5930
54dcd526
ML
59312017-02-22 Martin Liska <mliska@suse.cz>
5932
5933 * c.opt: Replace inequality signs with square brackets
5934 for -Wnornalized.
5935
00bc9de3
JJ
59362017-02-21 Jakub Jelinek <jakub@redhat.com>
5937
5938 PR c++/79641
5939 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
5940 preserve quals.
5941
97fcf744
JM
59422017-02-17 Joseph Myers <joseph@codesourcery.com>
5943
5944 * c-cppbuiltin.c (builtin_define_float_constants): Define
5945 __DECIMAL_DIG__ to the value for long double.
5946
c7545f1c
MP
59472017-02-15 Marek Polacek <polacek@redhat.com>
5948
5949 PR c/79515
5950 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
5951 conversion has occured.
5952
c2e84327
DM
59532017-01-24 David Malcolm <dmalcolm@redhat.com>
5954
5955 * c-common.c (c_common_reswords): Add "__RTL".
5956 * c-common.h (enum rid): Add RID_RTL.
5957
2ebd93e1
MP
59582017-01-20 Marek Polacek <polacek@redhat.com>
5959
5960 PR c/64279
5961 * c-common.h (do_warn_duplicated_branches_r): Declare.
5962 * c-gimplify.c (c_genericize): Walk the function tree calling
5963 do_warn_duplicated_branches_r.
5964 * c-warn.c (expr_from_macro_expansion_r): New.
5965 (do_warn_duplicated_branches): New.
5966 (do_warn_duplicated_branches_r): New.
5967 * c.opt (Wduplicated-branches): New option.
5968
0d80ab91
DM
59692017-01-17 David Malcolm <dmalcolm@redhat.com>
5970
5971 PR c++/71497
5972 * c-indentation.c (warn_for_misleading_indentation): Use the past
5973 subjunctive in the note.
5974
7f991c36
AH
59752017-01-17 Aldy Hernandez <aldyh@redhat.com>
5976
5977 PR c/79116
5978 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
5979 start type to integer_type.
5980
1c70261c
JJ
59812017-01-16 Jakub Jelinek <jakub@redhat.com>
5982
5983 PR driver/49726
5984 * c.opt (gen-decls): Add Driver flag.
5985
1ddca3f3
PC
59862017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5987
5988 Revert:
5989 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5990
5991 PR c++/71737
5992 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5993
7d2f3f1d
PC
59942017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
5995
5996 PR c++/71737
5997 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
5998
bce6f760
MS
59992017-01-12 Martin Sebor <msebor@redhat.com>
6000
6001 (-Wformat-overflow): ...to this.
6002
bf5fbf46
MS
60032017-01-11 Martin Sebor <msebor@redhat.com>
6004
6005 PR c/78768
6006 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6007 Also enable for LTO.
6008
e363df3f
JM
60092017-01-10 Jason Merrill <jason@redhat.com>
6010
6011 Implement P0195R2, C++17 variadic using.
6012 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6013
bd2c6270
JJ
60142017-01-09 Jakub Jelinek <jakub@redhat.com>
6015
6016 PR translation/79019
6017 PR translation/79020
6018 * c.opt (Wnormalized=): Fix typo in description.
6019
efcc8d38
MS
60202017-01-08 Martin Sebor <msebor@redhat.com>
6021
6022 PR middle-end/77708
6023 * c.opt (-Wformat-truncation): New option.
6024
ab20d992 60252017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6026
6027 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6028 value to unsigned short to fit in 4 hex digits without
6029 warnings.
6030
4e89adf9
EB
60312017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6032
6033 * c.opt (fsso-struct): Add 'native' value.
6034
cd445b54
ML
60352017-01-05 Martin Liska <mliska@suse.cz>
6036
6037 PR pch/78970
6038 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6039 header.
6040
a9342885
MP
60412017-01-04 Marek Polacek <polacek@redhat.com>
6042
6043 PR c++/64767
6044 * c.opt (Wpointer-compare): New option.
6045
fc73e60c
JJ
60462017-01-04 Jakub Jelinek <jakub@redhat.com>
6047
6048 PR driver/78957
6049 * c.opt (fsso-struct=): Add RejectNegative.
6050
cbe34bb5
JJ
60512017-01-01 Jakub Jelinek <jakub@redhat.com>
6052
6053 Update copyright years.
6054
d4a6c0ea
ML
60552016-12-29 Martin Liska <mliska@suse.cz>
6056
6057 PR c/78933
6058 * c.opt (strong-eval-order): Add RejectNegative keyword.
6059
67a5ad7c
JM
60602016-12-22 Jason Merrill <jason@redhat.com>
6061
6062 Implement P0522R0, matching of template template arguments.
6063 * c-cppbuiltin.c (c_cpp_builtins): Define
6064 __cpp_template_template_args.
6065
0dba7960
JJ
60662016-12-21 Jakub Jelinek <jakub@redhat.com>
6067
6068 PR bootstrap/78817
6069 * c-common.c (struct nonnull_arg_ctx): New type.
6070 (check_function_nonnull): Return bool instead of void. Use
6071 nonnull_arg_ctx as context rather than just location_t.
6072 (check_nonnull_arg): Adjust for the new context type, set
6073 warned_p to true if a warning has been diagnosed.
6074 (check_function_arguments): Return bool instead of void.
6075 * c-common.h (check_function_arguments): Adjust prototype.
6076
31bfc9b9
JM
60772016-12-21 Jason Merrill <jason@redhat.com>
6078
6079 * c.opt (-fnew-ttp-matching): New flag.
6080 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6081
629b3d75
MJ
60822016-12-14 Martin Jambor <mjambor@suse.cz>
6083
6084 * c-omp.c: Include omp-general.h instead of omp-low.h.
6085 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6086 name.
6087
474da67e
MS
60882016-12-14 Martin Sebor <msebor@redhat.com>
6089
6090 PR c/17308
6091 * c-common.c (check_nonnull_arg): Disable when optimization
6092 is enabled.
6093
fe366b87
MP
60942016-12-12 Marek Polacek <polacek@redhat.com>
6095
6096 PR c++/78647
6097 * c-common.c (attribute_fallthrough_p): Return false for
6098 error_mark_node.
6099
8bd9f164
MS
61002016-12-08 Martin Sebor <msebor@redhat.com>
6101
6102 PR c/78284
6103 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6104
060162e0
MS
61052016-12-08 Martin Sebor <msebor@redhat.com>
6106
6107 PR c/78165
92a285c1
ML
6108 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6109 suffix.
060162e0 6110
ee92e7ba
MS
61112016-12-07 Martin Sebor <msebor@redhat.com>
6112
6113 PR c/53562
6114 PR middle-end/77784
6115 PR middle-end/78149
6116 PR middle-end/78138
6117 * c.opt (-Wstringop-overflow): New option.
6118
84b0769e
MO
61192016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6120
6121 * c-attribs.c (asan odr indicator): New attribute.
6122 (handle_asan_odr_indicator_attribute): New function.
6123
7fa6a965
PK
61242016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6125
6126 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6127 ptrdiff_type_node;
6128
56d8ffc1
JG
61292016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6130
6131 * c-common.c (excess_precision_mode_join): New.
6132 (c_ts18661_flt_eval_method): New.
6133 (c_c11_flt_eval_method): Likewise.
6134 (c_flt_eval_method): Likewise.
6135 * c-common.h (excess_precision_mode_join): New.
6136 (c_flt_eval_method): Likewise.
6137 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6138 (cpp_iec_559_value): Call it.
6139 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6140 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6141 __FLT_EVAL_METHOD_TS_18661_3__.
6142
04f0fcf7
JG
61432016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6144
6145 * c-opts.c (c_common_post_options): Add logic to handle the default
6146 case for -fpermitted-flt-eval-methods.
6147
fb2675cb
PB
61482016-11-23 Paolo Bonzini <bonzini@gnu.org>
6149
6150 * c.opt (Wexpansion-to-defined): New.
6151
ec1c5694
JJ
61522016-11-23 Jakub Jelinek <jakub@redhat.com>
6153
6154 PR target/78451
6155 * c-pragma.c (handle_pragma_target): Don't replace
6156 current_target_pragma, but chainon the new args to the current one.
6157
730c9e75
NS
61582016-11-22 Nathan Sidwell <nathan@acm.org>
6159
6160 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6161 indentation and formatting.
730c9e75 6162
89990732
MS
61632016-11-21 Martin Sebor <msebor@redhat.com>
6164
6165 * c.opt (-fprintf-return-value): Enable by default.
6166
48330c93
BE
61672016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6168
6169 PR c++/71973
6170 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6171 * c-common.c (c_common_nodes_and_builtins): Initialize
6172 const_tm_ptr_type_node.
6173
0d939c95
MP
61742016-11-16 Marek Polacek <polacek@redhat.com>
6175
6176 PR c/78285
6177 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6178
8e745a17
JJ
61792016-11-14 Jakub Jelinek <jakub@redhat.com>
6180
6181 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6182
1ee62b92 61832016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6184 Richard Biener <rguenther@suse.de>
6185
6186 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6187 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6188 * c.opt (fgimple): New option.
1ee62b92 6189
22b15758
UB
61902016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6191
6192 PR c/35503
6193 * c-common.h (warn_for_restrict): Declare.
6194 * c-warn.c: Include gcc-rich-location.h.
6195 (warn_for_restrict): New function.
6196 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6197 (gcc_cdiag_char_table): Likewise.
6198 (gcc_cxxdiag_char_table): Likewise.
6199 * c.opt (Wrestrict): New option.
6200
4be719cd
EB
62012016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6202
6203 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6204 for nested types only if the type is a record or union and dump SLOC.
6205
4a826ca6
JM
62062016-11-09 Jason Merrill <jason@redhat.com>
6207
6208 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6209
2e955d50
JJ
62102016-11-09 Jakub Jelinek <jakub@redhat.com>
6211
6212 * c-ubsan.c (ubsan_instrument_shift): Handle split
6213 -fsanitize=shift-base and -fsanitize=shift-exponent.
6214
51dc6603
JM
62152016-11-07 Jason Merrill <jason@redhat.com>
6216
6217 * c.opt (Wc++1z-compat): New.
6218 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6219
6dc4a604
ML
62202016-11-07 Martin Liska <mliska@suse.cz>
6221
6222 * c-warn.c (warn_for_unused_label): Save all labels used
6223 in goto or in &label.
6224
b302001e
JM
62252016-11-03 Jason Merrill <jason@redhat.com>
6226
6227 * c-cppbuiltin.c (c_cpp_builtins): Correct
6228 __cpp_inheriting_constructors.
6229
31f7f784
JM
62302016-11-01 Jason Merrill <jason@redhat.com>
6231
2bc78e3c
JM
6232 * c-cppbuiltin.c (c_cpp_builtins): Update
6233 __cpp_inheriting_constructors.
6234
31f7f784
JM
6235 * c.opt (-fnew-inheriting-ctors): New.
6236 * c-opts.c: Default to on for ABI 11+.
6237
dcb466ec
JJ
62382016-10-31 Jakub Jelinek <jakub@redhat.com>
6239
6240 PR c++/77948
6241 * c.opt (fext-numeric-literals): Add Var and Init.
6242 * c-opts.c (c_common_handle_option): Don't clear
6243 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6244 (c_common_post_options): Clear it here if not set
6245 explicitly.
6246
52e1b91e
AH
62472016-10-28 Aldy Hernandez <aldyh@redhat.com>
6248
6249 PR debug/77773
6250 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6251 if NULL.
6252
e16f1cc7
JJ
62532016-10-25 Jakub Jelinek <jakub@redhat.com>
6254
6255 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6256 * c-common.c (c_common_reswords): Add __builtin_launder.
6257
f8348061
BE
62582016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6259
6260 * c-common.c (c_common_truthvalue_conversion): Warn for
6261 multiplications in boolean context. Fix the quoting of '<<' and '<'
6262 in the shift warning.
6263
eff89e01
BE
62642016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6265
6266 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6267
24bc7bf4
JM
62682016-10-20 Jason Merrill <jason@redhat.com>
6269
6270 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6271
4c712374
BE
62722016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6273
6274 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6275 integer shift ops in boolean context.
6276
62772016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6278
6279 * c.opt (Walloca): New.
6280 (Walloca-larger-than=): New.
6281 (Wvla-larger-than=): New.
6282
8fa18c06
MP
62832016-10-17 Marek Polacek <polacek@redhat.com>
6284
6285 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6286 Return immediately when finding a match.
6287 (warn_tautological_cmp): Remove a boolean variable that is no longer
6288 needed.
6289
b12b1915
MP
62902016-10-17 Marek Polacek <polacek@redhat.com>
6291
6292 * c-attribs.c: New file.
6293 * c-common.c: Move attributes handling to c-attribs.c.
6294 (get_nonnull_operand): No longer static.
6295 * c-common.h: Move the declarations from c-attribs.c to its own section.
6296
2045acd9
JM
62972016-10-14 Jason Merrill <jason@redhat.com>
6298
6299 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6300 and __cpp_deduction_guides.
6301
14a2c9aa
JM
63022016-10-13 Jason Merrill <jason@redhat.com>
6303
6304 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6305
4d0cdd0c
TP
63062016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6307
6308 * c-cppbuiltin.c: Include memmodel.h.
6309 * c-opts.c: Likewise.
6310 * c-pragma.c: Likewise.
6311 * c-warn.c: Likewise.
6312
70f6d5e1
JJ
63132016-10-12 Jakub Jelinek <jakub@redhat.com>
6314
6315 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6316 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6317 * c-opts.c (sanitize_cpp_opts): Initialize
6318 cpp_opts->cpp_warn_implicit_fallthrough.
6319
78f61294
MP
63202016-10-11 Marek Polacek <polacek@redhat.com>
6321
6322 * c-common.c (warning_candidate_p): Change the return type to bool
6323 and return true/false instead of 1/0.
6324 (vector_mode_valid_p): Likewise.
6325
038b5cc0
MP
63262016-10-11 Marek Polacek <polacek@redhat.com>
6327
6328 * c-common.c (fold_for_warn): No longer static.
6329 (bool_promoted_to_int_p): Likewise.
6330 (c_common_get_narrower): Likewise.
6331 (constant_expression_warning): Move to c-warn.c.
6332 (constant_expression_error): Likewise.
6333 (overflow_warning): Likewise.
6334 (warn_logical_operator): Likewise.
6335 (find_array_ref_with_const_idx_r): Likewise.
6336 (warn_tautological_cmp): Likewise.
6337 (expr_has_boolean_operands_p): Likewise.
6338 (warn_logical_not_parentheses): Likewise.
6339 (warn_if_unused_value): Likewise.
6340 (strict_aliasing_warning): Likewise.
6341 (sizeof_pointer_memaccess_warning): Likewise.
6342 (check_main_parameter_types): Likewise.
6343 (conversion_warning): Likewise.
6344 (warnings_for_convert_and_check): Likewise.
6345 (match_case_to_enum_1): Likewise.
6346 (match_case_to_enum): Likewise.
6347 (c_do_switch_warnings): Likewise.
6348 (warn_for_omitted_condop): Likewise.
6349 (readonly_error): Likewise.
6350 (lvalue_error): Likewise.
6351 (invalid_indirection_error): Likewise.
6352 (warn_array_subscript_with_type_char): Likewise.
6353 (warn_about_parentheses): Likewise.
6354 (warn_for_unused_label): Likewise.
6355 (warn_for_div_by_zero): Likewise.
6356 (warn_for_memset): Likewise.
6357 (warn_for_sign_compare): Likewise.
6358 (do_warn_double_promotion): Likewise.
6359 (do_warn_unused_parameter): Likewise.
6360 (record_locally_defined_typedef): Likewise.
6361 (maybe_record_typedef_use): Likewise.
6362 (maybe_warn_unused_local_typedefs): Likewise.
6363 (maybe_warn_bool_compare): Likewise.
6364 (maybe_warn_shift_overflow): Likewise.
6365 (warn_duplicated_cond_add_or_warn): Likewise.
6366 (diagnose_mismatched_attributes): Likewise.
6367 * c-common.h: Move the declarations from c-warn.c to its own section.
6368 * c-warn.c: New file.
6369
627be19f
JM
63702016-10-08 Jason Merrill <jason@redhat.com>
6371
6372 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6373 into COND_EXPR in C++.
6374
7bad794a
JJ
63752016-10-08 Jakub Jelinek <jakub@redhat.com>
6376
6377 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6378 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6379 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6380
be845b04
JJ
63812016-10-07 Jakub Jelinek <jakub@redhat.com>
6382
6383 Implement LWG2296 helper intrinsic
6384 * c-common.h (enum rid): Add RID_ADDRESSOF.
6385 * c-common.c (c_common_reswords): Add __builtin_addressof.
6386
c09c4992
BE
63872016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6388
6389 PR c++/77700
6390 * c-common.c (c_common_truthvalue_conversion): Warn also for
6391 suspicious enum values in boolean context.
6392
342cfb3e
JJ
63932016-10-06 Jakub Jelinek <jakub@redhat.com>
6394
6395 Implement P0258R2 - helper for C++17
6396 std::has_unique_object_representations trait
6397 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6398 * c-common.c (c_common_reswords): Add
6399 __has_unique_object_representations.
6400
2e69f143
JJ
64012016-10-05 Jakub Jelinek <jakub@redhat.com>
6402
6403 PR sanitizer/66343
6404 * c-ubsan.c (ubsan_instrument_return): Don't call
6405 initialize_sanitizer_builtins here.
6406
700fff34
BE
64072016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6408
6409 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6410 conditional expression in boolean context when only one arm is
6411 non-boolean.
6412
9563bfcd
JJ
64132016-10-05 Jakub Jelinek <jakub@redhat.com>
6414
04a32443
JJ
6415 PR sanitizer/77823
6416 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6417 is not integral.
6418
9563bfcd
JJ
6419 * c-common.c (c_common_reswords): Update comment for C++11.
6420
f1644724
JM
64212016-10-04 Jason Merrill <jason@redhat.com>
6422
6423 * c-common.c (make_tree_vector_from_ctor): New.
6424 * c-common.h: Declare it.
6425
5a79befb
JJ
64262016-10-04 Jakub Jelinek <jakub@redhat.com>
6427
6428 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6429 __LIBGCC_JCR_SECTION_NAME__.
6430
1633d3b9
BE
64312016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6432
6433 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6434 left shift in boolean context.
6435
a2c6e7f2
JJ
64362016-09-29 Jakub Jelinek <jakub@redhat.com>
6437
6438 Implement P0001R1 - C++17 removal of register storage class specifier
6439 * c.opt (Wregister): New warning.
6440 * c-opts.c (c_common_post_options): Enable -Wregister by
6441 default for C++17.
6442
75304c87
JG
64432016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6444
6445 * c-opts.c (c_common_post_options): Remove special case for
6446 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6447 in C++.
6448
bbfac6da
JJ
64492016-09-27 Jakub Jelinek <jakub@redhat.com>
6450
6e39060a
JJ
6451 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6452 -std=c++1z.
6453
bbfac6da
JJ
6454 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6455
e73cf9a2
TP
64562016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6457
6458 * c-common.c: Include memmodel.h.
6459
c6147dc4
MP
64602016-09-26 Marek Polacek <polacek@redhat.com>
6461
6462 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6463
81fea426
MP
64642016-09-26 Marek Polacek <polacek@redhat.com>
6465
6466 PR c/7652
6467 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6468 (handle_fallthrough_attribute): New function.
6469 (attribute_fallthrough_p): New function.
6470 * c-common.h (attribute_fallthrough_p): Declare.
6471
9a2300e9
MP
64722016-09-24 Marek Polacek <polacek@redhat.com>
6473
6474 PR c/77490
6475 * c.opt (Wbool-operation): New.
6476
a09e9e35
BE
64772016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6478
6479 * c-common.c (c_common_truthvalue_conversion): Inhibit
6480 Wint-in-bool-context warning with from_macro_definition_at.
6481 Mention the expression will always evaluate to true.
6482
d43b4ccc
MS
64832016-09-21 Martin Sebor <msebor@redhat.com>
6484
6485 PR bootstrap/77676
6486 * c.opt (fprintf-return-value): Temporarily initialize to zero
6487 to unblock bootstrap failures.
6488
2e1c20b1
JJ
64892016-09-21 Jakub Jelinek <jakub@redhat.com>
6490
6491 PR c++/77651
6492 * c.opt (Waligned-new=): Add RejectNegative.
6493 (faligned-new=): Likewise. Spelling fix - change
6494 aligned_new_threshhold to aligned_new_threshold.
6495 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6496 to aligned_new_threshold.
6497
88d0c3f0
MS
64982016-09-20 Martin Sebor <msebor@redhat.com>
6499
6500 PR middle-end/49905
6501 * c.opt: Add -Wformat-length and -fprintf-return-value.
6502
144a96e4
BE
65032016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6504
6505 PR c++/77434
6506 * c.opt (Wint-in-bool-context): New warning.
6507 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6508 constants in boolean context.
6509
63012d9a
JM
65102016-09-19 Joseph Myers <joseph@codesourcery.com>
6511
6512 * c-common.c (max_align_t_align): Also consider alignment of
6513 float128_type_node.
6514
931388ce
JM
65152016-09-15 Jason Merrill <jason@redhat.com>
6516
6517 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6518 DECL_EXTERNAL.
6519
38711381
JM
65202016-09-14 Jason Merrill <jason@redhat.com>
6521
6522 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6523 limit FIELD_DECL, either.
6524
e51fbec3
MP
65252016-09-14 Marek Polacek <polacek@redhat.com>
6526
6527 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6528 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6529 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6530
254830ba
DM
65312016-09-13 David Malcolm <dmalcolm@redhat.com>
6532
6533 * c-common.c (warn_logical_not_parentheses): Replace
6534 rich_location::add_fixit_insert calls with add_fixit_insert_before
6535 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6536
42763690
JM
65372016-09-13 Jason Merrill <jason@redhat.com>
6538 Tom de Vries <tom@codesourcery.com>
6539
6540 PR c++/77427
6541 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6542
9453eee9
JM
65432016-09-13 Jason Merrill <jason@redhat.com>
6544
6545 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6546 limit types at all.
6547
e96809e3
JM
65482016-09-12 Jason Merrill <jason@redhat.com>
6549
6550 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6551 bit/byte confusion, allow large alignment for types.
6552
54dcdb88
BE
65532016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6554
6555 PR c++/77496
6556 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6557
d1463eb9
DM
65582016-09-12 David Malcolm <dmalcolm@redhat.com>
6559
6560 PR c/72858
6561 * c-format.c (argument_parser::check_argument_type): Add params
6562 "type_start" and "conversion_char". Use the former to generate
6563 offset_to_type_start and pass it and conversion_char to
6564 check_format_types.
6565 (check_format_info_main): Capture the start of the type
6566 information as "type_start", and pass it an format_char
6567 to arg_parser.check_argument_type.
6568 (check_format_types): Provide an example in the leading comment.
6569 Add params "offset_to_type_start" and "conversion_char"; pass
6570 them to format_type_warning calls.
6571 (test_get_modifier_for_format_len): Likewise.
6572 (matching_type_p): New function.
6573 (get_format_for_type): Add param "conversion_char" and move
6574 implementation into...
6575 (get_format_for_type_1): ...new function, called twice.
6576 Use new function matching_type_p rather than checking for
6577 TYPE_CANONICAL equality.
6578 (get_corrected_substring): New function.
6579 (format_type_warning): Provide an example in the leading comment.
6580 Add params "offset_to_type_start" and "conversion_char". Replace
6581 call to get_format_for_type with call to get_corrected_substring
6582 and move rejection of hints for widths/precisions there.
6583 (assert_format_for_type_streq): Add param "conversion_char".
6584 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6585 (test_get_format_for_type_printf): Add conversion chars to the
6586 tests, adding coverage for various combinations of integer
6587 vs double conversions, and for preserving octal and hexadecimal
6588 conversions.
6589 (test_get_format_for_type_scanf): Add conversion chars to the
6590 tests.
6591
5b28efbb
TV
65922016-09-10 Tom de Vries <tom@codesourcery.com>
6593
6594 PR C/71602
6595 * c-common.c (build_va_arg): Handle more strict
6596 targetm.canonical_va_list_type. Replace first argument type error with
6597 assert.
6598
3f0177e7
MS
65992016-09-09 Martin Sebor <msebor@redhat.com>
6600
6601 PR c/77520
6602 PR c/77521
6603 * c-format.c (argument_parser::find_format_char_info): Use %qc
6604 format directive unconditionally.
6605
af63ba4b
JM
66062016-09-09 Jason Merrill <jason@redhat.com>
6607
6608 Implement C++17 new of over-aligned types.
6609 * c.opt: Add -faligned-new and -Waligned-new.
6610 * c-common.c (max_align_t_align): Split out from...
6611 (cxx_fundamental_alignment_p): ...here.
6612 * c-common.h: Declare it.
6613 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6614
c65248cb
JM
66152016-09-09 Joseph Myers <joseph@codesourcery.com>
6616
6617 * c-cppbuiltin.c (builtin_define_type_width): New function.
6618 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6619 macros.
6620
e5106e27
DM
66212016-09-07 David Malcolm <dmalcolm@redhat.com>
6622
6623 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6624 a POINTER_TYPE.
6625 (substring_loc::get_location): Move to substring-locations.c,
6626 keeping implementation as...
6627 (c_get_substring_location): New function, from the above, reworked
6628 to use accessors rather than member lookup.
6629 * c-common.h (class substring_loc): Move to substring-locations.h,
6630 replacing with a forward decl.
6631 (c_get_substring_location): New decl.
6632 * c-format.c: Include "substring-locations.h".
6633 (format_warning_va): Move to substring-locations.c.
6634 (format_warning_at_substring): Likewise.
6635
ab20d992 66362016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6637
6638 PR c/77336
6639 * c-format.c (check_function_format): Avoid issuing warnings for
6640 functions unless they call format functions with non-constant
6641 format strings.
6642
b772a565
RB
66432016-09-06 Richard Biener <rguenther@suse.de>
6644
6645 PR c/77450
6646 * c-common.c (c_common_mark_addressable_vec): Handle
6647 COMPOUND_LITERAL_EXPR.
6648
25ff5dd3
MP
66492016-09-05 Marek Polacek <polacek@redhat.com>
6650
6651 PR c/77423
6652 * c-common.c (bool_promoted_to_int_p): New function.
6653 (expr_has_boolean_operands_p): New function.
6654 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6655 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6656
21234eb5
TV
66572016-09-04 Tom de Vries <tom@codesourcery.com>
6658
6659 revert:
6660 2016-08-29 Tom de Vries <tom@codesourcery.com>
6661
6662 * c-common.c (build_va_arg): Replace first argument type error
6663 with assert.
6664
9dc5773f
JJ
66652016-09-02 Jakub Jelinek <jakub@redhat.com>
6666
6667 PR c/65467
6668 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6669 (c_finish_omp_for): Reject _Atomic qualified iterators.
6670
66712016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6672
6673 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6674 size to guarantee it fits the output of the formatted function
6675 regardless of its arguments.
6676
295844f6
MP
66772016-09-01 Marek Polacek <polacek@redhat.com>
6678
6679 PR c/7652
6680 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6681 FALLTHRU comments.
6682
3d06b6f2
MP
66832016-08-29 Marek Polacek <polacek@redhat.com>
6684
6685 PR c/77292
6686 * c-common.c (warn_logical_not_parentheses): Don't warn for
6687 a comparison or a logical operator.
6688
34cedad5
TV
66892016-08-29 Tom de Vries <tom@codesourcery.com>
6690
6691 * c-common.c (build_va_arg): Fix type comparison assert.
6692
f162d717
TV
66932016-08-29 Tom de Vries <tom@codesourcery.com>
6694
6695 * c-common.c (build_va_arg): Replace first argument type error
6696 with assert.
6697
ba9bbd6f
TV
66982016-08-29 Tom de Vries <tom@codesourcery.com>
6699
6700 PR c/77398
6701 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6702 with error_mark_node as va_list instead of with illegal va_list.
6703
ebef225f
MP
67042016-08-25 Marek Polacek <polacek@redhat.com>
6705 David Malcolm <dmalcolm@redhat.com>
6706
6707 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6708 * c-common.h (warn_logical_not_parentheses): Update declaration.
6709
b00e6e75
MP
67102016-08-22 Marek Polacek <polacek@redhat.com>
6711
6712 PR c++/77321
6713 * c-common.c (warn_for_memset): Check type for null.
6714
6dc198e3
JM
67152016-08-22 Joseph Myers <joseph@codesourcery.com>
6716
14ec014e 6717 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6718 _FloatNx types for suffixes for built-in functions.
6719
c65699ef
JM
67202016-08-19 Joseph Myers <joseph@codesourcery.com>
6721
6722 PR c/32187
6723 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6724 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6725 (RID_FLOAT128X): New enum rid values.
6726 (CASE_RID_FLOATN_NX): New macro.
6727 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6728 keywords.
6729 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6730 corresponding complex types.
6731 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6732 _FloatNx and corresponding complex types.
6733 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6734 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6735 and _FloatNx types for the widest type for determining
6736 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6737 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6738 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6739 and _FloatNx types.
6740 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6741 constants.
6742 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6743 _FloatNx types.
6744
cc015f3a
DM
67452016-08-18 David Malcolm <dmalcolm@redhat.com>
6746
6747 * c-opts.c (c_diagnostic_finalizer): Update for change to
6748 diagnostic_show_locus.
6749
cb18fd07
DM
67502016-08-18 David Malcolm <dmalcolm@redhat.com>
6751
6752 * c-common.c: Include "spellcheck.h".
6753 (cb_get_suggestion): New function.
6754 * c-common.h (cb_get_suggestion): New decl.
6755 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6756 cb_get_suggestion.
6757
a76989dc
MP
67582016-08-18 Marek Polacek <polacek@redhat.com>
6759
6760 PR c/71514
6761 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6762 and pointer-to-VLA.
6763
65e736c0
DM
67642016-08-16 David Malcolm <dmalcolm@redhat.com>
6765
6766 PR c/72857
6767 * c-common.c (substring_loc::get_range): Rename to...
6768 (substring_loc::get_location): ...this, converting param from a
6769 source_range * to a location_t *. Call
6770 get_source_location_for_substring rather than
6771 get_source_range_for_substring, and pass in m_caret_idx.
6772 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6773 (substring_loc::get_range): Replace with...
6774 (substring_loc::get_location): ...this.
6775 (substring_loc::set_caret_index): New method.
6776 (substring_loc): Add field m_caret_idx.
6777 * c-format.c (format_warning_va): Update for above changes.
6778 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6779 clashing with type name.
6780 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6781 (check_argument_type): Likewise.
6782 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6783 Use a copy when emitting warnings, setting the caret index from TYPE.
6784
7e1dde14 67852016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6786 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6787
6788 * c-ada-spec.c (dump_number): New function.
6789 (handle_escape_character): Likewise.
6790 (print_ada_macros): Add handling of constant integers and strings.
6791
191816a3
MP
67922016-08-12 Marek Polacek <polacek@redhat.com>
6793
6794 PR c/7652
6795 * c-common.c (scalar_to_vector): Adjust fall through comment.
6796 * c-opts.c (c_common_handle_option): Likewise.
6797 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6798 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6799 fall through comment.
6800 * cilk.c (extract_free_variables): Add FALLTHRU.
6801
452df4a4
JM
68022016-08-10 Jason Merrill <jason@redhat.com>
6803
6804 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6805
f3365c12
JM
68062016-08-09 Jason Merrill <jason@redhat.com>
6807
6808 * c-common.c (c_common_attribute_table): vector_size affects type
6809 identity.
6810
f0bc3323
MP
68112016-08-09 Marek Polacek <polacek@redhat.com>
6812
6813 PR c/7652
6814 * c-ada-spec.c (dump_generic_ada_node): Add return.
6815
98e5a19a
JM
68162016-08-09 Jason Merrill <jason@redhat.com>
6817
6818 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6819 C++17 constexpr lambdas.
6820
895aa8e1
DM
68212016-08-08 David Malcolm <dmalcolm@redhat.com>
6822
6823 PR c/64955
6824 * c-common.h (selftest::c_format_c_tests): New declaration.
6825 (selftest::run_c_tests): New declaration.
6826 * c-format.c: Include "selftest.h.
6827 (format_warning_va): Add param "corrected_substring" and use
6828 it to add a replacement fix-it hint.
6829 (format_warning_at_substring): Likewise.
6830 (format_warning_at_char): Update for new param of
6831 format_warning_va.
6832 (argument_parser::check_argument_type): Pass "fki" to
6833 check_format_types.
6834 (check_format_types): Add param "fki" and pass it to
6835 format_type_warning.
6836 (deref_n_times): New function.
6837 (get_modifier_for_format_len): New function.
6838 (selftest::test_get_modifier_for_format_len): New function.
6839 (get_format_for_type): New function.
6840 (format_type_warning): Add param "fki" and use it to attempt
6841 to provide hints for argument types when calling
6842 format_warning_at_substring.
6843 (selftest::get_info): New function.
6844 (selftest::assert_format_for_type_streq): New function.
6845 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6846 (selftest::test_get_format_for_type_printf): New function.
6847 (selftest::test_get_format_for_type_scanf): New function.
6848 (selftest::c_format_c_tests): New function.
6849
e52ed3fe
DM
68502016-08-08 David Malcolm <dmalcolm@redhat.com>
6851
6852 PR c/52952
6853 * c-format.c: Include "diagnostic.h".
6854 (location_column_from_byte_offset): Delete.
6855 (location_from_offset): Delete.
6856 (format_warning_va): New function.
6857 (format_warning_at_substring): New function.
6858 (format_warning_at_char): New function.
6859 (check_format_arg): Capture location of format_tree and pass to
6860 check_format_info_main.
6861 (argument_parser): Add fields "start_of_this_format" and
6862 "format_string_cst".
6863 (flag_chars_t::validate): Add param "format_string_cst". Convert
6864 warning_at call using location_from_offset to call to
6865 format_warning_at_char.
6866 (argument_parser::argument_parser): Add param "format_string_cst_"
6867 and use use it to initialize field "format_string_cst".
6868 Initialize new field "start_of_this_format".
6869 (argument_parser::read_format_flags): Convert warning_at call
6870 using location_from_offset to a call to format_warning_at_char.
6871 (argument_parser::read_any_format_left_precision): Likewise.
6872 (argument_parser::read_any_format_precision): Likewise.
6873 (argument_parser::read_any_other_modifier): Likewise.
6874 (argument_parser::find_format_char_info): Likewise, in three places.
6875 (argument_parser::parse_any_scan_set): Likewise, in one place.
6876 (argument_parser::handle_conversions): Likewise, in two places.
6877 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6878 and use it to make a substring_loc. Pass the latter to
6879 check_format_types.
6880 (check_format_info_main): Add params "fmt_param_loc" and
6881 "format_string_cst". Convert warning_at calls using
6882 location_from_offset to calls to format_warning_at_char. Pass the
6883 new params to the arg_parser ctor. Pass "format_string_cst" to
6884 flag_chars.validate. Pass "fmt_param_loc" to
6885 arg_parser.check_argument_type.
6886 (check_format_types): Convert first param from a location_t
6887 to a const substring_loc & and rename to "fmt_loc". Attempt
6888 to extract the range of the relevant parameter and pass it
6889 to format_type_warning.
6890 (format_type_warning): Convert first param from a location_t
6891 to a const substring_loc & and rename to "fmt_loc". Add
6892 params "param_range" and "type". Replace calls to warning_at
6893 with calls to format_warning_at_substring.
6894
1c4d457e
DM
68952016-08-08 David Malcolm <dmalcolm@redhat.com>
6896
6897 * c-format.c (class flag_chars_t): New class.
6898 (struct length_modifier): New struct.
6899 (class argument_parser): New class.
6900 (flag_chars_t::flag_chars_t): New ctor.
6901 (flag_chars_t::has_char_p): New method.
6902 (flag_chars_t::add_char): New method.
6903 (flag_chars_t::validate): New method.
6904 (flag_chars_t::get_alloc_flag): New method.
6905 (flag_chars_t::assignment_suppression_p): New method.
6906 (argument_parser::argument_parser): New ctor.
6907 (argument_parser::read_any_dollar): New method.
6908 (argument_parser::read_format_flags): New method.
6909 (argument_parser::read_any_format_width): New method.
6910 (argument_parser::read_any_format_left_precision): New method.
6911 (argument_parser::read_any_format_precision): New method.
6912 (argument_parser::handle_alloc_chars): New method.
6913 (argument_parser::read_any_length_modifier): New method.
6914 (argument_parser::read_any_other_modifier): New method.
6915 (argument_parser::find_format_char_info): New method.
6916 (argument_parser::validate_flag_pairs): New method.
6917 (argument_parser::give_y2k_warnings): New method.
6918 (argument_parser::parse_any_scan_set): New method.
6919 (argument_parser::handle_conversions): New method.
6920 (argument_parser::check_argument_type): New method.
6921 (check_format_info_main): Introduce classes argument_parser
6922 and flag_chars_t, moving the code within the loop into methods
6923 of these classes. Make various locals "const".
6924
88fa5555
DM
69252016-08-05 David Malcolm <dmalcolm@redhat.com>
6926
6927 * c-common.c: Include "substring-locations.h".
6928 (get_cpp_ttype_from_string_type): New function.
6929 (g_string_concat_db): New global.
6930 (substring_loc::get_range): New method.
6931 * c-common.h (g_string_concat_db): New declaration.
6932 (class substring_loc): New class.
6933 * c-lex.c (lex_string): When concatenating strings, capture the
6934 locations of all tokens using a new obstack, and record the
6935 concatenation locations within g_string_concat_db.
6936 * c-opts.c (c_common_init_options): Construct g_string_concat_db
6937 on the ggc-heap.
6938
78169471
MP
69392016-07-29 Marek Polacek <polacek@redhat.com>
6940
638fc14f
MP
6941 PR c/71926
6942 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
6943 parentheses warning.
6944
78169471
MP
6945 PR c/71574
6946 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
6947
1225d6b1
ML
69482016-07-28 Martin Liska <mliska@suse.cz>
6949
6950 PR gcov-profile/68025
6951 * c-common.c (handle_no_profile_instrument_function_attribute):
6952
ec1e2a40
BE
69532016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
6954
6955 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
6956 BITS_PER_UNIT_LOG.
6957
5ec2cd9f
JM
69582016-07-25 Jason Merrill <jason@redhat.com>
6959
6960 PR c++/65970
6961 * c.opt (fconstexpr-loop-limit): New.
6962
9dc5773f 69632016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
6964
6965 PR c++/71675
6966 * c-common.c (resolve_overloaded_builtin): Avoid converting
6967 __atomic_compare_exchange_n return type to that of what its
6968 first argument points to.
6969
e3fe09c1
UB
69702016-07-22 Uros Bizjak <ubizjak@gmail.com>
6971
6972 * c-common.c: Use HOST_WIDE_INT_M1U instead of
6973 ~(unsigned HOST_WIDE_INT) 0.
6974
bc91c436
ML
69752016-07-22 Martin Liska <mliska@suse.cz>
6976
6977 PR gcov-profile/69028
6978 PR gcov-profile/62047
6979 * cilk.c (create_cilk_helper_decl): Set location of a new decl
6980 to the current_function_decl.
6981
451dcc66
JM
69822016-07-21 Jason Merrill <jason@redhat.com>
6983
6984 PR c++/65168
6985 * c-common.c (c_common_truthvalue_conversion): Check
6986 c_inhibit_evaluation_warnings for warning about address of
6987 reference.
6988
de6a69ee
DM
69892016-07-20 David Malcolm <dmalcolm@redhat.com>
6990
6991 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
6992 const char *.
6993
d022c55a
JM
69942016-07-15 Jason Merrill <jason@redhat.com>
6995
6996 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
6997
ddbbcb19
JJ
69982016-07-15 Jakub Jelinek <jakub@redhat.com>
6999
7000 PR c/71858
7001 * c-common.h (enum lookup_name_fuzzy_kind): Add
7002 FUZZY_LOOKUP_FUNCTION_NAME.
7003
d0cf395a
JM
70042016-07-08 Jason Merrill <jason@redhat.com>
7005
7006 P0145: Refining Expression Order for C++.
7007 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7008 * c-opts.c: Adjust.
7009
98d44e93
MT
70102016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7011
7012 PR c++/71214
7013 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7014
f9d8d994
TS
70152016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7016
7017 * c-pragma.h (enum pragma_kind): Rename
7018 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7019 users.
7020
4aa83879
RB
70212016-06-29 Richard Biener <rguenther@suse.de>
7022
7023 PR middle-end/71002
7024 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7025
a25bd9e6
JM
70262016-06-24 Jason Merrill <jason@redhat.com>
7027
7028 P0145R2: Refining Expression Order for C++.
7029 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7030 MODIFY_EXPR.
7031
a86451b9
JJ
70322016-06-24 Jakub Jelinek <jakub@redhat.com>
7033
7034 * c-common.c (check_builtin_function_arguments): Require last
7035 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7036 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7037 if the last argument is pointer to enumerated or boolean type.
7038
1a4f11c8
DM
70392016-06-22 David Malcolm <dmalcolm@redhat.com>
7040
7041 PR c/70339
7042 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7043 (lookup_name_fuzzy): New prototype.
7044
fe55692c
JDA
70452016-06-21 John David Anglin <danglin@gcc.gnu.org>
7046
7047 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7048
4eb24e01
JM
70492016-06-14 Jason Merrill <jason@redhat.com>
7050
7051 P0145R2: Refining Expression Order for C++.
7052 * c.opt (fargs-in-order): New.
7053 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7054
ef7cf206
JJ
70552016-06-13 Jakub Jelinek <jakub@redhat.com>
7056
0dda258b
JJ
7057 PR sanitizer/71498
7058 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7059 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7060
ef7cf206
JJ
7061 PR preprocessor/71183
7062 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7063 to cb_get_source_date_epoch.
7064
50b15873
JJ
70652016-06-10 Jakub Jelinek <jakub@redhat.com>
7066
7067 PR c/68657
7068 * c.opt (Wpsabi): Add Warning flag.
7069
4d926e34
MS
70702016-06-10 Martin Sebor <msebor@redhat.com>
7071
7072 PR c/71392
14ec014e 7073 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7074 the nonnull attribute in type-generic builtins.
7075
e01b4e16
MS
70762016-06-09 Martin Sebor <msebor@redhat.com>
7077
7078 PR c/70883
7079 * c-common.c (builtin_function_validate_nargs): Make text of error
7080 message consistent with others like it.
7081
44a845ca
MS
70822016-06-08 Martin Sebor <msebor@redhat.com>
7083 Jakub Jelinek <jakub@redhat.com>
7084
7085 PR c++/70507
7086 PR c/68120
7087 * c-common.c (check_builtin_function_arguments): Handle
7088 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7089
a80a7051
RB
70902016-06-08 Richard Biener <rguenther@suse.de>
7091
7092 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7093
bfd67b47
RB
70942016-06-07 Richard Biener <rguenther@suse.de>
7095
7096 PR c/61564
7097 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7098 options and warn about others.
7099
15c98b2e
ES
71002016-06-01 Eduard Sanou <dhole@openmailbox.org>
7101
7102 * c-common.c (get_source_date_epoch): Rename to
7103 cb_get_source_date_epoch.
7104 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7105 message when the parsing fails. Use error_at instead of fatal_error.
7106 * c-common.h (get_source_date_epoch): Rename to
7107 cb_get_source_date_epoch.
7108 * c-common.h (cb_get_source_date_epoch): Prototype.
7109 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7110 * c-common.h (c_omp_region_type): Remove trailing comma.
7111 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7112 * c-lex.c (c_lex_with_flags): Remove initialization of
7113 pfile->source_date_epoch.
7114
00631022
JJ
71152016-05-30 Jakub Jelinek <jakub@redhat.com>
7116
7117 PR c++/71349
7118 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7119 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7120 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7121 instead of C_OMP_CLAUSE_SPLIT_FOR.
7122
f17a223d
RB
71232016-05-24 Richard Biener <rguenther@suse.de>
7124
7125 PR middle-end/70434
7126 PR c/69504
7127 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7128 (convert_vector_to_array_for_subscript): ... this.
7129 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7130 VIEW_CONVERT_EXPR to an array type. Rename to ...
7131 (convert_vector_to_array_for_subscript): ... this.
7132
4f2e1536
MP
71332016-05-12 Marek Polacek <polacek@redhat.com>
7134
7135 PR c/70756
7136 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7137 size_in_bytes and pass LOC to it.
7138
d6e83a8d
MM
71392016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7140
7141 PR c/43651
7142 * c.opt (Wduplicate-decl-specifier): New option.
7143
5c3a10fb
MP
71442016-05-11 Marek Polacek <polacek@redhat.com>
7145
7146 PR c++/71024
7147 * c-common.c (diagnose_mismatched_attributes): New function.
7148 * c-common.h (diagnose_mismatched_attributes): Declare.
7149
deef7113
MP
71502016-05-04 Marek Polacek <polacek@redhat.com>
7151
7152 * c.opt (Wdangling-else): New option.
7153
79ce98bc
MP
71542016-05-03 Marek Polacek <polacek@redhat.com>
7155
7156 PR c/70859
7157 * c-common.c (builtin_function_validate_nargs): Add location
7158 parameter. Use it.
7159 (check_builtin_function_arguments): Add location and arguments
7160 parameters. Use them.
7161 * c-common.h (check_builtin_function_arguments): Update declaration.
7162
381cdae4
RB
71632016-05-03 Richard Biener <rguenther@suse.de>
7164
7165 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7166 allow call args to gimplify to SSA names.
7167
1d793c34
MP
71682016-05-03 Marek Polacek <polacek@redhat.com>
7169
7170 * c-common.h (enum c_omp_region_type): Remove stray comma.
7171
77886428
CP
71722016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7173
7174 * c-common.h (enum c_omp_region_type): Define.
7175
697e0b28
RS
71762016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7177
7178 * c-common.c (shorten_compare): Use wi::to_wide.
7179
e7ff0319
CP
71802016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7181
7182 PR middle-end/70626
7183 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7184 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7185 reduction clauses in acc parallel loops.
7186
2fff3db8
MP
71872016-04-29 Marek Polacek <polacek@redhat.com>
7188
7189 PR c/70852
7190 * c-common.c (warn_for_memset): Check domain before accessing it.
7191
509063eb
DV
71922016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7193
7194 PR/69089
7195 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7196 "aligned" attribute.
7197
b632761d
JM
71982016-04-28 Jason Merrill <jason@redhat.com>
7199
7200 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7201
174f6622
ES
72022016-04-28 Eduard Sanou <dhole@openmailbox.org>
7203 Matthias Klose <doko@debian.org>
7204
7205 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7206 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7207 handling.
7208 * c-common.h (get_source_date_epoch): Prototype.
7209 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7210
6bc2bb18
RB
72112015-04-27 Ryan Burn <contact@rnburn.com>
7212
7213 PR c++/69024
7214 PR c++/68997
7215 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7216 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7217 external linkage.
7218 (cilk_detect_and_unwrap): Corresponding changes.
7219 (extract_free_variables): Don't extract free variables from
7220 AGGR_INIT_EXPR slot.
7221 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7222 (cilk_recognize_spawn): Likewise.
7223
c1e1f433
BS
72242016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7225
7226 * c.opt (Wmemset-elt-size): New option.
7227 * c-common.c (warn_for_memset): New function.
7228 * c-common.h (warn_for_memset): Declare.
7229
d067e05f
JM
72302016-04-25 Jason Merrill <jason@redhat.com>
7231
7232 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7233 No longer static.
7234 * c-common.h: Declare it.
7235 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7236
9aa36ae5
JM
72372016-04-22 Jason Merrill <jason@redhat.com>
7238
7239 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7240
477d4906
IV
72412016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7242
7243 PR c++/69363
7244 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7245 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7246
fe37c7af
MM
72472016-04-18 Michael Matz <matz@suse.de>
7248
7249 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7250 and SET_DECL_ALIGN.
7251
23f2660f
EB
72522016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7253
7254 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7255 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7256 to incomplete types.
7257 (dump_nested_type): Remove redundant tests and tidy up.
7258 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7259 a type which is the typedef of an original type.
7260
1e77281b
MP
72612016-04-15 Marek Polacek <polacek@redhat.com>
7262
7263 PR c/70651
7264 * c-common.c (build_va_arg): Change two asserts into errors and return
7265 error_mark_node.
7266
b3a77f21
MP
72672016-04-13 Marek Polacek <polacek@redhat.com>
7268
7269 PR c++/70639
7270 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7271 for switch statements, too.
7272
322b8466
JM
72732016-03-28 Jason Merrill <jason@redhat.com>
7274
7275 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7276
fbdb6baf
MP
72772016-03-23 Marek Polacek <polacek@redhat.com>
7278
7279 PR c++/69884
7280 * c.opt (Wignored-attributes): New option.
7281
5c240f4d
DM
72822016-03-22 David Malcolm <dmalcolm@redhat.com>
7283
7284 PR c/69993
7285 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7286 diagnostic text, reversing the order of the warning and note so
7287 that they appear in source order.
7288
14ba7b28
MP
72892016-03-17 Marek Polacek <polacek@redhat.com>
7290
7291 PR c/69407
7292 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7293 operations.
7294
08a1cadc
JM
72952016-03-14 Jason Merrill <jason@redhat.com>
7296
2aaeea19
JM
7297 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7298
08a1cadc
JM
7299 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7300
c06d25bb
RB
73012016-03-09 Richard Biener <rguenther@suse.de>
7302
7303 PR c/70143
7304 * c-common.c (strict_aliasing_warning): Add back
7305 alias_sets_conflict_p check.
7306
80aac5c8
JM
73072016-03-08 Jason Merrill <jason@redhat.com>
7308
7309 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7310
64b23c13
DM
73112016-03-04 David Malcolm <dmalcolm@redhat.com>
7312
7313 PR c/68187
7314 * c-indentation.c (get_visual_column): Move code to determine next
7315 tab stop to...
7316 (next_tab_stop): ...this new function.
7317 (line_contains_hash_if): Delete function.
7318 (detect_preprocessor_logic): Delete function.
7319 (get_first_nws_vis_column): New function.
7320 (detect_intervening_unindent): New function.
7321 (should_warn_for_misleading_indentation): Replace call to
7322 detect_preprocessor_logic with a call to
7323 detect_intervening_unindent.
7324
729526f5
DM
73252016-03-04 David Malcolm <dmalcolm@redhat.com>
7326
7327 PR c/68187
7328 * c-indentation.c (should_warn_for_misleading_indentation): When
7329 suppressing warnings about cases where the guard and body are on
7330 the same column, only use the first non-whitespace column in place
7331 of the guard token column when dealing with "else" clauses.
7332 When rejecting aligned BODY and NEXT, loosen the requirement
7333 from equality with the first non-whitespace of guard to simply
7334 that they not be indented relative to it.
7335
e9a35493
RB
73362016-03-04 Richard Biener <rguenther@suse.de>
7337
7338 PR c++/70054
7339 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7340 instead of alias_sets_conflict_p.
7341
1be56bc5
MP
73422016-03-01 Marek Polacek <polacek@redhat.com>
7343
7344 PR c++/69795
7345 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7346 any DECL.
7347
35886f0b
MS
73482016-02-22 Martin Sebor <msebor@redhat.com>
7349
7350 PR middle-end/69780
7351 * c-common.c (check_builtin_function_arguments): Validate and
7352 reject invalid arguments to __builtin_alloca_with_align.
7353
4246c8da
MW
73542016-02-20 Mark Wielaard <mjw@redhat.com>
7355
7356 PR c/28901
7357 * c.opt (Wunused-const-variable): Turn into Alias for...
7358 (Wunused-const-variable=): New option.
7359
268be88c
BE
73602016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7361
7362 PR c++/69865
7363 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7364 here...
7365 (c_common_init_options): ...to here.
7366 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7367
871b3f47
JJ
73682016-02-19 Jakub Jelinek <jakub@redhat.com>
7369
7370 PR c++/69826
7371 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7372 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7373 flag_preprocess_only.
7374
bf14eba2
JJ
73752016-02-16 Jakub Jelinek <jakub@redhat.com>
7376
7377 PR c/69835
7378 * c.opt (Wnonnull-compare): Enable for -Wall.
7379
ba6b3795
JJ
73802016-02-15 Jakub Jelinek <jakub@redhat.com>
7381
7382 PR c++/69797
7383 * c-common.c (sync_resolve_size): Diagnose too few arguments
7384 even when params is non-NULL empty vector.
7385
a011cd92
BS
73862016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7387
7388 PR target/60410
7389 * c.opt (fshort-double): Remove.
7390
46cb9332
MS
73912016-02-05 Martin Sebor <msebor@redhat.com>
7392
7393 PR c++/69662
7394 * c.opt (Warning options): Update -Wplacement-new to take
7395 an optional argument.
7396
e1b81f2b
JJ
73972016-02-01 Jakub Jelinek <jakub@redhat.com>
7398
7399 PR preprocessor/69543
7400 PR c/69558
7401 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7402 instead of loc to control_warning_option.
7403
b6adbb9f
NS
74042016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7405
7406 * c.opt (fopenacc-dim=): New option.
7407
5d70666e
RB
74082016-01-27 Ryan Burn <contact@rnburn.com>
7409
7410 PR cilkplus/69267
7411 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7412 gimplify_arg. Removed superfluous post_p argument.
7413 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7414 superfluous post_p argument.
7415 * c-gimplify.c (c_gimplify_expr): Likewise.
7416
01e1dea3
DM
74172016-01-26 David Malcolm <dmalcolm@redhat.com>
7418
7419 PR other/69006
7420 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7421 pp_newline_and_flush with pp_flush.
7422
9f04a53e
MS
74232016-01-20 Martin Sebor <msebor@redhat.com>
7424
7425 PR c/69405
7426 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7427 an incompatible argument when the argument isn't a valid tree node.
7428
7f26f7df
JM
74292016-01-18 Jason Merrill <jason@redhat.com>
7430
7431 PR c++/68767
7432 * c-common.c (check_function_arguments_recurse): Fold the whole
7433 COND_EXPR, not just the condition.
7434
f62bf092
TV
74352016-01-18 Tom de Vries <tom@codesourcery.com>
7436
7437 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7438 classify as loop clause.
7439
e0a575ff
JJ
74402016-01-15 Jakub Jelinek <jakub@redhat.com>
7441
7442 PR bootstrap/68271
7443 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7444 C++ FE no longer has limit on number of pragmas.
7445
74462015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7447
7448 PR c++/69048
7449 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7450 to add missing cleanup point.
b6e3db06 7451
c7df95d8
DM
74522016-01-14 David Malcolm <dmalcolm@redhat.com>
7453
7454 PR c++/68819
7455 * c-indentation.c (get_visual_column): Add location_t param.
7456 Handle the column number being zero by effectively disabling the
7457 warning, with an "inform".
7458 (should_warn_for_misleading_indentation): Add location_t argument
7459 for all uses of get_visual_column.
7460
21efdd80
PP
74612016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7462
7463 PR c++/69029
7464 * c-indentation.c (should_warn_for_misleading_indentation):
7465 Don't warn about do-while statements.
7466
7a127fa7
MS
74672016-01-07 Martin Sebor <msebor@redhat.com>
7468
7469 PR c/68966
7470 * c-common.c (sync_resolve_size): Reject first argument when it's
7471 a pointer to _Bool.
7472
c589e975
DM
74732016-01-05 David Malcolm <dmalcolm@redhat.com>
7474
7475 PR c/69122
7476 * c-indentation.c (get_visual_column): Remove default argument.
7477 (should_warn_for_misleading_indentation): For the multiline case,
7478 update call to get_visual_column for next_stmt_exploc so that it
7479 captures the location of the first non-whitespace character in the
7480 relevant line. Don't issue warnings if there is non-whitespace
7481 before the next statement.
7482
818ab71a
JJ
74832016-01-04 Jakub Jelinek <jakub@redhat.com>
7484
7485 Update copyright years.
7486
745e411d
DM
74872015-12-21 David Malcolm <dmalcolm@redhat.com>
7488
7489 * c-common.c (binary_op_error): Convert first param from
7490 location_t to rich_location * and use it when emitting an error.
7491 * c-common.h (binary_op_error): Convert first param from
7492 location_t to rich_location *.
7493
de67c4c3
DM
74942015-12-16 David Malcolm <dmalcolm@redhat.com>
7495
7496 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7497 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7498
4a38b02b
IV
74992015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7500
7501 * c-common.c (c_common_attribute_table): Handle "omp declare target
7502 link" attribute.
7503
54d62f51
JJ
75042015-12-14 Jakub Jelinek <jakub@redhat.com>
7505
7506 PR c/68833
7507 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7508
8d4227c8
TB
75092014-12-12 Tobias Burnus <burnus@net-b.de>
7510
7511 PR fortran/68815
7512 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7513 specifiers (%d, %i,%u and %c).
7514
f6069ccc
DM
75152015-12-10 David Malcolm <dmalcolm@redhat.com>
7516
7517 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7518
63bbf46d
JJ
75192015-12-08 Jakub Jelinek <jakub@redhat.com>
7520
7521 PR c/48088
7522 PR c/68657
7523 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7524 * c-pragma.c (handle_pragma_diagnostic): Adjust
7525 control_warning_option caller.
7526
f79520bb
DM
75272015-12-07 David Malcolm <dmalcolm@redhat.com>
7528
7529 * c-common.c (c_cpp_error): Update for change to
7530 rich_location::set_range.
7531
b3d5bc62
JJ
75322015-12-04 Paolo Bonzini <bonzini@gnu.org>
7533
7534 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7535 shifting 1 out of the sign bit.
7536
75372015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7538
7539 * c-common.c (c_common_attribute_table[]): Update max arguments
7540 count for "simd" attribute.
7541 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7542
6eb4a537
JJ
75432015-12-03 Jakub Jelinek <jakub@redhat.com>
7544
7545 PR preprocessor/57580
7546 * c-ppoutput.c (print): Change printed field to bool.
7547 Move src_file last for smaller padding.
7548 (init_pp_output): Set print.printed to false instead of 0.
7549 (scan_translation_unit): Fix up formatting. Set print.printed
7550 to true after printing something other than newline.
7551 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7552 (maybe_print_line_1): Set print.printed to false instead of 0.
7553 (print_line_1): Likewise.
7554 (do_line_change): Set print.printed to true instead of 1.
7555 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7556 dump_macro): Set print.printed to false after printing newline.
7557
4250754e
JM
75582015-12-02 Jason Merrill <jason@redhat.com>
7559
f479b43d
JM
7560 * c-common.c (fold_for_warn): New.
7561 (warn_logical_operator, warn_tautological_cmp)
7562 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7563
4250754e
JM
7564 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7565 (c_fully_fold_internal, decl_constant_value_for_optimization):
7566 Move to c/c-fold.c.
7567 * c-common.h: Don't declare decl_constant_value_for_optimization.
7568
e9e32ee6
JM
75692015-12-02 Joseph Myers <joseph@codesourcery.com>
7570
7571 PR c/68162
7572 * c-common.h (c_build_qualified_type): Add extra default
7573 arguments.
7574
37d5ad46
JB
75752015-12-01 Julian Brown <julian@codesourcery.com>
7576 Cesar Philippidis <cesar@codesourcery.com>
7577 James Norris <James_Norris@mentor.com>
7578
7579 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7580 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7581 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7582
f07862c7
EB
75832015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7584
7585 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7586 (decl_sloc_common): Delete and move bulk of processing to...
7587 (decl_sloc): ...here.
7588 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7589 (dump_ada_double_name): Remove S parameter and compute the suffix.
7590 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7591 element type and deal with an anonymous one.
7592 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7593 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7594 and remove reference to QUAL_UNION_TYPE.
7595 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7596 (dump_nested_type): ...here. New function extracted from above.
7597 Generate a full declaration for anonymous element type of arrays.
7598 (print_ada_declaration): Really skip anonymous declarations. Remove
7599 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7600 Clean up processing of declarations of array types and objects.
7601 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7602 Remove obsolete code and tidy up.
7603
75c8aac3
JH
76042015-11-29 Jan Hubicka <hubicka@ucw.cz>
7605
7606 PR c/67581
7607 * c-common.c (handle_transparent_union_attribute): Update
7608 also type variants.
7609
b58d3df2
ML
76102015-11-27 Martin Liska <mliska@suse.cz>
7611
7612 PR c++/68312
7613 * array-notation-common.c (cilkplus_extract_an_triplets):
7614 Release vector of vectors.
7615 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7616
89a01fcf
EB
76172015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7618
7619 PR c++/68527
7620 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7621 (print_ada_struct_decl): Likewise.
7622
cc5c5226
IZ
76232015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7624
7625 PR c++/68001
7626 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7627 * cilk.c (recognize_spawn): Determine location in a more precise
7628 way.
7629
269adb9d
JM
76302015-11-19 Jason Merrill <jason@redhat.com>
7631
7632 * c-common.c (shorten_compare): But look through macros from
7633 system headers.
7634
d0eccfcd
JM
76352015-11-18 Jason Merrill <jason@redhat.com>
7636
7637 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7638 non-constant operand comes from a macro.
7639
3e44547c
JM
76402015-11-17 Jason Merrill <jason@redhat.com>
7641
7642 PR bootstrap/68346
7643 * c-common.c (warn_tautological_cmp): Fold before checking for
7644 constants.
7645
0f62c7a0
MP
76462015-11-16 Marek Polacek <polacek@redhat.com>
7647
7648 PR c++/68362
7649 * c-common.c (check_case_bounds): Fold low and high cases.
7650
a868811e
MP
76512015-11-16 Marek Polacek <polacek@redhat.com>
7652
7653 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7654 * c-common.c (c_common_get_alias_set): Likewise.
7655 (handle_visibility_attribute): Likewise.
7656
fff77217
KY
76572015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7658
7659 * c-common.c (handle_simd_attribute): New.
7660 (struct attribute_spec): Add entry for "simd".
7661 (handle_simd_attribute): New.
7662
269e63b7
KT
76632015-11-13 Kai Tietz <ktietz70@googlemail.com>
7664
7665 * c-lex.c (interpret_float): Use fold_convert.
7666
ebedc9a3
DM
76672015-11-13 David Malcolm <dmalcolm@redhat.com>
7668
7669 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7670 and store it on the result.
7671 * c-opts.c (c_common_init_options): Set
7672 global_dc->colorize_source_p.
7673
6e232ba4
JN
76742015-11-12 James Norris <jnorris@codesourcery.com>
7675 Joseph Myers <joseph@codesourcery.com>
7676
7365279f 7677 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7678 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7679 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7680 PRAGMA_OACC_CLAUSE_LINK.
7681
e78bede6
MP
76822015-11-11 Marek Polacek <polacek@redhat.com>
7683
7684 PR c/68107
7685 PR c++/68266
7686 * c-common.c (valid_array_size_p): New function.
7687 * c-common.h (valid_array_size_p): Declare.
7688
3f8257db 76892015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7690
7691 PR bootstrap/68271
7692 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7693
69f293c9
AM
76942015-11-11 Andrew MacLeod <amacleod@redhat.com>
7695
7696 * array-notation-common.c: Remove unused header files.
7697 * c-ada-spec.c: Likewise.
7698 * c-cilkplus.c: Likewise.
7699 * c-common.c: Likewise.
7700 * c-cppbuiltin.c: Likewise.
7701 * c-dump.c: Likewise.
7702 * c-format.c: Likewise.
7703 * c-gimplify.c: Likewise.
7704 * c-indentation.c: Likewise.
7705 * c-lex.c: Likewise.
7706 * c-omp.c: Likewise.
7707 * c-opts.c: Likewise.
7708 * c-pch.c: Likewise.
7709 * c-ppoutput.c: Likewise.
7710 * c-pragma.c: Likewise.
7711 * c-pretty-print.c: Likewise.
7712 * c-semantics.c: Likewise.
7713 * c-ubsan.c: Likewise.
7714 * cilk.c: Likewise.
7715 * stub-objc.c: Likewise.
7716
3a40d81d
NS
77172015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7718 Cesar Philippidis <cesar@codesourcery.com>
7719 James Norris <jnorris@codesourcery.com>
7720 Julian Brown <julian@codesourcery.com>
7721 Nathan Sidwell <nathan@codesourcery.com>
7722
7723 * c-pragma.c (oacc_pragmas): Add "routine".
7724 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7725
ee45a32d
EB
77262015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7727
7728 * c-common.c (c_common_attributes): Add scalar_storage_order.
7729 (handle_scalar_storage_order_attribute): New function.
7730 * c-pragma.c (global_sso): New variable.
7731 (maybe_apply_pragma_scalar_storage_order): New function.
7732 (handle_pragma_scalar_storage_order): Likewise.
7733 (init_pragma): Register scalar_storage_order.
7734 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7735 * c.opt (Wscalar-storage-order): New warning.
7736 (fsso-struct=): New option.
7737
eb11eb15
MS
77382015-11-08 Martin Sebor <msebor@redhat.com>
7739
7740 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7741
0aad0198
RS
77422015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7743
7744 * c-common.c: Don't undef DEF_BUILTIN.
7745
8a645150
DM
77462015-11-06 David Malcolm <dmalcolm@redhat.com>
7747
7748 * c-common.c (c_cpp_error): Convert parameter from location_t to
7749 rich_location *. Eliminate the "column_override" parameter and
7750 the call to diagnostic_override_column.
7751 Update the "done_lexing" clause to set range 0
7752 on the rich_location, rather than overwriting a location_t.
7753 * c-common.h (c_cpp_error): Convert parameter from location_t to
7754 rich_location *. Eliminate the "column_override" parameter.
7755
7a5e4956
CP
77562015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7757 Thomas Schwinge <thomas@codesourcery.com>
7758 James Norris <jnorris@codesourcery.com>
7759
7760 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7761 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7762 clauses with parallel and kernels and loops.
7763 * c-pragma.h (enum pragma_omp_clause): Add entries for
7764 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7765 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7766 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7767 INDEPENDENT,SEQ}.
7768 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7769
e2f5cc96
MS
77702015-11-05 Martin Sebor <msebor@redhat.com>
7771
7772 PR c++/67942
7773 * c.opt (-Wplacement-new): New option.
7774
e01d41e5
JJ
77752015-11-05 Jakub Jelinek <jakub@redhat.com>
7776
7777 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7778 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7779 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7780 save_expr or create_tmp_var* if TEST is true.
7781 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7782 Don't call add_stmt here.
7783 (struct c_omp_check_loop_iv_data): New type.
7784 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7785 c_omp_check_loop_iv_exprs): New functions.
7786 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7787 distribute.
7788 (c_omp_declare_simd_clauses_to_numbers): Change
7789 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7790 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7791 from numbers to PARM_DECLs.
7792
595278be
MM
77932015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7794
7795 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7796 flag_checking.
7797
3f8257db 77982015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7799
7800 PR c++-common/67882
b3d5bc62
JJ
7801 * c-common.h (fold_offsetof_1): Add argument.
7802 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7803 offsetof expressions that reference elements past the end of
7804 an array.
7805
4bf9e5a8
TS
78062015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7807 Chung-Lin Tang <cltang@codesourcery.com>
7808
7809 * c-pragma.c (oacc_pragmas): Add "atomic".
7810 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7811
3b1661a9
ES
78122015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7813
7814 * c-common.c (handle_target_clones_attribute): New.
7815 (c_common_attribute_table): Add handle_target_clones_attribute.
7816 (handle_always_inline_attribute): Add check on target_clones attribute.
7817 (handle_target_attribute): Ditto.
7818
2adfab87
AM
78192015-10-29 Andrew MacLeod <amacleod@redhat.com>
7820
7821 * array-notation-common.c: Reorder #include's and remove duplicates.
7822 * c-ada-spec.c: Likewise.
7823 * c-cilkplus.c: Likewise.
7824 * c-common.c: Likewise.
7825 * c-cppbuiltin.c: Likewise.
7826 * c-dump.c: Likewise.
7827 * c-format.c: Likewise.
7828 * c-gimplify.c: Likewise.
7829 * c-indentation.c: Likewise.
7830 * c-lex.c: Likewise.
7831 * c-omp.c: Likewise.
7832 * c-opts.c: Likewise.
7833 * c-pch.c: Likewise.
7834 * c-ppoutput.c: Likewise.
7835 * c-pragma.c: Likewise.
7836 * c-pretty-print.c: Likewise.
7837 * c-semantics.c: Likewise.
7838 * c-ubsan.c: Likewise.
7839 * cilk.c: Likewise.
7840 * stub-objc.c: Likewise.
7841
d90ec4f2
JM
78422015-10-28 Jason Merrill <jason@redhat.com>
7843
7844 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7845
88bae6f4
TS
78462015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7847 James Norris <jnorris@codesourcery.com>
7848 Cesar Philippidis <cesar@codesourcery.com>
7849
7850 PR c/64765
7851 PR c/64880
7852 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7853 * c-omp.c (c_oacc_split_loop_clauses): New function.
7854
b1726d6c
MS
78552015-10-21 Martin Sebor <msebor@redhat.com>
7856
7857 PR driver/68043
7858 * c.opt: End each sentence that describes an option with a period.
7859
fa60eeb9
MP
78602015-10-20 Marek Polacek <polacek@redhat.com>
7861
7862 * array-notation-common.c (is_cilkplus_vector_p): Define.
7863 * c-common.h (is_cilkplus_vector_p): Declare.
7864
95979049
MP
78652015-10-20 Marek Polacek <polacek@redhat.com>
7866
7867 * c.opt (std=gnu++11): Do not describe as experimental.
7868 (std=gnu++14): Likewise.
7869
2a9fb712
JM
78702015-10-19 Jason Merrill <jason@redhat.com>
7871
7872 * c-cppbuiltin.c (c_cpp_builtins): Define
7873 __cpp_nontype_template_args.
7874
13b380a3
JM
78752015-10-19 Jason Merrill <jason@redhat.com>
7876
7877 * c-cppbuiltin.c (c_cpp_builtins): Define
7878 __cpp_enumerator_attributes, __cpp_fold_expressions,
7879 __cpp_unicode_characters.
7880
d9a6bd32
JJ
78812015-10-13 Jakub Jelinek <jakub@redhat.com>
7882 Aldy Hernandez <aldyh@redhat.com>
7883
7884 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7885 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7886 (c_define_builtins): Likewise.
7887 * c-common.h (enum c_omp_clause_split): Add
7888 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7889 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7890 (c_finish_omp_for): Add ORIG_DECLV argument.
7891 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7892 201511 instead of 201307.
7893 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7894 OMP_CRITICAL_CLAUSES to it.
7895 (c_finish_omp_ordered): Add CLAUSES argument, set
7896 OMP_ORDERED_CLAUSES to it.
7897 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7898 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7899 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7900 constructs and new OpenMP 4.5 clauses. Clear
7901 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7902 verification code.
7903 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7904 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7905 (enum pragma_omp_clause): Add
7906 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7907 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7908
624d31fe
RS
79092015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7910
7911 * c-lex.c (interpret_float): Use real_equal instead of
7912 REAL_VALUES_EQUAL.
7913
b8fd7909
JM
79142015-10-04 Jason Merrill <jason@redhat.com>
7915
7916 Implement N4514, C++ Extensions for Transactional Memory.
7917 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7918 (c_common_attribute_table): Add transaction_safe_dynamic.
7919 transaction_safe now affects type identity.
7920 (handle_tm_attribute): Handle transaction_safe_dynamic.
7921 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7922 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7923 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7924 (D_TRANSMEM): New.
7925 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7926 * c-pretty-print.c (pp_c_attributes_display): Don't print
7927 transaction_safe in C++.
7928
12651878
MP
79292015-10-02 Marek Polacek <polacek@redhat.com>
7930
7931 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7932
3e3b8d63
MP
79332015-10-02 Marek Polacek <polacek@redhat.com>
7934
7935 PR c/64249
7936 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
7937 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
7938 * c.opt (Wduplicated-cond): New option.
7939
0d1a8f75
JM
79402015-10-01 Joseph Myers <joseph@codesourcery.com>
7941
7942 * c.opt (std=c11): Do not describe as experimental.
7943 (std=gnu11): Likewise.
7944 (std=iso9899:2011): Likewise.
7945
3e32ee19
NS
79462015-09-28 Nathan Sidwell <nathan@codesourcery.com>
7947
7948 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
7949 (DEF_FUNCTION_TYPE_VAR_11): Delete.
7950
974348ee
MP
79512015-09-25 Marek Polacek <polacek@redhat.com>
7952
7953 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
7954 (ubsan_instrument_shift): Likewise.
7955
15dbc1a6
MP
79562015-09-25 Marek Polacek <polacek@redhat.com>
7957
7958 PR sanitizer/64906
7959 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
7960
6b95d7cc
PP
79612015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
7962
7963 * c-indentation.c (should_warn_for_misleading_indentation):
7964 Compare next_stmt_vis_column with guard_line_first_nws instead
7965 of with guard_line_vis_column.
7966
c1822f9c
MLI
79672015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
7968
7969 PR c/49654
7970 PR c/49655
7971 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
7972 options and options not valid for the current language.
7973
d5398058
PP
79742015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
7975
7976 * c-indentation.c (should_warn_for_misleading_indentation):
7977 Float out and consolidate the calls to get_visual_column that
7978 are passed guard_exploc as an argument. Compare
7979 next_stmt_vis_column with guard_line_first_nws instead of with
7980 body_line_first_nws.
7981
6b333269
NS
79822015-09-22 Nathan Sidwell <nathan@codesourcery.com>
7983
7984 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
7985 Wnamespaces): New C++ warnings.
7986
a75f1574
JM
79872015-09-22 Jason Merrill <jason@redhat.com>
7988
7989 * c-common.h (abi_compat_version_crosses): New.
7990 (warn_abi_version): Declare.
7991 * c-common.c: Define it.
7992 * c-opts.c (c_common_post_options): Handle it.
7993 flag_abi_compat_version defaults to 8.
7994
bdaaa8b7
VV
79952015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
7996
7997 Complete the implementation of N4230, Nested namespace definition.
7998 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
7999 __cpp_nested_namespace_definitions.
8000
eaa797e8
MLI
80012015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8002
8003 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8004
c4914de6
MLI
80052015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8006
8007 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8008 when warning.
8009 * c-pragma.h (pragma_lex): Add optional loc argument.
8010
fcb87c50
MM
80112015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8012
8013 * c-format.c (check_format_arg): Adjust to use common block size in all
8014 object pools.
8015
31bdd08a
DM
80162015-09-15 David Malcolm <dmalcolm@redhat.com>
8017
8018 * c-format.c (location_from_offset): Update for change in
8019 signature of location_get_source_line.
8020 * c-indentation.c (get_visual_column): Likewise.
8021 (line_contains_hash_if): Likewise.
8022
aa9f4b4c
MP
80232015-09-14 Marek Polacek <polacek@redhat.com>
8024
8025 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8026 setting various warnings.
8027
aa256c4a
MP
80282015-09-14 Marek Polacek <polacek@redhat.com>
8029
8030 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8031 a negative value.
8032
0f876f22
MW
80332015-09-11 Mark Wielaard <mjw@redhat.com>
8034
8035 PR c/28901
8036 * c.opt (Wunused-variable): Option from common.opt.
8037 (Wunused-const-variable): New option.
8038
273aa49e
PC
80392015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8040
8041 PR c++/53184
8042 * c.opt ([Wsubobject-linkage]): Add.
8043
1807ffc1
MS
80442015-09-03 Martin Sebor <msebor@redhat.com>
8045
8046 PR c/66516
8047 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8048 functions.
8049 * c-common.c (reject_gcc_builtin): Define.
8050
38942840
BI
80512015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8052
8053 PR middle-end/60586
8054 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8055 prototype.
8056 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8057 cilk_gimplify_call_params_in_spawned_fn.
8058 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8059 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8060 unwrapping.
8061
c316b5e4
MP
80622015-08-25 Marek Polacek <polacek@redhat.com>
8063
8064 PR middle-end/67330
8065 * c-common.c (handle_weak_attribute): Don't check whether the
8066 visibility can be changed here.
8067
584a7c46
MLI
80682015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8069
8070 * c-lex.c (c_lex_with_flags): Use explicit locations.
8071
a79683d5
TS
80722015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8073
8074 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8075 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8076
61717a45
FXC
80772015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8078
8079 PR middle-end/36757
8080 * c-common.c (check_builtin_function_arguments): Add check
8081 for BUILT_IN_SIGNBIT argument.
8082
329524f5
PC
80832015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8084
8085 PR c++/67160
8086 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8087 in c++1z mode.
8088
4ee55665
MP
80892015-08-17 Marek Polacek <polacek@redhat.com>
8090
8091 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8092 with whitespaces before qualifier names.
8093
b893e375
MP
80942015-08-12 Marek Polacek <polacek@redhat.com>
8095
8096 PR c++/55095
8097 * c-common.c (maybe_warn_shift_overflow): Properly handle
8098 left-shifting 1 into the sign bit.
8099
c2d89095
MLI
81002015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8101
8102 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8103
971e17ff
AS
81042015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8105 Braden Obrzut <admin@maniacsvault.net>
8106 Jason Merrill <jason@redhat.com>
8107
8108 Add C++ Concepts TS support.
8109 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8110 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8111 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8112 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8113 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8114 * c.opt (fconcepts): New.
8115
b3d5bc62
JJ
81162015-08-02 Martin Sebor <msebor@redhat.com>
8117
8118 * c.opt (-Wframe-address): New warning option.
8119
8ebca419
PP
81202015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8121
8122 * c-indentation.c (should_warn_for_misleading_indentation):
8123 Improve heuristics.
8124
1a1e101f
PP
81252015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8126
8127 * c-indentation.c (get_visual_column): Add parameter first_nws,
8128 use it. Update comment documenting the function.
8129 (is_first_nonwhitespace_on_line): Remove.
8130 (should_warn_for_misleading_indentation): Replace usage of
8131 of is_first_nonwhitespace_on_line with get_visual_column.
8132
992118a1
PP
81332015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8134
8135 * c-indentation.h (struct token_indent_info): Define.
8136 (get_token_indent_info): Define.
8137 (warn_for_misleading_information): Declare.
8138 * c-common.h (warn_for_misleading_information): Remove.
8139 * c-identation.c (warn_for_misleading_indentation):
8140 Change declaration to take three token_indent_infos. Adjust
8141 accordingly.
8142 * c-identation.c (should_warn_for_misleading_indentation):
8143 Likewise. Bail out early if the body is a compound statement.
8144 (guard_tinfo_to_string): Define.
8145
e8fa3817
JM
81462015-07-30 Jason Merrill <jason@redhat.com>
8147
8148 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8149 '*' for reference decay.
8150
173864e8
MP
81512015-07-30 Marek Polacek <polacek@redhat.com>
8152
8153 * c-common.c (warn_tautological_cmp): Bail for float types.
8154
f2afe6dd
MP
81552015-07-27 Marek Polacek <polacek@redhat.com>
8156
8157 PR bootstrap/67030
8158 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8159
05b28fd6
MP
81602015-07-27 Marek Polacek <polacek@redhat.com>
8161
8162 PR c++/66555
8163 PR c/54979
8164 * c-common.c (find_array_ref_with_const_idx_r): New function.
8165 (warn_tautological_cmp): New function.
8166 * c-common.h (warn_tautological_cmp): Declare.
8167 * c.opt (Wtautological-compare): New option.
8168
5a5062b8
MP
81692015-07-23 Marek Polacek <polacek@redhat.com>
8170
8171 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8172 (ubsan_instrument_shift): Likewise.
8173
dc891fe7
MP
81742015-07-23 Marek Polacek <polacek@redhat.com>
8175
8176 PR sanitizer/66908
8177 * c-ubsan.c: Include gimplify.h.
8178 (ubsan_instrument_division): Unshare OP0 and OP1.
8179 (ubsan_instrument_shift): Likewise.
8180
451b5e48
MP
81812015-07-20 Marek Polacek <polacek@redhat.com>
8182 Richard Sandiford <richard.sandiford@arm.com>
8183
8184 PR c++/55095
8185 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8186 Use EXPR_LOC_OR_LOC.
8187 (maybe_warn_shift_overflow): New function.
8188 * c-common.h (maybe_warn_shift_overflow): Declare.
8189 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8190 * c.opt (Wshift-overflow): New option.
8191
fb0b2914
ML
81922015-07-16 Martin Liska <mliska@suse.cz>
8193
8194 * c-format.c (static void check_format_info_main): Use
8195 object_allocator instead of pool_allocator.
8196 (check_format_arg): Likewise.
8197 (check_format_info_main): Likewise.
8198
903f5c23
AM
81992015-07-15 Andrew MacLeod <amacleod@redhat.com>
8200
8201 * c-opts.c: Remove multiline #include comment.
8202
026c3cfd
AH
82032015-07-12 Aldy Hernandez <aldyh@redhat.com>
8204
8205 * c-common.c: Fix double word typos.
8206
bb49ee66
EB
82072015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8208
8209 * c-ada-spec.h (cpp_operation): Revert latest change.
8210 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8211 constructors and destructors.
8212
1916bcb5
AM
82132015-07-09 Andrew MacLeod <amacleod@redhat.com>
8214
8215 * c-common.h: Adjust includes for flags.h changes.
8216 * stub-objc.c: Likewise.
026c3cfd 8217
a9dcd529
EB
82182015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8219
8220 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8221 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8222
b03b462f
JJ
82232015-07-08 Jakub Jelinek <jakub@redhat.com>
8224
8225 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8226 are to be removed, return NULL rather than original clauses list.
8227
c7131fb2
AM
82282015-07-07 Andrew MacLeod <amacleod@redhat.com>
8229
8230 * array-notation-common.c: Adjust includes.
8231 * c-ada-spec.c: Likewise.
8232 * c-cilkplus.c: Likewise.
8233 * c-common.h: Likewise.
8234 * c-cppbuiltin.c: Likewise.
8235 * c-dump.c: Likewise.
8236 * c-format.c: Likewise.
8237 * c-gimplify.c: Likewise.
8238 * c-indentation.c: Likewise.
8239 * c-lex.c: Likewise.
8240 * c-omp.c: Likewise.
8241 * c-opts.c: Likewise.
8242 * c-pch.c: Likewise.
8243 * c-ppoutput.c: Likewise.
8244 * c-pragma.c: Likewise.
8245 * c-pretty-print.c: Likewise.
8246 * c-semantics.c: Likewise.
8247 * c-ubsan.c: Likewise.
8248 * cilk.c: Likewise.
8249 * stub-objc.c: Likewise.
8250
2a7fb83f
EB
82512015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8252
8253 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8254 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8255
a03c9bf1
JM
82562015-07-01 Jason Merrill <jason@redhat.com>
8257
36a85135
JM
8258 * c-common.h (D_CXX11): Rename from D_CXX0X.
8259 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8260 * c-common.c: Adjust.
8261
e7fa68d5
JM
8262 * c-opts.c (c_common_post_options): Default to C++14.
8263
a03c9bf1
JM
8264 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8265
fe95b036
ESR
82662015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8267
8268 Implement N4197 - Adding u8 character literals
b3d5bc62 8269 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8270 CPP_CHAR.
b3d5bc62 8271 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8272 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8273 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8274 and CPP_UTF8CHAR tokens.
8275 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8276
da2e71c9
MLI
82772015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8278
8279 PR fortran/66605
8280 * c-common.c (do_warn_unused_parameter): Move here.
8281 * c-common.h (do_warn_unused_parameter): Declare.
8282
b155cfd9
MP
82832015-06-29 Marek Polacek <polacek@redhat.com>
8284
8285 PR c/66322
8286 * c-common.c (check_case_bounds): Add bool * parameter. Set
8287 OUTSIDE_RANGE_P.
8288 (c_add_case_label): Add bool * parameter. Pass it down to
8289 check_case_bounds.
8290 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8291 warning here.
8292 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8293 declarations.
8294
31521951
MP
82952015-06-27 Marek Polacek <polacek@redhat.com>
8296
8297 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8298 or VECTOR_INTEGER_TYPE_P throughout.
8299 * c-gimplify.c: Likewise.
8300
22d03525
MP
83012015-06-26 Marek Polacek <polacek@redhat.com>
8302
8303 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8304 * c-common.c (c_fully_fold_internal): Likewise.
8305 (c_alignof_expr): Likewise.
8306 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8307 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8308 * cilk.c (create_parm_list): Likewise.
22d03525 8309
af05e6e5
MP
83102015-06-26 Marek Polacek <polacek@redhat.com>
8311
8312 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8313
f0889939
AM
83142015-06-25 Andrew MacLeod <amacleod@redhat.com>
8315
8316 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8317 * c-gimplify.c: Likewise.
8318 * c-pragma.c: Likewise.
8319 * c-ubsan.c: Likewise.
8320 * cilk.c: Likewise.
8321
ca752f39
RS
83222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8323
8324 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8325 ggc_hasher.
8326
16a16ec7
AM
83272015-06-25 Andrew MacLeod <amacleod@redhat.com>
8328
8329 * cilk.c: Move calls.h after tm.h in the include chain.
8330
0ae9bd27
MP
83312015-06-25 Marek Polacek <polacek@redhat.com>
8332
8333 * array-notation-common.c: Use VAR_P throughout.
8334 * c-ada-spec.c: Likewise.
8335 * c-common.c: Likewise.
8336 * c-format.c: Likewise.
8337 * c-gimplify.c: Likewise.
8338 * c-omp.c: Likewise.
8339 * c-pragma.c: Likewise.
8340 * c-pretty-print.c: Likewise.
8341 * cilk.c: Likewise.
8342
62f9079a
MP
83432015-06-25 Marek Polacek <polacek@redhat.com>
8344
8345 * cilk.c (extract_free_variables): Use is_global_var.
8346
0fa16060
RS
83472015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8348
8349 * c-common.c: Don't include target-def.h.
8350
a68ae2e1
MP
83512015-06-23 Marek Polacek <polacek@redhat.com>
8352
8353 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8354 when comparing INTEGER_CSTs.
8355
c6a2f2d9
PMR
83562015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8357
8358 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8359 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8360 (dump_ada_template): Skip partially specialized types.
8361
6b4db501
MM
83622015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8363
8364 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8365 swapping.
8366
abb226c9
AM
83672015-06-17 Andrew MacLeod <amacleod@redhat.com>
8368
8369 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8370 * c-ada-spec.c: Likewise.
8371 * c-cilkplus.c: Likewise.
8372 * c-common.c: Likewise.
8373 * c-common.h: Likewise.
8374 * c-cppbuiltin.c: Likewise.
8375 * c-dump.c: Likewise.
8376 * c-format.c: Likewise.
8377 * c-gimplify.c: Likewise.
8378 * c-indentation.c: Likewise.
8379 * c-lex.c: Likewise.
8380 * c-omp.c: Likewise.
8381 * c-opts.c: Likewise.
8382 * c-pch.c: Likewise.
8383 * c-ppoutput.c: Likewise.
8384 * c-pragma.c: Likewise.
8385 * c-pretty-print.c: Likewise.
8386 * c-semantics.c: Likewise.
8387 * c-ubsan.c: Likewise.
8388 * cilk.c: Likewise.
8389 * stub-objc.c: Likewise.
8390
076fecad
PP
83912015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8392
8393 PR c++/65168
8394 * c-common.c (c_common_truthvalue_conversion): Warn when
8395 converting an address of a reference to a truth value.
8396
13fdf2e2
AM
83972015-06-08 Andrew MacLeod <amacleod@redhat.com>
8398
8399 * array-notation-common.c : Adjust include files.
8400 * c-ada-spec.c : Likewise.
8401 * c-cilkplus.c : Likewise.
8402 * c-common.c : Likewise.
8403 * c-common.h : Likewise.
8404 * c-cppbuiltin.c : Likewise.
8405 * c-dump.c : Likewise.
8406 * c-format.c : Likewise.
8407 * c-gimplify.c : Likewise.
8408 * c-indentation.c : Likewise.
8409 * c-lex.c : Likewise.
8410 * c-omp.c : Likewise.
8411 * c-opts.c : Likewise.
8412 * c-pch.c : Likewise.
8413 * c-ppoutput.c : Likewise.
8414 * c-pragma.c : Likewise.
8415 * c-pretty-print.c : Likewise.
8416 * c-semantics.c : Likewise.
8417 * c-ubsan.c : Likewise.
8418 * cilk.c : Likewise.
8419 * stub-objc.c : Likewise.
8420
a1661b90
MP
84212015-06-08 Marek Polacek <polacek@redhat.com>
8422
8423 PR c/66415
8424 * c-format.c (location_from_offset): Return LOC if LINE is null.
8425
d7438551
AH
84262015-06-05 Aldy Hernandez <aldyh@redhat.com>
8427
8428 * c-common.h (c_parse_final_cleanups): New prototype.
8429 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8430
b3d5bc62
JJ
84312015-06-04 Sriraman Tallam <tmsriram@google.com>
8432
8433 * c-common.c (noplt): New attribute.
8434 (handle_noplt_attribute): New handler.
8435
ecb9f223
AM
84362015-06-04 Andrew MacLeod <amacleod@redhat.com>
8437
8438 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8439 * c-ada-spec.c: Likewise.
8440 * c-cilkplus.c: Likewise.
8441 * c-common.c: Likewise.
8442 * c-common.h: Likewise.
8443 * c-cppbuiltin.c: Likewise.
8444 * c-dump.c: Likewise.
8445 * c-format.c: Likewise.
8446 * c-gimplify.c: Likewise.
8447 * c-indentation.c: Likewise.
8448 * c-lex.c: Likewise.
8449 * c-omp.c: Likewise.
8450 * c-opts.c: Likewise.
8451 * c-pch.c: Likewise.
8452 * c-ppoutput.c: Likewise.
8453 * c-pragma.c: Likewise.
8454 * c-pretty-print.c: Likewise.
8455 * c-semantics.c: Likewise.
8456 * c-ubsan.c: Likewise.
8457 * cilk.c: Likewise.
8458 * stub-objc.c: Likewise.
8459
6ac48155
DM
84602015-06-02 David Malcolm <dmalcolm@redhat.com>
8461
8462 PR c/66220:
8463 * c-indentation.c (should_warn_for_misleading_indentation): Use
8464 expand_location rather than expand_location_to_spelling_point.
8465 Don't warn if the guarding statement is more indented than the
8466 next/body stmts.
8467
773ce42e
DM
84682015-06-02 David Malcolm <dmalcolm@redhat.com>
8469
8470 * c-indentation.c (warn_for_misleading_indentation): Bail out
8471 immediately if -Wmisleading-indentation isn't enabled.
8472
4fef8379
ML
84732015-06-01 Martin Liska <mliska@suse.cz>
8474
8475 * c-format.c (check_format_arg):Use new type-based pool allocator.
8476 (check_format_info_main) Likewise.
8477
1edfb384
EB
84782015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8479
8480 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8481 (has_nontrivial_methods): Likewise.
8482
9677ef52
MP
84832015-05-25 Marek Polacek <polacek@redhat.com>
8484
8485 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8486
fd5c817a
MP
84872015-05-22 Marek Polacek <polacek@redhat.com>
8488
8489 PR c/47043
8490 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8491
a2f45fe6 84922015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8493
8494 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8495 STACK_GROWS_DOWNWARD.
8496
a2f45fe6 84972015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8498
8499 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8500 STACK_GROWS_DOWNWARD rather than if it is defined.
8501
0fee2ac2 85022015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8503
0fee2ac2
MLI
8504 PR c/52952
8505 * c-format.c (location_column_from_byte_offset): New.
8506 (location_from_offset): New.
8507 (struct format_wanted_type): Add offset_loc field.
8508 (check_format_info): Move handling of location for extra arguments
8509 closer to the point of warning.
8510 (check_format_info_main): Pass the result of location_from_offset
8511 to warning_at.
8512 (format_type_warning): Pass the result of location_from_offset
8513 to warning_at.
8514
cf4ef6f7
MP
85152015-05-20 Marek Polacek <polacek@redhat.com>
8516
8517 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8518
3a65ee74
MP
85192015-05-20 Marek Polacek <polacek@redhat.com>
8520
8521 * c-ada-spec.c (dump_sloc): Use DECL_P.
8522
21b634ae
MP
85232015-05-20 Marek Polacek <polacek@redhat.com>
8524
8525 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8526 * c-common.c: Likewise.
8527
0e50b624
DM
85282015-05-19 David Malcolm <dmalcolm@redhat.com>
8529
8530 * c-common.h (fe_file_change): Strengthen param from
8531 const line_map * to const line_map_ordinary *.
8532 (pp_file_change): Likewise.
8533 * c-lex.c (fe_file_change): Likewise.
8534 (cb_define): Use linemap_check_ordinary when invoking
8535 SOURCE_LINE.
8536 (cb_undef): Likewise.
8537 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8538 invoking cb_file_change.
8539 (c_finish_options): Likewise.
8540 (push_command_line_include): Likewise.
8541 (cb_file_change): Strengthen param "new_map" from
8542 const line_map * to const line_map_ordinary *.
8543 * c-ppoutput.c (cb_define): Likewise for local "map".
8544 (pp_file_change): Likewise for param "map" and local "from".
8545
fab27f52
MM
85462015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8547
8548 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8549
2fe1d762
TV
85502015-05-18 Tom de Vries <tom@codesourcery.com>
8551
8552 * c-common.c (build_va_arg_1): New function.
8553 (build_va_arg): Add address operator to va_list operand if necessary.
8554
7a37fa90
MM
85552015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8556
8557 PR c/48956
8558 * c-common.c (int_safely_convertible_to_real_p): Define.
8559 (unsafe_conversion_p): Check conversions involving complex types.
8560 (conversion_warning): Add new warning message for conversions which
8561 discard imaginary component.
8562 * c-common.h: (enum conversion_safety): Add new enumerator for such
8563 conversions.
8564
3aa3c9fc
MP
85652015-05-14 Marek Polacek <polacek@redhat.com>
8566
8567 PR c/66066
8568 PR c/66127
8569 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8570 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8571 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8572 use it. If FOR_INT_CONST, require that all evaluated operands be
8573 INTEGER_CSTs.
8574
c3388e62
DM
85752015-05-12 David Malcolm <dmalcolm@redhat.com>
8576
8577 * c-common.h (warn_for_misleading_indentation): New prototype.
8578 * c-indentation.c: New file.
8579 * c.opt (Wmisleading-indentation): New option.
8580
c7b38fd5
TV
85812015-05-12 Tom de Vries <tom@codesourcery.com>
8582
8583 PR tree-optimization/66010
8584 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8585
381bf11e
JM
85862015-05-09 Jason Merrill <jason@redhat.com>
8587
edff0c06
JM
8588 * c-opts.c (c_common_post_options): Also clear
8589 cpp_opts->cpp_warn_cxx11_compat.
8590
129211bc
JM
8591 * c-common.h (enum cxx_dialect): Add cxx_unset.
8592 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8593 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8594
381bf11e
JM
8595 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8596 (std=gnu++0x): Mark as Undocumented.
8597 (std=gnu++1y): Add deprecated message.
8598
fe191308
JM
85992015-05-08 Jason Merrill <jason@redhat.com>
8600
765189ff
JM
8601 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8602 * c-opts.c: Adjust.
8603
fe191308
JM
8604 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8605
755e528f
MP
86062015-05-08 Marek Polacek <polacek@redhat.com>
8607
8608 PR c/64918
8609 * c.opt (Woverride-init-side-effects): New option.
8610
0173bd2a
MP
86112015-05-07 Marek Polacek <polacek@redhat.com>
8612
8613 PR c/65179
8614 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8615 negative value.
8616 * c.opt (Wshift-negative-value): New option.
8617 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8618 when -Wextra and C99/C++11 mode.
8619
e0f0d3b9
MP
86202015-05-07 Marek Polacek <polacek@redhat.com>
8621 Martin Uecker <uecker@eecs.berkeley.edu>
8622
8623 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8624 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8625
8243e2a9
JM
86262015-05-05 Jason Merrill <jason@redhat.com>
8627
8628 * c.opt (Wterminate): New.
8629
577cd070
MP
86302015-04-30 Marek Polacek <polacek@redhat.com>
8631
8632 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8633 require that the non-constant be of a boolean type.
8634
0373796b
JT
86352015-04-29 Josh Triplett <josh@joshtriplett.org>
8636
e0f0d3b9
MP
8637 * c-common.c (handle_section_attribute): Refactor to reduce
8638 nesting and distinguish between error cases.
0373796b 8639
716c0ba6
MP
86402015-04-29 Marek Polacek <polacek@redhat.com>
8641
8642 PR c/64610
8643 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8644 with 0/1.
8645
8848828b
JJ
86462015-04-29 Jakub Jelinek <jakub@redhat.com>
8647
8648 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8649 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8650 HOST_BITS_PER_WIDE_INT.
8651
ecd0e562
TV
86522015-04-28 Tom de Vries <tom@codesourcery.com>
8653
8654 PR tree-optimization/65887
8655 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8656
2a877204 86572015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8658 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8659
8660 * c-ada-spec.c (in_function): Delete.
8661 (dump_generic_ada_node): Do not change in_function and remove the
8662 redundant code dealing with it.
8663 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8664 (print_ada_methods): Output the static member functions in a nested
8665 package after the regular methods as well as associated renamings.
8666
4853031e
MP
86672015-04-24 Marek Polacek <polacek@redhat.com>
8668
8669 PR c/65830
8670 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8671 and OPT_Wshift_count_overflow.
8672
8c2b7f79
MP
8673 PR c/63357
8674 * c-common.c (warn_logical_operator): Warn if the operands have the
8675 same expressions.
8676
b8787813
MP
86772015-04-24 Marek Polacek <polacek@redhat.com>
8678
8679 PR c/61534
8680 * c-common.c (warn_logical_operator): Bail if either operand comes
8681 from a macro expansion.
8682
8fba1830
BRF
86832015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8684
8685 PR target/55143
8686 * c-common.c (c_default_pointer_mode): Add definition.
8687 * c-common.h (c_default_pointer_mode): Add declaration.
8688
17958621
JJ
86892015-03-11 Jakub Jelinek <jakub@redhat.com>
8690
8691 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8692 on record_builtin_type argument.
8693
7ccb1a11
JJ
86942015-03-10 Jakub Jelinek <jakub@redhat.com>
8695
8696 PR c/65120
8697 * c-common.c (warn_logical_not_parentheses): Don't warn for
8698 !x == 0 or !x != 0.
8699
04fd785e
MP
87002015-03-07 Marek Polacek <polacek@redhat.com>
8701
8702 PR sanitizer/65280
8703 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8704 before trying to figure out whether we have a flexible array member.
8705
a4e26206 87062015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8707 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8708
8709 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8710
0d2489f4
EB
87112015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8712
8713 PR ada/65319
8714 * c-ada-spec.c (print_destructor): Remove obsolete code.
8715
83ed54d7
EB
87162015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8717
8718 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8719 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8720 DECL_TEMPLATE_RESULT emulations.
8721 (dump_ada_template)): Add guard for TYPE_METHODS.
8722
7631f0e2
MP
87232015-02-27 Marek Polacek <polacek@redhat.com>
8724
8725 PR c/65040
8726 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8727
d1783ae5
KT
87282015-02-27 Kai Tietz <ktietz@redhat.com>
8729
8730 PR c/35330
8731 * c-pragma.c (handle_pragma_weak): Do not try to create
8732 weak/alias of declarations not being function, or variable
8733 declarations.
8734
56a9f6bc
TS
87352015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8736
8737 PR libgomp/64625
8738 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8739 Remove macros.
8740 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8741
3d5cb23d
MP
87422015-02-16 Marek Polacek <polacek@redhat.com>
8743
8744 PR c/65066
8745 * c-format.c (check_format_types): Handle null param.
8746
fa008882
MP
87472015-02-13 Marek Polacek <polacek@redhat.com>
8748
8749 PR c/65040
8750 * c-format.c (check_format_types): Don't warn about different
8751 signedness if the original value is in the range of WANTED_TYPE.
8752
785f21af
JM
87532015-02-12 Jason Merrill <jason@redhat.com>
8754
8755 PR c++/64956
8756 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8757 to the current highest version.
8758 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8759
4886ec8e
JJ
87602015-02-04 Jakub Jelinek <jakub@redhat.com>
8761
8762 PR c/64824
8763 PR c/64868
8764 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8765 instead of RDIV_EXPR. Use build_binary_op instead of
8766 build2_loc.
8767
40fecdd6
JM
87682015-01-30 Joseph Myers <joseph@codesourcery.com>
8769
8770 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8771 to pass input_location as first argument.
8772
a0c88d06
TV
87732015-01-23 Tom de Vries <tom@codesourcery.com>
8774
8775 PR libgomp/64672
8776 * c.opt (fopenacc): Mark as LTO option.
8777
1506ae0e
TV
87782015-01-23 Tom de Vries <tom@codesourcery.com>
8779
8780 PR libgomp/64707
8781 * c.opt (fopenmp): Mark as LTO option.
8782
31be63ab
JJ
87832015-01-21 Jakub Jelinek <jakub@redhat.com>
8784
8785 PR c/63307
b1726d6c 8786 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8787 (compare_decls): Fix up formatting.
8788
87892015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8790
8791 PR c/63307
8792 * cilk.c: Include vec.h.
8793 (struct cilk_decls): New structure.
8794 (wrapper_parm_cb): Split this function to...
8795 (fill_decls_vec): ...this...
8796 (create_parm_list): ...and this.
8797 (compare_decls): New function.
8798 (for_local_cb): Remove.
8799 (wrapper_local_cb): Ditto.
8800 (build_wrapper_type): For now first traverse and fill vector of
8801 declarations then sort it and then deal with sorted vector.
8802 (cilk_outline): Ditto.
8803 (declare_one_free_variable): Ditto.
8804
6875457f
JM
88052015-01-21 Jason Merrill <jason@redhat.com>
8806
8807 PR c++/64629
8808 * c-format.c (check_format_arg): Call decl_constant_value.
8809
185c9e56
ML
88102015-01-19 Martin Liska <mliska@suse.cz>
8811
8812 * c-common.c (handle_noicf_attribute): New function.
8813
41dbbb37
TS
88142015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8815 Bernd Schmidt <bernds@codesourcery.com>
8816 James Norris <jnorris@codesourcery.com>
8817 Cesar Philippidis <cesar@codesourcery.com>
8818 Ilmir Usmanov <i.usmanov@samsung.com>
8819 Jakub Jelinek <jakub@redhat.com>
8820
8821 * c.opt (fopenacc): New option.
8822 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8823 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8824 New macros.
8825 * c-common.h (c_finish_oacc_wait): New prototype.
8826 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8827 (c_finish_oacc_wait): New function.
8828 * c-pragma.c (oacc_pragmas): New variable.
8829 (c_pp_lookup_pragma, init_pragma): Handle it.
8830 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8831 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8832 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8833 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8834 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8835 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8836 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8837 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8838 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8839 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8840 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8841 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8842 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8843 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8844 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8845 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8846 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8847 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8848 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8849 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8850 PRAGMA_OACC_CLAUSE_WORKER.
8851
3f8257db 88522015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8853
8854 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8855 for the new option fstack-protector_explicit.
8856 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8857 (handle_stack_protect_attribute): New function.
8858
3f8257db 88592015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8860
8861 * c.opt: New option -Warray-bounds=.
8862
adfac8df
JJ
88632015-01-09 Michael Collison <michael.collison@linaro.org>
8864
8865 * array-notation-common.c: Include hash-set.h, machmode.h,
8866 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8867 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8868 * c-ada-spec.c: Ditto.
8869 * c-cilkplus.c: Ditto.
8870 * c-common.c: Include input.h due to flattening of tree.h.
8871 Define macro GCC_C_COMMON_C.
8872 * c-common.h: Flatten tree.h header files into c-common.h.
8873 Remove include of tree-core.h.
8874 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8875 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8876 fold-const.h, wide-int.h, and inchash.h due to
8877 flattening of tree.h.
8878 * c-dump.c: Ditto.
8879 * c-format.c: Flatten tree.h header files into c-common.h.
8880 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8881 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8882 fold-const.h, wide-int.h, and inchash.h due to
8883 flattening of tree.h.
8884 * c-dump.c: Include hash-set.h, machmode.h,
8885 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8886 fold-const.h, wide-int.h, and inchash.h due to
8887 flattening of tree.h.
8888 * c-format.c: Include hash-set.h, machmode.h,
8889 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8890 fold-const.h, wide-int.h, inchash.h and real.h due to
8891 flattening of tree.h.
8892 * c-gimplify.c: Include hash-set.h, machmode.h,
8893 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8894 fold-const.h, wide-int.h, and inchash.h due to
8895 flattening of tree.h.
8896 * cilk.c: Ditto.
8897 * c-lex.c: Ditto.
8898 * c-omp.c: Ditto.
8899 * c-opts.c: Ditto.
8900 * c-pch.c: Ditto.
8901 * c-ppoutput.c: Ditto.
8902 * c-pragma.c: Ditto.
8903 * c-pretty-print.c: Ditto.
8904 * c-semantics.c: Ditto.
8905 * c-ubsan.c: Ditto.
8906 * stub-objc.c: Ditto.
8907
f5481fc4
JM
89082015-01-08 Jason Merrill <jason@redhat.com>
8909
8910 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8911 do_ubsan_in_current_function.
8912 (ubsan_maybe_instrument_reference_or_call): Likewise.
8913 * c-ubsan.h: Declare it.
8914
de35aa66
MS
89152015-01-08 Mike Stump <mikestump@comcast.net>
8916
8917 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8918
4a9a42ab
MP
89192015-01-07 Marek Polacek <polacek@redhat.com>
8920
8921 PR c/64440
8922 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8923 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8924
2f42e5de
TS
89252015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8926
8927 PR c++/31397
8928 * c.opt (Wsuggest-override): New option.
8929
5624e564
JJ
89302015-01-05 Jakub Jelinek <jakub@redhat.com>
8931
8932 Update copyright years.
8933
5bd012f8
MP
89342015-01-05 Marek Polacek <polacek@redhat.com>
8935
8936 PR c/64423
8937 * c-common.c (warn_array_subscript_with_type_char): Add location_t
8938 parameter. Use it.
8939 * c-common.h (warn_array_subscript_with_type_char): Update
8940 declaration.
8941
a7fa8d18
ESR
89422014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
8943
8944 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
8945 Control macro with flag_sized_deallocation.
8946
3f8257db 89472014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
8948
8949 * c.opt (Wdiscarded-array-qualifiers): New option.
8950
1f8d3e84
JJ
89512014-12-19 Jakub Jelinek <jakub@redhat.com>
8952
8953 PR preprocessor/63831
8954 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
8955 and __has_cpp_attribute here.
8956 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
8957 c_common_has_attribute.
8958 * c-common.h (c_common_has_attribute): New prototype.
8959 * c-lex.c (init_c_lex): Set cb->has_attribute to
8960 c_common_has_attribute instead of cb_has_attribute.
8961 (get_token_no_padding): New function.
8962 (cb_has_attribute): Renamed to ...
8963 (c_common_has_attribute): ... this. No longer static. Use
8964 get_token_no_padding, require ()s, don't build TREE_LIST
8965 unnecessarily, fix up formatting, adjust diagnostics, call
8966 init_attributes.
8967
20b06add
JM
89682014-12-15 Jason Merrill <jason@redhat.com>
8969
8970 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
8971 (-Wsized-deallocation): New.
8972 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
8973 to on in C++14 and up.
8974
94a073b2
JM
89752014-12-11 Jason Merrill <jason@redhat.com>
8976
acaa5911
JM
8977 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
8978
94a073b2
JM
8979 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
8980 we aren't complaining about VLAs.
8981
7fb66c15
MP
89822014-12-06 Marek Polacek <polacek@redhat.com>
8983
8984 PR tree-optimization/64183
8985 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
8986 shift-expression if it is integer_type_node. Use types_compatible_p.
8987
b731b390
JJ
89882014-11-29 Jakub Jelinek <jakub@redhat.com>
8989
8990 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
8991 last argument from create_tmp_var_raw and create_tmp_var calls.
8992 * cilk.c (gimplify_cilk_spawn): Likewise.
8993 * c-omp.c (c_finish_omp_atomic): Likewise.
8994
6a4da643
MP
89952014-11-28 Marek Polacek <polacek@redhat.com>
8996
8997 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
8998 instead of unsigned_type_node.
8999
541e35a6
MP
90002014-11-28 Marek Polacek <polacek@redhat.com>
9001
9002 PR c/63862
9003 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9004 to op1_utype.
9005 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9006 expression to unsigned_type_node.
9007
dcc97066
MW
90082014-11-20 Mark Wielaard <mjw@redhat.com>
9009
9010 PR debug/38757
9011 * c-opts.c (set_std_c89): Set lang_hooks.name.
9012 (set_std_c99): Likewise.
9013 (set_std_c11): Likewise.
9014 (set_std_cxx98): Likewise.
9015 (set_std_cxx11): Likewise.
9016 (set_std_cxx14): Likewise.
9017 (set_std_cxx1z): Likewise.
9018
aa7da51a
JJ
90192014-11-21 Jakub Jelinek <jakub@redhat.com>
9020
9021 PR target/63764
9022 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9023 return type to bool.
009a3480 9024 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9025 (convert_vector_to_pointer_for_subscript): Change return type to
9026 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9027 and copy it into a TARGET_EXPR and use that instead of *vecp
9028 directly.
9029
538dd0b7
DM
90302014-11-19 David Malcolm <dmalcolm@redhat.com>
9031
9032 Merger of git branch "gimple-classes-v2-option-3".
9033 * ChangeLog.gimple-classes: New.
9034 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9035 from being just a vec<gimple> to a vec<gbind *>.
9036
c39a5e99
JJ
90372014-11-18 Jakub Jelinek <jakub@redhat.com>
9038
9039 PR sanitizer/63813
9040 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9041 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9042 get_pointer_alignment for non-pointers. Use ptype, or if it is
9043 reference type, corresponding pointer type, as type of kind
9044 argument.
9045 (ubsan_maybe_instrument_reference,
9046 ubsan_maybe_instrument_member_call): Adjust callers.
9047
8537a4a9
MP
90482014-11-15 Marek Polacek <polacek@redhat.com>
9049
9050 PR middle-end/63884
9051 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9052 for NULL fndecl.
9053 (extract_array_notation_exprs): Return for NULL node.
9054
2079956a
JM
90552014-11-12 Joseph Myers <joseph@codesourcery.com>
9056
9057 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9058 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9059
1304953e
JJ
90602014-11-12 Jakub Jelinek <jakub@redhat.com>
9061
9062 PR c/59708
9063 * c-common.c (check_builtin_function_arguments): Handle
9064 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9065
e5e44252
AK
90662014-11-10 Andi Kleen <ak@linux.intel.com>
9067
9068 PR c/60804
9069 * c-common.h (check_no_cilk): Declare.
9070 * cilk.c (get_error_location): New function.
9071 (check_no_cilk): Dito.
9072
e64b984d
AK
90732014-11-10 Andi Kleen <ak@linux.intel.com>
9074
9075 * cilk.c (recognize_spawn): Use expression location
9076 for error message.
9077
13c21655
PC
90782014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9079
9080 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9081
42fd12b1
ESR
90822014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9083
9084 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9085 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9086 (__cpp_range_based_for, __cpp_initializer_lists,
9087 __cpp_delegating_constructors, __cpp_nsdmi,
9088 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9089 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9090 __has_cpp_attribute.
9091 * c-lex.c (cb_has_attribute): New callback CPP function;
9092 (init_c_lex): Set has_attribute callback.
9093
6f450181
RB
90942014-11-04 Richard Biener <rguenther@suse.de>
9095
9096 * c-common.c (shorten_compare): Do not shorten mixed
9097 DFP and non-DFP compares.
9098
26f0e1d6
ESR
90992014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9100
9101 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9102 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9103 Commentary and rearrangement of tests.
9104 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9105 Commentary and rearrangement of tests.
ab20d992 9106 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9107 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9108
ef4bddc2
RS
91092014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9110
9111 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9112 enum from machine_mode.
9113
c582198b
AM
91142014-10-28 Andrew MacLeod <amacleod@redhat.com>
9115
adfac8df
JJ
9116 * c-common.c: Adjust include files.
9117 * c-gimplify.c: Ditto.
9118 * cilk.c: Ditto.
9119 * c-pragma.c: Ditto.
9120 * c-ubsan.c: Ditto.
c582198b 9121
60393bbc
AM
91222014-10-27 Andrew MacLeod <amacleod@redhat.com>
9123
9124 * c-gimplify.c: Adjust include files.
9125
d723bb7c
MLI
91262014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9127
9128 PR c++/53061
9129 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9130 c_common_initialize_diagnostics.
9131 * c-common.h: Likewise.
9132
90f3520e
MP
91332014-10-24 Marek Polacek <polacek@redhat.com>
9134
9135 PR c/56980
9136 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9137 print "struct"/"union"/"enum" for typedefed names.
9138
59d7607a
MP
91392014-10-23 Marek Polacek <polacek@redhat.com>
9140
9141 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9142 in unsigned type.
9143
d95a2703
JJ
91442014-10-22 Jakub Jelinek <jakub@redhat.com>
9145 Yury Gribov <y.gribov@samsung.com>
9146
9147 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9148 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9149 instead of flag_sanitize_recover as bool flag.
9150
8e6ef852
KY
91512014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9152
9153 * cilk.c: Revert previous change.
9154
948cf550
IZ
91552014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9156
9157 PR c/63307
9158 * cilk.c: Include vec.h.
9159 (struct cilk_decls): New structure.
9160 (wrapper_parm_cb): Split this function to...
9161 (fill_decls_vec): ...this...
9162 (create_parm_list): ...and this.
9163 (compare_decls): New function.
9164 (for_local_cb): Remove.
9165 (wrapper_local_cb): Ditto.
9166 (build_wrapper_type): For now first traverse and fill vector of
9167 declarations then sort it and then deal with sorted vector.
9168 (cilk_outline): Ditto.
9169 (declare_one_free_variable): Ditto.
9170
92574c7c
MP
91712014-10-17 Marek Polacek <polacek@redhat.com>
9172
9173 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9174 * c.opt (Wimplicit-int): Initialize to -1.
9175
83685514
AM
91762014-10-16 Andrew MacLeod <amacleod@redhat.com>
9177
9178 * c-pragma.c: Adjust include files.
9179 * c-semantics.c: Likewise.
9180
5b8300ea
DD
91812014-10-16 DJ Delorie <dj@redhat.com>
9182
9183 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9184 multiples of bytes.
9185
5f83e90b
JM
91862014-10-14 Jason Merrill <jason@redhat.com>
9187
9188 PR c++/63455
9189 * c-common.h (CPP_PREPARSED_EXPR): New.
9190 (N_CP_TTYPES): Adjust.
9191
d73326ca
MP
91922014-10-15 Marek Polacek <polacek@redhat.com>
9193
9194 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9195
78a7c317
DD
91962014-10-14 DJ Delorie <dj@redhat.com>
9197
9198 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9199 types, not just __int128.
9200 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9201 types, not just __int128.
9202 (cpp_atomic_builtins): Round pointer sizes up.
9203 (type_suffix): Use type precision, not specific types.
9204 * c-common.c (c_common_reswords): Remove __int128 special case.
9205 (c_common_type_for_size): Check for all __intN types, not just
9206 __int128.
9207 (c_common_type_for_mode): Likewise.
9208 (c_common_signed_or_unsigned_type): Likewise.
9209 (c_build_bitfield_integer_type): Likewise.
9210 (c_common_nodes_and_builtins): Likewise.
9211 (keyword_begins_type_specifier): Likewise.
9212 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9213 __intN variants.
9214
2a22f99c
TS
92152014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9216
9217 * c-common.c: Use hash_table instead of hashtab.
9218
2a8ef767
ESR
92192014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9220
adfac8df 9221 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9222 C++11 section.
9223
3c9aabbd
MG
92242014-10-03 Marc Glisse <marc.glisse@inria.fr>
9225
9226 PR c++/54427
9227 PR c++/57198
9228 PR c++/58845
9229 * c-common.c (warn_logical_operator): Punt for vectors.
9230
a15f7cb8
ESR
92312014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9232
9233 Implement SD-6: SG10 Feature Test Recommendations
9234 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9235 macros and the __has_header macro.
9236
8d0cf15e
JM
92372014-09-30 Jason Merrill <jason@redhat.com>
9238
dd5d5481
JM
9239 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9240 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9241 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9242
b752325e
JM
9243 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9244 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9245
8d0cf15e
JM
9246 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9247 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9248
083e891e
MP
92492014-09-24 Marek Polacek <polacek@redhat.com>
9250
9251 PR c/61405
9252 PR c/53874
9253 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9254
7861b648
AK
92552014-09-23 Andi Kleen <ak@linux.intel.com>
9256
9257 * c-common.c (handle_no_reorder_attribute): New function.
9258 (c_common_attribute_table): Add no_reorder attribute.
9259
9a79452d
JM
92602014-09-22 Joseph Myers <joseph@codesourcery.com>
9261
9262 * c-cppbuiltin.c (c_cpp_builtins): Define
9263 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9264 modes.
9265
dd69f047
JM
92662014-09-18 Joseph Myers <joseph@codesourcery.com>
9267
9268 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9269 for supported floating-point modes.
9270
737a4826
MLI
92712014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9272
9273 * c.opt (Wpsabi): Use LangEnabledBy.
9274 * c-opts.c (c_common_handle_option): Do not handle here.
9275
8cc4b7a2
JM
92762014-09-12 Joseph Myers <joseph@codesourcery.com>
9277
9278 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9279 macros for floating-point modes.
9280
179b5a55
MG
92812014-09-11 Marc Glisse <marc.glisse@inria.fr>
9282
9283 PR target/58757
9284 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9285 __*_DENORM_MIN__ without denormals.
9286
570a11fe
JJ
92872014-09-10 Jakub Jelinek <jakub@redhat.com>
9288
9289 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9290 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9291 ubsan_create_data callers.
9292 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9293 index is constant or BIT_AND_EXPR with constant mask and is
9294 small enough for the bound.
9295 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9296 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9297
b559c810
MLI
92982014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9299
9300 * c.opt: Add CppReason to various flags.
9301 (Wdate-time): Re-sort.
9302 * c-common.c: Include c-common.h earlier.
9303 (struct reason_option_codes_t): Delete.
9304 (c_option_controlling_cpp_error): Prefix global type and struct
9305 with cpp_.
9306
1ef33fd4
MLI
93072014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9308
9309 * c.opt (Wnormalized): New.
9310 (Wnormalized=): Use Enum and Reject Negative.
9311 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9312
66bb34c0
JM
93132014-09-08 Joseph Myers <joseph@codesourcery.com>
9314
9315 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9316 digits of floating-point modes if -fbuilding-libgcc.
9317
53d68b9f
JM
93182014-09-05 Joseph Myers <joseph@codesourcery.com>
9319
9320 * c-cppbuiltin.c (c_cpp_builtins): Also define
9321 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9322 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9323 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9324 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9325 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9326 __LIBGCC_STACK_GROWS_DOWNWARD__,
9327 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9328 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9329 __LIBGCC_DWARF_FRAME_REGISTERS__,
9330 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9331 __LIBGCC_STACK_POINTER_REGNUM__ and
9332 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9333 (builtin_define_with_value): Handle backslash-escaping in string
9334 macro values.
9335
f65586dc
RB
93362014-09-05 Richard Biener <rguenther@suse.de>
9337
9338 PR middle-end/63148
9339 * c-format.c (check_format_arg): Properly handle
9340 effectively signed POINTER_PLUS_EXPR offset.
9341
2b71f4a4
MLI
93422014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9343
9344 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9345 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9346 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9347 and Init.
9348 * c-opts.c (c_common_handle_option): Do not handle here.
9349 (sanitize_cpp_opts): Likewise.
9350 * c-common.c (struct reason_option_codes_t): Handle
9351 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9352
d2e4feca
MP
93532014-09-03 Marek Polacek <polacek@redhat.com>
9354
9355 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9356
9a771876
JJ
93572014-09-02 Jakub Jelinek <jakub@redhat.com>
9358 Balaji V. Iyer <balaji.v.iyer@intel.com>
9359 Igor Zamyatin <igor.zamyatin@intel.com>
9360
9361 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9362 * c-common.c (c_common_reswords): Added _Cilk_for.
9363 * c-common.h (enum rid): Added RID_CILK_FOR.
9364 (cilk_for_number_of_iterations): Add declaration.
9365 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9366 CILK_FOR.
9367 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9368 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9369
81b5d104
MLI
93702014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9371
9372 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9373 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9374 Wundef): Use CPP, Var and Init.
9375 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9376
b753b37b
MLI
93772014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9378
9379 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9380 * c-opts.c (c_common_handle_option): Do not handle here.
9381
028aee17
JM
93822014-08-25 Jason Merrill <jason@redhat.com>
9383
9384 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9385 -std=c++14 and -std=gnu++14, rather than the reverse.
9386 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9387 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9388 * c-common.h (cxx_dialect): Remove cxx1y.
9389
e4276ba5
ESR
93902014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9391
9392 * c-common.h (enum cxx_dialect): Add cxx14.
9393 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9394 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9395 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9396
a545cacd
JM
93972014-08-22 Jason Merrill <jason@redhat.com>
9398
9399 * c.opt (std=gnu++17): Fix alias.
9400
59ea0364
MP
94012014-08-22 Marek Polacek <polacek@redhat.com>
9402
9403 PR c++/62199
9404 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9405 check for vector types. Drop LHS argument.
9406 * c-common.h (warn_logical_not_parentheses): Adjust.
9407
596e808c
MLI
94082014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9409
9410 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9411 (Wmultichar): Likewise.
9412 (Wdate-time): Use C-family languages instead of Common. Use CPP
9413 and Var.
9414 * c-opts.c (c_common_handle_option): Do not handle the above
9415 options here.
9416 (sanitize_cpp_opts): Likewise.
9417
18767f65
MLI
94182014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9419
9420 PR fortran/44054
9421 * c-opts.c: Include tree-diagnostics.h.
9422 (c_diagnostic_finalizer): New.
9423 (c_common_initialize_diagnostics): Use it.
9424
b4413594
MLI
94252014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9426
9427 PR preprocessor/51303
9428 * c-common.c (struct reason_option_codes_t option_codes):
9429 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9430
43f9a13c
MLI
94312014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9432
9433 PR c/60975
9434 PR c/53063
9435 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9436 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9437 (c_common_post_options): Call init_global_opts_from_cpp.
9438 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9439
04159acf
MP
94402014-08-19 Marek Polacek <polacek@redhat.com>
9441
9442 PR c++/62153
9443 * c-common.c (maybe_warn_bool_compare): New function.
9444 * c-common.h (maybe_warn_bool_compare): Declare.
9445 * c.opt (Wbool-compare): New option.
9446
35aff4fb
MP
94472014-08-19 Marek Polacek <polacek@redhat.com>
9448
9449 * c.opt (Wc99-c11-compat): New option.
9450
177cce46
MP
94512014-08-19 Marek Polacek <polacek@redhat.com>
9452
9453 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9454 to warn_c90_c99_compat.
9455 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9456 to -1.
9457
6ae9194f
MLI
94582014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9459 Steven Bosscher <steven@gcc.gnu.org>
9460
9461 PR c/52952
9462 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9463 format_check_results.
9464 (check_function_format): Use true and add comment for boolean
9465 argument.
9466 (finish_dollar_format_checking): Use explicit location when warning.
9467 (check_format_info): Likewise.
9468 (check_format_arg): Set extra_arg_loc and format_string_loc.
9469 (check_format_info_main): Use explicit location when warning.
9470 (check_format_types): Pass explicit location.
9471 (format_type_warning): Likewise.
9472
8e54f6d3
MLI
94732014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9474
9475 PR fortran/44054
9476 * c-format.c: Handle Fortran flags.
9477
cd4e76fc
IZ
94782014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9479
9480 PR other/61962
9481 * array-notation-common.c (find_rank): Added handling for other
9482 types of references.
9483
f3bede71
MP
94842014-08-10 Marek Polacek <polacek@redhat.com>
9485
9486 PR c/51849
9487 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9488 * c.opt (Wc90-c99-compat): Add option.
9489
9f25a338
TS
94902014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9491
9492 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9493
62e4eb35
MP
94942014-08-03 Marek Polacek <polacek@redhat.com>
9495
ab20d992 9496 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9497 (c_add_case_label): Pass loc to check_case_value.
9498
b787e7a2
TS
94992014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9500
9501 * cilk.c: Use hash_map instead of pointer_map.
9502
6e2830c3
TS
95032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9504
9505 * c-gimplify.c: Use hash_set instead of pointer_set.
9506
a7ee52fb
IZ
95072014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9508
9509 PR middle-end/61455
9510 * array-notation-common.c (extract_array_notation_exprs): Handling
9511 of DECL_EXPR added.
9512
944fa280
JJ
95132014-08-01 Jakub Jelinek <jakub@redhat.com>
9514
9515 * c-common.h (min_align_of_type): Removed prototype.
9516 * c-common.c (min_align_of_type): Removed.
9517 * c-ubsan.h (ubsan_maybe_instrument_reference,
9518 ubsan_maybe_instrument_member_call): New prototypes.
9519 * c-ubsan.c: Include stor-layout.h and builtins.h.
9520 (ubsan_maybe_instrument_reference_or_call,
9521 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9522 functions.
9523
b4dfdc11
MG
95242014-07-31 Marc Glisse <marc.glisse@inria.fr>
9525
9526 PR c++/60517
9527 * c.opt (-Wreturn-local-addr): Move to common.opt.
9528
a41844e5
JM
95292014-07-30 Jason Merrill <jason@redhat.com>
9530
9531 PR c++/61659
9532 PR c++/61687
9533 Revert:
9534 * c.opt (-fuse-all-virtuals): New.
9535
976d5a22
TT
95362014-07-30 Tom Tromey <tromey@redhat.com>
9537
9538 PR c/59855
9539 * c.opt (Wdesignated-init): New option.
9540 * c-common.c (c_common_attribute_table): Add "designated_init".
9541 (handle_designated_init): New function.
9542
cdc94aca
MP
95432014-07-24 Marek Polacek <polacek@redhat.com>
9544
9545 PR c/57653
9546 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9547
f41373b6
DS
95482014-07-16 Dodji Seketeli <dodji@redhat.com>
9549
9550 PR preprocessor/60723 - missing system-ness marks for macro tokens
9551 * c-ppoutput.c (struct print::prev_was_system_token): New data
9552 member.
9553 (init_pp_output): Initialize it.
9554 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9555 (do_line_change): Return a flag saying if a line marker was
9556 emitted or not.
9557 (scan_translation_unit): Detect if the system-ness of the token we
9558 are about to emit is different from the one of the previously
9559 emitted token. If so, emit a line marker. Avoid emitting useless
9560 adjacent line markers. Avoid emitting line markers for tokens
9561 originating from the expansion of built-in macros.
9562 (scan_translation_unit_directives_only): Adjust.
9563
4d661eaa
MP
95642014-07-15 Marek Polacek <polacek@redhat.com>
9565
9566 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9567 TYPE_MAX_VALUE is NULL.
9568
b108f48f
JJ
95692014-07-14 Jakub Jelinek <jakub@redhat.com>
9570
9571 PR middle-end/61294
9572 * c.opt (Wmemset-transposed-args): New warning.
9573
c0221884
JM
95742014-07-10 Jason Merrill <jason@redhat.com>
9575
9576 PR c++/61659
9577 PR c++/61687
9578 * c.opt (-fuse-all-virtuals): New.
9579
63dfbb95
RB
95802014-07-09 Richard Biener <rguenther@suse.de>
9581
9582 PR c-family/61741
9583 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9584 using unsigned arithmetic if overflow does not wrap instead of
9585 if overflow is undefined.
9586
773ec47f
MP
95872014-07-06 Marek Polacek <polacek@redhat.com>
9588
9589 PR c/6940
9590 * c.opt (Wsizeof-array-argument): New option.
9591
00a7ba58
JJ
95922014-07-03 Jakub Jelinek <jakub@redhat.com>
9593
b1726d6c 9594 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9595 comments->count <= 1, as comments->entries might be NULL.
9596
52ec0ea3
MP
95972014-07-01 Marek Polacek <polacek@redhat.com>
9598
9599 * c.opt (Wint-conversion): New option.
9600
d5c3d343
MP
96012014-07-01 Marek Polacek <polacek@redhat.com>
9602
9603 PR c/58286
9604 * c.opt (Wincompatible-pointer-types): New option.
9605
6e7ceb17
PC
96062014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9607
9608 PR c++/51400
9609 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9610 Do not discard TYPE_QUALS of type.
9611
da73100b
JM
96122014-06-26 Jason Merrill <jason@redhat.com>
9613
9614 * c-common.h (enum cxx_dialect): Add cxx1z.
9615 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9616 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9617
08eedf75
TJ
96182014-06-26 Teresa Johnson <tejohnson@google.com>
9619
9620 * c-common.h (get_dump_info): Declare.
9621 * c-gimplify.c (c_genericize): Use saved dump files.
9622 * c-opts.c (c_common_parse_file): Begin and end dumps
9623 once around parsing invocation.
9624 (get_dump_info): New function.
9625
7b56b2f8
MP
96262014-06-23 Marek Polacek <polacek@redhat.com>
9627 Andrew MacLeod <amacleod@redhat.com>
9628
9629 PR c/61553
9630 * c-common.c (get_atomic_generic_size): Don't segfault if the
9631 type doesn't have a size.
9632
0e37a2f3
MP
96332014-06-20 Marek Polacek <polacek@redhat.com>
9634
9635 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9636 (ubsan_walk_array_refs_r): New function.
9637 (c_genericize): Instrument array bounds.
9638 * c-ubsan.c: Include "internal-fn.h".
9639 (ubsan_instrument_division): Mark instrumented arrays as having
9640 side effects. Adjust ubsan_type_descriptor call.
9641 (ubsan_instrument_shift): Likewise.
9642 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9643 (ubsan_instrument_bounds): New function.
9644 (ubsan_array_ref_instrumented_p): New function.
9645 (ubsan_maybe_instrument_array_ref): New function.
9646 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9647 (ubsan_array_ref_instrumented_p): Declare.
9648 (ubsan_maybe_instrument_array_ref): Declare.
9649
96502014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9651
9652 PR lto/61123
9653 * c.opt (fshort-enums): Add to LTO.
9654 * c.opt (fshort-wchar): Likewise.
9655
5c3d09f7
MP
96562014-06-16 Marek Polacek <polacek@redhat.com>
9657
9658 PR c/60439
9659 * c.opt (Wswitch-bool): Add Var.
9660
9cf32741
JJ
96612014-06-12 Jakub Jelinek <jakub@redhat.com>
9662
9663 PR middle-end/61486
9664 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9665 #pragma omp target teams or
9666 #pragma omp {,target }teams distribute simd.
9667
62984918
JM
96682014-06-12 Jason Merrill <jason@redhat.com>
9669
9670 * c.opt (Wabi=, fabi-compat-version): New.
9671 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9672 (c_common_post_options): Handle flag_abi_compat_version default.
9673 Disallow -fabi-compat-version=1.
9674 * c-common.h (abi_version_crosses): New.
9675
f961457f
JH
96762014-06-11 Jan Hubicka <hubicka@ucw.cz>
9677
adfac8df 9678 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9679 section names that are no longer trees.
9680
92d28cbb
JJ
96812014-06-10 Jakub Jelinek <jakub@redhat.com>
9682
9683 PR fortran/60928
9684 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9685 (omp_pragmas): ... back here.
9686
742938c9
MP
96872014-06-05 Marek Polacek <polacek@redhat.com>
9688
9689 PR c/49706
9690 * c-common.c (warn_logical_not_parentheses): New function.
9691 * c-common.h (warn_logical_not_parentheses): Declare.
9692 * c.opt (Wlogical-not-parentheses): New option.
9693
9d548dfb
MP
96942014-06-04 Marek Polacek <polacek@redhat.com>
9695
9696 PR c/30020
9697 * c-common.c (check_case_bounds): Add location parameter.
9698 Use it.
9699 (c_add_case_label): Pass loc to check_case_bounds.
9700
fedfecef
MP
97012014-06-03 Marek Polacek <polacek@redhat.com>
9702
9703 PR c/60439
9704 * c.opt (Wswitch-bool): New option.
9705
f6a7cffc
TS
97062014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9707
040d18b6
TS
9708 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9709 Remove prototypes.
9710 (record_types_used_by_current_var_decl): Move prototype to where
9711 it belongs.
9712
f6a7cffc
TS
9713 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9714 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9715 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9716
632f2871
RS
97172014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9718
9719 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9720 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9721 void_zero_node.
9722 * c-pretty-print.c (pp_c_void_constant): New function.
9723 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9724 (c_pretty_printer::expression): Handle VOID_CST.
9725 * cilk.c (extract_free_variables): Likewise.
9726 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9727 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9728
766090c2
TS
97292014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9730
9731 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9732 * c-pragma.c (push_alignment): Adjust.
9733 (handle_pragma_push_options): Likewise.
9734
661a0813
MP
97352014-05-09 Marek Polacek <polacek@redhat.com>
9736
9737 PR c/50459
9738 * c-common.c (check_user_alignment): Return -1 if alignment is error
9739 node.
9740 (handle_aligned_attribute): Don't call default_conversion on
9741 FUNCTION_DECLs.
9742 (handle_vector_size_attribute): Likewise.
9743 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9744 (handle_sentinel_attribute): Call default_conversion and allow even
9745 integral types as an argument.
9746
2793eeab
MP
97472014-05-08 Marek Polacek <polacek@redhat.com>
9748
9749 PR c/61053
9750 * c-common.c (min_align_of_type): New function factored out from...
9751 (c_sizeof_or_alignof_type): ...here.
9752 * c-common.h (min_align_of_type): Declare.
9753
f827930a
MP
97542014-05-08 Marek Polacek <polacek@redhat.com>
9755
9756 PR c/61077
9757 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9758 parameter type of main.
9759
ca49b74e
DD
97602014-05-07 DJ Delorie <dj@redhat.com>
9761
9762 * c-cppbuiltin.c (print_bits_of_hex): New.
9763 (builtin_define_type_minmax): Print values using hex so as not to
9764 require a pre-computed list of string values.
9765
1d60af08
KZ
97662014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9767 Mike Stump <mikestump@comcast.net>
9768 Richard Sandiford <rdsandiford@googlemail.com>
9769
9770 * c-ada-spec.c: Include wide-int.h.
9771 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9772 (dump_generic_ada_node): Use wide-int interfaces.
9773 * c-common.c: Include wide-int-print.h.
9774 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9775 (pointer_int_sum): Use wide-int interfaces.
9776 (c_common_nodes_and_builtins): Use make_int_cst.
9777 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9778 (handle_alloc_size_attribute): Use wide-int interfaces.
9779 (get_nonnull_operand): Likewise.
9780 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9781 * c-lex.c: Include wide-int.h.
9782 (narrowest_unsigned_type): Take a widest_int rather than two
9783 HOST_WIDE_INTs.
9784 (narrowest_signed_type): Likewise.
9785 (interpret_integer): Update accordingly. Use wide-int interfaces.
9786 (lex_charconst): Use wide-int interfaces.
9787 * c-pretty-print.c: Include wide-int.h.
9788 (pp_c_integer_constant): Use wide-int interfaces.
9789 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9790 INT_CST_LT_UNSIGNED.
9791
b15458be
RB
97922014-05-06 Richard Biener <rguenther@suse.de>
9793
9794 * c-opts.c (c_common_post_options): For -freestanding,
9795 -fno-hosted and -fno-builtin disable pattern recognition
9796 if not enabled explicitely.
9797
6577374e
MP
97982014-05-02 Marek Polacek <polacek@redhat.com>
9799
9800 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9801
d00887e8
MP
98022014-05-01 Marek Polacek <polacek@redhat.com>
9803
9804 PR c/43245
9805 * c.opt (Wdiscarded-qualifiers): Add.
9806
f8ed5150
MP
98072014-04-30 Marek Polacek <polacek@redhat.com>
9808
9809 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9810 INT_MIN / -1 sanitization only for integer types.
9811
45484dcf
MP
98122014-04-25 Marek Polacek <polacek@redhat.com>
9813
9814 PR c/18079
9815 * c-common.c (handle_noinline_attribute): Warn if the attribute
9816 conflicts with always_inline attribute.
9817 (handle_always_inline_attribute): Warn if the attribute conflicts
9818 with noinline attribute.
9819
38e514c0
MP
98202014-04-25 Marek Polacek <polacek@redhat.com>
9821
9822 PR c/60156
9823 * c-common.c (check_main_parameter_types): Warn about variadic main.
9824
44875f92
MS
98252014-04-24 Mike Stump <mikestump@comcast.net>
9826
9827 * c.opt (Wshadow-ivar): Default to on.
9828
dcaaa5a0
DP
98292014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9830
9831 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9832
c07d7c02
MP
98332014-04-23 Marek Polacek <polacek@redhat.com>
9834
9835 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9836
1c33c9b7
JJ
98372014-04-22 Jakub Jelinek <jakub@redhat.com>
9838
9839 PR sanitizer/60275
9840 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9841 if flag_sanitize_undefined_trap_on_error.
9842 (ubsan_instrument_division, ubsan_instrument_shift,
9843 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9844 if !flag_sanitize_recover.
9845
793c625f
MG
98462014-04-22 Marc Glisse <marc.glisse@inria.fr>
9847
9848 PR libstdc++/43622
9849 * c-common.c (registered_builtin_types): Make non-static.
9850 * c-common.h (registered_builtin_types): Declare.
9851
b0f1bf36 98522014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9853 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9854
9855 PR c/60819
9856 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9857 apply may-alias the scalar pointer type when applicable.
9858
3b07fa4a
IZ
98592014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9860
9861 PR middle-end/60467
9862 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9863 as possible argument for Cilk_spawn.
9864
cbbd2b1c
TB
98652014-04-11 Tobias Burnus <burnus@net-b.de>
9866
9867 PR c/60194
9868 * c.opt (Wformat-signedness): Add
9869 * c-format.c(check_format_types): Use it.
9870
6415bd5d
JM
98712014-04-11 Jason Merrill <jason@redhat.com>
9872
9873 PR c++/57926
9874 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9875 default_conversion for an array argument.
9876
6525783a
MP
98772014-04-08 Marek Polacek <polacek@redhat.com>
9878
9879 PR sanitizer/60745
9880 * c-ubsan.c: Include asan.h.
9881 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9882
880a467b
NS
98832014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9884
9885 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9886
7b59ff2d
MP
98872014-04-02 Marek Polacek <polacek@redhat.com>
9888
9889 * c-common.h (c_expand_expr): Remove declaration.
9890
8edbfaa6
JJ
98912014-03-28 Jakub Jelinek <jakub@redhat.com>
9892
9893 PR c++/60689
9894 * c-common.c (add_atomic_size_parameter): When creating new
9895 params vector, push the size argument first.
9896
07d72e1d
JJ
98972014-03-26 Jakub Jelinek <jakub@redhat.com>
9898
9899 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9900 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9901 ubsan_create_data callers.
9902
b35e0fa0
JJ
99032014-03-22 Jakub Jelinek <jakub@redhat.com>
9904
9905 PR debug/60603
9906 * c-opts.c (c_finish_options): Restore cb_file_change call to
9907 <built-in>.
9908
39a1ebb3
JJ
99092014-03-13 Jakub Jelinek <jakub@redhat.com>
9910
9911 PR middle-end/36282
9912 * c-pragma.c (apply_pragma_weak): Only look at
9913 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9914 DECL_ASSEMBLER_NAME_SET_P (decl).
9915 (maybe_apply_pending_pragma_weaks): Exit early if
9916 vec_safe_is_empty (pending_weaks) rather than only when
9917 !pending_weaks.
9918 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9919 set assembler name back to NULL afterwards.
9920
a07f6ed2
JM
99212014-03-11 Jason Merrill <jason@redhat.com>
9922
9923 * c.opt: Add -std=gnu++14.
9924
75b107f5
IB
99252014-03-11 Ian Bolton <ian.bolton@arm.com>
9926
9927 * c-opts.c (c_common_post_options): Don't override
9928 -ffp-contract=fast if unsafe-math-optimizations is on.
9929
f42c637e
PM
99302014-03-08 Paulo Matos <paulo@matos-sorge.com>
9931
22b15758 9932 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9933
70e24808
JM
99342014-03-07 Jason Merrill <jason@redhat.com>
9935
9936 * c.opt: Add -std=c++14.
9937
3af9c5e9
MP
99382014-03-06 Marek Polacek <polacek@redhat.com>
9939
9940 PR c/60197
9941 * cilk.c (contains_cilk_spawn_stmt): New function.
9942 (contains_cilk_spawn_stmt_walker): Likewise.
9943 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
9944 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
9945
b3bdf019
JJ
99462014-03-03 Jakub Jelinek <jakub@redhat.com>
9947
9948 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
9949 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
9950 even when flag_preprocess_only.
9951
ca7e759d
JM
99522014-02-26 Jason Merrill <jason@redhat.com>
9953
9954 PR c++/59231
9955 PR c++/11586
9956 * c-common.c (shorten_compare): Don't check
9957 c_inhibit_evaluation_warnings.
9958
28e41874
JJ
99592014-02-19 Jakub Jelinek <jakub@redhat.com>
9960
cca615af
JJ
9961 PR c/37743
9962 * c-common.c (c_common_nodes_and_builtins): When initializing
9963 c_uint{16,32,64}_type_node, also set corresponding
9964 uint{16,32,64}_type_node to the same value.
9965
28e41874
JJ
9966 PR c++/60267
9967 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
9968 for PRAGMA_IVDEP if flag_preprocess_only.
9969
c2bf53a1
JJ
99702014-02-12 Jakub Jelinek <jakub@redhat.com>
9971
9972 PR c/60101
9973 * c-common.c (merge_tlist): If copy is true, call new_tlist,
9974 if false, add ADD itself, rather than vice versa.
9975 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
9976 copy. For SAVE_EXPR, only call merge_tlist once.
9977
8fcbce72
JJ
99782014-02-08 Jakub Jelinek <jakub@redhat.com>
9979
9980 PR middle-end/60092
9981 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
9982 and tree_to_uhwi.
9983 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
9984 functions.
9985 (c_common_attribute_table): Add alloc_align and assume_aligned
9986 attributes.
9987
0a756a3f
MP
99882014-02-06 Marek Polacek <polacek@redhat.com>
9989
9990 PR c/60087
9991 * c-common.c (warn_for_sign_compare): Call warning_at with location
9992 instead of warning.
9993
7ec4847a
MP
99942014-02-05 Marek Polacek <polacek@redhat.com>
9995
9996 PR c/53123
9997 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
9998 statement.
9999
66f20604
MP
100002014-02-04 Marek Polacek <polacek@redhat.com>
10001
10002 PR c/60036
10003 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10004 SAVE_EXPR.
10005
5d77fb19
MG
100062014-02-03 Marc Glisse <marc.glisse@inria.fr>
10007
10008 PR c++/53017
10009 PR c++/59211
10010 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10011 handle_vector_size_attribute, handle_nonnull_attribute): Call
10012 default_conversion on the attribute argument.
10013 (handle_nonnull_attribute): Increment the argument number.
10014
81e5eca8
MP
100152014-01-31 Marek Polacek <polacek@redhat.com>
10016
10017 PR c/59963
10018 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10019 build_function_call_vec.
10020 (resolve_overloaded_builtin): Likewise.
10021 * c-common.h (build_function_call_vec): Adjust declaration.
10022
68fca595
MP
100232014-01-30 Marek Polacek <polacek@redhat.com>
10024
10025 PR c/59940
10026 * c-common.h (unsafe_conversion_p): Adjust declaration.
10027 (warnings_for_convert_and_check): Likewise.
10028 (convert_and_check): Likewise.
10029 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10030 expansion_point_location_if_in_system_header on it.
10031 (warnings_for_convert_and_check): Add location parameter. Call
10032 expansion_point_location_if_in_system_header on it. Use it.
10033 (convert_and_check): Add location parameter. Use it.
10034 (conversion_warning): Likewise.
10035 (c_add_case_label): Adjust convert_and_check calls.
10036 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10037
b72271b9
BI
100382014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10039
10040 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10041 flag_cilkplus.
10042 * c-pragma.c (init_pragma): Likewise.
10043 * c.opt: Likewise.
10044
393e8e8b
MP
100452014-01-23 Marek Polacek <polacek@redhat.com>
10046
10047 PR c/59846
10048 * c-common.c (shorten_compare): Add location_t parameter.
10049 * c-common.h (shorten_binary_op): Adjust declaration.
10050
f04dda30
MP
100512014-01-23 Marek Polacek <polacek@redhat.com>
10052
10053 PR c/58346
10054 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10055 * c-common.h: Declare it.
10056
621955cb
EB
100572014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10058
10059 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10060 * c-ada-spec.c (dump_ads): Likewise.
10061 (cpp_check): Likewise.
10062 (dump_ada_specs): Likewise.
10063
100642014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10065
10066 PR c++/49718
10067 * c-common.c (handle_no_instrument_function_attribute): Allow
10068 no_instrument_function attribute in class member
10069 definition/declaration.
10070
241f845a
JJ
100712014-01-15 Jakub Jelinek <jakub@redhat.com>
10072
10073 PR c/58943
10074 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10075 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10076 being COMPOUND_EXPR.
10077 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10078 operand a SAVE_EXPR and second MODIFY_EXPR.
10079
e83b8e2e
JJ
100802014-01-09 Jakub Jelinek <jakub@redhat.com>
10081
10082 PR target/58115
10083 * c-pch.c (c_common_write_pch): Call
10084 prepare_target_option_nodes_for_pch.
10085
23a5b65a
RS
100862014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10087
10088 Update copyright years
10089
f9030485
RS
100902014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10091
10092 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10093 the copyright notice.
10094
f2aa696b
EB
100952013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10096
10097 * c-ada-spec.c (print_constructor): New function.
10098 (print_destructor): Retrieve the origin of the destructor.
10099 (print_ada_declaration): Revamp handling of constructors/destructors.
10100
3f8257db 101012013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10102 Bill Maddox <maddox@google.com>
10103 Jason Merrill <jason@redhat.com>
10104
10105 * c.opt: Add -fdeclone-ctor-dtor.
10106 * c-opts.c (c_common_post_options): Default to on iff -Os.
10107
41958c28
BI
101082013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10109
10110 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10111 attribute.
10112 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10113 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10114 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10115 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10116 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10117 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10118 PRAGMA_CILK_CLAUSE_UNIFORM.
10119
b1726d6c 10120
12893402
BI
101212013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10122
10123 * cilk.c (cilk_outline): Made this function non-static.
10124 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10125 (create_cilk_wrapper): Added a new parameter: a function pointer.
10126 (c_install_body_w_frame_cleanup): Remove
10127 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10128 * c-common.h (cilk_outline): New prototype.
10129 (gimplify_cilk_spawn): Removed two parameters.
10130 (cilk_install_body_with_frame_cleanup): New prototype.
10131 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10132 CILK_SPAWN_STMT case.
10133
085b42ed
BS
101342013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10135
2ce064c3
BS
10136 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10137
085b42ed
BS
10138 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10139 (int_array_type_node): Remove.
10140 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10141
9e36c9ed
MP
101422013-12-05 Marek Polacek <polacek@redhat.com>
10143
10144 PR c/52023
10145 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10146 [ADJUST_FIELD_ALIGN].
10147
296674db
JM
101482013-12-04 Joseph Myers <joseph@codesourcery.com>
10149
10150 PR c/52023
10151 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10152 and check field alignment if set.
10153 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10154 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10155
b1726d6c 101562013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10157 Marek Polacek <polacek@redhat.com>
10158
10159 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10160 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10161
d7947e19
L
101622013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10163
10164 PR c/59309
10165 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10166 arguments.
10167
fad7652e
JJ
101682013-11-29 Jakub Jelinek <jakub@redhat.com>
10169
10170 PR c/59280
10171 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10172 goto invalid. If it is error_mark_node, don't issue further
10173 diagnostics.
10174
8b5e1202
SO
101752013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10176
10177 * c.opt (Wopenmp-simd): New.
10178
0a508bb6
JJ
101792013-11-22 Jakub Jelinek <jakub@redhat.com>
10180
10181 * c-ubsan.h (ubsan_instrument_return): New prototype.
10182 * c-ubsan.c (ubsan_instrument_return): New function.
10183
2fb9a547
AM
101842013-11-22 Andrew MacLeod <amacleod@redhat.com>
10185
10186 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10187 * c-gimplify.c: Likewise.
10188 * cilk.c: Likewise.
2fb9a547 10189
8400e75e
DM
101902013-11-22 David Malcolm <dmalcolm@redhat.com>
10191
10192 * c-common.c (unsafe_conversion_p): Remove use of
10193 EXPR_LOC_OR_HERE macro.
10194 (conversion_warning): Likewise.
10195 (warnings_for_convert_and_check): Likewise.
10196 (warn_for_collisions_1): Likewise.
10197 (shorten_compare): Likewise, and remove use of in_system_header
10198 macro, using the location from the former.
10199 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10200 (cb_def_pragma): Remove use of in_system_header macro.
10201 (lex_string): Likewise.
10202 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10203
eb1ce453
KZ
102042013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10205 Mike Stump <mikestump@comcast.net>
10206 Richard Sandiford <rdsandiford@googlemail.com>
10207
10208 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10209 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10210 tree_fits_shwi_p or tree_fits_uhwi_p.
10211 (dump_generic_ada_node): Likewise.
10212 * c-format.c (check_format_arg): Likewise.
10213 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10214
6b3b8c27
KZ
102152013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10216
10217 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10218
49b0aa18
JC
102192013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10220
10221 PR c/53001
10222 * c-common.c (unsafe_conversion_p): Make this function
10223 return an enumeration with more detail.
10224 (conversion_warning): Use the new return type of
10225 unsafe_conversion_p to separately warn either about conversions
10226 that lower floating point number precision or about the other
10227 kinds of conversions.
10228 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10229 (unsafe_conversion_p): switching return type to
10230 conversion_safety enumeration.
49b0aa18
JC
10231 * c.opt: Adding new warning -Wfloat-conversion and
10232 enabling it with -Wconversion.
10233
b826515a
BS
102342013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10235
8e745a17
JJ
10236 * c-opts.c: Include plugin.h.
10237 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10238
b9a55b13
MP
102392013-11-19 Marek Polacek <polacek@redhat.com>
10240
10241 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10242 call.
10243 (ubsan_instrument_shift): Likewise.
10244 (ubsan_instrument_vla): Likewise.
10245
7d362f6c
RS
102462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10247
10248 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10249 cast to unsigned type.
10250
386b1f1f
RS
102512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10252
10253 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10254 tree_low_cst.
10255 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10256 rather than tree_low_cst.
10257
ae7e9ddd
RS
102582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10259
10260 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10261 tree_to_uhwi throughout.
10262
9439e9a1
RS
102632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10264
10265 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10266 tree_low_cst (..., 0) with tree_to_shwi throughout.
10267
cc269bb6
RS
102682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10269
10270 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10271 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10272
9541ffee
RS
102732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10274
10275 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10276 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10277
c02065fc
AH
102782013-11-15 Aldy Hernandez <aldyh@redhat.com>
10279
10280 * c-cilkplus.c: New file.
10281 * c-common.c (readonly_error): Add location argument.
10282 * c-common.h (readonly_error): Same.
10283 (c_finish_cilk_clauses): Protoize.
10284 (c_check_cilk_loop): Same.
10285 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10286 Do not fail on error_mark_node.
10287 Abstract increment canonicalization to here...
10288 (c_omp_for_incr_canonicalize_ptr): New.
10289 c-pragma.c (init_pragma): Register "simd" pragma.
10290 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10291 (enum pragma_cilk_clause): New.
10292
9cc65f15
RS
102932013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10294
10295 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10296 wchar_type and host_integerp checks.
10297
18f429e2
AM
102982013-11-14 Andrew MacLeod <amacleod@redhat.com>
10299
10300 * c-common.c: Likewise.
10301 * c-gimplify.c: Likewise.
10302 * cilk.c: Likewise.
10303
d8a2d370
DN
103042013-11-14 Diego Novillo <dnovillo@google.com>
10305
10306 * c-common.c: Include fold-const.h.
10307 Include stor-layout.h.
10308 Include calls.h.
10309 Include stringpool.h.
10310 Include attribs.h.
10311 Include varasm.h.
10312 Include trans-mem.h.
10313 * c-cppbuiltin.c: Include stor-layout.h.
10314 Include stringpool.h.
10315 * c-format.c: Include stringpool.h.
10316 * c-lex.c: Include stringpool.h.
10317 Include stor-layout.h.
10318 * c-pragma.c: Include stringpool.h.
10319 Include attribs.h.
10320 Include varasm.h.
10321 Include gcc-symtab.h.
10322 * c-pretty-print.c: Include stor-layout.h.
10323 Include attribs.h.
10324 * cilk.c: Include stringpool.h.
10325 Include calls.h.
10326
38b7bc7f
JM
103272013-11-13 Joseph Myers <joseph@codesourcery.com>
10328
10329 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10330 * c-common.c (c_common_reswords): Add __auto_type.
10331 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10332
45b0be94
AM
103332013-11-12 Andrew MacLeod <amacleod@redhat.com>
10334
18f429e2
AM
10335 * c-common.c: Include gimplify.h.
10336 * c-gimplify.c: Likewise.
10337 * cilk.c: Likewise.
10338 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10339 * c-ubsan.c: Don't include gimple.h.
45b0be94 10340
582d9b50
JM
103412013-11-12 Joseph Myers <joseph@codesourcery.com>
10342
10343 * c-common.c (c_common_reswords): Add _Thread_local.
10344
6b28e197
JM
103452013-11-09 Joseph Myers <joseph@codesourcery.com>
10346
10347 * c-common.c (atomic_size_supported_p): New function.
10348 (resolve_overloaded_atomic_exchange)
10349 (resolve_overloaded_atomic_compare_exchange)
10350 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10351 Use it instead of comparing size with a local list of sizes.
10352
267bac10
JM
103532013-11-07 Andrew MacLeod <amacleod@redhat.com>
10354 Joseph Myers <joseph@codesourcery.com>
10355
10356 * c-common.h (enum rid): Add RID_ATOMIC.
10357 * c-common.c (c_common_reswords): Add _Atomic.
10358 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10359 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10360 * c-format.c (check_format_types): Check for extra _Atomic
10361 qualifiers in format argument.
10362 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10363 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10364
5157b91e
TB
103652013-11-06 Tobias Burnus <burnus@net-b.de>
10366
10367 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10368
6dbe0958
JM
103692013-11-06 Joseph Myers <joseph@codesourcery.com>
10370
10371 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10372 standards modes.
10373 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10374 to mean lack of IEEE 754 support.
10375
e8ff5196
TB
103762013-11-05 Tobias Burnus <burnus@net-b.de>
10377
10378 * c.opt (-Wdate-time): New option
10379 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10380
254a0760
JM
103812013-11-05 Joseph Myers <joseph@codesourcery.com>
10382
10383 * c-cppbuiltin.c (cpp_iec_559_value): Test
10384 flag_excess_precision_cmdline not flag_excess_precision.
10385
6d7f7e0a
TB
103862013-11-05 Tobias Burnus <burnus@net-b.de>
10387
10388 * c.opt (fopenmp-simd): New option.
10389 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10390 (omp_pragmas): ... this new struct.
10391 (c_pp_lookup_pragma): Also walk omp_pragmas.
10392 (init_pragma): Init pragmas for -fopenmp-simd.
10393
55a7f02f
MP
103942013-11-04 Marek Polacek <polacek@redhat.com>
10395
10396 PR c++/58979
10397 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10398
9193fb05
JM
103992013-11-04 Joseph Myers <joseph@codesourcery.com>
10400
10401 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10402 New functions.
10403 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10404
94159ecf
EB
104052013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10406
10407 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10408 (dump_ada_specs): Adjust prototype of second callback.
10409 * c-ada-spec.c (cpp_check): New global variable.
10410 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10411 (print_generic_ada_decl): Likewise.
10412 (has_static_fields): Change return type to bool and add guard.
10413 (has_nontrivial_methods): New predicate.
10414 (is_tagged_type): Change return type to bool.
10415 (separate_class_package): Call has_nontrivial_methods.
10416 (pp_ada_tree_identifier): Minor tweaks.
10417 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10418 (dump_ada_array_domains): Likewise.
10419 (dump_ada_array_type): Likewise.
10420 (dump_template_types): Remove cpp_check parameter and do not pass it to
10421 dump_generic_ada_node.
10422 (dump_ada_template): Likewise.
10423 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10424 recursively.
10425 (print_ada_methods): Change return type to integer. Remove cpp_check
10426 parameter and do not pass it down.
10427 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10428 dump_generic_ada_node.
10429 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10430 accessing methods.
10431 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10432 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10433 value of print_ada_methods.
10434 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10435 Set cpp_check to it before invoking dump_ada_nodes.
10436 (dump_ada_specs): Likewise.
10437
b906f4ca
MP
104382013-11-03 Marek Polacek <polacek@redhat.com>
10439
10440 * c-ubsan.c: Don't include hash-table.h.
10441 (ubsan_instrument_vla): New function.
10442 * c-ubsan.h: Declare it.
10443
5e20cdc9
DM
104442013-10-31 David Malcolm <dmalcolm@redhat.com>
10445
10446 Automated part of renaming of symtab_node_base to symtab_node.
10447
10448 Patch autogenerated by rename_symtab.py from
10449 https://github.com/davidmalcolm/gcc-refactoring-scripts
10450 revision 58bb219cc090b2f4516a9297d868c245495ee622
10451
10452 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10453 symtab_node_base to symtab_node.
10454
7057e645
ESR
104552013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10456
8e745a17 10457 Implement C++14 digit separators.
7057e645
ESR
10458 * c-lex.c (interpret_float): Remove digit separators from scratch string
10459 before building real literal.
10460
193ea7bc
JJ
104612013-10-30 Jakub Jelinek <jakub@redhat.com>
10462
10463 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10464
939b37da
BI
104652013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10466
10467 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10468 fields.
10469 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10470 enabled.
10471 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10472 (insert_cilk_frame): New prototype.
10473 (cilk_init_builtins): Likewise.
10474 (gimplify_cilk_spawn): Likewise.
10475 (c_cilk_install_body_w_frame_cleanup): Likewise.
10476 (cilk_detect_spawn_and_unwrap): Likewise.
10477 (cilk_set_spawn_marker): Likewise.
10478 (build_cilk_sync): Likewise.
10479 (build_cilk_spawn): Likewise.
10480 * cilk.c: New file.
10481
67348ccc
DM
104822013-10-29 David Malcolm <dmalcolm@redhat.com>
10483
10484 Patch autogenerated by refactor_symtab.py from
10485 https://github.com/davidmalcolm/gcc-refactoring-scripts
10486 revision 58bb219cc090b2f4516a9297d868c245495ee622
10487
10488 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10489 to a true class hierarchy.
10490 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10491
d570872d
RS
104922013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10493
10494 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10495
98906124
JL
104962013-10-26 Jeff Law <law@redhat.com>
10497
adfac8df
JJ
10498 * c-common.c (c_define_builtins): Remove mudflap support.
10499 * c.opt: Ignore and warn for mudflap options.
98906124 10500
d73749df 105012013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10502
10503 PR other/33426
10504 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10505 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10506
3f04b1bb
JM
105072013-10-23 Jason Merrill <jason@redhat.com>
10508
10509 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10510
acf0174b
JJ
105112013-10-11 Jakub Jelinek <jakub@redhat.com>
10512
acd15a28
JJ
10513 * c-common.h (omp_clause_mask::operator !=): New method.
10514 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10515 instead of if (mask & something) tests everywhere.
10516
acf0174b
JJ
10517 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10518 201307 instead of 201107.
10519 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10520 (c_common_attribute_table): Add "omp declare target" and
10521 "omp declare simd" attributes.
10522 (handle_omp_declare_target_attribute,
10523 handle_omp_declare_simd_attribute): New functions.
10524 * c-omp.c: Include c-pragma.h.
10525 (c_finish_omp_taskgroup): New function.
10526 (c_finish_omp_atomic): Add swapped argument, if true,
10527 build the operation first with rhs, lhs arguments and use NOP_EXPR
10528 build_modify_expr.
10529 (c_finish_omp_for): Add code argument, pass it down to make_code.
10530 (c_omp_split_clauses): New function.
10531 (c_split_parallel_clauses): Removed.
10532 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10533 c_omp_declare_simd_clauses_to_decls): New functions.
10534 * c-common.h (omp_clause_mask): New type.
10535 (OMP_CLAUSE_MASK_1): Define.
10536 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10537 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10538 omp_clause_mask::operator |, omp_clause_mask::operator &,
10539 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10540 omp_clause_mask::operator ==): New methods.
10541 (enum c_omp_clause_split): New.
10542 (c_finish_omp_taskgroup): New prototype.
10543 (c_finish_omp_atomic): Add swapped argument.
10544 (c_finish_omp_for): Add code argument.
10545 (c_omp_split_clauses): New prototype.
10546 (c_split_parallel_clauses): Removed.
10547 (c_omp_declare_simd_clauses_to_numbers,
10548 c_omp_declare_simd_clauses_to_decls): New prototypes.
10549 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10550 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10551 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10552 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10553 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10554 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10555 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10556 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10557 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10558 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10559 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10560 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10561 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10562 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10563 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10564 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10565 PRAGMA_OMP_CLAUSE_UNIFORM.
10566
826cacfe
MG
105672013-10-09 Marc Glisse <marc.glisse@inria.fr>
10568
10569 PR tree-optimization/20318
10570 * c-common.c (handle_returns_nonnull_attribute): New function.
10571 (c_common_attribute_table): Add returns_nonnull.
10572
2284b034
MG
105732013-10-03 Marc Glisse <marc.glisse@inria.fr>
10574
10575 PR c++/19476
10576 * c.opt (fcheck-new): Move to common.opt.
10577
b56e9788
MP
105782013-09-25 Marek Polacek <polacek@redhat.com>
10579 Jakub Jelinek <jakub@redhat.com>
10580
10581 PR sanitizer/58413
10582 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10583 an expression if we can prove it is correct.
10584 (ubsan_instrument_division): Likewise. Remove unnecessary
10585 check.
10586
ce6923c5
MP
105872013-09-18 Marek Polacek <polacek@redhat.com>
10588
10589 PR sanitizer/58411
10590 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10591 Declare it.
10592 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10593
fb5610fb
IS
105942013-09-14 Iain Sandoe <iain@codesourcery.com>
10595
10596 PR target/48094
10597 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10598 fobjc-gc, freplace-objc-classes): Accept for LTO.
10599
88b0e79e
JC
106002013-09-13 Jacek Caban <jacek@codeweavers.com>
10601
10602 * c-target.def: New hook
10603
c9b0866a
PC
106042013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10605
10606 PR c++/43452
10607 * c.opt (Wdelete-incomplete): Add.
10608
0af94e6f
JR
106092013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10610
10611 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10612 (vector_types_compatible_elements_p): New function.
10613 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10614 declaration.
10615 (vector_types_compatible_elements_p): Declare.
10616
7c26172c
GDR
106172013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10618
10619 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10620 a virtual member function.
10621 (pp_simple_type_specifier): Remove.
10622 (pp_c_type_specifier): Likewise.
10623 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10624 Rename from pp_c_type_specifier. Adjust.
10625 (c_pretty_printer::c_pretty_printer): Do not assign to
10626 simple_type_specifier.
10627
20059c8b
GDR
106282013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10629
10630 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10631 member function.
10632 (c_pretty_printer::storage_class_specifier): Likewise.
10633 (c_pretty_printer::initializer): Likewise.
10634 (pp_declaration): Remove.
10635 (pp_declaration_specifiers): Likewise.
10636 (pp_abstract_declarator): Likewise.
10637 (pp_declarator): Likewise.
10638 (pp_type_id): Likewise.
10639 (pp_statement): Likewise.
10640 (pp_constant): Likewise.
10641 (pp_id_expression): Likewise.
10642 (pp_primary_expression): Likewise.
10643 (pp_unary_expression): Likewise.
10644 (pp_multiplicative_expression): Likewise.
10645 (pp_conditional_expression): Likewise.
10646 (pp_assignment_expression): Likewise.
10647 (pp_expression): Likewise.
10648 (pp_c_type_id): Likewise.
10649 (pp_c_storage_class_specifier): Likewise.
10650 * c-pretty-print.c (pp_c_type_cast): Tidy.
10651 (pp_c_pointer): Likewise.
10652 (pp_c_type_specifier): Likewise.
10653 (pp_c_parameter_type_list): Likewise.
10654 (pp_c_function_definition): Likewise.
10655 (pp_c_init_declarator): Likewise.
10656 (pp_c_initializer_list): Likewise.
10657 (pp_c_constructor_elts): Likewise.
10658 (c_pretty_printer::direct_abstract_declarator): Likewise.
10659 (c_pretty_printer::declaration_specifiers): Likewise.
10660 (c_pretty_printer::primary_expression): Likewise.
10661 (c_pretty_printer::postfix_expression): Likewise.
10662 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10663 (c_pretty_printer::storage_class_specifier): Rename from
10664 pp_c_storage_class_specifier.
10665 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10666 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10667 storage_class_specifier, initializer, offset_list, flags.
10668
de5a5fa1
MP
106692013-08-30 Marek Polacek <polacek@redhat.com>
10670
10671 * c-ubsan.c: New file.
10672 * c-ubsan.h: New file.
10673
8f0e4d72
GDR
106742013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10675
10676 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10677 member function.
10678 (c_pretty_printer::declaration_specifiers): Likewise.
10679 (c_pretty_printer::declarator): Likewise.
10680 (c_pretty_printer::abstract_declarator): Likewise.
10681 (c_pretty_printer::direct_abstract_declarator): Likewise.
10682 (c_pretty_printer::direct_declarator): Likewise.
10683 (c_pretty_printer::function_specifier): Likewise.
10684 (pp_declaration): Adjust.
10685 (pp_declaration_specifiers): Likewise.
10686 (pp_abstract_declarator): Likewise.
10687 (pp_direct_declarator): Likewise.
10688 (pp_function_specifier): Likewise.
10689 (pp_direct_abstract_declarator): Remove as unused.
10690 (pp_c_declaration): Remove.
10691 (pp_c_declaration_specifiers): Likewise.
10692 (pp_c_declarator): Likewise.
10693 (pp_c_direct_declarator): Likewise.
10694 (pp_c_function_specifier): Likewise.
10695 (pp_c_direct_abstract_declarator): Likewise.
10696 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10697 from pp_c_abstract_declarator. Adjust.
ab20d992 10698 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10699 pp_c_direct_abstract_declarator. Adjust.
10700 (c_pretty_printer::function_specifier): Rename from
10701 pp_c_function_specifier. Adjust.
10702 (c_pretty_printer::declaration_specifiers): Rename from
10703 pp_c_declaration_specifiers. Adjust.
10704 (c_pretty_printer::direct_declarator): Rename from
10705 pp_c_direct_declarator. Adjust.
10706 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10707 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10708 (c_pretty_printer::c_pretty_printer): Do not assign to
10709 declaration, declaration_specifiers, declarator,
10710 direct_declarator, direct_abstract_declarator, function_specifier.
10711
00d34d3a
GDR
107122013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10713
10714 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10715 virtual member function.
10716 (c_pretty_printer::multiplicative_expression): Likewise.
10717 (c_pretty_printer::conditional_expression): Likewise.
10718 (c_pretty_printer::assignment_expression): Likewise.
10719 (c_pretty_printer::expression): Likewise.
10720 (pp_unary_expression): Adjust.
10721 (pp_multiplicative_expression): Likewise.
10722 (pp_assignment_expression): Likewise.
10723 (pp_conditional_expression): Likewise.
10724 (pp_expression): Likewise.
10725 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10726 from pp_c_unary_expression. Adjust.
10727 (c_pretty_printer::multiplicative_expression): Rename from
10728 pp_c_multiplicative_expression. Adjust.
10729 (c_pretty_printer::conditional_expression): Rename from
10730 pp_c_conditional_expression. Adjust.
10731 (c_pretty_printer::assignment_expression): Rename from
10732 pp_c_assignment_expression. Adjust.
10733 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10734 (c_pretty_printer::c_pretty_printer): Do not assign to
10735 unary_expression, multiplicative_expression,
10736 conditional_expression, expression.
10737
fb22178f
GDR
107382013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10739
10740 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10741 virtual member function.
10742 (pp_postfix_expression): Adjust.
10743 (pp_c_postfix_expression): Remove.
10744 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10745 from pp_c_postfix_expression. Adjust.
10746 (c_pretty_printer::c_pretty_printer): Do not assign to
10747 postfix_expression.
10748
7ecc2600
GDR
107492013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10750
10751 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10752 virtua member function.
10753 (pp_primary_expression): Adjust.
10754 (pp_c_primary_expression): Remove.
10755 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10756 from pp_c_primary_expression. Adjust.
10757 (pp_c_initializer_list): Use pp_primary_expression.
10758 (c_pretty_printer::c_pretty_printer): Do not assign to
10759 primary_expression.
10760
0691175f
GDR
107612013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10762
10763 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10764 * c-pretty-print.c (M_): Remove.
10765 (c_pretty_printer::translate_string): Define.
10766 (pp_c_type_specifier): Use it.
10767 (pp_c_primary_expression): Likewise.
10768 (pp_c_expression): Likewise.
10769
66dfe4c4
GDR
107702013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10771
10772 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10773 virtual function.
10774 (pp_c_id_expression): Remove.
10775 (pp_id_expression): Adjust.
10776 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10777 pp_c_id_expression. Adjust.
10778 (pp_c_postfix_expression): Use pp_id_expression.
10779 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10780
ca43e9d5
GDR
107812013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10782
10783 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10784 member function.
10785 (pp_constant): Adjust.
10786 (pp_c_constant): Remove.
10787 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10788 pp_c_constant. Adjust.
10789 (pp_c_constant)
10790 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10791 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10792
da6ca2b5
GDR
107932013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10794
10795 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10796 (c_pretty_printer::c_pretty_printer): Declare.
10797 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10798 c_pretty_printer_init. Adjust.
10799 (print_c_tree): Do not call c_pretty_printer_init.
10800 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10801
65a372f4
AC
108022013-08-09 Arnaud Charlet <charlet@adacore.com>
10803
10804 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10805
fd9b0f32
PC
108062013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10807
10808 PR c++/58080
10809 * c-common.c (pointer_int_sum): Add bool parameter.
10810 * c-common.h (pointer_int_sum): Adjust declaration.
10811
e0aec1e9
GDR
108122013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10813
10814 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10815 c_pretty_printer variable.
10816
b066401f
GDR
108172013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10818
10819 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10820 (pp_base): Remove.
10821 (pp_c_base): Likewise. Adjust users.
10822 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10823 (pp_c_whitespace): Do not call pp_base.
10824 (pp_c_left_paren): Likewise.
10825 (pp_c_right_paren): Likewise.
10826 (pp_c_left_brace): Likewise.
10827 (pp_c_right_brace): Likewise.
10828 (pp_c_left_bracket): Likewise.
10829 (pp_c_right_bracket): Likewise.
10830 (pp_c_dot): Likewise.
10831 (pp_c_ampersand): Likewise.
10832 (pp_c_star): Likewise.
10833 (pp_c_arrow): Likewise.
10834 (pp_c_semicolon): Likewise.
10835 (pp_c_complement): Likewise.
10836 (pp_c_exclamation): Likewise.
10837 (pp_c_direct_declarator): Likewise.
10838 (pp_c_ws_string): Likewise.
10839 (pp_c_identifier): Likewise.
10840 (pp_c_statement): Likewise.
10841 (print_c_tree): Likewise.
10842
65e5a578
ESR
108432013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10844
10845 PR c++/58072
10846 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10847 provide useful error strings.
10848
137a1a27
GDR
108492013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10850
10851 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10852 printer functions instead of pp_string or operators and punctuators.
10853 (dump_generic_ada_node): Likewise.
10854 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10855 (pp_c_relational_expression): Likewise.
10856 (pp_c_logical_or_expression): Likewise.
10857
07838b13
GDR
108582013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10859
10860 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10861 functions instead of pp_character.
10862 (pp_ada_tree_identifier): Likewise.
10863 (dump_ada_double_name): Likewise.
10864 (dump_ada_function_declaration): Likewise.
10865 (dump_ada_array_domains): Likewise.
10866 (dump_template_types): Likewise.
10867 (dump_generic_ada_node): Likewise.
10868 (print_ada_declaration): Likewise.
10869 (print_ada_struct_decl): Likewise.
10870 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10871
433cc7b0
TT
108722013-07-23 Tom Tromey <tromey@redhat.com>
10873
10874 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10875 * c-common.c (c_common_reswords): Add _Generic.
10876
688010ba
OB
108772013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10878
10879 * c-common.c: Fix typos.
10880 * c-common.h: Likewise.
10881
2a99e5e6
LL
108822013-07-13 Lubos Lunak <l.lunak@suse.cz>
10883
10884 PR c++/55203
10885 * c-common.c (c_common_attribute_table): Add warn_unused.
10886 (handle_warn_unused_attribute): New.
10887
c26302d5
JJ
108882013-07-10 Jakub Jelinek <jakub@redhat.com>
10889
10890 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10891 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10892
dfeadaa0
PC
108932013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10894
10895 PR c++/57869
10896 * c.opt: Add Wconditionally-supported.
10897
6a2fa4b2
GS
108982013-07-08 Graham Stott <graham.stott@btinternet.com>
10899
adfac8df 10900 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10901 unused variables l_length and l_node.
10902
ecdbd01a 109032013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10904
10905 PR c/57821
10906 * c-common.c (complete_array_type): Delay folding first index
10907 like other indices. When folding, check for index overflow.
10908
bedc293e
MG
109092013-06-27 Marc Glisse <marc.glisse@inria.fr>
10910
10911 PR c++/57509
10912 * c-common.h (c_build_vec_perm_expr): New complain argument.
10913 * c-common.c (c_build_vec_perm_expr): Likewise.
10914 Use save_expr also in C++.
10915
604b2bfc
GDR
109162013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10917
10918 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10919 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10920 * c-opts.c (c_common_post_options): Likewise.
10921
dfeadaa0 109222013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10923
10924 * array-notation-common.c (length_mismatch_in_expr): Changed the
10925 parameter type's from a dynamic array to a vec_tree. Also removed
10926 the size parameters.
10927 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10928 the change above.
10929
2ce86d2e
BI
109302013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10931
10932 * c-common.h (struct cilkplus_an_parts): New structure.
10933 (struct cilkplus_an_loop_parts): Likewise.
10934 (cilkplus_extract_an_triplets): New prototype.
10935 (fix_sec_implicit_args): Likewise.
10936 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
10937 (fix_sec_implicit_args): Likewise.
604b2bfc 10938
07a6825b
BI
109392013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
10940
10941 * array-notation-common.c (find_inv_trees): Removed an unwanted
10942 typecasting.
10943 * c-common.h (struct inv_list::additional_tcodes): Changed type from
10944 enum rid to enum tree_code.
10945
08346abd
JH
109462013-06-11 Jan Hubicka <jh@suse.cz>
10947
10948 * c-common.c (handle_alias_ifunc_attribute): Do not set
10949 DECL_EXTERNAL for weakref variables.
10950 * c-pragma.c (handle_pragma_weak): Make sure aliases
10951 are not declared as external.
10952
d60f1706
BI
109532013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
10954
10955 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
10956 function from c/c-array-notation.c.
10957 (is_cilkplus_reduce_builtin): Likewise.
10958 (find_rank): Likewise.
10959 (extract_array_notation_exprs): Likewise.
10960 (replace_array_notations): Likewise.
10961 (find_inv_trees): Likewise.
10962 (replace_inv_trees): Likewise.
10963 (contains_array_notation_expr): Likewise.
10964 (find_correct_array_notation_type): Likewise.
10965 * c-common.h (struct inv_list): Moved this struct from the file
10966 c/c-array-notation.c and added a new field called additional tcodes.
10967 (length_mismatch_in_expr_p): New prototype.
10968 (is_cilkplus_reduce_builtin): Likewise.
10969 (find_rank): Likewise.
10970 (extract_array_notation_exprs): Likewise.
10971 (replace_array_notation): Likewise.
10972 (find_inv_trees): Likewise.
10973 (replace_inv_trees): Likewise.
10974 (find_correct_array_notation_type): Likewise.
dfeadaa0 10975
36536d79
BI
109762013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
10977
10978 * c-common.c (c_define_builtins): When cilkplus is enabled, the
10979 function array_notation_init_builtins is called.
10980 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
10981 * c-common.def (ARRAY_NOTATION_REF): New tree.
10982 * c-common.h (build_array_notation_expr): New function declaration.
10983 (build_array_notation_ref): Likewise.
10984 (extract_sec_implicit_index_arg): New extern declaration.
10985 (is_sec_implicit_index_fn): Likewise.
10986 (ARRAY_NOTATION_CHECK): New define.
10987 (ARRAY_NOTATION_ARRAY): Likewise.
10988 (ARRAY_NOTATION_START): Likewise.
10989 (ARRAY_NOTATION_LENGTH): Likewise.
10990 (ARRAY_NOTATION_STRIDE): Likewise.
10991 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
10992 ARRAY_NOTATION_REF.
10993 (pp_c_expression): Likewise.
10994 * c.opt (flag_enable_cilkplus): New flag.
10995 * array-notation-common.c: New file.
10996
f7716d57
JJ
109972013-05-14 Jakub Jelinek <jakub@redhat.com>
10998
10999 PR c++/57274
11000 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11001
a5e0cd1d
MG
110022013-05-10 Marc Glisse <marc.glisse@inria.fr>
11003
11004 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11005 vectors.
11006
f6bc1c4a
HS
110072013-05-07 Han Shen <shenhan@google.com>
11008
11009 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11010
3f12f6e9
SKS
110112013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11012
11013 * c-common.c (check_user_alignment): Emit error for negative values.
11014
61949153
PC
110152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11016
11017 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11018
e93e18e9
PC
110192013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11020
11021 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11022 __GXX_EXPERIMENTAL_CXX1Y__.
11023
44d90fe1 110242013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11025 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11026
11027 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11028 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11029 to simply use OPT_Wpointer_arith.
11030 (c_sizeof_or_alignof_type): Likewise.
11031
13f39b2e
PC
110322013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11033
11034 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11035
4b84d650
JJ
110362013-04-12 Jakub Jelinek <jakub@redhat.com>
11037
11038 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11039 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11040 specifiers.
11041
fb037b5d
SB
110422013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11043
11044 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11045
4e856798
PC
110462013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11047
11048 * c-common.c (pointer_int_sum): Remove dead code.
11049
4b1baac8
RS
110502013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11051
11052 PR middle-end/56524
11053 * c-common.c (handle_optimize_attribute): Don't call
11054 save_optabs_if_changed.
11055
0b50e654
JJ
110562013-03-05 Jakub Jelinek <jakub@redhat.com>
11057
11058 PR middle-end/56461
11059 * c-pch.c (pch_init): Free target_validity at the end.
11060
48c41403
JJ
110612013-03-04 Jakub Jelinek <jakub@redhat.com>
11062
11063 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11064
e664c61c
KS
110652013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11066 Jakub Jelinek <jakub@redhat.com>
11067
11068 PR sanitizer/56454
11069 * c-common.c (handle_no_sanitize_address_attribute): New function.
11070 (c_common_attribute_table): Add no_sanitize_address attribute.
11071 (handle_no_address_safety_analysis_attribute): Add
11072 no_sanitize_address attribute, not no_address_safety_analysis
11073 attribute.
11074
a475fd3d 110752013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11076
11077 PR target/52555
11078 * c-common.c (handle_optimize_attribute): Call
11079 save_optabs_if_changed.
11080
f6007d99
JJ
110812013-02-18 Jakub Jelinek <jakub@redhat.com>
11082 Steven Bosscher <steven@gcc.gnu.org>
11083
11084 PR pch/54117
11085 * c-opts.c (c_common_post_options): If debug info is enabled
11086 and non-dwarf*, refuse to load PCH files and when writing PCH
11087 file warn.
11088
cf35e2b1
JJ
110892013-02-05 Jakub Jelinek <jakub@redhat.com>
11090
11091 PR middle-end/56167
11092 * c-common.c (handle_error_attribute): Fix condition.
11093
32887460
JJ
110942013-01-30 Jakub Jelinek <jakub@redhat.com>
11095
11096 PR c++/55742
11097 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11098
5af057d8
JM
110992013-01-18 Jason Merrill <jason@redhat.com>
11100
11101 PR target/54908
11102 * c.opt (-fextern-tls-init): New.
11103 * c-opts.c (c_common_post_options): Handle it.
11104
cc83c823
JJ
111052013-01-09 Jakub Jelinek <jakub@redhat.com>
11106
11107 PR c/48418
11108 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11109 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11110 and is either negative or bigger or equal to type precision
11111 of the first operand.
11112
a859517f
MP
111132012-12-03 Marek Polacek <polacek@redhat.com>
11114
11115 PR c/55570
11116 * c-common.c (check_user_alignment): Swap order of tests,
11117 check TREE_CODE first.
11118
2d7aa578
ESR
111192012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11120
11121 PR c++/52654
11122 * c-common.h (overflow_type): New enum.
11123 (build_userdef_literal): Add overflow_type argument.
11124 (tree_userdef_literal): Add overflow_type.
11125 (USERDEF_LITERAL_OVERFLOW): New access macro.
11126 * c-common.c (build_userdef_literal): Add overflow_type
11127 argument.
11128 * c-lex.c (c_lex_with_flags): Add overflow_type to
11129 build_userdef_literal calls.
11130 (interpret_integer, interpret_float): Add overflow_type argument.
11131
cc3c4f62
RB
111322012-11-28 Richard Biener <rguenther@suse.de>
11133
11134 PR c/35634
11135 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11136 here and use a type with proper overflow behavior for types that would
11137 need to be promoted for the arithmetic.
11138
77bc5132
JJ
111392012-11-23 Jakub Jelinek <jakub@redhat.com>
11140
11141 PR sanitizer/55435
11142 * c-common.c (handle_no_address_safety_analysis_attribute): New
11143 function.
11144 (c_common_attribute_table): Add no_address_safety_analysis.
11145
5dc99c46
SB
111462012-11-16 Simon Baldwin <simonb@google.com>
11147
11148 * c.opt: Add f[no-]canonical-system-headers.
11149 * c-opts.c (c_common_handle_option): Handle
11150 OPT_fcanonical_system_headers.
11151
a4a0016d
ESR
111522012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11153
11154 PR c++/54413
11155 * c-opts.c (c_common_handle_option): Set new flags.
11156 * c.opt: Describe new flags.
11157
7dbb85a7
JM
111582012-11-09 Jason Merrill <jason@redhat.com>
11159
11160 * c.opt (Wabi-tag): New.
11161
ad7bac31
AK
111622012-11-09 Andi Kleen <ak@linux.intel.com>
11163
11164 PR 55139
11165 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11166 MEMMODEL_MASK
ad7bac31 11167
7332899a
MLI
111682012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11169
11170 PR c/53063
11171 * c.opt (Wformat): Make it Alias Wformat=1.
11172 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11173 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11174 LangEnabledBy.
11175 (Wformat=): RejectNegative. Use LangEnabledBy.
11176 (Wnonnull): Use LangEnabledBy.
11177 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11178 * c-format.c (set_Wformat): Delete.
11179 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11180 (maybe_read_dollar_number): Likewise.
11181 (avoid_dollar_number): Likewise.
11182 (finish_dollar_format_checking): Likewise.
11183 (check_format_info): Likewise.
11184 (check_format_info_main): Likewise.
11185 (check_format_types): Likewise.
11186 (format_type_warning): Likewise.
11187 * c-common.c (int): Likewise.
11188 (check_function_sentinel): Likewise.
8e745a17 11189 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11190
34a180a6
MLI
111912012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11192
11193 PR c/53063
11194 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11195 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11196 Use LangEnabledBy.
11197 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11198 common.opt.
11199 (Wvariadic-macros): Init(1).
11200 * c-opts.c (c_common_handle_option): Do not handle them
11201 explicitly.
11202 (c_common_post_options): Likewise.
11203 (sanitize_cpp_opts): warn_unused_macros is now
11204 cpp_warn_unused_macros.
11205 (push_command_line_include): Likewise.
11206 * c-common.c (warn_unknown_pragmas): Do not define.
11207 * c-common.h (warn_unknown_pragmas): Do not declare.
11208
3f46d6a5
MLI
112092012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11210
11211 PR c/51294
11212 * c-common.c (conversion_warning): Handle conditional expressions.
11213
880661a4
JW
112142012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11215
11216 PR c++/54930
11217 * c.opt (Wreturn_local_addr): Define new option.
11218
4514a96b
JM
112192012-10-25 Jason Merrill <jason@redhat.com>
11220
f14edc1a
JM
11221 * c.opt (Wvirtual-move-assign): New.
11222
4514a96b
JM
11223 * c.opt (Winherited-variadic-ctor): New.
11224
93100c6b
MG
112252012-10-25 Marc Glisse <marc.glisse@inria.fr>
11226
11227 PR c++/54427
11228 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11229
1efcb8c6
JM
112302012-10-23 Joseph Myers <joseph@codesourcery.com>
11231
11232 * c-common.h (pch_cpp_save_state): Declare.
11233 * c-target.def (c_preinclude): New hook.
11234 * c-opts.c (done_preinclude): New.
11235 (push_command_line_include): Handle default preincluded header.
11236 (cb_file_change): Call pch_cpp_save_state when calling
11237 push_command_line_include.
11238 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11239 (pch_cpp_save_state): New.
11240 (pch_init): Call pch_cpp_save_state conditionally, instead of
11241 calling cpp_save_state.
11242
4a0ae68e
MLI
112432012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11244
11245 PR c/53063
11246 PR c/40989
11247 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11248 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11249 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11250 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11251 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11252 * c-opts.c (c_common_handle_option): Remove explicit handling from
11253 here.
11254 (c_common_post_options): Likewise.
11255
67e4210b
EB
112562012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11257
11258 * c-ada-spec.c (LOCATION_COL): Delete.
11259 (compare_location): New function.
11260 (compare_node): Use it.
11261 (compare_comment): Likewise.
11262
65d4f2cd
MLI
112632012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11264
11265 PR c/53063
11266 PR c/40989
11267 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11268 * c-opts.c (c_common_handle_option): Do not set them here. Add
11269 comment.
11270 (c_common_post_options): Likewise.
11271
909881cb
EB
112722012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11273
11274 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11275 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11276 Remove POINTER_TYPE handling, add large unsigned handling and use
11277 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11278
3a785c97
JJ
112792012-10-12 Jakub Jelinek <jakub@redhat.com>
11280
11281 PR c/54381
11282 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11283 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11284 locs and array of 3 trees instead of just single loc and single
11285 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11286 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11287 For *cmp* builtins that take two sources strings report warnings
11288 about first and second source, not about destination and source.
11289
5e54f81d
MG
112902012-10-12 Marc Glisse <marc.glisse@inria.fr>
11291
11292 PR c++/53055
11293 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11294
f5b02f1e
EB
112952012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11296
11297 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11298 declaring something coming from another file.
11299
b46dbc6c
AC
113002012-10-10 Arnaud Charlet <charlet@adacore.com>
11301
f5b02f1e 11302 PR ada/54845
b46dbc6c
AC
11303 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11304
5d9de0d0
PC
113052012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11306
11307 PR c++/54194
11308 * c-common.c (warn_about_parentheses): Add location_t parameter;
11309 use EXPR_LOC_OR_LOC.
11310 * c-common.h: Update declaration.
11311
a212e43f
MG
113122012-10-09 Marc Glisse <marc.glisse@inria.fr>
11313
11314 PR c++/54427
11315 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11316 more operations. Make error messages optional.
11317 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11318 (scalar_to_vector): Declare.
11319
b1db7f91
JM
113202012-10-08 Jason Merrill <jason@redhat.com>
11321
11322 * c-common.c (c_common_reswords): Add thread_local.
11323
e28d52cf
DS
113242012-10-08 Dodji Seketeli <dodji@redhat.com>
11325
11326 PR c++/53528 C++11 attribute support
11327 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11328 new functions.
11329 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11330 static function.
11331 (handle_aligned_attribute): In choose strictest alignment
11332 among many. Use new check_cxx_fundamental_alignment_constraints.
11333 (handle_transparent_union_attribute): In c++11 attribute syntax,
11334 don't look through typedefs.
11335
3b78de56
AC
113362012-10-04 Arnaud Charlet <charlet@adacore.com>
11337
11338 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11339 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11340 out of dumpfile.h.
11341
6040bb5f
DC
113422012-09-25 Dehao Chen <dehao@google.com>
11343
11344 PR middle-end/54645
3b78de56 11345 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11346 map when read in the pch.
11347
3f8257db 113482012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11349
11350 * c-ada-spec.c: Style fixes.
11351
3f8257db 113522012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11353
11354 * c.opt (-fada-spec-parent): Define new command line switch.
11355 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11356 is specified, generate binding spec as a child of the specified unit.
11357
0ccb505d
PC
113582012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11359 Manuel López-Ibáñez <manu@gcc.gnu.org>
11360
11361 PR c++/53210
11362 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11363
c583af79
AC
113642012-08-23 Arnaud Charlet <charlet@adacore.com>
11365
11366 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11367 for pointers, and add missing Convention C pragma.
11368 (print_ada_struct_decl): Add missing aliased keyword.
11369 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11370
1a4049e7
JJ
113712012-08-17 Jakub Jelinek <jakub@redhat.com>
11372
11373 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11374 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11375 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11376 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11377 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11378
70b5e7dc
RG
113792012-08-10 Richard Guenther <rguenther@suse.de>
11380
11381 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11382
f8923f7e
SB
113832012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11384
11385 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11386 instead of separate pp_newline and pp_flush.
11387 (print_c_tree): Likewise.
11388
e45abe1f
RH
113892012-07-26 Richard Henderson <rth@redhat.com>
11390
11391 * c-common.c (handle_hot_attribute): Allow labels.
11392 (handle_cold_attribute): Likewise.
11393
332f1d24
JJ
113942012-07-20 Jakub Jelinek <jakub@redhat.com>
11395
11396 PR c++/28656
11397 * c-common.c (check_function_nonnull): Handle multiple nonnull
11398 attributes properly.
11399
7ee2468b
SB
114002012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11401
11402 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11403 * c-ada-spec.c: Likewise.
11404 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11405
ee7b28eb
SB
114062012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11407
11408 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11409 Remove code conditional on it.
11410
6bdf3519
SB
114112012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11412
11413 * c-gimplify.c: Do not include basic-block.h.
11414 * c-common.c: Do not include linfuncs.h.
11415
532aafad
SB
114162012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11417
11418 * c-common.h: Include tree.h.
11419
8d0d1915
JM
114202012-07-02 Jason Merrill <jason@redhat.com>
11421
11422 PR c++/53524
11423 * c-common.c (get_priority): Call default_conversion.
11424
fbc873ad
UB
114252012-07-01 Uros Bizjak <ubizjak@gmail.com>
11426
11427 * c-pch.c (c_common_write_pch): Remove unused variables.
11428
d4a10d0a
SB
114292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11430
11431 * cppspec.c: Moved from gcc/ to here.
11432
6f3a2e23
KT
114332012-06-27 Kai Tietz <ktietz@redhat.com>
11434
11435 PR preprocessor/37215
11436 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11437
8ca92d04
SB
114382012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11439
11440 * c-common.h (c_common_print_pch_checksum): Remove.
11441 * c-pch.c: Do not include output.h.
11442 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11443 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11444 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11445 (struct c_pch_header): Remove.
11446 (get_ident): Update gpch version.
11447 (pch_init): Do not print executable_checksum to asm_out_file.
11448 Do not fail if there is no asm_out_file to read back from. Set
11449 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11450 (c_common_write_pch): Verify that nothing was written to asm_out_file
11451 since pch_init was called. Do not write a c_pch_header, and do not
11452 copy from asm_out_file to the PCH.
11453 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11454 the content of asm_out_file from the PCH.
11455 (c_common_print_pch_checksum): Remove.
11456 * c-opts.c (c_common_init): Print out executable_checksum directly.
11457
70f42967
SB
114582012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11459
11460 * c-target.def (objc_declare_unresolved_class_reference,
11461 objc_declare_class_definition): Add new hooks.
11462
a8781821
SB
114632012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11464
11465 * c-lex.c: Do not include output.h.
11466 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11467 Remove uses of ASM_OUTPUT_IDENT.
11468
9e1a8dd1
RR
114692012-06-15 Marc Glisse <marc.glisse@inria.fr>
11470
11471 PR c++/51033
11472 * c-common.h (c_build_vec_perm_expr): Move decl here.
11473 * c-common.c (c_build_vec_perm_expr): Move definition
11474 here.
11475
6f07a821
SB
114762012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11477
11478 * c.opt (fconserve-space): Turn into a no-op.
11479
9faeb493 114802012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11481
11482 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11483 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11484 both the start and end of the function.
11485
a4b7d13c
SB
114862012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11487
11488 * c-common.c: Do not include output.h.
11489 * c-pragma.c: Likewise.
11490
c265f413
SA
114912012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11492
11493 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11494 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11495 (lang_decl_name): Handle namespace decls.
11496
be7a421e
SB
114972012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11498
11499 * c-ada-spec.c: Do not include output.h.
11500 * c-semantics.c: Likewise.
11501
65de6659
JM
115022012-05-29 Joseph Myers <joseph@codesourcery.com>
11503
11504 * c-common.c: Fix typo.
11505
ca5f4331
MM
115062012-05-29 Michael Matz <matz@suse.de>
11507
11508 * c-common.h (c_expand_decl): Remove prototype.
11509
4f7f7aca
MLI
115102012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11511
11512 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11513 * c-opts.c (c_common_handle_option): Remove code handling
11514 warn_missing_braces.
11515
4a792f9b
PC
115162012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11517
11518 PR c++/25137
11519 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11520 -Wmissing_braces.
11521
650dc14a
DS
115222012-05-22 Dodji Seketeli <dodji@redhat.com>
11523
11524 PR c++/53322
11525 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11526
9b095bf1
MLI
115272012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11528
11529 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11530 * c-opts.c (c_common_handle_option): Do not handle explicitly
11531 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11532
0b2c4be5
DS
115332012-05-16 Dodji Seketeli <dodji@redhat.com>
11534
11535 PR preprocessor/7263
ab20d992 11536 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11537 to cpp_classify_number. For diagnostics, use the precise location
11538 instead of the global input_location.
11539
a1bde5af
PC
115402012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11541
d02924ef 11542 PR c++/11856
a1bde5af
PC
11543 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11544
d1ede5f4
BS
115452012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11546
a1bde5af 11547 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11548
f2bc201f
MLI
115492012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11550
11551 PR 53063
11552 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11553 Wreorder): Use LangEnabledBy.
11554 * c-opts.c (c_common_handle_option): Do not enable them
11555 explicitly. Call lang-specific generated functions.
11556 (c_common_post_options): Do not set them here.
11557
95744782
MLI
115582012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11559
11560 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11561 Wmissing-field-initializers,Wmissing-parameter-type,
11562 Wold-style-declaration,Woverride-init): Use EnabledBy.
11563 * c-opts.c (c_common_post_options): Do not set here explicitly.
11564
7d5a5747
MLI
115652012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11566
11567 PR 53063
11568 * c-opts.c (c_common_handle_option): Use handle_generated_option
11569 to enable sub-options.
11570
5a3c9cf2
PC
115712012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11572
11573 PR c++/53158
11574 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11575
3ac8781c
RG
115762012-05-10 Richard Guenther <rguenther@suse.de>
11577
11578 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11579 adjust commentary about TYPE_IS_SIZETYPE types.
11580
1e537948
MLI
115812012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11582
11583 PR c++/53261
11584 * c-common.c (warn_logical_operator): Check that argument of
11585 integer_zerop is not NULL.
11586
f2c4a785
MLI
115872012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11588
11589 PR c/43772
11590 * c-common.c (warn_logical_operator): Do not warn if either side
11591 is already true or false.
11592
50f305ca
MLI
115932012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11594
11595 PR c/51712
11596 * c-common.c (expr_original_type): New.
11597 (shorten_compare): Do not warn for enumeration types.
11598
0c3641b0
MLI
115992012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11600
11601 * c.opt (fpermissive): Add Var(flag_permissive).
11602
7edaa4d2
MG
116032012-04-30 Marc Glisse <marc.glisse@inria.fr>
11604
11605 PR c++/51033
11606 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11607 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11608
b9c8da34
DS
116092012-04-30 Dodji Seketeli <dodji@redhat.com>
11610
11611 Add -Wvarargs option
ab20d992 11612 * c.opt (Wvarargs): Define new option.
b9c8da34 11613
e6c69da0
MLI
116142012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11615
11616 * c-common.c (check_function_arguments): Replace
11617 Wmissing-format-attribute with Wsuggest-attribute=format.
11618
90137d8f
MLI
116192012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11620
11621 * c.opt (Wsuggest-attribute=format): New. Alias of
11622 Wmissing-format-attribute.
11623 * c-format.c (decode_format_type): Replace
11624 Wmissing-format-attribute with Wsuggest-attribute=format.
11625 (check_function_format): Likewise.
11626
9faeb493 116272012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11628
11629 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11630 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11631 * c.opt: Add Wliteral-suffix.
11632
c1771a20
MLI
116332012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11634
11635 PR c/44774
11636 * c.opt (Wpedantic): New.
11637 (pedantic): Alias Wpedantic.
11638 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11639 (c_common_post_options): Likewise.
11640 (sanitize_cpp_opts): Likewise.
11641 * c-lex.c (interpret_float): Likewise.
11642 * c-format.c (check_format_types): Likewise.
11643 * c-common.c (pointer_int_sum): Likewise.
11644 (c_sizeof_or_alignof_type): Likewise.
11645 (c_add_case_label): Likewise.
11646 (c_do_switch_warnings): Likewise.
11647 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11648
04b391c1
JM
116492012-04-15 Jason Merrill <jason@redhat.com>
11650
11651 PR c++/52818
11652 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11653 (C_STD_NAME): Distinguish between C++98 and C++11.
11654
ac868f29
EB
116552012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11656
11657 PR target/52624
11658 * c-common.h (uint16_type_node): Rename into...
11659 (c_uint16_type_node): ...this.
11660 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11661 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11662
fd4116f4
MLI
116632012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11664
11665 * c-common.c (warn_if_unused_value): Move definition to here.
11666 * c-common.h (warn_if_unused_value): Move declaration to here.
11667
573ac65e
WB
116682012-03-23 William Bader <williambader@hotmail.com>
11669
11670 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11671
552b8185
JM
116722012-03-20 Jason Merrill <jason@redhat.com>
11673
11674 * c-common.h (enum cxx_dialect): Add cxx1y.
11675 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11676 test.
11677 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11678 * c-opts.c (c_common_post_options): Likewise.
11679 (set_std_cxx1y): New.
11680 (c_common_handle_option): Call it.
11681 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11682
04398fa8
PC
116832012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11684
11685 PR c++/14710
11686 * c.opt ([Wuseless-cast]): Add.
11687
d2a12ae7
RG
116882012-03-16 Richard Guenther <rguenther@suse.de>
11689
11690 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11691
a12bf402
MLI
116922012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11693
11694 PR c++/44783
11695 * c.opt (ftemplate-backtrace-limit) Add.
11696
5c30094f
RO
116972012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11698
11699 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11700 handling.
11701 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11702 (init_pragma): Don't register extern_prefix.
11703
21fa2faf
RG
117042012-03-12 Richard Guenther <rguenther@suse.de>
11705
11706 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11707 (builtin_type_for_size): Likewise.
11708
e3793c6f
JJ
117092012-02-13 Jakub Jelinek <jakub@redhat.com>
11710
11711 PR c++/52215
11712 * c-common.c (sync_resolve_params): Don't decide whether to convert
11713 or not based on TYPE_SIZE comparison, convert whenever arg_type
11714 is unsigned INTEGER_TYPE.
11715
93286335
PC
117162012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11717
11718 PR c/52118
11719 * c.opt ([Wunused-local-typedefs]): Fix description.
11720
7a421706
MS
117212012-01-24 Mike Stump <mikestump@comcast.net>
11722
11723 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11724 exactly.
11725
ba9b1f11
RG
117262012-01-18 Richard Guenther <rguenther@suse.de>
11727
11728 * c-opts.c (c_common_post_options): Reset LTO flags if
11729 we are about to generate a PCH.
11730
465406be
PC
117312012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11732
11733 PR c++/51777
11734 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11735 use pp_unsigned_wide_integer.
11736
aee15221
RG
117372012-01-10 Richard Guenther <rguenther@suse.de>
11738
11739 PR middle-end/51806
11740 * c-opts.c (c_common_handle_option): Move -Werror handling
11741 to language independent code.
11742
5720c0dc
RG
117432012-01-05 Richard Guenther <rguenther@suse.de>
11744
11745 PR middle-end/51764
11746 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11747 from common.opt.
11748
73ac190a
PC
117492011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11750
11751 PR c++/51316
11752 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11753 of array types with an unknown bound.
11754
48b0b196
JM
117552011-12-20 Joseph Myers <joseph@codesourcery.com>
11756
11757 * c-common.c (flag_isoc99): Update comment to refer to C11.
11758 (flag_isoc1x): Change to flag_isoc11.
11759 * c-common.h (flag_isoc99): Update comment to refer to C11.
11760 (flag_isoc1x): Change to flag_isoc11.
11761 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11762 C11.
11763 * c-opts.c (set_std_c1x): Change to set_std_c11.
11764 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11765 Call set_std_c11.
11766 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11767 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11768 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11769 standard.
11770 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11771 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11772 (std=gnu1x): Make alias of std=gnu11.
11773
d58d6eb5
JM
117742011-12-19 Jason Merrill <jason@redhat.com>
11775
11776 PR c++/51228
11777 * c-common.c (handle_transparent_union_attribute): Check the first
11778 field if the type is complete.
11779
b3908fcc
JW
117802011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11781
11782 PR libstdc++/51365
11783 * c-common.c (RID_IS_FINAL): Add.
11784 * c-common.h (RID_IS_FINAL): Add.
11785
fea3ca91
IS
117862011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11787
11788 * c.opt (fgnu-runtime): Provide full description.
11789 (fnext-runtime): Likewise.
11790 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11791
62bad7cd
AM
117922011-11-28 Andrew MacLeod <amacleod@redhat.com>
11793
11794 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11795 predefines in one place. Add LOCK_FREE predefines.
11796 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11797 new func.
11798
c466c4ff
AM
117992011-11-24 Andrew MacLeod <amacleod@redhat.com>
11800
11801 PR c/51256
9faeb493 11802 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11803 conditions
9faeb493
UB
11804 (resolve_overloaded_atomic_exchange,
11805 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11806 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11807 error_mark_node for error conditions.
9faeb493 11808
a5952633
RG
118092011-11-08 Richard Guenther <rguenther@suse.de>
11810
11811 PR middle-end/51010
ab20d992 11812 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11813
0a35513e
AH
118142011-11-07 Richard Henderson <rth@redhat.com>
11815 Aldy Hernandez <aldyh@redhat.com>
11816 Torvald Riegel <triegel@redhat.com>
11817
11818 Merged from transactional-memory.
11819
11820 * c-common.c (handle_tm_wrap_attribute,
11821 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11822 (struct c_common_reswords): Added __transaction* keywords.
11823 (struct c_common_attribute_table): Added transaction* and tm_regparm
11824 attributes.
11825 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11826 masks.
11827 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11828 find_tm_attribute): Declare.
11829
6d87092d
JM
118302011-11-07 Jason Merrill <jason@redhat.com>
11831
11832 PR c++/35688
11833 * c-common.c, c-common.h: Revert yesterday's changes.
11834
8e7860a1
JM
118352011-11-06 Jason Merrill <jason@redhat.com>
11836
11837 PR c++/35688
11838 * c-common.c (decl_has_visibility_attr): Split out from...
11839 (c_determine_visibility): ...here.
11840 * c-common.h: Declare it.
11841
d19fa6b5
JM
118422011-11-06 Joseph Myers <joseph@codesourcery.com>
11843
11844 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11845 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11846 type.
11847 (check_user_alignment): New. Split out of
11848 handle_aligned_attribute. Disallow integer constants with
11849 noninteger types. Conditionally allow zero.
11850 (handle_aligned_attribute): Use check_user_alignment.
11851 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11852
86951993
AM
118532011-11-06 Andrew MacLeod <amacleod@redhat.com>
11854 Richard Henderson <rth@redhat.com>
11855
11856 Merged from cxx-mem-model.
11857
11858 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11859 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11860 parameters that are the same type size.
11861 (get_atomic_generic_size): New. Find size of generic
11862 atomic function parameters and do typechecking.
11863 (add_atomic_size_parameter): New. Insert size into parameter list.
11864 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11865 either __atomic_exchange_n or external library call.
9faeb493 11866 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11867 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11868 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11869 __atomic_load_n or an external library call.
11870 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11871 __atomic_store_n or an external library call.
11872 (resolve_overloaded_builtin): Handle new __atomic builtins.
11873
cf9e9959
EB
118742011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11875
11876 PR c++/50608
11877 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11878 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11879 <INDIRECT_REF>: Return the argument.
11880 <ARRAY_REF>: Remove special code for negative offset.
11881 Call fold_build_pointer_plus instead of size_binop.
11882 (fold_offsetof): Remove STOP_REF argument and adjust.
11883 * c-common.h (fold_offsetof_1): Declare.
11884 (fold_offsetof): Remove STOP_REF argument.
11885
25339f10
JM
118862011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11887
11888 PR c++/50810
11889 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11890 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11891 Wnarrowing for C++0x and C++98.
11892 * c.opt ([Wnarrowing]): Update.
11893
89401152
PC
118942011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11895
11896 PR c++/44277
11897 * c.opt: Add Wzero-as-null-pointer-constant.
11898
97e3ad20
JM
118992011-10-31 Jason Merrill <jason@redhat.com>
11900
15694fdd
JM
11901 * c.opt (-fdeduce-init-list): Off by default.
11902
97e3ad20
JM
11903 PR c++/50920
11904 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11905 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11906 and -Wc++11-compat.
11907 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11908
fb9120e3
RAV
119092011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11910
11911 PR c++/30066
11912 * c.opt (fvisibility-inlines-hidden): Description change.
11913
3ce4f9e4
ESR
119142011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11915
11916 Implement C++11 user-defined literals.
11917 * c-common.c (build_userdef_literal): New.
11918 * c-common.def: New tree code.
11919 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11920 * c-lex.c (interpret_float): Add suffix parm.
11921 (c_lex_with_flags): Build literal tokens.
11922
5f53c243
PC
119232011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11924
11925 PR c++/50841
11926 Revert:
11927 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11928
11929 PR c++/50810
11930 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11931 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11932 Wnarrowing for C++0x and C++98.
11933 * c.opt ([Wnarrowing]): Update.
11934
263734e1
PC
119352011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11936
11937 PR c++/50810
11938 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11939 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11940 Wnarrowing for C++0x and C++98.
11941 * c.opt ([Wnarrowing]): Update.
11942
d2e312d7
PC
119432011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
11944
11945 PR c++/45385
11946 * c-common.c (conversion_warning): Remove code looking for
11947 artificial operands.
11948
d17687f6
DS
119492011-10-18 Dodji Seketeli <dodji@redhat.com>
11950
11951 PR bootstrap/50760
11952 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 11953 !NO_IMPLICIT_EXTERN_C.
d17687f6 11954
fc8396e9
PC
119552011-10-17 Michael Spertus <mike_spertus@symantec.com>
11956
11957 * c-common.c (c_common_reswords): Add __bases,
11958 __direct_bases.
11959 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
11960
119612011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
11962
11963 PR c++/50757
11964 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
11965
847e697a
TT
119662011-10-15 Tom Tromey <tromey@redhat.com>
11967 Dodji Seketeli <dodji@redhat.com>
11968
11969 * c.opt (fdebug-cpp): New option.
11970 * c-opts.c (c_common_handle_option): Handle the option.
11971 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
11972 output stream in parameter. Factorized from ...
11973 (maybe_print_line): ... this. Dump location debug information when
11974 -fdebug-cpp is in effect.
11975 (print_line_1): New static function. Takes an output stream in
11976 parameter. Factorized from ...
11977 (print_line): ... here. Dump location information when -fdebug-cpp
11978 is in effect.
11979 (scan_translation_unit): Dump location information when
11980 -fdebug-cpp is in effect.
11981
92582b75
TT
119822011-10-15 Tom Tromey <tromey@redhat.com>
11983 Dodji Seketeli <dodji@redhat.com>
11984
11985 * c.opt (ftrack-macro-expansion): New option. Handle it with and
11986 without argument.
11987 * c-opts.c (c_common_handle_option)<case
11988 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
11989 cases. Handle -ftrack-macro-expansion with and without argument.
11990
46427374
TT
119912011-10-15 Tom Tromey <tromey@redhat.com>
11992 Dodji Seketeli <dodji@redhat.com>
11993
11994 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
11995 (print_line, cb_define, do_line_change): Adjust to avoid touching
11996 the internals of struct line_map. Use the public API instead.
11997 * c-pch.c (c_common_read_pch): Likewise.
11998 * c-lex.c (fe_file_change): Likewise.
11999
fc8396e9
PC
120002011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12001
12002 PR c++/17212
12003 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12004
120052011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12006
12007 PR c++/33067
12008 * c-pretty-print.c (pp_c_floating_constant): Output
12009 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12010
e79983f4
MM
120112011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12012
12013 * c-common.c (def_builtin_1): Delete old interface with two
12014 parallel arrays to hold standard builtin declarations, and replace
12015 it with a function based interface that can support creating
12016 builtins on the fly in the future. Change all uses, and poison
12017 the old names. Make sure 0 is not a legitimate builtin index.
12018 * c-omp.c (c_finish_omp_barrier): Ditto.
12019 (c_finish_omp_taskwait): Ditto.
12020 (c_finish_omp_flush): Ditto.
12021
6637388f
TG
120222011-10-11 Tristan Gingold <gingold@adacore.com>
12023
12024 * c.opt: (fallow-parameterless-variadic-functions): New.
12025
3797cb21
DS
120262011-09-08 Dodji Seketeli <dodji@redhat.com>
12027
12028 PR c++/33255 - Support -Wunused-local-typedefs warning
12029 * c-common.h (struct c_language_function::local_typedefs): New
12030 field.
9faeb493
UB
12031 (record_locally_defined_typedef, maybe_record_typedef_use)
12032 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12033 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12034 (maybe_record_typedef_use)
12035 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12036 * c.opt: Declare new -Wunused-local-typedefs flag.
12037
693ddb1b
EB
120382011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12039
12040 PR middle-end/50266
12041 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12042 computations.
12043
830c740f
RG
120442011-09-05 Richard Guenther <rguenther@suse.de>
12045
12046 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12047 of integer_minus_one_node for empty array upper bounds.
12048
892a371f
DS
120492011-08-28 Dodji Seketeli <dodji@redhat.com>
12050
12051 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12052 it's the first time it's being called on this main TU.
12053
0e3fdb48
RB
120542011-08-24 Richard Guenther <rguenther@suse.de>
12055
12056 PR c/49396
12057 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12058
120592011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12060
12061 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12062 defined in cpp_init_builtins and c_cpp_builtins.
12063
d4a83c10
JM
120642011-08-19 Joseph Myers <joseph@codesourcery.com>
12065
12066 * c-common.c (c_common_reswords): Add __builtin_complex.
12067 * c-common.h (RID_BUILTIN_COMPLEX): New.
12068
bbceee64
JM
120692011-08-18 Joseph Myers <joseph@codesourcery.com>
12070
12071 * c-common.c (c_common_reswords): Add _Noreturn.
12072 (keyword_is_function_specifier): Handle RID_NORETURN.
12073 * c-common.h (RID_NORETURN): New.
12074
3f8257db 120752011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12076
12077 * c-common.c (unsafe_conversion_p): New function. Check if it is
12078 unsafe to convert an expression to the type.
12079 (conversion_warning): Adjust, use unsafe_conversion_p.
12080 * c-common.h (unsafe_conversion_p): New function declaration.
12081
20906c66
JJ
120822011-08-02 Jakub Jelinek <jakub@redhat.com>
12083
12084 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12085 (c_finish_omp_taskyield): New prototype.
12086 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12087 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12088 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12089 or RHS1 have side-effects, evaluate those too in the right spot,
12090 if it is a decl and LHS is also a decl, error out if they
12091 aren't the same.
12092 (c_finish_omp_taskyield): New function.
12093 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12094 * c-pragma.c (omp_pragmas): Add taskyield.
12095 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12096 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12097 PRAGMA_OMP_CLAUSE_MERGEABLE.
12098
770e5a2e
DS
120992011-07-25 Dodji Seketeli <dodji@redhat.com>
12100
12101 * c-common.h (set_underlying_type): Remove parm name from
12102 declaration.
12103
1baae426
RG
121042011-07-25 Romain Geissler <romain.geissler@gmail.com>
12105
12106 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12107
fcb21722
JM
121082011-07-22 Jason Merrill <jason@redhat.com>
12109
76f86d00
JM
12110 PR c++/49793
12111 * c.opt (Wnarrowing): New.
12112
3a636414
JM
12113 PR c++/30112
12114 * c-common.h: Declare c_linkage_bindings.
12115 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12116
fcb21722
JM
12117 PR c++/49813
12118 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12119 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12120 as flag_isoc99 for 'restrict'.
12121 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12122
02614448
ILT
121232011-07-21 Ian Lance Taylor <iant@google.com>
12124
12125 PR middle-end/49705
12126 * c-common.c (c_disable_warnings): New static function.
12127 (c_enable_warnings): New static function.
12128 (c_fully_fold_internal): Change local unused_p to bool. Call
12129 c_disable_warnings and c_enable_warnings rather than change
12130 c_inhibit_evaluation_warnings.
12131
34429675
JM
121322011-07-20 Jason Merrill <jason@redhat.com>
12133
12134 PR c++/6709 (DR 743)
12135 PR c++/42603 (DR 950)
12136 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12137 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12138 (CPP_DECLTYPE): New.
12139 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12140
5d49b6a7
RG
121412011-07-19 Richard Guenther <rguenther@suse.de>
12142
12143 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12144 * c-omp.c (c_finish_omp_for): Likewise.
12145
e84a58ff
EB
121462011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12147
12148 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12149 body on the next line.
12150
329af3c7
JM
121512011-07-08 Jason Merrill <jason@redhat.com>
12152
4063e61b
JM
12153 PR c++/45437
12154 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12155
329af3c7
JM
12156 PR c++/49673
12157 * c-common.c (c_apply_type_quals_to_decl): Don't check
12158 TYPE_NEEDS_CONSTRUCTING.
12159
1a072294
RG
121602011-07-06 Richard Guenther <rguenther@suse.de>
12161
12162 * c-common.c (c_common_nodes_and_builtins):
12163 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12164
fce5dddd
RG
121652011-07-05 Richard Guenther <rguenther@suse.de>
12166
12167 * c-common.c (c_common_nodes_and_builtins): Build all common
12168 tree nodes first.
12169
45d439ac
JJ
121702011-06-27 Jakub Jelinek <jakub@redhat.com>
12171
56300785
JJ
12172 * c-common.h (c_tree_chain_next): New static inline function.
12173
45d439ac
JJ
12174 * c-common.c (check_builtin_function_arguments): Handle
12175 BUILT_IN_ASSUME_ALIGNED.
12176
e0a8ecf2
AM
121772011-06-21 Andrew MacLeod <amacleod@redhat.com>
12178
12179 * c-common.c: Add sync_ or SYNC__ to builtin names.
12180 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12181
121822011-06-20 Pierre Vittet <piervit@pvittet.com>
12183
12184 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12185 handler.
12186 (gen_pragma_handler): New union.
12187 (internal_pragma_handler): New type.
12188 (c_register_pragma_with_data)
12189 (c_register_pragma_with_expansion_and_data): New functions.
12190
12191 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12192 (c_register_pragma, c_register_pragma_with_expansion)
12193 (c_invoke_pragma_handler): Changed to work with
12194 internal_pragma_handler.
12195 (c_register_pragma_with_data)
12196 (c_register_pragma_with_expansion_and_data): New functions.
12197
677f3fa8
JM
121982011-06-14 Joseph Myers <joseph@codesourcery.com>
12199
12200 * c-common.c: Include common/common-target.h.
12201 (handle_section_attribute): Use
12202 targetm_common.have_named_sections.
12203 * c-cppbuiltin.c: Include common/common-target.h.
12204 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12205
d7fc8c14
RG
122062011-06-10 Richard Guenther <rguenther@suse.de>
12207
12208 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12209 to print a IDENTIFIER_NODE.
12210
10e48e39
RO
122112011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12212 Joseph Myers <joseph@codesourcery.com>
12213
12214 * c.opt (fbuilding-libgcc): New option.
12215 * c-cppbuiltin.c (c_cpp_builtins): Define
12216 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12217
6976ae51
JM
122182011-06-07 Jason Merrill <jason@redhat.com>
12219
3ff60975
JM
12220 * c-common.c (max_tinst_depth): Lower default to 900.
12221
6976ae51
JM
12222 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12223
009db074
RG
122242011-06-07 Richard Guenther <rguenther@suse.de>
12225
12226 * c-common.c (c_common_nodes_and_builtins): Do not set
12227 size_type_node or call set_sizetype.
12228
b4592b92
DS
122292011-06-07 Dodji Seketeli <dodji@redhat.com>
12230
12231 PR debug/49130
12232 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12233 type when using pointer comparison to compare types.
b4592b92 12234
014ab419
JW
122352011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12236
12237 * c.opt: Add -Wdelete-non-virtual-dtor.
12238 * c-opts.c (c_common_handle_option): Include it in -Wall.
12239
4f60111f
NF
122402011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12241
12242 PR bootstrap/49190
12243
12244 Revert:
12245 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12246
12247 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12248 not tree_common.
12249
4cc4f2f4
JJ
122502011-05-27 Jakub Jelinek <jakub@redhat.com>
12251
12252 PR c++/49165
12253 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12254 C++ don't call c_common_truthvalue_conversion on void type arms.
12255
38e01f9e
NF
122562011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12257
12258 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12259 (stmt_list_stack): Define.
12260 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12261 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12262
92e948a8
NF
122632011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12264
12265 * c-common.c (warning_candidate_p): Check for BLOCKs.
12266
a2fc3e63
NF
122672011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12268
12269 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12270 not tree_common.
12271
0957c029
JJ
122722011-05-25 Jakub Jelinek <jakub@redhat.com>
12273
12274 * c-common.c (def_fn_type): Remove extra va_end.
12275
828fb3ba
JM
122762011-05-23 Jason Merrill <jason@redhat.com>
12277
12278 PR c++/48106
12279 * c-common.c (c_common_get_narrower): New.
12280 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12281
dde05067
NF
122822011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12283
12284 * c-common.h (check_function_arguments): Tweak prototype of
12285 check_function_arguments.
12286 * c-common.c (check_function_arguments): Likewise. Adjust
12287 calls to check_function_nonnull, check_function_format, and
12288 check_function_sentinel.
12289 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12290 separate attributes and typelist arguments. Use
12291 FOREACH_FUNCTION_ARGS to iterate over argument types.
12292
3c0d13bf
PC
122932011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12294
12295 * c-common.c (c_common_reswords): Reorder.
12296 * c-common.h (rid): Likewise.
12297
8242dd04
NF
122982011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12299
12300 * c-common.c (def_fn_type): Don't call build_function_type, call
12301 build_function_type_array or build_varargs_function_type_array
12302 instead.
12303 (c_common_nodes_and_builtins): Likewise.
12304
3d528853
NF
123052011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12306
12307 * c-common.c (c_add_case_label): Omit the loc argument to
12308 build_case_label.
12309 * c-common.h (build_case_label): Remove.
12310 * c-semantics.c (build_case_label): Remove.
12311
a04a722b
JM
123122011-05-05 Joseph Myers <joseph@codesourcery.com>
12313
12314 * c-objc.h (objc_start_method_definition): Update prototype.
12315 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12316
e19a18d4
NF
123172011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12318
12319 * c-common.c (check_main_parameter_types): Reindent. Don't use
12320 TYPE_ARG_TYPES directly.
12321 (handle_nonnull_attribute): Likewise.
12322 (sync_resolve_params): Likewise.
12323 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12324 to check_format_string.
12325 (handle_format_attribute): Likewise.
12326 (check_format_string): Take a function type to examine instead of
12327 a type list. Use a function_arg_iterator to step through argument
12328 types.
12329
c62c040f
RG
123302011-05-04 Richard Guenther <rguenther@suse.de>
12331
12332 * c-common.c (fix_string_type): Use size_int for index type bounds.
12333 (start_fname_decls): Do not pass NULL to build_int_cst.
12334 (c_init_attributes): Likewise.
12335 * c-lex.c (c_lex_with_flags): Likewise.
12336
c12ff9d8
JM
123372011-04-27 Jason Merrill <jason@redhat.com>
12338
12339 * c-common.c (make_tree_vector_from_list): New.
12340 * c-common.h: Declare it.
12341
304dfbe3
RG
123422011-04-26 Richard Guenther <rguenther@suse.de>
12343
12344 PR preprocessor/48248
12345 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12346 for output size with -P.
12347
3c0d13bf
PC
123482011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12349
12350 * c-common.c (struct c_common_resword): Add __underlying_type.
12351 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12352
04695783
JM
123532011-04-20 Jim Meyering <meyering@redhat.com>
12354
12355 * c-format.c (init_dollar_format_checking): Remove useless
12356 if-before-free.
12357
0dc33c3c
NP
123582011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12359
12360 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12361 (objc_detect_field_duplicates): New.
0dc33c3c 12362 * stub-objc.c: Likewise.
3c0d13bf 12363
c59633d9
NP
123642011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12365
12366 * stub-objc.c (objc_declare_protocols): Renamed to
12367 objc_declare_protocol.
12368 * c-objc.h: Likewise.
3c0d13bf 12369
32dabdaf
NP
123702011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12371
12372 * stub-objc.c (objc_declare_class): Updated argument name.
12373
81f653d6
NF
123742011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12375
12376 * c-common.h (c_common_init_ts): Declare.
12377 * c-common.c (c_common_init_ts): Define.
12378
eb345401
NP
123792011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12380
12381 * c-objc.h (objc_build_message_expr): Updated prototype.
12382 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12383
a358e188
MJ
123842011-04-12 Martin Jambor <mjambor@suse.cz>
12385
12386 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12387 of cgraph_node.
12388
e6313a78
RG
123892011-04-11 Richard Guenther <rguenther@suse.de>
12390
12391 * c-common.c (complete_array_type): Build a range type of
12392 proper type.
12393
dcf0c47e
NF
123942011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12395
12396 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12397 (handle_type_generic_attribute): Likewise.
12398
1ee44b26
JM
123992011-04-07 Jason Merrill <jason@redhat.com>
12400
12401 PR c++/48450
12402 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12403 conversion from C++0x scoped enum.
12404
acce4e77
JM
124052011-04-06 Joseph Myers <joseph@codesourcery.com>
12406
12407 * c-target-def.h: New file.
12408 * c-target.def: New file.
12409 * c-target.h: New file.
12410 * c-common.c (targetcm): Don't define here.
12411 * c-common.h (default_handle_c_option): Declare.
12412 * c-format.c: Include c-target.h instead of target.h.
12413 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12414 include tm.h.
12415 (default_handle_c_option): Move from targhooks.c.
12416
e2eefb55
JJ
124172011-03-29 Jakub Jelinek <jakub@redhat.com>
12418
12419 PR preprocessor/48248
12420 * c-ppoutput.c (print): Add src_file field.
12421 (init_pp_output): Initialize it.
12422 (maybe_print_line): Don't optimize by adding up to 8 newlines
12423 if map->to_file and print.src_file are different file.
12424 (print_line): Update print.src_file.
12425
ba78087b
KT
124262011-03-25 Kai Tietz <ktietz@redhat.com>
12427
12428 * c-ada-spec.c (compare_comment): Use filename_cmp
12429 instead of strcmp for filename.
12430
0edf1bb2
JL
124312011-03-25 Jeff Law <law@redhat.com>
12432
adfac8df 12433 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12434
c7dc8804
JM
124352011-03-25 Jason Merrill <jason@redhat.com>
12436
12437 * c.opt: Add -std=c++03.
12438
d1d879b1
EB
124392011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12440
12441 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12442
3f8257db 124432011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12444
12445 PR target/12171
5050afdf
KT
12446 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12447 Display allowed attributes for function pointer types.
12448 (pp_c_attributes_display): New function to display
12449 attributes having affects_type_identity flag set to true.
12450 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12451
62d784f7
KT
12452 * c-common.c (c_common_attribute_table):
12453 Add new element.
12454 (c_common_format_attribute_table): Likewise.
12455
82d37118
JM
124562011-03-18 Jason Merrill <jason@redhat.com>
12457
49a000c3
JM
12458 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12459 * c-common.h: Don't declare it here.
12460 * c-common.c: Or define it here.
12461 * c-opts.c (c_common_handle_option): Or set it here.
12462
82d37118
JM
12463 PR c++/35315
12464 * c-common.c (handle_transparent_union_attribute): Don't
12465 make a duplicate type in C++.
12466
17bc631c
JM
124672011-03-15 Jason Merrill <jason@redhat.com>
12468
12469 * c-common.c (max_constexpr_depth): New.
12470 * c-common.h: Declare it.
12471 * c-opts.c (c_common_handle_option): Set it.
12472 * c.opt (fconstexpr-depth): New option.
12473
1b9b91a6
JM
124742011-03-11 Jason Merrill <jason@redhat.com>
12475
f231b5ff
JM
12476 * c-common.c (attribute_takes_identifier_p): Add missing const.
12477
1b9b91a6
JM
12478 PR c++/46803
12479 * c-common.c (attribute_takes_identifier_p): Assume that an
12480 unknown attribute takes an identifier.
12481
a19e4d44
NF
124822011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12483
12484 PR c/47786
12485 * c-common.c (c_type_hash): Call list_length instead of iterating
12486 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12487
982d62f6
JJ
124882011-02-19 Jakub Jelinek <jakub@redhat.com>
12489
12490 PR c/47809
12491 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12492
0a256240
NP
124932011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12494
12495 * c.opt (fobjc-abi-version=) New.
12496 (fobjc-nilcheck): New.
12497
ba9e6dd5
NF
124982011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12499
12500 PR c++/46890
12501 * c-common.h (keyword_is_decl_specifier): Declare.
12502 * c-common.c (keyword_is_decl_specifier): Define.
12503 (keyword_is_function_specifier): New function.
12504
7273813a
JJ
125052011-01-26 Jakub Jelinek <jakub@redhat.com>
12506
12507 PR c/47473
12508 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12509 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12510 REAL_TYPE.
12511
908ef79b
AC
125122011-01-26 Arnaud Charlet <charlet@adacore.com>
12513
12514 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12515
237e9384
JJ
125162011-01-26 Jakub Jelinek <jakub@redhat.com>
12517
12518 PR pch/47430
12519 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12520 after init_c_lex if pch_file is set.
12521
47ea1edf
DK
125222011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12523
d4dba752 12524 PR c++/43601
47ea1edf
DK
12525 * c.opt (-fkeep-inline-dllexport): New switch.
12526
2aa9c6ae
RG
125272011-01-12 Richard Guenther <rguenther@suse.de>
12528
12529 PR middle-end/32511
12530 * c-common.c (handle_weak_attribute): Warn instead of error
12531 on declaring an inline function weak.
12532
7bd11157
TT
125332011-01-05 Tom Tromey <tromey@redhat.com>
12534
12535 * c-common.h (lvalue_error): Update.
12536 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12537 not error.
12538
0e66e494 125392010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12540
b4f588c4
NP
12541 PR objc/47075
12542 * c-objc.h (objc_finish_message_expr): Added argument to
12543 prototype.
12544
f4da8dce
NF
125452010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12546
12547 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12548 Use prototype_p.
12549
46270f14
NP
125502010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12551
12552 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12553 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12554
4816c593
NF
125552010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12556
12557 * c-common.h (readonly_error): Declare.
12558 * c-common.c (readonly_error): Define.
12559
7a6daeb0
NF
125602010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12561
12562 * c-common.h (invalid_indirection_error): Declare.
12563 * c-common.c (invalid_indirection_error): Define.
12564
892f6119
RG
125652010-12-03 Richard Guenther <rguenther@suse.de>
12566
12567 PR c/46745
12568 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12569 (pp_c_unary_expression): Likewise.
12570 (pp_c_expression): Likewise.
12571
6c39e757
NP
125722010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12573
12574 * c-common.h (objc_finish_function): New.
12575 (objc_non_volatilized_type): Removed.
12576 (objc_type_quals_match): Removed.
12577 * stub-objc.c (objc_finish_function): New.
12578 (objc_non_volatilized_type): Removed.
12579 (objc_type_quals_match): Removed.
9faeb493 12580
7c475d11
JM
125812010-11-30 Joseph Myers <joseph@codesourcery.com>
12582
12583 * c-common.h (parse_optimize_options): Declare.
12584 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12585 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12586
71f3e391
JM
125872010-11-29 Joseph Myers <joseph@codesourcery.com>
12588
12589 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12590 GET_ENVIRONMENT.
12591 * c-pch.c (O_BINARY): Don't define here.
12592 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12593
d5fabb58
JM
125942010-11-25 Joseph Myers <joseph@codesourcery.com>
12595
12596 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12597 targetm.except_unwind_info.
12598
299404a1
JM
125992010-11-23 Joseph Myers <joseph@codesourcery.com>
12600
12601 * c-opts.c (c_common_handle_option): Pass location to
12602 set_struct_debug_option.
12603
c98cd5bf
JM
126042010-11-23 Joseph Myers <joseph@codesourcery.com>
12605
12606 * c-common.c (visibility_options): Move from ../opts.c.
12607 * c-common.h (struct visibility_flags, visibility_options):
12608 Declare here.
12609 * c-opts.c (finish_options): Rename to c_finish_options.
12610 (c_common_init): Update call to finish_options.
12611
a9546771
NP
126122010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12613
12614 PR objc/34033
12615 * c-lex.c (lex_string): Check that each string in an Objective-C
12616 string concat sequence starts with either one or zero '@', and
12617 that there are no spurious '@' signs at the end.
12618
24a57808
JM
126192010-11-20 Joseph Myers <joseph@codesourcery.com>
12620
12621 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12622 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12623 HANDLE_PRAGMA_VISIBILITY.
12624 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12625 HANDLE_PRAGMA_VISIBILITY): Don't define.
12626 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12627
a9aa2c3a
NF
126282010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12629
12630 PR c++/16189
12631 PR c++/36888
12632 PR c++/45331
12633 * c-common.h (keyword_begins_type_specifier): Declare.
12634 (keyword_is_storage_class_specifier): Declare.
12635 (keyword_is_type_qualifier): Declare.
12636 * c-common.c (keyword_begins_type_specifier): New function.
12637 (keyword_is_storage_class_specifier): New function.
12638 (keyword_is_type_qualifier): Declare.
12639
5386338c
JM
126402010-11-19 Joseph Myers <joseph@codesourcery.com>
12641
12642 PR c/46547
12643 * c-common.c (in_late_binary_op): Define.
12644 (c_common_truthvalue_conversion): Check in_late_binary_op before
12645 calling c_save_expr.
12646 * c-common.h (in_late_binary_op): Declare.
12647
69ccdddb
JM
126482010-11-19 Joseph Myers <joseph@codesourcery.com>
12649
12650 * c-opts.c (c_common_handle_option): Update calls to
12651 set_struct_debug_option.
12652
6b192a09
NP
126532010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12654
12655 * c-common.h (objc_declare_protocols): Added additional argument.
12656 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12657
fb52b50a
NF
126582010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12659
12660 PR c/33193
12661 * c-common.h (build_real_imag_expr): Declare.
12662 * c-semantics.c (build_real_imag_expr): Define.
12663
b37421c6
JM
126642010-11-17 Joseph Myers <joseph@codesourcery.com>
12665
12666 * c-opts.c (c_common_parse_file): Take no arguments.
12667 * c-common.h (c_common_parse_file): Update prototype.
12668
07078664
JJ
126692010-11-16 Jakub Jelinek <jakub@redhat.com>
12670
12671 PR c++/46401
12672 * c-common.c (warning_candidate_p): Don't track non-const calls
12673 or STRING_CSTs.
12674
c6a13190
ILT
126752010-11-15 Ian Lance Taylor <iant@google.com>
12676
12677 * c-lex.c (init_c_lex): Set macro debug callbacks if
12678 flag_dump_go_spec is set.
12679
925e8657
NP
126802010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12681
12682 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12683 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12684
bb0a9581
NF
126852010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12686
12687 PR preprocessor/45038
12688 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12689 dialects.
12690
c5fa0890
JM
126912010-11-12 Joseph Myers <joseph@codesourcery.com>
12692
12693 * c-common.h (c_family_lang_mask): Declare.
12694 * c-opts.c (c_family_lang_mask): Make extern.
12695 * c-pragma.c (handle_pragma_diagnostic): Use
12696 control_warning_option.
12697
a4d8c676
JM
126982010-11-12 Joseph Myers <joseph@codesourcery.com>
12699
12700 * c-common.c (parse_optimize_options): Update call to
12701 decode_options.
12702 * c-common.h (c_common_handle_option): Update prototype.
12703 * c-opts.c (c_common_handle_option): Take location_t parameter and
12704 pass it to other functions.
12705
f954bd2c
JM
127062010-11-11 Joseph Myers <joseph@codesourcery.com>
12707
12708 * c-opts.c (warning_as_error_callback): Remove.
12709 (c_common_initialize_diagnostics): Don't call
12710 register_warning_as_error_callback.
12711 (c_common_handle_option): Handle -Werror=normalized= here.
12712
d8a07487
JM
127132010-11-10 Joseph Myers <joseph@codesourcery.com>
12714
12715 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12716 in diagnostic.
12717 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12718 letter.
12719 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12720 Remove trailing '.' from diagnostics.
12721 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12722
d5478783
JM
127232010-11-10 Joseph Myers <joseph@codesourcery.com>
12724
12725 * c-common.c (parse_optimize_options): Pass global_dc to
12726 decode_options.
12727 * c-opts.c (c_common_handle_option): Pass &global_options to
12728 set_Wstrict_aliasing.
12729 * c.opt (v): Don't mark Common or document here.
12730
91ebb981
IS
127312010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12732
12733 PR target/44981
12734 * c-format.c (format_type): New type gcc_objc_string_format_type.
12735 (valid_stringptr_type_p): New.
12736 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12737 (check_format_string): Pass expected type, use
91ebb981
IS
12738 valid_stringptr_type_p (), check that the format string types are
12739 consistent with the format specification.
12740 (decode_format_attr): Warn if NSString is used outside objective-c.
12741 (format_types_orig): Add NSString.
12742 (format_name): New.
12743 (format_flags): New.
12744 (check_format_arg): Handle format strings requiring an external parser.
12745 first_target_format_type: New variable.
12746 (handle_format_attribute): Set up first_target_format_type, pass the
12747 expected format arg string type to check_format_string().
ab20d992 12748 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12749 * stub-objc.c (objc_string_ref_type_p): New.
12750 (objc_check_format_arg): New.
12751
bede2adc
NP
127522010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12753
9faeb493 12754 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12755 * c-common.h (objc_build_class_component_ref): New.
12756 * stub-objc.c (objc_build_class_component_ref): New.
12757
9a179d01
NP
127582010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12759
12760 * c.opt (Wproperty-assign-default): New option.
12761
22d8d616
NP
127622010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12763
12764 Implemented -fobjc-std=objc1 flag.
12765 * c.opt (fobjc-std=objc1): New option.
12766
2debdb4f
NP
127672010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12768
12769 Implemented format and noreturn attributes for Objective-C methods.
12770 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12771 attribute for Objective-C methods.
12772
ec52b111
JM
127732010-10-31 Jason Merrill <jason@redhat.com>
12774
12775 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12776 EXPR_LOC_OR_HERE.
12777
46a88c12
NP
127782010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12779
12780 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12781 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12782 (objc_add_property_declaration): Removed arguments for copies and
12783 ivar.
12784 (objc_build_getter_call): Renamed to
12785 objc_maybe_build_component_ref.
12786 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12787 (objc_is_property_ref): New.
12788 * c-common.c (c_common_reswords): Removed copies and ivar.
12789 * stub-objc.c (objc_add_property_declaration): Removed arguments
12790 for copies and ivar.
12791 (objc_build_getter_call): Renamed to
12792 objc_maybe_build_component_ref.
12793 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12794 (objc_is_property_ref): New.
9faeb493 12795
1e4bf85b
AC
127962010-10-29 Arnaud Charlet <charlet@adacore.com>
12797 Matthew Gingell <gingell@adacore.com>
12798
12799 * c-ada-spec.c (separate_class_package): New function.
12800 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12801 name of their enclosing package.
12802 (print_ada_declaration): Use separate_class_package.
12803
81f0bab2
JM
128042010-10-27 Jason Merrill <jason@redhat.com>
12805
2b08f2c5
JM
12806 * c-common.c (c_common_reswords): Add __is_literal_type.
12807 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12808
81f0bab2
JM
12809 * c-common.c (check_case_value): Remove special C++ code.
12810
200290f2
NP
128112010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12812
12813 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12814 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12815 and RID_LAST_PATTR.
12816 (objc_add_property_declaration): Added additional arguments.
12817 (objc_property_attribute_kind): Removed.
12818 (objc_set_property_attr): Removed.
12819 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12820 copy and nonatomic.
12821 * stub-objc.c (objc_add_property_declaration): Added additional
12822 arguments.
12823 (objc_set_property_attr): Removed.
9faeb493 12824
f614132b
NP
128252010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12826
12827 * c-common.h (objc_add_property_variable): Renamed to
12828 objc_add_property_declaration. Added location argument.
12829 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12830
b8a18805
NP
128312010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12832
12833 * c-common.h (objc_maybe_printable_name): New.
12834 * stub-objc.c (objc_maybe_printable_name): New.
12835
3f8257db
JJ
128362010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12837 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12838
12839 * c-common.h (c_common_mark_addressable_vec): Declare.
12840 * c-common.c (c_common_mark_addressable_vec): New function.
12841
249a82c4
NP
128422010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12843
12844 * c-common.h (objc_set_method_type): Removed.
12845 (objc_add_method_declaration): Added boolean argument.
12846 (objc_start_method_definition): Same change.
12847 (objc_build_method_signature): Same change.
12848 * stub-objc.c (objc_set_method_type): Removed.
12849 (objc_add_method_declaration): Added boolean argument.
12850 (objc_start_method_definition): Same change.
12851 (objc_build_method_signature): Same change.
12852
977e30bc
NP
128532010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12854
12855 * c-common.h (finish_file): Removed.
12856 (objc_write_global_declarations): New.
12857 * c-opts.c (c_common_parse_file): Do not call finish_file.
12858 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12859
da57d1b9
NP
128602010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12861
12862 Implemented parsing @synthesize and @dynamic for
12863 Objective-C/Objective-C++.
12864 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12865 (objc_add_synthesize_declaration): New.
12866 (objc_add_dynamic_declaration): New.
12867 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12868 * stub-objc.c (objc_add_synthesize_declaration): New.
12869 (objc_add_dynamic_declaration): New.
9faeb493 12870
0069111f
MM
128712010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12872
12873 PR target/46041
12874 * c-cppbuiltin.c (mode_has_fma): Move function here from
12875 builtins.c. Don't use the fma optab, instead just use the
12876 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12877 using -save-temps.
12878
e426b47b
NP
128792010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12880
12881 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12882
3f8257db 12883 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12884
9faeb493 12885 Radar 4330422
e426b47b
NP
12886 * c-common.h (objc_non_volatilized_type): New declaration
12887 * stub-objc.c (objc_non_volatilized_type): New stub.
12888
90fbfdc3
NP
128892010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12890
e426b47b 12891 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12892
ab20d992 12893 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12894
9faeb493 12895 Radar 4133425
90fbfdc3 12896 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12897 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12898
c37d8c30
IS
128992010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12900
12901 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12902 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12903 (objc_ivar_visibility_kind): New enum.
12904 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12905 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12906 visibility enum.
12907
1b1562a5
MM
129082010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12909
12910 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12911 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12912 has the appropriate fma builtins.
12913 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12914
668ea4b1
IS
129152010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12916
1b1562a5 12917 merge from FSF apple 'trunk' branch.
3f8257db 12918 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12919
668ea4b1
IS
12920 Radars 4436866, 4505126, 4506903, 4517826
12921 * c-common.c (c_common_resword): Define @property and its attributes.
12922 * c-common.h: Define property attribute enum entries.
12923 (OBJC_IS_PATTR_KEYWORD): New.
12924 (objc_property_attribute_kind): New enum.
12925 Declare objc_set_property_attr (), objc_add_property_variable (),
12926 objc_build_getter_call () and objc_build_setter_call ().
12927 * stub-objc.c (objc_set_property_attr): New stub.
12928 (objc_add_property_variable): Likewise.
12929 (objc_build_getter_call): Likewise.
12930 (objc_build_setter_call) Likewise.
1b1562a5 12931
a1178b30
IS
129322010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12933
1b1562a5 12934 merge from FSF apple 'trunk' branch.
ab20d992 12935 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
12936
12937 Radar 3803157 (method attributes)
12938 * c-common.c (handle_deprecated_attribute): Recognize
12939 objc methods as valid declarations.
12940 * c-common.h: Declare objc_method_decl ().
1b1562a5 12941 * stub-objc.c (objc_method_decl): New stub.
a1178b30 12942
a75bfaa6
JM
129432010-10-08 Joseph Myers <joseph@codesourcery.com>
12944
12945 * c-common.c (parse_optimize_options): Call
12946 decode_cmdline_options_to_array_default_mask before
12947 decode_options. Update arguments to decode_options.
12948 * c-common.h (c_common_init_options_struct): Declare.
12949 * c-opts.c (c_common_init_options_struct): New. Split out from
12950 c_common_init_options.
12951
f05b9d93
NP
129522010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
12953
12954 Implemented fast enumeration for Objective-C.
12955 * c-common.h (objc_finish_foreach_loop): New.
12956 * stub-objc.c (objc_finish_foreach_loop): New.
12957
1ebe4b4f
JM
129582010-10-05 Joseph Myers <joseph@codesourcery.com>
12959
12960 * c-common.h (struct diagnostic_context): Don't declare here.
12961 (c_common_initialize_diagnostics): Declare using
12962 diagnostic_context typedef.
12963 * c-opts.c (c_common_handle_option): Pass global_dc to
12964 handle_generated_option.
12965
d4d24ba4
JM
129662010-10-04 Joseph Myers <joseph@codesourcery.com>
12967
12968 * c-opts.c (c_common_handle_option): Pass &global_options_set to
12969 handle_generated_option.
12970
478a1c5b
ILT
129712010-10-03 Ian Lance Taylor <iant@google.com>
12972
12973 * c.opt (-fplan9-extensions): New option.
12974
82a1c2fe
FXC
129752010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12976
12977 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
12978 Remove.
12979 (c_cpp_builtins): Call functions from cppbuiltin.c instead
12980 of duplicating code.
12981
92902b1b
IS
129822010-09-30 Iain Sandoe <iains@gcc.gnu.org>
12983
12984 * c-common.c: Add two new entries for @optional
12985 and @required keywords.
12986
12987 merge from FSF 'apple/trunk' branch.
3f8257db 12988 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
12989
12990 Radar 4386773
12991 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
12992 objective-c keywords.
12993 (objc_set_method_opt): New declaration.
12994 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 12995
46625112
JM
129962010-09-30 Joseph Myers <joseph@codesourcery.com>
12997
12998 * c-common.c (handle_optimize_attribute): Pass &global_options to
12999 cl_optimization_save and cl_optimization_restore.
13000 * c-opts.c (c_common_handle_option): Pass &global_options to
13001 handle_generated_option.
13002 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13003 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13004 &global_options to cl_optimization_restore.
13005
49b91f05
NP
130062010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13007
13008 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13009 Objective-C/Objective-C++ keywords.
13010
13ed556f 130112010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13012
9faeb493
UB
13013 Merge from 'apple/trunk' branch on FSF servers.
13014
3f8257db 13015 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13016
13017 Radar 4281748
13018 * c-common.h (objc_check_global_decl): New declaration.
13019 * stub-objc.c (objc_check_global_decl): New stub.
13020
f0036cca
JM
130212010-09-29 Joseph Myers <joseph@codesourcery.com>
13022
13023 * c.opt: Don't use VarExists.
13024
e3339d0f
JM
130252010-09-29 Joseph Myers <joseph@codesourcery.com>
13026
13027 * c-common.c (c_cpp_error): Update names of diagnostic_context
13028 members.
13029 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13030 cl_optimization members.
13031 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13032 sanitize_cpp_opts, finish_options): Update names of cpp_options
13033 members.
13034
1973201f
NP
130352010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13036
13037 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13038 (objc_is_reserved_word): Removed.
13039 * c-common.c: Updated comments.
13040 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13041 objc_is_reserved_word.
13042 * stub-objc.c (objc_is_reserved_word): Removed.
13043
f7e71da5
IS
130442010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13045
9faeb493 13046 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13047 include attributes.
13048 (objc_start_method_definition): Likewise.
13049 (objc_build_keyword_decl): Likewise.
13050 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13051 (objc_start_method_definition): Likewise.
13052 (objc_build_keyword_decl): Likewise.
13053
c165dca7
IS
130542010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13055
13056 * c-common.h (objc_start_class_interface): Adjust prototype.
13057 (objc_start_category_interface): Likewise.
13058 (objc_start_protocol): Likewise.
13059 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13060 (objc_start_class_interface): Likewise.
13061 (objc_start_category_interface): Likewise.
13062
7458026b
ILT
130632010-09-27 Ian Lance Taylor <iant@google.com>
13064
13065 * c-common.c (c_common_attribute_table): Add no_split_stack.
13066 (handle_no_split_stack_attribute): New static function.
13067
b581b85b
NP
130682010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13069
9faeb493 13070 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13071
3f8257db 13072 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13073
9faeb493 13074 Radar 4229905
b581b85b
NP
13075 * c-common.h (objc_have_common_type): New declaration.
13076 * stub-objc.c (objc_have_common_type): New stub.
13077
13078 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13079
13080 Radar 4154928
13081 * c-common.h (objc_common_type): New prototype.
9faeb493 13082 * stub-objc.c (objc_common_type): New stub.
b581b85b 13083
46a4da10
JH
130842010-09-24 Jan Hubicka <jh@suse.cz>
13085
13086 * c-common.c (handle_leaf_attribute): New function.
13087 (struct attribute_spec c_common_att): Add leaf.
13088
e200444e
JM
130892010-09-22 Joseph Myers <joseph@codesourcery.com>
13090
13091 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13092 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13093 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13094 -include-barrier, -include-directory, -include-directory=,
13095 -include-directory-after, -include-directory-after=,
13096 -include-prefix, -include-prefix=, -include-with-prefix,
13097 -include-with-prefix=, -include-with-prefix-after,
13098 -include-with-prefix-after=, -include-with-prefix-before,
13099 -include-with-prefix-before=, -no-integrated-cpp,
13100 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13101 -output=, -pedantic, -pedantic-errors, -preprocess,
13102 -print-missing-file-dependencies, -trace-includes, -traditional,
13103 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13104 -user-dependencies, -verbose, -write-dependencies,
13105 -write-user-dependencies, no-integrated-cpp, traditional): New.
13106
29a80ea6
NP
131072010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13108
13109 PR objc/23710
ac1fc2fc
NP
13110 * c-common.h (objc_start_method_definition): Return bool instead
13111 of void.
13112 * stub-objc.c (objc_start_method_definition): Return bool instead
13113 of void.
13114
131152010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13116
13117 PR objc/25965
13118 * c-common.h (objc_get_interface_ivars): New declaration.
13119 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13120
de621752
ILT
131212010-09-15 Ian Lance Taylor <iant@google.com>
13122
13123 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13124 messages. Remove period at end of warning message.
de621752 13125
ba885ec5
NS
131262010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13127
13128 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13129 (handle_alias_attribute): ... here.
13130 (handle_ifunc_attribute): New.
13131
c5ee1358
MM
131322010-09-06 Mark Mitchell <mark@codesourcery.com>
13133
13134 * c-common.h (do_warn_double_promotion): Declare.
13135 * c-common.c (do_warn_double_promotion): Define.
13136
0a0b3574
MM
131372010-09-05 Mark Mitchell <mark@codesourcery.com>
13138
13139 * c.opt (Wdouble-promotion): New.
13140
d1779886
JM
131412010-09-02 Joseph Myers <joseph@codesourcery.com>
13142
13143 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13144 fvtable-thunks, fxref): Mark no longer supported in help text.
13145
2d2bd949
JM
131462010-09-02 Joseph Myers <joseph@codesourcery.com>
13147
13148 * c.opt (Wimport, fall-virtual, falt-external-templates,
13149 fdefault-inline, fenum-int-equiv, fexternal-templates,
13150 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13151 fname-mangling-version-, fnew-abi, fnonnull-objects,
13152 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13153 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13154 applicable.
13155 (fhandle-exceptions): Mark with Alias and Warn.
13156 * c-opts.c (c_common_handle_option): Don't handle options marked
13157 as ignored.
13158
5de8299c
JM
131592010-09-02 Joseph Myers <joseph@codesourcery.com>
13160
13161 * c.opt (Wcomments, Werror-implicit-function-declaration,
13162 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13163 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13164 aliases.
13165 * c-common.c (option_codes): Use OPT_Wcomment instead of
13166 OPT_Wcomments.
13167 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13168 Don't handle options marked as aliases.
13169
0ceb0201
RG
131702010-08-25 Richard Guenther <rguenther@suse.de>
13171
13172 * c-common.c (c_common_get_alias_set): Remove special
13173 handling for pointers.
13174
ac47786e
NF
131752010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13176
13177 * c-common.c: Use FOR_EACH_VEC_ELT.
13178 * c-gimplify.c: Likewise.
13179 * c-pragma.c: Likewise.
13180
c878765b
JM
131812010-08-16 Joseph Myers <joseph@codesourcery.com>
13182
13183 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13184 RejectDriver.
13185 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13186 RejectDriver.
13187 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13188 instead of OPT_MDX and OPT_MMDX.
13189
603349bf
JM
131902010-08-16 Joseph Myers <joseph@codesourcery.com>
13191
13192 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13193
644fa7ac
JM
131942010-08-12 Joseph Myers <joseph@codesourcery.com>
13195
13196 * c.opt (MD, MMD): Change to MDX and MMDX.
13197 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13198
481e1176
JM
131992010-08-11 Joseph Myers <joseph@codesourcery.com>
13200
13201 * c-opts.c (c_common_handle_option): Call handle_generated_option
13202 instead of handle_option.
13203
ac8dc9f7
NF
132042010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13205
13206 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13207 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13208
4f8c876d
NF
132092010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13210
13211 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13212 (pending_redefine_extname): Change type to a VEC.
13213 (add_to_renaming_pragma_list): Update for new type of
13214 pending_redefine_extname.
ac8dc9f7 13215 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13216
3b0c690e
AC
132172010-08-04 Arnaud Charlet <charlet@adacore.com>
13218
13219 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13220 visited.
13221 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13222 decide whether a type has already been declared/seen.
13223 Do not go to the original type.
13224 (dump_nested_types): New parameter forward.
13225 Generate forward declaration if needed and mark type as visited.
13226 (print_ada_declaration): Call dump_nested_types if not already done.
13227 Mark types as visited.
13228
1890bccc
JM
132292010-08-03 Joseph Myers <joseph@codesourcery.com>
13230
13231 * c.opt (-print-pch-checksum): Remove option.
13232 * c-opts.c (c_common_handle_option): Don't handle
13233 OPT_print_pch_checksum.
13234
5f20c657
JM
132352010-07-27 Joseph Myers <joseph@codesourcery.com>
13236
13237 * c-common.h (c_common_handle_option): Update prototype and return
13238 value type.
13239 * c-opts.c (c_common_handle_option): Update prototype and return
13240 value type. Update calls to handle_option and
13241 enable_warning_as_error.
13242
f551f80c
JJ
132432010-07-27 Jakub Jelinek <jakub@redhat.com>
13244
13245 PR c/45079
13246 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13247
61ff2bdc
JM
132482010-07-27 Joseph Myers <joseph@codesourcery.com>
13249
13250 * c-common.h (c_common_missing_argument): Remove.
13251 * c-opts.c (c_common_missing_argument): Remove.
13252 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13253 idirafter, imacros, include, isysroot, isystem, iquote): Add
13254 MissingArgError.
13255 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13256
7a9bf9a4
JM
132572010-07-27 Joseph Myers <joseph@codesourcery.com>
13258
13259 * c-common.h (c_common_option_lang_mask,
13260 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13261 New.
13262 (c_common_init_options): Update prototype.
13263 * c-opts.c (c_common_option_lang_mask): New.
13264 (c_common_initialize_diagnostics): Split out of
13265 c_common_init_options.
13266 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13267 New.
13268 (c_common_init_options): Update prototype. Use decoded options in
13269 search for -lang-asm.
13270
910ad8de
NF
132712010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13272
13273 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13274 * c-format.c: Likewise.
13275
718f9c0f
MLI
132762010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13277
13278 * c-common.h: Include diagnostic-core.h. Error if already
13279 included.
13280 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13281
4d451982
MLI
132822010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13283
adfac8df 13284 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13285 Do not include expr.h
13286 (vector_mode_valid_p): Move here.
13287
119fe915
SB
132882010-06-21 DJ Delorie <dj@redhat.com>
13289
13290 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13291 allow these pragmas anywhere.
13292
132932010-06-14 Jakub Jelinek <jakub@redhat.com>
13294
13295 PR bootstrap/44509
13296 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13297 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13298 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13299 ggc_strdup instead of xstrdup.
13300
133012010-06-10 Jakub Jelinek <jakub@redhat.com>
13302
13303 * c-cppbuiltin.c: Include cpp-id-data.h.
13304 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13305 (lazy_hex_fp_value): New function.
13306 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13307
6662d794
MLI
133082010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13309
13310 * c-gimplify.c: Do not include tree-flow.h
13311
38f8b050
JR
133122010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13313
13314 PR other/44034
13315 * c-common.c: Rename targetm member:
13316 targetm.enum_va_list -> targetm.enum_va_list_p
13317
9589f23e
AS
133182010-06-28 Anatoly Sokolov <aesok@post.ru>
13319
13320 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13321
3b06d379
SB
133222010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13323
13324 * c-cppbuiltin.c: Do not include except.h.
13325
d166d4c3
AK
133262010-06-24 Andi Kleen <ak@linux.intel.com>
13327
9faeb493
UB
13328 * c-common.c (warn_for_omitted_condop): New.
13329 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13330
70cb8be6
JM
133312010-06-21 Joseph Myers <joseph@codesourcery.com>
13332
13333 * c.opt (lang-objc): Remove.
13334 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13335
a4c97feb
JR
133362010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13337
13338 * c-opts.c: Include "tm_p.h".
13339
6e2f1956
JM
133402010-06-20 Joseph Myers <joseph@codesourcery.com>
13341
13342 * c-common.c (parse_optimize_options): Update call to
13343 decode_options.
13344
bc87224e
NF
133452010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13346
13347 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13348 new type of types_used_by_cur_var_decl.
13349
b49cf425
JR
133502010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13351
13352 PR bootstrap/44512
13353 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13354 for C++ standard compliance.
13355
59f9c2ed
JM
133562010-06-16 Jason Merrill <jason@redhat.com>
13357
13358 * c.opt: Add -Wnoexcept.
13359
33766b66
RG
133602010-06-16 Richard Guenther <rguenther@suse.de>
13361
13362 PR c/44555
13363 * c-common.c (c_common_truthvalue_conversion): Remove
13364 premature and wrong optimization concering ADDR_EXPRs.
13365
eff7e30c
AC
133662010-06-15 Arnaud Charlet <charlet@adacore.com>
13367
13368 * c-ada-spec.c (dump_sloc): Remove column info.
13369 (is_simple_enum): New function.
13370 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13371 enum types when relevant.
13372
6312e84d
MLI
133732010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13374
9faeb493 13375 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13376 location.
13377
1cb42611
JM
133782010-06-10 Joseph Myers <joseph@codesourcery.com>
13379
13380 * c-opts.c (c_common_handle_option): Don't handle
13381 OPT_fshow_column.
13382
a9429e29
LB
133832010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13384
13385 * c-pragma.c (push_alignment): Use typed GC allocation.
13386 (handle_pragma_push_options): Likewise.
13387
13388 * c-common.c (parse_optimize_options): Likewise.
13389
13390 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13391 option.
13392
5498f011
JM
133932010-06-07 Joseph Myers <joseph@codesourcery.com>
13394
13395 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13396 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13397 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13398 flag_signed_bitfields, warn_strict_null_sentinel,
13399 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13400 flag_gen_declaration, flag_no_gnu_keywords,
13401 flag_implement_inlines, flag_implicit_templates,
13402 flag_implicit_inline_templates, flag_optional_diags,
13403 flag_elide_constructors, flag_default_inline, flag_rtti,
13404 flag_conserve_space, flag_access_control, flag_check_new,
13405 flag_new_for_scope, flag_weak, flag_working_directory,
13406 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13407 flag_enforce_eh_specs, flag_threadsafe_statics,
13408 flag_pretty_templates): Remove.
13409 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13410 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13411 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13412 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13413 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13414 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13415 flag_no_gnu_keywords, flag_implement_inlines,
13416 flag_implicit_templates, flag_implicit_inline_templates,
13417 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13418 flag_rtti, flag_conserve_space, flag_access_control,
13419 flag_check_new, flag_new_for_scope, flag_weak,
13420 flag_working_directory, flag_use_cxa_atexit,
13421 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13422 flag_threadsafe_statics, flag_pretty_templates,
13423 warn_strict_null_sentinel): Remove.
13424 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13425 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13426 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13427 fimplicit-inline-templates, fimplicit-templates,
13428 flax-vector-conversions, fms-extensions, fnil-receivers,
13429 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13430 frtti, fshort-double, fshort-enums, fshort-wchar,
13431 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13432 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13433 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13434 gen-decls, undef): Use Var.
13435 (fdefault-inline, foptional-diags): Document as doing nothing.
13436 * c-opts.c (c_common_handle_option): Remove cases for options now
13437 using Var. Mark ignored options as such.
13438
39dabefd
SB
134392010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13440
9faeb493 13441 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13442 * c-common.def: Likewise.
13443 * c-common.h: Likewise.
13444 * c-cppbuiltin.c: Likewise.
13445 * c-dump.c: Likewise.
13446 * c-format.c: Likewise.
13447 * c-format.h : Likewise.
13448 * c-gimplify.c: Likewise.
13449 * c-lex.c: Likewise.
13450 * c-omp.c: Likewise.
13451 * c.opt: Likewise.
13452 * c-opts.c: Likewise.
13453 * c-pch.c: Likewise.
13454 * c-ppoutput.c: Likewise.
13455 * c-pragma.c: Likewise.
13456 * c-pragma.h: Likewise.
13457 * c-pretty-print.c: Likewise.
13458 * c-pretty-print.h: Likewise.
13459 * c-semantics.c: Likewise.
13460 * stub-objc.c: Likewise.
13461
13462 * c-common.c: Include gt-c-family-c-common.h.
13463 * c-pragma.c: Include gt-c-family-c-pragma.h.
13464\f
877e3c2a 13465Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13466
13467Copying and distribution of this file, with or without modification,
13468are permitted in any medium without royalty provided the copyright
13469notice and this notice are preserved.