]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
c: C2x noreturn attribute
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
1f16a020
GA
12022-09-27 Marek Polacek <polacek@redhat.com>
2
3 PR c++/101165
4 PR c++/106882
5 * c-cppbuiltin.cc (c_cpp_builtins): Define __cpp_implicit_move.
6
72022-09-27 Marek Polacek <polacek@redhat.com>
8
9 * c-format.cc (c_keywords): Drop nothrow.
10
112022-09-27 Jakub Jelinek <jakub@redhat.com>
12
13 PR c++/106651
14 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
15 __cpp_static_call_operator=202207L for C++23.
16
172022-09-27 Jakub Jelinek <jakub@redhat.com>
18
19 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ASSUME,
20 PRAGMA_OMP_ASSUMES and PRAGMA_OMP_BEGIN. Rename
21 PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
22 * c-pragma.cc (omp_pragmas): Add assumes and begin.
23 For end rename PRAGMA_OMP_END_DECLARE_TARGET to PRAGMA_OMP_END.
24 (omp_pragmas_simd): Add assume.
25 * c-common.h (c_omp_directives): Declare.
26 * c-omp.cc (omp_directives): Rename to ...
27 (c_omp_directives): ... this. No longer static. Uncomment
28 assume, assumes, begin assumes and end assumes entries.
29 In end declare target entry rename PRAGMA_OMP_END_DECLARE_TARGET
30 to PRAGMA_OMP_END.
31 (c_omp_categorize_directive): Adjust for omp_directives to
32 c_omp_directives renaming.
33
342022-09-27 Jakub Jelinek <jakub@redhat.com>
35
36 PR c++/106652
37 PR c++/85518
38 * c-common.cc (c_common_reswords): Change _Float{16,32,64,128} and
39 _Float{32,64,128}x flags from D_CONLY to 0.
40 (shorten_binary_op): Punt if common_type returns error_mark_node.
41 (shorten_compare): Likewise.
42 (c_common_nodes_and_builtins): For C++ record _Float{16,32,64,128}
43 and _Float{32,64,128}x builtin types if available. For C++
44 clear float128t_type_node.
45 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
46 __STDCPP_FLOAT{16,32,64,128}_T__ for C++23 if supported.
47 * c-lex.cc (interpret_float): For q/Q suffixes prefer
48 float128t_type_node over float128_type_node. Allow
49 {f,F}{16,32,64,128} suffixes for C++ if supported with pedwarn
50 for C++20 and older. Allow {f,F}{32,64,128}x suffixes for C++
51 with pedwarn. Don't call excess_precision_type for C++.
52
220c4d8e
GA
532022-09-26 Marek Polacek <polacek@redhat.com>
54
55 PR c++/106656
56 * c-cppbuiltin.cc (c_cpp_builtins): Update value of __cpp_char8_t
57 for C++20.
58
4afaeaab
GA
592022-09-23 Marek Polacek <polacek@redhat.com>
60
61 PR c++/106784
62 * c-common.cc (c_common_reswords): Add __is_convertible and
63 __is_nothrow_convertible.
64 * c-common.h (enum rid): Add RID_IS_CONVERTIBLE and
65 RID_IS_NOTHROW_CONVERTIBLE.
66
279c6715
GA
672022-09-22 David Malcolm <dmalcolm@redhat.com>
68
69 PR c/106830
70 * c-warn.cc (check_for_xor_used_as_pow): Don't try checking
71 values that don't fit in uhwi.
72
d0fc05e8
GA
732022-09-15 Richard Biener <rguenther@suse.de>
74
75 * c-common.h (build_void_list_node): Remove.
76 * c-common.cc (c_common_nodes_and_builtins): Do not initialize
77 void_list_node.
78
861d1a11
GA
792022-09-09 Jan-Benedict Glaw <jbglaw@lug-owl.de>
80
81 * c-format.cc (convert_format_name_to_system_name): Fix warning.
82
fe2a8ce9
GA
832022-09-07 Joseph Myers <joseph@codesourcery.com>
84
85 * c-common.cc (c_common_reswords): Use D_C2X instead of D_CXXONLY
86 for alignas, alignof, bool, false, static_assert, thread_local and
87 true.
88
892022-09-07 Jakub Jelinek <jakub@redhat.com>
90
91 * c.opt (Winvalid-utf8): Use ObjC instead of objC. Remove
92 " in comments" from description.
93 (Wunicode): New option.
94
25aeb922
GA
952022-09-06 Jakub Jelinek <jakub@redhat.com>
96
97 PR c/106836
98 * c-omp.cc (c_omp_split_clauses): Handle OMP_CLAUSE_DOACROSS.
99
83f2f228
GA
1002022-09-03 Jakub Jelinek <jakub@redhat.com>
101
102 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DOACROSS.
103 * c-omp.cc (c_finish_omp_depobj): Check also for OMP_CLAUSE_DOACROSS
104 clause and diagnose it. Don't handle OMP_CLAUSE_DEPEND_SOURCE and
105 OMP_CLAUSE_DEPEND_SINK. Assert kind is not OMP_CLAUSE_DEPEND_INVALID.
106
c64b0947
GA
1072022-09-02 David Malcolm <dmalcolm@redhat.com>
108
109 PR c/90885
110 * c-common.h (check_for_xor_used_as_pow): New decl.
111 * c-lex.cc (c_lex_with_flags): Add DECIMAL_INT to flags as appropriate.
112 * c-warn.cc (check_for_xor_used_as_pow): New.
113 * c.opt (Wxor-used-as-pow): New.
114
bb0a1556
GA
1152022-09-01 Jason Merrill <jason@redhat.com>
116
117 * c-common.cc (c_common_nodes_and_builtins): Set TREE_STRING_FLAG on
118 char8_t.
119 (braced_list_to_string): Check for char-sized elements.
120
1212022-09-01 Jakub Jelinek <jakub@redhat.com>
122
123 PR c++/106655
124 * c.opt (-Winvalid-utf8): New warning.
125 * c-opts.cc (c_common_handle_option) <case OPT_finput_charset_>:
126 Set cpp_opts->cpp_input_charset_explicit.
127 (c_common_post_options): If -finput-charset=UTF-8 is explicit
128 in C++23, enable -Winvalid-utf8 by default and if -pedantic
129 or -pedantic-errors, make it a pedwarn.
130
542c60c4
GA
1312022-08-31 Joseph Myers <joseph@codesourcery.com>
132
133 * c-attribs.cc (handle_deprecated_attribute): Check and pedwarn
134 for LABEL_DECL.
135 * c-common.cc (c_add_case_label): Add argument ATTRS. Call
136 decl_attributes.
137 * c-common.h (do_case, c_add_case_label): Update declarations.
138 * c-lex.cc (c_common_has_attribute): For C, produce a result of
139 201910 for fallthrough and 202106 for maybe_unused.
140
16f542d6
GA
1412022-08-26 Marek Polacek <polacek@redhat.com>
142
143 PR c++/81159
144 * c.opt (Wself-move): New option.
145
1462022-08-26 Jakub Jelinek <jakub@redhat.com>
147
148 * c-common.cc (check_builtin_function_arguments): Handle
149 BUILT_IN_ISSIGNALING.
150
1512022-08-26 Jakub Jelinek <jakub@redhat.com>
152
153 PR c++/106648
154 * c-cppbuiltin.cc (c_cpp_builtins): Predefine
155 __cpp_named_character_escapes to 202207L.
156
5d4389dc
GA
1572022-08-25 Marek Polacek <polacek@redhat.com>
158
159 * c-common.cc (c_common_reswords): Enable nullptr in C2X.
160 (c_common_nodes_and_builtins): Create the built-in node for nullptr.
161 * c-common.h (enum c_tree_index): Add CTI_NULLPTR, CTI_NULLPTR_TYPE.
162 (struct c_common_resword): Resize the disable member.
163 (D_C2X): Add.
164 (nullptr_node): Define.
165 (nullptr_type_node): Define.
166 (NULLPTR_TYPE_P): Define.
167 * c-pretty-print.cc (c_pretty_printer::simple_type_specifier): Handle
168 NULLPTR_TYPE.
169 (c_pretty_printer::direct_abstract_declarator): Likewise.
170 (c_pretty_printer::constant): Likewise.
171
47a61e65
GA
1722022-08-16 Tom Honermann <tom@honermann.net>
173
174 PR c++/106423
175 * c-opts.cc (c_common_post_options): Disable -Wc++20-compat
176 diagnostics in C++20 and later.
177 * c.opt (Wc++20-compat): Enable hooks for the preprocessor.
178
5cd525f0
GA
1792022-08-11 Marek Polacek <polacek@redhat.com>
180
181 PR middle-end/102633
182 * c-gimplify.cc (c_gimplify_expr) <case DECL_EXPR>: Don't call
183 suppress_warning here.
184
5f17badb
GA
1852022-08-08 Tom Honermann <tom@honermann.net>
186
187 PR preprocessor/106426
188 * c-opts.cc (c_common_post_options): Assign cpp_opts->unsigned_utf8char
189 subject to -fchar8_t, -fsigned-char, and/or -funsigned-char.
190
1912022-08-08 Tom Honermann <tom@honermann.net>
192
193 * c-lex.cc (lex_string, lex_charconst): Use char8_t as the type
194 of CPP_UTF8CHAR and CPP_UTF8STRING when char8_t support is
195 enabled.
196 * c-opts.cc (c_common_post_options): Set flag_char8_t if
197 targeting C2x.
198
4a7274dd
GA
1992022-07-31 Lewis Hyatt <lhyatt@gmail.com>
200
201 PR c++/66290
202 * c-common.h: Rename global done_lexing to
203 override_libcpp_locations.
204 * c-common.cc (c_cpp_diagnostic): Likewise.
205 * c-opts.cc (c_common_finish): Set override_libcpp_locations
206 (formerly done_lexing) immediately prior to calling cpp_finish ().
207
1e2c5f4c
GA
2082022-07-27 Lewis Hyatt <lhyatt@gmail.com>
209
210 * c-ppoutput.cc (token_streamer::stream): Update input_location
211 prior to streaming each token.
212
0e6fa997
GA
2132022-07-23 Immad Mir <mirimmad@outlook.com>
214
215 * c-attribs.cc: (c_common_attribute_table): add three new attributes
216 namely: fd_arg, fd_arg_read and fd_arg_write.
217 (handle_fd_arg_attribute): New.
218
bdc7b765
GA
2192022-07-15 Marek Polacek <polacek@redhat.com>
220
221 PR c++/104477
222 * c-common.cc (c_common_reswords): Add
223 __reference_constructs_from_temporary and
224 __reference_converts_from_temporary.
225 * c-common.h (enum rid): Add RID_REF_CONSTRUCTS_FROM_TEMPORARY and
226 RID_REF_CONVERTS_FROM_TEMPORARY.
227
2282022-07-15 Jonathan Wakely <jwakely@redhat.com>
229
230 * c-format.cc (class range_label_for_format_type_mismatch):
231 Adjust to new label_text API.
232
c72d4714
GA
2332022-07-11 Lewis Hyatt <lhyatt@gmail.com>
234
235 PR preprocessor/106252
236 * c-pragma.cc (handle_pragma_diagnostic_impl): Don't look up the
237 option argument prior to verifying the option was found.
238
6345c414
GA
2392022-07-07 David Malcolm <dmalcolm@redhat.com>
240
241 * c-format.cc (range_label_for_format_type_mismatch::get_text):
242 Update for removal of label_text::maybe_free in favor of automatic
243 memory management.
244
4bc92c3b
GA
2452022-07-06 Lewis Hyatt <lhyatt@gmail.com>
246
247 PR preprocessor/53920
248 PR c++/53431
249 * c-common.cc (c_option_is_from_cpp_diagnostics): New function.
250 * c-common.h (c_option_is_from_cpp_diagnostics): Declare.
251 (c_pp_stream_token): Declare.
252 * c-ppoutput.cc (init_pp_output): Refactor logic about skipping
253 pragmas to...
254 (should_output_pragmas): ...here. New function.
255 (token_streamer::stream): Support handling early pragmas.
256 (do_line_change): Likewise.
257 (c_pp_stream_token): New function.
258 * c-pragma.cc (struct pragma_diagnostic_data): New helper class.
259 (pragma_diagnostic_lex_normal): New function. Moved logic for
260 interpreting GCC diagnostic pragmas here.
261 (pragma_diagnostic_lex_pp): New function for parsing diagnostic pragmas
262 directly from libcpp.
263 (handle_pragma_diagnostic): Refactor into helper function...
264 (handle_pragma_diagnostic_impl): ...here. New function.
265 (handle_pragma_diagnostic_early): New function.
266 (handle_pragma_diagnostic_early_pp): New function.
267 (struct pragma_ns_name): Renamed to...
268 (struct pragma_pp_data): ...this. Add new "early_handler" member.
269 (c_register_pragma_1): Support early pragmas in the preprocessor.
270 (c_register_pragma_with_early_handler): New function.
271 (c_register_pragma): Support the new early handlers in struct
272 internal_pragma_handler.
273 (c_register_pragma_with_data): Likewise.
274 (c_register_pragma_with_expansion): Likewise.
275 (c_register_pragma_with_expansion_and_data): Likewise.
276 (c_invoke_early_pragma_handler): New function.
277 (c_pp_invoke_early_pragma_handler): New function.
278 (init_pragma): Add early pragma support for diagnostic pragmas.
279 * c-pragma.h (struct internal_pragma_handler): Add new early handler
280 members.
281 (c_register_pragma_with_early_handler): Declare.
282 (c_invoke_early_pragma_handler): Declare.
283 (c_pp_invoke_early_pragma_handler): Declare.
284
d1f3a3ff
GA
2852022-07-05 Marek Polacek <polacek@redhat.com>
286
287 PR c++/105626
288 * c-format.cc (check_format_arg): Don't emit -Wformat warnings with
289 u8 strings.
290
ed974488
GA
2912022-07-01 Marek Polacek <polacek@redhat.com>
292
293 PR c++/106111
294 * c-common.h (enum rid): Update RID_LAST_CXX20.
295
976196b3
GA
2962022-06-30 Jonathan Wakely <jwakely@redhat.com>
297
298 * known-headers.cc (get_stdlib_header_for_name): Add <time.h>
299 names.
300
84c2131d
GA
3012022-06-24 Jason Merrill <jason@redhat.com>
302
303 PR c++/87729
304 PR c++/20423
305 * c.opt (Woverloaded-virtual): Add levels, include in -Wall.
306
4390e7bf
GA
3072022-06-18 Jakub Jelinek <jakub@redhat.com>
308
309 * c-ubsan.cc (ubsan_instrument_division, ubsan_instrument_shift):
310 Use flag_sanitize_trap & SANITIZE_??? instead of
311 flag_sanitize_undefined_trap_on_error. If 2 sanitizers are involved
312 and flag_sanitize_trap differs for them, emit __builtin_trap only
313 for the comparison where trap is requested.
314 (ubsan_instrument_vla, ubsan_instrument_return): Use
315 lag_sanitize_trap & SANITIZE_??? instead of
316 flag_sanitize_undefined_trap_on_error.
317
c3642271
GA
3182022-06-13 Jason Merrill <jason@redhat.com>
319
320 * c-ubsan.cc (ubsan_instrument_return): Use BUILTINS_LOCATION.
321
d9176e64
GA
3222022-05-27 Marek Polacek <polacek@redhat.com>
323
324 PR c/90658
325 * c-attribs.cc (get_priority): Check FUNCTION_DECL.
326
3272022-05-27 Jakub Jelinek <jakub@redhat.com>
328
329 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ENTER.
330
57f2ce6a
GA
3312022-05-20 David Malcolm <dmalcolm@redhat.com>
332
333 * c-format.cc: Replace uses of "FINAL" and "OVERRIDE" with "final"
334 and "override".
335 * c-pretty-print.h: Likewise.
336
1cda629f
GA
3372022-05-18 Marek Polacek <polacek@redhat.com>
338
339 PR c/105131
340 * c.opt (Wenum-int-mismatch): New.
341
3422022-05-18 Marek Polacek <polacek@redhat.com>
343
344 PR c++/105497
345 * c-warn.cc (c_do_switch_warnings): Don't warn about unhandled
346 enumerator when it was marked with attribute unused.
347
3482022-05-18 Eric Botcazou <ebotcazou@adacore.com>
349
350 * c-ada-spec.cc (dump_ada_node) <COMPLEX_TYPE>: Deal with usual
351 floating-point complex types.
352 <POINTER_TYPE>: Do not use limited_with clause if the designated
353 type is a scalar type.
354
3d9439b1
GA
3552022-05-17 Jakub Jelinek <jakub@redhat.com>
356
357 * c-omp.cc (c_finish_omp_depobj): Handle
358 OMP_CLAUSE_DEPEND_INOUTSET.
359
702bd11f
GA
3602022-05-16 Jason Merrill <jason@redhat.com>
361
362 PR c/105492
363 * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs
364 here.
365
3662022-05-16 Martin Liska <mliska@suse.cz>
367
368 * c-common.cc (ARRAY_SIZE): Use ARRAY_SIZE.
369 (c_common_nodes_and_builtins): Likewise.
370 * c-format.cc (check_tokens): Likewise.
371 (check_plain): Likewise.
372 * c-pragma.cc (c_pp_lookup_pragma): Likewise.
373 (init_pragma): Likewise.
374 * known-headers.cc (get_string_macro_hint): Likewise.
375 (get_stdlib_header_for_name): Likewise.
376 * c-attribs.cc: Likewise.
377
9df4ffe4
GA
3782022-05-13 Richard Biener <rguenther@suse.de>
379
380 * c-omp.cc: Remove gimple-fold.h include.
381
49ace834
GA
3822022-05-12 Jakub Jelinek <jakub@redhat.com>
383
384 * c-common.h (enum rid): Add RID_OMP_ALL_MEMORY.
385 * c-omp.cc (c_finish_omp_depobj): Don't build_fold_addr_expr
386 if null_pointer_node.
387
d0d513b5
GA
3882022-05-11 Martin Liska <mliska@suse.cz>
389
390 PR target/105355
391 * c-opts.cc (c_common_handle_option): Change option name.
392 * c.opt: Remove Joined and use Separate option.
393
bd022ff9
GA
3942022-05-09 Alex Coplan <alex.coplan@arm.com>
395
396 * c-common.h (get_dump_info): Delete.
397 * c-gimplify.cc (c_genericize): Get TDI_original dump file info
398 from the global dump_manager instead of the (now obsolete)
399 get_dump_info.
400 * c-opts.cc (original_dump_file): Delete.
401 (original_dump_flags): Delete.
402 (c_common_parse_file): Switch to using global dump_manager to
403 manage the original dump file; fix leak of dump file.
404 (get_dump_info): Delete.
405
a1947c92
GA
4062022-05-07 Marek Polacek <polacek@redhat.com>
407
408 PR c++/101833
409 PR c++/47634
410 * c-attribs.cc (positional_argument): Pass POS by reference. Deal
411 with FN being either a function declaration or function type. Use
412 maybe_adjust_arg_pos_for_attribute.
413 * c-common.cc (check_function_arguments): Maybe pass FNDECL down to
414 check_function_format.
415 * c-common.h (maybe_adjust_arg_pos_for_attribute): Declare.
416 (positional_argument): Adjust.
417 * c-format.cc (get_constant): Rename to ...
418 (validate_constant): ... this. Take EXPR by reference. Return bool
419 instead of tree.
420 (handle_format_arg_attribute): Don't overwrite FORMAT_NUM_EXPR by the
421 return value of validate_constant.
422 (decode_format_attr): Don't overwrite FORMAT_NUM_EXPR and
423 FIRST_ARG_NUM_EXPR by the return value of validate_constant.
424 (check_function_format): Adjust a parameter name.
425 (handle_format_attribute): Maybe pass FNDECL down to decode_format_attr.
426
3e7db517
GA
4272022-05-04 Marek Polacek <polacek@redhat.com>
428
429 * c-warn.cc (warnings_for_convert_and_check): Convert constants of type
430 char to int.
431
95874f95
GA
4322022-04-30 Jason Merrill <jason@redhat.com>
433
434 PR c/100545
435 * c-attribs.cc (handle_mode_attribute): Copy attributes, aligned,
436 and typedef.
437 * c-common.cc (set_underlying_type): Add assert.
438
01ad093b
GA
4392022-04-26 Patrick Palka <ppalka@redhat.com>
440
441 PR c++/105304
442 * c-common.cc (verify_tree) [restart]: Move up to before the
443 NULL test.
444
da066c42
GA
4452022-04-11 Jakub Jelinek <jakub@redhat.com>
446
447 PR c++/105186
448 * c-common.cc (c_common_nodes_and_builtins): After registering __int%d
449 and __int%d__ builtin types, initialize corresponding ridpointers
450 entry.
451
150ab50f
GA
4522022-03-30 Marek Polacek <polacek@redhat.com>
453
454 PR c++/101030
455 * c-warn.cc (conversion_warning) <case COND_EXPR>: Don't call
456 conversion_warning when OP1 is null.
457
4582022-03-30 Thomas Schwinge <thomas@codesourcery.com>
459
460 * c.opt (Wc++11-extensions, Wc++14-extensions, Wc++17-extensions)
461 (Wc++20-extensions, Wc++23-extensions): Remove 'LangEnabledBy'
462 option properties.
463
4642022-03-30 Thomas Schwinge <thomas@codesourcery.com>
465
466 * c.opt (Wuse-after-free): Remove.
467
4682022-03-30 Thomas Schwinge <thomas@codesourcery.com>
469
470 * c.opt (Warray-bounds): Remove.
471
d2906412
GA
4722022-03-26 Thomas Schwinge <thomas@codesourcery.com>
473
474 * c.opt: Properly quote comment.
475
31e989a2
GA
4762022-03-25 Eric Botcazou <ebotcazou@adacore.com>
477
478 * c-ada-spec.cc (dump_ada_import): Deal with the "section" attribute
479 (dump_ada_node) <POINTER_TYPE>: Do not modify and pass the name, but
480 the referenced type instead. Deal with the anonymous original type
481 of a typedef'ed type. In the actual access case, follow the chain
482 of external subtypes.
483 <TYPE_DECL>: Tidy up control flow.
484
d156bb87
GA
4852022-03-21 Qian Jianhua <qianjh@cn.fujitsu.com>
486
487 * c-ada-spec.cc: Change array length
488
d7f00da1
GA
4892022-03-19 Arthur Cohen <arthur.cohen@embecosm.com>
490
491 * c-common.cc (c_family_tests): Call the new tests.
492 * c-common.h (c_diagnostic_tests): Declare.
493 (c_opt_problem_cc_tests): Likewise.
494
4952022-03-19 Jakub Jelinek <jakub@redhat.com>
496
497 PR c++/101515
498 * c-pretty-print.cc (c_fold_indirect_ref_for_warn): For C++ don't
499 return COMPONENT_REFs with FIELD_DECLs whose containing scope can't
500 be printed.
501
9fc8f278
GA
5022022-03-16 Christophe Lyon <christophe.lyon@arm.com>
503 Roger Sayle <roger@nextmovesoftware.com>
504
505 PR c/98198
506 * c-attribs.cc (decl_or_type_attrs): Add error_mark_node check.
507
5082022-03-16 Patrick Palka <ppalka@redhat.com>
509
510 PR c++/96780
511 * c.opt: Add -ffold-simple-inlines.
512
b9756c08
GA
5132022-03-13 Tobias Burnus <tobias@codesourcery.com>
514
515 * c-target.def (check_string_object_format_arg): Fix description typo.
516
57eeedda
GA
5172022-03-12 Thomas Schwinge <thomas@codesourcery.com>
518
519 PR other/65095
520 * c-common.h (c_omp_map_clause_name): Remove.
521 * c-omp.cc (c_omp_map_clause_name): Remove.
522
8cc4f9cd
GA
5232022-03-09 Jakub Jelinek <jakub@redhat.com>
524
525 PR c/104711
526 * c-opts.cc (c_common_post_options): Don't enable
527 -Wshift-negative-value from -Wextra for C++20 or later.
528 * c-ubsan.cc (ubsan_instrument_shift): Adjust comments.
529 * c-warn.cc (maybe_warn_shift_overflow): Use TYPE_OVERFLOW_WRAPS
530 instead of TYPE_UNSIGNED.
531
e6533e2e
GA
5322022-03-07 Jakub Jelinek <jakub@redhat.com>
533
534 * c-attribs.cc: Fix up duplicated word issue in a comment.
535
12d4552e
GA
5362022-03-01 Martin Liska <mliska@suse.cz>
537
538 PR ipa/104533
539 * c-attribs.cc (handle_target_clones_attribute): Use
540 get_target_clone_attr_len and report warning soon.
541
0bdb0498
GA
5422022-02-17 Jonathan Wakely <jwakely@redhat.com>
543
544 * c-pragma.cc (handle_pragma_pack): Remove parameter name.
545 (handle_pragma_weak): Likewise.
546 (handle_pragma_scalar_storage_order): Likewise.
547 (handle_pragma_redefine_extname): Likewise.
548 (handle_pragma_visibility): Likewise.
549 (handle_pragma_diagnostic): Likewise.
550 (handle_pragma_target): Likewise.
551 (handle_pragma_optimize): Likewise.
552 (handle_pragma_push_options): Likewise.
553 (handle_pragma_pop_options): Likewise.
554 (handle_pragma_reset_options): Likewise.
555 (handle_pragma_message): Likewise.
556 (handle_pragma_float_const_decimal64): Likewise.
557
cb3afcd2
GA
5582022-02-16 Jakub Jelinek <jakub@redhat.com>
559
560 PR c/104531
561 * c-omp.cc (c_finish_omp_atomic): For MIN_EXPR/MAX_EXPR, try first
562 build_binary_op with LT_EXPR and only if that doesn't return
563 error_mark_node call build_modify_expr.
564
5652022-02-16 Jakub Jelinek <jakub@redhat.com>
566
567 PR c/104510
568 * c-common.cc (shorten_compare): Convert original arguments to
569 the original *restype_ptr when mixing binary and decimal float.
570
1f8a09d2
GA
5712022-02-14 Richard Biener <rguenther@suse.de>
572
573 PR c/104505
574 * c-pretty-print.cc (c_pretty_printer::postfix_expression): Handle
575 internal function calls.
576
e8d68f0a
GA
5772022-02-11 Richard Biener <rguenther@suse.de>
578
579 * c-attribs.cc (c_common_attribute_table): Add entry for
580 vector_mask.
581 (handle_vector_mask_attribute): New.
582
a645583d
GA
5832022-02-10 Marcel Vollweiler <marcel@codesourcery.com>
584
585 * c-omp.cc (c_omp_split_clauses): Added OMP_CLAUSE_HAS_DEVICE_ADDR case.
586 * c-pragma.h (enum pragma_kind): Added 5.1 in comment.
587 (enum pragma_omp_clause): Added PRAGMA_OMP_CLAUSE_HAS_DEVICE_ADDR.
588
3adf509f
GA
5892022-02-09 Jason Merrill <jason@redhat.com>
590
591 * c-cppbuiltin.cc (c_cpp_builtins): Update values
592 of __cpp_constexpr and __cpp_concepts for C++20.
593
bb99171b
GA
5942022-01-24 Marek Polacek <polacek@redhat.com>
595
596 PR preprocessor/104030
597 * c.opt (Wbidi-chars): Mark as EnumSet. Also accept =ucn.
598
9dd44357
GA
5992022-01-21 Jakub Jelinek <jakub@redhat.com>
600
601 PR c++/104148
602 * c-common.h (check_function_arguments_recurse): Add for_format
603 arg.
604 * c-common.cc (check_function_nonnull): Pass false to
605 check_function_arguments_recurse's last argument.
606 (check_function_arguments_recurse): Add for_format argument,
607 if true, don't stop on warning_suppressed_p.
608 * c-format.cc (check_format_info): Pass true to
609 check_function_arguments_recurse's last argument.
610
fe1ad141
GA
6112022-01-19 David Malcolm <dmalcolm@redhat.com>
612
613 * c-common.cc (c_common_c_tests): Rename to...
614 (c_common_cc_tests): ...this.
615 (c_family_tests): Update calls for .c to .cc renaming.
616 * c-common.h (c_format_c_tests): Rename to...
617 (c_format_cc_tests): ...this.
618 (c_indentation_c_tests): Rename to...
619 (c_indentation_cc_tests): ...this.
620 (c_pretty_print_c_tests): Rename to...
621 (c_pretty_print_cc_tests): ...this.
622 * c-format.cc (c_format_c_tests): Rename to...
623 (c_format_cc_tests): ...this.
624 * c-indentation.cc (c_indentation_c_tests): Rename to...
625 (c_indentation_cc_tests): ...this.
626 * c-pretty-print.cc (c_pretty_print_c_tests): Rename to...
627 (c_pretty_print_cc_tests): ...this.
628
fc829782
GA
6292022-01-17 Martin Liska <mliska@suse.cz>
630
631 * c-ada-spec.cc: Rename .c names to .cc.
632 * c-ada-spec.h: Likewise.
633 * c-common.cc (c_build_vec_convert): Likewise.
634 (warning_candidate_p): Likewise.
635 * c-common.h (enum rid): Likewise.
636 (build_real_imag_expr): Likewise.
637 (finish_label_address_expr): Likewise.
638 (c_get_substring_location): Likewise.
639 (c_build_bind_expr): Likewise.
640 (conflict_marker_get_final_tok_kind): Likewise.
641 (c_parse_error): Likewise.
642 (check_missing_format_attribute): Likewise.
643 (invalid_array_size_error): Likewise.
644 (warn_for_multistatement_macros): Likewise.
645 (build_attr_access_from_parms): Likewise.
646 * c-cppbuiltin.cc (c_cpp_builtins): Likewise.
647 * c-format.cc: Likewise.
648 * c-gimplify.cc (c_gimplify_expr): Likewise.
649 * c-indentation.h: Likewise.
650 * c-objc.h (objc_prop_attr_kind_for_rid): Likewise.
651 * c-omp.cc (c_omp_predetermined_mapping): Likewise.
652 * c-opts.cc (c_common_post_options): Likewise.
653 (set_std_cxx23): Likewise.
654 * c-pragma.cc (handle_pragma_redefine_extname): Likewise.
655 * c-pretty-print.h: Likewise.
656
6572022-01-17 Martin Liska <mliska@suse.cz>
658
659 * c-ada-spec.c: Moved to...
660 * c-ada-spec.cc: ...here.
661 * c-attribs.c: Moved to...
662 * c-attribs.cc: ...here.
663 * c-common.c: Moved to...
664 * c-common.cc: ...here.
665 * c-cppbuiltin.c: Moved to...
666 * c-cppbuiltin.cc: ...here.
667 * c-dump.c: Moved to...
668 * c-dump.cc: ...here.
669 * c-format.c: Moved to...
670 * c-format.cc: ...here.
671 * c-gimplify.c: Moved to...
672 * c-gimplify.cc: ...here.
673 * c-indentation.c: Moved to...
674 * c-indentation.cc: ...here.
675 * c-lex.c: Moved to...
676 * c-lex.cc: ...here.
677 * c-omp.c: Moved to...
678 * c-omp.cc: ...here.
679 * c-opts.c: Moved to...
680 * c-opts.cc: ...here.
681 * c-pch.c: Moved to...
682 * c-pch.cc: ...here.
683 * c-ppoutput.c: Moved to...
684 * c-ppoutput.cc: ...here.
685 * c-pragma.c: Moved to...
686 * c-pragma.cc: ...here.
687 * c-pretty-print.c: Moved to...
688 * c-pretty-print.cc: ...here.
689 * c-semantics.c: Moved to...
690 * c-semantics.cc: ...here.
691 * c-ubsan.c: Moved to...
692 * c-ubsan.cc: ...here.
693 * c-warn.c: Moved to...
694 * c-warn.cc: ...here.
695 * cppspec.c: Moved to...
696 * cppspec.cc: ...here.
697 * stub-objc.c: Moved to...
698 * stub-objc.cc: ...here.
699
9248ee41
GA
7002022-01-15 Martin Sebor <msebor@redhat.com>
701
702 PR c/63272
703 * c.opt (-Wdangling-pointer): New option.
704
7052022-01-15 Martin Sebor <msebor@redhat.com>
706
707 PR tree-optimization/80532
708 * c.opt (-Wuse-after-free): New options.
709
617db51d
GA
7102022-01-14 David Malcolm <dmalcolm@redhat.com>
711
712 * c-attribs.c (c_common_attribute_table): Add "tainted_args".
713 (handle_tainted_args_attribute): New.
714
ad3f0d08
GA
7152022-01-13 Anthony Sharp <anthonysharp15@gmail.com>
716 Jason Merrill <jason@redhat.com>
717
718 PR c++/70417
719 * c.opt: Added -Wmissing-template-keyword.
720
7212022-01-13 Richard Biener <rguenther@suse.de>
722
723 PR c/104002
724 * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.
725
02a8a01b
GA
7262022-01-12 Martin Liska <mliska@suse.cz>
727
728 PR target/103804
729 * c-attribs.c (handle_optimize_attribute): Do not call
730 cl_optimization_compare if we seen an error.
731
01a254e3
GA
7322022-01-11 Jakub Jelinek <jakub@redhat.com>
733
734 PR c/101537
735 PR c/103881
736 * c-warn.c (conversion_warning): Handle BIT_AND_EXPR, BIT_IOR_EXPR
737 and BIT_XOR_EXPR.
738
d9450aa0
GA
7392022-01-10 Richard Biener <rguenther@suse.de>
740
741 PR middle-end/101530
742 * c-common.c (c_build_shufflevector): Wrap the BIT_FIELD_REF
743 in a TARGET_EXPR to force a temporary.
744
11ce8d04
GA
7452022-01-06 Marek Polacek <polacek@redhat.com>
746
747 PR c++/103758
748 * c-pragma.c (handle_pragma_scalar_storage_order): Use %< %> in
749 diagnostic messages.
750 (handle_pragma_diagnostic): Likewise.
751
a4ae8c37
GA
7522022-01-03 Marek Polacek <polacek@redhat.com>
753
754 PR c++/103758
755 * c-format.c (check_tokens): Accept "decl-specifier*".
756
7572022-01-03 Jakub Jelinek <jakub@redhat.com>
758
759 PR c++/103600
760 * c-attribs.c (handle_non_overlapping_attribute): New function.
761 (c_common_attribute_table): Add "non overlapping" attribute.
762
84790a9d
GA
7632021-12-30 Jakub Jelinek <jakub@redhat.com>
764
765 PR c++/103012
766 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Perform
767 cpp_define_unused/cpp_undef calls with forced token locations
768 BUILTINS_LOCATION.
769
d1e111da
GA
7702021-12-27 Patrick Palka <ppalka@redhat.com>
771
772 PR c++/103700
773 * c-common.c (pointer_int_sum): When quiet, return
774 error_mark_node for an incomplete pointed-to type and don't
775 call size_in_bytes_loc.
776
2554e2da
GA
7772021-12-17 Jason Merrill <jason@redhat.com>
778
779 PR c++/103681
780 * c-opts.c (c_common_post_options): Update defaults.
781
774269aa
GA
7822021-12-16 Martin Liska <mliska@suse.cz>
783
784 PR target/103709
785 * c-pragma.c (handle_pragma_pop_options): Do not check
786 global options modification when an error is seen in parsing
787 of options (pragmas or attributes).
788
c8dcf64b
GA
7892021-12-12 Jonathan Wakely <jwakely@redhat.com>
790
791 * known-headers.cc: Define INCLUDE_MEMORY instead of
792 INCLUDE_UNIQUE_PTR.
793 * name-hint.h: Likewise.
794 (class name_hint): Use std::unique_ptr instead of gnu::unique_ptr.
795
4b4839e3
GA
7962021-12-09 Jakub Jelinek <jakub@redhat.com>
797
798 PR pch/71934
799 * c-pch.c (c_common_no_more_pch): Pass a temporary void * var
800 with NULL value instead of NULL to host_hooks.gt_pch_use_address.
801
03a9bd05
GA
8022021-12-03 Jakub Jelinek <jakub@redhat.com>
803
804 PR pch/71934
805 * c-pch.c (struct c_pch_validity): Remove pch_init member.
806 (pch_init): Don't initialize v.pch_init.
807 (c_common_valid_pch): Don't warn and punt if .text addresses change.
808
40fa651e
GA
8092021-12-01 Jason Merrill <jason@redhat.com>
810
811 PR c++/103310
812 * c.opt: Add -fconstexpr-fp-except.
813
87cd82c8
GA
8142021-11-29 Richard Biener <rguenther@suse.de>
815
816 * c-format.c (check_format_string): Remove spurious
817 gcc_unreachable.
818
8192021-11-29 Richard Biener <rguenther@suse.de>
820
821 * c-opts.c (c_common_post_options): Remove unreachable return.
822 * c-pragma.c (handle_pragma_target): Likewise.
823 (handle_pragma_optimize): Likewise.
824
091ccc06
GA
8252021-11-25 Jakub Jelinek <jakub@redhat.com>
826
827 PR c++/102611
828 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
829 default for C++23 regardless of warn_deprecated.
830 * c-cppbuiltin.c (c_cpp_builtins): Predefine
831 __cpp_multidimensional_subscript=202110L for C++23.
832
e1d43592
GA
8332021-11-23 Martin Sebor <msebor@redhat.com>
834
835 PR middle-end/88232
836 * c.opt: Add -Winfinite-recursion.
837
9c077398
GA
8382021-11-19 Martin Sebor <msebor@redhat.com>
839
840 PR c++/33925
841 PR c/102867
842 * c-common.c (decl_with_nonnull_addr_p): Call maybe_nonzero_address
843 and improve handling tof defined symbols.
844
8452021-11-19 Martin Liska <mliska@suse.cz>
846
847 Revert:
848 2021-11-18 Martin Liska <mliska@suse.cz>
849
850 * c-gimplify.c (genericize_c_loop): Use option directly.
851
483092d3
GA
8522021-11-18 Matthias Kretz <m.kretz@gsi.de>
853
854 * c-common.c (c_common_reswords): Add __builtin_assoc_barrier.
855 * c-common.h (enum rid): Add RID_BUILTIN_ASSOC_BARRIER.
856
8572021-11-18 Martin Liska <mliska@suse.cz>
858
859 * c-gimplify.c (genericize_c_loop): Use option directly.
860
280d2838
GA
8612021-11-17 Martin Uecker <uecker@gcc.gnu.org>
862
863 PR c/91038
864 PR c/29970
865 * c-common.c (pointer_int_sum): Make sure pointer expressions
866 are evaluated first when the size expression depends on for
867 variably-modified types.
868
8692021-11-17 Marek Polacek <polacek@redhat.com>
870
871 PR preprocessor/103026
872 * c.opt (Wbidi-chars, Wbidi-chars=): New option.
873
6b1695f4
GA
8742021-11-16 Jason Merrill <jason@redhat.com>
875
876 * c-common.c (release_tree_vector): Only cache vecs smaller than
877 16 elements.
878
e2b57363
GA
8792021-11-15 Jason Merrill <jason@redhat.com>
880
881 * c.opt: Add -fimplicit-constexpr.
882 * c-cppbuiltin.c: Define __cpp_implicit_constexpr.
883 * c-opts.c (c_common_post_options): Disable below C++14.
884
8852021-11-15 Jakub Jelinek <jakub@redhat.com>
886
887 * c-omp.c (c_omp_split_clauses) <case OMP_CLAUSE_THREAD_LIMIT>:
888 Duplicate to both OMP_TARGET and OMP_TEAMS.
889
8d36a0d2
GA
8902021-11-10 Marek Polacek <polacek@redhat.com>
891
892 PR c++/101940
893 * c-pragma.c (handle_pragma_diagnostic): Handle #pragma GCC diagnostic
894 ignored_attributes.
895
c9b1334e
GA
8962021-11-09 David Malcolm <dmalcolm@redhat.com>
897
898 * c-pragma.c (GCC_BAD_AT): New macro.
899 (GCC_BAD2_AT): New macro.
900 (handle_pragma_pack): Use the location of the pertinent token when
901 issuing diagnostics about invalid constants/actions, and trailing
902 junk.
903 (handle_pragma_target): Likewise for non-string "GCC option".
904 (handle_pragma_message): Likewise for trailing junk.
905
18ae471f
GA
9062021-11-03 Joseph Myers <joseph@codesourcery.com>
907
908 PR c/103031
909 * c-common.c (convert_and_check): Add argument init_const. Call
910 convert_init if init_const.
911 * c-common.h (convert_and_check): Update prototype.
912 (convert_init): New prototype.
913
cf82e8d9
GA
9142021-11-01 David Malcolm <dmalcolm@redhat.com>
915
916 * c-lex.c (c_lex_with_flags): When complaining about non-printable
917 CPP_OTHER tokens, set the "escape on output" flag.
918
04a2cf3f
GA
9192021-10-27 Jakub Jelinek <jakub@redhat.com>
920
921 * c-omp.c (c_omp_check_loop_iv_r): Don't clear 3rd bit for
922 POINTER_PLUS_EXPR.
923 (c_omp_check_nonrect_loop_iv): Handle POINTER_PLUS_EXPR.
924 (c_omp_check_loop_iv): Set kind even if the iterator is non-integral.
925
9262021-10-27 Jakub Jelinek <jakub@redhat.com>
927
928 PR c++/102854
929 * c-common.h (c_omp_check_loop_iv_exprs): Add enum tree_code argument.
930 * c-omp.c (c_omp_check_loop_iv_r): For trees other than decls,
931 TREE_VEC, PLUS_EXPR, MINUS_EXPR, MULT_EXPR, POINTER_PLUS_EXPR or
932 conversions temporarily clear the 3rd bit from d->kind while walking
933 subtrees.
934 (c_omp_check_loop_iv_exprs): Add CODE argument. Or in 4 into data.kind
935 if possibly non-rectangular.
936
ae5c5406
GA
9372021-10-21 Jakub Jelinek <jakub@redhat.com>
938
939 PR middle-end/64888
940 * c-omp.c (c_omp_predefined_variable): Return true also for
941 ubsan_create_data created artificial variables.
942
5d5885c9
GA
9432021-10-14 Joseph Myers <joseph@codesourcery.com>
944
945 * c-format.c (printf_length_specs, scanf_length_specs)
946 (print_char_table, scan_char_table): Support DFP formats for C2X.
947 * c-format.h (TEX_D32, TEX_D64, TEX_D128): Remove.
948 (T2X_D32, T2X_D64, T2X_D128): New macros.
949
9502021-10-14 Kwok Cheung Yeung <kcy@codesourcery.com>
951
952 * c-omp.c (c_omp_check_context_selector): Rename to
953 omp_check_context_selector and move to omp-general.c.
954 (c_omp_mark_declare_variant): Rename to omp_mark_declare_variant and
955 move to omp-general.c.
956
52055987
GA
9572021-10-12 Joseph Myers <joseph@codesourcery.com>
958
959 * c-format.c (print_char_table): Add %b and %B formats.
960 (scan_char_table): Add %b format.
961 * c-format.h (T2X_UI, T2X_UL, T2X_ULL, T2X_US, T2X_UC, T2X_ST)
962 (T2X_UPD, T2X_UIM): New macros.
963
9642021-10-12 Jakub Jelinek <jakub@redhat.com>
965
966 * c-omp.c (c_finish_omp_atomic): Use
967 clear_padding_type_may_have_padding_p.
968
ce6eec39
GA
9692021-10-08 Martin Liska <mliska@suse.cz>
970
971 * c-opts.c (c_common_post_options): Use new macro
972 OPTION_SET_P.
973
50e20ee6
GA
9742021-10-07 Martin Liska <mliska@suse.cz>
975
976 * c-common.c (parse_optimize_options): Make
977 save_opt_decoded_options a pointer type.
978
57c7ec62
GA
9792021-10-06 Jakub Jelinek <jakub@redhat.com>
980
981 PR tree-optimization/102571
982 * c-omp.c (c_finish_omp_atomic): Optimize the case where type has
983 padding, but the non-padding bits are contiguous set of bytes
984 by adjusting the memcmp call arguments instead of emitting
985 __builtin_clear_padding and then comparing all the type's bytes.
986
9872021-10-06 Jakub Jelinek <jakub@redhat.com>
988
989 PR c++/102612
990 * c-cppbuiltin.c (c_cpp_builtins): For -std=c++23 predefine
991 __cpp_constexpr to 202110L rather than 201907L.
992
da9c5f78
GA
9932021-10-04 Marek Polacek <polacek@redhat.com>
994
995 PR c++/97573
996 * c-common.h (do_warn_array_compare): Declare.
997 * c-warn.c (do_warn_array_compare): New.
998 * c.opt (Warray-compare): New option.
999
e3e07b89
GA
10002021-10-02 Iain Sandoe <iain@sandoe.co.uk>
1001
1002 * c-format.c: Remove a test of TARGET_FORMAT_TYPES with
1003 NULL, this is not needed.
1004
9d116bcc
GA
10052021-10-01 Martin Sebor <msebor@redhat.com>
1006
1007 PR c/102103
1008 * c-common.c (decl_with_nonnull_addr_p): Handle members.
1009 Check and perform warning suppression.
1010 (c_common_truthvalue_conversion): Enhance warning suppression.
1011
10122021-10-01 Martin Liska <mliska@suse.cz>
1013
1014 PR target/102552
1015 * c-common.c (parse_optimize_options): decoded_options[0] is
1016 used for program name, so merged_decoded_options should also
1017 respect that.
1018
10192021-10-01 Jakub Jelinek <jakub@redhat.com>
1020 Richard Biener <rguenther@suse.de>
1021
1022 PR sanitizer/102515
1023 * c-ubsan.c (ubsan_instrument_division): Check the right
1024 flag_sanitize_recover bit, depending on which sanitization
1025 is done. Sanitize INT_MIN / -1 under SANITIZE_SI_OVERFLOW
1026 rather than SANITIZE_DIVIDE. If both SANITIZE_SI_OVERFLOW
1027 and SANITIZE_DIVIDE is enabled, neither check is known
1028 to be false and flag_sanitize_recover bits for those two
1029 aren't the same, emit both __ubsan_handle_divrem_overflow
1030 and __ubsan_handle_divrem_overflow_abort calls.
1031
10322021-10-01 Martin Liska <mliska@suse.cz>
1033
1034 * c-common.c (parse_optimize_options): Combine optimize
1035 options with what was provided on the command line.
1036
10372021-10-01 Jakub Jelinek <jakub@redhat.com>
1038
1039 * c-omp.c (c_omp_split_clauses): Also copy
1040 OMP_CLAUSE_ORDER_REPRODUCIBLE.
1041
cf966403
GA
10422021-09-27 Martin Liska <mliska@suse.cz>
1043
1044 * c-opts.c (c_common_init_options_struct): Set also
1045 x_flag_default_complex_method.
1046
e4777439
GA
10472021-09-22 Jakub Jelinek <jakub@redhat.com>
1048
1049 * c-omp.c (c_omp_split_clauses): Copy over OMP_CLAUSE_ALLOCATE_ALIGN.
1050
62498024
GA
10512021-09-20 Matthias Kretz <m.kretz@gsi.de>
1052
1053 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define or
1054 undefine __RECIPROCAL_MATH__, __NO_SIGNED_ZEROS__,
1055 __NO_TRAPPING_MATH__, __ASSOCIATIVE_MATH__, and
1056 __ROUNDING_MATH__ according to the new optimization flags.
1057
cf74e7b5
GA
10582021-09-18 Jakub Jelinek <jakub@redhat.com>
1059
1060 * c-omp.c (c_omp_split_clauses): Split order clause also to
1061 distribute construct. Copy over OMP_CLAUSE_ORDER_UNCONSTRAINED.
1062
0a4cb439
GA
10632021-09-17 Jakub Jelinek <jakub@redhat.com>
1064
1065 * c-omp.c (c_finish_omp_atomic): Avoid creating
1066 TARGET_EXPR if test is true, use create_tmp_var_raw instead of
1067 create_tmp_var and add a zero initializer to TARGET_EXPRs that
1068 had NULL initializer. When omitting operands after v = x,
1069 use type of v rather than type of x. Fix type of vtmp
1070 TARGET_EXPR.
1071
07985c47
GA
10722021-09-13 Jason Merrill <jason@redhat.com>
1073
1074 * c.opt: Add -Winterference-size.
1075 * c-cppbuiltin.c (cpp_atomic_builtins): Add __GCC_DESTRUCTIVE_SIZE
1076 and __GCC_CONSTRUCTIVE_SIZE.
1077
a26206ec
GA
10782021-09-10 Jakub Jelinek <jakub@redhat.com>
1079
1080 * c-common.h (c_finish_omp_atomic): Add r and weak arguments.
1081 * c-omp.c: Include gimple-fold.h.
1082 (c_finish_omp_atomic): Add r and weak arguments. Add support for
1083 OpenMP 5.1 atomics.
1084
f84e2f0b
GA
10852021-09-09 qing zhao <qing.zhao@oracle.com>
1086
1087 * c-attribs.c (handle_uninitialized_attribute): New function.
1088 (c_common_attribute_table): Add "uninitialized" attribute.
1089
b6db7cd4
GA
10902021-09-08 liuhongt <hongtao.liu@intel.com>
1091
1092 * c-common.c (excess_precision_mode_join): Update below comments.
1093 (c_ts18661_flt_eval_method): Set excess_precision_type to
1094 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1095 * c-cppbuiltin.c (cpp_atomic_builtins): Update below comments.
1096 (c_cpp_flt_eval_method_iec_559): Set excess_precision_type to
1097 EXCESS_PRECISION_TYPE_FLOAT16 when -fexcess-precision=16.
1098
b2748138
GA
10992021-09-07 Marcel Vollweiler <marcel@codesourcery.com>
1100
1101 * c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.
1102
7b739540
GA
11032021-09-03 Eric Botcazou <ebotcazou@adacore.com>
1104
1105 * c-ada-spec.c (dump_ads): Generate pragmas to disable style checks
1106 and -gnatwu warning for the package specification.
1107
e11c6046
GA
11082021-09-01 Iain Sandoe <iain@sandoe.co.uk>
1109
1110 * c-attribs.c (handle_unavailable_attribute): New.
1111
1e2f030b
GA
11122021-08-30 Jason Merrill <jason@redhat.com>
1113
1114 * c.opt: Add -Wmissing-requires.
1115
85d77ac4
GA
11162021-08-25 Lewis Hyatt <lhyatt@gmail.com>
1117
1118 PR other/93067
1119 * c-opts.c (c_common_input_charset_cb): New function.
1120 (c_common_post_options): Call new function
1121 diagnostic_initialize_input_context().
1122
7c9e1645
GA
11232021-08-20 Tobias Burnus <tobias@codesourcery.com>
1124
1125 * c-format.c (gcc_gfc_length_specs): Add 'll' and 'w'.
1126 (gcc_gfc_char_table): Add T9L_LL and T9L_ULL to
1127 "di" and "u", respecitively; fill with BADLEN to match
1128 size of 'types'.
1129 (get_init_dynamic_hwi): Split off from ...
1130 (init_dynamic_diag_info): ... here. Call it.
1131 (init_dynamic_gfc_info): Call it.
1132
11332021-08-20 Jakub Jelinek <jakub@redhat.com>
1134
1135 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ERROR.
1136 * c-pragma.c (omp_pragmas): Add error directive.
1137 * c-omp.c (omp_directives): Uncomment error directive entry.
1138
6e529985
GA
11392021-08-18 Jakub Jelinek <jakub@redhat.com>
1140
1141 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_NOTHING.
1142 * c-pragma.c (omp_pragmas): Add nothing directive.
1143 * c-omp.c (omp_directives): Uncomment nothing directive entry.
1144
2d14d64b
GA
11452021-08-17 Jakub Jelinek <jakub@redhat.com>
1146
1147 PR c++/101539
1148 * c-common.h (enum rid): Add RID_IS_LAYOUT_COMPATIBLE.
1149 * c-common.c (c_common_reswords): Add __is_layout_compatible.
1150
11512021-08-17 Matt Jacobson <mhjacobson@me.com>
1152
1153 * c-opts.c (c_common_post_options): Default to
1154 flag_objc_sjlj_exceptions = 1 only when flag_objc_abi < 2.
1155
11562021-08-17 Jakub Jelinek <jakub@redhat.com>
1157
1158 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCOPE.
1159 * c-pragma.c (omp_pragmas): Add scope construct.
1160 * c-omp.c (omp_directives): Uncomment scope directive entry.
1161
9d1d9fc8
GA
11622021-08-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
1163
1164 * c-cppbuiltin.c (c_cpp_builtins): Define
1165 __LIBGCC_GCOV_TYPE_SIZE if flag_building_libgcc is true.
1166
72be20e2
GA
11672021-08-12 Jakub Jelinek <jakub@redhat.com>
1168
1169 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_MASKED.
1170 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FILTER.
1171 * c-pragma.c (omp_pragmas_simd): Add masked construct.
1172 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_MASKED
1173 enumerator.
1174 (c_finish_omp_masked): Declare.
1175 * c-omp.c (c_finish_omp_masked): New function.
1176 (c_omp_split_clauses): Handle combined masked constructs.
1177
4d17ca1b
GA
11782021-07-30 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR c++/101539
1181 * c-common.h (enum rid): Add RID_IS_POINTER_INTERCONVERTIBLE_BASE_OF.
1182 * c-common.c (c_common_reswords): Add
1183 __is_pointer_interconvertible_base_of.
1184
11852021-07-29 Richard Biener <rguenther@suse.de>
1186
1187 PR c/101512
1188 * c-common.c (c_common_mark_addressable_vec): Look through
1189 C_MAYBE_CONST_EXPR even if not at the toplevel.
1190
af3f12e6
GA
11912021-07-27 Martin Sebor <msebor@redhat.com>
1192
1193 PR c/101585
1194 * c-warn.c (warn_parm_ptrarray_mismatch): Use OEP_DECL_NAME.
1195
ead235f6
GA
11962021-07-23 Jakub Jelinek <jakub@redhat.com>
1197
1198 * c-lex.c (c_common_has_attribute): Call canonicalize_attr_name also
1199 on attr_id. Return 1 for omp::directive or omp::sequence in C++11
1200 and later.
1201
12022021-07-23 Jakub Jelinek <jakub@redhat.com>
1203
1204 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP__START_ and
1205 PRAGMA_OMP__LAST_ enumerators.
1206
419c6c68
GA
12072021-07-21 Thomas Schwinge <thomas@codesourcery.com>
1208 Joseph Myers <joseph@codesourcery.com>
1209 Cesar Philippidis <cesar@codesourcery.com>
1210
1211 * c-pragma.h (pragma_omp_clause): Add 'PRAGMA_OACC_CLAUSE_NOHOST'.
1212
92d45509
GA
12132021-07-20 Martin Sebor <msebor@redhat.com>
1214
1215 * c-common.c (c_build_shufflevector): Adjust by-value argument to
1216 by-const-reference.
1217 * c-common.h (c_build_shufflevector): Same.
1218
87277b6a
GA
12192021-07-16 Andrew Pinski <apinski@marvell.com>
1220
1221 PR c/101453
1222 * c-common.c (parse_optimize_options): Use the correct
1223 size for buffer.
1224
d97d71a1
GA
12252021-07-15 Martin Sebor <msebor@redhat.com>
1226
1227 PR c/101289
1228 PR c/97548
1229 * c-warn.c (warn_parm_array_mismatch): Use OEP_DECL_NAME.
1230
c4fee1c6
GA
12312021-07-14 Jason Merrill <jason@redhat.com>
1232
1233 * c-opts.c (c_common_post_options): Set -fdelete-dead-exceptions.
1234
6fba0eea
GA
12352021-07-06 Martin Sebor <msebor@redhat.com>
1236
1237 * c-format.c (gcc_tdiag_char_table): Remove support for %G and %K.
1238 (gcc_cdiag_char_table): Same.
1239 (gcc_cxxdiag_char_table): Same.
1240
7a60a6e8
GA
12412021-07-02 Jakub Jelinek <jakub@redhat.com>
1242
1243 * c-common.h (enum c_omp_directive_kind): New enum.
1244 (struct c_omp_directive): New type.
1245 (c_omp_categorize_directive): Declare.
1246 * c-omp.c (omp_directives): New variable.
1247 (c_omp_categorize_directive): New function.
1248
bea7c16a
GA
12492021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1250
1251 * c-ada-spec.c (packed_layout): New global variable.
1252 (dump_ada_declaration): Set it upon seeing a packed record type.
1253 Do not put the "aliased" keyword if it is set.
1254 (dump_ada_structure): Add Pack aspect if it is set and clear it.
1255
12562021-07-01 Eric Botcazou <ebotcazou@adacore.com>
1257
1258 * c-ada-spec.c (check_name): Rename into...
1259 (check_type_name_conflict): ...this. Minor tweak.
1260 (dump_ada_function_declaration): Adjust to above renaming.
1261 (dump_ada_array_domains): Fix oversight.
1262 (dump_ada_declaration): Call check_type_name_conflict for variables.
1263
90708f87
GA
12642021-06-25 Martin Sebor <msebor@redhat.com>
1265
1266 * c-common.c (c_wrap_maybe_const): Remove TREE_NO_WARNING.
1267 (c_common_truthvalue_conversion): Replace direct uses of
1268 TREE_NO_WARNING with warning_suppressed_p, suppress_warning, and
1269 copy_no_warning.
1270 (check_function_arguments_recurse): Same.
1271 * c-gimplify.c (c_gimplify_expr): Same.
1272 * c-warn.c (overflow_warning): Same.
1273 (warn_logical_operator): Same.
1274 (warn_if_unused_value): Same.
1275 (do_warn_unused_parameter): Same.
1276
9aa8327e
GA
12772021-06-24 Jakub Jelinek <jakub@redhat.com>
1278
1279 * c-common.h (enum c_omp_region_type): Add C_ORT_TARGET and
1280 C_ORT_OMP_TARGET.
1281 * c-omp.c (c_omp_split_clauses): For OMP_CLAUSE_IN_REDUCTION on
1282 combined target constructs also add map (always, tofrom:) clause.
1283
ede6c356
GA
12842021-06-15 Robin Dapp <rdapp@linux.ibm.com>
1285
1286 * c-attribs.c (common_handle_aligned_attribute): Remove short
1287 circuit and dead code.
1288
8dc48181
GA
12892021-06-14 Jonathan Wakely <jwakely@redhat.com>
1290
1291 PR c++/101052
1292 * known-headers.cc (get_stdlib_header_for_name): Add known
1293 headers for EXIT_FAILURE, EXIT_SUCCESS, abort, atexit, calloc,
1294 exit, and getenv.
1295
8b8c3912
GA
12962021-06-12 Jason Merrill <jason@redhat.com>
1297
1298 * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL.
1299
f16f65f8
GA
13002021-06-11 Jakub Jelinek <jakub@redhat.com>
1301
1302 PR c++/100974
1303 * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for
1304 -std=c++2b for P1938R3 consteval if support.
1305
4f625f47
GA
13062021-06-09 Jason Merrill <jason@redhat.com>
1307
1308 PR c++/100879
1309 * c-warn.c (warn_for_sign_compare): Remove C++ enum mismatch
1310 warning.
1311
438aac59
GA
13122021-06-07 Martin Liska <mliska@suse.cz>
1313
1314 * c-target.def: Split long lines and replace them
1315 with '\n\'.
1316
600f90cb
GA
13172021-06-04 Martin Sebor <msebor@redhat.com>
1318
1319 PR c/100783
1320 * c-attribs.c (positional_argument): Bail on erroneous types.
1321
13222021-06-04 Martin Sebor <msebor@redhat.com>
1323
1324 * c-warn.c (warn_parm_array_mismatch): Check TREE_PURPOSE to test
1325 for element presence.
1326
440c8a0a
GA
13272021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1328
1329 * c-ada-spec.c (dump_ada_macros): Minor tweaks.
1330 (dump_ada_decl_name): Likewise.
1331 (dump_anonymous_type_name): Remove parent parameter and adjust.
1332 (dump_sloc): Minor tweak.
1333 (dump_ada_array_type): Remove type parameter and adjust.
1334 (dump_ada_enum_type): Remove parent parameter and adjust.
1335 (dump_ada_node): Adjust calls to above functions.
1336 (dumped_anonymous_types): New global variable.
1337 (dump_nested_types_1): Rename into...
1338 (dump_nested_types): ...this.
1339 (dump_nested_type): Remove parent and dumped_types parameters.
1340 <ARRAY_TYPE>: Replace dumped_types with dumped_anonymous_types.
1341 Adjust calls to dump_anonymous_type_name and dump_ada_array_type.
1342 (dump_ada_specs): Initialize and free dumped_anonymous_types.
1343
13442021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1345
1346 * c-ada-spec.c (pp_ada_tree_identifier): Tidy up.
1347 (dump_ada_node) <POINTER_TYPE>: Deal specially with external subtypes.
1348
13492021-06-03 Eric Botcazou <ebotcazou@adacore.com>
1350
1351 * c-ada-spec.c (dump_ada_enum_type): Dump a prefix for constants.
1352 (htable_t): New typedef.
1353 (overloaded_names): Use it.
1354 (add_name): New function.
1355 (init_overloaded_names): Use add_name to populate the table and add
1356 special cases for sigaction and stat.
1357 (overloaded_name_p): Rename into...
1358 (overloading_index): ...this. Do not initialize overloaded_names table
1359 here. Return the index or zero.
1360 (dump_ada_declaration): Minor tweaks. Do not skip overloaded functions
1361 but add an overloading suffix instead.
1362 (dump_ada_specs): Initialize overloaded_names tables here.
1363
b75978d1
GA
13642021-06-01 Martin Liska <mliska@suse.cz>
1365
1366 PR other/100759
1367 * c-attribs.c (handle_optimize_attribute): Limit sanity check
1368 to a situation where we are not in processing of an optimize
1369 pragma.
1370 * c-pragma.c (handle_pragma_pop_options): Restore target
1371 options.
1372
ee682192
GA
13732021-05-31 Indu Bhagat <indu.bhagat@oracle.com>
1374
1375 PR testsuite/100749
1376 * c-pch.c (c_common_valid_pch): Use xstrdup for debug format set names.
1377
13782021-05-31 Richard Biener <rguenther@suse.de>
1379
1380 PR c++/88601
1381 * c-common.c: Include tree-vector-builder.h and
1382 vec-perm-indices.h.
1383 (c_common_reswords): Add __builtin_shufflevector.
1384 (c_build_shufflevector): New funtion.
1385 * c-common.h (enum rid): Add RID_BUILTIN_SHUFFLEVECTOR.
1386 (c_build_shufflevector): Declare.
1387
48166757
GA
13882021-05-28 Jakub Jelinek <jakub@redhat.com>
1389
1390 PR middle-end/99928
1391 * c-omp.c (c_omp_split_clauses): For reduction clause if combined with
1392 target add a map tofrom clause with OMP_CLAUSE_MAP_IMPLICIT.
1393
13942021-05-28 Tobias Burnus <tobias@codesourcery.com>
1395
1396 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_AFFINITY.
1397
2bc6dace
GA
13982021-05-25 Martin Liska <mliska@suse.cz>
1399
1400 PR tree-optimization/92860
1401 PR target/99592
1402 * c-attribs.c (handle_optimize_attribute): Save target node
1403 before calling parse_optimize_options and save it in case
1404 it changes.
1405 * c-pragma.c (handle_pragma_target): Similarly for pragma.
1406 (handle_pragma_pop_options): Likewise here.
1407
14082021-05-25 Martin Liska <mliska@suse.cz>
1409
1410 * c-attribs.c (handle_no_sanitize_coverage_attribute): New.
1411
14122021-05-25 Jakub Jelinek <jakub@redhat.com>
1413
1414 PR middle-end/99928
1415 * c-omp.c (c_omp_split_clauses): Copy reduction to teams when teams is
1416 combined with simd and not with taskloop or for.
1417
2832d51b
GA
14182021-05-21 Jakub Jelinek <jakub@redhat.com>
1419
1420 PR middle-end/99928
1421 * c-omp.c (c_omp_split_clauses): Set OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT
1422 on firstprivate clause copy going to target construct, and for
1423 target simd set also OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET bit.
1424
ea34e2ed
GA
14252021-05-20 Jonathan Wakely <jwakely@redhat.com>
1426
1427 * c.opt (Wc++11-extensions, Wc++14-extensions)
1428 (Wc++17-extensions, Wc++20-extensions, Wc++23-extensions): New
1429 options.
1430
14312021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1432
1433 * c-lex.c (init_c_lex): Use dwarf_debuginfo_p.
1434
14352021-05-20 Indu Bhagat <indu.bhagat@oracle.com>
1436
1437 * c-opts.c (c_common_post_options): Adjust access to debug_type_names.
1438 * c-pch.c (struct c_pch_validity): Use type uint32_t.
1439 (pch_init): Renamed member.
1440 (c_common_valid_pch): Adjust access to debug_type_names.
1441
65f32e5d
GA
14422021-05-19 Martin Sebor <msebor@redhat.com>
1443
1444 PR c/100619
1445 * c-attribs.c (build_attr_access_from_parms): Handle arbitrarily many
1446 bounds.
1447
a8daf9a1
GA
14482021-05-18 Richard Biener <rguenther@suse.de>
1449
1450 PR c/100547
1451 * c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
1452 Reword existing nunit diagnostic.
1453
a7ffc1ef
GA
14542021-05-17 Joern Rennecke <joern.rennecke@embecosm.com>
1455
1456 * c-common.c (braced_list_to_string): Return CTOR unchanged
1457 if host and target character sizes don't match.
1458
87a7d10c
GA
14592021-05-14 Martin Liska <mliska@suse.cz>
1460
1461 * c.opt: Add Warning keyword for 2 options.
1462
f9af11c7
GA
14632021-05-13 Martin Liska <mliska@suse.cz>
1464
1465 PR middle-end/100504
1466 * c-attribs.c (handle_target_clones_attribute): Expect a string
1467 argument to target_clone argument.
1468
037e3661
GA
14692021-05-11 Joseph Myers <joseph@codesourcery.com>
1470
1471 * c-lex.c (interpret_float): Handle digit separators for C2X.
1472
aa891c56
GA
14732021-05-10 Martin Liska <mliska@suse.cz>
1474
1475 * c-ada-spec.c (print_destructor): Use startswith
1476 function instead of strncmp.
1477 (dump_ada_declaration): Likewise.
1478 * c-common.c (disable_builtin_function): Likewise.
1479 (def_builtin_1): Likewise.
1480 * c-format.c (check_tokens): Likewise.
1481 (check_plain): Likewise.
1482 (convert_format_name_to_system_name): Likewise.
1483
e4ff4ffb
GA
14842021-04-28 Patrick McGehearty <patrick.mcgehearty@oracle.com>
1485
1486 * c-cppbuiltin.c (c_cpp_builtins): Add supporting macros for new
1487 complex divide
1488
c0fa3f2f
GA
14892021-04-26 Thomas Schwinge <thomas@codesourcery.com>
1490 Nathan Sidwell <nathan@codesourcery.com>
1491 Tom de Vries <vries@codesourcery.com>
1492 Julian Brown <julian@codesourcery.com>
1493 Kwok Cheung Yeung <kcy@codesourcery.com>
1494
1495 * c.opt (Wopenacc-parallelism): New.
1496
6e81e015
GA
14972021-04-19 Thomas Schwinge <thomas@codesourcery.com>
1498
1499 * c.opt (fopenacc-kernels=): Remove.
1500
019a9220
GA
15012021-04-08 Jakub Jelinek <jakub@redhat.com>
1502
1503 * c-warn.c (do_warn_double_promotion): Fix comment typo,
1504 occured -> occurred.
1505 (check_alignment_of_packed_member): Fix a comment typo,
1506 memeber -> member.
1507 (warn_parm_ptrarray_mismatch): Fix comment typos, os -> of
1508 and onless -> unless.
1509 (warn_parm_array_mismatch): Fix comment typos, declaratation
1510 -> declaration and woud -> would. Fix up comment indentation.
1511
15122021-04-08 Martin Sebor <msebor@redhat.com>
1513
1514 PR middle-end/99883
1515 * c.opt (Wmismatched-new-delete): Correct spelling.
1516
b1da9916
GA
15172021-04-05 Eric Botcazou <ebotcazou@adacore.com>
1518
1519 * c-ada-spec.c (is_simple_enum): Minor tweaks.
1520 (dump_ada_enum_type): Add TYPE and PARENT parameters. For non-simple
1521 enumeral types use again the type name for the enumeration constants.
1522 (dump_ada_node): Adjust call to dump_ada_enum_type.
1523 (dump_nested_type): Likewise.
1524
f1607029
GA
15252021-04-01 Jason Merrill <jason@redhat.com>
1526
1527 PR c++/98481
1528 * c-opts.c (c_common_post_options): Bump latest_abi_version.
1529
4493b1c1
GA
15302021-03-25 Jakub Jelinek <jakub@redhat.com>
1531
1532 PR c++/99565
1533 * c-warn.c (do_warn_duplicated_branches): Pass also
1534 OEP_ADDRESS_OF_SAME_FIELD to operand_equal_p.
1535
6af7b307
GA
15362021-03-20 Jakub Jelinek <jakub@redhat.com>
1537
1538 PR debug/99230
1539 * c-gimplify.c (c_genericize_control_stmt): Handle STATEMENT_LIST.
1540
ceae9533
GA
15412021-03-05 Eric Botcazou <ebotcazou@adacore.com>
1542
1543 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Dump nested types
1544 after entering the separate class package, if any.
1545
67f10d28
GA
15462021-03-04 Richard Biener <rguenther@suse.de>
1547
1548 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
1549 Handle ERROR_MARK.
1550
15512021-03-04 Jakub Jelinek <jakub@redhat.com>
1552
1553 PR c/99325
1554 * c-ppoutput.c (print): Change src_line type from int to unsigned.
1555 (token_streamer::stream) Likewise.
1556 (maybe_print_line_1): Likewise. Don't strcmp src_file if src_loc is
1557 UNKNOWN_LOCATION.
1558
f3641ac7
GA
15592021-03-03 Jakub Jelinek <jakub@redhat.com>
1560
1561 PR c/99324
1562 * c-common.c (build_va_arg): Call c_common_mark_addressable_vec
1563 instead of mark_addressable. Fix a comment typo -
1564 neutrallly -> neutrally.
1565
2c83c3fb
GA
15662021-02-28 Jakub Jelinek <jakub@redhat.com>
1567
1568 PR c/99304
1569 * c-attribs.c (handle_malloc_attribute): Fix a typo in inform
1570 message - refernced -> referenced. Remove superfluous space before
1571 closing paren of function calls.
1572
daa68844
GA
15732021-02-25 Nathan Sidwell <nathan@acm.org>
1574
1575 PR c++/99166
1576 * c.opt (-flang-info-module-cmi): Renamed option.
1577
50352c6c
GA
15782021-02-19 Nathan Sidwell <nathan@acm.org>
1579
1580 * c.opt (flang-info-module-read, flang-info-module-read=): New.
1581
bf81237e
GA
15822021-02-18 H.J. Lu <hjl.tools@gmail.com>
1583
1584 PR target/99113
1585 * c-attribs.c (c_common_attribute_table): Add the "retain"
1586 attribute.
1587 (handle_retain_attribute): New function.
1588
0e804ce3
GA
15892021-02-16 Marek Polacek <polacek@redhat.com>
1590
1591 PR c++/99062
1592 * c-attribs.c (handle_assume_aligned_attribute): Check that the
1593 alignment argument is non-negative. Tweak a warning message.
1594
fab095da
GA
15952021-02-12 Martin Sebor <msebor@redhat.com>
1596
1597 PR c/99055
1598 * c-warn.c (warn_parm_array_mismatch): Free strings returned from
1599 print_generic_expr_to_str.
1600
4b37c3ea
GA
16012021-02-10 Richard Biener <rguenther@suse.de>
1602
1603 * c-common.c (parse_optimize_options): Free decoded_options.
1604
a19dd5e6
GA
16052021-02-04 emsr <3dw4rd@verizon.net>
1606
1607 * c-cppbuiltin.c (c_cpp_builtins): __cpp_size_t_suffix=202011L.
1608
9faaa807
GA
16092021-02-03 Ed Smith-Rowland <3dw4rd@verizon.net>
1610
1611 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_size_t_suffix.
1612 * c-lex.c (interpret_integer): Set node type for size literal.
1613
85d04a2e
GA
16142021-01-28 Jakub Jelinek <jakub@redhat.com>
1615
1616 * c.opt (-std=c++2a, -std=c++20, -std=gnu++2a, -std=gnu++20): Remove
1617 draft from description.
1618 (-std=c++2b): Fix a pasto, 2020 -> 2023.
1619
e62bb7f0
GA
16202021-01-26 Paul Fee <paul.f.fee@gmail.com>
1621
1622 * c-common.h (cxx_dialect): Add cxx23 as a dialect.
1623 * c.opt: Add options for -std=c++23, std=c++2b, -std=gnu++23
1624 and -std=gnu++2b
1625 * c-opts.c (set_std_cxx23): New.
1626 (c_common_handle_option): Set options when -std=c++23 is enabled.
1627 (c_common_post_options): Adjust comments.
1628 (set_std_cxx20): Likewise.
1629
161e4c08
GA
16302021-01-25 Martin Sebor <msebor@redhat.com>
1631
1632 PR c++/98646
1633 * c-common.c (check_nonnull_arg): Adjust warning text.
1634
4c9bcd5c
GA
16352021-01-17 Martin Sebor <msebor@redhat.com>
1636
1637 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1638 assume SSA_NAME_IDENTIFIER evaluates to nonzero.
1639
59cf67d1
GA
16402021-01-16 Kwok Cheung Yeung <kcy@codesourcery.com>
1641
1642 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_DETACH.
1643 Redefine PRAGMA_OACC_CLAUSE_DETACH.
1644
2f7f0d32
GA
16452021-01-15 Jakub Jelinek <jakub@redhat.com>
1646
1647 PR tree-optimization/98597
1648 * c-pretty-print.c: Include options.h.
1649 (c_fold_indirect_ref_for_warn): New function.
1650 (print_mem_ref): Use it. If it returns something that has compatible
1651 type and is TBAA compatible with zero offset, print it and return,
1652 otherwise print it using offsetof syntax or array ref syntax. Fix up
1653 printing if MEM_REFs first operand is ADDR_EXPR, or when the first
1654 argument has pointer to array type. Print pointers using the standard
1655 formatting.
1656
6851dda2
GA
16572021-01-12 Martin Sebor <msebor@redhat.com>
1658
1659 PR c/98597
1660 PR c/98592
1661 * c-pretty-print.c (print_mem_ref): Avoid assuming MEM_REF operand
1662 has pointer type. Remove redundant code. Avoid calling
1663 gimple_canonical_types_compatible_p.
1664
7d187e4f
GA
16652021-01-07 Martin Sebor <msebor@redhat.com>
1666
1667 PR middle-end/98578
1668 * c-pretty-print.c (print_mem_ref): Strip array from access type.
1669 Avoid assuming acces type's size is constant. Correct condition
1670 guarding the printing of a parenthesis.
1671
942ae5be
GA
16722021-01-06 Martin Sebor <msebor@redhat.com>
1673
1674 PR c++/95768
1675 * c-pretty-print.c (c_pretty_printer::primary_expression): For
1676 SSA_NAMEs print VLA names and GIMPLE defining statements.
1677 (print_mem_ref): New function.
1678 (c_pretty_printer::unary_expression): Call it.
1679
16802021-01-06 Richard Biener <rguenther@suse.de>
1681
1682 PR tree-optimization/95582
1683 * c-attribs.c (c_common_attribute_table): Add entry for
1684 signed_bool_precision.
1685 (handle_signed_bool_precision_attribute): New.
1686
8daa719b
GA
16872020-12-24 Iain Sandoe <iain@sandoe.co.uk>
1688
1689 * c.opt: Add -stdlib= option and enumerations for
1690 libstdc++ and libc++.
1691
eefe499f
GA
16922020-12-16 Martin Liska <mliska@suse.cz>
1693
1694 * c.opt: Remove usage of Report.
1695
d52945ce
GA
16962020-12-14 Martin Sebor <msebor@redhat.com>
1697
1698 PR middle-end/98166
1699 PR c++/57111
1700 PR middle-end/98160
1701 * c-attribs.c (maybe_add_noinline): New function.
1702 (handle_malloc_attribute): Call it. Use ATTR_FLAG_INTERNAL.
1703 Implicitly add attribute noinline to functions not declared inline
1704 and warn on those.
1705
ca2bd949
GA
17062020-12-09 Tobias Burnus <tobias@codesourcery.com>
1707
1708 * c-pragma.c (omp_pragmas): Add 'allocate'.
1709 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_ALLOCATE.
1710
f6e8e279
GA
17112020-12-08 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR c++/98187
1714 * c-pragma.c (omp_pragmas): Remove "master".
1715 (omp_pragmas_simd): Add "master".
1716
bc8a7013
GA
17172020-12-07 Marek Polacek <polacek@redhat.com>
1718
1719 PR c++/98126
1720 * c-common.c (verify_tree_lim_r): New function.
1721 (verify_sequence_points): Use it. Use nullptr instead of 0.
1722
b8dd0ef7
GA
17232020-12-03 Martin Sebor <msebor@redhat.com>
1724
1725 PR c++/90629
1726 PR middle-end/94527
1727 * c-attribs.c (handle_dealloc_attribute): New function.
1728 (handle_malloc_attribute): Handle argument forms of attribute.
1729 * c.opt (-Wmismatched-dealloc): New option.
1730 (-Wmismatched-new-delete): New option.
1731
17322020-12-03 Jakub Jelinek <jakub@redhat.com>
1733
1734 PR libstdc++/93121
1735 * c-common.h (enum rid): Add RID_BUILTIN_BIT_CAST.
1736 * c-common.c (c_common_reswords): Add __builtin_bit_cast.
1737
e0f5e792
GA
17382020-12-01 JeanHeyd Meneide <phdofthehouse@gmail.com>
1739
1740 * c-cppbuiltin.c (c_cpp_builtins): Add predefined
1741 {__GNUC_EXECUTION_CHARSET_NAME} and
1742 _WIDE_EXECUTION_CHARSET_NAME} macros.
1743
17442020-12-01 Nathan Sidwell <nathan@acm.org>
1745
1746 * c-common.c (module, import, export): New internal tokens (with
1747 trailing space).
1748 * c-common.h (RID__MODULE, RID__IMPORT & RID__EXPORT): Enumerate
1749 them.
1750 (D_CXX_MODULES, D_CXX_MODULES_FLAGS): Enable them.
1751 * c-cppbuiltin.c (c_cpp_builtins): Feature macro.
1752
17532020-12-01 Nathan Sidwell <nathan@acm.org>
1754
1755 * c-opts.c (c_common_init_options): Ask for module dependencies.
1756 (c_common_handle_option): Handle -Mmodules -Mno-modules.
1757 * c-pch.c (c_common_valid_pch): ... does not play with C++
1758 modules.
1759 * c.opt (Mmodules, Mno-modules): New preprocessor dependency
1760 options.
1761 (fmodules-ts, fmodule-header, fmodule-implicit-inline)
1762 (fmodule-only, fmodule-mapper, fmodule-lazy)
1763 (fmodule-version-ignore, Winvalid-imported-macros)
1764 (flang-info-include-translate, flang-info-include-translate-not):
1765 New options
1766
5fbf0ecb
GA
17672020-11-28 Eric Botcazou <ebotcazou@adacore.com>
1768
1769 * c-ada-spec.c (dump_nested_type) <RECORD_TYPE>: Remove obsolete code.
1770 (dump_ada_structure): Also deal with convention, unchecked union and
1771 bit-field for nested types. In the latter case, print an Alignment
1772 aspect along with the Pack aspect.
1773
360258da
GA
17742020-11-25 Martin Sebor <msebor@redhat.com>
1775
1776 PR bootstrap/94982
1777 * c-attribs.c (handle_patchable_function_entry_attribute): Avoid
1778 -Wformat-diag.
1779
1e2c9a27
GA
17802020-11-24 Martin Sebor <msebor@redhat.com>
1781
1782 * c-warn.c (warn_parm_array_mismatch): Avoid invalid redeclarations.
1783
8e6198d0
GA
17842020-11-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1785
1786 * c-attribs.c (handle_special_var_sec_attribute): New.
1787 (handle_noinit_attribute): Remove.
1788 (attr_noinit_exclusions): Rename to...
1789 (attr_section_exclusions): ...this, and add "persistent" attribute
1790 exclusion.
1791 (c_common_attribute_table): Add "persistent" attribute.
1792
7a97e2fc
GA
17932020-11-21 Aaron Sawdey <acsawdey@linux.ibm.com>
1794
1795 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
1796 Treat opaque types like other types.
1797 (c_pretty_printer::direct_abstract_declarator): Opaque types are
1798 supported types.
1799
82e5048e
GA
18002020-11-20 Martin Sebor <msebor@redhat.com>
1801
1802 * c-warn.c (warn_parm_array_mismatch): Bail on invalid redeclarations
1803 with fewer arguments.
1804
18052020-11-20 Martin Sebor <msebor@redhat.com>
1806
1807 PR middle-end/97879
1808 * c-attribs.c (handle_access_attribute): Handle ATTR_FLAG_INTERNAL.
1809 Error out on invalid modes.
1810
18112020-11-20 Jakub Jelinek <jakub@redhat.com>
1812
1813 PR libstdc++/88101
1814 * c-common.c (check_builtin_function_arguments): Handle
1815 BUILT_IN_CLEAR_PADDING.
1816
25bb75f8
GA
18172020-11-18 Nathan Sidwell <nathan@acm.org>
1818
1819 * c-lex.c (c_lex_with_flags): CPP_HEADER_NAMEs can now be seen.
1820
4dabb037
GA
18212020-11-17 Nathan Sidwell <nathan@acm.org>
1822
1823 * c-common.h (enum c_tree_index): Reorder to place lazy fields
1824 after newly-added CTI_MODULE_HWM.
1825
18262020-11-17 Joseph Myers <joseph@codesourcery.com>
1827
1828 * c-cppbuiltin.c (builtin_define_float_constants): Define
1829 "*_IS_IEC_60559__" macros.
1830
18312020-11-17 Nathan Sidwell <nathan@acm.org>
1832
1833 * c-lex.c: #include "langhooks.h".
1834 (cb_undef): Maybe call preprocess_undef lang hook.
1835 * c-opts.c (c_common_post_options): Maybe call preprocess_options
1836 lang hook.
1837 (push_command_line_include): Maybe call preprocess_main_file lang
1838 hook.
1839 (cb_file_change): Likewise.
1840 * c-ppoutput.c: #include "langhooks.h.
1841 (scan_translation_unit): Maybe call preprocess_token lang hook.
1842 (class do_streamer): New, derive from token_streamer.
1843 (directives_only_cb): Data pointer is do_streamer, call
1844 preprocess_token lang hook.
1845 (scan_translation_unit_directives_only): Use do_streamer.
1846 (print_line_1): Move src_line recording to after string output.
1847 (cb_undef): Maybe call preprocess_undef lang hook.
1848
18492020-11-17 Nathan Sidwell <nathan@acm.org>
1850
1851 * c-ppoutput.c (scan_translation_unit): Use token_streamer, remove
1852 code duplicating that functionality.
1853
18542020-11-17 Jakub Jelinek <jakub@redhat.com>
1855
1856 PR c/90628
1857 * c-common.c (check_builtin_function_arguments)
1858 <case BUILT_IN_ADD_OVERFLOW>: Diagnose when last argument is pointer
1859 to _Atomic. For the TYPE_READONLY case, adjust message to be usable
1860 for more builtins and argument positions.
1861
29c5d9ce
GA
18622020-11-16 Iain Sandoe <iain@sandoe.co.uk>
1863
1864 PR objc/97854
1865 * stub-objc.c: Include c-common.h to declare enum rid.
1866
77f67db2
GA
18672020-11-13 Jakub Jelinek <jakub@redhat.com>
1868
1869 PR c++/63287
1870 * c-cppbuiltin.c: Include configargs.h.
1871 (c_cpp_builtins): For C++11 and later if THREAD_MODEL_SPEC is not
1872 defined, predefine __STDCPP_THREADS__ to 1 unless thread_model is
1873 "single".
1874
18752020-11-13 Gergö Barany <gergo@codesourcery.com>
1876 Thomas Schwinge <thomas@codesourcery.com>
1877
1878 * c.opt (fopenacc-kernels): Add.
1879
18802020-11-13 Jason Merrill <jason@redhat.com>
1881
1882 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_using_enum.
1883
18842020-11-13 Piotr H. Dabrowski <phd@phd.re>
1885
1886 PR c++/91318
1887 * c-cppbuiltin.c: c_cpp_builtins_optimize_pragma(): use cpp_define_unused()
1888
18892020-11-13 Martin Liska <mliska@suse.cz>
1890
1891 * c-attribs.c (build_attr_access_from_parms): Format properly.
1892
18932020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1894
1895 PR objc/90707
1896 * c-common.c (c_common_reswords): null_unspecified, nullable,
1897 nonnull, null_resettable: New keywords.
1898 * c-common.h (enum rid): RID_NULL_UNSPECIFIED, RID_NULLABLE,
1899 RID_NONNULL, RID_NULL_RESETTABLE: New.
1900 (OBJC_IS_PATTR_KEYWORD): Include nullability keywords in the
1901 ranges accepted for property attributes.
1902 * c-attribs.c (handle_objc_nullability_attribute): New.
1903 * c-objc.h (enum objc_property_attribute_group): Add
1904 OBJC_PROPATTR_GROUP_NULLABLE.
1905 (enum objc_property_attribute_kind):Add
1906 OBJC_PROPERTY_ATTR_NULL_UNSPECIFIED, OBJC_PROPERTY_ATTR_NULLABLE,
1907 OBJC_PROPERTY_ATTR_NONNULL, OBJC_PROPERTY_ATTR_NULL_RESETTABLE.
1908
19092020-11-13 Iain Sandoe <iain@sandoe.co.uk>
1910
1911 PR objc/77404
1912 * c-attribs.c (handle_objc_root_class_attribute): New
1913 * c-objc.h (objc_start_class_interface): Add a location
1914 value for the position of the class name.
1915 * c.opt: Add Wobjc-root-class.
1916 * stub-objc.c (objc_start_class_interface): Add a location
1917 value for the position of the class name.
1918
a5a11525
GA
19192020-11-12 Joseph Myers <joseph@codesourcery.com>
1920
1921 * c-lex.c (c_common_has_attribute): Take argument std_syntax.
1922 Allow scope for C. Handle standard attributes for C. Do not
1923 accept unscoped attributes if std_syntax and not handled as
1924 standard attributes.
1925 * c-common.h (c_common_has_attribute): Update prototype.
1926
19272020-11-12 Nicholas Guriev <guriev-ns@ya.ru>
1928
1929 PR pch/86674
1930 * c-pch.c (c_common_valid_pch): Use cpp_warning with CPP_W_INVALID_PCH
1931 reason to fix -Werror=invalid-pch and -Wno-error=invalid-pch switches.
1932
0f5f9ed5
GA
19332020-11-11 Patrick Palka <ppalka@redhat.com>
1934
1935 PR c++/88115
1936 * c-opts.c (c_common_post_options): Update latest_abi_version.
1937
bb622641
GA
19382020-11-10 Jakub Jelinek <jakub@redhat.com>
1939
1940 PR c/97748
1941 * c-common.h (warn_if_unused_value): Add quiet argument defaulted
1942 to false.
1943 * c-warn.c (warn_if_unused_value): Likewise. Pass it down
1944 recursively and just return true instead of warning if it is true.
1945 Handle COMPLEX_EXPR.
1946
19472020-11-10 Chung-Lin Tang <cltang@codesourcery.com>
1948
1949 * c-common.h (c_omp_adjust_map_clauses): New declaration.
1950 * c-omp.c (struct map_clause): Helper type for c_omp_adjust_map_clauses.
1951 (c_omp_adjust_map_clauses): New function.
1952
2bee28dd
GA
19532020-11-09 Marek Polacek <polacek@redhat.com>
1954
1955 DR 1914
1956 * c-common.c (attribute_fallthrough_p): Tweak the warning
1957 message.
1958
19592020-11-09 Patrick Palka <ppalka@redhat.com>
1960
1961 * c-pragma.c (handle_pragma_diagnostic): Split the
1962 unknown-option -Wpragmas diagnostic into a warning and a
1963 subsequent note containing a spelling suggestion. Avoid
1964 computing the suggestion if -Wpragmas warnings are being
1965 suppressed.
1966
19672020-11-09 Patrick Palka <ppalka@redhat.com>
1968
1969 PR testsuite/97117
1970 * c-indentation.c (get_visual_column): Remove location_t
1971 parameter. Move the column-tracking diagnostic code from here
1972 to ...
1973 (should_warn_for_misleading_indentation): ... here, before the
1974 early exit for when the loci are not all distinct. Don't pass a
1975 location_t argument to get_visual_column.
1976 (assert_get_visual_column_succeeds): Don't pass a location_t
1977 argument to get_visual_column.
1978 (assert_get_visual_column_fails): Likewise.
1979
fb95de7a
GA
19802020-11-08 Iain Sandoe <iain@sandoe.co.uk>
1981
1982 * c-common.h (OBJC_IS_PATTR_KEYWORD): Add class to the list
1983 of keywords accepted in @property attribute contexts.
1984 * c-objc.h (enum objc_property_attribute_group): Add
1985 OBJC_PROPATTR_GROUP_CLASS.
1986 (enum objc_property_attribute_kind): Add
1987 OBJC_PROPERTY_ATTR_CLASS.
1988
2da7ee05
GA
19892020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1990
1991 * c-common.c (c_common_reswords): Add 'atomic' property
1992 attribute.
1993 * c-common.h (enum rid): Add RID_PROPATOMIC for atomic
1994 property attributes.
1995
19962020-11-07 Iain Sandoe <iain@sandoe.co.uk>
1997
1998 * c-attribs.c (handle_nsobject_attribute): New.
1999 * c.opt: Add WNSObject-attribute.
2000
44cab2d8
GA
20012020-11-06 Iain Sandoe <iain@sandoe.co.uk>
2002
2003 * c-objc.h (enum objc_property_attribute_group): New
2004 (enum objc_property_attribute_kind): New.
2005 (OBJC_PROPATTR_GROUP_MASK): New.
2006 (struct property_attribute_info): Small class encapsulating
2007 parser output from property attributes.
2008 (objc_prop_attr_kind_for_rid): New
2009 (objc_add_property_declaration): Simplify interface.
2010 * stub-objc.c (enum rid): Dummy type.
2011 (objc_add_property_declaration): Simplify interface.
2012 (objc_prop_attr_kind_for_rid): New.
2013
20142020-11-06 Nathan Sidwell <nathan@acm.org>
2015
2016 * c-ada-spec.c (collect_ada_nodes): Rename
2017 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2018 (collect_ada_node): Likewise.
2019 (dump_forward_type): Likewise.
2020 * c-common.c (set_underlying_type): Rename
2021 DECL_IS_BUILTIN->DECL_IS_UNDECLARED_BUILTIN.
2022 (user_facing_original_type, c_common_finalize_early_debug): Likewise.
2023
20242020-11-06 Jakub Jelinek <jakub@redhat.com>
2025
2026 * c-common.c (verify_sequence_points): Remove DEBUG_FUNCTION.
2027
0cfd9109
GA
20282020-11-05 Marek Polacek <polacek@redhat.com>
2029
2030 PR c++/97675
2031 * c.opt (Wexceptions): New option.
2032
20332020-11-05 Marek Polacek <polacek@redhat.com>
2034
2035 PR c++/25814
2036 * c.opt (Wvexing-parse): New option.
2037
35c125cb
GA
20382020-11-04 Jakub Jelinek <jakub@redhat.com>
2039
2040 PR c++/97670
2041 * c-omp.c (c_omp_split_clauses): Look through array reductions to find
2042 underlying decl to clear in the allocate_head bitmap.
2043
20442020-11-04 Iain Sandoe <iain@sandoe.co.uk>
2045
2046 * c-objc.h (objc_non_constant_expr_p): New.
2047 * stub-objc.c (objc_non_constant_expr_p): New.
2048
fd2325ea
GA
20492020-11-03 Nathan Sidwell <nathan@acm.org>
2050
2051 * c.opt (MQ,MT): Reword description to be make-agnostic.
2052
88ce3d5f
GA
20532020-11-02 Nathan Sidwell <nathan@acm.org>
2054
2055 * c-opts.c (c_common_post_options): Move var decl to its
2056 initialization point.
2057
20582020-11-01 Iain Sandoe <iain@sandoe.co.uk>
2059
2060 * c-lex.c (c_lex_with_flags): When combining '@' with a
2061 keyword for Objective-C, combine the location ranges too.
2062
20632020-10-30 Qing Zhao <qing.zhao@oracle.com>
2064 H.J.Lu <hjl.tools@gmail.com>
2065
2066 * c-attribs.c (c_common_attribute_table): Add new attribute
2067 zero_call_used_regs.
2068 (handle_zero_call_used_regs_attribute): New function.
2069
e93aae4a
GA
20702020-10-28 Marek Polacek <polacek@redhat.com>
2071
2072 PR c++/97573
2073 * c-opts.c (c_common_post_options): In C++20, turn on
2074 -Wdeprecated-enum-enum-conversion and
2075 -Wdeprecated-enum-float-conversion.
2076 * c.opt (Wdeprecated-enum-enum-conversion,
2077 Wdeprecated-enum-float-conversion): New options.
2078 (Wenum-conversion): Allow for C++ too.
2079
20802020-10-28 Jakub Jelinek <jakub@redhat.com>
2081
2082 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALLOCATE.
2083 * c-omp.c: Include bitmap.h.
2084 (c_omp_split_clauses): Handle OMP_CLAUSE_ALLOCATE.
2085
f19e7c8d
GA
20862020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2087
2088 * c-common.c (__is_nothrow_assignable): New.
2089 (__is_nothrow_constructible): Likewise.
2090 * c-common.h (RID_IS_NOTHROW_ASSIGNABLE): New.
2091 (RID_IS_NOTHROW_CONSTRUCTIBLE): Likewise.
2092
efe71fcc
GA
20932020-10-23 Jan Hubicka <hubicka@ucw.cz>
2094
2095 * c-common.c (c_common_finalize_early_debug): Update for new thunk api.
2096
20972020-10-23 Marek Polacek <polacek@redhat.com>
2098
2099 PR c++/91741
2100 * c-common.c (verify_tree): Handle PAREN_SIZEOF_EXPR.
2101 (c_common_init_ts): Likewise.
2102 * c-common.def (PAREN_SIZEOF_EXPR): New tree code.
2103 * c-common.h (maybe_warn_sizeof_array_div): Declare.
2104 * c-warn.c (sizeof_pointer_memaccess_warning): Unwrap NOP_EXPRs.
2105 (maybe_warn_sizeof_array_div): New function.
2106 * c.opt (Wsizeof-array-div): New option.
2107
21082020-10-23 Martin Sebor <msebor@redhat.com>
2109
2110 PR c/97463
2111 * c-warn.c (warn_parm_ptrarray_mismatch): Move null test earlier.
2112
56ddd5e2
GA
21132020-10-22 Martin Liska <mliska@suse.cz>
2114
2115 PR c/94722
2116 * c-attribs.c (handle_no_stack_protect_function_attribute): New.
2117 (handle_stack_protect_attribute): Add error message for a
2118 no_stack_protector function.
2119
21202020-10-22 Martin Liska <mliska@suse.cz>
2121
2122 * c-cppbuiltin.c (c_cpp_builtins): Use the stack_protector enum.
2123
21242020-10-22 Jan Hubicka <hubicka@ucw.cz>
2125
2126 * c-gimplify.c: Include tree-nested.h
2127 (c_genericize): Update for new nested function info.
2128
b2698c21
GA
21292020-10-14 Martin Sebor <msebor@redhat.com>
2130
2131 PR c/97413
2132 * c-attribs.c (build_attr_access_from_parms): Wrap chain of VLA
2133 bounds in an extra list.
2134
7e9282ae
GA
21352020-10-05 Richard Biener <rguenther@suse.de>
2136 Jakub Jelinek <jakub@redhat.com>
2137
2138 PR c++/97197
2139 * c-pretty-print.c: Include langhooks.h.
2140 (c_pretty_printer::postfix_expression): Handle TARGET_MEM_REF as
2141 expression.
2142 (c_pretty_printer::expression): Handle TARGET_MEM_REF as
2143 unary_expression.
2144 (c_pretty_printer::unary_expression): Handle TARGET_MEM_REF.
2145
660bfe61
GA
21462020-09-30 Martin Sebor <msebor@redhat.com>
2147
2148 PR middle-end/97189
2149 * c-attribs.c (append_access_attr): Use the function declaration
2150 location for a warning about an attribute access argument.
2151
93bca37c
GA
21522020-09-29 Marek Polacek <polacek@redhat.com>
2153
2154 PR c++/94695
2155 * c.opt (Wrange-loop-construct): New option.
2156
82b77dee
GA
21572020-09-23 Martin Sebor <msebor@redhat.com>
2158
2159 PR c/97131
2160 * c-warn.c (warn_parm_ptrarray_mismatch): Handle more invalid input.
2161
21622020-09-23 Marek Polacek <polacek@redhat.com>
2163
2164 PR c/97125
2165 * c-gimplify.c (c_genericize): Only call do_warn_duplicated_branches_r
2166 after loops and other structured control constructs have been lowered.
2167
521d2711
GA
21682020-09-22 Jakub Jelinek <jakub@redhat.com>
2169
2170 * c.opt (Wbuiltin-declaration-mismatch): Fix typo in variable name:
2171 warn_builtin_declaraion_mismatch -> warn_builtin_declaration_mismatch.
2172
44135373
GA
21732020-09-21 Marek Polacek <polacek@redhat.com>
2174
2175 * c.opt (Wctad-maybe-unsupported): New option.
2176
2fe5b7d1
GA
21772020-09-19 Martin Sebor <msebor@redhat.com>
2178
2179 PR c/50584
2180 * c-common.h (warn_parm_array_mismatch): Declare new function.
2181 (has_attribute): Move declaration of an existing function.
2182 (build_attr_access_from_parms): Declare new function.
2183 * c-warn.c (parm_array_as_string): Define new function.
2184 (plus_one): Define new function.
2185 (warn_parm_ptrarray_mismatch): Define new function.
2186 (warn_parm_array_mismatch): Define new function.
2187 (vla_bound_parm_decl): New function.
2188 * c.opt (-Warray-parameter, -Wvla-parameter): New options.
2189 * c-pretty-print.c (pp_c_type_qualifier_list): Don't print array type
2190 qualifiers here...
2191 (c_pretty_printer::direct_abstract_declarator): ...but instead print
2192 them in brackets here. Also print [static]. Strip extraneous
2193 expressions from VLA bounds.
2194
21952020-09-19 Martin Sebor <msebor@redhat.com>
2196
2197 PR c/50584
2198 * c-attribs.c (c_common_attribute_table): Add "arg spec" attribute.
2199 (handle_argspec_attribute): New function.
2200 (get_argument, get_argument_type): New functions.
2201 (append_access_attrs): Add overload. Handle internal attribute
2202 representation in addition to external.
2203 (handle_access_attribute): Handle internal attribute representation
2204 in addition to external.
2205 (build_attr_access_from_parms): New function.
2206
22072020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2208
2209 * c-gimplify.c (genericize_c_loop): Rewrite to match
2210 c_finish_loop in c-typeck.c.
2211
22122020-09-19 Sandra Loosemore <sandra@codesourcery.com>
2213
2214 * c-common.c (c_block_may_fallthrough): New, split from
2215 cxx_block_may_fallthrough in the cp front end.
2216 (c_common_init_ts): Move handling of loop and switch-related
2217 statements here from the cp front end.
2218 * c-common.def (FOR_STMT, WHILE_STMT, DO_STMT): Move here from
2219 cp front end.
2220 (BREAK_STMT, CONTINUE_STMT, SWITCH_STMT): Likewise.
2221 * c-common.h (c_block_may_fallthru): Declare.
2222 (bc_state_t): Move here from cp front end.
2223 (save_bc_state, restore_bc_state): Declare.
2224 (c_genericize_control_stmt): Declare.
2225 (WHILE_COND, WHILE_BODY): Likewise.
2226 (DO_COND, DO_BODY): Likewise.
2227 (FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY, FOR_SCOPE): Likewise.
2228 (SWITCH_STMT_COND, SWITCH_STMT_BODY): Likewise.
2229 (SWITCH_STMT_TYPE, SWITCH_STMT_SCOPE): Likewise.
2230 (SWITCH_STMT_ALL_CASES_P, SWITCH_STMT_NO_BREAK_P): Likewise.
2231 (LABEL_DECL_BREAK, LABEL_DECL_CONTINUE): Likewise.
2232 * c-dump.c (dump_stmt): Copy from cp front end.
2233 (c_dump_tree): Move code to handle structured loop and switch
2234 tree nodes here from cp front end.
2235 * c-gimplify.c: Adjust includes.
2236 (enum bc_t, bc_label, begin_bc_block, finish_bc_block): Move from
2237 cp front end.
2238 (save_bc_state, restore_bc_state): New functions using old code
2239 from cp front end.
2240 (get_bc_label, expr_loc_or_loc): Move from cp front end.
2241 (genericize_c_loop): Move from cp front end.
2242 (genericize_for_stmt, genericize_while_stmt): Likewise.
2243 (genericize_do_stmt, genericize_switch_stmt): Likewise.
2244 (genericize_continue_stmt, genericize_break_stmt): Likewise.
2245 (genericize_omp_for_stmt): Likewise.
2246 (c_genericize_control_stmt): New function using code split from
2247 cp front end.
2248 (c_genericize_control_r): New.
2249 (c_genericize): Call walk_tree with c_genericize_control_r.
2250 * c-pretty-print.c (c_pretty_printer::statement): Move code to handle
2251 structured loop and switch tree nodes here from cp front end.
2252
2aad20c0
GA
22532020-09-17 Patrick Palka <ppalka@redhat.com>
2254
2255 PR c/80076
2256 * c-indentation.c (should_warn_for_misleading_indentation): Move
2257 declarations of local variables closer to their first use.
2258 Handle virtual token locations by resolving them to their
2259 respective macro expansion points. If all three tokens are
2260 produced from the same macro expansion, then instead use their
2261 loci within the macro definition.
2262
ecde1b0a
GA
22632020-09-16 Martin Sebor <msebor@redhat.com>
2264
2265 PR c/78666
2266 PR c/96126
2267 * c-attribs.c (validate_attr_args): New function.
2268 (validate_attr_arg): Same.
2269 (handle_section_attribute): Call it. Introduce a local variable.
2270 (handle_alloc_size_attribute): Same.
2271 (handle_alloc_align_attribute): Same.
2272
50a71cd0
GA
22732020-09-14 Jakub Jelinek <jakub@redhat.com>
2274
2275 * c-attribs.c (handle_optimize_attribute): Adjust
2276 cl_optimization_save, cl_optimization_restore and
2277 build_optimization_node callers.
2278 * c-pragma.c (handle_pragma_optimize): Adjust
2279 build_optimization_node caller.
2280 (handle_pragma_push_options): Adjust
2281 build_optimization_node and build_target_option_node callers.
2282 (handle_pragma_pop_options, handle_pragma_reset_options):
2283 Adjust cl_optimization_restore callers.
2284
8f7ea26a
GA
22852020-08-28 Martin Sebor <msebor@redhat.com>
2286
2287 * c.opt (Wstringop-overread): New option.
2288
a6493809
GA
22892020-08-11 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR c/96545
2292 * c-common.c (get_atomic_generic_size): Require that first argument's
2293 type points to a complete type and use tree_fits_uhwi_p instead of
2294 just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT.
2295
48cc2e46
GA
22962020-07-31 Martin Sebor <msebor@redhat.com>
2297
2298 PR c++/96003
2299 * c-common.c (check_function_arguments_recurse): Return early when
2300 no-warning bit is set.
2301
23022020-07-31 Richard Biener <rguenther@suse.de>
2303
2304 PR debug/96383
2305 * c-common.h (c_common_finalize_early_debug): Declare.
2306 * c-common.c: Include debug.h.
2307 (c_common_finalize_early_debug): finalize_early_debug langhook
2308 implementation generating debug for extern declarations.
2309
e71dab87
GA
23102020-07-27 Nathan Sidwell <nathan@acm.org>
2311
2312 * c-common.c (try_to_locate_new_include_insertion_point): Use
2313 strcmp, not pointer equality.
2314
ae2e0bc1
GA
23152020-07-25 Martin Sebor <msebor@redhat.com>
2316
2317 PR c++/96310
2318 * c-common.c (check_nonnull_arg): Print note only when warning was
2319 issued.
2320
3ea9abca
GA
23212020-07-22 Tobias Burnus <tobias@codesourcery.com>
2322
2323 * c-omp.c (c_finish_omp_critical): Check for no name but
2324 nonzero hint provided.
2325
0933f508
GA
23262020-07-20 Jason Merrill <jason@redhat.com>
2327
2328 * c-cppbuiltin.c (c_cpp_builtins): Update
2329 __cpp_nontype_template_args for C++20.
2330
23312020-07-20 Martin Sebor <msebor@redhat.com>
2332
2333 PR c/96249
2334 * c.opt: Remove stray text.
2335
8ca07a30
GA
23362020-07-14 Lewis Hyatt <lhyatt@gmail.com>
2337
2338 PR other/86904
2339 * c-indentation.c (should_warn_for_misleading_indentation): Get
2340 global tabstop from the new source.
2341 * c-opts.c (c_common_handle_option): Remove handling of -ftabstop, which
2342 is now a common option.
2343 * c.opt: Likewise.
2344
a82c4c4c 23452020-07-08 Eric Botcazou <ebotcazou@adacore.com>
50873cc5
GA
2346
2347 * c.opt (Wscalar-storage-order): Add explicit variable.
2348
f60ee68d
GA
23492020-07-07 Nathan Sidwell <nathan@acm.org>
2350
2351 * c-opts.c (c_common_post_options): Add 'injecting' arg to
2352 cpp_read_main_file.
2353 (c_finish_options): Add linemap_line_start calls for builtin and cmd
2354 maps. Force token position to line_table's highest line.
2355 * c-ppoutput.c (print_line_1): Refactor, print line zero.
2356 (cb_define): Always increment source line.
2357
4077d74c
GA
23582020-07-06 Martin Sebor <msebor@redhat.com>
2359
2360 PR c++/95984
2361 * c-common.c (check_function_nonnull): Avoid checking syntesized calls
2362 to stub lambda objects with null this pointer.
2363 (check_nonnull_arg): Handle C++ nullptr.
2364
b5f24739
GA
23652020-07-02 Jason Merrill <jason@redhat.com>
2366 Jakub Jelinek <jakub@redhat.com>
2367
2368 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_consteval.
2369
46fbb6c6
GA
23702020-06-30 Jakub Jelinek <jakub@redhat.com>
2371
2372 PR c++/95963
2373 * c-common.c (check_function_arguments_recurse): Don't crash on
2374 calls to internal functions.
2375
69273534
GA
23762020-06-28 Martin Sebor <msebor@redhat.com>
2377
2378 PR c++/86568
2379 * c-common.c (struct nonnull_arg_ctx): Add members.
2380 (check_function_nonnull): Use nonnull_arg_ctx as argument. Handle
2381 C++ member functions specially. Consider the this pointer implicitly
2382 nonnull.
2383 (check_nonnull_arg): Use location of argument when available.
2384 (check_function_arguments): Use nonnull_arg_ctx as argument.
2385
9a33c41f
GA
23862020-06-27 Jakub Jelinek <jakub@redhat.com>
2387
2388 PR middle-end/95903
2389 * c-common.c (pointer_int_sum): Use TYPE_OVERFLOW_UNDEFINED instead of
2390 !TYPE_UNSIGNED check to see if we can apply distributive law and handle
2391 smaller precision intop operands separately.
2392
c9c05f73
GA
23932020-06-26 Marek Polacek <polacek@redhat.com>
2394
2395 * c-opts.c (c_common_init_options): Default to gnu++17.
2396
aff95ee7
GA
23972020-06-17 Jonathan Wakely <jwakely@redhat.com>
2398
bd0a89dc 2399 PR c/95378
aff95ee7
GA
2400 * c-common.c (get_atomic_generic_size): Check cv-qualifiers in
2401 pointer arguments.
2402
56638b9b
GA
24032020-06-16 Jakub Jelinek <jakub@redhat.com>
2404
2405 * c-common.h (c_omp_check_loop_iv_exprs): Add an int argument.
2406 * c-omp.c (struct c_omp_check_loop_iv_data): Add maybe_nonrect and
2407 idx members.
2408 (c_omp_is_loop_iterator): New function.
2409 (c_omp_check_loop_iv_r): Use it. Add support for silent scanning
2410 if outer loop iterator is present. Perform duplicate checking through
2411 hash_set in the function rather than expecting caller to do that.
2412 Pass NULL instead of d->ppset to walk_tree_1.
2413 (c_omp_check_nonrect_loop_iv): New function.
2414 (c_omp_check_loop_iv): Use it. Fill in new members, allow
2415 non-rectangular loop forms, diagnose multiple associated loops with
2416 the same iterator. Pass NULL instead of &pset to walk_tree_1.
2417 (c_omp_check_loop_iv_exprs): Likewise.
2418
ec6ffbb9
GA
24192020-06-10 Martin Liska <mliska@suse.cz>
2420
2421 PR tree-optimization/92860
2422 * c-attribs.c (handle_optimize_attribute):
2423 Save global options and compare it after parsing of function
2424 attribute.
2425 * c-pragma.c (opt_stack::saved_global_options): New field.
2426 (handle_pragma_push_options): Save global_options.
2427 (handle_pragma_pop_options): Compare them after pop.
2428
b952c2cf
GA
24292020-06-09 Jakub Jelinek <jakub@redhat.com>
2430
2431 PR c/95580
2432 * c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
2433 case when MEM_REF's first argument has type pointer to incomplete type.
2434
1a59f3db
GA
24352020-06-05 Jason Merrill <jason@redhat.com>
2436
2437 * c-pretty-print.c (pp_c_additive_expression): Handle negative
2438 operand to POINTER_PLUS_EXPR.
2439
3add3425
GA
24402020-06-04 Martin Sebor <msebor@redhat.com>
2441
2442 PR middle-end/10138
2443 PR middle-end/95136
2444 * c-attribs.c (append_access_attrs): Handle attr_access::none.
2445 (handle_access_attribute): Same.
2446
9a5b7438
GA
24472020-06-03 Mark Wielaard <mark@klomp.org>
2448
2449 * known-headers.cc (get_cp_stdlib_header_for_string_macro_name):
2450 New function.
2451 * known-headers.h (get_cp_stdlib_header_for_string_macro_name):
2452 New function declaration.
2453
24542020-06-03 Mark Wielaard <mark@klomp.org>
2455
2456 * known-headers.cc (get_string_macro_hint): New function.
2457 (get_stdlib_header_for_name): Use get_string_macro_hint.
2458 (get_c_stdlib_header_for_string_macro_name): New function.
2459 * known-headers.h (get_c_stdlib_header_for_string_macro_name):
2460 New function declaration.
2461
24622020-06-03 Tobias Burnus <tobias@codesourcery.com>
2463
2464 * c-common.h (c_omp_predetermined_mapping): Declare.
2465 * c-omp.c (c_omp_predetermined_mapping): New.
2466
af114c38
MW
24672020-05-22 Mark Wielaard <mark@klomp.org>
2468
2469 * known-headers.cc (get_stdlib_header_for_name): Add a new
2470 stdlib_hint array for stdbool and stdint.
2471
45c50b6a
MW
24722020-05-22 Mark Wielaard <mark@klomp.org>
2473
2474 * known-headers.cc (get_stdlib_header_for_name): Return
2475 "<stdbool.h>" for "bool", "true" or "false" when STDLIB_C and
2476 flag_isoc99.
2477
c22027a0
NS
24782020-05-20 Nathan Sidwell <nathan@acm.org>
2479
38a4db21
NS
2480 * c-common.c (try_to_locate_new_include_insertion_point): Revert change.
2481
c22027a0
NS
2482 * c-common.c (try_to_locate_new_include_insertion_point): Use
2483 strcmp to compare filenames.
2484 * c-lex.c (init_c_lex): Move declaration to initialization.
2485 * c-opts.c (handle_deferred_opts): Move cpp_get_deps call into
2486 deferred count loop.
2487
29f0e90d
JM
24882020-05-15 Jason Merrill <jason@redhat.com>
2489
2490 * c-opts.c (set_std_cxx20): Set flag_coroutines.
2491
b04445d4
JM
24922020-05-13 Jason Merrill <jason@redhat.com>
2493
2494 * c.opt (std=c++20): Make c++2a the alias.
2495 (std=gnu++20): Likewise.
2496 * c-common.h (cxx_dialect): Change cxx2a to cxx20.
2497 * c-opts.c: Adjust.
2498 * c-cppbuiltin.c: Adjust.
2499 * c-ubsan.c: Adjust.
2500 * c-warn.c: Adjust.
2501
11dd3be5
EB
25022020-05-12 Eric Botcazou <ebotcazou@adacore.com>
2503
2504 * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry.
2505
b224c376
NS
25062020-05-08 Nathan Sidwell <nathan@acm.org>
2507
2508 Reimplement directives only processing.
2509 * c-ppoutput.c (token_streamer): Ne.
2510 (directives_only_cb): New. Swallow ...
2511 (print_lines_directives_only): ... this.
2512 (scan_translation_unit_directives_only): Reimplment using the
2513 published interface.
2514
f1d94677
MP
25152020-05-07 Marek Polacek <polacek@redhat.com>
2516
2517 * c-format.c (badwords): Add "nonstatic".
2518
9b95bb52
JJ
2519202-05-07 Jakub Jelinek <jakub@redhat.com>
2520
2521 PR c/94968
2522 * c-common.c (speculation_safe_value_resolve_params): Return false if
2523 error_operand_p (val2).
2524 (resolve_overloaded_builtin) <case BUILT_IN_SPECULATION_SAFE_VALUE_N>:
2525 Remove extraneous semicolon.
2526
530b4409 25272020-05-06 qing zhao <qing.zhao@oracle.com>
2528
2529 PR c/94230
2530 * c-indentation.c (get_visual_column): Add a hint to use the new
2531 -flarge-source-files option.
2532
b776bdca
SSF
25332020-05-05 Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
2534
2535 * c-attribs.c (handle_vector_size_attribute): Add attribute
2536 nonnull for argument args in order to silence warning of
2537 uninitialized variable usage. Since this is local to the
2538 compilation unit and thus cannot be checked at call sides by the
2539 compiler, added an assert statement in order to verify this.
2540
6607bdd9
L
25412020-05-01 H.J. Lu <hongjiu.lu@intel.com>
2542
2543 PR target/93492
2544 * c-attribs.c (handle_patchable_function_entry_attribute): Limit
2545 value to USHRT_MAX (65535).
2546
691eeb65
JJ
25472020-04-29 Jakub Jelinek <jakub@redhat.com>
2548
2549 * c-format.c (PP_FORMAT_CHAR_TABLE): Add %{ and %}.
2550
26d76be7
JJ
25512020-04-27 Jakub Jelinek <jakub@redhat.com>
2552
2553 PR c/94755
2554 * c-common.c (resolve_overloaded_builtin): Return error_mark_node for
2555 fncode == BUILT_IN_NONE before initialization of first_param.
2556
7291b2ed
MP
25572020-04-23 Marek Polacek <polacek@redhat.com>
2558
2559 PR c++/94733
2560 * c-attribs.c (find_tm_attribute): Use get_attribute_name instead of
2561 TREE_PURPOSE.
2562
58a29af8
PP
25632020-04-14 Patrick Palka <ppalka@redhat.com>
2564
2565 PR c++/85278
2566 * c-pretty-print.c (pp_c_pointer) <case REFERENCE_TYPE>: Print a double
2567 ampersand if it's an rvalue reference type.
2568
09f04139
MS
25692020-04-13 Martin Sebor <msebor@redhat.com>
2570
2571 PR c/92326
2572 * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator): Avoid
2573 printing array bound for flexible array members.
2574
ee26baf4
IS
25752020-04-13 Iain Sandoe <iain@sandoe.co.uk>
2576
2577 * c-cppbuiltin.c (c_cpp_builtins): Update coroutines builtin
2578 define, per n4861.
2579
75efe9cb
RB
25802020-04-02 Richard Biener <rguenther@suse.de>
2581
2582 PR c/94392
2583 * c-opts.c (c_common_post_options): Enable -ffinite-loops
2584 for -O2 and C++11 or newer.
2585
75defde9
PP
25862020-03-28 Patrick Palka <ppalka@redhat.com>
2587
2588 * c.opt: Add -fconcepts-diagnostics-depth.
2589
52f24a9e
MS
25902020-03-27 Martin Sebor <msebor@redhat.com>
2591
2592 PR c++/94346
2593 * c-attribs.c (handle_copy_attribute): Avoid passing expressions
2594 to decl_attributes. Make handling of different kinds of entities
2595 more robust.
2596
ccacf77b
MS
25972020-03-27 Martin Sebor <msebor@redhat.com>
2598
2599 PR c++/94098
2600 * c-attribs.c (handle_access_attribute): Avoid setting TYPE_ATTRIBUTES
2601 here.
2602
ca6c7225
JJ
26032020-03-23 Jakub Jelinek <jakub@redhat.com>
2604
2605 PR c++/91993
2606 * c-warn.c (warnings_for_convert_and_check): For expr and/or
2607 result being COMPOUND_EXPRs, skip to ultimate rhs.
2608
1aa22b19
RS
26092020-03-20 Richard Sandiford <richard.sandiford@arm.com>
2610
2611 PR middle-end/94072
2612 * c-common.c (c_common_type_for_mode): Before using a registered
2613 built-in type, check that the vectorness of the type matches
2614 the vectorness of the mode.
2615
700d4cb0
JJ
26162020-03-17 Jakub Jelinek <jakub@redhat.com>
2617
2618 * c-common.c (resolve_overloaded_builtin): Fix up duplicated word
2619 issue in a diagnostic message.
2620
b408e010
LH
26212020-03-15 Lewis Hyatt <lhyatt@gmail.com>
2622
2623 * c.opt: Avoid redundancy in the help text.
2624
e78e50d5
MP
26252020-03-02 Marek Polacek <polacek@redhat.com>
2626
2627 PR c++/93958 - add missing -std=gnu++20.
2628 * c.opt: Add -std=gnu++20.
2629
649e1741
MS
26302020-03-01 Martin Sebor <msebor@redhat.com>
2631
2632 PR c++/92721
2633 * c-attribs.c (append_access_attrs): Correctly handle attribute.
2634 (handle_access_attribute): Same.
2635
7b60f3ba
JJ
26362020-02-25 Jakub Jelinek <jakub@redhat.com>
2637
2638 PR c/93858
2639 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
2640 "did you mean" hint in diagnostics.
2641
fb260504
JM
26422020-02-15 Jason Merrill <jason@redhat.com>
2643
2644 * c.opt: Add -std=c++20.
2645
1d757b09
EB
26462020-02-14 Eric Botcazou <ebotcazou@adacore.com>
2647
2648 * c-ada-spec.c: Include bitmap.h.
2649 (dump_ada_double_name): Rename into...
2650 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
2651 (dump_ada_array_type): Adjust to above renaming. Robustify.
2652 (dump_nested_types_1): New function copied from... Add dumped_types
2653 parameter and pass it down to dump_nested_type.
2654 (dump_nested_types): ...this. Remove parent parameter. Just call
2655 dump_nested_types_1 on an automatic bitmap.
2656 (dump_nested_type): Add dumped_types parameter.
2657 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
2658 Adjust recursive calls and adjust to above renaming.
2659 (dump_ada_declaration): Adjust call to dump_nested_types.
2660 Tidy up and adjust to above renaming.
2661 (dump_ada_specs): Initialize and release bitmap obstack.
2662
0cc575e4
MS
26632020-02-10 Martin Sebor <msebor@redhat.com>
2664
2665 PR c/93640
2666 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
2667
a59aa302
JJ
26682020-02-10 Jakub Jelinek <jakub@redhat.com>
2669
2670 PR other/93641
2671 * c-format.c (check_plain): Fix up last argument of strncasecmp.
2672 Remove useless extra test.
2673
e464fc90
TB
26742020-02-03 Julian Brown <julian@codesourcery.com>
2675 Tobias Burnus <tobias@codesourcery.com>
2676
2677 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
2678
e3b6c052
JM
26792020-01-29 Jason Merrill <jason@redhat.com>
2680
2681 PR c++/89357
2682 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
2683
6d00f052
JM
26842020-01-23 Jason Merrill <jason@redhat.com>
2685
2686 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
2687
8a990ffa
MS
26882020-01-23 Martin Sebor <msebor@redhat.com>
2689
2690 PR c/84919
2691 * c-common.c (check_function_arguments): Avoid overlap checking
2692 of sprintf functions.
2693
55b7df8b
JM
26942020-01-22 Jason Merrill <jason@redhat.com>
2695
2696 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
2697 PR c++/40752
2698 * c-warn.c (conversion_warning): Check operands only after checking
2699 the whole expression. Don't check second operand of + for sign.
2700
c77074d0
JM
27012020-01-21 Jason Merrill <jason@redhat.com>
2702 Manuel López-Ibáñez <manu@gcc.gnu.org>
2703
2704 PR c++/40752 - useless -Wconversion with short +=.
2705 * c.opt (-Warith-conversion): New.
2706 * c-warn.c (conversion_warning): Recurse for operands of
2707 operators. Only warn about the whole expression with
2708 -Warith-conversion.
2709
731dbfc3
JM
27102020-01-21 Jason Merrill <jason@redhat.com>
2711
2712 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
2713 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
2714
ad1a3914
NS
27152020-01-20 Nathan Sidwell <nathan@acm.org>
2716
2717 PR preprocessor/80005
2718 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
2719
49789fd0
IS
27202020-01-18 Iain Sandoe <iain@sandoe.co.uk>
2721
2722 * c-common.c (co_await, co_yield, co_return): New.
2723 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
2724 RID_CO_RETURN): New enumeration values.
2725 (D_CXX_COROUTINES): Bit to identify coroutines are active.
2726 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
2727 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
2728 * c.opt (fcoroutines): New command-line switch.
2729
4bc1899b
DM
27302020-01-10 David Malcolm <dmalcolm@redhat.com>
2731
2732 * c-format.c (local_event_ptr_node): New.
2733 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
2734 (init_dynamic_diag_info): Initialize local_event_ptr_node.
2735 * c-format.h (T_EVENT_PTR): New define.
2736
f25e33fa
MS
27372020-01-10 Martin Sebor <msebor@redhat.com>
2738
2739 PR c/93132
2740 * c-attribs.c (append_access_attrs): Validate against the translated
2741 access string rather than the human-readable representation.
2742
8d9254fc
JJ
27432020-01-01 Jakub Jelinek <jakub@redhat.com>
2744
2745 Update copyright years.
2746
39292e25
EB
27472019-12-20 Eric Botcazou <ebotcazou@adacore.com>
2748
2749 * c-ada-spec.h (decl_sloc): Delete.
2750 * c-ada-spec.c (decl_sloc): Make static.
2751
519d7496
JB
27522019-12-19 Julian Brown <julian@codesourcery.com>
2753
2754 * c-common.h (c_omp_map_clause_name): Add prototype.
2755 * c-omp.c (c_omp_map_clause_name): New function.
2756 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
2757 PRAGMA_OACC_CLAUSE_DETACH.
2758
a6163563
JB
27592019-12-19 Julian Brown <julian@codesourcery.com>
2760 Maciej W. Rozycki <macro@codesourcery.com>
2761 Tobias Burnus <tobias@codesourcery.com>
2762 Thomas Schwinge <thomas@codesourcery.com>
2763
2764 * c-pragma.h (pragma_omp_clause): Add
2765 PRAGMA_OACC_CLAUSE_NO_CREATE.
2766
e8f1ade2
MS
27672019-12-17 Martin Sebor <msebor@redhat.com>
2768
2769 PR c++/61339
2770 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
2771
368877a1
DM
27722019-12-11 David Malcolm <dmalcolm@redhat.com>
2773
2774 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
2775 implementation.
2776 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
2777
d68f5d45
DM
27782019-12-09 David Malcolm <dmalcolm@redhat.com>
2779
2780 * c-format.c (range_label_for_format_type_mismatch::get_text):
2781 Replace label_text ctor called with true with label_text::take.
2782
d3e28653
DM
27832019-12-09 David Malcolm <dmalcolm@redhat.com>
2784
2785 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
2786 initial newline from expected outputs.
2787 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
2788 call to diagnostic_show_locus.
2789
abd6d8cc
JJ
27902019-12-06 Jakub Jelinek <jakub@redhat.com>
2791
2792 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
2793 now.
2794
7906797e
MP
27952019-12-05 Marek Polacek <polacek@redhat.com>
2796 Jakub Jelinek <jakub@redhat.com>
2797
2798 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
2799 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
2800
5c04da88
MP
28012019-12-05 Marek Polacek <polacek@redhat.com>
2802
2803 PR c++/92271 - make __is_same alias for __is_same_as.
2804 * c-common.c: Add __is_same, an alias for __is_same_as.
2805
43aae289
MP
28062019-12-03 Marek Polacek <polacek@redhat.com>
2807
2808 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
2809 * c-cppbuiltin.c (c_cpp_builtins): Predefine
2810 __cpp_aggregate_paren_init=201902 for -std=c++2a.
2811
d7ddfbcb
JH
28122019-11-30 Jan Hubicka <hubicka@ucw.cz>
2813
2814 * c-attribs.c (handle_symver_attribute): New function
2815 (c_common_attributes): Add symver.
2816
65ef05d0
RS
28172019-11-30 Richard Sandiford <richard.sandiford@arm.com>
2818
2819 * c-common.c (pointer_int_sum): Use verify_type_context to check
2820 whether the target allows pointer arithmetic for the types involved.
2821 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
2822 to check whether the target allows sizeof and alignof operations
2823 for the types involved.
2824
1a291106
JM
28252019-11-27 Jason Merrill <jason@redhat.com>
2826
2827 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2828
05d6cb1a
JJ
28292019-11-26 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR c++/61414
2832 * c-attribs.c (handle_mode_attribute): Add mode attribute to
2833 ENUMERAL_TYPEs.
2834
5b8d9367
JM
28352019-11-25 Joseph Myers <joseph@codesourcery.com>
2836
2837 PR c/91985
2838 * c-common.c (c_common_type_for_mode): Handle decimal
2839 floating-point types being NULL_TREE.
2840 * c-format.c (get_format_for_type_1): Handle specified types being
2841 NULL_TREE.
2842 * c-lex.c (interpret_float): Give an error for decimal
2843 floating-point constants when decimal floating-point not
2844 supported.
2845
1fbf51cb
JJ
28462019-11-23 Jakub Jelinek <jakub@redhat.com>
2847
2848 PR middle-end/83859
2849 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
2850 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
2851 group warning with inform together.
2852 (handle_access_attribute): Formatting fix.
2853
761df906
JJ
28542019-11-22 Jakub Jelinek <jakub@redhat.com>
2855
bdaf8be1
JJ
2856 PR c/90677
2857 * c-common.h (identifier_global_tag): Declare.
2858 * c-format.c (get_pointer_to_named_type): Renamed to ...
2859 (get_named_type): ... this. Use identifier_global_tag instead of
2860 identifier_global_value, handle the return value being a TYPE_P.
2861 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
2862 to call get_named_type instead. Formatting fixes.
2863
c2ecce6d 2864 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
2865 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
2866 and __cpp_generic_lambdas for -std=c++2a. Define
2867 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
2868 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
2869 __cpp_concepts for -std=c++2a.
2870
54aa6b58
MS
28712019-11-22 Martin Sebor <msebor@redhat.com>
2872
2873 PR middle-end/83859
2874 * c-attribs.c (handle_access_attribute): New function.
2875 (c_common_attribute_table): Add new attribute.
2876 (get_argument_type): New function.
2877 (append_access_attrs): New function.
2878 (get_nonnull_operand): Rename...
2879 (get_attribute_operand): ...to this.
2880 * c-common.c (get_nonnull_operand): Rename...
2881 (get_attribute_operand): ...to this.
2882
6c80b1b5
JM
28832019-11-21 Joseph Myers <joseph@codesourcery.com>
2884
2885 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
2886 of warning.
2887
192961ff
JM
28882019-11-19 Joseph Myers <joseph@codesourcery.com>
2889
2890 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
2891 warning for standard attributes mixed with fallthrough attributes.
2892
f8aea5e3
JM
28932019-11-15 Joseph Myers <joseph@codesourcery.com>
2894
2895 * c-attribs.c (handle_fallthrough_attribute): Remove static.
2896 * c-common.h (handle_fallthrough_attribute): Declare.
2897
2cc94aa8
JM
28982019-11-15 Joseph Myers <joseph@codesourcery.com>
2899
2900 * c-attribs.c (handle_deprecated_attribute): Remove static.
2901 * c-common.h (handle_deprecated_attribute): Declare.
2902
7c5890cc
JM
29032019-11-14 Joseph Myers <joseph@codesourcery.com>
2904
2905 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
2906 char for C.
2907
b2417b59
JJ
29082019-11-14 Jakub Jelinek <jakub@redhat.com>
2909
d0ec7c93
JJ
2910 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
2911 valid vendors.
2912
b2417b59
JJ
2913 * c-omp.c (c_omp_check_context_selector): Handle name lists
2914 containing string literals. Don't diagnose atomic_default_mem_order
2915 with multiple props.
2916
00be2a5f
JM
29172019-11-13 Joseph Myers <joseph@codesourcery.com>
2918
2919 * c-cppbuiltin.c (builtin_define_float_constants): Also define
2920 NORM_MAX constants. Update call to get_max_float.
2921 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
2922 constants.
2923
2dbad62d
EB
29242019-11-13 Eric Botcazou <ebotcazou@adacore.com>
2925
2926 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
2927 (dump_forward_type): Do not generate a declaration for function types.
2928 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
2929 of the component type if it is declared in another file.
2930
6ed76044
ML
29312019-11-12 Martin Liska <mliska@suse.cz>
2932
2933 * c-opts.c (c_common_post_options):
2934 Use SET_OPTION_IF_UNSET.
2935
62aee289
MR
29362019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
2937 Frederik Harwath <frederik@codesourcery.com>
2938
2939 gcc/c-family/
2940 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
2941 constant.
2942 * c-pragma.c (oacc_pragmas): Add "serial" entry.
2943
f486280c
RS
29442019-11-08 Richard Sandiford <richard.sandiford@arm.com>
2945
2946 * c-common.h (gnu_vector_type_p): New function.
2947 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
2948 vectors to satisfy gnu_vector_type_p.
2949 (c_build_vec_convert): Likewise __builtin_convertvector.
2950 (convert_vector_to_array_for_subscript): Likewise when applying
2951 implicit vector to array conversion.
2952 (scalar_to_vector): Likewise when converting vector-scalar
2953 operations to vector-vector operations.
2954
017c6491
JM
29552019-11-08 Joseph Myers <joseph@codesourcery.com>
2956
2957 * c.opt (Wold-style-definition): Initialize to -1.
2958 * c-opts.c (c_common_post_options): Set warn_old_style_definition
2959 to flag_isoc2x if not set explicitly.
2960
c01bd174
JM
29612019-11-07 Joseph Myers <joseph@codesourcery.com>
2962
2963 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
2964
0df65305
JM
29652019-11-05 Jason Merrill <jason@redhat.com>
2966
2967 * c-opts.c (c_common_post_options): -fconcepts-ts implies
2968 -fconcepts.
2969
e0c866dd
KK
29702019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
2971
2972 * c-opts.c (c_common_post_options): Update
2973 latest_abi_version.
2974
f968ef9b
JJ
29752019-11-02 Jakub Jelinek <jakub@redhat.com>
2976
d0c464d2
JJ
2977 * c-common.h (c_omp_get_context_selector): Remove.
2978 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
2979 and renamed to omp_get_context_selector.
2980
917dd789
JJ
2981 * c-omp.c (c_omp_mark_declare_variant): Use
2982 omp_context_selector_set_compare.
2983
f968ef9b
JJ
2984 PR c++/88335 - Implement P1073R3: Immediate functions
2985 * c-common.h (enum rid): Add RID_CONSTEVAL.
2986 * c-common.c (c_common_reswords): Add consteval.
2987
5f6705b7
JJ
29882019-11-01 Martin Sebor <msebor@redhat.com>
2989
2990 PR middle-end/91679
2991 PR middle-end/91647
2992 PR middle-end/91463
2993 PR middle-end/92312
2994 * c-pretty-print.c (direct_abstract_declarator): Print
2995 bound in zero-length arrays.
2996 * c.opt (-Wzero-length-bounds): New option.
2997
43f1814c
NS
29982019-10-30 Nathan Sidwell <nathan@acm.org>
2999
3000 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
3001 macros.
3002
ad1539d5
MS
30032019-10-28 Martin Sebor <msebor@redhat.com>
3004
3005 PR c/66970
3006 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
3007 even when only preprocessing.
3008 * c-common.h (names_builtin_p): Declare new function.
3009 * c-lex.c (init_c_lex): Set has_builtin.
3010 (c_common_has_builtin): Define a new function.
3011 * c-ppoutput.c (init_pp_output): Set has_builtin.
3012
135df52c
JJ
30132019-10-24 Jakub Jelinek <jakub@redhat.com>
3014
3015 * c-common.h (c_omp_context_selector_matches): Remove.
3016 * c-omp.c (c_omp_context_selector_matches): Remove.
3017 * c-attribs.c (c_common_attribute_table): Add
3018 "omp declare target {host,nohost,block}" attributes.
3019
8ad0c477
JM
30202019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
3021
3022 * c-lex.c (c_common_has_attribute): Update nodiscard value.
3023
56898e43
RS
30242019-10-14 Richard Sandiford <richard.sandiford@arm.com>
3025
3026 * c-common.h (user_facing_original_type_p): Declare.
3027 * c-common.c: Include c-spellcheck.h.
3028 (user_facing_original_type_p): New function.
3029
20de9568
JJ
30302019-10-12 Jakub Jelinek <jakub@redhat.com>
3031
3032 * c-common.h (c_omp_mark_declare_variant,
3033 c_omp_context_selector_matches): Declare.
3034 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
3035 and hsa-common.h.
3036 (c_omp_get_context_selector): Support second argument NULL.
3037 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
3038 functions.
3039 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
3040 attribute, add "omp declare variant base" and
3041 "omp declare variant variant" attributes.
3042
175a85b2
JM
30432019-10-11 Joseph Myers <joseph@codesourcery.com>
3044
3045 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
3046 CppReason(CPP_W_C11_C2X_COMPAT).
3047
fe2bc27c
JM
30482019-10-11 Joseph Myers <joseph@codesourcery.com>
3049
3050 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
3051 _Decimal64 and _Decimal128.
3052
27dfdc0f
JM
30532019-10-10 Joseph Myers <joseph@codesourcery.com>
3054
3055 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
3056 types if DFP not supported.
3057
94e7f906
JJ
30582019-10-10 Jakub Jelinek <jakub@redhat.com>
3059
3060 * c-common.h (c_omp_check_context_selector,
3061 c_omp_get_context_selector): Declare.
3062 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
3063 in diagnostic message.
3064 (c_omp_check_context_selector, c_omp_get_context_selector): New
3065 functions.
3066 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
3067 attribute.
3068 (handle_omp_declare_variant_attribute): New function.
3069
a7160771
MS
30702019-10-09 Martin Sebor <msebor@redhat.com>
3071
3072 PR tree-optimization/90879
3073 * c.opt (-Wstring-compare): New option.
3074
cb57504a
JM
30752019-10-08 Andrew Sutton <asutton@lock3software.com>
3076 Jason Merrill <jason@redhat.com>
3077
3078 Update the concepts implementation to conform to the C++20
3079 specification, improve compile times, and generally clean up
3080 the implementation.
3081
3082 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
3083 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
3084 * c.opt: Add -Wconcepts-ts.
3085 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
3086 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
3087 (set_std_cxx2a): Enable concepts by default.
3088
fbb2a6dc
JM
30892019-10-08 Joseph Myers <joseph@codesourcery.com>
3090
3091 * c-opts.c (c_common_post_options): Set
3092 -fno-fp-int-builtin-inexact for C2X.
3093
8e007055
JJ
30942019-10-05 Jakub Jelinek <jakub@redhat.com>
3095
3096 PR c++/91369 - Implement P0784R7: constexpr new
3097 * c-cppbuiltin.c (c_cpp_builtins): Predefine
3098 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
3099
843f104d
JM
31002019-10-04 Joseph Myers <joseph@codesourcery.com>
3101
3102 PR c/82752
3103 * c-format.c (C_STD_VER): Handle C2x.
3104 (C_STD_NAME): Likewise.
3105 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
3106 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
3107 modifier allowed and 'p' flag.
3108 * c-format.h (enum format_std_version): Add STD_C2X.
3109 (struct format_char_info): Mention 'p' in comment on flags2.
3110
e9c9a142
DM
31112019-10-01 David Malcolm <dmalcolm@redhat.com>
3112
3113 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
3114 calling diagnostic_show_locus, rather than destroying it afterwards.
3115
7552c36a
JJ
31162019-10-01 Jakub Jelinek <jakub@redhat.com>
3117
3118 PR c++/91925
3119 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
3120 with NULL DECL_FIELD_OFFSET.
3121
8209db25
RS
31222019-10-01 Richard Sandiford <richard.sandiford@arm.com>
3123
3124 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
3125 has a type name, use it in preference to the __vector syntax.
3126
9343bf99
RS
31272019-09-30 Richard Sandiford <richard.sandiford@arm.com>
3128
3129 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
3130 two spaces between a comma and "...".
3131
59bc434a
JJ
31322019-09-27 Jakub Jelinek <jakub@redhat.com>
3133
3134 PR c++/88203
3135 * c-common.h (c_omp_predefined_variable): Declare.
3136 * c-omp.c (c_omp_predefined_variable): New function.
3137 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
3138 for predefined variables.
3139
c6447c20
RS
31402019-09-27 Richard Sandiford <richard.sandiford@arm.com>
3141
3142 * c-common.h (build_function_call_vec): Take the original
3143 function decl as an optional final parameter.
3144 (check_builtin_function_arguments): Take the original function decl.
3145 * c-common.c (check_builtin_function_arguments): Likewise.
3146 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
3147 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
3148
c4438114
JM
31492019-09-15 Jason Merrill <jason@redhat.com>
3150
3151 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
3152 fold_for_warn in "|| mask" warning.
3153
68a57628
ML
31542019-09-10 Martin Liska <mliska@suse.cz>
3155
3156 * c.opt: Use newly added WarnRemoved.
3157
f48ef52e
ML
31582019-09-09 Martin Liska <mliska@suse.cz>
3159
3160 * c.opt: Update comment of removed
3161 options that are preserved only for backward
3162 compatibility.
3163
67f6e649
ML
31642019-09-06 Martin Liska <mliska@suse.cz>
3165
3166 PR c++/91125
3167 * c-common.c: Remove definition of flag_use_repository.
3168 * c-common.h: Likewise.
3169 * c-opts.c (c_common_handle_option):
3170 Do not handle OPT_frepo option.
3171 * c.opt: Mark the option with Deprecated.
3172
db9d2274
MP
31732019-09-04 Marek Polacek <polacek@redhat.com>
3174
3175 * c.opt (fdeduce-init-list): Ignored.
3176
68e2c199
PK
31772019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3178
3179 PR c/78736
3180 * c.opt (Wenum-conversion): New option.
3181
7a4418a5
JL
31822019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3183
3184 * c-attribs.c (handle_section_attribute): Call the
3185 handle_generic_attribute target hook after performing target
3186 independent processing.
3187 (handle_noinit_attribute): Likewise.
3188
5f76ab15
ILT
31892019-09-03 Ian Lance Taylor <iant@golang.org>
3190
3191 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
3192 when using -fgo-dump-spec.
3193
ae0d3f6a
ML
31942019-09-02 Martin Liska <mliska@suse.cz>
3195
3196 PR c++/91155
3197 * c-common.c (fname_as_string): Use cxx_printable_name for
3198 __PRETTY_FUNCTION__ same as was used before r265711.
3199
8a902edb
MP
32002019-08-28 Marek Polacek <polacek@redhat.com>
3201
3202 Implement P1152R4: Deprecating some uses of volatile.
3203 PR c++/91361
3204 * c-opts.c (c_common_post_options): Enable -Wvolatile by
3205 default for C++2a, unless -Wno-deprecated.
3206 * c.opt (Wvolatile): New warning.
3207
4742dbe7
MP
32082019-08-28 Marek Polacek <polacek@redhat.com>
3209
3210 PR c++/91360 - Implement C++20 P1143R2: constinit.
3211 * c-common.c (c_common_reswords): Add constinit and __constinit.
3212 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
3213 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
3214 RID_LAST_CXX20.
3215 (D_CXX20): Define.
3216 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
3217 * c-format.c (cxx_keywords): Add "constinit".
3218 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
3219
6a074892
JJ
32202019-08-27 Jakub Jelinek <jakub@redhat.com>
3221
3222 PR c++/91415
3223 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
3224 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
3225 like COMPOUND_EXPR rather than normal expression.
3226
22f8849d
IS
32272019-08-23 Iain Sandoe <iain@sandoe.co.uk>
3228
3229 PR pch/61250
3230 * c-lex.c (c_lex_with_flags): Don't call
3231 c_common_no_more_pch () from here.
3232
df375b03
JJ
32332019-08-23 Jakub Jelinek <jakub@redhat.com>
3234
3235 PR middle-end/91283
3236 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
3237 instead of flag_excess_precision_cmdline.
3238 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
3239 * c-opts.c (c_common_post_options): Likewise.
3240
14b7950f
MS
32412019-08-22 Martin Sebor <msebor@redhat.com>
3242
3243 PR middle-end/91490
3244 * c-common.c (braced_list_to_string): Add argument and overload.
3245 Handle flexible length arrays and unions.
3246
8bb2ee59
EB
32472019-08-21 Eric Botcazou <ebotcazou@adacore.com>
3248
3249 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
3250 function declarations where arguments are missing. Rename variables.
3251
21c1e205
RB
32522019-08-15 Richard Biener <rguenther@suse.de>
3253
3254 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
3255 enabled, define __SIZETYPE__.
3256
f0033821
CL
32572019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
3258
3259 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
3260 exclusion with "section" attribute.
3261 (attr_noinit_exclusions): New table.
3262 (handle_noinit_attribute): New function.
3263
4d732405
RS
32642019-08-13 Richard Sandiford <richard.sandiford@arm.com>
3265
3266 PR middle-end/91421
3267 * c-common.c (resolve_overloaded_builtin): Use
3268 copy_decl_built_in_function.
3269
51ad8481
MS
32702019-08-13 Martin Sebor <msebor@redhat.com>
3271
3272 PR c/80619
3273 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
3274 (asm_fprintf_length_spec): Same.
3275 * c-format.h (format_lengths): Add FMT_LEN_w.
3276
77eb117f
JJ
32772019-08-10 Jakub Jelinek <jakub@redhat.com>
3278
3279 * c-pragma.h (enum pragma_omp_clause): Add
3280 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
3281
398e3feb
JJ
32822019-08-07 Jakub Jelinek <jakub@redhat.com>
3283
3284 * c-pragma.h (enum pragma_omp_clause): Add
3285 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
3286 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
3287 enumeration value.
3288
ab574db6
MP
32892019-08-05 Marek Polacek <polacek@redhat.com>
3290
3291 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
3292 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
3293 default for C++2a, unless -Wno-deprecated.
3294 * c.opt (Wcomma-subscript): New warning.
3295
554a530f
JJ
32962019-07-20 Jakub Jelinek <jakub@redhat.com>
3297
3298 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
3299 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
3300 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
3301 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
3302 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
3303 constructs with the loop construct.
3304
1a888209
JJ
33052019-07-13 Jakub Jelinek <jakub@redhat.com>
3306
3307 PR c/91149
3308 * c-omp.c (c_omp_split_clauses): Fix a pasto in
3309 OMP_CLAUSE_REDUCTION_TASK handling.
3310
1fdd6f04
JJ
33112019-07-12 Jakub Jelinek <jakub@redhat.com>
3312
3313 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
3314 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
3315
99b1c316
MS
33162019-07-09 Martin Sebor <msebor@redhat.com>
3317
3318 PR c++/61339
1fdd6f04 3319 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
3320 and others to class.
3321 * c-pretty-print.h: Same.
3322
6c1dae73
MS
33232019-07-09 Martin Sebor <msebor@redhat.com>
3324
3325 PR c++/61339
3326 * c-format.c (check_argument_type): Change class-key from class to
3327 struct and vice versa to match convention and avoid -Wclass-is-pod
3328 and -Wstruct-no-pod.
3329 * c-pretty-print.h: Same.
3330
8ba6ea87
ML
33312019-07-03 Martin Liska <mliska@suse.cz>
3332
3333 * c-common.c (try_to_locate_new_include_insertion_point): Remove
3334 dead assignemts.
3335
83eb9522
JJ
33362019-07-03 Jakub Jelinek <jakub@redhat.com>
3337
3338 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
3339 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
3340 with OMP_PARALLEL.
3341
1c6ffbab
QZ
33422019-07-02 qing zhao <qing.zhao@oracle.com>
3343
3344 PR preprocessor/90581
3345 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
3346 * c.opt: Add new option -fmax-include-depth.
3347
7ffc7de5
JM
33482019-06-26 Jason Merrill <jason@redhat.com>
3349
3350 PR c++/55442 - memory-hog with highly recursive constexpr.
3351 * c.opt (fconstexpr-loop-limit): New.
3352
361af3e4
JJ
33532019-06-25 Jakub Jelinek <jakub@redhat.com>
3354
3355 PR sanitizer/90954
3356 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
3357 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
3358
ab20d992
JJ
33592019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3360
3361 * c-common.c (c_common_nodes_and_builtins): Define
3362 alternate "__intN__" name for "__intN" types.
3363
f4af4019
JH
33642019-06-24 Jan Hubicka <jh@suse.cz>
3365
3366 * c-common.c (braced_lists_to_strings): Check that
3367 type is array or integer prior checking string flag.
3368
da9e9b57
MB
33692019-06-21 Matthew Beliveau <mbelivea@redhat.com>
3370
3371 PR c++/90875 - added -Wswitch-outside-range option
3372 * c.opt (Wswitch-outside-range): Added new option.
3373 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
3374
3f3d6a6f
MP
33752019-06-21 Marek Polacek <polacek@redhat.com>
3376
3377 PR c++/90953 - ICE with -Wmissing-format-attribute.
3378 * c-common.c (check_function_arguments_recurse): Use
3379 get_attribute_name.
3380 (check_missing_format_attribute): Likewise.
3381
1bf32c11
MP
33822019-06-19 Marek Polacek <polacek@redhat.com>
3383
3384 PR c++/60364 - noreturn after first decl not diagnosed.
3385 * c-attribs.c (handle_noreturn_attribute): No longer static.
3386 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
3387 Declare.
3388 * c-format.c (check_function_format): Use get_attribute_name.
3389
a04c0734
MS
33902019-06-19 Martin Sebor <msebor@redhat.com>
3391
3392 PR translation/90156
3393 * c-format.c (function_format_info::format_type): Adjust type.
3394 (function_format_info::is_raw): New member.
3395 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
3396 (decode_format_attr): Adjust call to decode_format_type.
3397 Avoid a redundant call to convert_format_name_to_system_name.
3398 Avoid abbreviating the word "arguments" in a diagnostic.
3399 (format_warning_substr): New function.
3400 (avoid_dollar_number): Quote dollar sign in a diagnostic.
3401 (finish_dollar_format_checking): Same.
3402 (check_format_info): Same.
3403 (struct baltoks_t): New.
3404 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
3405 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
3406 functions.
3407 (check_format_info_main): Call check_plain. Use baltoks_t. Call
3408 maybe_diag_unbalanced_tokens.
3409 (handle_format_attribute): Spell out the word "arguments" in
3410 a diagnostic.
3411
d3786ebb
MB
34122019-06-11 Matthew Beliveau <mbelivea@redhat.com>
3413
3414 PR c++/90449 - add -Winaccessible-base option.
3415 * c.opt (Winaccessible-base): New option.
3416
bf38f7e9
JJ
34172019-06-10 Jakub Jelinek <jakub@redhat.com>
3418
3419 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
3420 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
3421 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
3422 combined/composite constructs where it is not allowed. Copy over
3423 OMP_CLAUSE_REDUCTION_INSCAN.
3424
0ecf545c
MS
34252019-06-05 Martin Sebor <msebor@redhat.com>
3426
3427 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
3428 (handle_alias_ifunc_attribute): Same.
3429 (handle_copy_attribute): Same.
3430 (handle_weakref_attribute): Same.
3431 (handle_nonnull_attribute): Same.
3432 * c-warn.c (warn_for_sign_compare): Same.
3433 (warn_for_restrict): Same.
3434 * c.opt: Same.
3435
36b34127
MS
34362019-06-05 Martin Sebor <msebor@redhat.com>
3437
3438 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
3439 * c.opt (-Wformat-diag): Remove a spurious period.
3440
357a352f
JJ
34412019-05-29 Jakub Jelinek <jakub@redhat.com>
3442
3443 PR c/90628
3444 * c-common.c (check_builtin_function_arguments)
3445 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
3446 as last argument.
3447
2b8235ea
EB
34482019-05-23 Eric Botcazou <ebotcazou@adacore.com>
3449
3450 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
3451
6d86ddc4
ML
34522019-05-22 Martin Liska <mliska@suse.cz>
3453
3454 PR lto/90500
3455 * c-attribs.c (handle_copy_attribute): Do not copy
3456 target_clones attribute.
3457
419ba5b9
EB
34582019-05-21 Eric Botcazou <ebotcazou@adacore.com>
3459
3460 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
3461 * c-ada-spec.c (print_assignment_operator): New function.
3462 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
3463 assignment operators declared as methods and filter out the others.
3464
e03436e7
TS
34652019-05-17 Thomas Schwinge <thomas@codesourcery.com>
3466
3467 PR c/89433
3468 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
3469 "omp declare target".
3470
a9c697b8
MS
34712019-05-16 Martin Sebor <msebor@redhat.com>
3472
ab20d992
JJ
3473 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
3474 keywords, operators, and types in diagnostics.
3475 (handle_scalar_storage_order_attribute): Same.
3476 (handle_mode_attribute): Same.
3477 (handle_visibility_attribute): Same.
3478 (handle_assume_aligned_attribute): Same.
3479 (handle_no_split_stack_attribute): Same.
3480 * c-common.c (shorten_compare): Same.
3481 (c_common_truthvalue_conversion): Same.
3482 (cb_get_source_date_epoch): Same.
3483 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
3484 in diagnostics.
3485 (interpret_float): Same.
3486 * c-omp.c (c_finish_omp_for): Same.
3487 * c-opts.c (c_common_post_options): Same.
3488 * c-pch.c (c_common_pch_pragma): Same.
3489 * c-pragma.c (pop_alignment): Same.
3490 (handle_pragma_pack): Same.
3491 (apply_pragma_weak): Same.
3492 (handle_pragma_weak): Same.
3493 (handle_pragma_scalar_storage_order): Same.
3494 (handle_pragma_redefine_extname): Same.
3495 (add_to_renaming_pragma_list): Same.
3496 (maybe_apply_renaming_pragma): Same.
3497 (push_visibility): Same.
3498 (handle_pragma_visibility): Same.
3499 (handle_pragma_optimize): Same.
3500 (handle_pragma_message): Same.
3501 * c-warn.c (warn_for_omitted_condop): Same.
3502 (lvalue_error): Same.
a9c697b8 3503
6b943512
RB
35042019-05-15 Richard Biener <rguenther@suse.de>
3505
3506 PR c/90474
3507 * c-common.c (c_common_mark_addressable_vec): Also mark
3508 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
3509 c_mark_addressable.
ab20d992 3510
b744fc85
NS
35112019-05-06 Nathan Sidwell <nathan@acm.org>
3512
3513 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
3514
598f50d7
NS
35152019-04-30 Nathan Sidwell <nathan@acm.org>
3516
3517 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
3518
5bcc5a3b
ML
35192019-04-30 Martin Liska <mliska@suse.cz>
3520
3521 * c-pragma.c (handle_pragma_diagnostic): Provide hints
3522 for unknown options.
3523
e78a87f7
RS
35242019-04-26 Richard Sandiford <richard.sandiford@arm.com>
3525
3526 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
3527 the pointer target rather than the pointer itself.
3528
c280b7ee
JJ
35292019-04-19 Jakub Jelinek <jakub@redhat.com>
3530
3531 PR c/89888
3532 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
3533 arguments.
3534 (c_do_switch_warnings): Remove outside_range_p argument.
3535 * c-common.c (check_case_bounds): Removed.
3536 (c_add_case_label): Remove orig_type and outside_range_p arguments.
3537 Don't call check_case_bounds. Fold low_value as well as high_value.
3538 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
3539 Check for case labels outside of range of original type here and
3540 adjust them.
3541
8e8225e6
JJ
35422019-04-12 Jakub Jelinek <jakub@redhat.com>
3543
63b8a166
JJ
3544 PR translation/90041
3545 * c.opt (-fhandle-exceptions): Use %< and %> around option names
3546 in the Warn diagnostics.
3547
8e8225e6
JJ
3548 PR c/89946
3549 * c-attribs.c (handle_patchable_function_entry_attribute): Add
3550 function comment. Warn if arguments of the attribute are not positive
3551 integer constants.
3552
53a3f614
EB
35532019-04-09 Eric Botcazou <ebotcazou@adacore.com>
3554
3555 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
3556 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
3557
22be5873
EB
35582019-04-07 Eric Botcazou <ebotcazou@adacore.com>
3559
3560 * c-ada-spec.c (is_float128): New predicate extracted from...
3561 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
3562 <REAL_TYPE>: ...here. Call it.
3563
34facf20
DM
35642019-04-05 David Malcolm <dmalcolm@redhat.com>
3565
3566 PR c/89985
3567 * c-warn.c (check_address_or_pointer_of_packed_member): Add
3568 auto_diagnostic_group. Guard inform calls by result of
3569 warning_at call.
3570
05564120
MP
35712019-04-05 Marek Polacek <polacek@redhat.com>
3572
ab20d992 3573 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
3574 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
3575 of RHS.
3576
7a506c3c
JM
35772019-04-03 Jason Merrill <jason@redhat.com>
3578
3579 PR c++/86586 - -fcompare-debug=-Wsign-compare.
3580 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
3581
ddeae8c8
MS
35822019-04-01 Martin Sebor <msebor@redhat.com>
3583
3584 PR c/89685
3585 * c-attribs.c (handle_copy_attribute): Handle references and
3586 non-constant expressions.
3587
a15ffa22
JJ
35882019-03-22 Jakub Jelinek <jakub@redhat.com>
3589
3590 PR c++/87481
3591 * c.opt (-fconstexpr-ops-limit=): New option.
3592
36a3a7a3
JJ
35932019-03-21 Jakub Jelinek <jakub@redhat.com>
3594
3595 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
3596 template param.
3597
bec1da64
MS
35982019-03-19 Martin Sebor <msebor@redhat.com>
3599
3600 PR tree-optimization/89688
3601 * c-common.c (braced_list_to_string): Make static.
3602 (braced_lists_to_strings): Define new function.
3603 * c-common.h (braced_list_to_string): Remove.
3604 (braced_lists_to_strings): Declare.
3605
1fe61adf
ML
36062019-03-12 Martin Liska <mliska@suse.cz>
3607
3608 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
3609
93964ebd
ML
36102019-03-11 Martin Liska <mliska@suse.cz>
3611
3612 * c-opts.c (c_common_post_options): Wrap apostrophes
3613 in gcc internal format with %'.
3614
a3f9f006
ML
36152019-03-11 Martin Liska <mliska@suse.cz>
3616
3617 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
3618 in a string format message and fix GNU coding style.
3619 * c-common.c (vector_types_convertible_p): Likewise.
3620 (c_build_vec_perm_expr): Likewise.
3621 * c-indentation.c (get_visual_column): Likewise.
3622 * c-opts.c (c_common_handle_option): Likewise.
3623 (c_common_post_options): Likewise.
3624 (sanitize_cpp_opts): Likewise.
3625 * c-pch.c (c_common_pch_pragma): Likewise.
3626 * c-pragma.c (handle_pragma_pack): Likewise.
3627
1db01ff9
JJ
36282019-03-08 Jakub Jelinek <jakub@redhat.com>
3629
3630 PR tree-optimization/89550
3631 * c-common.c (c_common_truthvalue_conversion): Only set
3632 TREE_NO_WARNING if warning_at returned true.
3633 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
3634
ba790e6f
JJ
36352019-02-25 Sandra Loosemore <sandra@codesourcery.com>
3636 Martin Sebor <msebor@gmail.com>
3637
3638 * c.opt (Wmissing-attributes): Clean up doc string.
3639
7da73ba7
JJ
36402019-02-25 Jakub Jelinek <jakub@redhat.com>
3641
3642 PR c/89495
3643 * c-format.c (maybe_read_dollar_number): Compute nargnum in
3644 HOST_WIDE_INT type to avoid overflows and change overflow_flag
3645 checking.
3646
921bb9d1
RB
36472019-02-22 Richard Biener <rguenther@suse.de>
3648
3649 * c-pch.c (no_checksum): Remove.
3650 (pch_init): Remove assertion that executable_checksum is not
3651 all zero.
3652 (c_common_valid_pch): Likewise.
3653
e2ebb05c
MS
36542019-02-18 Martin Sebor <msebor@redhat.com>
3655
3656 PR middle-end/89294
3657 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
3658
3fe53000
DM
36592019-02-16 David Malcolm <dmalcolm@redhat.com>
3660
3661 PR c++/88680
3662 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
3663 implementing -Wtype-limits.
3664
28a8cef1
MS
36652019-02-11 Martin Sebor <msebor@redhat.com>
3666
3667 PR c++/87996
3668 * c-common.c (invalid_array_size_error): New function.
3669 (valid_array_size_p): Call it. Handle size as well as type.
3670 * c-common.h (valid_constant_size_p): New function.
3671 (enum cst_size_error): New type.
3672
ec2be203
DM
36732019-01-31 David Malcolm <dmalcolm@redhat.com>
3674
3675 PR c/89122
3676 * known-headers.cc (get_stdlib_header_for_name): Add
3677 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
3678
8936f047
JJ
36792019-01-31 Jakub Jelinek <jakub@redhat.com>
3680
3681 PR libstdc++/88170
3682 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
3683 a C cast in pp_c_flag_gnu_v3 mode.
3684
6a335b96
JJ
36852019-01-29 Jakub Jelinek <jakub@redhat.com>
3686
3687 PR c/86125
3688 * c-common.c (c_common_nodes_and_builtins): Build type variants for
3689 builtin_structptr_types types even for C.
3690
2a06eba5
BE
36912019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
3692
3693 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
3694 when rhs is of array type correctly. Fix handling of nested structures.
3695 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
3696 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
3697 type casts within nested compound expressions.
3698
18a23298
JJ
36992019-01-22 Jakub Jelinek <jakub@redhat.com>
3700
3701 PR middle-end/88968
3702 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
3703 variable after using BIT_FIELD_REF.
3704
420183d9
L
37052019-01-18 H.J. Lu <hongjiu.lu@intel.com>
3706
3707 PR c/51628
3708 PR c/88664
3709 * c-common.h (warn_for_address_or_pointer_of_packed_member):
3710 Remove the boolean argument.
3711 * c-warn.c (check_address_of_packed_member): Renamed to ...
3712 (check_address_or_pointer_of_packed_member): This. Also
3713 warn pointer conversion.
3714 (check_and_warn_address_of_packed_member): Renamed to ...
3715 (check_and_warn_address_or_pointer_of_packed_member): This.
3716 Also warn pointer conversion.
3717 (warn_for_address_or_pointer_of_packed_member): Remove the
3718 boolean argument. Don't check pointer conversion here.
3719
99063eee
RS
37202019-01-15 Richard Sandiford <richard.sandiford@arm.com>
3721
3722 PR inline-asm/52813
3723 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
3724
a30d0196
JJ
37252019-01-14 Jakub Jelinek <jakub@redhat.com>
3726
3727 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
3728 and __cpp_nontype_template_parameter_auto. Add a comment that
3729 __cpp_template_auto is deprecated.
3730
2d91f79d
TH
37312019-01-14 Tom Honermann <tom@honermann.net>
3732
3733 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
3734 * c-common.c (c_common_reswords): Add char8_t.
3735 (fix_string_type): Use char8_t for the type of u8 string literals.
3736 (c_common_get_alias_set): char8_t doesn't alias.
3737 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
3738 C++.
3739 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
3740 (keyword_begins_type_specifier): Add RID_CHAR8.
3741 * c-common.h (rid): Add RID_CHAR8.
3742 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
3743 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
3744 Define char8_type_node and char8_array_type_node.
3745 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
3746 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
3747 (c_cpp_builtins): Predefine __cpp_char8_t.
3748 * c-lex.c (lex_string): Use char8_array_type_node as the type of
3749 CPP_UTF8STRING.
3750 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
3751 * c-opts.c: If not otherwise specified, enable -fchar8_t when
3752 targeting C++2a.
3753 * c.opt: Add the -fchar8_t command line option.
3754
23db6ced
MS
37552019-01-14 Martin Sebor <msebor@redhat.com>
3756
3757 PR target/88638
3758 * c-attribs.c (positional_argument): Call valid_format_string_type_p
3759 and issue errors if it fails.
3760 * c-common.h (valid_format_string_type_p): Declare.
3761 * c-format.c (valid_stringptr_type_p): Rename...
3762 (valid_format_string_type_p): ...to this and make extern.
3763 (handle_format_arg_attribute): Adjust to new name.
3764 (check_format_string): Same.
3765
234c3818
L
37662019-01-13 H.J. Lu <hongjiu.lu@intel.com>
3767
3768 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
3769 Replace "may may" with "may" in warning message.
3770
d8fcab68
JJ
37712019-01-07 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR c++/85052
3774 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
3775 (c_build_vec_convert): Declare.
3776 * c-common.c (c_build_vec_convert): New function.
3777
29d24852
MS
37782019-01-04 Martin Sebor <msebor@redhat.com>
3779
3780 PR c/88546
3781 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
3782 Handle C++ empty throw specification and C11 _Noreturn.
3783 (has_attribute): Also handle C11 _Noreturn.
3784
9069a4c9
MS
37852019-01-04 Martin Sebor <msebor@redhat.com>
3786
3787 PR c/88363
3788 * c-attribs.c (positional_argument): Also accept enumerated types.
3789
a5544970
JJ
37902019-01-01 Jakub Jelinek <jakub@redhat.com>
3791
3792 Update copyright years.
3793
da77eace
L
37942018-12-20 H.J. Lu <hongjiu.lu@intel.com>
3795
3796 PR c/51628
3797 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
3798 * c-warn.c (check_alignment_of_packed_member): New function.
3799 (check_address_of_packed_member): Likewise.
3800 (check_and_warn_address_of_packed_member): Likewise.
3801 (warn_for_address_or_pointer_of_packed_member): Likewise.
3802 * c.opt: Add -Wno-address-of-packed-member.
3803
573767d4
DM
38042018-12-20 David Malcolm <dmalcolm@redhat.com>
3805
3806 PR c++/87504
3807 * c-warn.c (get_outermost_macro_expansion): New function.
3808 (spelled_the_same_p): Use it to unwind the macro expansions, and
3809 compare the outermost macro in each nested expansion, rather than
3810 the innermost.
3811
a14feb3c
DM
38122018-12-19 David Malcolm <dmalcolm@redhat.com>
3813
3814 PR c++/87504
3815 * c-common.h (warn_tautological_cmp): Convert 1st param from
3816 location_t to const op_location_t &.
3817 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
3818 when testing for INTEGER_CST.
3819 (warn_tautological_bitwise_comparison): Convert 1st param from
3820 location_t to const op_location_t &; use it to build a
3821 binary_op_rich_location, and use this.
3822 (spelled_the_same_p): New function.
3823 (warn_tautological_cmp): Convert 1st param from location_t to
3824 const op_location_t &. Warn for macro expansions if
3825 spelled_the_same_p. Use binary_op_rich_location.
3826
dfd7fdca
DM
38272018-12-19 David Malcolm <dmalcolm@redhat.com>
3828
3829 PR c++/43064
3830 PR c++/43486
3831 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
3832 (verify_tree): Handle location wrappers.
3833 (c_common_truthvalue_conversion): Strip any location wrapper.
3834 Handle CONST_DECL.
3835 (fold_offsetof): Strip any location wrapper.
3836 (complete_array_type): Likewise for initial_value.
3837 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
3838 index before checking for INTEGER_CST.
3839 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
3840 print parentheses around location wrappers.
3841 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
3842 before checking for INTEGER_CST.
3843 (warn_tautological_bitwise_comparison): Call
3844 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
3845 before checking for INTEGER_CST.
3846 (readonly_error): Strip any location wrapper.
3847 (warn_array_subscript_with_type_char): Strip location wrappers
3848 before checking for INTEGER_CST. Use the location of the index if
3849 available.
3850
5c8b3702
JM
38512018-12-06 Jason Merrill <jason@redhat.com>
3852
3853 PR c++/88136 - -Wdeprecated-copy false positives
3854 * c.opt (Wdeprecated-copy-dtor): New.
3855 (Wdeprecated-copy): Move to -Wextra.
3856
673670da
MS
38572018-11-29 Martin Sebor <msebor@redhat.com>
3858
3859 PR c/88172
3860 PR testsuite/88208
3861 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
3862 alignments to values less than the target requires.
3863 (has_attribute): For attribute aligned consider both the attribute
3864 and the alignment bits.
3865 * c-common.c (c_init_attributes): Optionally issue a warning for
3866 zero alignment.
3867
04864ec8
MS
38682018-11-28 Martin Sebor <msebor@redhat.com>
3869
3870 PR c/88065
3871 PR c/87297
3872 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
3873 or destination is an error.
3874
ace83db0
JJ
38752018-11-28 Jakub Jelinek <jakub@redhat.com>
3876
3877 PR c++/88215
3878 * c-ubsan.c: Include langhooks.h.
3879 (ubsan_instrument_division): Change gcc_assert that main variants
3880 of op0 and op1 types are equal to gcc_checking_assert that the
3881 main variants are compatible types.
3882
da193a27
EB
38832018-11-27 Eric Botcazou <ebotcazou@adacore.com>
3884
3885 * c-ada-spec.c: Include stringpool.h.
3886 (has_static_fields): Return false for incomplete types.
3887 (is_tagged_type): Likewise.
3888 (has_nontrivial_methods): Likewise.
3889 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
3890 (struct overloaded_name_hash): New structure.
3891 (struct overloaded_name_hasher): Likewise.
3892 (overloaded_names): New global variable.
3893 (init_overloaded_names): New static function.
3894 (overloaded_name_p): New predicate.
3895 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
3896 on the TYPE_STUB_DECL of the original type of a typedef, if any.
3897 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
3898 Remove always-true condition and dump forward types.
3899 (dump_ada_specs): Delete overloaded_names.
3900
98f08eb8
MS
39012018-11-20 Martin Sebor <msebor@redhat.com>
3902
3903 * c-attribs.c (type_for_vector_size): New function.
3904 (type_valid_for_vector_size): Same.
3905 (handle_vector_size_attribute): Move code to the functions above
3906 and call them.
3907 (validate_attribute, has_attribute): New functions.
3908 * c-common.h (has_attribute): Declare.
3909 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
3910 * c-common.c (c_common_resword): Same.
3911
2674fa47
JM
39122018-11-16 Jason Merrill <jason@redhat.com>
3913
3914 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
3915 * c-attribs.c (attr_cold_hot_exclusions): Make public.
3916
258b3854
JJ
39172018-11-16 Jakub Jelinek <jakub@redhat.com>
3918
3919 PR middle-end/87854
3920 * c-common.c (fix_string_type): Reject string literals larger than
3921 TYPE_MAX_VALUE (ssizetype) bytes.
3922
1d249509
MS
39232018-11-15 Martin Sebor <msebor@redhat.com>
3924
3925 PR c++/87541
3926 PR c++/87542
3927 * c-attribs.c (positional_argument): New function.
3928 (handle_alloc_size_attribute): Use it and simplify.
3929 (handle_alloc_align_attribute): Same.
3930 (handle_assume_aligned_attribute): Same.
3931 (handle_nonnull_attribute): Same.
3932 * c-common.c (check_function_arguments): Pass fntype to
3933 check_function_format.
3934 * c-common.h (check_function_format): Add an argument.
3935 (PosArgFlags, positional_argument): Declare new type and function.
3936 * c-format.c (decode_format_attr): Add arguments.
3937 (check_format_string, get_constant): Same.
3938 (convert_format_name_to_system_name): Adjust.
3939
478dd60d
DM
39402018-11-15 David Malcolm <dmalcolm@redhat.com>
3941
3942 PR other/19165
3943 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
3944
8cca0163
JJ
39452018-11-14 Jakub Jelinek <jakub@redhat.com>
3946
8ee09943
JJ
3947 P1236R1 - Signed integers are two's complement
3948 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
3949 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
3950 with in-range second operand well defined for -std=c++2a.
3951
8cca0163
JJ
3952 PR other/88007
3953 * c-common.c (parse_optimize_options): Allocate option string from
3954 opts_obstack rather than as GC memory. Move the allocation after
3955 warning for invalid option.
3956
620e594b
DM
39572018-11-13 David Malcolm <dmalcolm@redhat.com>
3958
3959 * c-common.c (c_get_substring_location): Update for renaming of
3960 get_source_location_for_substring to get_location_within_string.
3961 * c-lex.c: Replace "source_location" with "location_t".
3962 * c-opts.c: Likewise.
3963 * c-ppoutput.c: Likewise.
3964
f9731de3
MS
39652018-11-13 Martin Sebor <msebor@redhat.com>
3966
3967 PR middle-end/81824
3968 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
3969 (handle_tls_model_attribute): Improve diagnostics.
3970
e4bd6d5e
JM
39712018-11-12 Jason Merrill <jason@redhat.com>
3972
a6bb6b07
JM
3973 * c-cppbuiltin.c (c_cpp_builtins): Define
3974 __cpp_impl_destroying_delete.
3975
e4bd6d5e
JM
3976 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
3977 __cpp_conditional_explicit.
3978
79a2c428
MS
39792018-11-09 Martin Sebor <msebor@redhat.com>
3980
3981 PR middle-end/81824
3982 * c-attribs.c (handle_copy_attribute): New function.
3983
4c7bd361
MS
39842018-11-09 Martin Sebor <msebor@redhat.com>
3985
3986 PR c/87795
3987 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
3988
28567c40
JJ
39892018-11-08 Jakub Jelinek <jakub@redhat.com>
3990
3991 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
3992 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
3993 enum omp_memory_order MEMORY_ORDER.
3994 (c_finish_omp_flush): Add MO argument.
3995 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
3996 (c_finish_omp_for): Add FINAL_P argument.
3997 * c-omp.c: Include memmodel.h.
3998 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
3999 OMP_TASKGROUP_CLAUSES to it.
4000 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
4001 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
4002 instead of OMP_ATOMIC_SEQ_CST.
4003 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
4004 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
4005 __atomic_thread_fence call with the given value.
4006 (check_omp_for_incr_expr): Formatting fixes.
4007 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
4008 even in OpenMP loops, diagnose if NE_EXPR and incr expression
4009 is not constant expression 1 or -1. Transform NE_EXPR loops
4010 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
4011 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
4012 loops too.
4013 (c_omp_split_clauses): Add support for combined
4014 #pragma omp parallel master and
4015 #pragma omp {,parallel }master taskloop{, simd} constructs.
4016 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
4017 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
4018 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
4019 (c_omp_predetermined_sharing): Don't return
4020 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
4021 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
4022 PRAGMA_OMP_REQUIRES.
4023 * c-pragma.h (enum pragma_kind): Likewise.
4024 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
4025 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
4026
204839e7
DM
40272018-11-08 David Malcolm <dmalcolm@redhat.com>
4028
4029 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
4030
d8010ee4
DM
40312018-11-08 David Malcolm <dmalcolm@redhat.com>
4032
4033 * c-format.c (local_cgraph_node_ptr_node): New variable.
4034 (gcc_dump_printf_char_table): Add entry for %C.
4035 (get_pointer_to_named_type): New function, taken from the handling
4036 code for "gimple *" from...
4037 (init_dynamic_diag_info): ...here. Add handling for
4038 "cgraph_node *".
4039 * c-format.h (T_CGRAPH_NODE): New.
4040
4be5c72c
JM
40412018-10-19 Jason Merrill <jason@redhat.com>
4042
4043 * c-cppbuiltin.c (c_cpp_builtins): Add
4044 __cpp_nontype_template_parameter_class.
4045
f3f6029d
NS
40462018-10-31 Nathan Sidwell <nathan@acm.org>
4047
ab5324fb
NS
4048 * c-opts.c (c_finish_options): Force command line macro
4049 location. Refactor to avoid repeating main debug hook.
4050 (push_command_line_include): Clarify comment.
4051
f3f6029d
NS
4052 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
4053
91e3ec29
MS
40542018-10-30 Martin Sebor <msebor@redhat.com>
4055
4056 PR middle-end/87041
4057 * c-format.c (check_format_types): Avoid diagnosing null pointer
4058 arguments to printf-family of functions.
4059
b5ff4f5c
MP
40602018-10-30 Marek Polacek <polacek@redhat.com>
4061
4062 Implement P0892R2, explicit(bool).
4063 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
4064
7e2de6df
DM
40652018-10-29 David Malcolm <dmalcolm@redhat.com>
4066
4067 * name-hint.h (name_hint::take_deferred): New member function.
4068
b2bf438c
DM
40692018-10-29 David Malcolm <dmalcolm@redhat.com>
4070
4071 PR c++/56856
4072 * c-common.c (check_function_sentinel): Call fold_for_warn on the
4073 argument.
4074 (check_function_restrict): Rename param "argarray" to
4075 "unfolded_argarray", and make a copy named "argarray", calling
4076 fold_for_warn on each argument.
4077 (check_function_arguments): Add note about responsibility for
4078 folding the arguments.
4079
9f936c86
JM
40802018-10-17 Joseph Myers <joseph@codesourcery.com>
4081
4082 * c-common.c (flag_isoc2x): New variable.
4083 * c-common.h (clk_c): Update comment to reference C2X.
4084 (flag_isoc99, flag_isoc11): Update comments to reference future
4085 standard versions in general.
4086 (flag_isoc2x): Declare.
4087 * c-opts.c (set_std_c2x): New function.
4088 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
4089 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
4090 flag_isoc2x to 0.
4091 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
4092
7a8a92c4
JM
40932018-10-17 Joseph Myers <joseph@codesourcery.com>
4094
4095 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
4096 (std=iso9899:2018): Document C17 as published in 2018.
4097
4dc003ff
CL
40982018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
4099
4100 PR c++/87364
4101 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
4102
79371671
WW
41032018-10-11 Will Wray <wjwray@gmail.com>
4104
4105 PR c++/87364
4106 * c-pretty-print.h (pp_c_type_cast): Prototype.
4107 (pp_c_integer_constant): Likewise.
4108 * c-pretty-print.c (pp_c_type_cast): No longer static.
4109 (pp_c_integer_constant): Likewise.
4110 (pp_c_enumeration_constant): Fix loop termination when finding
4111 name of constant. No longer returns a value. Call
4112 pp_c_integer_constant.
4113 (c_pretty_printer::constant): Update for changes to
4114 pp_c_enumeration_constant.
4115
46c62690
JJ
41162018-10-11 Jakub Jelinek <jakub@redhat.com>
4117
4118 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
4119 for no_unique_address.
4120
c24300ba
DM
41212018-10-09 David Malcolm <dmalcolm@redhat.com>
4122
4123 * c-common.c (c_option_controlling_cpp_error): Rename to...
4124 (c_option_controlling_cpp_diagnostic): ...this, and convert
4125 "reason" from int to enum.
4126 (c_cpp_error): Rename to...
4127 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4128 * c-common.h (c_cpp_error): Rename to...
4129 (c_cpp_diagnostic): ...this, converting level and reason to enums.
4130 * c-opts.c (c_common_init_options): Update for renaming.
4131
8656dafa
RS
41322018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4133
4134 PR c/87286
4135 * c-common.c (vector_types_compatible_elements_p): Use
4136 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
4137
8cff0652
VK
41382018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4139
4140 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
4141 to generate constructor destructor priority warning.
4142 * c.opt (-Wprio-ctor-dtor): New option.
4143
bedf03a2
JM
41442018-10-01 Jason Merrill <jason@redhat.com>
4145
4146 * c-lex.c (c_common_has_attribute): Add no_unique_address.
4147
6cc430c1
EB
41482018-10-01 Eric Botcazou <ebotcazou@adacore.com>
4149
4150 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
4151 (dump_ada_node): Add const keyword.
4152
87677ac7
ML
41532018-09-25 Martin Liska <mliska@suse.cz>
4154
4155 * c-common.c (c_common_truthvalue_conversion):
4156 Remove Pascal from documentation.
4157
518196cb
EB
41582018-09-21 Eric Botcazou <ebotcazou@adacore.com>
4159
4160 * c-ada-spec.c: Include diagnostic.h.
4161 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
4162
a599af84
MP
41632018-09-19 Marek Polacek <polacek@redhat.com>
4164
4165 * c.opt (Wclass-conversion): New.
4166
9c4a4b3c
DM
41672018-09-17 David Malcolm <dmalcolm@redhat.com>
4168
4169 * c-format.c (range_label_for_format_type_mismatch::get_text):
4170 Update for new param.
4171
c896ecfe
DM
41722018-09-17 David Malcolm <dmalcolm@redhat.com>
4173
4174 * c-format.c (format_warning_at_char): Update for introduction of
4175 format_string_diagnostic_t.
4176 (format_type_warning): Likewise.
4177
80c6d1f4
MJ
41782018-09-17 Martin Jambor <mjambor@suse.cz>
4179
4180 PR c/63886
4181 * c.opt (Wabsolute-value): New.
4182
6d900107
BE
41832018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
4184
4185 * c-common.c (complete_flexible_array_elts): New helper function.
4186 * c-common.h (complete_flexible_array_elts): Declare.
4187
b5764229
BE
41882018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
4189
4190 * c-common.c (braced_list_to_string): Remove eval parameter.
4191 Add some more checks. Always create zero-terminated STRING_CST.
4192 * c-common.h (braced_list_to_string): Adjust prototype.
4193
85204e23
DM
41942018-08-27 David Malcolm <dmalcolm@redhat.com>
4195
4196 PR 87091
4197 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
4198 to a tri-state.
4199 (maybe_suggest_missing_token_insertion): Likewise.
4200 (maybe_add_include_fixit): Add param "override_location". If set,
4201 and source-printing is enabled, then override the rich_location's
4202 primary location with that of the insertion point for the fix-it
4203 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
4204 * c-common.h (extern void maybe_add_include_fixit): Add bool
4205 param.
4206 * c-format.c (selftest::test_type_mismatch_range_labels): Update
4207 for conversion of show_caret_p to a tri-state.
4208 * c-warn.c (warn_for_restrict): Likewise.
4209 * known-headers.cc
4210 (suggest_missing_header::~suggest_missing_header): Update call to
4211 maybe_add_include_fixit to suggest overriding the location, as it
4212 is for a note.
4213
3d78e008
ML
42142018-08-27 Martin Liska <mliska@suse.cz>
4215
4216 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
4217 fndecl_built_in_p and remove check for FUNCTION_DECL if
4218 possible.
3d78e008
ML
4219 (check_builtin_function_arguments): Likewise.
4220 (reject_gcc_builtin): Likewise.
4221 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
4222
b5be6d0c
MP
42232018-08-26 Marek Polacek <polacek@redhat.com>
4224
4225 PR c++/87029, Implement -Wredundant-move.
4226 * c.opt (Wredundant-move): New option.
4227
79ca9c35
MP
42282018-08-21 Marek Polacek <polacek@redhat.com>
4229
4230 PR c++/86981, Implement -Wpessimizing-move.
4231 * c.opt (Wpessimizing-move): New option.
4232
097f82ec
DM
42332018-08-20 David Malcolm <dmalcolm@redhat.com>
4234
4235 PR other/84889
4236 * c-attribs.c (common_handle_aligned_attribute): Add
4237 auto_diagnostic_group instance.
4238 * c-indentation.c (warn_for_misleading_indentation): Likewise.
4239 * c-opts.c (c_common_post_options): Likewise.
4240 * c-warn.c (warn_logical_not_parentheses): Likewise.
4241 (warn_duplicated_cond_add_or_warn): Likewise.
4242 (warn_for_multistatement_macros): Likewise.
4243
3fb558b1
NS
42442018-08-20 Nathan Sidwell <nathan@acm.org>
4245
4246 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
4247 access.
4248
800c0e98
NS
42492018-08-17 Nathan Sidwell <nathan@acm.org>
4250
4251 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
4252 field.
4253 (laxy_hex_fp_value_count): Make unsigned.
4254 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
4255 manipulate the macro.
4256 (builtin_defin_with_hex_fp_value): Adjust callback name, use
4257 cpp_define_lazily.
4258
6f795a92
DM
42592018-08-17 David Malcolm <dmalcolm@redhat.com>
4260
4261 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
4262 (gcc_dump_printf_length_specs): New.
4263 (gcc_dump_printf_flag_pairs): New.
4264 (gcc_dump_printf_flag_specs): New.
4265 (gcc_dump_printf_char_table): New.
4266 (format_types_orig): Add entry for "gcc_dump_printf".
4267 (init_dynamic_diag_info): Set up length_char_specs and
4268 conversion_specs for gcc_dump_printf_format_type.
4269 (handle_format_attribute): Handle gcc_dump_printf_format_type.
4270
c5d725c0
NS
42712018-08-17 Nathan Sidwell <nathan@acm.org>
4272
10f04917
NS
4273 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
4274
c5d725c0
NS
4275 * c-ada-spec.c: Don't #include "cpp-id-data.h"
4276 * c-cppbuiltin.c: Likewise.
4277
c0c12356
ML
42782018-08-17 Martin Liska <mliska@suse.cz>
4279
4280 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
4281 Ignore/Deprecated flag. Warning is done automatically for
4282 Deprecated flags.
c0c12356 4283
10fcc142
DM
42842018-08-16 David Malcolm <dmalcolm@redhat.com>
4285
4286 PR c++/70693
4287 * c-common.c (selftest::c_family_tests): Call
4288 selftest::c_indentation_c_tests.
4289 * c-common.h (selftest::c_indentation_c_tests): New decl.
4290 * c-indentation.c: Include "selftest.h".
4291 (next_tab_stop): Add "tab_width" param, rather than accessing
4292 cpp_opts.
4293 (get_visual_column): Likewise. Clarify comment. Bulletproof
4294 against reading past the end of the line.
4295 (get_first_nws_vis_column): Add "tab_width" param.
4296 (detect_intervening_unindent): Likewise.
4297 (should_warn_for_misleading_indentation): Read tab width from
4298 cpp_opts and pass around.
4299 (selftest::test_next_tab_stop): New test.
4300 (selftest::assert_get_visual_column_succeeds): New function.
4301 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
4302 (selftest::assert_get_visual_column_fails): New function.
4303 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
4304 (selftest::test_get_visual_column): New test.
4305 (selftest::c_indentation_c_tests): New function.
4306
3f6677f4
NS
43072018-08-16 Nathan Sidwell <nathan@acm.org>
4308
4309 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
4310 (store_ada_macro): Likewise.
4311 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
4312 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
4313
96e6ae57
DM
43142018-08-15 David Malcolm <dmalcolm@redhat.com>
4315
4316 * c-format.c: Include "selftest-diagnostic.h" and
4317 "gcc-rich-location.h".
4318 (format_warning_at_char): Pass NULL for new label params of
4319 format_warning_va.
4320 (class indirection_suffix): New class.
4321 (class range_label_for_format_type_mismatch): New class.
4322 (format_type_warning): Move logic for generating "*" suffix to
4323 class indirection_suffix. Create "fmt_label" and "param_label"
4324 to show their types, and pass them to the
4325 format_warning_at_substring calls.
4326 (selftest::test_type_mismatch_range_labels): New test.
4327 (selftest::c_format_c_tests): Call it.
4328
23aa9f7c
MS
43292018-08-13 Martin Sebor <msebor@redhat.com>
4330
4331 PR tree-optimization/71625
4332 * c-common.c (braced_list_to_string): New function.
4333 * c-common.h (braced_list_to_string): Declare it.
4334
f10a9135
NS
43352018-08-08 Nathan Sidwell <nathan@acm.org>
4336
4337 * c-common.c (try_to_locate_new_include_inertion_point): Use
4338 linemap_included_from_linemap.
4339 * c-lex.c (fe_file_change): Use linemap_included_from.
4340 * c-ppoutput.c (pp_file_change): Likewise.
4341
8a45b051
MS
43422018-08-01 Martin Sebor <msebor@redhat.com>
4343
4344 PR tree-optimization/86650
ab20d992 4345 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
4346 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
4347 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
4348 * c-format.h (T89_G): Update to be "gimple *" rather than
4349 "gcall *".
4350 (local_gcall_ptr_node): Rename...
4351 (local_gimple_ptr_node): ...to this.
4352
e540ccc0
DM
43532018-07-31 David Malcolm <dmalcolm@redhat.com>
4354
4355 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
4356 table entries for gcc_diag_char_table, and the 'Z' entry from
4357 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
4358 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
4359 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
4360 adding missing "Z" for this table. Remove erroneous "G" and "K"
4361 entries.
4362 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4363 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
4364 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
4365
425fc685
RE
43662018-07-31 Richard Earnshaw <rearnsha@arm.com>
4367
4368 * c-common.c (speculation_safe_resolve_call): New function.
4369 (speculation_safe_resolve_params): New function.
4370 (speculation_safe_resolve_return): New function.
4371 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
4372 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
4373 __HAVE_SPECULATION_SAFE_VALUE.
4374
181463c2
DM
43752018-07-20 David Malcolm <dmalcolm@redhat.com>
4376
4377 * c-common.c (c_cpp_error): Remove redundant "line_table"
4378 parameter from call to rich_location::set_range.
4379 (maybe_suggest_missing_token_insertion): Likewise.
4380
0d7f9065
MS
43812018-07-20 Martin Sebor <msebor@redhat.com>
4382
4383 PR middle-end/82063
ab20d992 4384 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 4385
00abf86c
MS
43862018-07-20 Martin Sebor <msebor@redhat.com>
4387
4388 PR middle-end/82063
4389 * c-common.h (c_common_handle_option): Change function argument
4390 to HOST_WIDE_INT.
4391 * c-opts.c (c_common_init_options): Same.
4392 (c_common_handle_option): Same. Remove special handling of
4393 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
4394 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
4395 options to take a HOST_WIDE_INT argument and accept a byte-size
4396 suffix. Initialize.
4397 (-Wvla-larger-than): Same.
4398 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
4399 (-Wno-vla-larger-than): Same.
4400
9b452033
JJ
44012018-07-12 Jakub Jelinek <jakub@redhat.com>
4402
4403 * c-attribs.c (c_common_attribute_table): Add
4404 "omp declare target implicit" attribute.
4405
cd0762f3
RB
44062018-07-12 Richard Biener <rguenther@suse.de>
4407
4408 PR c/86453
4409 * c-attribs.c (handle_packed_attribute): Do not build a variant
4410 type with TYPE_PACKED, instead ignore the attribute if we may
4411 not apply to the original type.
4412
0b27c3ed
JJ
44132018-07-10 Jakub Jelinek <jakub@redhat.com>
4414
4415 PR c++/86443
4416 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
4417 to contain TREE_LIST for both the original class iterator and the
4418 "last" helper var.
4419
e730a0ef
EB
44202018-07-07 Eric Botcazou <ebotcazou@adacore.com>
4421
4422 * c-ada-spec.c (to_ada_name): Remove index parameter.
4423 (pp_ada_tree_identifier): Likewise.
4424 (dump_ada_macros): Adjust call to to_ada_name.
4425 (struct overloaded_name_hash): Delete.
4426 (struct overloaded_name_hasher): Likewise.
4427 (overloaded_names): Likewise.
4428 (compute_overloading_index): Likewise.
4429 (dump_ada_decl_name): Do not call compute_overloading_index and
4430 adjust calls to pp_ada_tree_identifier.
4431 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
4432 (dump_ada_import): Add spc parameter and switch to aspect syntax.
4433 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
4434 (dump_ada_enum_type): Remove type and display_convention parameters.
4435 Adjust calls to pp_ada_tree_identifier.
4436 (dump_ada_node): Likewise and for dump_ada_structure.
4437 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
4438 and tidy up.
4439 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
4440 syntax.
4441 (print_constructor): Adjust call to pp_ada_tree_identifier.
4442 (print_destructor): Likewise.
4443 (dump_ada_declaration): Switch to aspect syntax.
4444 (dump_ada_structure): Likewise and tidy up. Replace display_convention
4445 parameter with nested parameter.
4446 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
4447 (dump_ada_specs): Do not delete overloaded_names table.
4448
8de583fc
PB
44492018-07-06 Peter Bergner <bergner@linux.ibm.com>
4450
4451 PR target/86324
e730a0ef 4452 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
4453 target hook.
4454
09cff37b
NS
44552018-07-05 Nathan Sidwell <nathan@acm.org>
4456
4457 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
4458 NO_IMPLICIT_EXTERN_C.
4459
98086b2b
ML
44602018-06-28 Martin Liska <mliska@suse.cz>
4461
4462 * cppspec.c: Include opt-suggestions.h.
4463
ab20d992
JJ
44642018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4465 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
4466 Cesar Philippidis <cesar@codesourcery.com>
4467
4468 * c-pragma.h (enum pragma_omp_clause): Add
4469 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
4470 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
4471
f41b7612
JJ
44722018-06-20 Jakub Jelinek <jakub@redhat.com>
4473
4474 PR c++/86210
4475 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
4476 comment.
4477
4252ccd7
MS
44782018-06-18 Martin Sebor <msebor@redhat.com>
4479
4480 PR middle-end/85602
4481 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
4482 nonstring.
4483
e197e64e
KV
44842018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
4485
4486 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
4487
34a7a230
JM
44882018-06-13 Jason Merrill <jason@redhat.com>
4489
5cef3733
JM
4490 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
4491 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
4492 handling.
4493
34a7a230
JM
4494 PR c++/86094 - wrong code with defaulted move ctor.
4495 * c-opts.c (c_common_post_options): Bump the current ABI version to
4496 13. Set warn_abi_version and flag_abi_compat_version to the current
4497 version rather than 0. Fix defaulting flag_abi_compat_version from
4498 warn_abi_version.
4499
bb0f14ae
MS
45002018-06-12 Martin Sebor <msebor@redhat.com>
4501
4502 PR c/85931
4503 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
4504 sizeof source and destination yields the same value.
4505
3713f2e2
ML
45062018-06-12 Martin Liska <mliska@suse.cz>
4507
4508 * c.opt: Make MPX-related options as Deprecated.
4509
4af78ef8
DM
45102018-06-08 David Malcolm <dmalcolm@redhat.com>
4511
4512 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
4513 rather than 0.
4514
31db0fe0
ML
45152018-06-08 Martin Liska <mliska@suse.cz>
4516
4517 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
4518 for MPX (macros, related functions, fields in cgraph_node, ...).
4519 (handle_bnd_legacy): Likewise.
4520 (handle_bnd_instrument): Likewise.
4521 * c.opt: Likewise.
4522
fe16acf2
JJ
45232018-06-06 Jakub Jelinek <jakub@redhat.com>
4524
4525 PR c++/86068
4526 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
4527 __cpp_transactional_memory to 201500 instead of 210500.
4528
4dbdb49b
JM
45292018-06-06 Jason Merrill <jason@redhat.com>
4530
4531 PR c++/85710 - ICE with -Wmemset-elt-size.
4532 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
4533
f8ad043f
JM
45342018-06-01 Jason Merrill <jason@redhat.com>
4535
4536 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
4537 201703.
4538
abc24d93
EB
45392018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4540
4541 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
4542 declaration for a typedef independently of whether the declaration of
4543 the subtype is generated.
4544
d258f4aa
MS
45452018-05-31 Martin Sebor <msebor@redhat.com>
4546
4547 PR c/82063
4548 * c.opt (-Wno-alloc-size-larger-than): New option.
4549
b67b9225
DP
45502018-04-22 David Pagan <dave.pagan@oracle.com>
4551
4552 PR c/55976
4553 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 4554 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
4555 differentiate between default (no option), -Wreturn-type, and
4556 -Wno-return-type.
4557
04eb9c55
JM
45582018-05-29 Jason Merrill <jason@redhat.com>
4559
4560 * c.opt (Winit-list-lifetime): New flag.
4561
b0c31bc6
BE
45622018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4563
4564 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
4565 splay_tree_delete_pointers.
4566
44284983
JJ
45672018-05-26 Jakub Jelinek <jakub@redhat.com>
4568
4569 PR bootstrap/85921
4570 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
4571 noinline variable to workaround broken kernel headers.
4572
b46b715d
JM
45732018-05-18 Jason Merrill <jason@redhat.com>
4574
4575 * c.opt (Wdeprecated-copy): New flag.
4576
40659769
ML
45772018-05-17 Martin Liska <mliska@suse.cz>
4578
4579 * c-warn.c (overflow_warning): Do not use
4580 space in between 'G_' and '('.
4581
403962ea
JM
45822018-05-09 Jason Merrill <jason@redhat.com>
4583
4584 * c-common.c (valid_array_size_p): Add complain parameter.
4585 * c-common.h: ...which defaults to true.
4586
1c9ee609
JJ
45872018-05-11 Jakub Jelinek <jakub@redhat.com>
4588
4589 PR c/85696
4590 * c-omp.c (c_omp_predetermined_sharing): Return
4591 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
4592
19916065
ML
45932018-05-11 Martin Liska <mliska@suse.cz>
4594
92a285c1 4595 PR sanitizer/85556
19916065
ML
4596 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
4597 TREE_LIST values.
4598
79e7b1fe
JJ
45992018-05-10 Jakub Jelinek <jakub@redhat.com>
4600
4601 PR c++/85662
4602 * c-common.h (fold_offsetof_1): Removed.
4603 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
4604 CTX argument defaulted to ERROR_MARK.
4605 * c-common.c (fold_offsetof_1): Renamed to ...
4606 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
4607 argument, convert the pointer constant to TYPE and use size_binop
4608 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
4609 a pointer type. Adjust recursive calls.
4610
86c12f76
EB
46112018-05-10 Eric Botcazou <ebotcazou@adacore.com>
4612
4613 PR c++/85400
4614 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
4615
ee336e84
NS
46162018-05-07 Nathan Sidwell <nathan@acm.org>
4617
4618 * c.opt (ffor-scope): Remove functionality, issue warning.
4619
6c072e21
NS
46202018-05-03 Nathan Sidwell <nathan@acm.org>
4621
4622 * c.opt (ffriend-injection): Remove functionality, issue warning.
4623
2cc7d3a7
DM
46242018-05-01 David Malcolm <dmalcolm@redhat.com>
4625
4626 PR c/84258
4627 * c-format.c (struct format_check_results): Add field
4628 "number_non_char".
4629 (check_format_info): Initialize it, and warn if encountered.
4630 (check_format_arg): Distinguish between wide char and
4631 everything else when detecting arrays of non-char.
4632
7761dfbe
DM
46332018-04-30 David Malcolm <dmalcolm@redhat.com>
4634
4635 * c-format.c (get_corrected_substring): Update for
4636 location_get_source_line returning a char_span. Use a char_span
4637 when handling the prefix of the correction.
4638 * c-indentation.c (get_visual_column): Update for
4639 location_get_source_line returning a char_span.
4640 (get_first_nws_vis_column): Likewise.
4641
62e98ef1
DM
46422018-03-29 David Malcolm <dmalcolm@redhat.com>
4643
4644 PR c++/84269
4645 * known-headers.cc (get_stdlib_header_for_name): Add various names
4646 from <assert.h>, <string.h>, and <memory.h>; add more names from
4647 <stdio.h>.
4648
a7dea617
JJ
46492018-03-27 Jakub Jelinek <jakub@redhat.com>
4650
4651 PR c++/85061
4652 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
4653 get_base_address of the second operand is a VAR_P, rather than the
4654 operand itself, and use gcc_checking_assert instead of gcc_assert.
4655
889a3a30
MP
46562018-03-23 Marek Polacek <polacek@redhat.com>
4657
4658 PR c++/85045
4659 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
4660 <case RDIV_EXPR>: Tweak condition.
4661
452154b9
EB
46622018-03-20 Eric Botcazou <ebotcazou@adacore.com>
4663
4664 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
4665
63ecb626
JJ
46662018-03-16 Jakub Jelinek <jakub@redhat.com>
4667
ce811fc4
JJ
4668 PR c/84909
4669 * c-warn.c (conversion_warning): Replace "to to" with "to" in
4670 diagnostics.
4671
63ecb626
JJ
4672 PR c/84910
4673 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
4674 diagnostics.
4675
a1295eec
RB
46762018-03-16 Richard Biener <rguenther@suse.de>
4677
4678 PR c/84873
4679 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
4680 unshare the possibly folded expression.
4681
919674fb
RB
46822018-03-15 Richard Biener <rguenther@suse.de>
4683
4684 PR c/84873
4685 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
4686
f99309b2
MS
46872018-03-13 Martin Sebor <msebor@redhat.com>
4688
4689 PR tree-optimization/84725
4690 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
4691 with all three narrow character types, including their qualified forms.
4692
e9b9fa4c
MS
46932018-03-12 Martin Sebor <msebor@redhat.com>
4694
4695 PR tree-optimization/83456
ab20d992 4696 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
4697 Restore checking of bounded built-in functions.
4698 (check_function_arguments): Also return the result
4699 of warn_for_restrict.
ab20d992
JJ
4700 * c-common.c (check_function_restrict): Return bool.
4701 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 4702
0805d020
MP
47032018-03-02 Marek Polacek <polacek@redhat.com>
4704
4705 PR c++/84171
4706 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
4707 is erroneous.
4708
ed2a2f08
TS
47092018-03-02 Thomas Schwinge <thomas@codesourcery.com>
4710
4711 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
4712 function".
4713
90abdde0
MP
47142018-03-01 Marek Polacek <polacek@redhat.com>
4715
4716 PR c++/84639
4717 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
4718 alignment in computation.
4719
c6db43fa
EB
47202018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4721
4722 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
4723 <REAL_TYPE>: Deal specifically with _Float128/__float128.
4724
9e25c7ed
EB
47252018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4726
4727 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
4728 (is_char_array): Take a type instead of a declaration.
4729 (dump_ada_array_type): Likewise.
4730 (is_simple_enum): Minor tweak.
4731 (dump_ada_enum_type): New function extracted from...
4732 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
4733 <INTEGER_TYPE>: Remove unreachable code.
4734 <RECORD_TYPE>: Likewise. Minor tweaks.
4735 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
4736 <ENUMERAL_TYPE>: New case.
4737 <RECORD_TYPE>: Factor out common code.
4738 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
4739 Minor tweaks. Deal with enumeral types.
4740 (dump_ada_structure): Minor tweaks.
4741
09de3550
EB
47422018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4743
4744 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
4745 address for incomplete structures.
4746 (dump_forward_type): Do not bail out for incomplete structures.
4747 (dump_ada_declaration): Do not special-case incomplete structures
4748 for subtypes. Dump them as null records for types.
4749
095d8d4b
EB
47502018-02-28 Eric Botcazou <ebotcazou@adacore.com>
4751
4752 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
4753 (is_char_array): Fix formatting.
4754 (dump_template_types): Likewise.
4755 (dump_generic_ada_node): Rename into...
4756 (dump_ada_node): ...this.
4757 <POINTER_TYPE>: Remove superfluous space. Use generic address for
4758 incomplete structures and not for empty structures. Do not use it
4759 when forward declarations are needed.
4760 (dump_forward_type): New function.
4761 (dump_nested_types): Remove FORWARD parameter. Do not consider
4762 TREE_VISITED and do not generate a forward declaration. Only dump
4763 original nested types for nested declaration.
4764 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
4765 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
4766 <RECORD_TYPE>: Do not consider TREE_VISITED.
4767 (dump_ada_declaration): Use booleans and fix formatting throughout.
4768 <TYPE_DECL>: Skip incomplete structures and not empty structures.
4769 Call dump_forward_type instead of dump_nested_types for a typedef.
4770 Remove superfluous check and adjust call to dump_nested_types.
4771 <POINTER_TYPE>: Call dump_forward_type and fall through.
4772 (dump_ada_struct_decl): Rename into...
4773 (dump_ada_structure): ...this. Do not special-case empty structures.
4774
d4cfd486
MS
47752018-02-27 Martin Sebor <msebor@redhat.com>
4776
4777 PR c++/83871
4778 * c.opt (-Wmissing-attributes): New option.
4779
b22dbd03
ML
47802018-02-21 Martin Liska <mliska@suse.cz>
4781
4782 * c.opt (Wcatch-value=): Add IntegerRange.
4783
883dfe2a
JM
47842018-02-15 Jason Merrill <jason@redhat.com>
4785
4786 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
4787
0444aa9c
NS
47882018-02-09 Nathan Sidwell <nathan@acm.org>
4789
4790 PR c/84293
4791 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
4792 arg.
4793 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
4794 arg. Adjust.
4795
cea71f0a
MS
47962018-02-09 Martin Sebor <msebor@redhat.com>
4797
4798 PR lto/84212
4799 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
4800 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
4801 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
4802 (-Wstrict-overflow, -Wsuggest-attribute): Same.
4803 (-Wuninitialized): Same.
4804
8c8b7be5
EB
48052018-02-09 Eric Botcazou <ebotcazou@adacore.com>
4806
4807 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
4808 keyword for components.
4809
7c30b12a
PC
48102018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
4811
4812 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
4813
eece7fe5
JK
48142018-02-02 Julia Koval <julia.koval@intel.com>
4815
4816 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
4817
7d07a93a
MP
48182018-01-29 Marek Polacek <polacek@redhat.com>
4819
4820 PR c/83966
4821 * c-format.c (check_function_format): Check current_function_decl.
4822
53723269
JJ
48232018-01-27 Jakub Jelinek <jakub@redhat.com>
4824
4825 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
4826 argument.
4827 (LAZY_HEX_FP_VALUES_CNT): Define.
4828 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
4829 values rather than just 12.
4830 (builtin_define_with_hex_fp_value): Likewise.
4831
7365279f
BK
48322018-01-18 Boris Kolpackov <boris@codesynthesis.com>
4833
92a285c1
ML
4834 PR other/70268
4835 * c.opt (-fmacro-prefix-map): New option.
4836 * c-opts.c (c_common_handle_option): Handle it.
4837 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
4838 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 4839
bb9869d5
DM
48402018-01-17 David Malcolm <dmalcolm@redhat.com>
4841
4842 PR c++/83814
4843 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
4844
68dc87c3
EB
48452018-01-10 Eric Botcazou <ebotcazou@adacore.com>
4846
4847 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
4848 Skip 'f' and 'F' characters if it is true.
4849 (store_ada_macro): Minor tweak.
4850 (dump_ada_macros) <CPP_COMMENT>: Likewise.
4851 <CPP_WSTRING>: Likewise.
4852 <CPP_STRING>: Output '&' in the buffer if not the first string.
4853 <CPP_NUMBER>: Adjust calls to dump_number.
4854
9a004410
DM
48552018-01-10 David Malcolm <dmalcolm@redhat.com>
4856
4857 PR c++/43486
4858 * c-common.c: Include "selftest.h".
4859 (get_atomic_generic_size): Perform the test for integral type
4860 before the range test for any integer constant, fixing indentation
4861 of braces. Call fold_for_warn before testing for an INTEGER_CST.
4862 (reject_gcc_builtin): Strip any location wrapper from EXPR.
4863 (selftest::test_fold_for_warn): New function.
4864 (selftest::c_common_c_tests): New function.
4865 (selftest::c_family_tests): Call it, and
4866 selftest::c_pretty_print_c_tests.
4867 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
4868 * c-format.c (check_format_arg): Convert VAR_P check to a
4869 fold_for_warn.
4870 * c-pretty-print.c: Include "selftest.h".
4871 (pp_c_cast_expression): Don't print casts for location wrappers.
4872 (selftest::assert_c_pretty_printer_output): New function.
4873 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
4874 (selftest::test_location_wrappers): New function.
4875 (selftest::c_pretty_print_c_tests): New function.
4876 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
4877
5c0caeb3
RS
48782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4879 Alan Hayward <alan.hayward@arm.com>
4880 David Sherwood <david.sherwood@arm.com>
4881
4882 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
4883
73a699ae
RS
48842018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4885 Alan Hayward <alan.hayward@arm.com>
4886 David Sherwood <david.sherwood@arm.com>
4887
4888 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
4889 as polynomial.
4890
928686b1
RS
48912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
4892 Alan Hayward <alan.hayward@arm.com>
4893 David Sherwood <david.sherwood@arm.com>
4894
4895 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
4896 (convert_vector_to_array_for_subscript): Handle polynomial
4897 TYPE_VECTOR_SUBPARTS.
4898 (c_common_type_for_mode): Check valid_vector_subparts_p.
4899 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
4900 VECTOR_CST_NELTS.
4901
85ec4feb
JJ
49022018-01-03 Jakub Jelinek <jakub@redhat.com>
4903
4904 Update copyright years.
4905
170a8bd6 49062017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 4907 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
4908
4909 * c-pragma.c (init_pragma): Register pragma GCC unroll.
4910 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
4911
ab20d992 49122017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
4913
4914 PR debug/83527
4915 PR debug/83419
4916 * c-semantics.c (only_debug_stmts_after_p): New.
4917 (pop_stmt_list): Clear side effects in debug-only stmt list.
4918 Check for single nondebug stmt followed by debug stmts only.
4919
c12d20d4
AO
49202017-12-21 Alexandre Oliva <aoliva@redhat.com>
4921
4922 PR debug/83419
4923 * c-semantics.c (pop_stmt_list): Propagate side effects from
4924 single nondebug stmt to container list.
4925
01512446
JJ
49262017-12-19 Jakub Jelinek <jakub@redhat.com>
4927
4928 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
4929 conditions with typical order conditions.
4930
82cfbd01
MP
49312017-12-18 Marek Polacek <polacek@redhat.com>
4932
4933 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
4934 not in effect.
4935
99da11ec
MS
49362017-12-17 Martin Sebor <msebor@redhat.com>
4937
4938 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
4939 an error for attribute warn_if_not_aligned.
4940
cc8bea0a
MS
49412017-12-16 Martin Sebor <msebor@redhat.com>
4942
4943 PR tree-optimization/78918
4944 * c-common.c (check_function_restrict): Avoid checking built-ins.
4945 * c.opt (-Wrestrict): Include in -Wall.
4946
4849deb1
JJ
49472017-12-15 Jakub Jelinek <jakub@redhat.com>
4948
4949 * c-attribs.c (c_common_attribute_table,
4950 c_common_format_attribute_table): Swap affects_type_identity
4951 and handler fields, adjust comments.
4952
c65e18d3
BE
49532017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
4954
4955 * c.opt (Wcast-function-type): New warning option.
4956 * c-lex.c (get_fileinfo): Avoid warning.
4957 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
4958
2004617a
QZ
49592017-12-14 Qing Zhao <qing.zhao@oracle.com>
4960
7365279f 4961 PR middle_end/79538
2004617a
QZ
4962 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
4963 Adjust the size of buf1 and buf2, add a new buf to avoid
4964 format-overflow warning.
4965
ab20d992 49662017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
4967
4968 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
4969 subsequent statement list.
4970
5d9ae53d
MS
49712017-12-07 Martin Sebor <msebor@redhat.com>
4972
4973 PR c/81544
4974 PR c/81566
4975 * c-attribs.c (attr_aligned_exclusions): New array.
4976 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
4977 (attr_common_exclusions, attr_const_pure_exclusions): Same.
4978 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
4979 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
4980 (attr_warn_unused_result_exclusions): Same.
4981 (handle_hot_attribute, handle_cold_attribute): Simplify.
4982 (handle_const_attribute): Warn on function returning void.
4983 (handle_pure_attribute): Same.
4984 (handle_aligned_attribute): Diagnose conflicting attribute
4985 specifications.
4986 * c-warn.c (diagnose_mismatched_attributes): Simplify.
4987
c79144f8
DM
49882017-12-06 David Malcolm <dmalcolm@redhat.com>
4989
4990 PR c/83236
4991 * c-common.c (selftest::c_family_tests): Call
4992 selftest::c_spellcheck_cc_tests.
4993 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
4994 * c-spellcheck.cc: Include "selftest.h".
4995 (name_reserved_for_implementation_p): New function.
4996 (should_suggest_as_macro_p): New function.
4997 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
4998 should_suggest_as_macro_p and call it.
4999 (selftest::test_name_reserved_for_implementation_p): New function.
5000 (selftest::c_spellcheck_cc_tests): New function.
5001 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
5002
613bc14f
DM
50032017-12-06 David Malcolm <dmalcolm@redhat.com>
5004
5005 * c-spellcheck.cc: New file, taken from macro-handling code in
5006 spellcheck-tree.c.
5007 * c-spellcheck.h: New file, taken from macro-handling code in
5008 spellcheck-tree.h.
5009
e76c7157
JJ
50102017-12-01 Jakub Jelinek <jakub@redhat.com>
5011
5012 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
5013 attribute.
5014 (handle_simd_attribute): Don't check for "cilk simd function"
5015 attribute. Reindent, formatting changes.
5016
b0da4034
JK
50172017-11-30 Julia Koval <julia.koval@intel.com>
5018
5019 * c-common.h (inv_list): Remove.
5020
058f0b9e
JJ
50212017-11-28 Jakub Jelinek <jakub@redhat.com>
5022
5023 PR sanitizer/81275
5024 * c-common.c (c_switch_covers_all_cases_p_1,
5025 c_switch_covers_all_cases_p): New functions.
5026 * c-common.h (c_switch_covers_all_cases_p): Declare.
5027
5e9d6aa4 50282017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 5029 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
5030
5031 * array-notation-common.c: Delete.
5032 * c-cilkplus.c: Ditto.
5033 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
5034 * c-common.def (ARRAY_NOTATION_REF): Remove.
5035 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
5036 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
5037 c_validate_cilk_plus_loop, cilkplus_an_parts,
5038 cilk_ignorable_spawn_rhs_op,
5039 cilk_recognize_spawn): Remove.
5040 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
5041 * c-omp.c: Remove CILK_SIMD check.
5042 * c-pragma.c: Ditto.
5043 * c-pragma.h: Remove CILK related pragmas.
5044 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
5045 ARRAY_NOTATION_REF condition.
5046 (c_pretty_printer::expression): Ditto.
5047 * c.opt (fcilkplus): Remove.
5048 * cilk.c: Delete.
5049
1af4ebf5
MG
50502017-11-21 Marc Glisse <marc.glisse@inria.fr>
5051
5052 * c-pretty-print.c (pp_c_additive_expression,
5053 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
5054
d44ed508
JJ
50552017-11-21 Jakub Jelinek <jakub@redhat.com>
5056
7d2f0f9b
JJ
5057 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
5058
d44ed508
JJ
5059 PR c++/83059
5060 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
5061 instead of tree_to_uhwi, formatting fix.
5062
26edace6
DM
50632017-11-20 David Malcolm <dmalcolm@redhat.com>
5064
5065 PR c/81404
5066 * known-headers.cc: New file, based on material from c/c-decl.c.
5067 (suggest_missing_header): Copied as-is.
5068 (get_stdlib_header_for_name): New, based on get_c_name_hint but
5069 heavily edited to add C++ support. Add some knowledge about
5070 <limits.h>, <stdint.h>, and <wchar.h>.
5071 * known-headers.h: Likewise.
5072
6c7a259b
DM
50732017-11-20 David Malcolm <dmalcolm@redhat.com>
5074
5075 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
5076 (lookup_name_fuzzy): Likewise. Convert return type from
5077 const char * to name_hint. Add location_t param.
5078 * name-hint.h: New header.
5079
f9c59f7e
JJ
50802017-11-19 Jakub Jelinek <jakub@redhat.com>
5081
5082 PR c/66618
5083 PR c/69960
5084 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
5085
1e39313a
JM
50862017-11-16 Joseph Myers <joseph@codesourcery.com>
5087
5088 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
5089 expected publication date of C17.
5090 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
5091
3ca0dc60
JM
50922017-11-15 Joseph Myers <joseph@codesourcery.com>
5093
5094 PR c/81156
5095 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5096 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
5097
025d57f0
MS
50982017-11-10 Martin Sebor <msebor@redhat.com>
5099
5100 PR c/81117
5101 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
5102 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
5103 * c.opt (-Wstringop-truncation): New option.
5104
1b6fa695
ML
51052017-11-06 Martin Liska <mliska@suse.cz>
5106
5107 PR middle-end/82404
5108 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
5109 FE.
5110 * c.opt: Set default value of warn_return_type.
5111
64a5912c
DM
51122017-10-31 David Malcolm <dmalcolm@redhat.com>
5113
5114 * c-common.c (binary_op_error): Update for renaming of
5115 error_at_rich_loc.
5116 (c_parse_error): Likewise.
5117 * c-warn.c (warn_logical_not_parentheses): Likewise for
5118 renaming of inform_at_rich_loc.
5119 (warn_for_restrict): Likewise for renaming of
5120 warning_at_rich_loc_n.
5121
c76dc9c3
JM
51222017-10-30 Joseph Myers <joseph@codesourcery.com>
5123
5124 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
5125 * c-opts.c (set_std_c17): New function.
5126 (c_common_init_options): Use gnu17 as default C version.
5127 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
5128
ee5fd23a
MM
51292017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
5130
5131 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
5132 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
5133 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
5134 __FP_FAST_FMA<N>X.
5135
d1047465
MP
51362017-10-23 Marek Polacek <polacek@redhat.com>
5137
5138 PR c/82681
5139 * c-warn.c (warnings_for_convert_and_check): Fix typos.
5140
9e878cf1
EB
51412017-10-19 Eric Botcazou <ebotcazou@adacore.com>
5142
5143 * c-common.c (check_builtin_function_arguments): Also check arguments
5144 of __builtin_alloca_with_align_and_max.
5145
89b6abbb
DM
51462017-10-17 David Malcolm <dmalcolm@redhat.com>
5147
5148 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
5149 rather than NULL to format_warning_va.
5150 (check_format_types): Likewise when calling format_type_warning.
5151 Remove code to extract source_ranges and source_range * in favor
5152 of just a location_t.
5153 (format_type_warning): Convert source_range * param to a
5154 location_t.
5155
39382c09
JJ
51562017-10-13 Jakub Jelinek <jakub@redhat.com>
5157
5158 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
5159 [LR]SHIFT_EXPR.
5160
62e1c678
DM
51612017-10-12 David Malcolm <dmalcolm@redhat.com>
5162
5163 * c-common.c (enum missing_token_insertion_kind): New enum.
5164 (get_missing_token_insertion_kind): New function.
5165 (maybe_suggest_missing_token_insertion): New function.
5166 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
5167
b90c9338
NS
51682017-10-11 Nathan Sidwell <nathan@acm.org>
5169
5170 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
5171 (c_common_handle_option): Update incpath_kind names.
5172
3a266bcd
ML
51732017-10-11 Martin Liska <mliska@suse.cz>
5174
5175 PR sanitizer/82490
5176 * c-attribs.c (handle_no_sanitize_attribute): Report directly
5177 Wattributes warning.
5178
8e6cdc90
RS
51792017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
5180
5181 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
5182 operating on trees as wide_ints.
5183 * c-common.c (pointer_int_sum): Likewise.
5184 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5185 * c-warn.c (match_case_to_enum_1): Likewise.
5186 (c_do_switch_warnings): Likewise.
5187 (maybe_warn_shift_overflow): Likewise.
5188
802b38c9
JJ
51892017-10-10 Jakub Jelinek <jakub@redhat.com>
5190
5191 PR c/82437
5192 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
5193 instead of wide_int::from.
5194
4e34b338
JJ
51952017-10-06 Jakub Jelinek <jakub@redhat.com>
5196
5197 PR c/82437
5198 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
5199 using to_widest use wide_int with the larger of the two precisions.
5200
4bc4b2b4
BE
52012017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
5202
5203 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
5204 functions.
5205
a1488398
RS
52062017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
5207
5208 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
5209 when combining the original unconverted comparison operands.
5210
01c9fb68
JJ
52112017-09-29 Jakub Jelinek <jakub@redhat.com>
5212
5213 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
5214 attribute.
5215
6e3e8419
EB
52162017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5217
5218 * c-ada-spec.c (to_ada_name): Add index parameter.
5219 (pp_ada_tree_identifier): Likewise.
5220 (dump_ada_macros): Adjust call to to_ada_name.
5221 (struct overloaded_name_hash): New type.
5222 (struct overloaded_name_hasher): Likewise.
5223 (overloaded_names): New hash table.
5224 (compute_overloading_index): New function.
5225 (dump_ada_decl_name): Call it and pass the result to
5226 pp_ada_tree_identifier.
5227 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
5228 (dump_ada_function_declaration): Likewise.
5229 (dump_generic_ada_node): Likewise.
5230 (print_constructor): Likewise.
5231 (print_destructor): Likewise.
5232 (dump_ada_specs): Delete overloaded_names table.
5233
79310774
EB
52342017-09-29 Eric Botcazou <ebotcazou@adacore.com>
5235
5236 * c-ada-spec.c (max_ada_macros): Move around.
5237 (store_ada_macro_index): Likewise.
5238 (source_file): Rename into...
5239 (macro_source_file): ...this.
5240 (count_ada_macro): Move around.
5241 (store_ada_macro): Likewise.
5242 (compare_macro): Likewise.
5243 (print_ada_macros): Merge in...
5244 (dump_ada_macros): ...this.
5245 (source_file_base): Rename into...
5246 (current_source_file): ...this.
5247 (print_comment): Move around.
5248 (dump_ada_nodes): Call dump_ada_declaration directly.
5249 (struct with): Change type of limited field to bool.
5250 (append_withs): Change type of limited_access parameter to bool.
5251 (pp_ada_tree_identifie): Likewise.
5252 (dump_ada_decl_nam): Likewise.
5253 (dump_generic_ada_node): Likewise. Do not print the return type.
5254 (to_ada_name): Change type of space_found parameter to bool.
5255 (dump_ada_function_declaration): Return void and change type of
5256 parameters to bool. Also print the return type for a function.
5257 (print_ada_methods): Rename into...
5258 (dump_ada_methods): ...this.
5259 (print_ada_declaration): Rename into ...
5260 (dump_ada_declaration): ...this. Do not print the return type.
5261 (print_ada_struct_decl): Rename into...
5262 (dump_ada_struct_decl): ...this.
5263
7d386d45
JJ
52642017-09-29 Jakub Jelinek <jakub@redhat.com>
5265
5266 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
5267 rather than DECL_INITIAL.
5268 (common_handle_aligned_attribute): Likewise.
5269
ab20d992 52702017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
5271
5272 * c.opt (gen-decls): Add RejectNegative.
5273
026a79f7
AS
52742017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
5275 Jakub Jelinek <jakub@redhat.com>
5276
5277 Add support for -std=c++2a.
5278 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
5279 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
5280 * c-opts.c (set_std_cxx2a): New.
5281 (c_common_handle_option): Set options when -std=c++2a is enabled.
5282 (c_common_post_options): Adjust comments.
5283 (set_std_cxx14, set_std_cxx17): Likewise.
5284
4a8ca690
EB
52852017-09-15 Eric Botcazou <ebotcazou@adacore.com>
5286
5287 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
5288 message for non-uniform endianness and issue a warning in C++.
5289
7b936140
JJ
52902017-09-15 Jakub Jelinek <jakub@redhat.com>
5291
5292 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
5293 (Wc++17-compat): Change from undocumented alias to option.
5294 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
5295 change C++1z to C++17 in description.
5296 (std=c++1z, std=gnu++1z): Change from option to undocumented
5297 deprecated alias.
5298 (std=c++17, std=gnu++17): Change from undocumented alias to option.
5299 Adjust description.
5300 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
5301 * c-opts.c (set_std_cxx1z): Rename to ...
5302 (set_std_cxx17): ... this.
5303 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
5304 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 5305 caller.
7b936140
JJ
5306 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
5307 comments.
5308
12263f13
L
53092017-09-12 H.J. Lu <hongjiu.lu@intel.com>
5310
5311 * c-attribs.c (common_handle_aligned_attribute): Don't warn
5312 function alignment if warn_if_not_aligned_p is true.
5313
6836632e
NS
53142017-09-12 Nathan Sidwell <nathan@acm.org>
5315
5316 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
5317 resort_sorted_fields): Move to c/c-decl.c.
5318 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
5319 (struct sorted_fields_type): Move to c/c-lang.h.
5320
019bf9ad
JW
53212017-09-09 Jonathan Wakely <jwakely@redhat.com>
5322
5323 PR c++/81852
5324 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
5325
bc7fe952
MP
53262017-09-04 Marek Polacek <polacek@redhat.com>
5327
5328 PR c/81783
5329 * c-warn.c (warn_tautological_bitwise_comparison): New function.
5330 (warn_tautological_cmp): Call it.
5331
ab20d992 53322017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
5333
5334 * c-opts.c (c_common_finish): Write dependency information even if
5335 there are errors.
5336
d2e05fcb
JJ
53372017-09-01 Jakub Jelinek <jakub@redhat.com>
5338
5339 PR c/81887
5340 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
5341 (omp_pragmas_simd): ... here.
5342 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
5343 create new clauses list containing just simd clause.
5344
18e2a8b8
RS
53452017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5346 Alan Hayward <alan.hayward@arm.com>
5347 David Sherwood <david.sherwood@arm.com>
5348
5349 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
5350 into scalar_mode_supported_p call.
5351 (handle_mode_attribute): Update call to scalar_mode_supported_p.
5352
16d22000
RS
53532017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5354 Alan Hayward <alan.hayward@arm.com>
5355 David Sherwood <david.sherwood@arm.com>
5356
5357 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
5358 for the mode iterator.
5359
b397965c
RS
53602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5361 Alan Hayward <alan.hayward@arm.com>
5362 David Sherwood <david.sherwood@arm.com>
5363
5364 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
5365 * c-common.c (c_build_vec_perm_expr): Likewise.
5366
357b7604
RS
53672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5368 Alan Hayward <alan.hayward@arm.com>
5369 David Sherwood <david.sherwood@arm.com>
5370
5371 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
5372
e05c94ba
RS
53732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5374 Alan Hayward <alan.hayward@arm.com>
5375 David Sherwood <david.sherwood@arm.com>
5376
5377 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
5378 before calling targetm.addr_space.valid_pointer_mode.
5379
5c20c4af
RS
53802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5381 Alan Hayward <alan.hayward@arm.com>
5382 David Sherwood <david.sherwood@arm.com>
5383
5384 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
5385
c94843d2 53862017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
5387 Alan Hayward <alan.hayward@arm.com>
5388 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
5389
5390 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
5391 iterators.
5392 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5393
4e10a5a7
RS
53942017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
5395 Alan Hayward <alan.hayward@arm.com>
5396 David Sherwood <david.sherwood@arm.com>
5397
5398 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
5399 case statements.
5400
130fcab0
ML
54012017-08-29 Martin Liska <mliska@suse.cz>
5402
5403 PR other/39851
5404 * c-common.c (parse_optimize_options): Add argument to function
5405 call.
5406 * c-pragma.c (handle_pragma_diagnostic): Likewise.
5407
14e18d71
DM
54082017-08-24 David Malcolm <dmalcolm@redhat.com>
5409
5410 * c-lex.c (interpret_float): Use token location
5411 when building an EXCESS_PRECISION_EXPR.
5412
2f687306
DM
54132017-08-21 David Malcolm <dmalcolm@redhat.com>
5414
5415 * c-common.c (check_function_arguments): Add "arglogs" param; pass
5416 it to check_function_format.
5417 * c-common.h (check_function_arguments): Add vec<location_t> *
5418 param.
5419 (check_function_format): Likewise.
5420 * c-format.c (struct format_check_context): Add field "arglocs".
5421 (check_function_format): Add param "arglocs"; pass it to
5422 check_format_info.
ab20d992 5423 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
5424 new field of format_ctx.
5425 (check_format_arg): Pass format_ctx->arglocs to new param of
5426 check_format_info_main.
5427 (class argument_parser): New field "arglocs".
5428 (argument_parser::argument_parser): Add "arglocs_" param and use
5429 it to initialize new field.
5430 (argument_parser::check_argument_type): Pass new arglocs field to
5431 check_format_types.
5432 (check_format_info_main): Add param "arglocs", and use it when
5433 constructing arg_parser.
5434 (check_format_types): Add param "arglocs"; use it if non-NULL when
5435 !EXPR_HAS_LOCATION (cur_param) to get at location information.
5436
00aa1fa2
L
54372017-08-18 H.J. Lu <hongjiu.lu@intel.com>
5438
5439 PR c/53037
5440 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
5441 (c_common_attribute_table): Add warn_if_not_aligned.
5442 (handle_aligned_attribute): Renamed to ...
5443 (common_handle_aligned_attribute): Remove argument, name, and add
5444 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
5445 (handle_aligned_attribute): New.
5446 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
5447
27be025d
MS
54482017-08-14 Martin Sebor <msebor@redhat.com>
5449
5450 PR c/81117
5451 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
5452 (handle_nonstring_attribute): New function.
5453
da67acb9
MS
54542017-08-14 Martin Sebor <msebor@redhat.com>
5455
5456 PR c/81117
5457 * c-format.h (T89_G): New macro.
5458 * c-format.c (local_gcall_ptr_node): New variable.
5459 (init_dynamic_diag_info): Initialize it.
5460
a8b522b4
ML
54612017-08-11 Martin Liska <mliska@suse.cz>
5462
5463 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
5464 TARGET_SUPPORTS_ALIASES.
5465
32129a17
DM
54662017-08-10 David Malcolm <dmalcolm@redhat.com>
5467
5468 * c-common.c (c_parse_error): Add rich_location * param, using it
5469 rather implicitly using input_location.
5470 * c-common.h (c_parse_error): Add rich_location * param.
5471
30af3a2b
MP
54722017-08-09 Marek Polacek <polacek@redhat.com>
5473
5474 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
5475 (c_common_truthvalue_conversion): Likewise.
5476 * c-omp.c (c_finish_omp_atomic): Likewise.
5477 * c-common.h (build_binary_op): Update declaration.
5478
314e6352
ML
54792017-08-08 Martin Liska <mliska@suse.cz>
5480
5481 * c-ada-spec.c: Include header files.
5482 * c-ubsan.c: Likewise.
5483 * c-warn.c: Likewise.
5484
56b5041c
JJ
54852017-08-07 Jakub Jelinek <jakub@redhat.com>
5486
5487 PR c/69389
5488 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
5489
db440138
EB
54902017-08-07 Eric Botcazou <ebotcazou@adacore.com>
5491
5492 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
5493 (print_ada_methods): Likewise.
5494 (print_ada_declaration): Likewise.
5495
577eec56
ML
54962017-08-07 Martin Liska <mliska@suse.cz>
5497
5498 * array-notation-common.c: Add new includes.
5499 * c-format.c( handle_format_attribute): Canonicalize a format
5500 function name.
5501 * c-lex.c (c_common_has_attribute): Canonicalize name of an
5502 attribute.
5503 * c-pretty-print.c: Add new include.
5504
b854df3c
EB
55052017-08-05 Eric Botcazou <ebotcazou@adacore.com>
5506
5507 * c-ada-spec.c (has_static_fields): Look only into variables.
5508 (print_constructor): Add TYPE parameter and use it for the name.
5509 (print_destructor): Likewise.
5510 (print_ada_declaration): Adjust to new constructor/destructor names.
5511 Adjust calls to print_constructor and print_destructor.
5512 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
5513 Look only into variables in the final loop.
5514
9f2cb25e
EB
55152017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5516
5517 * c-ada-spec.c (has_static_fields): Look only into fields.
5518 (dump_generic_ada_node): Small tweak.
5519 (dump_nested_types): Look only into fields.
5520 (print_ada_declaration): Look only into methods. Small tweak.
5521 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
5522
f4bcd9eb
EB
55232017-08-01 Eric Botcazou <ebotcazou@adacore.com>
5524
5525 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
5526 (dump_ada_function_declaration): Likewise.
5527 (dump_generic_ada_node): Likewise.
5528 (print_ada_declaration): Add support for const-qualified variables.
5529
f34ebeb2
ML
55302017-07-31 Martin Liska <mliska@suse.cz>
5531
5532 PR sanitize/81530
5533 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
5534 Guard condition with flag_sanitize_p also with current_function_decl
5535 non-null equality.
5536 (ubsan_maybe_instrument_reference_or_call): Likewise.
5537
218e5d04
UB
55382017-07-30 Uros Bizjak <ubizjak@gmail.com>
5539
5540 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
5541
942047f2
EB
55422017-07-29 Eric Botcazou <ebotcazou@adacore.com>
5543
5544 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
5545 for enumeral types.
5546 (print_ada_declaration): Add missing guard for record types.
5547
a40ff0ae
JJ
55482017-07-27 Jakub Jelinek <jakub@redhat.com>
5549
5550 PR c/45784
5551 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
5552 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
5553 new COMPOUND_EXPRs around the rhs of the comparison.
5554
06bd22f6
MP
55552017-07-27 Marek Polacek <polacek@redhat.com>
5556
5557 PR c/81417
5558 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
5559 the types.
5560
036ea399
JJ
55612017-07-27 Jakub Jelinek <jakub@redhat.com>
5562
5563 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
5564 (handle_noipa_attribute): New function.
5565
417ca011
TD
55662017-07-07 Torsten Duwe <duwe@suse.de>
5567
5568 * c-attribs.c (c_common_attribute_table): Add entry for
5569 "patchable_function_entry".
5570
5aaa8fb4
NS
55712017-07-20 Nathan Sidwell <nathan@acm.org>
5572
5573 Remove TYPE_METHODS.
5574 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
5575 dump_ada_template, print_ada_methods,
5576 print_ada_declaration): Member fns are on TYPE_FIELDS.
5577
ff22eb12
NS
55782017-07-18 Nathan Sidwell <nathan@acm.org>
5579
5580 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
5581
eea77d1f
DM
55822017-07-14 David Malcolm <dmalcolm@redhat.com>
5583
5584 * c-common.c (try_to_locate_new_include_insertion_point): New
5585 function.
5586 (per_file_includes_t): New typedef.
5587 (added_includes_t): New typedef.
5588 (added_includes): New variable.
5589 (maybe_add_include_fixit): New function.
5590 * c-common.h (maybe_add_include_fixit): New decl.
5591
281ac396
MS
55922017-07-10 Martin Sebor <msebor@redhat.com>
5593
5594 PR other/81345
5595 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
5596
b6f43128
DM
55972017-07-06 David Malcolm <dmalcolm@redhat.com>
5598
5599 * c-common.c (selftest::c_family_tests): New.
5600 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
5601 (selftest::c_family_tests): New decl.
5602
efbf55b0
MP
56032017-07-04 Marek Polacek <polacek@redhat.com>
5604
5605 PR c/81231
5606 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
5607 types.
5608
6c86bd88
MP
56092017-07-04 Marek Polacek <polacek@redhat.com>
5610
5611 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
5612
17a7218b
ML
56132017-06-28 Martin Liska <mliska@suse.cz>
5614
5615 PR ipa/81128
5616 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
5617 to a function declaration.
5618
63010089
ML
56192017-06-28 Martin Liska <mliska@suse.cz>
5620
5621 PR driver/79659
5622 * c.opt: Add IntegerRange to various options.
5623
3e2becc4
MP
56242017-06-26 Marek Polacek <polacek@redhat.com>
5625
5626 PR c/80116
5627 * c-common.h (warn_for_multistatement_macros): Declare.
5628 * c-warn.c: Include "c-family/c-indentation.h".
5629 (warn_for_multistatement_macros): New function.
5630 * c.opt (Wmultistatement-macros): New option.
5631 * c-indentation.c (guard_tinfo_to_string): No longer static.
5632 Change the parameter type to "enum rid". Handle RID_SWITCH.
5633 * c-indentation.h (guard_tinfo_to_string): Declare.
5634
2db9b7cd
MG
56352017-06-23 Marc Glisse <marc.glisse@inria.fr>
5636
5637 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
5638
c3684b7b
MS
56392017-06-15 Martin Sebor <msebor@redhat.com>
5640
5641 PR c++/80560
5642 * c.opt (-Wclass-memaccess): New option.
5643
e72c4afd
BK
56442017-06-14 Boris Kolpackov <boris@codesynthesis.com>
5645
5646 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
5647
8a516588
MP
56482017-06-13 Marek Polacek <polacek@redhat.com>
5649
5650 PR objc/80949
5651 * c-warn.c (do_warn_duplicated_branches): Return if any of the
5652 branches is null.
5653
45b2222a
ML
56542017-06-13 Martin Liska <mliska@suse.cz>
5655
5656 PR sanitize/78204
5657 * c-attribs.c (add_no_sanitize_value): New function.
5658 (handle_no_sanitize_attribute): Likewise.
5659 (handle_no_sanitize_address_attribute): Use the function.
5660 (handle_no_sanitize_thread_attribute): New function.
5661 (handle_no_address_safety_analysis_attribute): Use
5662 add_no_sanitize_value.
5663 (handle_no_sanitize_undefined_attribute): Likewise.
5664 * c-common.h: Declare new functions.
5665 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
5666 (ubsan_instrument_shift): Likewise.
5667 (ubsan_instrument_bounds): Likewise.
5668 (ubsan_maybe_instrument_array_ref): Likewise.
5669 (ubsan_maybe_instrument_reference_or_call): Likewise.
5670
a01f151f
JM
56712017-06-11 Jason Merrill <jason@redhat.com>
5672
5673 * c-ada-spec.c, c-pragma.c: Use id_equal.
5674
3de4ac6d
MP
56752017-06-04 Marek Polacek <polacek@redhat.com>
5676
5677 PR c/80919
5678 * c-format.c (matching_type_p): Return false if any of the types
5679 requires structural equality.
5680
2474f48f
MS
56812017-06-02 Martin Sebor <msebor@redhat.com>
5682
5683 PR c/80892
5684 * c-warn.c (conversion_warning): Use -Wconversion for integer
5685 conversion and -Wfloat-conversion for floating one.
5686
40ffd95f
BE
56872017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
5688
5689 * c.opt (Wsizeof-pointer-div): New warning option.
5690
3fa4634c
VR
56912017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
5692
5693 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
5694 (Wcatch-value=1): Enable by -Wall.
5695
f012c8ef
DM
56962017-05-30 David Malcolm <dmalcolm@redhat.com>
5697
5698 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
5699 format_chars.
5700 * c.opt (fdiagnostics-show-template-tree): New option.
5701 (felide-type): New option.
5702
63dbcd13
VR
57032017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
5704
5705 * c.opt (Wcatch-value=): New C++ warning flag.
5706
be136b5c
NS
57072017-05-24 Nathan Sidwell <nathan@acm.org>
5708
5709 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
5710 const casts to avoid warning.
5711
3cd211af
MS
57122017-05-24 Martin Sebor <msebor@redhat.com>
5713
5714 PR c/80731
5715 * c-common.h (unsafe_conversion_p): Add a function argument.
5716 * c-common.c (unsafe_conversion_p): Same.
5717 Add type names and values to diagnostics.
5718 (scalar_to_vector): Adjust.
5719 * c-warn.c (constant_expression_error): Add a function argument.
5720 Add type names and values to diagnostics.
5721 (conversion_warning): Add a function argument.
5722 Add type names and values to diagnostics.
5723 (warnings_for_convert_and_check): Same.
5724
1ff7be5a
JM
57252017-05-19 Jason Merrill <jason@redhat.com>
5726
5727 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
5728 enumerators.
5729
ff502317
BE
57302017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
5731
5732 * c-format.c (locus): Move out of function scope,
5733 add GTY attribute.
5734
2a8a8d7b
NS
57352017-05-19 Nathan Sidwell <nathan@acm.org>
5736
5737 * c-opts.c (class_dump_file, class_dump_flags): Delete.
5738 (c_common_parse_file): Remove class dump handling.
5739 (get_dump_info): Likewise.
5740
39aac208
RB
57412017-05-19 Richard Biener <rguenther@suse.de>
5742
5743 PR c++/80593
5744 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
5745 to alias-set zero memory.
5746
6ecd2339
BE
57472017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
5748
5749 * c-format.c (local_tree_type_node): Add GTY attribute.
5750
6574d78e
MP
57512017-05-18 Marek Polacek <polacek@redhat.com>
5752
5753 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
5754 (c_common_fixed_point_type_for_size): Likewise.
5755 (c_common_type_for_mode): Likewise.
5756 (shorten_compare): Likewise.
5757 (c_promoting_integer_type_p): Use false/true instead of 0/1.
5758 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
5759
e3455240
MP
57602017-05-18 Marek Polacek <polacek@redhat.com>
5761
5762 * c-common.c (self_promoting_args_p): Change the return type to bool.
5763 Use false/true instead of 0/1.
5764 * c-common.h (self_promoting_args_p): Update.
5765
3fa8871b
MP
57662017-05-17 Marek Polacek <polacek@redhat.com>
5767
5768 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
5769 * c-warn.c: Likewise.
5770
b42cc3ca
VV
57712017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
5772
5773 Implement new C++ intrinsics __is_assignable and __is_constructible.
5774 * c-common.c (__is_assignable, __is_constructible): New.
5775 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
5776
1a817418
ML
57772017-05-17 Martin Liska <mliska@suse.cz>
5778
5779 * c-common.h: Introduce dump_flags_t type and
5780 use it instead of int type.
5781 * c-gimplify.c (c_genericize): Likewise.
5782 * c-opts.c: Likewise.
5783
b2fa0a8b
MP
57842017-05-17 Marek Polacek <polacek@redhat.com>
5785
5786 * c-common.c (c_save_expr): Remove.
5787 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
5788 * c-common.h (c_save_expr): Remove declaration.
5789
31c2d57d
VR
57902017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
5791
5792 PR c/35441
5793 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
5794 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
5795 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
5796 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
5797 RDIV_EXPR.
5798 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
5799
684f84de
MP
58002017-05-09 Marek Polacek <polacek@redhat.com>
5801
5802 PR c/80525
5803 * c-warn.c (unwrap_c_maybe_const): New.
5804 (warn_logical_operator): Call it.
5805
641da50a
NS
58062017-05-09 Nathan Sidwell <nathan@acm.org>
5807
5808 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
5809 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
5810
631238ac
MS
58112017-05-08 Martin Sebor <msebor@redhat.com>
5812
5813 PR translation/80280
5814 * c-format.h (struct format_flag_spec): Add new member.
5815 (T89_T): New macro.
5816 * c-format.c (local_tree_type_node): New global.
5817 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
5818 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
5819 (strfmon_flag_specs): Likewise.
5820 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
5821 with distinct quoting properties.
5822 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
5823 (flag_chars_t::validate): Add argument and handle bad quoting.
5824 (check_format_info_main): Handle quoting problems.
5825 (init_dynamic_diag_info): Simplify.
5826
49f0c04c
JM
58272017-05-08 Jason Merrill <jason@redhat.com>
5828
5829 * c-opts.c (c_common_post_options): Update defaults for
5830 flag_abi_version and flag_abi_compat_version.
5831
56d35585
DM
58322017-05-05 David Malcolm <dmalcolm@redhat.com>
5833
5834 * c-common.c (c_cpp_error): Replace report_diagnostic
5835 with diagnostic_report_diagnostic.
5836
0f2c4a8f
MS
58372017-05-04 Martin Sebor <msebor@redhat.com>
5838
5839 PR translation/80280
5840 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
5841 (handle_weakref_attribute): Same.
5842
6fe63fb4
NS
58432017-05-03 Nathan Sidwell <nathan@acm.org>
5844
5845 Canonicalize canonical type hashing
5846 * c-common.c (complete_array_type): Use type_hash_canon.
5847
815d9cc6
XR
58482017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
5849
92a285c1 5850 PR c++/80038
815d9cc6
XR
5851 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
5852 prototype.
5853 (cilk_install_body_pedigree_operations): Likewise.
5854 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
5855 detatched.
5856 (cilk_gimplify_call_params_in_spawned_fn): Remove.
5857 (cilk_install_body_pedigree_operations): Likewise.
5858 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
5859 unwrapping.
5860
f8a36447
JJ
58612017-04-27 Jakub Jelinek <jakub@redhat.com>
5862
5863 PR c++/80534
5864 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
5865 flag on non-aggregate element types.
5866
7c145456
BE
58672017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5868
5869 * c-common.c (c_type_hasher, type_hash_table): Remove.
5870 (c_common_get_alias_set): Remove unreachable code.
5871 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
5872
c3cbcd45
VR
58732017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
5874
5875 * c.opt (Wextra-semi): New C++ warning flag.
5876
8a59d466
JJ
58772017-04-20 Jakub Jelinek <jakub@redhat.com>
5878
5879 PR middle-end/80423
5880 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
5881
8487c9a5
JJ
58822017-04-18 Jakub Jelinek <jakub@redhat.com>
5883
5884 PR middle-end/79788
5885 PR middle-end/80375
5886 * c-common.c (c_common_type_for_mode): Don't handle
5887 widest_*_literal_type_node here.
5888 c_common_signed_or_unsigned_type): Likewise.
5889 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
5890 to *intTI_type_node or *intDI_type_node depending on whether
5891 TImode is supported by the target or not.
5892
3ee0fb02
ML
58932017-04-10 Martin Liska <mliska@suse.cz>
5894
5895 PR sanitizer/80350
5896 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
5897 doing an UBSAN check.
5898
5764ee3c
JW
58992017-04-03 Jonathan Wakely <jwakely@redhat.com>
5900
5901 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
5902
6f3af356
JJ
59032017-03-31 Jakub Jelinek <jakub@redhat.com>
5904
5905 PR c++/79572
5906 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
5907 tree *.
5908 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
5909 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
5910 REFERENCE_TYPE.
5911
f6a7a9d5
DM
59122017-03-31 David Malcolm <dmalcolm@redhat.com>
5913
5914 PR documentation/78732
5915 * c.opt (Wendif-labels): Fix description to refer to
5916 #else rather than #elif.
5917
af88f557
JJ
59182017-03-31 Jakub Jelinek <jakub@redhat.com>
5919
5920 PR libstdc++/80251
5921 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
5922 * c-common.c (c_common_reswords): Add __is_aggregate trait.
5923
a9e4a1a5
JJ
59242017-03-27 Jakub Jelinek <jakub@redhat.com>
5925
5926 PR middle-end/80162
5927 * c-common.c (c_common_mark_addressable_vec): Don't set
5928 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
5929
3f01b620
MS
59302017-03-21 Martin Sebor <msebor@redhat.com>
5931
5932 PR c++/79548
5933 * c-common.c (set_underlying_type): Mark type used only when
5934 original del is declared unused.
5935
2f6f187a
DM
59362017-03-10 David Malcolm <dmalcolm@redhat.com>
5937
5938 PR translation/79848
5939 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
5940 "%qs".
5941
a02fa805
DM
59422017-03-10 David Malcolm <dmalcolm@redhat.com>
5943
5944 PR c/79921
5945 * c-indentation.c (warn_for_misleading_indentation): Remove parens
5946 from inform's message, so that xgettext can locate it.
5947
822a132c
MP
59482017-03-09 Marek Polacek <polacek@redhat.com>
5949
5950 PR c++/79962
5951 PR c++/79984
5952 * c-attribs.c (handle_nonnull_attribute): Save the result of default
5953 conversion to the attribute list.
5954
bba81f1c
ML
59552017-03-09 Martin Liska <mliska@suse.cz>
5956
5957 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
5958
108154ff
JM
59592017-03-03 Jason Merrill <jason@redhat.com>
5960
5961 * c.opt (Wnoexcept-type): New.
5962
eb0e7c34
RB
59632017-03-02 Richard Biener <rguenther@suse.de>
5964
5965 PR c/79756
5966 * c-common.c (c_common_mark_addressable_vec): Look through
5967 C_MAYBE_CONST_EXPR.
5968
9453ba0a
ML
59692017-02-28 Martin Liska <mliska@suse.cz>
5970
5971 * c.opt: Replace space with tabular for options of <number>
5972 type.
5973
6a825afe
ML
59742017-02-28 Martin Liska <mliska@suse.cz>
5975
5976 * c.opt: Fix --help=option -Q for options which are of
5977 an enum type.
5978
4227c9ad
JJ
59792017-02-24 Jakub Jelinek <jakub@redhat.com>
5980
5981 PR c++/79588
5982 * c-common.c (check_function_restrict): New function.
5983 (check_function_arguments): Add FNDECL argument. Call
5984 check_function_restrict if -Wrestrict.
5985 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
5986 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
5987 * c-common.h (check_function_arguments): Add FNDECL argument.
5988 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
5989
59909673
EB
59902017-02-24 Eric Botcazou <ebotcazou@adacore.com>
5991
5992 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
5993 treatment of parameters with pointer-to-tagged type and tidy up.
5994 (print_ada_methods): Remove the special treatment of C++ static member
5995 functions.
5996
54dcd526
ML
59972017-02-22 Martin Liska <mliska@suse.cz>
5998
5999 * c.opt: Replace inequality signs with square brackets
6000 for -Wnornalized.
6001
00bc9de3
JJ
60022017-02-21 Jakub Jelinek <jakub@redhat.com>
6003
6004 PR c++/79641
6005 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
6006 preserve quals.
6007
97fcf744
JM
60082017-02-17 Joseph Myers <joseph@codesourcery.com>
6009
6010 * c-cppbuiltin.c (builtin_define_float_constants): Define
6011 __DECIMAL_DIG__ to the value for long double.
6012
c7545f1c
MP
60132017-02-15 Marek Polacek <polacek@redhat.com>
6014
6015 PR c/79515
6016 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
6017 conversion has occured.
6018
c2e84327
DM
60192017-01-24 David Malcolm <dmalcolm@redhat.com>
6020
6021 * c-common.c (c_common_reswords): Add "__RTL".
6022 * c-common.h (enum rid): Add RID_RTL.
6023
2ebd93e1
MP
60242017-01-20 Marek Polacek <polacek@redhat.com>
6025
6026 PR c/64279
6027 * c-common.h (do_warn_duplicated_branches_r): Declare.
6028 * c-gimplify.c (c_genericize): Walk the function tree calling
6029 do_warn_duplicated_branches_r.
6030 * c-warn.c (expr_from_macro_expansion_r): New.
6031 (do_warn_duplicated_branches): New.
6032 (do_warn_duplicated_branches_r): New.
6033 * c.opt (Wduplicated-branches): New option.
6034
0d80ab91
DM
60352017-01-17 David Malcolm <dmalcolm@redhat.com>
6036
6037 PR c++/71497
6038 * c-indentation.c (warn_for_misleading_indentation): Use the past
6039 subjunctive in the note.
6040
7f991c36
AH
60412017-01-17 Aldy Hernandez <aldyh@redhat.com>
6042
6043 PR c/79116
6044 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
6045 start type to integer_type.
6046
1c70261c
JJ
60472017-01-16 Jakub Jelinek <jakub@redhat.com>
6048
6049 PR driver/49726
6050 * c.opt (gen-decls): Add Driver flag.
6051
1ddca3f3
PC
60522017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6053
6054 Revert:
6055 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6056
6057 PR c++/71737
6058 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6059
7d2f3f1d
PC
60602017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
6061
6062 PR c++/71737
6063 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
6064
bce6f760
MS
60652017-01-12 Martin Sebor <msebor@redhat.com>
6066
6067 (-Wformat-overflow): ...to this.
6068
bf5fbf46
MS
60692017-01-11 Martin Sebor <msebor@redhat.com>
6070
6071 PR c/78768
6072 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
6073 Also enable for LTO.
6074
e363df3f
JM
60752017-01-10 Jason Merrill <jason@redhat.com>
6076
6077 Implement P0195R2, C++17 variadic using.
6078 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
6079
bd2c6270
JJ
60802017-01-09 Jakub Jelinek <jakub@redhat.com>
6081
6082 PR translation/79019
6083 PR translation/79020
6084 * c.opt (Wnormalized=): Fix typo in description.
6085
efcc8d38
MS
60862017-01-08 Martin Sebor <msebor@redhat.com>
6087
6088 PR middle-end/77708
6089 * c.opt (-Wformat-truncation): New option.
6090
ab20d992 60912017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
6092
6093 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
6094 value to unsigned short to fit in 4 hex digits without
6095 warnings.
6096
4e89adf9
EB
60972017-01-05 Eric Botcazou <ebotcazou@adacore.com>
6098
6099 * c.opt (fsso-struct): Add 'native' value.
6100
cd445b54
ML
61012017-01-05 Martin Liska <mliska@suse.cz>
6102
6103 PR pch/78970
6104 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
6105 header.
6106
a9342885
MP
61072017-01-04 Marek Polacek <polacek@redhat.com>
6108
6109 PR c++/64767
6110 * c.opt (Wpointer-compare): New option.
6111
fc73e60c
JJ
61122017-01-04 Jakub Jelinek <jakub@redhat.com>
6113
6114 PR driver/78957
6115 * c.opt (fsso-struct=): Add RejectNegative.
6116
cbe34bb5
JJ
61172017-01-01 Jakub Jelinek <jakub@redhat.com>
6118
6119 Update copyright years.
6120
d4a6c0ea
ML
61212016-12-29 Martin Liska <mliska@suse.cz>
6122
6123 PR c/78933
6124 * c.opt (strong-eval-order): Add RejectNegative keyword.
6125
67a5ad7c
JM
61262016-12-22 Jason Merrill <jason@redhat.com>
6127
6128 Implement P0522R0, matching of template template arguments.
6129 * c-cppbuiltin.c (c_cpp_builtins): Define
6130 __cpp_template_template_args.
6131
0dba7960
JJ
61322016-12-21 Jakub Jelinek <jakub@redhat.com>
6133
6134 PR bootstrap/78817
6135 * c-common.c (struct nonnull_arg_ctx): New type.
6136 (check_function_nonnull): Return bool instead of void. Use
6137 nonnull_arg_ctx as context rather than just location_t.
6138 (check_nonnull_arg): Adjust for the new context type, set
6139 warned_p to true if a warning has been diagnosed.
6140 (check_function_arguments): Return bool instead of void.
6141 * c-common.h (check_function_arguments): Adjust prototype.
6142
31bfc9b9
JM
61432016-12-21 Jason Merrill <jason@redhat.com>
6144
6145 * c.opt (-fnew-ttp-matching): New flag.
6146 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
6147
629b3d75
MJ
61482016-12-14 Martin Jambor <mjambor@suse.cz>
6149
6150 * c-omp.c: Include omp-general.h instead of omp-low.h.
6151 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
6152 name.
6153
474da67e
MS
61542016-12-14 Martin Sebor <msebor@redhat.com>
6155
6156 PR c/17308
6157 * c-common.c (check_nonnull_arg): Disable when optimization
6158 is enabled.
6159
fe366b87
MP
61602016-12-12 Marek Polacek <polacek@redhat.com>
6161
6162 PR c++/78647
6163 * c-common.c (attribute_fallthrough_p): Return false for
6164 error_mark_node.
6165
8bd9f164
MS
61662016-12-08 Martin Sebor <msebor@redhat.com>
6167
6168 PR c/78284
6169 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
6170
060162e0
MS
61712016-12-08 Martin Sebor <msebor@redhat.com>
6172
6173 PR c/78165
92a285c1
ML
6174 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
6175 suffix.
060162e0 6176
ee92e7ba
MS
61772016-12-07 Martin Sebor <msebor@redhat.com>
6178
6179 PR c/53562
6180 PR middle-end/77784
6181 PR middle-end/78149
6182 PR middle-end/78138
6183 * c.opt (-Wstringop-overflow): New option.
6184
84b0769e
MO
61852016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
6186
6187 * c-attribs.c (asan odr indicator): New attribute.
6188 (handle_asan_odr_indicator_attribute): New function.
6189
7fa6a965
PK
61902016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6191
6192 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
6193 ptrdiff_type_node;
6194
56d8ffc1
JG
61952016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6196
6197 * c-common.c (excess_precision_mode_join): New.
6198 (c_ts18661_flt_eval_method): New.
6199 (c_c11_flt_eval_method): Likewise.
6200 (c_flt_eval_method): Likewise.
6201 * c-common.h (excess_precision_mode_join): New.
6202 (c_flt_eval_method): Likewise.
6203 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
6204 (cpp_iec_559_value): Call it.
6205 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
6206 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
6207 __FLT_EVAL_METHOD_TS_18661_3__.
6208
04f0fcf7
JG
62092016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
6210
6211 * c-opts.c (c_common_post_options): Add logic to handle the default
6212 case for -fpermitted-flt-eval-methods.
6213
fb2675cb
PB
62142016-11-23 Paolo Bonzini <bonzini@gnu.org>
6215
6216 * c.opt (Wexpansion-to-defined): New.
6217
ec1c5694
JJ
62182016-11-23 Jakub Jelinek <jakub@redhat.com>
6219
6220 PR target/78451
6221 * c-pragma.c (handle_pragma_target): Don't replace
6222 current_target_pragma, but chainon the new args to the current one.
6223
730c9e75
NS
62242016-11-22 Nathan Sidwell <nathan@acm.org>
6225
6226 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 6227 indentation and formatting.
730c9e75 6228
89990732
MS
62292016-11-21 Martin Sebor <msebor@redhat.com>
6230
6231 * c.opt (-fprintf-return-value): Enable by default.
6232
48330c93
BE
62332016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6234
6235 PR c++/71973
6236 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
6237 * c-common.c (c_common_nodes_and_builtins): Initialize
6238 const_tm_ptr_type_node.
6239
0d939c95
MP
62402016-11-16 Marek Polacek <polacek@redhat.com>
6241
6242 PR c/78285
6243 * c-common.c (c_add_case_label): Turn error_at calls into inform.
6244
8e745a17
JJ
62452016-11-14 Jakub Jelinek <jakub@redhat.com>
6246
6247 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
6248
1ee62b92 62492016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
6250 Richard Biener <rguenther@suse.de>
6251
6252 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
6253 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
6254 * c.opt (fgimple): New option.
1ee62b92 6255
22b15758
UB
62562016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6257
6258 PR c/35503
6259 * c-common.h (warn_for_restrict): Declare.
6260 * c-warn.c: Include gcc-rich-location.h.
6261 (warn_for_restrict): New function.
6262 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
6263 (gcc_cdiag_char_table): Likewise.
6264 (gcc_cxxdiag_char_table): Likewise.
6265 * c.opt (Wrestrict): New option.
6266
4be719cd
EB
62672016-11-13 Eric Botcazou <ebotcazou@adacore.com>
6268
6269 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
6270 for nested types only if the type is a record or union and dump SLOC.
6271
4a826ca6
JM
62722016-11-09 Jason Merrill <jason@redhat.com>
6273
6274 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
6275
2e955d50
JJ
62762016-11-09 Jakub Jelinek <jakub@redhat.com>
6277
6278 * c-ubsan.c (ubsan_instrument_shift): Handle split
6279 -fsanitize=shift-base and -fsanitize=shift-exponent.
6280
51dc6603
JM
62812016-11-07 Jason Merrill <jason@redhat.com>
6282
6283 * c.opt (Wc++1z-compat): New.
6284 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
6285
6dc4a604
ML
62862016-11-07 Martin Liska <mliska@suse.cz>
6287
6288 * c-warn.c (warn_for_unused_label): Save all labels used
6289 in goto or in &label.
6290
b302001e
JM
62912016-11-03 Jason Merrill <jason@redhat.com>
6292
6293 * c-cppbuiltin.c (c_cpp_builtins): Correct
6294 __cpp_inheriting_constructors.
6295
31f7f784
JM
62962016-11-01 Jason Merrill <jason@redhat.com>
6297
2bc78e3c
JM
6298 * c-cppbuiltin.c (c_cpp_builtins): Update
6299 __cpp_inheriting_constructors.
6300
31f7f784
JM
6301 * c.opt (-fnew-inheriting-ctors): New.
6302 * c-opts.c: Default to on for ABI 11+.
6303
dcb466ec
JJ
63042016-10-31 Jakub Jelinek <jakub@redhat.com>
6305
6306 PR c++/77948
6307 * c.opt (fext-numeric-literals): Add Var and Init.
6308 * c-opts.c (c_common_handle_option): Don't clear
6309 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
6310 (c_common_post_options): Clear it here if not set
6311 explicitly.
6312
52e1b91e
AH
63132016-10-28 Aldy Hernandez <aldyh@redhat.com>
6314
6315 PR debug/77773
6316 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
6317 if NULL.
6318
e16f1cc7
JJ
63192016-10-25 Jakub Jelinek <jakub@redhat.com>
6320
6321 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
6322 * c-common.c (c_common_reswords): Add __builtin_launder.
6323
f8348061
BE
63242016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
6325
6326 * c-common.c (c_common_truthvalue_conversion): Warn for
6327 multiplications in boolean context. Fix the quoting of '<<' and '<'
6328 in the shift warning.
6329
eff89e01
BE
63302016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
6331
6332 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
6333
24bc7bf4
JM
63342016-10-20 Jason Merrill <jason@redhat.com>
6335
6336 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
6337
4c712374
BE
63382016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6339
6340 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
6341 integer shift ops in boolean context.
6342
63432016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
6344
6345 * c.opt (Walloca): New.
6346 (Walloca-larger-than=): New.
6347 (Wvla-larger-than=): New.
6348
8fa18c06
MP
63492016-10-17 Marek Polacek <polacek@redhat.com>
6350
6351 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
6352 Return immediately when finding a match.
6353 (warn_tautological_cmp): Remove a boolean variable that is no longer
6354 needed.
6355
b12b1915
MP
63562016-10-17 Marek Polacek <polacek@redhat.com>
6357
6358 * c-attribs.c: New file.
6359 * c-common.c: Move attributes handling to c-attribs.c.
6360 (get_nonnull_operand): No longer static.
6361 * c-common.h: Move the declarations from c-attribs.c to its own section.
6362
2045acd9
JM
63632016-10-14 Jason Merrill <jason@redhat.com>
6364
6365 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
6366 and __cpp_deduction_guides.
6367
14a2c9aa
JM
63682016-10-13 Jason Merrill <jason@redhat.com>
6369
6370 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
6371
4d0cdd0c
TP
63722016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
6373
6374 * c-cppbuiltin.c: Include memmodel.h.
6375 * c-opts.c: Likewise.
6376 * c-pragma.c: Likewise.
6377 * c-warn.c: Likewise.
6378
70f6d5e1
JJ
63792016-10-12 Jakub Jelinek <jakub@redhat.com>
6380
6381 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
6382 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
6383 * c-opts.c (sanitize_cpp_opts): Initialize
6384 cpp_opts->cpp_warn_implicit_fallthrough.
6385
78f61294
MP
63862016-10-11 Marek Polacek <polacek@redhat.com>
6387
6388 * c-common.c (warning_candidate_p): Change the return type to bool
6389 and return true/false instead of 1/0.
6390 (vector_mode_valid_p): Likewise.
6391
038b5cc0
MP
63922016-10-11 Marek Polacek <polacek@redhat.com>
6393
6394 * c-common.c (fold_for_warn): No longer static.
6395 (bool_promoted_to_int_p): Likewise.
6396 (c_common_get_narrower): Likewise.
6397 (constant_expression_warning): Move to c-warn.c.
6398 (constant_expression_error): Likewise.
6399 (overflow_warning): Likewise.
6400 (warn_logical_operator): Likewise.
6401 (find_array_ref_with_const_idx_r): Likewise.
6402 (warn_tautological_cmp): Likewise.
6403 (expr_has_boolean_operands_p): Likewise.
6404 (warn_logical_not_parentheses): Likewise.
6405 (warn_if_unused_value): Likewise.
6406 (strict_aliasing_warning): Likewise.
6407 (sizeof_pointer_memaccess_warning): Likewise.
6408 (check_main_parameter_types): Likewise.
6409 (conversion_warning): Likewise.
6410 (warnings_for_convert_and_check): Likewise.
6411 (match_case_to_enum_1): Likewise.
6412 (match_case_to_enum): Likewise.
6413 (c_do_switch_warnings): Likewise.
6414 (warn_for_omitted_condop): Likewise.
6415 (readonly_error): Likewise.
6416 (lvalue_error): Likewise.
6417 (invalid_indirection_error): Likewise.
6418 (warn_array_subscript_with_type_char): Likewise.
6419 (warn_about_parentheses): Likewise.
6420 (warn_for_unused_label): Likewise.
6421 (warn_for_div_by_zero): Likewise.
6422 (warn_for_memset): Likewise.
6423 (warn_for_sign_compare): Likewise.
6424 (do_warn_double_promotion): Likewise.
6425 (do_warn_unused_parameter): Likewise.
6426 (record_locally_defined_typedef): Likewise.
6427 (maybe_record_typedef_use): Likewise.
6428 (maybe_warn_unused_local_typedefs): Likewise.
6429 (maybe_warn_bool_compare): Likewise.
6430 (maybe_warn_shift_overflow): Likewise.
6431 (warn_duplicated_cond_add_or_warn): Likewise.
6432 (diagnose_mismatched_attributes): Likewise.
6433 * c-common.h: Move the declarations from c-warn.c to its own section.
6434 * c-warn.c: New file.
6435
627be19f
JM
64362016-10-08 Jason Merrill <jason@redhat.com>
6437
6438 * c-common.c (c_common_truthvalue_conversion): Don't distribute
6439 into COND_EXPR in C++.
6440
7bad794a
JJ
64412016-10-08 Jakub Jelinek <jakub@redhat.com>
6442
6443 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
6444 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
6445 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
6446
be845b04
JJ
64472016-10-07 Jakub Jelinek <jakub@redhat.com>
6448
6449 Implement LWG2296 helper intrinsic
6450 * c-common.h (enum rid): Add RID_ADDRESSOF.
6451 * c-common.c (c_common_reswords): Add __builtin_addressof.
6452
c09c4992
BE
64532016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
6454
6455 PR c++/77700
6456 * c-common.c (c_common_truthvalue_conversion): Warn also for
6457 suspicious enum values in boolean context.
6458
342cfb3e
JJ
64592016-10-06 Jakub Jelinek <jakub@redhat.com>
6460
6461 Implement P0258R2 - helper for C++17
6462 std::has_unique_object_representations trait
6463 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
6464 * c-common.c (c_common_reswords): Add
6465 __has_unique_object_representations.
6466
2e69f143
JJ
64672016-10-05 Jakub Jelinek <jakub@redhat.com>
6468
6469 PR sanitizer/66343
6470 * c-ubsan.c (ubsan_instrument_return): Don't call
6471 initialize_sanitizer_builtins here.
6472
700fff34
BE
64732016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
6474
6475 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
6476 conditional expression in boolean context when only one arm is
6477 non-boolean.
6478
9563bfcd
JJ
64792016-10-05 Jakub Jelinek <jakub@redhat.com>
6480
04a32443
JJ
6481 PR sanitizer/77823
6482 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
6483 is not integral.
6484
9563bfcd
JJ
6485 * c-common.c (c_common_reswords): Update comment for C++11.
6486
f1644724
JM
64872016-10-04 Jason Merrill <jason@redhat.com>
6488
6489 * c-common.c (make_tree_vector_from_ctor): New.
6490 * c-common.h: Declare it.
6491
5a79befb
JJ
64922016-10-04 Jakub Jelinek <jakub@redhat.com>
6493
6494 * c-cppbuiltin.c (c_cpp_builtins): Don't define
6495 __LIBGCC_JCR_SECTION_NAME__.
6496
1633d3b9
BE
64972016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
6498
6499 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
6500 left shift in boolean context.
6501
a2c6e7f2
JJ
65022016-09-29 Jakub Jelinek <jakub@redhat.com>
6503
6504 Implement P0001R1 - C++17 removal of register storage class specifier
6505 * c.opt (Wregister): New warning.
6506 * c-opts.c (c_common_post_options): Enable -Wregister by
6507 default for C++17.
6508
75304c87
JG
65092016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
6510
6511 * c-opts.c (c_common_post_options): Remove special case for
6512 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
6513 in C++.
6514
bbfac6da
JJ
65152016-09-27 Jakub Jelinek <jakub@redhat.com>
6516
6e39060a
JJ
6517 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
6518 -std=c++1z.
6519
bbfac6da
JJ
6520 * c-ada-spec.c (print_ada_declaration): Remove break after return.
6521
e73cf9a2
TP
65222016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
6523
6524 * c-common.c: Include memmodel.h.
6525
c6147dc4
MP
65262016-09-26 Marek Polacek <polacek@redhat.com>
6527
6528 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
6529
81fea426
MP
65302016-09-26 Marek Polacek <polacek@redhat.com>
6531
6532 PR c/7652
6533 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
6534 (handle_fallthrough_attribute): New function.
6535 (attribute_fallthrough_p): New function.
6536 * c-common.h (attribute_fallthrough_p): Declare.
6537
9a2300e9
MP
65382016-09-24 Marek Polacek <polacek@redhat.com>
6539
6540 PR c/77490
6541 * c.opt (Wbool-operation): New.
6542
a09e9e35
BE
65432016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
6544
6545 * c-common.c (c_common_truthvalue_conversion): Inhibit
6546 Wint-in-bool-context warning with from_macro_definition_at.
6547 Mention the expression will always evaluate to true.
6548
d43b4ccc
MS
65492016-09-21 Martin Sebor <msebor@redhat.com>
6550
6551 PR bootstrap/77676
6552 * c.opt (fprintf-return-value): Temporarily initialize to zero
6553 to unblock bootstrap failures.
6554
2e1c20b1
JJ
65552016-09-21 Jakub Jelinek <jakub@redhat.com>
6556
6557 PR c++/77651
6558 * c.opt (Waligned-new=): Add RejectNegative.
6559 (faligned-new=): Likewise. Spelling fix - change
6560 aligned_new_threshhold to aligned_new_threshold.
6561 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
6562 to aligned_new_threshold.
6563
88d0c3f0
MS
65642016-09-20 Martin Sebor <msebor@redhat.com>
6565
6566 PR middle-end/49905
6567 * c.opt: Add -Wformat-length and -fprintf-return-value.
6568
144a96e4
BE
65692016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
6570
6571 PR c++/77434
6572 * c.opt (Wint-in-bool-context): New warning.
6573 * c-common.c (c_common_truthvalue_conversion): Warn on integer
6574 constants in boolean context.
6575
63012d9a
JM
65762016-09-19 Joseph Myers <joseph@codesourcery.com>
6577
6578 * c-common.c (max_align_t_align): Also consider alignment of
6579 float128_type_node.
6580
931388ce
JM
65812016-09-15 Jason Merrill <jason@redhat.com>
6582
6583 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
6584 DECL_EXTERNAL.
6585
38711381
JM
65862016-09-14 Jason Merrill <jason@redhat.com>
6587
6588 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6589 limit FIELD_DECL, either.
6590
e51fbec3
MP
65912016-09-14 Marek Polacek <polacek@redhat.com>
6592
6593 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
6594 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
6595 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
6596
254830ba
DM
65972016-09-13 David Malcolm <dmalcolm@redhat.com>
6598
6599 * c-common.c (warn_logical_not_parentheses): Replace
6600 rich_location::add_fixit_insert calls with add_fixit_insert_before
6601 and add_fixit_insert_after, eliminating the "next_loc" calculation.
6602
42763690
JM
66032016-09-13 Jason Merrill <jason@redhat.com>
6604 Tom de Vries <tom@codesourcery.com>
6605
6606 PR c++/77427
6607 * c-common.c (set_underlying_type): Don't treat array as builtin type.
6608
9453eee9
JM
66092016-09-13 Jason Merrill <jason@redhat.com>
6610
6611 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
6612 limit types at all.
6613
e96809e3
JM
66142016-09-12 Jason Merrill <jason@redhat.com>
6615
6616 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
6617 bit/byte confusion, allow large alignment for types.
6618
54dcdb88
BE
66192016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
6620
6621 PR c++/77496
6622 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
6623
d1463eb9
DM
66242016-09-12 David Malcolm <dmalcolm@redhat.com>
6625
6626 PR c/72858
6627 * c-format.c (argument_parser::check_argument_type): Add params
6628 "type_start" and "conversion_char". Use the former to generate
6629 offset_to_type_start and pass it and conversion_char to
6630 check_format_types.
6631 (check_format_info_main): Capture the start of the type
6632 information as "type_start", and pass it an format_char
6633 to arg_parser.check_argument_type.
6634 (check_format_types): Provide an example in the leading comment.
6635 Add params "offset_to_type_start" and "conversion_char"; pass
6636 them to format_type_warning calls.
6637 (test_get_modifier_for_format_len): Likewise.
6638 (matching_type_p): New function.
6639 (get_format_for_type): Add param "conversion_char" and move
6640 implementation into...
6641 (get_format_for_type_1): ...new function, called twice.
6642 Use new function matching_type_p rather than checking for
6643 TYPE_CANONICAL equality.
6644 (get_corrected_substring): New function.
6645 (format_type_warning): Provide an example in the leading comment.
6646 Add params "offset_to_type_start" and "conversion_char". Replace
6647 call to get_format_for_type with call to get_corrected_substring
6648 and move rejection of hints for widths/precisions there.
6649 (assert_format_for_type_streq): Add param "conversion_char".
6650 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
6651 (test_get_format_for_type_printf): Add conversion chars to the
6652 tests, adding coverage for various combinations of integer
6653 vs double conversions, and for preserving octal and hexadecimal
6654 conversions.
6655 (test_get_format_for_type_scanf): Add conversion chars to the
6656 tests.
6657
5b28efbb
TV
66582016-09-10 Tom de Vries <tom@codesourcery.com>
6659
6660 PR C/71602
6661 * c-common.c (build_va_arg): Handle more strict
6662 targetm.canonical_va_list_type. Replace first argument type error with
6663 assert.
6664
3f0177e7
MS
66652016-09-09 Martin Sebor <msebor@redhat.com>
6666
6667 PR c/77520
6668 PR c/77521
6669 * c-format.c (argument_parser::find_format_char_info): Use %qc
6670 format directive unconditionally.
6671
af63ba4b
JM
66722016-09-09 Jason Merrill <jason@redhat.com>
6673
6674 Implement C++17 new of over-aligned types.
6675 * c.opt: Add -faligned-new and -Waligned-new.
6676 * c-common.c (max_align_t_align): Split out from...
6677 (cxx_fundamental_alignment_p): ...here.
6678 * c-common.h: Declare it.
6679 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
6680
c65248cb
JM
66812016-09-09 Joseph Myers <joseph@codesourcery.com>
6682
6683 * c-cppbuiltin.c (builtin_define_type_width): New function.
6684 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
6685 macros.
6686
e5106e27
DM
66872016-09-07 David Malcolm <dmalcolm@redhat.com>
6688
6689 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
6690 a POINTER_TYPE.
6691 (substring_loc::get_location): Move to substring-locations.c,
6692 keeping implementation as...
6693 (c_get_substring_location): New function, from the above, reworked
6694 to use accessors rather than member lookup.
6695 * c-common.h (class substring_loc): Move to substring-locations.h,
6696 replacing with a forward decl.
6697 (c_get_substring_location): New decl.
6698 * c-format.c: Include "substring-locations.h".
6699 (format_warning_va): Move to substring-locations.c.
6700 (format_warning_at_substring): Likewise.
6701
ab20d992 67022016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
6703
6704 PR c/77336
6705 * c-format.c (check_function_format): Avoid issuing warnings for
6706 functions unless they call format functions with non-constant
6707 format strings.
6708
b772a565
RB
67092016-09-06 Richard Biener <rguenther@suse.de>
6710
6711 PR c/77450
6712 * c-common.c (c_common_mark_addressable_vec): Handle
6713 COMPOUND_LITERAL_EXPR.
6714
25ff5dd3
MP
67152016-09-05 Marek Polacek <polacek@redhat.com>
6716
6717 PR c/77423
6718 * c-common.c (bool_promoted_to_int_p): New function.
6719 (expr_has_boolean_operands_p): New function.
6720 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
6721 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
6722
21234eb5
TV
67232016-09-04 Tom de Vries <tom@codesourcery.com>
6724
6725 revert:
6726 2016-08-29 Tom de Vries <tom@codesourcery.com>
6727
6728 * c-common.c (build_va_arg): Replace first argument type error
6729 with assert.
6730
9dc5773f
JJ
67312016-09-02 Jakub Jelinek <jakub@redhat.com>
6732
6733 PR c/65467
6734 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
6735 (c_finish_omp_for): Reject _Atomic qualified iterators.
6736
67372016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
6738
6739 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
6740 size to guarantee it fits the output of the formatted function
6741 regardless of its arguments.
6742
295844f6
MP
67432016-09-01 Marek Polacek <polacek@redhat.com>
6744
6745 PR c/7652
6746 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
6747 FALLTHRU comments.
6748
3d06b6f2
MP
67492016-08-29 Marek Polacek <polacek@redhat.com>
6750
6751 PR c/77292
6752 * c-common.c (warn_logical_not_parentheses): Don't warn for
6753 a comparison or a logical operator.
6754
34cedad5
TV
67552016-08-29 Tom de Vries <tom@codesourcery.com>
6756
6757 * c-common.c (build_va_arg): Fix type comparison assert.
6758
f162d717
TV
67592016-08-29 Tom de Vries <tom@codesourcery.com>
6760
6761 * c-common.c (build_va_arg): Replace first argument type error
6762 with assert.
6763
ba9bbd6f
TV
67642016-08-29 Tom de Vries <tom@codesourcery.com>
6765
6766 PR c/77398
6767 * c-common.c (build_va_arg): Add first argument error. Build va_arg
6768 with error_mark_node as va_list instead of with illegal va_list.
6769
ebef225f
MP
67702016-08-25 Marek Polacek <polacek@redhat.com>
6771 David Malcolm <dmalcolm@redhat.com>
6772
6773 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
6774 * c-common.h (warn_logical_not_parentheses): Update declaration.
6775
b00e6e75
MP
67762016-08-22 Marek Polacek <polacek@redhat.com>
6777
6778 PR c++/77321
6779 * c-common.c (warn_for_memset): Check type for null.
6780
6dc198e3
JM
67812016-08-22 Joseph Myers <joseph@codesourcery.com>
6782
14ec014e 6783 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
6784 _FloatNx types for suffixes for built-in functions.
6785
c65699ef
JM
67862016-08-19 Joseph Myers <joseph@codesourcery.com>
6787
6788 PR c/32187
6789 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
6790 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
6791 (RID_FLOAT128X): New enum rid values.
6792 (CASE_RID_FLOATN_NX): New macro.
6793 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
6794 keywords.
6795 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
6796 corresponding complex types.
6797 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
6798 _FloatNx and corresponding complex types.
6799 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
6800 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
6801 and _FloatNx types for the widest type for determining
6802 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
6803 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
6804 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
6805 and _FloatNx types.
6806 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
6807 constants.
6808 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
6809 _FloatNx types.
6810
cc015f3a
DM
68112016-08-18 David Malcolm <dmalcolm@redhat.com>
6812
6813 * c-opts.c (c_diagnostic_finalizer): Update for change to
6814 diagnostic_show_locus.
6815
cb18fd07
DM
68162016-08-18 David Malcolm <dmalcolm@redhat.com>
6817
6818 * c-common.c: Include "spellcheck.h".
6819 (cb_get_suggestion): New function.
6820 * c-common.h (cb_get_suggestion): New decl.
6821 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
6822 cb_get_suggestion.
6823
a76989dc
MP
68242016-08-18 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/71514
6827 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
6828 and pointer-to-VLA.
6829
65e736c0
DM
68302016-08-16 David Malcolm <dmalcolm@redhat.com>
6831
6832 PR c/72857
6833 * c-common.c (substring_loc::get_range): Rename to...
6834 (substring_loc::get_location): ...this, converting param from a
6835 source_range * to a location_t *. Call
6836 get_source_location_for_substring rather than
6837 get_source_range_for_substring, and pass in m_caret_idx.
6838 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
6839 (substring_loc::get_range): Replace with...
6840 (substring_loc::get_location): ...this.
6841 (substring_loc::set_caret_index): New method.
6842 (substring_loc): Add field m_caret_idx.
6843 * c-format.c (format_warning_va): Update for above changes.
6844 Rename local "substring_loc" to "fmt_substring_loc" to avoid
6845 clashing with type name.
6846 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
6847 (check_argument_type): Likewise.
6848 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
6849 Use a copy when emitting warnings, setting the caret index from TYPE.
6850
7e1dde14 68512016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6852 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
6853
6854 * c-ada-spec.c (dump_number): New function.
6855 (handle_escape_character): Likewise.
6856 (print_ada_macros): Add handling of constant integers and strings.
6857
191816a3
MP
68582016-08-12 Marek Polacek <polacek@redhat.com>
6859
6860 PR c/7652
6861 * c-common.c (scalar_to_vector): Adjust fall through comment.
6862 * c-opts.c (c_common_handle_option): Likewise.
6863 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
6864 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
6865 fall through comment.
6866 * cilk.c (extract_free_variables): Add FALLTHRU.
6867
452df4a4
JM
68682016-08-10 Jason Merrill <jason@redhat.com>
6869
6870 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
6871
f3365c12
JM
68722016-08-09 Jason Merrill <jason@redhat.com>
6873
6874 * c-common.c (c_common_attribute_table): vector_size affects type
6875 identity.
6876
f0bc3323
MP
68772016-08-09 Marek Polacek <polacek@redhat.com>
6878
6879 PR c/7652
6880 * c-ada-spec.c (dump_generic_ada_node): Add return.
6881
98e5a19a
JM
68822016-08-09 Jason Merrill <jason@redhat.com>
6883
6884 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
6885 C++17 constexpr lambdas.
6886
895aa8e1
DM
68872016-08-08 David Malcolm <dmalcolm@redhat.com>
6888
6889 PR c/64955
6890 * c-common.h (selftest::c_format_c_tests): New declaration.
6891 (selftest::run_c_tests): New declaration.
6892 * c-format.c: Include "selftest.h.
6893 (format_warning_va): Add param "corrected_substring" and use
6894 it to add a replacement fix-it hint.
6895 (format_warning_at_substring): Likewise.
6896 (format_warning_at_char): Update for new param of
6897 format_warning_va.
6898 (argument_parser::check_argument_type): Pass "fki" to
6899 check_format_types.
6900 (check_format_types): Add param "fki" and pass it to
6901 format_type_warning.
6902 (deref_n_times): New function.
6903 (get_modifier_for_format_len): New function.
6904 (selftest::test_get_modifier_for_format_len): New function.
6905 (get_format_for_type): New function.
6906 (format_type_warning): Add param "fki" and use it to attempt
6907 to provide hints for argument types when calling
6908 format_warning_at_substring.
6909 (selftest::get_info): New function.
6910 (selftest::assert_format_for_type_streq): New function.
6911 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
6912 (selftest::test_get_format_for_type_printf): New function.
6913 (selftest::test_get_format_for_type_scanf): New function.
6914 (selftest::c_format_c_tests): New function.
6915
e52ed3fe
DM
69162016-08-08 David Malcolm <dmalcolm@redhat.com>
6917
6918 PR c/52952
6919 * c-format.c: Include "diagnostic.h".
6920 (location_column_from_byte_offset): Delete.
6921 (location_from_offset): Delete.
6922 (format_warning_va): New function.
6923 (format_warning_at_substring): New function.
6924 (format_warning_at_char): New function.
6925 (check_format_arg): Capture location of format_tree and pass to
6926 check_format_info_main.
6927 (argument_parser): Add fields "start_of_this_format" and
6928 "format_string_cst".
6929 (flag_chars_t::validate): Add param "format_string_cst". Convert
6930 warning_at call using location_from_offset to call to
6931 format_warning_at_char.
6932 (argument_parser::argument_parser): Add param "format_string_cst_"
6933 and use use it to initialize field "format_string_cst".
6934 Initialize new field "start_of_this_format".
6935 (argument_parser::read_format_flags): Convert warning_at call
6936 using location_from_offset to a call to format_warning_at_char.
6937 (argument_parser::read_any_format_left_precision): Likewise.
6938 (argument_parser::read_any_format_precision): Likewise.
6939 (argument_parser::read_any_other_modifier): Likewise.
6940 (argument_parser::find_format_char_info): Likewise, in three places.
6941 (argument_parser::parse_any_scan_set): Likewise, in one place.
6942 (argument_parser::handle_conversions): Likewise, in two places.
6943 (argument_parser::check_argument_type): Add param "fmt_param_loc"
6944 and use it to make a substring_loc. Pass the latter to
6945 check_format_types.
6946 (check_format_info_main): Add params "fmt_param_loc" and
6947 "format_string_cst". Convert warning_at calls using
6948 location_from_offset to calls to format_warning_at_char. Pass the
6949 new params to the arg_parser ctor. Pass "format_string_cst" to
6950 flag_chars.validate. Pass "fmt_param_loc" to
6951 arg_parser.check_argument_type.
6952 (check_format_types): Convert first param from a location_t
6953 to a const substring_loc & and rename to "fmt_loc". Attempt
6954 to extract the range of the relevant parameter and pass it
6955 to format_type_warning.
6956 (format_type_warning): Convert first param from a location_t
6957 to a const substring_loc & and rename to "fmt_loc". Add
6958 params "param_range" and "type". Replace calls to warning_at
6959 with calls to format_warning_at_substring.
6960
1c4d457e
DM
69612016-08-08 David Malcolm <dmalcolm@redhat.com>
6962
6963 * c-format.c (class flag_chars_t): New class.
6964 (struct length_modifier): New struct.
6965 (class argument_parser): New class.
6966 (flag_chars_t::flag_chars_t): New ctor.
6967 (flag_chars_t::has_char_p): New method.
6968 (flag_chars_t::add_char): New method.
6969 (flag_chars_t::validate): New method.
6970 (flag_chars_t::get_alloc_flag): New method.
6971 (flag_chars_t::assignment_suppression_p): New method.
6972 (argument_parser::argument_parser): New ctor.
6973 (argument_parser::read_any_dollar): New method.
6974 (argument_parser::read_format_flags): New method.
6975 (argument_parser::read_any_format_width): New method.
6976 (argument_parser::read_any_format_left_precision): New method.
6977 (argument_parser::read_any_format_precision): New method.
6978 (argument_parser::handle_alloc_chars): New method.
6979 (argument_parser::read_any_length_modifier): New method.
6980 (argument_parser::read_any_other_modifier): New method.
6981 (argument_parser::find_format_char_info): New method.
6982 (argument_parser::validate_flag_pairs): New method.
6983 (argument_parser::give_y2k_warnings): New method.
6984 (argument_parser::parse_any_scan_set): New method.
6985 (argument_parser::handle_conversions): New method.
6986 (argument_parser::check_argument_type): New method.
6987 (check_format_info_main): Introduce classes argument_parser
6988 and flag_chars_t, moving the code within the loop into methods
6989 of these classes. Make various locals "const".
6990
88fa5555
DM
69912016-08-05 David Malcolm <dmalcolm@redhat.com>
6992
6993 * c-common.c: Include "substring-locations.h".
6994 (get_cpp_ttype_from_string_type): New function.
6995 (g_string_concat_db): New global.
6996 (substring_loc::get_range): New method.
6997 * c-common.h (g_string_concat_db): New declaration.
6998 (class substring_loc): New class.
6999 * c-lex.c (lex_string): When concatenating strings, capture the
7000 locations of all tokens using a new obstack, and record the
7001 concatenation locations within g_string_concat_db.
7002 * c-opts.c (c_common_init_options): Construct g_string_concat_db
7003 on the ggc-heap.
7004
78169471
MP
70052016-07-29 Marek Polacek <polacek@redhat.com>
7006
638fc14f
MP
7007 PR c/71926
7008 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
7009 parentheses warning.
7010
78169471
MP
7011 PR c/71574
7012 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
7013
1225d6b1
ML
70142016-07-28 Martin Liska <mliska@suse.cz>
7015
7016 PR gcov-profile/68025
7017 * c-common.c (handle_no_profile_instrument_function_attribute):
7018
ec1e2a40
BE
70192016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7020
7021 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
7022 BITS_PER_UNIT_LOG.
7023
5ec2cd9f
JM
70242016-07-25 Jason Merrill <jason@redhat.com>
7025
7026 PR c++/65970
7027 * c.opt (fconstexpr-loop-limit): New.
7028
9dc5773f 70292016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
7030
7031 PR c++/71675
7032 * c-common.c (resolve_overloaded_builtin): Avoid converting
7033 __atomic_compare_exchange_n return type to that of what its
7034 first argument points to.
7035
e3fe09c1
UB
70362016-07-22 Uros Bizjak <ubizjak@gmail.com>
7037
7038 * c-common.c: Use HOST_WIDE_INT_M1U instead of
7039 ~(unsigned HOST_WIDE_INT) 0.
7040
bc91c436
ML
70412016-07-22 Martin Liska <mliska@suse.cz>
7042
7043 PR gcov-profile/69028
7044 PR gcov-profile/62047
7045 * cilk.c (create_cilk_helper_decl): Set location of a new decl
7046 to the current_function_decl.
7047
451dcc66
JM
70482016-07-21 Jason Merrill <jason@redhat.com>
7049
7050 PR c++/65168
7051 * c-common.c (c_common_truthvalue_conversion): Check
7052 c_inhibit_evaluation_warnings for warning about address of
7053 reference.
7054
de6a69ee
DM
70552016-07-20 David Malcolm <dmalcolm@redhat.com>
7056
7057 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
7058 const char *.
7059
d022c55a
JM
70602016-07-15 Jason Merrill <jason@redhat.com>
7061
7062 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
7063
ddbbcb19
JJ
70642016-07-15 Jakub Jelinek <jakub@redhat.com>
7065
7066 PR c/71858
7067 * c-common.h (enum lookup_name_fuzzy_kind): Add
7068 FUZZY_LOOKUP_FUNCTION_NAME.
7069
d0cf395a
JM
70702016-07-08 Jason Merrill <jason@redhat.com>
7071
7072 P0145: Refining Expression Order for C++.
7073 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
7074 * c-opts.c: Adjust.
7075
98d44e93
MT
70762016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
7077
7078 PR c++/71214
7079 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
7080
f9d8d994
TS
70812016-06-29 Thomas Schwinge <thomas@codesourcery.com>
7082
7083 * c-pragma.h (enum pragma_kind): Rename
7084 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
7085 users.
7086
4aa83879
RB
70872016-06-29 Richard Biener <rguenther@suse.de>
7088
7089 PR middle-end/71002
7090 * c-common.c (c_common_get_alias_set): Remove union type punning case.
7091
a25bd9e6
JM
70922016-06-24 Jason Merrill <jason@redhat.com>
7093
7094 P0145R2: Refining Expression Order for C++.
7095 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
7096 MODIFY_EXPR.
7097
a86451b9
JJ
70982016-06-24 Jakub Jelinek <jakub@redhat.com>
7099
7100 * c-common.c (check_builtin_function_arguments): Require last
7101 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
7102 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
7103 if the last argument is pointer to enumerated or boolean type.
7104
1a4f11c8
DM
71052016-06-22 David Malcolm <dmalcolm@redhat.com>
7106
7107 PR c/70339
7108 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
7109 (lookup_name_fuzzy): New prototype.
7110
fe55692c
JDA
71112016-06-21 John David Anglin <danglin@gcc.gnu.org>
7112
7113 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
7114
4eb24e01
JM
71152016-06-14 Jason Merrill <jason@redhat.com>
7116
7117 P0145R2: Refining Expression Order for C++.
7118 * c.opt (fargs-in-order): New.
7119 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
7120
ef7cf206
JJ
71212016-06-13 Jakub Jelinek <jakub@redhat.com>
7122
0dda258b
JJ
7123 PR sanitizer/71498
7124 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
7125 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
7126
ef7cf206
JJ
7127 PR preprocessor/71183
7128 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
7129 to cb_get_source_date_epoch.
7130
50b15873
JJ
71312016-06-10 Jakub Jelinek <jakub@redhat.com>
7132
7133 PR c/68657
7134 * c.opt (Wpsabi): Add Warning flag.
7135
4d926e34
MS
71362016-06-10 Martin Sebor <msebor@redhat.com>
7137
7138 PR c/71392
14ec014e 7139 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
7140 the nonnull attribute in type-generic builtins.
7141
e01b4e16
MS
71422016-06-09 Martin Sebor <msebor@redhat.com>
7143
7144 PR c/70883
7145 * c-common.c (builtin_function_validate_nargs): Make text of error
7146 message consistent with others like it.
7147
44a845ca
MS
71482016-06-08 Martin Sebor <msebor@redhat.com>
7149 Jakub Jelinek <jakub@redhat.com>
7150
7151 PR c++/70507
7152 PR c/68120
7153 * c-common.c (check_builtin_function_arguments): Handle
7154 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
7155
a80a7051
RB
71562016-06-08 Richard Biener <rguenther@suse.de>
7157
7158 * c-common.c (parse_optimize_options): Improve diagnostic messages.
7159
bfd67b47
RB
71602016-06-07 Richard Biener <rguenther@suse.de>
7161
7162 PR c/61564
7163 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
7164 options and warn about others.
7165
15c98b2e
ES
71662016-06-01 Eduard Sanou <dhole@openmailbox.org>
7167
7168 * c-common.c (get_source_date_epoch): Rename to
7169 cb_get_source_date_epoch.
7170 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
7171 message when the parsing fails. Use error_at instead of fatal_error.
7172 * c-common.h (get_source_date_epoch): Rename to
7173 cb_get_source_date_epoch.
7174 * c-common.h (cb_get_source_date_epoch): Prototype.
7175 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
7176 * c-common.h (c_omp_region_type): Remove trailing comma.
7177 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
7178 * c-lex.c (c_lex_with_flags): Remove initialization of
7179 pfile->source_date_epoch.
7180
00631022
JJ
71812016-05-30 Jakub Jelinek <jakub@redhat.com>
7182
7183 PR c++/71349
7184 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
7185 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
7186 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
7187 instead of C_OMP_CLAUSE_SPLIT_FOR.
7188
f17a223d
RB
71892016-05-24 Richard Biener <rguenther@suse.de>
7190
7191 PR middle-end/70434
7192 PR c/69504
7193 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
7194 (convert_vector_to_array_for_subscript): ... this.
7195 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
7196 VIEW_CONVERT_EXPR to an array type. Rename to ...
7197 (convert_vector_to_array_for_subscript): ... this.
7198
4f2e1536
MP
71992016-05-12 Marek Polacek <polacek@redhat.com>
7200
7201 PR c/70756
7202 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
7203 size_in_bytes and pass LOC to it.
7204
d6e83a8d
MM
72052016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
7206
7207 PR c/43651
7208 * c.opt (Wduplicate-decl-specifier): New option.
7209
5c3a10fb
MP
72102016-05-11 Marek Polacek <polacek@redhat.com>
7211
7212 PR c++/71024
7213 * c-common.c (diagnose_mismatched_attributes): New function.
7214 * c-common.h (diagnose_mismatched_attributes): Declare.
7215
deef7113
MP
72162016-05-04 Marek Polacek <polacek@redhat.com>
7217
7218 * c.opt (Wdangling-else): New option.
7219
79ce98bc
MP
72202016-05-03 Marek Polacek <polacek@redhat.com>
7221
7222 PR c/70859
7223 * c-common.c (builtin_function_validate_nargs): Add location
7224 parameter. Use it.
7225 (check_builtin_function_arguments): Add location and arguments
7226 parameters. Use them.
7227 * c-common.h (check_builtin_function_arguments): Update declaration.
7228
381cdae4
RB
72292016-05-03 Richard Biener <rguenther@suse.de>
7230
7231 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
7232 allow call args to gimplify to SSA names.
7233
1d793c34
MP
72342016-05-03 Marek Polacek <polacek@redhat.com>
7235
7236 * c-common.h (enum c_omp_region_type): Remove stray comma.
7237
77886428
CP
72382016-05-02 Cesar Philippidis <cesar@codesourcery.com>
7239
7240 * c-common.h (enum c_omp_region_type): Define.
7241
697e0b28
RS
72422016-05-02 Richard Sandiford <richard.sandiford@arm.com>
7243
7244 * c-common.c (shorten_compare): Use wi::to_wide.
7245
e7ff0319
CP
72462016-04-29 Cesar Philippidis <cesar@codesourcery.com>
7247
7248 PR middle-end/70626
7249 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
7250 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
7251 reduction clauses in acc parallel loops.
7252
2fff3db8
MP
72532016-04-29 Marek Polacek <polacek@redhat.com>
7254
7255 PR c/70852
7256 * c-common.c (warn_for_memset): Check domain before accessing it.
7257
509063eb
DV
72582016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
7259
7260 PR/69089
7261 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
7262 "aligned" attribute.
7263
b632761d
JM
72642016-04-28 Jason Merrill <jason@redhat.com>
7265
7266 * c-lex.c (c_common_has_attribute): Handle nodiscard.
7267
174f6622
ES
72682016-04-28 Eduard Sanou <dhole@openmailbox.org>
7269 Matthias Klose <doko@debian.org>
7270
7271 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 7272 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
7273 handling.
7274 * c-common.h (get_source_date_epoch): Prototype.
7275 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
7276
6bc2bb18
RB
72772015-04-27 Ryan Burn <contact@rnburn.com>
7278
7279 PR c++/69024
7280 PR c++/68997
7281 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
7282 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
7283 external linkage.
7284 (cilk_detect_and_unwrap): Corresponding changes.
7285 (extract_free_variables): Don't extract free variables from
7286 AGGR_INIT_EXPR slot.
7287 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
7288 (cilk_recognize_spawn): Likewise.
7289
c1e1f433
BS
72902016-04-27 Bernd Schmidt <bschmidt@redhat.com>
7291
7292 * c.opt (Wmemset-elt-size): New option.
7293 * c-common.c (warn_for_memset): New function.
7294 * c-common.h (warn_for_memset): Declare.
7295
d067e05f
JM
72962016-04-25 Jason Merrill <jason@redhat.com>
7297
7298 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
7299 No longer static.
7300 * c-common.h: Declare it.
7301 * c-lex.c (c_common_has_attribute): Add maybe_unused.
7302
9aa36ae5
JM
73032016-04-22 Jason Merrill <jason@redhat.com>
7304
7305 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
7306
477d4906
IV
73072016-04-20 Ilya Verbin <ilya.verbin@intel.com>
7308
7309 PR c++/69363
7310 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
7311 * c-common.h (c_finish_cilk_clauses): Remove declaration.
7312
fe37c7af
MM
73132016-04-18 Michael Matz <matz@suse.de>
7314
7315 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
7316 and SET_DECL_ALIGN.
7317
23f2660f
EB
73182016-04-17 Eric Botcazou <ebotcazou@adacore.com>
7319
7320 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
7321 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
7322 to incomplete types.
7323 (dump_nested_type): Remove redundant tests and tidy up.
7324 (print_ada_declaration): Also set TREE_VISITED on the declaration of
7325 a type which is the typedef of an original type.
7326
1e77281b
MP
73272016-04-15 Marek Polacek <polacek@redhat.com>
7328
7329 PR c/70651
7330 * c-common.c (build_va_arg): Change two asserts into errors and return
7331 error_mark_node.
7332
b3a77f21
MP
73332016-04-13 Marek Polacek <polacek@redhat.com>
7334
7335 PR c++/70639
7336 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
7337 for switch statements, too.
7338
322b8466
JM
73392016-03-28 Jason Merrill <jason@redhat.com>
7340
7341 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
7342
fbdb6baf
MP
73432016-03-23 Marek Polacek <polacek@redhat.com>
7344
7345 PR c++/69884
7346 * c.opt (Wignored-attributes): New option.
7347
5c240f4d
DM
73482016-03-22 David Malcolm <dmalcolm@redhat.com>
7349
7350 PR c/69993
7351 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
7352 diagnostic text, reversing the order of the warning and note so
7353 that they appear in source order.
7354
14ba7b28
MP
73552016-03-17 Marek Polacek <polacek@redhat.com>
7356
7357 PR c/69407
7358 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
7359 operations.
7360
08a1cadc
JM
73612016-03-14 Jason Merrill <jason@redhat.com>
7362
2aaeea19
JM
7363 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
7364
08a1cadc
JM
7365 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
7366
c06d25bb
RB
73672016-03-09 Richard Biener <rguenther@suse.de>
7368
7369 PR c/70143
7370 * c-common.c (strict_aliasing_warning): Add back
7371 alias_sets_conflict_p check.
7372
80aac5c8
JM
73732016-03-08 Jason Merrill <jason@redhat.com>
7374
7375 * c-opts.c (set_std_cxx1z): Don't enable concepts.
7376
64b23c13
DM
73772016-03-04 David Malcolm <dmalcolm@redhat.com>
7378
7379 PR c/68187
7380 * c-indentation.c (get_visual_column): Move code to determine next
7381 tab stop to...
7382 (next_tab_stop): ...this new function.
7383 (line_contains_hash_if): Delete function.
7384 (detect_preprocessor_logic): Delete function.
7385 (get_first_nws_vis_column): New function.
7386 (detect_intervening_unindent): New function.
7387 (should_warn_for_misleading_indentation): Replace call to
7388 detect_preprocessor_logic with a call to
7389 detect_intervening_unindent.
7390
729526f5
DM
73912016-03-04 David Malcolm <dmalcolm@redhat.com>
7392
7393 PR c/68187
7394 * c-indentation.c (should_warn_for_misleading_indentation): When
7395 suppressing warnings about cases where the guard and body are on
7396 the same column, only use the first non-whitespace column in place
7397 of the guard token column when dealing with "else" clauses.
7398 When rejecting aligned BODY and NEXT, loosen the requirement
7399 from equality with the first non-whitespace of guard to simply
7400 that they not be indented relative to it.
7401
e9a35493
RB
74022016-03-04 Richard Biener <rguenther@suse.de>
7403
7404 PR c++/70054
7405 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
7406 instead of alias_sets_conflict_p.
7407
1be56bc5
MP
74082016-03-01 Marek Polacek <polacek@redhat.com>
7409
7410 PR c++/69795
7411 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
7412 any DECL.
7413
35886f0b
MS
74142016-02-22 Martin Sebor <msebor@redhat.com>
7415
7416 PR middle-end/69780
7417 * c-common.c (check_builtin_function_arguments): Validate and
7418 reject invalid arguments to __builtin_alloca_with_align.
7419
4246c8da
MW
74202016-02-20 Mark Wielaard <mjw@redhat.com>
7421
7422 PR c/28901
7423 * c.opt (Wunused-const-variable): Turn into Alias for...
7424 (Wunused-const-variable=): New option.
7425
268be88c
BE
74262016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
7427
7428 PR c++/69865
7429 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
7430 here...
7431 (c_common_init_options): ...to here.
7432 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
7433
871b3f47
JJ
74342016-02-19 Jakub Jelinek <jakub@redhat.com>
7435
7436 PR c++/69826
7437 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
7438 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
7439 flag_preprocess_only.
7440
bf14eba2
JJ
74412016-02-16 Jakub Jelinek <jakub@redhat.com>
7442
7443 PR c/69835
7444 * c.opt (Wnonnull-compare): Enable for -Wall.
7445
ba6b3795
JJ
74462016-02-15 Jakub Jelinek <jakub@redhat.com>
7447
7448 PR c++/69797
7449 * c-common.c (sync_resolve_size): Diagnose too few arguments
7450 even when params is non-NULL empty vector.
7451
a011cd92
BS
74522016-02-08 Bernd Schmidt <bschmidt@redhat.com>
7453
7454 PR target/60410
7455 * c.opt (fshort-double): Remove.
7456
46cb9332
MS
74572016-02-05 Martin Sebor <msebor@redhat.com>
7458
7459 PR c++/69662
7460 * c.opt (Warning options): Update -Wplacement-new to take
7461 an optional argument.
7462
e1b81f2b
JJ
74632016-02-01 Jakub Jelinek <jakub@redhat.com>
7464
7465 PR preprocessor/69543
7466 PR c/69558
7467 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
7468 instead of loc to control_warning_option.
7469
b6adbb9f
NS
74702016-02-01 Nathan Sidwell <nathan@codesourcery.com>
7471
7472 * c.opt (fopenacc-dim=): New option.
7473
5d70666e
RB
74742016-01-27 Ryan Burn <contact@rnburn.com>
7475
7476 PR cilkplus/69267
7477 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
7478 gimplify_arg. Removed superfluous post_p argument.
7479 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
7480 superfluous post_p argument.
7481 * c-gimplify.c (c_gimplify_expr): Likewise.
7482
01e1dea3
DM
74832016-01-26 David Malcolm <dmalcolm@redhat.com>
7484
7485 PR other/69006
7486 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
7487 pp_newline_and_flush with pp_flush.
7488
9f04a53e
MS
74892016-01-20 Martin Sebor <msebor@redhat.com>
7490
7491 PR c/69405
7492 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
7493 an incompatible argument when the argument isn't a valid tree node.
7494
7f26f7df
JM
74952016-01-18 Jason Merrill <jason@redhat.com>
7496
7497 PR c++/68767
7498 * c-common.c (check_function_arguments_recurse): Fold the whole
7499 COND_EXPR, not just the condition.
7500
f62bf092
TV
75012016-01-18 Tom de Vries <tom@codesourcery.com>
7502
7503 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
7504 classify as loop clause.
7505
e0a575ff
JJ
75062016-01-15 Jakub Jelinek <jakub@redhat.com>
7507
7508 PR bootstrap/68271
7509 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
7510 C++ FE no longer has limit on number of pragmas.
7511
75122015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
7513
7514 PR c++/69048
7515 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 7516 to add missing cleanup point.
b6e3db06 7517
c7df95d8
DM
75182016-01-14 David Malcolm <dmalcolm@redhat.com>
7519
7520 PR c++/68819
7521 * c-indentation.c (get_visual_column): Add location_t param.
7522 Handle the column number being zero by effectively disabling the
7523 warning, with an "inform".
7524 (should_warn_for_misleading_indentation): Add location_t argument
7525 for all uses of get_visual_column.
7526
21efdd80
PP
75272016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
7528
7529 PR c++/69029
7530 * c-indentation.c (should_warn_for_misleading_indentation):
7531 Don't warn about do-while statements.
7532
7a127fa7
MS
75332016-01-07 Martin Sebor <msebor@redhat.com>
7534
7535 PR c/68966
7536 * c-common.c (sync_resolve_size): Reject first argument when it's
7537 a pointer to _Bool.
7538
c589e975
DM
75392016-01-05 David Malcolm <dmalcolm@redhat.com>
7540
7541 PR c/69122
7542 * c-indentation.c (get_visual_column): Remove default argument.
7543 (should_warn_for_misleading_indentation): For the multiline case,
7544 update call to get_visual_column for next_stmt_exploc so that it
7545 captures the location of the first non-whitespace character in the
7546 relevant line. Don't issue warnings if there is non-whitespace
7547 before the next statement.
7548
818ab71a
JJ
75492016-01-04 Jakub Jelinek <jakub@redhat.com>
7550
7551 Update copyright years.
7552
745e411d
DM
75532015-12-21 David Malcolm <dmalcolm@redhat.com>
7554
7555 * c-common.c (binary_op_error): Convert first param from
7556 location_t to rich_location * and use it when emitting an error.
7557 * c-common.h (binary_op_error): Convert first param from
7558 location_t to rich_location *.
7559
de67c4c3
DM
75602015-12-16 David Malcolm <dmalcolm@redhat.com>
7561
7562 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
7563 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
7564
4a38b02b
IV
75652015-12-15 Ilya Verbin <ilya.verbin@intel.com>
7566
7567 * c-common.c (c_common_attribute_table): Handle "omp declare target
7568 link" attribute.
7569
54d62f51
JJ
75702015-12-14 Jakub Jelinek <jakub@redhat.com>
7571
7572 PR c/68833
7573 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
7574
8d4227c8
TB
75752014-12-12 Tobias Burnus <burnus@net-b.de>
7576
7577 PR fortran/68815
7578 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
7579 specifiers (%d, %i,%u and %c).
7580
f6069ccc
DM
75812015-12-10 David Malcolm <dmalcolm@redhat.com>
7582
7583 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
7584
63bbf46d
JJ
75852015-12-08 Jakub Jelinek <jakub@redhat.com>
7586
7587 PR c/48088
7588 PR c/68657
7589 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
7590 * c-pragma.c (handle_pragma_diagnostic): Adjust
7591 control_warning_option caller.
7592
f79520bb
DM
75932015-12-07 David Malcolm <dmalcolm@redhat.com>
7594
7595 * c-common.c (c_cpp_error): Update for change to
7596 rich_location::set_range.
7597
b3d5bc62
JJ
75982015-12-04 Paolo Bonzini <bonzini@gnu.org>
7599
7600 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
7601 shifting 1 out of the sign bit.
7602
76032015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
7604
7605 * c-common.c (c_common_attribute_table[]): Update max arguments
7606 count for "simd" attribute.
7607 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
7608
6eb4a537
JJ
76092015-12-03 Jakub Jelinek <jakub@redhat.com>
7610
7611 PR preprocessor/57580
7612 * c-ppoutput.c (print): Change printed field to bool.
7613 Move src_file last for smaller padding.
7614 (init_pp_output): Set print.printed to false instead of 0.
7615 (scan_translation_unit): Fix up formatting. Set print.printed
7616 to true after printing something other than newline.
7617 (scan_translation_unit_trad): Set print.printed to true instead of 1.
7618 (maybe_print_line_1): Set print.printed to false instead of 0.
7619 (print_line_1): Likewise.
7620 (do_line_change): Set print.printed to true instead of 1.
7621 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
7622 dump_macro): Set print.printed to false after printing newline.
7623
4250754e
JM
76242015-12-02 Jason Merrill <jason@redhat.com>
7625
f479b43d
JM
7626 * c-common.c (fold_for_warn): New.
7627 (warn_logical_operator, warn_tautological_cmp)
7628 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
7629
4250754e
JM
7630 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
7631 (c_fully_fold_internal, decl_constant_value_for_optimization):
7632 Move to c/c-fold.c.
7633 * c-common.h: Don't declare decl_constant_value_for_optimization.
7634
e9e32ee6
JM
76352015-12-02 Joseph Myers <joseph@codesourcery.com>
7636
7637 PR c/68162
7638 * c-common.h (c_build_qualified_type): Add extra default
7639 arguments.
7640
37d5ad46
JB
76412015-12-01 Julian Brown <julian@codesourcery.com>
7642 Cesar Philippidis <cesar@codesourcery.com>
7643 James Norris <James_Norris@mentor.com>
7644
7645 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
7646 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
7647 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
7648
f07862c7
EB
76492015-11-30 Eric Botcazou <ebotcazou@adacore.com>
7650
7651 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
7652 (decl_sloc_common): Delete and move bulk of processing to...
7653 (decl_sloc): ...here.
7654 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
7655 (dump_ada_double_name): Remove S parameter and compute the suffix.
7656 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
7657 element type and deal with an anonymous one.
7658 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
7659 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
7660 and remove reference to QUAL_UNION_TYPE.
7661 (dump_nested_types): Make 2 passes on the fields and move bulk to...
7662 (dump_nested_type): ...here. New function extracted from above.
7663 Generate a full declaration for anonymous element type of arrays.
7664 (print_ada_declaration): Really skip anonymous declarations. Remove
7665 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
7666 Clean up processing of declarations of array types and objects.
7667 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
7668 Remove obsolete code and tidy up.
7669
75c8aac3
JH
76702015-11-29 Jan Hubicka <hubicka@ucw.cz>
7671
7672 PR c/67581
7673 * c-common.c (handle_transparent_union_attribute): Update
7674 also type variants.
7675
b58d3df2
ML
76762015-11-27 Martin Liska <mliska@suse.cz>
7677
7678 PR c++/68312
7679 * array-notation-common.c (cilkplus_extract_an_triplets):
7680 Release vector of vectors.
7681 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
7682
89a01fcf
EB
76832015-11-26 Eric Botcazou <ebotcazou@adacore.com>
7684
7685 PR c++/68527
7686 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
7687 (print_ada_struct_decl): Likewise.
7688
cc5c5226
IZ
76892015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
7690
7691 PR c++/68001
7692 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
7693 * cilk.c (recognize_spawn): Determine location in a more precise
7694 way.
7695
269adb9d
JM
76962015-11-19 Jason Merrill <jason@redhat.com>
7697
7698 * c-common.c (shorten_compare): But look through macros from
7699 system headers.
7700
d0eccfcd
JM
77012015-11-18 Jason Merrill <jason@redhat.com>
7702
7703 * c-common.c (shorten_compare): Don't -Wtype-limits if the
7704 non-constant operand comes from a macro.
7705
3e44547c
JM
77062015-11-17 Jason Merrill <jason@redhat.com>
7707
7708 PR bootstrap/68346
7709 * c-common.c (warn_tautological_cmp): Fold before checking for
7710 constants.
7711
0f62c7a0
MP
77122015-11-16 Marek Polacek <polacek@redhat.com>
7713
7714 PR c++/68362
7715 * c-common.c (check_case_bounds): Fold low and high cases.
7716
a868811e
MP
77172015-11-16 Marek Polacek <polacek@redhat.com>
7718
7719 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
7720 * c-common.c (c_common_get_alias_set): Likewise.
7721 (handle_visibility_attribute): Likewise.
7722
fff77217
KY
77232015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
7724
7725 * c-common.c (handle_simd_attribute): New.
7726 (struct attribute_spec): Add entry for "simd".
7727 (handle_simd_attribute): New.
7728
269e63b7
KT
77292015-11-13 Kai Tietz <ktietz70@googlemail.com>
7730
7731 * c-lex.c (interpret_float): Use fold_convert.
7732
ebedc9a3
DM
77332015-11-13 David Malcolm <dmalcolm@redhat.com>
7734
7735 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
7736 and store it on the result.
7737 * c-opts.c (c_common_init_options): Set
7738 global_dc->colorize_source_p.
7739
6e232ba4
JN
77402015-11-12 James Norris <jnorris@codesourcery.com>
7741 Joseph Myers <joseph@codesourcery.com>
7742
7365279f 7743 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
7744 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
7745 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
7746 PRAGMA_OACC_CLAUSE_LINK.
7747
e78bede6
MP
77482015-11-11 Marek Polacek <polacek@redhat.com>
7749
7750 PR c/68107
7751 PR c++/68266
7752 * c-common.c (valid_array_size_p): New function.
7753 * c-common.h (valid_array_size_p): Declare.
7754
3f8257db 77552015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
7756
7757 PR bootstrap/68271
7758 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
7759
69f293c9
AM
77602015-11-11 Andrew MacLeod <amacleod@redhat.com>
7761
7762 * array-notation-common.c: Remove unused header files.
7763 * c-ada-spec.c: Likewise.
7764 * c-cilkplus.c: Likewise.
7765 * c-common.c: Likewise.
7766 * c-cppbuiltin.c: Likewise.
7767 * c-dump.c: Likewise.
7768 * c-format.c: Likewise.
7769 * c-gimplify.c: Likewise.
7770 * c-indentation.c: Likewise.
7771 * c-lex.c: Likewise.
7772 * c-omp.c: Likewise.
7773 * c-opts.c: Likewise.
7774 * c-pch.c: Likewise.
7775 * c-ppoutput.c: Likewise.
7776 * c-pragma.c: Likewise.
7777 * c-pretty-print.c: Likewise.
7778 * c-semantics.c: Likewise.
7779 * c-ubsan.c: Likewise.
7780 * cilk.c: Likewise.
7781 * stub-objc.c: Likewise.
7782
3a40d81d
NS
77832015-11-09 Thomas Schwinge <thomas@codesourcery.com>
7784 Cesar Philippidis <cesar@codesourcery.com>
7785 James Norris <jnorris@codesourcery.com>
7786 Julian Brown <julian@codesourcery.com>
7787 Nathan Sidwell <nathan@codesourcery.com>
7788
7789 * c-pragma.c (oacc_pragmas): Add "routine".
7790 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
7791
ee45a32d
EB
77922015-11-08 Eric Botcazou <ebotcazou@adacore.com>
7793
7794 * c-common.c (c_common_attributes): Add scalar_storage_order.
7795 (handle_scalar_storage_order_attribute): New function.
7796 * c-pragma.c (global_sso): New variable.
7797 (maybe_apply_pragma_scalar_storage_order): New function.
7798 (handle_pragma_scalar_storage_order): Likewise.
7799 (init_pragma): Register scalar_storage_order.
7800 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
7801 * c.opt (Wscalar-storage-order): New warning.
7802 (fsso-struct=): New option.
7803
eb11eb15
MS
78042015-11-08 Martin Sebor <msebor@redhat.com>
7805
7806 * c.opt (Wplacement-new): Add a period to the end of a sentence.
7807
0aad0198
RS
78082015-11-07 Richard Sandiford <richard.sandiford@arm.com>
7809
7810 * c-common.c: Don't undef DEF_BUILTIN.
7811
8a645150
DM
78122015-11-06 David Malcolm <dmalcolm@redhat.com>
7813
7814 * c-common.c (c_cpp_error): Convert parameter from location_t to
7815 rich_location *. Eliminate the "column_override" parameter and
7816 the call to diagnostic_override_column.
7817 Update the "done_lexing" clause to set range 0
7818 on the rich_location, rather than overwriting a location_t.
7819 * c-common.h (c_cpp_error): Convert parameter from location_t to
7820 rich_location *. Eliminate the "column_override" parameter.
7821
7a5e4956
CP
78222015-11-05 Cesar Philippidis <cesar@codesourcery.com>
7823 Thomas Schwinge <thomas@codesourcery.com>
7824 James Norris <jnorris@codesourcery.com>
7825
7826 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
7827 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
7828 clauses with parallel and kernels and loops.
7829 * c-pragma.h (enum pragma_omp_clause): Add entries for
7830 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
7831 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
7832 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
7833 INDEPENDENT,SEQ}.
7834 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
7835
e2f5cc96
MS
78362015-11-05 Martin Sebor <msebor@redhat.com>
7837
7838 PR c++/67942
7839 * c.opt (-Wplacement-new): New option.
7840
e01d41e5
JJ
78412015-11-05 Jakub Jelinek <jakub@redhat.com>
7842
7843 * c-common.h (c_finish_omp_atomic): Add TEST argument.
7844 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
7845 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
7846 save_expr or create_tmp_var* if TEST is true.
7847 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
7848 Don't call add_stmt here.
7849 (struct c_omp_check_loop_iv_data): New type.
7850 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
7851 c_omp_check_loop_iv_exprs): New functions.
7852 (c_omp_split_clauses): Adjust for lastprivate being allowed on
7853 distribute.
7854 (c_omp_declare_simd_clauses_to_numbers): Change
7855 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
7856 (c_omp_declare_simd_clauses_to_decls): Similarly change those
7857 from numbers to PARM_DECLs.
7858
595278be
MM
78592015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
7860
7861 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
7862 flag_checking.
7863
3f8257db 78642015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
7865
7866 PR c++-common/67882
b3d5bc62
JJ
7867 * c-common.h (fold_offsetof_1): Add argument.
7868 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
7869 offsetof expressions that reference elements past the end of
7870 an array.
7871
4bf9e5a8
TS
78722015-11-03 Thomas Schwinge <thomas@codesourcery.com>
7873 Chung-Lin Tang <cltang@codesourcery.com>
7874
7875 * c-pragma.c (oacc_pragmas): Add "atomic".
7876 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
7877
3b1661a9
ES
78782015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
7879
7880 * c-common.c (handle_target_clones_attribute): New.
7881 (c_common_attribute_table): Add handle_target_clones_attribute.
7882 (handle_always_inline_attribute): Add check on target_clones attribute.
7883 (handle_target_attribute): Ditto.
7884
2adfab87
AM
78852015-10-29 Andrew MacLeod <amacleod@redhat.com>
7886
7887 * array-notation-common.c: Reorder #include's and remove duplicates.
7888 * c-ada-spec.c: Likewise.
7889 * c-cilkplus.c: Likewise.
7890 * c-common.c: Likewise.
7891 * c-cppbuiltin.c: Likewise.
7892 * c-dump.c: Likewise.
7893 * c-format.c: Likewise.
7894 * c-gimplify.c: Likewise.
7895 * c-indentation.c: Likewise.
7896 * c-lex.c: Likewise.
7897 * c-omp.c: Likewise.
7898 * c-opts.c: Likewise.
7899 * c-pch.c: Likewise.
7900 * c-ppoutput.c: Likewise.
7901 * c-pragma.c: Likewise.
7902 * c-pretty-print.c: Likewise.
7903 * c-semantics.c: Likewise.
7904 * c-ubsan.c: Likewise.
7905 * cilk.c: Likewise.
7906 * stub-objc.c: Likewise.
7907
d90ec4f2
JM
79082015-10-28 Jason Merrill <jason@redhat.com>
7909
7910 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
7911
88bae6f4
TS
79122015-10-27 Thomas Schwinge <thomas@codesourcery.com>
7913 James Norris <jnorris@codesourcery.com>
7914 Cesar Philippidis <cesar@codesourcery.com>
7915
7916 PR c/64765
7917 PR c/64880
7918 * c-common.h (c_oacc_split_loop_clauses): Declare function.
7919 * c-omp.c (c_oacc_split_loop_clauses): New function.
7920
b1726d6c
MS
79212015-10-21 Martin Sebor <msebor@redhat.com>
7922
7923 PR driver/68043
7924 * c.opt: End each sentence that describes an option with a period.
7925
fa60eeb9
MP
79262015-10-20 Marek Polacek <polacek@redhat.com>
7927
7928 * array-notation-common.c (is_cilkplus_vector_p): Define.
7929 * c-common.h (is_cilkplus_vector_p): Declare.
7930
95979049
MP
79312015-10-20 Marek Polacek <polacek@redhat.com>
7932
7933 * c.opt (std=gnu++11): Do not describe as experimental.
7934 (std=gnu++14): Likewise.
7935
2a9fb712
JM
79362015-10-19 Jason Merrill <jason@redhat.com>
7937
7938 * c-cppbuiltin.c (c_cpp_builtins): Define
7939 __cpp_nontype_template_args.
7940
13b380a3
JM
79412015-10-19 Jason Merrill <jason@redhat.com>
7942
7943 * c-cppbuiltin.c (c_cpp_builtins): Define
7944 __cpp_enumerator_attributes, __cpp_fold_expressions,
7945 __cpp_unicode_characters.
7946
d9a6bd32
JJ
79472015-10-13 Jakub Jelinek <jakub@redhat.com>
7948 Aldy Hernandez <aldyh@redhat.com>
7949
7950 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
7951 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
7952 (c_define_builtins): Likewise.
7953 * c-common.h (enum c_omp_clause_split): Add
7954 C_OMP_CLAUSE_SPLIT_TASKLOOP.
7955 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
7956 (c_finish_omp_for): Add ORIG_DECLV argument.
7957 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
7958 201511 instead of 201307.
7959 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
7960 OMP_CRITICAL_CLAUSES to it.
7961 (c_finish_omp_ordered): Add CLAUSES argument, set
7962 OMP_ORDERED_CLAUSES to it.
7963 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
7964 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
7965 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
7966 constructs and new OpenMP 4.5 clauses. Clear
7967 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
7968 verification code.
7969 * c-pragma.c (omp_pragmas_simd): Add taskloop.
7970 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
7971 (enum pragma_omp_clause): Add
7972 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
7973 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
7974
624d31fe
RS
79752015-10-05 Richard Sandiford <richard.sandiford@arm.com>
7976
7977 * c-lex.c (interpret_float): Use real_equal instead of
7978 REAL_VALUES_EQUAL.
7979
b8fd7909
JM
79802015-10-04 Jason Merrill <jason@redhat.com>
7981
7982 Implement N4514, C++ Extensions for Transactional Memory.
7983 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
7984 (c_common_attribute_table): Add transaction_safe_dynamic.
7985 transaction_safe now affects type identity.
7986 (handle_tm_attribute): Handle transaction_safe_dynamic.
7987 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
7988 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
7989 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
7990 (D_TRANSMEM): New.
7991 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
7992 * c-pretty-print.c (pp_c_attributes_display): Don't print
7993 transaction_safe in C++.
7994
12651878
MP
79952015-10-02 Marek Polacek <polacek@redhat.com>
7996
7997 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
7998
3e3b8d63
MP
79992015-10-02 Marek Polacek <polacek@redhat.com>
8000
8001 PR c/64249
8002 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
8003 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
8004 * c.opt (Wduplicated-cond): New option.
8005
0d1a8f75
JM
80062015-10-01 Joseph Myers <joseph@codesourcery.com>
8007
8008 * c.opt (std=c11): Do not describe as experimental.
8009 (std=gnu11): Likewise.
8010 (std=iso9899:2011): Likewise.
8011
3e32ee19
NS
80122015-09-28 Nathan Sidwell <nathan@codesourcery.com>
8013
8014 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
8015 (DEF_FUNCTION_TYPE_VAR_11): Delete.
8016
974348ee
MP
80172015-09-25 Marek Polacek <polacek@redhat.com>
8018
8019 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
8020 (ubsan_instrument_shift): Likewise.
8021
15dbc1a6
MP
80222015-09-25 Marek Polacek <polacek@redhat.com>
8023
8024 PR sanitizer/64906
8025 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
8026
6b95d7cc
PP
80272015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
8028
8029 * c-indentation.c (should_warn_for_misleading_indentation):
8030 Compare next_stmt_vis_column with guard_line_first_nws instead
8031 of with guard_line_vis_column.
8032
c1822f9c
MLI
80332015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
8034
8035 PR c/49654
8036 PR c/49655
8037 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
8038 options and options not valid for the current language.
8039
d5398058
PP
80402015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
8041
8042 * c-indentation.c (should_warn_for_misleading_indentation):
8043 Float out and consolidate the calls to get_visual_column that
8044 are passed guard_exploc as an argument. Compare
8045 next_stmt_vis_column with guard_line_first_nws instead of with
8046 body_line_first_nws.
8047
6b333269
NS
80482015-09-22 Nathan Sidwell <nathan@codesourcery.com>
8049
8050 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
8051 Wnamespaces): New C++ warnings.
8052
a75f1574
JM
80532015-09-22 Jason Merrill <jason@redhat.com>
8054
8055 * c-common.h (abi_compat_version_crosses): New.
8056 (warn_abi_version): Declare.
8057 * c-common.c: Define it.
8058 * c-opts.c (c_common_post_options): Handle it.
8059 flag_abi_compat_version defaults to 8.
8060
bdaaa8b7
VV
80612015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
8062
8063 Complete the implementation of N4230, Nested namespace definition.
8064 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
8065 __cpp_nested_namespace_definitions.
8066
eaa797e8
MLI
80672015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8068
8069 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
8070
c4914de6
MLI
80712015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
8072
8073 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
8074 when warning.
8075 * c-pragma.h (pragma_lex): Add optional loc argument.
8076
fcb87c50
MM
80772015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
8078
8079 * c-format.c (check_format_arg): Adjust to use common block size in all
8080 object pools.
8081
31bdd08a
DM
80822015-09-15 David Malcolm <dmalcolm@redhat.com>
8083
8084 * c-format.c (location_from_offset): Update for change in
8085 signature of location_get_source_line.
8086 * c-indentation.c (get_visual_column): Likewise.
8087 (line_contains_hash_if): Likewise.
8088
aa9f4b4c
MP
80892015-09-14 Marek Polacek <polacek@redhat.com>
8090
8091 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
8092 setting various warnings.
8093
aa256c4a
MP
80942015-09-14 Marek Polacek <polacek@redhat.com>
8095
8096 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
8097 a negative value.
8098
0f876f22
MW
80992015-09-11 Mark Wielaard <mjw@redhat.com>
8100
8101 PR c/28901
8102 * c.opt (Wunused-variable): Option from common.opt.
8103 (Wunused-const-variable): New option.
8104
273aa49e
PC
81052015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8106
8107 PR c++/53184
8108 * c.opt ([Wsubobject-linkage]): Add.
8109
1807ffc1
MS
81102015-09-03 Martin Sebor <msebor@redhat.com>
8111
8112 PR c/66516
8113 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
8114 functions.
8115 * c-common.c (reject_gcc_builtin): Define.
8116
38942840
BI
81172015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
8118
8119 PR middle-end/60586
8120 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
8121 prototype.
8122 * c-gimplify.c (c_gimplify_expr): Added a call to the function
8123 cilk_gimplify_call_params_in_spawned_fn.
8124 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
8125 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
8126 unwrapping.
8127
c316b5e4
MP
81282015-08-25 Marek Polacek <polacek@redhat.com>
8129
8130 PR middle-end/67330
8131 * c-common.c (handle_weak_attribute): Don't check whether the
8132 visibility can be changed here.
8133
584a7c46
MLI
81342015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8135
8136 * c-lex.c (c_lex_with_flags): Use explicit locations.
8137
a79683d5
TS
81382015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
8139
8140 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
8141 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
8142
61717a45
FXC
81432015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8144
8145 PR middle-end/36757
8146 * c-common.c (check_builtin_function_arguments): Add check
8147 for BUILT_IN_SIGNBIT argument.
8148
329524f5
PC
81492015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
8150
8151 PR c++/67160
8152 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
8153 in c++1z mode.
8154
4ee55665
MP
81552015-08-17 Marek Polacek <polacek@redhat.com>
8156
8157 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
8158 with whitespaces before qualifier names.
8159
b893e375
MP
81602015-08-12 Marek Polacek <polacek@redhat.com>
8161
8162 PR c++/55095
8163 * c-common.c (maybe_warn_shift_overflow): Properly handle
8164 left-shifting 1 into the sign bit.
8165
c2d89095
MLI
81662015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8167
8168 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
8169
971e17ff
AS
81702015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
8171 Braden Obrzut <admin@maniacsvault.net>
8172 Jason Merrill <jason@redhat.com>
8173
8174 Add C++ Concepts TS support.
8175 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
8176 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
8177 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
8178 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
8179 * c-opts.c (set_std_cxx1z): Set flag_concepts.
8180 * c.opt (fconcepts): New.
8181
b3d5bc62
JJ
81822015-08-02 Martin Sebor <msebor@redhat.com>
8183
8184 * c.opt (-Wframe-address): New warning option.
8185
8ebca419
PP
81862015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8187
8188 * c-indentation.c (should_warn_for_misleading_indentation):
8189 Improve heuristics.
8190
1a1e101f
PP
81912015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8192
8193 * c-indentation.c (get_visual_column): Add parameter first_nws,
8194 use it. Update comment documenting the function.
8195 (is_first_nonwhitespace_on_line): Remove.
8196 (should_warn_for_misleading_indentation): Replace usage of
8197 of is_first_nonwhitespace_on_line with get_visual_column.
8198
992118a1
PP
81992015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
8200
8201 * c-indentation.h (struct token_indent_info): Define.
8202 (get_token_indent_info): Define.
8203 (warn_for_misleading_information): Declare.
8204 * c-common.h (warn_for_misleading_information): Remove.
8205 * c-identation.c (warn_for_misleading_indentation):
8206 Change declaration to take three token_indent_infos. Adjust
8207 accordingly.
8208 * c-identation.c (should_warn_for_misleading_indentation):
8209 Likewise. Bail out early if the body is a compound statement.
8210 (guard_tinfo_to_string): Define.
8211
e8fa3817
JM
82122015-07-30 Jason Merrill <jason@redhat.com>
8213
8214 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
8215 '*' for reference decay.
8216
173864e8
MP
82172015-07-30 Marek Polacek <polacek@redhat.com>
8218
8219 * c-common.c (warn_tautological_cmp): Bail for float types.
8220
f2afe6dd
MP
82212015-07-27 Marek Polacek <polacek@redhat.com>
8222
8223 PR bootstrap/67030
8224 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
8225
05b28fd6
MP
82262015-07-27 Marek Polacek <polacek@redhat.com>
8227
8228 PR c++/66555
8229 PR c/54979
8230 * c-common.c (find_array_ref_with_const_idx_r): New function.
8231 (warn_tautological_cmp): New function.
8232 * c-common.h (warn_tautological_cmp): Declare.
8233 * c.opt (Wtautological-compare): New option.
8234
5a5062b8
MP
82352015-07-23 Marek Polacek <polacek@redhat.com>
8236
8237 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
8238 (ubsan_instrument_shift): Likewise.
8239
dc891fe7
MP
82402015-07-23 Marek Polacek <polacek@redhat.com>
8241
8242 PR sanitizer/66908
8243 * c-ubsan.c: Include gimplify.h.
8244 (ubsan_instrument_division): Unshare OP0 and OP1.
8245 (ubsan_instrument_shift): Likewise.
8246
451b5e48
MP
82472015-07-20 Marek Polacek <polacek@redhat.com>
8248 Richard Sandiford <richard.sandiford@arm.com>
8249
8250 PR c++/55095
8251 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
8252 Use EXPR_LOC_OR_LOC.
8253 (maybe_warn_shift_overflow): New function.
8254 * c-common.h (maybe_warn_shift_overflow): Declare.
8255 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
8256 * c.opt (Wshift-overflow): New option.
8257
fb0b2914
ML
82582015-07-16 Martin Liska <mliska@suse.cz>
8259
8260 * c-format.c (static void check_format_info_main): Use
8261 object_allocator instead of pool_allocator.
8262 (check_format_arg): Likewise.
8263 (check_format_info_main): Likewise.
8264
903f5c23
AM
82652015-07-15 Andrew MacLeod <amacleod@redhat.com>
8266
8267 * c-opts.c: Remove multiline #include comment.
8268
026c3cfd
AH
82692015-07-12 Aldy Hernandez <aldyh@redhat.com>
8270
8271 * c-common.c: Fix double word typos.
8272
bb49ee66
EB
82732015-07-10 Eric Botcazou <ebotcazou@adacore.com>
8274
8275 * c-ada-spec.h (cpp_operation): Revert latest change.
8276 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
8277 constructors and destructors.
8278
1916bcb5
AM
82792015-07-09 Andrew MacLeod <amacleod@redhat.com>
8280
8281 * c-common.h: Adjust includes for flags.h changes.
8282 * stub-objc.c: Likewise.
026c3cfd 8283
a9dcd529
EB
82842015-07-08 Eric Botcazou <ebotcazou@adacore.com>
8285
8286 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
8287 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
8288
b03b462f
JJ
82892015-07-08 Jakub Jelinek <jakub@redhat.com>
8290
8291 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
8292 are to be removed, return NULL rather than original clauses list.
8293
c7131fb2
AM
82942015-07-07 Andrew MacLeod <amacleod@redhat.com>
8295
8296 * array-notation-common.c: Adjust includes.
8297 * c-ada-spec.c: Likewise.
8298 * c-cilkplus.c: Likewise.
8299 * c-common.h: Likewise.
8300 * c-cppbuiltin.c: Likewise.
8301 * c-dump.c: Likewise.
8302 * c-format.c: Likewise.
8303 * c-gimplify.c: Likewise.
8304 * c-indentation.c: Likewise.
8305 * c-lex.c: Likewise.
8306 * c-omp.c: Likewise.
8307 * c-opts.c: Likewise.
8308 * c-pch.c: Likewise.
8309 * c-ppoutput.c: Likewise.
8310 * c-pragma.c: Likewise.
8311 * c-pretty-print.c: Likewise.
8312 * c-semantics.c: Likewise.
8313 * c-ubsan.c: Likewise.
8314 * cilk.c: Likewise.
8315 * stub-objc.c: Likewise.
8316
2a7fb83f
EB
83172015-07-07 Eric Botcazou <ebotcazou@adacore.com>
8318
8319 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
8320 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
8321
a03c9bf1
JM
83222015-07-01 Jason Merrill <jason@redhat.com>
8323
36a85135
JM
8324 * c-common.h (D_CXX11): Rename from D_CXX0X.
8325 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
8326 * c-common.c: Adjust.
8327
e7fa68d5
JM
8328 * c-opts.c (c_common_post_options): Default to C++14.
8329
a03c9bf1
JM
8330 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
8331
fe95b036
ESR
83322015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
8333
8334 Implement N4197 - Adding u8 character literals
b3d5bc62 8335 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 8336 CPP_CHAR.
b3d5bc62 8337 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 8338 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 8339 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
8340 and CPP_UTF8CHAR tokens.
8341 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 8342
da2e71c9
MLI
83432015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8344
8345 PR fortran/66605
8346 * c-common.c (do_warn_unused_parameter): Move here.
8347 * c-common.h (do_warn_unused_parameter): Declare.
8348
b155cfd9
MP
83492015-06-29 Marek Polacek <polacek@redhat.com>
8350
8351 PR c/66322
8352 * c-common.c (check_case_bounds): Add bool * parameter. Set
8353 OUTSIDE_RANGE_P.
8354 (c_add_case_label): Add bool * parameter. Pass it down to
8355 check_case_bounds.
8356 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
8357 warning here.
8358 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
8359 declarations.
8360
31521951
MP
83612015-06-27 Marek Polacek <polacek@redhat.com>
8362
8363 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
8364 or VECTOR_INTEGER_TYPE_P throughout.
8365 * c-gimplify.c: Likewise.
8366
22d03525
MP
83672015-06-26 Marek Polacek <polacek@redhat.com>
8368
8369 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
8370 * c-common.c (c_fully_fold_internal): Likewise.
8371 (c_alignof_expr): Likewise.
8372 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
8373 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 8374 * cilk.c (create_parm_list): Likewise.
22d03525 8375
af05e6e5
MP
83762015-06-26 Marek Polacek <polacek@redhat.com>
8377
8378 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
8379
f0889939
AM
83802015-06-25 Andrew MacLeod <amacleod@redhat.com>
8381
8382 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
8383 * c-gimplify.c: Likewise.
8384 * c-pragma.c: Likewise.
8385 * c-ubsan.c: Likewise.
8386 * cilk.c: Likewise.
8387
ca752f39
RS
83882015-06-25 Richard Sandiford <richard.sandiford@arm.com>
8389
8390 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
8391 ggc_hasher.
8392
16a16ec7
AM
83932015-06-25 Andrew MacLeod <amacleod@redhat.com>
8394
8395 * cilk.c: Move calls.h after tm.h in the include chain.
8396
0ae9bd27
MP
83972015-06-25 Marek Polacek <polacek@redhat.com>
8398
8399 * array-notation-common.c: Use VAR_P throughout.
8400 * c-ada-spec.c: Likewise.
8401 * c-common.c: Likewise.
8402 * c-format.c: Likewise.
8403 * c-gimplify.c: Likewise.
8404 * c-omp.c: Likewise.
8405 * c-pragma.c: Likewise.
8406 * c-pretty-print.c: Likewise.
8407 * cilk.c: Likewise.
8408
62f9079a
MP
84092015-06-25 Marek Polacek <polacek@redhat.com>
8410
8411 * cilk.c (extract_free_variables): Use is_global_var.
8412
0fa16060
RS
84132015-06-23 Richard Sandiford <richard.sandiford@arm.com>
8414
8415 * c-common.c: Don't include target-def.h.
8416
a68ae2e1
MP
84172015-06-23 Marek Polacek <polacek@redhat.com>
8418
8419 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
8420 when comparing INTEGER_CSTs.
8421
c6a2f2d9
PMR
84222015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
8423
8424 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
8425 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
8426 (dump_ada_template): Skip partially specialized types.
8427
6b4db501
MM
84282015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
8429
8430 * c-common.c (scalar_to_vector): Use std::swap instead of manually
8431 swapping.
8432
abb226c9
AM
84332015-06-17 Andrew MacLeod <amacleod@redhat.com>
8434
8435 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
8436 * c-ada-spec.c: Likewise.
8437 * c-cilkplus.c: Likewise.
8438 * c-common.c: Likewise.
8439 * c-common.h: Likewise.
8440 * c-cppbuiltin.c: Likewise.
8441 * c-dump.c: Likewise.
8442 * c-format.c: Likewise.
8443 * c-gimplify.c: Likewise.
8444 * c-indentation.c: Likewise.
8445 * c-lex.c: Likewise.
8446 * c-omp.c: Likewise.
8447 * c-opts.c: Likewise.
8448 * c-pch.c: Likewise.
8449 * c-ppoutput.c: Likewise.
8450 * c-pragma.c: Likewise.
8451 * c-pretty-print.c: Likewise.
8452 * c-semantics.c: Likewise.
8453 * c-ubsan.c: Likewise.
8454 * cilk.c: Likewise.
8455 * stub-objc.c: Likewise.
8456
076fecad
PP
84572015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
8458
8459 PR c++/65168
8460 * c-common.c (c_common_truthvalue_conversion): Warn when
8461 converting an address of a reference to a truth value.
8462
13fdf2e2
AM
84632015-06-08 Andrew MacLeod <amacleod@redhat.com>
8464
8465 * array-notation-common.c : Adjust include files.
8466 * c-ada-spec.c : Likewise.
8467 * c-cilkplus.c : Likewise.
8468 * c-common.c : Likewise.
8469 * c-common.h : Likewise.
8470 * c-cppbuiltin.c : Likewise.
8471 * c-dump.c : Likewise.
8472 * c-format.c : Likewise.
8473 * c-gimplify.c : Likewise.
8474 * c-indentation.c : Likewise.
8475 * c-lex.c : Likewise.
8476 * c-omp.c : Likewise.
8477 * c-opts.c : Likewise.
8478 * c-pch.c : Likewise.
8479 * c-ppoutput.c : Likewise.
8480 * c-pragma.c : Likewise.
8481 * c-pretty-print.c : Likewise.
8482 * c-semantics.c : Likewise.
8483 * c-ubsan.c : Likewise.
8484 * cilk.c : Likewise.
8485 * stub-objc.c : Likewise.
8486
a1661b90
MP
84872015-06-08 Marek Polacek <polacek@redhat.com>
8488
8489 PR c/66415
8490 * c-format.c (location_from_offset): Return LOC if LINE is null.
8491
d7438551
AH
84922015-06-05 Aldy Hernandez <aldyh@redhat.com>
8493
8494 * c-common.h (c_parse_final_cleanups): New prototype.
8495 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
8496
b3d5bc62
JJ
84972015-06-04 Sriraman Tallam <tmsriram@google.com>
8498
8499 * c-common.c (noplt): New attribute.
8500 (handle_noplt_attribute): New handler.
8501
ecb9f223
AM
85022015-06-04 Andrew MacLeod <amacleod@redhat.com>
8503
8504 * array-notation-common.c: Adjust includes for restructured coretypes.h.
8505 * c-ada-spec.c: Likewise.
8506 * c-cilkplus.c: Likewise.
8507 * c-common.c: Likewise.
8508 * c-common.h: Likewise.
8509 * c-cppbuiltin.c: Likewise.
8510 * c-dump.c: Likewise.
8511 * c-format.c: Likewise.
8512 * c-gimplify.c: Likewise.
8513 * c-indentation.c: Likewise.
8514 * c-lex.c: Likewise.
8515 * c-omp.c: Likewise.
8516 * c-opts.c: Likewise.
8517 * c-pch.c: Likewise.
8518 * c-ppoutput.c: Likewise.
8519 * c-pragma.c: Likewise.
8520 * c-pretty-print.c: Likewise.
8521 * c-semantics.c: Likewise.
8522 * c-ubsan.c: Likewise.
8523 * cilk.c: Likewise.
8524 * stub-objc.c: Likewise.
8525
6ac48155
DM
85262015-06-02 David Malcolm <dmalcolm@redhat.com>
8527
8528 PR c/66220:
8529 * c-indentation.c (should_warn_for_misleading_indentation): Use
8530 expand_location rather than expand_location_to_spelling_point.
8531 Don't warn if the guarding statement is more indented than the
8532 next/body stmts.
8533
773ce42e
DM
85342015-06-02 David Malcolm <dmalcolm@redhat.com>
8535
8536 * c-indentation.c (warn_for_misleading_indentation): Bail out
8537 immediately if -Wmisleading-indentation isn't enabled.
8538
4fef8379
ML
85392015-06-01 Martin Liska <mliska@suse.cz>
8540
8541 * c-format.c (check_format_arg):Use new type-based pool allocator.
8542 (check_format_info_main) Likewise.
8543
1edfb384
EB
85442015-05-31 Eric Botcazou <ebotcazou@adacore.com>
8545
8546 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
8547 (has_nontrivial_methods): Likewise.
8548
9677ef52
MP
85492015-05-25 Marek Polacek <polacek@redhat.com>
8550
8551 * c-ubsan.c (ubsan_instrument_shift): Use type0.
8552
fd5c817a
MP
85532015-05-22 Marek Polacek <polacek@redhat.com>
8554
8555 PR c/47043
8556 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
8557
a2f45fe6 85582015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
8559
8560 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
8561 STACK_GROWS_DOWNWARD.
8562
a2f45fe6 85632015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
8564
8565 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
8566 STACK_GROWS_DOWNWARD rather than if it is defined.
8567
0fee2ac2 85682015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 8569
0fee2ac2
MLI
8570 PR c/52952
8571 * c-format.c (location_column_from_byte_offset): New.
8572 (location_from_offset): New.
8573 (struct format_wanted_type): Add offset_loc field.
8574 (check_format_info): Move handling of location for extra arguments
8575 closer to the point of warning.
8576 (check_format_info_main): Pass the result of location_from_offset
8577 to warning_at.
8578 (format_type_warning): Pass the result of location_from_offset
8579 to warning_at.
8580
cf4ef6f7
MP
85812015-05-20 Marek Polacek <polacek@redhat.com>
8582
8583 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
8584
3a65ee74
MP
85852015-05-20 Marek Polacek <polacek@redhat.com>
8586
8587 * c-ada-spec.c (dump_sloc): Use DECL_P.
8588
21b634ae
MP
85892015-05-20 Marek Polacek <polacek@redhat.com>
8590
8591 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
8592 * c-common.c: Likewise.
8593
0e50b624
DM
85942015-05-19 David Malcolm <dmalcolm@redhat.com>
8595
8596 * c-common.h (fe_file_change): Strengthen param from
8597 const line_map * to const line_map_ordinary *.
8598 (pp_file_change): Likewise.
8599 * c-lex.c (fe_file_change): Likewise.
8600 (cb_define): Use linemap_check_ordinary when invoking
8601 SOURCE_LINE.
8602 (cb_undef): Likewise.
8603 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
8604 invoking cb_file_change.
8605 (c_finish_options): Likewise.
8606 (push_command_line_include): Likewise.
8607 (cb_file_change): Strengthen param "new_map" from
8608 const line_map * to const line_map_ordinary *.
8609 * c-ppoutput.c (cb_define): Likewise for local "map".
8610 (pp_file_change): Likewise for param "map" and local "from".
8611
fab27f52
MM
86122015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
8613
8614 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
8615
2fe1d762
TV
86162015-05-18 Tom de Vries <tom@codesourcery.com>
8617
8618 * c-common.c (build_va_arg_1): New function.
8619 (build_va_arg): Add address operator to va_list operand if necessary.
8620
7a37fa90
MM
86212015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
8622
8623 PR c/48956
8624 * c-common.c (int_safely_convertible_to_real_p): Define.
8625 (unsafe_conversion_p): Check conversions involving complex types.
8626 (conversion_warning): Add new warning message for conversions which
8627 discard imaginary component.
8628 * c-common.h: (enum conversion_safety): Add new enumerator for such
8629 conversions.
8630
3aa3c9fc
MP
86312015-05-14 Marek Polacek <polacek@redhat.com>
8632
8633 PR c/66066
8634 PR c/66127
8635 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
8636 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
8637 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
8638 use it. If FOR_INT_CONST, require that all evaluated operands be
8639 INTEGER_CSTs.
8640
c3388e62
DM
86412015-05-12 David Malcolm <dmalcolm@redhat.com>
8642
8643 * c-common.h (warn_for_misleading_indentation): New prototype.
8644 * c-indentation.c: New file.
8645 * c.opt (Wmisleading-indentation): New option.
8646
c7b38fd5
TV
86472015-05-12 Tom de Vries <tom@codesourcery.com>
8648
8649 PR tree-optimization/66010
8650 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
8651
381bf11e
JM
86522015-05-09 Jason Merrill <jason@redhat.com>
8653
edff0c06
JM
8654 * c-opts.c (c_common_post_options): Also clear
8655 cpp_opts->cpp_warn_cxx11_compat.
8656
129211bc
JM
8657 * c-common.h (enum cxx_dialect): Add cxx_unset.
8658 * c-common.c (cxx_dialect): Initialize to cxx_unset.
8659 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
8660
381bf11e
JM
8661 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
8662 (std=gnu++0x): Mark as Undocumented.
8663 (std=gnu++1y): Add deprecated message.
8664
fe191308
JM
86652015-05-08 Jason Merrill <jason@redhat.com>
8666
765189ff
JM
8667 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
8668 * c-opts.c: Adjust.
8669
fe191308
JM
8670 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
8671
755e528f
MP
86722015-05-08 Marek Polacek <polacek@redhat.com>
8673
8674 PR c/64918
8675 * c.opt (Woverride-init-side-effects): New option.
8676
0173bd2a
MP
86772015-05-07 Marek Polacek <polacek@redhat.com>
8678
8679 PR c/65179
8680 * c-common.c (c_fully_fold_internal): Warn when left shifting a
8681 negative value.
8682 * c.opt (Wshift-negative-value): New option.
8683 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
8684 when -Wextra and C99/C++11 mode.
8685
e0f0d3b9
MP
86862015-05-07 Marek Polacek <polacek@redhat.com>
8687 Martin Uecker <uecker@eecs.berkeley.edu>
8688
8689 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
8690 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
8691
8243e2a9
JM
86922015-05-05 Jason Merrill <jason@redhat.com>
8693
8694 * c.opt (Wterminate): New.
8695
577cd070
MP
86962015-04-30 Marek Polacek <polacek@redhat.com>
8697
8698 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
8699 require that the non-constant be of a boolean type.
8700
0373796b
JT
87012015-04-29 Josh Triplett <josh@joshtriplett.org>
8702
e0f0d3b9
MP
8703 * c-common.c (handle_section_attribute): Refactor to reduce
8704 nesting and distinguish between error cases.
0373796b 8705
716c0ba6
MP
87062015-04-29 Marek Polacek <polacek@redhat.com>
8707
8708 PR c/64610
8709 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
8710 with 0/1.
8711
8848828b
JJ
87122015-04-29 Jakub Jelinek <jakub@redhat.com>
8713
8714 * c-common.h (omp_clause_mask): Unconditionally define as a class.
8715 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
8716 HOST_BITS_PER_WIDE_INT.
8717
ecd0e562
TV
87182015-04-28 Tom de Vries <tom@codesourcery.com>
8719
8720 PR tree-optimization/65887
8721 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
8722
2a877204 87232015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 8724 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
8725
8726 * c-ada-spec.c (in_function): Delete.
8727 (dump_generic_ada_node): Do not change in_function and remove the
8728 redundant code dealing with it.
8729 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
8730 (print_ada_methods): Output the static member functions in a nested
8731 package after the regular methods as well as associated renamings.
8732
4853031e
MP
87332015-04-24 Marek Polacek <polacek@redhat.com>
8734
8735 PR c/65830
8736 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
8737 and OPT_Wshift_count_overflow.
8738
8c2b7f79
MP
8739 PR c/63357
8740 * c-common.c (warn_logical_operator): Warn if the operands have the
8741 same expressions.
8742
b8787813
MP
87432015-04-24 Marek Polacek <polacek@redhat.com>
8744
8745 PR c/61534
8746 * c-common.c (warn_logical_operator): Bail if either operand comes
8747 from a macro expansion.
8748
8fba1830
BRF
87492015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
8750
8751 PR target/55143
8752 * c-common.c (c_default_pointer_mode): Add definition.
8753 * c-common.h (c_default_pointer_mode): Add declaration.
8754
17958621
JJ
87552015-03-11 Jakub Jelinek <jakub@redhat.com>
8756
8757 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
8758 on record_builtin_type argument.
8759
7ccb1a11
JJ
87602015-03-10 Jakub Jelinek <jakub@redhat.com>
8761
8762 PR c/65120
8763 * c-common.c (warn_logical_not_parentheses): Don't warn for
8764 !x == 0 or !x != 0.
8765
04fd785e
MP
87662015-03-07 Marek Polacek <polacek@redhat.com>
8767
8768 PR sanitizer/65280
8769 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
8770 before trying to figure out whether we have a flexible array member.
8771
a4e26206 87722015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 8773 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
8774
8775 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
8776
0d2489f4
EB
87772015-03-05 Eric Botcazou <ebotcazou@adacore.com>
8778
8779 PR ada/65319
8780 * c-ada-spec.c (print_destructor): Remove obsolete code.
8781
83ed54d7
EB
87822015-03-01 Eric Botcazou <ebotcazou@adacore.com>
8783
8784 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
8785 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
8786 DECL_TEMPLATE_RESULT emulations.
8787 (dump_ada_template)): Add guard for TYPE_METHODS.
8788
7631f0e2
MP
87892015-02-27 Marek Polacek <polacek@redhat.com>
8790
8791 PR c/65040
8792 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
8793
d1783ae5
KT
87942015-02-27 Kai Tietz <ktietz@redhat.com>
8795
8796 PR c/35330
8797 * c-pragma.c (handle_pragma_weak): Do not try to create
8798 weak/alias of declarations not being function, or variable
8799 declarations.
8800
56a9f6bc
TS
88012015-02-24 Thomas Schwinge <thomas@codesourcery.com>
8802
8803 PR libgomp/64625
8804 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8805 Remove macros.
8806 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
8807
3d5cb23d
MP
88082015-02-16 Marek Polacek <polacek@redhat.com>
8809
8810 PR c/65066
8811 * c-format.c (check_format_types): Handle null param.
8812
fa008882
MP
88132015-02-13 Marek Polacek <polacek@redhat.com>
8814
8815 PR c/65040
8816 * c-format.c (check_format_types): Don't warn about different
8817 signedness if the original value is in the range of WANTED_TYPE.
8818
785f21af
JM
88192015-02-12 Jason Merrill <jason@redhat.com>
8820
8821 PR c++/64956
8822 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
8823 to the current highest version.
8824 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
8825
4886ec8e
JJ
88262015-02-04 Jakub Jelinek <jakub@redhat.com>
8827
8828 PR c/64824
8829 PR c/64868
8830 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
8831 instead of RDIV_EXPR. Use build_binary_op instead of
8832 build2_loc.
8833
40fecdd6
JM
88342015-01-30 Joseph Myers <joseph@codesourcery.com>
8835
8836 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
8837 to pass input_location as first argument.
8838
a0c88d06
TV
88392015-01-23 Tom de Vries <tom@codesourcery.com>
8840
8841 PR libgomp/64672
8842 * c.opt (fopenacc): Mark as LTO option.
8843
1506ae0e
TV
88442015-01-23 Tom de Vries <tom@codesourcery.com>
8845
8846 PR libgomp/64707
8847 * c.opt (fopenmp): Mark as LTO option.
8848
31be63ab
JJ
88492015-01-21 Jakub Jelinek <jakub@redhat.com>
8850
8851 PR c/63307
b1726d6c 8852 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
8853 (compare_decls): Fix up formatting.
8854
88552015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
8856
8857 PR c/63307
8858 * cilk.c: Include vec.h.
8859 (struct cilk_decls): New structure.
8860 (wrapper_parm_cb): Split this function to...
8861 (fill_decls_vec): ...this...
8862 (create_parm_list): ...and this.
8863 (compare_decls): New function.
8864 (for_local_cb): Remove.
8865 (wrapper_local_cb): Ditto.
8866 (build_wrapper_type): For now first traverse and fill vector of
8867 declarations then sort it and then deal with sorted vector.
8868 (cilk_outline): Ditto.
8869 (declare_one_free_variable): Ditto.
8870
6875457f
JM
88712015-01-21 Jason Merrill <jason@redhat.com>
8872
8873 PR c++/64629
8874 * c-format.c (check_format_arg): Call decl_constant_value.
8875
185c9e56
ML
88762015-01-19 Martin Liska <mliska@suse.cz>
8877
8878 * c-common.c (handle_noicf_attribute): New function.
8879
41dbbb37
TS
88802015-01-15 Thomas Schwinge <thomas@codesourcery.com>
8881 Bernd Schmidt <bernds@codesourcery.com>
8882 James Norris <jnorris@codesourcery.com>
8883 Cesar Philippidis <cesar@codesourcery.com>
8884 Ilmir Usmanov <i.usmanov@samsung.com>
8885 Jakub Jelinek <jakub@redhat.com>
8886
8887 * c.opt (fopenacc): New option.
8888 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
8889 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
8890 New macros.
8891 * c-common.h (c_finish_oacc_wait): New prototype.
8892 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
8893 (c_finish_oacc_wait): New function.
8894 * c-pragma.c (oacc_pragmas): New variable.
8895 (c_pp_lookup_pragma, init_pragma): Handle it.
8896 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
8897 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
8898 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
8899 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
8900 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
8901 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
8902 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
8903 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
8904 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
8905 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
8906 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
8907 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
8908 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
8909 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
8910 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
8911 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
8912 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
8913 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
8914 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
8915 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
8916 PRAGMA_OACC_CLAUSE_WORKER.
8917
3f8257db 89182015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
8919
8920 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
8921 for the new option fstack-protector_explicit.
8922 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
8923 (handle_stack_protect_attribute): New function.
8924
3f8257db 89252015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
8926
8927 * c.opt: New option -Warray-bounds=.
8928
adfac8df
JJ
89292015-01-09 Michael Collison <michael.collison@linaro.org>
8930
8931 * array-notation-common.c: Include hash-set.h, machmode.h,
8932 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8933 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
8934 * c-ada-spec.c: Ditto.
8935 * c-cilkplus.c: Ditto.
8936 * c-common.c: Include input.h due to flattening of tree.h.
8937 Define macro GCC_C_COMMON_C.
8938 * c-common.h: Flatten tree.h header files into c-common.h.
8939 Remove include of tree-core.h.
8940 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8941 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8942 fold-const.h, wide-int.h, and inchash.h due to
8943 flattening of tree.h.
8944 * c-dump.c: Ditto.
8945 * c-format.c: Flatten tree.h header files into c-common.h.
8946 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
8947 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8948 fold-const.h, wide-int.h, and inchash.h due to
8949 flattening of tree.h.
8950 * c-dump.c: Include hash-set.h, machmode.h,
8951 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8952 fold-const.h, wide-int.h, and inchash.h due to
8953 flattening of tree.h.
8954 * c-format.c: Include hash-set.h, machmode.h,
8955 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8956 fold-const.h, wide-int.h, inchash.h and real.h due to
8957 flattening of tree.h.
8958 * c-gimplify.c: Include hash-set.h, machmode.h,
8959 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
8960 fold-const.h, wide-int.h, and inchash.h due to
8961 flattening of tree.h.
8962 * cilk.c: Ditto.
8963 * c-lex.c: Ditto.
8964 * c-omp.c: Ditto.
8965 * c-opts.c: Ditto.
8966 * c-pch.c: Ditto.
8967 * c-ppoutput.c: Ditto.
8968 * c-pragma.c: Ditto.
8969 * c-pretty-print.c: Ditto.
8970 * c-semantics.c: Ditto.
8971 * c-ubsan.c: Ditto.
8972 * stub-objc.c: Ditto.
8973
f5481fc4
JM
89742015-01-08 Jason Merrill <jason@redhat.com>
8975
8976 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
8977 do_ubsan_in_current_function.
8978 (ubsan_maybe_instrument_reference_or_call): Likewise.
8979 * c-ubsan.h: Declare it.
8980
de35aa66
MS
89812015-01-08 Mike Stump <mikestump@comcast.net>
8982
8983 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
8984
4a9a42ab
MP
89852015-01-07 Marek Polacek <polacek@redhat.com>
8986
8987 PR c/64440
8988 * c-common.c (c_fully_fold_internal): Warn for division and modulo
8989 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
8990
2f42e5de
TS
89912015-01-05 Trevor Saunders <tsaunders@mozilla.com>
8992
8993 PR c++/31397
8994 * c.opt (Wsuggest-override): New option.
8995
5624e564
JJ
89962015-01-05 Jakub Jelinek <jakub@redhat.com>
8997
8998 Update copyright years.
8999
5bd012f8
MP
90002015-01-05 Marek Polacek <polacek@redhat.com>
9001
9002 PR c/64423
9003 * c-common.c (warn_array_subscript_with_type_char): Add location_t
9004 parameter. Use it.
9005 * c-common.h (warn_array_subscript_with_type_char): Update
9006 declaration.
9007
a7fa8d18
ESR
90082014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
9009
9010 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
9011 Control macro with flag_sized_deallocation.
9012
3f8257db 90132014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
9014
9015 * c.opt (Wdiscarded-array-qualifiers): New option.
9016
1f8d3e84
JJ
90172014-12-19 Jakub Jelinek <jakub@redhat.com>
9018
9019 PR preprocessor/63831
9020 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
9021 and __has_cpp_attribute here.
9022 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
9023 c_common_has_attribute.
9024 * c-common.h (c_common_has_attribute): New prototype.
9025 * c-lex.c (init_c_lex): Set cb->has_attribute to
9026 c_common_has_attribute instead of cb_has_attribute.
9027 (get_token_no_padding): New function.
9028 (cb_has_attribute): Renamed to ...
9029 (c_common_has_attribute): ... this. No longer static. Use
9030 get_token_no_padding, require ()s, don't build TREE_LIST
9031 unnecessarily, fix up formatting, adjust diagnostics, call
9032 init_attributes.
9033
20b06add
JM
90342014-12-15 Jason Merrill <jason@redhat.com>
9035
9036 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
9037 (-Wsized-deallocation): New.
9038 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
9039 to on in C++14 and up.
9040
94a073b2
JM
90412014-12-11 Jason Merrill <jason@redhat.com>
9042
acaa5911
JM
9043 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
9044
94a073b2
JM
9045 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
9046 we aren't complaining about VLAs.
9047
7fb66c15
MP
90482014-12-06 Marek Polacek <polacek@redhat.com>
9049
9050 PR tree-optimization/64183
9051 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
9052 shift-expression if it is integer_type_node. Use types_compatible_p.
9053
b731b390
JJ
90542014-11-29 Jakub Jelinek <jakub@redhat.com>
9055
9056 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
9057 last argument from create_tmp_var_raw and create_tmp_var calls.
9058 * cilk.c (gimplify_cilk_spawn): Likewise.
9059 * c-omp.c (c_finish_omp_atomic): Likewise.
9060
6a4da643
MP
90612014-11-28 Marek Polacek <polacek@redhat.com>
9062
9063 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
9064 instead of unsigned_type_node.
9065
541e35a6
MP
90662014-11-28 Marek Polacek <polacek@redhat.com>
9067
9068 PR c/63862
9069 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
9070 to op1_utype.
9071 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
9072 expression to unsigned_type_node.
9073
dcc97066
MW
90742014-11-20 Mark Wielaard <mjw@redhat.com>
9075
9076 PR debug/38757
9077 * c-opts.c (set_std_c89): Set lang_hooks.name.
9078 (set_std_c99): Likewise.
9079 (set_std_c11): Likewise.
9080 (set_std_cxx98): Likewise.
9081 (set_std_cxx11): Likewise.
9082 (set_std_cxx14): Likewise.
9083 (set_std_cxx1z): Likewise.
9084
aa7da51a
JJ
90852014-11-21 Jakub Jelinek <jakub@redhat.com>
9086
9087 PR target/63764
9088 * c-common.h (convert_vector_to_pointer_for_subscript): Change
9089 return type to bool.
009a3480 9090 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
9091 (convert_vector_to_pointer_for_subscript): Change return type to
9092 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
9093 and copy it into a TARGET_EXPR and use that instead of *vecp
9094 directly.
9095
538dd0b7
DM
90962014-11-19 David Malcolm <dmalcolm@redhat.com>
9097
9098 Merger of git branch "gimple-classes-v2-option-3".
9099 * ChangeLog.gimple-classes: New.
9100 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
9101 from being just a vec<gimple> to a vec<gbind *>.
9102
c39a5e99
JJ
91032014-11-18 Jakub Jelinek <jakub@redhat.com>
9104
9105 PR sanitizer/63813
9106 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
9107 argument to ptype, set type to TREE_TYPE (ptype). Don't call
9108 get_pointer_alignment for non-pointers. Use ptype, or if it is
9109 reference type, corresponding pointer type, as type of kind
9110 argument.
9111 (ubsan_maybe_instrument_reference,
9112 ubsan_maybe_instrument_member_call): Adjust callers.
9113
8537a4a9
MP
91142014-11-15 Marek Polacek <polacek@redhat.com>
9115
9116 PR middle-end/63884
9117 * array-notation-common.c (is_sec_implicit_index_fn): Return false
9118 for NULL fndecl.
9119 (extract_array_notation_exprs): Return for NULL node.
9120
2079956a
JM
91212014-11-12 Joseph Myers <joseph@codesourcery.com>
9122
9123 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
9124 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
9125
1304953e
JJ
91262014-11-12 Jakub Jelinek <jakub@redhat.com>
9127
9128 PR c/59708
9129 * c-common.c (check_builtin_function_arguments): Handle
9130 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
9131
e5e44252
AK
91322014-11-10 Andi Kleen <ak@linux.intel.com>
9133
9134 PR c/60804
9135 * c-common.h (check_no_cilk): Declare.
9136 * cilk.c (get_error_location): New function.
9137 (check_no_cilk): Dito.
9138
e64b984d
AK
91392014-11-10 Andi Kleen <ak@linux.intel.com>
9140
9141 * cilk.c (recognize_spawn): Use expression location
9142 for error message.
9143
13c21655
PC
91442014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
9145
9146 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
9147
42fd12b1
ESR
91482014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
9149
9150 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
9151 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
9152 (__cpp_range_based_for, __cpp_initializer_lists,
9153 __cpp_delegating_constructors, __cpp_nsdmi,
9154 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
9155 for C++11; (__cpp_attribute_deprecated): Remove in favor of
9156 __has_cpp_attribute.
9157 * c-lex.c (cb_has_attribute): New callback CPP function;
9158 (init_c_lex): Set has_attribute callback.
9159
6f450181
RB
91602014-11-04 Richard Biener <rguenther@suse.de>
9161
9162 * c-common.c (shorten_compare): Do not shorten mixed
9163 DFP and non-DFP compares.
9164
26f0e1d6
ESR
91652014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9166
9167 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
9168 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
9169 Commentary and rearrangement of tests.
9170 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
9171 Commentary and rearrangement of tests.
ab20d992 9172 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
9173 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
9174
ef4bddc2
RS
91752014-10-29 Richard Sandiford <richard.sandiford@arm.com>
9176
9177 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
9178 enum from machine_mode.
9179
c582198b
AM
91802014-10-28 Andrew MacLeod <amacleod@redhat.com>
9181
adfac8df
JJ
9182 * c-common.c: Adjust include files.
9183 * c-gimplify.c: Ditto.
9184 * cilk.c: Ditto.
9185 * c-pragma.c: Ditto.
9186 * c-ubsan.c: Ditto.
c582198b 9187
60393bbc
AM
91882014-10-27 Andrew MacLeod <amacleod@redhat.com>
9189
9190 * c-gimplify.c: Adjust include files.
9191
d723bb7c
MLI
91922014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
9193
9194 PR c++/53061
9195 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
9196 c_common_initialize_diagnostics.
9197 * c-common.h: Likewise.
9198
90f3520e
MP
91992014-10-24 Marek Polacek <polacek@redhat.com>
9200
9201 PR c/56980
9202 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
9203 print "struct"/"union"/"enum" for typedefed names.
9204
59d7607a
MP
92052014-10-23 Marek Polacek <polacek@redhat.com>
9206
9207 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
9208 in unsigned type.
9209
d95a2703
JJ
92102014-10-22 Jakub Jelinek <jakub@redhat.com>
9211 Yury Gribov <y.gribov@samsung.com>
9212
9213 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9214 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
9215 instead of flag_sanitize_recover as bool flag.
9216
8e6ef852
KY
92172014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
9218
9219 * cilk.c: Revert previous change.
9220
948cf550
IZ
92212014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
9222
9223 PR c/63307
9224 * cilk.c: Include vec.h.
9225 (struct cilk_decls): New structure.
9226 (wrapper_parm_cb): Split this function to...
9227 (fill_decls_vec): ...this...
9228 (create_parm_list): ...and this.
9229 (compare_decls): New function.
9230 (for_local_cb): Remove.
9231 (wrapper_local_cb): Ditto.
9232 (build_wrapper_type): For now first traverse and fill vector of
9233 declarations then sort it and then deal with sorted vector.
9234 (cilk_outline): Ditto.
9235 (declare_one_free_variable): Ditto.
9236
92574c7c
MP
92372014-10-17 Marek Polacek <polacek@redhat.com>
9238
9239 * c-opts.c (c_common_post_options): Set warn_implicit_int.
9240 * c.opt (Wimplicit-int): Initialize to -1.
9241
83685514
AM
92422014-10-16 Andrew MacLeod <amacleod@redhat.com>
9243
9244 * c-pragma.c: Adjust include files.
9245 * c-semantics.c: Likewise.
9246
5b8300ea
DD
92472014-10-16 DJ Delorie <dj@redhat.com>
9248
9249 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
9250 multiples of bytes.
9251
5f83e90b
JM
92522014-10-14 Jason Merrill <jason@redhat.com>
9253
9254 PR c++/63455
9255 * c-common.h (CPP_PREPARSED_EXPR): New.
9256 (N_CP_TTYPES): Adjust.
9257
d73326ca
MP
92582014-10-15 Marek Polacek <polacek@redhat.com>
9259
9260 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
9261
78a7c317
DD
92622014-10-14 DJ Delorie <dj@redhat.com>
9263
9264 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
9265 types, not just __int128.
9266 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
9267 types, not just __int128.
9268 (cpp_atomic_builtins): Round pointer sizes up.
9269 (type_suffix): Use type precision, not specific types.
9270 * c-common.c (c_common_reswords): Remove __int128 special case.
9271 (c_common_type_for_size): Check for all __intN types, not just
9272 __int128.
9273 (c_common_type_for_mode): Likewise.
9274 (c_common_signed_or_unsigned_type): Likewise.
9275 (c_build_bitfield_integer_type): Likewise.
9276 (c_common_nodes_and_builtins): Likewise.
9277 (keyword_begins_type_specifier): Likewise.
9278 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
9279 __intN variants.
9280
2a22f99c
TS
92812014-10-12 Trevor Saunders <tsaunders@mozilla.com>
9282
9283 * c-common.c: Use hash_table instead of hashtab.
9284
2a8ef767
ESR
92852014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
9286
adfac8df 9287 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
9288 C++11 section.
9289
3c9aabbd
MG
92902014-10-03 Marc Glisse <marc.glisse@inria.fr>
9291
9292 PR c++/54427
9293 PR c++/57198
9294 PR c++/58845
9295 * c-common.c (warn_logical_operator): Punt for vectors.
9296
a15f7cb8
ESR
92972014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
9298
9299 Implement SD-6: SG10 Feature Test Recommendations
9300 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
9301 macros and the __has_header macro.
9302
8d0cf15e
JM
93032014-09-30 Jason Merrill <jason@redhat.com>
9304
dd5d5481
JM
9305 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
9306 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
9307 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9308
b752325e
JM
9309 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
9310 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
9311
8d0cf15e
JM
9312 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
9313 * c-common.c (c_common_reswords): Remove __is_convertible_to.
9314
083e891e
MP
93152014-09-24 Marek Polacek <polacek@redhat.com>
9316
9317 PR c/61405
9318 PR c/53874
9319 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
9320
7861b648
AK
93212014-09-23 Andi Kleen <ak@linux.intel.com>
9322
9323 * c-common.c (handle_no_reorder_attribute): New function.
9324 (c_common_attribute_table): Add no_reorder attribute.
9325
9a79452d
JM
93262014-09-22 Joseph Myers <joseph@codesourcery.com>
9327
9328 * c-cppbuiltin.c (c_cpp_builtins): Define
9329 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
9330 modes.
9331
dd69f047
JM
93322014-09-18 Joseph Myers <joseph@codesourcery.com>
9333
9334 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
9335 for supported floating-point modes.
9336
737a4826
MLI
93372014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9338
9339 * c.opt (Wpsabi): Use LangEnabledBy.
9340 * c-opts.c (c_common_handle_option): Do not handle here.
9341
8cc4b7a2
JM
93422014-09-12 Joseph Myers <joseph@codesourcery.com>
9343
9344 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
9345 macros for floating-point modes.
9346
179b5a55
MG
93472014-09-11 Marc Glisse <marc.glisse@inria.fr>
9348
9349 PR target/58757
9350 * c-cppbuiltin.c (builtin_define_float_constants): Correct
9351 __*_DENORM_MIN__ without denormals.
9352
570a11fe
JJ
93532014-09-10 Jakub Jelinek <jakub@redhat.com>
9354
9355 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9356 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9357 ubsan_create_data callers.
9358 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
9359 index is constant or BIT_AND_EXPR with constant mask and is
9360 small enough for the bound.
9361 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
9362 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
9363
b559c810
MLI
93642014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9365
9366 * c.opt: Add CppReason to various flags.
9367 (Wdate-time): Re-sort.
9368 * c-common.c: Include c-common.h earlier.
9369 (struct reason_option_codes_t): Delete.
9370 (c_option_controlling_cpp_error): Prefix global type and struct
9371 with cpp_.
9372
1ef33fd4
MLI
93732014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9374
9375 * c.opt (Wnormalized): New.
9376 (Wnormalized=): Use Enum and Reject Negative.
9377 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
9378
66bb34c0
JM
93792014-09-08 Joseph Myers <joseph@codesourcery.com>
9380
9381 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
9382 digits of floating-point modes if -fbuilding-libgcc.
9383
53d68b9f
JM
93842014-09-05 Joseph Myers <joseph@codesourcery.com>
9385
9386 * c-cppbuiltin.c (c_cpp_builtins): Also define
9387 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
9388 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
9389 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
9390 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
9391 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
9392 __LIBGCC_STACK_GROWS_DOWNWARD__,
9393 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
9394 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
9395 __LIBGCC_DWARF_FRAME_REGISTERS__,
9396 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
9397 __LIBGCC_STACK_POINTER_REGNUM__ and
9398 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
9399 (builtin_define_with_value): Handle backslash-escaping in string
9400 macro values.
9401
f65586dc
RB
94022014-09-05 Richard Biener <rguenther@suse.de>
9403
9404 PR middle-end/63148
9405 * c-format.c (check_format_arg): Properly handle
9406 effectively signed POINTER_PLUS_EXPR offset.
9407
2b71f4a4
MLI
94082014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9409
9410 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
9411 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
9412 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
9413 and Init.
9414 * c-opts.c (c_common_handle_option): Do not handle here.
9415 (sanitize_cpp_opts): Likewise.
9416 * c-common.c (struct reason_option_codes_t): Handle
9417 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
9418
d2e4feca
MP
94192014-09-03 Marek Polacek <polacek@redhat.com>
9420
9421 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
9422
9a771876
JJ
94232014-09-02 Jakub Jelinek <jakub@redhat.com>
9424 Balaji V. Iyer <balaji.v.iyer@intel.com>
9425 Igor Zamyatin <igor.zamyatin@intel.com>
9426
9427 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
9428 * c-common.c (c_common_reswords): Added _Cilk_for.
9429 * c-common.h (enum rid): Added RID_CILK_FOR.
9430 (cilk_for_number_of_iterations): Add declaration.
9431 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
9432 CILK_FOR.
9433 * c-pragma.c (init_pragma): Register "grainsize" pragma.
9434 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
9435
81b5d104
MLI
94362014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9437
9438 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
9439 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
9440 Wundef): Use CPP, Var and Init.
9441 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
9442
b753b37b
MLI
94432014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
9444
9445 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
9446 * c-opts.c (c_common_handle_option): Do not handle here.
9447
028aee17
JM
94482014-08-25 Jason Merrill <jason@redhat.com>
9449
9450 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
9451 -std=c++14 and -std=gnu++14, rather than the reverse.
9452 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
9453 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
9454 * c-common.h (cxx_dialect): Remove cxx1y.
9455
e4276ba5
ESR
94562014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
9457
9458 * c-common.h (enum cxx_dialect): Add cxx14.
9459 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
9460 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
9461 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
9462
a545cacd
JM
94632014-08-22 Jason Merrill <jason@redhat.com>
9464
9465 * c.opt (std=gnu++17): Fix alias.
9466
59ea0364
MP
94672014-08-22 Marek Polacek <polacek@redhat.com>
9468
9469 PR c++/62199
9470 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
9471 check for vector types. Drop LHS argument.
9472 * c-common.h (warn_logical_not_parentheses): Adjust.
9473
596e808c
MLI
94742014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9475
9476 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
9477 (Wmultichar): Likewise.
9478 (Wdate-time): Use C-family languages instead of Common. Use CPP
9479 and Var.
9480 * c-opts.c (c_common_handle_option): Do not handle the above
9481 options here.
9482 (sanitize_cpp_opts): Likewise.
9483
18767f65
MLI
94842014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
9485
9486 PR fortran/44054
9487 * c-opts.c: Include tree-diagnostics.h.
9488 (c_diagnostic_finalizer): New.
9489 (c_common_initialize_diagnostics): Use it.
9490
b4413594
MLI
94912014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9492
9493 PR preprocessor/51303
9494 * c-common.c (struct reason_option_codes_t option_codes):
9495 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
9496
43f9a13c
MLI
94972014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
9498
9499 PR c/60975
9500 PR c/53063
9501 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
9502 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
9503 (c_common_post_options): Call init_global_opts_from_cpp.
9504 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
9505
04159acf
MP
95062014-08-19 Marek Polacek <polacek@redhat.com>
9507
9508 PR c++/62153
9509 * c-common.c (maybe_warn_bool_compare): New function.
9510 * c-common.h (maybe_warn_bool_compare): Declare.
9511 * c.opt (Wbool-compare): New option.
9512
35aff4fb
MP
95132014-08-19 Marek Polacek <polacek@redhat.com>
9514
9515 * c.opt (Wc99-c11-compat): New option.
9516
177cce46
MP
95172014-08-19 Marek Polacek <polacek@redhat.com>
9518
9519 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
9520 to warn_c90_c99_compat.
9521 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
9522 to -1.
9523
6ae9194f
MLI
95242014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
9525 Steven Bosscher <steven@gcc.gnu.org>
9526
9527 PR c/52952
9528 * c-format.c: Add extra_arg_loc and format_string_loc to struct
9529 format_check_results.
9530 (check_function_format): Use true and add comment for boolean
9531 argument.
9532 (finish_dollar_format_checking): Use explicit location when warning.
9533 (check_format_info): Likewise.
9534 (check_format_arg): Set extra_arg_loc and format_string_loc.
9535 (check_format_info_main): Use explicit location when warning.
9536 (check_format_types): Pass explicit location.
9537 (format_type_warning): Likewise.
9538
8e54f6d3
MLI
95392014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9540
9541 PR fortran/44054
9542 * c-format.c: Handle Fortran flags.
9543
cd4e76fc
IZ
95442014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
9545
9546 PR other/61962
9547 * array-notation-common.c (find_rank): Added handling for other
9548 types of references.
9549
f3bede71
MP
95502014-08-10 Marek Polacek <polacek@redhat.com>
9551
9552 PR c/51849
9553 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
9554 * c.opt (Wc90-c99-compat): Add option.
9555
9f25a338
TS
95562014-08-07 Trevor Saunders <tsaunders@mozilla.com>
9557
9558 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
9559
62e4eb35
MP
95602014-08-03 Marek Polacek <polacek@redhat.com>
9561
ab20d992 9562 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
9563 (c_add_case_label): Pass loc to check_case_value.
9564
b787e7a2
TS
95652014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9566
9567 * cilk.c: Use hash_map instead of pointer_map.
9568
6e2830c3
TS
95692014-08-02 Trevor Saunders <tsaunders@mozilla.com>
9570
9571 * c-gimplify.c: Use hash_set instead of pointer_set.
9572
a7ee52fb
IZ
95732014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
9574
9575 PR middle-end/61455
9576 * array-notation-common.c (extract_array_notation_exprs): Handling
9577 of DECL_EXPR added.
9578
944fa280
JJ
95792014-08-01 Jakub Jelinek <jakub@redhat.com>
9580
9581 * c-common.h (min_align_of_type): Removed prototype.
9582 * c-common.c (min_align_of_type): Removed.
9583 * c-ubsan.h (ubsan_maybe_instrument_reference,
9584 ubsan_maybe_instrument_member_call): New prototypes.
9585 * c-ubsan.c: Include stor-layout.h and builtins.h.
9586 (ubsan_maybe_instrument_reference_or_call,
9587 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
9588 functions.
9589
b4dfdc11
MG
95902014-07-31 Marc Glisse <marc.glisse@inria.fr>
9591
9592 PR c++/60517
9593 * c.opt (-Wreturn-local-addr): Move to common.opt.
9594
a41844e5
JM
95952014-07-30 Jason Merrill <jason@redhat.com>
9596
9597 PR c++/61659
9598 PR c++/61687
9599 Revert:
9600 * c.opt (-fuse-all-virtuals): New.
9601
976d5a22
TT
96022014-07-30 Tom Tromey <tromey@redhat.com>
9603
9604 PR c/59855
9605 * c.opt (Wdesignated-init): New option.
9606 * c-common.c (c_common_attribute_table): Add "designated_init".
9607 (handle_designated_init): New function.
9608
cdc94aca
MP
96092014-07-24 Marek Polacek <polacek@redhat.com>
9610
9611 PR c/57653
9612 * c-opts.c (c_finish_options): If -imacros is in effect, return.
9613
f41373b6
DS
96142014-07-16 Dodji Seketeli <dodji@redhat.com>
9615
9616 PR preprocessor/60723 - missing system-ness marks for macro tokens
9617 * c-ppoutput.c (struct print::prev_was_system_token): New data
9618 member.
9619 (init_pp_output): Initialize it.
9620 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
9621 (do_line_change): Return a flag saying if a line marker was
9622 emitted or not.
9623 (scan_translation_unit): Detect if the system-ness of the token we
9624 are about to emit is different from the one of the previously
9625 emitted token. If so, emit a line marker. Avoid emitting useless
9626 adjacent line markers. Avoid emitting line markers for tokens
9627 originating from the expansion of built-in macros.
9628 (scan_translation_unit_directives_only): Adjust.
9629
4d661eaa
MP
96302014-07-15 Marek Polacek <polacek@redhat.com>
9631
9632 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
9633 TYPE_MAX_VALUE is NULL.
9634
b108f48f
JJ
96352014-07-14 Jakub Jelinek <jakub@redhat.com>
9636
9637 PR middle-end/61294
9638 * c.opt (Wmemset-transposed-args): New warning.
9639
c0221884
JM
96402014-07-10 Jason Merrill <jason@redhat.com>
9641
9642 PR c++/61659
9643 PR c++/61687
9644 * c.opt (-fuse-all-virtuals): New.
9645
63dfbb95
RB
96462014-07-09 Richard Biener <rguenther@suse.de>
9647
9648 PR c-family/61741
9649 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
9650 using unsigned arithmetic if overflow does not wrap instead of
9651 if overflow is undefined.
9652
773ec47f
MP
96532014-07-06 Marek Polacek <polacek@redhat.com>
9654
9655 PR c/6940
9656 * c.opt (Wsizeof-array-argument): New option.
9657
00a7ba58
JJ
96582014-07-03 Jakub Jelinek <jakub@redhat.com>
9659
b1726d6c 9660 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
9661 comments->count <= 1, as comments->entries might be NULL.
9662
52ec0ea3
MP
96632014-07-01 Marek Polacek <polacek@redhat.com>
9664
9665 * c.opt (Wint-conversion): New option.
9666
d5c3d343
MP
96672014-07-01 Marek Polacek <polacek@redhat.com>
9668
9669 PR c/58286
9670 * c.opt (Wincompatible-pointer-types): New option.
9671
6e7ceb17
PC
96722014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
9673
9674 PR c++/51400
9675 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
9676 Do not discard TYPE_QUALS of type.
9677
da73100b
JM
96782014-06-26 Jason Merrill <jason@redhat.com>
9679
9680 * c-common.h (enum cxx_dialect): Add cxx1z.
9681 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
9682 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
9683
08eedf75
TJ
96842014-06-26 Teresa Johnson <tejohnson@google.com>
9685
9686 * c-common.h (get_dump_info): Declare.
9687 * c-gimplify.c (c_genericize): Use saved dump files.
9688 * c-opts.c (c_common_parse_file): Begin and end dumps
9689 once around parsing invocation.
9690 (get_dump_info): New function.
9691
7b56b2f8
MP
96922014-06-23 Marek Polacek <polacek@redhat.com>
9693 Andrew MacLeod <amacleod@redhat.com>
9694
9695 PR c/61553
9696 * c-common.c (get_atomic_generic_size): Don't segfault if the
9697 type doesn't have a size.
9698
0e37a2f3
MP
96992014-06-20 Marek Polacek <polacek@redhat.com>
9700
9701 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
9702 (ubsan_walk_array_refs_r): New function.
9703 (c_genericize): Instrument array bounds.
9704 * c-ubsan.c: Include "internal-fn.h".
9705 (ubsan_instrument_division): Mark instrumented arrays as having
9706 side effects. Adjust ubsan_type_descriptor call.
9707 (ubsan_instrument_shift): Likewise.
9708 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
9709 (ubsan_instrument_bounds): New function.
9710 (ubsan_array_ref_instrumented_p): New function.
9711 (ubsan_maybe_instrument_array_ref): New function.
9712 * c-ubsan.h (ubsan_instrument_bounds): Declare.
9713 (ubsan_array_ref_instrumented_p): Declare.
9714 (ubsan_maybe_instrument_array_ref): Declare.
9715
97162014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
9717
9718 PR lto/61123
9719 * c.opt (fshort-enums): Add to LTO.
9720 * c.opt (fshort-wchar): Likewise.
9721
5c3d09f7
MP
97222014-06-16 Marek Polacek <polacek@redhat.com>
9723
9724 PR c/60439
9725 * c.opt (Wswitch-bool): Add Var.
9726
9cf32741
JJ
97272014-06-12 Jakub Jelinek <jakub@redhat.com>
9728
9729 PR middle-end/61486
9730 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
9731 #pragma omp target teams or
9732 #pragma omp {,target }teams distribute simd.
9733
62984918
JM
97342014-06-12 Jason Merrill <jason@redhat.com>
9735
9736 * c.opt (Wabi=, fabi-compat-version): New.
9737 * c-opts.c (c_common_handle_option): Handle -Wabi=.
9738 (c_common_post_options): Handle flag_abi_compat_version default.
9739 Disallow -fabi-compat-version=1.
9740 * c-common.h (abi_version_crosses): New.
9741
f961457f
JH
97422014-06-11 Jan Hubicka <hubicka@ucw.cz>
9743
adfac8df 9744 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
9745 section names that are no longer trees.
9746
92d28cbb
JJ
97472014-06-10 Jakub Jelinek <jakub@redhat.com>
9748
9749 PR fortran/60928
9750 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
9751 (omp_pragmas): ... back here.
9752
742938c9
MP
97532014-06-05 Marek Polacek <polacek@redhat.com>
9754
9755 PR c/49706
9756 * c-common.c (warn_logical_not_parentheses): New function.
9757 * c-common.h (warn_logical_not_parentheses): Declare.
9758 * c.opt (Wlogical-not-parentheses): New option.
9759
9d548dfb
MP
97602014-06-04 Marek Polacek <polacek@redhat.com>
9761
9762 PR c/30020
9763 * c-common.c (check_case_bounds): Add location parameter.
9764 Use it.
9765 (c_add_case_label): Pass loc to check_case_bounds.
9766
fedfecef
MP
97672014-06-03 Marek Polacek <polacek@redhat.com>
9768
9769 PR c/60439
9770 * c.opt (Wswitch-bool): New option.
9771
f6a7cffc
TS
97722014-05-22 Thomas Schwinge <thomas@codesourcery.com>
9773
040d18b6
TS
9774 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
9775 Remove prototypes.
9776 (record_types_used_by_current_var_decl): Move prototype to where
9777 it belongs.
9778
f6a7cffc
TS
9779 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9780 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9781 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9782
632f2871
RS
97832014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
9784
9785 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
9786 * c-common.c (c_common_nodes_and_builtins): Don't initialize
9787 void_zero_node.
9788 * c-pretty-print.c (pp_c_void_constant): New function.
9789 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
9790 (c_pretty_printer::expression): Handle VOID_CST.
9791 * cilk.c (extract_free_variables): Likewise.
9792 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
9793 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
9794
766090c2
TS
97952014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9796
9797 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
9798 * c-pragma.c (push_alignment): Adjust.
9799 (handle_pragma_push_options): Likewise.
9800
661a0813
MP
98012014-05-09 Marek Polacek <polacek@redhat.com>
9802
9803 PR c/50459
9804 * c-common.c (check_user_alignment): Return -1 if alignment is error
9805 node.
9806 (handle_aligned_attribute): Don't call default_conversion on
9807 FUNCTION_DECLs.
9808 (handle_vector_size_attribute): Likewise.
9809 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
9810 (handle_sentinel_attribute): Call default_conversion and allow even
9811 integral types as an argument.
9812
2793eeab
MP
98132014-05-08 Marek Polacek <polacek@redhat.com>
9814
9815 PR c/61053
9816 * c-common.c (min_align_of_type): New function factored out from...
9817 (c_sizeof_or_alignof_type): ...here.
9818 * c-common.h (min_align_of_type): Declare.
9819
f827930a
MP
98202014-05-08 Marek Polacek <polacek@redhat.com>
9821
9822 PR c/61077
9823 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
9824 parameter type of main.
9825
ca49b74e
DD
98262014-05-07 DJ Delorie <dj@redhat.com>
9827
9828 * c-cppbuiltin.c (print_bits_of_hex): New.
9829 (builtin_define_type_minmax): Print values using hex so as not to
9830 require a pre-computed list of string values.
9831
1d60af08
KZ
98322014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9833 Mike Stump <mikestump@comcast.net>
9834 Richard Sandiford <rdsandiford@googlemail.com>
9835
9836 * c-ada-spec.c: Include wide-int.h.
9837 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
9838 (dump_generic_ada_node): Use wide-int interfaces.
9839 * c-common.c: Include wide-int-print.h.
9840 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
9841 (pointer_int_sum): Use wide-int interfaces.
9842 (c_common_nodes_and_builtins): Use make_int_cst.
9843 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
9844 (handle_alloc_size_attribute): Use wide-int interfaces.
9845 (get_nonnull_operand): Likewise.
9846 * c-format.c (get_constant): Use tree_fits_uhwi_p.
9847 * c-lex.c: Include wide-int.h.
9848 (narrowest_unsigned_type): Take a widest_int rather than two
9849 HOST_WIDE_INTs.
9850 (narrowest_signed_type): Likewise.
9851 (interpret_integer): Update accordingly. Use wide-int interfaces.
9852 (lex_charconst): Use wide-int interfaces.
9853 * c-pretty-print.c: Include wide-int.h.
9854 (pp_c_integer_constant): Use wide-int interfaces.
9855 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
9856 INT_CST_LT_UNSIGNED.
9857
b15458be
RB
98582014-05-06 Richard Biener <rguenther@suse.de>
9859
9860 * c-opts.c (c_common_post_options): For -freestanding,
9861 -fno-hosted and -fno-builtin disable pattern recognition
9862 if not enabled explicitely.
9863
6577374e
MP
98642014-05-02 Marek Polacek <polacek@redhat.com>
9865
9866 * c.opt (Wsizeof-pointer-memaccess): Describe option.
9867
d00887e8
MP
98682014-05-01 Marek Polacek <polacek@redhat.com>
9869
9870 PR c/43245
9871 * c.opt (Wdiscarded-qualifiers): Add.
9872
f8ed5150
MP
98732014-04-30 Marek Polacek <polacek@redhat.com>
9874
9875 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
9876 INT_MIN / -1 sanitization only for integer types.
9877
45484dcf
MP
98782014-04-25 Marek Polacek <polacek@redhat.com>
9879
9880 PR c/18079
9881 * c-common.c (handle_noinline_attribute): Warn if the attribute
9882 conflicts with always_inline attribute.
9883 (handle_always_inline_attribute): Warn if the attribute conflicts
9884 with noinline attribute.
9885
38e514c0
MP
98862014-04-25 Marek Polacek <polacek@redhat.com>
9887
9888 PR c/60156
9889 * c-common.c (check_main_parameter_types): Warn about variadic main.
9890
44875f92
MS
98912014-04-24 Mike Stump <mikestump@comcast.net>
9892
9893 * c.opt (Wshadow-ivar): Default to on.
9894
dcaaa5a0
DP
98952014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
9896
9897 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
9898
c07d7c02
MP
98992014-04-23 Marek Polacek <polacek@redhat.com>
9900
9901 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
9902
1c33c9b7
JJ
99032014-04-22 Jakub Jelinek <jakub@redhat.com>
9904
9905 PR sanitizer/60275
9906 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
9907 if flag_sanitize_undefined_trap_on_error.
9908 (ubsan_instrument_division, ubsan_instrument_shift,
9909 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
9910 if !flag_sanitize_recover.
9911
793c625f
MG
99122014-04-22 Marc Glisse <marc.glisse@inria.fr>
9913
9914 PR libstdc++/43622
9915 * c-common.c (registered_builtin_types): Make non-static.
9916 * c-common.h (registered_builtin_types): Declare.
9917
b0f1bf36 99182014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 9919 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
9920
9921 PR c/60819
9922 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
9923 apply may-alias the scalar pointer type when applicable.
9924
3b07fa4a
IZ
99252014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
9926
9927 PR middle-end/60467
9928 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
9929 as possible argument for Cilk_spawn.
9930
cbbd2b1c
TB
99312014-04-11 Tobias Burnus <burnus@net-b.de>
9932
9933 PR c/60194
9934 * c.opt (Wformat-signedness): Add
9935 * c-format.c(check_format_types): Use it.
9936
6415bd5d
JM
99372014-04-11 Jason Merrill <jason@redhat.com>
9938
9939 PR c++/57926
9940 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
9941 default_conversion for an array argument.
9942
6525783a
MP
99432014-04-08 Marek Polacek <polacek@redhat.com>
9944
9945 PR sanitizer/60745
9946 * c-ubsan.c: Include asan.h.
9947 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
9948
880a467b
NS
99492014-04-03 Nathan Sidwell <nathan@codesourcery.com>
9950
9951 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
9952
7b59ff2d
MP
99532014-04-02 Marek Polacek <polacek@redhat.com>
9954
9955 * c-common.h (c_expand_expr): Remove declaration.
9956
8edbfaa6
JJ
99572014-03-28 Jakub Jelinek <jakub@redhat.com>
9958
9959 PR c++/60689
9960 * c-common.c (add_atomic_size_parameter): When creating new
9961 params vector, push the size argument first.
9962
07d72e1d
JJ
99632014-03-26 Jakub Jelinek <jakub@redhat.com>
9964
9965 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
9966 ubsan_instrument_vla, ubsan_instrument_return): Adjust
9967 ubsan_create_data callers.
9968
b35e0fa0
JJ
99692014-03-22 Jakub Jelinek <jakub@redhat.com>
9970
9971 PR debug/60603
9972 * c-opts.c (c_finish_options): Restore cb_file_change call to
9973 <built-in>.
9974
39a1ebb3
JJ
99752014-03-13 Jakub Jelinek <jakub@redhat.com>
9976
9977 PR middle-end/36282
9978 * c-pragma.c (apply_pragma_weak): Only look at
9979 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
9980 DECL_ASSEMBLER_NAME_SET_P (decl).
9981 (maybe_apply_pending_pragma_weaks): Exit early if
9982 vec_safe_is_empty (pending_weaks) rather than only when
9983 !pending_weaks.
9984 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
9985 set assembler name back to NULL afterwards.
9986
a07f6ed2
JM
99872014-03-11 Jason Merrill <jason@redhat.com>
9988
9989 * c.opt: Add -std=gnu++14.
9990
75b107f5
IB
99912014-03-11 Ian Bolton <ian.bolton@arm.com>
9992
9993 * c-opts.c (c_common_post_options): Don't override
9994 -ffp-contract=fast if unsafe-math-optimizations is on.
9995
f42c637e
PM
99962014-03-08 Paulo Matos <paulo@matos-sorge.com>
9997
22b15758 9998 * c.opt: Enable LTO FE for fshort-double.
f42c637e 9999
70e24808
JM
100002014-03-07 Jason Merrill <jason@redhat.com>
10001
10002 * c.opt: Add -std=c++14.
10003
3af9c5e9
MP
100042014-03-06 Marek Polacek <polacek@redhat.com>
10005
10006 PR c/60197
10007 * cilk.c (contains_cilk_spawn_stmt): New function.
10008 (contains_cilk_spawn_stmt_walker): Likewise.
10009 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
10010 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
10011
b3bdf019
JJ
100122014-03-03 Jakub Jelinek <jakub@redhat.com>
10013
10014 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
10015 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
10016 even when flag_preprocess_only.
10017
ca7e759d
JM
100182014-02-26 Jason Merrill <jason@redhat.com>
10019
10020 PR c++/59231
10021 PR c++/11586
10022 * c-common.c (shorten_compare): Don't check
10023 c_inhibit_evaluation_warnings.
10024
28e41874
JJ
100252014-02-19 Jakub Jelinek <jakub@redhat.com>
10026
cca615af
JJ
10027 PR c/37743
10028 * c-common.c (c_common_nodes_and_builtins): When initializing
10029 c_uint{16,32,64}_type_node, also set corresponding
10030 uint{16,32,64}_type_node to the same value.
10031
28e41874
JJ
10032 PR c++/60267
10033 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
10034 for PRAGMA_IVDEP if flag_preprocess_only.
10035
c2bf53a1
JJ
100362014-02-12 Jakub Jelinek <jakub@redhat.com>
10037
10038 PR c/60101
10039 * c-common.c (merge_tlist): If copy is true, call new_tlist,
10040 if false, add ADD itself, rather than vice versa.
10041 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
10042 copy. For SAVE_EXPR, only call merge_tlist once.
10043
8fcbce72
JJ
100442014-02-08 Jakub Jelinek <jakub@redhat.com>
10045
10046 PR middle-end/60092
10047 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
10048 and tree_to_uhwi.
10049 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
10050 functions.
10051 (c_common_attribute_table): Add alloc_align and assume_aligned
10052 attributes.
10053
0a756a3f
MP
100542014-02-06 Marek Polacek <polacek@redhat.com>
10055
10056 PR c/60087
10057 * c-common.c (warn_for_sign_compare): Call warning_at with location
10058 instead of warning.
10059
7ec4847a
MP
100602014-02-05 Marek Polacek <polacek@redhat.com>
10061
10062 PR c/53123
10063 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
10064 statement.
10065
66f20604
MP
100662014-02-04 Marek Polacek <polacek@redhat.com>
10067
10068 PR c/60036
10069 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
10070 SAVE_EXPR.
10071
5d77fb19
MG
100722014-02-03 Marc Glisse <marc.glisse@inria.fr>
10073
10074 PR c++/53017
10075 PR c++/59211
10076 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
10077 handle_vector_size_attribute, handle_nonnull_attribute): Call
10078 default_conversion on the attribute argument.
10079 (handle_nonnull_attribute): Increment the argument number.
10080
81e5eca8
MP
100812014-01-31 Marek Polacek <polacek@redhat.com>
10082
10083 PR c/59963
10084 * c-common.c (add_atomic_size_parameter): Pass vNULL to
10085 build_function_call_vec.
10086 (resolve_overloaded_builtin): Likewise.
10087 * c-common.h (build_function_call_vec): Adjust declaration.
10088
68fca595
MP
100892014-01-30 Marek Polacek <polacek@redhat.com>
10090
10091 PR c/59940
10092 * c-common.h (unsafe_conversion_p): Adjust declaration.
10093 (warnings_for_convert_and_check): Likewise.
10094 (convert_and_check): Likewise.
10095 * c-common.c (unsafe_conversion_p): Add location parameter. Call
10096 expansion_point_location_if_in_system_header on it.
10097 (warnings_for_convert_and_check): Add location parameter. Call
10098 expansion_point_location_if_in_system_header on it. Use it.
10099 (convert_and_check): Add location parameter. Use it.
10100 (conversion_warning): Likewise.
10101 (c_add_case_label): Adjust convert_and_check calls.
10102 (scalar_to_vector): Adjust unsafe_conversion_p calls.
10103
b72271b9
BI
101042014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
10105
10106 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
10107 flag_cilkplus.
10108 * c-pragma.c (init_pragma): Likewise.
10109 * c.opt: Likewise.
10110
393e8e8b
MP
101112014-01-23 Marek Polacek <polacek@redhat.com>
10112
10113 PR c/59846
10114 * c-common.c (shorten_compare): Add location_t parameter.
10115 * c-common.h (shorten_binary_op): Adjust declaration.
10116
f04dda30
MP
101172014-01-23 Marek Polacek <polacek@redhat.com>
10118
10119 PR c/58346
10120 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
10121 * c-common.h: Declare it.
10122
621955cb
EB
101232014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10124
10125 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
10126 * c-ada-spec.c (dump_ads): Likewise.
10127 (cpp_check): Likewise.
10128 (dump_ada_specs): Likewise.
10129
101302014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
10131
10132 PR c++/49718
10133 * c-common.c (handle_no_instrument_function_attribute): Allow
10134 no_instrument_function attribute in class member
10135 definition/declaration.
10136
241f845a
JJ
101372014-01-15 Jakub Jelinek <jakub@redhat.com>
10138
10139 PR c/58943
10140 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
10141 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
10142 being COMPOUND_EXPR.
10143 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
10144 operand a SAVE_EXPR and second MODIFY_EXPR.
10145
e83b8e2e
JJ
101462014-01-09 Jakub Jelinek <jakub@redhat.com>
10147
10148 PR target/58115
10149 * c-pch.c (c_common_write_pch): Call
10150 prepare_target_option_nodes_for_pch.
10151
23a5b65a
RS
101522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10153
10154 Update copyright years
10155
f9030485
RS
101562014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
10157
10158 * array-notation-common.c, c-cilkplus.c: Use the standard form for
10159 the copyright notice.
10160
f2aa696b
EB
101612013-12-28 Eric Botcazou <ebotcazou@adacore.com>
10162
10163 * c-ada-spec.c (print_constructor): New function.
10164 (print_destructor): Retrieve the origin of the destructor.
10165 (print_ada_declaration): Revamp handling of constructors/destructors.
10166
3f8257db 101672013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
10168 Bill Maddox <maddox@google.com>
10169 Jason Merrill <jason@redhat.com>
10170
10171 * c.opt: Add -fdeclone-ctor-dtor.
10172 * c-opts.c (c_common_post_options): Default to on iff -Os.
10173
41958c28
BI
101742013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
10175
10176 * c-common.c (c_common_attribute_table): Added "cilk simd function"
10177 attribute.
10178 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 10179 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
10180 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
10181 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
10182 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
10183 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
10184 PRAGMA_CILK_CLAUSE_UNIFORM.
10185
b1726d6c 10186
12893402
BI
101872013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
10188
10189 * cilk.c (cilk_outline): Made this function non-static.
10190 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
10191 (create_cilk_wrapper): Added a new parameter: a function pointer.
10192 (c_install_body_w_frame_cleanup): Remove
10193 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
10194 * c-common.h (cilk_outline): New prototype.
10195 (gimplify_cilk_spawn): Removed two parameters.
10196 (cilk_install_body_with_frame_cleanup): New prototype.
10197 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
10198 CILK_SPAWN_STMT case.
10199
085b42ed
BS
102002013-12-11 Bernd Schmidt <bernds@codesourcery.com>
10201
2ce064c3
BS
10202 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
10203
085b42ed
BS
10204 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
10205 (int_array_type_node): Remove.
10206 * c-common.c (c_common_nodes_and_builtins): Don't build it.
10207
9e36c9ed
MP
102082013-12-05 Marek Polacek <polacek@redhat.com>
10209
10210 PR c/52023
10211 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
10212 [ADJUST_FIELD_ALIGN].
10213
296674db
JM
102142013-12-04 Joseph Myers <joseph@codesourcery.com>
10215
10216 PR c/52023
10217 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
10218 and check field alignment if set.
10219 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
10220 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
10221
b1726d6c 102222013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
10223 Marek Polacek <polacek@redhat.com>
10224
10225 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
10226 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
10227
d7947e19
L
102282013-11-29 H.J. Lu <hongjiu.lu@intel.com>
10229
10230 PR c/59309
10231 * cilk.c (gimplify_cilk_spawn): Properly handle function without
10232 arguments.
10233
fad7652e
JJ
102342013-11-29 Jakub Jelinek <jakub@redhat.com>
10235
10236 PR c/59280
10237 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
10238 goto invalid. If it is error_mark_node, don't issue further
10239 diagnostics.
10240
8b5e1202
SO
102412013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
10242
10243 * c.opt (Wopenmp-simd): New.
10244
0a508bb6
JJ
102452013-11-22 Jakub Jelinek <jakub@redhat.com>
10246
10247 * c-ubsan.h (ubsan_instrument_return): New prototype.
10248 * c-ubsan.c (ubsan_instrument_return): New function.
10249
2fb9a547
AM
102502013-11-22 Andrew MacLeod <amacleod@redhat.com>
10251
10252 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
10253 * c-gimplify.c: Likewise.
10254 * cilk.c: Likewise.
2fb9a547 10255
8400e75e
DM
102562013-11-22 David Malcolm <dmalcolm@redhat.com>
10257
10258 * c-common.c (unsafe_conversion_p): Remove use of
10259 EXPR_LOC_OR_HERE macro.
10260 (conversion_warning): Likewise.
10261 (warnings_for_convert_and_check): Likewise.
10262 (warn_for_collisions_1): Likewise.
10263 (shorten_compare): Likewise, and remove use of in_system_header
10264 macro, using the location from the former.
10265 * c-lex.c (dump_one_header): Remove use of input_filename macro.
10266 (cb_def_pragma): Remove use of in_system_header macro.
10267 (lex_string): Likewise.
10268 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
10269
eb1ce453
KZ
102702013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10271 Mike Stump <mikestump@comcast.net>
10272 Richard Sandiford <rdsandiford@googlemail.com>
10273
10274 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
10275 instead of TREE_INT_CST_LOW, in cases where there is a protecting
10276 tree_fits_shwi_p or tree_fits_uhwi_p.
10277 (dump_generic_ada_node): Likewise.
10278 * c-format.c (check_format_arg): Likewise.
10279 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10280
6b3b8c27
KZ
102812013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
10282
10283 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
10284
49b0aa18
JC
102852013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
10286
10287 PR c/53001
10288 * c-common.c (unsafe_conversion_p): Make this function
10289 return an enumeration with more detail.
10290 (conversion_warning): Use the new return type of
10291 unsafe_conversion_p to separately warn either about conversions
10292 that lower floating point number precision or about the other
10293 kinds of conversions.
10294 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
10295 (unsafe_conversion_p): switching return type to
10296 conversion_safety enumeration.
49b0aa18
JC
10297 * c.opt: Adding new warning -Wfloat-conversion and
10298 enabling it with -Wconversion.
10299
b826515a
BS
103002013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
10301
8e745a17
JJ
10302 * c-opts.c: Include plugin.h.
10303 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 10304
b9a55b13
MP
103052013-11-19 Marek Polacek <polacek@redhat.com>
10306
10307 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
10308 call.
10309 (ubsan_instrument_shift): Likewise.
10310 (ubsan_instrument_vla): Likewise.
10311
7d362f6c
RS
103122013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10313
10314 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
10315 cast to unsigned type.
10316
386b1f1f
RS
103172013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10318
10319 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
10320 tree_low_cst.
10321 (complete_array_type): Update comment to refer to tree_to_[su]hwi
10322 rather than tree_low_cst.
10323
ae7e9ddd
RS
103242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10325
10326 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
10327 tree_to_uhwi throughout.
10328
9439e9a1
RS
103292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10330
10331 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
10332 tree_low_cst (..., 0) with tree_to_shwi throughout.
10333
cc269bb6
RS
103342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10335
10336 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
10337 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
10338
9541ffee
RS
103392013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
10340
10341 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
10342 host_integerp (..., 0) with tree_fits_shwi_p throughout.
10343
c02065fc
AH
103442013-11-15 Aldy Hernandez <aldyh@redhat.com>
10345
10346 * c-cilkplus.c: New file.
10347 * c-common.c (readonly_error): Add location argument.
10348 * c-common.h (readonly_error): Same.
10349 (c_finish_cilk_clauses): Protoize.
10350 (c_check_cilk_loop): Same.
10351 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
10352 Do not fail on error_mark_node.
10353 Abstract increment canonicalization to here...
10354 (c_omp_for_incr_canonicalize_ptr): New.
10355 c-pragma.c (init_pragma): Register "simd" pragma.
10356 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
10357 (enum pragma_cilk_clause): New.
10358
9cc65f15
RS
103592013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
10360
10361 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
10362 wchar_type and host_integerp checks.
10363
18f429e2
AM
103642013-11-14 Andrew MacLeod <amacleod@redhat.com>
10365
10366 * c-common.c: Likewise.
10367 * c-gimplify.c: Likewise.
10368 * cilk.c: Likewise.
10369
d8a2d370
DN
103702013-11-14 Diego Novillo <dnovillo@google.com>
10371
10372 * c-common.c: Include fold-const.h.
10373 Include stor-layout.h.
10374 Include calls.h.
10375 Include stringpool.h.
10376 Include attribs.h.
10377 Include varasm.h.
10378 Include trans-mem.h.
10379 * c-cppbuiltin.c: Include stor-layout.h.
10380 Include stringpool.h.
10381 * c-format.c: Include stringpool.h.
10382 * c-lex.c: Include stringpool.h.
10383 Include stor-layout.h.
10384 * c-pragma.c: Include stringpool.h.
10385 Include attribs.h.
10386 Include varasm.h.
10387 Include gcc-symtab.h.
10388 * c-pretty-print.c: Include stor-layout.h.
10389 Include attribs.h.
10390 * cilk.c: Include stringpool.h.
10391 Include calls.h.
10392
38b7bc7f
JM
103932013-11-13 Joseph Myers <joseph@codesourcery.com>
10394
10395 * c-common.h (enum rid): Add RID_AUTO_TYPE.
10396 * c-common.c (c_common_reswords): Add __auto_type.
10397 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
10398
45b0be94
AM
103992013-11-12 Andrew MacLeod <amacleod@redhat.com>
10400
18f429e2
AM
10401 * c-common.c: Include gimplify.h.
10402 * c-gimplify.c: Likewise.
10403 * cilk.c: Likewise.
10404 * c-omp.c: Include gimple-expr.h instead of gimple.h.
10405 * c-ubsan.c: Don't include gimple.h.
45b0be94 10406
582d9b50
JM
104072013-11-12 Joseph Myers <joseph@codesourcery.com>
10408
10409 * c-common.c (c_common_reswords): Add _Thread_local.
10410
6b28e197
JM
104112013-11-09 Joseph Myers <joseph@codesourcery.com>
10412
10413 * c-common.c (atomic_size_supported_p): New function.
10414 (resolve_overloaded_atomic_exchange)
10415 (resolve_overloaded_atomic_compare_exchange)
10416 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
10417 Use it instead of comparing size with a local list of sizes.
10418
267bac10
JM
104192013-11-07 Andrew MacLeod <amacleod@redhat.com>
10420 Joseph Myers <joseph@codesourcery.com>
10421
10422 * c-common.h (enum rid): Add RID_ATOMIC.
10423 * c-common.c (c_common_reswords): Add _Atomic.
10424 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
10425 (keyword_is_type_qualifier): Accept RID_ATOMIC.
10426 * c-format.c (check_format_types): Check for extra _Atomic
10427 qualifiers in format argument.
10428 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
10429 (pp_c_type_qualifier_list): Mention _Atomic in comment.
10430
5157b91e
TB
104312013-11-06 Tobias Burnus <burnus@net-b.de>
10432
10433 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
10434
6dbe0958
JM
104352013-11-06 Joseph Myers <joseph@codesourcery.com>
10436
10437 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
10438 standards modes.
10439 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
10440 to mean lack of IEEE 754 support.
10441
e8ff5196
TB
104422013-11-05 Tobias Burnus <burnus@net-b.de>
10443
10444 * c.opt (-Wdate-time): New option
10445 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
10446
254a0760
JM
104472013-11-05 Joseph Myers <joseph@codesourcery.com>
10448
10449 * c-cppbuiltin.c (cpp_iec_559_value): Test
10450 flag_excess_precision_cmdline not flag_excess_precision.
10451
6d7f7e0a
TB
104522013-11-05 Tobias Burnus <burnus@net-b.de>
10453
10454 * c.opt (fopenmp-simd): New option.
10455 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
10456 (omp_pragmas): ... this new struct.
10457 (c_pp_lookup_pragma): Also walk omp_pragmas.
10458 (init_pragma): Init pragmas for -fopenmp-simd.
10459
55a7f02f
MP
104602013-11-04 Marek Polacek <polacek@redhat.com>
10461
10462 PR c++/58979
10463 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
10464
9193fb05
JM
104652013-11-04 Joseph Myers <joseph@codesourcery.com>
10466
10467 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
10468 New functions.
10469 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
10470
94159ecf
EB
104712013-11-04 Eric Botcazou <ebotcazou@adacore.com>
10472
10473 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
10474 (dump_ada_specs): Adjust prototype of second callback.
10475 * c-ada-spec.c (cpp_check): New global variable.
10476 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
10477 (print_generic_ada_decl): Likewise.
10478 (has_static_fields): Change return type to bool and add guard.
10479 (has_nontrivial_methods): New predicate.
10480 (is_tagged_type): Change return type to bool.
10481 (separate_class_package): Call has_nontrivial_methods.
10482 (pp_ada_tree_identifier): Minor tweaks.
10483 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
10484 (dump_ada_array_domains): Likewise.
10485 (dump_ada_array_type): Likewise.
10486 (dump_template_types): Remove cpp_check parameter and do not pass it to
10487 dump_generic_ada_node.
10488 (dump_ada_template): Likewise.
10489 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
10490 recursively.
10491 (print_ada_methods): Change return type to integer. Remove cpp_check
10492 parameter and do not pass it down.
10493 (dump_nested_types): Remove cpp_check parameter and do not pass it to
10494 dump_generic_ada_node.
10495 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
10496 accessing methods.
10497 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
10498 down. Use has_nontrivial_methods to recognize C++ classes. Use return
10499 value of print_ada_methods.
10500 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
10501 Set cpp_check to it before invoking dump_ada_nodes.
10502 (dump_ada_specs): Likewise.
10503
b906f4ca
MP
105042013-11-03 Marek Polacek <polacek@redhat.com>
10505
10506 * c-ubsan.c: Don't include hash-table.h.
10507 (ubsan_instrument_vla): New function.
10508 * c-ubsan.h: Declare it.
10509
5e20cdc9
DM
105102013-10-31 David Malcolm <dmalcolm@redhat.com>
10511
10512 Automated part of renaming of symtab_node_base to symtab_node.
10513
10514 Patch autogenerated by rename_symtab.py from
10515 https://github.com/davidmalcolm/gcc-refactoring-scripts
10516 revision 58bb219cc090b2f4516a9297d868c245495ee622
10517
10518 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
10519 symtab_node_base to symtab_node.
10520
7057e645
ESR
105212013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
10522
8e745a17 10523 Implement C++14 digit separators.
7057e645
ESR
10524 * c-lex.c (interpret_float): Remove digit separators from scratch string
10525 before building real literal.
10526
193ea7bc
JJ
105272013-10-30 Jakub Jelinek <jakub@redhat.com>
10528
10529 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
10530
939b37da
BI
105312013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
10532
10533 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
10534 fields.
10535 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
10536 enabled.
10537 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
10538 (insert_cilk_frame): New prototype.
10539 (cilk_init_builtins): Likewise.
10540 (gimplify_cilk_spawn): Likewise.
10541 (c_cilk_install_body_w_frame_cleanup): Likewise.
10542 (cilk_detect_spawn_and_unwrap): Likewise.
10543 (cilk_set_spawn_marker): Likewise.
10544 (build_cilk_sync): Likewise.
10545 (build_cilk_spawn): Likewise.
10546 * cilk.c: New file.
10547
67348ccc
DM
105482013-10-29 David Malcolm <dmalcolm@redhat.com>
10549
10550 Patch autogenerated by refactor_symtab.py from
10551 https://github.com/davidmalcolm/gcc-refactoring-scripts
10552 revision 58bb219cc090b2f4516a9297d868c245495ee622
10553
10554 * c-gimplify.c (c_genericize): Update for conversion of symtab types
10555 to a true class hierarchy.
10556 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
10557
d570872d
RS
105582013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
10559
10560 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
10561
98906124
JL
105622013-10-26 Jeff Law <law@redhat.com>
10563
adfac8df
JJ
10564 * c-common.c (c_define_builtins): Remove mudflap support.
10565 * c.opt: Ignore and warn for mudflap options.
98906124 10566
d73749df 105672013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
10568
10569 PR other/33426
10570 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
10571 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
10572
3f04b1bb
JM
105732013-10-23 Jason Merrill <jason@redhat.com>
10574
10575 * c-format.c (gcc_cxxdiag_char_table): Add %X.
10576
acf0174b
JJ
105772013-10-11 Jakub Jelinek <jakub@redhat.com>
10578
acd15a28
JJ
10579 * c-common.h (omp_clause_mask::operator !=): New method.
10580 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
10581 instead of if (mask & something) tests everywhere.
10582
acf0174b
JJ
10583 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
10584 201307 instead of 201107.
10585 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
10586 (c_common_attribute_table): Add "omp declare target" and
10587 "omp declare simd" attributes.
10588 (handle_omp_declare_target_attribute,
10589 handle_omp_declare_simd_attribute): New functions.
10590 * c-omp.c: Include c-pragma.h.
10591 (c_finish_omp_taskgroup): New function.
10592 (c_finish_omp_atomic): Add swapped argument, if true,
10593 build the operation first with rhs, lhs arguments and use NOP_EXPR
10594 build_modify_expr.
10595 (c_finish_omp_for): Add code argument, pass it down to make_code.
10596 (c_omp_split_clauses): New function.
10597 (c_split_parallel_clauses): Removed.
10598 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
10599 c_omp_declare_simd_clauses_to_decls): New functions.
10600 * c-common.h (omp_clause_mask): New type.
10601 (OMP_CLAUSE_MASK_1): Define.
10602 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
10603 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
10604 omp_clause_mask::operator |, omp_clause_mask::operator &,
10605 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
10606 omp_clause_mask::operator ==): New methods.
10607 (enum c_omp_clause_split): New.
10608 (c_finish_omp_taskgroup): New prototype.
10609 (c_finish_omp_atomic): Add swapped argument.
10610 (c_finish_omp_for): Add code argument.
10611 (c_omp_split_clauses): New prototype.
10612 (c_split_parallel_clauses): Removed.
10613 (c_omp_declare_simd_clauses_to_numbers,
10614 c_omp_declare_simd_clauses_to_decls): New prototypes.
10615 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
10616 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
10617 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
10618 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
10619 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
10620 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
10621 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
10622 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
10623 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
10624 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
10625 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
10626 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
10627 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
10628 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
10629 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
10630 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
10631 PRAGMA_OMP_CLAUSE_UNIFORM.
10632
826cacfe
MG
106332013-10-09 Marc Glisse <marc.glisse@inria.fr>
10634
10635 PR tree-optimization/20318
10636 * c-common.c (handle_returns_nonnull_attribute): New function.
10637 (c_common_attribute_table): Add returns_nonnull.
10638
2284b034
MG
106392013-10-03 Marc Glisse <marc.glisse@inria.fr>
10640
10641 PR c++/19476
10642 * c.opt (fcheck-new): Move to common.opt.
10643
b56e9788
MP
106442013-09-25 Marek Polacek <polacek@redhat.com>
10645 Jakub Jelinek <jakub@redhat.com>
10646
10647 PR sanitizer/58413
10648 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
10649 an expression if we can prove it is correct.
10650 (ubsan_instrument_division): Likewise. Remove unnecessary
10651 check.
10652
ce6923c5
MP
106532013-09-18 Marek Polacek <polacek@redhat.com>
10654
10655 PR sanitizer/58411
10656 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
10657 Declare it.
10658 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
10659
fb5610fb
IS
106602013-09-14 Iain Sandoe <iain@codesourcery.com>
10661
10662 PR target/48094
10663 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
10664 fobjc-gc, freplace-objc-classes): Accept for LTO.
10665
88b0e79e
JC
106662013-09-13 Jacek Caban <jacek@codeweavers.com>
10667
10668 * c-target.def: New hook
10669
c9b0866a
PC
106702013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
10671
10672 PR c++/43452
10673 * c.opt (Wdelete-incomplete): Add.
10674
0af94e6f
JR
106752013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
10676
10677 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
10678 (vector_types_compatible_elements_p): New function.
10679 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
10680 declaration.
10681 (vector_types_compatible_elements_p): Declare.
10682
7c26172c
GDR
106832013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10684
10685 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
10686 a virtual member function.
10687 (pp_simple_type_specifier): Remove.
10688 (pp_c_type_specifier): Likewise.
10689 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
10690 Rename from pp_c_type_specifier. Adjust.
10691 (c_pretty_printer::c_pretty_printer): Do not assign to
10692 simple_type_specifier.
10693
20059c8b
GDR
106942013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10695
10696 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
10697 member function.
10698 (c_pretty_printer::storage_class_specifier): Likewise.
10699 (c_pretty_printer::initializer): Likewise.
10700 (pp_declaration): Remove.
10701 (pp_declaration_specifiers): Likewise.
10702 (pp_abstract_declarator): Likewise.
10703 (pp_declarator): Likewise.
10704 (pp_type_id): Likewise.
10705 (pp_statement): Likewise.
10706 (pp_constant): Likewise.
10707 (pp_id_expression): Likewise.
10708 (pp_primary_expression): Likewise.
10709 (pp_unary_expression): Likewise.
10710 (pp_multiplicative_expression): Likewise.
10711 (pp_conditional_expression): Likewise.
10712 (pp_assignment_expression): Likewise.
10713 (pp_expression): Likewise.
10714 (pp_c_type_id): Likewise.
10715 (pp_c_storage_class_specifier): Likewise.
10716 * c-pretty-print.c (pp_c_type_cast): Tidy.
10717 (pp_c_pointer): Likewise.
10718 (pp_c_type_specifier): Likewise.
10719 (pp_c_parameter_type_list): Likewise.
10720 (pp_c_function_definition): Likewise.
10721 (pp_c_init_declarator): Likewise.
10722 (pp_c_initializer_list): Likewise.
10723 (pp_c_constructor_elts): Likewise.
10724 (c_pretty_printer::direct_abstract_declarator): Likewise.
10725 (c_pretty_printer::declaration_specifiers): Likewise.
10726 (c_pretty_printer::primary_expression): Likewise.
10727 (c_pretty_printer::postfix_expression): Likewise.
10728 (c_pretty_printer::type_id): Rename from pp_c_type_id.
10729 (c_pretty_printer::storage_class_specifier): Rename from
10730 pp_c_storage_class_specifier.
10731 (c_pretty_printer::initializer): Rename from pp_c_initializer.
10732 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
10733 storage_class_specifier, initializer, offset_list, flags.
10734
de5a5fa1
MP
107352013-08-30 Marek Polacek <polacek@redhat.com>
10736
10737 * c-ubsan.c: New file.
10738 * c-ubsan.h: New file.
10739
8f0e4d72
GDR
107402013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
10741
10742 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
10743 member function.
10744 (c_pretty_printer::declaration_specifiers): Likewise.
10745 (c_pretty_printer::declarator): Likewise.
10746 (c_pretty_printer::abstract_declarator): Likewise.
10747 (c_pretty_printer::direct_abstract_declarator): Likewise.
10748 (c_pretty_printer::direct_declarator): Likewise.
10749 (c_pretty_printer::function_specifier): Likewise.
10750 (pp_declaration): Adjust.
10751 (pp_declaration_specifiers): Likewise.
10752 (pp_abstract_declarator): Likewise.
10753 (pp_direct_declarator): Likewise.
10754 (pp_function_specifier): Likewise.
10755 (pp_direct_abstract_declarator): Remove as unused.
10756 (pp_c_declaration): Remove.
10757 (pp_c_declaration_specifiers): Likewise.
10758 (pp_c_declarator): Likewise.
10759 (pp_c_direct_declarator): Likewise.
10760 (pp_c_function_specifier): Likewise.
10761 (pp_c_direct_abstract_declarator): Likewise.
10762 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
10763 from pp_c_abstract_declarator. Adjust.
ab20d992 10764 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
10765 pp_c_direct_abstract_declarator. Adjust.
10766 (c_pretty_printer::function_specifier): Rename from
10767 pp_c_function_specifier. Adjust.
10768 (c_pretty_printer::declaration_specifiers): Rename from
10769 pp_c_declaration_specifiers. Adjust.
10770 (c_pretty_printer::direct_declarator): Rename from
10771 pp_c_direct_declarator. Adjust.
10772 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
10773 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
10774 (c_pretty_printer::c_pretty_printer): Do not assign to
10775 declaration, declaration_specifiers, declarator,
10776 direct_declarator, direct_abstract_declarator, function_specifier.
10777
00d34d3a
GDR
107782013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
10779
10780 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
10781 virtual member function.
10782 (c_pretty_printer::multiplicative_expression): Likewise.
10783 (c_pretty_printer::conditional_expression): Likewise.
10784 (c_pretty_printer::assignment_expression): Likewise.
10785 (c_pretty_printer::expression): Likewise.
10786 (pp_unary_expression): Adjust.
10787 (pp_multiplicative_expression): Likewise.
10788 (pp_assignment_expression): Likewise.
10789 (pp_conditional_expression): Likewise.
10790 (pp_expression): Likewise.
10791 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
10792 from pp_c_unary_expression. Adjust.
10793 (c_pretty_printer::multiplicative_expression): Rename from
10794 pp_c_multiplicative_expression. Adjust.
10795 (c_pretty_printer::conditional_expression): Rename from
10796 pp_c_conditional_expression. Adjust.
10797 (c_pretty_printer::assignment_expression): Rename from
10798 pp_c_assignment_expression. Adjust.
10799 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
10800 (c_pretty_printer::c_pretty_printer): Do not assign to
10801 unary_expression, multiplicative_expression,
10802 conditional_expression, expression.
10803
fb22178f
GDR
108042013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10805
10806 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
10807 virtual member function.
10808 (pp_postfix_expression): Adjust.
10809 (pp_c_postfix_expression): Remove.
10810 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
10811 from pp_c_postfix_expression. Adjust.
10812 (c_pretty_printer::c_pretty_printer): Do not assign to
10813 postfix_expression.
10814
7ecc2600
GDR
108152013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10816
10817 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
10818 virtua member function.
10819 (pp_primary_expression): Adjust.
10820 (pp_c_primary_expression): Remove.
10821 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
10822 from pp_c_primary_expression. Adjust.
10823 (pp_c_initializer_list): Use pp_primary_expression.
10824 (c_pretty_printer::c_pretty_printer): Do not assign to
10825 primary_expression.
10826
0691175f
GDR
108272013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
10828
10829 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
10830 * c-pretty-print.c (M_): Remove.
10831 (c_pretty_printer::translate_string): Define.
10832 (pp_c_type_specifier): Use it.
10833 (pp_c_primary_expression): Likewise.
10834 (pp_c_expression): Likewise.
10835
66dfe4c4
GDR
108362013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10837
10838 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
10839 virtual function.
10840 (pp_c_id_expression): Remove.
10841 (pp_id_expression): Adjust.
10842 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
10843 pp_c_id_expression. Adjust.
10844 (pp_c_postfix_expression): Use pp_id_expression.
10845 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
10846
ca43e9d5
GDR
108472013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
10848
10849 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
10850 member function.
10851 (pp_constant): Adjust.
10852 (pp_c_constant): Remove.
10853 * c-pretty-print.c (c_pretty_printer::constant): Rename from
10854 pp_c_constant. Adjust.
10855 (pp_c_constant)
10856 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
10857 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
10858
da6ca2b5
GDR
108592013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10860
10861 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
10862 (c_pretty_printer::c_pretty_printer): Declare.
10863 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
10864 c_pretty_printer_init. Adjust.
10865 (print_c_tree): Do not call c_pretty_printer_init.
10866 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
10867
65a372f4
AC
108682013-08-09 Arnaud Charlet <charlet@adacore.com>
10869
10870 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
10871
fd9b0f32
PC
108722013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
10873
10874 PR c++/58080
10875 * c-common.c (pointer_int_sum): Add bool parameter.
10876 * c-common.h (pointer_int_sum): Adjust declaration.
10877
e0aec1e9
GDR
108782013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
10879
10880 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
10881 c_pretty_printer variable.
10882
b066401f
GDR
108832013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
10884
10885 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
10886 (pp_base): Remove.
10887 (pp_c_base): Likewise. Adjust users.
10888 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
10889 (pp_c_whitespace): Do not call pp_base.
10890 (pp_c_left_paren): Likewise.
10891 (pp_c_right_paren): Likewise.
10892 (pp_c_left_brace): Likewise.
10893 (pp_c_right_brace): Likewise.
10894 (pp_c_left_bracket): Likewise.
10895 (pp_c_right_bracket): Likewise.
10896 (pp_c_dot): Likewise.
10897 (pp_c_ampersand): Likewise.
10898 (pp_c_star): Likewise.
10899 (pp_c_arrow): Likewise.
10900 (pp_c_semicolon): Likewise.
10901 (pp_c_complement): Likewise.
10902 (pp_c_exclamation): Likewise.
10903 (pp_c_direct_declarator): Likewise.
10904 (pp_c_ws_string): Likewise.
10905 (pp_c_identifier): Likewise.
10906 (pp_c_statement): Likewise.
10907 (print_c_tree): Likewise.
10908
65e5a578
ESR
109092013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
10910
10911 PR c++/58072
10912 * c-common.c (c_parse_error): Catch user-defined literal tokens and
10913 provide useful error strings.
10914
137a1a27
GDR
109152013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10916
10917 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
10918 printer functions instead of pp_string or operators and punctuators.
10919 (dump_generic_ada_node): Likewise.
10920 * c-pretty-print.c (pp_c_type_specifier): Likewise.
10921 (pp_c_relational_expression): Likewise.
10922 (pp_c_logical_or_expression): Likewise.
10923
07838b13
GDR
109242013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
10925
10926 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
10927 functions instead of pp_character.
10928 (pp_ada_tree_identifier): Likewise.
10929 (dump_ada_double_name): Likewise.
10930 (dump_ada_function_declaration): Likewise.
10931 (dump_ada_array_domains): Likewise.
10932 (dump_template_types): Likewise.
10933 (dump_generic_ada_node): Likewise.
10934 (print_ada_declaration): Likewise.
10935 (print_ada_struct_decl): Likewise.
10936 * c-pretty-print.c (pp_c_integer_constant): Likewise.
10937
433cc7b0
TT
109382013-07-23 Tom Tromey <tromey@redhat.com>
10939
10940 * c-common.h (enum rid) <RID_GENERIC>: New constant.
10941 * c-common.c (c_common_reswords): Add _Generic.
10942
688010ba
OB
109432013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
10944
10945 * c-common.c: Fix typos.
10946 * c-common.h: Likewise.
10947
2a99e5e6
LL
109482013-07-13 Lubos Lunak <l.lunak@suse.cz>
10949
10950 PR c++/55203
10951 * c-common.c (c_common_attribute_table): Add warn_unused.
10952 (handle_warn_unused_attribute): New.
10953
c26302d5
JJ
109542013-07-10 Jakub Jelinek <jakub@redhat.com>
10955
10956 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
10957 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
10958
dfeadaa0
PC
109592013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
10960
10961 PR c++/57869
10962 * c.opt: Add Wconditionally-supported.
10963
6a2fa4b2
GS
109642013-07-08 Graham Stott <graham.stott@btinternet.com>
10965
adfac8df 10966 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
10967 unused variables l_length and l_node.
10968
ecdbd01a 109692013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
10970
10971 PR c/57821
10972 * c-common.c (complete_array_type): Delay folding first index
10973 like other indices. When folding, check for index overflow.
10974
bedc293e
MG
109752013-06-27 Marc Glisse <marc.glisse@inria.fr>
10976
10977 PR c++/57509
10978 * c-common.h (c_build_vec_perm_expr): New complain argument.
10979 * c-common.c (c_build_vec_perm_expr): Likewise.
10980 Use save_expr also in C++.
10981
604b2bfc
GDR
109822013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
10983
10984 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
10985 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
10986 * c-opts.c (c_common_post_options): Likewise.
10987
dfeadaa0 109882013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
10989
10990 * array-notation-common.c (length_mismatch_in_expr): Changed the
10991 parameter type's from a dynamic array to a vec_tree. Also removed
10992 the size parameters.
10993 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
10994 the change above.
10995
2ce86d2e
BI
109962013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
10997
10998 * c-common.h (struct cilkplus_an_parts): New structure.
10999 (struct cilkplus_an_loop_parts): Likewise.
11000 (cilkplus_extract_an_triplets): New prototype.
11001 (fix_sec_implicit_args): Likewise.
11002 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
11003 (fix_sec_implicit_args): Likewise.
604b2bfc 11004
07a6825b
BI
110052013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
11006
11007 * array-notation-common.c (find_inv_trees): Removed an unwanted
11008 typecasting.
11009 * c-common.h (struct inv_list::additional_tcodes): Changed type from
11010 enum rid to enum tree_code.
11011
08346abd
JH
110122013-06-11 Jan Hubicka <jh@suse.cz>
11013
11014 * c-common.c (handle_alias_ifunc_attribute): Do not set
11015 DECL_EXTERNAL for weakref variables.
11016 * c-pragma.c (handle_pragma_weak): Make sure aliases
11017 are not declared as external.
11018
d60f1706
BI
110192013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
11020
11021 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
11022 function from c/c-array-notation.c.
11023 (is_cilkplus_reduce_builtin): Likewise.
11024 (find_rank): Likewise.
11025 (extract_array_notation_exprs): Likewise.
11026 (replace_array_notations): Likewise.
11027 (find_inv_trees): Likewise.
11028 (replace_inv_trees): Likewise.
11029 (contains_array_notation_expr): Likewise.
11030 (find_correct_array_notation_type): Likewise.
11031 * c-common.h (struct inv_list): Moved this struct from the file
11032 c/c-array-notation.c and added a new field called additional tcodes.
11033 (length_mismatch_in_expr_p): New prototype.
11034 (is_cilkplus_reduce_builtin): Likewise.
11035 (find_rank): Likewise.
11036 (extract_array_notation_exprs): Likewise.
11037 (replace_array_notation): Likewise.
11038 (find_inv_trees): Likewise.
11039 (replace_inv_trees): Likewise.
11040 (find_correct_array_notation_type): Likewise.
dfeadaa0 11041
36536d79
BI
110422013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
11043
11044 * c-common.c (c_define_builtins): When cilkplus is enabled, the
11045 function array_notation_init_builtins is called.
11046 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
11047 * c-common.def (ARRAY_NOTATION_REF): New tree.
11048 * c-common.h (build_array_notation_expr): New function declaration.
11049 (build_array_notation_ref): Likewise.
11050 (extract_sec_implicit_index_arg): New extern declaration.
11051 (is_sec_implicit_index_fn): Likewise.
11052 (ARRAY_NOTATION_CHECK): New define.
11053 (ARRAY_NOTATION_ARRAY): Likewise.
11054 (ARRAY_NOTATION_START): Likewise.
11055 (ARRAY_NOTATION_LENGTH): Likewise.
11056 (ARRAY_NOTATION_STRIDE): Likewise.
11057 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
11058 ARRAY_NOTATION_REF.
11059 (pp_c_expression): Likewise.
11060 * c.opt (flag_enable_cilkplus): New flag.
11061 * array-notation-common.c: New file.
11062
f7716d57
JJ
110632013-05-14 Jakub Jelinek <jakub@redhat.com>
11064
11065 PR c++/57274
11066 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
11067
a5e0cd1d
MG
110682013-05-10 Marc Glisse <marc.glisse@inria.fr>
11069
11070 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
11071 vectors.
11072
f6bc1c4a
HS
110732013-05-07 Han Shen <shenhan@google.com>
11074
11075 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
11076
3f12f6e9
SKS
110772013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
11078
11079 * c-common.c (check_user_alignment): Emit error for negative values.
11080
61949153
PC
110812013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11082
11083 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
11084
e93e18e9
PC
110852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11086
11087 * c-cppbuiltin.c (c_cpp_builtins): Do not define
11088 __GXX_EXPERIMENTAL_CXX1Y__.
11089
44d90fe1 110902013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 11091 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
11092
11093 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
11094 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
11095 to simply use OPT_Wpointer_arith.
11096 (c_sizeof_or_alignof_type): Likewise.
11097
13f39b2e
PC
110982013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
11099
11100 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
11101
4b84d650
JJ
111022013-04-12 Jakub Jelinek <jakub@redhat.com>
11103
11104 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
11105 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
11106 specifiers.
11107
fb037b5d
SB
111082013-04-07 Steven Bosscher <steven@gcc.gnu.org>
11109
11110 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
11111
4e856798
PC
111122013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
11113
11114 * c-common.c (pointer_int_sum): Remove dead code.
11115
4b1baac8
RS
111162013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
11117
11118 PR middle-end/56524
11119 * c-common.c (handle_optimize_attribute): Don't call
11120 save_optabs_if_changed.
11121
0b50e654
JJ
111222013-03-05 Jakub Jelinek <jakub@redhat.com>
11123
11124 PR middle-end/56461
11125 * c-pch.c (pch_init): Free target_validity at the end.
11126
48c41403
JJ
111272013-03-04 Jakub Jelinek <jakub@redhat.com>
11128
11129 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
11130
e664c61c
KS
111312013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
11132 Jakub Jelinek <jakub@redhat.com>
11133
11134 PR sanitizer/56454
11135 * c-common.c (handle_no_sanitize_address_attribute): New function.
11136 (c_common_attribute_table): Add no_sanitize_address attribute.
11137 (handle_no_address_safety_analysis_attribute): Add
11138 no_sanitize_address attribute, not no_address_safety_analysis
11139 attribute.
11140
a475fd3d 111412013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
11142
11143 PR target/52555
11144 * c-common.c (handle_optimize_attribute): Call
11145 save_optabs_if_changed.
11146
f6007d99
JJ
111472013-02-18 Jakub Jelinek <jakub@redhat.com>
11148 Steven Bosscher <steven@gcc.gnu.org>
11149
11150 PR pch/54117
11151 * c-opts.c (c_common_post_options): If debug info is enabled
11152 and non-dwarf*, refuse to load PCH files and when writing PCH
11153 file warn.
11154
cf35e2b1
JJ
111552013-02-05 Jakub Jelinek <jakub@redhat.com>
11156
11157 PR middle-end/56167
11158 * c-common.c (handle_error_attribute): Fix condition.
11159
32887460
JJ
111602013-01-30 Jakub Jelinek <jakub@redhat.com>
11161
11162 PR c++/55742
11163 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
11164
5af057d8
JM
111652013-01-18 Jason Merrill <jason@redhat.com>
11166
11167 PR target/54908
11168 * c.opt (-fextern-tls-init): New.
11169 * c-opts.c (c_common_post_options): Handle it.
11170
cc83c823
JJ
111712013-01-09 Jakub Jelinek <jakub@redhat.com>
11172
11173 PR c/48418
11174 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
11175 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
11176 and is either negative or bigger or equal to type precision
11177 of the first operand.
11178
a859517f
MP
111792012-12-03 Marek Polacek <polacek@redhat.com>
11180
11181 PR c/55570
11182 * c-common.c (check_user_alignment): Swap order of tests,
11183 check TREE_CODE first.
11184
2d7aa578
ESR
111852012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
11186
11187 PR c++/52654
11188 * c-common.h (overflow_type): New enum.
11189 (build_userdef_literal): Add overflow_type argument.
11190 (tree_userdef_literal): Add overflow_type.
11191 (USERDEF_LITERAL_OVERFLOW): New access macro.
11192 * c-common.c (build_userdef_literal): Add overflow_type
11193 argument.
11194 * c-lex.c (c_lex_with_flags): Add overflow_type to
11195 build_userdef_literal calls.
11196 (interpret_integer, interpret_float): Add overflow_type argument.
11197
cc3c4f62
RB
111982012-11-28 Richard Biener <rguenther@suse.de>
11199
11200 PR c/35634
11201 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
11202 here and use a type with proper overflow behavior for types that would
11203 need to be promoted for the arithmetic.
11204
77bc5132
JJ
112052012-11-23 Jakub Jelinek <jakub@redhat.com>
11206
11207 PR sanitizer/55435
11208 * c-common.c (handle_no_address_safety_analysis_attribute): New
11209 function.
11210 (c_common_attribute_table): Add no_address_safety_analysis.
11211
5dc99c46
SB
112122012-11-16 Simon Baldwin <simonb@google.com>
11213
11214 * c.opt: Add f[no-]canonical-system-headers.
11215 * c-opts.c (c_common_handle_option): Handle
11216 OPT_fcanonical_system_headers.
11217
a4a0016d
ESR
112182012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
11219
11220 PR c++/54413
11221 * c-opts.c (c_common_handle_option): Set new flags.
11222 * c.opt: Describe new flags.
11223
7dbb85a7
JM
112242012-11-09 Jason Merrill <jason@redhat.com>
11225
11226 * c.opt (Wabi-tag): New.
11227
ad7bac31
AK
112282012-11-09 Andi Kleen <ak@linux.intel.com>
11229
11230 PR 55139
11231 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 11232 MEMMODEL_MASK
ad7bac31 11233
7332899a
MLI
112342012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11235
11236 PR c/53063
11237 * c.opt (Wformat): Make it Alias Wformat=1.
11238 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
11239 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
11240 LangEnabledBy.
11241 (Wformat=): RejectNegative. Use LangEnabledBy.
11242 (Wnonnull): Use LangEnabledBy.
11243 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
11244 * c-format.c (set_Wformat): Delete.
11245 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
11246 (maybe_read_dollar_number): Likewise.
11247 (avoid_dollar_number): Likewise.
11248 (finish_dollar_format_checking): Likewise.
11249 (check_format_info): Likewise.
11250 (check_format_info_main): Likewise.
11251 (check_format_types): Likewise.
11252 (format_type_warning): Likewise.
11253 * c-common.c (int): Likewise.
11254 (check_function_sentinel): Likewise.
8e745a17 11255 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 11256
34a180a6
MLI
112572012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11258
11259 PR c/53063
11260 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
11261 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
11262 Use LangEnabledBy.
11263 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
11264 common.opt.
11265 (Wvariadic-macros): Init(1).
11266 * c-opts.c (c_common_handle_option): Do not handle them
11267 explicitly.
11268 (c_common_post_options): Likewise.
11269 (sanitize_cpp_opts): warn_unused_macros is now
11270 cpp_warn_unused_macros.
11271 (push_command_line_include): Likewise.
11272 * c-common.c (warn_unknown_pragmas): Do not define.
11273 * c-common.h (warn_unknown_pragmas): Do not declare.
11274
3f46d6a5
MLI
112752012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
11276
11277 PR c/51294
11278 * c-common.c (conversion_warning): Handle conditional expressions.
11279
880661a4
JW
112802012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
11281
11282 PR c++/54930
11283 * c.opt (Wreturn_local_addr): Define new option.
11284
4514a96b
JM
112852012-10-25 Jason Merrill <jason@redhat.com>
11286
f14edc1a
JM
11287 * c.opt (Wvirtual-move-assign): New.
11288
4514a96b
JM
11289 * c.opt (Winherited-variadic-ctor): New.
11290
93100c6b
MG
112912012-10-25 Marc Glisse <marc.glisse@inria.fr>
11292
11293 PR c++/54427
11294 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
11295
1efcb8c6
JM
112962012-10-23 Joseph Myers <joseph@codesourcery.com>
11297
11298 * c-common.h (pch_cpp_save_state): Declare.
11299 * c-target.def (c_preinclude): New hook.
11300 * c-opts.c (done_preinclude): New.
11301 (push_command_line_include): Handle default preincluded header.
11302 (cb_file_change): Call pch_cpp_save_state when calling
11303 push_command_line_include.
11304 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
11305 (pch_cpp_save_state): New.
11306 (pch_init): Call pch_cpp_save_state conditionally, instead of
11307 calling cpp_save_state.
11308
4a0ae68e
MLI
113092012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
11310
11311 PR c/53063
11312 PR c/40989
11313 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
11314 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
11315 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
11316 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
11317 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
11318 * c-opts.c (c_common_handle_option): Remove explicit handling from
11319 here.
11320 (c_common_post_options): Likewise.
11321
67e4210b
EB
113222012-10-18 Eric Botcazou <ebotcazou@adacore.com>
11323
11324 * c-ada-spec.c (LOCATION_COL): Delete.
11325 (compare_location): New function.
11326 (compare_node): Use it.
11327 (compare_comment): Likewise.
11328
65d4f2cd
MLI
113292012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
11330
11331 PR c/53063
11332 PR c/40989
11333 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
11334 * c-opts.c (c_common_handle_option): Do not set them here. Add
11335 comment.
11336 (c_common_post_options): Likewise.
11337
909881cb
EB
113382012-10-16 Eric Botcazou <ebotcazou@adacore.com>
11339
11340 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
11341 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
11342 Remove POINTER_TYPE handling, add large unsigned handling and use
11343 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
11344
3a785c97
JJ
113452012-10-12 Jakub Jelinek <jakub@redhat.com>
11346
11347 PR c/54381
11348 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
11349 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
11350 locs and array of 3 trees instead of just single loc and single
11351 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
11352 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
11353 For *cmp* builtins that take two sources strings report warnings
11354 about first and second source, not about destination and source.
11355
5e54f81d
MG
113562012-10-12 Marc Glisse <marc.glisse@inria.fr>
11357
11358 PR c++/53055
11359 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
11360
f5b02f1e
EB
113612012-10-11 Eric Botcazou <ebotcazou@adacore.com>
11362
11363 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
11364 declaring something coming from another file.
11365
b46dbc6c
AC
113662012-10-10 Arnaud Charlet <charlet@adacore.com>
11367
f5b02f1e 11368 PR ada/54845
b46dbc6c
AC
11369 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
11370
5d9de0d0
PC
113712012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
11372
11373 PR c++/54194
11374 * c-common.c (warn_about_parentheses): Add location_t parameter;
11375 use EXPR_LOC_OR_LOC.
11376 * c-common.h: Update declaration.
11377
a212e43f
MG
113782012-10-09 Marc Glisse <marc.glisse@inria.fr>
11379
11380 PR c++/54427
11381 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
11382 more operations. Make error messages optional.
11383 * c-common.h (enum stv_conv): Moved from c-typeck.c.
11384 (scalar_to_vector): Declare.
11385
b1db7f91
JM
113862012-10-08 Jason Merrill <jason@redhat.com>
11387
11388 * c-common.c (c_common_reswords): Add thread_local.
11389
e28d52cf
DS
113902012-10-08 Dodji Seketeli <dodji@redhat.com>
11391
11392 PR c++/53528 C++11 attribute support
11393 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
11394 new functions.
11395 * c-common.c (check_cxx_fundamental_alignment_constraints): New
11396 static function.
11397 (handle_aligned_attribute): In choose strictest alignment
11398 among many. Use new check_cxx_fundamental_alignment_constraints.
11399 (handle_transparent_union_attribute): In c++11 attribute syntax,
11400 don't look through typedefs.
11401
3b78de56
AC
114022012-10-04 Arnaud Charlet <charlet@adacore.com>
11403
11404 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
11405 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
11406 out of dumpfile.h.
11407
6040bb5f
DC
114082012-09-25 Dehao Chen <dehao@google.com>
11409
11410 PR middle-end/54645
3b78de56 11411 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
11412 map when read in the pch.
11413
3f8257db 114142012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
11415
11416 * c-ada-spec.c: Style fixes.
11417
3f8257db 114182012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
11419
11420 * c.opt (-fada-spec-parent): Define new command line switch.
11421 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
11422 is specified, generate binding spec as a child of the specified unit.
11423
0ccb505d
PC
114242012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
11425 Manuel López-Ibáñez <manu@gcc.gnu.org>
11426
11427 PR c++/53210
11428 * c.opt ([Winit-self]): Enabled by -Wall in C++.
11429
c583af79
AC
114302012-08-23 Arnaud Charlet <charlet@adacore.com>
11431
11432 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
11433 for pointers, and add missing Convention C pragma.
11434 (print_ada_struct_decl): Add missing aliased keyword.
11435 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
11436
1a4049e7
JJ
114372012-08-17 Jakub Jelinek <jakub@redhat.com>
11438
11439 * c-common.c (sizeof_pointer_memaccess_warning): New function.
11440 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
11441 * c-opts.c (c_common_handle_option): Enable it for -Wall.
11442 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
11443 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
11444
70b5e7dc
RG
114452012-08-10 Richard Guenther <rguenther@suse.de>
11446
11447 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
11448
f8923f7e
SB
114492012-08-07 Steven Bosscher <steven@gcc.gnu.org>
11450
11451 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
11452 instead of separate pp_newline and pp_flush.
11453 (print_c_tree): Likewise.
11454
e45abe1f
RH
114552012-07-26 Richard Henderson <rth@redhat.com>
11456
11457 * c-common.c (handle_hot_attribute): Allow labels.
11458 (handle_cold_attribute): Likewise.
11459
332f1d24
JJ
114602012-07-20 Jakub Jelinek <jakub@redhat.com>
11461
11462 PR c++/28656
11463 * c-common.c (check_function_nonnull): Handle multiple nonnull
11464 attributes properly.
11465
7ee2468b
SB
114662012-07-16 Steven Bosscher <steven@gcc.gnu.org>
11467
11468 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
11469 * c-ada-spec.c: Likewise.
11470 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
11471
ee7b28eb
SB
114722012-07-14 Steven Bosscher <steven@gcc.gnu.org>
11473
11474 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
11475 Remove code conditional on it.
11476
6bdf3519
SB
114772012-07-11 Steven Bosscher <steven@gcc.gnu.org>
11478
11479 * c-gimplify.c: Do not include basic-block.h.
11480 * c-common.c: Do not include linfuncs.h.
11481
532aafad
SB
114822012-07-08 Steven Bosscher <steven@gcc.gnu.org>
11483
11484 * c-common.h: Include tree.h.
11485
8d0d1915
JM
114862012-07-02 Jason Merrill <jason@redhat.com>
11487
11488 PR c++/53524
11489 * c-common.c (get_priority): Call default_conversion.
11490
fbc873ad
UB
114912012-07-01 Uros Bizjak <ubizjak@gmail.com>
11492
11493 * c-pch.c (c_common_write_pch): Remove unused variables.
11494
d4a10d0a
SB
114952012-06-29 Steven Bosscher <steven@gcc.gnu.org>
11496
11497 * cppspec.c: Moved from gcc/ to here.
11498
6f3a2e23
KT
114992012-06-27 Kai Tietz <ktietz@redhat.com>
11500
11501 PR preprocessor/37215
11502 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
11503
8ca92d04
SB
115042012-06-21 Steven Bosscher <steven@gcc.gnu.org>
11505
11506 * c-common.h (c_common_print_pch_checksum): Remove.
11507 * c-pch.c: Do not include output.h.
11508 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
11509 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
11510 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
11511 (struct c_pch_header): Remove.
11512 (get_ident): Update gpch version.
11513 (pch_init): Do not print executable_checksum to asm_out_file.
11514 Do not fail if there is no asm_out_file to read back from. Set
11515 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
11516 (c_common_write_pch): Verify that nothing was written to asm_out_file
11517 since pch_init was called. Do not write a c_pch_header, and do not
11518 copy from asm_out_file to the PCH.
11519 (c_common_read_pch): Do not read a c_pch_header, and do not restore
11520 the content of asm_out_file from the PCH.
11521 (c_common_print_pch_checksum): Remove.
11522 * c-opts.c (c_common_init): Print out executable_checksum directly.
11523
70f42967
SB
115242012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11525
11526 * c-target.def (objc_declare_unresolved_class_reference,
11527 objc_declare_class_definition): Add new hooks.
11528
a8781821
SB
115292012-06-19 Steven Bosscher <steven@gcc.gnu.org>
11530
11531 * c-lex.c: Do not include output.h.
11532 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
11533 Remove uses of ASM_OUTPUT_IDENT.
11534
9e1a8dd1
RR
115352012-06-15 Marc Glisse <marc.glisse@inria.fr>
11536
11537 PR c++/51033
11538 * c-common.h (c_build_vec_perm_expr): Move decl here.
11539 * c-common.c (c_build_vec_perm_expr): Move definition
11540 here.
11541
6f07a821
SB
115422012-06-06 Steven Bosscher <steven@gcc.gnu.org>
11543
11544 * c.opt (fconserve-space): Turn into a no-op.
11545
9faeb493 115462012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
11547
11548 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
11549 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
11550 both the start and end of the function.
11551
a4b7d13c
SB
115522012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11553
11554 * c-common.c: Do not include output.h.
11555 * c-pragma.c: Likewise.
11556
c265f413
SA
115572012-06-04 Steven Bosscher <steven@gcc.gnu.org>
11558
11559 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
11560 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
11561 (lang_decl_name): Handle namespace decls.
11562
be7a421e
SB
115632012-05-31 Steven Bosscher <steven@gcc.gnu.org>
11564
11565 * c-ada-spec.c: Do not include output.h.
11566 * c-semantics.c: Likewise.
11567
65de6659
JM
115682012-05-29 Joseph Myers <joseph@codesourcery.com>
11569
11570 * c-common.c: Fix typo.
11571
ca5f4331
MM
115722012-05-29 Michael Matz <matz@suse.de>
11573
11574 * c-common.h (c_expand_decl): Remove prototype.
11575
4f7f7aca
MLI
115762012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
11577
11578 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
11579 * c-opts.c (c_common_handle_option): Remove code handling
11580 warn_missing_braces.
11581
4a792f9b
PC
115822012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
11583
11584 PR c++/25137
11585 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
11586 -Wmissing_braces.
11587
650dc14a
DS
115882012-05-22 Dodji Seketeli <dodji@redhat.com>
11589
11590 PR c++/53322
11591 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
11592
9b095bf1
MLI
115932012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
11594
11595 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
11596 * c-opts.c (c_common_handle_option): Do not handle explicitly
11597 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
11598
0b2c4be5
DS
115992012-05-16 Dodji Seketeli <dodji@redhat.com>
11600
11601 PR preprocessor/7263
ab20d992 11602 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
11603 to cpp_classify_number. For diagnostics, use the precise location
11604 instead of the global input_location.
11605
a1bde5af
PC
116062012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
11607
d02924ef 11608 PR c++/11856
a1bde5af
PC
11609 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
11610
d1ede5f4
BS
116112012-05-14 Bernd Schmidt <bernds@codesourcery.com>
11612
a1bde5af 11613 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 11614
f2bc201f
MLI
116152012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
11616
11617 PR 53063
11618 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
11619 Wreorder): Use LangEnabledBy.
11620 * c-opts.c (c_common_handle_option): Do not enable them
11621 explicitly. Call lang-specific generated functions.
11622 (c_common_post_options): Do not set them here.
11623
95744782
MLI
116242012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
11625
11626 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
11627 Wmissing-field-initializers,Wmissing-parameter-type,
11628 Wold-style-declaration,Woverride-init): Use EnabledBy.
11629 * c-opts.c (c_common_post_options): Do not set here explicitly.
11630
7d5a5747
MLI
116312012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
11632
11633 PR 53063
11634 * c-opts.c (c_common_handle_option): Use handle_generated_option
11635 to enable sub-options.
11636
5a3c9cf2
PC
116372012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
11638
11639 PR c++/53158
11640 * c-common.c (warnings_for_convert_and_check): Use warning_at.
11641
3ac8781c
RG
116422012-05-10 Richard Guenther <rguenther@suse.de>
11643
11644 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
11645 adjust commentary about TYPE_IS_SIZETYPE types.
11646
1e537948
MLI
116472012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
11648
11649 PR c++/53261
11650 * c-common.c (warn_logical_operator): Check that argument of
11651 integer_zerop is not NULL.
11652
f2c4a785
MLI
116532012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
11654
11655 PR c/43772
11656 * c-common.c (warn_logical_operator): Do not warn if either side
11657 is already true or false.
11658
50f305ca
MLI
116592012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
11660
11661 PR c/51712
11662 * c-common.c (expr_original_type): New.
11663 (shorten_compare): Do not warn for enumeration types.
11664
0c3641b0
MLI
116652012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
11666
11667 * c.opt (fpermissive): Add Var(flag_permissive).
11668
7edaa4d2
MG
116692012-04-30 Marc Glisse <marc.glisse@inria.fr>
11670
11671 PR c++/51033
11672 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
11673 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
11674
b9c8da34
DS
116752012-04-30 Dodji Seketeli <dodji@redhat.com>
11676
11677 Add -Wvarargs option
ab20d992 11678 * c.opt (Wvarargs): Define new option.
b9c8da34 11679
e6c69da0
MLI
116802012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11681
11682 * c-common.c (check_function_arguments): Replace
11683 Wmissing-format-attribute with Wsuggest-attribute=format.
11684
90137d8f
MLI
116852012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
11686
11687 * c.opt (Wsuggest-attribute=format): New. Alias of
11688 Wmissing-format-attribute.
11689 * c-format.c (decode_format_type): Replace
11690 Wmissing-format-attribute with Wsuggest-attribute=format.
11691 (check_function_format): Likewise.
11692
9faeb493 116932012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
11694
11695 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
11696 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
11697 * c.opt: Add Wliteral-suffix.
11698
c1771a20
MLI
116992012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
11700
11701 PR c/44774
11702 * c.opt (Wpedantic): New.
11703 (pedantic): Alias Wpedantic.
11704 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
11705 (c_common_post_options): Likewise.
11706 (sanitize_cpp_opts): Likewise.
11707 * c-lex.c (interpret_float): Likewise.
11708 * c-format.c (check_format_types): Likewise.
11709 * c-common.c (pointer_int_sum): Likewise.
11710 (c_sizeof_or_alignof_type): Likewise.
11711 (c_add_case_label): Likewise.
11712 (c_do_switch_warnings): Likewise.
11713 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
11714
04b391c1
JM
117152012-04-15 Jason Merrill <jason@redhat.com>
11716
11717 PR c++/52818
11718 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
11719 (C_STD_NAME): Distinguish between C++98 and C++11.
11720
ac868f29
EB
117212012-04-11 Eric Botcazou <ebotcazou@adacore.com>
11722
11723 PR target/52624
11724 * c-common.h (uint16_type_node): Rename into...
11725 (c_uint16_type_node): ...this.
11726 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
11727 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
11728
fd4116f4
MLI
117292012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
11730
11731 * c-common.c (warn_if_unused_value): Move definition to here.
11732 * c-common.h (warn_if_unused_value): Move declaration to here.
11733
573ac65e
WB
117342012-03-23 William Bader <williambader@hotmail.com>
11735
11736 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
11737
552b8185
JM
117382012-03-20 Jason Merrill <jason@redhat.com>
11739
11740 * c-common.h (enum cxx_dialect): Add cxx1y.
11741 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
11742 test.
11743 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
11744 * c-opts.c (c_common_post_options): Likewise.
11745 (set_std_cxx1y): New.
11746 (c_common_handle_option): Call it.
11747 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
11748
04398fa8
PC
117492012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
11750
11751 PR c++/14710
11752 * c.opt ([Wuseless-cast]): Add.
11753
d2a12ae7
RG
117542012-03-16 Richard Guenther <rguenther@suse.de>
11755
11756 * c-pretty-print.c (pp_c_initializer_list): Adjust.
11757
a12bf402
MLI
117582012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
11759
11760 PR c++/44783
11761 * c.opt (ftemplate-backtrace-limit) Add.
11762
5c30094f
RO
117632012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11764
11765 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
11766 handling.
11767 * c-pragma.c (handle_pragma_extern_prefix): Remove.
11768 (init_pragma): Don't register extern_prefix.
11769
21fa2faf
RG
117702012-03-12 Richard Guenther <rguenther@suse.de>
11771
11772 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
11773 (builtin_type_for_size): Likewise.
11774
e3793c6f
JJ
117752012-02-13 Jakub Jelinek <jakub@redhat.com>
11776
11777 PR c++/52215
11778 * c-common.c (sync_resolve_params): Don't decide whether to convert
11779 or not based on TYPE_SIZE comparison, convert whenever arg_type
11780 is unsigned INTEGER_TYPE.
11781
93286335
PC
117822012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
11783
11784 PR c/52118
11785 * c.opt ([Wunused-local-typedefs]): Fix description.
11786
7a421706
MS
117872012-01-24 Mike Stump <mikestump@comcast.net>
11788
11789 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
11790 exactly.
11791
ba9b1f11
RG
117922012-01-18 Richard Guenther <rguenther@suse.de>
11793
11794 * c-opts.c (c_common_post_options): Reset LTO flags if
11795 we are about to generate a PCH.
11796
465406be
PC
117972012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
11798
11799 PR c++/51777
11800 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
11801 use pp_unsigned_wide_integer.
11802
aee15221
RG
118032012-01-10 Richard Guenther <rguenther@suse.de>
11804
11805 PR middle-end/51806
11806 * c-opts.c (c_common_handle_option): Move -Werror handling
11807 to language independent code.
11808
5720c0dc
RG
118092012-01-05 Richard Guenther <rguenther@suse.de>
11810
11811 PR middle-end/51764
11812 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
11813 from common.opt.
11814
73ac190a
PC
118152011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
11816
11817 PR c++/51316
11818 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
11819 of array types with an unknown bound.
11820
48b0b196
JM
118212011-12-20 Joseph Myers <joseph@codesourcery.com>
11822
11823 * c-common.c (flag_isoc99): Update comment to refer to C11.
11824 (flag_isoc1x): Change to flag_isoc11.
11825 * c-common.h (flag_isoc99): Update comment to refer to C11.
11826 (flag_isoc1x): Change to flag_isoc11.
11827 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
11828 C11.
11829 * c-opts.c (set_std_c1x): Change to set_std_c11.
11830 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
11831 Call set_std_c11.
11832 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
11833 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
11834 * c.opt (std=c1x): Change to std=c11. Document as non-draft
11835 standard.
11836 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
11837 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
11838 (std=gnu1x): Make alias of std=gnu11.
11839
d58d6eb5
JM
118402011-12-19 Jason Merrill <jason@redhat.com>
11841
11842 PR c++/51228
11843 * c-common.c (handle_transparent_union_attribute): Check the first
11844 field if the type is complete.
11845
b3908fcc
JW
118462011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
11847
11848 PR libstdc++/51365
11849 * c-common.c (RID_IS_FINAL): Add.
11850 * c-common.h (RID_IS_FINAL): Add.
11851
fea3ca91
IS
118522011-11-30 Iain Sandoe <iains@gcc.gnu.org>
11853
11854 * c.opt (fgnu-runtime): Provide full description.
11855 (fnext-runtime): Likewise.
11856 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
11857
62bad7cd
AM
118582011-11-28 Andrew MacLeod <amacleod@redhat.com>
11859
11860 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
11861 predefines in one place. Add LOCK_FREE predefines.
11862 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
11863 new func.
11864
c466c4ff
AM
118652011-11-24 Andrew MacLeod <amacleod@redhat.com>
11866
11867 PR c/51256
9faeb493 11868 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 11869 conditions
9faeb493
UB
11870 (resolve_overloaded_atomic_exchange,
11871 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
11872 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
11873 error_mark_node for error conditions.
9faeb493 11874
a5952633
RG
118752011-11-08 Richard Guenther <rguenther@suse.de>
11876
11877 PR middle-end/51010
ab20d992 11878 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 11879
0a35513e
AH
118802011-11-07 Richard Henderson <rth@redhat.com>
11881 Aldy Hernandez <aldyh@redhat.com>
11882 Torvald Riegel <triegel@redhat.com>
11883
11884 Merged from transactional-memory.
11885
11886 * c-common.c (handle_tm_wrap_attribute,
11887 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
11888 (struct c_common_reswords): Added __transaction* keywords.
11889 (struct c_common_attribute_table): Added transaction* and tm_regparm
11890 attributes.
11891 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
11892 masks.
11893 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
11894 find_tm_attribute): Declare.
11895
6d87092d
JM
118962011-11-07 Jason Merrill <jason@redhat.com>
11897
11898 PR c++/35688
11899 * c-common.c, c-common.h: Revert yesterday's changes.
11900
8e7860a1
JM
119012011-11-06 Jason Merrill <jason@redhat.com>
11902
11903 PR c++/35688
11904 * c-common.c (decl_has_visibility_attr): Split out from...
11905 (c_determine_visibility): ...here.
11906 * c-common.h: Declare it.
11907
d19fa6b5
JM
119082011-11-06 Joseph Myers <joseph@codesourcery.com>
11909
11910 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
11911 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
11912 type.
11913 (check_user_alignment): New. Split out of
11914 handle_aligned_attribute. Disallow integer constants with
11915 noninteger types. Conditionally allow zero.
11916 (handle_aligned_attribute): Use check_user_alignment.
11917 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
11918
86951993
AM
119192011-11-06 Andrew MacLeod <amacleod@redhat.com>
11920 Richard Henderson <rth@redhat.com>
11921
11922 Merged from cxx-mem-model.
11923
11924 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 11925 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
11926 parameters that are the same type size.
11927 (get_atomic_generic_size): New. Find size of generic
11928 atomic function parameters and do typechecking.
11929 (add_atomic_size_parameter): New. Insert size into parameter list.
11930 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
11931 either __atomic_exchange_n or external library call.
9faeb493 11932 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 11933 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 11934 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
11935 __atomic_load_n or an external library call.
11936 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
11937 __atomic_store_n or an external library call.
11938 (resolve_overloaded_builtin): Handle new __atomic builtins.
11939
cf9e9959
EB
119402011-11-04 Eric Botcazou <ebotcazou@adacore.com>
11941
11942 PR c++/50608
11943 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
11944 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
11945 <INDIRECT_REF>: Return the argument.
11946 <ARRAY_REF>: Remove special code for negative offset.
11947 Call fold_build_pointer_plus instead of size_binop.
11948 (fold_offsetof): Remove STOP_REF argument and adjust.
11949 * c-common.h (fold_offsetof_1): Declare.
11950 (fold_offsetof): Remove STOP_REF argument.
11951
25339f10
JM
119522011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
11953
11954 PR c++/50810
11955 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11956 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11957 Wnarrowing for C++0x and C++98.
11958 * c.opt ([Wnarrowing]): Update.
11959
89401152
PC
119602011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
11961
11962 PR c++/44277
11963 * c.opt: Add Wzero-as-null-pointer-constant.
11964
97e3ad20
JM
119652011-10-31 Jason Merrill <jason@redhat.com>
11966
15694fdd
JM
11967 * c.opt (-fdeduce-init-list): Off by default.
11968
97e3ad20
JM
11969 PR c++/50920
11970 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
11971 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
11972 and -Wc++11-compat.
11973 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
11974
fb9120e3
RAV
119752011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
11976
11977 PR c++/30066
11978 * c.opt (fvisibility-inlines-hidden): Description change.
11979
3ce4f9e4
ESR
119802011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
11981
11982 Implement C++11 user-defined literals.
11983 * c-common.c (build_userdef_literal): New.
11984 * c-common.def: New tree code.
11985 * c-common.h (tree_userdef_literal): New tree struct and accessors.
11986 * c-lex.c (interpret_float): Add suffix parm.
11987 (c_lex_with_flags): Build literal tokens.
11988
5f53c243
PC
119892011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11990
11991 PR c++/50841
11992 Revert:
11993 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
11994
11995 PR c++/50810
11996 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
11997 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
11998 Wnarrowing for C++0x and C++98.
11999 * c.opt ([Wnarrowing]): Update.
12000
263734e1
PC
120012011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
12002
12003 PR c++/50810
12004 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
12005 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
12006 Wnarrowing for C++0x and C++98.
12007 * c.opt ([Wnarrowing]): Update.
12008
d2e312d7
PC
120092011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
12010
12011 PR c++/45385
12012 * c-common.c (conversion_warning): Remove code looking for
12013 artificial operands.
12014
d17687f6
DS
120152011-10-18 Dodji Seketeli <dodji@redhat.com>
12016
12017 PR bootstrap/50760
12018 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 12019 !NO_IMPLICIT_EXTERN_C.
d17687f6 12020
fc8396e9
PC
120212011-10-17 Michael Spertus <mike_spertus@symantec.com>
12022
12023 * c-common.c (c_common_reswords): Add __bases,
12024 __direct_bases.
12025 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
12026
120272011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
12028
12029 PR c++/50757
12030 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
12031
847e697a
TT
120322011-10-15 Tom Tromey <tromey@redhat.com>
12033 Dodji Seketeli <dodji@redhat.com>
12034
12035 * c.opt (fdebug-cpp): New option.
12036 * c-opts.c (c_common_handle_option): Handle the option.
12037 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
12038 output stream in parameter. Factorized from ...
12039 (maybe_print_line): ... this. Dump location debug information when
12040 -fdebug-cpp is in effect.
12041 (print_line_1): New static function. Takes an output stream in
12042 parameter. Factorized from ...
12043 (print_line): ... here. Dump location information when -fdebug-cpp
12044 is in effect.
12045 (scan_translation_unit): Dump location information when
12046 -fdebug-cpp is in effect.
12047
92582b75
TT
120482011-10-15 Tom Tromey <tromey@redhat.com>
12049 Dodji Seketeli <dodji@redhat.com>
12050
12051 * c.opt (ftrack-macro-expansion): New option. Handle it with and
12052 without argument.
12053 * c-opts.c (c_common_handle_option)<case
12054 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
12055 cases. Handle -ftrack-macro-expansion with and without argument.
12056
46427374
TT
120572011-10-15 Tom Tromey <tromey@redhat.com>
12058 Dodji Seketeli <dodji@redhat.com>
12059
12060 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
12061 (print_line, cb_define, do_line_change): Adjust to avoid touching
12062 the internals of struct line_map. Use the public API instead.
12063 * c-pch.c (c_common_read_pch): Likewise.
12064 * c-lex.c (fe_file_change): Likewise.
12065
fc8396e9
PC
120662011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
12067
12068 PR c++/17212
12069 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
12070
120712011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
12072
12073 PR c++/33067
12074 * c-pretty-print.c (pp_c_floating_constant): Output
12075 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
12076
e79983f4
MM
120772011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
12078
12079 * c-common.c (def_builtin_1): Delete old interface with two
12080 parallel arrays to hold standard builtin declarations, and replace
12081 it with a function based interface that can support creating
12082 builtins on the fly in the future. Change all uses, and poison
12083 the old names. Make sure 0 is not a legitimate builtin index.
12084 * c-omp.c (c_finish_omp_barrier): Ditto.
12085 (c_finish_omp_taskwait): Ditto.
12086 (c_finish_omp_flush): Ditto.
12087
6637388f
TG
120882011-10-11 Tristan Gingold <gingold@adacore.com>
12089
12090 * c.opt: (fallow-parameterless-variadic-functions): New.
12091
3797cb21
DS
120922011-09-08 Dodji Seketeli <dodji@redhat.com>
12093
12094 PR c++/33255 - Support -Wunused-local-typedefs warning
12095 * c-common.h (struct c_language_function::local_typedefs): New
12096 field.
9faeb493
UB
12097 (record_locally_defined_typedef, maybe_record_typedef_use)
12098 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 12099 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
12100 (maybe_record_typedef_use)
12101 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
12102 * c.opt: Declare new -Wunused-local-typedefs flag.
12103
693ddb1b
EB
121042011-09-06 Eric Botcazou <ebotcazou@adacore.com>
12105
12106 PR middle-end/50266
12107 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
12108 computations.
12109
830c740f
RG
121102011-09-05 Richard Guenther <rguenther@suse.de>
12111
12112 * c-common.c (complete_array_type): Use ssize_int (-1) instead
12113 of integer_minus_one_node for empty array upper bounds.
12114
892a371f
DS
121152011-08-28 Dodji Seketeli <dodji@redhat.com>
12116
12117 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
12118 it's the first time it's being called on this main TU.
12119
0e3fdb48
RB
121202011-08-24 Richard Guenther <rguenther@suse.de>
12121
12122 PR c/49396
12123 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
12124
121252011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
12126
12127 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
12128 defined in cpp_init_builtins and c_cpp_builtins.
12129
d4a83c10
JM
121302011-08-19 Joseph Myers <joseph@codesourcery.com>
12131
12132 * c-common.c (c_common_reswords): Add __builtin_complex.
12133 * c-common.h (RID_BUILTIN_COMPLEX): New.
12134
bbceee64
JM
121352011-08-18 Joseph Myers <joseph@codesourcery.com>
12136
12137 * c-common.c (c_common_reswords): Add _Noreturn.
12138 (keyword_is_function_specifier): Handle RID_NORETURN.
12139 * c-common.h (RID_NORETURN): New.
12140
3f8257db 121412011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
12142
12143 * c-common.c (unsafe_conversion_p): New function. Check if it is
12144 unsafe to convert an expression to the type.
12145 (conversion_warning): Adjust, use unsafe_conversion_p.
12146 * c-common.h (unsafe_conversion_p): New function declaration.
12147
20906c66
JJ
121482011-08-02 Jakub Jelinek <jakub@redhat.com>
12149
12150 * c-common.h (c_finish_omp_atomic): Adjust prototype.
12151 (c_finish_omp_taskyield): New prototype.
12152 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
12153 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
12154 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
12155 or RHS1 have side-effects, evaluate those too in the right spot,
12156 if it is a decl and LHS is also a decl, error out if they
12157 aren't the same.
12158 (c_finish_omp_taskyield): New function.
12159 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
12160 * c-pragma.c (omp_pragmas): Add taskyield.
12161 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
12162 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
12163 PRAGMA_OMP_CLAUSE_MERGEABLE.
12164
770e5a2e
DS
121652011-07-25 Dodji Seketeli <dodji@redhat.com>
12166
12167 * c-common.h (set_underlying_type): Remove parm name from
12168 declaration.
12169
1baae426
RG
121702011-07-25 Romain Geissler <romain.geissler@gmail.com>
12171
12172 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 12173
fcb21722
JM
121742011-07-22 Jason Merrill <jason@redhat.com>
12175
76f86d00
JM
12176 PR c++/49793
12177 * c.opt (Wnarrowing): New.
12178
3a636414
JM
12179 PR c++/30112
12180 * c-common.h: Declare c_linkage_bindings.
12181 * c-pragma.c (handle_pragma_redefine_extname): Use it.
12182
fcb21722
JM
12183 PR c++/49813
12184 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
12185 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
12186 as flag_isoc99 for 'restrict'.
12187 (pp_c_specifier_qualifier_list): Likewise for _Complex.
12188
02614448
ILT
121892011-07-21 Ian Lance Taylor <iant@google.com>
12190
12191 PR middle-end/49705
12192 * c-common.c (c_disable_warnings): New static function.
12193 (c_enable_warnings): New static function.
12194 (c_fully_fold_internal): Change local unused_p to bool. Call
12195 c_disable_warnings and c_enable_warnings rather than change
12196 c_inhibit_evaluation_warnings.
12197
34429675
JM
121982011-07-20 Jason Merrill <jason@redhat.com>
12199
12200 PR c++/6709 (DR 743)
12201 PR c++/42603 (DR 950)
12202 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
12203 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
12204 (CPP_DECLTYPE): New.
12205 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
12206
5d49b6a7
RG
122072011-07-19 Richard Guenther <rguenther@suse.de>
12208
12209 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
12210 * c-omp.c (c_finish_omp_for): Likewise.
12211
e84a58ff
EB
122122011-07-12 Eric Botcazou <ebotcazou@adacore.com>
12213
12214 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
12215 body on the next line.
12216
329af3c7
JM
122172011-07-08 Jason Merrill <jason@redhat.com>
12218
4063e61b
JM
12219 PR c++/45437
12220 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
12221
329af3c7
JM
12222 PR c++/49673
12223 * c-common.c (c_apply_type_quals_to_decl): Don't check
12224 TYPE_NEEDS_CONSTRUCTING.
12225
1a072294
RG
122262011-07-06 Richard Guenther <rguenther@suse.de>
12227
12228 * c-common.c (c_common_nodes_and_builtins):
12229 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
12230
fce5dddd
RG
122312011-07-05 Richard Guenther <rguenther@suse.de>
12232
12233 * c-common.c (c_common_nodes_and_builtins): Build all common
12234 tree nodes first.
12235
45d439ac
JJ
122362011-06-27 Jakub Jelinek <jakub@redhat.com>
12237
56300785
JJ
12238 * c-common.h (c_tree_chain_next): New static inline function.
12239
45d439ac
JJ
12240 * c-common.c (check_builtin_function_arguments): Handle
12241 BUILT_IN_ASSUME_ALIGNED.
12242
e0a8ecf2
AM
122432011-06-21 Andrew MacLeod <amacleod@redhat.com>
12244
12245 * c-common.c: Add sync_ or SYNC__ to builtin names.
12246 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
12247
122482011-06-20 Pierre Vittet <piervit@pvittet.com>
12249
12250 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
12251 handler.
12252 (gen_pragma_handler): New union.
12253 (internal_pragma_handler): New type.
12254 (c_register_pragma_with_data)
12255 (c_register_pragma_with_expansion_and_data): New functions.
12256
12257 * c-pragma.c (registered_pragmas, c_register_pragma_1)
12258 (c_register_pragma, c_register_pragma_with_expansion)
12259 (c_invoke_pragma_handler): Changed to work with
12260 internal_pragma_handler.
12261 (c_register_pragma_with_data)
12262 (c_register_pragma_with_expansion_and_data): New functions.
12263
677f3fa8
JM
122642011-06-14 Joseph Myers <joseph@codesourcery.com>
12265
12266 * c-common.c: Include common/common-target.h.
12267 (handle_section_attribute): Use
12268 targetm_common.have_named_sections.
12269 * c-cppbuiltin.c: Include common/common-target.h.
12270 (c_cpp_builtins): Use targetm_common.except_unwind_info.
12271
d7fc8c14
RG
122722011-06-10 Richard Guenther <rguenther@suse.de>
12273
12274 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
12275 to print a IDENTIFIER_NODE.
12276
10e48e39
RO
122772011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12278 Joseph Myers <joseph@codesourcery.com>
12279
12280 * c.opt (fbuilding-libgcc): New option.
12281 * c-cppbuiltin.c (c_cpp_builtins): Define
12282 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
12283
6976ae51
JM
122842011-06-07 Jason Merrill <jason@redhat.com>
12285
3ff60975
JM
12286 * c-common.c (max_tinst_depth): Lower default to 900.
12287
6976ae51
JM
12288 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
12289
009db074
RG
122902011-06-07 Richard Guenther <rguenther@suse.de>
12291
12292 * c-common.c (c_common_nodes_and_builtins): Do not set
12293 size_type_node or call set_sizetype.
12294
b4592b92
DS
122952011-06-07 Dodji Seketeli <dodji@redhat.com>
12296
12297 PR debug/49130
12298 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 12299 type when using pointer comparison to compare types.
b4592b92 12300
014ab419
JW
123012011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
12302
12303 * c.opt: Add -Wdelete-non-virtual-dtor.
12304 * c-opts.c (c_common_handle_option): Include it in -Wall.
12305
4f60111f
NF
123062011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
12307
12308 PR bootstrap/49190
12309
12310 Revert:
12311 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12312
12313 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12314 not tree_common.
12315
4cc4f2f4
JJ
123162011-05-27 Jakub Jelinek <jakub@redhat.com>
12317
12318 PR c++/49165
12319 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
12320 C++ don't call c_common_truthvalue_conversion on void type arms.
12321
38e01f9e
NF
123222011-05-27 Nathan Froyd <froydnj@codesourcery.com>
12323
12324 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
12325 (stmt_list_stack): Define.
12326 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
12327 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
12328
92e948a8
NF
123292011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12330
12331 * c-common.c (warning_candidate_p): Check for BLOCKs.
12332
a2fc3e63
NF
123332011-05-26 Nathan Froyd <froydnj@codesourcery.com>
12334
12335 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
12336 not tree_common.
12337
0957c029
JJ
123382011-05-25 Jakub Jelinek <jakub@redhat.com>
12339
12340 * c-common.c (def_fn_type): Remove extra va_end.
12341
828fb3ba
JM
123422011-05-23 Jason Merrill <jason@redhat.com>
12343
12344 PR c++/48106
12345 * c-common.c (c_common_get_narrower): New.
12346 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
12347
dde05067
NF
123482011-05-23 Nathan Froyd <froydnj@codesourcery.com>
12349
12350 * c-common.h (check_function_arguments): Tweak prototype of
12351 check_function_arguments.
12352 * c-common.c (check_function_arguments): Likewise. Adjust
12353 calls to check_function_nonnull, check_function_format, and
12354 check_function_sentinel.
12355 (check_function_sentinel): Take a FUNCTION_TYPE rather than
12356 separate attributes and typelist arguments. Use
12357 FOREACH_FUNCTION_ARGS to iterate over argument types.
12358
3c0d13bf
PC
123592011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
12360
12361 * c-common.c (c_common_reswords): Reorder.
12362 * c-common.h (rid): Likewise.
12363
8242dd04
NF
123642011-05-10 Nathan Froyd <froydnj@codesourcery.com>
12365
12366 * c-common.c (def_fn_type): Don't call build_function_type, call
12367 build_function_type_array or build_varargs_function_type_array
12368 instead.
12369 (c_common_nodes_and_builtins): Likewise.
12370
3d528853
NF
123712011-05-05 Nathan Froyd <froydnj@codesourcery.com>
12372
12373 * c-common.c (c_add_case_label): Omit the loc argument to
12374 build_case_label.
12375 * c-common.h (build_case_label): Remove.
12376 * c-semantics.c (build_case_label): Remove.
12377
a04a722b
JM
123782011-05-05 Joseph Myers <joseph@codesourcery.com>
12379
12380 * c-objc.h (objc_start_method_definition): Update prototype.
12381 * stub-objc.c (objc_start_method_definition): Add extra parameter.
12382
e19a18d4
NF
123832011-05-04 Nathan Froyd <froydnj@codesourcery.com>
12384
12385 * c-common.c (check_main_parameter_types): Reindent. Don't use
12386 TYPE_ARG_TYPES directly.
12387 (handle_nonnull_attribute): Likewise.
12388 (sync_resolve_params): Likewise.
12389 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
12390 to check_format_string.
12391 (handle_format_attribute): Likewise.
12392 (check_format_string): Take a function type to examine instead of
12393 a type list. Use a function_arg_iterator to step through argument
12394 types.
12395
c62c040f
RG
123962011-05-04 Richard Guenther <rguenther@suse.de>
12397
12398 * c-common.c (fix_string_type): Use size_int for index type bounds.
12399 (start_fname_decls): Do not pass NULL to build_int_cst.
12400 (c_init_attributes): Likewise.
12401 * c-lex.c (c_lex_with_flags): Likewise.
12402
c12ff9d8
JM
124032011-04-27 Jason Merrill <jason@redhat.com>
12404
12405 * c-common.c (make_tree_vector_from_list): New.
12406 * c-common.h: Declare it.
12407
304dfbe3
RG
124082011-04-26 Richard Guenther <rguenther@suse.de>
12409
12410 PR preprocessor/48248
12411 * c-ppoutput.c (maybe_print_line): Always optimize newlines
12412 for output size with -P.
12413
3c0d13bf
PC
124142011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
12415
12416 * c-common.c (struct c_common_resword): Add __underlying_type.
12417 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
12418
04695783
JM
124192011-04-20 Jim Meyering <meyering@redhat.com>
12420
12421 * c-format.c (init_dollar_format_checking): Remove useless
12422 if-before-free.
12423
0dc33c3c
NP
124242011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
12425
12426 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 12427 (objc_detect_field_duplicates): New.
0dc33c3c 12428 * stub-objc.c: Likewise.
3c0d13bf 12429
c59633d9
NP
124302011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12431
12432 * stub-objc.c (objc_declare_protocols): Renamed to
12433 objc_declare_protocol.
12434 * c-objc.h: Likewise.
3c0d13bf 12435
32dabdaf
NP
124362011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
12437
12438 * stub-objc.c (objc_declare_class): Updated argument name.
12439
81f653d6
NF
124402011-04-12 Nathan Froyd <froydnj@codesourcery.com>
12441
12442 * c-common.h (c_common_init_ts): Declare.
12443 * c-common.c (c_common_init_ts): Define.
12444
eb345401
NP
124452011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
12446
12447 * c-objc.h (objc_build_message_expr): Updated prototype.
12448 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 12449
a358e188
MJ
124502011-04-12 Martin Jambor <mjambor@suse.cz>
12451
12452 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
12453 of cgraph_node.
12454
e6313a78
RG
124552011-04-11 Richard Guenther <rguenther@suse.de>
12456
12457 * c-common.c (complete_array_type): Build a range type of
12458 proper type.
12459
dcf0c47e
NF
124602011-04-08 Nathan Froyd <froydnj@codesourcery.com>
12461
12462 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
12463 (handle_type_generic_attribute): Likewise.
12464
1ee44b26
JM
124652011-04-07 Jason Merrill <jason@redhat.com>
12466
12467 PR c++/48450
12468 * c-common.c (c_common_truthvalue_conversion): Don't ignore
12469 conversion from C++0x scoped enum.
12470
acce4e77
JM
124712011-04-06 Joseph Myers <joseph@codesourcery.com>
12472
12473 * c-target-def.h: New file.
12474 * c-target.def: New file.
12475 * c-target.h: New file.
12476 * c-common.c (targetcm): Don't define here.
12477 * c-common.h (default_handle_c_option): Declare.
12478 * c-format.c: Include c-target.h instead of target.h.
12479 * c-opts.c: Include c-target.h instead of target.h. Explicitly
12480 include tm.h.
12481 (default_handle_c_option): Move from targhooks.c.
12482
e2eefb55
JJ
124832011-03-29 Jakub Jelinek <jakub@redhat.com>
12484
12485 PR preprocessor/48248
12486 * c-ppoutput.c (print): Add src_file field.
12487 (init_pp_output): Initialize it.
12488 (maybe_print_line): Don't optimize by adding up to 8 newlines
12489 if map->to_file and print.src_file are different file.
12490 (print_line): Update print.src_file.
12491
ba78087b
KT
124922011-03-25 Kai Tietz <ktietz@redhat.com>
12493
12494 * c-ada-spec.c (compare_comment): Use filename_cmp
12495 instead of strcmp for filename.
12496
0edf1bb2
JL
124972011-03-25 Jeff Law <law@redhat.com>
12498
adfac8df 12499 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 12500
c7dc8804
JM
125012011-03-25 Jason Merrill <jason@redhat.com>
12502
12503 * c.opt: Add -std=c++03.
12504
d1d879b1
EB
125052011-03-22 Eric Botcazou <ebotcazou@adacore.com>
12506
12507 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
12508
3f8257db 125092011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
12510
12511 PR target/12171
5050afdf
KT
12512 * c-pretty-print.c (pp_c_specifier_qualifier_list):
12513 Display allowed attributes for function pointer types.
12514 (pp_c_attributes_display): New function to display
12515 attributes having affects_type_identity flag set to true.
12516 * c-pretty-print.h (pp_c_attributes_display): New prototype.
12517
62d784f7
KT
12518 * c-common.c (c_common_attribute_table):
12519 Add new element.
12520 (c_common_format_attribute_table): Likewise.
12521
82d37118
JM
125222011-03-18 Jason Merrill <jason@redhat.com>
12523
49a000c3
JM
12524 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
12525 * c-common.h: Don't declare it here.
12526 * c-common.c: Or define it here.
12527 * c-opts.c (c_common_handle_option): Or set it here.
12528
82d37118
JM
12529 PR c++/35315
12530 * c-common.c (handle_transparent_union_attribute): Don't
12531 make a duplicate type in C++.
12532
17bc631c
JM
125332011-03-15 Jason Merrill <jason@redhat.com>
12534
12535 * c-common.c (max_constexpr_depth): New.
12536 * c-common.h: Declare it.
12537 * c-opts.c (c_common_handle_option): Set it.
12538 * c.opt (fconstexpr-depth): New option.
12539
1b9b91a6
JM
125402011-03-11 Jason Merrill <jason@redhat.com>
12541
f231b5ff
JM
12542 * c-common.c (attribute_takes_identifier_p): Add missing const.
12543
1b9b91a6
JM
12544 PR c++/46803
12545 * c-common.c (attribute_takes_identifier_p): Assume that an
12546 unknown attribute takes an identifier.
12547
a19e4d44
NF
125482011-03-07 Nathan Froyd <froydnj@codesourcery.com>
12549
12550 PR c/47786
12551 * c-common.c (c_type_hash): Call list_length instead of iterating
12552 through DECL_CHAIN. Rename 'i' to 'n_elements'.
12553
982d62f6
JJ
125542011-02-19 Jakub Jelinek <jakub@redhat.com>
12555
12556 PR c/47809
12557 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
12558
0a256240
NP
125592011-02-17 Iain Sandoe <iains@gcc.gnu.org>
12560
12561 * c.opt (fobjc-abi-version=) New.
12562 (fobjc-nilcheck): New.
12563
ba9e6dd5
NF
125642011-02-03 Nathan Froyd <froydnj@codesourcery.com>
12565
12566 PR c++/46890
12567 * c-common.h (keyword_is_decl_specifier): Declare.
12568 * c-common.c (keyword_is_decl_specifier): Define.
12569 (keyword_is_function_specifier): New function.
12570
7273813a
JJ
125712011-01-26 Jakub Jelinek <jakub@redhat.com>
12572
12573 PR c/47473
12574 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
12575 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
12576 REAL_TYPE.
12577
908ef79b
AC
125782011-01-26 Arnaud Charlet <charlet@adacore.com>
12579
12580 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
12581
237e9384
JJ
125822011-01-26 Jakub Jelinek <jakub@redhat.com>
12583
12584 PR pch/47430
12585 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
12586 after init_c_lex if pch_file is set.
12587
47ea1edf
DK
125882011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
12589
d4dba752 12590 PR c++/43601
47ea1edf
DK
12591 * c.opt (-fkeep-inline-dllexport): New switch.
12592
2aa9c6ae
RG
125932011-01-12 Richard Guenther <rguenther@suse.de>
12594
12595 PR middle-end/32511
12596 * c-common.c (handle_weak_attribute): Warn instead of error
12597 on declaring an inline function weak.
12598
7bd11157
TT
125992011-01-05 Tom Tromey <tromey@redhat.com>
12600
12601 * c-common.h (lvalue_error): Update.
12602 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
12603 not error.
12604
0e66e494 126052010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 12606
b4f588c4
NP
12607 PR objc/47075
12608 * c-objc.h (objc_finish_message_expr): Added argument to
12609 prototype.
12610
f4da8dce
NF
126112010-12-22 Nathan Froyd <froydnj@codesourcery.com>
12612
12613 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
12614 Use prototype_p.
12615
46270f14
NP
126162010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
12617
12618 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 12619 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 12620
4816c593
NF
126212010-12-10 Nathan Froyd <froydnj@codesourcery.com>
12622
12623 * c-common.h (readonly_error): Declare.
12624 * c-common.c (readonly_error): Define.
12625
7a6daeb0
NF
126262010-12-09 Nathan Froyd <froydnj@codesourcery.com>
12627
12628 * c-common.h (invalid_indirection_error): Declare.
12629 * c-common.c (invalid_indirection_error): Define.
12630
892f6119
RG
126312010-12-03 Richard Guenther <rguenther@suse.de>
12632
12633 PR c/46745
12634 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
12635 (pp_c_unary_expression): Likewise.
12636 (pp_c_expression): Likewise.
12637
6c39e757
NP
126382010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
12639
12640 * c-common.h (objc_finish_function): New.
12641 (objc_non_volatilized_type): Removed.
12642 (objc_type_quals_match): Removed.
12643 * stub-objc.c (objc_finish_function): New.
12644 (objc_non_volatilized_type): Removed.
12645 (objc_type_quals_match): Removed.
9faeb493 12646
7c475d11
JM
126472010-11-30 Joseph Myers <joseph@codesourcery.com>
12648
12649 * c-common.h (parse_optimize_options): Declare.
12650 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
12651 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
12652
71f3e391
JM
126532010-11-29 Joseph Myers <joseph@codesourcery.com>
12654
12655 * c-opts.c (check_deps_environment_vars): Use getenv instead of
12656 GET_ENVIRONMENT.
12657 * c-pch.c (O_BINARY): Don't define here.
12658 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
12659
d5fabb58
JM
126602010-11-25 Joseph Myers <joseph@codesourcery.com>
12661
12662 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
12663 targetm.except_unwind_info.
12664
299404a1
JM
126652010-11-23 Joseph Myers <joseph@codesourcery.com>
12666
12667 * c-opts.c (c_common_handle_option): Pass location to
12668 set_struct_debug_option.
12669
c98cd5bf
JM
126702010-11-23 Joseph Myers <joseph@codesourcery.com>
12671
12672 * c-common.c (visibility_options): Move from ../opts.c.
12673 * c-common.h (struct visibility_flags, visibility_options):
12674 Declare here.
12675 * c-opts.c (finish_options): Rename to c_finish_options.
12676 (c_common_init): Update call to finish_options.
12677
a9546771
NP
126782010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
12679
12680 PR objc/34033
12681 * c-lex.c (lex_string): Check that each string in an Objective-C
12682 string concat sequence starts with either one or zero '@', and
12683 that there are no spurious '@' signs at the end.
12684
24a57808
JM
126852010-11-20 Joseph Myers <joseph@codesourcery.com>
12686
12687 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
12688 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
12689 HANDLE_PRAGMA_VISIBILITY.
12690 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
12691 HANDLE_PRAGMA_VISIBILITY): Don't define.
12692 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
12693
a9aa2c3a
NF
126942010-11-20 Nathan Froyd <froydnj@codesourcery.com>
12695
12696 PR c++/16189
12697 PR c++/36888
12698 PR c++/45331
12699 * c-common.h (keyword_begins_type_specifier): Declare.
12700 (keyword_is_storage_class_specifier): Declare.
12701 (keyword_is_type_qualifier): Declare.
12702 * c-common.c (keyword_begins_type_specifier): New function.
12703 (keyword_is_storage_class_specifier): New function.
12704 (keyword_is_type_qualifier): Declare.
12705
5386338c
JM
127062010-11-19 Joseph Myers <joseph@codesourcery.com>
12707
12708 PR c/46547
12709 * c-common.c (in_late_binary_op): Define.
12710 (c_common_truthvalue_conversion): Check in_late_binary_op before
12711 calling c_save_expr.
12712 * c-common.h (in_late_binary_op): Declare.
12713
69ccdddb
JM
127142010-11-19 Joseph Myers <joseph@codesourcery.com>
12715
12716 * c-opts.c (c_common_handle_option): Update calls to
12717 set_struct_debug_option.
12718
6b192a09
NP
127192010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
12720
12721 * c-common.h (objc_declare_protocols): Added additional argument.
12722 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 12723
fb52b50a
NF
127242010-11-18 Nathan Froyd <froydnj@codesourcery.com>
12725
12726 PR c/33193
12727 * c-common.h (build_real_imag_expr): Declare.
12728 * c-semantics.c (build_real_imag_expr): Define.
12729
b37421c6
JM
127302010-11-17 Joseph Myers <joseph@codesourcery.com>
12731
12732 * c-opts.c (c_common_parse_file): Take no arguments.
12733 * c-common.h (c_common_parse_file): Update prototype.
12734
07078664
JJ
127352010-11-16 Jakub Jelinek <jakub@redhat.com>
12736
12737 PR c++/46401
12738 * c-common.c (warning_candidate_p): Don't track non-const calls
12739 or STRING_CSTs.
12740
c6a13190
ILT
127412010-11-15 Ian Lance Taylor <iant@google.com>
12742
12743 * c-lex.c (init_c_lex): Set macro debug callbacks if
12744 flag_dump_go_spec is set.
12745
925e8657
NP
127462010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
12747
12748 * c-common.h (objc_build_incr_expr_for_property_ref): New.
12749 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
12750
bb0a9581
NF
127512010-11-15 Nathan Froyd <froydnj@codesourcery.com>
12752
12753 PR preprocessor/45038
12754 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
12755 dialects.
12756
c5fa0890
JM
127572010-11-12 Joseph Myers <joseph@codesourcery.com>
12758
12759 * c-common.h (c_family_lang_mask): Declare.
12760 * c-opts.c (c_family_lang_mask): Make extern.
12761 * c-pragma.c (handle_pragma_diagnostic): Use
12762 control_warning_option.
12763
a4d8c676
JM
127642010-11-12 Joseph Myers <joseph@codesourcery.com>
12765
12766 * c-common.c (parse_optimize_options): Update call to
12767 decode_options.
12768 * c-common.h (c_common_handle_option): Update prototype.
12769 * c-opts.c (c_common_handle_option): Take location_t parameter and
12770 pass it to other functions.
12771
f954bd2c
JM
127722010-11-11 Joseph Myers <joseph@codesourcery.com>
12773
12774 * c-opts.c (warning_as_error_callback): Remove.
12775 (c_common_initialize_diagnostics): Don't call
12776 register_warning_as_error_callback.
12777 (c_common_handle_option): Handle -Werror=normalized= here.
12778
d8a07487
JM
127792010-11-10 Joseph Myers <joseph@codesourcery.com>
12780
12781 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
12782 in diagnostic.
12783 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
12784 letter.
12785 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
12786 Remove trailing '.' from diagnostics.
12787 * c.opt (Wwrite-strings_: Avoid '`' in help text.
12788
d5478783
JM
127892010-11-10 Joseph Myers <joseph@codesourcery.com>
12790
12791 * c-common.c (parse_optimize_options): Pass global_dc to
12792 decode_options.
12793 * c-opts.c (c_common_handle_option): Pass &global_options to
12794 set_Wstrict_aliasing.
12795 * c.opt (v): Don't mark Common or document here.
12796
91ebb981
IS
127972010-11-06 Iain Sandoe <iains@gcc.gnu.org>
12798
12799 PR target/44981
12800 * c-format.c (format_type): New type gcc_objc_string_format_type.
12801 (valid_stringptr_type_p): New.
12802 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 12803 (check_format_string): Pass expected type, use
91ebb981
IS
12804 valid_stringptr_type_p (), check that the format string types are
12805 consistent with the format specification.
12806 (decode_format_attr): Warn if NSString is used outside objective-c.
12807 (format_types_orig): Add NSString.
12808 (format_name): New.
12809 (format_flags): New.
12810 (check_format_arg): Handle format strings requiring an external parser.
12811 first_target_format_type: New variable.
12812 (handle_format_attribute): Set up first_target_format_type, pass the
12813 expected format arg string type to check_format_string().
ab20d992 12814 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
12815 * stub-objc.c (objc_string_ref_type_p): New.
12816 (objc_check_format_arg): New.
12817
bede2adc
NP
128182010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
12819
9faeb493 12820 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
12821 * c-common.h (objc_build_class_component_ref): New.
12822 * stub-objc.c (objc_build_class_component_ref): New.
12823
9a179d01
NP
128242010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12825
12826 * c.opt (Wproperty-assign-default): New option.
12827
22d8d616
NP
128282010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
12829
12830 Implemented -fobjc-std=objc1 flag.
12831 * c.opt (fobjc-std=objc1): New option.
12832
2debdb4f
NP
128332010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
12834
12835 Implemented format and noreturn attributes for Objective-C methods.
12836 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
12837 attribute for Objective-C methods.
12838
ec52b111
JM
128392010-10-31 Jason Merrill <jason@redhat.com>
12840
12841 * c-common.c (conversion_warning, warn_for_collisions_1): Use
12842 EXPR_LOC_OR_HERE.
12843
46a88c12
NP
128442010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
12845
12846 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
12847 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
12848 (objc_add_property_declaration): Removed arguments for copies and
12849 ivar.
12850 (objc_build_getter_call): Renamed to
12851 objc_maybe_build_component_ref.
12852 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12853 (objc_is_property_ref): New.
12854 * c-common.c (c_common_reswords): Removed copies and ivar.
12855 * stub-objc.c (objc_add_property_declaration): Removed arguments
12856 for copies and ivar.
12857 (objc_build_getter_call): Renamed to
12858 objc_maybe_build_component_ref.
12859 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
12860 (objc_is_property_ref): New.
9faeb493 12861
1e4bf85b
AC
128622010-10-29 Arnaud Charlet <charlet@adacore.com>
12863 Matthew Gingell <gingell@adacore.com>
12864
12865 * c-ada-spec.c (separate_class_package): New function.
12866 (pp_ada_tree_identifier): Prefix references to C++ classes with the
12867 name of their enclosing package.
12868 (print_ada_declaration): Use separate_class_package.
12869
81f0bab2
JM
128702010-10-27 Jason Merrill <jason@redhat.com>
12871
2b08f2c5
JM
12872 * c-common.c (c_common_reswords): Add __is_literal_type.
12873 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
12874
81f0bab2
JM
12875 * c-common.c (check_case_value): Remove special C++ code.
12876
200290f2
NP
128772010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12878
12879 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
12880 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
12881 and RID_LAST_PATTR.
12882 (objc_add_property_declaration): Added additional arguments.
12883 (objc_property_attribute_kind): Removed.
12884 (objc_set_property_attr): Removed.
12885 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
12886 copy and nonatomic.
12887 * stub-objc.c (objc_add_property_declaration): Added additional
12888 arguments.
12889 (objc_set_property_attr): Removed.
9faeb493 12890
f614132b
NP
128912010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
12892
12893 * c-common.h (objc_add_property_variable): Renamed to
12894 objc_add_property_declaration. Added location argument.
12895 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 12896
b8a18805
NP
128972010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
12898
12899 * c-common.h (objc_maybe_printable_name): New.
12900 * stub-objc.c (objc_maybe_printable_name): New.
12901
3f8257db
JJ
129022010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
12903 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
12904
12905 * c-common.h (c_common_mark_addressable_vec): Declare.
12906 * c-common.c (c_common_mark_addressable_vec): New function.
12907
249a82c4
NP
129082010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12909
12910 * c-common.h (objc_set_method_type): Removed.
12911 (objc_add_method_declaration): Added boolean argument.
12912 (objc_start_method_definition): Same change.
12913 (objc_build_method_signature): Same change.
12914 * stub-objc.c (objc_set_method_type): Removed.
12915 (objc_add_method_declaration): Added boolean argument.
12916 (objc_start_method_definition): Same change.
12917 (objc_build_method_signature): Same change.
12918
977e30bc
NP
129192010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
12920
12921 * c-common.h (finish_file): Removed.
12922 (objc_write_global_declarations): New.
12923 * c-opts.c (c_common_parse_file): Do not call finish_file.
12924 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 12925
da57d1b9
NP
129262010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12927
12928 Implemented parsing @synthesize and @dynamic for
12929 Objective-C/Objective-C++.
12930 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
12931 (objc_add_synthesize_declaration): New.
12932 (objc_add_dynamic_declaration): New.
12933 * c-common.c (c_common_reswords): Add synthesize and dynamic.
12934 * stub-objc.c (objc_add_synthesize_declaration): New.
12935 (objc_add_dynamic_declaration): New.
9faeb493 12936
0069111f
MM
129372010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
12938
12939 PR target/46041
12940 * c-cppbuiltin.c (mode_has_fma): Move function here from
12941 builtins.c. Don't use the fma optab, instead just use the
12942 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
12943 using -save-temps.
12944
e426b47b
NP
129452010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
12946
12947 Merge from 'apple/trunk' branch on FSF servers.
0069111f 12948
3f8257db 12949 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 12950
9faeb493 12951 Radar 4330422
e426b47b
NP
12952 * c-common.h (objc_non_volatilized_type): New declaration
12953 * stub-objc.c (objc_non_volatilized_type): New stub.
12954
90fbfdc3
NP
129552010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
12956
e426b47b 12957 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 12958
ab20d992 12959 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 12960
9faeb493 12961 Radar 4133425
90fbfdc3 12962 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 12963 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 12964
c37d8c30
IS
129652010-10-17 Iain Sandoe <iains@gcc.gnu.org>
12966
12967 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
12968 * c-common.h (enum rid): Add RID_AT_PACKAGE.
12969 (objc_ivar_visibility_kind): New enum.
12970 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 12971 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
12972 visibility enum.
12973
1b1562a5
MM
129742010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
12975
12976 * c-cppbuiltin.c (builtin_define_float_constants): Emit
12977 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
12978 has the appropriate fma builtins.
12979 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
12980
668ea4b1
IS
129812010-10-14 Iain Sandoe <iains@gcc.gnu.org>
12982
1b1562a5 12983 merge from FSF apple 'trunk' branch.
3f8257db 12984 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 12985
668ea4b1
IS
12986 Radars 4436866, 4505126, 4506903, 4517826
12987 * c-common.c (c_common_resword): Define @property and its attributes.
12988 * c-common.h: Define property attribute enum entries.
12989 (OBJC_IS_PATTR_KEYWORD): New.
12990 (objc_property_attribute_kind): New enum.
12991 Declare objc_set_property_attr (), objc_add_property_variable (),
12992 objc_build_getter_call () and objc_build_setter_call ().
12993 * stub-objc.c (objc_set_property_attr): New stub.
12994 (objc_add_property_variable): Likewise.
12995 (objc_build_getter_call): Likewise.
12996 (objc_build_setter_call) Likewise.
1b1562a5 12997
a1178b30
IS
129982010-10-13 Iain Sandoe <iains@gcc.gnu.org>
12999
1b1562a5 13000 merge from FSF apple 'trunk' branch.
ab20d992 13001 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
13002
13003 Radar 3803157 (method attributes)
13004 * c-common.c (handle_deprecated_attribute): Recognize
13005 objc methods as valid declarations.
13006 * c-common.h: Declare objc_method_decl ().
1b1562a5 13007 * stub-objc.c (objc_method_decl): New stub.
a1178b30 13008
a75bfaa6
JM
130092010-10-08 Joseph Myers <joseph@codesourcery.com>
13010
13011 * c-common.c (parse_optimize_options): Call
13012 decode_cmdline_options_to_array_default_mask before
13013 decode_options. Update arguments to decode_options.
13014 * c-common.h (c_common_init_options_struct): Declare.
13015 * c-opts.c (c_common_init_options_struct): New. Split out from
13016 c_common_init_options.
13017
f05b9d93
NP
130182010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
13019
13020 Implemented fast enumeration for Objective-C.
13021 * c-common.h (objc_finish_foreach_loop): New.
13022 * stub-objc.c (objc_finish_foreach_loop): New.
13023
1ebe4b4f
JM
130242010-10-05 Joseph Myers <joseph@codesourcery.com>
13025
13026 * c-common.h (struct diagnostic_context): Don't declare here.
13027 (c_common_initialize_diagnostics): Declare using
13028 diagnostic_context typedef.
13029 * c-opts.c (c_common_handle_option): Pass global_dc to
13030 handle_generated_option.
13031
d4d24ba4
JM
130322010-10-04 Joseph Myers <joseph@codesourcery.com>
13033
13034 * c-opts.c (c_common_handle_option): Pass &global_options_set to
13035 handle_generated_option.
13036
478a1c5b
ILT
130372010-10-03 Ian Lance Taylor <iant@google.com>
13038
13039 * c.opt (-fplan9-extensions): New option.
13040
82a1c2fe
FXC
130412010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
13042
13043 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
13044 Remove.
13045 (c_cpp_builtins): Call functions from cppbuiltin.c instead
13046 of duplicating code.
13047
92902b1b
IS
130482010-09-30 Iain Sandoe <iains@gcc.gnu.org>
13049
13050 * c-common.c: Add two new entries for @optional
13051 and @required keywords.
13052
13053 merge from FSF 'apple/trunk' branch.
3f8257db 13054 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
13055
13056 Radar 4386773
13057 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
13058 objective-c keywords.
13059 (objc_set_method_opt): New declaration.
13060 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 13061
46625112
JM
130622010-09-30 Joseph Myers <joseph@codesourcery.com>
13063
13064 * c-common.c (handle_optimize_attribute): Pass &global_options to
13065 cl_optimization_save and cl_optimization_restore.
13066 * c-opts.c (c_common_handle_option): Pass &global_options to
13067 handle_generated_option.
13068 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
13069 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
13070 &global_options to cl_optimization_restore.
13071
49b91f05
NP
130722010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
13073
13074 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
13075 Objective-C/Objective-C++ keywords.
13076
13ed556f 130772010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 13078
9faeb493
UB
13079 Merge from 'apple/trunk' branch on FSF servers.
13080
3f8257db 13081 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
13082
13083 Radar 4281748
13084 * c-common.h (objc_check_global_decl): New declaration.
13085 * stub-objc.c (objc_check_global_decl): New stub.
13086
f0036cca
JM
130872010-09-29 Joseph Myers <joseph@codesourcery.com>
13088
13089 * c.opt: Don't use VarExists.
13090
e3339d0f
JM
130912010-09-29 Joseph Myers <joseph@codesourcery.com>
13092
13093 * c-common.c (c_cpp_error): Update names of diagnostic_context
13094 members.
13095 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
13096 cl_optimization members.
13097 * c-opts.c (warning_as_error_callback, c_common_handle_option,
13098 sanitize_cpp_opts, finish_options): Update names of cpp_options
13099 members.
13100
1973201f
NP
131012010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
13102
13103 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
13104 (objc_is_reserved_word): Removed.
13105 * c-common.c: Updated comments.
13106 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
13107 objc_is_reserved_word.
13108 * stub-objc.c (objc_is_reserved_word): Removed.
13109
f7e71da5
IS
131102010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13111
9faeb493 13112 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
13113 include attributes.
13114 (objc_start_method_definition): Likewise.
13115 (objc_build_keyword_decl): Likewise.
13116 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
13117 (objc_start_method_definition): Likewise.
13118 (objc_build_keyword_decl): Likewise.
13119
c165dca7
IS
131202010-09-28 Iain Sandoe <iains@gcc.gnu.org>
13121
13122 * c-common.h (objc_start_class_interface): Adjust prototype.
13123 (objc_start_category_interface): Likewise.
13124 (objc_start_protocol): Likewise.
13125 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
13126 (objc_start_class_interface): Likewise.
13127 (objc_start_category_interface): Likewise.
13128
7458026b
ILT
131292010-09-27 Ian Lance Taylor <iant@google.com>
13130
13131 * c-common.c (c_common_attribute_table): Add no_split_stack.
13132 (handle_no_split_stack_attribute): New static function.
13133
b581b85b
NP
131342010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
13135
9faeb493 13136 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 13137
3f8257db 13138 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 13139
9faeb493 13140 Radar 4229905
b581b85b
NP
13141 * c-common.h (objc_have_common_type): New declaration.
13142 * stub-objc.c (objc_have_common_type): New stub.
13143
13144 2005-06-22 Ziemowit Laski <zlaski@apple.com>
13145
13146 Radar 4154928
13147 * c-common.h (objc_common_type): New prototype.
9faeb493 13148 * stub-objc.c (objc_common_type): New stub.
b581b85b 13149
46a4da10
JH
131502010-09-24 Jan Hubicka <jh@suse.cz>
13151
13152 * c-common.c (handle_leaf_attribute): New function.
13153 (struct attribute_spec c_common_att): Add leaf.
13154
e200444e
JM
131552010-09-22 Joseph Myers <joseph@codesourcery.com>
13156
13157 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
13158 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
13159 -dump, -dump=, -imacros, -imacros=, -include, -include=,
13160 -include-barrier, -include-directory, -include-directory=,
13161 -include-directory-after, -include-directory-after=,
13162 -include-prefix, -include-prefix=, -include-with-prefix,
13163 -include-with-prefix=, -include-with-prefix-after,
13164 -include-with-prefix-after=, -include-with-prefix-before,
13165 -include-with-prefix-before=, -no-integrated-cpp,
13166 -no-line-commands, -no-standard-includes, -no-warnings, -output,
13167 -output=, -pedantic, -pedantic-errors, -preprocess,
13168 -print-missing-file-dependencies, -trace-includes, -traditional,
13169 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
13170 -user-dependencies, -verbose, -write-dependencies,
13171 -write-user-dependencies, no-integrated-cpp, traditional): New.
13172
29a80ea6
NP
131732010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13174
13175 PR objc/23710
ac1fc2fc
NP
13176 * c-common.h (objc_start_method_definition): Return bool instead
13177 of void.
13178 * stub-objc.c (objc_start_method_definition): Return bool instead
13179 of void.
13180
131812010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
13182
13183 PR objc/25965
13184 * c-common.h (objc_get_interface_ivars): New declaration.
13185 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 13186
de621752
ILT
131872010-09-15 Ian Lance Taylor <iant@google.com>
13188
13189 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 13190 messages. Remove period at end of warning message.
de621752 13191
ba885ec5
NS
131922010-09-09 Nathan Sidwell <nathan@codesourcery.com>
13193
13194 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
13195 (handle_alias_attribute): ... here.
13196 (handle_ifunc_attribute): New.
13197
c5ee1358
MM
131982010-09-06 Mark Mitchell <mark@codesourcery.com>
13199
13200 * c-common.h (do_warn_double_promotion): Declare.
13201 * c-common.c (do_warn_double_promotion): Define.
13202
0a0b3574
MM
132032010-09-05 Mark Mitchell <mark@codesourcery.com>
13204
13205 * c.opt (Wdouble-promotion): New.
13206
d1779886
JM
132072010-09-02 Joseph Myers <joseph@codesourcery.com>
13208
13209 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
13210 fvtable-thunks, fxref): Mark no longer supported in help text.
13211
2d2bd949
JM
132122010-09-02 Joseph Myers <joseph@codesourcery.com>
13213
13214 * c.opt (Wimport, fall-virtual, falt-external-templates,
13215 fdefault-inline, fenum-int-equiv, fexternal-templates,
13216 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
13217 fname-mangling-version-, fnew-abi, fnonnull-objects,
13218 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
13219 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
13220 applicable.
13221 (fhandle-exceptions): Mark with Alias and Warn.
13222 * c-opts.c (c_common_handle_option): Don't handle options marked
13223 as ignored.
13224
5de8299c
JM
132252010-09-02 Joseph Myers <joseph@codesourcery.com>
13226
13227 * c.opt (Wcomments, Werror-implicit-function-declaration,
13228 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
13229 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
13230 aliases.
13231 * c-common.c (option_codes): Use OPT_Wcomment instead of
13232 OPT_Wcomments.
13233 * c-opts.c (warning_as_error_callback, c_common_handle_option):
13234 Don't handle options marked as aliases.
13235
0ceb0201
RG
132362010-08-25 Richard Guenther <rguenther@suse.de>
13237
13238 * c-common.c (c_common_get_alias_set): Remove special
13239 handling for pointers.
13240
ac47786e
NF
132412010-08-20 Nathan Froyd <froydnj@codesourcery.com>
13242
13243 * c-common.c: Use FOR_EACH_VEC_ELT.
13244 * c-gimplify.c: Likewise.
13245 * c-pragma.c: Likewise.
13246
c878765b
JM
132472010-08-16 Joseph Myers <joseph@codesourcery.com>
13248
13249 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
13250 RejectDriver.
13251 (MMDX): Change back to MMD. Mark NoDriverArg instead of
13252 RejectDriver.
13253 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
13254 instead of OPT_MDX and OPT_MMDX.
13255
603349bf
JM
132562010-08-16 Joseph Myers <joseph@codesourcery.com>
13257
13258 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
13259
644fa7ac
JM
132602010-08-12 Joseph Myers <joseph@codesourcery.com>
13261
13262 * c.opt (MD, MMD): Change to MDX and MMDX.
13263 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
13264
481e1176
JM
132652010-08-11 Joseph Myers <joseph@codesourcery.com>
13266
13267 * c-opts.c (c_common_handle_option): Call handle_generated_option
13268 instead of handle_option.
13269
ac8dc9f7
NF
132702010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13271
13272 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
13273 (maybe_apply_renaming_pragma): Delete unneeded declarations.
13274
4f8c876d
NF
132752010-08-08 Nathan Froyd <froydnj@codesourcery.com>
13276
13277 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
13278 (pending_redefine_extname): Change type to a VEC.
13279 (add_to_renaming_pragma_list): Update for new type of
13280 pending_redefine_extname.
ac8dc9f7 13281 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 13282
3b0c690e
AC
132832010-08-04 Arnaud Charlet <charlet@adacore.com>
13284
13285 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
13286 visited.
13287 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
13288 decide whether a type has already been declared/seen.
13289 Do not go to the original type.
13290 (dump_nested_types): New parameter forward.
13291 Generate forward declaration if needed and mark type as visited.
13292 (print_ada_declaration): Call dump_nested_types if not already done.
13293 Mark types as visited.
13294
1890bccc
JM
132952010-08-03 Joseph Myers <joseph@codesourcery.com>
13296
13297 * c.opt (-print-pch-checksum): Remove option.
13298 * c-opts.c (c_common_handle_option): Don't handle
13299 OPT_print_pch_checksum.
13300
5f20c657
JM
133012010-07-27 Joseph Myers <joseph@codesourcery.com>
13302
13303 * c-common.h (c_common_handle_option): Update prototype and return
13304 value type.
13305 * c-opts.c (c_common_handle_option): Update prototype and return
13306 value type. Update calls to handle_option and
13307 enable_warning_as_error.
13308
f551f80c
JJ
133092010-07-27 Jakub Jelinek <jakub@redhat.com>
13310
13311 PR c/45079
13312 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
13313
61ff2bdc
JM
133142010-07-27 Joseph Myers <joseph@codesourcery.com>
13315
13316 * c-common.h (c_common_missing_argument): Remove.
13317 * c-opts.c (c_common_missing_argument): Remove.
13318 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
13319 idirafter, imacros, include, isysroot, isystem, iquote): Add
13320 MissingArgError.
13321 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
13322
7a9bf9a4
JM
133232010-07-27 Joseph Myers <joseph@codesourcery.com>
13324
13325 * c-common.h (c_common_option_lang_mask,
13326 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
13327 New.
13328 (c_common_init_options): Update prototype.
13329 * c-opts.c (c_common_option_lang_mask): New.
13330 (c_common_initialize_diagnostics): Split out of
13331 c_common_init_options.
13332 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
13333 New.
13334 (c_common_init_options): Update prototype. Use decoded options in
13335 search for -lang-asm.
13336
910ad8de
NF
133372010-07-15 Nathan Froyd <froydnj@codesourcery.com>
13338
13339 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
13340 * c-format.c: Likewise.
13341
718f9c0f
MLI
133422010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
13343
13344 * c-common.h: Include diagnostic-core.h. Error if already
13345 included.
13346 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
13347
4d451982
MLI
133482010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
13349
adfac8df 13350 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
13351 Do not include expr.h
13352 (vector_mode_valid_p): Move here.
13353
119fe915
SB
133542010-06-21 DJ Delorie <dj@redhat.com>
13355
13356 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
13357 allow these pragmas anywhere.
13358
133592010-06-14 Jakub Jelinek <jakub@redhat.com>
13360
13361 PR bootstrap/44509
13362 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
13363 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
13364 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
13365 ggc_strdup instead of xstrdup.
13366
133672010-06-10 Jakub Jelinek <jakub@redhat.com>
13368
13369 * c-cppbuiltin.c: Include cpp-id-data.h.
13370 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
13371 (lazy_hex_fp_value): New function.
13372 (builtin_define_with_hex_fp_value): Provide definitions lazily.
13373
6662d794
MLI
133742010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
13375
13376 * c-gimplify.c: Do not include tree-flow.h
13377
38f8b050
JR
133782010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
13379
13380 PR other/44034
13381 * c-common.c: Rename targetm member:
13382 targetm.enum_va_list -> targetm.enum_va_list_p
13383
9589f23e
AS
133842010-06-28 Anatoly Sokolov <aesok@post.ru>
13385
13386 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
13387
3b06d379
SB
133882010-06-28 Steven Bosscher <steven@gcc.gnu.org>
13389
13390 * c-cppbuiltin.c: Do not include except.h.
13391
d166d4c3
AK
133922010-06-24 Andi Kleen <ak@linux.intel.com>
13393
9faeb493
UB
13394 * c-common.c (warn_for_omitted_condop): New.
13395 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 13396
70cb8be6
JM
133972010-06-21 Joseph Myers <joseph@codesourcery.com>
13398
13399 * c.opt (lang-objc): Remove.
13400 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
13401
a4c97feb
JR
134022010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
13403
13404 * c-opts.c: Include "tm_p.h".
13405
6e2f1956
JM
134062010-06-20 Joseph Myers <joseph@codesourcery.com>
13407
13408 * c-common.c (parse_optimize_options): Update call to
13409 decode_options.
13410
bc87224e
NF
134112010-06-18 Nathan Froyd <froydnj@codesourcery.com>
13412
13413 * c-common.c (record_types_used_by_current_var_decl): Adjust for
13414 new type of types_used_by_cur_var_decl.
13415
b49cf425
JR
134162010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
13417
13418 PR bootstrap/44512
13419 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
13420 for C++ standard compliance.
13421
59f9c2ed
JM
134222010-06-16 Jason Merrill <jason@redhat.com>
13423
13424 * c.opt: Add -Wnoexcept.
13425
33766b66
RG
134262010-06-16 Richard Guenther <rguenther@suse.de>
13427
13428 PR c/44555
13429 * c-common.c (c_common_truthvalue_conversion): Remove
13430 premature and wrong optimization concering ADDR_EXPRs.
13431
eff7e30c
AC
134322010-06-15 Arnaud Charlet <charlet@adacore.com>
13433
13434 * c-ada-spec.c (dump_sloc): Remove column info.
13435 (is_simple_enum): New function.
13436 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
13437 enum types when relevant.
13438
6312e84d
MLI
134392010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
13440
9faeb493 13441 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
13442 location.
13443
1cb42611
JM
134442010-06-10 Joseph Myers <joseph@codesourcery.com>
13445
13446 * c-opts.c (c_common_handle_option): Don't handle
13447 OPT_fshow_column.
13448
a9429e29
LB
134492010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
13450
13451 * c-pragma.c (push_alignment): Use typed GC allocation.
13452 (handle_pragma_push_options): Likewise.
13453
13454 * c-common.c (parse_optimize_options): Likewise.
13455
13456 * c-common.h (struct sorted_fields_type): Add variable_size GTY
13457 option.
13458
5498f011
JM
134592010-06-07 Joseph Myers <joseph@codesourcery.com>
13460
13461 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
13462 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13463 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13464 flag_signed_bitfields, warn_strict_null_sentinel,
13465 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
13466 flag_gen_declaration, flag_no_gnu_keywords,
13467 flag_implement_inlines, flag_implicit_templates,
13468 flag_implicit_inline_templates, flag_optional_diags,
13469 flag_elide_constructors, flag_default_inline, flag_rtti,
13470 flag_conserve_space, flag_access_control, flag_check_new,
13471 flag_new_for_scope, flag_weak, flag_working_directory,
13472 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
13473 flag_enforce_eh_specs, flag_threadsafe_statics,
13474 flag_pretty_templates): Remove.
13475 * c-common.h (flag_preprocess_only, flag_nil_receivers,
13476 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
13477 flag_replace_objc_classes, flag_undef, flag_no_builtin,
13478 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
13479 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
13480 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
13481 flag_no_gnu_keywords, flag_implement_inlines,
13482 flag_implicit_templates, flag_implicit_inline_templates,
13483 flag_optional_diags, flag_elide_constructors, flag_default_inline,
13484 flag_rtti, flag_conserve_space, flag_access_control,
13485 flag_check_new, flag_new_for_scope, flag_weak,
13486 flag_working_directory, flag_use_cxa_atexit,
13487 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
13488 flag_threadsafe_statics, flag_pretty_templates,
13489 warn_strict_null_sentinel): Remove.
13490 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
13491 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
13492 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
13493 fimplicit-inline-templates, fimplicit-templates,
13494 flax-vector-conversions, fms-extensions, fnil-receivers,
13495 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
13496 frtti, fshort-double, fshort-enums, fshort-wchar,
13497 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
13498 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
13499 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
13500 gen-decls, undef): Use Var.
13501 (fdefault-inline, foptional-diags): Document as doing nothing.
13502 * c-opts.c (c_common_handle_option): Remove cases for options now
13503 using Var. Mark ignored options as such.
13504
39dabefd
SB
135052010-06-05 Steven Bosscher <steven@gcc.gnu.org>
13506
9faeb493 13507 * c-common.c: Moved to here from parent directory.
39dabefd
SB
13508 * c-common.def: Likewise.
13509 * c-common.h: Likewise.
13510 * c-cppbuiltin.c: Likewise.
13511 * c-dump.c: Likewise.
13512 * c-format.c: Likewise.
13513 * c-format.h : Likewise.
13514 * c-gimplify.c: Likewise.
13515 * c-lex.c: Likewise.
13516 * c-omp.c: Likewise.
13517 * c.opt: Likewise.
13518 * c-opts.c: Likewise.
13519 * c-pch.c: Likewise.
13520 * c-ppoutput.c: Likewise.
13521 * c-pragma.c: Likewise.
13522 * c-pragma.h: Likewise.
13523 * c-pretty-print.c: Likewise.
13524 * c-pretty-print.h: Likewise.
13525 * c-semantics.c: Likewise.
13526 * stub-objc.c: Likewise.
13527
13528 * c-common.c: Include gt-c-family-c-common.h.
13529 * c-pragma.c: Include gt-c-family-c-pragma.h.
13530\f
877e3c2a 13531Copyright (C) 2010-2022 Free Software Foundation, Inc.
39dabefd
SB
13532
13533Copying and distribution of this file, with or without modification,
13534are permitted in any medium without royalty provided the copyright
13535notice and this notice are preserved.
This page took 4.888623 seconds and 5 git commands to generate.